Skip to content

S3 — The two documents stop being able to disagree about the types they both describe #10

Description

@The-Running-Dev

When the game design document lists what the player tracks and the engine specification
defines the same thing, a mismatch between them is caught by a command instead of by
someone happening to read both in one sitting. Adding a field in one place and
forgetting the other is a defect this project has already shipped.

Done when

  • S3.1 03-game-design.md §3.1 carries a mirror-NeedState region around the sentence listing the needs and a mirror-AttributeState region around the sentence listing the attributes. Both are held against 04-engine-specification.md as it stands, and the run exits 0.
  • S3.2 Deleting wisdom from §3.1's attribute sentence, with 04 unchanged, produces exactly one mirror finding naming AttributeState.wisdom and exits 1; restoring it returns exit 0. The test asserts both directions.
  • S3.3 A finding's Detail names the member and both document paths and states only that they disagree; a test asserts SpecFinding declares no field able to record which side is stale.
  • S3.4 A mirror-PlayerState.skills region — an open declaration — produces a mirror finding rather than being ignored, and so does a region naming a declaration that does not exist.
  • S3.5 03 §3.5's twelve skills produce no finding of any kind.
  • S3.6 A region whose markers are unclosed, mismatched or nested yields MalformedRegion and exit 2; two regions sharing an id yield DuplicateRegionId and exit 2; a document with no regions is valid input yielding zero obligations and exit 0.
  • S3.7 A Pester test asserts no check function calls a file cmdlet, and that the check call graph is flat — no check invokes another.
  • S3.8 The report states the number of obligations checked and never says that 03-game-design.md and 04-engine-specification.md are consistent; a test asserts the wording in Write-SpecSetReport.
  • S3.9 Both markers added to 03 are HTML comments carrying nothing outside the comment delimiters, and ./docs.ps1 -BuildOnly succeeds with §3.1 still rendering as one list. This step needs Docker; if Docker cannot run, the criterion is not met and must be reported as not met rather than assumed.
  • S3.10 The design/20-contract.md scaffold block for tools/Test-SpecSet.ps1 is replaced by a pointer to that file, in the same commit.

Agent instructions

Run /slice S3.

  • Scope and criteria: design/30-slices.md § S3 @ 394505aae8cdd82a2375a4956fc7ba93090db469
  • Touches: tools/Read-SpecSet.ps1 (marked-region extraction), tools/Test-SpecSet.ps1 (Invoke-SpecSetCheck, the mirror check, Write-SpecSetReport), both test files, docs/docs/games/03-game-design.md §3.1, design/20-contract.md (the tools/Test-SpecSet.ps1 scaffold block)
  • Depends on: S1, S2
  • Out of scope here: obligating anything beyond the two sites named above. §12.1 and §13.3 cannot discharge an obligation as the contract defines one — see design/30-slices.md § Contract questions 2 — and finding more obligation sites is a reading of 03, which design/10-design.md assigns to the full-audit path, not to this machinery. Do not delete prose from 03 under Alternative 4's reduction; that is a reviewed pass with its own scope decision, not a side effect of wiring a check.

Note: this is the largest slice in the set — if it does not fit one session without compaction, that is a design/30-slices.md defect; say so rather than pressing on.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    sliceTracks a design/30-slices.md slice

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions