process

Use when

The design is composed and twisted, and you need to declare "designed enough to build" as a set of assertions the proof playbook will run.

Refine & Handoff — The Verification Contract

What it is. The last Codex step and the seam to the proof playbook. You convert the finished design into a verification contract: the concrete assertions that must hold for the game to be what the pillars promised. The Codex generates; from here on, the game is proven, not designed.

Why it matters. A design isn’t done when it’s imagined — it’s done when it names its proofs. The contract is the bridge: FUN.md, JUICE.md, JUDGE.md, and CONVENTIONS pick it up and run it. Hand off a design with no contract and the proof playbook has nothing to gate against.

The step

Composed design → a verification contract + a clean handoff. You are not writing tests here (that’s the build). You are declaring what would have to be true — the assertions the build must satisfy — and routing each to its channel.

”Designed enough to build”

The definition of done for the Codex. All must be true:

If any box is empty, refine — don’t hand off. A gap here becomes an unverifiable mess downstream.

The verification contract

For each design claim, name the assertion and route it to a channel. Do not write the assertion’s recipe — docs/VERIFICATION.md owns that. You name what and where; it owns how.

Design claim (from…)Becomes the assertion…Channel / doc
Pillar 1’s testable clausea probe/skill-delta the clause maps toFUN.md law 2, Ch. 1a
”The intended strategy beats null play”smartScore > nullScore * KFUN.md law 2
A derived envelope (jump gap, season length, fuel budget)a stated inequality asserted vs. configFUN.md law 3, Ch. 3
Each parent genre in the blendthat genre’s FUN.md §N verify patternFUN.md Part 2 (union — all parents)
Puzzle/turn-based rulesevery level solver-provableVERIFICATION.md Ch. 1b
”Same seed → same game”golden hash + snapshot round-tripCh. 1c/1d
Every feel/juice claim (“responsive”, “impactful”)a FeedbackContract + feel gateJUICE.md, Ch. 4
Pacing (“breathers”, “peak finale”)a feel probe over the timelineCh. 3
”Reads at a glance” / the lookthe headless SVG judged on palette/legibilityJUDGE.md, Ch. 2/5

The contract is done when every pillar traces to at least one row and no parent genre’s verify pattern is missing.

How to run it

  1. Walk the pillars. For each of the three, write the one assertion that proves its testable clause. A pillar with no proof is a pillar you can’t keep.
  2. Union the verify patterns. From process-composition, list each parent genre and copy in its FUN.md §N verify line. All of them (the blend law).
  3. Extract the inequalities. Every derived number (envelope, calendar, fuel, coverage, payback) is a law-3 inequality — state it as a comment-shaped claim.
  4. Declare the feedback contract. Every feel adjective from the brief becomes a FeedbackContract entry + a Channel 4 gate. Design the event; JUICE proves it.
  5. Name the null strategy. The do-nothing/never-draft/undefended run that must lose — the cheapest and most important scenario (FUN.md law 4).
  6. Route the look. State what the headless screenshot must show (bright avatar, palette, legible layout) for JUDGE to pass.
  7. Hand off. The contract is the spec. Per FUN.md law 1, the verify suite is the design doc — you’ve now written its assertions, first.

The explicit handoff

Where each concern goes, and the doc that owns it from here:

ConcernHanded toOwns
Mechanical truth, skill-delta, inequalities, solver, determinismFUN.md + VERIFICATION.md Ch. 1/3Is it correct and beatable?
Feel, feedback contract, shake/hit-stop envelopesJUICE.md + Ch. 4Does it feel professional?
Looks — palette, layout, legibilityJUDGE.md + Ch. 2/5Does it look shipped, not debug?
State/view split, @hayao imports, cosmetic rule, determinism hygieneCONVENTIONS.mdIs it built the Hayao way?

After handoff, the build runs npm run check, npm test, npm run verify, and npm run judge — and the design stands or falls on the contract you wrote. Workshop (Hayao Workshop; runWorkshop) then closes the human-feel loop.

Worked example

Design: the drafted-tower-defense from process-composition. Pillars: (1) build decisions matter, (2) drafts with teeth, (3) the range ring is UI.

Contract:

Every pillar has a row; both parents’ patterns are present; the seam (drafted tower × coverage) has its own proof. Designed enough to build.

Traps

Composes with

See also

This module rendersthe repo's markdowndirectly — edit it there, it changes here.