Skip to content

feat(prose-tests): the framework — cases, worlds, runner, skill#545

Open
leeovery wants to merge 2 commits into
design/prose-testsfrom
prose-tests/framework
Open

feat(prose-tests): the framework — cases, worlds, runner, skill#545
leeovery wants to merge 2 commits into
design/prose-testsfrom
prose-tests/framework

Conversation

@leeovery

Copy link
Copy Markdown
Owner

Summary

  • The deterministic layer of the prose-test framework (stage 2 of design/prose-tests.md): case parser + corpus validation (tests/prose/lib/cases.cjs), fixture recipes run under a frozen-clock preload with committed golden snapshots (lib/fixtures.cjs, lib/fake-clock.cjs), the world builder (lib/world.cjs — installed-layout skills, hermetic git, keyword-only knowledge store re-derived at materialise), and the runner CLI (run.cjs: list · select · world · prompt · grade · snap · verify · destroy).
  • P4 enforced structurally: walker prompts are machine-assembled by run.cjs prompt and never contain expect: claims; grade runs state assertions deterministically via the world's own engine and emits routing claims for the grader agent only.
  • Two token-free CI suites join npm test: corpus validation (parse, scoped paths, anchors, assertion grammar) and fixture golden checks (every snapshot rebuilds byte-identical from its recipe — drift lands as a reviewable snapshot diff, never silently). Plus the /prose-test dev skill (Sonnet walks, Opus confirms failures, quoted evidence required) and the base fixture with two smoke cases.

Test plan

  • npm test green (1683 tests, includes both new suites; base fixture rebuild ~2.9s).
  • Determinism proven: node tests/prose/run.cjs verify run twice, byte-identical both times.
  • Full pipe executed live: world built, engine boot run in-world (knowledge ready, zero migrations), deterministic grade passed, walker prompt verified expect-free, world destroyed.

🤖 Generated with Claude Code

leeovery and others added 2 commits July 24, 2026 16:52
Stage 2 of design/prose-tests.md. The deterministic layer in code:
case parser + corpus validation, fixture recipes under a frozen clock
with golden snapshots (rebuild-compare in npm test), the world builder
(installed-layout skills, hermetic git, keyword-only knowledge store),
and the runner whose `prompt` command is the P4 boundary — walker
prompts never carry expects. The /prose-test dev skill owns the model
layer: Sonnet walks, Opus confirms failures, quoted evidence required.
First fixture (base) proven byte-deterministic; two smoke cases
exercised the full pipe end-to-end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review finding (Lee): coordinate-phrased cases (step numbers, numbered
heading anchors) break on cosmetic renumbering — failure for the wrong
reason. Anchors become substring fragments (includes-matched, still red
token-free when the heading vanishes), the smoke cases are rewritten
purely behaviourally, and the authoring rule lands in the README.
Prose test hooks considered and parked in the design log: the walker
binds semantically, so shipped-prose plumbing isn't earning its keep —
revisit on evidence at the failure harvest.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant