purupuru-codex
construct-purupuru-codex
Canonical knowledge base for the Purupuru universe — a world of honey-rooted magic, sentient Puruhani beings, and the Wuxing elemental cycles that bind them.
Built as a construct-format codex following the patterns established by construct-mibera-codex. Serves canonical lore over HTTP and MCP via HyperJS, wiring into the freeside API ecosystem.
What's in the codex
Category | Count | Path |
KIZUNA Characters | 5 |
|
Puruhani | 5 |
|
Locations | 19 |
|
Jani Variants | 15 |
|
Cards | 15 |
|
Wuxing Elements | 5 |
|
Total Entities | 59 |
The HENLO System
Letter | Element | Character | Trait | Puruhani |
H | Wood | Kaori | Hopeful | Happy |
E | Earth | Nemu | Empty | Exhausted |
N | Fire | Akane | Naughty | Nefarious |
L | Metal | Eun | Loyal | Loving |
O | Water | Ruan | Overstimulated | Overwhelmed |
HTTP API
RESTful API served via HyperJS with OpenAPI 3.1 spec and Swagger UI.
bun install
bun run dev # starts on http://localhost:3000Endpoints
Route | Method | Description |
| GET | Look up a KIZUNA character |
| GET | Look up a Puruhani by element or name |
| GET | Look up a location |
| GET | Look up a Jani variant |
| GET | Look up a canonical card |
| GET | Wuxing element with cycle relationships |
| GET | Fuzzy search across all entities |
| GET | List all entities of a type |
| POST | Validate a claim against canonical data |
| GET | Service status with entity counts |
| GET | OpenAPI 3.1 spec |
| GET | Swagger UI |
All entity responses include world: "purupuru" for cross-service identification.
MCP
The same 9 tools are available over MCP via JSON-RPC 2.0 at POST /mcp, or via stdio for agent constructs:
node dist/server.js # stdio transport (for Claude Desktop, etc.)9 Tools
Tool | Description |
| Look up a KIZUNA character by name or slug |
| Look up a Puruhani by element or name |
| Look up a location by slug |
| Look up a Jani variant |
| Look up a canonical card |
| Wuxing element with Sheng/Ke cycle relationships |
| Anti-hallucination — validate claims against canonical data |
| Fuzzy search across all entities |
| List all entities of a given type |
Add to Claude Desktop
{
"mcpServers": {
"purupuru-codex": {
"command": "node",
"args": ["/path/to/construct-purupuru-codex/dist/server.js"]
}
}
}Browse
Navigate entities by dimension:
browse/by-element/— Wood, Earth, Fire, Metal, Waterbrowse/by-generation/— Kizunabrowse/by-type/— Character, Puruhani, Location, Janibrowse/by-district/— Horai Surface, Old Horai, Tsuhejibrowse/by-canon-tier/— Canonical, Established, Exploratory, Speculative
Data Exports
Machine-readable exports in _codex/data/:
File | Format | Content |
| JSONL | 5 character records |
| JSONL | 5 puruhani records |
| JSONL | 19 location records |
| JSONL | 15 jani records |
| JSONL | 15 card records |
| JSON | Element system with Sheng/Ke cycles |
| JSON | Knowledge graph (44 nodes, 67 edges) |
| JSON | Entity counts and version |
Skills
Three construct skills for agent-driven exploration:
browse-codex — Navigate by dimension
query-entity — Deterministic lookup with fuzzy fallback
cross-reference — Traverse entity relationships
Canon Authority
Content follows a four-tier authority model:
Tier | Meaning |
Canonical | Binding truth from lore-bible |
Established | Committed decisions from design cycles |
Exploratory | Validated but not locked |
Speculative | Not yet validated |
Source material: world-purupuru
Development
bun install # Install deps
bun run dev # HTTP API server (port 3000)
bun run dev:mcp # MCP stdio server (watch mode)
bun run test # Run tests (69 specs)
bun run test:api # Run API tests only
bun run lint # Lint
bun run build # Build MCP stdio server
bun run validate:schema # Validate all entity frontmatter
bun run generate:exports # Regenerate JSONL/JSON exports
bun run generate:indices # Regenerate browse indicesLicense
MIT