Files
code_of_conquest_dnd/content
Phillip Tarrant a668cf98eb refactor(contract)!: class_id -> calling_id, and the log gains race_id
class_id is the rulebook's word; the world has callings — that was the whole §17
reconcile. The contract the Narrator reads should say what the world says. There
are no saves (M9) and no deployed clients, so this is as cheap as it will ever be
and strictly more expensive every milestone after.

race_id reaches the log because the AI must be able to describe the player:
api/app/prompts.py rendered 'a sellsword' and now renders 'a beastfolk cutpurse'.
It humanizes the id (the model must never read 'hedge_mage') and picks the right
article ('an elf', not 'a elf').

LogPlayer's hardcoded CLASSES const is deleted — the roster is Callings.IDS. A
parity test reads the JSON Schema from the client and asserts its enum equals the
code, so the two sides of the HTTP boundary cannot drift.

The deserter allowed three callings that no longer exist. He now allows all seven;
a thematic gate is a content decision for the Greywater authoring.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QYa9u7Kdxv5gX4AnwWexy8
2026-07-12 20:27:56 -05:00
..
2026-07-09 11:17:54 -05:00

/content — authored game data

Cross-cutting authored writing, split by role in the data model (see the canon log spec in /docs):

roadmap.md The content track — Spine · Bill of Materials · Backlog. START HERE.
/lore      Authored Markdown bibles. THE SOURCE OF TRUTH; world/ + server/ are built from it.
/world     Static, ID-referenced game content. Identical every playthrough. BUILT.
  /locations   The map — towns, dungeons, points of interest (by id)
  /npcs        Per-NPC persona + knowledge lists (charter §6)
  /quests      Story skeletons and quest definitions (charter §17)
  /items       Item definitions — gear, consumables, cursed items (§7)
/server    Spoiler bodies + personas. API-only; excluded from the client export. BUILT.
/origins   Thin starting-state seeds. One per starting point. POC authors one.
/fallback  Authored degraded-DM text for every AI surface (charter §13)

roadmap.md governs what gets authored. Its rule: never author anything that is not in the Bill of Materials. Ideas that arrive go to its Backlog.

The three layers

  • world/ is static content the origin and the canon log reference by stable string id. Authored once; the same for every play.
  • origins/ are thin seeds — where the player starts, the situation, and disposition/quest/item/build seeds. Values, not maps. Increase replayability without multiplying authoring work.
  • fallback/ is not world content — it is degraded-DM prose (§13), consumed when the API is down. It sits outside world/ on purpose: nothing resolves an id against it.

At new-game, code constructs the runtime canon log from a chosen origin + world content + character creation. See /docs/canon-log.md (spec) — authored via the design under /docs/superpowers/specs.

Authoring notes

  • NPC knowledge lists are the whole design (§6). The only thing stopping the blacksmith from revealing the twist. Real authoring work — budget for it.
  • Fallback text is content, not error handling (§13). Every AI-dependent surface needs one before it ships.
  • Story skeletons are authored for now. AI-generated skeletons are v2 (§17).