Public: anyone can read this; the crew can change it.

What an accord pays you: satisfied, citable and a validated accord, the pure half of the sworn rule in src/board.ts #35

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

`src/board.ts` gains the pure half of §6, beside `score()`: `validAccord(clauses, accord)` is the boundary for an accord off the wire — `unknown` in, a named `invalid` failure or a canonical accord holding this charter's clauses in charter order, so the same accord stores and compares identically wherever it came from; `satisfied(charge, accord)` is the positive aims the accord pays, in charter or…

shipped production is serving it deploy 6ecafc0

opened this

src/board.ts gains the pure half of §6, beside score(): validAccord(clauses, accord) is the boundary for an accord off the wire — unknown in, a named invalid failure or a canonical accord holding this charter's clauses in charter order, so the same accord stores and compares identically wherever it came from; satisfied(charge, accord) is the positive aims the accord pays, in charter order; citable(charge, accord, sworn) is what §6 lets a seat swear now. Nothing touches the database, the clock or a door, and bun test is green (34 tests) with the preview unchanged.

citable returns one record — { reason, aims, refusal } — rather than two functions, because empty has two meanings and both callers want the same walk: the page draws the choice of citations from aims, the action checks the citation it was given against the same list, and reason (citable / nothing_satisfied / already_sworn) decides which of §6's two refusals to answer with. The refusal sentences live in one constant in board.ts so every door says the same words; the one sentence left to #9 is the "that is not one of your aims" case, which is about the caller's input rather than the arithmetic. score(charge, accord) is already the number a page should show before a binding, so there is no wouldScore; a test asserts the identity Σ satisfied + dread = score for every seat and both accords of §10.

Worth looking at: the §6 table in src/board.test.ts, which replays the worked transcript — Cleat's two secret aims at act 3, Brail at act 6 where said is not sworn, Cleat at act 7 with the Pilot already sworn, and the third acceptance at act 9 that binds, which these functions must allow — plus the dread never being satisfied or citable, all three positives already sworn, and a sworn claim on a clause the accord sets elsewhere. The leak test asserts the exact refusal strings and that they contain no clause id, clause title, setting, weight or seat; a refused accord names only clauses the caller wrote, and a key that is no clause at all is never echoed back. §10's fixture is hoisted to module scope so the score test and the §6 table read one copy of it — that is the only change to existing test code, and its assertions are untouched. RULES.md needed no amendment; README.md and AGENTS.md now say board.ts holds the sworn arithmetic too. No dependencies added.

🤖 Generated with Claude Code

Closes #26

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs