docs: canon log schema + origin seed design

Design spec for the §11 canon log, plus origin seeds as thin initial-state
overlays over a single static world. Three layers (world content / origin seed /
runtime canon log), the in/out boundary (numeric Luck never enters the AI
payload, §7), field-level schemas, new-game construction order, turn-to-turn
maintenance, and JSON storage validated on both client and api.

Folds content/npcs and content/quests under content/world/; adds
content/world/{locations,items} and content/origins. fallback/ kept outside
world/ (authored prose, not id-referenced).

Spec: docs/superpowers/specs/2026-07-09-canon-log-schema-design.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-09 12:03:37 -05:00
parent d340e06dad
commit 800811dac2
8 changed files with 351 additions and 7 deletions

View File

@@ -1,15 +1,37 @@
# /content — authored game data
Cross-cutting authored writing. Consumed by **both** sides: the client ships fallback text and quest/story data; the api reads NPC knowledge lists to build prompts. That shared ownership is why it sits at the repo root, not inside either folder.
Cross-cutting authored writing, split by role in the data model (see the canon
log spec in [`/docs`](../docs)):
```
/quests Story skeletons and quest definitions (authored, not AI-generated — §17)
/npcs Per-NPC knowledge lists — the entire content an NPC can draw on (§6)
/fallback Authored degraded-DM text for every AI surface (§13)
/world Static, ID-referenced game content. Identical every playthrough.
/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)
/origins Thin starting-state seeds. One per starting point. POC authors one.
/fallback Authored degraded-DM text for every AI surface (charter §13)
```
## 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`](../docs) (spec) —
authored via the design under [`/docs/superpowers/specs`](../docs/superpowers/specs).
## Authoring notes
- **NPC knowledge lists are the whole design** (§6). They are the only thing stopping the blacksmith from revealing the twist. Real authoring work — budget for it.
- **Fallback text is content, not error handling** (§13). Written in the DM's voice, lives beside the rest of the writing. Every AI-dependent surface needs one before it ships.
- Story skeletons are authored for now. AI-generated skeletons are v2, out of POC scope (§17).
- **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).