{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreigbdchoavrzxewwqapjci65px2itgegud6tapqihriuqp3sruhs5u",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mottm6rhfe42"
  },
  "path": "/t/the-clockwork-dark/177032#post_4",
  "publishedAt": "2026-06-22T01:33:59.000Z",
  "site": "https://discuss.huggingface.co",
  "tags": [
    "@skill"
  ],
  "textContent": "## **What’s new (v0.9)**\n\nThe world is no longer static scenery — it **reacts**.\n\n  * **The reactive world** — Doom Clock beats reshape the map: flags, discoveries, rumors, and NPC relocations fire as beats cross. The tunnels open new ground; villagers flee to the square; the notice board pins the Dark’s own bounties.\n  * **Set-pieces** — authored, world-gated challenges you descend into: the **tunnel-mouth** (a branching underground decision tree with per-node scene art) and the **warden barrow** at Hollow Hill (learn the older name — or trust the faceless Assistant, who points at the wrong star).\n  * **The convergence payoff** — the older name learned in Hollow Hill sharpens the `unmake` reckoning at the tower. The narrative spine is complete: tunnels open → descend → Hollow Hill → name the Hollow Crown → carry the older name → unmake the Dark.\n  * **NPCs move with the Dark** — Aldric, Greta, the gate — named villagers relocate as beats fire. Maris does not move.\n  * **The Forge** — Brann Holt’s smithy, station-gated recipes (warded blade, reforged relic), the mundane counterpart to Maris’s oven.\n  * **The world map** — a “known reaches” overlay: a hand-painted overview map above a list of every location, the current one lit, visited ones marked.\n  * **Cutscenes & dice faces** — tunnel entrance reveal, tunnel descent, Hollow Hill arrival, and forge cutscenes wired; the dice toast shows the exact rolled d20 face as a still.\n  * **Reactive notice board** — the board’s face changes as the Dark spreads; bounties pin themselves up as their beat-flags fire.\n  * **Frontend a11y** — Escape-to-close, focus-trap, focus-restore on all dialogs; `:focus-visible`; `prefers-reduced-motion`.\n  * **CI pipeline** — pytest, vitest+jsdom, Playwright e2e on every push.\n  * **393 backend tests, 19 vitest tests, 48 OKFS concepts.**\n\n\n\n* * *\n\n## Architecture\n\nA deterministic engine holds all mechanical truth; two autonomous LLM agents improvise on top; a governance layer reins them in; OKFS feeds them canon; media renders it.\n\n\n    flowchart TB\n        subgraph HARD[\"Hard Engine — engine/game/ (the only authority)\"]\n            STATE[\"GameState · dice · combat · crafting · travel<br/>evil_ticker · DoomClock · challenges · contracts\"]\n            SKILLS[\"@skill registry — engine/skills/<br/>roll_dice · resolve_combat · craft_item · move_to · confront_darkness\"]\n        end\n        subgraph AGENTS[\"Two Agents — engine/agents/\"]\n            DRIVER[\"Storyteller / Driver<br/>big model · drives world · Evaluator gate + retry\"]\n            ASSIST[\"Assistant<br/>small model · unreliable companion<br/>AssistantDirector: when / with-what / how-reliably\"]\n        end\n        subgraph GOV[\"Governance — engine/governance/ + engine/mcp/\"]\n            PRE[\"PRE interceptors — shape the prompt<br/>LoreInject · DoomBeat · EvilPhaseTone · StorytellerMind · AwarenessGate\"]\n            POST[\"POST audit — SceneRulesEngine R001-R005<br/>RulesGovernor records LLM overreach\"]\n        end\n        subgraph KNOW[\"OKFS Knowledge — knowledge/\"]\n            OKFS[\"one concept per .md + frontmatter + links<br/>lore · NPCs · items · arcs · runbooks · metrics<br/>content-hashed _index.json\"]\n        end\n        subgraph MEDIA[\"Media — engine/media/ (graceful degradation)\"]\n            IMG[\"ComfyUI images / cutscenes\"]\n            VOICE[\"Voxtral TTS / STT\"]\n        end\n        OBS[\"Oracle — engine/observability/ · /api/metrics\"]\n\n        SKILLS <--> STATE\n        AGENTS -- \"propose, never decide\" --> SKILLS\n        PRE --> AGENTS --> POST\n        KNOW -. \"RAG / progressive disclosure\" .-> AGENTS\n        AGENTS --> MEDIA\n        AGENTS --> OBS\n        POST --> OBS\n\n\nThe balance we chase: let the AIs run loose enough to **surprise** ; rein them with the engine + governance enough to stay **coherent and fair**.\n\n* * *\n\n## The systems\n\nSystem | What it does | Key tools\n---|---|---\n**Deterministic dice / skill engine** | All randomness is engine-rolled and reproducible. The LLM _must_ call a tool before narrating any outcome. | `roll_dice`, `resolve_skill_check`\n**Grounded combat** | Engine-authoritative d20 to-hit, damage dice, fear/exhaustion, fleeing, defending, and _sympathy_ — the “unmaking” damage that works against clockwork foes. | `resolve_combat`, `query_combat_state`\n**Crafting** | Baking, herbalism, tinkering. Engine consumes inputs, grants output; recipes gate on location & ingredients. | `craft_item`, `list_recipes`\n**The Doom Clock** | Turns evil drift into a _story_ — arcs `quiet_life → whisper → march → convergence → consumed`, once-only world-sign beats (cog-harvesters, brass scarecrow, vines, the opened tunnels, the tower), and the terminal **consumed** ending if you never push back. **Engagement** (rising when you confront the Dark) slows the tick ~40%, but decays — so you must keep pushing. | `confront_darkness`\n**The reactive world** | Doom Clock beats **reshape the map** — each fires declarative effects (flags, discoveries, rumors, NPC relocations) onto `GameState`. Crossing a beat unlocks new ground, displaces villagers, and gates notice-board postings. The world remembers. | `apply_beat_effects`\n**Set-pieces** | Authored, world-gated challenges — the **tunnel-mouth** (a branching underground descent) and the **warden barrow** (Hollow Hill — learn the older name or trust the faceless Assistant). Presented by the engine, resolved by the standard challenge system, with per-node scene art and riddles. | `start_set_piece`\n**NPC movement** | Named villagers **relocate** as the Dark spreads — Aldric abandons the forest margin, Greta leaves the shrine, the gate thins. `npcs_at` reflects it; displaced villagers are marked and wear road-worn faces. Maris does not move. | `npc_moves` effects\n**The Forge** | Brann Holt’s smithy off the square — station-gated recipes (mend a blade, forge a warded blade, reforge a relic). The mundane anchor: honest anti-Dark gear, craftable only at the anvil. | `craft_item` (station: forge)\n**The convergence** | The approach to the clockwork tower as ordered reckoning beats and the player’s **last engine-resolved choice** (`stand` / `unmake` / `walk_away`), adjudicated on d20 + engagement vs a progress-scaled DC. Learning the **older name** in Hollow Hill sharpens the `unmake` roll. | `resolve_reckoning`\n**The unreliable Assistant Director** | Each turn, from trust, your struggle, the evil phase, and how recently it last appeared, decides _whether_ the Assistant shows up, _with what_ (quip / hint / lore / warning / gift), and _how reliably_ (low trust → its advice may mislead). Help feels **earned and uncertain** , never owed. | `grant_hint`, `reveal_lore`, `change_form`, `assistant_gift`\n**Ephemeral structured challenges** _(the novel bit)_ | The Storyteller can **compose** a rule-bound encounter mid-narration — a `skill_gauntlet`, `decision_tree`, `puzzle`, or `dice_table` — by handing the engine a declarative spec validated against a fixed schema. **The AI supplies structure; the engine adjudicates the outcome.** An improvising narrator that can’t cheat its own dice. | `start_challenge`, `resolve_challenge`\n**Notice board & contracts** | Opt-in work in three tempers: `mundane` (dawn-bread, a tinker’s lost cog), `bounty` (the wandering scarecrow), and `anti_dark` (still the harvester — raises engagement). The board **reacts to the world** — postings appear as their beat-flags fire, with signpost poster art. Rewards are engine-granted on genuine completion. | `list_contracts`, `accept_contract`, `complete_contract`\n**Chance encounters** | Seeded, deterministic rolls on arrival — from the destination edge’s `danger_dc` and the evil phase. Yields `none` (calm), a harmless `discovery` (engine-granted reward), or an `ambush` naming a clockwork-tagged foe. | `query_encounter_foes`\n**The Oracle** | A slim observability backbone. Every turn — latency, eval score, governance violations, the Assistant’s intervention/gift rate, evil drift — is recorded and rolled into aggregates at `/api/metrics`, so pacing (the heart of the dread) stays visible. | `GET /api/metrics`\n**Knowledge at runtime** | Agents search the OKFS bundle and pull a single concept’s body — progressive disclosure, not 3,000 lines at once. | `query_knowledge`, `read_concept`\n\n* * *",
  "title": "The ClockWork Dark"
}