Skip to content

W86 — The Story-Graph Kind Says Why #357

Description

@The-Running-Dev

A campaign author can find out why a choice was refused or greyed out, and a developer can find out why a replay diverged, without adding logging to the engine by hand. Today the kind reports that a requirement was unmet and stops there, which is correct for the player and useless for the person who wrote the requirement.

03 §8.4 fixes ten event names and the shipped kind declares four. Its own prose singles out two of the missing six as carrying most of the value, for the two audiences the channel exists to serve.

Done when

  • W86.1 All six remaining rows are emitted at the step the table names, with exactly the data fields it lists and no others, and all ten are declared in Kind.eventNames. A test enumerates the declared names against the emitted ones so a future row cannot be declared without an emit site or emitted without being declared.
  • W86.2 requirement.evaluated fires once per requirement rather than once per choice, asserted on a choice carrying more than one requirement with the exact event count stated. The row's stated purpose does not survive its own data column, and that discrepancy (03 §8.4 says a compound condition "reports which clause failed", but the row declares choiceId and satisfied only) is stated in the pull request rather than resolved by widening the column.
  • W86.3 Playing the committed Bureaucracy arc to its ending with a recording sink produces the full expected sequence, asserted as an ordered list of names rather than a set.
  • W86.4 Dropping every event changes nothing: the same arc replayed with a null sink and with a recording sink produces byte-identical serialize() output and identical StateChange arrays.
  • W86.5 Every committed story-graph replay outcome is unchanged byte-for-byte.
  • W86.6 The status column in 03 §8.4 has no remaining specified, not yet delivered row, and the paragraph explaining what that status means is rewritten rather than left describing a state that no longer exists.
  • W86.7 npm run typecheck, npm run lint and npm test pass from src/engine/.

Agent instructions

Run /slice W86.

  • Scope and criteria: design/30-slices.md § W86 @ 6fd30e04106b4db4db7614faa0e474ff1b160405
  • Signatures: design/03-story-graph-kind.md §8.2, §8.4; design/05-observability.md §2, §9; design/04-core.md §3
  • Out of scope here: an author-facing presentation of these events (routes to content tooling, 05 §13); new event names; changing any severity the table fixes; the sink implementations, which already ship

Stop conditions and procedure: .claude/commands/slice.md. Not restated here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    sliceA W-numbered vertical delivery slice from design/30-slices.md

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions