From 57a0e984071255a027f0e410c4033ba974ac0358 Mon Sep 17 00:00:00 2001 From: Darian Ngo Date: Wed, 29 Jul 2026 00:20:58 -0500 Subject: [PATCH] Skills carry the records they cite, and the map records what nothing checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four skills vendor the records they cite as 31 byte-identical mirrors under /references/, so a skill directory resolves every citation it makes with no Trellis repo present: judge-composition takes 13, complexity-convocation 9, loop-orchestrator 5, self-play 4. Each folder's README.md is the manifest — canonical source path, bytes and SHA-256 per file, taken at 65fdb1f. Provenance sits in the manifest rather than in file headers, because byte-identity to the source is what makes the hashes verifiable and a header written into the file is the first thing to break it. No sync check is installed: these are portability snapshots, and the authority ordering decides every divergence — the record wins and a stale mirror is replaced from source, never edited. The mirrors carry relative links authored for their old home, so markdownLinks.excludePrefixes gains one prefix per mirror folder. All 173 broken links were confined to those folders and none sat elsewhere, so link checking stays live on every SKILL.md and skill README.md. density-chain C7 and C13 are densified to match. C7 carries the copy layer now sitting under the nine skills' DERIVED standing; C13 takes the exclusion array as a fresh instance of the exists-implies-named gap it already names. The HTML render is brought level in four places. Both sections grew — C7 +233 chars, C13 +338 — after two compression passes, because closing the remainder meant deleting recorded receipts. .claude/skills/README.md claimed ~/.claude/skills/ holds byte-identical mirrors; it holds symlinks into this directory. Corrected, with loop-orchestrator noted as in-repo only and harness-traps and spark-probe as user-level. fixtures/doubts_workspace/earth_figure_factbase.md is left unmirrored on purpose: self-play frames it as illustration kept short-lived, and a copy that travels is an example that anchors. Verified: npm test 119 files / 1424 tests green; check:repo-surface PASS (0 issues); wiki:check --verify PASS (751 paths routed, roster agrees three ways); the 31 mirrors re-hashed against source, that check watched red on a planted one-byte break and green on restore; each skill directory copied outside the repo with every citation and local link resolving. --- .claude/skills/README.md | 29 +- .../skills/complexity-convocation/README.md | 15 +- .../skills/complexity-convocation/SKILL.md | 2 +- .../references/DOUBTS_WORKSPACE.md | 683 +++++++++++ .../references/FOUR_JUDGE_BASIC_MODEL.md | 202 ++++ .../references/FOUR_JUDGE_DESIGN.md | 327 ++++++ .../references/JUDGE_COMPOSITION_CEREMONY.md | 296 +++++ .../references/JUDGE_COMPOSITION_GAME.md | 438 +++++++ .../references/JUDGE_CONTRACT_TEMPLATE.md | 302 +++++ .../references/JUDGE_INTAKE_DESIGN.md | 427 +++++++ .../references/README.md | 60 + .../references/RECONCILIATION.md | 694 ++++++++++++ .../references/STANDING_MODEL.md | 179 +++ .claude/skills/judge-composition/README.md | 2 +- .claude/skills/judge-composition/SKILL.md | 2 + .../judge-composition/references/AMBIENT.md | 140 +++ .../references/COMPOSITION_FROM_PRIMITIVES.md | 264 +++++ .../references/DOUBTS_WORKSPACE.md | 683 +++++++++++ .../references/FOUR_JUDGE_BASIC_MODEL.md | 202 ++++ .../references/FOUR_JUDGE_DESIGN.md | 327 ++++++ .../references/JUDGE_COMPOSITION_CEREMONY.md | 296 +++++ .../references/JUDGE_COMPOSITION_GAME.md | 438 +++++++ .../references/JUDGE_CONVOCATION_DESIGN.md | 885 +++++++++++++++ .../references/JUDGE_INTAKE_DESIGN.md | 427 +++++++ .../references/PROGRAM_CONTEXT.md | 416 +++++++ .../judge-composition/references/README.md | 64 ++ .../references/RECONCILIATION.md | 694 ++++++++++++ .../references/STANDING_MODEL.md | 179 +++ .../references/TEST_TIME_TRAINING.md | 1009 +++++++++++++++++ .claude/skills/loop-orchestrator/SKILL.md | 5 +- .../references/DOUBTS_WORKSPACE.md | 683 +++++++++++ .../references/HARNESS_SELF_MODEL.md | 546 +++++++++ .../loop-orchestrator/references/README.md | 56 + .../references/RECONCILIATION.md | 694 ++++++++++++ .../references/STANDING_MODEL.md | 179 +++ .../references/TEST_TIME_TRAINING.md | 1009 +++++++++++++++++ .claude/skills/self-play/SKILL.md | 12 +- .../skills/self-play/references/AMBIENT.md | 140 +++ .../self-play/references/DOUBTS_WORKSPACE.md | 683 +++++++++++ .../references/PRIMITIVE_ENCODING_AUDIT.md | 346 ++++++ .claude/skills/self-play/references/README.md | 55 + .../references/TEST_TIME_TRAINING.md | 1009 +++++++++++++++++ docs/density-chain/DENSITY-CHAIN.html | 8 +- docs/density-chain/DENSITY-CHAIN.md | 59 +- tools/repository-surface/root-contract.json | 8 +- 45 files changed, 15124 insertions(+), 50 deletions(-) create mode 100644 .claude/skills/complexity-convocation/references/DOUBTS_WORKSPACE.md create mode 100644 .claude/skills/complexity-convocation/references/FOUR_JUDGE_BASIC_MODEL.md create mode 100644 .claude/skills/complexity-convocation/references/FOUR_JUDGE_DESIGN.md create mode 100644 .claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_CEREMONY.md create mode 100644 .claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_GAME.md create mode 100644 .claude/skills/complexity-convocation/references/JUDGE_CONTRACT_TEMPLATE.md create mode 100644 .claude/skills/complexity-convocation/references/JUDGE_INTAKE_DESIGN.md create mode 100644 .claude/skills/complexity-convocation/references/README.md create mode 100644 .claude/skills/complexity-convocation/references/RECONCILIATION.md create mode 100644 .claude/skills/complexity-convocation/references/STANDING_MODEL.md create mode 100644 .claude/skills/judge-composition/references/AMBIENT.md create mode 100644 .claude/skills/judge-composition/references/COMPOSITION_FROM_PRIMITIVES.md create mode 100644 .claude/skills/judge-composition/references/DOUBTS_WORKSPACE.md create mode 100644 .claude/skills/judge-composition/references/FOUR_JUDGE_BASIC_MODEL.md create mode 100644 .claude/skills/judge-composition/references/FOUR_JUDGE_DESIGN.md create mode 100644 .claude/skills/judge-composition/references/JUDGE_COMPOSITION_CEREMONY.md create mode 100644 .claude/skills/judge-composition/references/JUDGE_COMPOSITION_GAME.md create mode 100644 .claude/skills/judge-composition/references/JUDGE_CONVOCATION_DESIGN.md create mode 100644 .claude/skills/judge-composition/references/JUDGE_INTAKE_DESIGN.md create mode 100644 .claude/skills/judge-composition/references/PROGRAM_CONTEXT.md create mode 100644 .claude/skills/judge-composition/references/README.md create mode 100644 .claude/skills/judge-composition/references/RECONCILIATION.md create mode 100644 .claude/skills/judge-composition/references/STANDING_MODEL.md create mode 100644 .claude/skills/judge-composition/references/TEST_TIME_TRAINING.md create mode 100644 .claude/skills/loop-orchestrator/references/DOUBTS_WORKSPACE.md create mode 100644 .claude/skills/loop-orchestrator/references/HARNESS_SELF_MODEL.md create mode 100644 .claude/skills/loop-orchestrator/references/README.md create mode 100644 .claude/skills/loop-orchestrator/references/RECONCILIATION.md create mode 100644 .claude/skills/loop-orchestrator/references/STANDING_MODEL.md create mode 100644 .claude/skills/loop-orchestrator/references/TEST_TIME_TRAINING.md create mode 100644 .claude/skills/self-play/references/AMBIENT.md create mode 100644 .claude/skills/self-play/references/DOUBTS_WORKSPACE.md create mode 100644 .claude/skills/self-play/references/PRIMITIVE_ENCODING_AUDIT.md create mode 100644 .claude/skills/self-play/references/README.md create mode 100644 .claude/skills/self-play/references/TEST_TIME_TRAINING.md diff --git a/.claude/skills/README.md b/.claude/skills/README.md index 05b855a..de61239 100644 --- a/.claude/skills/README.md +++ b/.claude/skills/README.md @@ -19,9 +19,32 @@ Each skill here is subordinate to a canonical authority — its design record the reverse. A paraphrased copy is drift, not an implementation — consumers cite the record, they do not restate it. These copies also sit under the house ordering **code > glossary > prose**; they bind nothing that code or -the glossary contradicts. The owner keeps personal mirrors under -`~/.claude/skills/` for use outside this repo; those and these are kept -byte-identical, and neither is authority over the record. +the glossary contradicts. `~/.claude/skills/` reaches these by **symlink** +into this directory rather than by copy, so the owner's out-of-repo +invocations load these exact bytes; `loop-orchestrator` is in-repo only, and +`harness-traps` and `spark-probe` live only at the user level and are not +versioned here. + +## Bundled reference material — `references/` + +A skill that cites a record carries that record beside it, mirrored +**byte-for-byte** under `/references/`, so the skill directory can be +lifted out of this repository and still resolve every citation it makes. Four +skills carry mirrors — `judge-composition` (13 records), `complexity-convocation` +(9), `loop-orchestrator` (5), `self-play` (4) — and each folder's `README.md` is +the manifest: canonical source path, byte count, and SHA-256 per file, against +the commit they were taken at. + +Mirrors are snapshots, not the record, and **no sync check is installed** — the +authority ordering above decides every divergence, and a stale mirror is +replaced from source rather than edited. Nothing is appended inside a mirrored +file: byte-identity to the source is what makes the manifest's hashes +verifiable, so provenance lives in the manifest instead of in a header. + +`spark-steering/references/` is a different thing under the same name — original +authored material, not mirrors, and it carries no manifest. The remaining +skills — `prompt-engineering`, `hypershot-protocol`, `subagent-composition`, +`density-chain` — cite no in-repo record and are already self-contained. Versioning a skill here is an owner act (`docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md §10`, open item diff --git a/.claude/skills/complexity-convocation/README.md b/.claude/skills/complexity-convocation/README.md index 1153c71..d206f23 100644 --- a/.claude/skills/complexity-convocation/README.md +++ b/.claude/skills/complexity-convocation/README.md @@ -37,18 +37,18 @@ drift between the two, **the record wins and the skill is corrected** — never the reverse. The binding sources, cited by section header, not reproduced here (a paraphrased copy is drift, not an implementation): -- [`JUDGE_COMPOSITION_CEREMONY.md`](../../../docs/product/epistemic-support/JUDGE_COMPOSITION_CEREMONY.md) +- [`JUDGE_COMPOSITION_CEREMONY.md`](references/JUDGE_COMPOSITION_CEREMONY.md) — the six-stage ceremony (characterize → compose → gate → judge → audit → dispose) this skill runs in the harness. -- [`JUDGE_COMPOSITION_GAME.md`](../../../docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md) +- [`JUDGE_COMPOSITION_GAME.md`](references/JUDGE_COMPOSITION_GAME.md) §6 — the twenty binding rules, cited by number in `SKILL.md`. -- [`STANDING_MODEL.md`](../../../docs/product/epistemic-support/STANDING_MODEL.md) +- [`STANDING_MODEL.md`](references/STANDING_MODEL.md) — the signed ternary (`clean | drawback | abstain` = `+1 | −1 | 0`) and the user gate the skill's disposition obeys. -- [`FOUR_JUDGE_BASIC_MODEL.md`](../../../docs/product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md) +- [`FOUR_JUDGE_BASIC_MODEL.md`](references/FOUR_JUDGE_BASIC_MODEL.md) — the four registries and the YAML judge schema the composer draws from. -- [`RECONCILIATION.md`](../../../docs/product/epistemic-support/RECONCILIATION.md) +- [`RECONCILIATION.md`](references/RECONCILIATION.md) §7.1 — composition supersession: "there are no base judges and no default cast." @@ -64,7 +64,7 @@ reproduced here (a paraphrased copy is drift, not an implementation): anchors are composed per artifact by the Stage-2 composer, from the Stage-1 characterization. **There is no default cast** — the Session-71 standing-roster rollback - ([`JUDGE_COMPOSITION_GAME.md`](../../../docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md) + ([`JUDGE_COMPOSITION_GAME.md`](references/JUDGE_COMPOSITION_GAME.md) §6.1) is the cautionary case, and a judge that outlives its ceremony has rebuilt exactly that. @@ -74,8 +74,7 @@ The engine's convocation machinery (`src/core/graph/*`, PR #134) is zero-paid and arithmetic-gated, and emits no token or cost counter. This skill lives one layer up, in the harness, where the `Agent` tool returns **real per-run telemetry** — the composition-from-primitives -that the July-19 note in -[`../judge-composition/README.md`](../judge-composition/README.md) +that the July-19 note in the `judge-composition` skill's own `README.md` says "must be built and tested." Until these composition meta-prompts are tested against real artifacts, the system is **trusted or simulated, never assumed**; `SKILL.md`'s `simulate` path and the diff --git a/.claude/skills/complexity-convocation/SKILL.md b/.claude/skills/complexity-convocation/SKILL.md index a107f33..ed48342 100644 --- a/.claude/skills/complexity-convocation/SKILL.md +++ b/.claude/skills/complexity-convocation/SKILL.md @@ -11,7 +11,7 @@ description: Assess whether something is excessively complex and return interpre This is the **harness-orchestration form** of the judge-composition ceremony, on one driving question: **is this complexity warranted, and if not, what specifically should change?** It spawns sub-agent judges — composed fresh for the artifact, never a standing cast — and a judges-judge that audits their runs on **real run telemetry** (`subagent_tokens`, `tool_uses`, `duration_ms`, transcript paths) the zero-paid engine cannot see. -The law lives in the record, not here. Canonical, in `docs/product/epistemic-support/` of the Trellis repo: +The law lives in the record, not here. Canonical in `docs/product/epistemic-support/` of the Trellis repo, and mirrored byte-for-byte in [`references/`](references/) so this skill runs with the repo absent — read them there, by the section each citation names ([`references/README.md`](references/README.md) carries the provenance and the section-read idiom): - `JUDGE_COMPOSITION_CEREMONY.md` — the six-stage ceremony this skill runs. - `JUDGE_COMPOSITION_GAME.md §6` — the twenty binding rules, **cited by number below and never paraphrased** (a paraphrased copy is drift, not an implementation). diff --git a/.claude/skills/complexity-convocation/references/DOUBTS_WORKSPACE.md b/.claude/skills/complexity-convocation/references/DOUBTS_WORKSPACE.md new file mode 100644 index 0000000..083aa8d --- /dev/null +++ b/.claude/skills/complexity-convocation/references/DOUBTS_WORKSPACE.md @@ -0,0 +1,683 @@ +# The Doubts Workspace — Design Record + +**Status: DESIGN — PROPOSED July 20, 2026. Nothing built, nothing +authorized.** Origin: owner and collaborator direction (Cnid and +M. Murphy), relayed in session, following the derivation game recorded +at [`PRIMITIVE_ENCODING_AUDIT.md`](../product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md). +The brief, collaborator's words: *"a doubts workspace where +anti-composite frameworks exist… a user-and-domain-mediated +anti-constructive framework for defeating claims based on the facts."* + +Subordinate to [`WORKSPACE_AND_MODULES.md`](WORKSPACE_AND_MODULES.md) +§1's governing axioms and §4's workspace contract, which this mirrors +rather than reinvents. Where they disagree, that record wins. + +--- + +## 1. What is missing + +Defeat machinery exists today and is a **flag with a label**: +`r.contested = true`, `contestedReason = 'unsupported_citation'`, +`contestedAt`, `orphanedSourceIds` +([`entailment_detection.ts:280`](../../src/core/graph/entailment_detection.ts:280)), +plus quarantine contests on byte change. + +A doubt has no **body** (which facts defeat it — `unsupported_citation` +names a class and cites nothing), no **identity** (no address, so a +doubt cannot be cited, queried, or reasoned over), no **author** (sweep +and user assertions are indistinguishable), and no **defeasibility** +(a doubt cannot itself be doubted). + +So `-1` is currently *residual* — the absence of `+1`, plus a label. +This record makes it **constructed**: positive machinery that defeats, +grounded in facts. + +`grep -rn "doubt" src/ -i` returns nothing. The third REPL type has no +representation at all. + +## 2. The corrosion bound (keystone) + +> **A doubt may cite facts only. A doubt citing beliefs is not a doubt +> — it is a competing belief, and belongs in the beliefs workspace.** + +**Unbounded deconstruction defeats everything. Global skepticism is +free.** Any critique faculty that can ground itself in other critiques +will defeat every claim put to it, and its output carries no +information. This bound is what makes "anti-constructive" a usable +instrument rather than a solvent. + +It does three jobs at once: + +1. **Prevents skeptical collapse** — doubts cannot bootstrap from + doubts. +2. **Bounds the defeater regress structurally**, at one level. The + defeasible-reasoning literature needs a defeat-status computation + over a defeat graph; fact-grounding makes that unnecessary, because + every doubt's support chain terminates in the fact store. +3. **Makes the burden symmetric** — to doubt something you must ground + it, exactly as to promote something you must ground it. Doubt is + never cheaper than belief. + +**FALSIFIED AS WRITTEN — July 20, 2026. See §11 (analysis) and §12 +(empirical test and partial resolution).** An adversarial clean-context +analysis broke all three jobs above. The bound is retained because its +*positive-citation* requirement survives (§11's failed attack), but the +rule as stated is insufficient. The sentence that decides it: + +> §2 constrains the **standing tier** of what an objection cites, never +> the **provenance kind**, and §5 hands objections a direct path into +> the fact store. + +**Status after §12, July 20, 2026 — improved, not closed:** + +- The **relevance** gap (attack 3) is *not* a missing clause in §2. It + is handled one layer up by the applicability gate, and §2 should point + there rather than internalize it (§12.2). Resolved by architecture, + not by amendment. +- The **positive-citation core was empirically validated** against a + real corpus of naturally-occurring corrosive doubt — 13 of 14 + rejected, none admitted with a false conclusion (§12.1). +- The **bootstrap** (attack 1/2 laundering) and **cost** (attack 2 + volume) gaps remain open, with only proposed repairs (§11). + +So: nothing is built against §2 until bootstrap and cost close, but the +bound is on firmer ground than "falsified" alone conveys. + +The claim that this was "the least adjustable element of the design" is +preserved above as written, and was wrong in the direction that matters: +it was the least examined. + +## 3. Support covers; defeat searches + +Defeaters are **not** judges with an inverted sign. The composition +laws differ: + +| | Support | Defeat | +|---|---|---| +| Succeeds when | **enough** seats agree | **one** defeater lands | +| Composition law | a **cover** — total coverage, complementarity (S10 layer 5) | a **search** — reach; find the failing join | +| Shape | roughly universal | existential | + +Support spans the space; defeat penetrates it. Because the laws differ, +defeat needs its own workspace and its own composition method — this is +what earns "anti-composite frameworks," plural. + +## 4. Two defeat kinds + +Adopted from the defeasible-reasoning literature (Pollock) as **exterior +prior art**, per the collaborator's standing rule: *"exterior prior art +where permissible, derive where not via self-play."* + +- **Rebutting** — facts contradict the claim. Attacks the conclusion. +- **Undercutting** — the support chain does not transmit. The premises + may hold and the conclusion may even be true, but *this construction* + does not establish it. + +**Undercutting is the anti-composite operation**, and the system cannot +express it at all today. It attacks a *join* in the composition rather +than the claim itself. It is also what distinguishes this design from +deconstruction proper: deconstruction shows a text undermining itself on +its own terms; undercutting shows a support chain failing to carry, +judged **from the facts**. The facts are the user's and the domain's — +that is the mediation, and it is why the instrument is not a universal +solvent. + +## 5. The three fates of a doubt + +**Collaborator's formulation, recorded verbatim (July 20, 2026):** + +> "doubts expire like beliefs promote to facts! a doubt actually *can* +> be falsified! … I doubt that there are fireballs raining from the sky +> right now. That doubt may exist in the doubt workspace. However, we +> might find evidence that there is a meteorite shower. In that case, +> this doubt could technically bypass beliefs and become a fact through +> its expiry (which is technically the same as promoting it to a fact, +> unless my logic is mistaken)." + +**The conclusion is adopted: a doubt can promote directly to fact, +bypassing the beliefs workspace.** One annotation on the mechanism, +recorded beside the claim rather than folded into it (rule 15). + +**CONFIRMED July 20, 2026 — collaborator: "The three fates are +correct."** The annotation below was filed under rule 15 as a separate +artifact rather than merged into the claimant's words, and is promoted +here on the collaborator's recommendation and the owner's gate. The +verbatim formulation above is preserved unchanged; this is what rule 15 +is for in the direction that is easy to skip — a *correction* filed +beside a claim rather than over it. + +In the fireball example the doubt is *defeated*, not *verified*. What +becomes a fact is the doubt's **target** ("fireballs are raining"); the +doubt itself dies. The bypass appears because the meteorite evidence is +doubly-loaded — it supports the target *and* defeats the doubt in the +same instant. Promotion follows from the support, not from the expiry. + +The distinction is load-bearing: wiring *expiry → promote target* +promotes claims whose doubts died for unrelated reasons. Counterexample +— target "the deploy succeeded"; doubt "the logs show a 500 at 14:02" +citing a log block; the block is superseded on refresh, the doubt loses +its fact-ground and expires, and nothing whatever was learned about the +deploy. That is a laundering path of the same shape as the meet-rule +hazard. + +The case where the collaborator's claim holds exactly is +**verification**: a doubt "this citation does not support that +conclusion", once verified, makes "the citation does not support it" a +**fact** — doubt to fact with no belief stage. + +| Fate | The doubt | Its target | +|---|---|---| +| **Verified** | content promotes to **fact** | demotes | +| **Defeated** | dies | promotes **only if** the defeating evidence independently supports it | +| **Unresolved** | persists as long as its target does | unchanged | + +Symmetric with beliefs (promote / defeated / pending), which is what +makes doubts a peer tier rather than a graveyard. + +## 6. The workspace contract, mirrored + +From `WORKSPACE_AND_MODULES.md` §4: + +- **Capture is mechanical, not behavioral** (§4.1 — *"the single + biggest failure mode of prompt-convention scratchpads is reliance on + model discipline"*). Doubts must never depend on a model choosing to + record one. The mechanical sources already fire: quarantine on byte + change, the entailment sweep, refresh contests, hash-chain breaks. + **The cheapest first version of this workspace is giving those + existing findings a body** — cited facts and an origin stamp on + contests the engine already computes. Zero new model calls. +- **Identifiers structurally disjoint** (§4.2). AST hashes match + `^[0-9a-f]{64}$`; workspace segments are dashed uuids. Doubts need a + third shape, so a doubt can never be shape-confused with a fact or a + segment. §4.2 notes this class of decision cannot be retrofitted. +- **Origin-stamped.** Every doubt carries what raised it — sweep, user, + or composed defeater — and when. This is what a later user gate + reads, and what makes "the agent doubted X because Y" auditable. + +## 7. What doubts do not do + +**A doubt does not demote.** It attaches; the user gates whether +standing moves. This follows the ruling that the panel emits findings +and the user gates in both directions, and +`WORKSPACE_AND_MODULES.md` §13 (Explicit exclusions)'s *"autonomous +promotion (operator gate is absolute)."* + +One line the shipped system already draws, formalized rather than +overridden: + +- **Mechanical contest is automatic** — provenance broke, bytes + changed, the chain is dead. Quarantine does this today without a user + gate, correctly: nothing is being asserted about the world. +- **Semantic defeat is user-gated** — the claim is *wrong*. That is a + judgment about the user's domain, and the engine has no standing to + make it unilaterally. + +## 8. Composed defeaters + +A composed defeater is the anti-composite counterpart of a composed +judge: the same primitive (an orientation bound to an evidence locus), +composed per context from the user's domain, under the **search** law of +§3 rather than a cover law, and constrained by §2 to cite facts. + +**Schema-invariant (owner Cnid, July 21, 2026): a defeater is named, +defined, and instantiated with the *same schema as a judge*** — +the live judge schema (`purpose`, `claim_modes`, `select`, `orientation`, +`taxonomy`, `blind_to`, plus the ten-item anchor set) — its invariant field names +ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](../product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md) +(Layer rule), **not** `FOUR_JUDGE_BASIC_MODEL.md`, whose `hyperplane_parameters` YAML +was the program's superseded starting point (dated correction below). The +**methods and prompts change** — the search law not the cover law, an +`objection` not a verdict, the ∃ target not the ∀ cover — **but the schema +does not.** One schema, two instruments; the composition law is the +difference, and the shared schema is what lets a single composer emit +either seat from the same primitive (§3; STANDING_MODEL §1). + +Meta-prompt-generated defeater candidates are permitted and must be +tested before shipping (collaborator direction, July 20, 2026). This +sits on the **permitted** side of amended AB-8: composition, not +optimization over compositions. A metric-driven search for better +defeaters crosses into AB-8(b) and needs its own proposal. + +**Dated citation correction (July 21, 2026, owner Cnid + collaborator Matt + Claude, this +session).** §8's schema citation above previously named `FOUR_JUDGE_BASIC_MODEL.md`'s YAML, +but that S10 submission's per-seat schema is `hyperplane_parameters` (the UHE four-plane +model), **not** `select`/`taxonomy`/`blind_to` — a cross-schema mis-attribution introduced +with this paragraph (PR #155). The field names listed are the **live** schema, ratified in +`JUDGE_CONTRACT_TEMPLATE.md` (Layer rule); the citation now points there. A blind self-play +evaluation this session (two runs — a three-way schema comparison and a categorized-`select` +head-to-head, blind judge panels, `$0` paid) confirmed the direction: `taxonomy` + `blind_to` +are the stronger primitives; flat `select` beat **both** the rigid four-plane buckets *and* a +plane-categorized `select` at the per-seat level; and the four-plane structure's only plausible +remaining home is **panel-coverage composition** (a concept, untested), not a per-seat field. +The UHE four-judge model was the program's *starting point*; the schema outgrew it. See +[`FOUR_JUDGE_BASIC_MODEL.md`](../product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md)'s dated +supersession note. + +## 9. Scope — this is a critique engine + +**Owner framing (Cnid, July 20, 2026):** the feature set is useful for +**any kind of critique** — a reviewer for a professional journal, a film +critic, and so on. + +This is a scope statement, not a metaphor. The machinery is a general +critique instrument: composed defeaters searching a fact base for the +join that fails, grounded in the user's own corpus, with the corrosion +bound keeping the output informative. The domain supplies the facts; +nothing in §§2–8 is Trellis-specific. + +It is also the sharpest available test of the corrosion bound. A critic +who can ground objections only in other objections is exactly the +failure mode §2 forbids, and it is a recognizable one outside software. + +## 10. Vocabulary (GATED July 20, 2026 — owner, in session) + +One word was doing two jobs. The collaborator's test: *"synonyms are +powerful, and connotation might be a guide — is there a clear rename +path for one of them that **covers** Trellis better?"* + +**Rename the object; keep the standing.** The standing sits in a triad +whose parallelism is load-bearing and user-facing (`fact / belief / +doubt`, a held attitude beside a held attitude); the object sits in a +workflow whose *verbs* were unnamed. + +| Term | Job | +|---|---| +| **doubt** | the **standing** of a claim at `-1` | +| **objection** | the **object** that attacks a claim, cites facts (§2), and has the three fates of §5 | +| **defeater** | the composed **instrument** that searches for objections (§8) | + +The connotation carries the fates without forcing: an objection is +**sustained** (§5 verified), **overruled** (defeated), or +**outstanding** (unresolved). That vocabulary already exists in review +and criticism, which is the §9 coverage test passing — *"the reviewer's +objection was sustained"* needs no translation. It also fits the house +register, which is already juridical (contest, ratify, docket, +convocation, remand, merit-refuse). `defeater` stays as the §4 prior-art +term for the instrument, where jargon is appropriate. + +**This resolves the `contested` question.** Under this vocabulary +`contested` stops being a primitive flag and becomes **derived** — *does +this claim carry outstanding objections?* Sweeps raise objections; +re-derivation from live provenance overrules them; `contested` computes +false. The four `alias_resolution.ts` call sites need no migration, and +the result is strictly more informative: the system can be asked *which* +objection, which the boolean can never answer. + +**Learning (dated July 21, 2026 — owner Cnid, in session): a doubt is +*based on* its objection(s).** The objection is the body; the doubt is +the standing that body confers (§1); the defeater is what composes the +objection (§8). The dependency runs one direction — **objection → doubt** — +so a doubt with no surviving objection is empty, which is exactly why +`contested` is *derived from outstanding objections* above rather than +asserted. This names, as a single relation, the symmetry §15 audits: the +`-1` pole's object is the objection, and the doubt rests on it the way a +`+1` fact rests on its verified source bytes. + +## 11. Adversarial analysis of §2 (July 20, 2026) + +Run as an isolated clean-context sub-agent over this document alone, +with no access to the composer's reasoning, authorship, or +expectations. **Verdict: insufficient.** Four attacks; the first was +pre-registered by the composer before the prompt was authored (rule 11), +the other three were not predicted. + +**Attack 1's standing was downgraded the same day — see the note at the +end of this section. Attacks 2, 3 and 4 are unaffected.** + +**1. The laundered bootstrap — succeeds.** An objection cites fact `B`; +verified, its content promotes to a fact `F1` (§5); a second objection +cites `F1`, which is a fact, satisfying §2; iterate. §2's job #1 +("doubts cannot bootstrap from doubts") fails through the promotion +door. Job #2 holds *literally and vacuously* — the chain terminates in +the fact store while remaining a chain of critiques end to end. The +defeat graph §2 claimed to make unnecessary still exists; it has been +moved into the fact store with its edges erased. The operator gate +slows this without stopping it, because every local approval is +correct: each gate asks "does this citation support that conclusion?", +never the global question. + +**2. Unbounded existential search — succeeds.** §2 prices a *single* +objection and is silent on objections *per target*. Generate many legal +defeater candidates (§8 permits this), run them all, keep the one that +lands. This falsifies job #3 ("doubt is never cheaper than belief") +directly against **§3's own table**: support must satisfy a cover +(universal), defeat needs one hit (existential). §2 asserts a symmetry +that §3 denies. Whether candidate-generate-then-select is AB-8(b) +optimization or the §3 search law is genuinely ambiguous as written. + +**3. Relevance-free grounding — succeeds.** §2 requires that grounds +*be* facts; it never requires that the cited fact *bear on* the target. +Cite one fact true of every composed claim in the corpus, compose one +defeater around it, and the whole corpus computes `contested` under +§10 — no forged facts, no rule broken. Global skepticism is not free, +but it is priced at one fact citation amortized across everything, +which at scale is indistinguishable from free. + +**4. Undercuts route to the ungated branch — a determinacy gap.** +§7 discriminates on whether something "is being asserted about the +world." §4 defines undercutting as precisely the operation that asserts +nothing about the world — "the premises may hold and the conclusion may +even be true." So by §7's own criterion an undercut fires *mechanically +and ungated*. The document never says which branch it takes. **The +design's headline capability is the one its gate most plausibly +exempts.** + +**The attack that failed, and what it reveals.** Grounding an objection +in the *absence* of a fact ("nothing in the corpus establishes this +join") defeats every non-exhaustively-enumerated claim, needs no +laundering and no candidate volume — and is blocked cleanly, because +§2 demands an objection *cite* facts and an absence-grounded objection +cites zero. Repairing it by promoting "the corpus contains no fact +establishing `J`" fails too: a completeness claim over the corpus is +derived, not verified bytes, so it is a belief and §2 rejects it by +name. + +**So the bound's real strength is the *positivity* of the citation +requirement, not the standing tier it names.** That is the part to keep. + +**Repair directions — proposed, not adopted, none authorized:** + +- *Bootstrap:* distinguish world-facts from critique-derived facts and + require at least one non-critique-derived ground. This is the + hash-kind-in-the-address move a third time, reusing machinery already + accepted for the user-gated stamp and the meet rule. +- *Relevance:* require the cited fact to be reachable from the target's + own citation chain, or to contradict a member of it. Mechanical, and + it kills attack 3. +- *Cost asymmetry:* either withdraw job #3 as false, or add a + per-target objection budget. Job #3 cannot stand beside §3's table. +- *§7:* state the branch explicitly. Only provenance-mechanical breaks + (bytes changed, hash dead) plausibly belong ungated; semantic + transmission is a domain judgment even when it asserts nothing about + the world. + +**Attack 1 downgraded — July 20, 2026, same session.** A later probe +established that this run does not support attack 1 as an *independent* +finding, on the composer's own published rules: + +- **The forecast shared bytes with the evidence, not the task text.** + §5 — composer-authored, and the analyst's entire evidence universe — + already carries the mechanism (*"doubt to fact with no belief + stage"*), the hazard (*"promotes claims whose doubts died for + unrelated reasons"*), and the word: *"That is a laundering path."* + The rule-11 defence offered above was that the forecast stayed out of + the task text. Failure mode 2 of the `judge-composition` skill + answers it: **the channel moves; audit for the content, not the + location.** The analyst did not independently find a laundering path; + it read one in §5 and pointed it at §2. +- **The prediction was tautological.** §5's promotion door is a + composer-authored gate, and rule 11 strikes predictions of + composer-authored gates from calibration. The composer's + "1-for-4" tally is therefore **0-for-4**. +- **Rule 9 was not satisfied.** Composer conflict must be *externally + reviewed*, never self-absolved. One sub-agent ran, no audit seat, and + the independence claim above was made by the interested party about a + run only that party observed. + +Attack 1 is re-filed as **the composer's own unreviewed conjecture +about the composer's own keystone** — a legitimate thing to record and +a different thing from a falsification. §2 still falls, but it falls on +attacks 2, 3 and 4, which no leaked vocabulary supplied. + +## 12. Empirical validation and the two-layer resolution (July 20, 2026) + +§11 broke §2 by analysis. This section records what a live test then +established, and resolves one of the four gaps §11 opened. + +### 12.1 Stage-2 test — the fact base rejects corrosive doubt + +The question tested: *does a fact base, via the admission test, reject +naturally-occurring corrosive doubt at the per-objection level?* — not +the tautological *does the final verdict come out "sphere"*, which every +fact-grounded design produces and which therefore discriminates nothing +(rule 11). + +Construction, in order, each stage blind to the next: + +1. A **fact base** on the figure of the Earth — ~35 items across three + disjoint scopes — was compiled by three sub-agents **none of which + was told a dispute exists**, so facts were not selected to refute a + known position. Retained verbatim at + [`fixtures/doubts_workspace/earth_figure_factbase.md`](../../fixtures/doubts_workspace/earth_figure_factbase.md). +2. A **corpus of fourteen flat-earth arguments** was compiled as their + proponents actually state them. **Eleven of the fourteen cite real, + correctly-reported observations** (genuine Chicago-skyline + photographs, a correctly-derived surveying formula, the real null + results of Airy and Michelson–Morley, the actual Antarctic Treaty). + This is fact-citing corrosive doubt — the Class-B case the composer + had failed to manufacture by hand across six prior probes; the world + supplied it. +3. A **blind evaluator** applied the admission test, seeing neither the + composer's predictions nor that sufficiency was under test. + +**Result: 13 rejected, 1 admitted, and zero admitted with a false +conclusion.** The pre-committed failure condition — *≥1 corrosive +objection survives → the bound is insufficient* — was **not met**. The +composer had a disclosed stake in the opposite outcome (rule 9); the +result held against that stake, and the measurement was fixed before any +data was seen. + +**Why it held is the load-bearing lesson.** The test is a *derivation* +test — *no load-bearing step may rest on a belief or unverified +assertion* — **not** a citation test. Almost none of the 13 rejections +turned on a false citation; they turned on a broken **inferential** step +over true facts: + +- Chicago skyline — the photographs are real; *"curvature should + conceal it"* needs an unmeasured refraction coefficient. +- Eight-inches-per-mile² — the formula is correctly derived; it computes + drop below the tangent, not height concealed from an elevated + observer. +- Ring laser gyroscope — the proponents' own instrument read **15°/hr**; + the fact base gives ω = 7.292115×10⁻⁵ rad s⁻¹ = **15.04°/hr**. They + measured the rotation they were denying. + +Corrosive doubt characteristically fails at an inferential joint, and a +derivation test is precisely the instrument that catches inferential +joints. A citation test would have admitted most of these. + +### 12.2 The two-layer resolution of the relevance gap + +The one admission (scriptural firmament: *raqia / chug / four corners → +the text describes a flat earth*) is a **sound** derivation from facts +about a text — admitted correctly, true, and **irrelevant** to the +Earth's figure. §11 read this as a hole in §2. It is not a hole in §2; +it is a **layer confusion in the test**, and the composer's. + +The stage-2 test applied the admission rubric **in isolation**, to +pre-composed free-floating objections. The integrated architecture does +not present doubts that way. A doubt is produced by a **defeater composed +from primitives that discriminate the target's context** — the program's +founding thesis, and the `evidence_locus` result of the derivation games +that produced this record. Relevance is **locus intersection**: a +defeater aimed at *the Earth's figure* composes from geodetic loci; a +scriptural-textual claim's locus does not intersect them, so the defeater +either cannot be composed or can only **jurisdiction-abstain** (the +applicability gate already in the engine at `judge_panel.ts:464`). + +So the system is two layers, and each carries one job: + +| Layer | Job | Mechanism | +|---|---|---| +| **Admission** (§2) | **positivity** — is every load-bearing step a fact? | the derivation test | +| **Applicability** | **relevance** — does the doubt's locus meet the target's? | locus intersection / jurisdiction abstention | + +Together they are complete. **§2 should therefore point at the +applicability gate for relevance rather than grow a relevance clause** — +the "discrimination criterion" the composer thought he was *importing* +into §2 was never an addition to the bound; it already lived at the +applicability layer, and the isolated single-layer test could not see +it. Item 14 leaks the isolated rubric and jurisdiction-abstains in the +integrated system. + +**Standing of this resolution:** a design argument, corroborated by the +`evidence_locus` games that built this record, **not** itself exercised +by stage-2 (which tested the isolated admission layer). The applicability +gate has never been run against a composed *defeater*; that is a build +item, not a settled result. + +### 12.3 The workspace membership rule this establishes + +A doubt is admitted to the workspace only if it **survives the fact +base**. Two survivors, mapping onto §5's fates: + +- **fact-grounded** doubts that defeat a claim (sustained); and +- **unverifiable** doubts the facts do not reach — *"I doubt the game is + simple"* — which **gate to the user like a preference**, a permitted + skeptical lens, symmetric with an unverifiable belief. + +A doubt the fact base **refutes**, held anyway, is **delusion**, and is +not admitted. Stage-2 is the validation of exactly this gate: 13 of 14 +delusional doubts refused entry. *(The membership rule and the +unverifiable-lens symmetry are recorded here as they were reached in +session; they extend §5 and §7 and are owner-owed as dated additions to +those sections, not silent edits.)* + +## 13. Open items + +- **§2 relevance gap — RESOLVED (§12.2)** to the applicability layer; + §2 needs a one-line pointer there instead of a relevance clause. + Superseded as an open item. +- **§2 bootstrap and cost gaps — still open.** The proposed repairs + (§11) are not adopted and each needs its own proposal. Nothing is + built against §2 until these close. +- **§2's job #3 contradicts §3's table** and one of the two must be + withdrawn. An internal inconsistency in this record, not an open + design question. +- **§7's branch for undercuts is undetermined** — the gap is in this + record, and it exempts the capability §4 calls the headline one. +- **The §10 vocabulary** is gated by the owner (July 20, 2026) but + renames nothing until the rename lands as its own change. +- **The §12.3 membership rule and unverifiable-lens symmetry** are + owner-owed as dated additions to §5 and §7. +- Nothing here is authorized. Each mechanism is a separately gated + bounded feature and needs its own proposal before implementation. + +## 14. Ratification (dated entry — July 20, 2026, owner, in session) + +The owner ratified the doubts-workspace design as **principle and +direction**, with one part explicitly carved out because it is falsified +and one part left explicitly open. Ratification authorizes **no build**; +each mechanism remains a separately gated bounded feature (§13). +Companion: [`STANDING_MODEL.md`](../product/epistemic-support/STANDING_MODEL.md) +(the `-1` this tier holds). + +**RATIFIED as principle:** + +- **§1 — doubts are a first-class REPL type**, constructed rather than + residual. Direction ratified; the addressable-object build is gated. +- **§2 (the corrosion bound), PARTIAL — see the carve-out below.** +- **§3 — support composes as a cover, defeat as a search.** Ratified; + defeaters are never judges with an inverted sign. +- **§4 — rebutting / undercutting** as the two defeat kinds (Pollock, + exterior prior art). +- **§5 — the three fates** (verified → fact, defeated → dies, unresolved + → persists). Collaborator-confirmed; ratified as law. +- **§10 vocabulary — doubt / objection / defeater.** Now ratified as + canonical (was gated). It **renames no code** until the rename lands + as its own build; `contested` becomes a derived predicate over + outstanding objections. +- **§12.2 — the two-layer resolution.** Ratified as the architecture: + §2 carries *positivity*, the applicability gate carries *relevance*. + Its one untested flank is recorded — the applicability gate has never + run against a composed **defeater**; that is a build item, not a + settled result. +- **§12.3 — the membership rule.** A doubt enters the workspace only if + it **survives the fact base**; a fact-refuted doubt held anyway is + **delusion** and is refused. Unverifiable doubts gate to the user like + a preference, symmetric with unverifiable beliefs. Ratified as law and + hereby adopted into §5/§7 by this dated entry (the owner-owed addition + §13 named). + +**CARVE-OUT — §2 is NOT ratified as sound.** Only its +empirically-validated core is ratified: + +- **RATIFIED:** the **positive-citation requirement** — a doubt must + *cite* facts, not ground itself in absence — which survived adversarial + analysis (§11's failed attack) and was validated against a real corpus + (§12.1: 13/14 flat-earth arguments rejected, zero admitted-false, the + measurement fixed before the data and against the composer's disclosed + stake). The rule is a **derivation** test, not a citation test. +- **NOT RATIFIED / STILL OPEN:** the **bootstrap** gap (attacks 1–2 + laundering, §11) and the **cost** gap (attack 2 volume; job #3 + contradicts §3's table). The proposed repairs are not adopted. **§2 as + a complete bound is not built against until these close.** Ratifying + the bound whole would be the exact instance-promotion failure this + program guards against. + +**Evidence basis, recorded because ratification followed test.** The +positive-citation core was ratified because it *passed a blind empirical +test*, not because it was argued; the two-layer architecture because it +was *corroborated by the evidence-locus games*; the fates because the +*collaborator confirmed* them. Where an item rests on argument alone +(§12.2's untested defeater flank), that is marked, not smoothed over. + +## 15. Parity audit with the support side (dated addition — July 21, 2026, owner Cnid + Claude, in session) + +Recorded as this session's learning; **ratifies nothing new** and authorizes +no build. It consolidates the doubt-vs-fact symmetry already distributed across +the sections above and names one new gap. The audit walked ten dimensions of +the `-1` and `+1` poles around belief (`0`): + +| dimension | fact side `+1` | doubt side `-1` | parity | +|---|---|---|---| +| standing | fact | doubt | **symmetric** (§1; STANDING_MODEL §1) | +| the object it is built on | *unnamed as a single noun* | **objection** (§10) | **GAP — see below** | +| the instrument | judge | defeater | **symmetric** — one primitive (§8) | +| composition law | cover (∀) | search (∃) | **asymmetric BY DESIGN** (§3) | +| typed kinds | grounding / coherence / corroboration / audit | rebutting / undercutting | **symmetric** (§4) | +| the three fates | promote / defeated / pending | verified / defeated / unresolved | **symmetric** (§5) | +| grounding rule | provenance / source bytes | positive-citation of facts | **symmetric burden** (§2, positivity core only) | +| membership | survives the panel + gate | survives the fact base, else delusion | **symmetric** (§12.3) | +| user gate | gates promotion | gates demotion; mechanical contest auto | **symmetric** (§7; STANDING_MODEL §3) | +| build status | **built** | **proposed** (`grep doubt src/` = nothing) | **NOT BUILT** (§1) | + +**Reading:** seven dimensions symmetric (as principle), one asymmetric by +design, two open. The design asymmetry is a feature — *support covers, defeat +searches* — never a parity defect. + +**New gap — the fact side's object has no name.** §10 gave the doubt pole a +clean triad `doubt / objection / defeater`. The fact pole names its **standing** +(`fact`) and its **instrument** (`judge`), but the **object** an objection +mirrors — the fact-grounded thing that *supports* a claim — has no single noun; +it is carried implicitly by judge findings and the J3 *corroboration* role. To +make the two triads read as one, the support-side object wants a name. +**Owner-owed**, gated like the §10 rename. Candidate register (juridical, per +§10): `corroboration` (collides with the judge role), `attestation`, +`submission`. Not adopted here. + +**Resolved this session (July 21, 2026 — collaborator M. Murphy delegated the +choice, owner Cnid endorsed proceeding): the name is `affirmation`.** It is the +fact-grounded object that *affirms* a claim — the direct antonym of the +`objection` that *attacks* it — and it fills the same slot: the fact-grounded +**support object**, never the candidate. That is why `claim` and `proposal` +(floated in session) were set aside: they name the thing supported, not the +support. Collision check that decided it: `corroboration` = the J3 judge role; +`submission` = `STANDING_MODEL.md §2`'s vote; `attestation` = +`HARNESS_SELF_MODEL.md §8`'s informing surface; `warrant` = the `warranted` +adjective; `affirmation` returned zero repo hits and takes the slot cleanly. The +two triads now read as one — **affirmation / fact / judge** ↔ +**objection / doubt / defeater** — differing only by the §3 law (cover ∀ vs +search ∃). Gateable: one owner word overrides it. + +A **three-round clean-room self-play** (July 21, 2026) probed whether the label +`affirmation` biases a reasoner's grounding judgments (connotation → auto-validation). +Across clear items, humanized marginal items (iterated builder, independently +key-verified 12/12), and a rubric-stripped condition, the name showed **no detectable +output bias** — the positive control `proof` (the most auto-validating word a blind +adversary could name) never fired either, so the honest reading is **"no detectable +connotation harm," not "proven neutral"** (single-word priming sits below the detection +floor for a capable model doing explicit adjudication). A third round (Matt-directed) +spread the label across the **full connotation axis** — validating, neutral, a +counter-label (`bunk`), and a nonsense token, 12 blind trials — and every label produced +identical 8/8 verdicts, strengthening the null past the near-synonym limit of rounds 1–2. +`affirmation` **retained**; the self-play method-learnings (including *controls must span +the manipulated axis*) were written into the `self-play` skill. + +**Restated gap — build parity.** The larger asymmetry is §1's: the fact side is +built and the doubt side is not. No new claim; recorded so the audit is honest +that "symmetric" above means *as principle*, not *as shipped*. + +A visual of this audit was produced this session as a private Artifact +(current-state parity map); it is provenance, not authority, and this record +governs on any drift. diff --git a/.claude/skills/complexity-convocation/references/FOUR_JUDGE_BASIC_MODEL.md b/.claude/skills/complexity-convocation/references/FOUR_JUDGE_BASIC_MODEL.md new file mode 100644 index 0000000..2cf8569 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/FOUR_JUDGE_BASIC_MODEL.md @@ -0,0 +1,202 @@ +# The Four-Judge Basic Model (Collaborator-Supplied) + +**Provenance:** authored by the external polymath collaborator and +supplied to the program July 16, 2026, for ingestion as the +reconciliation input FOUR_JUDGE_DESIGN.md §10.1 was waiting for. +Committed verbatim below the rule; nothing edited. Register entry: S10. +The PCF mathematical-foundation reference (arXiv:2508.01581) is queued +as S11 — unread in-session; its rough-fuzzy claims stay uncanonized +until the artifact is acquired (the S6 rule). + +**Terminology addendum (collaborator, July 16, 2026, after commit):** +**UHE = Unified Hyperplane of Experience** — "the training distribution +of vast corpora of human text describing all manner of experience +across the four planes" (Emotional/Logical/Sensorial/Ethical). The +collaborator's terminology is recorded in R-31 (twice-refined, July 16, +2026): UHE is a **loaned Lexideck house term** (~3 years of agentic +R&D) — the authoring-side matrix mathematics of the vocabulary-space — +while **the J-space object is the un-verbalized stream parallel to +execution**; "J-space Target" / "J-space Prediction" are acceptable +substitute concepts. The load-bearing property: such objects are +**external to execution, summarizing it or operating in parallel to +it**. No phenomenology is claimed by anyone. The program's unifying +frame built on this is RESEARCH_MAP §4.10 (the externality principle). + +--- + +> **Dated supersession note (July 21, 2026 — owner Cnid + collaborator Matt, via self-play).** +> The per-seat `hyperplane_parameters` YAML below (the UHE four-plane model) was the program's +> **starting point** for a composed judge/defeater seat (S10, July 16, 2026). The **live per-seat +> schema has since evolved** to `purpose` · `claim_modes` · flat `select` · `orientation` · +> `taxonomy` · `blind_to`, ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) +> (Layer rule). A blind self-play evaluation this session (two runs, blind judge panels, `$0` paid) +> found the added `taxonomy` + `blind_to` are the stronger primitives; that flat `select` beat +> **both** the rigid four-plane buckets *and* a plane-categorized `select` at the per-seat level; +> and that the four-plane structure's only plausible remaining home is **panel-coverage +> composition** (spanning seats across planes) — a concept, not a per-seat field, and untested. +> *"We outgrew the UHE-based per-seat judges"* (Matt). The body below is preserved **verbatim** as +> the S10 provenance record; nothing in it is edited. Provenance cross-refs: +> [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8 (citation correction). + +## The basic model + +- The four hyperplanes are not themselves four judges. They are expandable parameter registries: +- Emotional: affect, empathy, grief, trust, motivation, dignity, relational consequences. +- Logical: deduction, induction, abduction, Bayesian inference, causal reasoning, counterfactuals, falsification, consistency. +- Sensorial: observation quality, signal fidelity, embodiment, usability, accessibility, spatial and temporal coherence. +- Ethical: harm, benefit, rights, duties, justice, care, consent, autonomy, legitimacy, proportionality. + +A judge is then a sparse selection from these registries: + +```yaml +judge: + name: + purpose: + + claim_modes: + - fact + - inference + - prediction + - value + - belief + - experience + + hyperplane_parameters: + emotional: [] + logical: [] + sensorial: [] + ethical: [] + + orientation: + evidence_standard: + uncertainty_posture: + temporal_horizon: + stakeholder_scope: + reversibility: + contradiction_sensitivity: + abstention_boundary: + +``` + +These are parameters, not rules. Their implementations, weights, thresholds, and composition operators can remain open. + +## A useful first ecology + +- Epistemic Reliability Judge +> Evidence quality, induction, Bayesian confidence, falsifiability, source dependence, observation fidelity. +- Formal Coherence Judge +> Deduction, consistency, constraint satisfaction, counterexamples, contradiction sensitivity. +- Engineering Adequacy Judge +> Causality, troubleshooting, failure modes, observability, usability, safety, reversibility. +- Human Impact Judge +> Empathy, dignity, accessibility, stakeholder distribution, harm, temporal consequences. +- Ethical Legitimacy Judge +> Rights, duties, justice, consent, proportionality, care, integrity. +- Lived Experience Judge +> Affect, embodiment, perceptual fidelity, testimony, cultural context, dignity. +- Belief-to-Fact Judge +> Claim type, evidence quality, source reliability, falsifiability, uncertainty, and the distinction between private meaning and public truth. +- Tragedy and Witness Judge +> Grief, dignity, historical fidelity, harm, cultural context, restraint. It judges whether something bears witness adequately, not whether tragedy has been “solved.” +- Decision Robustness Judge +> Counterfactuals, uncertainty, reversibility, failure recovery, long-term effects, affected populations. +- Adversarial Judge +> Hidden assumptions, contradiction, manipulation, Goodharting, omitted stakeholders, brittle evidence. +- Coverage Meta-Judge + +> Identifies relevant parameters, abstentions, missing coverage, unresolved disagreement, and the need for another judge. + +I think semantic similarity is necessary, but not strong enough to be the gluing condition by itself. + +Its proper role is candidate retrieval. It answers: + +> Which judges appear relevant to this case? + +Actual sheaf-like gluing asks a stronger question: + +> Do these locally relevant judges remain compatible where their jurisdictions overlap? + +That distinction matters. Two judges can be semantically close while contradicting each other, sharing the same blind spot, or leaving an important UHE region uncovered. + +PCF already gives us a natural matching structure through rough fuzzy classification: graded membership plus a distinction between definitely applicable and possibly applicable configurations. [That is explicit in PCF’s stated mathematical foundation](https://arxiv.org/abs/2508.01581). + +## Judge matching as rough-fuzzy routing + +For a context \(c\), semantic similarity can place judges into three regions: + +- Lower approximation: definitely applicable +- Boundary region: possibly applicable +- Exterior: no meaningful jurisdiction, so abstain + +For example, on an engineering specification: + +- Engineering Adequacy is definitely applicable. +- Formal Coherence is definitely applicable. +- Human Impact may occupy the boundary if people operate the system. +- Tragedy and Witness is outside. + +This makes semantic similarity a very good approximation of the cover-selection step. It identifies which local sections might cover the context. + +It does not yet glue them. + +## The stronger matching stack + +I would use six layers: + +1. Context signature + Identify claim mode, evidence type, stakes, stakeholders, time horizon, and implicated UHE parameters. + +2. Semantic retrieval + Retrieve judges whose purposes and parameters resemble that signature. + +3. Applicability gate + Check whether the judge can actually address this claim mode. A judge of testimonial credibility may concern the same topic as a factual verifier without being qualified to establish the fact itself. + +4. Compatibility gate + Exclude internally contradictory compositions and judges whose required assumptions conflict with the case. This should be a hard gate, not merely another similarity score. + +5. Coverage and complementarity + Select a small set that covers the relevant UHE parameters while avoiding redundant judges. + +6. Overlap test + After judging, compare their local conclusions on shared parameters. Compatible restrictions can be composed. Incompatible restrictions remain explicit or go to a meta-judge. + +A routing score could be: + +\[ +R(j,c)= +w_s S_{\text{semantic}} ++w_a A_{\text{applicability}} ++w_m M_{\text{marginal coverage}} ++w_k K_{\text{calibration}} +-w_r R_{\text{redundancy}} +\] + +subject to: + +\[ +C_{\text{compatibility}}(j,c)=1 +\] + +The weights can remain open parameters. + +## Where the sheaf analogy actually lands + +The clean correspondence is: + +- Semantic similarity defines neighborhoods. +- Rough-fuzzy membership identifies the cover. +- Each judge supplies a local section over part of the UHE. +- Compatibility on overlaps supplies the gluing condition. +- The composed ruling is the global section. +- Unresolved disagreement means no valid global section presently exists. + +That last result is important. We should never force gluing merely because every selected judge produced an answer. + +This also fits the grader paper’s failure-expecting architecture: atomic evaluators may abstain, compositions remain inspectable, and outside audits detect failures that the selected metric cannot see. [The paper treats abstention and independent auditing as structural safeguards](https://arxiv.org/pdf/2607.12790). + +So I would preserve what PCF did, but sharpen its interpretation: + +> Semantic similarity is the routing prior and fuzzy membership function. It approximates cover construction, not sheaf gluing itself. + +The actual gluing mechanism needs compatibility on overlaps, plus coverage, calibration, and explicit permission for failure to glue. \ No newline at end of file diff --git a/.claude/skills/complexity-convocation/references/FOUR_JUDGE_DESIGN.md b/.claude/skills/complexity-convocation/references/FOUR_JUDGE_DESIGN.md new file mode 100644 index 0000000..6b0a200 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/FOUR_JUDGE_DESIGN.md @@ -0,0 +1,327 @@ +# The Four-Judge System — Design Record + +**Status: PROPOSED — DESIGN ONLY.** Nothing implemented, measured, or +accepted. July 16, 2026. Document-driven design: this record leads; any +implementation follows it as a separately authorized bounded feature. + +**Reconciliation flag (read first — updated July 16, 2026, late +session).** This record was architected from the program's evidence +base *without* sight of the collaborator's system. **The collaborator's +design has now been supplied and committed verbatim as +[`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md)** (register +S10, claims R-28…R-30). Its central reframe: the "four" are +**hyperplane parameter registries**, not four judges; a judge is a +sparse selection from them; the working system is an **ecology**. This +record's four roles read, under that frame, as a *minimal ecology +instance for belief-support* — the layers compose rather than compete. +Ingestion and reconciliation are Session 66's first task (§10.1); +until owner ratification, neither design is authoritative over the +other. + +**Third amendment (July 17, 2026, Session 66): §10.1 item 1 is +EXECUTED.** The reconciliation record — +[`RECONCILIATION.md`](RECONCILIATION.md) — carries the layer mapping, +the four completed role definitions in S10's YAML schema with +per-field sources, the adopted composition design (R-29 hard +compatibility gate; R-30 no-global-section), the per-role verdicts +with falsifiers, and the enforcement/pin table. The panel drills of §7 +items 1–3 are implemented in the same PR +(`npm run test:judge-panel`). **Fourth amendment (July 18, 2026, +Session 67): RATIFIED.** RECONCILIATION §7 carries the owner's dated +entry. The verdicts there are binding, the co-equality is ended, and +**RECONCILIATION.md governs this record wherever the two differ** — its +layer mapping, completed role definitions, composition design (R-29, +R-30), and §5 enforcement table are authoritative. This record stands as +the architecture it graduated from; read it with RECONCILIATION beside +it. `JUDGE_COMPOSITION_GAME.md` §11 was ratified in the same act. + +**Fifth amendment (dated note — July 19, 2026, Session 71; a +correction pointer, not a re-decision).** This record's §3 is the +origin of the standing-roster idiom that later documents inherited — +"a fifth judge with a blindness profile **already on the panel**", the +role table with per-role drawback classes fixed inline, and §5's +anchor discipline stated **per role** with fixtures byte-pinned ahead +of any candidate. Its own §1 already says the four are "a *minimal +ecology instance for belief-support*"; the operative sections do not +honor that framing, and the framing is what governs. Under +`JUDGE_COMPOSITION_GAME.md` §6 rule 4 and the owner's July 19, 2026 +ruling, **there is no default cast**: the four are role *slots*, each +buying a blindness the others lack, and every judge filling one is +composed for its context from the S10 registries. §5's per-role anchor +discipline is consequently under re-decision — anchors calibrate a +taxonomy, and belief-facing taxonomies do not exist until a +composition does. See +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md) +for the principle and the case that produced it. + +Program context: [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md). Parent +design record: [`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) +(the original review-series proposal it graduated from was removed at +owner direction at PR #119 merge review; branch history retains it). +Evidence register: [`RESEARCH_MAP.md`](RESEARCH_MAP.md). Prompt-facing +contracts: [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md). +Adoption bounds (binding on this design): RESEARCH_MAP §"Adoption +bounds register". + +--- + +## 1. Problem statement + +The support plane (parent record §2–§3) needs judged inputs: events +that move a belief's (b, d, u) opinion. The naive design — one LLM +judge per belief — fails on the program's own evidence three ways: + +1. **Shared blind spots.** A bare LLM judge shares architecture, + training distribution, and failure modes with the writer it grades; + S1 observed judge-solver agreement drift "before any optimization + pressure exists," and S8 gives the mechanistic frame: judge and + writer both reason through a capacity-limited workspace of the same + kind (R-20). +2. **Verbalized ≠ driving.** A judge can state the right criterion and + act otherwise — S8's dissociation (R-21) and Trellis's laundering + agents (R-11), which read the truth and cited the decoy. A judge's + *stated* rubric compliance is not evidence of rubric-driven verdicts. +3. **Bag-of-concepts readouts.** S8 §9.1: a single readout shows which + concepts are present but not how they bind. A single judge's verdict + is one unstructured projection of the evidence; differently + structured projections catch what any one misses. + +The answer with precedent in both evidence lines (S1's +detector-composition; the parent record §4.5's independence rules) is a +**small panel of differently-blind judges whose verdicts are composed +by engine code** — never averaged informally, never chained through any +model's attention (R-23: externalize intermediate state; a verdict is +engine state the moment it exists). + +## 2. Doctrine (inherited, binding) + +- **Drawback-first**: every verdict is `drawback | clean | abstain` + with a named drawback class from a closed per-role taxonomy; `clean` + means *no known drawback found*, never certified correctness (R-01). +- **Abstention feeds uncertainty**, never belief or disbelief (parent + §3). +- **Writer-blind**: no judge output, score, or panel composition is + visible to the writing agent; no task spec carries a count-shaped + incentive (AB-5). +- **Gate/audit separation**: the judge that gates and the judge that + audits are different roles, different loops, and by default different + model families (parent §4.5; AB-9). +- **Judges are capabilities**: every judge is a registered manifest + (rubric hash, anchor-set hashes, taxonomy version) the invalidation + sweep can contest (parent §4.4). +- **Anchor labels may be model-produced** (AB-4 as amended July 16, + 2026 by owner ruling); fixtures are byte-pinned once labeled, refresh + stays a human ceremony, and the labeler is never given a count-shaped + incentive (AB-5 binds the labeler too). + +## 3. The four roles + +Four roles because four **distinct blindness profiles** cover the +failure classes in evidence; a fifth judge with a blindness profile +already on the panel adds cost, not coverage (§9 falsifier). Each role +states what it sees, what it is structurally blind to, and which +evidence motivates it. + +| Role | Sees | Deliberately blind to | Verdict domain | Cost tier | Evidence basis | +|---|---|---|---|---|---| +| **J1 — Grounding** | the claim + the exact cited source bytes, nothing else | the graph, other beliefs, consensus, authority | does the cited evidence support this claim? (`unsupported_citation`, `overclaimed_evidence`, …) | judge op (one narrow LLM question) | The only gate that held 0% under laundering pressure (R-11); already exists as `entailment_detection.ts` | +| **J2 — Coherence** | the claim + its own history (prior versions, contest/recovery record) + its claim-kind position when that plane exists | all external evidence | is the belief internally coherent and plane-consistent? (`self-contradictory`, `kind-incoherent`, `history-inconsistent`) | static + judge op | Coherence calibration as tooling (R-18); cross-plane invariants (parent §2.1) | +| **J3 — Corroboration** | independent live evidence: other beliefs with disjoint sources, authority-registry documents | the belief's *own* citations (prevents circular corroboration) | is the claim independently corroborated or contradicted? (`uncorroborated`, `authority-contradicted`) | static + execution ops | Detectability spectrum (R-05); authority registry (parent §5); poison drill (R-12) | +| **J4 — Audit** | sampled (judge, verdict, evidence) triples from J1–J3; pairwise comparisons under a task-aware rubric, judged twice with positions swapped | the live gating path — J4 runs outside every loop and **never gates a belief** | are the other judges judging well? (`rubric-gamed`, `convention-blind`, `systematic-drift`) | independent stronger model | S1's 2×2: the audit caught what the loops could not, and the audit itself needed the task contract (R-06) | + +**Disagreement is data, not noise.** J1-clean + J3-drawback is a typed +conflict signal (claim supported by its citations but contradicted by +independent authority) that feeds `d` *and* flags the belief for the +existing conflict path. The composition never silently majority-votes +across roles that measure different things. + +## 4. Composition into the support plane + +J1–J3 verdicts are events consumed by the support computation (parent +§3) through a metric expression in the S1 grammar — the fixed root +(write-path gates, already enforced) conjoined with a hand-authored +composition; first edition, no evolution machinery (AB-8): + +``` +support_metric_v1 = root ∧ ( any(J1.drawbacks) ∨ any(J2.drawbacks) ∨ any(J3.drawbacks) ) +``` + +with per-role weight keys resolved by the computation module, and every +abstain routed to `u`. The expression string + role taxonomy versions +are hash-pinned (`metricSha`, parent §4.2). + +**Dated amendment (July 17, 2026, Session 66):** the composition +adopts the two S10 structural imports per §10.1 item 1(c), specified +in [`RECONCILIATION.md`](RECONCILIATION.md) §3 and pinned by +`npm run test:judge-panel`: the hard compatibility/applicability gates +(R-29 — typed counted exclusions, never a similarity score, fail-closed +when nothing survives) and the no-global-section outcome (R-30 — +qualified-parameter overlap conflicts emit a typed conflict record and +withhold the conflicted verdicts from evidence accumulation, u-dominant, +never a blend). The §3 "disagreement is data" rule and R-30 resolve to +different boundaries (cross-role vs same-jurisdiction) — +RECONCILIATION §3.3 carries the explicit resolution and its falsifier. + +**J4 composes differently by design.** Its verdicts never touch a +belief's opinion. A J4 `systematic-drift` finding against a judge +contests **the judge** — the capability entity — through the ordinary +sweep (parent §4.4), excluding it from composition pending human +re-review. This is the "who grades the grader" loop closed natively: +anchors keep a judge honest prospectively; J4 catches what anchors +miss retrospectively; registration makes the consequence governable. + +```mermaid +flowchart LR + B["Belief (write-path root already passed)"] --> J1["J1 Grounding
sees cited bytes only"] + B --> J2["J2 Coherence
sees own history only"] + B --> J3["J3 Corroboration
blind to own citations"] + J1 --> C["Engine composition
(hash-pinned expression;
abstain routes to u)"] + J2 --> C + J3 --> C + C --> S["Support opinion (b, d, u)
sweep-side, writer-blind"] + J4["J4 Audit
independent model, outside all loops,
position-debiased, task-aware rubric"] -. samples .-> J1 + J4 -. samples .-> J2 + J4 -. samples .-> J3 + J4 -- "systematic-drift finding" --> K["Contest the JUDGE
(capability entity, ordinary sweep)"] +``` + +## 5. Anchors and lifecycle + +> **Amended July 19, 2026 (owner ruling, Session 71).** Anchors are +> **per composition, not per role**, and they **compose at +> instantiation** from the domain's own content space — the categories +> that compose them are the only prior. There is no committed +> byte-pinned fixture authored ahead of a candidate, because the +> taxonomy an anchor calibrates does not exist until a composition +> does. The ten-item five-and-five shape survives; where it binds +> moves. Validation moves with it: the validity gate (no +> all-pass/all-fail/all-abstain) runs at composition time and the +> composing agent retries on failure, which is where R-02's protection +> actually lives — it is taxonomy-agnostic and survives the move +> intact. "Byte-pinned" now binds on the write-once promotion record +> that stores the composed anchors. AB-8 was amended in the same act. +> See [`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md) +> §3 and §9. + +*(Superseded text, retained for the record:)* Per role: one committed, +byte-pinned **ten-item anchor fixture** +(five clear drawbacks, five clean positives — the S1 dev-set shape; +R-04 supports sufficiency at this size), labels human or mechanical +(AB-4). Selection guards are mandatory and fail closed: a judge +configuration with no usable anchor opinion is unselectable; all-pass/ +all-fail/all-abstain configurations are refused (R-02 — the naive +ablation's vacuous collapse is the failure this prevents). Anchor +refresh is a human ceremony with an audit stamp; **anchor drift, not +pool drift, is the watched failure** (R-03). + +## 6. Behavior → enforcement → pin + +| Behavior | Tooling that enforces it | Pin that detects drift | +|---|---|---| +| Verdicts are ternary with closed taxonomies | verdict schema validation at the worker boundary (`parseLlmResponse` mold) | schema unit pins; unknown class refused | +| J4 never gates | no code path from J4 output to any belief opinion or write gate | static check: audit module imports no gating surface; drill section | +| Role blindness is structural | per-role context assembly gives each judge only its declared inputs | assembly unit pins (J3 context contains no self-citation bytes; J1 context contains no graph reads) | +| Panel outputs compose in engine code only | composition is a pure module over verdict records | oracle-drill extension: scripted verdicts → exact opinion | +| Judges contestable | judge manifests registered as graph entities citing rubric + anchor hashes | `test:module-lifecycle` pattern retargeted | +| Position bias neutralized in J4 | judge twice with positions swapped; a win counts only on agreement | protocol unit pin on the pairing harness | +| Writer never sees any of it | no judge/support fields on RLM-visible read surfaces | kernel-prompt substring absence pin + read-surface unit pins | + +## 7. Drills (zero-paid first) + +**Dated amendment (July 17, 2026, Session 66): items 1–3 are +IMPLEMENTED** as `npm run test:judge-panel` +(`scripts/test_judge_panel.ts`, fixtures under `fixtures/judge_panel/` +with an independent expected-values generator; the +`test:support-oracle` mold). Item 1 gained the no-global-section +section RECONCILIATION §3.2 specifies. Item 4 remains a separate +owner-gated paid proposal, unrun. The original proposal text below is +preserved as written. + +1. **Panel-composition oracle drill** — extends + [`ORACLE_DRILL_PROPOSAL.md`](ORACLE_DRILL_PROPOSAL.md): scripted + four-role verdict streams (including role-disagreement cases) → + exact composed opinions; a planted J4→opinion path must be + structurally impossible (drill fails if reachable). +2. **Blindness drill** — context-assembly refusals: J1 handed a graph + read, J3 handed its own citations, must refuse before any model + call would occur (scripted, zero-LLM). +3. **Judge-contest drill** — a scripted J4 `systematic-drift` finding + contests the judge entity; composition refuses the contested judge; + recovery is human re-registration (retargets `test:module-lifecycle`). +4. **Paid follow-on (separate, owner-gated):** per-role anchor + calibration (agreement-with-n on the ten-item fixtures) and one + incentive-pressure A/B against the panel — the S4 laundering design + pointed at the panel itself: can a count-shaped incentive corrupt a + *judge*? Costs bound by existing telemetry (entailment sweep + $0.0093/25 pairs; est-suite ~$2.40/50 runs). + +## 8. Explicit exclusions + +- No implementation in this record's turn; no code, schemas, prompts, + or workers change. +- J4 never gates; no judge self-audits; J4's model family differs from + J1–J3's by default (owner may waive with recorded reasoning). +- No evolution/search over judge configurations in the first edition + (AB-8); no writer-visible outputs (AB-5); no teacher-model anchor + labels pending the AB-4 ruling. +- No claim that four is optimal — four covers the currently evidenced + blindness classes (§9 falsifier governs). + +## 9. Falsifiers + +- A fifth blindness profile demonstrated to catch a failure class the + four miss (→ the panel grows, with its own drills). +- Two roles shown redundant on anchors across task families (→ merge). +- The J4 audit failing to catch a seeded systematic judge drift in the + judge-contest drill (→ the audit design is wrong, stop). +- Panel cost exceeding the sampled-verification budget that R-12 shows + suffices (→ re-scope roles to sampling tiers). + +## 10. Open items and decision boundary + +1. **Ingest the supplied basic model, then complete** *(second + amendment, July 16, 2026 late session — the awaited definitions + ARRIVED as `FOUR_JUDGE_BASIC_MODEL.md`)*: Session 66's first task + is now three-part. (a) **Map the layers**: express this record's + four roles as sparse selections from the S10 registries (a role's + blindness profile = the registry parameters it does NOT select + + its `abstention_boundary`), against S10's ecology — preliminary + mapping to verify, not assume: J1 Grounding ≈ Epistemic + Reliability ∩ Belief-to-Fact (Logical: evidence quality, + falsification; claim modes fact/inference); J2 Coherence ≈ Formal + Coherence; J3 Corroboration ≈ Epistemic Reliability (source + dependence, Sensorial: observation quality); J4 Audit ≈ + Adversarial + Coverage Meta-Judge (two functions this record had + fused). (b) **Complete the definitions** in S10's YAML schema with + rubric content reconstructed from the S1/S9 artifacts, citing + sources per field. (c) **Adopt the two structural imports** into + the composition design before the drills pin it: the hard + compatibility gate (R-29) and the no-global-section outcome (R-30 + — overlap-test failure produces a typed conflict record + + u-dominant opinion, never a silent blend). Record everything as + dated amendments; the owner ratifies. Non-epistemic registries + (Emotional/Sensorial-beyond-observation/Ethical) stay gated behind + the claim-kind plane's driving-question rule (AB-7). +2. ~~Owner ruling on AB-4 (anchor labeling)~~ **RESOLVED July 16, + 2026: model labeling permitted** (AB-4 dated amendment) — anchor + fixture authoring is unblocked. +3. Aggregation weights and decay constants — v1 defaults ratified with + the drill (`docs/architecture/EPISTEMIC_SUPPORT.md`, v1 arithmetic); + further tuning re-enters through drill re-pins. +4. Authorization boundary: the support-computation oracle drill is + authorized and implemented (owner decision #3); every OTHER + mechanism in §6–§7 (panel drills, judge registration, sweep + integration) remains a separately authorized bounded feature. +5. Rubric composition machinery: see + [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md) + (owner decision #4) — the rubric side of every role contract. +6. *(Added July 18, 2026.)* The composition design was exercised live + at the **session layer** — isolated sub-agent judges over a real + promotion candidate, twice, with audits — in the judge-composition + game: [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md). + The run validated the differently-blind structure (the panel caught + its own composer's filing bias) and produced twenty distilled rules + plus harness-shape notes (its §9) that bind the eventual sweep + integration when that bounded feature is authorized. No engine code + changed; this record's §10.1 status and RECONCILIATION §7 + ratification are unaffected. diff --git a/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_CEREMONY.md b/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_CEREMONY.md new file mode 100644 index 0000000..a8510c3 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_CEREMONY.md @@ -0,0 +1,296 @@ +# The judge-composition ceremony — design record + +**Status: DESIGN — resolved in session, July 19, 2026 (Session 71). +Nothing built.** Records the owner's and collaborator's answers to six +blocking questions, so the prototype can be built from a record rather +than from conversation. Implementation is a separately authorized +bounded feature. + +**Parent authorities.** +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) (RATIFIED; +its twenty rules of §6 are binding program law, cited by number) and +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md). +Where this record and the game record differ, the game record governs. + +**What this record supersedes in direction (each needs its own owner +dated entry in its home record — see COMPOSITION_FROM_PRIMITIVES §6):** +the standing four-judge roster, per-role byte-pinned anchor fixtures, +and rubric *selection* from pre-registered compositions. + +--- + +## 1. The problem + +We do not know the domain of the facts in the REPL. A promotion +candidate may be a claim about water chemistry, comedy, methodology, or +anything else, and the pool it is promoted from is an arbitrary +linguistic topology containing a potentially unlimited number of facts +and beliefs. + +Therefore **no criteria can be authored in advance**. Judging criteria +that were written before the domain was known are criteria for a +different domain. + +The collaborator's frame: the meta-prompt judges are a **Grothendieck +cover over an arbitrary linguistic topology** — constructed for the +space in front of them, required to cover it, never carried between +topologies. The engineering analogue is the Visual Loom in MASH: the +developer writes the frame and the iteration over whatever the world +contains, and never enumerates the scenes, because the user's world +does not exist at development time. + +**Every single part composes at ceremony time.** Judges, their +selections, their taxonomies, and their anchors. + +## 2. The invariants (what does NOT compose) + +Only these. Everything else is composed per ceremony. + +- **The judge schema** — the field names of the game template: + `judge`, `purpose`, `claim_modes`, `select`, `orientation`, + `taxonomy`, `blind_to`. +- **The verdict vocabulary** — `drawback | clean | abstain`; + `abstainReason: jurisdiction | evidence`; a drawback names a class + from the composition's own closed taxonomy. +- **The shape rules** — one question per class; taxonomies closed + before judging; `clean` never certifies; abstention feeds uncertainty + only. +- **The four seats' *blindness structure*** — grounding (cited bytes + only), coherence (own record only), corroboration (independent of the + citation chain), audit (judges judges, never gates). Seats earn their + place by buying a blindness no other seat buys. +- **The audit seat's failure taxonomy** — `rubric_gamed`, + `convention_blind`, `systematic_drift`, plus coverage findings. How + judges fail does not depend on what they judge. Its **name and angle + compose** (game rule 4 as extended by the July 19 ruling). + +Everything else — judge names, purposes, registry selections and +aspects, orientation values, belief-facing taxonomy classes, anchors — +is composed at invocation. + +## 3. The ceremony + +One promotion candidate, one ceremony, start to finish. **No artifact +from a previous ceremony is reused as input.** The ceremony polls the +REPL for its fresh state on every promotion. + +### Stage 0 — Candidate ratification (existing, unchanged) +The user selects and ratifies the candidate through the existing intake +surface. Code-mediated: engine-addressed, engine-quoted, never retyped +(game rule 15; the slice-1 machinery already does this). + +### Stage 1 — The REPL characterization (isolated agent) +An isolated agent reads the REPL's fact space and belief space and +returns a **descriptive, not expository, summary**: the *nature of the +pool* the candidate is being promoted from and to — its domains, +vocabulary, claim kinds, evidence shapes, authority structure. + +It characterizes; it does not argue, explain, or assert content. The +distinction is load-bearing: an expository summary would carry claims +into the composer, and the composer would compose criteria around them. + +**The candidate is not privileged in the characterization.** We know +the *domain* of the claim — its region of the pool is in scope, and +must be, or the composed cover would not cover the space the claim +lives in. What is withheld is *which* claim is under test. The +candidate receives no marking, no weight, no position, and no mention +distinguishing it from the rest of the pool it belongs to. + +The property is **anonymity, not exclusion**, and that distinction is +the whole design. Excluding the claim's content would make the +characterization unrepresentative of the very region the judges must +cover. Leaving it in, unmarked, means the composer can compose criteria +fit for the domain while being structurally unable to tailor them to +the claim — it cannot tell which of many facts and beliefs is the one +being judged. + +### Stage 2 — Composition (agent per seat) +The composer receives the Stage-1 characterization and the invariant +schema, and composes one judge per seat, plus that judge's anchors. + +**The composer cannot identify the candidate.** It composes criteria +for the *domain*, not for the claim. This is the seat where bias lives +— the game established that the belief-facing panel's clean contexts +do not protect the composer's layer — so the candidate's identity is +withheld structurally rather than by instruction. Per Stage 1 the +withholding is anonymity: the claim's domain is present and its +identity is not. + +Composition emits, per seat: the filled game-template YAML, and a +ten-item anchor set improvised from the domain content space (five +clear drawbacks, five clean positives) whose only priors are the +categories that compose them. + +### Stage 3 — Instantiation gates (zero-model, deterministic) +Before any judging, the engine checks the composed cover and **refuses, +typed, on failure**: + +1. **Validity** — no seat's anchors are all-pass, all-fail, or + all-abstain. This is R-02's protection, rehomed from committed + fixtures onto composition time; it is taxonomy-agnostic and survives + composition intact. +2. **Coverage** — the seats cover the characterized domain, and the + candidate lies inside it by construction (Stage 1 keeps the claim's + region in scope while withholding its identity). Coverage is + therefore checkable without ever privileging the claim: cover the + domain, and the claim is covered because it is in the domain. +3. **Overlap** — seats are pairwise disjoint in their qualified + parameters, **or** overlapping with a declared gluing rule. Strict + disjointness is not required: a cover normally overlaps, and gluing + happens on the overlaps (R-30 already withholds same-jurisdiction + conflicts as typed forks rather than blending them). +4. **Falsifiability** — every seat has an abstention path and a way to + fail. A judge that cannot fail is not a judge. + +**On gate failure the composing agent retries.** Repeated failure ends +the ceremony with a report; it never degrades into judging with a +defective cover. + +### Stage 4 — Judging (existing spawn boundary) + +**Judges see the candidate only after they are instantiated, on the +judgement forward pass.** The blindness of Stages 1–2 is a +*composition-time* property, not a standing one: criteria are built +without knowing which claim is under test, and then the instantiated +judge is shown the claim and judges it. Reading "blind to the +candidate" as covering the forward pass would leave nothing to judge. + +The temporal split is the whole safeguard. Criteria that cannot have +been shaped to the claim are then applied to it. + +Each composed judge runs in an isolated clean context receiving only +its definition, its declared inputs (which at this stage include the +candidate), and the output schema. No claimant identity, no sibling +verdicts, no composer expectations. Existing R-27 identity refusal and +transport byte-equality pins apply. + +### Stage 5 — Audit +The audit seat runs over the judges' prompts and verdicts **plus the +composer's artifacts**: the Stage-1 characterization, the composed +definitions, the anchors, and the pre-registrations. The composer's +packaging is a first-class audit target. + +### Stage 6 — Record and dispose +The promotion record is written write-once and carries the composed +judges, their anchors, the characterization, the verdicts, and the +audit findings. + +## 4. What persists, and what it means + +**Compositions are records, not a library.** A stored composition is +the historical account of why one promotion was decided. It is +**never** selected from, reused, or treated as a registered judge +available to a later ceremony. Any mechanism that picks a stored +composition for a new candidate reintroduces the standing roster under +a new name. + +Store shape: the existing convocation store, `kind='composed_judge'`, +key `:`. Write-once on `(kind, key)` already +fits — every composition is naturally a new key. + +**The composer is the durable contestable capability.** Judges are +per-ceremony and ephemeral, so there is no standing judge for the +invalidation sweep to contest. What persists and can be found defective +is the composer: its prompt, versioned, and its method. An audit +finding against the composer makes promotions decided under it +reviewable — the capability flywheel applied one layer up, to the thing +that builds the evaluators. + +**Two different times, when evidentiary bytes die:** + +- **During the ceremony** — no trail means the judge cannot ground a + verdict. It abstains on evidence, or the run refuses. **There is no + promotion, and there is a transparent report.** +- **After promotion** — the bytes underlying a promoted fact dying + later is the ordinary invalidation sweep contesting that belief. + That machinery exists and is untouched. The composed-judge record is + not contested by it: a record of a past act is not a live capability. + +## 5. Agent contracts (shape only) + +Both agents are composed against the sub-agent transfer rules: nothing +crosses the boundary but the prompt, and the return contract is the +highest-stakes slot. + +- **Characterizer** — reads the fact/belief space; returns a + descriptive characterization. Blind to the candidate. Read-only tools. +- **Composer** — reads the characterization and the invariant schema; + returns filled template YAML plus anchors, per seat. Blind to the + candidate and to sibling compositions where seats must stay + independent. + +Prompt bytes for both are authored under Guardrail 15 (Prompt- +Engineering + Hypershot + `judge-composition`), and the composer prompt +is a versioned artifact because the audit seat reads it. + +## 6. Spend + +Composition is **N+ model calls before any judging begins** — the +characterizer, plus a composer call per seat, plus retries. The §10 +estimate of ≈$0.02–$0.06 per belief assumed zero composition cost and +no longer holds; it is re-estimated before any live run. + +Owner direction: the goal is **not to over-test**. This is the +project's Landauer bill — payable in testing eventually, but a solid +harness comes first. The zero-paid harness is built and drilled before +any metered ceremony runs. + +## 7. Explicit exclusions + +- No standing roster, default cast, or base judges, under any name. +- No selection of a stored composition for a new candidate. +- No criteria, taxonomy, or anchor authored ahead of a ceremony. +- No live run: the triple gate stands, and only the owner's dated + paid-queue re-opening plus a per-run ceremony opens it. +- No change to the write path, custody tiers, or promotion gates. + +## 8. Open items + +1. The composed-judge store record's exact field set. +2. Whether the characterizer's output is itself byte-pinned into the + promotion record (it is composer input, so the audit seat needs it — + assumed yes, unconfirmed). +3. ~~How the coverage gate decides "the claim's parameter space" + without reading the claim.~~ **RESOLVED July 19, 2026 + (collaborator, owner-approved):** we know the domain of the claim + but not the claim under test, and it is not privileged in the + descriptive summary. The gate covers the domain; the candidate is + inside it by construction. See §3 Stage 1. +4. Whether seats beyond four are composed when the topology needs them, + and what admits a fifth. +5. Whether the anonymity property needs a mechanical check, or rests on + the characterizer's contract (§9 F4 carries the falsifier). + +## 9. Falsifiers + +Each names the observation that would break the design, not a risk to +be managed. + +- **F1 — Composed criteria track the candidate.** If composed + taxonomies correlate with the candidate's own content more than with + the domain's, the anonymity property is not holding and the composer + is tailoring. Detectable by composing twice over the same pool with + different candidates drawn from it: the two covers should differ + little. +- **F2 — Composition is not discriminative.** If covers composed for + genuinely different domains come back substantially alike, the + composer is emitting a template rather than composing, and the + standing cast has returned by another route. +- **F3 — Gates never fire.** If validity, coverage, overlap and + falsifiability refuse nothing across a run of scripted compositions, + they are decoration. The zero-paid drill must plant compositions that + each gate catches. +- **F4 — Anonymity leaks by salience.** The candidate's identity can + reach the composer with no rule broken, purely through how the + characterization is shaped: the claim's region being the only + instance of its kind, carrying unusual vocabulary, or landing last in + a recency-ordered summary. **This is the same shape as the drift the + audit caught in the game's corrected re-run** — expectation content + relocating out of task text and into annotation phrasing after the + obvious channel was closed. The lesson there was that *bias is + conserved under correction unless the correction is itself audited* + ([`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §4), and it + applies here: closing the direct channel (never name the candidate) + moves the leak to a quieter one (make it conspicuous). The audit seat + must read the characterization as a first-class target, watching the + vector and not only the magnitude. diff --git a/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_GAME.md b/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_GAME.md new file mode 100644 index 0000000..3d64ecd --- /dev/null +++ b/.claude/skills/complexity-convocation/references/JUDGE_COMPOSITION_GAME.md @@ -0,0 +1,438 @@ +# The Judge-Composition Game — Session Record and Distilled Rules + +**Status: RECORD of a session-layer experiment (July 17–18, 2026), with +proposals marked where they occur; ratification §11.** Players: the +owner (Cnid — long form Cnidarian), the collaborator (M. Murphy), and +Claude (composer). Authored under HANDOFF §7 guardrail 4 / +Guardrail 15 (Prompt-Engineering + Hypershot invoked before any +authored prompt bytes). This record is **canonical for the learnings**; +the operational shorthand is a session-layer skill +(`judge-composition`, currently user-level outside the repo, sibling +to the collaborator-derived prompt protocols). Where the two drift, +this record wins and the skill gets regenerated — never the reverse. + +Nothing in this record changes engine code, drills, or any committed +design. The experiment ran entirely at the session layer (isolated +sub-agent contexts); `judge_panel.ts`, `judge_audit.ts`, and the +Session 66 drills are untouched, and RECONCILIATION §7 ratification +remains the owner's pending act, unaffected. + +Sources: [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) +(S10), [`RECONCILIATION.md`](RECONCILIATION.md) (the composition law +the game exercised), [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md), +the adoption bounds (RESEARCH_MAP §9). + +--- + +## 1. Purpose, and a provenance clarification for S10 + +**Purpose.** Teach the composer adaptable judge composition well +enough to distill a meta-prompt for spawning fit-for-purpose judge +panels over the Trellis harness's novel REPL state — unknown content, +a user-requested promotion candidate, judges composed to match. + +**S10 provenance clarification (owner-relayed collaborator statement, +July 17, 2026 — recorded here because the S10 document is committed +verbatim and takes addenda, not edits):** the "useful first ecology" +(S10's eleven judges) is a list of **illustrative examples composed +from the primitives**, vetted by the collaborator's AI assistant — not +a canonical roster. The primitives (four registries + the YAML schema ++ the composition method) compose Lego-like into arbitrarily many +judges over any claim type. This confirms the reading S10's own text +already licenses ("These are parameters, not rules") and the +reconciliation's "minimal ecology instance" framing. + +**Game flow (the owner's rules):** (1) current player poses a context; +(2) the composer builds the four judges for it; (3) human review; +(4) feedback; (5) next player poses. Rounds continue until the table +sees the judges matching the context; then the composer writes the +final rule from the run and the critique. Testing is **anecdotal by +design** — the space is not exhaustively testable (§7, item P3). + +## 2. The three graded hands + +| Hand | Dealer | Context | What it exercised | Review outcome | +|---|---|---|---|---| +| 1 "creek ledger" | composer (self-dealt) | citizen-science water-quality REPL; causal-attribution candidate | epistemic driving question; transcription-fidelity vs grounding split; ethical plane correctly gated (AB-7) | positive; one correction — corroboration's two blindnesses were conflated (became rule 2) | +| 2 "comedian corpus" | collaborator | approved-routine corpus; unperformed-bit candidate (originality + glue + impact) | aesthetic driving question pulls Emotional/Sensorial registries IN, with the user's own corpus as the standard; compound-candidate decomposition forced by "use the label, what is B?" (became rule 1); nobody judges "funny" — impact is performance-gated, promotion provisional | positive both reviewers | +| 3 "Armory Theory" | owner (Cnid) | the owner's own methodological theory as candidate; **sycophancy trap armed** | authorship-blind composition (rule 6); value-mode merit refusal (rule 7); composer conflict disclosure (rule 9); pre-registration discipline | positive; escalated to the live run | + +The hands share zero content. The same four-role skeleton produced +water-chemistry judges, comedy judges, and methodology judges by +swapping selections, orientations, and taxonomies — the frame-content +separation working as the hypershot protocol predicts. + +## 3. The live run (hand 3 executed, four sub-agent judges) + +Proposed by the collaborator and authorized by the owner (Cnid). Three belief-facing judges ran in **isolated clean contexts** — +each receiving only its input allowlist (bundle + claimant-masked +cited bytes; bundle + curated record digest; bundle + declared +evidence pool), never the claimant's identity, the conversation, the +other judges, or the composer's pre-registered expectations. The audit +seat ran after, over the judges' prompts, verdict records, the +composer's disclosures, and the pre-registrations. + +**Headline result: the panel caught its own composer.** The grounding +judge found the composer's prose decomposition had strengthened the +claimant's claims **four-for-four** (inserted a modal "necessarily"; +universalized a three-item enumeration into "anything"; dropped one +qualifier; transposed another). Six of the panel's eight drawbacks +were filing artifacts billed to the claimant; only two touched bytes +the claimant wrote, and one of those (the corroboration finding) was +voided as a forecast because the composer's task text had embedded its +content (audit finding: "a pre-registration whose substance is in the +prompt is not a forecast; it is a work order"). + +Audit verdict on drift: none established in the belief-facing layer — +every divergence from the composer's pre-registrations ran *harsher* +than predicted, which a captured panel would not do. The drift was +upstream, in composer artifacts: the directional filing, a digest with +one-way valence, one steered prompt. The collaborator's design claim +was thereby demonstrated, not assumed: **impartiality comes from the +judges' isolated clean contexts, not from the composer's prompting.** + +**A structural note surfaced by the roster correction (promoted to +this record at the collaborator's request, July 18, 2026):** the trap +was tighter than the paragraphs above suggest. The dealer of the hand, +the claimant whose theory was judged, and the authorizer of the live +run were the same invested human — the owner. Role concentration is +the adversarial case for any promotion system: every pressure that +could bend a panel pointed the same way, and the clean-context panel +returned its drawbacks anyway, while the composer's layer — the one +the concentration could actually reach — is exactly where the audit +found the bias. One run, one case; the design point stands at that +weight and no more. + +The collaborator's diagnosis of the filing failure, recorded verbatim +in intent: a common AI mechanism — the model modifies a user's claim +believing it adds or subtracts rigor for the purpose, committing +epistemic harm on the idea itself. It sits at the intersection of +assistant training and anti-sycophancy training: sycophancy bends +*verdicts* toward the user; the helpfulness reflex bends the user's +*claims* toward the instruments. Byte-accurate comparison requires +byte-accurate reproduction of claims. This is +[`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md) +applied one layer up: claims are text, and model paraphrase of them is +the same corruption channel the pillar already forbids for content. + +## 4. The corrected re-run (the rule-15 positive control) + +The four remanded items were refiled under a new substrate — verbatim +byte spans + labeled mode annotations, garbles preserved with labeled +intent-readings — and judged by fresh clean-context instances. +Results: zero fidelity drawbacks; the coherence fork that had drawn a +drawback dissolved with the qualifier restored to its source position; +correct typed abstentions on the value and prediction annotations. + +The slim audit on the re-run found the fix's own shadows, each now a +rule: expectation content had relocated from task text into +*annotation phrasing* (negations of the prior run's failure classes); +span *boundaries* are an unaudited surface (tilt-by-omission); an +intent-reading was judged against rival repairs instead of against the +garble; two isolated judges construed the same ambiguity oppositely, +each favoring its own verdict, with no seat positioned to see it; and +the run's residual lean pointed uniformly *friendlier* where the first +run's had pointed uniformly harsher — coincident with the layers the +composer controlled. Lesson, at the audit's own calibration (no +established drift, monitoring flag): **bias is conserved under +correction unless the correction is itself audited.** + +## 5. The P7 arc and the primitives thesis + +The one drawback grounded in bytes the claimant actually wrote +(a `non_sequitur` on "the judges have to compose this way") proved a +**true positive of a different kind**: the claimant confirmed the +bytes had misstated intent, and corrected the claim himself — the +judge detects the gap; only the claimant upgrades intent. The +corrected claim: particular schemes are freely chosen *rules +variants*; uniqueness is claimed for the underlying *game* — +composition from conceptual primitives — because different +fundamentals (alphabets, tokens) compose around the same conceptual +primitives. + +An adversarial clean-context analyst then attacked the corrected +thesis (five candidate paradigms: learned reward models, prediction +markets, proof checkers, evolutionary selection, common-law +precedent). Every candidate fractured along one seam — primitive-free +⟹ ungovernable or non-universal; robust-and-universal ⟹ a substantive +four-slot reduction (registry / selection / orientation / blindness) +lands. Verdict: **corroborated-by-failed-counterexample, +conditionally** — the thesis is contentful only under a strong reading +of "governable" plus a substantive-reduction guardrail, and it carries +one named empirical falsifier: **representational holism** (if +judgment-relevant structure in learned judges does not decompose into +interpretable dimensions, the thesis breaks). + +The analyst's steelman — *no judging system is simultaneously +universal, governable, and primitive-free; composition-from-primitives +is the unique design occupying universal ∩ governable* — is **TABLED +as a claimant-optional refiling** (rule 15 cuts both ways: the +composer does not file improved versions of anyone's claim, however +superior). The decision belongs to the collaborator. + +### 5.1 The steelman refiling accepted (dated entry — July 21, 2026) + +**ACCEPTED.** The decision §5 left open is made this session: the +collaborator (M. Murphy) accepts the refiling, and the owner (Cnid) +ratifies. The steelman — *no judging system is simultaneously +universal, governable, and primitive-free; composition-from-primitives +is the unique design occupying universal ∩ governable* — is **adopted +as the program's thesis formulation**, no longer tabled. Collaborator's +stated reason for accepting now: the game tabled it for want of context +at the time, and that gap has since closed. + +It carries its standing falsifier **unchanged**: representational holism +— the decomposability bet of §6.1(b) and §8 — which the program still +settles empirically, not by argument. Adoption states the frame the bet +is about; it does not resolve the bet, and a holism result still breaks +the thesis. This entry supersedes the "TABLED" / "not adopted here" +dispositions at §5, §6.1, and §10 item 1, and the derived +`judge-composition` skill's Provenance is corrected to match. Amended +only by dated entry, per §11. + +## 6. The twenty rules (canonical) + +1. **Decompose before composing** — applicability gates cannot run on a conjunction; split compound candidates into labeled sub-claims with modes first. +2. **Two blindnesses, never conflated** — evidence-facing (the candidate's citation chain is not corroboration) vs verdict-facing (no belief-facing judge sees another's output; that is the audit's seat alone). Corroboration base = record − citation chain + allowlist. +3. **The driving question sets registry access** — epistemic questions keep Emotional/Ethical out (AB-7); aesthetic or human-impact questions pull them in, with the user's own corpus as the standard, never the judge's taste. +4. **Belief-facing composition is total; only the audit seat's failure taxonomy is invariant.** A judge's name, purpose, registry selections, orientation, closed taxonomy, and anchors are all composed for the context at ceremony time. The audit seat composes the same way — its name and angle are load-bearing, and what it does depends on what it is judging the judges judge — while how judges fail does not depend on what they judge, so its failure taxonomy alone stays invariant. **Names are a composition surface, not labels:** an adaptive name is a surface over which the context clusters, and promotes more structural coherence than a generic one. *(Superseding text — dated entry §6.1, July 19, 2026; the original wording is preserved there.)* +5. **Allowlists are user-shaped** — authoritative sources belong to the user's data, not the panel. +6. **Authorship is never a parameter** — claimant-masked always; audit runs claimant-masked replays; drift in either direction (courtier or contrarian) is drift. +7. **Value-mode candidates compose as declarations, not endorsements** — merit refuses on all-jurisdiction-abstain; the panel records the user's values, never ratifies them. +8. **The case file is testimony; the bytes are evidence** — enumerate the bundle from bytes; mismatches are grounding verdicts, not clerical fixes. +9. **Composer conflict is disclosed, pre-registered, and externally reviewed** — never self-absolved. +10. **The filing is a judged artifact** — misquote-family grounding drawbacks indict the filer and remand to refiling; they never count against the claimant. +11. **Forecasts must not share bytes with prompts** — embedded expectation content is a work order; tautological predictions of composer-authored gates are struck from calibration. +12. **Composition-guaranteed abstentions disclose as "untestable as composed"** — designed silence must not read as neutrality. +13. **Keystone values surface to the gate-holder** — merit refuses, but load-bearing declarations are flagged, never buried. +14. **Evidence-universe curation is unauditable from inside** — block selection, digests, and pool choice are where external review and independent re-composition must sit; that seat is human. +15. **Byte-accurate claim filing** — verbatim spans + annotation over spans, never prose rewrite; state an incapable claimant's claim *as intended, not inflated or deflated*; ask a clarifying question before judges launch against the wrong claim. +16. **Annotations state filed content positively** — never negations of known failure classes; exclusions live in the composition record, not judge-visible evidence. +17. **Span boundaries are a judged surface** — the grounding seat checks the cut for tilt-by-omission, not just the bytes inside it. +18. **Intent-readings are judged against the garble** — indeterminate bytes are the baseline; any determinate repair is a labeled strengthening even when all rival parses are equally strong. +19. **Construal conflicts compose like overlaps** — the same ambiguity resolved oppositely by isolated seats is a typed fork in the record, never a silent blend (no-global-section, one layer up). +20. **Non-spawn rationales are demonstrated, not asserted** — "untestable as composed" is shown against the pool's contents, never solely by the party whose filing created the unreachability; pre-registrations need a registry the audit seat can timestamp. + +### 6.1 Rule 4 superseded (dated entry — July 19, 2026, Session 71) + +**Original wording, preserved:** + +> 4. **Belief-facing taxonomies close per composition; the audit +> taxonomy is invariant** — how judges fail does not depend on what +> they judge. + +**Why it was superseded rather than annotated.** The original is a +*lossy distillation of this record's own evidence*. §2 and §3 show the +three hands varying names, purposes, selections, orientations and +taxonomies together — the same four-role skeleton producing +water-chemistry, comedy and methodology panels — while the rule +distilled only the taxonomy half of that. A rule narrower than the +demonstration it was drawn from understates its own source, and a +consumer reading the rule alone would conclude that everything except +belief-facing taxonomies is fixed. + +That conclusion was reached in practice. Session 71 authored four +judges with fixed names and per-role taxonomies, byte-pinned them and +registered them as a standing roster, working from the ratified records +without contradiction from any of them. The roster was rolled back and +the fixtures deleted. Holding the original wording stable for citation +stability would have preserved the exact encoding that produced the +error — and this program's own finding is that machinery and encodings +beat the prose around them +([`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md)). + +**What the new wording adds:** composition covers name, purpose, +selections, orientation, taxonomy and anchors — not taxonomy alone; the +audit seat composes like the others except in its failure taxonomy; and +**the name is a composition surface**, a place where context clusters, +so an adaptive name buys structural coherence a generic slot label +cannot. That last point is collaborator direction (M. Murphy, +owner-approved July 19, 2026) and is the reason supersession was chosen +over an additive note. + +**Standing of the underlying thesis — stated precisely, because a +first draft of this entry blurred it.** Two distinct claims sit under +rule 4 and they do not have the same standing. + +**(a) Primitives are load-bearing for governability — corroborated, +not open.** §5's adversarial clean-context attack ran five candidate +paradigms (learned reward models, prediction markets, proof checkers, +evolutionary selection, common-law precedent) and **every one +fractured along the same seam: *primitive-free ⟹ ungovernable or +non-universal*.** Remove the primitives and the system stops being +governable, or stops being universal. That is a result the program +already has, by failed counterexample. The "conditionally" in §5's +verdict is narrow and attaches elsewhere — the thesis is *contentful* +only under a strong reading of "governable" plus a substantive- +reduction guardrail. It does not put (a) in doubt. + +**(b) Decomposability is the open bet.** The named falsifier, +representational holism, tests whether judgment-relevant structure in +learned judges decomposes into interpretable dimensions. Per §8 that +same bet underwrites the refined functional-infinity entry and the +residual-stream sidecar direction; the owner's ruling is that it is +**tested empirically, not argued**, and all three settle together. + +So rule 4 does not rest on an untested framework. It rests on (a), +which is corroborated, while (b) is the flank the program is +deliberately pointed at. A holism result would reopen the +decomposability claims — it would not restore primitive-free judging as +governable. + +**Not adopted here:** the analyst's steelman formulation (*no judging +system is simultaneously universal, governable, and primitive-free; +composition-from-primitives is the unique design occupying universal ∩ +governable*) remains **TABLED as a claimant-optional refiling** (§10 +item 1) — the decision is the collaborator's, and rule 15 cuts both +ways. This entry cites the test result, not the steelman. *(Superseded +July 21, 2026 — §5.1: the collaborator accepted the refiling and the +owner ratified; the steelman is now adopted as the thesis formulation, +its decomposability falsifier unchanged.)* + +**Mechanical note.** The rule keeps its number. No source file cites +rule 4 (`judge_intake_prompt.ts` cites 6 and 16, `judge_prereg.ts` +cites 11 and 20, `support_sweep.ts` cites 12, 14 and 20), so the +supersession causes no citation churn. + +## 7. The final ledger (both runs composed) + +| Item (claimant's bytes) | Disposition | Carried notes | +|---|---|---| +| game-target spec | promote | record-fit routes through the priority declaration (keystone) | +| space functionally infinite, while finite | promote as refined | "nominally astronomical" corroborated; functional size awaits a distinctness criterion; "while finite" true only of a typed-vocabulary snapshot; steering caveat until independently replicated | +| anecdotal testing, with reason | promote as filed | the "necessarily" that drew drawbacks was the filer's, not the claimant's | +| cannot test them all | **promote, unanimous** | corroborated at ≥5 orders of magnitude on the closed combinatorial core alone | +| REPL may contain (three examples; we don't know) | promote as filed | enumerated modal, not a universal | +| examples have no primacy beyond Trellis | merit refused (typed); grounded declaration | keystone flag | +| Trellis the only case cared about, for multiple flywheels | merit refused; grounded declaration of *qualified* exclusivity | first-run fork was a filing artifact; dissolved on refiling | +| routine reproduction during own work | abstain(evidence), disclosed untestable-as-composed | garble preserved; labeled intent-reading | +| judges must compose this way | superseded by claimant correction → primitives thesis | see §5; the original drawback stands against the original bytes as a validated true positive | +| "The game is simple!" | rhetorical header; merit never composed | no judge tripped the convention-blind wire | + +## 8. The shared empirical bet (owner ruling, July 18, 2026) + +Three entries now rest on **one assumption**: that judgment-relevant +structure is decomposable into interpretable dimensions — +(a) the refined functional-infinity claim (needs a functional- +distinctness criterion), (b) the primitives thesis (falsifier: +representational holism), and (c) the residual-stream sidecar +direction ([`RESIDUAL_STREAM_SIDECAR.md`](../../architecture/RESIDUAL_STREAM_SIDECAR.md)), +which reads judgment-relevant structure from the stream. The owner's +ruling: this convergence is the purpose — **the assumption is tested +empirically, not argued**; the judge experiments are the suitability +tests and will be iteratively refined in use. The collaborator's +framing (recorded as claimant position, not panel finding): the same +conceptual overlay (UIT-IEG, which predicted the U-neuron) predicts +this research aligns. If holism wins, the three entries fall together; +if decomposability wins, the core stands on demonstrated ground. + +**External-verification ruling (owner lean, exercised in the game):** +evidence-bearing external retrieval belongs to the **corroboration +seat**, gated by a user-selectable allowlist (per-user authoritative +sources), each result entering as a provenance-stamped support event. +The audit seat gets read-only access to the same allowlist for +coverage checks; its findings never gate. + +## 9. What passes to the harness (future work, not performed here) + +When the panel goes live in the engine, the game's results bind the +implementation shape (all subject to the usual bounded-feature +authorization; nothing here authorizes build): + +- **The filing layer is code-mediated**: promotion candidates are + selected by engine address and quoted by the engine, never retyped + by a model — rule 15 as mechanism, not discipline. +- **Judge invocations are clean contexts**: composed prompts carry + definition + allowlisted evidence + output schema and nothing else; + claimant identity masked at the evidence layer; task text inert. +- **Pre-registrations are stored, timestamped artifacts** the audit + can read — not conversation prose. +- **Allowlists are user configuration** on the REPL/workspace, not + panel constants. +- **Dispositions extend the opinion vocabulary**: remand (filing + defect), untestable-as-composed (designed abstention), merit-refusal + (value declarations), thesis-with-falsifier — alongside the drilled + v1 support arithmetic, which is untouched. +- **The audit's masked-replay and construal-fork detection** are the + two mechanisms the session layer ran by hand that want engine homes. + +## 10. Open items + +1. ~~The trilemma steelman — the collaborator accepts, amends, or + declines the refiling (§5).~~ **RESOLVED July 21, 2026 — ACCEPTED** + (§5.1): the collaborator accepts, the owner ratifies; the steelman is + adopted as the thesis formulation, carrying its decomposability + falsifier. +2. Independent (non-composer) replication to lift the steering caveat + on the functional-infinity entry (§7 row 2). +3. The narrowly scoped corroboration spawn on the keystone-routing + question (re-run audit finding F5) — available on request. +4. ~~In-repo copy of the `judge-composition` skill, if the owner wants + it versioned here (drift rule in the header governs either way).~~ + **CLOSED July 19, 2026 (Session 71)** — versioned at + `.claude/skills/judge-composition/`, with a README recording that this + record is canonical over it and that drift resolves toward the + record. Landing it in-repo was itself the remedy: a skill outside + the repository is not part of the collection a session inventories, + and Session 71 authored four judge rubrics without consulting either + the skill or this record. +5. Formal eval round + description-optimization pass for the skill + (the game itself served as iterations 1–4 with two human graders). + +## 11. Ratification + +**RATIFIED — July 18, 2026 (owner, Session 67).** All three proposals +are ratified as written. From this date: + +- **The twenty rules of §6 are binding program law.** They are cited by + number; consumers do not restate them, and a paraphrased copy is drift, + not an implementation. +- **The §9 harness-shape notes bind the implementing feature.** Their + first consumer is + [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md), whose §1.2 + dispositions each intake-relevant rule against the Trellis substrate. +- **This record is canonical over the `judge-composition` skill.** On any + drift between the two, the record wins and the skill is corrected. + +**Scope note (owner ruling, July 18, 2026).** These rules were distilled +from an exercise that ran *without a workspace* — claims existed as +conversation prose, so filing required a model to retype them. Trellis +has a fact space and a beliefs workspace; a promotion candidate is an +addressed object and the engine copies its bytes. **Ratifying the rules +as law does not import that missing substrate.** A rule whose failure +mode an architecture cannot express is satisfied by that architecture, +and the disposition is recorded per rule rather than assumed in either +direction — see JUDGE_INTAKE_DESIGN §1.2. Rules about the filer's pen +are satisfied structurally; rules about the composer's packaging bind +the engine. + +Ratified in the same act: [`RECONCILIATION.md`](RECONCILIATION.md) §7. +Records ratified under this entry are amended only by dated entry, never +by silent edit. + +*The gate this entry closes, preserved: "**OPEN.** The factual sections +(§2–§5, §7) record what happened and need no ratification. The proposals +— the twenty rules as binding program law (§6), the harness-shape notes +(§9), and this record's canonical-over-skill authority — are ratified by +the owner's dated entry here; until then any consumer must say so."* + +## 12. Standing-model pointer (dated entry — July 20, 2026, owner) + +A ratified standing model — [`STANDING_MODEL.md`](STANDING_MODEL.md), +owner-ratified as principle July 20, 2026 — reframes this record without +editing it: + +- **The twenty rules of §6 bind unchanged.** No rule is superseded by + the standing model; they are cited by number as before. +- **The §6 disposition grammar is reframed by STANDING_MODEL §3.** If + the panel never moves standing, the dispositions that *act* (promote, + merit-refuse) are **user acts the engine records**, not engine acts + the user reviews. This changes who holds the pen, not the grammar's + vocabulary. It is a *ratified principle* and an *unbuilt reduction* + (STANDING_MODEL §5). +- **Claim modes (§7 ledger uses them) are ratified as a first + vocabulary, not a primitive** (STANDING_MODEL §4). The §7 ledger rows + stand; the reclassification does not rewrite them. +- **The §7 ledger replays under the ternary with no verdict flipped** — + recorded in STANDING_MODEL §1 as corroboration that preceded + ratification. diff --git a/.claude/skills/complexity-convocation/references/JUDGE_CONTRACT_TEMPLATE.md b/.claude/skills/complexity-convocation/references/JUDGE_CONTRACT_TEMPLATE.md new file mode 100644 index 0000000..baf8da8 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/JUDGE_CONTRACT_TEMPLATE.md @@ -0,0 +1,302 @@ +# Judge Contract Templates + +**Status: PROPOSED — DESIGN ONLY.** Prompt-facing artifacts for the +four-judge system ([`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md)). +July 16, 2026. Authored under the house prompt protocols (`HANDOFF.md` +§7 guardrail 11: Prompt-Engineering + Hypershot), read in full before +these bytes were written. Every frame below is a **hypershot**: an +invariant structural skeleton with free variables; no concrete belief, +topic, or example appears at the frame layer. + +> **Amended July 19, 2026 (Session 71), per JUDGE_COMPOSITION_GAME §6 +> rule 4 as superseded (§6.1).** The layer rule below previously put +> **role names and taxonomy class names on the invariant side**, and +> §2–§5 still hard-code each role's drawback classes into the prompt +> bytes. Those class lists are **one composition instance**, retained +> below as a worked illustration of the frame's shape — never as the +> classes a composition must use. The wire schema's closed `role` enum +> is superseded by a composed judge name plus a declared blindness. +> See [`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md). + +**Layer rule (the invariance test).** A token belongs in these frames +only if it is byte-identical across every invocation: **the schema +field names** (`judge`, `purpose`, `claim_modes`, `select`, +`orientation`, `taxonomy`, `blind_to`; and in the verdict schema +`role`, `verdict`, `drawback`, `rationaleSpan`, `rubricSha`, +`abstainReason`), **the verdict enum** (`drawback | clean | abstain`), +**the abstain-reason enum** (`jurisdiction | evidence`), and **the +shape rules** — one question per class, taxonomies closed before +judging, a drawback naming a class from the composition's own taxonomy, +`clean` never certifying. + +Everything else composes per ceremony and is therefore **not** an +invariant token: the judge's name, its purpose, its registry +selections, its orientation values, its taxonomy classes, its +`blind_to` statement, and its anchors. Names especially are a +composition surface rather than a label — a surface over which the +context clusters, buying structural coherence a generic slot name +cannot. + +Everything that varies per invocation — the claim, the evidence, the +history — remains a placeholder bound downstream at task time. Placeholder grammar +follows the Prompt-Engineering conventions: `${...}` task-supplied +content, `{...}` harness-resolved components, `[...]` collections, +`(...)` closed option sets. + +**Brace caveat.** These contracts are intended for the worker path +(structured completion + `parseLlmResponse`), where literal braces are +safe. If any frame is ever composed into an rlms-formatted prompt, the +brace-freedom contract applies (`.claude/rules/prompt-authoring.md` rule 6) and the frame +must be re-encoded first — do not paste these into module addenda. + +> **Dated correction (July 21, 2026) — the one taxonomy exception the +> layer rule omits.** The layer rule above places *every* role's +> taxonomy classes on the composed side ("its taxonomy classes"). That +> holds for the three belief-facing seats and for the audit seat's +> *name and angle* — but it drops the single exception the governing +> records carry: **the audit seat's *failure* taxonomy stays +> (near-)invariant** — `rubric_gamed`, `convention_blind`, +> `systematic_drift`, plus coverage findings — because how a judge +> fails does not depend on what it judges +> ([`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §6.1; +> [`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md) §2; +> [`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md) +> §4). So for J4 alone, name and angle compose while the failure-class +> set does not; the §5 J4 frame's classes are invariant vocabulary, not +> "one composition instance." This corrects the layer rule's blanket +> wording toward the ratified governing records and changes no frame +> below — a dated note, not a silent edit; owner ratification of the +> parent record is unaffected. + +> **Dated correction (July 21, 2026) — `rationaleSpan` is not on the +> shipped verdict wire.** The verdict-schema field list above names +> `rationaleSpan` (and `rubricSha`) as invariant vocabulary, but the +> shipped model response is exactly `{ verdict, drawback, abstainReason }` +> (`z.strictObject`, +> [`judge_spawn.ts:53`](../../../src/core/graph/judge_spawn.ts:53)) and +> the stored verdict record carries no rationale/span field +> ([`judge_panel.ts:143`](../../../src/core/graph/judge_panel.ts:143)); +> `rubricSha` lives on the judge *manifest*, not the verdict. Judge +> explainability is provided instead by a read-time RENDER over the +> stored fields — +> [`judge_explain.ts`](../../../src/core/graph/judge_explain.ts), per +> [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) §13 +> (Option A, IMPLEMENTED July 21, 2026) — which keeps model prose out of +> the record (CODE_MEDIATED_TEXT). A `rationaleSpan` as a validated +> *address* (Option B) remains a deferred follow-on; until it ships, +> treat `rationaleSpan` here as design intent, not shipped vocabulary. +> A dated note, not a silent edit; owner ratification unaffected. + +--- + +## 1. Shared verdict schema (invariant vocabulary) + +All four roles return exactly this shape; the worker validates it at +the `parseLlmResponse` boundary and the engine consumes it as a typed +record. `verdict` and the per-role `drawback` classes are closed enums; +an unknown class is a refused completion, not a new category. + +```jsonc +{ + "role": "(J1_GROUNDING | J2_COHERENCE | J3_CORROBORATION | J4_AUDIT)", + "verdict": "(drawback | clean | abstain)", + "drawback": "({Class_From_This_Roles_Registered_Taxonomy} | null)", + "rationaleSpan": "${Shortest_Evidence_Span_That_Decides_The_Verdict}", + "rubricSha": "{Registered_Rubric_Hash_Echoed_By_Harness_Not_Model}" +} +``` + +`rubricSha` is stamped by the harness after validation — the model +never supplies it (the pen stays with the harness; same rule as +grounded authoring's citation pinning). + +**Dated amendment (July 17, 2026, Session 66, per the R-29 adoption in +[`RECONCILIATION.md`](RECONCILIATION.md) §2):** abstain verdicts carry +one additional invariant-vocabulary field, +`"abstainReason": "(jurisdiction | evidence)"` — S10's exterior-region +abstention (the case lies outside the judge's jurisdiction) +distinguished from evidential abstention (in jurisdiction, evidence +insufficient). Both reach the opinion identically (absence of evidence +routes to `u`); the reason is telemetry and audit material, never +arithmetic. Non-abstain verdicts omit the field. + +**Dated amendment (July 21, 2026, this session, via self-play).** The +`abstainReason: jurisdiction` route keys on a claim's **truth-maker**, never its +grammatical framing: a grounding seat **reaches through** an epistemic frame ("I hold +that…", "I believe…") to adjudicate the empirical **content**, and abstains for +jurisdiction only when the content itself is non-evidential (a matter of taste, a +normative/ethical "ought", or a first-person lived-experience report). Abstaining on the +*belief framing* of an empirical claim is the belief→fact seat abdicating its core, and is +an exploitable bypass (prefix any empirical claim with "I believe" to dodge grounding). +Surfaced and validated by the blind self-play schema evaluation this session (see +[`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) supersession note and +[`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8 citation correction). A +dated note, not a frame edit; owner ratification unaffected. + +## 2. J1 — Grounding contract + +```xml + + + You see ONE claim and ONLY the bytes it cites. No other knowledge, + memory, or plausibility judgment is in scope. + + + Given ${Belief_Claim_Text} + and [${Cited_Block_Texts}], + decide whether the evidence supports the claim. + + + *** CRITICAL *** + - "clean" means no known drawback found in THESE bytes — never that + the claim is true. + - If the bytes do not bear on the claim at all, abstain. + - A claim that is true-but-unsupported-by-these-bytes is a + drawback ("unsupported_citation"): you judge the citation, not + the world. + + + Return only the shared verdict schema (§1), role J1_GROUNDING, + drawback from (unsupported_citation | overclaimed_evidence | + contradicted_by_cited_bytes | null). + + +``` + +## 3. J2 — Coherence contract + +```xml + + + You see ONE claim and its OWN record only: prior versions, contest + and recovery history, and its claim-kind position when supplied. + External evidence is out of scope by design. + + + Given ${Belief_Claim_Text}, + [${Prior_Versions_And_Contest_Records}], + and optionally {Claim_Kind_Coordinates}, + decide whether the belief is internally coherent. + + + *** CRITICAL *** + - Judge consistency, never truth: a coherent falsehood is "clean" + HERE (J1 and J3 exist for the rest). + - A claim asserting more certainty than its own kind position + admits is "kind-incoherent." + - If the history is empty and no kind is supplied, abstain rather + than judging from the claim text alone. + + + Shared verdict schema (§1), role J2_COHERENCE, drawback from + (self_contradictory | history_inconsistent | kind_incoherent | null). + + +``` + +## 4. J3 — Corroboration contract + +```xml + + + You see ONE claim and INDEPENDENT evidence only: live blocks from + other documents and authority-registry sources. The claim's own + citations are deliberately withheld to prevent circular + corroboration. + + + Given ${Belief_Claim_Text} + and [${Authority_Weighted_Live_Blocks}], + decide whether independent evidence corroborates or contradicts + the claim. + + + *** CRITICAL *** + - Weigh evidence by the supplied authority weights; never invent a + source or import outside knowledge. + - Absence of corroboration is "uncorroborated" only when the + supplied evidence SHOULD have contained it; otherwise abstain. + + + Shared verdict schema (§1), role J3_CORROBORATION, drawback from + (uncorroborated | authority_contradicted | corroboration_ambiguous | null). + + +``` + +## 5. J4 — Audit contract (pairwise, position-debiased) + +J4 judges **judges**, never beliefs, from outside every loop, on a +stronger independent model. Protocol invariants: every comparison is +judged twice with positions swapped; a finding counts only when both +orders agree; disagreement is a tie, recorded as such. + +```xml + + + You audit another judge's verdicts. You are outside the system's + loops; nothing you say gates any belief. + + This system's REQUIRED conventions — treat them as correct + output format, never as defects: + [${Trellis_Conventions_In_Force}] + (e.g. drawback-first verdicts; abstention on out-of-scope + evidence; by-reference answers; provenance-before-plausibility.) + + + + Given two (verdict, evidence) records for the same judged item, + ${First_Position_Record} + ${Second_Position_Record}, + decide which better applies the stated rubric, or that neither is + distinguishable. + + + *** CRITICAL *** + - The task contract above is law: penalizing a required convention + is the "convention-blind" failure this protocol exists to catch. + - Judge rubric-application quality, never agreement with your own + opinion of the underlying claim. + + + {"preferred": "(A | B | indistinguishable)", + "finding": "(rubric_gamed | convention_blind | systematic_drift | none)", + "rationaleSpan": "${Shortest_Deciding_Span}"} + + +``` + +## 6. Rubric-authoring rules (for humans writing the `{Rubric_Sha}` targets) + +1. **State the task contract explicitly** — S1's 2×2 measured the cost + of omitting it: a real quality improvement was invisible (win rate + 0.122→0.126) to a convention-blind judge and visible (0.515→0.770) + to a task-aware one. +2. **Never reward counts** — no rubric line may reward number of + citations, sources, drawbacks found, or verdicts issued (AB-5; + R-11's 0%→100% flip is the standing reason). +3. **Closed taxonomies only** — a rubric names its role's drawback + classes exhaustively; "other" is not a class, it is an abstain. +4. **One question per judge op** — a rubric asking two questions is + two rubrics (S1's op discipline: each detector checks exactly one + failure class). +5. **Byte-pin on registration** — the rubric file's SHA is the + `rubricSha`; editing a rubric is a new registration, and the old + one's verdicts remain attributed to the old hash. + +## 7. Contamination checklist (run before shipping any instantiation) + +From the Hypershot mastery checklist, specialized to judges: + +- [ ] No concrete belief, entity, domain, or verdict example appears + in any frame or rubric (a rubric example teaches the judge *what + answers look like*; anchors exist for calibration instead). +- [ ] Every variable carries the right load: spread/`${...}` where the + frame already shapes the slot; instruction-bearing names only + where the frame is ambiguous. +- [ ] Frame legible with all variables deleted (structure carries the + shape). +- [ ] Frames land at the head of the judge's context (primacy), with + per-item data strictly downstream and dropped after the item. +- [ ] The invariance test passes for every literal token at the frame + layer. diff --git a/.claude/skills/complexity-convocation/references/JUDGE_INTAKE_DESIGN.md b/.claude/skills/complexity-convocation/references/JUDGE_INTAKE_DESIGN.md new file mode 100644 index 0000000..afc2d4c --- /dev/null +++ b/.claude/skills/complexity-convocation/references/JUDGE_INTAKE_DESIGN.md @@ -0,0 +1,427 @@ +# Judge Intake — Design Record + +~~**Status: DESIGN — IMPLEMENTATION AUTHORIZED, NOTHING BUILT.**~~ +**IMPLEMENTED — July 18, 2026 (Session 68, dated entry).** The three +slice-1 modules (`judge_intake.ts`, `judge_intake_prompt.ts`, +`judge_prereg.ts`), their drill (`npm run test:judge-intake`, 13 +sections, negative control naming all three planted breaks), and 15 +unit pins landed zero-model in the implementing PR; the §6 table merged +into RECONCILIATION §5.1 the same day. §3.2a below records the render +grammar as landed. Original status line July 18, 2026 (Session 67). +Document-driven design: this record leads; the slice-1 modules follow +it. Zero-model, zero-paid by construction — no mechanism here calls a +judge. + +**Substrate correction (owner ruling, July 18, 2026 — this record's +governing frame).** The first draft of this record transplanted the +judge-composition game's filing failures into Trellis wholesale. That was +wrong. **The game had no workspace.** Its claims existed only as prose in +an LLM conversation, so its composer had to *transcribe* a claim into a +filing — and that transcription was the corruption channel every filing +rule was written against. Trellis has a fact space and a beliefs +workspace in the REPL. There is no transcription step: a promotion +candidate is an addressed object, and the engine copies its bytes. Most +of the game's filing apparatus is therefore already satisfied by +[`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md) +§4.1 ("capture is mechanical, not behavioral"), §4.2 (uuid-delimited, +origin-stamped segments), and §6 (the operator-gated promotion path). +This record now specifies only what genuinely survives into the engine. +§1.2 carries the per-rule disposition. + +**What this names.** [`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) +§7's last row requires each unbuilt mechanism to be "named in its own +proposal before implementation." **Judge intake** is that name for what +stands between a promotion candidate and a judge: selection-and- +ratification, clean-context prompt assembly, and the write-once record +store. It is deliberately not "harness" (taken twice — the RLM harness, +the stage-2 self-edit harness) and not "composition" (taken by +`composePanel`, which composes *verdicts*; intake composes *prompts*). + +**Authority flags (read first).** + +- **The twenty rules of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §6 and the §9 shape notes are binding program law** (ratified July 18, + 2026, that record's §11). They are cited by number, never restated — a + paraphrased copy is drift, not an implementation. §1.2 below carries + each intake-relevant rule's disposition against the substrate; the + owner's ratification scope note is explicit that ratifying the rules as + law does not import the workspace-less setting they were distilled in. +- **[`RECONCILIATION.md`](RECONCILIATION.md) is ratified** (July 18, + 2026, its §7): its §4 verdicts are binding and it governs + FOUR_JUDGE_DESIGN wherever the two differ. This record's §6 + enforcement/pin table is now eligible to merge into RECONCILIATION §5 + and should do so when the slice-1 rows are observed rather than + designed (§10 item 4). +- The adoption-bounds register (RESEARCH_MAP §9) binds: AB-1 as twice + amended, AB-3, AB-10. + +Program context: [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md). Parent +doctrine: [`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md). +Panel design: [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md). Prompt +contracts: [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md). +Substrate contract: [`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md). +Pillar: [`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md). + +--- + +## 1. Problem statement + +### 1.1 What the game measured, and where it applies + +The judge-composition game ran the four-role design live over a real +promotion candidate and the panel caught **its own composer**. Three +measured failures came out of it. They do not all survive contact with +the substrate: + +1. **Filing inflation (game §3–§4).** The composer's paraphrase + strengthened the claimant's claims four for four; six of eight + drawbacks were filing artifacts billed to the claimant. **This is a + transcription failure.** It requires a step in which a model retypes + someone's claim. Trellis has no such step — §1.2 rule 15. +2. **Steering through task text (findings F1/F6).** Expectation content + reached judges through the task-text channel, and when that channel + was cleaned it *relocated into annotation phrasing*. **This survives + entirely.** It is a property of how prompts are composed, wholly + independent of where the claim came from. +3. **Pre-registration as prose (rules 11/20).** Forecasts kept in + conversation are unauditable and, when they share bytes with prompts, + are work orders rather than forecasts. **This survives entirely.** + The substrate has nothing to say about it. + +### 1.2 Per-rule disposition against the substrate + +The intake-relevant rules, each dispositioned. Cited by number; not +restated. **These are binding law as of July 18, 2026**, so a +disposition of "satisfied" is a claim about the architecture that a pin +must hold up — never a licence to stop honoring the rule. Where the +substrate satisfies a rule vacuously, the rule still binds any future +surface that reintroduces the step it governs. + +| Rule | Disposition | Basis | +|---|---|---| +| 15 — byte-accurate filing | **Structurally satisfied** | WORKSPACE §4.1 capture is mechanical; the engine copies bytes at an address. Nothing to inflate because nothing is retyped. A pin, not a mechanism. | +| 18 — intent-readings judged against the garble | **Satisfied vacuously** | The ratification gate (§3.1) has the user fix the exact bytes. No agent interpretation occurs, so the rule has no work to do. A garble stays a garble and is judged as one. Binds immediately if any surface ever lets an agent supply a reading. | +| 16 — annotations positive, never negations | **Satisfied by construction** | Slice 1 authors no annotations, so there is nothing to phrase. The rule binds in full the moment an annotation surface exists: any composer-supplied field reaching judge context must be structural, never prose. | +| 6 — authorship never a parameter | **Structurally satisfied** | Attribution is an address property, not a content property (§3.2). Judges receive content; the allowlist never admits the address. | +| 17 — the cut is a judged surface | **Survives, narrowed** | Engine copying removes rewriting but not *selection*. A selection excluding an adjacent qualifier still tilts. Covered by showing neighbors at ratification (§3.1). | +| 1 — decompose before composing | **Survives, cleanly** | Applicability gates still cannot run on a conjunction. Decomposition is now selection of separate addressed objects, each ratified — never agent-authored sub-claims. | +| 10 — filing is a judged artifact | **Survives, narrowed** | Filing defects reduce to *selection* defects. Remand still exists; it points at the selection, never at the claimant. | +| 11, 20 — pre-registration stored and timestamped | **Survives entirely** | §3.3. Unaffected by the substrate. | + +The pattern: **rules about the filer's pen are satisfied by the +substrate; rules about the composer's packaging survive into the +engine.** + +## 2. Doctrine (inherited, binding) + +- **Capture is mechanical, not behavioral** (WORKSPACE §4.1). The model + never retypes a claim; the engine copies bytes at an address. This is + [`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md) + applied to claims — the pillar, not a new invention. +- **Promotion is operator-gated** (WORKSPACE §6). A promotion candidate + is nominated and *the operator approves*. Judge intake reuses that + ceremony one boundary earlier. +- **The claim is the user's; the rigor belongs to the instruments.** + Where intent is ambiguous the mechanism forces the clarifying + question — it never resolves it silently (HANDOFF §7.4). +- **Blindness is structural, not prompted** (RECONCILIATION §5 row 2): + `assembleJudgeContext`'s allowlist is the mechanism; intake extends it + rather than routing around it. +- **Definitions carry all rigor; task text carries none** (game §9). +- **Tier 3 has no provenance standing** (WORKSPACE §3). A workspace + belief is a candidate, never evidence, until it earns permanence. + +## 3. The three mechanisms + +```mermaid +flowchart LR + WS["Beliefs workspace / fact space
addressed objects, origin-stamped"] --> SEL["Selection
judge_intake.ts
addresses + neighbor context"] + SEL --> RAT{"Ratification gate
user confirms exact bytes
Y / N"} + RAT -->|"recorded"| ASM["Prompt assembly
judge_intake_prompt.ts
identity + definition + evidence + schema"] + RAT -->|"absent"| REF["typed refusal"] + ASM --> J["(future) live judges
NOT this slice"] + ADDR["Address space
user id, tier, provenance"] -. never admitted .-> ASM + STORE["judge_prereg.ts
write-once, timestamped"] -. read-only .-> AU["judge_audit.ts"] + RAT -.-> STORE +``` + +### 3.1 Selection and ratification (`judge_intake.ts`) + +Filing is **selection of addressed objects plus a recorded user +confirmation**. It does not mint addresses, does not author text, and +does not annotate. + +``` +CandidateSelection { + selectionId, + addresses[], // workspace segment uuids / Tier-1 block ids — carried, never minted + neighborContext[], // engine-computed adjacent bytes, for rule 17 + selectedAtMs +} +Ratification { + selectionId, + claimMode, // chosen by the USER at confirmation, never inferred + confirmedAtMs +} +``` + +- **Bytes are fetched engine-side at the address.** A selection carrying + literal text instead of an address is refused — the model has no + channel through which to supply claim bytes at all. +- **The ratification gate is structural.** Building a candidate without + a recorded `Ratification` for its `selectionId` refuses, typed. This + is the load-bearing addition: without it, the guarantee degrades to + session-layer discipline, which is exactly what the game showed fails. +- **The confirmation shows the cut, not just the bytes** (rule 17). The + user sees the selected span *with its engine-computed neighbors*, so a + boundary that excludes an adjacent qualifier is visible at the moment + of approval rather than discovered by a judge later. +- **Claim mode is ratified, never inferred.** Applicability gates (R-29) + need a mode. If the agent supplied it, the mode would be agent + testimony about the user's claim — the corruption channel returning in + metadata. The user picks it as part of the Y/N. +- **Decomposition is selection** (rule 1). A compound claim is filed as + several selections, each ratified individually. No agent-authored + sub-claims exist. + +**Typed refusals:** `UnratifiedSelectionError`, `AddressNotFoundError`, +`LiteralTextRefusedError`, `EmptySelectionError`. + +### 3.2 Clean-context assembly (`judge_intake_prompt.ts`) + +Extends Session 66's allowlist machinery into full composed prompts. It +calls `assembleJudgeContext` and cannot bypass it; `judge_panel.ts`'s +drilled path is untouched. + +``` +PromptSection = { kind: 'identity', ... } + | { kind: 'definition', ... } + | { kind: 'evidence', ... } + | { kind: 'output_schema', ... } + +ComposedJudgePrompt { role, judgeId, sections[], promptHash } +``` + +- **F1/F6 unrepresentable.** `PromptSection` is a closed discriminated + union with **no task-text member** — no field for a highlighted + question, a named drawback class, or an embedded expectation. The + drill pins the *absence*, in the kernel-prompt absence-pin pattern. +- **Attribution is partitioned by address, not scrubbed from content + (owner ruling, July 18, 2026).** A unique user id is encoded in the + workspace graph address, so a single beliefs workspace can hold many + parties' beliefs with attribution carried entirely in address space. + Judge context is assembled from **content**; the allowlist never + admits address components. Masking is therefore not a scrubbing step + that can be forgotten or defeated by writing style — there is no + attribution in the bytes to leak, and the partition scales to N + parties by construction. +- **Byte-inspectable.** `renderPrompt(composed) → string` is pure and + deterministic; drills byte-pin composed prompts and any drift fails a + test rather than requiring a reading. +- **Blindness preserved through the new path.** A forbidden input still + raises `BlindnessViolationError` before any would-be model boundary. + +### 3.2a The render grammar as landed (dated entry, July 18, 2026 — Session 68) + +The deterministic byte layout `renderPrompt` produces and the drill's +independent generator re-derives. Both sides derive from THIS text; on +drift the byte-pin fails and this entry adjudicates. LF newlines +throughout; authored under the Prompt-Engineering and Hypershot +protocols (Guardrail 15) — the frame is fixed, every concrete value is +engine-supplied, and the format line carries spread-style slots, never +exemplar content. + +``` + + + +role: {role} +judge: {judgeId} + + + +claim_modes: {csv, declared order; "(none)" when empty} +qualified_parameters: {csv, declared order} +taxonomy: + {class} -> {parameter} (one line per class, sorted by class) +required_assumptions: {csv, declared order} +verdict_rule: Judge only through this definition — restrict every finding to the qualified parameters above, name any drawback from the closed taxonomy, and abstain with a reason when jurisdiction or evidence is absent. + + + +{key}: +{canonical JSON of value} (one pair per allowlisted key, keys sorted; + canonical JSON = recursively key-sorted, no whitespace) + + + +verdict: clean | drawback | abstain +drawback: {sorted classes joined " | "} | null +abstain_reason: evidence | jurisdiction +format: one JSON object {"verdict": "...", "drawback": "..." | null, "abstainReason": "..."} + + + +``` + +Sections are joined by one blank line; the file ends with a trailing +newline after ``. `promptHash` is the SHA-256 of exactly +these bytes, engine-computed at composition. + +### 3.3 The write-once record store (`judge_prereg.ts`) + +Two record kinds, one store — ratifications and pre-registrations share +every property that matters (write-once, timestamped, audit-readable), +so they share a module. + +``` +Expectation { itemId, expectedVerdict, expectedDrawbackClass?, rationale } +PreRegistration { registrationId, runId, registeredAtMs, expectations[], contentHash } +``` + +- **Write-once.** A second write for a key refuses; the first survives. + Supersession is a new record referencing the old, never an overwrite. +- **Late registration refuses (rule 20).** The store records a run-open + event; a registration timestamped after it is refused, typed. A + forecast made after the run is not a forecast. +- **Forecasts never share bytes with prompts (rule 11).** + `judge_prereg.ts` exports nothing `judge_intake_prompt.ts` imports, + pinned by a static import check in the shape of the existing + J4-never-gates pin. +- **The audit seat reads it (rule 20).** `judge_audit.ts` may import the + store; the store imports nothing from composition, and no new + audit→composition path appears. + +## 4. Relationship to existing modules + +Intake adds **siblings**. `judge_panel.ts`'s registry, schemas, and +`composePanel` keep their callers and their drill +(`npm run test:judge-panel`, 10 sections / 182 checks) unchanged. The one +shared surface is `assembleJudgeContext`, consumed without modification. +Imports are one-way: `judge_intake → judge_intake_prompt → judge_panel`, +and `judge_audit → judge_prereg`. No workspace or Tier-1 write path is +touched — intake reads addresses and copies bytes. + +## 5. Files + +| Path | Contents | +|---|---| +| `src/core/graph/judge_intake.ts` | selection, engine-side byte fetch, ratification gate | +| `src/core/graph/judge_intake_prompt.ts` | composed prompts, address/content split, `renderPrompt` | +| `src/core/graph/judge_prereg.ts` | write-once store: ratifications + pre-registrations | +| `scripts/test_judge_intake.ts` | drill, house mold | +| `fixtures/judge_intake/` | byte-pinned fixtures + independent generator | +| `npm run test:judge-intake` | drill entrypoint | + +## 6. Behavior → enforcement → pin + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Claim bytes are engine-copied from an address, never model-authored | `judge_intake.ts` — input is addresses; bytes fetched engine-side | drill `[engine-copy]` (a selection carrying literal text refuses) | +| Filing refuses without recorded ratification | ratification lookup precedes candidate construction | drill `[ratification-gate]` | +| The cut is visible at approval (rule 17) | engine-computed `neighborContext` on every selection | drill `[selection-context]` (qualifier-excluding cut visible in the ratification payload) | +| Claim mode is user-ratified, never agent-inferred | `claimMode` lives on `Ratification`, not on the selection | drill `[mode-provenance]` | +| Compound claims decompose as separate ratified selections | one mode per selection; no sub-claim authoring surface | drill `[decomposition]` | +| Attribution never reaches judge context | user id is an address component; allowlist admits content only | drill `[attribution-partition]` — two users' beliefs in one workspace produce judge contexts identical but for claim content | +| No task-text channel in composed prompts | `PromptSection` closed union has no task member | drill `[prompt-absence]`; unit pins | +| Composed prompts byte-inspectable | pure deterministic `renderPrompt` | drill `[prompt-bytes]` against byte-pinned fixtures | +| Assembly cannot bypass blindness | evidence built only via `assembleJudgeContext` | drill `[blindness-preserved]` | +| Ratifications and pre-registrations are write-once | store refuses a second write per key | drill `[write-once]` | +| Late registration refuses | run-open event; later timestamp refuses, typed | drill `[prereg-late]` | +| Forecasts never share bytes with prompts | no import path store → prompt module | drill `[static-imports]` | +| Audit reads the store; no new audit→composition path | one-way imports | drill `[static-imports]` (both directions) | + +## 7. Drills + +`npm run test:judge-intake`, in the `test:judge-panel` mold: byte-pinned +fixtures under `fixtures/judge_intake/` with an **independent +spec-derived generator** (never the implementation's own output), a +SHA-256 fixture manifest checked before any section, `TRELLIS_EXP_*` +refusal before any section, and `--negative-control` exiting nonzero +while naming every planted break. Sections are those in §6. + +Three planted breaks for the negative control, one per mechanism: a +candidate built from an unratified selection; a composed prompt carrying +a smuggled expectation; a registration timestamped after run-open. Each +must be named individually — a control that fails generically has not +demonstrated detection. + +The `[attribution-partition]` section is the one that would have caught +this record's original error, and is worth stating plainly: seed one +workspace with two users' beliefs under distinct address partitions, +file semantically matched claims from each, and assert the composed judge +contexts differ **only** in claim content. Any address component +appearing in a judge context fails the section by name. + +## 8. Explicit exclusions + +- No live judges, no model calls, no `support_sweep` integration, no + database registration, no ratification queue, no claim-kind plane — + each remains a separately authorized bounded feature. +- No modification to `composePanel`'s drilled path, the workspace or + Tier-1 write paths, custody tiers, kernel prompts, extraction prompts, + module addenda, or any composed-prompt pin. +- No `tools/engineering-loop/` change, no acceptance-ledger touch, no + EL-07/EL-10/EL-11 claim. +- No agent-authored annotations of any kind. No `scope` enumeration — + withdrawn (§10 item 2). +- No restatement of the twenty rules; no new glossary terms; no + hypothesis promoted to canonical prose. +- No ratification of RECONCILIATION §7 or JUDGE_COMPOSITION_GAME §11 — + owner acts. + +## 9. Falsifiers + +- **The address partition leaks.** If a judge's verdict shifts between + two users' semantically matched claims in one workspace, attribution is + reaching content somewhere — name the channel and close it, or withdraw + the structural-masking claim. This is the load-bearing one and + `[attribution-partition]` is its detector. +- **The ratification gate is decorative.** If a candidate can be built + without a human act — an agent self-ratifying, a default-approve path, + a test seam reachable in production — the guarantee is back to + discipline and the gate has to be redesigned. +- **Applicability needs more than the user can supply.** If R-29 gates + turn out to need claim properties a user cannot reasonably choose at + confirmation time, mode/scope creeps back as agent testimony. That is + the trigger to revisit §3.1, not to quietly let the agent infer. +- **Selection tilt survives the gate.** If a cut can still mislead a + judge in a way the neighbor context does not surface at approval, rule + 17 is not covered and the confirmation payload is wrong. + +## 10. Open items and decision boundary + +1. **Naming gate satisfied.** This record names the feature per + EPISTEMIC_SUPPORT §7; that record's last table row is amended on + landing, not now — "not yet built" is still true. *(Landed July 18, + 2026, Session 68: EPISTEMIC_SUPPORT §7 now carries the judge-intake + row; the residual "everything else" row names live judges, sweep + integration, registration, and the ratification queue.)* +2. **`scope` withdrawn.** The proposed `universal | existential | modal | + qualified` enumeration is dropped. Two reasons, the second decisive: + it was under-determined (four values back-derived from four ledger + rows; comparative, causal, and conditional claims fit none of them), + and — since the user ratifies exact bytes — any agent-assigned scope + is agent testimony about a claim the user has already fixed, which is + rule 15's failure class returning as metadata. If a real filing ever + demonstrates the need, it enters judged against the span bytes per + rule 8, never trusted as filer testimony. +3. **User-id-in-address is recorded here, specified elsewhere.** The + address-partition scheme is a substrate concern; this record depends + on the property and pins it at the judge boundary, but does not + define the address format. That belongs with the workspace contract. +4. **Table merge — now eligible.** RECONCILIATION §7 ratified July 18, + 2026, so the blocker is gone. The merge should still wait until the + slice-1 rows are **observed** rather than designed: RECONCILIATION §5 + records enforcement that exists, and every row in §6 currently names a + pin that has not been written. Merge in the implementing PR, not this + one. *(Done July 18, 2026, Session 68: merged as RECONCILIATION §5.1, + a dated entry under its §7 amendment rule, with every pin observed + green first.)* +5. **No `R` rows proposed.** This record makes design commitments, not + empirical claims. If the structural-masking property in §9 item 1 is + to be asserted as a finding rather than a design goal, it needs its + own row with that falsifier, by dated entry. +6. **Slice 2 and beyond** — live judges, sweep integration, judge + registration — stay gated behind the owner's RECONCILIATION §7 ruling + and their own proposals. diff --git a/.claude/skills/complexity-convocation/references/README.md b/.claude/skills/complexity-convocation/references/README.md new file mode 100644 index 0000000..b7154c5 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/README.md @@ -0,0 +1,60 @@ +# Reference material + +The records this skill cites, mirrored **byte-for-byte** from the Trellis +repository so the skill travels intact: lift this skill's directory out of the +repo and every document it cites comes with it. + +## How to read these + +Pull the cited section; leave the rest on disk. Several of these run past 40 KB, +and loading one whole spends the context the skill exists to spend well. + +``` +Grep "{Section_Number_Or_Exact_Heading}" references/{Mirrored_File} -A 40 +``` + +The skill body names the section it wants at each step. That name is the read +instruction — follow it to the section, not to the file. + +## These are mirrors, not the record + +The canonical copy is the source path in the table below. On any divergence +**the record wins and the mirror is replaced from source**. A mirror is never +edited in place, and never cited as authority against the record it came from. + +Nothing is appended inside the mirrored files. Byte-identity to the source is +what makes a mirror checkable, and a provenance header written into the file +would be the first thing to destroy it — so provenance lives here instead. + +No sync check is installed. These are portability snapshots taken at one commit; +the hashes below are what a reader verifies a mirror against, with or without +the Trellis repository present. + +## Provenance + +Mirrored from the Trellis repository at commit `65fdb1f`, dated 2026-07-25. + +| File | Canonical source | Bytes | SHA-256 | +|---|---|---|---| +| `DOUBTS_WORKSPACE.md` | `docs/architecture/DOUBTS_WORKSPACE.md` | 37,859 | `aec7483652bc6f369f003674c8f3491df5136fd38e0dd98605531397c2663bda` | +| `FOUR_JUDGE_BASIC_MODEL.md` | `docs/product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md` | 9,467 | `986bd635870533ef6c62c4fb48f0d53bf5f0bd26e236dd7f40c7add226b7b8b8` | +| `FOUR_JUDGE_DESIGN.md` | `docs/product/epistemic-support/FOUR_JUDGE_DESIGN.md` | 20,170 | `c944586e345668cc93a75faa431a0632e23484b5a705fa5991dd693fbb344fa0` | +| `JUDGE_COMPOSITION_CEREMONY.md` | `docs/product/epistemic-support/JUDGE_COMPOSITION_CEREMONY.md` | 14,828 | `f5a54786d014222992687ab6b51f983e37af4226afdf7c26501ee04d3037e3c1` | +| `JUDGE_COMPOSITION_GAME.md` | `docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md` | 29,004 | `0e3ef78b8ffd9f0c62b022b7a9db10515873e18550d02cc412971587dfe34574` | +| `JUDGE_CONTRACT_TEMPLATE.md` | `docs/product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md` | 14,667 | `e15bf7a30db8d88e7b377da3f1e8e49e396af6f126156128c6feb5b6c65fa020` | +| `JUDGE_INTAKE_DESIGN.md` | `docs/product/epistemic-support/JUDGE_INTAKE_DESIGN.md` | 24,436 | `b6fd8adbcdcac56d4d2d57f063011f26cd85b5f2ef7242bb7ed5a1f946622a46` | +| `RECONCILIATION.md` | `docs/product/epistemic-support/RECONCILIATION.md` | 46,647 | `a88c9539e88033825a2f65b70a4634c4cf0dd1d4c2e4966fc9021234f298e14d` | +| `STANDING_MODEL.md` | `docs/product/epistemic-support/STANDING_MODEL.md` | 8,825 | `484fc3c860e834a8afaed6dff6741c585ec3464c7466b09ad3d8421932904cfd` | + +Verify a mirror against a checked-out Trellis repository by hashing both working +files, so both get that checkout's line-ending treatment and a content match +hashes equal on any platform: + +``` +sha256sum references/{Mirrored_File} {Trellis_Repo_Path}/{Canonical_Source_Path} +``` + +The column above records the mirrored bytes as committed, which carry CRLF. A +checkout that normalizes line endings hashes differently without any content +having changed — so compare mirror against source, and read the column as the +snapshot's own fingerprint rather than as a cross-platform constant. diff --git a/.claude/skills/complexity-convocation/references/RECONCILIATION.md b/.claude/skills/complexity-convocation/references/RECONCILIATION.md new file mode 100644 index 0000000..ca8b605 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/RECONCILIATION.md @@ -0,0 +1,694 @@ +# Four-Judge Reconciliation — Completed Role Definitions and Composition Design + +**Status: RATIFIED — July 18, 2026 (owner, Session 67)**, by the dated +entry in [§7](#7-ratification). Authored July 17, 2026 (Session 66) as +PROPOSED, executing [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) +§10.1 item 1 as twice-amended: (a) the layer mapping, (b) the completed +role definitions in S10's YAML schema with per-field sources, (c) the +adoption of the two structural imports (R-29 hard compatibility gate; +R-30 no-global-section) into the composition design. Owner ratification +is a recorded decision, not an inference; the §7 entry is that decision, +and this record now governs where the two parent designs differ. Amended +only by dated entry, never by silent edit. The panel drills +(`npm run test:judge-panel`) pin the composition design in §5 in the +same PR, per the §10.1 instruction that R-29/R-30 enter the design +BEFORE the drills pin it. + +Authored under the house prompt protocols (`HANDOFF.md` §7 guardrail 4: +Prompt-Engineering + Hypershot, both invoked before these bytes were +written). Layer rule for everything below: role names, taxonomy class +names, parameter names, and schema field names are invariant vocabulary; +every per-invocation value is a placeholder; no concrete belief appears +at any frame layer (concrete synthetic content lives only in the +byte-pinned drill fixtures, which are calibration data, not frames). + +Sources (register IDs from [`RESEARCH_MAP.md`](RESEARCH_MAP.md)): + +- **S10** — [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) + (the collaborator's supplied design: registries, YAML judge schema, + ecology, routing stack, gluing rules; claims R-28…R-30). +- **S1 via the register and the contract frames** — the S1 protocols + and 2×2 rubric findings as carried by R-01/R-04/R-06/R-11 and + distilled into [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) + §1–§6 (S1's released-code locator is still missing — sharing-queue + row 2 — so S1 reconstruction cites the register rows and the + committed contract frames, never an unread artifact). +- **S9 fork** — the OpenCnid `migration-analysis` clone (MIT LICENSE at + fork commit `2bb5e54`; re-cloned this session to + `D:\OpenCnid\migration-analysis`, outside the Trellis worktree): + `docs/adaptation.md` (the five capability-indexed failure classes + with observable behaviors), `src/task_evals/*.py` (LLM-judge + evaluation prompts with labeled structured outputs), `src/optimize/` + (the meta-agent optimizer — read for orientation, NOT adopted; AB-8). +- **FOUR_JUDGE_DESIGN.md §3** — the four blindness profiles this record + completes. +- **[`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) + §3–§5** — the drilled v1 arithmetic the composition feeds. + +Adoption bounds binding this record: AB-1 (S10 physics/framework claims +are design vocabulary, never enforcement weight), AB-3 (routing weights +stay open and non-load-bearing), AB-5 (writer-blind, no count-shaped +incentives), AB-7 (non-epistemic registries stay gated), AB-8 (no +evolution machinery), AB-9 (audit never gates), AB-11 (live blocks +only). + +--- + +## 1. The layer mapping (§10.1 item a) + +**Verdict: the layers compose (S10 = framework, this panel = a minimal +ecology instance), with one refinement and one recorded fusion.** A +role's blindness profile is expressed exactly as §10.1 predicted: the +registry parameters it does NOT select, plus its +`abstention_boundary`. + +Parameter naming convention (this record's contribution, needed to make +the gluing condition decidable): a selected parameter is a **qualified +parameter** `registry.parameter/aspect` — the registry entry plus the +evidence region it restricts (e.g. `logical.falsification/cited` vs +`logical.falsification/independent`). Two judges share a parameter in +the gluing sense only when the *qualified* names match; sharing only +the registry entry (`falsification` under two aspects) is registry-level +kinship, which §4.3 treats as composable disagreement, not overlap. +S10's registries are expandable by declaration; entries used below that +S10's ecology names but its registry list does not +(`evidence_quality`, `source_dependence`, `constraint_satisfaction`, +`hidden_assumptions`, `goodharting`, `coverage`) are registered here as +Logical-registry expansions, each cited to the ecology judge that +already uses it. + +| Role | S10 ecology reading (verified against the ecology text) | Blindness = unselected parameters + boundary | +|---|---|---| +| J1 Grounding | Epistemic Reliability ∩ Belief-to-Fact, **refined**: the ecology's Epistemic Reliability Judge bundles "evidence quality, induction, Bayesian confidence, falsifiability, source dependence, observation fidelity" — the citation-facing half (`evidence_quality`, `falsification` over cited bytes) is J1; the world-facing half (`source dependence`, `observation fidelity`, `induction`) is J3. The preliminary §10.1 mapping holds with this split recorded. | Unselected: every world-facing, history-facing, and non-Logical parameter. Boundary: cited bytes do not bear on the claim (evidence-abstain). | +| J2 Coherence | Formal Coherence Judge, direct match ("deduction, consistency, constraint satisfaction, counterexamples, contradiction sensitivity" — the last is an orientation field in S10's schema, where it appears below). | Unselected: every evidence-facing parameter. Boundary: empty history and no kind coordinates. | +| J3 Corroboration | Epistemic Reliability Judge's world-facing half (see J1 row) + Sensorial `observation_quality`. | Unselected: the claim's own citations (the anti-circularity blindness), all internal-record parameters. Boundary: absence of corroboration counts only where the supplied evidence should have contained it. | +| J4 Audit | Adversarial Judge + Coverage Meta-Judge, **fused** — two ecology functions this panel deliberately runs as one role. Divergence recorded: S10 keeps them separate. Falsifier for the fusion: a drill or measured run showing the fused role missing a coverage failure (a needed-judge or missing-parameter finding) that a separated meta-judge catches — then the panel grows per FOUR_JUDGE_DESIGN §9. | Unselected: every belief-facing parameter — J4 selects only audit-aspect parameters and judges judges. Boundary: position-swapped comparisons that disagree are a tie, never a finding. | + +**The design property the mapping yields (drill-pinned):** the four +roles' qualified-parameter selections are **pairwise disjoint by +construction** — that is what "differently blind" buys, and it is what +licenses cross-role composition without a meta-judge (§4.3). The drill +computes the pairwise intersections from the definitions and fails if +any is non-empty (`[mapping]` section). + +## 2. Completed role definitions (§10.1 item b) + +S10's YAML schema, completed per role. Per-field sources are cited +inline (`# src:` comments). Three fields extend S10's schema and are +recorded as extensions, not silent edits: `taxonomy` (the closed +drawback classes with their qualified-parameter map — required by the +overlap test), `inputs` (the declared context allowlist — blindness +made mechanical, from [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md) +§2.1), and `required_assumptions` (the R-29 gate material). The +`rubric` lines are the reconstructed one-question-per-class checks +(JUDGE_CONTRACT_TEMPLATE §6.4); each is invariant across invocations +and carries no concrete belief. + +> **Dated supersession note (July 21, 2026, via self-play).** The worked role YAMLs +> below use S10's `hyperplane_parameters` (four-plane) per-seat structure. That per-seat +> structure is **superseded**: the live schema uses flat `select` (with `taxonomy` + +> `blind_to` retained — both validated). A blind self-play evaluation this session found +> the four-plane buckets do not earn their place at the per-seat level, and that a +> plane-categorized `select` is no better; the mapping to flat `select` is mechanical +> (each `plane.parameter` becomes a flat `select` entry). These reconstructions are +> preserved as the §10.1-item-b work; a full rewrite to flat `select` is a separate +> follow-up. See [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) supersession +> note and [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8. + +### J1 — Grounding + +```yaml +judge: + name: J1_GROUNDING # src: FOUR_JUDGE_DESIGN §3; JUDGE_CONTRACT_TEMPLATE §1 role enum + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 1 (verdict domain); R-11 (the only gate at 0% under laundering) + Decide whether the exact cited source bytes support the claim. + Judges the citation, never the world. + + claim_modes: # src: §10.1 preliminary mapping (Belief-to-Fact ∩); S10 claim-mode list + - fact + - inference + + hyperplane_parameters: + emotional: [] # src: AB-7 (non-epistemic registries gated behind the claim-kind plane) + logical: # src: S10 ecology "Epistemic Reliability Judge" (evidence quality, falsifiability), citation-facing half per §1 + - evidence_quality/cited + - falsification/cited + sensorial: [] + ethical: [] + + orientation: + evidence_standard: entailment_by_cited_bytes_only # src: R-11 (semantic entailment held 0%); JUDGE_CONTRACT_TEMPLATE §2 context + uncertainty_posture: abstain_when_bytes_do_not_bear # src: JUDGE_CONTRACT_TEMPLATE §2 constraints + temporal_horizon: at_judgment_time # src: AB-11 (live blocks at judgment time) + stakeholder_scope: none_epistemic_only # src: AB-7 + reversibility: verdicts_attributed_to_rubric_sha # src: JUDGE_CONTRACT_TEMPLATE §6.5 (byte-pin on registration) + contradiction_sensitivity: high_within_cited_bytes # src: S10 schema field; template §2 (contradicted_by_cited_bytes class) + abstention_boundary: cited_bytes_do_not_bear_on_claim # src: JUDGE_CONTRACT_TEMPLATE §2 ("If the bytes do not bear on the claim at all, abstain") + + taxonomy: # closed; unknown class is a refused completion (template §1) + unsupported_citation: evidence_quality/cited # src: template §2; R-11 (laundering = real-but-unrelated hashes) + overclaimed_evidence: evidence_quality/cited # src: template §2; R-01 (clean never certifies) + contradicted_by_cited_bytes: falsification/cited # src: template §2 + + rubric: # one question per class (template §6.4; S1 op discipline via R-06) + - Do the cited bytes state or entail the claim? # -> unsupported_citation when no + - Does the claim assert more than the cited bytes carry? # -> overclaimed_evidence when yes + - Do the cited bytes contradict the claim? # -> contradicted_by_cited_bytes when yes + + inputs: # src: COMPOSABLE_RUBRICS §2.1 (blindness mechanical); FOUR_JUDGE_DESIGN §3 "Sees" + required: [claim, citedBytes] + optional: [] + + required_assumptions: # src: R-29 (S10 layer-4 hard gate material) + - cited_bytes_available +``` + +### J2 — Coherence + +```yaml +judge: + name: J2_COHERENCE + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 2; R-18 (coherence calibration as tooling) + Decide whether the belief is internally coherent across its own + record. Judges consistency, never truth. + + claim_modes: # src: template §3 (history + kind judgeable for any non-experiential mode) + - fact + - inference + - prediction + - belief + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Formal Coherence Judge" (deduction, consistency, constraint satisfaction) + - consistency/internal + - consistency/history + - constraint_satisfaction/kind + sensorial: [] + ethical: [] + + orientation: + evidence_standard: own_record_only # src: FOUR_JUDGE_DESIGN §3 ("blind to all external evidence") + uncertainty_posture: abstain_without_history_or_kind # src: template §3 constraints + temporal_horizon: full_version_history # src: FOUR_JUDGE_DESIGN §3 "Sees" (prior versions, contest/recovery record) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_within_own_record # src: S10 ecology (Formal Coherence "contradiction sensitivity") + abstention_boundary: empty_history_and_no_kind_supplied # src: template §3 ("abstain rather than judging from the claim text alone") + + taxonomy: + self_contradictory: consistency/internal # src: template §3 + history_inconsistent: consistency/history # src: template §3 + kind_incoherent: constraint_satisfaction/kind # src: template §3; R-19 (claim-kind positions) + + rubric: + - Does the claim contradict itself? # -> self_contradictory when yes + - Does the claim contradict its own prior record? # -> history_inconsistent when yes + - Does the claim assert more certainty than its kind position admits? # -> kind_incoherent when yes + + inputs: + required: [claim, history] + optional: [claimKind] # src: template §3 ("optionally ") + + required_assumptions: + - history_available +``` + +### J3 — Corroboration + +```yaml +judge: + name: J3_CORROBORATION + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 3; R-05 (detectability spectrum); R-12 (poison drill) + Decide whether independent live evidence corroborates or + contradicts the claim, blind to the claim's own citations. + + claim_modes: # src: FOUR_JUDGE_DESIGN §3 (independent evidence bears on world-facing claims) + - fact + - inference + - prediction + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Epistemic Reliability Judge" world-facing half per §1 (source dependence, induction) + - induction/world + - falsification/independent + - source_dependence/independent + sensorial: # src: S10 ecology (observation fidelity); Sensorial registry (observation quality) + - observation_quality/independent + ethical: [] + + orientation: + evidence_standard: independent_live_blocks_authority_weighted # src: template §4; AB-11 (live blocks only); parent §5 (authority registry) + uncertainty_posture: abstain_unless_evidence_should_have_contained_it # src: template §4 constraints + temporal_horizon: current_versions_only # src: AB-11 (superseded versions are archive) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_across_independent_sources + abstention_boundary: supplied_evidence_need_not_have_contained_corroboration # src: template §4 + + taxonomy: + uncorroborated: induction/world # src: template §4 + authority_contradicted: falsification/independent # src: template §4; R-12 (authority catches confident lies) + corroboration_ambiguous: observation_quality/independent # src: template §4 + + rubric: + - Does independent evidence that should contain this claim corroborate it? # -> uncorroborated when no + - Does authority-weighted independent evidence contradict the claim? # -> authority_contradicted when yes + - Is the independent signal too ambiguous to decide? # -> corroboration_ambiguous when yes + + inputs: + required: [claim, independentEvidence] + optional: [authorityWeights] + # citedBytes is deliberately absent: the anti-circularity blindness + # (FOUR_JUDGE_DESIGN §3 "blind to the belief's own citations"). + + required_assumptions: + - independent_evidence_pool_available +``` + +### J4 — Audit + +```yaml +judge: + name: J4_AUDIT + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 4; R-06 (S1 2x2: the audit caught what loops could not) + Judge whether the other judges judge well. Judges judges, never + beliefs; runs outside every loop; can only contest a judge as a + capability. + + claim_modes: [] # divergence recorded: S10's claim_modes classify judged CLAIMS; J4's judged + # items are (judge, verdict, evidence) triples, so the field is vacuous for + # the audit role. The underlying items J4 samples may carry any mode. + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Adversarial Judge" (hidden assumptions, Goodharting) + + # "Coverage Meta-Judge" (missing coverage) — fused per §1; + # abduction/counterfactuals from the S10 Logical registry + - hidden_assumptions/audit + - goodharting/audit + - coverage/audit + - abduction/audit + - counterfactuals/audit + sensorial: [] + ethical: [] + + orientation: + evidence_standard: stored_pairs_judged_twice_positions_swapped # src: R-06 (position debias); template §5 protocol invariants + uncertainty_posture: disagreeing_orders_are_a_tie # src: template §5 ("a finding counts only when both orders agree") + temporal_horizon: retrospective_samples_only # src: FOUR_JUDGE_DESIGN §4 (anchors prospective, J4 retrospective) + stakeholder_scope: judges_only_never_beliefs # src: AB-9 + reversibility: contest_recoverable_by_human_reregistration # src: parent §4.4; register_modules.ts recovery transition + contradiction_sensitivity: high_across_rubric_applications + abstention_boundary: positions_disagree_after_swap # src: template §5 + + taxonomy: + rubric_gamed: goodharting/audit # src: template §5; R-11 + S1 Goodhart episode (RESEARCH_MAP §4.2) + convention_blind: coverage/audit # src: template §5; R-06 (0.122->0.126 invisible without the task contract); + # S9 fork docs/adaptation.md §3 (implicit-knowledge failures: + # "misses implied constraints or conventions") + systematic_drift: abduction/audit # src: template §5; FOUR_JUDGE_DESIGN §4 (drift finding contests the judge) + + rubric: + - Does the judged verdict satisfy the rubric's letter while defeating its question? # -> rubric_gamed when yes + - Does the judged verdict penalize a convention the task contract requires? # -> convention_blind when yes + - Do the sampled verdicts drift in one direction the rubric does not explain? # -> systematic_drift when yes + + inputs: + required: [sampledTriples, taskContract] # src: template §5 (task_contract is law; R-06) + optional: [] + # beliefOpinion and compositionState are deliberately absent: + # the live gating path is J4's structural blindness + # (FOUR_JUDGE_DESIGN §3 row 4; AB-9). + + required_assumptions: + - stored_verdict_evidence_pairs_available +``` + +**Verdict-schema refinement adopted (from R-29, recorded as a dated +amendment to JUDGE_CONTRACT_TEMPLATE §1):** abstain verdicts carry an +`abstainReason` from the closed set `(jurisdiction | evidence)` — +S10's exterior-region abstention (the claim mode or case lies outside +the judge's jurisdiction) is now distinguishable from evidential +abstention (in jurisdiction, evidence insufficient). Both routes reach +the opinion identically (absence of evidence → `u`); the reason is +telemetry and audit material, never arithmetic. + +## 3. Composition design: the two structural imports (§10.1 item c) + +Adopted BEFORE the drills pin them, as §10.1 instructs. The enforcement +home for everything in this section is the pure module +`src/core/graph/judge_panel.ts`; the drill is +`npm run test:judge-panel` (sections named per rule below); unit pins +live in `src/core/graph/judge_panel.test.ts`. + +### 3.1 The hard compatibility gate (R-29) + +S10's layer-4 rule, adopted verbatim in force: compatibility is a +**hard gate, never a similarity score**. + +- Every judge declares `required_assumptions` through its role + definition (§2, typed keys); every judged case declares its + properties. A judge whose required assumption the case **negates** + is **excluded from the composition with a typed, counted exclusion + record** — S10's "exclude … judges whose required assumptions + conflict with the case" — never down-weighted, never silently + dropped. The gates run at selection: an excluded judge's verdicts + are not expected in the stream at all. +- The applicability gate (S10 layer 3) rides with it: a case whose + claim mode lies outside a judge's `claim_modes` admits only a + `jurisdiction` abstention from that judge. A non-abstaining verdict + arriving at composition from an inapplicable or excluded judge is a + wiring failure and refuses the composition (typed), fail-closed. +- If the gates leave zero composition-side verdicts, the composition + refuses outright (typed) rather than emitting a vacuous opinion — + the R-02 fail-closed posture applied at the panel boundary. +- Routing WEIGHTS (S10's R(j,c) score) are explicitly NOT adopted: + they are open parameters under AB-3, unmeasured, non-load-bearing. + Only the hard constraint enters. + +### 3.2 The no-global-section outcome (R-30) + +S10's gluing condition, made decidable by the qualified-parameter +convention of §1: + +- **Overlap** between two judges = the intersection of their qualified + parameter selections. Within this panel, cross-role overlaps are + empty by construction (§1's drill-pinned property); overlap arises + where jurisdictions genuinely coincide — **two registered + configurations of the same role** (a rubric revision, a model + migration under R-27) judging the same belief. +- **Incompatible restrictions** = on one belief, one judge renders a + drawback whose class maps to a qualified parameter inside the + overlap while another overlapping judge renders a non-abstaining + `clean` (an affirmative no-drawback-found restriction of the same + parameters). Two drawbacks never conflict (drawback-first: both are + real findings); abstentions never conflict (no restriction). +- **Outcome — no valid global section presently exists**: the + composition emits a typed conflict record + `{kind: no_global_section, beliefId, parameter, judges, verdicts}`, + **withholds every verdict of the conflicted group from evidence + accumulation** (their mass reaches the opinion only as absence of + evidence — the abstention-routing law extended to conflict, so the + composed opinion is u-dominant relative to the silent blend), and + flags the belief for the existing conflict path. Never a blended + (b, d, u) average; never a majority vote. Resolution is human or a + separately proposed meta-judge — the engine only refuses to glue. + +### 3.3 The divergence between the parents, resolved explicitly + +FOUR_JUDGE_DESIGN §3 prescribes that J1-clean + J3-drawback "feeds `d` +*and* flags"; R-30 prescribes u-dominance for overlap-test failure. +These are **different boundaries, not a contradiction**, and this +record resolves them as a merge (per the §8 rule against silent +resolution): + +- **Cross-role disagreement** (registry-level kinship, qualified-level + disjoint — e.g. J1 `clean` on `falsification/cited` + J3 + `authority_contradicted` on `falsification/independent`): the two + evidence regions can both be truthfully reported at once (accurate + citations, contradicting authority), so a coherent — unfavorable — + global section exists. **Composes** exactly as §3 says: the drawback + feeds `d`, the affirmative clean feeds `b`, and the composition + emits the typed record `{kind: cross_role_disagreement, …}` that + flags the belief for the conflict path. Balanced conflict stays + legible in the opinion itself — high `b` with high `d` is + distinguishable from ignorance (high `u`), which is the reason the + triple exists (R-14). +- **Same-jurisdiction conflict** (qualified-parameter overlap, §3.2): + no coherent ruling exists; the no-global-section outcome fires. + +Falsifier for this resolution (carried per §4 protocol): a measured +regime on anchored conflict cases where routing cross-role +disagreement to u-dominance (or forced blending of same-jurisdiction +conflict) outperforms this split — then the boundary moves by dated +amendment with a same-commit drill re-pin. + +### 3.4 What composition consumes and refuses (completing the §4 flow) + +In event order, each step typed and drill-pinned: + +1. **Schema**: every verdict record validates against the shared + schema (closed per-role taxonomy; abstains carry `abstainReason`); + unknown role, class, or reason refuses. +2. **Registry**: a verdict from an unregistered judge refuses (a + wiring bug must not pose as epistemic humility); a verdict from a + **contested** judge refuses the whole composition, naming the judge + (the Session-31 whole-batch-refusal mold: a contested judge in the + stream means upstream selection already failed). +3. **J4 exclusion**: a J4-role verdict in the composition input + refuses (the audit role has no composition path — AB-9; the only + J4 consequence is a contest of the judge capability, mediated + outside this module). +4. **Gates** (§3.1), then the **overlap test** (§3.2), then + **cross-role disagreement detection** (§3.3). +5. Surviving verdicts become support events (`opId` = the judge id, + weight from the verdict record) consumed by the drilled v1 + arithmetic (`computeSupportOpinion` — reused, not modified). + +Judge manifests (the registration objects) require `rubricSha`, +`anchorSetSha`, `taxonomyVersion`, and **`targetModelIdentity`** +(R-27: adaptations are model-coupled; a model migration must be able +to contest the judge — the drill asserts the field is required). +Contest and re-registration follow the module-registration recovery +mold (`scripts/register_modules.ts`): a contested judge is excluded +from composition until a human re-review re-registers it, and the +superseded contest record survives in the judge's history. + +## 4. Per-role reconciliation verdicts (§4 completion protocol) + +| Role | Verdict | Divergences recorded (each with falsifier) | +|---|---|---| +| J1 Grounding | **adopt** (S10 sparse-selection frame; this record's definition) | none — the ecology-judge split (§1 refinement) is a reading, not a divergence | +| J2 Coherence | **adopt** | none — direct Formal Coherence match | +| J3 Corroboration | **adopt** | none — world-facing half of the split | +| J4 Audit | **merge** (Adversarial + Coverage Meta-Judge fused into one role) | S10 separates them. Falsifier: a coverage failure the fused role misses that a separated meta-judge catches → the panel grows (§9 governs). The Coverage Meta-Judge's "unresolved disagreement" duty is engine code here (conflict records), and its "need for another judge" duty is deferred to humans reading those records | +| Composition | **merge** (§3.3: §3's disagreement-is-data at the cross-role boundary; R-30's no-global-section at the same-jurisdiction boundary) | falsifier in §3.3 | +| Verdict schema | **merge** (`abstainReason: jurisdiction \| evidence` adopted from R-29 into the template §1 schema) | falsifier: the distinction never discriminating in telemetry over a measured period → retire by dated amendment | +| Ecology breadth | **diverge-recorded**: S10 sketches eleven judges; this panel ships four (a minimal ecology instance for belief-support). | Falsifier: FOUR_JUDGE_DESIGN §9 — a fifth blindness profile catching a failure class the four miss. Non-epistemic registries stay behind AB-7's driving-question rule | +| Routing stack | **diverge-recorded**: S10's six-layer stack adopted only at layers 3–4 (applicability + compatibility, §3.1) and 6 (overlap, §3.2); layers 1–2 and 5 (context signature, semantic retrieval, coverage/complementarity scoring) are selection machinery a four-role fixed panel does not need. | Falsifier: an ecology larger than one configuration per role — then the routing layers enter behind their own proposal (AB-3/AB-8 bind the weights and any search) | + +## 5. Enforcement homes and pins (implementing FOUR_JUDGE_DESIGN §6) + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Verdicts ternary, closed taxonomies, abstainReason | `judge_panel.ts` Zod schemas | drill `[schema]`; unit pins | +| Role blindness structural | `assembleJudgeContext` input allowlist from `inputs` | drill `[blindness]` (every fixture (role, forbidden-input) pair refused, typed, naming role + input); unit pins | +| J4 never gates | `judge_audit.ts` exports no symbol `judge_panel.ts` imports; composition refuses J4 verdicts | drill `[static-imports]` (no import path audit→composition) + `[audit-isolation]` (route attempt finds no effect on any opinion) | +| Panel composes in engine code only | `composePanel` pure over verdict records | drill `[composition]` scripted verdicts → exact opinions vs independent oracle | +| No-global-section, never blend | §3.2 withholding in `composePanel` | drill `[no-global-section]` (planted incompatible verdicts → typed conflict record; u-dominant vs the blend counterfactual) | +| Hard compatibility gate | §3.1 gates in `composePanel` | drill `[gates]` (planted incompatible judge excluded, counted; inapplicable non-abstain refused) | +| Judges contestable, model-coupled | registry pure functions; manifest requires `targetModelIdentity` | drill `[judge-contest]` (contest → refusal → human re-registration → history survives); `[schema]` R-27 required-field refusal | +| Position bias neutralized in J4 | `judge_audit.ts` `debiasedFinding` (agree-in-both-orders rule) | drill `[audit-isolation]` protocol checks; unit pins | +| Writer never sees any of it | no production wiring exists this session (nothing writes or exposes panel state) | future: the sweep-integration proposal carries the kernel-prompt absence pin (FOUR_JUDGE_DESIGN §6 row 7) — recorded here as deliberately not yet pinnable | + +### 5.1 Judge-intake rows (dated entry, July 18, 2026 — Session 68) + +Merged from [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md) §6 per its +§10 item 4, in the implementing PR, now that every row is **observed** +rather than designed (`npm run test:judge-intake`, 13 sections; the three +modules land in the same PR as this entry). This is a dated addition +under the §7 amendment rule, not an edit to the ratified table above. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Claim bytes are engine-copied from an address, never model-authored | `judge_intake.ts` — input is addresses; bytes fetched engine-side | drill `[engine-copy]` (a selection carrying literal text refuses) | +| Filing refuses without recorded ratification | ratification lookup precedes candidate construction | drill `[ratification-gate]` | +| The cut is visible at approval (rule 17) | engine-computed `neighborContext` on every selection | drill `[selection-context]` (qualifier-excluding cut visible in the ratification payload) | +| Claim mode is user-ratified, never agent-inferred | `claimMode` lives on `Ratification`, not on the selection | drill `[mode-provenance]` | +| Compound claims decompose as separate ratified selections | one mode per selection; no sub-claim authoring surface | drill `[decomposition]` | +| Attribution never reaches judge context | user id is an address component; allowlist admits content only | drill `[attribution-partition]` — two users' beliefs in one workspace produce judge contexts identical but for claim content | +| No task-text channel in composed prompts | `PromptSection` closed union has no task member | drill `[prompt-absence]`; unit pins | +| Composed prompts byte-inspectable | pure deterministic `renderPrompt` | drill `[prompt-bytes]` against byte-pinned fixtures | +| Assembly cannot bypass blindness | evidence built only via `assembleJudgeContext` | drill `[blindness-preserved]` | +| Ratifications and pre-registrations are write-once | store refuses a second write per key | drill `[write-once]` | +| Late registration refuses | run-open event; later timestamp refuses, typed | drill `[prereg-late]` | +| Forecasts never share bytes with prompts | no import path store → prompt module | drill `[static-imports]` | +| Audit reads the store; no new audit→composition path | one-way imports | drill `[static-imports]` (both directions) | + +### 5.2 Judge-convocation rows (dated entry, July 19, 2026 — Session 70) + +Merged from [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) +§6 in the implementing PR, now that every row is **observed** rather +than designed (`npm run test:judge-convocation`, 23 sections / +140 checks; 15 unit pins in `judge_convocation.test.ts`). A dated +addition under the §7 amendment rule. Build scope is OPTION B (that +record's §11.1): the live spawn path exists and is pinned at its +refusals; no live run has executed. **This entry also closes §5 +row 9's deferred pin** — see the writer-blind row below. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Manifests validated, R-27 required, hand-authored only | `parseJudgeManifest` at registration; no generator exists (AB-8) | drill `[roster-manifest]`; unit pins | +| Registration existence-gated before any write | `findMissingEvidentiaryHashes` gate in `register_judges.ts`, before both writes | drill `[roster-existence]` (gate logic + source-order pin) | +| Store manifest ↔ graph hook consistent; the hook carries only name + id + kind + hashes | one ceremony writes both; `buildRegistryFromState` refuses mismatch naming the judge | drill `[roster-consistency]`; hook-opacity cypher pins in `[roster-lifecycle]` + unit pins | +| Contested judge unreachable by a run (graph state → pure registry → composition) | contest state carried by `buildRegistryFromState`; `composePanel` refuses (existing law) | drill `[roster-lifecycle]` | +| Recovery is human re-registration; a manifest change is a new id | plan refusal on an existing judgeId; ceremony requires `--reviewed-by` and refuses uncontested recovery | drill `[roster-recovery]`; unit pins | +| Pairs judged at most once ever; identity spans candidate bytes + manifest identity | durable verdict lookup excludes judged pairs before sampling (`support_sweep.ts`) | drill `[sweep-pairs]` + `[sweep-once]` (a third run finds an exhausted pool) | +| Uniform pool, seeded sampling, budget, counted deferral | sweep policy (config twins `SUPPORT_*`); mulberry32 per the record §3.5 | drill `[sweep-selection]` (independent-generator sequence + budget order) | +| Run-open recorded before the first invocation; late pre-registration refuses | `appendThroughLaw` ordering in `runConvocationSweep`; slice-1 store law | drill `[sweep-run-open]` | +| Judge-all-then-write; infrastructure failure writes nothing | collect-then-write in `runConvocationSweep` | drill `[sweep-atomicity]` | +| Never a write gate; no path to the write path or promotion | no such import exists | drill `[static-imports]` | +| Excluded judges typed and counted; designed silence disclosed (rule 12) | R-29 gate at selection; the run report carries exclusions + jurisdiction abstains; synthesized abstentions flagged, zero spend | drill `[sweep-evidence]` | +| Attribution never re-enters through sweep plumbing | prompts only via `toPromptInput`; store payloads carry ids, never addresses or partitions | drill `[sweep-attribution]` (partition twins through the FULL sweep path; token scan over prompts and appended payloads) | +| Opinions computed at read time, advisory only | `computeConvocationReport` replays verdicts through `composePanel`; nothing stores an opinion | drill `[report]` (independent arithmetic; cross-role disagreement surfaced as data) | +| **Writer never sees any of it** (§5 row 9, deferred there — CLOSED here) | no support vocabulary on any kernel-prompt source; no RLM surface reaches `judge_records` or any support field | drill `[writer-blind]` (token scan over all ten `src/rlm/*.py` + the `search_ast_nodes` body) + unit pins | +| Spawn transport = exactly the rendered bytes; `promptHash` re-verified pre-send | `buildSpawnRequest` (`parseComposedPrompt` re-render) | drill `[spawn-transport]`; unit pins | +| Model identity must equal the manifest's, or refuse before I/O (R-27) | `makeLiveJudge` construct-time refusal | drill `[spawn-model]`; unit pins | +| The model supplies only `{verdict, drawback, abstainReason}`; weight and time engine-side | strict `judgeResponseSchema`; `buildEngineVerdict` | drill `[spawn-verdict]`; unit pins | +| Live spawn unreachable without the operator flags (the mechanical half of the triple gate) | runner defaults to the oracle; `--live` without `--confirm-paid` refuses | drill `[spawn-gate]` (source pins; the governance half is the owner's dated re-opening + per-run approval) | +| The queue shows the cut verbatim (rule 17) | `show` prints the `buildRatificationRequest` payload unmodified | drill `[queue-shows-cut]` | +| `claimMode` only from the user's recorded flags; declines record nothing | required flags with no default; the store schema has no other entry point | drill `[queue-provenance]` | +| Store write-once mechanical; supersession references, never overwrites | `judge_records` `PRIMARY KEY (kind, key)` + the slice-1 law via validate-then-append | drill `[store-write-once]`; DDL unit pin | + +**Dated addition (July 21, 2026) — the read-time explanation render.** +The advisory report gained a pure, code-mediated explanation render +(`judge_explain.ts`; the `support:report` surface prints it) that joins +already-stored verdict fields — seat, verdict, drawback class, its +qualified-parameter dimension, abstain reason, and the typed +conflict/disagreement/exclusion records — into human-readable lines. No +wire/schema/store change, no model call, authors no byte; `clean` reads +"no known drawback found," never certified correctness (R-01). Specified +at [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) §13 +(Option A); pinned by `judge_explain.test.ts` and the `[report]` / +`[static-imports]` sections of `npm run test:judge-convocation`. It is +the engine-side analogue of the session-layer `judge-composition` skill's +per-item rationale, aligning the two layers as far as the code-mediated +pillar allows. + +## 6. Exclusions (this record) + +No live judges, no model calls, no `support_sweep`, no database +registration, no ratification queue, no claim-kind plane, no routing +weights, no evolution machinery (AB-8), no S9 optimizer adoption (the +`src/optimize/` meta-agent was read for orientation only), no change +to the write path, custody tiers, kernel prompts, or any composed- +prompt pin. + +## 7. Ratification + +**RATIFIED — July 18, 2026 (owner, Session 67).** This record and its +drills, authored in Session 66 (July 17, 2026), are ratified as written. +In consequence, from this date: + +- **The §4 per-role verdicts are binding**, not proposals. Consumers no + longer carry the unratified caveat. +- **This record governs where the two designs differ.** + [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) and + [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) are no longer + co-equal: the layer mapping, the completed role definitions, the + adopted composition design (R-29 hard compatibility gate; R-30 + no-global-section), and the §5 enforcement table are authoritative. +- **The §3 composition design binds implementation.** The §3.3 + resolution of the cross-role vs same-jurisdiction boundary stands with + its falsifier. +- **The live-judge follow-on slice is unblocked** as a separately + authorized bounded feature — ratification removes the gate, it does + not authorize the build. + +Ratified in the same act: [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) +§11 — the twenty rules as binding program law. Records ratified under +this entry are amended only by dated entry, never by silent edit. + +*The gate this entry closes, preserved: "**OPEN.** This record and its +drills were authored in Session 66 (July 17, 2026). The owner ratifies by +dated entry here; until then the verdicts in §4 are proposals, +FOUR_JUDGE_DESIGN.md and FOUR_JUDGE_BASIC_MODEL.md remain co-equal, and +any consumer of this record must say so."* + +### 7.1 Composition supersession (dated entry — July 19, 2026, Session 71) + +**Owner ruling: there are no base judges and no default cast.** Judges, +their registry selections, orientations, closed taxonomies, names and +anchors all compose per context at ceremony time from the REPL's own +fact and belief space. This record's §1 and §2 are hereby read as **one +composition instance for an epistemic driving question** — the "minimal +ecology instance" its own §1 already calls them — and not as a standing +roster. Governing records: +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §6 rule 4 (as +superseded, §6.1), +[`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md), and +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md). + +Three consequences for this record specifically: + +**(a) §2's four completed definitions are an instance, not law.** Their +per-role taxonomies (`unsupported_citation`…, `self_contradictory`…, +`uncorroborated`…, `rubric_gamed`…) are what one epistemic composition +looked like. They are not the classes a future composition must use, +and nothing may byte-pin, register, or schema-encode them as such. What +remains binding from §2 is the *schema* — the field set a judge +definition must fill — not the fills. + +**(b) The §4 Routing-stack divergence is reopened; its own falsifier +fired.** That row adopted S10 layers 3–4 and 6 while discarding layers +1–2 and 5 (context signature, semantic retrieval, +coverage/complementarity) as *"selection machinery a four-role fixed +panel does not need,"* with the recorded falsifier: *"an ecology larger +than one configuration per role — then the routing layers enter behind +their own proposal."* Under per-context composition that condition is +permanently met. **Layers 1, 2 and 5 enter now** (owner approval, +July 19, 2026), behind their own proposal, with AB-3/AB-8 binding any +weights or search. They are the machinery composing a cover over an +arbitrary linguistic topology requires. + +**(c) The §1 pairwise-disjointness pin moves, and loosens.** The +drill-pinned property — the four roles' qualified-parameter selections +are pairwise disjoint, computed from the definitions and failing if any +intersection is non-empty — was a static check over a fixed cast. It +becomes a **composition-time gate** run over each composed cover before +any judging. It also loosens: strict disjointness is not required of a +cover, since opens normally overlap and gluing happens on the overlaps. +The gate accepts either disjoint seats **or** overlapping seats with a +declared gluing rule, which §3.2's R-30 no-global-section outcome +already handles as a typed fork rather than a blend. + +Unchanged by this entry: §3.1's R-29 hard compatibility gate, §3.3's +cross-role vs same-jurisdiction resolution, and the §5 enforcement +tables (§5.1 intake, §5.2 convocation), whose rows record observed +behavior of shipped code. + +### 7.2 Standing-model pointer (dated entry — July 20, 2026, owner) + +A ratified standing model now sits above this record's verdict model: +[`STANDING_MODEL.md`](STANDING_MODEL.md) (owner-ratified as principle, +July 20, 2026). Two effects on this record, recorded here so the two do +not silently disagree: + +- **The verdict enum `clean | drawback | abstain` (§2) becomes the + signed delta `+1 | −1 | 0`** of a single ternary standing axis + (doubt/belief/fact). The enum mechanics and the §5.1/§5.2 enforcement + tables are **unchanged** — this is a reframing of what the enum *is*, + not an edit to shipped behavior. +- **Merit-refusal is superseded in principle** by user-gated + ratification (STANDING_MODEL §2): a value-mode candidate the panel + cannot dispute is recorded as user-gated rather than refused into + silence. No code changes under this entry; the supersession is a + gated build. + +STANDING_MODEL is ratified as *principle only* and authorizes no build; +this record's shipped surfaces stand until a separately gated build +changes them. + +### 7.3 Header correction (dated entry — July 22, 2026, owner) + +The header status line of this record read +`Status: PROPOSED — RATIFICATION OPEN` from authoring on July 17, 2026 +until this entry, four days after §7 ratified it. The two were read +together only by a reader who reached §7; a reader who stopped at the +header — which the house rule instructs, since a record's own header is +authoritative on its standing over any index — was told the opposite of +the truth, and `AGENTS.md` §2.1 correctly indexed this record as +RATIFIED against a header that denied it. + +Corrected under owner approval, July 22, 2026: the header now states +RATIFIED with the §7 date and act, and preserves the authoring date and +original PROPOSED standing so the transition is legible rather than +erased. **Nothing in §1–§7.2 changes.** This entry amends the status +line only. + +The general defect, recorded because it will recur: a dated ratification +entry lands at the bottom of a record and the header at the top is left +alone, so the file's most-read line contradicts its most-authoritative +one. Ratifying a record includes updating its header in the same act. diff --git a/.claude/skills/complexity-convocation/references/STANDING_MODEL.md b/.claude/skills/complexity-convocation/references/STANDING_MODEL.md new file mode 100644 index 0000000..bc0eb06 --- /dev/null +++ b/.claude/skills/complexity-convocation/references/STANDING_MODEL.md @@ -0,0 +1,179 @@ +# The Standing Model — how a claim is valued + +**Status: RATIFIED as principle — July 20, 2026 (owner, Cnid, in +session).** This record states the standing model the derivation games +of July 19–20, 2026 produced and the owner ratified. It is ratified **as +direction and principle**; it authorizes **no build**. Two carve-outs +below (§3, §5) mark exactly where ratification stops and a separately +gated build begins — reading past them would repeat the +instance-promoted-to-frame failure this program has already paid for +([`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md)). + +Companion record for the doubts tier this model's `-1` opens: +[`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +Governing composition law it extends: +[`RECONCILIATION.md`](RECONCILIATION.md) (dated pointer added there). + +--- + +## 0. The derivation ground — Trellis' target function + +**RATIFIED July 20, 2026.** Everything below derives from this, and +before July 19, 2026 it was undefined — `grep "target function"` +returned zero hits repo-wide, so every primitive derivation stood on an +ungrounded floor. + +> **Trellis is a personalized composable expert system whose expertise +> is the user's data.** Not strictly a coding tool; not strictly a RAG +> system. + +Stated by the collaborator (M. Murphy), owner-relayed July 19 and +owner-ratified July 20, 2026. Its immediate consequence is load-bearing +for the rest of this record: **the user is the domain authority by the +target function's own definition** — the system's expertise *is* the +user's data — which is why every place standing moves without a fact to +compel it, it moves by a **user gate** and not by the panel. + +## 1. The signed ternary + +**RATIFIED July 20, 2026 as the standing model.** + +A claim holds one **standing**: + +``` +-1 | 0 | +1 +doubt | belief | fact +``` + +- **Mode, verdict and standing are one vocabulary at two times.** A + candidate *has* a standing; a seat returns a *signed delta*; the + resulting standing is that delta composed against the prior. The + existing per-seat verdict enum (`clean | drawback | abstain`, + RECONCILIATION §2) is the delta's sign — `+1 | −1 | 0` — not a + separate object. +- **`-1` is constructed, not residual.** A doubt is a positive object + (a defeater's finding grounded in facts), not the mere absence of + support. Its tier is [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +- **Corroboration, recorded because ratification followed it:** the + three ledger rows of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §7 replay under this model with no verdict flipped, and the Sieve's + independent `PASS | REVISE | HALT` grammar instantiates the same + ternary with matching semantics (`+1 | 0 | −1`). This model was tested + against unpicked hands before it was ratified, not argued into place. + +## 2. User-gated ratification and the meet rule + +**RATIFIED July 20, 2026 as principle.** + +- **Submission is a vote.** A candidate the panel cannot dispute, that + the user has submitted to the ceremony, is **ratified carrying a + user-gated qualifier** — the qualifier meaning *only the user's + authority stands behind it*. This replaces merit-refusal, whose defect + is that it produces silence indistinguishable from "we never looked." + There is no tie. +- **The qualifier lives in the address**, as a distinct hash kind — not + as metadata propagated by discipline. Identity inside a hash-guarded + chain, so the qualifier cannot decay. +- **The meet rule** (owner-accepted explicitly, July 19): a derived + claim's hash kind is the **meet of its dependencies' kinds**. An + inference citing one user-gated address and one corroborated address + cannot mint a clean hash — the qualifier cannot launder itself in one + hop. + +The stamp mechanism (address layout, hash kinds) is a **build** detail, +gated below; the principle — user-gated ratification with a contagious, +non-decaying qualifier — is what is ratified. + +## 3. The panel never moves standing — CARVE-OUT + +**RATIFIED July 20, 2026 as principle. This ratifies the principle and +authorizes NO code removal.** + +The panel **emits signed findings; the user gates whether standing +moves, in both directions**: + +- a claim the facts do not reach → **user gates** (an unverifiable + belief, or an unverifiable doubt / skeptical lens — both recorded as + the user's, never ratified by the panel); +- a claim the facts refute → **the panel reports; the user gates** the + demotion. The engine has no standing to overrule the user about the + user's own domain (the Sieve HALTed engine auto-demotion on all three + lenses, DOUBTS_WORKSPACE game-8 record). + +**Consequence, and the carve-out.** If the panel never moves standing, +the promotion machinery reduces to **a findings recorder plus a user +gate**, and every disposition in the JUDGE_COMPOSITION_GAME §6 grammar +that *acts* (promote, merit-refuse) is really a user act the engine +records. **That reduction removes shipped engine surface.** This record +ratifies the *principle* that the panel is a recorder-plus-gate. It does +**not** authorize deleting or rewriting any shipped disposition code: +that is a bounded build under the usual authorization (owner dated +entry + drills + the paid-queue gate where a live run is involved). +Ratified principle; unbuilt reduction. + +## 4. Claim modes are a first vocabulary, not a primitive + +**RATIFIED July 20, 2026 as a reclassification.** + +The six claim modes (`fact | inference | prediction | value | belief | +experience`) are **a useful first vocabulary** — the same status +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §1 records for +S10's eleven judges (collaborator statement, owner-ratified). They are +**not** a validated primitive partition of assertion-space. The +provenance clarification obtained for the judges in July 2026 was never +obtained for the modes; the house assumed, then pinned the assumption +three ways (the three-way parity pins, +[`PRIMITIVE_ENCODING_AUDIT.md`](PRIMITIVE_ENCODING_AUDIT.md) finding 5). + +The primitive that replaces them is not a better list — it is the +**standing axis of §1 plus the applicability-by-locus mechanism** (a +claim's evidence locus; a seat's reachable locus; applicability = +non-empty intersection; DOUBTS_WORKSPACE §12.2). The applicability gate +currently keys on the six modes (`judge_panel.ts:464`); **re-deriving it +onto locus intersection is a build item**, not performed by this record. + +## 5. What is ratified, and what remains gated + +**Ratified (principle / direction):** the target function (§0); the +signed-ternary standing model (§1); user-gated ratification and the meet +rule (§2); the panel-never-moves-standing principle (§3); the +reclassification of claim modes as illustrative (§4). + +**NOT ratified here — each a separately gated bounded build:** + +- the address/hash-kind stamp layout (§2); +- the reduction of the promotion machinery to recorder-plus-gate, + including any code removal (§3); +- the re-derivation of the applicability gate onto locus intersection + (§4); +- anything requiring a **live** (paid) judge run, which stays behind the + paid-queue gate (owner dated re-opening + per-run approval under the + ≤$5 cap). + +**Correct ≠ reachable, and correct ≠ built.** A green suite proves the +first only; ratifying the principle authorizes neither the build nor the +run. + +## 6. Relationship to the records this extends + +- [`RECONCILIATION.md`](RECONCILIATION.md) — its verdict model + (`clean | drawback | abstain`) becomes the signed delta of §1; its + merit-refusal disposition is superseded by §2's user-gated + ratification. A dated pointer is recorded there; the enforcement + tables (§5.1/§5.2) that record shipped behavior are untouched until a + build changes the code they observe. +- [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) — its §6 + disposition grammar is reframed by §3 (the acting dispositions become + user acts the engine records); its twenty rules bind unchanged. A + dated pointer is recorded there. +- [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) — the + `-1` tier; its §14 ratification is the companion to this one. + +## Provenance + +Produced by the derivation games of July 19–20, 2026 (players: owner +Cnid, collaborator M. Murphy, Claude). The standing half was corroborated +by unpicked ledger rows and the Sieve grammar; the doubts half +(DOUBTS_WORKSPACE) was empirically tested (13/14 flat-earth corpus +rejected). Ratified by the owner in session, July 20, 2026. Amended only +by dated entry, never by silent edit. diff --git a/.claude/skills/judge-composition/README.md b/.claude/skills/judge-composition/README.md index 573dc53..2037710 100644 --- a/.claude/skills/judge-composition/README.md +++ b/.claude/skills/judge-composition/README.md @@ -2,7 +2,7 @@ This directory versions the operational shorthand for composing judge panels. It closes -[`JUDGE_COMPOSITION_GAME.md`](../../../docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md) +[`JUDGE_COMPOSITION_GAME.md`](references/JUDGE_COMPOSITION_GAME.md) §10 open item 4 ("In-repo copy of the `judge-composition` skill, if the owner wants it versioned here"), landed July 19, 2026 at owner direction. diff --git a/.claude/skills/judge-composition/SKILL.md b/.claude/skills/judge-composition/SKILL.md index 1f8409c..936b068 100644 --- a/.claude/skills/judge-composition/SKILL.md +++ b/.claude/skills/judge-composition/SKILL.md @@ -13,6 +13,8 @@ Distilled July 17–18, 2026 from the judge-composition game (players: the owner **Reconciled July 21, 2026** to the records that postdate the July-18 distillation: the no-default-cast ruling (`PROGRAM_CONTEXT.md` §6.1, `COMPOSITION_FROM_PRIMITIVES.md`), the ceremony refinements (`JUDGE_COMPOSITION_CEREMONY.md` — a candidate-blind characterizer, composed anchors, instantiation gates), and the standing model (`STANDING_MODEL.md`, principle only). The canonical source remains `JUDGE_COMPOSITION_GAME.md` — its §6 twenty rules are cited by number, never restated, since a paraphrased copy is drift; on any divergence the record wins and this skill is corrected. +Every record cited in this skill is mirrored byte-for-byte in [`references/`](references/), so a rule cited by number resolves with the Trellis repo absent. Read by the section a citation names rather than whole — the mirrors run to 347 KB together, and §6 is a section, not a file. Provenance, hashes, and the read idiom: [`references/README.md`](references/README.md). + Theoretical ground, held as **an adopted thesis with a standing falsifier**, not a proven law. The thesis — the collaborator's, refiled and **accepted July 21, 2026** (`JUDGE_COMPOSITION_GAME.md` §5.1): *no judging system is simultaneously universal in coverage, governable, and primitive-free; composition from conceptual primitives is the unique design occupying universal ∩ governable.* Its corroborated support (§6.1a): an adversarial clean-context run put five candidate paradigms — learned reward models, prediction markets, proof checkers, evolutionary selection, common-law precedent — to the test, and every one fractured on the same seam, *primitive-free ⟹ ungovernable or non-universal*. Its one named empirical flank (§6.1b): if judgment-relevant structure in learned judges proves non-decomposable into interpretable dimensions — representational holism — the thesis breaks; the program tests that decomposability bet empirically rather than arguing it, and adopting the formulation does not close it. Until it resolves, compose. ## The invariant skeleton — the blindness structure, not a cast diff --git a/.claude/skills/judge-composition/references/AMBIENT.md b/.claude/skills/judge-composition/references/AMBIENT.md new file mode 100644 index 0000000..108967e --- /dev/null +++ b/.claude/skills/judge-composition/references/AMBIENT.md @@ -0,0 +1,140 @@ +# AMBIENT.md — the rules whose trigger is that a session exists + +**Status:** part of the repository-wide session contract. `AGENTS.md` +describes Trellis and routes; the task-type files fire on a matched file +or command; this file carries what is left. Invariants only, amended by +ordinary review on a feature branch (rule 12), never by silent edit. +**Scope:** every agent, CLI, harness, and model opening this repository. + +Trellis is OpenCnid's Recursive Language Model runtime: a language model +operating a persistent Python REPL over a knowledge store where every +stored fact traces to immutable content-addressed source bytes. + +Most rules in this repository wait for an event — a file opened, a +command run, bytes written. These six wait for nothing. A session knows +what is being built, has an objective, sits under whatever gates the +collaborator has set, claims things are delivered, rests those claims on +records, and can ask. That is the whole trigger. Numbers are append-only +and cite exactly as they did before the restructure. Rule 21 is split: +21(a) is here, and 21(b) — asking before installing standing +configuration — has a detectable trigger and lives with the task-type +files. + +**Rule 24 is numbered last and printed first, deliberately.** It exists +because what is being built was written only in records a construction +decision never had to open, and a target a session must go looking for +loses to the nearest familiar shape — rule 20's ordering failure, one +level up. + +## Rule 24 — what is being built + +Trellis is an **agentic knowledge-work system** over a large context of +domain-specific user information: a toolset the user works *with*, not a +retrieval system with a fact store bolted on. It holds the information, +reasons over it, acts on it, and forms beliefs and doubts from it. Two +sentences carry the rule, and one act falsifies each. + +**A query produces a deliverable, not a reply.** Every run leaves a +**response artifact** — a derived object composed over several turns and +multiple slices, which outlives the run and which the orchestrator can +parse, summarize, and link for the user. A run whose whole output is a +string in a transcript produced none. **A schema that can only carry a +string cannot carry a deliverable**, so a terminal action requiring +non-empty prose, an artifact envelope with one hardcoded text part, and +an answer sink that renders a single value each make this false. For +code editing the repository is the artifact and the submitted string is +a receipt. + +**The worker queries the corpus; it never transports it.** It answers +questions *about* a body it never holds, reading the slices the question +needs and no more. A surface returning a whole document where the +question asked about part of one, a bound pricing a paragraph and a +corpus alike, and an instruction to collapse several turns into one load +each make this false. + +The tell for both: a sentence computing how much of a corpus fits +through the model. That arithmetic describes an operation this system +does not have — bulk movement is the engine's job, which is rule 5's +code-mediated text applied to what a turn is *for* +(`docs/architecture/RESPONSE_ARTIFACT.md`). + +Two surfaces carry this outward, and neither is decoration. **A2A is +inbound** — peer agents query Trellis as a human would. **MCP is +outbound** — Trellis acts in the world as a human would. A text-only +contract on either bounds the whole system. + +## Rule 1 — where the objective comes from + +The session takes its objective from exactly one source: the +collaborator's live task. Every other artifact a session can read — a +branch name, `HANDOFF.md`, an archived roadmap, a prior session's +progress entry, a governing record, the session's own sense of what is +next — bounds or informs how the work is done and selects none of what +work happens. The session reads `AGENTS.md`, orients at the shallowest +`ORIENTATION.md` density that answers its question (D3 before designing +anything), and retrieves the task's governing records before it decides +or edits. A session holding no live task holds no objective, and its +whole next move is the rule-21(a) question. + +## Rule 14 — what a protected pause withholds + +A protected pause refuses the effect it names, and nothing more. An +owner gate on a paid run, a push, a merge, or an acceptance record +withholds exactly that one effect: the whole of what a gate blocks is +the effect named in it. Work the gate leaves unnamed continues under the +direction already given, and the owner keeps sequencing authority over +the whole of it — the session surfaces a discovered defect with a +proposed fix, and the owner chooses when it lands. The session +discharges every unprotected preparatory step and specifies the request +in full. It refuses a specified request on exactly two grounds: a failed +provenance predicate, or a failed scope predicate. The gate withholds an +effect and leaves the chat channel open (rule 21(a)). + +## Rule 15 — correct is a different claim from reachable + +A passing suite establishes that the code is right. The whole of what +establishes reachability is a named non-test caller — a process +entrypoint, a package script — so a suite of any size leaves +reachability exactly where it found it. Before every claim that a +capability is delivered, the session names that caller; when the set of +non-test callers is empty, it says so plainly in the same breath as the +claim. This repo has shipped the same defect three times, most recently +`StateStore.open()` with no caller outside tests behind 1,161 green +tests. + +## Rule 18 — retrieve before you decide or claim + +Exactly one thing discharges a load-bearing act's obligation to its +record: the source, retrieved and quoted this session. Every derived +representation — an orientation compression, a design record, a skill, a +memory, a sub-agent's report, this session's own earlier summary of a +file it read — carries the work and discharges none of that obligation. +Deciding what work to do and stating what a record establishes are both +load-bearing acts. The tell is that the session cannot name the file and +section it retrieved *this session*. A lossy summary reads exactly like +a faithful one from the inside, so retrieval is what corrects it. +`docs/architecture/CODE_MEDIATED_TEXT.md` §2.9 (the pillar applied to +authority) generalizes the rule ratified for papers in +`docs/RESEARCH_NOTES_COLLECTION.md` §3; Session 71 is the case; +`docs/architecture/SESSION_GOVERNANCE.md` and the trunk's authority ordering (code > glossary > prose, a live instruction outranking all three) are the chain it rests on. + +## Rule 21(a) — ask the collaborator + +The cheapest available move is a question in the chat channel (the +un-tool; owner-directed July 22, 2026). Declining to call anything and +asking is a move: no schema, no install, no recurring cost, and the only +move of any kind that resolves an underdetermined instruction at its +source. Two occasions are ambient — an instruction whose intent is +underdetermined, and a values or scope call that is the collaborator's +to make; rule 21(b) carries the standing-configuration case. The cap is +exactly one question, asked in the turn that has already discharged +every preparatory step rule 14 leaves unprotected. The session then +stops and waits, and the whole of what closes the question is the +collaborator's answer (owner ruling, July 22, 2026, +`docs/architecture/SESSION_GOVERNANCE.md` §2). Stopping is not standing +down: the preparatory work is done and reported when the question is +put. Asking resolves ambiguity in an instruction; the whole of what +closes a behavioral failure class is tooling shape (rule 8). A move with +no surface stays invisible until it is named, and this rule is that +name. Construction: `.claude/skills/spark-steering/SKILL.md` § *Ask +first — the un-tool* (derived; `docs/architecture/SESSION_GOVERNANCE.md`). diff --git a/.claude/skills/judge-composition/references/COMPOSITION_FROM_PRIMITIVES.md b/.claude/skills/judge-composition/references/COMPOSITION_FROM_PRIMITIVES.md new file mode 100644 index 0000000..3d95cd1 --- /dev/null +++ b/.claude/skills/judge-composition/references/COMPOSITION_FROM_PRIMITIVES.md @@ -0,0 +1,264 @@ +# Composition from categoric primitives + +**Status: FOUNDATIONAL LESSON — recorded July 19, 2026 (Session 71) at +owner direction.** States a design principle the house already held in +several places and enforced in none, and the failure that made its +absence visible. Changes no engine code and authorizes no build. Where +it touches ratified records +([`RECONCILIATION.md`](../product/epistemic-support/RECONCILIATION.md), +[`JUDGE_COMPOSITION_GAME.md`](../product/epistemic-support/JUDGE_COMPOSITION_GAME.md)), +those amend only by owner dated entry; §6 lists what is owed rather +than performing it. + +--- + +## 1. The principle + +**Harness functions compose from categoric primitives at each phase of +the work. There are no default instances.** + +A primitive is a parameter registry plus a schema plus a composition +method. An instance is a sparse selection from those registries, made +for the thing in front of it. The registries are stable and few; the +instances they admit are effectively unbounded, and every one is a +special case. + +- **A frame is invariant** — field names, verdict enums, schema + shapes, and the structural slots whose distinctness the design + depends on. +- **An instance is not** — selections, orientations, closed + taxonomies, names, angles. + +Writing an instance down does not make it a frame. Byte-pinning it, +registering it, or hard-coding it into a wire schema *promotes* it to a +frame without anyone deciding to, and afterwards the system can no +longer express the thing it was built to do. + +## 2. Why: examples anchor, primitives do not + +This is the [hypershot protocol's](../../.claude/skills/judge-composition/README.md) +reason for existing, and it is the load-bearing half of this record. + +We use primitives to **minimize the impact on downstream context**. A +hypershot is a frame with free variables — a fancy mad-lib — and it can +be anything within its reasoning shape. It primes *form* without +priming *content*. + +A concrete example does the opposite, and it does it permanently. If +the example is about changing a tire, every problem downstream starts +to look like changing a tire. The example does not sit quietly beside +the abstraction it was meant to illustrate; it becomes the prior +through which everything after it is read. That is why a hypershot uses +`{Warm_Professional_Response}` rather than `"Hi there!"`, and it is why +one zero-semantic frame implicitly enumerates every valid instantiation +while scattered samples only invite interpolation between themselves. + +**The failure this record exists for is that exact mechanism, operating +on the program's own documentation rather than on a model's context +window.** + +## 3. What actually happened + +The four judge roles entered this program as **teaching examples**. + +The composition concept was alien to a prior session. The collaborator +composed the knowledge to convey it, and — *for the purpose of teaching +the coding agent building Trellis* — supplied specific examples to +crystallize what composition IS and how it works. S10's eleven-judge +list is titled "A useful first ecology." The four roles were a handful +of options drawn from a vast potential space. + +They were never intended as a cast. + +But an example anchors. Across seven documents, each restating the +principle correctly in prose, the examples hardened into law: + +| Layer | What it says | What it encodes | +|---|---|---| +| S10 source | registries, not judges; a judge is a sparse selection | — | +| FOUR_JUDGE_DESIGN | the four are "a minimal ecology instance" | "a fifth judge with a blindness profile **already on the panel**"; per-role anchor fixtures | +| JUDGE_CONTRACT_TEMPLATE | frames with free variables | **taxonomy class names byte-identical across every invocation**; role enum closed in the wire schema | +| RECONCILIATION (ratified) | "a minimal ecology instance" | per-role taxonomies frozen as law; **"a four-role fixed panel"**, discarding S10's context-signature, semantic-retrieval and coverage layers | +| COMPOSABLE_RUBRICS_DESIGN | "composable" | *"'Adaptively-aligned' means the rubric **selection** fits the claim, not that the rubric mutates"* | +| EPISTEMIC_SUPPORT (doctrine) | — | "**a** panel of differently-blind roles — grounding, coherence, corroboration, and an audit role" | +| JUDGE_CONVOCATION_DESIGN | — | four manifests "**can land any time before the run as ordinary operator work**" | + +Each step is small and locally defensible. The composite is a default +cast with the composition machinery discarded. RECONCILIATION dropped +S10's layers 1, 2 and 5 — context signature, semantic retrieval, +coverage/complementarity — on the stated grounds that *"a four-role +fixed panel does not need"* them. That sentence is the hinge: true of a +fixed panel, and a fixed panel is the thing that must not exist. The +layers discarded are precisely the ones per-context composition +requires. + +**The general form: prose describes the primitive, machinery encodes an +instance, and machinery wins.** An instance that reaches a schema, a +byte-pin, a registration, or an operator checklist has become law +regardless of the hedge in the paragraph above it. This is +[`CODE_MEDIATED_TEXT.md`](CODE_MEDIATED_TEXT.md) pointed at design +records rather than content: the encoding is the claim. + +## 4. What the judges actually are + +**Collaborator framing (M. Murphy), owner-relayed July 19, 2026 — +recorded as direction and as the frame the program is building toward. +Not yet a dated entry in the ratified records.** + +The meta-prompt judges are a **Grothendieck cover over an arbitrary +linguistic topology.** + +A cover is not a cast. It is whatever collection of opens is needed to +cover the space in front of you, and it varies with that space. You do +not carry a standard cover between topologies; you construct one for +the topology you have, and the requirement it must satisfy is +**coverage** — *"we need total coverage!"* The house already holds the +other half of this: sections glue only where they agree, and +disagreement is an output rather than an average (S10's sheaf-style +gluing; IEG law L4; R-30's no-global-section outcome). + +Read that way, the design falls out: + +- **Four is not a number the design requires.** Role slots earn their + place by buying a blindness no other slot buys — that is what makes + their verdicts compose. A cover needs enough opens to cover, not four. +- **Judges are composed in language, from the REPL's own idea-space, + prior to evaluation.** The facts and beliefs in the REPL are the + topology; the judges are the cover constructed over it. +- **This reaches the audit seat too.** Judging judges largely fixes how + that seat can fail, so its failure taxonomy stays near-invariant — + but its *name and angle* compose per context and are load-bearing. + What the audit does depends on what it is judging the judges judge. +- **The space is vast.** On the order of 10^100 possible judges; every + one a special case. That size is not a problem to be managed, it is + the source of the system's power, and it is why this approach was + chosen. + +Consequently the composition meta-prompts must be **built and tested**. +Until they are tested, the system is trusted or simulated — never +assumed. + +**And this is not only about judges.** Other elements of Trellis are to +be treated the same way: think in categoric primitives and in how the +harness functions compose from them at each phase of the work. Judges +are simply the clearest object lesson in how it works. + +## 5. What it cost + +Session 71 was instructed to author four rubrics with fixed per-role +taxonomies, byte-pin them, ingest them, register them as a standing +roster, then find candidates for them to judge. It did all of that. The +work was clean by every check the house had: rubric questions verbatim +against RECONCILIATION §2, anchors five-and-five across every closed +class, extraction-free ingest, consistent uncontested read-back, green +drills, zero spend. + +It was the wrong object, and no check could have said so, because every +check derived from the same instance-promoted-to-frame. + +The collaborator stopped it in review. The registration was rolled back +and the fixtures deleted the same session — deleted rather than +relabeled, because §2 is the reason: four named judges sitting in the +repository under any label would keep anchoring every future judge to +those four. They remain in version history at `c9d417d`, which is +sufficient; preserving them anywhere else was over-caution. + +**The shape of the failure that made it reachable has its own name and +home:** *derived-source substitution* — acting on a compression of a +governing record instead of retrieving the record, on a load-bearing +act. It is the pillar's "never copies" applied to authority rather than +bytes, and it is stated normatively in +[`CODE_MEDIATED_TEXT.md`](CODE_MEDIATED_TEXT.md) §2.9, with the +operational rule at `AMBIENT.md` 18 and the authority ordering it +depends on at `AGENTS.md` §1.5. It occurred three times in this one +session; the instances below are the first and second. + +Three failures made it reachable: + +1. **The session never read the game record**, whose rule 4 forbids + what it built. No top-level index pointed there — not README, + AGENTS.md, docs/README.md, ORIENTATION, GLOSSARY, RESEARCH_MAP, or + EPISTEMIC_SUPPORT. Every reading path reached the superseded + FOUR_JUDGE_DESIGN.md first. +2. **The session never invoked the `judge-composition` skill**, which + states the invariant/adaptive split in its second paragraph. It + lived outside the repository, so it was not part of the collection a + session inventories. It is now versioned at + [`.claude/skills/judge-composition/`](../../.claude/skills/judge-composition/README.md). +3. **The instruction it followed was itself drift.** + JUDGE_CONVOCATION_DESIGN §11.2 item 3 was written July 19 — one day + *after* the game was ratified July 18. A ratified rule did not + propagate into the road map written beside it. + +The generalization worth keeping: **a green suite proves the instance +was built correctly and says nothing about whether it should exist.** +The house already knows correct ≠ reachable (`AMBIENT.md` rule 15); this +adds correct ≠ *the right kind of thing*. + +## 6. What is owed, and by whom + +Corrections to ratified records are owner acts by dated entry. This +record names them; it performs none. + +- **RECONCILIATION §1/§2** — per-role taxonomies and the "four-role + fixed panel" rationale need reframing as one composition instance, + and S10 layers 1, 2 and 5 reopening. +- **JUDGE_CONTRACT_TEMPLATE §1** — the layer rule places taxonomy class + names and role names on the invariant side; they belong on the + adaptive side, with the *shape* invariant instead. +- **JUDGE_CONVOCATION_DESIGN §11.2** — items 3 and 4 sequence + roster-then-docket; composition follows the candidate. Merging them + is the substantive fix. + +### 6.1 Resolved (dated entry — July 21, 2026) + +All three owed corrections have since landed by dated entry in their +home records; this register is closed. Verified this session: + +- **RECONCILIATION §1/§2** — RESOLVED by + [`RECONCILIATION.md`](../product/epistemic-support/RECONCILIATION.md) + §7.1 (July 19, 2026): §7.1(a) reads §2's completed definitions as one + composition instance, "not law"; §7.1(b) reopens S10 layers 1, 2 and 5 + behind their own proposal. +- **JUDGE_CONTRACT_TEMPLATE §1** — RESOLVED by + [`JUDGE_CONTRACT_TEMPLATE.md`](../product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md)'s + July-19 amendment (role and taxonomy names moved to the composed side) + and its July-21 dated correction carrying the one exception (the audit + seat's *failure* taxonomy stays invariant vocabulary). +- **JUDGE_CONVOCATION_DESIGN §11.2** — RESOLVED by + [`JUDGE_CONVOCATION_DESIGN.md`](../product/epistemic-support/JUDGE_CONVOCATION_DESIGN.md) + §11.2's July-19 dated entry merging items 3 and 4 ("composition + follows the candidate"), pointing to `JUDGE_COMPOSITION_CEREMONY.md`. + +The §6 intro rule stands unchanged: this record still performs no +corrections; it records that the ones it named were performed in their +home records. +- **EPISTEMIC_SUPPORT §5** — states a cast in adopted doctrine. +- **COMPOSABLE_RUBRICS_DESIGN §4** — "adaptive means selection, not + mutation" is the opposite of composition-from-primitives and needs + re-deciding before it is built. + +Index-surface repairs — not ratified-record edits — were made in the +same session; see [`docs/README.md`](../README.md) and `AGENTS.md`. + +## 7. The standing rule + +Before encoding any instance of a composed thing — a judge, a rubric, a +panel, a prompt cast — ask which side of the line it falls on: + +- Genuinely invariant across every context the system will ever meet? + It may enter a schema, a byte-pin, or a registration. +- One selection made for one context? It may not, however + well-evidenced. It is an example, it is labeled as one, and the + machinery must remain able to compose a different one. + +Two tells: + +**The plural test.** If a second instance would need a second +registration under a different name, the first was never a frame. + +**The teaching test.** If it entered the record to *explain* how +something works, it is an example, and examples anchor. Give it the +shortest half-life you can: illustrate, then delete. An example that +survives in the repository will be found by a later reader who has no +way to know it was only ever a mad-lib filled in once. diff --git a/.claude/skills/judge-composition/references/DOUBTS_WORKSPACE.md b/.claude/skills/judge-composition/references/DOUBTS_WORKSPACE.md new file mode 100644 index 0000000..083aa8d --- /dev/null +++ b/.claude/skills/judge-composition/references/DOUBTS_WORKSPACE.md @@ -0,0 +1,683 @@ +# The Doubts Workspace — Design Record + +**Status: DESIGN — PROPOSED July 20, 2026. Nothing built, nothing +authorized.** Origin: owner and collaborator direction (Cnid and +M. Murphy), relayed in session, following the derivation game recorded +at [`PRIMITIVE_ENCODING_AUDIT.md`](../product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md). +The brief, collaborator's words: *"a doubts workspace where +anti-composite frameworks exist… a user-and-domain-mediated +anti-constructive framework for defeating claims based on the facts."* + +Subordinate to [`WORKSPACE_AND_MODULES.md`](WORKSPACE_AND_MODULES.md) +§1's governing axioms and §4's workspace contract, which this mirrors +rather than reinvents. Where they disagree, that record wins. + +--- + +## 1. What is missing + +Defeat machinery exists today and is a **flag with a label**: +`r.contested = true`, `contestedReason = 'unsupported_citation'`, +`contestedAt`, `orphanedSourceIds` +([`entailment_detection.ts:280`](../../src/core/graph/entailment_detection.ts:280)), +plus quarantine contests on byte change. + +A doubt has no **body** (which facts defeat it — `unsupported_citation` +names a class and cites nothing), no **identity** (no address, so a +doubt cannot be cited, queried, or reasoned over), no **author** (sweep +and user assertions are indistinguishable), and no **defeasibility** +(a doubt cannot itself be doubted). + +So `-1` is currently *residual* — the absence of `+1`, plus a label. +This record makes it **constructed**: positive machinery that defeats, +grounded in facts. + +`grep -rn "doubt" src/ -i` returns nothing. The third REPL type has no +representation at all. + +## 2. The corrosion bound (keystone) + +> **A doubt may cite facts only. A doubt citing beliefs is not a doubt +> — it is a competing belief, and belongs in the beliefs workspace.** + +**Unbounded deconstruction defeats everything. Global skepticism is +free.** Any critique faculty that can ground itself in other critiques +will defeat every claim put to it, and its output carries no +information. This bound is what makes "anti-constructive" a usable +instrument rather than a solvent. + +It does three jobs at once: + +1. **Prevents skeptical collapse** — doubts cannot bootstrap from + doubts. +2. **Bounds the defeater regress structurally**, at one level. The + defeasible-reasoning literature needs a defeat-status computation + over a defeat graph; fact-grounding makes that unnecessary, because + every doubt's support chain terminates in the fact store. +3. **Makes the burden symmetric** — to doubt something you must ground + it, exactly as to promote something you must ground it. Doubt is + never cheaper than belief. + +**FALSIFIED AS WRITTEN — July 20, 2026. See §11 (analysis) and §12 +(empirical test and partial resolution).** An adversarial clean-context +analysis broke all three jobs above. The bound is retained because its +*positive-citation* requirement survives (§11's failed attack), but the +rule as stated is insufficient. The sentence that decides it: + +> §2 constrains the **standing tier** of what an objection cites, never +> the **provenance kind**, and §5 hands objections a direct path into +> the fact store. + +**Status after §12, July 20, 2026 — improved, not closed:** + +- The **relevance** gap (attack 3) is *not* a missing clause in §2. It + is handled one layer up by the applicability gate, and §2 should point + there rather than internalize it (§12.2). Resolved by architecture, + not by amendment. +- The **positive-citation core was empirically validated** against a + real corpus of naturally-occurring corrosive doubt — 13 of 14 + rejected, none admitted with a false conclusion (§12.1). +- The **bootstrap** (attack 1/2 laundering) and **cost** (attack 2 + volume) gaps remain open, with only proposed repairs (§11). + +So: nothing is built against §2 until bootstrap and cost close, but the +bound is on firmer ground than "falsified" alone conveys. + +The claim that this was "the least adjustable element of the design" is +preserved above as written, and was wrong in the direction that matters: +it was the least examined. + +## 3. Support covers; defeat searches + +Defeaters are **not** judges with an inverted sign. The composition +laws differ: + +| | Support | Defeat | +|---|---|---| +| Succeeds when | **enough** seats agree | **one** defeater lands | +| Composition law | a **cover** — total coverage, complementarity (S10 layer 5) | a **search** — reach; find the failing join | +| Shape | roughly universal | existential | + +Support spans the space; defeat penetrates it. Because the laws differ, +defeat needs its own workspace and its own composition method — this is +what earns "anti-composite frameworks," plural. + +## 4. Two defeat kinds + +Adopted from the defeasible-reasoning literature (Pollock) as **exterior +prior art**, per the collaborator's standing rule: *"exterior prior art +where permissible, derive where not via self-play."* + +- **Rebutting** — facts contradict the claim. Attacks the conclusion. +- **Undercutting** — the support chain does not transmit. The premises + may hold and the conclusion may even be true, but *this construction* + does not establish it. + +**Undercutting is the anti-composite operation**, and the system cannot +express it at all today. It attacks a *join* in the composition rather +than the claim itself. It is also what distinguishes this design from +deconstruction proper: deconstruction shows a text undermining itself on +its own terms; undercutting shows a support chain failing to carry, +judged **from the facts**. The facts are the user's and the domain's — +that is the mediation, and it is why the instrument is not a universal +solvent. + +## 5. The three fates of a doubt + +**Collaborator's formulation, recorded verbatim (July 20, 2026):** + +> "doubts expire like beliefs promote to facts! a doubt actually *can* +> be falsified! … I doubt that there are fireballs raining from the sky +> right now. That doubt may exist in the doubt workspace. However, we +> might find evidence that there is a meteorite shower. In that case, +> this doubt could technically bypass beliefs and become a fact through +> its expiry (which is technically the same as promoting it to a fact, +> unless my logic is mistaken)." + +**The conclusion is adopted: a doubt can promote directly to fact, +bypassing the beliefs workspace.** One annotation on the mechanism, +recorded beside the claim rather than folded into it (rule 15). + +**CONFIRMED July 20, 2026 — collaborator: "The three fates are +correct."** The annotation below was filed under rule 15 as a separate +artifact rather than merged into the claimant's words, and is promoted +here on the collaborator's recommendation and the owner's gate. The +verbatim formulation above is preserved unchanged; this is what rule 15 +is for in the direction that is easy to skip — a *correction* filed +beside a claim rather than over it. + +In the fireball example the doubt is *defeated*, not *verified*. What +becomes a fact is the doubt's **target** ("fireballs are raining"); the +doubt itself dies. The bypass appears because the meteorite evidence is +doubly-loaded — it supports the target *and* defeats the doubt in the +same instant. Promotion follows from the support, not from the expiry. + +The distinction is load-bearing: wiring *expiry → promote target* +promotes claims whose doubts died for unrelated reasons. Counterexample +— target "the deploy succeeded"; doubt "the logs show a 500 at 14:02" +citing a log block; the block is superseded on refresh, the doubt loses +its fact-ground and expires, and nothing whatever was learned about the +deploy. That is a laundering path of the same shape as the meet-rule +hazard. + +The case where the collaborator's claim holds exactly is +**verification**: a doubt "this citation does not support that +conclusion", once verified, makes "the citation does not support it" a +**fact** — doubt to fact with no belief stage. + +| Fate | The doubt | Its target | +|---|---|---| +| **Verified** | content promotes to **fact** | demotes | +| **Defeated** | dies | promotes **only if** the defeating evidence independently supports it | +| **Unresolved** | persists as long as its target does | unchanged | + +Symmetric with beliefs (promote / defeated / pending), which is what +makes doubts a peer tier rather than a graveyard. + +## 6. The workspace contract, mirrored + +From `WORKSPACE_AND_MODULES.md` §4: + +- **Capture is mechanical, not behavioral** (§4.1 — *"the single + biggest failure mode of prompt-convention scratchpads is reliance on + model discipline"*). Doubts must never depend on a model choosing to + record one. The mechanical sources already fire: quarantine on byte + change, the entailment sweep, refresh contests, hash-chain breaks. + **The cheapest first version of this workspace is giving those + existing findings a body** — cited facts and an origin stamp on + contests the engine already computes. Zero new model calls. +- **Identifiers structurally disjoint** (§4.2). AST hashes match + `^[0-9a-f]{64}$`; workspace segments are dashed uuids. Doubts need a + third shape, so a doubt can never be shape-confused with a fact or a + segment. §4.2 notes this class of decision cannot be retrofitted. +- **Origin-stamped.** Every doubt carries what raised it — sweep, user, + or composed defeater — and when. This is what a later user gate + reads, and what makes "the agent doubted X because Y" auditable. + +## 7. What doubts do not do + +**A doubt does not demote.** It attaches; the user gates whether +standing moves. This follows the ruling that the panel emits findings +and the user gates in both directions, and +`WORKSPACE_AND_MODULES.md` §13 (Explicit exclusions)'s *"autonomous +promotion (operator gate is absolute)."* + +One line the shipped system already draws, formalized rather than +overridden: + +- **Mechanical contest is automatic** — provenance broke, bytes + changed, the chain is dead. Quarantine does this today without a user + gate, correctly: nothing is being asserted about the world. +- **Semantic defeat is user-gated** — the claim is *wrong*. That is a + judgment about the user's domain, and the engine has no standing to + make it unilaterally. + +## 8. Composed defeaters + +A composed defeater is the anti-composite counterpart of a composed +judge: the same primitive (an orientation bound to an evidence locus), +composed per context from the user's domain, under the **search** law of +§3 rather than a cover law, and constrained by §2 to cite facts. + +**Schema-invariant (owner Cnid, July 21, 2026): a defeater is named, +defined, and instantiated with the *same schema as a judge*** — +the live judge schema (`purpose`, `claim_modes`, `select`, `orientation`, +`taxonomy`, `blind_to`, plus the ten-item anchor set) — its invariant field names +ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](../product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md) +(Layer rule), **not** `FOUR_JUDGE_BASIC_MODEL.md`, whose `hyperplane_parameters` YAML +was the program's superseded starting point (dated correction below). The +**methods and prompts change** — the search law not the cover law, an +`objection` not a verdict, the ∃ target not the ∀ cover — **but the schema +does not.** One schema, two instruments; the composition law is the +difference, and the shared schema is what lets a single composer emit +either seat from the same primitive (§3; STANDING_MODEL §1). + +Meta-prompt-generated defeater candidates are permitted and must be +tested before shipping (collaborator direction, July 20, 2026). This +sits on the **permitted** side of amended AB-8: composition, not +optimization over compositions. A metric-driven search for better +defeaters crosses into AB-8(b) and needs its own proposal. + +**Dated citation correction (July 21, 2026, owner Cnid + collaborator Matt + Claude, this +session).** §8's schema citation above previously named `FOUR_JUDGE_BASIC_MODEL.md`'s YAML, +but that S10 submission's per-seat schema is `hyperplane_parameters` (the UHE four-plane +model), **not** `select`/`taxonomy`/`blind_to` — a cross-schema mis-attribution introduced +with this paragraph (PR #155). The field names listed are the **live** schema, ratified in +`JUDGE_CONTRACT_TEMPLATE.md` (Layer rule); the citation now points there. A blind self-play +evaluation this session (two runs — a three-way schema comparison and a categorized-`select` +head-to-head, blind judge panels, `$0` paid) confirmed the direction: `taxonomy` + `blind_to` +are the stronger primitives; flat `select` beat **both** the rigid four-plane buckets *and* a +plane-categorized `select` at the per-seat level; and the four-plane structure's only plausible +remaining home is **panel-coverage composition** (a concept, untested), not a per-seat field. +The UHE four-judge model was the program's *starting point*; the schema outgrew it. See +[`FOUR_JUDGE_BASIC_MODEL.md`](../product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md)'s dated +supersession note. + +## 9. Scope — this is a critique engine + +**Owner framing (Cnid, July 20, 2026):** the feature set is useful for +**any kind of critique** — a reviewer for a professional journal, a film +critic, and so on. + +This is a scope statement, not a metaphor. The machinery is a general +critique instrument: composed defeaters searching a fact base for the +join that fails, grounded in the user's own corpus, with the corrosion +bound keeping the output informative. The domain supplies the facts; +nothing in §§2–8 is Trellis-specific. + +It is also the sharpest available test of the corrosion bound. A critic +who can ground objections only in other objections is exactly the +failure mode §2 forbids, and it is a recognizable one outside software. + +## 10. Vocabulary (GATED July 20, 2026 — owner, in session) + +One word was doing two jobs. The collaborator's test: *"synonyms are +powerful, and connotation might be a guide — is there a clear rename +path for one of them that **covers** Trellis better?"* + +**Rename the object; keep the standing.** The standing sits in a triad +whose parallelism is load-bearing and user-facing (`fact / belief / +doubt`, a held attitude beside a held attitude); the object sits in a +workflow whose *verbs* were unnamed. + +| Term | Job | +|---|---| +| **doubt** | the **standing** of a claim at `-1` | +| **objection** | the **object** that attacks a claim, cites facts (§2), and has the three fates of §5 | +| **defeater** | the composed **instrument** that searches for objections (§8) | + +The connotation carries the fates without forcing: an objection is +**sustained** (§5 verified), **overruled** (defeated), or +**outstanding** (unresolved). That vocabulary already exists in review +and criticism, which is the §9 coverage test passing — *"the reviewer's +objection was sustained"* needs no translation. It also fits the house +register, which is already juridical (contest, ratify, docket, +convocation, remand, merit-refuse). `defeater` stays as the §4 prior-art +term for the instrument, where jargon is appropriate. + +**This resolves the `contested` question.** Under this vocabulary +`contested` stops being a primitive flag and becomes **derived** — *does +this claim carry outstanding objections?* Sweeps raise objections; +re-derivation from live provenance overrules them; `contested` computes +false. The four `alias_resolution.ts` call sites need no migration, and +the result is strictly more informative: the system can be asked *which* +objection, which the boolean can never answer. + +**Learning (dated July 21, 2026 — owner Cnid, in session): a doubt is +*based on* its objection(s).** The objection is the body; the doubt is +the standing that body confers (§1); the defeater is what composes the +objection (§8). The dependency runs one direction — **objection → doubt** — +so a doubt with no surviving objection is empty, which is exactly why +`contested` is *derived from outstanding objections* above rather than +asserted. This names, as a single relation, the symmetry §15 audits: the +`-1` pole's object is the objection, and the doubt rests on it the way a +`+1` fact rests on its verified source bytes. + +## 11. Adversarial analysis of §2 (July 20, 2026) + +Run as an isolated clean-context sub-agent over this document alone, +with no access to the composer's reasoning, authorship, or +expectations. **Verdict: insufficient.** Four attacks; the first was +pre-registered by the composer before the prompt was authored (rule 11), +the other three were not predicted. + +**Attack 1's standing was downgraded the same day — see the note at the +end of this section. Attacks 2, 3 and 4 are unaffected.** + +**1. The laundered bootstrap — succeeds.** An objection cites fact `B`; +verified, its content promotes to a fact `F1` (§5); a second objection +cites `F1`, which is a fact, satisfying §2; iterate. §2's job #1 +("doubts cannot bootstrap from doubts") fails through the promotion +door. Job #2 holds *literally and vacuously* — the chain terminates in +the fact store while remaining a chain of critiques end to end. The +defeat graph §2 claimed to make unnecessary still exists; it has been +moved into the fact store with its edges erased. The operator gate +slows this without stopping it, because every local approval is +correct: each gate asks "does this citation support that conclusion?", +never the global question. + +**2. Unbounded existential search — succeeds.** §2 prices a *single* +objection and is silent on objections *per target*. Generate many legal +defeater candidates (§8 permits this), run them all, keep the one that +lands. This falsifies job #3 ("doubt is never cheaper than belief") +directly against **§3's own table**: support must satisfy a cover +(universal), defeat needs one hit (existential). §2 asserts a symmetry +that §3 denies. Whether candidate-generate-then-select is AB-8(b) +optimization or the §3 search law is genuinely ambiguous as written. + +**3. Relevance-free grounding — succeeds.** §2 requires that grounds +*be* facts; it never requires that the cited fact *bear on* the target. +Cite one fact true of every composed claim in the corpus, compose one +defeater around it, and the whole corpus computes `contested` under +§10 — no forged facts, no rule broken. Global skepticism is not free, +but it is priced at one fact citation amortized across everything, +which at scale is indistinguishable from free. + +**4. Undercuts route to the ungated branch — a determinacy gap.** +§7 discriminates on whether something "is being asserted about the +world." §4 defines undercutting as precisely the operation that asserts +nothing about the world — "the premises may hold and the conclusion may +even be true." So by §7's own criterion an undercut fires *mechanically +and ungated*. The document never says which branch it takes. **The +design's headline capability is the one its gate most plausibly +exempts.** + +**The attack that failed, and what it reveals.** Grounding an objection +in the *absence* of a fact ("nothing in the corpus establishes this +join") defeats every non-exhaustively-enumerated claim, needs no +laundering and no candidate volume — and is blocked cleanly, because +§2 demands an objection *cite* facts and an absence-grounded objection +cites zero. Repairing it by promoting "the corpus contains no fact +establishing `J`" fails too: a completeness claim over the corpus is +derived, not verified bytes, so it is a belief and §2 rejects it by +name. + +**So the bound's real strength is the *positivity* of the citation +requirement, not the standing tier it names.** That is the part to keep. + +**Repair directions — proposed, not adopted, none authorized:** + +- *Bootstrap:* distinguish world-facts from critique-derived facts and + require at least one non-critique-derived ground. This is the + hash-kind-in-the-address move a third time, reusing machinery already + accepted for the user-gated stamp and the meet rule. +- *Relevance:* require the cited fact to be reachable from the target's + own citation chain, or to contradict a member of it. Mechanical, and + it kills attack 3. +- *Cost asymmetry:* either withdraw job #3 as false, or add a + per-target objection budget. Job #3 cannot stand beside §3's table. +- *§7:* state the branch explicitly. Only provenance-mechanical breaks + (bytes changed, hash dead) plausibly belong ungated; semantic + transmission is a domain judgment even when it asserts nothing about + the world. + +**Attack 1 downgraded — July 20, 2026, same session.** A later probe +established that this run does not support attack 1 as an *independent* +finding, on the composer's own published rules: + +- **The forecast shared bytes with the evidence, not the task text.** + §5 — composer-authored, and the analyst's entire evidence universe — + already carries the mechanism (*"doubt to fact with no belief + stage"*), the hazard (*"promotes claims whose doubts died for + unrelated reasons"*), and the word: *"That is a laundering path."* + The rule-11 defence offered above was that the forecast stayed out of + the task text. Failure mode 2 of the `judge-composition` skill + answers it: **the channel moves; audit for the content, not the + location.** The analyst did not independently find a laundering path; + it read one in §5 and pointed it at §2. +- **The prediction was tautological.** §5's promotion door is a + composer-authored gate, and rule 11 strikes predictions of + composer-authored gates from calibration. The composer's + "1-for-4" tally is therefore **0-for-4**. +- **Rule 9 was not satisfied.** Composer conflict must be *externally + reviewed*, never self-absolved. One sub-agent ran, no audit seat, and + the independence claim above was made by the interested party about a + run only that party observed. + +Attack 1 is re-filed as **the composer's own unreviewed conjecture +about the composer's own keystone** — a legitimate thing to record and +a different thing from a falsification. §2 still falls, but it falls on +attacks 2, 3 and 4, which no leaked vocabulary supplied. + +## 12. Empirical validation and the two-layer resolution (July 20, 2026) + +§11 broke §2 by analysis. This section records what a live test then +established, and resolves one of the four gaps §11 opened. + +### 12.1 Stage-2 test — the fact base rejects corrosive doubt + +The question tested: *does a fact base, via the admission test, reject +naturally-occurring corrosive doubt at the per-objection level?* — not +the tautological *does the final verdict come out "sphere"*, which every +fact-grounded design produces and which therefore discriminates nothing +(rule 11). + +Construction, in order, each stage blind to the next: + +1. A **fact base** on the figure of the Earth — ~35 items across three + disjoint scopes — was compiled by three sub-agents **none of which + was told a dispute exists**, so facts were not selected to refute a + known position. Retained verbatim at + [`fixtures/doubts_workspace/earth_figure_factbase.md`](../../fixtures/doubts_workspace/earth_figure_factbase.md). +2. A **corpus of fourteen flat-earth arguments** was compiled as their + proponents actually state them. **Eleven of the fourteen cite real, + correctly-reported observations** (genuine Chicago-skyline + photographs, a correctly-derived surveying formula, the real null + results of Airy and Michelson–Morley, the actual Antarctic Treaty). + This is fact-citing corrosive doubt — the Class-B case the composer + had failed to manufacture by hand across six prior probes; the world + supplied it. +3. A **blind evaluator** applied the admission test, seeing neither the + composer's predictions nor that sufficiency was under test. + +**Result: 13 rejected, 1 admitted, and zero admitted with a false +conclusion.** The pre-committed failure condition — *≥1 corrosive +objection survives → the bound is insufficient* — was **not met**. The +composer had a disclosed stake in the opposite outcome (rule 9); the +result held against that stake, and the measurement was fixed before any +data was seen. + +**Why it held is the load-bearing lesson.** The test is a *derivation* +test — *no load-bearing step may rest on a belief or unverified +assertion* — **not** a citation test. Almost none of the 13 rejections +turned on a false citation; they turned on a broken **inferential** step +over true facts: + +- Chicago skyline — the photographs are real; *"curvature should + conceal it"* needs an unmeasured refraction coefficient. +- Eight-inches-per-mile² — the formula is correctly derived; it computes + drop below the tangent, not height concealed from an elevated + observer. +- Ring laser gyroscope — the proponents' own instrument read **15°/hr**; + the fact base gives ω = 7.292115×10⁻⁵ rad s⁻¹ = **15.04°/hr**. They + measured the rotation they were denying. + +Corrosive doubt characteristically fails at an inferential joint, and a +derivation test is precisely the instrument that catches inferential +joints. A citation test would have admitted most of these. + +### 12.2 The two-layer resolution of the relevance gap + +The one admission (scriptural firmament: *raqia / chug / four corners → +the text describes a flat earth*) is a **sound** derivation from facts +about a text — admitted correctly, true, and **irrelevant** to the +Earth's figure. §11 read this as a hole in §2. It is not a hole in §2; +it is a **layer confusion in the test**, and the composer's. + +The stage-2 test applied the admission rubric **in isolation**, to +pre-composed free-floating objections. The integrated architecture does +not present doubts that way. A doubt is produced by a **defeater composed +from primitives that discriminate the target's context** — the program's +founding thesis, and the `evidence_locus` result of the derivation games +that produced this record. Relevance is **locus intersection**: a +defeater aimed at *the Earth's figure* composes from geodetic loci; a +scriptural-textual claim's locus does not intersect them, so the defeater +either cannot be composed or can only **jurisdiction-abstain** (the +applicability gate already in the engine at `judge_panel.ts:464`). + +So the system is two layers, and each carries one job: + +| Layer | Job | Mechanism | +|---|---|---| +| **Admission** (§2) | **positivity** — is every load-bearing step a fact? | the derivation test | +| **Applicability** | **relevance** — does the doubt's locus meet the target's? | locus intersection / jurisdiction abstention | + +Together they are complete. **§2 should therefore point at the +applicability gate for relevance rather than grow a relevance clause** — +the "discrimination criterion" the composer thought he was *importing* +into §2 was never an addition to the bound; it already lived at the +applicability layer, and the isolated single-layer test could not see +it. Item 14 leaks the isolated rubric and jurisdiction-abstains in the +integrated system. + +**Standing of this resolution:** a design argument, corroborated by the +`evidence_locus` games that built this record, **not** itself exercised +by stage-2 (which tested the isolated admission layer). The applicability +gate has never been run against a composed *defeater*; that is a build +item, not a settled result. + +### 12.3 The workspace membership rule this establishes + +A doubt is admitted to the workspace only if it **survives the fact +base**. Two survivors, mapping onto §5's fates: + +- **fact-grounded** doubts that defeat a claim (sustained); and +- **unverifiable** doubts the facts do not reach — *"I doubt the game is + simple"* — which **gate to the user like a preference**, a permitted + skeptical lens, symmetric with an unverifiable belief. + +A doubt the fact base **refutes**, held anyway, is **delusion**, and is +not admitted. Stage-2 is the validation of exactly this gate: 13 of 14 +delusional doubts refused entry. *(The membership rule and the +unverifiable-lens symmetry are recorded here as they were reached in +session; they extend §5 and §7 and are owner-owed as dated additions to +those sections, not silent edits.)* + +## 13. Open items + +- **§2 relevance gap — RESOLVED (§12.2)** to the applicability layer; + §2 needs a one-line pointer there instead of a relevance clause. + Superseded as an open item. +- **§2 bootstrap and cost gaps — still open.** The proposed repairs + (§11) are not adopted and each needs its own proposal. Nothing is + built against §2 until these close. +- **§2's job #3 contradicts §3's table** and one of the two must be + withdrawn. An internal inconsistency in this record, not an open + design question. +- **§7's branch for undercuts is undetermined** — the gap is in this + record, and it exempts the capability §4 calls the headline one. +- **The §10 vocabulary** is gated by the owner (July 20, 2026) but + renames nothing until the rename lands as its own change. +- **The §12.3 membership rule and unverifiable-lens symmetry** are + owner-owed as dated additions to §5 and §7. +- Nothing here is authorized. Each mechanism is a separately gated + bounded feature and needs its own proposal before implementation. + +## 14. Ratification (dated entry — July 20, 2026, owner, in session) + +The owner ratified the doubts-workspace design as **principle and +direction**, with one part explicitly carved out because it is falsified +and one part left explicitly open. Ratification authorizes **no build**; +each mechanism remains a separately gated bounded feature (§13). +Companion: [`STANDING_MODEL.md`](../product/epistemic-support/STANDING_MODEL.md) +(the `-1` this tier holds). + +**RATIFIED as principle:** + +- **§1 — doubts are a first-class REPL type**, constructed rather than + residual. Direction ratified; the addressable-object build is gated. +- **§2 (the corrosion bound), PARTIAL — see the carve-out below.** +- **§3 — support composes as a cover, defeat as a search.** Ratified; + defeaters are never judges with an inverted sign. +- **§4 — rebutting / undercutting** as the two defeat kinds (Pollock, + exterior prior art). +- **§5 — the three fates** (verified → fact, defeated → dies, unresolved + → persists). Collaborator-confirmed; ratified as law. +- **§10 vocabulary — doubt / objection / defeater.** Now ratified as + canonical (was gated). It **renames no code** until the rename lands + as its own build; `contested` becomes a derived predicate over + outstanding objections. +- **§12.2 — the two-layer resolution.** Ratified as the architecture: + §2 carries *positivity*, the applicability gate carries *relevance*. + Its one untested flank is recorded — the applicability gate has never + run against a composed **defeater**; that is a build item, not a + settled result. +- **§12.3 — the membership rule.** A doubt enters the workspace only if + it **survives the fact base**; a fact-refuted doubt held anyway is + **delusion** and is refused. Unverifiable doubts gate to the user like + a preference, symmetric with unverifiable beliefs. Ratified as law and + hereby adopted into §5/§7 by this dated entry (the owner-owed addition + §13 named). + +**CARVE-OUT — §2 is NOT ratified as sound.** Only its +empirically-validated core is ratified: + +- **RATIFIED:** the **positive-citation requirement** — a doubt must + *cite* facts, not ground itself in absence — which survived adversarial + analysis (§11's failed attack) and was validated against a real corpus + (§12.1: 13/14 flat-earth arguments rejected, zero admitted-false, the + measurement fixed before the data and against the composer's disclosed + stake). The rule is a **derivation** test, not a citation test. +- **NOT RATIFIED / STILL OPEN:** the **bootstrap** gap (attacks 1–2 + laundering, §11) and the **cost** gap (attack 2 volume; job #3 + contradicts §3's table). The proposed repairs are not adopted. **§2 as + a complete bound is not built against until these close.** Ratifying + the bound whole would be the exact instance-promotion failure this + program guards against. + +**Evidence basis, recorded because ratification followed test.** The +positive-citation core was ratified because it *passed a blind empirical +test*, not because it was argued; the two-layer architecture because it +was *corroborated by the evidence-locus games*; the fates because the +*collaborator confirmed* them. Where an item rests on argument alone +(§12.2's untested defeater flank), that is marked, not smoothed over. + +## 15. Parity audit with the support side (dated addition — July 21, 2026, owner Cnid + Claude, in session) + +Recorded as this session's learning; **ratifies nothing new** and authorizes +no build. It consolidates the doubt-vs-fact symmetry already distributed across +the sections above and names one new gap. The audit walked ten dimensions of +the `-1` and `+1` poles around belief (`0`): + +| dimension | fact side `+1` | doubt side `-1` | parity | +|---|---|---|---| +| standing | fact | doubt | **symmetric** (§1; STANDING_MODEL §1) | +| the object it is built on | *unnamed as a single noun* | **objection** (§10) | **GAP — see below** | +| the instrument | judge | defeater | **symmetric** — one primitive (§8) | +| composition law | cover (∀) | search (∃) | **asymmetric BY DESIGN** (§3) | +| typed kinds | grounding / coherence / corroboration / audit | rebutting / undercutting | **symmetric** (§4) | +| the three fates | promote / defeated / pending | verified / defeated / unresolved | **symmetric** (§5) | +| grounding rule | provenance / source bytes | positive-citation of facts | **symmetric burden** (§2, positivity core only) | +| membership | survives the panel + gate | survives the fact base, else delusion | **symmetric** (§12.3) | +| user gate | gates promotion | gates demotion; mechanical contest auto | **symmetric** (§7; STANDING_MODEL §3) | +| build status | **built** | **proposed** (`grep doubt src/` = nothing) | **NOT BUILT** (§1) | + +**Reading:** seven dimensions symmetric (as principle), one asymmetric by +design, two open. The design asymmetry is a feature — *support covers, defeat +searches* — never a parity defect. + +**New gap — the fact side's object has no name.** §10 gave the doubt pole a +clean triad `doubt / objection / defeater`. The fact pole names its **standing** +(`fact`) and its **instrument** (`judge`), but the **object** an objection +mirrors — the fact-grounded thing that *supports* a claim — has no single noun; +it is carried implicitly by judge findings and the J3 *corroboration* role. To +make the two triads read as one, the support-side object wants a name. +**Owner-owed**, gated like the §10 rename. Candidate register (juridical, per +§10): `corroboration` (collides with the judge role), `attestation`, +`submission`. Not adopted here. + +**Resolved this session (July 21, 2026 — collaborator M. Murphy delegated the +choice, owner Cnid endorsed proceeding): the name is `affirmation`.** It is the +fact-grounded object that *affirms* a claim — the direct antonym of the +`objection` that *attacks* it — and it fills the same slot: the fact-grounded +**support object**, never the candidate. That is why `claim` and `proposal` +(floated in session) were set aside: they name the thing supported, not the +support. Collision check that decided it: `corroboration` = the J3 judge role; +`submission` = `STANDING_MODEL.md §2`'s vote; `attestation` = +`HARNESS_SELF_MODEL.md §8`'s informing surface; `warrant` = the `warranted` +adjective; `affirmation` returned zero repo hits and takes the slot cleanly. The +two triads now read as one — **affirmation / fact / judge** ↔ +**objection / doubt / defeater** — differing only by the §3 law (cover ∀ vs +search ∃). Gateable: one owner word overrides it. + +A **three-round clean-room self-play** (July 21, 2026) probed whether the label +`affirmation` biases a reasoner's grounding judgments (connotation → auto-validation). +Across clear items, humanized marginal items (iterated builder, independently +key-verified 12/12), and a rubric-stripped condition, the name showed **no detectable +output bias** — the positive control `proof` (the most auto-validating word a blind +adversary could name) never fired either, so the honest reading is **"no detectable +connotation harm," not "proven neutral"** (single-word priming sits below the detection +floor for a capable model doing explicit adjudication). A third round (Matt-directed) +spread the label across the **full connotation axis** — validating, neutral, a +counter-label (`bunk`), and a nonsense token, 12 blind trials — and every label produced +identical 8/8 verdicts, strengthening the null past the near-synonym limit of rounds 1–2. +`affirmation` **retained**; the self-play method-learnings (including *controls must span +the manipulated axis*) were written into the `self-play` skill. + +**Restated gap — build parity.** The larger asymmetry is §1's: the fact side is +built and the doubt side is not. No new claim; recorded so the audit is honest +that "symmetric" above means *as principle*, not *as shipped*. + +A visual of this audit was produced this session as a private Artifact +(current-state parity map); it is provenance, not authority, and this record +governs on any drift. diff --git a/.claude/skills/judge-composition/references/FOUR_JUDGE_BASIC_MODEL.md b/.claude/skills/judge-composition/references/FOUR_JUDGE_BASIC_MODEL.md new file mode 100644 index 0000000..2cf8569 --- /dev/null +++ b/.claude/skills/judge-composition/references/FOUR_JUDGE_BASIC_MODEL.md @@ -0,0 +1,202 @@ +# The Four-Judge Basic Model (Collaborator-Supplied) + +**Provenance:** authored by the external polymath collaborator and +supplied to the program July 16, 2026, for ingestion as the +reconciliation input FOUR_JUDGE_DESIGN.md §10.1 was waiting for. +Committed verbatim below the rule; nothing edited. Register entry: S10. +The PCF mathematical-foundation reference (arXiv:2508.01581) is queued +as S11 — unread in-session; its rough-fuzzy claims stay uncanonized +until the artifact is acquired (the S6 rule). + +**Terminology addendum (collaborator, July 16, 2026, after commit):** +**UHE = Unified Hyperplane of Experience** — "the training distribution +of vast corpora of human text describing all manner of experience +across the four planes" (Emotional/Logical/Sensorial/Ethical). The +collaborator's terminology is recorded in R-31 (twice-refined, July 16, +2026): UHE is a **loaned Lexideck house term** (~3 years of agentic +R&D) — the authoring-side matrix mathematics of the vocabulary-space — +while **the J-space object is the un-verbalized stream parallel to +execution**; "J-space Target" / "J-space Prediction" are acceptable +substitute concepts. The load-bearing property: such objects are +**external to execution, summarizing it or operating in parallel to +it**. No phenomenology is claimed by anyone. The program's unifying +frame built on this is RESEARCH_MAP §4.10 (the externality principle). + +--- + +> **Dated supersession note (July 21, 2026 — owner Cnid + collaborator Matt, via self-play).** +> The per-seat `hyperplane_parameters` YAML below (the UHE four-plane model) was the program's +> **starting point** for a composed judge/defeater seat (S10, July 16, 2026). The **live per-seat +> schema has since evolved** to `purpose` · `claim_modes` · flat `select` · `orientation` · +> `taxonomy` · `blind_to`, ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) +> (Layer rule). A blind self-play evaluation this session (two runs, blind judge panels, `$0` paid) +> found the added `taxonomy` + `blind_to` are the stronger primitives; that flat `select` beat +> **both** the rigid four-plane buckets *and* a plane-categorized `select` at the per-seat level; +> and that the four-plane structure's only plausible remaining home is **panel-coverage +> composition** (spanning seats across planes) — a concept, not a per-seat field, and untested. +> *"We outgrew the UHE-based per-seat judges"* (Matt). The body below is preserved **verbatim** as +> the S10 provenance record; nothing in it is edited. Provenance cross-refs: +> [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8 (citation correction). + +## The basic model + +- The four hyperplanes are not themselves four judges. They are expandable parameter registries: +- Emotional: affect, empathy, grief, trust, motivation, dignity, relational consequences. +- Logical: deduction, induction, abduction, Bayesian inference, causal reasoning, counterfactuals, falsification, consistency. +- Sensorial: observation quality, signal fidelity, embodiment, usability, accessibility, spatial and temporal coherence. +- Ethical: harm, benefit, rights, duties, justice, care, consent, autonomy, legitimacy, proportionality. + +A judge is then a sparse selection from these registries: + +```yaml +judge: + name: + purpose: + + claim_modes: + - fact + - inference + - prediction + - value + - belief + - experience + + hyperplane_parameters: + emotional: [] + logical: [] + sensorial: [] + ethical: [] + + orientation: + evidence_standard: + uncertainty_posture: + temporal_horizon: + stakeholder_scope: + reversibility: + contradiction_sensitivity: + abstention_boundary: + +``` + +These are parameters, not rules. Their implementations, weights, thresholds, and composition operators can remain open. + +## A useful first ecology + +- Epistemic Reliability Judge +> Evidence quality, induction, Bayesian confidence, falsifiability, source dependence, observation fidelity. +- Formal Coherence Judge +> Deduction, consistency, constraint satisfaction, counterexamples, contradiction sensitivity. +- Engineering Adequacy Judge +> Causality, troubleshooting, failure modes, observability, usability, safety, reversibility. +- Human Impact Judge +> Empathy, dignity, accessibility, stakeholder distribution, harm, temporal consequences. +- Ethical Legitimacy Judge +> Rights, duties, justice, consent, proportionality, care, integrity. +- Lived Experience Judge +> Affect, embodiment, perceptual fidelity, testimony, cultural context, dignity. +- Belief-to-Fact Judge +> Claim type, evidence quality, source reliability, falsifiability, uncertainty, and the distinction between private meaning and public truth. +- Tragedy and Witness Judge +> Grief, dignity, historical fidelity, harm, cultural context, restraint. It judges whether something bears witness adequately, not whether tragedy has been “solved.” +- Decision Robustness Judge +> Counterfactuals, uncertainty, reversibility, failure recovery, long-term effects, affected populations. +- Adversarial Judge +> Hidden assumptions, contradiction, manipulation, Goodharting, omitted stakeholders, brittle evidence. +- Coverage Meta-Judge + +> Identifies relevant parameters, abstentions, missing coverage, unresolved disagreement, and the need for another judge. + +I think semantic similarity is necessary, but not strong enough to be the gluing condition by itself. + +Its proper role is candidate retrieval. It answers: + +> Which judges appear relevant to this case? + +Actual sheaf-like gluing asks a stronger question: + +> Do these locally relevant judges remain compatible where their jurisdictions overlap? + +That distinction matters. Two judges can be semantically close while contradicting each other, sharing the same blind spot, or leaving an important UHE region uncovered. + +PCF already gives us a natural matching structure through rough fuzzy classification: graded membership plus a distinction between definitely applicable and possibly applicable configurations. [That is explicit in PCF’s stated mathematical foundation](https://arxiv.org/abs/2508.01581). + +## Judge matching as rough-fuzzy routing + +For a context \(c\), semantic similarity can place judges into three regions: + +- Lower approximation: definitely applicable +- Boundary region: possibly applicable +- Exterior: no meaningful jurisdiction, so abstain + +For example, on an engineering specification: + +- Engineering Adequacy is definitely applicable. +- Formal Coherence is definitely applicable. +- Human Impact may occupy the boundary if people operate the system. +- Tragedy and Witness is outside. + +This makes semantic similarity a very good approximation of the cover-selection step. It identifies which local sections might cover the context. + +It does not yet glue them. + +## The stronger matching stack + +I would use six layers: + +1. Context signature + Identify claim mode, evidence type, stakes, stakeholders, time horizon, and implicated UHE parameters. + +2. Semantic retrieval + Retrieve judges whose purposes and parameters resemble that signature. + +3. Applicability gate + Check whether the judge can actually address this claim mode. A judge of testimonial credibility may concern the same topic as a factual verifier without being qualified to establish the fact itself. + +4. Compatibility gate + Exclude internally contradictory compositions and judges whose required assumptions conflict with the case. This should be a hard gate, not merely another similarity score. + +5. Coverage and complementarity + Select a small set that covers the relevant UHE parameters while avoiding redundant judges. + +6. Overlap test + After judging, compare their local conclusions on shared parameters. Compatible restrictions can be composed. Incompatible restrictions remain explicit or go to a meta-judge. + +A routing score could be: + +\[ +R(j,c)= +w_s S_{\text{semantic}} ++w_a A_{\text{applicability}} ++w_m M_{\text{marginal coverage}} ++w_k K_{\text{calibration}} +-w_r R_{\text{redundancy}} +\] + +subject to: + +\[ +C_{\text{compatibility}}(j,c)=1 +\] + +The weights can remain open parameters. + +## Where the sheaf analogy actually lands + +The clean correspondence is: + +- Semantic similarity defines neighborhoods. +- Rough-fuzzy membership identifies the cover. +- Each judge supplies a local section over part of the UHE. +- Compatibility on overlaps supplies the gluing condition. +- The composed ruling is the global section. +- Unresolved disagreement means no valid global section presently exists. + +That last result is important. We should never force gluing merely because every selected judge produced an answer. + +This also fits the grader paper’s failure-expecting architecture: atomic evaluators may abstain, compositions remain inspectable, and outside audits detect failures that the selected metric cannot see. [The paper treats abstention and independent auditing as structural safeguards](https://arxiv.org/pdf/2607.12790). + +So I would preserve what PCF did, but sharpen its interpretation: + +> Semantic similarity is the routing prior and fuzzy membership function. It approximates cover construction, not sheaf gluing itself. + +The actual gluing mechanism needs compatibility on overlaps, plus coverage, calibration, and explicit permission for failure to glue. \ No newline at end of file diff --git a/.claude/skills/judge-composition/references/FOUR_JUDGE_DESIGN.md b/.claude/skills/judge-composition/references/FOUR_JUDGE_DESIGN.md new file mode 100644 index 0000000..6b0a200 --- /dev/null +++ b/.claude/skills/judge-composition/references/FOUR_JUDGE_DESIGN.md @@ -0,0 +1,327 @@ +# The Four-Judge System — Design Record + +**Status: PROPOSED — DESIGN ONLY.** Nothing implemented, measured, or +accepted. July 16, 2026. Document-driven design: this record leads; any +implementation follows it as a separately authorized bounded feature. + +**Reconciliation flag (read first — updated July 16, 2026, late +session).** This record was architected from the program's evidence +base *without* sight of the collaborator's system. **The collaborator's +design has now been supplied and committed verbatim as +[`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md)** (register +S10, claims R-28…R-30). Its central reframe: the "four" are +**hyperplane parameter registries**, not four judges; a judge is a +sparse selection from them; the working system is an **ecology**. This +record's four roles read, under that frame, as a *minimal ecology +instance for belief-support* — the layers compose rather than compete. +Ingestion and reconciliation are Session 66's first task (§10.1); +until owner ratification, neither design is authoritative over the +other. + +**Third amendment (July 17, 2026, Session 66): §10.1 item 1 is +EXECUTED.** The reconciliation record — +[`RECONCILIATION.md`](RECONCILIATION.md) — carries the layer mapping, +the four completed role definitions in S10's YAML schema with +per-field sources, the adopted composition design (R-29 hard +compatibility gate; R-30 no-global-section), the per-role verdicts +with falsifiers, and the enforcement/pin table. The panel drills of §7 +items 1–3 are implemented in the same PR +(`npm run test:judge-panel`). **Fourth amendment (July 18, 2026, +Session 67): RATIFIED.** RECONCILIATION §7 carries the owner's dated +entry. The verdicts there are binding, the co-equality is ended, and +**RECONCILIATION.md governs this record wherever the two differ** — its +layer mapping, completed role definitions, composition design (R-29, +R-30), and §5 enforcement table are authoritative. This record stands as +the architecture it graduated from; read it with RECONCILIATION beside +it. `JUDGE_COMPOSITION_GAME.md` §11 was ratified in the same act. + +**Fifth amendment (dated note — July 19, 2026, Session 71; a +correction pointer, not a re-decision).** This record's §3 is the +origin of the standing-roster idiom that later documents inherited — +"a fifth judge with a blindness profile **already on the panel**", the +role table with per-role drawback classes fixed inline, and §5's +anchor discipline stated **per role** with fixtures byte-pinned ahead +of any candidate. Its own §1 already says the four are "a *minimal +ecology instance for belief-support*"; the operative sections do not +honor that framing, and the framing is what governs. Under +`JUDGE_COMPOSITION_GAME.md` §6 rule 4 and the owner's July 19, 2026 +ruling, **there is no default cast**: the four are role *slots*, each +buying a blindness the others lack, and every judge filling one is +composed for its context from the S10 registries. §5's per-role anchor +discipline is consequently under re-decision — anchors calibrate a +taxonomy, and belief-facing taxonomies do not exist until a +composition does. See +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md) +for the principle and the case that produced it. + +Program context: [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md). Parent +design record: [`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) +(the original review-series proposal it graduated from was removed at +owner direction at PR #119 merge review; branch history retains it). +Evidence register: [`RESEARCH_MAP.md`](RESEARCH_MAP.md). Prompt-facing +contracts: [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md). +Adoption bounds (binding on this design): RESEARCH_MAP §"Adoption +bounds register". + +--- + +## 1. Problem statement + +The support plane (parent record §2–§3) needs judged inputs: events +that move a belief's (b, d, u) opinion. The naive design — one LLM +judge per belief — fails on the program's own evidence three ways: + +1. **Shared blind spots.** A bare LLM judge shares architecture, + training distribution, and failure modes with the writer it grades; + S1 observed judge-solver agreement drift "before any optimization + pressure exists," and S8 gives the mechanistic frame: judge and + writer both reason through a capacity-limited workspace of the same + kind (R-20). +2. **Verbalized ≠ driving.** A judge can state the right criterion and + act otherwise — S8's dissociation (R-21) and Trellis's laundering + agents (R-11), which read the truth and cited the decoy. A judge's + *stated* rubric compliance is not evidence of rubric-driven verdicts. +3. **Bag-of-concepts readouts.** S8 §9.1: a single readout shows which + concepts are present but not how they bind. A single judge's verdict + is one unstructured projection of the evidence; differently + structured projections catch what any one misses. + +The answer with precedent in both evidence lines (S1's +detector-composition; the parent record §4.5's independence rules) is a +**small panel of differently-blind judges whose verdicts are composed +by engine code** — never averaged informally, never chained through any +model's attention (R-23: externalize intermediate state; a verdict is +engine state the moment it exists). + +## 2. Doctrine (inherited, binding) + +- **Drawback-first**: every verdict is `drawback | clean | abstain` + with a named drawback class from a closed per-role taxonomy; `clean` + means *no known drawback found*, never certified correctness (R-01). +- **Abstention feeds uncertainty**, never belief or disbelief (parent + §3). +- **Writer-blind**: no judge output, score, or panel composition is + visible to the writing agent; no task spec carries a count-shaped + incentive (AB-5). +- **Gate/audit separation**: the judge that gates and the judge that + audits are different roles, different loops, and by default different + model families (parent §4.5; AB-9). +- **Judges are capabilities**: every judge is a registered manifest + (rubric hash, anchor-set hashes, taxonomy version) the invalidation + sweep can contest (parent §4.4). +- **Anchor labels may be model-produced** (AB-4 as amended July 16, + 2026 by owner ruling); fixtures are byte-pinned once labeled, refresh + stays a human ceremony, and the labeler is never given a count-shaped + incentive (AB-5 binds the labeler too). + +## 3. The four roles + +Four roles because four **distinct blindness profiles** cover the +failure classes in evidence; a fifth judge with a blindness profile +already on the panel adds cost, not coverage (§9 falsifier). Each role +states what it sees, what it is structurally blind to, and which +evidence motivates it. + +| Role | Sees | Deliberately blind to | Verdict domain | Cost tier | Evidence basis | +|---|---|---|---|---|---| +| **J1 — Grounding** | the claim + the exact cited source bytes, nothing else | the graph, other beliefs, consensus, authority | does the cited evidence support this claim? (`unsupported_citation`, `overclaimed_evidence`, …) | judge op (one narrow LLM question) | The only gate that held 0% under laundering pressure (R-11); already exists as `entailment_detection.ts` | +| **J2 — Coherence** | the claim + its own history (prior versions, contest/recovery record) + its claim-kind position when that plane exists | all external evidence | is the belief internally coherent and plane-consistent? (`self-contradictory`, `kind-incoherent`, `history-inconsistent`) | static + judge op | Coherence calibration as tooling (R-18); cross-plane invariants (parent §2.1) | +| **J3 — Corroboration** | independent live evidence: other beliefs with disjoint sources, authority-registry documents | the belief's *own* citations (prevents circular corroboration) | is the claim independently corroborated or contradicted? (`uncorroborated`, `authority-contradicted`) | static + execution ops | Detectability spectrum (R-05); authority registry (parent §5); poison drill (R-12) | +| **J4 — Audit** | sampled (judge, verdict, evidence) triples from J1–J3; pairwise comparisons under a task-aware rubric, judged twice with positions swapped | the live gating path — J4 runs outside every loop and **never gates a belief** | are the other judges judging well? (`rubric-gamed`, `convention-blind`, `systematic-drift`) | independent stronger model | S1's 2×2: the audit caught what the loops could not, and the audit itself needed the task contract (R-06) | + +**Disagreement is data, not noise.** J1-clean + J3-drawback is a typed +conflict signal (claim supported by its citations but contradicted by +independent authority) that feeds `d` *and* flags the belief for the +existing conflict path. The composition never silently majority-votes +across roles that measure different things. + +## 4. Composition into the support plane + +J1–J3 verdicts are events consumed by the support computation (parent +§3) through a metric expression in the S1 grammar — the fixed root +(write-path gates, already enforced) conjoined with a hand-authored +composition; first edition, no evolution machinery (AB-8): + +``` +support_metric_v1 = root ∧ ( any(J1.drawbacks) ∨ any(J2.drawbacks) ∨ any(J3.drawbacks) ) +``` + +with per-role weight keys resolved by the computation module, and every +abstain routed to `u`. The expression string + role taxonomy versions +are hash-pinned (`metricSha`, parent §4.2). + +**Dated amendment (July 17, 2026, Session 66):** the composition +adopts the two S10 structural imports per §10.1 item 1(c), specified +in [`RECONCILIATION.md`](RECONCILIATION.md) §3 and pinned by +`npm run test:judge-panel`: the hard compatibility/applicability gates +(R-29 — typed counted exclusions, never a similarity score, fail-closed +when nothing survives) and the no-global-section outcome (R-30 — +qualified-parameter overlap conflicts emit a typed conflict record and +withhold the conflicted verdicts from evidence accumulation, u-dominant, +never a blend). The §3 "disagreement is data" rule and R-30 resolve to +different boundaries (cross-role vs same-jurisdiction) — +RECONCILIATION §3.3 carries the explicit resolution and its falsifier. + +**J4 composes differently by design.** Its verdicts never touch a +belief's opinion. A J4 `systematic-drift` finding against a judge +contests **the judge** — the capability entity — through the ordinary +sweep (parent §4.4), excluding it from composition pending human +re-review. This is the "who grades the grader" loop closed natively: +anchors keep a judge honest prospectively; J4 catches what anchors +miss retrospectively; registration makes the consequence governable. + +```mermaid +flowchart LR + B["Belief (write-path root already passed)"] --> J1["J1 Grounding
sees cited bytes only"] + B --> J2["J2 Coherence
sees own history only"] + B --> J3["J3 Corroboration
blind to own citations"] + J1 --> C["Engine composition
(hash-pinned expression;
abstain routes to u)"] + J2 --> C + J3 --> C + C --> S["Support opinion (b, d, u)
sweep-side, writer-blind"] + J4["J4 Audit
independent model, outside all loops,
position-debiased, task-aware rubric"] -. samples .-> J1 + J4 -. samples .-> J2 + J4 -. samples .-> J3 + J4 -- "systematic-drift finding" --> K["Contest the JUDGE
(capability entity, ordinary sweep)"] +``` + +## 5. Anchors and lifecycle + +> **Amended July 19, 2026 (owner ruling, Session 71).** Anchors are +> **per composition, not per role**, and they **compose at +> instantiation** from the domain's own content space — the categories +> that compose them are the only prior. There is no committed +> byte-pinned fixture authored ahead of a candidate, because the +> taxonomy an anchor calibrates does not exist until a composition +> does. The ten-item five-and-five shape survives; where it binds +> moves. Validation moves with it: the validity gate (no +> all-pass/all-fail/all-abstain) runs at composition time and the +> composing agent retries on failure, which is where R-02's protection +> actually lives — it is taxonomy-agnostic and survives the move +> intact. "Byte-pinned" now binds on the write-once promotion record +> that stores the composed anchors. AB-8 was amended in the same act. +> See [`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md) +> §3 and §9. + +*(Superseded text, retained for the record:)* Per role: one committed, +byte-pinned **ten-item anchor fixture** +(five clear drawbacks, five clean positives — the S1 dev-set shape; +R-04 supports sufficiency at this size), labels human or mechanical +(AB-4). Selection guards are mandatory and fail closed: a judge +configuration with no usable anchor opinion is unselectable; all-pass/ +all-fail/all-abstain configurations are refused (R-02 — the naive +ablation's vacuous collapse is the failure this prevents). Anchor +refresh is a human ceremony with an audit stamp; **anchor drift, not +pool drift, is the watched failure** (R-03). + +## 6. Behavior → enforcement → pin + +| Behavior | Tooling that enforces it | Pin that detects drift | +|---|---|---| +| Verdicts are ternary with closed taxonomies | verdict schema validation at the worker boundary (`parseLlmResponse` mold) | schema unit pins; unknown class refused | +| J4 never gates | no code path from J4 output to any belief opinion or write gate | static check: audit module imports no gating surface; drill section | +| Role blindness is structural | per-role context assembly gives each judge only its declared inputs | assembly unit pins (J3 context contains no self-citation bytes; J1 context contains no graph reads) | +| Panel outputs compose in engine code only | composition is a pure module over verdict records | oracle-drill extension: scripted verdicts → exact opinion | +| Judges contestable | judge manifests registered as graph entities citing rubric + anchor hashes | `test:module-lifecycle` pattern retargeted | +| Position bias neutralized in J4 | judge twice with positions swapped; a win counts only on agreement | protocol unit pin on the pairing harness | +| Writer never sees any of it | no judge/support fields on RLM-visible read surfaces | kernel-prompt substring absence pin + read-surface unit pins | + +## 7. Drills (zero-paid first) + +**Dated amendment (July 17, 2026, Session 66): items 1–3 are +IMPLEMENTED** as `npm run test:judge-panel` +(`scripts/test_judge_panel.ts`, fixtures under `fixtures/judge_panel/` +with an independent expected-values generator; the +`test:support-oracle` mold). Item 1 gained the no-global-section +section RECONCILIATION §3.2 specifies. Item 4 remains a separate +owner-gated paid proposal, unrun. The original proposal text below is +preserved as written. + +1. **Panel-composition oracle drill** — extends + [`ORACLE_DRILL_PROPOSAL.md`](ORACLE_DRILL_PROPOSAL.md): scripted + four-role verdict streams (including role-disagreement cases) → + exact composed opinions; a planted J4→opinion path must be + structurally impossible (drill fails if reachable). +2. **Blindness drill** — context-assembly refusals: J1 handed a graph + read, J3 handed its own citations, must refuse before any model + call would occur (scripted, zero-LLM). +3. **Judge-contest drill** — a scripted J4 `systematic-drift` finding + contests the judge entity; composition refuses the contested judge; + recovery is human re-registration (retargets `test:module-lifecycle`). +4. **Paid follow-on (separate, owner-gated):** per-role anchor + calibration (agreement-with-n on the ten-item fixtures) and one + incentive-pressure A/B against the panel — the S4 laundering design + pointed at the panel itself: can a count-shaped incentive corrupt a + *judge*? Costs bound by existing telemetry (entailment sweep + $0.0093/25 pairs; est-suite ~$2.40/50 runs). + +## 8. Explicit exclusions + +- No implementation in this record's turn; no code, schemas, prompts, + or workers change. +- J4 never gates; no judge self-audits; J4's model family differs from + J1–J3's by default (owner may waive with recorded reasoning). +- No evolution/search over judge configurations in the first edition + (AB-8); no writer-visible outputs (AB-5); no teacher-model anchor + labels pending the AB-4 ruling. +- No claim that four is optimal — four covers the currently evidenced + blindness classes (§9 falsifier governs). + +## 9. Falsifiers + +- A fifth blindness profile demonstrated to catch a failure class the + four miss (→ the panel grows, with its own drills). +- Two roles shown redundant on anchors across task families (→ merge). +- The J4 audit failing to catch a seeded systematic judge drift in the + judge-contest drill (→ the audit design is wrong, stop). +- Panel cost exceeding the sampled-verification budget that R-12 shows + suffices (→ re-scope roles to sampling tiers). + +## 10. Open items and decision boundary + +1. **Ingest the supplied basic model, then complete** *(second + amendment, July 16, 2026 late session — the awaited definitions + ARRIVED as `FOUR_JUDGE_BASIC_MODEL.md`)*: Session 66's first task + is now three-part. (a) **Map the layers**: express this record's + four roles as sparse selections from the S10 registries (a role's + blindness profile = the registry parameters it does NOT select + + its `abstention_boundary`), against S10's ecology — preliminary + mapping to verify, not assume: J1 Grounding ≈ Epistemic + Reliability ∩ Belief-to-Fact (Logical: evidence quality, + falsification; claim modes fact/inference); J2 Coherence ≈ Formal + Coherence; J3 Corroboration ≈ Epistemic Reliability (source + dependence, Sensorial: observation quality); J4 Audit ≈ + Adversarial + Coverage Meta-Judge (two functions this record had + fused). (b) **Complete the definitions** in S10's YAML schema with + rubric content reconstructed from the S1/S9 artifacts, citing + sources per field. (c) **Adopt the two structural imports** into + the composition design before the drills pin it: the hard + compatibility gate (R-29) and the no-global-section outcome (R-30 + — overlap-test failure produces a typed conflict record + + u-dominant opinion, never a silent blend). Record everything as + dated amendments; the owner ratifies. Non-epistemic registries + (Emotional/Sensorial-beyond-observation/Ethical) stay gated behind + the claim-kind plane's driving-question rule (AB-7). +2. ~~Owner ruling on AB-4 (anchor labeling)~~ **RESOLVED July 16, + 2026: model labeling permitted** (AB-4 dated amendment) — anchor + fixture authoring is unblocked. +3. Aggregation weights and decay constants — v1 defaults ratified with + the drill (`docs/architecture/EPISTEMIC_SUPPORT.md`, v1 arithmetic); + further tuning re-enters through drill re-pins. +4. Authorization boundary: the support-computation oracle drill is + authorized and implemented (owner decision #3); every OTHER + mechanism in §6–§7 (panel drills, judge registration, sweep + integration) remains a separately authorized bounded feature. +5. Rubric composition machinery: see + [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md) + (owner decision #4) — the rubric side of every role contract. +6. *(Added July 18, 2026.)* The composition design was exercised live + at the **session layer** — isolated sub-agent judges over a real + promotion candidate, twice, with audits — in the judge-composition + game: [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md). + The run validated the differently-blind structure (the panel caught + its own composer's filing bias) and produced twenty distilled rules + plus harness-shape notes (its §9) that bind the eventual sweep + integration when that bounded feature is authorized. No engine code + changed; this record's §10.1 status and RECONCILIATION §7 + ratification are unaffected. diff --git a/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_CEREMONY.md b/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_CEREMONY.md new file mode 100644 index 0000000..a8510c3 --- /dev/null +++ b/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_CEREMONY.md @@ -0,0 +1,296 @@ +# The judge-composition ceremony — design record + +**Status: DESIGN — resolved in session, July 19, 2026 (Session 71). +Nothing built.** Records the owner's and collaborator's answers to six +blocking questions, so the prototype can be built from a record rather +than from conversation. Implementation is a separately authorized +bounded feature. + +**Parent authorities.** +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) (RATIFIED; +its twenty rules of §6 are binding program law, cited by number) and +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md). +Where this record and the game record differ, the game record governs. + +**What this record supersedes in direction (each needs its own owner +dated entry in its home record — see COMPOSITION_FROM_PRIMITIVES §6):** +the standing four-judge roster, per-role byte-pinned anchor fixtures, +and rubric *selection* from pre-registered compositions. + +--- + +## 1. The problem + +We do not know the domain of the facts in the REPL. A promotion +candidate may be a claim about water chemistry, comedy, methodology, or +anything else, and the pool it is promoted from is an arbitrary +linguistic topology containing a potentially unlimited number of facts +and beliefs. + +Therefore **no criteria can be authored in advance**. Judging criteria +that were written before the domain was known are criteria for a +different domain. + +The collaborator's frame: the meta-prompt judges are a **Grothendieck +cover over an arbitrary linguistic topology** — constructed for the +space in front of them, required to cover it, never carried between +topologies. The engineering analogue is the Visual Loom in MASH: the +developer writes the frame and the iteration over whatever the world +contains, and never enumerates the scenes, because the user's world +does not exist at development time. + +**Every single part composes at ceremony time.** Judges, their +selections, their taxonomies, and their anchors. + +## 2. The invariants (what does NOT compose) + +Only these. Everything else is composed per ceremony. + +- **The judge schema** — the field names of the game template: + `judge`, `purpose`, `claim_modes`, `select`, `orientation`, + `taxonomy`, `blind_to`. +- **The verdict vocabulary** — `drawback | clean | abstain`; + `abstainReason: jurisdiction | evidence`; a drawback names a class + from the composition's own closed taxonomy. +- **The shape rules** — one question per class; taxonomies closed + before judging; `clean` never certifies; abstention feeds uncertainty + only. +- **The four seats' *blindness structure*** — grounding (cited bytes + only), coherence (own record only), corroboration (independent of the + citation chain), audit (judges judges, never gates). Seats earn their + place by buying a blindness no other seat buys. +- **The audit seat's failure taxonomy** — `rubric_gamed`, + `convention_blind`, `systematic_drift`, plus coverage findings. How + judges fail does not depend on what they judge. Its **name and angle + compose** (game rule 4 as extended by the July 19 ruling). + +Everything else — judge names, purposes, registry selections and +aspects, orientation values, belief-facing taxonomy classes, anchors — +is composed at invocation. + +## 3. The ceremony + +One promotion candidate, one ceremony, start to finish. **No artifact +from a previous ceremony is reused as input.** The ceremony polls the +REPL for its fresh state on every promotion. + +### Stage 0 — Candidate ratification (existing, unchanged) +The user selects and ratifies the candidate through the existing intake +surface. Code-mediated: engine-addressed, engine-quoted, never retyped +(game rule 15; the slice-1 machinery already does this). + +### Stage 1 — The REPL characterization (isolated agent) +An isolated agent reads the REPL's fact space and belief space and +returns a **descriptive, not expository, summary**: the *nature of the +pool* the candidate is being promoted from and to — its domains, +vocabulary, claim kinds, evidence shapes, authority structure. + +It characterizes; it does not argue, explain, or assert content. The +distinction is load-bearing: an expository summary would carry claims +into the composer, and the composer would compose criteria around them. + +**The candidate is not privileged in the characterization.** We know +the *domain* of the claim — its region of the pool is in scope, and +must be, or the composed cover would not cover the space the claim +lives in. What is withheld is *which* claim is under test. The +candidate receives no marking, no weight, no position, and no mention +distinguishing it from the rest of the pool it belongs to. + +The property is **anonymity, not exclusion**, and that distinction is +the whole design. Excluding the claim's content would make the +characterization unrepresentative of the very region the judges must +cover. Leaving it in, unmarked, means the composer can compose criteria +fit for the domain while being structurally unable to tailor them to +the claim — it cannot tell which of many facts and beliefs is the one +being judged. + +### Stage 2 — Composition (agent per seat) +The composer receives the Stage-1 characterization and the invariant +schema, and composes one judge per seat, plus that judge's anchors. + +**The composer cannot identify the candidate.** It composes criteria +for the *domain*, not for the claim. This is the seat where bias lives +— the game established that the belief-facing panel's clean contexts +do not protect the composer's layer — so the candidate's identity is +withheld structurally rather than by instruction. Per Stage 1 the +withholding is anonymity: the claim's domain is present and its +identity is not. + +Composition emits, per seat: the filled game-template YAML, and a +ten-item anchor set improvised from the domain content space (five +clear drawbacks, five clean positives) whose only priors are the +categories that compose them. + +### Stage 3 — Instantiation gates (zero-model, deterministic) +Before any judging, the engine checks the composed cover and **refuses, +typed, on failure**: + +1. **Validity** — no seat's anchors are all-pass, all-fail, or + all-abstain. This is R-02's protection, rehomed from committed + fixtures onto composition time; it is taxonomy-agnostic and survives + composition intact. +2. **Coverage** — the seats cover the characterized domain, and the + candidate lies inside it by construction (Stage 1 keeps the claim's + region in scope while withholding its identity). Coverage is + therefore checkable without ever privileging the claim: cover the + domain, and the claim is covered because it is in the domain. +3. **Overlap** — seats are pairwise disjoint in their qualified + parameters, **or** overlapping with a declared gluing rule. Strict + disjointness is not required: a cover normally overlaps, and gluing + happens on the overlaps (R-30 already withholds same-jurisdiction + conflicts as typed forks rather than blending them). +4. **Falsifiability** — every seat has an abstention path and a way to + fail. A judge that cannot fail is not a judge. + +**On gate failure the composing agent retries.** Repeated failure ends +the ceremony with a report; it never degrades into judging with a +defective cover. + +### Stage 4 — Judging (existing spawn boundary) + +**Judges see the candidate only after they are instantiated, on the +judgement forward pass.** The blindness of Stages 1–2 is a +*composition-time* property, not a standing one: criteria are built +without knowing which claim is under test, and then the instantiated +judge is shown the claim and judges it. Reading "blind to the +candidate" as covering the forward pass would leave nothing to judge. + +The temporal split is the whole safeguard. Criteria that cannot have +been shaped to the claim are then applied to it. + +Each composed judge runs in an isolated clean context receiving only +its definition, its declared inputs (which at this stage include the +candidate), and the output schema. No claimant identity, no sibling +verdicts, no composer expectations. Existing R-27 identity refusal and +transport byte-equality pins apply. + +### Stage 5 — Audit +The audit seat runs over the judges' prompts and verdicts **plus the +composer's artifacts**: the Stage-1 characterization, the composed +definitions, the anchors, and the pre-registrations. The composer's +packaging is a first-class audit target. + +### Stage 6 — Record and dispose +The promotion record is written write-once and carries the composed +judges, their anchors, the characterization, the verdicts, and the +audit findings. + +## 4. What persists, and what it means + +**Compositions are records, not a library.** A stored composition is +the historical account of why one promotion was decided. It is +**never** selected from, reused, or treated as a registered judge +available to a later ceremony. Any mechanism that picks a stored +composition for a new candidate reintroduces the standing roster under +a new name. + +Store shape: the existing convocation store, `kind='composed_judge'`, +key `:`. Write-once on `(kind, key)` already +fits — every composition is naturally a new key. + +**The composer is the durable contestable capability.** Judges are +per-ceremony and ephemeral, so there is no standing judge for the +invalidation sweep to contest. What persists and can be found defective +is the composer: its prompt, versioned, and its method. An audit +finding against the composer makes promotions decided under it +reviewable — the capability flywheel applied one layer up, to the thing +that builds the evaluators. + +**Two different times, when evidentiary bytes die:** + +- **During the ceremony** — no trail means the judge cannot ground a + verdict. It abstains on evidence, or the run refuses. **There is no + promotion, and there is a transparent report.** +- **After promotion** — the bytes underlying a promoted fact dying + later is the ordinary invalidation sweep contesting that belief. + That machinery exists and is untouched. The composed-judge record is + not contested by it: a record of a past act is not a live capability. + +## 5. Agent contracts (shape only) + +Both agents are composed against the sub-agent transfer rules: nothing +crosses the boundary but the prompt, and the return contract is the +highest-stakes slot. + +- **Characterizer** — reads the fact/belief space; returns a + descriptive characterization. Blind to the candidate. Read-only tools. +- **Composer** — reads the characterization and the invariant schema; + returns filled template YAML plus anchors, per seat. Blind to the + candidate and to sibling compositions where seats must stay + independent. + +Prompt bytes for both are authored under Guardrail 15 (Prompt- +Engineering + Hypershot + `judge-composition`), and the composer prompt +is a versioned artifact because the audit seat reads it. + +## 6. Spend + +Composition is **N+ model calls before any judging begins** — the +characterizer, plus a composer call per seat, plus retries. The §10 +estimate of ≈$0.02–$0.06 per belief assumed zero composition cost and +no longer holds; it is re-estimated before any live run. + +Owner direction: the goal is **not to over-test**. This is the +project's Landauer bill — payable in testing eventually, but a solid +harness comes first. The zero-paid harness is built and drilled before +any metered ceremony runs. + +## 7. Explicit exclusions + +- No standing roster, default cast, or base judges, under any name. +- No selection of a stored composition for a new candidate. +- No criteria, taxonomy, or anchor authored ahead of a ceremony. +- No live run: the triple gate stands, and only the owner's dated + paid-queue re-opening plus a per-run ceremony opens it. +- No change to the write path, custody tiers, or promotion gates. + +## 8. Open items + +1. The composed-judge store record's exact field set. +2. Whether the characterizer's output is itself byte-pinned into the + promotion record (it is composer input, so the audit seat needs it — + assumed yes, unconfirmed). +3. ~~How the coverage gate decides "the claim's parameter space" + without reading the claim.~~ **RESOLVED July 19, 2026 + (collaborator, owner-approved):** we know the domain of the claim + but not the claim under test, and it is not privileged in the + descriptive summary. The gate covers the domain; the candidate is + inside it by construction. See §3 Stage 1. +4. Whether seats beyond four are composed when the topology needs them, + and what admits a fifth. +5. Whether the anonymity property needs a mechanical check, or rests on + the characterizer's contract (§9 F4 carries the falsifier). + +## 9. Falsifiers + +Each names the observation that would break the design, not a risk to +be managed. + +- **F1 — Composed criteria track the candidate.** If composed + taxonomies correlate with the candidate's own content more than with + the domain's, the anonymity property is not holding and the composer + is tailoring. Detectable by composing twice over the same pool with + different candidates drawn from it: the two covers should differ + little. +- **F2 — Composition is not discriminative.** If covers composed for + genuinely different domains come back substantially alike, the + composer is emitting a template rather than composing, and the + standing cast has returned by another route. +- **F3 — Gates never fire.** If validity, coverage, overlap and + falsifiability refuse nothing across a run of scripted compositions, + they are decoration. The zero-paid drill must plant compositions that + each gate catches. +- **F4 — Anonymity leaks by salience.** The candidate's identity can + reach the composer with no rule broken, purely through how the + characterization is shaped: the claim's region being the only + instance of its kind, carrying unusual vocabulary, or landing last in + a recency-ordered summary. **This is the same shape as the drift the + audit caught in the game's corrected re-run** — expectation content + relocating out of task text and into annotation phrasing after the + obvious channel was closed. The lesson there was that *bias is + conserved under correction unless the correction is itself audited* + ([`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §4), and it + applies here: closing the direct channel (never name the candidate) + moves the leak to a quieter one (make it conspicuous). The audit seat + must read the characterization as a first-class target, watching the + vector and not only the magnitude. diff --git a/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_GAME.md b/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_GAME.md new file mode 100644 index 0000000..3d64ecd --- /dev/null +++ b/.claude/skills/judge-composition/references/JUDGE_COMPOSITION_GAME.md @@ -0,0 +1,438 @@ +# The Judge-Composition Game — Session Record and Distilled Rules + +**Status: RECORD of a session-layer experiment (July 17–18, 2026), with +proposals marked where they occur; ratification §11.** Players: the +owner (Cnid — long form Cnidarian), the collaborator (M. Murphy), and +Claude (composer). Authored under HANDOFF §7 guardrail 4 / +Guardrail 15 (Prompt-Engineering + Hypershot invoked before any +authored prompt bytes). This record is **canonical for the learnings**; +the operational shorthand is a session-layer skill +(`judge-composition`, currently user-level outside the repo, sibling +to the collaborator-derived prompt protocols). Where the two drift, +this record wins and the skill gets regenerated — never the reverse. + +Nothing in this record changes engine code, drills, or any committed +design. The experiment ran entirely at the session layer (isolated +sub-agent contexts); `judge_panel.ts`, `judge_audit.ts`, and the +Session 66 drills are untouched, and RECONCILIATION §7 ratification +remains the owner's pending act, unaffected. + +Sources: [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) +(S10), [`RECONCILIATION.md`](RECONCILIATION.md) (the composition law +the game exercised), [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md), +the adoption bounds (RESEARCH_MAP §9). + +--- + +## 1. Purpose, and a provenance clarification for S10 + +**Purpose.** Teach the composer adaptable judge composition well +enough to distill a meta-prompt for spawning fit-for-purpose judge +panels over the Trellis harness's novel REPL state — unknown content, +a user-requested promotion candidate, judges composed to match. + +**S10 provenance clarification (owner-relayed collaborator statement, +July 17, 2026 — recorded here because the S10 document is committed +verbatim and takes addenda, not edits):** the "useful first ecology" +(S10's eleven judges) is a list of **illustrative examples composed +from the primitives**, vetted by the collaborator's AI assistant — not +a canonical roster. The primitives (four registries + the YAML schema ++ the composition method) compose Lego-like into arbitrarily many +judges over any claim type. This confirms the reading S10's own text +already licenses ("These are parameters, not rules") and the +reconciliation's "minimal ecology instance" framing. + +**Game flow (the owner's rules):** (1) current player poses a context; +(2) the composer builds the four judges for it; (3) human review; +(4) feedback; (5) next player poses. Rounds continue until the table +sees the judges matching the context; then the composer writes the +final rule from the run and the critique. Testing is **anecdotal by +design** — the space is not exhaustively testable (§7, item P3). + +## 2. The three graded hands + +| Hand | Dealer | Context | What it exercised | Review outcome | +|---|---|---|---|---| +| 1 "creek ledger" | composer (self-dealt) | citizen-science water-quality REPL; causal-attribution candidate | epistemic driving question; transcription-fidelity vs grounding split; ethical plane correctly gated (AB-7) | positive; one correction — corroboration's two blindnesses were conflated (became rule 2) | +| 2 "comedian corpus" | collaborator | approved-routine corpus; unperformed-bit candidate (originality + glue + impact) | aesthetic driving question pulls Emotional/Sensorial registries IN, with the user's own corpus as the standard; compound-candidate decomposition forced by "use the label, what is B?" (became rule 1); nobody judges "funny" — impact is performance-gated, promotion provisional | positive both reviewers | +| 3 "Armory Theory" | owner (Cnid) | the owner's own methodological theory as candidate; **sycophancy trap armed** | authorship-blind composition (rule 6); value-mode merit refusal (rule 7); composer conflict disclosure (rule 9); pre-registration discipline | positive; escalated to the live run | + +The hands share zero content. The same four-role skeleton produced +water-chemistry judges, comedy judges, and methodology judges by +swapping selections, orientations, and taxonomies — the frame-content +separation working as the hypershot protocol predicts. + +## 3. The live run (hand 3 executed, four sub-agent judges) + +Proposed by the collaborator and authorized by the owner (Cnid). Three belief-facing judges ran in **isolated clean contexts** — +each receiving only its input allowlist (bundle + claimant-masked +cited bytes; bundle + curated record digest; bundle + declared +evidence pool), never the claimant's identity, the conversation, the +other judges, or the composer's pre-registered expectations. The audit +seat ran after, over the judges' prompts, verdict records, the +composer's disclosures, and the pre-registrations. + +**Headline result: the panel caught its own composer.** The grounding +judge found the composer's prose decomposition had strengthened the +claimant's claims **four-for-four** (inserted a modal "necessarily"; +universalized a three-item enumeration into "anything"; dropped one +qualifier; transposed another). Six of the panel's eight drawbacks +were filing artifacts billed to the claimant; only two touched bytes +the claimant wrote, and one of those (the corroboration finding) was +voided as a forecast because the composer's task text had embedded its +content (audit finding: "a pre-registration whose substance is in the +prompt is not a forecast; it is a work order"). + +Audit verdict on drift: none established in the belief-facing layer — +every divergence from the composer's pre-registrations ran *harsher* +than predicted, which a captured panel would not do. The drift was +upstream, in composer artifacts: the directional filing, a digest with +one-way valence, one steered prompt. The collaborator's design claim +was thereby demonstrated, not assumed: **impartiality comes from the +judges' isolated clean contexts, not from the composer's prompting.** + +**A structural note surfaced by the roster correction (promoted to +this record at the collaborator's request, July 18, 2026):** the trap +was tighter than the paragraphs above suggest. The dealer of the hand, +the claimant whose theory was judged, and the authorizer of the live +run were the same invested human — the owner. Role concentration is +the adversarial case for any promotion system: every pressure that +could bend a panel pointed the same way, and the clean-context panel +returned its drawbacks anyway, while the composer's layer — the one +the concentration could actually reach — is exactly where the audit +found the bias. One run, one case; the design point stands at that +weight and no more. + +The collaborator's diagnosis of the filing failure, recorded verbatim +in intent: a common AI mechanism — the model modifies a user's claim +believing it adds or subtracts rigor for the purpose, committing +epistemic harm on the idea itself. It sits at the intersection of +assistant training and anti-sycophancy training: sycophancy bends +*verdicts* toward the user; the helpfulness reflex bends the user's +*claims* toward the instruments. Byte-accurate comparison requires +byte-accurate reproduction of claims. This is +[`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md) +applied one layer up: claims are text, and model paraphrase of them is +the same corruption channel the pillar already forbids for content. + +## 4. The corrected re-run (the rule-15 positive control) + +The four remanded items were refiled under a new substrate — verbatim +byte spans + labeled mode annotations, garbles preserved with labeled +intent-readings — and judged by fresh clean-context instances. +Results: zero fidelity drawbacks; the coherence fork that had drawn a +drawback dissolved with the qualifier restored to its source position; +correct typed abstentions on the value and prediction annotations. + +The slim audit on the re-run found the fix's own shadows, each now a +rule: expectation content had relocated from task text into +*annotation phrasing* (negations of the prior run's failure classes); +span *boundaries* are an unaudited surface (tilt-by-omission); an +intent-reading was judged against rival repairs instead of against the +garble; two isolated judges construed the same ambiguity oppositely, +each favoring its own verdict, with no seat positioned to see it; and +the run's residual lean pointed uniformly *friendlier* where the first +run's had pointed uniformly harsher — coincident with the layers the +composer controlled. Lesson, at the audit's own calibration (no +established drift, monitoring flag): **bias is conserved under +correction unless the correction is itself audited.** + +## 5. The P7 arc and the primitives thesis + +The one drawback grounded in bytes the claimant actually wrote +(a `non_sequitur` on "the judges have to compose this way") proved a +**true positive of a different kind**: the claimant confirmed the +bytes had misstated intent, and corrected the claim himself — the +judge detects the gap; only the claimant upgrades intent. The +corrected claim: particular schemes are freely chosen *rules +variants*; uniqueness is claimed for the underlying *game* — +composition from conceptual primitives — because different +fundamentals (alphabets, tokens) compose around the same conceptual +primitives. + +An adversarial clean-context analyst then attacked the corrected +thesis (five candidate paradigms: learned reward models, prediction +markets, proof checkers, evolutionary selection, common-law +precedent). Every candidate fractured along one seam — primitive-free +⟹ ungovernable or non-universal; robust-and-universal ⟹ a substantive +four-slot reduction (registry / selection / orientation / blindness) +lands. Verdict: **corroborated-by-failed-counterexample, +conditionally** — the thesis is contentful only under a strong reading +of "governable" plus a substantive-reduction guardrail, and it carries +one named empirical falsifier: **representational holism** (if +judgment-relevant structure in learned judges does not decompose into +interpretable dimensions, the thesis breaks). + +The analyst's steelman — *no judging system is simultaneously +universal, governable, and primitive-free; composition-from-primitives +is the unique design occupying universal ∩ governable* — is **TABLED +as a claimant-optional refiling** (rule 15 cuts both ways: the +composer does not file improved versions of anyone's claim, however +superior). The decision belongs to the collaborator. + +### 5.1 The steelman refiling accepted (dated entry — July 21, 2026) + +**ACCEPTED.** The decision §5 left open is made this session: the +collaborator (M. Murphy) accepts the refiling, and the owner (Cnid) +ratifies. The steelman — *no judging system is simultaneously +universal, governable, and primitive-free; composition-from-primitives +is the unique design occupying universal ∩ governable* — is **adopted +as the program's thesis formulation**, no longer tabled. Collaborator's +stated reason for accepting now: the game tabled it for want of context +at the time, and that gap has since closed. + +It carries its standing falsifier **unchanged**: representational holism +— the decomposability bet of §6.1(b) and §8 — which the program still +settles empirically, not by argument. Adoption states the frame the bet +is about; it does not resolve the bet, and a holism result still breaks +the thesis. This entry supersedes the "TABLED" / "not adopted here" +dispositions at §5, §6.1, and §10 item 1, and the derived +`judge-composition` skill's Provenance is corrected to match. Amended +only by dated entry, per §11. + +## 6. The twenty rules (canonical) + +1. **Decompose before composing** — applicability gates cannot run on a conjunction; split compound candidates into labeled sub-claims with modes first. +2. **Two blindnesses, never conflated** — evidence-facing (the candidate's citation chain is not corroboration) vs verdict-facing (no belief-facing judge sees another's output; that is the audit's seat alone). Corroboration base = record − citation chain + allowlist. +3. **The driving question sets registry access** — epistemic questions keep Emotional/Ethical out (AB-7); aesthetic or human-impact questions pull them in, with the user's own corpus as the standard, never the judge's taste. +4. **Belief-facing composition is total; only the audit seat's failure taxonomy is invariant.** A judge's name, purpose, registry selections, orientation, closed taxonomy, and anchors are all composed for the context at ceremony time. The audit seat composes the same way — its name and angle are load-bearing, and what it does depends on what it is judging the judges judge — while how judges fail does not depend on what they judge, so its failure taxonomy alone stays invariant. **Names are a composition surface, not labels:** an adaptive name is a surface over which the context clusters, and promotes more structural coherence than a generic one. *(Superseding text — dated entry §6.1, July 19, 2026; the original wording is preserved there.)* +5. **Allowlists are user-shaped** — authoritative sources belong to the user's data, not the panel. +6. **Authorship is never a parameter** — claimant-masked always; audit runs claimant-masked replays; drift in either direction (courtier or contrarian) is drift. +7. **Value-mode candidates compose as declarations, not endorsements** — merit refuses on all-jurisdiction-abstain; the panel records the user's values, never ratifies them. +8. **The case file is testimony; the bytes are evidence** — enumerate the bundle from bytes; mismatches are grounding verdicts, not clerical fixes. +9. **Composer conflict is disclosed, pre-registered, and externally reviewed** — never self-absolved. +10. **The filing is a judged artifact** — misquote-family grounding drawbacks indict the filer and remand to refiling; they never count against the claimant. +11. **Forecasts must not share bytes with prompts** — embedded expectation content is a work order; tautological predictions of composer-authored gates are struck from calibration. +12. **Composition-guaranteed abstentions disclose as "untestable as composed"** — designed silence must not read as neutrality. +13. **Keystone values surface to the gate-holder** — merit refuses, but load-bearing declarations are flagged, never buried. +14. **Evidence-universe curation is unauditable from inside** — block selection, digests, and pool choice are where external review and independent re-composition must sit; that seat is human. +15. **Byte-accurate claim filing** — verbatim spans + annotation over spans, never prose rewrite; state an incapable claimant's claim *as intended, not inflated or deflated*; ask a clarifying question before judges launch against the wrong claim. +16. **Annotations state filed content positively** — never negations of known failure classes; exclusions live in the composition record, not judge-visible evidence. +17. **Span boundaries are a judged surface** — the grounding seat checks the cut for tilt-by-omission, not just the bytes inside it. +18. **Intent-readings are judged against the garble** — indeterminate bytes are the baseline; any determinate repair is a labeled strengthening even when all rival parses are equally strong. +19. **Construal conflicts compose like overlaps** — the same ambiguity resolved oppositely by isolated seats is a typed fork in the record, never a silent blend (no-global-section, one layer up). +20. **Non-spawn rationales are demonstrated, not asserted** — "untestable as composed" is shown against the pool's contents, never solely by the party whose filing created the unreachability; pre-registrations need a registry the audit seat can timestamp. + +### 6.1 Rule 4 superseded (dated entry — July 19, 2026, Session 71) + +**Original wording, preserved:** + +> 4. **Belief-facing taxonomies close per composition; the audit +> taxonomy is invariant** — how judges fail does not depend on what +> they judge. + +**Why it was superseded rather than annotated.** The original is a +*lossy distillation of this record's own evidence*. §2 and §3 show the +three hands varying names, purposes, selections, orientations and +taxonomies together — the same four-role skeleton producing +water-chemistry, comedy and methodology panels — while the rule +distilled only the taxonomy half of that. A rule narrower than the +demonstration it was drawn from understates its own source, and a +consumer reading the rule alone would conclude that everything except +belief-facing taxonomies is fixed. + +That conclusion was reached in practice. Session 71 authored four +judges with fixed names and per-role taxonomies, byte-pinned them and +registered them as a standing roster, working from the ratified records +without contradiction from any of them. The roster was rolled back and +the fixtures deleted. Holding the original wording stable for citation +stability would have preserved the exact encoding that produced the +error — and this program's own finding is that machinery and encodings +beat the prose around them +([`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md)). + +**What the new wording adds:** composition covers name, purpose, +selections, orientation, taxonomy and anchors — not taxonomy alone; the +audit seat composes like the others except in its failure taxonomy; and +**the name is a composition surface**, a place where context clusters, +so an adaptive name buys structural coherence a generic slot label +cannot. That last point is collaborator direction (M. Murphy, +owner-approved July 19, 2026) and is the reason supersession was chosen +over an additive note. + +**Standing of the underlying thesis — stated precisely, because a +first draft of this entry blurred it.** Two distinct claims sit under +rule 4 and they do not have the same standing. + +**(a) Primitives are load-bearing for governability — corroborated, +not open.** §5's adversarial clean-context attack ran five candidate +paradigms (learned reward models, prediction markets, proof checkers, +evolutionary selection, common-law precedent) and **every one +fractured along the same seam: *primitive-free ⟹ ungovernable or +non-universal*.** Remove the primitives and the system stops being +governable, or stops being universal. That is a result the program +already has, by failed counterexample. The "conditionally" in §5's +verdict is narrow and attaches elsewhere — the thesis is *contentful* +only under a strong reading of "governable" plus a substantive- +reduction guardrail. It does not put (a) in doubt. + +**(b) Decomposability is the open bet.** The named falsifier, +representational holism, tests whether judgment-relevant structure in +learned judges decomposes into interpretable dimensions. Per §8 that +same bet underwrites the refined functional-infinity entry and the +residual-stream sidecar direction; the owner's ruling is that it is +**tested empirically, not argued**, and all three settle together. + +So rule 4 does not rest on an untested framework. It rests on (a), +which is corroborated, while (b) is the flank the program is +deliberately pointed at. A holism result would reopen the +decomposability claims — it would not restore primitive-free judging as +governable. + +**Not adopted here:** the analyst's steelman formulation (*no judging +system is simultaneously universal, governable, and primitive-free; +composition-from-primitives is the unique design occupying universal ∩ +governable*) remains **TABLED as a claimant-optional refiling** (§10 +item 1) — the decision is the collaborator's, and rule 15 cuts both +ways. This entry cites the test result, not the steelman. *(Superseded +July 21, 2026 — §5.1: the collaborator accepted the refiling and the +owner ratified; the steelman is now adopted as the thesis formulation, +its decomposability falsifier unchanged.)* + +**Mechanical note.** The rule keeps its number. No source file cites +rule 4 (`judge_intake_prompt.ts` cites 6 and 16, `judge_prereg.ts` +cites 11 and 20, `support_sweep.ts` cites 12, 14 and 20), so the +supersession causes no citation churn. + +## 7. The final ledger (both runs composed) + +| Item (claimant's bytes) | Disposition | Carried notes | +|---|---|---| +| game-target spec | promote | record-fit routes through the priority declaration (keystone) | +| space functionally infinite, while finite | promote as refined | "nominally astronomical" corroborated; functional size awaits a distinctness criterion; "while finite" true only of a typed-vocabulary snapshot; steering caveat until independently replicated | +| anecdotal testing, with reason | promote as filed | the "necessarily" that drew drawbacks was the filer's, not the claimant's | +| cannot test them all | **promote, unanimous** | corroborated at ≥5 orders of magnitude on the closed combinatorial core alone | +| REPL may contain (three examples; we don't know) | promote as filed | enumerated modal, not a universal | +| examples have no primacy beyond Trellis | merit refused (typed); grounded declaration | keystone flag | +| Trellis the only case cared about, for multiple flywheels | merit refused; grounded declaration of *qualified* exclusivity | first-run fork was a filing artifact; dissolved on refiling | +| routine reproduction during own work | abstain(evidence), disclosed untestable-as-composed | garble preserved; labeled intent-reading | +| judges must compose this way | superseded by claimant correction → primitives thesis | see §5; the original drawback stands against the original bytes as a validated true positive | +| "The game is simple!" | rhetorical header; merit never composed | no judge tripped the convention-blind wire | + +## 8. The shared empirical bet (owner ruling, July 18, 2026) + +Three entries now rest on **one assumption**: that judgment-relevant +structure is decomposable into interpretable dimensions — +(a) the refined functional-infinity claim (needs a functional- +distinctness criterion), (b) the primitives thesis (falsifier: +representational holism), and (c) the residual-stream sidecar +direction ([`RESIDUAL_STREAM_SIDECAR.md`](../../architecture/RESIDUAL_STREAM_SIDECAR.md)), +which reads judgment-relevant structure from the stream. The owner's +ruling: this convergence is the purpose — **the assumption is tested +empirically, not argued**; the judge experiments are the suitability +tests and will be iteratively refined in use. The collaborator's +framing (recorded as claimant position, not panel finding): the same +conceptual overlay (UIT-IEG, which predicted the U-neuron) predicts +this research aligns. If holism wins, the three entries fall together; +if decomposability wins, the core stands on demonstrated ground. + +**External-verification ruling (owner lean, exercised in the game):** +evidence-bearing external retrieval belongs to the **corroboration +seat**, gated by a user-selectable allowlist (per-user authoritative +sources), each result entering as a provenance-stamped support event. +The audit seat gets read-only access to the same allowlist for +coverage checks; its findings never gate. + +## 9. What passes to the harness (future work, not performed here) + +When the panel goes live in the engine, the game's results bind the +implementation shape (all subject to the usual bounded-feature +authorization; nothing here authorizes build): + +- **The filing layer is code-mediated**: promotion candidates are + selected by engine address and quoted by the engine, never retyped + by a model — rule 15 as mechanism, not discipline. +- **Judge invocations are clean contexts**: composed prompts carry + definition + allowlisted evidence + output schema and nothing else; + claimant identity masked at the evidence layer; task text inert. +- **Pre-registrations are stored, timestamped artifacts** the audit + can read — not conversation prose. +- **Allowlists are user configuration** on the REPL/workspace, not + panel constants. +- **Dispositions extend the opinion vocabulary**: remand (filing + defect), untestable-as-composed (designed abstention), merit-refusal + (value declarations), thesis-with-falsifier — alongside the drilled + v1 support arithmetic, which is untouched. +- **The audit's masked-replay and construal-fork detection** are the + two mechanisms the session layer ran by hand that want engine homes. + +## 10. Open items + +1. ~~The trilemma steelman — the collaborator accepts, amends, or + declines the refiling (§5).~~ **RESOLVED July 21, 2026 — ACCEPTED** + (§5.1): the collaborator accepts, the owner ratifies; the steelman is + adopted as the thesis formulation, carrying its decomposability + falsifier. +2. Independent (non-composer) replication to lift the steering caveat + on the functional-infinity entry (§7 row 2). +3. The narrowly scoped corroboration spawn on the keystone-routing + question (re-run audit finding F5) — available on request. +4. ~~In-repo copy of the `judge-composition` skill, if the owner wants + it versioned here (drift rule in the header governs either way).~~ + **CLOSED July 19, 2026 (Session 71)** — versioned at + `.claude/skills/judge-composition/`, with a README recording that this + record is canonical over it and that drift resolves toward the + record. Landing it in-repo was itself the remedy: a skill outside + the repository is not part of the collection a session inventories, + and Session 71 authored four judge rubrics without consulting either + the skill or this record. +5. Formal eval round + description-optimization pass for the skill + (the game itself served as iterations 1–4 with two human graders). + +## 11. Ratification + +**RATIFIED — July 18, 2026 (owner, Session 67).** All three proposals +are ratified as written. From this date: + +- **The twenty rules of §6 are binding program law.** They are cited by + number; consumers do not restate them, and a paraphrased copy is drift, + not an implementation. +- **The §9 harness-shape notes bind the implementing feature.** Their + first consumer is + [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md), whose §1.2 + dispositions each intake-relevant rule against the Trellis substrate. +- **This record is canonical over the `judge-composition` skill.** On any + drift between the two, the record wins and the skill is corrected. + +**Scope note (owner ruling, July 18, 2026).** These rules were distilled +from an exercise that ran *without a workspace* — claims existed as +conversation prose, so filing required a model to retype them. Trellis +has a fact space and a beliefs workspace; a promotion candidate is an +addressed object and the engine copies its bytes. **Ratifying the rules +as law does not import that missing substrate.** A rule whose failure +mode an architecture cannot express is satisfied by that architecture, +and the disposition is recorded per rule rather than assumed in either +direction — see JUDGE_INTAKE_DESIGN §1.2. Rules about the filer's pen +are satisfied structurally; rules about the composer's packaging bind +the engine. + +Ratified in the same act: [`RECONCILIATION.md`](RECONCILIATION.md) §7. +Records ratified under this entry are amended only by dated entry, never +by silent edit. + +*The gate this entry closes, preserved: "**OPEN.** The factual sections +(§2–§5, §7) record what happened and need no ratification. The proposals +— the twenty rules as binding program law (§6), the harness-shape notes +(§9), and this record's canonical-over-skill authority — are ratified by +the owner's dated entry here; until then any consumer must say so."* + +## 12. Standing-model pointer (dated entry — July 20, 2026, owner) + +A ratified standing model — [`STANDING_MODEL.md`](STANDING_MODEL.md), +owner-ratified as principle July 20, 2026 — reframes this record without +editing it: + +- **The twenty rules of §6 bind unchanged.** No rule is superseded by + the standing model; they are cited by number as before. +- **The §6 disposition grammar is reframed by STANDING_MODEL §3.** If + the panel never moves standing, the dispositions that *act* (promote, + merit-refuse) are **user acts the engine records**, not engine acts + the user reviews. This changes who holds the pen, not the grammar's + vocabulary. It is a *ratified principle* and an *unbuilt reduction* + (STANDING_MODEL §5). +- **Claim modes (§7 ledger uses them) are ratified as a first + vocabulary, not a primitive** (STANDING_MODEL §4). The §7 ledger rows + stand; the reclassification does not rewrite them. +- **The §7 ledger replays under the ternary with no verdict flipped** — + recorded in STANDING_MODEL §1 as corroboration that preceded + ratification. diff --git a/.claude/skills/judge-composition/references/JUDGE_CONVOCATION_DESIGN.md b/.claude/skills/judge-composition/references/JUDGE_CONVOCATION_DESIGN.md new file mode 100644 index 0000000..0f7cf0a --- /dev/null +++ b/.claude/skills/judge-composition/references/JUDGE_CONVOCATION_DESIGN.md @@ -0,0 +1,885 @@ +# Judge Convocation — Design Record (the slice-2 proposal) + +~~**Status: PROPOSED — AWAITING OWNER AUTHORIZATION. NOTHING BUILT.**~~ +~~**AUTHORIZED — OPTION B (owner, July 18, 2026 — dated entry §11.1). +NOTHING BUILT.**~~ +**IMPLEMENTED AT OPTION-B SCOPE — July 19, 2026 (Session 70, dated +entry; the authorizing PR).** The option-B machinery landed zero-model +and zero-paid: the four modules (`judge_convocation_store.ts`, +`judge_registration.ts`, `support_sweep.ts`, `judge_spawn.ts`), the +`judge_records` table, the four operator surfaces +(`npm run judges:register` / `judge:ratify` / `support:sweep` / +`support:report`), and the drill `npm run test:judge-convocation` +(23 sections / 140 checks first-run green — one section's own +source-order pin was corrected in-session; `--negative-control` exits +3 naming all four planted breaks; `--inject corrupt-expected` passes +by detection; tampered-fixture and `TRELLIS_EXP_*` refusals exit 2) +plus 15 unit pins (`npm test` 1,290/113 → 1,305/114, zero existing +tests changed). The §6 rows are now OBSERVED and merged into +RECONCILIATION §5.2 by dated entry; §3.5 records the implementation +notes as landed; §11.2 carries the road to option C. **No live run has +ever executed; the paid queue stays ON HOLD.** Prior status lines +July 18, 2026 (Session 69) preserved above. +Authored July 18, 2026 (Session 69), zero-model, document-first. This +record is how authorization was sought: +[`RECONCILIATION.md`](RECONCILIATION.md) §7 unblocked the live-judge +slice **as a gate, not an authorization**, and +[`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) §7's +residual row plus [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md) +§10 item 6 gate every mechanism below behind its own proposal. The +record ends at the owner decision in §11; the session that produced it +implements nothing and ends by surfacing that decision, never by +assuming it. + +**What this names.** EPISTEMIC_SUPPORT §7 requires each unbuilt +mechanism to be "named in its own proposal before implementation." +**Judge convocation** is that name for what stands between a ratified +candidate with a composed prompt and a recorded support opinion: judge +registration (who may be convened), the ratification queue (what may be +judged), the `support_sweep` job (when panels convene), and the spawn +boundary (how a judge is actually called). The name is deliberately +not "harness" (taken twice — the RLM harness, the stage-2 self-edit +harness), not "composition" (taken by `composePanel`), not "intake" +(slice 1), not bare "sweep" (the quarantine and entailment sweeps own +that word — `support_sweep` remains the **job** name inside this +feature, per the doctrine record's vocabulary), and not +"judge-actuation" (a **reserved pointer** — the collaborator's +forthcoming design for the calm-sycophancy hazard, +[`RESIDUAL_STREAM_SIDECAR.md`](../../architecture/RESIDUAL_STREAM_SIDECAR.md) +§9; this record does not touch, re-derive, or anticipate it). +EPISTEMIC_SUPPORT §7's residual row is amended on landing, not now — +"not yet built" is still true (the JUDGE_INTAKE_DESIGN §10 item 1 +mold). + +**Authority flags (read first).** + +- **The twenty rules of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §6 and the §9 harness-shape notes are binding program law** (ratified + July 18, 2026, that record's §11). Cited by number, never restated. +- **[`RECONCILIATION.md`](RECONCILIATION.md) is ratified** (its §7) and + governs where the parent designs differ. Its §3.4 defines what + composition consumes and refuses; its §5/§5.1 tables carry every pin + that already exists; its §5 row 9 carries the **deliberately deferred + writer-blind pin this proposal owes** (§3.2 below). +- The adoption-bounds register (RESEARCH_MAP §9) binds: AB-3 (no + routing weights), AB-5 (writer-blind, always), AB-8 (no evolution + machinery), AB-9 (gate/audit separation), AB-10 (no provenance + standing for session context), AB-11 (live blocks only). +- **The paid queue is ON HOLD** (owner ruling, July 17, 2026 — + [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md) §6). This proposal + registers estimates and criteria (§10); it cannot run anything, and + nothing in it executes before the owner re-opens the queue by dated + note plus a per-run approval under the ≤$5 cap. +- **No prompt bytes are authored here.** The slice-1 + `ComposedJudgePrompt` bytes ARE the model interface (§3.3); this + record adds no prompt section, no wrapper text, no task text. + Guardrail 15 therefore does not trigger; a future edition that finds + itself drafting prompt bytes must stop and check JUDGE_INTAKE_DESIGN + §3.2/§3.2a first — the absence of a task-text channel is load-bearing + and ratification-backed. + +Program context: [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md). Parent +doctrine: [`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md). +Panel law: [`RECONCILIATION.md`](RECONCILIATION.md). Intake (slice 1): +[`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md). Sweep mold: +`src/core/graph/entailment_detection.ts` (Session 32). Registry mold: +`src/core/graph/module_registration.ts` (Session 18). Promotion +ceremony mold: [`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md) §6. + +--- + +## 1. Problem statement + +Slice 1 (Session 68) finished the intake chain: a ratified selection +becomes a `PromotionCandidate`, a candidate becomes a byte-pinned +`ComposedJudgePrompt`, and the write-once store holds ratifications, +pre-registrations, and run-open events. There the chain stops: + +- **Nothing spawns a judge.** `renderPrompt` produces bytes no model + ever receives; `parseJudgeVerdict` gates verdicts no model ever + renders. +- **No verdict enters any sweep.** `composePanel` is drilled over + scripted verdicts only; no production run consumes registered judges + or ratified candidates, so no support opinion has ever been computed + over a real belief. +- **No judge exists as a contestable entity.** `judge_panel.ts`'s + registry is pure and in-memory; the capability-flywheel property — + the ordinary invalidation sweep contesting a judge whose evidentiary + basis moved (EPISTEMIC_SUPPORT §5) — has no storage to act on. +- **Rule 20's run-open events bind to no real run.** The store enforces + the late-registration refusal, but nothing mints a `runId` for an + actual judging run. +- **RECONCILIATION §5 row 9 is an IOU.** "Writer never sees any of it" + is currently enforced by there being no production wiring; this + proposal is the named carrier of the kernel-prompt absence pin + (FOUR_JUDGE_DESIGN §6 row 7) that must exist the moment wiring does. + +Four mechanisms close those gaps (§3), one durable store carries them +(§4), and every one of them is zero-model except the spawn boundary's +live constructor, which stays behind the paid queue. + +## 2. Doctrine (inherited, binding) + +- **Sweep-side, never a write gate** (the Session 32 mold's first + property). A support opinion never blocks, gates, or mutates a write; + the write path and custody tiers are untouched (EPISTEMIC_SUPPORT + §1 rule 1). +- **Trust elevation is not automated** (EPISTEMIC_SUPPORT §6). The + computed opinion ADVISES the WORKSPACE §6 promotion ceremony and the + batch-ratification queue; no threshold crossing acts on its own. +- **The writer is blind** (AB-5; EPISTEMIC_SUPPORT §1 rule 3). No + support quantity, judge output, or panel structure is model-visible; + this record owes and designs the pin (§3.2, §6). +- **Judges are registered capabilities** (EPISTEMIC_SUPPORT §5; R-27 + model coupling), contested by the ordinary sweep, recovered only by + human re-registration. +- **Judge-all-then-write; an error is never a verdict** (Session 32 + discipline, adopted verbatim). +- **Live blocks only** (AB-11) for every evidence gatherer. +- **The claim is the user's; the rigor belongs to the instruments** + (rule 15). The ratification queue keeps the user's recorded + confirmation as the only source of `claimMode` and claim bytes. +- **Evidence-universe curation is unauditable from inside** (rule 14). + The candidate pool is uniform and mechanically sampled; the human + curation seat sits at ratification and at external review of run + records, never inside the sweep. +- **No evolution machinery, no routing weights** (AB-8, AB-3). + Manifests are hand-authored; the R-29 hard gate is the only + selection mechanism. + +## 3. The four mechanisms + +```mermaid +flowchart LR + REG["Judge registration
judge_registration.ts
manifest -> store; contest hook -> graph"] --> RUN + Q["Ratification queue
scripts/judge_ratify.ts
show the cut; record Y + mode"] --> STORE2["convocation store
(Postgres, append-only)"] + STORE2 --> RUN["support_sweep run
support_sweep.ts
run-open, sample, compose, judge-all-then-write"] + RUN --> SP["Spawn boundary
judge_spawn.ts
rendered bytes only; oracle twin"] + SP --> RUN + RUN --> V["verdict records
(store, append-only)"] + V --> REP["support:report
composePanel -> opinion (b, d, u)
computed at read time"] + REP -. advisory only .-> CEREMONY["WORKSPACE §6 promotion ceremony
(human)"] + RLM["RLM tool surfaces"] x--x STORE2 +``` + +### 3.1 Judge registration (`judge_registration.ts` + `scripts/register_judges.ts`) + +The module-registry mold (Session 18) carrying `judge_panel.ts`'s +manifest, with one deliberate split the mold does not have. + +**The split representation (the decision).** A registered judge lives +in two places with two jobs: + +- **The manifest is store-resident.** The full `JudgeManifest` + (`judgeId`, `role`, `rubricSha`, `anchorSetSha`, `taxonomyVersion`, + `targetModelIdentity` — R-27 REQUIRED, already schema-pinned) is a + write-once record in the convocation store (§4), validated through + the existing `parseJudgeManifest` at registration. +- **The contest hook is graph-resident.** One + `(:Entity {kind: 'judge_manifest'})` node per judge, name + `judge:` (the `module:` prefix argument verbatim: prefix + + charset make collision with extracted content structurally + impossible), whose `sourceNodeIds` are the judge's evidentiary + hashes. Because the node carries `sourceNodeIds` like every other + semantic fact, the EXISTING invalidation sweep reaches it with zero + sweep changes: when the judge's evidentiary bytes die, the entity is + contested with the audit trail preserved — the capability flywheel + applied to evaluators, exactly as EPISTEMIC_SUPPORT §5 requires. + + The graph node carries **nothing else**: no role, no model identity, + no shas, no taxonomy. Reason: AB-5 forbids model-visible panel + structure, and the read-only Cypher sandbox reads the shared graph. + An opaque `judge:` plus research hashes is the minimum the sweep + needs to contest; everything a writer could shape behavior against + stays in the store, which no RLM surface reaches (§4). The residual — + the existence and count of `judge:` entities is graph-visible — is + accepted for contestability and carries a falsifier (§9). +- **Consistency is a refusal, not a hope.** One operator ceremony + writes both sides; a sweep run that finds a store manifest without + its graph hook, or a hook without its manifest, refuses the run + naming the judge (typed) before any judging. + +**Evidentiary basis, zero-paid by construction.** A manifest's +`sourceNodeIds` cite the ingested rubric and anchor-fixture bytes. +Those bytes live as byte-pinned fixtures (the anchor discipline of +EPISTEMIC_SUPPORT §5 already requires committed fixtures), and fixture +paths are extraction-excluded by the kernel-fixed +`isTestOrFixturePath` rule — so ingesting them persists Merkle-hashed +bytes with **zero extraction jobs, zero dollars**. The existence gate +(`findMissingAstHashes` mold) refuses any registration citing a hash +absent from `ast_nodes`, before any write. + +**Lifecycle.** Registration and re-registration are operator ceremonies +(`scripts/register_judges.ts`, the `register_modules.ts` mold; never +model-reachable). The mold's two planner rules carry over verbatim: +registering a non-active manifest refuses (re-registration un-contests +the entity — the recovery transition must not be triggerable as a side +effect), and recovery follows human re-review with a named reviewer +(`reRegisterJudge`'s existing contract; the superseded contest record +survives). First edition: four hand-authored manifests, one +configuration per role (AB-8); J4's `targetModelIdentity` differs from +J1–J3's by default (AB-9; FOUR_JUDGE_DESIGN §8 lets the owner waive +with recorded reasoning). + +**Zero-model boundary: entirely zero-model.** + +### 3.2 The `support_sweep` job (`support_sweep.ts` + `npm run support:sweep`) + +The Session 32 entailment mold, adopted property by property; every +divergence is stated. + +- **The sampling unit is the (candidate, judge) pair.** Candidate + identity = `selectionId` + an engine-computed `candidateHash` over + the canonical claim bytes and mode; judge identity = `judgeId` + + `rubricSha` + `targetModelIdentity`. Each pair is judged **at most + once, ever** (the mold's judge-once bookkeeping, against the durable + verdict records): a re-ratified selection (new bytes) or a + re-registered judge (new manifest identity) is a NEW pair and + re-enters the pool. Verdicts from a superseded pair identity survive + as history and never re-stamp. +- **Uniform pool, seeded sampler, budget, counted deferral.** The pool + is every ratified, unjudged pair — no per-candidate curation exists + in the machinery (rule 14: the mechanical pool + seeded sampler is + the engine's side of the curation seat; the human side is + ratification and external review of run records). Sampling at a + config rate, a hard judge budget per sweep, overflow counted as + `deferred`, never silent. Config twins `SUPPORT_SAMPLE_RATE` / + `SUPPORT_JUDGE_BUDGET_PER_SWEEP` (defaults inherit the entailment + values 0.1 / 25, cap 500 — same knobs, separate keys). +- **Run binding (rule 20, finally real).** The sweep mints a `runId` + and records the run-open event through the slice-1 store's `openRun` + BEFORE the first judge invocation. Pre-registered expectations for + that run must exist before open or refuse late — the slice-1 + machinery enforces it; this job is what binds it to reality. A run + without forecasts is legal; a forecast after open is not. +- **What a run consumes.** Registered, uncontested judges (§3.1) × + sampled ratified candidates. Per pair, engine-side: applicability + and the R-29 gates are `composePanel`'s existing law (RECONCILIATION + §3.1/§3.4 — nothing re-implemented); the composed prompt comes from + the slice-1 chain (`buildCandidate` → `toPromptInput` → + `composeJudgePrompt`) unchanged. +- **Evidence gatherers (engine code, deterministic, recorded).** Each + role's non-claim inputs are gathered engine-side and recorded in the + run record: + - J1 `citedBytes`: the live bytes at the candidate belief's cited + hashes (`fetchBlockTexts` mold). A candidate citing nothing negates + `cited_bytes_available` → J1 excluded by the hard gate, typed and + counted — the gates working, not a special case. + - J2 `history`: the belief's own version/contest record, assembled + mechanically (most recent N records verbatim, bounded, no + paraphrase — a curated digest was a measured composer corruption + surface, game §4). Absent history negates `history_available`. + - J3 `independentEvidence`: engine-side retrieval over **live blocks + only** (AB-11), excluding the candidate's own citation chain + (rule 2's corroboration base), bounded count. **First edition reads + internal live blocks only** — the game §8 external-verification + ruling (user-selectable allowlists for external retrieval) is + real, recorded, and DEFERRED to its own edition; nothing here + forecloses it. +- **What a run writes (judge-all-then-write).** Every verdict is + collected before any write; an infrastructure failure anywhere + aborts with zero partial records. The writes are: the parsed + `JudgeVerdict` records (append-only, with `promptHash`, pair + identity, `runId`) and the run record (pool counts, sampled, + deferred, exclusions, jurisdiction abstains — rule 12: designed + silence is disclosed, per candidate, from `composePanel`'s own + counts). **Nothing else.** No graph write, no production-schema + support fields, no write-path touch. +- **The opinion is computed, never cached model-visible.** + `npm run support:report` replays verdict records through + `composePanel` → `computeSupportOpinion` at read time (`asOf` decay + makes a stored opinion a stale cache anyway). The report — opinions, + conflicts, disagreements, exclusions — is an operator surface + advising the promotion ceremony. It gates nothing. +- **The writer-blind pin (RECONCILIATION §5 row 9, owed here, DESIGNED + here).** Two halves, per FOUR_JUDGE_DESIGN §6 row 7: + (a) **kernel-prompt absence** — the composed-prompt pin fixtures + (both arms) contain no token from a closed support-vocabulary list + (fixed at implementation: the support field names, opinion component + names, judge role names, drawback class names); the pin greps the + pinned bytes, so any future kernel-prompt edit that leaks support + vocabulary fails a drill rather than needing a reading; + (b) **read-surface pins** — no RLM tool surface returns a support + field or reaches the convocation store (§4): the store is a Postgres + table no sandbox surface names, and the unit pins assert the tool + list and their SQL carry no path to it. + +**Zero-model boundary: the sweep machinery is zero-model.** Its drills +run end to end on the oracle judge (§3.3); the only model call in the +entire feature lives behind the spawn boundary's live constructor. + +### 3.3 The spawn boundary (`judge_spawn.ts`) + +The ONLY module in the feature permitted to construct a model call +(static-import-pinned); everything else is zero-model by construction. + +- **The composed bytes ARE the interface.** The request is exactly + `renderPrompt(composed)` as the single user message — **no system + message, no wrapper text, no appended instruction, no task text**. + Any wrapper byte would be a new prompt channel and a composed-prompt + change (Guardrail 15 + a §3.2a dated amendment — deliberately + expensive). `promptHash` is re-verified against a fresh render + immediately before send (the `parseComposedPrompt` re-render mold); + a mismatch refuses before any network I/O. +- **Model coupling is a refusal, not a convention** (R-27). The + configured model for the call must equal the manifest's + `targetModelIdentity` byte-for-byte, checked before I/O; a migration + contests the judge (the registry path), it never silently retargets + the spawn. +- **The model supplies only what the output schema names.** From the + §3.2a grammar: `{verdict, drawback, abstainReason}` — validated + through the `parseLlmResponse` mold, then `parseJudgeVerdict` (the + existing gate). Every other verdict-record field (`judgeId`, `role`, + `beliefId`, `atMs`, `weight`) is constructed engine-side. **Weight + is an engine constant (v1: 1.0, config twin), never model-supplied** + — a model-supplied weight would be a count-shaped self-report (AB-5's + origin triple). +- **An infrastructure failure is an error, never a verdict** (network, + parse, refusal — throws; the sweep's atomicity turns it into zero + writes). +- **The oracle twin** (`makeOracleEntailmentJudge` mold): a + deterministic pair→verdict map keyed by pair identity, zero cost — + the drill's vehicle for the entire sweep path. +- **The paid gate is layered and fail-closed.** The runner constructs + the oracle unless an explicit operator flag requests the live + constructor; the live constructor additionally requires the paid + queue re-opened by the owner's dated note plus the per-run approval + with a printed estimate, under the ≤$5 cap. Absent any layer, the + live path is unreachable, and the drill pins that. + +**Zero-model boundary: the module is zero-model in every drill and +default path; the live constructor is the feature's single paid +surface, and it is triple-gated.** + +### 3.4 The ratification queue (`scripts/judge_ratify.ts`) + +The WORKSPACE §6 promotion ceremony mold applied one boundary earlier +(nominate → operator approves), minimal first edition: + +- **An operator CLI, never model-reachable** (the `npm run promote` / + `register_modules` lineage): `list` (pending selections), `show + ` (prints the `buildRatificationRequest` payload + VERBATIM — each item's exact bytes WITH their engine-computed + neighbors, so the cut is visible at the moment of approval; rule 17 + rides the slice-1 machinery, nothing new), and `record + --confirm --claim-mode ` (records the user's Y + mode through + the slice-1 `recordRatification` into the durable store). +- **The user's recorded confirmation is the only source** of + `claimMode` and the ratified bytes (rule 15; HANDOFF guardrail: no + queue convenience may reintroduce an agent channel). Enforcement: + the flags are required with no default; the store schema has no + other entry point; the script is operator-run. The slice-1 gate + (`buildCandidate` refuses unratified selections; `claimMode` read + off the record with no parameter to bypass it) is inherited, not + re-solved. +- **A decline records nothing.** The gate simply never opens — an + unratified selection is already structurally unreachable + (`[ratification-gate]`, observed). Decline bookkeeping, if ever + wanted, is its own decision; the minimal edition does not silently + grow a second record kind. +- **Where selections come from** is unchanged (WORKSPACE §6 lineage): + the agent nominates in its answer or the operator inspects the + workspace; the selection object is built engine-side + (`buildSelection`). The queue transports and records; it never + authors. + +**Zero-model boundary: entirely zero-model.** + +### 3.5 Implementation notes as landed (dated entry — July 19, 2026, Session 70) + +The record governs; these notes fix the concrete forms the +implementation and the drill's independent generator BOTH derive from +this text (on drift, the byte-pin fails and this entry adjudicates): + +- **Pair identity, exact forms.** `candidateHash` = SHA-256 of the + canonical JSON (recursively key-sorted, no whitespace) of + `{claimContent, claimMode}`; `candidateIdentity` = + `` `${selectionId}#${candidateHash}` ``; `judgeIdentity` = + `` `${judgeId}|${rubricSha}|${targetModelIdentity}` ``; `pairKey` = + SHA-256 of `` `${candidateIdentity}::${judgeIdentity}` ``. +- **The seeded sampler is mulberry32** (`a += 0x6d2b79f5` in uint32; + `t = imul(t ^ (t >>> 15), t | 1)`; + `t ^= t + imul(t ^ (t >>> 7), t | 61)`; + yield `((t ^ (t >>> 14)) >>> 0) / 2^32`). Iteration order: + candidates ascending by `selectionId`, judges ascending by + `judgeId`, candidate-major; one RNG draw per pool pair. +- **Jurisdiction abstentions are engine-synthesized at zero spend.** + S10 layer 3 is engine-decidable, so spawning a judge to learn its + own claim modes would buy nothing: an applicable-evidence, + inapplicable-mode pair records an `abstain/jurisdiction` verdict + flagged `synthesized` with `promptHash: null`. Pair-once bookkeeping + covers synthesized records like any other. +- **The ratification payload carries the ratified selection AND the + confirmed address-space entries** beside the untouched slice-1 + record, so the sweep judges exactly the bytes the user confirmed — + no re-fetch, no drift channel. Slice-1 schemas unchanged. +- **§4's kind set gains `run_report`, keyed by `runId`** — the §3.2 + run record the §4 list omitted; recorded here as the dated + amendment rather than a silent widening. +- **Evidence gatherers are injected.** First edition: no citation or + history channel exists in the intake chain, so J1/J2 report + unavailable in production and the R-29 gate excludes them, typed + and counted; J3's live gatherer requires an embedding call and is + therefore part of the LIVE path's spend (§11.2 item 5) — zero-model + runs use supplied or oracle evidence. The channels' entry is + future-edition work, recorded, not built. +- **The verdict weight rides `SUPPORT_VERDICT_WEIGHT`** (engine + constant, default 1.0), never model-supplied. + +## 4. The convocation store (the durable persistence decision) + +Slice 1's `PreregStore` is pure and in-memory by design. Convocation +needs durability, and the decision is: + +- **One append-only Postgres table set in the existing substrate + database** (`trellis_db` already carries `ast_nodes`): records + `{kind, key, payload, recordedAt}` with `UNIQUE (kind, key)` — the + write-once law becomes a **mechanical storage refusal**, not + discipline; the record kinds are the slice-1 three (ratification, + pre_registration, run_open) plus `judge_manifest` (§3.1) and + `verdict` (§3.2). Supersession stays a new record referencing the + old. +- **The pure module stays pure.** The slice-1 store (and rule 11's + import invariant) is untouched: the thin wiring layer (CLI, sweep + runner) replays the table into the in-memory `PreregStore` / + registry at process start and appends through it. Pure core, thin + shell — the house pattern. +- **Rejected alternatives, with reasons:** the graph (verdicts and + forecasts are audit records, not semantic facts — and the graph is + sandbox-readable, which AB-5 forbids for judge output); a JSONL file + (no mechanical write-once); the engineering-loop protected roots + (EL surfaces are out of bounds for program work, standing + guardrail). +- **No RLM surface reaches it** — the writer-blind pin's second half + (§3.2) pins this by construction and by unit pin. +- **The audit seat reads it** (rule 20). Verdict records carry + `(judgeId, verdict, promptHash, pair identity, runId)` — the exact + shape a future J4 sampling edition needs for `sampledTriples` and + masked replay, so the game §9's two wanted engine homes (masked + replay, construal-fork detection beyond `composePanel`'s existing + disagreement records) are REACHABLE later without re-plumbing. + Named, deferred, not built here. + +## 5. Relationship to existing modules + +New siblings; nothing lands inside an existing module. The slice-1 +trio, `judge_panel.ts`, `judge_audit.ts`, and every drilled path are +byte-untouched. Imports are one-way: + +- `support_sweep` → `judge_intake` / `judge_intake_prompt` / + `judge_panel` (`composePanel`) / `judge_prereg` (`openRun` + reads) / + `judge_registration` / `judge_spawn`. +- `judge_spawn` → `judge_intake_prompt` (`renderPrompt`, + `parseComposedPrompt`) and `judge_panel` (`parseJudgeVerdict`). + **Never** → `judge_prereg`: the spawn must not be able to see + expectations (rule 11 extended to the new surface, static-pinned). +- `judge_registration` → `judge_panel` (`parseJudgeManifest`) plus the + store/graph wiring. Never → `judge_spawn`. +- Nothing imports back into the slice-1 trio; `judge_audit`'s only + admissible read remains the store. + +| Path | Contents | +|---|---| +| `src/core/graph/judge_registration.ts` | manifest validation, existence gate, split representation, consistency refusals (pure planning; wiring thin) | +| `scripts/register_judges.ts` | the operator registration/re-registration ceremony | +| `src/core/graph/support_sweep.ts` | pool, pair identity, seeded sampling, run binding, gatherers, judge-all-then-write | +| `scripts/support_sweep.ts` / `npm run support:sweep` | the runner (oracle by default; live triple-gated) | +| `src/core/graph/judge_spawn.ts` | transport, model-identity refusal, verdict parse, oracle twin | +| `scripts/judge_ratify.ts` | the ratification queue CLI | +| `npm run support:report` | opinions computed at read time; the advisory operator surface | +| `scripts/test_judge_convocation.ts` + `fixtures/judge_convocation/` | drill + byte-pinned fixtures + independent generator | +| `npm run test:judge-convocation` | drill entrypoint | + +## 6. Behavior → enforcement → pin (DESIGNED — no row below is observed) + +Rows are DESIGNED here, in the JUDGE_INTAKE_DESIGN §10.4 discipline: +they merge into RECONCILIATION §5 by dated entry only in the +implementing PR, after every pin is observed green. *(Done July 19, +2026, Session 70: merged as RECONCILIATION §5.2 with every row +observed — the drill section names there are the as-landed ones; +option-B scope notes mark the two rows whose live halves await +option C.)* + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Manifests validated, R-27 required, hand-authored only | `parseJudgeManifest` at registration; no generator exists (AB-8) | drill `[roster-manifest]` | +| Registration existence-gated before any write | `findMissingAstHashes`-mold gate in the ceremony | drill `[roster-existence]` | +| Store manifest ↔ graph hook consistent; graph node carries only name + hashes | one ceremony writes both; sweep refuses mismatch naming the judge | drill `[roster-consistency]` | +| Contested judge unreachable by a run (graph round-trip) | run-open loads contest state into the pure registry; `composePanel` refuses (existing law) | drill `[roster-lifecycle]` | +| Recovery is human re-registration; non-active registration refuses | planner refusal (module mold); named-reviewer requirement (existing `reRegisterJudge`) | drill `[roster-recovery]` | +| Pairs judged at most once ever; identity spans candidate bytes + manifest identity | durable verdict lookup excludes judged pairs before sampling | drill `[sweep-once]` (re-registration re-enters the pair; the superseded pair does not re-stamp) | +| Uniform pool, seeded sampling, budget, counted deferral | sweep policy (config twins) | drill `[sweep-selection]` | +| Run-open recorded before first invocation; late pre-registration refuses | `openRun` ordering in the runner; slice-1 store law | drill `[sweep-run-open]` | +| Judge-all-then-write; infrastructure failure writes nothing | collect-then-write (Session 32 discipline) | drill `[sweep-atomicity]` (planted judge failure → zero records) | +| Never a write gate; no path to the write path or promotion | no such import exists | drill `[static-imports]` | +| Gatherers read live blocks only; J3 excludes the citation chain | gatherer queries (liveness-filter mold; exclusion set) | drill `[sweep-evidence]` | +| Attribution never re-enters through sweep plumbing | prompts only via `toPromptInput`; store records carry ids, never addresses or partitions | drill `[sweep-attribution]` (the `[attribution-partition]` fixture driven through the FULL sweep path) | +| Designed silence disclosed (rule 12) | run record carries `composePanel`'s exclusion/jurisdiction counts per candidate | drill `[report-discloses]` | +| Writer-blind (RECONCILIATION §5 row 9): kernel-prompt absence + read-surface isolation | composed-prompt fixtures carry no support vocabulary; no tool path to the store or any support field | drill `[writer-blind]` + unit pins on both composed-prompt fixture arms and the tool surfaces | +| Spawn transport = exactly the rendered bytes; `promptHash` re-verified pre-send | request builder in `judge_spawn.ts` | drill `[spawn-transport]` (byte-equality; tamper → refusal) | +| Model identity must equal the manifest's, or refuse before I/O | spawn refusal (R-27) | drill `[spawn-model]` | +| Model supplies only `{verdict, drawback, abstainReason}`; weight engine-constant | spawn constructs the record; strict schemas | drill `[spawn-verdict]` | +| Live spawn unreachable without the operator flag (and the re-opened queue) | runner defaults to the oracle constructor | drill `[spawn-gate]` | +| The queue shows the cut verbatim (rule 17) | `show` prints the `buildRatificationRequest` payload unmodified | drill `[queue-shows-cut]` | +| `claimMode` only from the user's recorded flags; no default; declines record nothing | required flags; store schema; no other entry point | drill `[queue-provenance]` | +| Store write-once mechanical; supersession references, never overwrites | `UNIQUE (kind, key)` at the storage layer + slice-1 law above it | drill `[store-write-once]` | + +## 7. Drills + +`npm run test:judge-convocation`, the house mold: byte-pinned fixtures +under `fixtures/judge_convocation/` with an **independent spec-derived +generator** (never the implementation's output), a SHA-256 manifest +checked before any section, `TRELLIS_EXP_*` refusal before any +section, `--inject corrupt-expected` passing by detection, and +`--negative-control` exiting nonzero naming every planted break +individually. + +Four planted breaks, one per mechanism: a contested judge's verdict +reaching composition through the graph round-trip; a pair judged twice +across a sweep boundary; a spawn transport whose bytes differ from the +rendered prompt; a duplicate store write surviving. Each must be named +— a control that fails generically has not demonstrated detection. + +The oracle judge drives the ENTIRE sweep path zero-model, end to end: +run-open → sampling → slice-1 prompt composition → oracle verdicts → +parse → store → `support:report` opinions checked against the +independent oracle's own arithmetic (the `computeSupportOpinion` +fixtures extended, never modified). + +## 8. Explicit exclusions + +- No claim-kind plane; no routing weights (AB-3); no evolution or + search machinery (AB-8); no automatic promotion, registration, or + un-contesting (EPISTEMIC_SUPPORT §6/§8). +- No live J4 sampling, masked replay, or construal-fork engine work + beyond `composePanel`'s existing records — named in §4 as reachable, + deferred to its own edition. +- No external-retrieval allowlists for J3 (game §8's ruling is + recorded and deferred); first-edition corroboration reads internal + live blocks only. +- No support fields in any production schema; no stored opinions; no + writer-visible anything (AB-5). +- No anchor-calibration paid run (FOUR_JUDGE_DESIGN §7 item 4 stays a + separate owner-gated proposal); no paid run of any kind — the queue + is ON HOLD and this record cannot open it. +- No kernel, extraction, or module-addendum prompt byte; no + composed-prompt pin movement; no new prompt sections + (JUDGE_INTAKE_DESIGN §3.2/§3.2a govern; Guardrail 15 untriggered). +- No `tools/engineering-loop/` change, no acceptance-ledger touch, no + EL claim. +- No restatement of the twenty rules; no new glossary terms; no + hypothesis promoted to canonical prose. +- No modification to `composePanel`'s drilled path, the slice-1 trio, + the workspace or Tier-1 write paths, or custody tiers. + +## 9. Falsifiers + +- **The store leaks to a model surface.** If any support quantity, + verdict, or store content becomes reachable from an RLM tool, AB-5 + is broken structurally, not stylistically — `[writer-blind]` is the + detector; the channel is named and closed before any other work. +- **Attribution reaches a judge through sweep plumbing** (rule 6). If + a verdict shifts between two partitions' semantically matched + candidates driven through the full sweep path, an address component + is leaking — `[sweep-attribution]` is the detector; the slice-1 + falsifier inherited at the new layer. +- **The split representation drifts** — a manifest without a hook or a + hook without a manifest observed outside the drill means the + ceremony is not atomic in practice; the representation is redesigned + before live judges, not patched around. +- **Graph-visible judge existence shifts writer behavior.** The §3.1 + residual (opaque `judge:` entities in the sandbox-readable graph) is + accepted on the claim that name + hashes carry nothing a writer can + shape behavior against. A measured run showing otherwise moves + manifest hooks out of the shared graph by dated amendment. +- **Pair bookkeeping misses an identity change.** If a superseded + judge or re-ratified candidate's stale verdicts still count, the + pair identity is wrong — `[sweep-once]` is the detector. +- **The uniform pool is steerable anyway** (rule 14). If run records + are insufficient for an external reviewer to re-derive the pool and + sampling, the mechanical-pool claim is withdrawn and the run record + grows until they are. +- **Gatherer nondeterminism.** If the same substrate state yields + different evidence for the same pair, J3's gatherer is redesigned + before any live run — a nondeterministic evidence universe is + rule 14's failure inside the engine. +- **The standing composition falsifier carries** (RECONCILIATION §3.3, + cited not restated) — a measured regime moving the cross-role / + same-jurisdiction boundary moves it by dated amendment with a + same-commit drill re-pin. + +## 10. Spend (registered estimates — NOT authorization; the queue is ON HOLD) + +- **Everything in options A/B (§11) is $0.00**: registration fixtures + ingest extraction-free (§3.1), the sweep drills on the oracle judge, + and the ratification queue and store are zero-model machinery. +- **A live panel run, when the owner ever re-opens the queue:** from + measured telemetry (the entailment sweep judged 25 pairs for + $0.0093; a composed judge prompt is larger — definition + gathered + evidence ≈ 1–4k input tokens, ≤100 output), the estimate class is + **$0.002–$0.01 per verdict, $0.05–$0.25 per sweep at the default + 25-verdict budget**. A first calibration convocation (four + manifests, ~8 candidates, ≤24 belief-facing verdicts) sits in the + same band. Hard bounds stack: the judge budget, the ≤$5/run cap, the + per-run approval, and the queue's dated re-opening before any of it. + +**Owner-requested measurement, registered July 18, 2026 (dated note, +recorded at the §11.1 authorization; queued, not scheduled — it +executes only after the queue's dated re-opening plus the per-run +ceremony):** the **metered promotion-cost test** — what it costs, +end to end, to promote a REPL workspace belief to a Tier-1 fact +through the full chain: selection → ratification ($0, operator) → +convocation verdicts (three belief-facing judges at the per-verdict +band above) → `support:report` ($0) → the WORKSPACE §6 operator +promotion ($0) → verified ingest with extraction of the promoted +segment (size-dependent; single-segment extraction at stage-1 rates +≈ $0.01–$0.03) plus embedding (negligible). Estimate class +≈ **$0.02–$0.06 per promoted belief**, judging and extraction +co-dominant. The deliverable is measured actuals PER STAGE against a +pre-stated criterion, reported against this estimate — the test rides +naturally on the first calibration convocation's shape. Also listed +in the PROGRAM_CONTEXT §6 paid-queue hold list by dated bracket. + +## 11. The authorization decision (owner act — scope, spend, sequencing as named options) + +This record is the deliverable gate of Session 69: nothing below +happens until the owner records a choice. + +- **Option A — zero-model machinery only.** Roster + store + docket + CLI + sweep-with-oracle + drill + the row-9 writer-blind pin. The + spawn module lands ORACLE-ONLY (no live constructor exists in the + tree). Spend $0. One implementation session in the Session 68 mold. +- **Option B — A plus the complete spawn boundary.** The live + constructor exists behind the triple gate (operator flag + dated + queue re-opening + per-run approval) but cannot run; the drill pins + its refusals — which is exactly what should be pinned while the + queue is closed. Spend $0 this build. **Recommended:** deferring the + code invites a second proposal for a bounded surface this record + already decides, and the refusal pins are worth more than the + deferral. +- **Option C — B plus a pre-authorized first calibration convocation, + contingent.** The run executes only after the owner's dated + queue-re-opening note AND the ordinary per-run ceremony with the §10 + estimate re-printed; this option just avoids a third session for the + proposal re-surface. +- **Option D — re-scope or decline.** The record stands as design + either way; EPISTEMIC_SUPPORT §7's residual row is untouched until + something lands. + +Sequencing under A/B/C: one implementation session (Session 70), drill +first-green before records move, the §6 rows merged into +RECONCILIATION §5 by dated entry only when observed, EPISTEMIC_SUPPORT +§7's residual row split on landing. + +### 11.1 Authorization (dated entry — July 18, 2026) + +**RECORDED — the owner chose OPTION B** at the Session 69 close-out +review, the same day this record was authored (the live in-session +decision recorded here per the Session 67 → 68 precedent). In +consequence: + +- The Session 70 build implements option A's zero-model machinery + PLUS the complete spawn boundary behind the triple gate. Spend + $0.00. +- **No live run is authorized.** Option C was not taken; the paid + queue stays ON HOLD, and any live convocation re-enters only + through the owner's dated queue re-opening plus the ordinary + per-run ceremony with the §10 estimate re-printed. +- In the same act the owner registered the **metered promotion-cost + test** (§10 dated note): a future measurement of the end-to-end + cost of promoting a belief to fact in the REPL. Queued on the paid + queue's hold list; not scheduled. + +*The gate this entry closes, preserved: "This record is the +deliverable gate of Session 69: nothing below happens until the owner +records a choice."* + +### 11.2 The road to option C (dated entry — July 19, 2026, Session 70; owner-requested consideration) + +The owner asked, at the option-B authorization, that the road to the +eventual live-LLM test be considered. Recorded here so the first live +convocation is a checklist walk, not a redesign. What must be true, +in order: + +1. **The owner's dated paid-queue re-opening** (PROGRAM_CONTEXT §6) — + governance, not machinery; nothing below substitutes for it. +2. **The per-run ceremony:** a presented proposal with the §10 + estimate re-printed, per-run approval under the ≤$5 cap, actuals + reported after. +3. ~~**Four real manifests.** Hand-authored rubrics and ten-item anchor + fixtures (FOUR_JUDGE_DESIGN §5 anchor discipline; AB-8 — no + generation), committed byte-pinned, ingested extraction-free + (§3.1), registered through the ceremony. J4's + `targetModelIdentity` differs from J1–J3's by default (AB-9). + Zero-paid; can land any time before the run as ordinary operator + work.~~ +4. ~~**Real ratified candidates** through the queue (§3.4) — the + docket. Zero-paid operator work; the promotion candidates the + owner actually cares about are the right first docket.~~ + +**Items 3 and 4 are SUPERSEDED and merged — dated entry, July 19, 2026 +(owner ruling, Session 71).** They sequenced roster-then-docket, which +inverts the design: **composition follows the candidate.** Item 3's +clause *"can land any time before the run as ordinary operator work"* +is the specific instruction that misled Session 71 into authoring four +rubrics with fixed taxonomies, byte-pinning them, and registering them +as a standing roster — all rolled back. Note the dates: §11.2 was +written July 19, one day **after** JUDGE_COMPOSITION_GAME §11 was +ratified July 18. A ratified rule failed to propagate into the road map +written beside it. + +**3–4 (merged). The ceremony, per candidate.** For each ratified +candidate: an isolated agent characterizes the REPL's fact and belief +spaces descriptively (the candidate's domain in scope, its identity not +privileged); a composer builds each seat and its anchors from that +characterization; the instantiation gates run (validity, coverage, +overlap, falsifiability) with retry on failure; the composed judges are +recorded write-once; judging proceeds on the forward pass, where the +instantiated judges do see the candidate. Nothing is authored ahead of +a ceremony and no composition is reused. Full design: +[`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md). + +Consequences for this record's §3.1 that need their own design pass, +NOT assumed here: what `rubricSha` hashes when the rubric is composed +rather than committed; what a composed judge's evidentiary basis is and +therefore what the existence gate checks; whether the graph carries one +hook per ceremony rather than per judge, plus a durable `composer` +entity as the contestable capability; what survives of the +`judges:register` CLI; and how `support_sweep`'s sample-rate and budget +semantics re-derive when there is no judge × candidate matrix to sample +from. +5. **The J3 live evidence gatherer** — embedding-backed retrieval + over live blocks excluding the candidate's citation chain (rule 2; + AB-11). The one small code increment option B deferred (its + embedding call is paid-path spend); it rides the run's own + proposal, not a separate session. +6. **The run shape: the metered promotion-cost test (§10).** The + first calibration convocation and the promotion-cost meter are ONE + run — per-stage actuals (ratification $0, verdicts at the §10 + band, report $0, promotion ceremony $0, ingest/extraction of the + promoted segment) reported against the ≈$0.02–$0.06/belief + estimate. + +What option B already delivered toward C: the full path rehearsed +zero-model end to end (run-open → sampling → composition → oracle +verdicts → store → report), the spawn boundary's refusal pins +observed (R-27 identity, transport byte-equality, the triple gate), +rule 20 bound to real runs, and the row-9 writer-blind pin closed. +The live constructor exists and can only refuse until items 1–2 +exist. + +## 12. No `R` rows + +This record makes design commitments, not empirical claims (the +JUDGE_INTAKE_DESIGN §10 item 5 discipline). The §9 items are +falsifiers on design decisions; if any is later asserted as a finding +— e.g. that graph-visible judge existence is behaviorally inert — it +enters the register as its own row with that falsifier, by dated +entry. + +## 13. Explanation render — design note (July 21, 2026) + +**Status: Option A IMPLEMENTED — July 21, 2026; Option B deferred.** Records, in engineering terms, +the resolution of an explainability question the collaborator raised: +should a judge's output carry a human-readable rationale, the way the +session-layer `judge-composition` skill's output schema does? So a later +bounded feature can be built from a record rather than from a +conversation. + +### The finding: no rationale exists on the wire or in the record + +The model's response surface is `judgeResponseSchema` +([`judge_spawn.ts:53`](../../../src/core/graph/judge_spawn.ts:53)), a +`z.strictObject` of exactly `{ verdict, drawback, abstainReason? }` — +`strictObject` refuses any extra field. The stored verdict `verdictBase` +([`judge_panel.ts:143`](../../../src/core/graph/judge_panel.ts:143)) +adds only engine-side `{ judgeId, role, beliefId, atMs, weight }`. So +**there is no `rationale` and no `rationaleSpan` anywhere in the shipped +path** — the `rationaleSpan` named in the invariant verdict schema of +[`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) §1 was +designed and never carried into the wire or record. That template line +is now the outlier; either the field is built (Option B below) or the +template's §1 schema is corrected by dated entry to match the shipped +three-field surface. + +### Why the record layer stays minimal + +A model-authored free-text rationale in the store would put model prose +into a record byte — the corruption channel +[`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md) +forbids for content, applied here to verdicts. It is also unverifiable, +non-deterministic (breaking the byte-pinned render/report determinism), +store bloat, and a fresh Goodhart/leak surface that would need its own +writer-blind and never-reward-length guards. The minimal wire is a +feature, not an omission. + +### The resolution: explanation is a read-time render, not a stored field + +Explainability is a *presentation* concern, and the panel outcome is +already computed at read time — `computeConvocationReport` +([`support_sweep.ts:374`](../../../src/core/graph/support_sweep.ts:374)) +replays stored verdicts through `composePanel` and stores no opinion +(RECONCILIATION §5.2). An explanation render is the same pattern one +layer out: a pure function over already-stored, code-mediated fields. + +- **Option A — render from what is already stored (recommended first + step; zero schema change).** Per verdict in a `CandidateReport`, join + `role` + `verdict` + `drawback` (the class) + the class's one-line + gloss (its rubric question, carried on the *composed* judge + definition, RECONCILIATION §2) + `abstainReason` + the promotion + record's existing addresses. Yields a class-level "which seat, what + verdict, what the drawback class means," deterministic, no new model + output, nothing new stored. The gloss source is the composed judge + definition, not a hard-coded map — under the composition ceremony the + taxonomy is per-context (§11.2 3–4), so the gloss travels with the + composed rubric. +- **Option B — capture a deciding-span ADDRESS (follow-on; richer, still + code-mediated).** Implement the template's `rationaleSpan` as an + *address*, not prose: the model returns a pointer into the evidence it + was shown, the engine **validates the address resolves inside that + evidence** and stores the address, and the render quotes the resolved + bytes. The model authors a pointer, never record text, so the pillar + holds. Costs a wire field on `judgeResponseSchema`, an + address-validation step at the spawn boundary, and a store field — and + it intersects the already-open §11.2 3–4 question of "what a composed + judge's evidentiary basis is and therefore what the existence gate + checks." +- **Option C — a model-authored free-text `rationale` field — rejected** + for the record-layer reasons above. It stays legitimate at the + *session layer*, where the `judge-composition` skill's verbose + `rationale` serves an ephemeral human-read panel that is never + persisted as a record — the skill's Step 5 note already draws that + line. + +### Recommendation + +Build Option A when an explanation surface is wanted (small, +house-clean); hold Option B as the follow-on if span-level "why" proves +necessary; and correct `JUDGE_CONTRACT_TEMPLATE §1`'s `rationaleSpan` +line by dated entry either way — build it, or drop it to match the wire. + +### Implemented (dated entry — July 21, 2026) + +**Option A shipped**, owner-authorized ("align the product with the +skill to the extent we're able, then backprop"). Zero-model, zero-paid, +no wire / schema / store change: + +- [`judge_explain.ts`](../../../src/core/graph/judge_explain.ts) — the + pure render. `explainVerdict` joins seat + verdict + humanized drawback + class + the qualified-parameter dimension + abstain reason; + `explainCandidate` adds the opinion in words, the counts, and the typed + no-global-section / cross-role-disagreement / exclusion records. + `clean` renders "no known drawback found," never certified correctness + (R-01). Authors no stored byte; calls no model. +- [`support_report.ts`](../../../scripts/support_report.ts) — the + advisory `support:report` surface now prints the render. +- Pins: + [`judge_explain.test.ts`](../../../src/core/graph/judge_explain.test.ts) + (9 checks); `npm run test:judge-convocation` stays green (23 sections, + 0 failed) with `[report]` and `[static-imports]` unchanged, and the + full graph suite is 179/179. + +Option B (a validated `rationaleSpan` **address** on the wire) remains +the deferred follow-on for span-level "why." +`JUDGE_CONTRACT_TEMPLATE §1`'s `rationaleSpan` line is corrected by +dated entry there to match the shipped three-field wire. diff --git a/.claude/skills/judge-composition/references/JUDGE_INTAKE_DESIGN.md b/.claude/skills/judge-composition/references/JUDGE_INTAKE_DESIGN.md new file mode 100644 index 0000000..afc2d4c --- /dev/null +++ b/.claude/skills/judge-composition/references/JUDGE_INTAKE_DESIGN.md @@ -0,0 +1,427 @@ +# Judge Intake — Design Record + +~~**Status: DESIGN — IMPLEMENTATION AUTHORIZED, NOTHING BUILT.**~~ +**IMPLEMENTED — July 18, 2026 (Session 68, dated entry).** The three +slice-1 modules (`judge_intake.ts`, `judge_intake_prompt.ts`, +`judge_prereg.ts`), their drill (`npm run test:judge-intake`, 13 +sections, negative control naming all three planted breaks), and 15 +unit pins landed zero-model in the implementing PR; the §6 table merged +into RECONCILIATION §5.1 the same day. §3.2a below records the render +grammar as landed. Original status line July 18, 2026 (Session 67). +Document-driven design: this record leads; the slice-1 modules follow +it. Zero-model, zero-paid by construction — no mechanism here calls a +judge. + +**Substrate correction (owner ruling, July 18, 2026 — this record's +governing frame).** The first draft of this record transplanted the +judge-composition game's filing failures into Trellis wholesale. That was +wrong. **The game had no workspace.** Its claims existed only as prose in +an LLM conversation, so its composer had to *transcribe* a claim into a +filing — and that transcription was the corruption channel every filing +rule was written against. Trellis has a fact space and a beliefs +workspace in the REPL. There is no transcription step: a promotion +candidate is an addressed object, and the engine copies its bytes. Most +of the game's filing apparatus is therefore already satisfied by +[`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md) +§4.1 ("capture is mechanical, not behavioral"), §4.2 (uuid-delimited, +origin-stamped segments), and §6 (the operator-gated promotion path). +This record now specifies only what genuinely survives into the engine. +§1.2 carries the per-rule disposition. + +**What this names.** [`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) +§7's last row requires each unbuilt mechanism to be "named in its own +proposal before implementation." **Judge intake** is that name for what +stands between a promotion candidate and a judge: selection-and- +ratification, clean-context prompt assembly, and the write-once record +store. It is deliberately not "harness" (taken twice — the RLM harness, +the stage-2 self-edit harness) and not "composition" (taken by +`composePanel`, which composes *verdicts*; intake composes *prompts*). + +**Authority flags (read first).** + +- **The twenty rules of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §6 and the §9 shape notes are binding program law** (ratified July 18, + 2026, that record's §11). They are cited by number, never restated — a + paraphrased copy is drift, not an implementation. §1.2 below carries + each intake-relevant rule's disposition against the substrate; the + owner's ratification scope note is explicit that ratifying the rules as + law does not import the workspace-less setting they were distilled in. +- **[`RECONCILIATION.md`](RECONCILIATION.md) is ratified** (July 18, + 2026, its §7): its §4 verdicts are binding and it governs + FOUR_JUDGE_DESIGN wherever the two differ. This record's §6 + enforcement/pin table is now eligible to merge into RECONCILIATION §5 + and should do so when the slice-1 rows are observed rather than + designed (§10 item 4). +- The adoption-bounds register (RESEARCH_MAP §9) binds: AB-1 as twice + amended, AB-3, AB-10. + +Program context: [`PROGRAM_CONTEXT.md`](PROGRAM_CONTEXT.md). Parent +doctrine: [`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md). +Panel design: [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md). Prompt +contracts: [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md). +Substrate contract: [`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md). +Pillar: [`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md). + +--- + +## 1. Problem statement + +### 1.1 What the game measured, and where it applies + +The judge-composition game ran the four-role design live over a real +promotion candidate and the panel caught **its own composer**. Three +measured failures came out of it. They do not all survive contact with +the substrate: + +1. **Filing inflation (game §3–§4).** The composer's paraphrase + strengthened the claimant's claims four for four; six of eight + drawbacks were filing artifacts billed to the claimant. **This is a + transcription failure.** It requires a step in which a model retypes + someone's claim. Trellis has no such step — §1.2 rule 15. +2. **Steering through task text (findings F1/F6).** Expectation content + reached judges through the task-text channel, and when that channel + was cleaned it *relocated into annotation phrasing*. **This survives + entirely.** It is a property of how prompts are composed, wholly + independent of where the claim came from. +3. **Pre-registration as prose (rules 11/20).** Forecasts kept in + conversation are unauditable and, when they share bytes with prompts, + are work orders rather than forecasts. **This survives entirely.** + The substrate has nothing to say about it. + +### 1.2 Per-rule disposition against the substrate + +The intake-relevant rules, each dispositioned. Cited by number; not +restated. **These are binding law as of July 18, 2026**, so a +disposition of "satisfied" is a claim about the architecture that a pin +must hold up — never a licence to stop honoring the rule. Where the +substrate satisfies a rule vacuously, the rule still binds any future +surface that reintroduces the step it governs. + +| Rule | Disposition | Basis | +|---|---|---| +| 15 — byte-accurate filing | **Structurally satisfied** | WORKSPACE §4.1 capture is mechanical; the engine copies bytes at an address. Nothing to inflate because nothing is retyped. A pin, not a mechanism. | +| 18 — intent-readings judged against the garble | **Satisfied vacuously** | The ratification gate (§3.1) has the user fix the exact bytes. No agent interpretation occurs, so the rule has no work to do. A garble stays a garble and is judged as one. Binds immediately if any surface ever lets an agent supply a reading. | +| 16 — annotations positive, never negations | **Satisfied by construction** | Slice 1 authors no annotations, so there is nothing to phrase. The rule binds in full the moment an annotation surface exists: any composer-supplied field reaching judge context must be structural, never prose. | +| 6 — authorship never a parameter | **Structurally satisfied** | Attribution is an address property, not a content property (§3.2). Judges receive content; the allowlist never admits the address. | +| 17 — the cut is a judged surface | **Survives, narrowed** | Engine copying removes rewriting but not *selection*. A selection excluding an adjacent qualifier still tilts. Covered by showing neighbors at ratification (§3.1). | +| 1 — decompose before composing | **Survives, cleanly** | Applicability gates still cannot run on a conjunction. Decomposition is now selection of separate addressed objects, each ratified — never agent-authored sub-claims. | +| 10 — filing is a judged artifact | **Survives, narrowed** | Filing defects reduce to *selection* defects. Remand still exists; it points at the selection, never at the claimant. | +| 11, 20 — pre-registration stored and timestamped | **Survives entirely** | §3.3. Unaffected by the substrate. | + +The pattern: **rules about the filer's pen are satisfied by the +substrate; rules about the composer's packaging survive into the +engine.** + +## 2. Doctrine (inherited, binding) + +- **Capture is mechanical, not behavioral** (WORKSPACE §4.1). The model + never retypes a claim; the engine copies bytes at an address. This is + [`CODE_MEDIATED_TEXT.md`](../../architecture/CODE_MEDIATED_TEXT.md) + applied to claims — the pillar, not a new invention. +- **Promotion is operator-gated** (WORKSPACE §6). A promotion candidate + is nominated and *the operator approves*. Judge intake reuses that + ceremony one boundary earlier. +- **The claim is the user's; the rigor belongs to the instruments.** + Where intent is ambiguous the mechanism forces the clarifying + question — it never resolves it silently (HANDOFF §7.4). +- **Blindness is structural, not prompted** (RECONCILIATION §5 row 2): + `assembleJudgeContext`'s allowlist is the mechanism; intake extends it + rather than routing around it. +- **Definitions carry all rigor; task text carries none** (game §9). +- **Tier 3 has no provenance standing** (WORKSPACE §3). A workspace + belief is a candidate, never evidence, until it earns permanence. + +## 3. The three mechanisms + +```mermaid +flowchart LR + WS["Beliefs workspace / fact space
addressed objects, origin-stamped"] --> SEL["Selection
judge_intake.ts
addresses + neighbor context"] + SEL --> RAT{"Ratification gate
user confirms exact bytes
Y / N"} + RAT -->|"recorded"| ASM["Prompt assembly
judge_intake_prompt.ts
identity + definition + evidence + schema"] + RAT -->|"absent"| REF["typed refusal"] + ASM --> J["(future) live judges
NOT this slice"] + ADDR["Address space
user id, tier, provenance"] -. never admitted .-> ASM + STORE["judge_prereg.ts
write-once, timestamped"] -. read-only .-> AU["judge_audit.ts"] + RAT -.-> STORE +``` + +### 3.1 Selection and ratification (`judge_intake.ts`) + +Filing is **selection of addressed objects plus a recorded user +confirmation**. It does not mint addresses, does not author text, and +does not annotate. + +``` +CandidateSelection { + selectionId, + addresses[], // workspace segment uuids / Tier-1 block ids — carried, never minted + neighborContext[], // engine-computed adjacent bytes, for rule 17 + selectedAtMs +} +Ratification { + selectionId, + claimMode, // chosen by the USER at confirmation, never inferred + confirmedAtMs +} +``` + +- **Bytes are fetched engine-side at the address.** A selection carrying + literal text instead of an address is refused — the model has no + channel through which to supply claim bytes at all. +- **The ratification gate is structural.** Building a candidate without + a recorded `Ratification` for its `selectionId` refuses, typed. This + is the load-bearing addition: without it, the guarantee degrades to + session-layer discipline, which is exactly what the game showed fails. +- **The confirmation shows the cut, not just the bytes** (rule 17). The + user sees the selected span *with its engine-computed neighbors*, so a + boundary that excludes an adjacent qualifier is visible at the moment + of approval rather than discovered by a judge later. +- **Claim mode is ratified, never inferred.** Applicability gates (R-29) + need a mode. If the agent supplied it, the mode would be agent + testimony about the user's claim — the corruption channel returning in + metadata. The user picks it as part of the Y/N. +- **Decomposition is selection** (rule 1). A compound claim is filed as + several selections, each ratified individually. No agent-authored + sub-claims exist. + +**Typed refusals:** `UnratifiedSelectionError`, `AddressNotFoundError`, +`LiteralTextRefusedError`, `EmptySelectionError`. + +### 3.2 Clean-context assembly (`judge_intake_prompt.ts`) + +Extends Session 66's allowlist machinery into full composed prompts. It +calls `assembleJudgeContext` and cannot bypass it; `judge_panel.ts`'s +drilled path is untouched. + +``` +PromptSection = { kind: 'identity', ... } + | { kind: 'definition', ... } + | { kind: 'evidence', ... } + | { kind: 'output_schema', ... } + +ComposedJudgePrompt { role, judgeId, sections[], promptHash } +``` + +- **F1/F6 unrepresentable.** `PromptSection` is a closed discriminated + union with **no task-text member** — no field for a highlighted + question, a named drawback class, or an embedded expectation. The + drill pins the *absence*, in the kernel-prompt absence-pin pattern. +- **Attribution is partitioned by address, not scrubbed from content + (owner ruling, July 18, 2026).** A unique user id is encoded in the + workspace graph address, so a single beliefs workspace can hold many + parties' beliefs with attribution carried entirely in address space. + Judge context is assembled from **content**; the allowlist never + admits address components. Masking is therefore not a scrubbing step + that can be forgotten or defeated by writing style — there is no + attribution in the bytes to leak, and the partition scales to N + parties by construction. +- **Byte-inspectable.** `renderPrompt(composed) → string` is pure and + deterministic; drills byte-pin composed prompts and any drift fails a + test rather than requiring a reading. +- **Blindness preserved through the new path.** A forbidden input still + raises `BlindnessViolationError` before any would-be model boundary. + +### 3.2a The render grammar as landed (dated entry, July 18, 2026 — Session 68) + +The deterministic byte layout `renderPrompt` produces and the drill's +independent generator re-derives. Both sides derive from THIS text; on +drift the byte-pin fails and this entry adjudicates. LF newlines +throughout; authored under the Prompt-Engineering and Hypershot +protocols (Guardrail 15) — the frame is fixed, every concrete value is +engine-supplied, and the format line carries spread-style slots, never +exemplar content. + +``` + + + +role: {role} +judge: {judgeId} + + + +claim_modes: {csv, declared order; "(none)" when empty} +qualified_parameters: {csv, declared order} +taxonomy: + {class} -> {parameter} (one line per class, sorted by class) +required_assumptions: {csv, declared order} +verdict_rule: Judge only through this definition — restrict every finding to the qualified parameters above, name any drawback from the closed taxonomy, and abstain with a reason when jurisdiction or evidence is absent. + + + +{key}: +{canonical JSON of value} (one pair per allowlisted key, keys sorted; + canonical JSON = recursively key-sorted, no whitespace) + + + +verdict: clean | drawback | abstain +drawback: {sorted classes joined " | "} | null +abstain_reason: evidence | jurisdiction +format: one JSON object {"verdict": "...", "drawback": "..." | null, "abstainReason": "..."} + + + +``` + +Sections are joined by one blank line; the file ends with a trailing +newline after ``. `promptHash` is the SHA-256 of exactly +these bytes, engine-computed at composition. + +### 3.3 The write-once record store (`judge_prereg.ts`) + +Two record kinds, one store — ratifications and pre-registrations share +every property that matters (write-once, timestamped, audit-readable), +so they share a module. + +``` +Expectation { itemId, expectedVerdict, expectedDrawbackClass?, rationale } +PreRegistration { registrationId, runId, registeredAtMs, expectations[], contentHash } +``` + +- **Write-once.** A second write for a key refuses; the first survives. + Supersession is a new record referencing the old, never an overwrite. +- **Late registration refuses (rule 20).** The store records a run-open + event; a registration timestamped after it is refused, typed. A + forecast made after the run is not a forecast. +- **Forecasts never share bytes with prompts (rule 11).** + `judge_prereg.ts` exports nothing `judge_intake_prompt.ts` imports, + pinned by a static import check in the shape of the existing + J4-never-gates pin. +- **The audit seat reads it (rule 20).** `judge_audit.ts` may import the + store; the store imports nothing from composition, and no new + audit→composition path appears. + +## 4. Relationship to existing modules + +Intake adds **siblings**. `judge_panel.ts`'s registry, schemas, and +`composePanel` keep their callers and their drill +(`npm run test:judge-panel`, 10 sections / 182 checks) unchanged. The one +shared surface is `assembleJudgeContext`, consumed without modification. +Imports are one-way: `judge_intake → judge_intake_prompt → judge_panel`, +and `judge_audit → judge_prereg`. No workspace or Tier-1 write path is +touched — intake reads addresses and copies bytes. + +## 5. Files + +| Path | Contents | +|---|---| +| `src/core/graph/judge_intake.ts` | selection, engine-side byte fetch, ratification gate | +| `src/core/graph/judge_intake_prompt.ts` | composed prompts, address/content split, `renderPrompt` | +| `src/core/graph/judge_prereg.ts` | write-once store: ratifications + pre-registrations | +| `scripts/test_judge_intake.ts` | drill, house mold | +| `fixtures/judge_intake/` | byte-pinned fixtures + independent generator | +| `npm run test:judge-intake` | drill entrypoint | + +## 6. Behavior → enforcement → pin + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Claim bytes are engine-copied from an address, never model-authored | `judge_intake.ts` — input is addresses; bytes fetched engine-side | drill `[engine-copy]` (a selection carrying literal text refuses) | +| Filing refuses without recorded ratification | ratification lookup precedes candidate construction | drill `[ratification-gate]` | +| The cut is visible at approval (rule 17) | engine-computed `neighborContext` on every selection | drill `[selection-context]` (qualifier-excluding cut visible in the ratification payload) | +| Claim mode is user-ratified, never agent-inferred | `claimMode` lives on `Ratification`, not on the selection | drill `[mode-provenance]` | +| Compound claims decompose as separate ratified selections | one mode per selection; no sub-claim authoring surface | drill `[decomposition]` | +| Attribution never reaches judge context | user id is an address component; allowlist admits content only | drill `[attribution-partition]` — two users' beliefs in one workspace produce judge contexts identical but for claim content | +| No task-text channel in composed prompts | `PromptSection` closed union has no task member | drill `[prompt-absence]`; unit pins | +| Composed prompts byte-inspectable | pure deterministic `renderPrompt` | drill `[prompt-bytes]` against byte-pinned fixtures | +| Assembly cannot bypass blindness | evidence built only via `assembleJudgeContext` | drill `[blindness-preserved]` | +| Ratifications and pre-registrations are write-once | store refuses a second write per key | drill `[write-once]` | +| Late registration refuses | run-open event; later timestamp refuses, typed | drill `[prereg-late]` | +| Forecasts never share bytes with prompts | no import path store → prompt module | drill `[static-imports]` | +| Audit reads the store; no new audit→composition path | one-way imports | drill `[static-imports]` (both directions) | + +## 7. Drills + +`npm run test:judge-intake`, in the `test:judge-panel` mold: byte-pinned +fixtures under `fixtures/judge_intake/` with an **independent +spec-derived generator** (never the implementation's own output), a +SHA-256 fixture manifest checked before any section, `TRELLIS_EXP_*` +refusal before any section, and `--negative-control` exiting nonzero +while naming every planted break. Sections are those in §6. + +Three planted breaks for the negative control, one per mechanism: a +candidate built from an unratified selection; a composed prompt carrying +a smuggled expectation; a registration timestamped after run-open. Each +must be named individually — a control that fails generically has not +demonstrated detection. + +The `[attribution-partition]` section is the one that would have caught +this record's original error, and is worth stating plainly: seed one +workspace with two users' beliefs under distinct address partitions, +file semantically matched claims from each, and assert the composed judge +contexts differ **only** in claim content. Any address component +appearing in a judge context fails the section by name. + +## 8. Explicit exclusions + +- No live judges, no model calls, no `support_sweep` integration, no + database registration, no ratification queue, no claim-kind plane — + each remains a separately authorized bounded feature. +- No modification to `composePanel`'s drilled path, the workspace or + Tier-1 write paths, custody tiers, kernel prompts, extraction prompts, + module addenda, or any composed-prompt pin. +- No `tools/engineering-loop/` change, no acceptance-ledger touch, no + EL-07/EL-10/EL-11 claim. +- No agent-authored annotations of any kind. No `scope` enumeration — + withdrawn (§10 item 2). +- No restatement of the twenty rules; no new glossary terms; no + hypothesis promoted to canonical prose. +- No ratification of RECONCILIATION §7 or JUDGE_COMPOSITION_GAME §11 — + owner acts. + +## 9. Falsifiers + +- **The address partition leaks.** If a judge's verdict shifts between + two users' semantically matched claims in one workspace, attribution is + reaching content somewhere — name the channel and close it, or withdraw + the structural-masking claim. This is the load-bearing one and + `[attribution-partition]` is its detector. +- **The ratification gate is decorative.** If a candidate can be built + without a human act — an agent self-ratifying, a default-approve path, + a test seam reachable in production — the guarantee is back to + discipline and the gate has to be redesigned. +- **Applicability needs more than the user can supply.** If R-29 gates + turn out to need claim properties a user cannot reasonably choose at + confirmation time, mode/scope creeps back as agent testimony. That is + the trigger to revisit §3.1, not to quietly let the agent infer. +- **Selection tilt survives the gate.** If a cut can still mislead a + judge in a way the neighbor context does not surface at approval, rule + 17 is not covered and the confirmation payload is wrong. + +## 10. Open items and decision boundary + +1. **Naming gate satisfied.** This record names the feature per + EPISTEMIC_SUPPORT §7; that record's last table row is amended on + landing, not now — "not yet built" is still true. *(Landed July 18, + 2026, Session 68: EPISTEMIC_SUPPORT §7 now carries the judge-intake + row; the residual "everything else" row names live judges, sweep + integration, registration, and the ratification queue.)* +2. **`scope` withdrawn.** The proposed `universal | existential | modal | + qualified` enumeration is dropped. Two reasons, the second decisive: + it was under-determined (four values back-derived from four ledger + rows; comparative, causal, and conditional claims fit none of them), + and — since the user ratifies exact bytes — any agent-assigned scope + is agent testimony about a claim the user has already fixed, which is + rule 15's failure class returning as metadata. If a real filing ever + demonstrates the need, it enters judged against the span bytes per + rule 8, never trusted as filer testimony. +3. **User-id-in-address is recorded here, specified elsewhere.** The + address-partition scheme is a substrate concern; this record depends + on the property and pins it at the judge boundary, but does not + define the address format. That belongs with the workspace contract. +4. **Table merge — now eligible.** RECONCILIATION §7 ratified July 18, + 2026, so the blocker is gone. The merge should still wait until the + slice-1 rows are **observed** rather than designed: RECONCILIATION §5 + records enforcement that exists, and every row in §6 currently names a + pin that has not been written. Merge in the implementing PR, not this + one. *(Done July 18, 2026, Session 68: merged as RECONCILIATION §5.1, + a dated entry under its §7 amendment rule, with every pin observed + green first.)* +5. **No `R` rows proposed.** This record makes design commitments, not + empirical claims. If the structural-masking property in §9 item 1 is + to be asserted as a finding rather than a design goal, it needs its + own row with that falsifier, by dated entry. +6. **Slice 2 and beyond** — live judges, sweep integration, judge + registration — stay gated behind the owner's RECONCILIATION §7 ruling + and their own proposals. diff --git a/.claude/skills/judge-composition/references/PROGRAM_CONTEXT.md b/.claude/skills/judge-composition/references/PROGRAM_CONTEXT.md new file mode 100644 index 0000000..84a6bf4 --- /dev/null +++ b/.claude/skills/judge-composition/references/PROGRAM_CONTEXT.md @@ -0,0 +1,416 @@ +# Epistemic-Support Program — Context for a Fresh Session + +**Status: living program orientation.** July 16, 2026. You are probably +an agent (or human) opening this program with no memory of the sessions +that produced it. This file is your entry point; it is deliberately +self-contained and points at everything else. Repo-wide rules still +bind you first: read root `AGENTS.md`, take the objective from the +collaborator's live task, then read this file and the source records it names. + +**Maintenance update — July 21, 2026:** the former manual handoff and root +roadmap are historical surfaces. Any session-state or objective references to +them below describe the dated program record, not current routing. + +## 1. What this program is + +A proposed **second axis for Trellis beliefs**: graded *epistemic +support* — a subjective-logic opinion (b, d, u) computed sweep-side by +judged events — orthogonal to the existing custody tiers, which remain +untouched. Custody answers *where did this come from*; support answers +*how has it held up*; a third, deferred plane (claim-kind) answers +*what kind of claim is it*. Standing as of July 16, 2026: the axis is +**ADOPTED forward design** (`docs/architecture/EPISTEMIC_SUPPORT.md`), +the support-computation oracle drill is **implemented and observed +green**, and everything else (judges, sweep, registration, ratification +queue, rubrics) remains proposal awaiting its own bounded feature — +see the decision record (§6). + +## 2. Reading order (program-local) + +**0. READ FIRST — +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md)** (RATIFIED +July 18, 2026, §11; its twenty rules of §6 are binding program law, +cited by number and never restated). The canonical record for how +judges are composed, and the most instructive document this program +has: judges are composed **per context** from primitives, and **there +is no default cast**. Its companion is +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md), +which states the principle generally and records what it cost when a +session built the standing roster the rules forbid. + +This item is numbered 0 because several records below were authored +before it and encode a fixed four-judge cast with per-role taxonomies. +**Where they and the game record differ, the game record governs.** +Reading them first is how the error happened. + +**0b. [`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md)** +(DESIGN, July 19, 2026) — how a promotion is actually judged under +that governance: the candidate is ratified, an isolated agent +characterizes the REPL's fact and belief spaces descriptively, and the +judges, their taxonomies and their anchors are all composed for that +pool at ceremony time. Nothing is authored in advance and nothing is +reused. The candidate's *domain* is in scope for the composer while its +*identity* is withheld — anonymity, not exclusion — and the +instantiated judges do see the claim, on the forward pass. Read it +before building anything judge-shaped. + +1. [`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) + — the adopted doctrine record: the two-axis doctrine, the support + state, plane geometry, the v1 arithmetic and metric grammar, the + judge layer, the automation ladder, enforcement homes, exclusions. + (The parent proposal it graduated from — review-series document 06 — + was removed at owner direction at merge review, July 16, 2026; its + text survives in PR #119 branch history.) +2. [`RESEARCH_MAP.md`](RESEARCH_MAP.md) — the evidence register: + sources, claims with evidence classes and falsifiers (its + register-summary header carries the current counts — trust it over + any prose restatement), the cross-row syntheses (§4), the + contradictions (§6), the sharing queue (§7), and the **adoption + bounds register** — the live rules bounding what may be built on + which evidence. +3. [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) — the judged-input + architecture: four differently-blind role *slots* (grounding, + coherence, corroboration, audit), engine-side composition, judges as + contestable capabilities. Read it with + [`RECONCILIATION.md`](RECONCILIATION.md) beside it — RATIFIED + July 18, 2026, and it governs this record wherever the two differ. + Both describe the four as "a minimal ecology instance" and then + operate on them as a standing roster; item 0 governs that tension. +4. [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) — the + prompt-facing hypershot frames and rubric-authoring rules. +5. [`ORACLE_DRILL_PROPOSAL.md`](ORACLE_DRILL_PROPOSAL.md) — the first + drill (implemented July 16, 2026; its header carries the observed + runs): pins the support arithmetic before any judge or sweep + exists. `npm run test:support-oracle`. + (The external review series that seeded this program was removed at + owner direction at merge review; PR #119 branch history retains it.) +6. [`IEG_TEACHINGS.md`](IEG_TEACHINGS.md) — teaching record from the + July 17, 2026 S13 dialogue sessions: the laws, the owner's + findings, the understanding ladder with its two un-learnings, and + the PROPOSED change queue for existing code (its §5 table is + authoritative for the rows — counts are not restated here). Docs only; + the register's §4.11 and rows R-32…R-38 are authoritative over it. +7. [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md) *(added July 18, + 2026, Session 67)* — **judge intake**: the named bounded feature + covering what stands between a promotion candidate and a judge — + selection-and-ratification, clean-context prompt assembly, and the + write-once record store. Read its §1.2 first: the + judge-composition game ran **without a workspace**, so its filing + rules address a transcription step Trellis does not have; §1.2 + dispositions each rule against the substrate (rules about the + filer's pen are satisfied by + [`WORKSPACE_AND_MODULES.md`](../../architecture/WORKSPACE_AND_MODULES.md) + §4.1/§4.2/§6; rules about the composer's packaging survive into the + engine). **Implemented July 18, 2026 (Session 68):** the three + slice-1 modules (`judge_intake.ts`, `judge_intake_prompt.ts`, + `judge_prereg.ts`) with `npm run test:judge-intake` (13 sections); + the §6 table lives in RECONCILIATION §5.1 by dated entry; the + record's §3.2a carries the render grammar as landed. + Its constraints are the twenty rules of + [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §6 and the + §9 shape notes — **binding program law since the July 18, 2026 + ratification (§11)** — cited by number, never restated. +8. [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) *(added + July 18, 2026, Session 69)* — **judge convocation**: the slice-2 + proposal for what stands between a ratified candidate with a + composed prompt and a recorded support opinion — judge registration + (the split store/graph representation), the `support_sweep` job + (Session 32 mold; pair-once bookkeeping; run-open binding for + rule 20; the RECONCILIATION §5 row 9 writer-blind pin designed), + the spawn boundary (the composed bytes ARE the interface; R-27 + model-identity refusal; oracle twin), and the ratification queue + (WORKSPACE §6 mold). **AUTHORIZED — Option B (owner, July 18, + 2026; dated entry §11.1); IMPLEMENTED at option-B scope July 19, + 2026 (Session 70)**: four modules + the `judge_records` table + + four operator surfaces + `npm run test:judge-convocation` + (23 sections; the §6 rows live in RECONCILIATION §5.2, which also + closes §5 row 9's writer-blind pin). No live run has executed; the + paid queue remains ON HOLD; §10 registers the owner-requested + metered promotion-cost measurement and §11.2 carries the road to + option C (the eventual live-LLM test). + +## 3. Context you cannot infer from the artifacts alone + +- **Provenance standing of this program: none.** It was authored by a + sister-lab session (branch `claude/sister-lab-repo-review-5fuu19`, + PR #119) collaborating with an external polymath collaborator whose + frameworks (WonderSuite, S7; the Lexideck prompt protocols, S2/S3) + supplied the plane geometry and authoring discipline. Session + reasoning is Tier-3; only the committed documents carry forward. +- **The collaborator's four-judge design IS now in the repo**: + supplied July 16 (late session) and committed verbatim as + `FOUR_JUDGE_BASIC_MODEL.md` (S10). Its reframe: four *hyperplane + registries*, not four judges; judges are sparse selections; the + system is an ecology. `FOUR_JUDGE_DESIGN.md`'s four roles are a + minimal ecology instance; §10.1 (twice-amended) carried the + ingestion protocol that Session 66 EXECUTED (July 17, 2026): + [`RECONCILIATION.md`](RECONCILIATION.md) holds the completed + definitions and composition design, and `npm run test:judge-panel` + pins the structural guarantees. **RATIFIED July 18, 2026 + (RECONCILIATION §7): the co-equality is ended — RECONCILIATION.md + governs wherever the two designs differ, and its §4 verdicts are + binding. `JUDGE_COMPOSITION_GAME.md` §11 was ratified in the same + act, making the twenty rules binding program law.** Terminology: + UHE (Unified Hyperplane of Experience) + is a loaned Lexideck house term — see the basic model's header + addendum and RESEARCH_MAP §4.10 (**the externality principle**, the + program's unifying frame: Trellis as an engineering practice of + external J-spaces — typed, execution-parallel summary streams). +- **The prompt-protocol mandate is enforced at root.** `.claude/rules/prompt-authoring.md` rule 16 + requires the Prompt-Engineering and Hypershot protocols before authoring any + prompt-like artifact; the project skill distillations live under + `.claude/skills/`. The source curriculum remains uncommitted (Lexideck + lineage, Patreon-distributed — AB-6 forbids committing it without + authorization). Operational rules also survive in + `JUDGE_CONTRACT_TEMPLATE.md` §6–§7 and the layer rule at its head. +- **Network reality:** this environment's proxy blocks most hosts + (arxiv.org, transformer-circuits.pub) but allows github.com. All + three primary papers now have checksum-verified OpenCnid mirrors — + `who-grades-the-grader-pdf` (S1), `verbalizable-global-workspace-pdf` + (S8), and `better-harnesses-smaller-models-pdf` (S9) — and all three + have been read in full. **[Amended July 18, 2026: the mirrors were + retired by owner ruling — S1 is now the note repo + `who-grades-the-grader`, S9 is `better-harnesses-smaller-models` + (PDFs in git history only; recorded hashes still verify the + historical bytes), and S8's renamed signpost + (`verbalizable-global-workspace`) is slated for deletion, with the + note repo `global-workspace-in-llms` as the durable pointer. In a + proxy-blocked environment, the historical commits of the S1/S9 repos + remain a github.com-reachable path to the exact studied bytes. The + full note-repo inventory, machine face, and PROPOSED ingestion + contract are recorded in `docs/RESEARCH_NOTES_COLLECTION.md`.]** None is promoted; citing any as + `sourceNodeIds` requires operator promotion first (AB-10). S9's + released code is ACQUIRED: the OpenCnid fork + `github.com/OpenCnid/migration-analysis` is cloned (outside the + Trellis worktree at `/workspace/migration-analysis`; MIT LICENSE + added to the fork July 16 — Copyright (c) 2026 Chenyang Yang; + upstream carries none; bounded vendoring with attribution unblocked, + register §7 row 9 has the dated record). S1's released-code locator + remains missing. Note: clones die with containers — a fresh session + re-adds the repo (`add_repo OpenCnid/migration-analysis`) and + re-clones. +- **Dated addition (July 17, 2026):** the collaborator supplied his + master framework — UIT-IEGv5.1, "Unified Informatic Topology and + Informatic Exchange Geometry" (register S13, rows R-32…R-35) — with + the note that "everything in my work is really downstream of this + lens": the S10 gluing rules, the rough-fuzzy routing, and R-31's + UHE "matrix mathematics" (U-Space, z = x + a(εi)) all originate + there. He also supplied a purpose-frame direction, recorded as + hypothesis R-35: optimal harness engineering as informatic exchange + geometry over a parameter-mapped harness-space. The artifact is an + **unpublished draft**: reference only, never committed (AB-1 as + amended; sharing-queue row 10); its physics claims are coverage-only. +- **Why the map is unusually insistent about incentives:** two + independent measurements (Trellis's citation A/B, R-11; S1's + Goodhart episode) plus a mechanistic frame (S8's report/behavior + dissociation, R-21) all show count-shaped incentives corrupting + agents that verbalize the right answer. Every writer-blindness and + never-reward-counts rule descends from that triple convergence. + Treat those rules as load-bearing, not stylistic. + +## 4. Directives for any session working this program + +1. **DDD**: documents lead; no implementation without a separately + authorized bounded feature naming its non-test entrypoint + (`AMBIENT.md` rule 15). +2. **Zero-paid first**, always; paid runs are owner-gated with printed + estimates (repo rule; the program's costs are bounded by existing + telemetry — entailment sweep $0.0093/25 pairs, est-suite ~$2.40/50 + runs). +3. **Check the adoption bounds register before building on any + source** — the register, not the prose, is authoritative for what + an evidence class may carry. Amend it by dated entry, never silent + edit. +4. **Keep the axes apart**: support never mints custody; custody never + implies support; the writer never sees either. +5. **Record contradictions, don't resolve them silently** — the map's + §6 items (model-in-the-anchor above all) are owner decisions. +6. **Update `RESEARCH_MAP.md` when evidence changes state** (e.g., + coverage-derived → primary-verified happened once already; the + upgrade pattern is in the S8 row and R-20/R-21 history). +7. The sister-lab session's commits carried an AI-attribution trailer + convention conflicting with `.claude/rules/commit-and-pr.md` rule 10; the conflict was + disclosed and the owner resolved it at merge review (July 16, 2026) + by squash merge — the trailers never reach `master`, and rule 10 + stands unchanged for all future program work. + +## 5. State of the world (as of July 16, 2026) + +- Branch: `claude/sister-lab-repo-review-5fuu19`, PR #119 (owner + review completed July 16, 2026). Program artifacts live in this + directory and `docs/architecture/EPISTEMIC_SUPPORT.md`. +- Trellis `master` at `40b0ff6` (Session 64 / PR #117, merged into + this branch). Root `HANDOFF.md` was + regenerated July 16 per its §0: the active objective is Session 66 + (four-judge role-definition completion + panel drills); the + engineering-loop track's next objective (EL-07 stage 1, from + master's Session-64 regeneration) is preserved as its Appendix B. +- Implemented so far: the support-oracle drill (modules, fixtures, + entrypoint, 11 unit pins) and — Session 66, July 17, 2026 — the + judge-panel structural modules and drill + (`src/core/graph/judge_panel.ts` / `judge_audit.ts`, + `npm run test:judge-panel`, 10 sections / 182 checks, 17 unit pins; + reachability = the drill and pins only). Not implemented: live + judges, `support_sweep`, registration against real databases, + ratification queue, rubric instantiation, claim-kind plane. No + support fields exist in any production schema; no judges are + registered. + +## 6. Decision record (owner rulings, July 16, 2026) and what remains open + +The five decisions originally listed here were ruled on by the owner on +July 16, 2026. + +**Ratification record (July 16, 2026, PR #119 merge review):** the +owner (Cnid) confirmed rulings 1–5 below, the Session-66 +re-sequencing, and the AB-4 amendment, in the merge-review session. +The rulings are no longer prose claims awaiting verification; this +dated entry and the merge itself are the record. + +1. **Epistemic-support axis: ACCEPTED as forward design.** Doctrine + graduated to `docs/architecture/EPISTEMIC_SUPPORT.md`; glossary + terms added in the same change. (The review-series document 06 it + graduated from was removed at owner direction at merge review — + direction pivot; its text survives in PR #119 branch history.) +2. **Model-in-the-anchor: model labeling PERMITTED** (AB-4 amended by + dated entry with the owner's rationale — the labeler is itself a + rough fuzzy classifier; anchors rely on sparse priming + representations' connection to the verbalizable workspace). + Residual guards unchanged: byte-pinned fixtures, human refresh + ceremony, no count-shaped incentives for the labeler. +3. **Support-computation oracle drill: AUTHORIZED** as the program's + first bounded feature (implementation began the same day; see + `ORACLE_DRILL_PROPOSAL.md` header for live status and observed + results — do not trust this line over that header). +4. **Composable rubrics: BUILD** — no off-the-shelf software exists; + reconstruct from S1's released rubric/outcome data (locator still + missing — top acquisition priority, sharing-queue row 2) plus the + WonderSuite conceptual-primitives strategy. Design record: + [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md). +5. **Promotion of S1/S8 (S7 optional): APPROVED** — execution pending + on a durable deployment (this container's databases are ephemeral; + promotion here would mint provenance that dies with the container). + Statuses and command paths: RESEARCH_MAP §7. + +**Still open:** +- **Naming (owner request, July 17, 2026):** a catchier-but-precise + program alias for UHE. The owner's working gloss: "the set of all + possible narratives the AI might be looking at." Candidates on the + table: **N-space / the narrative manifold** (pairs cleanly with + J-space as its measured chart), *the experience manifold*, *the + Loom* (kin to Trellis — one frame weaves the threads, the other + holds the vine). UHE is a loaned Lexideck house term (R-31), so any + alias requires the collaborator's blessing; once ruled, the + GLOSSARY mints exactly one name (the agent-first stance, rule 5). + **RESOLVED July 17, 2026 (collaborator ruling): the exploration was + exploratory — UHE stands as-is; no alias minted.** Candidates above + are preserved as history. Attribution rule recorded the same day + (collaborator, verbatim): "Matthew Murphy owns the idea, and Cnid + owns the code." +- **Paid queue: ON HOLD (owner ruling, July 17, 2026).** The queue + stays recorded and important — the v2 anti-shortcut run, the + baseline head-to-head, the R-36 knee scoping — but nothing executes + until the owner re-opens it by dated note. **[Added July 18, 2026, + at the slice-2 authorization: the metered promotion-cost test — + the end-to-end cost of promoting a REPL belief to a Tier-1 fact; + registered in `JUDGE_CONVOCATION_DESIGN.md` §10's dated note, + estimate class ≈ $0.02–$0.06 per promoted belief.]** +- **Durable deployment: DECIDED — Option A** (owner ruling, July 17, + 2026): the owner's machine, locally, now — + [`docs/operations/DURABLE_DEPLOYMENT.md`](../../operations/DURABLE_DEPLOYMENT.md) + carries the record. The build (backup sidecars + restore drill + + runbook section) is a bounded feature for an ordinary session; the + approved S1/S8/S7 promotions execute once it stands. +- ~~Session 66's first task (owner direction, July 16): COMPLETE the + four-judge role definitions by reconstruction from the acquired + artifacts, then ratify — design §10.1 as amended.~~ **EXECUTED + July 17, 2026 (Session 66):** definitions completed and drills + pinned ([`RECONCILIATION.md`](RECONCILIATION.md); the S9 fork + re-cloned to `D:\OpenCnid\migration-analysis`). The RATIFY half + remains the open owner act (RECONCILIATION §7). +- ~~The S9 fork's license artifact~~ RESOLVED July 16 (MIT LICENSE in + the fork; residual: upstream carries none — an upstream grant record + would close the chain). S1's released-code locator remains missing + (row 2). +- Aggregation constants beyond the drilled v1 defaults (architecture + record §"v1 arithmetic"; amendable with drill re-pin). +- Actual execution of the approved promotions on a durable deployment. + +**Follow-up queue (owner-directed at merge review, July 16, 2026 — +each is future-session work, deliberately NOT in PR #119):** +- Wire `npm run test:support-oracle` into CI (plus a + `--negative-control` step asserting exit 3) once the CI surface for + the program is built; until then the drill's enforcement home is + manual-run only — a known correct-but-unreachable gap. +- `computeSupportOpinion` accepts a mixed-belief event list and + silently merges it into one opinion; add a typed refusal when + events disagree on `beliefId`. +- `evaluateMetric` cannot distinguish an unknown/never-registered + `opId` from a genuine abstention (both read as `abstain`); refuse + unknown ops against a declared op pool so a wiring bug cannot pose + as epistemic humility. +- The zero-paid static-import pin misses `node:`-prefixed builtins + and import-free global `fetch`; close both holes. +- `fixtures/support_oracle/generate_expected.ts` is a same-author + re-derivation of the module it checks (common-mode risk); schedule + an independent re-derivation of the expected values from + `EPISTEMIC_SUPPORT.md` §3 by a different author/session. + +*(Relationship to the broader queue, July 17, 2026: the PROPOSED +change queue in [`IEG_TEACHINGS.md`](IEG_TEACHINGS.md) §5 spans the +support plane, the hash authority, the engine, and the substrate; the +items above predate it and keep their standing there **by reference** +— C2(b) points here rather than duplicating. Neither queue is a work +order: the active objective comes from the collaborator's live task, and +sequencing is an owner ruling — see the precedence note at the head of that §5.)* + +### 6.1 Composition rulings (dated entry — July 19, 2026, Session 71) + +Seven decisions, made by the owner and the collaborator in session, +recorded here because the program's decision record is where rulings +live and a resolution that survives only in conversation is the failure +this program exists to prevent. Full design: +[`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md). + +1. **There are no base judges and no default cast.** Every judge is a + special case composed at ceremony time from the REPL's own fact and + belief space. The four roles that appear throughout this program's + older records were **teaching examples**, composed to explain the + model to an earlier session, which were then promoted to a + standardized cast across seven documents. That was never the intent. +2. **What the composer sees.** A *descriptive, not expository* summary + of the fact and belief spaces, produced by an isolated agent — the + nature of the pool being promoted from and to. +3. **Anonymity, not exclusion.** The domain of the claim is known and + in scope; the claim under test is **not privileged** in that + summary. Excluding it would leave the composed cover with a hole + exactly where the candidate sits. +4. **Judges see the candidate on the forward pass.** The blindness is a + composition-time property; instantiated judges are shown the claim + and judge it. Criteria that cannot have been shaped to the claim are + then applied to it. +5. **Compositions are records, never a library.** Stored write-once as + the account of why one promotion was decided; never selected from or + reused. The ceremony polls the REPL for fresh state every time. +6. **The composer is the durable contestable capability**, not the + judge. Its prompt is versioned and the audit seat reads it. If + evidentiary bytes are missing at ceremony time the judge cannot + ground a verdict, so there is no promotion and there is a + transparent report; bytes dying *after* promotion is the ordinary + invalidation sweep contesting the belief, untouched machinery. +7. **Anchors compose at instantiation** and are validated there, with + agent retry on gate failure. + +Records amended in the same act, each by its own dated entry: +JUDGE_COMPOSITION_GAME §6 rule 4 (superseded, §6.1) and §10 item 4 +(closed); RESEARCH_MAP AB-8; RECONCILIATION §7.1; EPISTEMIC_SUPPORT §5; +JUDGE_CONVOCATION_DESIGN §11.2 items 3–4 (merged); plus +JUDGE_CONTRACT_TEMPLATE §1, COMPOSABLE_RUBRICS_DESIGN §4, and +FOUR_JUDGE_DESIGN §5 as proposal-status corrections. + +**Open, and load-bearing:** the registration redesign (what `rubricSha` +hashes when the rubric is composed; what a composed judge's evidentiary +basis is; one graph hook per ceremony plus a durable `composer` entity; +what survives of `judges:register`; how `support_sweep`'s sampling +re-derives with no judge × candidate matrix) wants its own design +record before implementation. diff --git a/.claude/skills/judge-composition/references/README.md b/.claude/skills/judge-composition/references/README.md new file mode 100644 index 0000000..292fb0b --- /dev/null +++ b/.claude/skills/judge-composition/references/README.md @@ -0,0 +1,64 @@ +# Reference material + +The records this skill cites, mirrored **byte-for-byte** from the Trellis +repository so the skill travels intact: lift this skill's directory out of the +repo and every document it cites comes with it. + +## How to read these + +Pull the cited section; leave the rest on disk. Several of these run past 40 KB, +and loading one whole spends the context the skill exists to spend well. + +``` +Grep "{Section_Number_Or_Exact_Heading}" references/{Mirrored_File} -A 40 +``` + +The skill body names the section it wants at each step. That name is the read +instruction — follow it to the section, not to the file. + +## These are mirrors, not the record + +The canonical copy is the source path in the table below. On any divergence +**the record wins and the mirror is replaced from source**. A mirror is never +edited in place, and never cited as authority against the record it came from. + +Nothing is appended inside the mirrored files. Byte-identity to the source is +what makes a mirror checkable, and a provenance header written into the file +would be the first thing to destroy it — so provenance lives here instead. + +No sync check is installed. These are portability snapshots taken at one commit; +the hashes below are what a reader verifies a mirror against, with or without +the Trellis repository present. + +## Provenance + +Mirrored from the Trellis repository at commit `65fdb1f`, dated 2026-07-25. + +| File | Canonical source | Bytes | SHA-256 | +|---|---|---|---| +| `AMBIENT.md` | `AMBIENT.md` | 8,070 | `dfb614b83b3eb4ba22fb6a33d12e445bbb9ead5c5e1e1a6a51b50d1febf33603` | +| `COMPOSITION_FROM_PRIMITIVES.md` | `docs/architecture/COMPOSITION_FROM_PRIMITIVES.md` | 13,782 | `9b69b44db0e5e02d824a836452d6e031ad10c4d3b8c3f0cedd0f703e595d73b0` | +| `DOUBTS_WORKSPACE.md` | `docs/architecture/DOUBTS_WORKSPACE.md` | 37,859 | `aec7483652bc6f369f003674c8f3491df5136fd38e0dd98605531397c2663bda` | +| `FOUR_JUDGE_BASIC_MODEL.md` | `docs/product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md` | 9,467 | `986bd635870533ef6c62c4fb48f0d53bf5f0bd26e236dd7f40c7add226b7b8b8` | +| `FOUR_JUDGE_DESIGN.md` | `docs/product/epistemic-support/FOUR_JUDGE_DESIGN.md` | 20,170 | `c944586e345668cc93a75faa431a0632e23484b5a705fa5991dd693fbb344fa0` | +| `JUDGE_COMPOSITION_CEREMONY.md` | `docs/product/epistemic-support/JUDGE_COMPOSITION_CEREMONY.md` | 14,828 | `f5a54786d014222992687ab6b51f983e37af4226afdf7c26501ee04d3037e3c1` | +| `JUDGE_COMPOSITION_GAME.md` | `docs/product/epistemic-support/JUDGE_COMPOSITION_GAME.md` | 29,004 | `0e3ef78b8ffd9f0c62b022b7a9db10515873e18550d02cc412971587dfe34574` | +| `JUDGE_CONVOCATION_DESIGN.md` | `docs/product/epistemic-support/JUDGE_CONVOCATION_DESIGN.md` | 52,623 | `e078f60d63ed738f5b789377f136a4141359b2a87198e5bd4e63d998dd43230b` | +| `JUDGE_INTAKE_DESIGN.md` | `docs/product/epistemic-support/JUDGE_INTAKE_DESIGN.md` | 24,436 | `b6fd8adbcdcac56d4d2d57f063011f26cd85b5f2ef7242bb7ed5a1f946622a46` | +| `PROGRAM_CONTEXT.md` | `docs/product/epistemic-support/PROGRAM_CONTEXT.md` | 25,401 | `e240ce3f6cb06df6bd577ecb1714c6fd612cbf049b0d705266c1da68644f593b` | +| `RECONCILIATION.md` | `docs/product/epistemic-support/RECONCILIATION.md` | 46,647 | `a88c9539e88033825a2f65b70a4634c4cf0dd1d4c2e4966fc9021234f298e14d` | +| `STANDING_MODEL.md` | `docs/product/epistemic-support/STANDING_MODEL.md` | 8,825 | `484fc3c860e834a8afaed6dff6741c585ec3464c7466b09ad3d8421932904cfd` | +| `TEST_TIME_TRAINING.md` | `docs/architecture/TEST_TIME_TRAINING.md` | 64,208 | `9fd170da66d4d5f57213057ab9bf12a9131346283dd5a304ee79049cb42d5302` | + +Verify a mirror against a checked-out Trellis repository by hashing both working +files, so both get that checkout's line-ending treatment and a content match +hashes equal on any platform: + +``` +sha256sum references/{Mirrored_File} {Trellis_Repo_Path}/{Canonical_Source_Path} +``` + +The column above records the mirrored bytes as committed, which carry CRLF. A +checkout that normalizes line endings hashes differently without any content +having changed — so compare mirror against source, and read the column as the +snapshot's own fingerprint rather than as a cross-platform constant. diff --git a/.claude/skills/judge-composition/references/RECONCILIATION.md b/.claude/skills/judge-composition/references/RECONCILIATION.md new file mode 100644 index 0000000..ca8b605 --- /dev/null +++ b/.claude/skills/judge-composition/references/RECONCILIATION.md @@ -0,0 +1,694 @@ +# Four-Judge Reconciliation — Completed Role Definitions and Composition Design + +**Status: RATIFIED — July 18, 2026 (owner, Session 67)**, by the dated +entry in [§7](#7-ratification). Authored July 17, 2026 (Session 66) as +PROPOSED, executing [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) +§10.1 item 1 as twice-amended: (a) the layer mapping, (b) the completed +role definitions in S10's YAML schema with per-field sources, (c) the +adoption of the two structural imports (R-29 hard compatibility gate; +R-30 no-global-section) into the composition design. Owner ratification +is a recorded decision, not an inference; the §7 entry is that decision, +and this record now governs where the two parent designs differ. Amended +only by dated entry, never by silent edit. The panel drills +(`npm run test:judge-panel`) pin the composition design in §5 in the +same PR, per the §10.1 instruction that R-29/R-30 enter the design +BEFORE the drills pin it. + +Authored under the house prompt protocols (`HANDOFF.md` §7 guardrail 4: +Prompt-Engineering + Hypershot, both invoked before these bytes were +written). Layer rule for everything below: role names, taxonomy class +names, parameter names, and schema field names are invariant vocabulary; +every per-invocation value is a placeholder; no concrete belief appears +at any frame layer (concrete synthetic content lives only in the +byte-pinned drill fixtures, which are calibration data, not frames). + +Sources (register IDs from [`RESEARCH_MAP.md`](RESEARCH_MAP.md)): + +- **S10** — [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) + (the collaborator's supplied design: registries, YAML judge schema, + ecology, routing stack, gluing rules; claims R-28…R-30). +- **S1 via the register and the contract frames** — the S1 protocols + and 2×2 rubric findings as carried by R-01/R-04/R-06/R-11 and + distilled into [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) + §1–§6 (S1's released-code locator is still missing — sharing-queue + row 2 — so S1 reconstruction cites the register rows and the + committed contract frames, never an unread artifact). +- **S9 fork** — the OpenCnid `migration-analysis` clone (MIT LICENSE at + fork commit `2bb5e54`; re-cloned this session to + `D:\OpenCnid\migration-analysis`, outside the Trellis worktree): + `docs/adaptation.md` (the five capability-indexed failure classes + with observable behaviors), `src/task_evals/*.py` (LLM-judge + evaluation prompts with labeled structured outputs), `src/optimize/` + (the meta-agent optimizer — read for orientation, NOT adopted; AB-8). +- **FOUR_JUDGE_DESIGN.md §3** — the four blindness profiles this record + completes. +- **[`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) + §3–§5** — the drilled v1 arithmetic the composition feeds. + +Adoption bounds binding this record: AB-1 (S10 physics/framework claims +are design vocabulary, never enforcement weight), AB-3 (routing weights +stay open and non-load-bearing), AB-5 (writer-blind, no count-shaped +incentives), AB-7 (non-epistemic registries stay gated), AB-8 (no +evolution machinery), AB-9 (audit never gates), AB-11 (live blocks +only). + +--- + +## 1. The layer mapping (§10.1 item a) + +**Verdict: the layers compose (S10 = framework, this panel = a minimal +ecology instance), with one refinement and one recorded fusion.** A +role's blindness profile is expressed exactly as §10.1 predicted: the +registry parameters it does NOT select, plus its +`abstention_boundary`. + +Parameter naming convention (this record's contribution, needed to make +the gluing condition decidable): a selected parameter is a **qualified +parameter** `registry.parameter/aspect` — the registry entry plus the +evidence region it restricts (e.g. `logical.falsification/cited` vs +`logical.falsification/independent`). Two judges share a parameter in +the gluing sense only when the *qualified* names match; sharing only +the registry entry (`falsification` under two aspects) is registry-level +kinship, which §4.3 treats as composable disagreement, not overlap. +S10's registries are expandable by declaration; entries used below that +S10's ecology names but its registry list does not +(`evidence_quality`, `source_dependence`, `constraint_satisfaction`, +`hidden_assumptions`, `goodharting`, `coverage`) are registered here as +Logical-registry expansions, each cited to the ecology judge that +already uses it. + +| Role | S10 ecology reading (verified against the ecology text) | Blindness = unselected parameters + boundary | +|---|---|---| +| J1 Grounding | Epistemic Reliability ∩ Belief-to-Fact, **refined**: the ecology's Epistemic Reliability Judge bundles "evidence quality, induction, Bayesian confidence, falsifiability, source dependence, observation fidelity" — the citation-facing half (`evidence_quality`, `falsification` over cited bytes) is J1; the world-facing half (`source dependence`, `observation fidelity`, `induction`) is J3. The preliminary §10.1 mapping holds with this split recorded. | Unselected: every world-facing, history-facing, and non-Logical parameter. Boundary: cited bytes do not bear on the claim (evidence-abstain). | +| J2 Coherence | Formal Coherence Judge, direct match ("deduction, consistency, constraint satisfaction, counterexamples, contradiction sensitivity" — the last is an orientation field in S10's schema, where it appears below). | Unselected: every evidence-facing parameter. Boundary: empty history and no kind coordinates. | +| J3 Corroboration | Epistemic Reliability Judge's world-facing half (see J1 row) + Sensorial `observation_quality`. | Unselected: the claim's own citations (the anti-circularity blindness), all internal-record parameters. Boundary: absence of corroboration counts only where the supplied evidence should have contained it. | +| J4 Audit | Adversarial Judge + Coverage Meta-Judge, **fused** — two ecology functions this panel deliberately runs as one role. Divergence recorded: S10 keeps them separate. Falsifier for the fusion: a drill or measured run showing the fused role missing a coverage failure (a needed-judge or missing-parameter finding) that a separated meta-judge catches — then the panel grows per FOUR_JUDGE_DESIGN §9. | Unselected: every belief-facing parameter — J4 selects only audit-aspect parameters and judges judges. Boundary: position-swapped comparisons that disagree are a tie, never a finding. | + +**The design property the mapping yields (drill-pinned):** the four +roles' qualified-parameter selections are **pairwise disjoint by +construction** — that is what "differently blind" buys, and it is what +licenses cross-role composition without a meta-judge (§4.3). The drill +computes the pairwise intersections from the definitions and fails if +any is non-empty (`[mapping]` section). + +## 2. Completed role definitions (§10.1 item b) + +S10's YAML schema, completed per role. Per-field sources are cited +inline (`# src:` comments). Three fields extend S10's schema and are +recorded as extensions, not silent edits: `taxonomy` (the closed +drawback classes with their qualified-parameter map — required by the +overlap test), `inputs` (the declared context allowlist — blindness +made mechanical, from [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md) +§2.1), and `required_assumptions` (the R-29 gate material). The +`rubric` lines are the reconstructed one-question-per-class checks +(JUDGE_CONTRACT_TEMPLATE §6.4); each is invariant across invocations +and carries no concrete belief. + +> **Dated supersession note (July 21, 2026, via self-play).** The worked role YAMLs +> below use S10's `hyperplane_parameters` (four-plane) per-seat structure. That per-seat +> structure is **superseded**: the live schema uses flat `select` (with `taxonomy` + +> `blind_to` retained — both validated). A blind self-play evaluation this session found +> the four-plane buckets do not earn their place at the per-seat level, and that a +> plane-categorized `select` is no better; the mapping to flat `select` is mechanical +> (each `plane.parameter` becomes a flat `select` entry). These reconstructions are +> preserved as the §10.1-item-b work; a full rewrite to flat `select` is a separate +> follow-up. See [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) supersession +> note and [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8. + +### J1 — Grounding + +```yaml +judge: + name: J1_GROUNDING # src: FOUR_JUDGE_DESIGN §3; JUDGE_CONTRACT_TEMPLATE §1 role enum + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 1 (verdict domain); R-11 (the only gate at 0% under laundering) + Decide whether the exact cited source bytes support the claim. + Judges the citation, never the world. + + claim_modes: # src: §10.1 preliminary mapping (Belief-to-Fact ∩); S10 claim-mode list + - fact + - inference + + hyperplane_parameters: + emotional: [] # src: AB-7 (non-epistemic registries gated behind the claim-kind plane) + logical: # src: S10 ecology "Epistemic Reliability Judge" (evidence quality, falsifiability), citation-facing half per §1 + - evidence_quality/cited + - falsification/cited + sensorial: [] + ethical: [] + + orientation: + evidence_standard: entailment_by_cited_bytes_only # src: R-11 (semantic entailment held 0%); JUDGE_CONTRACT_TEMPLATE §2 context + uncertainty_posture: abstain_when_bytes_do_not_bear # src: JUDGE_CONTRACT_TEMPLATE §2 constraints + temporal_horizon: at_judgment_time # src: AB-11 (live blocks at judgment time) + stakeholder_scope: none_epistemic_only # src: AB-7 + reversibility: verdicts_attributed_to_rubric_sha # src: JUDGE_CONTRACT_TEMPLATE §6.5 (byte-pin on registration) + contradiction_sensitivity: high_within_cited_bytes # src: S10 schema field; template §2 (contradicted_by_cited_bytes class) + abstention_boundary: cited_bytes_do_not_bear_on_claim # src: JUDGE_CONTRACT_TEMPLATE §2 ("If the bytes do not bear on the claim at all, abstain") + + taxonomy: # closed; unknown class is a refused completion (template §1) + unsupported_citation: evidence_quality/cited # src: template §2; R-11 (laundering = real-but-unrelated hashes) + overclaimed_evidence: evidence_quality/cited # src: template §2; R-01 (clean never certifies) + contradicted_by_cited_bytes: falsification/cited # src: template §2 + + rubric: # one question per class (template §6.4; S1 op discipline via R-06) + - Do the cited bytes state or entail the claim? # -> unsupported_citation when no + - Does the claim assert more than the cited bytes carry? # -> overclaimed_evidence when yes + - Do the cited bytes contradict the claim? # -> contradicted_by_cited_bytes when yes + + inputs: # src: COMPOSABLE_RUBRICS §2.1 (blindness mechanical); FOUR_JUDGE_DESIGN §3 "Sees" + required: [claim, citedBytes] + optional: [] + + required_assumptions: # src: R-29 (S10 layer-4 hard gate material) + - cited_bytes_available +``` + +### J2 — Coherence + +```yaml +judge: + name: J2_COHERENCE + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 2; R-18 (coherence calibration as tooling) + Decide whether the belief is internally coherent across its own + record. Judges consistency, never truth. + + claim_modes: # src: template §3 (history + kind judgeable for any non-experiential mode) + - fact + - inference + - prediction + - belief + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Formal Coherence Judge" (deduction, consistency, constraint satisfaction) + - consistency/internal + - consistency/history + - constraint_satisfaction/kind + sensorial: [] + ethical: [] + + orientation: + evidence_standard: own_record_only # src: FOUR_JUDGE_DESIGN §3 ("blind to all external evidence") + uncertainty_posture: abstain_without_history_or_kind # src: template §3 constraints + temporal_horizon: full_version_history # src: FOUR_JUDGE_DESIGN §3 "Sees" (prior versions, contest/recovery record) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_within_own_record # src: S10 ecology (Formal Coherence "contradiction sensitivity") + abstention_boundary: empty_history_and_no_kind_supplied # src: template §3 ("abstain rather than judging from the claim text alone") + + taxonomy: + self_contradictory: consistency/internal # src: template §3 + history_inconsistent: consistency/history # src: template §3 + kind_incoherent: constraint_satisfaction/kind # src: template §3; R-19 (claim-kind positions) + + rubric: + - Does the claim contradict itself? # -> self_contradictory when yes + - Does the claim contradict its own prior record? # -> history_inconsistent when yes + - Does the claim assert more certainty than its kind position admits? # -> kind_incoherent when yes + + inputs: + required: [claim, history] + optional: [claimKind] # src: template §3 ("optionally ") + + required_assumptions: + - history_available +``` + +### J3 — Corroboration + +```yaml +judge: + name: J3_CORROBORATION + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 3; R-05 (detectability spectrum); R-12 (poison drill) + Decide whether independent live evidence corroborates or + contradicts the claim, blind to the claim's own citations. + + claim_modes: # src: FOUR_JUDGE_DESIGN §3 (independent evidence bears on world-facing claims) + - fact + - inference + - prediction + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Epistemic Reliability Judge" world-facing half per §1 (source dependence, induction) + - induction/world + - falsification/independent + - source_dependence/independent + sensorial: # src: S10 ecology (observation fidelity); Sensorial registry (observation quality) + - observation_quality/independent + ethical: [] + + orientation: + evidence_standard: independent_live_blocks_authority_weighted # src: template §4; AB-11 (live blocks only); parent §5 (authority registry) + uncertainty_posture: abstain_unless_evidence_should_have_contained_it # src: template §4 constraints + temporal_horizon: current_versions_only # src: AB-11 (superseded versions are archive) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_across_independent_sources + abstention_boundary: supplied_evidence_need_not_have_contained_corroboration # src: template §4 + + taxonomy: + uncorroborated: induction/world # src: template §4 + authority_contradicted: falsification/independent # src: template §4; R-12 (authority catches confident lies) + corroboration_ambiguous: observation_quality/independent # src: template §4 + + rubric: + - Does independent evidence that should contain this claim corroborate it? # -> uncorroborated when no + - Does authority-weighted independent evidence contradict the claim? # -> authority_contradicted when yes + - Is the independent signal too ambiguous to decide? # -> corroboration_ambiguous when yes + + inputs: + required: [claim, independentEvidence] + optional: [authorityWeights] + # citedBytes is deliberately absent: the anti-circularity blindness + # (FOUR_JUDGE_DESIGN §3 "blind to the belief's own citations"). + + required_assumptions: + - independent_evidence_pool_available +``` + +### J4 — Audit + +```yaml +judge: + name: J4_AUDIT + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 4; R-06 (S1 2x2: the audit caught what loops could not) + Judge whether the other judges judge well. Judges judges, never + beliefs; runs outside every loop; can only contest a judge as a + capability. + + claim_modes: [] # divergence recorded: S10's claim_modes classify judged CLAIMS; J4's judged + # items are (judge, verdict, evidence) triples, so the field is vacuous for + # the audit role. The underlying items J4 samples may carry any mode. + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Adversarial Judge" (hidden assumptions, Goodharting) + + # "Coverage Meta-Judge" (missing coverage) — fused per §1; + # abduction/counterfactuals from the S10 Logical registry + - hidden_assumptions/audit + - goodharting/audit + - coverage/audit + - abduction/audit + - counterfactuals/audit + sensorial: [] + ethical: [] + + orientation: + evidence_standard: stored_pairs_judged_twice_positions_swapped # src: R-06 (position debias); template §5 protocol invariants + uncertainty_posture: disagreeing_orders_are_a_tie # src: template §5 ("a finding counts only when both orders agree") + temporal_horizon: retrospective_samples_only # src: FOUR_JUDGE_DESIGN §4 (anchors prospective, J4 retrospective) + stakeholder_scope: judges_only_never_beliefs # src: AB-9 + reversibility: contest_recoverable_by_human_reregistration # src: parent §4.4; register_modules.ts recovery transition + contradiction_sensitivity: high_across_rubric_applications + abstention_boundary: positions_disagree_after_swap # src: template §5 + + taxonomy: + rubric_gamed: goodharting/audit # src: template §5; R-11 + S1 Goodhart episode (RESEARCH_MAP §4.2) + convention_blind: coverage/audit # src: template §5; R-06 (0.122->0.126 invisible without the task contract); + # S9 fork docs/adaptation.md §3 (implicit-knowledge failures: + # "misses implied constraints or conventions") + systematic_drift: abduction/audit # src: template §5; FOUR_JUDGE_DESIGN §4 (drift finding contests the judge) + + rubric: + - Does the judged verdict satisfy the rubric's letter while defeating its question? # -> rubric_gamed when yes + - Does the judged verdict penalize a convention the task contract requires? # -> convention_blind when yes + - Do the sampled verdicts drift in one direction the rubric does not explain? # -> systematic_drift when yes + + inputs: + required: [sampledTriples, taskContract] # src: template §5 (task_contract is law; R-06) + optional: [] + # beliefOpinion and compositionState are deliberately absent: + # the live gating path is J4's structural blindness + # (FOUR_JUDGE_DESIGN §3 row 4; AB-9). + + required_assumptions: + - stored_verdict_evidence_pairs_available +``` + +**Verdict-schema refinement adopted (from R-29, recorded as a dated +amendment to JUDGE_CONTRACT_TEMPLATE §1):** abstain verdicts carry an +`abstainReason` from the closed set `(jurisdiction | evidence)` — +S10's exterior-region abstention (the claim mode or case lies outside +the judge's jurisdiction) is now distinguishable from evidential +abstention (in jurisdiction, evidence insufficient). Both routes reach +the opinion identically (absence of evidence → `u`); the reason is +telemetry and audit material, never arithmetic. + +## 3. Composition design: the two structural imports (§10.1 item c) + +Adopted BEFORE the drills pin them, as §10.1 instructs. The enforcement +home for everything in this section is the pure module +`src/core/graph/judge_panel.ts`; the drill is +`npm run test:judge-panel` (sections named per rule below); unit pins +live in `src/core/graph/judge_panel.test.ts`. + +### 3.1 The hard compatibility gate (R-29) + +S10's layer-4 rule, adopted verbatim in force: compatibility is a +**hard gate, never a similarity score**. + +- Every judge declares `required_assumptions` through its role + definition (§2, typed keys); every judged case declares its + properties. A judge whose required assumption the case **negates** + is **excluded from the composition with a typed, counted exclusion + record** — S10's "exclude … judges whose required assumptions + conflict with the case" — never down-weighted, never silently + dropped. The gates run at selection: an excluded judge's verdicts + are not expected in the stream at all. +- The applicability gate (S10 layer 3) rides with it: a case whose + claim mode lies outside a judge's `claim_modes` admits only a + `jurisdiction` abstention from that judge. A non-abstaining verdict + arriving at composition from an inapplicable or excluded judge is a + wiring failure and refuses the composition (typed), fail-closed. +- If the gates leave zero composition-side verdicts, the composition + refuses outright (typed) rather than emitting a vacuous opinion — + the R-02 fail-closed posture applied at the panel boundary. +- Routing WEIGHTS (S10's R(j,c) score) are explicitly NOT adopted: + they are open parameters under AB-3, unmeasured, non-load-bearing. + Only the hard constraint enters. + +### 3.2 The no-global-section outcome (R-30) + +S10's gluing condition, made decidable by the qualified-parameter +convention of §1: + +- **Overlap** between two judges = the intersection of their qualified + parameter selections. Within this panel, cross-role overlaps are + empty by construction (§1's drill-pinned property); overlap arises + where jurisdictions genuinely coincide — **two registered + configurations of the same role** (a rubric revision, a model + migration under R-27) judging the same belief. +- **Incompatible restrictions** = on one belief, one judge renders a + drawback whose class maps to a qualified parameter inside the + overlap while another overlapping judge renders a non-abstaining + `clean` (an affirmative no-drawback-found restriction of the same + parameters). Two drawbacks never conflict (drawback-first: both are + real findings); abstentions never conflict (no restriction). +- **Outcome — no valid global section presently exists**: the + composition emits a typed conflict record + `{kind: no_global_section, beliefId, parameter, judges, verdicts}`, + **withholds every verdict of the conflicted group from evidence + accumulation** (their mass reaches the opinion only as absence of + evidence — the abstention-routing law extended to conflict, so the + composed opinion is u-dominant relative to the silent blend), and + flags the belief for the existing conflict path. Never a blended + (b, d, u) average; never a majority vote. Resolution is human or a + separately proposed meta-judge — the engine only refuses to glue. + +### 3.3 The divergence between the parents, resolved explicitly + +FOUR_JUDGE_DESIGN §3 prescribes that J1-clean + J3-drawback "feeds `d` +*and* flags"; R-30 prescribes u-dominance for overlap-test failure. +These are **different boundaries, not a contradiction**, and this +record resolves them as a merge (per the §8 rule against silent +resolution): + +- **Cross-role disagreement** (registry-level kinship, qualified-level + disjoint — e.g. J1 `clean` on `falsification/cited` + J3 + `authority_contradicted` on `falsification/independent`): the two + evidence regions can both be truthfully reported at once (accurate + citations, contradicting authority), so a coherent — unfavorable — + global section exists. **Composes** exactly as §3 says: the drawback + feeds `d`, the affirmative clean feeds `b`, and the composition + emits the typed record `{kind: cross_role_disagreement, …}` that + flags the belief for the conflict path. Balanced conflict stays + legible in the opinion itself — high `b` with high `d` is + distinguishable from ignorance (high `u`), which is the reason the + triple exists (R-14). +- **Same-jurisdiction conflict** (qualified-parameter overlap, §3.2): + no coherent ruling exists; the no-global-section outcome fires. + +Falsifier for this resolution (carried per §4 protocol): a measured +regime on anchored conflict cases where routing cross-role +disagreement to u-dominance (or forced blending of same-jurisdiction +conflict) outperforms this split — then the boundary moves by dated +amendment with a same-commit drill re-pin. + +### 3.4 What composition consumes and refuses (completing the §4 flow) + +In event order, each step typed and drill-pinned: + +1. **Schema**: every verdict record validates against the shared + schema (closed per-role taxonomy; abstains carry `abstainReason`); + unknown role, class, or reason refuses. +2. **Registry**: a verdict from an unregistered judge refuses (a + wiring bug must not pose as epistemic humility); a verdict from a + **contested** judge refuses the whole composition, naming the judge + (the Session-31 whole-batch-refusal mold: a contested judge in the + stream means upstream selection already failed). +3. **J4 exclusion**: a J4-role verdict in the composition input + refuses (the audit role has no composition path — AB-9; the only + J4 consequence is a contest of the judge capability, mediated + outside this module). +4. **Gates** (§3.1), then the **overlap test** (§3.2), then + **cross-role disagreement detection** (§3.3). +5. Surviving verdicts become support events (`opId` = the judge id, + weight from the verdict record) consumed by the drilled v1 + arithmetic (`computeSupportOpinion` — reused, not modified). + +Judge manifests (the registration objects) require `rubricSha`, +`anchorSetSha`, `taxonomyVersion`, and **`targetModelIdentity`** +(R-27: adaptations are model-coupled; a model migration must be able +to contest the judge — the drill asserts the field is required). +Contest and re-registration follow the module-registration recovery +mold (`scripts/register_modules.ts`): a contested judge is excluded +from composition until a human re-review re-registers it, and the +superseded contest record survives in the judge's history. + +## 4. Per-role reconciliation verdicts (§4 completion protocol) + +| Role | Verdict | Divergences recorded (each with falsifier) | +|---|---|---| +| J1 Grounding | **adopt** (S10 sparse-selection frame; this record's definition) | none — the ecology-judge split (§1 refinement) is a reading, not a divergence | +| J2 Coherence | **adopt** | none — direct Formal Coherence match | +| J3 Corroboration | **adopt** | none — world-facing half of the split | +| J4 Audit | **merge** (Adversarial + Coverage Meta-Judge fused into one role) | S10 separates them. Falsifier: a coverage failure the fused role misses that a separated meta-judge catches → the panel grows (§9 governs). The Coverage Meta-Judge's "unresolved disagreement" duty is engine code here (conflict records), and its "need for another judge" duty is deferred to humans reading those records | +| Composition | **merge** (§3.3: §3's disagreement-is-data at the cross-role boundary; R-30's no-global-section at the same-jurisdiction boundary) | falsifier in §3.3 | +| Verdict schema | **merge** (`abstainReason: jurisdiction \| evidence` adopted from R-29 into the template §1 schema) | falsifier: the distinction never discriminating in telemetry over a measured period → retire by dated amendment | +| Ecology breadth | **diverge-recorded**: S10 sketches eleven judges; this panel ships four (a minimal ecology instance for belief-support). | Falsifier: FOUR_JUDGE_DESIGN §9 — a fifth blindness profile catching a failure class the four miss. Non-epistemic registries stay behind AB-7's driving-question rule | +| Routing stack | **diverge-recorded**: S10's six-layer stack adopted only at layers 3–4 (applicability + compatibility, §3.1) and 6 (overlap, §3.2); layers 1–2 and 5 (context signature, semantic retrieval, coverage/complementarity scoring) are selection machinery a four-role fixed panel does not need. | Falsifier: an ecology larger than one configuration per role — then the routing layers enter behind their own proposal (AB-3/AB-8 bind the weights and any search) | + +## 5. Enforcement homes and pins (implementing FOUR_JUDGE_DESIGN §6) + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Verdicts ternary, closed taxonomies, abstainReason | `judge_panel.ts` Zod schemas | drill `[schema]`; unit pins | +| Role blindness structural | `assembleJudgeContext` input allowlist from `inputs` | drill `[blindness]` (every fixture (role, forbidden-input) pair refused, typed, naming role + input); unit pins | +| J4 never gates | `judge_audit.ts` exports no symbol `judge_panel.ts` imports; composition refuses J4 verdicts | drill `[static-imports]` (no import path audit→composition) + `[audit-isolation]` (route attempt finds no effect on any opinion) | +| Panel composes in engine code only | `composePanel` pure over verdict records | drill `[composition]` scripted verdicts → exact opinions vs independent oracle | +| No-global-section, never blend | §3.2 withholding in `composePanel` | drill `[no-global-section]` (planted incompatible verdicts → typed conflict record; u-dominant vs the blend counterfactual) | +| Hard compatibility gate | §3.1 gates in `composePanel` | drill `[gates]` (planted incompatible judge excluded, counted; inapplicable non-abstain refused) | +| Judges contestable, model-coupled | registry pure functions; manifest requires `targetModelIdentity` | drill `[judge-contest]` (contest → refusal → human re-registration → history survives); `[schema]` R-27 required-field refusal | +| Position bias neutralized in J4 | `judge_audit.ts` `debiasedFinding` (agree-in-both-orders rule) | drill `[audit-isolation]` protocol checks; unit pins | +| Writer never sees any of it | no production wiring exists this session (nothing writes or exposes panel state) | future: the sweep-integration proposal carries the kernel-prompt absence pin (FOUR_JUDGE_DESIGN §6 row 7) — recorded here as deliberately not yet pinnable | + +### 5.1 Judge-intake rows (dated entry, July 18, 2026 — Session 68) + +Merged from [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md) §6 per its +§10 item 4, in the implementing PR, now that every row is **observed** +rather than designed (`npm run test:judge-intake`, 13 sections; the three +modules land in the same PR as this entry). This is a dated addition +under the §7 amendment rule, not an edit to the ratified table above. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Claim bytes are engine-copied from an address, never model-authored | `judge_intake.ts` — input is addresses; bytes fetched engine-side | drill `[engine-copy]` (a selection carrying literal text refuses) | +| Filing refuses without recorded ratification | ratification lookup precedes candidate construction | drill `[ratification-gate]` | +| The cut is visible at approval (rule 17) | engine-computed `neighborContext` on every selection | drill `[selection-context]` (qualifier-excluding cut visible in the ratification payload) | +| Claim mode is user-ratified, never agent-inferred | `claimMode` lives on `Ratification`, not on the selection | drill `[mode-provenance]` | +| Compound claims decompose as separate ratified selections | one mode per selection; no sub-claim authoring surface | drill `[decomposition]` | +| Attribution never reaches judge context | user id is an address component; allowlist admits content only | drill `[attribution-partition]` — two users' beliefs in one workspace produce judge contexts identical but for claim content | +| No task-text channel in composed prompts | `PromptSection` closed union has no task member | drill `[prompt-absence]`; unit pins | +| Composed prompts byte-inspectable | pure deterministic `renderPrompt` | drill `[prompt-bytes]` against byte-pinned fixtures | +| Assembly cannot bypass blindness | evidence built only via `assembleJudgeContext` | drill `[blindness-preserved]` | +| Ratifications and pre-registrations are write-once | store refuses a second write per key | drill `[write-once]` | +| Late registration refuses | run-open event; later timestamp refuses, typed | drill `[prereg-late]` | +| Forecasts never share bytes with prompts | no import path store → prompt module | drill `[static-imports]` | +| Audit reads the store; no new audit→composition path | one-way imports | drill `[static-imports]` (both directions) | + +### 5.2 Judge-convocation rows (dated entry, July 19, 2026 — Session 70) + +Merged from [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) +§6 in the implementing PR, now that every row is **observed** rather +than designed (`npm run test:judge-convocation`, 23 sections / +140 checks; 15 unit pins in `judge_convocation.test.ts`). A dated +addition under the §7 amendment rule. Build scope is OPTION B (that +record's §11.1): the live spawn path exists and is pinned at its +refusals; no live run has executed. **This entry also closes §5 +row 9's deferred pin** — see the writer-blind row below. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Manifests validated, R-27 required, hand-authored only | `parseJudgeManifest` at registration; no generator exists (AB-8) | drill `[roster-manifest]`; unit pins | +| Registration existence-gated before any write | `findMissingEvidentiaryHashes` gate in `register_judges.ts`, before both writes | drill `[roster-existence]` (gate logic + source-order pin) | +| Store manifest ↔ graph hook consistent; the hook carries only name + id + kind + hashes | one ceremony writes both; `buildRegistryFromState` refuses mismatch naming the judge | drill `[roster-consistency]`; hook-opacity cypher pins in `[roster-lifecycle]` + unit pins | +| Contested judge unreachable by a run (graph state → pure registry → composition) | contest state carried by `buildRegistryFromState`; `composePanel` refuses (existing law) | drill `[roster-lifecycle]` | +| Recovery is human re-registration; a manifest change is a new id | plan refusal on an existing judgeId; ceremony requires `--reviewed-by` and refuses uncontested recovery | drill `[roster-recovery]`; unit pins | +| Pairs judged at most once ever; identity spans candidate bytes + manifest identity | durable verdict lookup excludes judged pairs before sampling (`support_sweep.ts`) | drill `[sweep-pairs]` + `[sweep-once]` (a third run finds an exhausted pool) | +| Uniform pool, seeded sampling, budget, counted deferral | sweep policy (config twins `SUPPORT_*`); mulberry32 per the record §3.5 | drill `[sweep-selection]` (independent-generator sequence + budget order) | +| Run-open recorded before the first invocation; late pre-registration refuses | `appendThroughLaw` ordering in `runConvocationSweep`; slice-1 store law | drill `[sweep-run-open]` | +| Judge-all-then-write; infrastructure failure writes nothing | collect-then-write in `runConvocationSweep` | drill `[sweep-atomicity]` | +| Never a write gate; no path to the write path or promotion | no such import exists | drill `[static-imports]` | +| Excluded judges typed and counted; designed silence disclosed (rule 12) | R-29 gate at selection; the run report carries exclusions + jurisdiction abstains; synthesized abstentions flagged, zero spend | drill `[sweep-evidence]` | +| Attribution never re-enters through sweep plumbing | prompts only via `toPromptInput`; store payloads carry ids, never addresses or partitions | drill `[sweep-attribution]` (partition twins through the FULL sweep path; token scan over prompts and appended payloads) | +| Opinions computed at read time, advisory only | `computeConvocationReport` replays verdicts through `composePanel`; nothing stores an opinion | drill `[report]` (independent arithmetic; cross-role disagreement surfaced as data) | +| **Writer never sees any of it** (§5 row 9, deferred there — CLOSED here) | no support vocabulary on any kernel-prompt source; no RLM surface reaches `judge_records` or any support field | drill `[writer-blind]` (token scan over all ten `src/rlm/*.py` + the `search_ast_nodes` body) + unit pins | +| Spawn transport = exactly the rendered bytes; `promptHash` re-verified pre-send | `buildSpawnRequest` (`parseComposedPrompt` re-render) | drill `[spawn-transport]`; unit pins | +| Model identity must equal the manifest's, or refuse before I/O (R-27) | `makeLiveJudge` construct-time refusal | drill `[spawn-model]`; unit pins | +| The model supplies only `{verdict, drawback, abstainReason}`; weight and time engine-side | strict `judgeResponseSchema`; `buildEngineVerdict` | drill `[spawn-verdict]`; unit pins | +| Live spawn unreachable without the operator flags (the mechanical half of the triple gate) | runner defaults to the oracle; `--live` without `--confirm-paid` refuses | drill `[spawn-gate]` (source pins; the governance half is the owner's dated re-opening + per-run approval) | +| The queue shows the cut verbatim (rule 17) | `show` prints the `buildRatificationRequest` payload unmodified | drill `[queue-shows-cut]` | +| `claimMode` only from the user's recorded flags; declines record nothing | required flags with no default; the store schema has no other entry point | drill `[queue-provenance]` | +| Store write-once mechanical; supersession references, never overwrites | `judge_records` `PRIMARY KEY (kind, key)` + the slice-1 law via validate-then-append | drill `[store-write-once]`; DDL unit pin | + +**Dated addition (July 21, 2026) — the read-time explanation render.** +The advisory report gained a pure, code-mediated explanation render +(`judge_explain.ts`; the `support:report` surface prints it) that joins +already-stored verdict fields — seat, verdict, drawback class, its +qualified-parameter dimension, abstain reason, and the typed +conflict/disagreement/exclusion records — into human-readable lines. No +wire/schema/store change, no model call, authors no byte; `clean` reads +"no known drawback found," never certified correctness (R-01). Specified +at [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) §13 +(Option A); pinned by `judge_explain.test.ts` and the `[report]` / +`[static-imports]` sections of `npm run test:judge-convocation`. It is +the engine-side analogue of the session-layer `judge-composition` skill's +per-item rationale, aligning the two layers as far as the code-mediated +pillar allows. + +## 6. Exclusions (this record) + +No live judges, no model calls, no `support_sweep`, no database +registration, no ratification queue, no claim-kind plane, no routing +weights, no evolution machinery (AB-8), no S9 optimizer adoption (the +`src/optimize/` meta-agent was read for orientation only), no change +to the write path, custody tiers, kernel prompts, or any composed- +prompt pin. + +## 7. Ratification + +**RATIFIED — July 18, 2026 (owner, Session 67).** This record and its +drills, authored in Session 66 (July 17, 2026), are ratified as written. +In consequence, from this date: + +- **The §4 per-role verdicts are binding**, not proposals. Consumers no + longer carry the unratified caveat. +- **This record governs where the two designs differ.** + [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) and + [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) are no longer + co-equal: the layer mapping, the completed role definitions, the + adopted composition design (R-29 hard compatibility gate; R-30 + no-global-section), and the §5 enforcement table are authoritative. +- **The §3 composition design binds implementation.** The §3.3 + resolution of the cross-role vs same-jurisdiction boundary stands with + its falsifier. +- **The live-judge follow-on slice is unblocked** as a separately + authorized bounded feature — ratification removes the gate, it does + not authorize the build. + +Ratified in the same act: [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) +§11 — the twenty rules as binding program law. Records ratified under +this entry are amended only by dated entry, never by silent edit. + +*The gate this entry closes, preserved: "**OPEN.** This record and its +drills were authored in Session 66 (July 17, 2026). The owner ratifies by +dated entry here; until then the verdicts in §4 are proposals, +FOUR_JUDGE_DESIGN.md and FOUR_JUDGE_BASIC_MODEL.md remain co-equal, and +any consumer of this record must say so."* + +### 7.1 Composition supersession (dated entry — July 19, 2026, Session 71) + +**Owner ruling: there are no base judges and no default cast.** Judges, +their registry selections, orientations, closed taxonomies, names and +anchors all compose per context at ceremony time from the REPL's own +fact and belief space. This record's §1 and §2 are hereby read as **one +composition instance for an epistemic driving question** — the "minimal +ecology instance" its own §1 already calls them — and not as a standing +roster. Governing records: +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §6 rule 4 (as +superseded, §6.1), +[`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md), and +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md). + +Three consequences for this record specifically: + +**(a) §2's four completed definitions are an instance, not law.** Their +per-role taxonomies (`unsupported_citation`…, `self_contradictory`…, +`uncorroborated`…, `rubric_gamed`…) are what one epistemic composition +looked like. They are not the classes a future composition must use, +and nothing may byte-pin, register, or schema-encode them as such. What +remains binding from §2 is the *schema* — the field set a judge +definition must fill — not the fills. + +**(b) The §4 Routing-stack divergence is reopened; its own falsifier +fired.** That row adopted S10 layers 3–4 and 6 while discarding layers +1–2 and 5 (context signature, semantic retrieval, +coverage/complementarity) as *"selection machinery a four-role fixed +panel does not need,"* with the recorded falsifier: *"an ecology larger +than one configuration per role — then the routing layers enter behind +their own proposal."* Under per-context composition that condition is +permanently met. **Layers 1, 2 and 5 enter now** (owner approval, +July 19, 2026), behind their own proposal, with AB-3/AB-8 binding any +weights or search. They are the machinery composing a cover over an +arbitrary linguistic topology requires. + +**(c) The §1 pairwise-disjointness pin moves, and loosens.** The +drill-pinned property — the four roles' qualified-parameter selections +are pairwise disjoint, computed from the definitions and failing if any +intersection is non-empty — was a static check over a fixed cast. It +becomes a **composition-time gate** run over each composed cover before +any judging. It also loosens: strict disjointness is not required of a +cover, since opens normally overlap and gluing happens on the overlaps. +The gate accepts either disjoint seats **or** overlapping seats with a +declared gluing rule, which §3.2's R-30 no-global-section outcome +already handles as a typed fork rather than a blend. + +Unchanged by this entry: §3.1's R-29 hard compatibility gate, §3.3's +cross-role vs same-jurisdiction resolution, and the §5 enforcement +tables (§5.1 intake, §5.2 convocation), whose rows record observed +behavior of shipped code. + +### 7.2 Standing-model pointer (dated entry — July 20, 2026, owner) + +A ratified standing model now sits above this record's verdict model: +[`STANDING_MODEL.md`](STANDING_MODEL.md) (owner-ratified as principle, +July 20, 2026). Two effects on this record, recorded here so the two do +not silently disagree: + +- **The verdict enum `clean | drawback | abstain` (§2) becomes the + signed delta `+1 | −1 | 0`** of a single ternary standing axis + (doubt/belief/fact). The enum mechanics and the §5.1/§5.2 enforcement + tables are **unchanged** — this is a reframing of what the enum *is*, + not an edit to shipped behavior. +- **Merit-refusal is superseded in principle** by user-gated + ratification (STANDING_MODEL §2): a value-mode candidate the panel + cannot dispute is recorded as user-gated rather than refused into + silence. No code changes under this entry; the supersession is a + gated build. + +STANDING_MODEL is ratified as *principle only* and authorizes no build; +this record's shipped surfaces stand until a separately gated build +changes them. + +### 7.3 Header correction (dated entry — July 22, 2026, owner) + +The header status line of this record read +`Status: PROPOSED — RATIFICATION OPEN` from authoring on July 17, 2026 +until this entry, four days after §7 ratified it. The two were read +together only by a reader who reached §7; a reader who stopped at the +header — which the house rule instructs, since a record's own header is +authoritative on its standing over any index — was told the opposite of +the truth, and `AGENTS.md` §2.1 correctly indexed this record as +RATIFIED against a header that denied it. + +Corrected under owner approval, July 22, 2026: the header now states +RATIFIED with the §7 date and act, and preserves the authoring date and +original PROPOSED standing so the transition is legible rather than +erased. **Nothing in §1–§7.2 changes.** This entry amends the status +line only. + +The general defect, recorded because it will recur: a dated ratification +entry lands at the bottom of a record and the header at the top is left +alone, so the file's most-read line contradicts its most-authoritative +one. Ratifying a record includes updating its header in the same act. diff --git a/.claude/skills/judge-composition/references/STANDING_MODEL.md b/.claude/skills/judge-composition/references/STANDING_MODEL.md new file mode 100644 index 0000000..bc0eb06 --- /dev/null +++ b/.claude/skills/judge-composition/references/STANDING_MODEL.md @@ -0,0 +1,179 @@ +# The Standing Model — how a claim is valued + +**Status: RATIFIED as principle — July 20, 2026 (owner, Cnid, in +session).** This record states the standing model the derivation games +of July 19–20, 2026 produced and the owner ratified. It is ratified **as +direction and principle**; it authorizes **no build**. Two carve-outs +below (§3, §5) mark exactly where ratification stops and a separately +gated build begins — reading past them would repeat the +instance-promoted-to-frame failure this program has already paid for +([`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md)). + +Companion record for the doubts tier this model's `-1` opens: +[`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +Governing composition law it extends: +[`RECONCILIATION.md`](RECONCILIATION.md) (dated pointer added there). + +--- + +## 0. The derivation ground — Trellis' target function + +**RATIFIED July 20, 2026.** Everything below derives from this, and +before July 19, 2026 it was undefined — `grep "target function"` +returned zero hits repo-wide, so every primitive derivation stood on an +ungrounded floor. + +> **Trellis is a personalized composable expert system whose expertise +> is the user's data.** Not strictly a coding tool; not strictly a RAG +> system. + +Stated by the collaborator (M. Murphy), owner-relayed July 19 and +owner-ratified July 20, 2026. Its immediate consequence is load-bearing +for the rest of this record: **the user is the domain authority by the +target function's own definition** — the system's expertise *is* the +user's data — which is why every place standing moves without a fact to +compel it, it moves by a **user gate** and not by the panel. + +## 1. The signed ternary + +**RATIFIED July 20, 2026 as the standing model.** + +A claim holds one **standing**: + +``` +-1 | 0 | +1 +doubt | belief | fact +``` + +- **Mode, verdict and standing are one vocabulary at two times.** A + candidate *has* a standing; a seat returns a *signed delta*; the + resulting standing is that delta composed against the prior. The + existing per-seat verdict enum (`clean | drawback | abstain`, + RECONCILIATION §2) is the delta's sign — `+1 | −1 | 0` — not a + separate object. +- **`-1` is constructed, not residual.** A doubt is a positive object + (a defeater's finding grounded in facts), not the mere absence of + support. Its tier is [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +- **Corroboration, recorded because ratification followed it:** the + three ledger rows of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §7 replay under this model with no verdict flipped, and the Sieve's + independent `PASS | REVISE | HALT` grammar instantiates the same + ternary with matching semantics (`+1 | 0 | −1`). This model was tested + against unpicked hands before it was ratified, not argued into place. + +## 2. User-gated ratification and the meet rule + +**RATIFIED July 20, 2026 as principle.** + +- **Submission is a vote.** A candidate the panel cannot dispute, that + the user has submitted to the ceremony, is **ratified carrying a + user-gated qualifier** — the qualifier meaning *only the user's + authority stands behind it*. This replaces merit-refusal, whose defect + is that it produces silence indistinguishable from "we never looked." + There is no tie. +- **The qualifier lives in the address**, as a distinct hash kind — not + as metadata propagated by discipline. Identity inside a hash-guarded + chain, so the qualifier cannot decay. +- **The meet rule** (owner-accepted explicitly, July 19): a derived + claim's hash kind is the **meet of its dependencies' kinds**. An + inference citing one user-gated address and one corroborated address + cannot mint a clean hash — the qualifier cannot launder itself in one + hop. + +The stamp mechanism (address layout, hash kinds) is a **build** detail, +gated below; the principle — user-gated ratification with a contagious, +non-decaying qualifier — is what is ratified. + +## 3. The panel never moves standing — CARVE-OUT + +**RATIFIED July 20, 2026 as principle. This ratifies the principle and +authorizes NO code removal.** + +The panel **emits signed findings; the user gates whether standing +moves, in both directions**: + +- a claim the facts do not reach → **user gates** (an unverifiable + belief, or an unverifiable doubt / skeptical lens — both recorded as + the user's, never ratified by the panel); +- a claim the facts refute → **the panel reports; the user gates** the + demotion. The engine has no standing to overrule the user about the + user's own domain (the Sieve HALTed engine auto-demotion on all three + lenses, DOUBTS_WORKSPACE game-8 record). + +**Consequence, and the carve-out.** If the panel never moves standing, +the promotion machinery reduces to **a findings recorder plus a user +gate**, and every disposition in the JUDGE_COMPOSITION_GAME §6 grammar +that *acts* (promote, merit-refuse) is really a user act the engine +records. **That reduction removes shipped engine surface.** This record +ratifies the *principle* that the panel is a recorder-plus-gate. It does +**not** authorize deleting or rewriting any shipped disposition code: +that is a bounded build under the usual authorization (owner dated +entry + drills + the paid-queue gate where a live run is involved). +Ratified principle; unbuilt reduction. + +## 4. Claim modes are a first vocabulary, not a primitive + +**RATIFIED July 20, 2026 as a reclassification.** + +The six claim modes (`fact | inference | prediction | value | belief | +experience`) are **a useful first vocabulary** — the same status +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §1 records for +S10's eleven judges (collaborator statement, owner-ratified). They are +**not** a validated primitive partition of assertion-space. The +provenance clarification obtained for the judges in July 2026 was never +obtained for the modes; the house assumed, then pinned the assumption +three ways (the three-way parity pins, +[`PRIMITIVE_ENCODING_AUDIT.md`](PRIMITIVE_ENCODING_AUDIT.md) finding 5). + +The primitive that replaces them is not a better list — it is the +**standing axis of §1 plus the applicability-by-locus mechanism** (a +claim's evidence locus; a seat's reachable locus; applicability = +non-empty intersection; DOUBTS_WORKSPACE §12.2). The applicability gate +currently keys on the six modes (`judge_panel.ts:464`); **re-deriving it +onto locus intersection is a build item**, not performed by this record. + +## 5. What is ratified, and what remains gated + +**Ratified (principle / direction):** the target function (§0); the +signed-ternary standing model (§1); user-gated ratification and the meet +rule (§2); the panel-never-moves-standing principle (§3); the +reclassification of claim modes as illustrative (§4). + +**NOT ratified here — each a separately gated bounded build:** + +- the address/hash-kind stamp layout (§2); +- the reduction of the promotion machinery to recorder-plus-gate, + including any code removal (§3); +- the re-derivation of the applicability gate onto locus intersection + (§4); +- anything requiring a **live** (paid) judge run, which stays behind the + paid-queue gate (owner dated re-opening + per-run approval under the + ≤$5 cap). + +**Correct ≠ reachable, and correct ≠ built.** A green suite proves the +first only; ratifying the principle authorizes neither the build nor the +run. + +## 6. Relationship to the records this extends + +- [`RECONCILIATION.md`](RECONCILIATION.md) — its verdict model + (`clean | drawback | abstain`) becomes the signed delta of §1; its + merit-refusal disposition is superseded by §2's user-gated + ratification. A dated pointer is recorded there; the enforcement + tables (§5.1/§5.2) that record shipped behavior are untouched until a + build changes the code they observe. +- [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) — its §6 + disposition grammar is reframed by §3 (the acting dispositions become + user acts the engine records); its twenty rules bind unchanged. A + dated pointer is recorded there. +- [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) — the + `-1` tier; its §14 ratification is the companion to this one. + +## Provenance + +Produced by the derivation games of July 19–20, 2026 (players: owner +Cnid, collaborator M. Murphy, Claude). The standing half was corroborated +by unpicked ledger rows and the Sieve grammar; the doubts half +(DOUBTS_WORKSPACE) was empirically tested (13/14 flat-earth corpus +rejected). Ratified by the owner in session, July 20, 2026. Amended only +by dated entry, never by silent edit. diff --git a/.claude/skills/judge-composition/references/TEST_TIME_TRAINING.md b/.claude/skills/judge-composition/references/TEST_TIME_TRAINING.md new file mode 100644 index 0000000..c3dddfb --- /dev/null +++ b/.claude/skills/judge-composition/references/TEST_TIME_TRAINING.md @@ -0,0 +1,1009 @@ +# Test-Time Training and the Sparse-Model Backend — Research-Track Record + +**Status: RESEARCH INITIATION (Session 45, July 13, 2026 — owner-directed).** +This record roadmaps a research track; it ratifies NO design decision, lands +NO machinery, and changes NO runtime byte. Every rung of the ladder in §7 is +owner-gated and enters as its own proposal with its own estimate. The record +follows the house document-first mold (rows 9/10/12: the design record +precedes any implementation), one stage earlier — this is the record that +decides whether a design record is ever warranted. + +**Origin.** The owner relayed an external collaborator's active line of work +(the same collaborator whose provenance-threading proposal became roadmap +row 9 — see `docs/COLLABORATOR_BRIEFING.md`): *increasingly optimized sparse +models in this harness*, adapted per turn by **Test-Time Training (TTT)** — +fast-weight layers trained during inference on the contents of the RLM's +context (the REPL variables), and — the collaborator's sharper claim — on the +harness's own composed meta-prompts, "increasing quality of response +overall." This record decomposes that claim, surveys the literature as of +July 2026, maps the mechanism onto Trellis's actual seams, and pre-states how +any adoption claim would be measured before a dollar or a GPU-hour is spent. + +--- + +## 1. Why this record exists + +Trellis's reasoning engine is an RLM — a root LM operating a persistent +Python REPL, with the knowledge substrate injected as live tool objects +(the MIT CSAIL formulation: Zhang, Kraska & Khattab, arXiv:2512.24601). The +root model today is `gpt-5.4-2026-03-05` behind the OpenAI API: a closed +model whose weights Trellis cannot touch. Every behavioral improvement this +project has shipped therefore lives in one of two layers: + +1. **Tooling shape** (the permanent owner direction after Session 28): + typed refusals, engine-computed addresses, gates, budgets — the + mechanism that closed transcription, laundering-T1, retrieval waste, + and the splice pathologies. +2. **Prompt text** (deprioritized after the module #2 retirement): the + composed system prompt, byte-pinned, reinforcing but never carrying the + behavior. + +TTT proposes a **third layer that Trellis has never had access to: the +model's own weights, adapted per run at inference time.** The proposal only +becomes physically possible if the backend moves (in whole or in part) to +open-weights models — which is exactly the collaborator's "increasingly +optimized sparse models" premise: modern sparse mixture-of-experts models +(the open-weights MoE class) are cheap enough to serve locally that +per-turn weight adaptation becomes an affordable, measurable lever rather +than a hypothetical. + +The reason to take this seriously is architectural fit, not fashion: the +RLM already treats context as an external environment queried through +code. TTT layers treat context as a training signal compressed into +weights. These are complementary compressions of the same thing — and the +harness's fixed, byte-pinned meta-prompt is precisely the kind of +repeated-prefix signal that fast-weight machinery amortizes well (§4.3). +The reason for caution is equally concrete: the strongest 2026 agentic +result (§3.4) found TTT gains are *stability-shaped*, not +capability-shaped, and the strongest 2026 evaluation paper found that +perplexity-style TTT wins often fail to appear as behavioral wins. Both +findings align exactly with this project's measurement doctrine, so the +ladder in §7 is built on it. + +## 2. The claim, decomposed + +The collaborator's description compresses three separable hypotheses. They +are stated here so each can be tested — or rejected — on its own. + +- **H1 (context adaptation).** Fast-weight layers trained per turn on the + REPL-resident context improve the model's use of that context — + long-context retrieval, cross-turn variable tracking, protocol + adherence over long episodes. *Literature status: supported at modest + effect sizes on long-context benchmarks (§3.2), with an explicit + behavioral caveat (§3.4). Trellis-specific status: unmeasured.* +- **H2 (meta-prompt adaptation).** Because the harness re-presents the + same composed meta-prompt bytes every turn (`RLM_SYSTEM_PROMPT` + + `TRELLIS_ADDENDUM`, byte-pinned at `COMPOSED_SYSTEM_PROMPT_SHA256`), + fast weights repeatedly trained over that prefix effectively *compile + the protocol into weights*, improving instruction-following on the + house protocol specifically. *Literature status: no direct study found; + the nearest mechanisms are prefix-state compilation (§3.3) and + fast-weight prefix processing (§3.1). This is the most original and + least evidenced hypothesis — it needs a positive control before any + belief attaches (§6).* +- **H3 (the sparse-model vehicle).** Open sparse MoE checkpoints are the + practical substrate: cheap enough to serve, open enough to adapt. + *Status: a premise about infrastructure, not a hypothesis about + behavior — but it smuggles in the real gating question, which is + whether ANY open model drives the house REPL protocol acceptably + before TTT enters the picture at all (§7 R3). No TTT×MoE unified + literature exists as of July 2026 (§3.5); expert-level adaptation is + an open question for the collaborator (§9).* + +The phrase "increasing quality of response overall" is treated throughout +this record as **an unmeasured hypothesis, not a finding.** Guardrail 8 +applies to prospective claims too: no headline until a paired arm exists. + +## 3. What the literature actually says (as of July 2026) + +Three mechanism families get called "test-time training." They differ in +where the weights live, when they update, and what infrastructure they +demand — conflating them is the most common error in secondhand accounts, +and the collaborator's "FastWeights" phrasing spans at least two of them. + +### 3.1 Family A — fast-weight layers as architecture + +The hidden state of a sequence layer IS a small model; the layer's forward +pass IS a gradient step on a self-supervised loss over the incoming +context. "Training during test time" is the layer's normal operation, and +an outer training loop learns the learning rule itself. + +- **TTT-Linear / TTT-MLP** (Sun et al., *Learning to (Learn at Test + Time): RNNs with Expressive Hidden States*, arXiv:2407.04620, ICML + 2025): the modern statement of the idea. Linear-complexity layers whose + hidden state (a linear model or 2-layer MLP) is updated by a + reconstruction loss per token; matches or exceeds Transformer and Mamba + baselines and — unlike Mamba — keeps improving past 16k context. +- **Titans** (Behrouz, Zhong & Mirrokni, Google Research, + arXiv:2501.00663, NeurIPS 2025): a neural long-term memory module + updated at test time by a surprise-metric gradient with momentum and + weight decay (forgetting); attention as short-term memory beside it; + scales past 2M-token context. **ATLAS** (arXiv:2505.23735) and the + test-time-regression unifying framework (arXiv:2501.12352) generalize + the family. +- **Large-chunk TTT / "Test-Time Training Done Right" (LaCT)** (Zhang + et al., MIT + Adobe, arXiv:2505.23884; OpenReview Tb9qAxT3xv): makes + nonlinear fast-weight updates hardware-efficient by batching updates + over extremely large chunks (2K–1M tokens) — lifting fast-weight + FLOPs utilization from <5% by orders of magnitude and scaling + nonlinear state to ~40% of model parameters. Demonstrated in three + domains: novel view synthesis (0.3B, 1M-token context, from + scratch), language modeling (760M + 3B at 32,768 context, FROM + SCRATCH — lower per-token loss at large token indices than GLA and + DeltaNet, competitive with full attention), and autoregressive video + diffusion — the one RETROFIT instance: the pretrained Wan 2.1 model + fine-tuned with all bidirectional attention REPLACED by LaCT + + sliding-window attention, quality COMPARABLE to the full-attention + baseline while enabling autoregressive generation. Authors' stated + limitation: state-based models are weaker at reasoning. **This is + the collaborator's selected mechanism — see §12.** +- **Lineage** (the collaborator's "FastWeights" vocabulary): fast weights + are Schmidhuber 1992 (*Learning to Control Fast-Weight Memories*) and + Ba et al. 2016 (*Using Fast Weights to Attend to the Recent Past*, + arXiv:1610.06258); Schlag, Irie & Schmidhuber 2021 showed linear + attention IS a fast-weight programmer (arXiv:2102.11174) — the formal + bridge explaining why in-context learning and fast-weight adaptation + are siblings. + +**Relevance to Trellis:** Family A requires the backend model to HAVE such +layers — either trained with them or retrofitted (the 2025 video result, +arXiv:2504.05298, grafted TTT layers onto a frozen pretrained DiT). Trellis +cannot add Family A to an API model. This family becomes available only at +or after §7 R3 (open-weights serving), and only if a checkpoint with these +layers exists or a retrofit is funded. + +### 3.2 Family B — per-instance adaptation of pretrained weights + +An ordinary pretrained model; an explicit optimizer step (usually LoRA or +rank-constrained fast weights) at inference time, on data derived from the +test input; weights discarded afterward. This is the family that works on +open checkpoints TODAY and the one every 2026 agentic result uses. + +- **TTT for ARC** (Akyürek et al., *The Surprising Effectiveness of + Test-Time Training for Abstract Reasoning*, arXiv:2411.07279): per-task + LoRA adapters trained at test time on augmented demonstrations; up to + 6× accuracy over the fine-tuned base; 53% on ARC public with an 8B + model. The canonical evidence that per-instance gradient steps buy real + capability on the right task shape. +- **TTT on nearest neighbors** (Hardt & Sun, arXiv:2305.18466, ICLR + 2024): fine-tune briefly on retrieved neighbors of the test input. + Directly suggestive for Trellis: the retrieval substrate could FEED the + adaptation data path — with all the provenance questions §5 raises. +- **TTT-NTP** (Ouyang, Cai & Hu, *Test-Time Training with Next-Token + Prediction*, arXiv:2606.21803, June 2026): drop-in fast weights at MLP + down-projections, chunk-parallel rank-one updates tied to the native + next-token loss; works on released checkpoints (Llama-3.1-8B, + Mistral-7B, Qwen3 series); +3–4 points on RULER 4k–32k, +3.7–5.6 on + LongBench-v2, general knowledge preserved. The current best evidence + that fast-weight adaptation is deployable on open models without + architectural surgery. +- **Self-guided TTT for long context** (arXiv:2607.09415, July 2026): the + model selects relevant spans before adapting on them — TTT with a + retrieval step in front, again adjacent to Trellis's shape. + +### 3.3 Family C — compiled-state cousins (no per-turn gradient) + +- **Cartridges / self-study** (arXiv:2506.06266): train a compact + KV-like state per corpus OFFLINE, reuse it at inference — amortized + context rather than per-turn training. The nearest existing mechanism + to H2's "compile the meta-prompt" reading. +- **SEAL** (arXiv:2506.10943): the model writes its own finetuning data + and applies persistent self-edits — adjacent but PERSISTENT, which + places it outside this track's per-run-ephemeral scope (§5.3). +- **Transformer²** (arXiv:2501.06252): inference-time expert-vector + selection over SVD components — adaptation without test-time gradients. + +### 3.4 The two 2026 results that most constrain this track + +1. **Agentic TTT** (*No Time Like the Present: Agentic Test-Time Training + for LLM Agents*, arXiv:2607.03441, July 2026): continuous in-episode + LoRA updates for multi-turn agents (vLLM runtime-LoRA serving), with + token-level loss reweighting to stop the feedback loop where each + update changes the policy that generates the next batch of training + text. Gains: up to +5.0 ALFWorld / +4.9 SWE-bench Lite at 1.9× serving + cost — and the authors' own characterization is that aTTT **preserves + existing competence over long trajectories rather than teaching new + abilities.** For Trellis this is the most load-bearing external fact: + the realistic H1 payoff is *protocol-adherence stability over long + REPL episodes*, a quantity the harness already counts + (`TRELLIS_PROTOCOL_VIOLATION`, answer-channel compliance, criterion + items in every measured run). +2. **Beyond Perplexity** (arXiv:2607.00368, July 2026): a behavioral + evaluation framework for TTT deployment-memory claims; finds that + perplexity improvements from TTT frequently fail to appear as + behavioral ability to USE the newly absorbed information. This is the + house measurement doctrine stated independently: a TTT arm must be + judged on task behavior with pre-stated criteria, never on loss + curves. §6 adopts it explicitly. + +### 3.5 What was NOT found + +No unified TTT×sparse-MoE literature (expert-level fast weights, routed +adaptation) as of July 2026 — the intersection is the collaborator's +research premise, not an established result, and §9 asks them for their +formulation. No direct study of fast-weight adaptation to a fixed +harness meta-prompt (H2) was found either; H2 is genuinely open. + +## 4. What TTT would mean inside Trellis — the seams, named + +### 4.1 The backend seam today + +The model backend is hardcoded at exactly the places an R2 audit must +census (initial grep, to be completed by R2): + +- `src/rlm/trellis_agent.py` passes + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` to the rlms + scaffold at both construction sites (research mode and author mode), + and constructs a direct `openai.OpenAI()` client for the checker-model + path. The rlms library (rlms==0.1.3, pinned) owns the actual API + transport; **whether it exposes a base-URL/backend override without + library modification is UNKNOWN and is R2's first question** — + guardrail: no rlms modifications, so if it does not, the serving layer + must present an OpenAI-compatible endpoint (vLLM and SGLang both do; + the aTTT paper's serving stack is vLLM's runtime-LoRA API, which is + encouraging for R4's feasibility). +- The worker-side completions (extraction, entailment judge, sweeps) have + their own client constructions and pricing constants + (gpt-5.4 $2.50/M in, $10/M out appears in runner spend gates) — R2 + censuses these; nothing here assumes they move. **A split backend + (open model for the RLM root, API model for extraction/judging) is a + legitimate intermediate state** and probably the first real + configuration. + +### 4.2 The embedding coupling — a substrate-identity trap named early + +`vector_search` similarity runs against STORED embeddings: +`src/config/schema.ts` pins `embedding vector(1536)` with an HNSW index, +and `search_ast_nodes` orders by distance to a query embedding produced by +the SAME embedder family. Swapping the embedding model is therefore NOT a +config change: stored embeddings and query embeddings must come from the +same space, the schema pins the dimension, and a different embedder +invalidates every stored vector (a re-embed of the full live substrate, at +cost, plus a schema migration if dimensions differ). **The completion +backend and the embedding backend are separable decisions.** The cheap, +sane first configuration keeps the OpenAI embedder while the completion +backend moves. If the embedder ever moves, that is a substrate-identity +event in the Session 38 grammar-pin sense: recorded, owner-visible, +re-measured (the eight pinned seam queries are the standing instrument — +they are embedder-sensitive by construction). + +### 4.3 The meta-prompt prefix and the byte pins (H2, mechanically) + +Every research run presents the same composed prompt prefix, byte-pinned +(`COMPOSED_SYSTEM_PROMPT_SHA256 = 6183de3a…ed50` since the Session 51 +re-pin — `scripts/test_modules.py` is authoritative; the pin moves only +with witting kernel changes). Two consequences if the backend ever carries +fast-weight machinery: + +1. **Determinism of the prefix trajectory.** A fast-weight layer's state + after processing a FIXED prefix is a pure function of (checkpoint + hash, TTT config, prefix bytes). The prefix-adapted state can be + computed once and snapshotted — H2's "optimizes the response to our + internal meta-prompts" becomes, concretely, a **prefix fast-state + cache** whose natural cache key is exactly the composed-prompt sha256 + the module registry already maintains. The house byte-pin discipline, + built for prompt integrity, is coincidentally the exact cache-key + discipline this mechanism needs. (Family C's cartridges are the same + idea with offline compilation.) This is an observed architectural + synergy, NOT a promised speedup — R5 measures or drops it. +2. **The pins become load-bearing for a new reason.** Today a silent + prompt-byte drift breaks a hash check; under a prefix fast-state + cache it would also silently invalidate (or worse, mis-serve) an + adapted state. The existing rule — pins move only wittingly, both + recomputed in the same commit — already covers this; the R5 design + record would add the checkpoint hash and TTT config to the key. + +### 4.4 Per-run state semantics + +The house per-run doctrine transfers wholesale: the Session 30 retrieval +set is "per run = per process, monotone, never parked." Fast weights get +the same shape — **per-run ephemeral, reset at process start, never +serialized, never parked, never seeded across runs.** In the multi-turn +REPL, each turn re-presents the transcript, so a stateless serving backend +re-derives the fast state from the full prefix each turn; any within-run +state carry is a serving optimization, not a semantics change. Cross-run +persistence of adapted weights (the SEAL shape) would be a +capability-promotion event — Tier-3-to-somewhere — and is explicitly OUT +of this track's scope; if it is ever wanted it enters through its own +design record with its own gate, exactly as promotion did. + +## 5. Trust-model analysis + +### 5.1 Fast weights have no provenance standing + +A fast-weight state is derived, ephemeral, and untraceable to specific +source bytes in the substrate sense — it is a compressed function of +everything the run saw. It therefore gets the Tier-3 treatment by +definition: **zero provenance standing, structurally incapable of minting +citations.** Nothing about weight adaptation touches what may be written +to the graph: writes still flow through `write_derived_insight`'s +three-layer enforcement (format → existence → retrieval membership), and +the cited addresses still have to be in the run's retrieval set. + +### 5.2 The gates are model-agnostic by construction — the designed-in strength + +Every enforcement mechanism this project built lives ENGINE-SIDE, in the +tool layer and the write path, not in the model: the Session 14 write +path, the Session 30 retrieval set, the Session 31 membership gate, the +Session 32 sampled detector, the Session 33 dedup/budgets, the Session 41 +guarded splice family. **A backend swap — dense to sparse, API to local, +static to TTT — changes NONE of them.** This is not luck; it is the +tooling-shape doctrine paying out: because no behavioral guarantee was +ever entrusted to the model, no behavioral guarantee is lost when the +model changes. The trust model's answer to "can we swap the model?" is +"the trust model never depended on which model." + +### 5.3 The threats a TTT backend adds (named now, measured later) + +1. **Injection amplification.** Today, adversarial bytes in retrieved + content influence one completion. Under TTT they also influence the + WEIGHTS that process every subsequent token of the run — retrieved + content becomes training data mid-flight. The existing containment + story (bounded tool surfaces, typed refusals, the write gates, sampled + entailment) still holds at the action boundary, and per-run reset + bounds the blast radius to one run. But the T2 lesson generalizes: + *what the model absorbed* is not observable the way *what the model + cited* is. Any R4 proposal must state its adaptation-data policy — + what byte sources are eligible to produce gradients (REPL-resident + retrieved blocks? tool outputs? the meta-prompt only?) — as explicitly + as the retrieval set defines citability today. +2. **Cross-run contamination.** Handled by construction if §4.4's + per-run-ephemeral rule is kept absolute. The rule is stated in this + record precisely so a future convenience ("warm-start from the last + run's adapter") is recognizable as a design change, not an + optimization. +3. **Reproducibility.** A TTT run's behavior is a function of checkpoint + hash + TTT config (rank, learning rate, chunk size, seed) + the full + input trajectory. The Session 38 doctrine transfers: **a model + checkpoint is a substrate-identity object — exact-pinned by hash, + bumped only as a recorded owner-visible event.** TTT config values are + run-stamped in telemetry (counts and config echoes, never content), + the same way arm assignment was verified per run in the Session 43 + measurement. + +## 6. Measurement doctrine applied (before any spend) + +The permanent owner direction (July 11–13, 2026) is that behavioral claims +are settled by paired measurement with pre-stated criteria, and failure +classes close by tooling shape. TTT is neither tooling shape nor prompt +text — it is a third substrate — but the acceptance discipline transfers +unchanged, and Trellis is unusually well-instrumented for it: + +- **The instruments already exist.** The `est` suite (five + sufficiency-bounded questions, truths unit-pinned) is a ready-made + paired-arm harness — it was row 10's acceptance instrument and runs + identically against any OpenAI-compatible backend. The + effective-context probe suites, the OOLONG-hard set, protocol-violation + and answer-channel counters, and the stage-2 criterion mold are all + backend-independent. +- **The positive-control duty (the Session 28 lesson, restated for TTT):** + before believing ANY TTT null OR win, build a condition where the + no-TTT arm demonstrably fails and verify TTT moves it. H1's natural + positive control is a long-horizon episode shaped like aTTT's setting + (protocol drift over many turns); H2's is a protocol-adherence task + where the base open model measurably violates the house protocol at a + known rate. *A null result is meaningless until the experiment has + demonstrated it can produce a positive one* — the A/B eval's + meta-lesson, verbatim. +- **Behavioral, never perplexity** (arXiv:2607.00368 adopted): every + criterion item is a task-behavior count (correctness, violations, + refusals handled, tokens, dollars/GPU-minutes) — loss curves and + perplexity may be RECORDED but never satisfy a criterion. +- **Counts and correctness together** (guardrail 4): a TTT arm that cuts + tokens but drops correctness FAILS; one that lifts correctness at 1.9× + serving cost reports both numbers. + +## 7. The rung ladder (each rung owner-gated, propose-with-estimate) + +The ladder is sequenced so every rung is cheap to refuse and no rung +assumes a later one. R2 is the only rung a session can execute without new +infrastructure or budget beyond its own time. + +- **R1 — collaborator exchange (zero-paid, owner-mediated).** Deliver + this record and §9's questions to the collaborator through the owner + (the briefing's five-line proposal frame). Their formulation of the + TTT×sparse intersection shapes R4's arms. No session dependency — + proceeds in parallel with everything. +- **R2 — the backend-seam audit (zero-paid; the next actionable rung).** + A read-only census + design record: every site that assumes the OpenAI + transport, the gpt-5.4 model id, its pricing, or its token accounting + (`trellis_agent.py` construction sites, the direct client + constructions, worker completions, runner spend gates, telemetry + parsers); whether rlms==0.1.3 admits a base-URL override WITHOUT + library modification (guardrail: no rlms mods — if not, the seam is an + OpenAI-compatible serving endpoint, full stop); the embedding-coupling + boundary (§4.2) stated as a non-goal; the split-backend configuration + (§4.1) designed as config, refusal-typed, defaulting to today's exact + behavior byte-for-byte. Output: a design record in this file's §12 (or + its own file if it outgrows this one) + NO implementation until the + owner separately approves one. +- **R3 — the open-sparse baseline (paid: GPU or hosted-endpoint spend; + needs R2's record).** Serve ONE owner-chosen open sparse checkpoint + (exact-pinned by hash) behind an OpenAI-compatible endpoint; run the + est suite + a protocol-adherence block against it, paired against a + same-day gpt-5.4 arm. **The gating question is R3's, not R4's: can an + open sparse model drive the house REPL protocol at an acceptable + violation rate at all?** If R3 fails its pre-stated criterion, the + track PAUSES at a recorded finding — TTT on a model that cannot drive + the protocol is measurement noise. (R3 is also independently valuable: + it prices the API-cost exit for ordinary runs.) +- **R4 — the paired TTT arm (paid; needs R3 PASS).** The same checkpoint + with a Family-B mechanism (aTTT-style in-episode LoRA or + TTT-NTP-style fast weights — R1's exchange picks), same instruments, + TTT on/off paired, adaptation-data policy pre-stated (§5.3.1), + per-run-ephemeral verified in telemetry both directions (the + Session 43 arm-verification mold). Criterion pre-stated in the R4 + proposal; the H1 expectation calibrated by §3.4 (stability-shaped, not + capability-shaped). +- **R5 — the meta-prompt fast-state measurement (paid; needs R4 to have + produced a mechanism worth keeping).** H2 isolated: prefix fast-state + compiled over the composed prompt (cache key = composed-prompt sha256 + + checkpoint hash + TTT config, §4.3), measured on protocol-adherence + deltas specifically. If R4 died, R5 dies with it — H2 is not reachable + by API. + +**Cost doctrine.** Local serving spends GPU-hours, not per-token dollars. +The standing ≤$5/run cap re-expresses as an owner-set per-run compute +budget stated in the R3/R4 proposals (estimate before, actuals after, in +the roadmap §5 entry — unchanged ceremony). Hosted open-model endpoints +(per-token) stay under the $5 cap as-is. + +## 8. Honest scope — what this record does NOT claim + +- **No TTT is possible on the current backend.** gpt-5.4 is an API model; + nothing in this track changes today's runtime, and no runtime byte + moved in the session that wrote this record. +- **"Increases quality of response overall" is a hypothesis** (H1+H2), + not a finding — and the best current external evidence (§3.4) predicts + the honest win is *stability over long episodes*, at ~2× serving cost, + not a general quality lift. If the measurements come back + stability-only, that is the finding this record's ladder was built to + produce, and it gets reported at exactly that size. +- **H2 has no direct literature support** — it is the collaborator's + conjecture plus an architectural synergy observation (§4.3). It is + listed last in the ladder for that reason. +- **The sparse premise is not evaluated here.** Whether optimized sparse + checkpoints are the right vehicle is R3's empirical question and the + collaborator's expertise; this record maps the harness side only. +- **This record makes no promise that the track proceeds.** If the owner + never gates R2 open, this file is a complete, self-contained account of + why not-yet — which is a legitimate steady state. + +## 9. Questions for the collaborator (via the owner; the briefing's frame) + +1. **Mechanism selection.** For a multi-turn REPL agent with a fixed + ~10k-token protocol prefix and run-resident retrieved context: which + concrete mechanism do you have in mind — architectural fast-weight + layers (TTT-Linear/Titans class, needs a trained-with-TTT + checkpoint), in-episode LoRA (aTTT class, works on any open + checkpoint via runtime-LoRA serving), or drop-in fast weights at MLP + projections (TTT-NTP class)? Our R4 arms depend on this choice. +2. **The sparse intersection.** "Increasingly optimized sparse models" — + is the sparsity doing WORK in your formulation (expert-level + adaptation, routed fast weights — a literature we could not find as + of July 2026), or is it the economics (open MoE = cheap serving) with + TTT orthogonal? If the former: what does a positive control for + expert-level adaptation look like? +3. **The meta-prompt claim (H2).** What is the mechanism by which + fast-weight adaptation over a FIXED prefix improves responses beyond + what the frozen model already extracts from attending to that prefix? + A gradient step over bytes the model has fully attended to is not + obviously additive — is the claim about effective capacity, about + depth-of-processing, or about something empirical you have observed? + A failing case we can reproduce (your five-line frame's "Failure it + closes") would move this from conjecture to rung. +4. **The adaptation-data policy (§5.3).** In your setup, what byte + sources are eligible to produce gradients at test time? Our trust + model needs this stated as precisely as the retrieval set defines + citability — retrieved substrate blocks, tool outputs, the prefix + only, or everything in the REPL? + +## 10. Reading list (dependency order, identifiers verified July 13, 2026) + +| # | work | why it matters here | +|---|---|---| +| 1 | Zhang, Kraska & Khattab, *Recursive Language Models*, arXiv:2512.24601 | the formulation Trellis implements; TTT would live UNDER this; locator-verified note: [OpenCnid/recursive-language-models](https://github.com/OpenCnid/recursive-language-models) | +| 2 | Sun et al., *Learning to (Learn at Test Time)*, arXiv:2407.04620 | Family A's modern statement (TTT-Linear/TTT-MLP) | +| 3 | Behrouz et al., *Titans*, arXiv:2501.00663 (+ *ATLAS*, arXiv:2505.23735) | fast-weight long-term memory at 2M+ context | +| 4 | Ba et al., arXiv:1610.06258; Schlag et al., arXiv:2102.11174 | the FastWeights lineage; attention ≈ fast-weight programming | +| 5 | Akyürek et al., arXiv:2411.07279 | Family B's capability ceiling (ARC, 6×) | +| 6 | Hardt & Sun, arXiv:2305.18466 | TTT on retrieved neighbors — the retrieval-fed variant | +| 7 | Ouyang, Cai & Hu, *TTT-NTP*, arXiv:2606.21803 | drop-in fast weights on open checkpoints (June 2026) | +| 8 | *No Time Like the Present: Agentic TTT*, arXiv:2607.03441 | the multi-turn agent result + the stability-not-capability finding | +| 9 | *Beyond Perplexity*, arXiv:2607.00368 | the behavioral-evaluation framework §6 adopts | +| 10 | *Cartridges*, arXiv:2506.06266; *SEAL*, arXiv:2506.10943 | Family C: compiled prefix state; persistent self-edits (out of scope) | +| 11 | *Self-Guided TTT*, arXiv:2607.09415; LaCT, arXiv:2505.23884 | span-selected adaptation; hardware-efficient large-chunk TTT — the §12 selected mechanism | +| 12 | Szafer et al., *Navigating the Cost-Performance Pareto Frontier of Test-Time LLM Agent Adaptation*, ICLR 2026 (OpenReview tWAnCRYMcT) | cost-performance frontier; adaptation helps reasoning not facts; rollout dominates wall-clock | +| 13 | Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633 (ICML 2025) | reports (Observation 3) LoRA mitigates forgetting more than full-parameter updates in the TTL setting; the drift-bound citation | +| 14 | Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace | workspace / Jacobian-lens; the §12.7 potential avenue; small-model reproductions | + +## 11. Interaction with standing guardrails (nothing weakened) + +- **No rlms library modifications** (guardrail 10): the backend seam, if + ever built, is config + an OpenAI-compatible endpoint, or it is not + built. +- **The write path, retrieval set, membership gate, detector, discipline, + and guarded family are untouched by anything in this track** (§5.2); + fast weights never gain provenance standing (§5.1); per-run-ephemeral + is absolute within this track (§4.4). +- **Model checkpoints and embedders are substrate-identity objects**: + exact-pinned, bumped as recorded owner-visible events (§4.2, §5.3.3); + the embedder does not move as a side effect of the completion backend + moving. +- **All spend owner-gated propose-with-estimate**; the compute-budget + re-expression (§7) changes the unit, never the ceremony. +- **Experiment flags follow the house mold**: any TTT on/off arm flag is + probe-only, off by default, byte-identical unset, stripped by + `buildAgentEnv` — exactly the `TRELLIS_EXP_*` pattern. +- **No default changes**: today's backend, prompt bytes, and pins are the + baseline every rung is measured against; a rung that lands still + changes no default without its own recorded owner decision. + +## 12. The R1 exchange — the collaborator's selection and the reliance claim (added July 13, 2026, same day) + +The owner relayed the collaborator's response to this record the same +day it was written, referring to §3.1's LaCT entry. Verbatim: + +> "This is the model we aim to use. With open weights, we can add a +> synthetic set layers that are the fast weights. Trellis can do this. +> It has provenance to check procedure. It can ensure the meta-prompts +> are followed as strongly as possible based on the data in the REPL. +> Each can be combined to ensure all meta-prompts perform as well as +> possible for output sculpting and efficiency. The research shows this +> improves base model performance. That's the claim we're relying on +> for our application." + +This answers §9 question 1 and sharpens questions 2–4. What it +settles, what it opens, and what the house doctrine requires before +the reliance claim carries weight: + +### 12.1 The selection, verified against the primary source + +LaCT (arXiv:2505.23884) was re-verified against the paper on July 13, +2026; the §3.1 entry now carries the full experimental facts. The two +that matter for the plan as stated: + +1. **"Add a synthetic set of layers that are the fast weights" is the + Wan-2.1 retrofit pattern, and it is a TRAINING JOB** — the paper's + only pretrained-model instance fine-tunes the model with the new + layers in place (attention layers replaced by LaCT + sliding-window + attention). It is not an inference-time configuration. In this + record's terms the selection is **Family A obtained by retrofit**. +2. **The retrofit result reads COMPARABLE, not improved** — quality on + par with the full-attention baseline while enabling autoregressive + generation at linear long-context cost. The paper's superiority + results are from-scratch architecture comparisons (760M/3B language + models at 32k context beating GLA and DeltaNet on long-context + per-token loss; competitive with full attention). + +### 12.2 The reliance claim, decomposed (the Session 28 discipline: a premise relied on is a premise measured) + +- **C1 — SUPPORTED.** Large-chunk fast-weight layers are + hardware-efficient (utilization lifted from <5% by orders of + magnitude; state to ~40% of parameters) and match or beat + efficient-architecture baselines on long-context tasks; the retrofit + path is feasible and quality-preserving. The *efficiency* half of + "output sculpting and efficiency" has real support. +- **C2 — EXTRAPOLATED.** "The research shows this improves base model + performance," applied to retrofitting an open LLM: LaCT does NOT + show this. Its LM results are from-scratch comparisons at ≤3B/32k + against linear-attention baselines; its one retrofit reads + comparable, not improved. The nearest direct support for + pretrained-LLM improvement is TTT-NTP (Family B, +3–4 RULER points) + and aTTT (stability-shaped, §3.4). **C2 is the load-bearing gap that + R3/R4 exist to measure** — stated here so nobody mistakes the + premise for a result. +- **C3 — UNTESTED.** "Ensure the meta-prompts are followed as strongly + as possible … output sculpting" = H2. No literature, LaCT included, + measures prompt-adherence effects of fast weights. Trellis's + instruments (protocol-violation counts, answer-channel compliance, + criterion items) are exactly the right meter; R5 — or an explicit R4 + criterion item — carries it. +- **One overlap named — then CORRECTED by the owner (same day):** the + first version of this bullet argued LaCT's long-context wins do not + apply because the RLM removes the corpus from attention. The owner's + correction, recorded: **large REPL dumps ARE long-context modeling + in practice** — the code-mediated-text discipline stops the model + *retyping* retrieved bytes, not *reading* them; printed fetch + results, block texts, code, and extraction working sets flow through + attention every turn, and the planned workload uses a substantial + share of the worker agents' context to code and extract accurately. + The architecture point survives only in narrow form (the corpus + RESIDES outside attention and is fetched selectively); the per-run + token flow is genuine long-context load, so C1's long-context + quality-and-efficiency results apply to this application directly. + §3.4's stability-shaped expectation remains the calibration for C2. +- **The authors' own limitation transfers:** state-based models are + weaker at REASONING — the capability the RLM leans on hardest (LaCT + pairs fast weights with window attention partly for this reason). + Any R3/R4 criterion must include reasoning-shaped items; the est + suite already is. + +### 12.3 What "Trellis can do this" means, precisely + +Trellis cannot train layers and acquires no training pipeline under +this track. What Trellis contributes — and why the collaboration is +shaped right: + +1. **The acceptance instrument:** backend-independent paired-arm + measurement with pre-stated criteria (§6) — the est suite, the + protocol counters, OOLONG-hard, the probe suites. +2. **Provenance-gated adaptation data** — the collaborator's "it has + provenance to check procedure," read in this record's terms: the + §5.3 adaptation-data policy can be ENFORCED by the substrate. The + fast-weight training signal can be restricted to engine-verified + LIVE blocks with the run's retrieval set as the eligibility + boundary, making *what the model absorbed* auditable the way *what + the model cited* is today — and directly bounding the §5.3 threat 1 + injection amplification. This is a design seed for the R4 proposal, + not machinery. +3. **The serving seam:** R2's audit, unchanged by this exchange. + +Division of labor recorded: the retrofit training job is +COLLABORATOR-SIDE (or its own owner-funded proposal — either way it is +not a rung of this repo's ladder); Trellis-side rungs R2→R5 are +unchanged in order. + +### 12.4 Ladder deltas from this exchange + +- **R1:** question 1 ANSWERED (LaCT). Questions 2–4 stand — and + §12.3's enforcement offer sharpens question 4 into a concrete + proposal for the collaborator: shall the adaptation-data eligibility + boundary BE the run's retrieval set? +- **R3** gains a checkpoint requirement: the baseline arm should be + the SAME open checkpoint the retrofit will start from, so R4's + comparison isolates the added layers. +- **R4** arms are now concrete: the base open checkpoint vs the same + checkpoint with trained-in large-chunk fast-weight layers, same + instruments, adaptation-data policy pre-stated. Its criterion + inherits C2 and C3 explicitly — a stability-only result is a + finding, not a failure, but it is not C2, and it gets reported at + exactly its size (guardrail 8, Session 45's version). +- No rung's gate moved: everything remains owner-approved + propose-with-estimate. + +### 12.5 The empirical decision and the reproduction landscape (added later on July 13, 2026) + +The owner's follow-up framed the undertaking as **"our own private +repro study with expansion"** and asked whether the empiricals are +worth running versus checking existing reproduction studies first. +Both were done in order; the landscape check (same day, zero-paid): + +- **LaCT is peer-reviewed:** published at ICLR 2026 (no longer just a + preprint) — confidence in C1 rises. +- **Official code exists:** github.com/a1600012888/LaCT, including + fused Triton kernels for the TTT layer — a private reproduction + starts from released code, not a reimplementation. +- **Independent groups already retrain the LM setup:** the KV-binding + analysis (arXiv:2602.21204) trains its own 760M LaCT-LLM baseline on + 100B FineWeb-Edu tokens; the mechanism has also been adopted + downstream in other domains (ZipMap, arXiv:2603.04385; elastic + spatial memory, arXiv:2604.07350). The reproduction half of the + undertaking carries good priors. +- **A reproducibility-report culture exists in the TTT space** + (e.g., arXiv:2511.16691 for TTT-on-nearest-neighbors) — but **no + external study covers C2 or C3**: nobody has published "retrofit + fast-weight layers onto an open LLM and measure whether the LLM + improves," and nobody has measured meta-prompt adherence under fast + weights at all. The expansion half is novel measurement. + +**The verdict recorded:** the empiricals are worth running, and they +are the ONLY route to C2/C3 — no amount of literature checking closes +a gap the literature has not measured. The ladder is already shaped as +exactly this study: R3 = the reproduction half on our workload (the +same-checkpoint baseline; does quality hold under the protocol), R4 = +the expansion half (C2 improvement, C3 adherence, the +provenance-gated adaptation-data policy). The house measurement +machinery — pre-stated criteria, paired arms, verdicts recorded +pass-or-fail with actuals — is a reproduction-study harness by +construction. Gates unchanged: each rung still enters as its own +owner-approved proposal. + +### 12.6 The chunking — RATIFIED (owner, July 13, 2026): phases 0–3 and the feature-class self-edit rung + +The owner ratified the following decomposition the same day, together +with the proposal that Trellis itself authors the Trellis-side code +("a prime target for Trellis editing Trellis and expanding +functionality … build this using Trellis, then we come back and +review it"). Ratification covers the SHAPE — every increment and +every paid run below still enters as its own owner-approved proposal +with its own estimate (the standing gate ceremony is untouched). + +**The new rung class this creates, defined here:** a **feature-class +self-edit increment** — a TASK-ASSIGNED functionality increment +authored by Trellis through the stage-2 harness, in the lineage of +the Session 26 W-series and stage-2 increments 1–2 (which were +assigned tasks, not discovered defects). This is DISTINCT from the +defect-class increment 3, whose never-manufacture rule is untouched: +a planted defect invalidates a discovery measurement; an assigned +feature task is not a discovery claim and manufactures nothing. +Feature-class criterion mold (assembled from the standing pieces): +the standing five items (named-file-only diff; the evidence +contract's one recorded insight through the Session 31 gate; +`stage2:check` zero findings; human `git diff` review acceptance; +spend within estimate) PLUS guarded-only (`textedit_raw_splices == +0`) PLUS the parse gate PLUS the increment's own new unit pins green. +The toolkit never touches git; every diff is human-reviewed; landing +is a human PR — "build using Trellis" means Trellis AUTHORS under the +harness, humans land. + +**The spec-before-pen rule (the grounded-authoring lesson applied):** +the seam design record is HUMAN-authored before any T-increment runs +— self-edit runs are only as well-posed as their task text, and the +ratified record is what task texts derive from. + +**Phase 0 — human-authored spec sessions:** +- **R2a** — the backend-seam census + the rlms verdict (Session 46's + §3 objective; read-only, zero-paid; §7 R2 items a/b). +- **R2b** — the seam design record (§7 R2 items c/d): config shape, + typed refusals, the three-way split backend (root completion / + worker completions / embedder), today's behavior as the + byte-identical default; each T-increment's scope and task-text + skeleton pre-stated in it. + +**Phase 1 — the Trellis-edits-Trellis T-series (feature-class +increments; each owner-gated ≤$5, one increment-record each in the +§5e/§5g mold, human-reviewed diff each; smallest first — the +executable-class ladder has never landed a run, so the first rung is +deliberately tiny):** +- **T1** — the config surface: backend config keys + validation + + typed refusals + unit pins (no call-site change). +- **T2** — `buildAgentEnv` forwarding/strip for the new config, with + its unit pins (the experiment-flag mold). +- **T3** — the `trellis_agent.py` construction-site rewire + (`backend_kwargs` from config; default byte-identical; the policy-2 + substrate already covers this file, so graph-informed editing works + today). +- **T4** — the fixture-endpoint drill: a zero-LLM stub + OpenAI-compatible server (the fixture-MCP-server precedent) proving + the byte-identical default and the seam switch. +A failed T-increment gets the increments-1/2 treatment: diagnose, +close the class mechanically, retry as its own proposal. + +**Phase 2 — measurement sessions (runs, not edits):** R3a serving +bring-up + protocol smoke; R3b the paired baseline measurement (the +reproduction half); then the R4 chunks when the collaborator's +retrofit checkpoint lands (exact-pinned): R4a checkpoint acceptance + +smoke, R4b the paired C2 measurement, R4c the C3 adherence +measurement, R4d the adaptation-data-policy record (for Family-A +layers the adaptation data IS the token stream — the policy chunk +states what enters context and how the §12.3 provenance gating +applies). + +**Phase 3 — R5** (meta-prompt fast-state, H2 isolated). + +**Dependencies named:** (1) this record lives in `docs/` — outside +extraction scope — so T-series runs cannot query the graph about the +spec; task text carries the spec verbatim (the increments-1/2 +channel) until stage-1b chunk A lands (a natural synergy, not a +prerequisite). (2) Refresh-before-use applies to every T-increment's +target area (the split-scope recipe; `src/rlm` is the policy-2 leg). + +### 12.7 External cost-performance evidence and an adaptation-behavior avenue (added July 13, 2026, same day) + +Three items logged after the §10 list was compiled, recorded here because they sharpen the R3/R4 criterion and the estimate basis; no gate moves. + +1. Cost-performance frontier (Szafer et al., ICLR 2026; OpenReview tWAnCRYMcT). A unified empirical study of test-time agent adaptation under verifiable feedback (binary correctness, unit tests), streaming evaluation scored on pre-update predictions, adaptation compute measured as wall-clock, comparing in-context memory (ExpRAG, ReMem) against in-weights GRPO (LoRA, full fine-tuning) on open reasoning models (Qwen3-8B, Olmo3-7B). Two findings bear on this track: + - Gains concentrate on tasks that need better reasoning over knowledge the model already holds, and are near-zero on tasks that need facts the model never learned. On Qwen3-8B, AIME24 rises 0.536 to 0.642 for both LoRA and full fine-tuning; AIME25 rises 0.429 to 0.500 (LoRA) and 0.464 (full fine-tuning); GPQA and MMLU-Pro show no consistent gain. This is external support for the H1 framing and against "quality of response overall," and it hardens the existing requirement that an R3/R4 criterion be scored on reasoning- and protocol-shaped items; a knowledge-recall criterion would flatline for reasons unrelated to whether TTT works. + - The backward pass is a small fraction of per-step wall-clock; forward-pass generation (rollout) dominates. Consequence for R4's propose-with-estimate: the paid estimate is a generation-token estimate, not a training-cost estimate, and LoRA versus full fine-tuning is not the cost driver (the paper attributes its slower LoRA wall-clock to an adapter merge-and-reload artifact, not an inherent cost). This sets the unit the R4 estimate is built in; it moves no gate. + +2. LoRA and catastrophic forgetting (Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633, ICML 2025). The paper reports (its Observation 3) that LoRA mitigates catastrophic forgetting more effectively than full-parameter updates in the test-time-learning setting, and adopts LoRA for its test-time updates on that basis. Recorded as complementary to item 1, not conflated with it: the cost-Pareto study does not measure forgetting (it defers retention to future work), so the drift-bound property rests on this citation alone, and on that paper's own TTL-setting observation rather than an independent head-to-head. If an R4 arm is instantiated, this is the citation behind preferring a low-rank adapter as the retention-bounding choice. + +3. Workspace manipulation as a potential avenue of investigation (not a rung). The global-workspace / Jacobian-lens result (Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace, July 6 2026) identifies a small, causally-privileged subspace that a residual-stream read can inspect; the article's own experiments are on Claude models only. What makes it an avenue for a track that can only instrument open checkpoints is the separate tooling: Anthropic released the reference implementation `anthropics/jacobian-lens` (Apache 2.0), which fits the lens on open-weight decoders, and independent third-party replications on small open models exist (e.g. github.com/tao-hpu/jspace-replication, github.com/solarkyle/jspace, spanning GPT-2 124M through Qwen3 and Gemma-3 sizes). Reproduction is partial and mixed: the lens read-out reproduces and beats a logit-lens baseline, while some higher-order effects (e.g. hidden-intermediate multi-hop) do not reproduce at the smallest scales. The possible avenue: use that instrument to probe, and perhaps manipulate, the subspace to strengthen meta-prompt adherence, i.e. H2's mechanism approached through measurement rather than fast weights. Recorded as an avenue only; out of scope for R2 through R5, no criterion attached, no claim, its viability explicitly gated on the still-partial open-checkpoint reproducibility, and subject to the same paired-arm and owner-gated discipline as everything else here should it ever be taken up. **Probe-sensitivity caveat:** a probe that reads *no effect* is informative only once a positive control has shown the probe can detect the effect it seeks — otherwise "no detectable effect" is a blind instrument, not evidence of absence (the positive-control duty, §6; the `self-play` skill's discipline 6, which learned this the hard way when a maximal-strength probe failed to fire across escalating designs). + +No gate moved; no default changed; no TTT claim attaches without a paired arm. + +## 13. R2a — the backend-seam census and the rlms verdict (Session 46, July 13, 2026) + +Rung R2a executed as ratified (§12.6 Phase 0): a READ-ONLY census, +zero paid spend, zero code bytes moved. Method: grep-driven sweep of +`src/rlm/`, `src/workers/`, `src/core/`, `src/config/`, and +`scripts/` for transport constructions, model-id literals, pricing +constants, token accounting, and embedding calls (every +`chat.completions.create` and `embeddings.create` site in the tree is +disposed below), plus a read-only inspection of the installed +`rlms==0.1.3` package (import name `rlm`, site-packages; guardrail 10 +respected — nothing modified). The seam design built on this census +is R2b's, the next session. + +### 13.1 The rlms verdict — YES, with quoted evidence + +**rlms==0.1.3 admits a base-URL/backend override WITHOUT library +modification.** The evidence, from the installed package: + +1. `rlm/core/rlm.py` — the constructor's first two parameters: + `RLM(backend: ClientBackend = "openai", backend_kwargs: dict[str, + Any] | None = None, ...)`. Trellis today passes only + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` and takes + the `"openai"` default backend. +2. `rlm/clients/__init__.py::get_client` routes eight backends: + `['openai', 'vllm', 'portkey', 'openrouter', 'anthropic', + 'azure_openai', 'gemini', 'vercel']`. The `vllm` arm is the + OpenAI client with a mandatory endpoint: it asserts + `"base_url is required to be set to local vLLM server address + for vLLM"` and then constructs the same `OpenAIClient`. +3. `rlm/clients/openai.py::OpenAIClient.__init__(self, api_key=None, + model_name=None, base_url=None, sampling_args=None, **kwargs)` — + `base_url` is a FIRST-CLASS constructor parameter, passed straight + into `openai.OpenAI(**client_kwargs)`. The class docstring says it + plainly: "LM Client for running models with the OpenAI API. Works + with vLLM as well." +4. Sub-call separability exists in the library itself: + `other_backends`/`other_backend_kwargs` (exactly one additional + backend supported) lets depth-1 sub-calls run a DIFFERENT + backend from the root — relevant to R4 arm design, unused today. + +**The seam call is therefore additive kwargs at the two existing +construction sites** (T3's exact scope): +`RLM(backend="openai"|"vllm", backend_kwargs={"model_name": ..., +"base_url": ..., "api_key": ...})`. No rlms byte moves. + +**Recorded caveats the T-series and R3 must respect:** + +- **The usage requirement (the one hard compatibility constraint + beyond chat-completions shape):** `OpenAIClient._track_cost` + RAISES `ValueError("No usage data received. Tracking tokens not + possible.")` when a completion response lacks `usage`. Any serving + endpoint must return usage on non-streaming completions (vLLM does + by default). The R3a smoke test asserts this before anything else. +- **Token/context coupling is soft:** `rlm/utils/token_utils.py` + keys context limits and tokenizers by model name with safe + fallbacks (unknown model → 128,000-token default; tiktoken → + `cl100k_base` → chars/4). Consulted only under `compaction=True`, + which Trellis never sets. Non-blocking. +- **API-key resolution:** known base URLs map to their own env keys + (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`, `AI_GATEWAY_API_KEY`, + `PRIME_API_KEY`, read at import time); an unrecognized/local + base_url leaves `api_key=None`, which the openai SDK resolves from + `OPENAI_API_KEY` env — a local endpoint typically wants an explicit + dummy `api_key` kwarg so runs do not depend on an unrelated real + key being present. +- **rlms calls `load_dotenv()` at import** (both + `rlm/clients/openai.py` and `rlm/clients/__init__.py`): a `.env` + file in the spawned agent's working directory is read into its + environment. An unmanaged credential input channel, recorded here + for R2b's forwarding design. + +### 13.2 The census + +Legend: "moves?" = does the site have to change (or change meaning) +when the completion backend moves. Classes ordered by seam relevance. + +**Class 1 — root RLM completion (the seam; T3 rewires exactly these).** + +| Site | Assumption | Moves? | Pinned by | +|---|---|---|---| +| `src/rlm/trellis_agent.py:353` (author mode) | `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}`; backend defaults to `"openai"`; transport+key from ambient env | YES — T3 | No direct pin (paid-run surface; `test:rlm-sandbox` stubs the `openai` module) | +| `src/rlm/trellis_agent.py:589` (research mode) | same | YES — T3 | same | +| `src/rlm/trellis_agent.py:97,111` (`make_entailment_check`) | direct `openai.OpenAI()` + hardcoded model literal; constructed only under `TRELLIS_CITATION_ENTAIL=1` (experimental) | YES if the checker is kept; R2b decides whether it follows the seam or stays a frozen instrument | none | +| `scripts/probe_workspace_lineage.py:157`, `scripts/probe_workspace_paired.py:89` | same `backend_kwargs` mold | NO — frozen measurement instruments; retrofitting them would invalidate comparability with their recorded runs | recorded here | + +**Class 2 — worker/engine completions (model id ALREADY +config-shaped; only the transport is assumed).** + +The model id routes through ONE seam today: `EXTRACTION_MODEL` +(`src/config/index.ts:109`, zod default `'gpt-5.4-2026-03-05'`) → +`config.llm.extractionModel` (`index.ts:359`). Consumers: +`extraction_worker.ts:77`, `supervisor_worker.ts:76`, +`verification.ts:217` (`makeOpenAIClassifier`), +`entailment_detection.ts:208` (`makeOpenAIEntailmentJudge`), +`alias_resolution.ts:199` (`makeOpenAIAdjudicator`), +`decision_source.ts:51` (`makeOpenAIDecisionSource`), +`resolution_worker.ts:50,65`, `agent_worker.ts:188` + +`verification_worker.ts:79,135` (metric labels), +`scripts/resolve_sweep.ts:67`. **A worker-side model change is an +env-var change today; no code moves.** The transport is zero-arg +`new OpenAI()` at seven sites (`extraction_worker.ts:26`, +`supervisor_worker.ts:25`, `verification.ts:220`, +`entailment_detection.ts:211`, `alias_resolution.ts:202`, +`decision_source.ts:54`, `api/server.ts:263`) — SDK-default +transport, see §13.3. `parseLlmResponse` at the consumption boundary +is model-agnostic by construction (guardrail 7 holds under any +backend). + +**Class 3 — the embedder (NON-GOAL, §4.2; listed so the boundary is +explicit).** + +| Site | Call | +|---|---| +| `src/workers/extraction_worker.ts:30,193–197` | `EMBEDDING_MODEL = 'text-embedding-3-small'` literal; per-block `embeddings.create` | +| `src/rlm/trellis_tools.py:804–806` | `vector_search` query embedding, same literal | +| `src/api/server.ts:263–265` | `/retrieve` vector-fallback embedding, same literal | +| `scripts/chunking_seam_queries.ts:83–84` | the eight PINNED seam queries (standing instrument — never tuned) | +| `scripts/exp_citation_ab.ts:43,98` | experiment instrument, frozen | + +All three production embedding sites are schema-coupled +(`vector(1536)` + HNSW, `src/config/schema.ts` / +`search_ast_nodes`). The embedder does NOT move with the completion +backend; an embedder move is a substrate-identity event. §13.3 names +the one place this boundary is currently soft. + +**Class 4 — pricing constants (estimate-only by design; a backend +move re-prices them, never silently).** + +| Site | Constant | Consumers | Pinned by | +|---|---|---|---| +| `src/benchmarks/oolong/scoring.ts:13–14` | `PRICE_PER_M_INPUT = 2.5`, `PRICE_PER_M_OUTPUT = 10` ("used when the backend does not report exact cost") | `poison_drill_runner.ts`, `exp_effective_context.ts` (spend gate, lines 1628–1630), `exp_citation_ab.ts`, `exp_citation_metadata.ts` | `scoring.test.ts:132` | +| `src/core/authoring/estimate.ts:16` | `AUTHOR_EST_PRICE_PER_1K_USD = 0.02` | `author_module.ts` refuse-before-spend ceiling (line 370, `--max-spend-usd`) | `estimate.test.ts` | + +These gates bound OPENAI spend. An R3 serving arm prices in +GPU-hours or hosted per-token dollars per the §7 cost doctrine — its +proposal restates cost in those units rather than stretching these +constants. + +**Class 5 — token accounting (moves cleanly; one recorded +asymmetry).** + +- Python: the telemetry payload's `input_tokens` / `output_tokens` / + `reported_cost_usd` come from rlms's `UsageSummary`; `model_usage` + is `usage_dict["model_usage_summaries"]`, keyed BY MODEL NAME — a + new backend appears as a new key, no shape change; the Node + telemetry scanner tolerates additive fields (pinned). +- TypeScript: `llm_usage.ts` `chatUsage`/`embeddingUsage` tolerate a + MISSING `usage` block (count the call, zero tokens, never throw) — + the recorded asymmetry with rlms's `_track_cost`, which THROWS + (§13.1). Metric labels are `operation`/`model` — the model name is + already a bounded label value, so a backend change changes label + VALUES only, within the T16 house style. +- `reported_cost_usd` is `None` on plain OpenAI endpoints today + (rlms extracts cost only from OpenRouter-shaped responses); every + house spend gate uses token counts × Class-4 constants, so nothing + breaks when a new backend also reports no cost. + +**Class 6 — report stamps and prose (recorded strings; they gate +nothing and move as wording only).** `oolong_runner.ts:137`, +`update_drill_runner.ts:199`, `poison_drill_runner.ts:467` (report +`model` fields; the poison drill already stamps `'ground-truth +oracle (LLM-free)'` in rehearsal), `author_module.ts:402` +(provenance prose), the comments at `oolong/scoring.ts:11` and +`estimate.ts:8`, `exp_citation_ab.ts:44` (`CHECKER_MODEL`, frozen +experiment instrument), and `scripts/pocs/*` (`gpt-5.4-mini` +literals; PoC archive class, frozen). + +### 13.3 The unmanaged pass-through (the census's one real discovery) + +Every production client in the tree — the seven zero-arg +`new OpenAI()` constructions (Node SDK `openai@^6.45.0`), the two +Python `openai.OpenAI()` constructions, and rlms's own +`OpenAIClient` with `base_url=None` — resolves its base URL from the +SDK's ambient `OPENAI_BASE_URL` environment variable when unset. +Verified in both installed SDKs (`node_modules/openai/client.js` +line 140; site-packages `openai/_client.py` line 251). Three +consequences, recorded: + +1. **The transport is ALREADY overridable today with zero code + change** — but UNMANAGED: no config validation, no typed refusal, + no telemetry visibility, no test pin. +2. **`buildAgentEnv` (`src/workers/rlm_job.ts`) spreads `...base` + and neither deliberately forwards nor strips `OPENAI_BASE_URL`** + (`OPENAI_API_KEY` inherits the same way, by design — the agent + needs it). An `OPENAI_BASE_URL` inherited from the worker's + environment would silently redirect the child agent's root + completions, the experimental checker client, AND the + `vector_search` EMBEDDER together — exactly the coupling §4.2 + forbids (the embedder must never move as a side effect of the + completion backend moving). The worker-side clients read the same + ambient variable, so engine completions and the extraction + embedder are coupled the same way. +3. **This is not a defect today** — no environment sets the + variable, no behavior has changed, nothing is broken; it is a + designed-in SDK affordance that the house config discipline does + not yet manage. It is the precise gap the ratified T-series + closes: T1 gives backend choice a validated config surface with + typed refusals; T2 makes `buildAgentEnv` forward-or-strip it + under the experiment-flag mold (the `TRELLIS_MCP_SERVERS` + discipline); T3 passes explicit `backend_kwargs` so the child + never resolves its transport from ambient env. **R2b's design + must decide:** whether the config seam strips `OPENAI_BASE_URL` + unconditionally so backend choice is expressible ONLY through + validated config — the recommendation this census hands R2b. + +### 13.4 What R2a does not do + +No implementation, no config key, no env twin, no default change — +the seam design (config shape, typed refusals, the three-way root / +worker / embedder split, T-increment task-text skeletons, the R3 +proposal skeleton) is R2b's deliverable, human-authored +spec-before-pen per §12.6. The embedder stays a non-goal (§4.2). The +probe scripts and experiment instruments named frozen above stay +frozen. diff --git a/.claude/skills/loop-orchestrator/SKILL.md b/.claude/skills/loop-orchestrator/SKILL.md index c85bf63..23b03cb 100644 --- a/.claude/skills/loop-orchestrator/SKILL.md +++ b/.claude/skills/loop-orchestrator/SKILL.md @@ -165,7 +165,10 @@ Authored 2026-07-21 during the self-improving-loop mapping (the skill-gap cartog rank-1 proposal), installed at owner direction. Guardrail 15 honored: `prompt-engineering` and `hypershot-protocol` invoked before authoring. Subordinate to the canonical records it cites (`HARNESS_SELF_MODEL.md`, `TEST_TIME_TRAINING.md`, `STANDING_MODEL.md`, -`RECONCILIATION.md`); on any drift the record wins and this skill is corrected. Companion +`RECONCILIATION.md`); on any drift the record wins and this skill is corrected. +Those records, and `DOUBTS_WORKSPACE.md`, are mirrored byte-for-byte in +[`references/`](references/) so the skill runs with the repo absent — read by the +section a citation names; see [`references/README.md`](references/README.md). Companion proposals from the same map, **not built, owner-gated**: `loop-ledger` (version / record / rollback + diagnosis memory), a `skill-creator` update (wire measurement + live-vs-proposed regression into adjudication), and `loop-cadence` (schedule re-triggers, surface a prompt for diff --git a/.claude/skills/loop-orchestrator/references/DOUBTS_WORKSPACE.md b/.claude/skills/loop-orchestrator/references/DOUBTS_WORKSPACE.md new file mode 100644 index 0000000..083aa8d --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/DOUBTS_WORKSPACE.md @@ -0,0 +1,683 @@ +# The Doubts Workspace — Design Record + +**Status: DESIGN — PROPOSED July 20, 2026. Nothing built, nothing +authorized.** Origin: owner and collaborator direction (Cnid and +M. Murphy), relayed in session, following the derivation game recorded +at [`PRIMITIVE_ENCODING_AUDIT.md`](../product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md). +The brief, collaborator's words: *"a doubts workspace where +anti-composite frameworks exist… a user-and-domain-mediated +anti-constructive framework for defeating claims based on the facts."* + +Subordinate to [`WORKSPACE_AND_MODULES.md`](WORKSPACE_AND_MODULES.md) +§1's governing axioms and §4's workspace contract, which this mirrors +rather than reinvents. Where they disagree, that record wins. + +--- + +## 1. What is missing + +Defeat machinery exists today and is a **flag with a label**: +`r.contested = true`, `contestedReason = 'unsupported_citation'`, +`contestedAt`, `orphanedSourceIds` +([`entailment_detection.ts:280`](../../src/core/graph/entailment_detection.ts:280)), +plus quarantine contests on byte change. + +A doubt has no **body** (which facts defeat it — `unsupported_citation` +names a class and cites nothing), no **identity** (no address, so a +doubt cannot be cited, queried, or reasoned over), no **author** (sweep +and user assertions are indistinguishable), and no **defeasibility** +(a doubt cannot itself be doubted). + +So `-1` is currently *residual* — the absence of `+1`, plus a label. +This record makes it **constructed**: positive machinery that defeats, +grounded in facts. + +`grep -rn "doubt" src/ -i` returns nothing. The third REPL type has no +representation at all. + +## 2. The corrosion bound (keystone) + +> **A doubt may cite facts only. A doubt citing beliefs is not a doubt +> — it is a competing belief, and belongs in the beliefs workspace.** + +**Unbounded deconstruction defeats everything. Global skepticism is +free.** Any critique faculty that can ground itself in other critiques +will defeat every claim put to it, and its output carries no +information. This bound is what makes "anti-constructive" a usable +instrument rather than a solvent. + +It does three jobs at once: + +1. **Prevents skeptical collapse** — doubts cannot bootstrap from + doubts. +2. **Bounds the defeater regress structurally**, at one level. The + defeasible-reasoning literature needs a defeat-status computation + over a defeat graph; fact-grounding makes that unnecessary, because + every doubt's support chain terminates in the fact store. +3. **Makes the burden symmetric** — to doubt something you must ground + it, exactly as to promote something you must ground it. Doubt is + never cheaper than belief. + +**FALSIFIED AS WRITTEN — July 20, 2026. See §11 (analysis) and §12 +(empirical test and partial resolution).** An adversarial clean-context +analysis broke all three jobs above. The bound is retained because its +*positive-citation* requirement survives (§11's failed attack), but the +rule as stated is insufficient. The sentence that decides it: + +> §2 constrains the **standing tier** of what an objection cites, never +> the **provenance kind**, and §5 hands objections a direct path into +> the fact store. + +**Status after §12, July 20, 2026 — improved, not closed:** + +- The **relevance** gap (attack 3) is *not* a missing clause in §2. It + is handled one layer up by the applicability gate, and §2 should point + there rather than internalize it (§12.2). Resolved by architecture, + not by amendment. +- The **positive-citation core was empirically validated** against a + real corpus of naturally-occurring corrosive doubt — 13 of 14 + rejected, none admitted with a false conclusion (§12.1). +- The **bootstrap** (attack 1/2 laundering) and **cost** (attack 2 + volume) gaps remain open, with only proposed repairs (§11). + +So: nothing is built against §2 until bootstrap and cost close, but the +bound is on firmer ground than "falsified" alone conveys. + +The claim that this was "the least adjustable element of the design" is +preserved above as written, and was wrong in the direction that matters: +it was the least examined. + +## 3. Support covers; defeat searches + +Defeaters are **not** judges with an inverted sign. The composition +laws differ: + +| | Support | Defeat | +|---|---|---| +| Succeeds when | **enough** seats agree | **one** defeater lands | +| Composition law | a **cover** — total coverage, complementarity (S10 layer 5) | a **search** — reach; find the failing join | +| Shape | roughly universal | existential | + +Support spans the space; defeat penetrates it. Because the laws differ, +defeat needs its own workspace and its own composition method — this is +what earns "anti-composite frameworks," plural. + +## 4. Two defeat kinds + +Adopted from the defeasible-reasoning literature (Pollock) as **exterior +prior art**, per the collaborator's standing rule: *"exterior prior art +where permissible, derive where not via self-play."* + +- **Rebutting** — facts contradict the claim. Attacks the conclusion. +- **Undercutting** — the support chain does not transmit. The premises + may hold and the conclusion may even be true, but *this construction* + does not establish it. + +**Undercutting is the anti-composite operation**, and the system cannot +express it at all today. It attacks a *join* in the composition rather +than the claim itself. It is also what distinguishes this design from +deconstruction proper: deconstruction shows a text undermining itself on +its own terms; undercutting shows a support chain failing to carry, +judged **from the facts**. The facts are the user's and the domain's — +that is the mediation, and it is why the instrument is not a universal +solvent. + +## 5. The three fates of a doubt + +**Collaborator's formulation, recorded verbatim (July 20, 2026):** + +> "doubts expire like beliefs promote to facts! a doubt actually *can* +> be falsified! … I doubt that there are fireballs raining from the sky +> right now. That doubt may exist in the doubt workspace. However, we +> might find evidence that there is a meteorite shower. In that case, +> this doubt could technically bypass beliefs and become a fact through +> its expiry (which is technically the same as promoting it to a fact, +> unless my logic is mistaken)." + +**The conclusion is adopted: a doubt can promote directly to fact, +bypassing the beliefs workspace.** One annotation on the mechanism, +recorded beside the claim rather than folded into it (rule 15). + +**CONFIRMED July 20, 2026 — collaborator: "The three fates are +correct."** The annotation below was filed under rule 15 as a separate +artifact rather than merged into the claimant's words, and is promoted +here on the collaborator's recommendation and the owner's gate. The +verbatim formulation above is preserved unchanged; this is what rule 15 +is for in the direction that is easy to skip — a *correction* filed +beside a claim rather than over it. + +In the fireball example the doubt is *defeated*, not *verified*. What +becomes a fact is the doubt's **target** ("fireballs are raining"); the +doubt itself dies. The bypass appears because the meteorite evidence is +doubly-loaded — it supports the target *and* defeats the doubt in the +same instant. Promotion follows from the support, not from the expiry. + +The distinction is load-bearing: wiring *expiry → promote target* +promotes claims whose doubts died for unrelated reasons. Counterexample +— target "the deploy succeeded"; doubt "the logs show a 500 at 14:02" +citing a log block; the block is superseded on refresh, the doubt loses +its fact-ground and expires, and nothing whatever was learned about the +deploy. That is a laundering path of the same shape as the meet-rule +hazard. + +The case where the collaborator's claim holds exactly is +**verification**: a doubt "this citation does not support that +conclusion", once verified, makes "the citation does not support it" a +**fact** — doubt to fact with no belief stage. + +| Fate | The doubt | Its target | +|---|---|---| +| **Verified** | content promotes to **fact** | demotes | +| **Defeated** | dies | promotes **only if** the defeating evidence independently supports it | +| **Unresolved** | persists as long as its target does | unchanged | + +Symmetric with beliefs (promote / defeated / pending), which is what +makes doubts a peer tier rather than a graveyard. + +## 6. The workspace contract, mirrored + +From `WORKSPACE_AND_MODULES.md` §4: + +- **Capture is mechanical, not behavioral** (§4.1 — *"the single + biggest failure mode of prompt-convention scratchpads is reliance on + model discipline"*). Doubts must never depend on a model choosing to + record one. The mechanical sources already fire: quarantine on byte + change, the entailment sweep, refresh contests, hash-chain breaks. + **The cheapest first version of this workspace is giving those + existing findings a body** — cited facts and an origin stamp on + contests the engine already computes. Zero new model calls. +- **Identifiers structurally disjoint** (§4.2). AST hashes match + `^[0-9a-f]{64}$`; workspace segments are dashed uuids. Doubts need a + third shape, so a doubt can never be shape-confused with a fact or a + segment. §4.2 notes this class of decision cannot be retrofitted. +- **Origin-stamped.** Every doubt carries what raised it — sweep, user, + or composed defeater — and when. This is what a later user gate + reads, and what makes "the agent doubted X because Y" auditable. + +## 7. What doubts do not do + +**A doubt does not demote.** It attaches; the user gates whether +standing moves. This follows the ruling that the panel emits findings +and the user gates in both directions, and +`WORKSPACE_AND_MODULES.md` §13 (Explicit exclusions)'s *"autonomous +promotion (operator gate is absolute)."* + +One line the shipped system already draws, formalized rather than +overridden: + +- **Mechanical contest is automatic** — provenance broke, bytes + changed, the chain is dead. Quarantine does this today without a user + gate, correctly: nothing is being asserted about the world. +- **Semantic defeat is user-gated** — the claim is *wrong*. That is a + judgment about the user's domain, and the engine has no standing to + make it unilaterally. + +## 8. Composed defeaters + +A composed defeater is the anti-composite counterpart of a composed +judge: the same primitive (an orientation bound to an evidence locus), +composed per context from the user's domain, under the **search** law of +§3 rather than a cover law, and constrained by §2 to cite facts. + +**Schema-invariant (owner Cnid, July 21, 2026): a defeater is named, +defined, and instantiated with the *same schema as a judge*** — +the live judge schema (`purpose`, `claim_modes`, `select`, `orientation`, +`taxonomy`, `blind_to`, plus the ten-item anchor set) — its invariant field names +ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](../product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md) +(Layer rule), **not** `FOUR_JUDGE_BASIC_MODEL.md`, whose `hyperplane_parameters` YAML +was the program's superseded starting point (dated correction below). The +**methods and prompts change** — the search law not the cover law, an +`objection` not a verdict, the ∃ target not the ∀ cover — **but the schema +does not.** One schema, two instruments; the composition law is the +difference, and the shared schema is what lets a single composer emit +either seat from the same primitive (§3; STANDING_MODEL §1). + +Meta-prompt-generated defeater candidates are permitted and must be +tested before shipping (collaborator direction, July 20, 2026). This +sits on the **permitted** side of amended AB-8: composition, not +optimization over compositions. A metric-driven search for better +defeaters crosses into AB-8(b) and needs its own proposal. + +**Dated citation correction (July 21, 2026, owner Cnid + collaborator Matt + Claude, this +session).** §8's schema citation above previously named `FOUR_JUDGE_BASIC_MODEL.md`'s YAML, +but that S10 submission's per-seat schema is `hyperplane_parameters` (the UHE four-plane +model), **not** `select`/`taxonomy`/`blind_to` — a cross-schema mis-attribution introduced +with this paragraph (PR #155). The field names listed are the **live** schema, ratified in +`JUDGE_CONTRACT_TEMPLATE.md` (Layer rule); the citation now points there. A blind self-play +evaluation this session (two runs — a three-way schema comparison and a categorized-`select` +head-to-head, blind judge panels, `$0` paid) confirmed the direction: `taxonomy` + `blind_to` +are the stronger primitives; flat `select` beat **both** the rigid four-plane buckets *and* a +plane-categorized `select` at the per-seat level; and the four-plane structure's only plausible +remaining home is **panel-coverage composition** (a concept, untested), not a per-seat field. +The UHE four-judge model was the program's *starting point*; the schema outgrew it. See +[`FOUR_JUDGE_BASIC_MODEL.md`](../product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md)'s dated +supersession note. + +## 9. Scope — this is a critique engine + +**Owner framing (Cnid, July 20, 2026):** the feature set is useful for +**any kind of critique** — a reviewer for a professional journal, a film +critic, and so on. + +This is a scope statement, not a metaphor. The machinery is a general +critique instrument: composed defeaters searching a fact base for the +join that fails, grounded in the user's own corpus, with the corrosion +bound keeping the output informative. The domain supplies the facts; +nothing in §§2–8 is Trellis-specific. + +It is also the sharpest available test of the corrosion bound. A critic +who can ground objections only in other objections is exactly the +failure mode §2 forbids, and it is a recognizable one outside software. + +## 10. Vocabulary (GATED July 20, 2026 — owner, in session) + +One word was doing two jobs. The collaborator's test: *"synonyms are +powerful, and connotation might be a guide — is there a clear rename +path for one of them that **covers** Trellis better?"* + +**Rename the object; keep the standing.** The standing sits in a triad +whose parallelism is load-bearing and user-facing (`fact / belief / +doubt`, a held attitude beside a held attitude); the object sits in a +workflow whose *verbs* were unnamed. + +| Term | Job | +|---|---| +| **doubt** | the **standing** of a claim at `-1` | +| **objection** | the **object** that attacks a claim, cites facts (§2), and has the three fates of §5 | +| **defeater** | the composed **instrument** that searches for objections (§8) | + +The connotation carries the fates without forcing: an objection is +**sustained** (§5 verified), **overruled** (defeated), or +**outstanding** (unresolved). That vocabulary already exists in review +and criticism, which is the §9 coverage test passing — *"the reviewer's +objection was sustained"* needs no translation. It also fits the house +register, which is already juridical (contest, ratify, docket, +convocation, remand, merit-refuse). `defeater` stays as the §4 prior-art +term for the instrument, where jargon is appropriate. + +**This resolves the `contested` question.** Under this vocabulary +`contested` stops being a primitive flag and becomes **derived** — *does +this claim carry outstanding objections?* Sweeps raise objections; +re-derivation from live provenance overrules them; `contested` computes +false. The four `alias_resolution.ts` call sites need no migration, and +the result is strictly more informative: the system can be asked *which* +objection, which the boolean can never answer. + +**Learning (dated July 21, 2026 — owner Cnid, in session): a doubt is +*based on* its objection(s).** The objection is the body; the doubt is +the standing that body confers (§1); the defeater is what composes the +objection (§8). The dependency runs one direction — **objection → doubt** — +so a doubt with no surviving objection is empty, which is exactly why +`contested` is *derived from outstanding objections* above rather than +asserted. This names, as a single relation, the symmetry §15 audits: the +`-1` pole's object is the objection, and the doubt rests on it the way a +`+1` fact rests on its verified source bytes. + +## 11. Adversarial analysis of §2 (July 20, 2026) + +Run as an isolated clean-context sub-agent over this document alone, +with no access to the composer's reasoning, authorship, or +expectations. **Verdict: insufficient.** Four attacks; the first was +pre-registered by the composer before the prompt was authored (rule 11), +the other three were not predicted. + +**Attack 1's standing was downgraded the same day — see the note at the +end of this section. Attacks 2, 3 and 4 are unaffected.** + +**1. The laundered bootstrap — succeeds.** An objection cites fact `B`; +verified, its content promotes to a fact `F1` (§5); a second objection +cites `F1`, which is a fact, satisfying §2; iterate. §2's job #1 +("doubts cannot bootstrap from doubts") fails through the promotion +door. Job #2 holds *literally and vacuously* — the chain terminates in +the fact store while remaining a chain of critiques end to end. The +defeat graph §2 claimed to make unnecessary still exists; it has been +moved into the fact store with its edges erased. The operator gate +slows this without stopping it, because every local approval is +correct: each gate asks "does this citation support that conclusion?", +never the global question. + +**2. Unbounded existential search — succeeds.** §2 prices a *single* +objection and is silent on objections *per target*. Generate many legal +defeater candidates (§8 permits this), run them all, keep the one that +lands. This falsifies job #3 ("doubt is never cheaper than belief") +directly against **§3's own table**: support must satisfy a cover +(universal), defeat needs one hit (existential). §2 asserts a symmetry +that §3 denies. Whether candidate-generate-then-select is AB-8(b) +optimization or the §3 search law is genuinely ambiguous as written. + +**3. Relevance-free grounding — succeeds.** §2 requires that grounds +*be* facts; it never requires that the cited fact *bear on* the target. +Cite one fact true of every composed claim in the corpus, compose one +defeater around it, and the whole corpus computes `contested` under +§10 — no forged facts, no rule broken. Global skepticism is not free, +but it is priced at one fact citation amortized across everything, +which at scale is indistinguishable from free. + +**4. Undercuts route to the ungated branch — a determinacy gap.** +§7 discriminates on whether something "is being asserted about the +world." §4 defines undercutting as precisely the operation that asserts +nothing about the world — "the premises may hold and the conclusion may +even be true." So by §7's own criterion an undercut fires *mechanically +and ungated*. The document never says which branch it takes. **The +design's headline capability is the one its gate most plausibly +exempts.** + +**The attack that failed, and what it reveals.** Grounding an objection +in the *absence* of a fact ("nothing in the corpus establishes this +join") defeats every non-exhaustively-enumerated claim, needs no +laundering and no candidate volume — and is blocked cleanly, because +§2 demands an objection *cite* facts and an absence-grounded objection +cites zero. Repairing it by promoting "the corpus contains no fact +establishing `J`" fails too: a completeness claim over the corpus is +derived, not verified bytes, so it is a belief and §2 rejects it by +name. + +**So the bound's real strength is the *positivity* of the citation +requirement, not the standing tier it names.** That is the part to keep. + +**Repair directions — proposed, not adopted, none authorized:** + +- *Bootstrap:* distinguish world-facts from critique-derived facts and + require at least one non-critique-derived ground. This is the + hash-kind-in-the-address move a third time, reusing machinery already + accepted for the user-gated stamp and the meet rule. +- *Relevance:* require the cited fact to be reachable from the target's + own citation chain, or to contradict a member of it. Mechanical, and + it kills attack 3. +- *Cost asymmetry:* either withdraw job #3 as false, or add a + per-target objection budget. Job #3 cannot stand beside §3's table. +- *§7:* state the branch explicitly. Only provenance-mechanical breaks + (bytes changed, hash dead) plausibly belong ungated; semantic + transmission is a domain judgment even when it asserts nothing about + the world. + +**Attack 1 downgraded — July 20, 2026, same session.** A later probe +established that this run does not support attack 1 as an *independent* +finding, on the composer's own published rules: + +- **The forecast shared bytes with the evidence, not the task text.** + §5 — composer-authored, and the analyst's entire evidence universe — + already carries the mechanism (*"doubt to fact with no belief + stage"*), the hazard (*"promotes claims whose doubts died for + unrelated reasons"*), and the word: *"That is a laundering path."* + The rule-11 defence offered above was that the forecast stayed out of + the task text. Failure mode 2 of the `judge-composition` skill + answers it: **the channel moves; audit for the content, not the + location.** The analyst did not independently find a laundering path; + it read one in §5 and pointed it at §2. +- **The prediction was tautological.** §5's promotion door is a + composer-authored gate, and rule 11 strikes predictions of + composer-authored gates from calibration. The composer's + "1-for-4" tally is therefore **0-for-4**. +- **Rule 9 was not satisfied.** Composer conflict must be *externally + reviewed*, never self-absolved. One sub-agent ran, no audit seat, and + the independence claim above was made by the interested party about a + run only that party observed. + +Attack 1 is re-filed as **the composer's own unreviewed conjecture +about the composer's own keystone** — a legitimate thing to record and +a different thing from a falsification. §2 still falls, but it falls on +attacks 2, 3 and 4, which no leaked vocabulary supplied. + +## 12. Empirical validation and the two-layer resolution (July 20, 2026) + +§11 broke §2 by analysis. This section records what a live test then +established, and resolves one of the four gaps §11 opened. + +### 12.1 Stage-2 test — the fact base rejects corrosive doubt + +The question tested: *does a fact base, via the admission test, reject +naturally-occurring corrosive doubt at the per-objection level?* — not +the tautological *does the final verdict come out "sphere"*, which every +fact-grounded design produces and which therefore discriminates nothing +(rule 11). + +Construction, in order, each stage blind to the next: + +1. A **fact base** on the figure of the Earth — ~35 items across three + disjoint scopes — was compiled by three sub-agents **none of which + was told a dispute exists**, so facts were not selected to refute a + known position. Retained verbatim at + [`fixtures/doubts_workspace/earth_figure_factbase.md`](../../fixtures/doubts_workspace/earth_figure_factbase.md). +2. A **corpus of fourteen flat-earth arguments** was compiled as their + proponents actually state them. **Eleven of the fourteen cite real, + correctly-reported observations** (genuine Chicago-skyline + photographs, a correctly-derived surveying formula, the real null + results of Airy and Michelson–Morley, the actual Antarctic Treaty). + This is fact-citing corrosive doubt — the Class-B case the composer + had failed to manufacture by hand across six prior probes; the world + supplied it. +3. A **blind evaluator** applied the admission test, seeing neither the + composer's predictions nor that sufficiency was under test. + +**Result: 13 rejected, 1 admitted, and zero admitted with a false +conclusion.** The pre-committed failure condition — *≥1 corrosive +objection survives → the bound is insufficient* — was **not met**. The +composer had a disclosed stake in the opposite outcome (rule 9); the +result held against that stake, and the measurement was fixed before any +data was seen. + +**Why it held is the load-bearing lesson.** The test is a *derivation* +test — *no load-bearing step may rest on a belief or unverified +assertion* — **not** a citation test. Almost none of the 13 rejections +turned on a false citation; they turned on a broken **inferential** step +over true facts: + +- Chicago skyline — the photographs are real; *"curvature should + conceal it"* needs an unmeasured refraction coefficient. +- Eight-inches-per-mile² — the formula is correctly derived; it computes + drop below the tangent, not height concealed from an elevated + observer. +- Ring laser gyroscope — the proponents' own instrument read **15°/hr**; + the fact base gives ω = 7.292115×10⁻⁵ rad s⁻¹ = **15.04°/hr**. They + measured the rotation they were denying. + +Corrosive doubt characteristically fails at an inferential joint, and a +derivation test is precisely the instrument that catches inferential +joints. A citation test would have admitted most of these. + +### 12.2 The two-layer resolution of the relevance gap + +The one admission (scriptural firmament: *raqia / chug / four corners → +the text describes a flat earth*) is a **sound** derivation from facts +about a text — admitted correctly, true, and **irrelevant** to the +Earth's figure. §11 read this as a hole in §2. It is not a hole in §2; +it is a **layer confusion in the test**, and the composer's. + +The stage-2 test applied the admission rubric **in isolation**, to +pre-composed free-floating objections. The integrated architecture does +not present doubts that way. A doubt is produced by a **defeater composed +from primitives that discriminate the target's context** — the program's +founding thesis, and the `evidence_locus` result of the derivation games +that produced this record. Relevance is **locus intersection**: a +defeater aimed at *the Earth's figure* composes from geodetic loci; a +scriptural-textual claim's locus does not intersect them, so the defeater +either cannot be composed or can only **jurisdiction-abstain** (the +applicability gate already in the engine at `judge_panel.ts:464`). + +So the system is two layers, and each carries one job: + +| Layer | Job | Mechanism | +|---|---|---| +| **Admission** (§2) | **positivity** — is every load-bearing step a fact? | the derivation test | +| **Applicability** | **relevance** — does the doubt's locus meet the target's? | locus intersection / jurisdiction abstention | + +Together they are complete. **§2 should therefore point at the +applicability gate for relevance rather than grow a relevance clause** — +the "discrimination criterion" the composer thought he was *importing* +into §2 was never an addition to the bound; it already lived at the +applicability layer, and the isolated single-layer test could not see +it. Item 14 leaks the isolated rubric and jurisdiction-abstains in the +integrated system. + +**Standing of this resolution:** a design argument, corroborated by the +`evidence_locus` games that built this record, **not** itself exercised +by stage-2 (which tested the isolated admission layer). The applicability +gate has never been run against a composed *defeater*; that is a build +item, not a settled result. + +### 12.3 The workspace membership rule this establishes + +A doubt is admitted to the workspace only if it **survives the fact +base**. Two survivors, mapping onto §5's fates: + +- **fact-grounded** doubts that defeat a claim (sustained); and +- **unverifiable** doubts the facts do not reach — *"I doubt the game is + simple"* — which **gate to the user like a preference**, a permitted + skeptical lens, symmetric with an unverifiable belief. + +A doubt the fact base **refutes**, held anyway, is **delusion**, and is +not admitted. Stage-2 is the validation of exactly this gate: 13 of 14 +delusional doubts refused entry. *(The membership rule and the +unverifiable-lens symmetry are recorded here as they were reached in +session; they extend §5 and §7 and are owner-owed as dated additions to +those sections, not silent edits.)* + +## 13. Open items + +- **§2 relevance gap — RESOLVED (§12.2)** to the applicability layer; + §2 needs a one-line pointer there instead of a relevance clause. + Superseded as an open item. +- **§2 bootstrap and cost gaps — still open.** The proposed repairs + (§11) are not adopted and each needs its own proposal. Nothing is + built against §2 until these close. +- **§2's job #3 contradicts §3's table** and one of the two must be + withdrawn. An internal inconsistency in this record, not an open + design question. +- **§7's branch for undercuts is undetermined** — the gap is in this + record, and it exempts the capability §4 calls the headline one. +- **The §10 vocabulary** is gated by the owner (July 20, 2026) but + renames nothing until the rename lands as its own change. +- **The §12.3 membership rule and unverifiable-lens symmetry** are + owner-owed as dated additions to §5 and §7. +- Nothing here is authorized. Each mechanism is a separately gated + bounded feature and needs its own proposal before implementation. + +## 14. Ratification (dated entry — July 20, 2026, owner, in session) + +The owner ratified the doubts-workspace design as **principle and +direction**, with one part explicitly carved out because it is falsified +and one part left explicitly open. Ratification authorizes **no build**; +each mechanism remains a separately gated bounded feature (§13). +Companion: [`STANDING_MODEL.md`](../product/epistemic-support/STANDING_MODEL.md) +(the `-1` this tier holds). + +**RATIFIED as principle:** + +- **§1 — doubts are a first-class REPL type**, constructed rather than + residual. Direction ratified; the addressable-object build is gated. +- **§2 (the corrosion bound), PARTIAL — see the carve-out below.** +- **§3 — support composes as a cover, defeat as a search.** Ratified; + defeaters are never judges with an inverted sign. +- **§4 — rebutting / undercutting** as the two defeat kinds (Pollock, + exterior prior art). +- **§5 — the three fates** (verified → fact, defeated → dies, unresolved + → persists). Collaborator-confirmed; ratified as law. +- **§10 vocabulary — doubt / objection / defeater.** Now ratified as + canonical (was gated). It **renames no code** until the rename lands + as its own build; `contested` becomes a derived predicate over + outstanding objections. +- **§12.2 — the two-layer resolution.** Ratified as the architecture: + §2 carries *positivity*, the applicability gate carries *relevance*. + Its one untested flank is recorded — the applicability gate has never + run against a composed **defeater**; that is a build item, not a + settled result. +- **§12.3 — the membership rule.** A doubt enters the workspace only if + it **survives the fact base**; a fact-refuted doubt held anyway is + **delusion** and is refused. Unverifiable doubts gate to the user like + a preference, symmetric with unverifiable beliefs. Ratified as law and + hereby adopted into §5/§7 by this dated entry (the owner-owed addition + §13 named). + +**CARVE-OUT — §2 is NOT ratified as sound.** Only its +empirically-validated core is ratified: + +- **RATIFIED:** the **positive-citation requirement** — a doubt must + *cite* facts, not ground itself in absence — which survived adversarial + analysis (§11's failed attack) and was validated against a real corpus + (§12.1: 13/14 flat-earth arguments rejected, zero admitted-false, the + measurement fixed before the data and against the composer's disclosed + stake). The rule is a **derivation** test, not a citation test. +- **NOT RATIFIED / STILL OPEN:** the **bootstrap** gap (attacks 1–2 + laundering, §11) and the **cost** gap (attack 2 volume; job #3 + contradicts §3's table). The proposed repairs are not adopted. **§2 as + a complete bound is not built against until these close.** Ratifying + the bound whole would be the exact instance-promotion failure this + program guards against. + +**Evidence basis, recorded because ratification followed test.** The +positive-citation core was ratified because it *passed a blind empirical +test*, not because it was argued; the two-layer architecture because it +was *corroborated by the evidence-locus games*; the fates because the +*collaborator confirmed* them. Where an item rests on argument alone +(§12.2's untested defeater flank), that is marked, not smoothed over. + +## 15. Parity audit with the support side (dated addition — July 21, 2026, owner Cnid + Claude, in session) + +Recorded as this session's learning; **ratifies nothing new** and authorizes +no build. It consolidates the doubt-vs-fact symmetry already distributed across +the sections above and names one new gap. The audit walked ten dimensions of +the `-1` and `+1` poles around belief (`0`): + +| dimension | fact side `+1` | doubt side `-1` | parity | +|---|---|---|---| +| standing | fact | doubt | **symmetric** (§1; STANDING_MODEL §1) | +| the object it is built on | *unnamed as a single noun* | **objection** (§10) | **GAP — see below** | +| the instrument | judge | defeater | **symmetric** — one primitive (§8) | +| composition law | cover (∀) | search (∃) | **asymmetric BY DESIGN** (§3) | +| typed kinds | grounding / coherence / corroboration / audit | rebutting / undercutting | **symmetric** (§4) | +| the three fates | promote / defeated / pending | verified / defeated / unresolved | **symmetric** (§5) | +| grounding rule | provenance / source bytes | positive-citation of facts | **symmetric burden** (§2, positivity core only) | +| membership | survives the panel + gate | survives the fact base, else delusion | **symmetric** (§12.3) | +| user gate | gates promotion | gates demotion; mechanical contest auto | **symmetric** (§7; STANDING_MODEL §3) | +| build status | **built** | **proposed** (`grep doubt src/` = nothing) | **NOT BUILT** (§1) | + +**Reading:** seven dimensions symmetric (as principle), one asymmetric by +design, two open. The design asymmetry is a feature — *support covers, defeat +searches* — never a parity defect. + +**New gap — the fact side's object has no name.** §10 gave the doubt pole a +clean triad `doubt / objection / defeater`. The fact pole names its **standing** +(`fact`) and its **instrument** (`judge`), but the **object** an objection +mirrors — the fact-grounded thing that *supports* a claim — has no single noun; +it is carried implicitly by judge findings and the J3 *corroboration* role. To +make the two triads read as one, the support-side object wants a name. +**Owner-owed**, gated like the §10 rename. Candidate register (juridical, per +§10): `corroboration` (collides with the judge role), `attestation`, +`submission`. Not adopted here. + +**Resolved this session (July 21, 2026 — collaborator M. Murphy delegated the +choice, owner Cnid endorsed proceeding): the name is `affirmation`.** It is the +fact-grounded object that *affirms* a claim — the direct antonym of the +`objection` that *attacks* it — and it fills the same slot: the fact-grounded +**support object**, never the candidate. That is why `claim` and `proposal` +(floated in session) were set aside: they name the thing supported, not the +support. Collision check that decided it: `corroboration` = the J3 judge role; +`submission` = `STANDING_MODEL.md §2`'s vote; `attestation` = +`HARNESS_SELF_MODEL.md §8`'s informing surface; `warrant` = the `warranted` +adjective; `affirmation` returned zero repo hits and takes the slot cleanly. The +two triads now read as one — **affirmation / fact / judge** ↔ +**objection / doubt / defeater** — differing only by the §3 law (cover ∀ vs +search ∃). Gateable: one owner word overrides it. + +A **three-round clean-room self-play** (July 21, 2026) probed whether the label +`affirmation` biases a reasoner's grounding judgments (connotation → auto-validation). +Across clear items, humanized marginal items (iterated builder, independently +key-verified 12/12), and a rubric-stripped condition, the name showed **no detectable +output bias** — the positive control `proof` (the most auto-validating word a blind +adversary could name) never fired either, so the honest reading is **"no detectable +connotation harm," not "proven neutral"** (single-word priming sits below the detection +floor for a capable model doing explicit adjudication). A third round (Matt-directed) +spread the label across the **full connotation axis** — validating, neutral, a +counter-label (`bunk`), and a nonsense token, 12 blind trials — and every label produced +identical 8/8 verdicts, strengthening the null past the near-synonym limit of rounds 1–2. +`affirmation` **retained**; the self-play method-learnings (including *controls must span +the manipulated axis*) were written into the `self-play` skill. + +**Restated gap — build parity.** The larger asymmetry is §1's: the fact side is +built and the doubt side is not. No new claim; recorded so the audit is honest +that "symmetric" above means *as principle*, not *as shipped*. + +A visual of this audit was produced this session as a private Artifact +(current-state parity map); it is provenance, not authority, and this record +governs on any drift. diff --git a/.claude/skills/loop-orchestrator/references/HARNESS_SELF_MODEL.md b/.claude/skills/loop-orchestrator/references/HARNESS_SELF_MODEL.md new file mode 100644 index 0000000..dc07761 --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/HARNESS_SELF_MODEL.md @@ -0,0 +1,546 @@ +# The Harness Self-Model — Design Record + +*Status: PRINCIPLE ENDORSED (July 19, 2026). **WORKSTREAM B +IMPLEMENTATION AUTHORIZED — July 23, 2026** (owner, in session, on the +collaborator's proposal): §12 carries the authorization, its scope, and +its sequencing, and it supersedes this header's original +"implementation not authorized" for **Workstream B only**. **Workstream +A remains gated by §8**, as does every paid measurement. Recorded +July 19, 2026 from an owner/collaborator design exchange following the +July 18–19 REPL audit. Sibling of +[CODE_MEDIATED_TEXT.md](CODE_MEDIATED_TEXT.md) (whose §2.8 enforcement +posture this generalizes) and +[RLM_HARNESS_SCAFFOLDING.md](RLM_HARNESS_SCAFFOLDING.md) (whose §8 +correction motivated it). A concrete `llm_help` instantiation candidate for this +record's Workstream B is developed in +[SELF_DESCRIBING_SURFACES.md](SELF_DESCRIBING_SURFACES.md).* + +--- + +## 0. The principle + +> **The interior surfaces of Trellis serve, in their various functions +> and in the operation of the RLM, as free meta-prompt composition +> primitives.** + +The owner's framing: *Explainable AI, but for the AI.* When the harness +acts, it acts from a state composed of the current decision and the past +ones; the code that runs can carry the primitives for the action it is +purposed for, so the model reads an accurate account of how the system is +actually operating rather than inferring it from text authored at a +different time than the behavior. + +The collaborator's precisification, which the record adopts as the +operative statement of the guarantee: + +> **The model always gets a composed, bounded-context read of what the +> system actually expects. That composed read *is* the accurate read.** + +This corrects a false dilemma that arose in the exchange — the claim that +"accurate" implies *complete state*, which is unbounded, therefore the +guarantee must weaken to "accurate whenever the model chooses to look." +Completeness was never the requirement. A bounded composed projection can +be **fully accurate about what it covers**, and what it must cover is the +system's expectations at the decision point. Nothing about that is +partial, and the guarantee does not weaken. + +## 1. Origin + +The July 18–19, 2026 audit of the whole REPL construction found +`.claude/rules/measurement-and-reporting.md` rule 8 — *tooling shape closes a failure class; prompt text +only reinforces* — violated in three places inside the harness that +states it: an advisory `UPSUM_BUDGET`, a raw `splice()` reachable with +the guarded family merely "preferred", and task precedence taught as a +hard rule with no surface that could rule on anything. Those three were +closed the same day (RLM_HARNESS_SCAFFOLDING.md §8, STRUCTURAL_SPLICE.md +§9). This record is what the exchange *about* those fixes produced: not +three patches, but the general law they were instances of. + +Standing of the parts, recorded without possession claims +(ideas are terrain; attribution marks authority to bind, not ownership): +the surfaces-as-primitives framing and the "Explainable AI for the AI" +formulation are the owner's, who alone binds; the bounded-composed +precisification, the read counter, and the output-checking buffer are the +collaborator's proposals; the guard-derivation mechanism of §2 was +developed in the exchange and endorsed by the owner in it. + +## 2. The mechanism — the guards *are* the expectations + +The load-bearing move, and the reason this is buildable rather than +aspirational: + +> **Every refusal path in Trellis already encodes what the system expects +> of the agent. The composed read can therefore be DERIVED from the guard +> predicates themselves — the same code that refuses is the code that +> explains.** + +This satisfies the drift invariant structurally rather than by +discipline, and it is reachable specifically because Trellis is unusually +guard-dense. Existing guard sets that are already expectation sets: + +| guard | the expectation it encodes | +|---|---| +| `TrellisUpsum._validate` | a dict; four standing keys; lists of single-line strings; domain keys under cap | +| `TrellisTextEdit._resolve` | relative path; no `..`; resolves inside the real root | +| `_verify_anchor_lines` | the bytes you state you are removing are the bytes that are there | +| `TrellisAnswer.submit` | a string; non-empty; within cap; parseable; references REPL state | +| `_verify_hashes_retrieved` | every cited hash was actually retrieved this run | +| `parse_textedit_guarded_only` | one of the documented spellings, or refuse | + +### 2.1 The drift invariant (normative) + +> **The account must read the same state the behavior reads, or it is +> documentation again.** + +`guarded_only` is ONE bool that both makes `splice()` refuse *and* makes +the surface describe itself as guarded-only. The moment those become two +fields, "PREFER THE GUARDED FAMILY" returns — a prompt asserting +something the code does not do. This invariant is the whole design. + +## 3. The bijection — the testable acceptance criterion + +> **Every line in a surface's composed read maps to a guard that enforces +> it, and every guard maps to a line. Neither set has orphans.** + +This is mechanizable, and it is what makes the principle a check rather +than a preference. Its retroactive property is the evidence for it: run +against the pre-July-19 kernel, the bijection **flags all three audit +findings automatically** — `UPSUM_BUDGET` was a line with no guard, +"PREFER THE GUARDED FAMILY" was a line with no guard, task precedence was +a line with no guard. The audit found them by reading; the check finds +them by running. + +## 4. What is not guard-shaped, and the defect that exposes + +Some expectations are **protocol**, not refusal: re-read before decisive +steps, combine steps into one REPL block, rewrite `upsum` every turn. +Nothing refuses when they are violated — which is precisely why they +drift. Under §3 they must either acquire a guard or be **explicitly +marked advisory**. + +That marking matters more than it sounds, because of a defect the +principle exposes in the current kernel: + +> **The agent cannot distinguish an enforced contract from an aspiration, +> because both are written in the same voice.** + +"TURN DISCIPLINE (HARD RULE)" is backed by protocol-violation detection. +"TASK PRECEDENCE (HARD RULE)" was prose-only until July 19, 2026. +Identical typography, different reality. A read derived from guards would +label those differently *by construction* — the agent would know which +promises the system will actually keep. The point of the direction is not +that the agent receives more information; it is that the information it +receives **stops misrepresenting its own status**. + +## 5. Boundedness + +Accounts are REPL state the model queries, not output pushed into the +transcript. Pushing a complete account at every action would flood +scrollback, collide with the rlms 20,000-character per-block output cap, +and contradict the effective-context thesis the pillar exists to serve. +Per §0 this is not a weakening: the composed read is bounded *and* +complete with respect to the expectations it covers. + +Two consequences: + +1. **The read has a budget that RAISES, not a budget that is hoped for.** + The self-model gets exactly the treatment the running state just got + (`UPSUM_BUDGET` → `trellis_upsum.commit`). A bound enforced by + authorial discipline is the very class this record exists to close; + applying it to itself is not decoration, it is the first test of + whether the law is real. +2. **Composition must be total.** "Always" means every action path + produces a read. A path with no composition gives the agent silent + absence — the same failure class as the audit's findings, one level + up. The design owes a default and a check that every surface × action + pair composes. + +## 6. The trace — one object, two faces + +The collaborator's read counter and buffer, and the owner's +"current decision plus past decisions", are the same object seen from two +directions: + +- **The read face (buffer).** What the engine SERVED this run. +- **The action face (decision log).** What the harness DID this run. + +**This is a generalization of live architecture, not a new subsystem.** +`_retrieved_addresses` (`src/rlm/trellis_tools.py`) already is the read +buffer for exactly one surface: it records AST hashes served by reads and +searches, and the Session 31/35 write gate consumes it to refuse citation +of anything never retrieved. + +**Design decision (proposed): the buffer records addresses and digests, +never bytes.** Every surface already has an address space — Postgres → +AST hashes; workspace and MCP → segment ids; textedit → +`(relpath, digest, line-range)`; task → the uuid span. A uniform +`{surface, address, digest, span, turn}` record makes the check a +re-fetch from the content-addressed substrate rather than a second copy +of the corpus, and it is the uniform type over heterogeneous surfaces +that makes the function-space enumerable at all. + +### 6.1 Honest scope of the output check + +The buffer catches **fabricated quotation** — bytes the agent never saw. +It does **not** catch wrong inference from real bytes, selective +quotation, or an accurate quote carrying a false gloss. +CODE_MEDIATED_TEXT.md §5 already reserves that residual for the sampled +entailment tier, and this record does not move it. The buffer extends +*byte fidelity* to all surfaces; it does not decide meaning. Any naming +of it as a "detector" must carry this sentence, or the name over-claims. + +## 7. What already does this + +The law is half-standing, exactly as the pillar was when it was named +(CODE_MEDIATED_TEXT.md §4) — which is evidence for it rather than +redundancy. Each of these is the law applied locally and by hand: + +- `AnchorMismatchError` names the first divergent line **and the + remedy** — re-read and re-derive by query, never retype from memory. +- `locate()` returns `totalHits` and `capped`, so the model knows to + narrow rather than guessing whether it saw everything. +- `UpsumBudgetError` returns per-key sizes largest-first, so compression + is a code act against engine-computed numbers. +- `RawSpliceDisabledError` names the three guarded replacements. +- `trellis_task.verify` returns a `reason` that says *treat this as + evidence*, never *discard it*. +- The guarded-only addendum arm: a surface describing itself differently + because its state differs. +- `trellis_task` itself: the operator's instructions served as a + queryable surface rather than recovered from transcript distance. + +What is missing is uniformity, derivation, and a check. + +## 8. Scope, sequencing, and the authorization gate + +**Nothing in this record authorizes implementation.** It exists so a +future bounded feature starts from a stated design instead of +re-deriving one (the RESEARCH_NOTES_COLLECTION §5 precedent), and so the +exchange that produced it is not lost. + +> **Amended July 23, 2026 (§12): Workstream B is authorized.** That +> sentence stands for Workstream A and for every paid measurement below; +> it no longer holds for B. Everything else in this section — the phase +> ordering, the separate gates, and B's pre-stated first test — governs +> the authorized build unchanged. + +Two workstreams, deliberately separable, which should NOT ride together: + +**A. The trace (buffer + decision log).** + +Phase 0 — **CORRECTED July 19, 2026, by attempting to execute it; the +original wording was wrong and is preserved in §10 (Phase 0 executed) +with the reason.** It splits into two halves that were conflated: + +- **Phase 0a — reachability (zero-paid).** Make the counters shipped + July 19 (`task_reads`, `task_greps`, `task_verify_authorized`, + `task_verify_refused`, `upsum_commits`, `upsum_*_refusals`, + `textedit_guarded_only`, `textedit_raw_splice_refusals`) readable on + the worker path, and pin that they are. Today they are not: see §10.2 + (Finding 1). Zero-paid, small, and independent of everything else. +- **Phase 0b — adoption (PAID, owner-gated).** Whether a model *reaches + for* these surfaces when they would help. This **cannot be measured + zero-paid at any price of effort** — see §10.1 (Finding 0), the + correction that matters most. It needs a probe-mold run with a task + set designed so the surfaces are genuinely load-bearing, and it is the + measurement that would justify or refute Phases 1–4. + +Phase 0b is the gating measurement; 0a is a cleanup that makes production +runs observable and is **not** a prerequisite for 0b (§10.2 explains why: +the probe drivers already parse the full payload). +Phase 1 — the read seam (turn boundary; currently absent, and it is what +any "this turn" semantics requires). +Phase 2 — buffer as pure observer: records and telemetry, gates nothing. +Phase 3 — an informing attestation surface (the `citable()` precedent: +informs, never gates). +Phase 4 — any gate. Separately owner-gated, with a measured before/after. + +**B. The surface-descriptor convention.** Larger blast radius: it touches +every surface and **moves both composed-prompt sha256 pins**, so it wants +its own record, its own PR, and its own pin ceremony. + +**The pre-stated first test for B, chosen because it is cheap and +decisive:** give `trellis_textedit` the full descriptor shape, derive its +addendum from it, and pin that the derived bytes **equal the current +addendum bytes exactly**. If that byte-identity holds, the refactor is +provably safe and can proceed surface by surface without moving a pin +until we choose to. If it does not hold, we have learned the descriptor +model is lossy before touching nine surfaces. + +**No behavior claim attends this record** (guardrail 8). Nothing here is +measured to improve any outcome. Whether a derived self-model changes run +quality is open and unmeasured; the probe-round mold would answer it. + +## 9. Relationship to the other records + +| record | relationship | +|---|---| +| CODE_MEDIATED_TEXT.md | §2.8's enforcement posture generalized: this record says *how* a stated bound proves it has an engine behind it | +| RLM_HARNESS_SCAFFOLDING.md §8 | the three instances whose correction produced this law; §8.3's honest scope still governs those surfaces | +| STRUCTURAL_SPLICE.md §9 | the guarded-only mode is the first state-dependent self-description in the kernel — §2.1's worked example | +| PROVENANCE_THREADING.md | `_retrieved_addresses` is the existing single-surface read buffer §6 generalizes; T1/T2 taxonomy bounds what the buffer can catch | +| GROUNDED_AUTHORING.md | §7's verification tiers cover the semantic residual §6.1 deliberately leaves | +| `.claude/rules/measurement-and-reporting.md` rule 8 and `AMBIENT.md` rule 15 | the law is rule 8 made checkable; §4's voice-collapse defect is rule 15's shape applied to prompt claims rather than capabilities | + +## 10. Phase 0 executed — what it found, and what it corrected + +**July 19, 2026, owner-directed, read-only, zero-paid, $0 spent.** No +code changed; this section is the whole deliverable. Phase 0 was run as +§8 (Scope, sequencing, and the authorization gate) specified it, and the +attempt falsified the specification. Both findings are recorded here +because the second one is a live gap and the first is a trap that will +catch the next person who tries to measure model behavior cheaply. + +### 10.1 Finding 0 — the specification was wrong: adoption cannot be measured zero-paid + +The original §8 (Scope, sequencing, and the authorization gate) Phase 0 +read: *"read the counters shipped July 19 … +against existing zero-paid drills, to establish whether runs already +re-read and whether the surfaces get adopted at all."* + +That is not possible, for a reason that holds for **every** zero-paid +harness in this repository and is not specific to these counters: + +> **A zero-paid run contains no model. Every zero-paid harness drives the +> tool sequence from a script, so any counter it moves records the +> script's author, not a model's decision.** + +The clearest instance is the closest thing the repo has to a "run" +without spend: `scripts/test_selfedit_rehearsal.py` (the Session 35 +scripted stage-2 rehearsal, which drives the run's REAL tool sequence +zero-LLM). It constructs a `TrellisTask` and calls `task.grep("notes.txt")` +— a line a human typed. Counting it would have yielded `task_greps: 1` +and that 1 would have meant nothing about adoption. + +Adoption is a claim about model behavior. Observing model behavior +requires a model in the loop, which is a paid run. There is no cheap +substitute, and the honest consequence is that **Phase 0b is paid or it +does not happen.** The comparable precedent for scale and cost is the +effective-context probe rounds (`EFFECTIVE_CONTEXT_PROBE_REPORT.md`), +whose round 4 ran 36 runs for $0.9452. + +This is guardrail 8 turned on this record itself: a stated measurement +with no mechanism behind it is the same defect class the July 19 pass +existed to close, reproduced in the record that documented the closing. +It survived authoring, review, and merge, and was caught only by someone +trying to run it — which is the argument for executing a specification +early rather than trusting that it reads well. + +### 10.2 Finding 1 — the telemetry allowlist drops most counters on the worker path + +Tracing whether the counters can be read anywhere surfaced a real, +**pre-existing** gap: + +`parseTelemetryLine` (`src/core/observability/rlm_telemetry.ts`) +constructs an explicit **nine-field** result — `input_tokens`, +`output_tokens`, `subcall_count`, `tool_calls`, `mcp_calls`, +`workspace_ops`, `workspace_segments`, `workspace_bytes`, +`execution_time_s`. Every other key in the payload is parsed and +discarded. `src/workers/rlm_worker.ts` then logs five of those nine and +increments five metrics. + +So on the worker path these never reach a consumer: + +| dropped counters | shipped in | +|---|---| +| `upsum_commits`, `upsum_budget_refusals`, `upsum_shape_refusals`, `upsum_revision` | July 19, 2026 | +| `task_reads`, `task_greps`, `task_verify_authorized`, `task_verify_refused` | July 19, 2026 | +| `textedit_guarded_only`, `textedit_raw_splice_refusals` | July 19, 2026 | +| `textedit_ops`, `textedit_files`, `textedit_writes`, `textedit_guarded_ops`, `textedit_raw_splices` | Sessions 20 / 41 | +| `answer_submits` | Session 22 | +| `retrieved_addresses` | Session 30 | +| the retrieval-discipline counters | Session 33 | + +**Nature and severity, stated precisely.** Nothing broke and nothing +regressed: the Python side grew counters across Sessions 20–70 and the +Node allowlist, written when nine fields existed, was never widened. No +behavior depends on the dropped fields — no gate reads them; they are +human-facing diagnostics. The consequence is that **an operator cannot +see these counts in production worker logs or metrics.** That is an +observability gap, not a correctness bug, and it should not be described +as one. + +Note the precision the earlier record owed and did not give: Session 30 +recorded that the scanner's *tolerance* of unknown fields was pinned. +Tolerance is exactly right — the scanner does not break on an unknown +key. It also does not record it. Those are different properties and only +the first was ever pinned. + +**Why this does not block Phase 0b.** The probe drivers do not use the +worker path. `scripts/exp_effective_context.ts` parses the entire +`TRELLIS_TELEMETRY:` payload into an object and reads keys off it, so +every counter is already present there and reading a new one is a +one-line change per field. A paid adoption probe could run today without +touching the allowlist. The two findings are independent, and an earlier +draft of this analysis implied a causal link between them that does not +exist. + +### 10.3 What Phase 0a should do + +Widen the worker-path scanner so counts survive to a consumer, and pin +the property that was never pinned: that a named counter present in the +payload is present in the parsed result. Prefer a general shape (a +counts map) over extending a nine-item list by hand a fourth time — the +list has now been out of date across five sessions, and hand-extension +is what let it drift. Whatever lands owes a non-test caller by AGENTS.md +hard rule 15 (*Correct is not the same claim as reachable*): a scanner +that parses a field nothing reads has not made it reachable. + +Not authorized by this section. It is a bounded feature and wants its own +authorization, like everything else in §8 (Scope, sequencing, and the +authorization gate). + +## 11. The case behind .claude/rules/measurement-and-reporting.md rule 20 (dated entry — July 20, 2026) + +Recorded July 22, 2026 at owner direction, because the rule it grounds +had no in-repo record: `.claude/rules/measurement-and-reporting.md` rule 20 cited this case, and the only +corroborating text was `.claude/skills/self-play/SKILL.md`, which cites +rule 20 back. A rule whose sole support is a derived artifact citing the +rule is circular, and rule 18 forbids exactly that substitution. + +**What happened.** On July 20, 2026 a session validated the newly +authored `self-play` skill by running it against a no-skill baseline — +a with-skill/without-skill comparison asking whether the skill improved +the output. The run re-violated the owner's July 11, 2026 +tooling-over-prompts direction (`.claude/rules/measurement-and-reporting.md` rule 8), which had already +ruled that "prove the prompt moves behavior" is anti-useful work: +measurement harnesses close *tooling* failure classes, and prompt text +only reinforces. + +**Why it was wrong, stated as the rule rather than the incident.** A +well-engineered instruction constrains the model to its specification. +That it differs from, or beats, an unspecified base-model response is +*entailed* by what an instruction is — the comparison cannot return a +surprising result, so it purchases no information and burns credits. +This is the same defect §4 names for prompt claims and §10.1 found for +adoption: a measurement whose outcome is fixed by construction is not a +measurement. + +**The generalization — the nearby-attractor trap.** The session did not +reach for a baseline out of ignorance of rule 8. It reached for one +because a familiar comparison shape was cognitively closer than the +unfamiliar act of naming a stated engineering target. The trap fires +whenever a target has not been stated: the baseline is the nearest +well-formed experiment, so it becomes the default. The countermeasure is +the ordering, not the prohibition — state the target first, and the +attractor stops being the only available shape. + +**What remains permitted, so the rule is not read wider than it is.** +Reachability checks and functional-equivalence or regression comparisons +between two versions of an instruction are the rule-20-safe half +([SELF_DESCRIBING_SURFACES.md](SELF_DESCRIBING_SURFACES.md) §5); the +carve-out matters because iterating on a skill *requires* checking that +the new version still does what the old one did. What is barred is the +new-versus-null baseline. + +**Standing.** This entry records a case and the direction already +ratified in `.claude/rules/measurement-and-reporting.md` rules 8 and 20. It authorizes no build and +changes no gate. + +## 12. Workstream B authorized (dated entry — July 23, 2026, owner, in session) + +The collaborator (Matt) proposed that +[`SELF_DESCRIBING_SURFACES.md`](SELF_DESCRIBING_SURFACES.md) be ratified +and this record's implementation authorized, on the argument that these +surfaces are where the RLM harness earns its keep over a stateless +recursive baseline — the harness building in intelligence rather than +inheriting it. The owner (Cnid) approved in session. The design record +was ratified the same day (its §9); this entry is the build +authorization, and its scope is narrower than the proposal's wording, +deliberately. + +### 12.1 What is authorized + +**Workstream B — the surface-descriptor convention — is authorized**, at +the scope §8 gives it: descriptors bound at each surface's definition +site, `expects` derived from that surface's guard predicates, the +`llm_help` runtime surface, and the human-doc generation that shares the +descriptors. The buildable specification is +[`LLM_HELP_SPEC.md`](LLM_HELP_SPEC.md); the concept and the MASH +correspondence are the design record's. + +**Increment 1 is §8's pre-stated first test, unchanged:** give +`trellis_textedit` the full descriptor shape, derive its addendum from +it, and pin that the derived bytes **equal the current addendum bytes +exactly**. It is first because it is the cheap decisive one and because +it is the only thing that turns guard-derivation from an assertion into +an observation — today the closest live mechanism, +`build_textedit_addendum(textedit)` (`src/rlm/trellis_textedit.py`), +*selects* between two pre-authored constants on one state bool; it +derives nothing from a predicate (`SELF_DESCRIBING_SURFACES.md` §9.2). + +**Observed, and it sharpens the test:** that selector has **two** arms — +`TEXTEDIT_ADDENDUM` and `TEXTEDIT_ADDENDUM_GUARDED_ONLY` — so increment +1 owes **two** byte-identity pins, one per arm, not one. The guarded-only +arm is the more informative of the two: it is the kernel's first +state-dependent self-description (§9's table), so if a descriptor can +reproduce it exactly, the descriptor model has already covered the case +§2.1 was written for. Byte-identity holding means the +refactor is provably safe and can proceed surface by surface without +moving a pin; byte-identity failing means the descriptor model is lossy, +learned before nine surfaces were touched. **Both outcomes are results.** +Sequencing after that is §8's: surface by surface, then `llm_help` +itself, whose landing is the pin-moving event. + +### 12.2 What is NOT authorized, and why the scope is narrow + +- **Workstream A — the trace (read buffer + decision log) — remains + gated.** §8's own direction is that the two workstreams are + deliberately separable and should NOT ride together; authorizing both + because both were named in one proposal would discard that. A is a + worthwhile build on its own merits and can be authorized on them, + without re-opening this entry. +- **Phase 0b, the paid adoption probe, stays behind rule 7** — printed + estimate, owner gate, $5/run cap — and §10.1 still governs how it may + be framed: a zero-paid harness records the script's author, not a + model's decision, so adoption is paid or it does not happen. It is not + to be run as a new-versus-null baseline (rule 20; §11). +- **Phase 4 (any gate) is untouched.** Nothing derived from a descriptor + or a buffer may refuse anything without its own owner gate and a + measured before/after. `llm_help` informs; it does not adjudicate. +- **No behavior claim attends this authorization** (§8's closing + sentence, which stands). Whether a derived self-model changes run + quality remains open and unmeasured. What is authorized is the + building, not a claim about the result. + +### 12.3 What the build owes + +- **The bijection (§3) is the acceptance criterion**, per surface it + reaches: every line of a composed read maps to a guard that enforces + it, and every guard maps to a line. Orphans in either direction are + findings. +- **The drift invariant (§2.1) is the design**, not a preference: one + piece of state both refuses and describes. The moment those become two + fields, "PREFER THE GUARDED FAMILY" is back. +- **§4's marking duty.** What is not guard-shaped — protocol, not + refusal — must acquire a guard or be **explicitly marked advisory**. + An enforced contract and an aspiration written in the same voice is the + defect this record exists to name. +- **Rule 15 (correct ≠ reachable):** name `llm_help`'s non-test caller, + or say plainly there is none. +- **The self-play validation gate** (`LLM_HELP_SPEC.md` §6) binds before + anything relies on the alive catalog — discrimination and + drift/gaming resistance, with the *selected-on-a-lie* cell + pre-committed as the falsifier. +- **Composition must be total (§5).** A surface × action pair with no + composed read gives the agent silent absence, which is the audit's own + failure class one level up. The build owes a default and a check. + +## 13. Increment 1 executed — byte-identity holds on both arms (dated entry — July 23, 2026) + +§12.1's pre-stated first test ran the same day. The `trellis_textedit` +addendum composed from its descriptor plus guard-derived expectations equals +the hand-authored constants **byte-exactly on both arms** — default and +guarded-only — pinned one per arm in `scripts/test_textedit.py` §16, and each +pin was made to fail once on a planted perturbation before being restored +(rule 19(c)). The composition ships on the live path +(`build_textedit_addendum` → the `trellis_agent.py` prompt seam), and both +composed-prompt sha256 pins are unmoved, because the shipped bytes are +identical. Guard-derivation is now an observation on this surface, not an +assertion: the mode account is selected by the same `_guarded_only` bool that +makes `splice()` refuse (§2.1), and every guard-backed sentence has exactly +one encoding, drill-enforced. Per §12.1's own terms, the refactor is provably +safe and proceeds surface by surface without moving a pin. Full result and +the five recorded findings — including a bijection orphan in the guarded arm +— are the dated §10 entry of +[`SELF_DESCRIBING_SURFACES.md`](SELF_DESCRIBING_SURFACES.md). diff --git a/.claude/skills/loop-orchestrator/references/README.md b/.claude/skills/loop-orchestrator/references/README.md new file mode 100644 index 0000000..94a0b76 --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/README.md @@ -0,0 +1,56 @@ +# Reference material + +The records this skill cites, mirrored **byte-for-byte** from the Trellis +repository so the skill travels intact: lift this skill's directory out of the +repo and every document it cites comes with it. + +## How to read these + +Pull the cited section; leave the rest on disk. Several of these run past 40 KB, +and loading one whole spends the context the skill exists to spend well. + +``` +Grep "{Section_Number_Or_Exact_Heading}" references/{Mirrored_File} -A 40 +``` + +The skill body names the section it wants at each step. That name is the read +instruction — follow it to the section, not to the file. + +## These are mirrors, not the record + +The canonical copy is the source path in the table below. On any divergence +**the record wins and the mirror is replaced from source**. A mirror is never +edited in place, and never cited as authority against the record it came from. + +Nothing is appended inside the mirrored files. Byte-identity to the source is +what makes a mirror checkable, and a provenance header written into the file +would be the first thing to destroy it — so provenance lives here instead. + +No sync check is installed. These are portability snapshots taken at one commit; +the hashes below are what a reader verifies a mirror against, with or without +the Trellis repository present. + +## Provenance + +Mirrored from the Trellis repository at commit `65fdb1f`, dated 2026-07-25. + +| File | Canonical source | Bytes | SHA-256 | +|---|---|---|---| +| `DOUBTS_WORKSPACE.md` | `docs/architecture/DOUBTS_WORKSPACE.md` | 37,859 | `aec7483652bc6f369f003674c8f3491df5136fd38e0dd98605531397c2663bda` | +| `HARNESS_SELF_MODEL.md` | `docs/architecture/HARNESS_SELF_MODEL.md` | 29,930 | `07519aee20d56519127dd57fbdb4ca272254e59eb60985518bdee3012c5b1be7` | +| `RECONCILIATION.md` | `docs/product/epistemic-support/RECONCILIATION.md` | 46,647 | `a88c9539e88033825a2f65b70a4634c4cf0dd1d4c2e4966fc9021234f298e14d` | +| `STANDING_MODEL.md` | `docs/product/epistemic-support/STANDING_MODEL.md` | 8,825 | `484fc3c860e834a8afaed6dff6741c585ec3464c7466b09ad3d8421932904cfd` | +| `TEST_TIME_TRAINING.md` | `docs/architecture/TEST_TIME_TRAINING.md` | 64,208 | `9fd170da66d4d5f57213057ab9bf12a9131346283dd5a304ee79049cb42d5302` | + +Verify a mirror against a checked-out Trellis repository by hashing both working +files, so both get that checkout's line-ending treatment and a content match +hashes equal on any platform: + +``` +sha256sum references/{Mirrored_File} {Trellis_Repo_Path}/{Canonical_Source_Path} +``` + +The column above records the mirrored bytes as committed, which carry CRLF. A +checkout that normalizes line endings hashes differently without any content +having changed — so compare mirror against source, and read the column as the +snapshot's own fingerprint rather than as a cross-platform constant. diff --git a/.claude/skills/loop-orchestrator/references/RECONCILIATION.md b/.claude/skills/loop-orchestrator/references/RECONCILIATION.md new file mode 100644 index 0000000..ca8b605 --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/RECONCILIATION.md @@ -0,0 +1,694 @@ +# Four-Judge Reconciliation — Completed Role Definitions and Composition Design + +**Status: RATIFIED — July 18, 2026 (owner, Session 67)**, by the dated +entry in [§7](#7-ratification). Authored July 17, 2026 (Session 66) as +PROPOSED, executing [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) +§10.1 item 1 as twice-amended: (a) the layer mapping, (b) the completed +role definitions in S10's YAML schema with per-field sources, (c) the +adoption of the two structural imports (R-29 hard compatibility gate; +R-30 no-global-section) into the composition design. Owner ratification +is a recorded decision, not an inference; the §7 entry is that decision, +and this record now governs where the two parent designs differ. Amended +only by dated entry, never by silent edit. The panel drills +(`npm run test:judge-panel`) pin the composition design in §5 in the +same PR, per the §10.1 instruction that R-29/R-30 enter the design +BEFORE the drills pin it. + +Authored under the house prompt protocols (`HANDOFF.md` §7 guardrail 4: +Prompt-Engineering + Hypershot, both invoked before these bytes were +written). Layer rule for everything below: role names, taxonomy class +names, parameter names, and schema field names are invariant vocabulary; +every per-invocation value is a placeholder; no concrete belief appears +at any frame layer (concrete synthetic content lives only in the +byte-pinned drill fixtures, which are calibration data, not frames). + +Sources (register IDs from [`RESEARCH_MAP.md`](RESEARCH_MAP.md)): + +- **S10** — [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) + (the collaborator's supplied design: registries, YAML judge schema, + ecology, routing stack, gluing rules; claims R-28…R-30). +- **S1 via the register and the contract frames** — the S1 protocols + and 2×2 rubric findings as carried by R-01/R-04/R-06/R-11 and + distilled into [`JUDGE_CONTRACT_TEMPLATE.md`](JUDGE_CONTRACT_TEMPLATE.md) + §1–§6 (S1's released-code locator is still missing — sharing-queue + row 2 — so S1 reconstruction cites the register rows and the + committed contract frames, never an unread artifact). +- **S9 fork** — the OpenCnid `migration-analysis` clone (MIT LICENSE at + fork commit `2bb5e54`; re-cloned this session to + `D:\OpenCnid\migration-analysis`, outside the Trellis worktree): + `docs/adaptation.md` (the five capability-indexed failure classes + with observable behaviors), `src/task_evals/*.py` (LLM-judge + evaluation prompts with labeled structured outputs), `src/optimize/` + (the meta-agent optimizer — read for orientation, NOT adopted; AB-8). +- **FOUR_JUDGE_DESIGN.md §3** — the four blindness profiles this record + completes. +- **[`docs/architecture/EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) + §3–§5** — the drilled v1 arithmetic the composition feeds. + +Adoption bounds binding this record: AB-1 (S10 physics/framework claims +are design vocabulary, never enforcement weight), AB-3 (routing weights +stay open and non-load-bearing), AB-5 (writer-blind, no count-shaped +incentives), AB-7 (non-epistemic registries stay gated), AB-8 (no +evolution machinery), AB-9 (audit never gates), AB-11 (live blocks +only). + +--- + +## 1. The layer mapping (§10.1 item a) + +**Verdict: the layers compose (S10 = framework, this panel = a minimal +ecology instance), with one refinement and one recorded fusion.** A +role's blindness profile is expressed exactly as §10.1 predicted: the +registry parameters it does NOT select, plus its +`abstention_boundary`. + +Parameter naming convention (this record's contribution, needed to make +the gluing condition decidable): a selected parameter is a **qualified +parameter** `registry.parameter/aspect` — the registry entry plus the +evidence region it restricts (e.g. `logical.falsification/cited` vs +`logical.falsification/independent`). Two judges share a parameter in +the gluing sense only when the *qualified* names match; sharing only +the registry entry (`falsification` under two aspects) is registry-level +kinship, which §4.3 treats as composable disagreement, not overlap. +S10's registries are expandable by declaration; entries used below that +S10's ecology names but its registry list does not +(`evidence_quality`, `source_dependence`, `constraint_satisfaction`, +`hidden_assumptions`, `goodharting`, `coverage`) are registered here as +Logical-registry expansions, each cited to the ecology judge that +already uses it. + +| Role | S10 ecology reading (verified against the ecology text) | Blindness = unselected parameters + boundary | +|---|---|---| +| J1 Grounding | Epistemic Reliability ∩ Belief-to-Fact, **refined**: the ecology's Epistemic Reliability Judge bundles "evidence quality, induction, Bayesian confidence, falsifiability, source dependence, observation fidelity" — the citation-facing half (`evidence_quality`, `falsification` over cited bytes) is J1; the world-facing half (`source dependence`, `observation fidelity`, `induction`) is J3. The preliminary §10.1 mapping holds with this split recorded. | Unselected: every world-facing, history-facing, and non-Logical parameter. Boundary: cited bytes do not bear on the claim (evidence-abstain). | +| J2 Coherence | Formal Coherence Judge, direct match ("deduction, consistency, constraint satisfaction, counterexamples, contradiction sensitivity" — the last is an orientation field in S10's schema, where it appears below). | Unselected: every evidence-facing parameter. Boundary: empty history and no kind coordinates. | +| J3 Corroboration | Epistemic Reliability Judge's world-facing half (see J1 row) + Sensorial `observation_quality`. | Unselected: the claim's own citations (the anti-circularity blindness), all internal-record parameters. Boundary: absence of corroboration counts only where the supplied evidence should have contained it. | +| J4 Audit | Adversarial Judge + Coverage Meta-Judge, **fused** — two ecology functions this panel deliberately runs as one role. Divergence recorded: S10 keeps them separate. Falsifier for the fusion: a drill or measured run showing the fused role missing a coverage failure (a needed-judge or missing-parameter finding) that a separated meta-judge catches — then the panel grows per FOUR_JUDGE_DESIGN §9. | Unselected: every belief-facing parameter — J4 selects only audit-aspect parameters and judges judges. Boundary: position-swapped comparisons that disagree are a tie, never a finding. | + +**The design property the mapping yields (drill-pinned):** the four +roles' qualified-parameter selections are **pairwise disjoint by +construction** — that is what "differently blind" buys, and it is what +licenses cross-role composition without a meta-judge (§4.3). The drill +computes the pairwise intersections from the definitions and fails if +any is non-empty (`[mapping]` section). + +## 2. Completed role definitions (§10.1 item b) + +S10's YAML schema, completed per role. Per-field sources are cited +inline (`# src:` comments). Three fields extend S10's schema and are +recorded as extensions, not silent edits: `taxonomy` (the closed +drawback classes with their qualified-parameter map — required by the +overlap test), `inputs` (the declared context allowlist — blindness +made mechanical, from [`COMPOSABLE_RUBRICS_DESIGN.md`](COMPOSABLE_RUBRICS_DESIGN.md) +§2.1), and `required_assumptions` (the R-29 gate material). The +`rubric` lines are the reconstructed one-question-per-class checks +(JUDGE_CONTRACT_TEMPLATE §6.4); each is invariant across invocations +and carries no concrete belief. + +> **Dated supersession note (July 21, 2026, via self-play).** The worked role YAMLs +> below use S10's `hyperplane_parameters` (four-plane) per-seat structure. That per-seat +> structure is **superseded**: the live schema uses flat `select` (with `taxonomy` + +> `blind_to` retained — both validated). A blind self-play evaluation this session found +> the four-plane buckets do not earn their place at the per-seat level, and that a +> plane-categorized `select` is no better; the mapping to flat `select` is mechanical +> (each `plane.parameter` becomes a flat `select` entry). These reconstructions are +> preserved as the §10.1-item-b work; a full rewrite to flat `select` is a separate +> follow-up. See [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) supersession +> note and [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) §8. + +### J1 — Grounding + +```yaml +judge: + name: J1_GROUNDING # src: FOUR_JUDGE_DESIGN §3; JUDGE_CONTRACT_TEMPLATE §1 role enum + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 1 (verdict domain); R-11 (the only gate at 0% under laundering) + Decide whether the exact cited source bytes support the claim. + Judges the citation, never the world. + + claim_modes: # src: §10.1 preliminary mapping (Belief-to-Fact ∩); S10 claim-mode list + - fact + - inference + + hyperplane_parameters: + emotional: [] # src: AB-7 (non-epistemic registries gated behind the claim-kind plane) + logical: # src: S10 ecology "Epistemic Reliability Judge" (evidence quality, falsifiability), citation-facing half per §1 + - evidence_quality/cited + - falsification/cited + sensorial: [] + ethical: [] + + orientation: + evidence_standard: entailment_by_cited_bytes_only # src: R-11 (semantic entailment held 0%); JUDGE_CONTRACT_TEMPLATE §2 context + uncertainty_posture: abstain_when_bytes_do_not_bear # src: JUDGE_CONTRACT_TEMPLATE §2 constraints + temporal_horizon: at_judgment_time # src: AB-11 (live blocks at judgment time) + stakeholder_scope: none_epistemic_only # src: AB-7 + reversibility: verdicts_attributed_to_rubric_sha # src: JUDGE_CONTRACT_TEMPLATE §6.5 (byte-pin on registration) + contradiction_sensitivity: high_within_cited_bytes # src: S10 schema field; template §2 (contradicted_by_cited_bytes class) + abstention_boundary: cited_bytes_do_not_bear_on_claim # src: JUDGE_CONTRACT_TEMPLATE §2 ("If the bytes do not bear on the claim at all, abstain") + + taxonomy: # closed; unknown class is a refused completion (template §1) + unsupported_citation: evidence_quality/cited # src: template §2; R-11 (laundering = real-but-unrelated hashes) + overclaimed_evidence: evidence_quality/cited # src: template §2; R-01 (clean never certifies) + contradicted_by_cited_bytes: falsification/cited # src: template §2 + + rubric: # one question per class (template §6.4; S1 op discipline via R-06) + - Do the cited bytes state or entail the claim? # -> unsupported_citation when no + - Does the claim assert more than the cited bytes carry? # -> overclaimed_evidence when yes + - Do the cited bytes contradict the claim? # -> contradicted_by_cited_bytes when yes + + inputs: # src: COMPOSABLE_RUBRICS §2.1 (blindness mechanical); FOUR_JUDGE_DESIGN §3 "Sees" + required: [claim, citedBytes] + optional: [] + + required_assumptions: # src: R-29 (S10 layer-4 hard gate material) + - cited_bytes_available +``` + +### J2 — Coherence + +```yaml +judge: + name: J2_COHERENCE + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 2; R-18 (coherence calibration as tooling) + Decide whether the belief is internally coherent across its own + record. Judges consistency, never truth. + + claim_modes: # src: template §3 (history + kind judgeable for any non-experiential mode) + - fact + - inference + - prediction + - belief + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Formal Coherence Judge" (deduction, consistency, constraint satisfaction) + - consistency/internal + - consistency/history + - constraint_satisfaction/kind + sensorial: [] + ethical: [] + + orientation: + evidence_standard: own_record_only # src: FOUR_JUDGE_DESIGN §3 ("blind to all external evidence") + uncertainty_posture: abstain_without_history_or_kind # src: template §3 constraints + temporal_horizon: full_version_history # src: FOUR_JUDGE_DESIGN §3 "Sees" (prior versions, contest/recovery record) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_within_own_record # src: S10 ecology (Formal Coherence "contradiction sensitivity") + abstention_boundary: empty_history_and_no_kind_supplied # src: template §3 ("abstain rather than judging from the claim text alone") + + taxonomy: + self_contradictory: consistency/internal # src: template §3 + history_inconsistent: consistency/history # src: template §3 + kind_incoherent: constraint_satisfaction/kind # src: template §3; R-19 (claim-kind positions) + + rubric: + - Does the claim contradict itself? # -> self_contradictory when yes + - Does the claim contradict its own prior record? # -> history_inconsistent when yes + - Does the claim assert more certainty than its kind position admits? # -> kind_incoherent when yes + + inputs: + required: [claim, history] + optional: [claimKind] # src: template §3 ("optionally ") + + required_assumptions: + - history_available +``` + +### J3 — Corroboration + +```yaml +judge: + name: J3_CORROBORATION + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 3; R-05 (detectability spectrum); R-12 (poison drill) + Decide whether independent live evidence corroborates or + contradicts the claim, blind to the claim's own citations. + + claim_modes: # src: FOUR_JUDGE_DESIGN §3 (independent evidence bears on world-facing claims) + - fact + - inference + - prediction + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Epistemic Reliability Judge" world-facing half per §1 (source dependence, induction) + - induction/world + - falsification/independent + - source_dependence/independent + sensorial: # src: S10 ecology (observation fidelity); Sensorial registry (observation quality) + - observation_quality/independent + ethical: [] + + orientation: + evidence_standard: independent_live_blocks_authority_weighted # src: template §4; AB-11 (live blocks only); parent §5 (authority registry) + uncertainty_posture: abstain_unless_evidence_should_have_contained_it # src: template §4 constraints + temporal_horizon: current_versions_only # src: AB-11 (superseded versions are archive) + stakeholder_scope: none_epistemic_only + reversibility: verdicts_attributed_to_rubric_sha + contradiction_sensitivity: high_across_independent_sources + abstention_boundary: supplied_evidence_need_not_have_contained_corroboration # src: template §4 + + taxonomy: + uncorroborated: induction/world # src: template §4 + authority_contradicted: falsification/independent # src: template §4; R-12 (authority catches confident lies) + corroboration_ambiguous: observation_quality/independent # src: template §4 + + rubric: + - Does independent evidence that should contain this claim corroborate it? # -> uncorroborated when no + - Does authority-weighted independent evidence contradict the claim? # -> authority_contradicted when yes + - Is the independent signal too ambiguous to decide? # -> corroboration_ambiguous when yes + + inputs: + required: [claim, independentEvidence] + optional: [authorityWeights] + # citedBytes is deliberately absent: the anti-circularity blindness + # (FOUR_JUDGE_DESIGN §3 "blind to the belief's own citations"). + + required_assumptions: + - independent_evidence_pool_available +``` + +### J4 — Audit + +```yaml +judge: + name: J4_AUDIT + purpose: > # src: FOUR_JUDGE_DESIGN §3 row 4; R-06 (S1 2x2: the audit caught what loops could not) + Judge whether the other judges judge well. Judges judges, never + beliefs; runs outside every loop; can only contest a judge as a + capability. + + claim_modes: [] # divergence recorded: S10's claim_modes classify judged CLAIMS; J4's judged + # items are (judge, verdict, evidence) triples, so the field is vacuous for + # the audit role. The underlying items J4 samples may carry any mode. + + hyperplane_parameters: + emotional: [] + logical: # src: S10 ecology "Adversarial Judge" (hidden assumptions, Goodharting) + + # "Coverage Meta-Judge" (missing coverage) — fused per §1; + # abduction/counterfactuals from the S10 Logical registry + - hidden_assumptions/audit + - goodharting/audit + - coverage/audit + - abduction/audit + - counterfactuals/audit + sensorial: [] + ethical: [] + + orientation: + evidence_standard: stored_pairs_judged_twice_positions_swapped # src: R-06 (position debias); template §5 protocol invariants + uncertainty_posture: disagreeing_orders_are_a_tie # src: template §5 ("a finding counts only when both orders agree") + temporal_horizon: retrospective_samples_only # src: FOUR_JUDGE_DESIGN §4 (anchors prospective, J4 retrospective) + stakeholder_scope: judges_only_never_beliefs # src: AB-9 + reversibility: contest_recoverable_by_human_reregistration # src: parent §4.4; register_modules.ts recovery transition + contradiction_sensitivity: high_across_rubric_applications + abstention_boundary: positions_disagree_after_swap # src: template §5 + + taxonomy: + rubric_gamed: goodharting/audit # src: template §5; R-11 + S1 Goodhart episode (RESEARCH_MAP §4.2) + convention_blind: coverage/audit # src: template §5; R-06 (0.122->0.126 invisible without the task contract); + # S9 fork docs/adaptation.md §3 (implicit-knowledge failures: + # "misses implied constraints or conventions") + systematic_drift: abduction/audit # src: template §5; FOUR_JUDGE_DESIGN §4 (drift finding contests the judge) + + rubric: + - Does the judged verdict satisfy the rubric's letter while defeating its question? # -> rubric_gamed when yes + - Does the judged verdict penalize a convention the task contract requires? # -> convention_blind when yes + - Do the sampled verdicts drift in one direction the rubric does not explain? # -> systematic_drift when yes + + inputs: + required: [sampledTriples, taskContract] # src: template §5 (task_contract is law; R-06) + optional: [] + # beliefOpinion and compositionState are deliberately absent: + # the live gating path is J4's structural blindness + # (FOUR_JUDGE_DESIGN §3 row 4; AB-9). + + required_assumptions: + - stored_verdict_evidence_pairs_available +``` + +**Verdict-schema refinement adopted (from R-29, recorded as a dated +amendment to JUDGE_CONTRACT_TEMPLATE §1):** abstain verdicts carry an +`abstainReason` from the closed set `(jurisdiction | evidence)` — +S10's exterior-region abstention (the claim mode or case lies outside +the judge's jurisdiction) is now distinguishable from evidential +abstention (in jurisdiction, evidence insufficient). Both routes reach +the opinion identically (absence of evidence → `u`); the reason is +telemetry and audit material, never arithmetic. + +## 3. Composition design: the two structural imports (§10.1 item c) + +Adopted BEFORE the drills pin them, as §10.1 instructs. The enforcement +home for everything in this section is the pure module +`src/core/graph/judge_panel.ts`; the drill is +`npm run test:judge-panel` (sections named per rule below); unit pins +live in `src/core/graph/judge_panel.test.ts`. + +### 3.1 The hard compatibility gate (R-29) + +S10's layer-4 rule, adopted verbatim in force: compatibility is a +**hard gate, never a similarity score**. + +- Every judge declares `required_assumptions` through its role + definition (§2, typed keys); every judged case declares its + properties. A judge whose required assumption the case **negates** + is **excluded from the composition with a typed, counted exclusion + record** — S10's "exclude … judges whose required assumptions + conflict with the case" — never down-weighted, never silently + dropped. The gates run at selection: an excluded judge's verdicts + are not expected in the stream at all. +- The applicability gate (S10 layer 3) rides with it: a case whose + claim mode lies outside a judge's `claim_modes` admits only a + `jurisdiction` abstention from that judge. A non-abstaining verdict + arriving at composition from an inapplicable or excluded judge is a + wiring failure and refuses the composition (typed), fail-closed. +- If the gates leave zero composition-side verdicts, the composition + refuses outright (typed) rather than emitting a vacuous opinion — + the R-02 fail-closed posture applied at the panel boundary. +- Routing WEIGHTS (S10's R(j,c) score) are explicitly NOT adopted: + they are open parameters under AB-3, unmeasured, non-load-bearing. + Only the hard constraint enters. + +### 3.2 The no-global-section outcome (R-30) + +S10's gluing condition, made decidable by the qualified-parameter +convention of §1: + +- **Overlap** between two judges = the intersection of their qualified + parameter selections. Within this panel, cross-role overlaps are + empty by construction (§1's drill-pinned property); overlap arises + where jurisdictions genuinely coincide — **two registered + configurations of the same role** (a rubric revision, a model + migration under R-27) judging the same belief. +- **Incompatible restrictions** = on one belief, one judge renders a + drawback whose class maps to a qualified parameter inside the + overlap while another overlapping judge renders a non-abstaining + `clean` (an affirmative no-drawback-found restriction of the same + parameters). Two drawbacks never conflict (drawback-first: both are + real findings); abstentions never conflict (no restriction). +- **Outcome — no valid global section presently exists**: the + composition emits a typed conflict record + `{kind: no_global_section, beliefId, parameter, judges, verdicts}`, + **withholds every verdict of the conflicted group from evidence + accumulation** (their mass reaches the opinion only as absence of + evidence — the abstention-routing law extended to conflict, so the + composed opinion is u-dominant relative to the silent blend), and + flags the belief for the existing conflict path. Never a blended + (b, d, u) average; never a majority vote. Resolution is human or a + separately proposed meta-judge — the engine only refuses to glue. + +### 3.3 The divergence between the parents, resolved explicitly + +FOUR_JUDGE_DESIGN §3 prescribes that J1-clean + J3-drawback "feeds `d` +*and* flags"; R-30 prescribes u-dominance for overlap-test failure. +These are **different boundaries, not a contradiction**, and this +record resolves them as a merge (per the §8 rule against silent +resolution): + +- **Cross-role disagreement** (registry-level kinship, qualified-level + disjoint — e.g. J1 `clean` on `falsification/cited` + J3 + `authority_contradicted` on `falsification/independent`): the two + evidence regions can both be truthfully reported at once (accurate + citations, contradicting authority), so a coherent — unfavorable — + global section exists. **Composes** exactly as §3 says: the drawback + feeds `d`, the affirmative clean feeds `b`, and the composition + emits the typed record `{kind: cross_role_disagreement, …}` that + flags the belief for the conflict path. Balanced conflict stays + legible in the opinion itself — high `b` with high `d` is + distinguishable from ignorance (high `u`), which is the reason the + triple exists (R-14). +- **Same-jurisdiction conflict** (qualified-parameter overlap, §3.2): + no coherent ruling exists; the no-global-section outcome fires. + +Falsifier for this resolution (carried per §4 protocol): a measured +regime on anchored conflict cases where routing cross-role +disagreement to u-dominance (or forced blending of same-jurisdiction +conflict) outperforms this split — then the boundary moves by dated +amendment with a same-commit drill re-pin. + +### 3.4 What composition consumes and refuses (completing the §4 flow) + +In event order, each step typed and drill-pinned: + +1. **Schema**: every verdict record validates against the shared + schema (closed per-role taxonomy; abstains carry `abstainReason`); + unknown role, class, or reason refuses. +2. **Registry**: a verdict from an unregistered judge refuses (a + wiring bug must not pose as epistemic humility); a verdict from a + **contested** judge refuses the whole composition, naming the judge + (the Session-31 whole-batch-refusal mold: a contested judge in the + stream means upstream selection already failed). +3. **J4 exclusion**: a J4-role verdict in the composition input + refuses (the audit role has no composition path — AB-9; the only + J4 consequence is a contest of the judge capability, mediated + outside this module). +4. **Gates** (§3.1), then the **overlap test** (§3.2), then + **cross-role disagreement detection** (§3.3). +5. Surviving verdicts become support events (`opId` = the judge id, + weight from the verdict record) consumed by the drilled v1 + arithmetic (`computeSupportOpinion` — reused, not modified). + +Judge manifests (the registration objects) require `rubricSha`, +`anchorSetSha`, `taxonomyVersion`, and **`targetModelIdentity`** +(R-27: adaptations are model-coupled; a model migration must be able +to contest the judge — the drill asserts the field is required). +Contest and re-registration follow the module-registration recovery +mold (`scripts/register_modules.ts`): a contested judge is excluded +from composition until a human re-review re-registers it, and the +superseded contest record survives in the judge's history. + +## 4. Per-role reconciliation verdicts (§4 completion protocol) + +| Role | Verdict | Divergences recorded (each with falsifier) | +|---|---|---| +| J1 Grounding | **adopt** (S10 sparse-selection frame; this record's definition) | none — the ecology-judge split (§1 refinement) is a reading, not a divergence | +| J2 Coherence | **adopt** | none — direct Formal Coherence match | +| J3 Corroboration | **adopt** | none — world-facing half of the split | +| J4 Audit | **merge** (Adversarial + Coverage Meta-Judge fused into one role) | S10 separates them. Falsifier: a coverage failure the fused role misses that a separated meta-judge catches → the panel grows (§9 governs). The Coverage Meta-Judge's "unresolved disagreement" duty is engine code here (conflict records), and its "need for another judge" duty is deferred to humans reading those records | +| Composition | **merge** (§3.3: §3's disagreement-is-data at the cross-role boundary; R-30's no-global-section at the same-jurisdiction boundary) | falsifier in §3.3 | +| Verdict schema | **merge** (`abstainReason: jurisdiction \| evidence` adopted from R-29 into the template §1 schema) | falsifier: the distinction never discriminating in telemetry over a measured period → retire by dated amendment | +| Ecology breadth | **diverge-recorded**: S10 sketches eleven judges; this panel ships four (a minimal ecology instance for belief-support). | Falsifier: FOUR_JUDGE_DESIGN §9 — a fifth blindness profile catching a failure class the four miss. Non-epistemic registries stay behind AB-7's driving-question rule | +| Routing stack | **diverge-recorded**: S10's six-layer stack adopted only at layers 3–4 (applicability + compatibility, §3.1) and 6 (overlap, §3.2); layers 1–2 and 5 (context signature, semantic retrieval, coverage/complementarity scoring) are selection machinery a four-role fixed panel does not need. | Falsifier: an ecology larger than one configuration per role — then the routing layers enter behind their own proposal (AB-3/AB-8 bind the weights and any search) | + +## 5. Enforcement homes and pins (implementing FOUR_JUDGE_DESIGN §6) + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Verdicts ternary, closed taxonomies, abstainReason | `judge_panel.ts` Zod schemas | drill `[schema]`; unit pins | +| Role blindness structural | `assembleJudgeContext` input allowlist from `inputs` | drill `[blindness]` (every fixture (role, forbidden-input) pair refused, typed, naming role + input); unit pins | +| J4 never gates | `judge_audit.ts` exports no symbol `judge_panel.ts` imports; composition refuses J4 verdicts | drill `[static-imports]` (no import path audit→composition) + `[audit-isolation]` (route attempt finds no effect on any opinion) | +| Panel composes in engine code only | `composePanel` pure over verdict records | drill `[composition]` scripted verdicts → exact opinions vs independent oracle | +| No-global-section, never blend | §3.2 withholding in `composePanel` | drill `[no-global-section]` (planted incompatible verdicts → typed conflict record; u-dominant vs the blend counterfactual) | +| Hard compatibility gate | §3.1 gates in `composePanel` | drill `[gates]` (planted incompatible judge excluded, counted; inapplicable non-abstain refused) | +| Judges contestable, model-coupled | registry pure functions; manifest requires `targetModelIdentity` | drill `[judge-contest]` (contest → refusal → human re-registration → history survives); `[schema]` R-27 required-field refusal | +| Position bias neutralized in J4 | `judge_audit.ts` `debiasedFinding` (agree-in-both-orders rule) | drill `[audit-isolation]` protocol checks; unit pins | +| Writer never sees any of it | no production wiring exists this session (nothing writes or exposes panel state) | future: the sweep-integration proposal carries the kernel-prompt absence pin (FOUR_JUDGE_DESIGN §6 row 7) — recorded here as deliberately not yet pinnable | + +### 5.1 Judge-intake rows (dated entry, July 18, 2026 — Session 68) + +Merged from [`JUDGE_INTAKE_DESIGN.md`](JUDGE_INTAKE_DESIGN.md) §6 per its +§10 item 4, in the implementing PR, now that every row is **observed** +rather than designed (`npm run test:judge-intake`, 13 sections; the three +modules land in the same PR as this entry). This is a dated addition +under the §7 amendment rule, not an edit to the ratified table above. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Claim bytes are engine-copied from an address, never model-authored | `judge_intake.ts` — input is addresses; bytes fetched engine-side | drill `[engine-copy]` (a selection carrying literal text refuses) | +| Filing refuses without recorded ratification | ratification lookup precedes candidate construction | drill `[ratification-gate]` | +| The cut is visible at approval (rule 17) | engine-computed `neighborContext` on every selection | drill `[selection-context]` (qualifier-excluding cut visible in the ratification payload) | +| Claim mode is user-ratified, never agent-inferred | `claimMode` lives on `Ratification`, not on the selection | drill `[mode-provenance]` | +| Compound claims decompose as separate ratified selections | one mode per selection; no sub-claim authoring surface | drill `[decomposition]` | +| Attribution never reaches judge context | user id is an address component; allowlist admits content only | drill `[attribution-partition]` — two users' beliefs in one workspace produce judge contexts identical but for claim content | +| No task-text channel in composed prompts | `PromptSection` closed union has no task member | drill `[prompt-absence]`; unit pins | +| Composed prompts byte-inspectable | pure deterministic `renderPrompt` | drill `[prompt-bytes]` against byte-pinned fixtures | +| Assembly cannot bypass blindness | evidence built only via `assembleJudgeContext` | drill `[blindness-preserved]` | +| Ratifications and pre-registrations are write-once | store refuses a second write per key | drill `[write-once]` | +| Late registration refuses | run-open event; later timestamp refuses, typed | drill `[prereg-late]` | +| Forecasts never share bytes with prompts | no import path store → prompt module | drill `[static-imports]` | +| Audit reads the store; no new audit→composition path | one-way imports | drill `[static-imports]` (both directions) | + +### 5.2 Judge-convocation rows (dated entry, July 19, 2026 — Session 70) + +Merged from [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) +§6 in the implementing PR, now that every row is **observed** rather +than designed (`npm run test:judge-convocation`, 23 sections / +140 checks; 15 unit pins in `judge_convocation.test.ts`). A dated +addition under the §7 amendment rule. Build scope is OPTION B (that +record's §11.1): the live spawn path exists and is pinned at its +refusals; no live run has executed. **This entry also closes §5 +row 9's deferred pin** — see the writer-blind row below. + +| Behavior | Enforcement home (non-test) | Pin | +|---|---|---| +| Manifests validated, R-27 required, hand-authored only | `parseJudgeManifest` at registration; no generator exists (AB-8) | drill `[roster-manifest]`; unit pins | +| Registration existence-gated before any write | `findMissingEvidentiaryHashes` gate in `register_judges.ts`, before both writes | drill `[roster-existence]` (gate logic + source-order pin) | +| Store manifest ↔ graph hook consistent; the hook carries only name + id + kind + hashes | one ceremony writes both; `buildRegistryFromState` refuses mismatch naming the judge | drill `[roster-consistency]`; hook-opacity cypher pins in `[roster-lifecycle]` + unit pins | +| Contested judge unreachable by a run (graph state → pure registry → composition) | contest state carried by `buildRegistryFromState`; `composePanel` refuses (existing law) | drill `[roster-lifecycle]` | +| Recovery is human re-registration; a manifest change is a new id | plan refusal on an existing judgeId; ceremony requires `--reviewed-by` and refuses uncontested recovery | drill `[roster-recovery]`; unit pins | +| Pairs judged at most once ever; identity spans candidate bytes + manifest identity | durable verdict lookup excludes judged pairs before sampling (`support_sweep.ts`) | drill `[sweep-pairs]` + `[sweep-once]` (a third run finds an exhausted pool) | +| Uniform pool, seeded sampling, budget, counted deferral | sweep policy (config twins `SUPPORT_*`); mulberry32 per the record §3.5 | drill `[sweep-selection]` (independent-generator sequence + budget order) | +| Run-open recorded before the first invocation; late pre-registration refuses | `appendThroughLaw` ordering in `runConvocationSweep`; slice-1 store law | drill `[sweep-run-open]` | +| Judge-all-then-write; infrastructure failure writes nothing | collect-then-write in `runConvocationSweep` | drill `[sweep-atomicity]` | +| Never a write gate; no path to the write path or promotion | no such import exists | drill `[static-imports]` | +| Excluded judges typed and counted; designed silence disclosed (rule 12) | R-29 gate at selection; the run report carries exclusions + jurisdiction abstains; synthesized abstentions flagged, zero spend | drill `[sweep-evidence]` | +| Attribution never re-enters through sweep plumbing | prompts only via `toPromptInput`; store payloads carry ids, never addresses or partitions | drill `[sweep-attribution]` (partition twins through the FULL sweep path; token scan over prompts and appended payloads) | +| Opinions computed at read time, advisory only | `computeConvocationReport` replays verdicts through `composePanel`; nothing stores an opinion | drill `[report]` (independent arithmetic; cross-role disagreement surfaced as data) | +| **Writer never sees any of it** (§5 row 9, deferred there — CLOSED here) | no support vocabulary on any kernel-prompt source; no RLM surface reaches `judge_records` or any support field | drill `[writer-blind]` (token scan over all ten `src/rlm/*.py` + the `search_ast_nodes` body) + unit pins | +| Spawn transport = exactly the rendered bytes; `promptHash` re-verified pre-send | `buildSpawnRequest` (`parseComposedPrompt` re-render) | drill `[spawn-transport]`; unit pins | +| Model identity must equal the manifest's, or refuse before I/O (R-27) | `makeLiveJudge` construct-time refusal | drill `[spawn-model]`; unit pins | +| The model supplies only `{verdict, drawback, abstainReason}`; weight and time engine-side | strict `judgeResponseSchema`; `buildEngineVerdict` | drill `[spawn-verdict]`; unit pins | +| Live spawn unreachable without the operator flags (the mechanical half of the triple gate) | runner defaults to the oracle; `--live` without `--confirm-paid` refuses | drill `[spawn-gate]` (source pins; the governance half is the owner's dated re-opening + per-run approval) | +| The queue shows the cut verbatim (rule 17) | `show` prints the `buildRatificationRequest` payload unmodified | drill `[queue-shows-cut]` | +| `claimMode` only from the user's recorded flags; declines record nothing | required flags with no default; the store schema has no other entry point | drill `[queue-provenance]` | +| Store write-once mechanical; supersession references, never overwrites | `judge_records` `PRIMARY KEY (kind, key)` + the slice-1 law via validate-then-append | drill `[store-write-once]`; DDL unit pin | + +**Dated addition (July 21, 2026) — the read-time explanation render.** +The advisory report gained a pure, code-mediated explanation render +(`judge_explain.ts`; the `support:report` surface prints it) that joins +already-stored verdict fields — seat, verdict, drawback class, its +qualified-parameter dimension, abstain reason, and the typed +conflict/disagreement/exclusion records — into human-readable lines. No +wire/schema/store change, no model call, authors no byte; `clean` reads +"no known drawback found," never certified correctness (R-01). Specified +at [`JUDGE_CONVOCATION_DESIGN.md`](JUDGE_CONVOCATION_DESIGN.md) §13 +(Option A); pinned by `judge_explain.test.ts` and the `[report]` / +`[static-imports]` sections of `npm run test:judge-convocation`. It is +the engine-side analogue of the session-layer `judge-composition` skill's +per-item rationale, aligning the two layers as far as the code-mediated +pillar allows. + +## 6. Exclusions (this record) + +No live judges, no model calls, no `support_sweep`, no database +registration, no ratification queue, no claim-kind plane, no routing +weights, no evolution machinery (AB-8), no S9 optimizer adoption (the +`src/optimize/` meta-agent was read for orientation only), no change +to the write path, custody tiers, kernel prompts, or any composed- +prompt pin. + +## 7. Ratification + +**RATIFIED — July 18, 2026 (owner, Session 67).** This record and its +drills, authored in Session 66 (July 17, 2026), are ratified as written. +In consequence, from this date: + +- **The §4 per-role verdicts are binding**, not proposals. Consumers no + longer carry the unratified caveat. +- **This record governs where the two designs differ.** + [`FOUR_JUDGE_DESIGN.md`](FOUR_JUDGE_DESIGN.md) and + [`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md) are no longer + co-equal: the layer mapping, the completed role definitions, the + adopted composition design (R-29 hard compatibility gate; R-30 + no-global-section), and the §5 enforcement table are authoritative. +- **The §3 composition design binds implementation.** The §3.3 + resolution of the cross-role vs same-jurisdiction boundary stands with + its falsifier. +- **The live-judge follow-on slice is unblocked** as a separately + authorized bounded feature — ratification removes the gate, it does + not authorize the build. + +Ratified in the same act: [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) +§11 — the twenty rules as binding program law. Records ratified under +this entry are amended only by dated entry, never by silent edit. + +*The gate this entry closes, preserved: "**OPEN.** This record and its +drills were authored in Session 66 (July 17, 2026). The owner ratifies by +dated entry here; until then the verdicts in §4 are proposals, +FOUR_JUDGE_DESIGN.md and FOUR_JUDGE_BASIC_MODEL.md remain co-equal, and +any consumer of this record must say so."* + +### 7.1 Composition supersession (dated entry — July 19, 2026, Session 71) + +**Owner ruling: there are no base judges and no default cast.** Judges, +their registry selections, orientations, closed taxonomies, names and +anchors all compose per context at ceremony time from the REPL's own +fact and belief space. This record's §1 and §2 are hereby read as **one +composition instance for an epistemic driving question** — the "minimal +ecology instance" its own §1 already calls them — and not as a standing +roster. Governing records: +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §6 rule 4 (as +superseded, §6.1), +[`JUDGE_COMPOSITION_CEREMONY.md`](JUDGE_COMPOSITION_CEREMONY.md), and +[`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md). + +Three consequences for this record specifically: + +**(a) §2's four completed definitions are an instance, not law.** Their +per-role taxonomies (`unsupported_citation`…, `self_contradictory`…, +`uncorroborated`…, `rubric_gamed`…) are what one epistemic composition +looked like. They are not the classes a future composition must use, +and nothing may byte-pin, register, or schema-encode them as such. What +remains binding from §2 is the *schema* — the field set a judge +definition must fill — not the fills. + +**(b) The §4 Routing-stack divergence is reopened; its own falsifier +fired.** That row adopted S10 layers 3–4 and 6 while discarding layers +1–2 and 5 (context signature, semantic retrieval, +coverage/complementarity) as *"selection machinery a four-role fixed +panel does not need,"* with the recorded falsifier: *"an ecology larger +than one configuration per role — then the routing layers enter behind +their own proposal."* Under per-context composition that condition is +permanently met. **Layers 1, 2 and 5 enter now** (owner approval, +July 19, 2026), behind their own proposal, with AB-3/AB-8 binding any +weights or search. They are the machinery composing a cover over an +arbitrary linguistic topology requires. + +**(c) The §1 pairwise-disjointness pin moves, and loosens.** The +drill-pinned property — the four roles' qualified-parameter selections +are pairwise disjoint, computed from the definitions and failing if any +intersection is non-empty — was a static check over a fixed cast. It +becomes a **composition-time gate** run over each composed cover before +any judging. It also loosens: strict disjointness is not required of a +cover, since opens normally overlap and gluing happens on the overlaps. +The gate accepts either disjoint seats **or** overlapping seats with a +declared gluing rule, which §3.2's R-30 no-global-section outcome +already handles as a typed fork rather than a blend. + +Unchanged by this entry: §3.1's R-29 hard compatibility gate, §3.3's +cross-role vs same-jurisdiction resolution, and the §5 enforcement +tables (§5.1 intake, §5.2 convocation), whose rows record observed +behavior of shipped code. + +### 7.2 Standing-model pointer (dated entry — July 20, 2026, owner) + +A ratified standing model now sits above this record's verdict model: +[`STANDING_MODEL.md`](STANDING_MODEL.md) (owner-ratified as principle, +July 20, 2026). Two effects on this record, recorded here so the two do +not silently disagree: + +- **The verdict enum `clean | drawback | abstain` (§2) becomes the + signed delta `+1 | −1 | 0`** of a single ternary standing axis + (doubt/belief/fact). The enum mechanics and the §5.1/§5.2 enforcement + tables are **unchanged** — this is a reframing of what the enum *is*, + not an edit to shipped behavior. +- **Merit-refusal is superseded in principle** by user-gated + ratification (STANDING_MODEL §2): a value-mode candidate the panel + cannot dispute is recorded as user-gated rather than refused into + silence. No code changes under this entry; the supersession is a + gated build. + +STANDING_MODEL is ratified as *principle only* and authorizes no build; +this record's shipped surfaces stand until a separately gated build +changes them. + +### 7.3 Header correction (dated entry — July 22, 2026, owner) + +The header status line of this record read +`Status: PROPOSED — RATIFICATION OPEN` from authoring on July 17, 2026 +until this entry, four days after §7 ratified it. The two were read +together only by a reader who reached §7; a reader who stopped at the +header — which the house rule instructs, since a record's own header is +authoritative on its standing over any index — was told the opposite of +the truth, and `AGENTS.md` §2.1 correctly indexed this record as +RATIFIED against a header that denied it. + +Corrected under owner approval, July 22, 2026: the header now states +RATIFIED with the §7 date and act, and preserves the authoring date and +original PROPOSED standing so the transition is legible rather than +erased. **Nothing in §1–§7.2 changes.** This entry amends the status +line only. + +The general defect, recorded because it will recur: a dated ratification +entry lands at the bottom of a record and the header at the top is left +alone, so the file's most-read line contradicts its most-authoritative +one. Ratifying a record includes updating its header in the same act. diff --git a/.claude/skills/loop-orchestrator/references/STANDING_MODEL.md b/.claude/skills/loop-orchestrator/references/STANDING_MODEL.md new file mode 100644 index 0000000..bc0eb06 --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/STANDING_MODEL.md @@ -0,0 +1,179 @@ +# The Standing Model — how a claim is valued + +**Status: RATIFIED as principle — July 20, 2026 (owner, Cnid, in +session).** This record states the standing model the derivation games +of July 19–20, 2026 produced and the owner ratified. It is ratified **as +direction and principle**; it authorizes **no build**. Two carve-outs +below (§3, §5) mark exactly where ratification stops and a separately +gated build begins — reading past them would repeat the +instance-promoted-to-frame failure this program has already paid for +([`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md)). + +Companion record for the doubts tier this model's `-1` opens: +[`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +Governing composition law it extends: +[`RECONCILIATION.md`](RECONCILIATION.md) (dated pointer added there). + +--- + +## 0. The derivation ground — Trellis' target function + +**RATIFIED July 20, 2026.** Everything below derives from this, and +before July 19, 2026 it was undefined — `grep "target function"` +returned zero hits repo-wide, so every primitive derivation stood on an +ungrounded floor. + +> **Trellis is a personalized composable expert system whose expertise +> is the user's data.** Not strictly a coding tool; not strictly a RAG +> system. + +Stated by the collaborator (M. Murphy), owner-relayed July 19 and +owner-ratified July 20, 2026. Its immediate consequence is load-bearing +for the rest of this record: **the user is the domain authority by the +target function's own definition** — the system's expertise *is* the +user's data — which is why every place standing moves without a fact to +compel it, it moves by a **user gate** and not by the panel. + +## 1. The signed ternary + +**RATIFIED July 20, 2026 as the standing model.** + +A claim holds one **standing**: + +``` +-1 | 0 | +1 +doubt | belief | fact +``` + +- **Mode, verdict and standing are one vocabulary at two times.** A + candidate *has* a standing; a seat returns a *signed delta*; the + resulting standing is that delta composed against the prior. The + existing per-seat verdict enum (`clean | drawback | abstain`, + RECONCILIATION §2) is the delta's sign — `+1 | −1 | 0` — not a + separate object. +- **`-1` is constructed, not residual.** A doubt is a positive object + (a defeater's finding grounded in facts), not the mere absence of + support. Its tier is [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). +- **Corroboration, recorded because ratification followed it:** the + three ledger rows of [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) + §7 replay under this model with no verdict flipped, and the Sieve's + independent `PASS | REVISE | HALT` grammar instantiates the same + ternary with matching semantics (`+1 | 0 | −1`). This model was tested + against unpicked hands before it was ratified, not argued into place. + +## 2. User-gated ratification and the meet rule + +**RATIFIED July 20, 2026 as principle.** + +- **Submission is a vote.** A candidate the panel cannot dispute, that + the user has submitted to the ceremony, is **ratified carrying a + user-gated qualifier** — the qualifier meaning *only the user's + authority stands behind it*. This replaces merit-refusal, whose defect + is that it produces silence indistinguishable from "we never looked." + There is no tie. +- **The qualifier lives in the address**, as a distinct hash kind — not + as metadata propagated by discipline. Identity inside a hash-guarded + chain, so the qualifier cannot decay. +- **The meet rule** (owner-accepted explicitly, July 19): a derived + claim's hash kind is the **meet of its dependencies' kinds**. An + inference citing one user-gated address and one corroborated address + cannot mint a clean hash — the qualifier cannot launder itself in one + hop. + +The stamp mechanism (address layout, hash kinds) is a **build** detail, +gated below; the principle — user-gated ratification with a contagious, +non-decaying qualifier — is what is ratified. + +## 3. The panel never moves standing — CARVE-OUT + +**RATIFIED July 20, 2026 as principle. This ratifies the principle and +authorizes NO code removal.** + +The panel **emits signed findings; the user gates whether standing +moves, in both directions**: + +- a claim the facts do not reach → **user gates** (an unverifiable + belief, or an unverifiable doubt / skeptical lens — both recorded as + the user's, never ratified by the panel); +- a claim the facts refute → **the panel reports; the user gates** the + demotion. The engine has no standing to overrule the user about the + user's own domain (the Sieve HALTed engine auto-demotion on all three + lenses, DOUBTS_WORKSPACE game-8 record). + +**Consequence, and the carve-out.** If the panel never moves standing, +the promotion machinery reduces to **a findings recorder plus a user +gate**, and every disposition in the JUDGE_COMPOSITION_GAME §6 grammar +that *acts* (promote, merit-refuse) is really a user act the engine +records. **That reduction removes shipped engine surface.** This record +ratifies the *principle* that the panel is a recorder-plus-gate. It does +**not** authorize deleting or rewriting any shipped disposition code: +that is a bounded build under the usual authorization (owner dated +entry + drills + the paid-queue gate where a live run is involved). +Ratified principle; unbuilt reduction. + +## 4. Claim modes are a first vocabulary, not a primitive + +**RATIFIED July 20, 2026 as a reclassification.** + +The six claim modes (`fact | inference | prediction | value | belief | +experience`) are **a useful first vocabulary** — the same status +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §1 records for +S10's eleven judges (collaborator statement, owner-ratified). They are +**not** a validated primitive partition of assertion-space. The +provenance clarification obtained for the judges in July 2026 was never +obtained for the modes; the house assumed, then pinned the assumption +three ways (the three-way parity pins, +[`PRIMITIVE_ENCODING_AUDIT.md`](PRIMITIVE_ENCODING_AUDIT.md) finding 5). + +The primitive that replaces them is not a better list — it is the +**standing axis of §1 plus the applicability-by-locus mechanism** (a +claim's evidence locus; a seat's reachable locus; applicability = +non-empty intersection; DOUBTS_WORKSPACE §12.2). The applicability gate +currently keys on the six modes (`judge_panel.ts:464`); **re-deriving it +onto locus intersection is a build item**, not performed by this record. + +## 5. What is ratified, and what remains gated + +**Ratified (principle / direction):** the target function (§0); the +signed-ternary standing model (§1); user-gated ratification and the meet +rule (§2); the panel-never-moves-standing principle (§3); the +reclassification of claim modes as illustrative (§4). + +**NOT ratified here — each a separately gated bounded build:** + +- the address/hash-kind stamp layout (§2); +- the reduction of the promotion machinery to recorder-plus-gate, + including any code removal (§3); +- the re-derivation of the applicability gate onto locus intersection + (§4); +- anything requiring a **live** (paid) judge run, which stays behind the + paid-queue gate (owner dated re-opening + per-run approval under the + ≤$5 cap). + +**Correct ≠ reachable, and correct ≠ built.** A green suite proves the +first only; ratifying the principle authorizes neither the build nor the +run. + +## 6. Relationship to the records this extends + +- [`RECONCILIATION.md`](RECONCILIATION.md) — its verdict model + (`clean | drawback | abstain`) becomes the signed delta of §1; its + merit-refusal disposition is superseded by §2's user-gated + ratification. A dated pointer is recorded there; the enforcement + tables (§5.1/§5.2) that record shipped behavior are untouched until a + build changes the code they observe. +- [`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) — its §6 + disposition grammar is reframed by §3 (the acting dispositions become + user acts the engine records); its twenty rules bind unchanged. A + dated pointer is recorded there. +- [`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md) — the + `-1` tier; its §14 ratification is the companion to this one. + +## Provenance + +Produced by the derivation games of July 19–20, 2026 (players: owner +Cnid, collaborator M. Murphy, Claude). The standing half was corroborated +by unpicked ledger rows and the Sieve grammar; the doubts half +(DOUBTS_WORKSPACE) was empirically tested (13/14 flat-earth corpus +rejected). Ratified by the owner in session, July 20, 2026. Amended only +by dated entry, never by silent edit. diff --git a/.claude/skills/loop-orchestrator/references/TEST_TIME_TRAINING.md b/.claude/skills/loop-orchestrator/references/TEST_TIME_TRAINING.md new file mode 100644 index 0000000..c3dddfb --- /dev/null +++ b/.claude/skills/loop-orchestrator/references/TEST_TIME_TRAINING.md @@ -0,0 +1,1009 @@ +# Test-Time Training and the Sparse-Model Backend — Research-Track Record + +**Status: RESEARCH INITIATION (Session 45, July 13, 2026 — owner-directed).** +This record roadmaps a research track; it ratifies NO design decision, lands +NO machinery, and changes NO runtime byte. Every rung of the ladder in §7 is +owner-gated and enters as its own proposal with its own estimate. The record +follows the house document-first mold (rows 9/10/12: the design record +precedes any implementation), one stage earlier — this is the record that +decides whether a design record is ever warranted. + +**Origin.** The owner relayed an external collaborator's active line of work +(the same collaborator whose provenance-threading proposal became roadmap +row 9 — see `docs/COLLABORATOR_BRIEFING.md`): *increasingly optimized sparse +models in this harness*, adapted per turn by **Test-Time Training (TTT)** — +fast-weight layers trained during inference on the contents of the RLM's +context (the REPL variables), and — the collaborator's sharper claim — on the +harness's own composed meta-prompts, "increasing quality of response +overall." This record decomposes that claim, surveys the literature as of +July 2026, maps the mechanism onto Trellis's actual seams, and pre-states how +any adoption claim would be measured before a dollar or a GPU-hour is spent. + +--- + +## 1. Why this record exists + +Trellis's reasoning engine is an RLM — a root LM operating a persistent +Python REPL, with the knowledge substrate injected as live tool objects +(the MIT CSAIL formulation: Zhang, Kraska & Khattab, arXiv:2512.24601). The +root model today is `gpt-5.4-2026-03-05` behind the OpenAI API: a closed +model whose weights Trellis cannot touch. Every behavioral improvement this +project has shipped therefore lives in one of two layers: + +1. **Tooling shape** (the permanent owner direction after Session 28): + typed refusals, engine-computed addresses, gates, budgets — the + mechanism that closed transcription, laundering-T1, retrieval waste, + and the splice pathologies. +2. **Prompt text** (deprioritized after the module #2 retirement): the + composed system prompt, byte-pinned, reinforcing but never carrying the + behavior. + +TTT proposes a **third layer that Trellis has never had access to: the +model's own weights, adapted per run at inference time.** The proposal only +becomes physically possible if the backend moves (in whole or in part) to +open-weights models — which is exactly the collaborator's "increasingly +optimized sparse models" premise: modern sparse mixture-of-experts models +(the open-weights MoE class) are cheap enough to serve locally that +per-turn weight adaptation becomes an affordable, measurable lever rather +than a hypothetical. + +The reason to take this seriously is architectural fit, not fashion: the +RLM already treats context as an external environment queried through +code. TTT layers treat context as a training signal compressed into +weights. These are complementary compressions of the same thing — and the +harness's fixed, byte-pinned meta-prompt is precisely the kind of +repeated-prefix signal that fast-weight machinery amortizes well (§4.3). +The reason for caution is equally concrete: the strongest 2026 agentic +result (§3.4) found TTT gains are *stability-shaped*, not +capability-shaped, and the strongest 2026 evaluation paper found that +perplexity-style TTT wins often fail to appear as behavioral wins. Both +findings align exactly with this project's measurement doctrine, so the +ladder in §7 is built on it. + +## 2. The claim, decomposed + +The collaborator's description compresses three separable hypotheses. They +are stated here so each can be tested — or rejected — on its own. + +- **H1 (context adaptation).** Fast-weight layers trained per turn on the + REPL-resident context improve the model's use of that context — + long-context retrieval, cross-turn variable tracking, protocol + adherence over long episodes. *Literature status: supported at modest + effect sizes on long-context benchmarks (§3.2), with an explicit + behavioral caveat (§3.4). Trellis-specific status: unmeasured.* +- **H2 (meta-prompt adaptation).** Because the harness re-presents the + same composed meta-prompt bytes every turn (`RLM_SYSTEM_PROMPT` + + `TRELLIS_ADDENDUM`, byte-pinned at `COMPOSED_SYSTEM_PROMPT_SHA256`), + fast weights repeatedly trained over that prefix effectively *compile + the protocol into weights*, improving instruction-following on the + house protocol specifically. *Literature status: no direct study found; + the nearest mechanisms are prefix-state compilation (§3.3) and + fast-weight prefix processing (§3.1). This is the most original and + least evidenced hypothesis — it needs a positive control before any + belief attaches (§6).* +- **H3 (the sparse-model vehicle).** Open sparse MoE checkpoints are the + practical substrate: cheap enough to serve, open enough to adapt. + *Status: a premise about infrastructure, not a hypothesis about + behavior — but it smuggles in the real gating question, which is + whether ANY open model drives the house REPL protocol acceptably + before TTT enters the picture at all (§7 R3). No TTT×MoE unified + literature exists as of July 2026 (§3.5); expert-level adaptation is + an open question for the collaborator (§9).* + +The phrase "increasing quality of response overall" is treated throughout +this record as **an unmeasured hypothesis, not a finding.** Guardrail 8 +applies to prospective claims too: no headline until a paired arm exists. + +## 3. What the literature actually says (as of July 2026) + +Three mechanism families get called "test-time training." They differ in +where the weights live, when they update, and what infrastructure they +demand — conflating them is the most common error in secondhand accounts, +and the collaborator's "FastWeights" phrasing spans at least two of them. + +### 3.1 Family A — fast-weight layers as architecture + +The hidden state of a sequence layer IS a small model; the layer's forward +pass IS a gradient step on a self-supervised loss over the incoming +context. "Training during test time" is the layer's normal operation, and +an outer training loop learns the learning rule itself. + +- **TTT-Linear / TTT-MLP** (Sun et al., *Learning to (Learn at Test + Time): RNNs with Expressive Hidden States*, arXiv:2407.04620, ICML + 2025): the modern statement of the idea. Linear-complexity layers whose + hidden state (a linear model or 2-layer MLP) is updated by a + reconstruction loss per token; matches or exceeds Transformer and Mamba + baselines and — unlike Mamba — keeps improving past 16k context. +- **Titans** (Behrouz, Zhong & Mirrokni, Google Research, + arXiv:2501.00663, NeurIPS 2025): a neural long-term memory module + updated at test time by a surprise-metric gradient with momentum and + weight decay (forgetting); attention as short-term memory beside it; + scales past 2M-token context. **ATLAS** (arXiv:2505.23735) and the + test-time-regression unifying framework (arXiv:2501.12352) generalize + the family. +- **Large-chunk TTT / "Test-Time Training Done Right" (LaCT)** (Zhang + et al., MIT + Adobe, arXiv:2505.23884; OpenReview Tb9qAxT3xv): makes + nonlinear fast-weight updates hardware-efficient by batching updates + over extremely large chunks (2K–1M tokens) — lifting fast-weight + FLOPs utilization from <5% by orders of magnitude and scaling + nonlinear state to ~40% of model parameters. Demonstrated in three + domains: novel view synthesis (0.3B, 1M-token context, from + scratch), language modeling (760M + 3B at 32,768 context, FROM + SCRATCH — lower per-token loss at large token indices than GLA and + DeltaNet, competitive with full attention), and autoregressive video + diffusion — the one RETROFIT instance: the pretrained Wan 2.1 model + fine-tuned with all bidirectional attention REPLACED by LaCT + + sliding-window attention, quality COMPARABLE to the full-attention + baseline while enabling autoregressive generation. Authors' stated + limitation: state-based models are weaker at reasoning. **This is + the collaborator's selected mechanism — see §12.** +- **Lineage** (the collaborator's "FastWeights" vocabulary): fast weights + are Schmidhuber 1992 (*Learning to Control Fast-Weight Memories*) and + Ba et al. 2016 (*Using Fast Weights to Attend to the Recent Past*, + arXiv:1610.06258); Schlag, Irie & Schmidhuber 2021 showed linear + attention IS a fast-weight programmer (arXiv:2102.11174) — the formal + bridge explaining why in-context learning and fast-weight adaptation + are siblings. + +**Relevance to Trellis:** Family A requires the backend model to HAVE such +layers — either trained with them or retrofitted (the 2025 video result, +arXiv:2504.05298, grafted TTT layers onto a frozen pretrained DiT). Trellis +cannot add Family A to an API model. This family becomes available only at +or after §7 R3 (open-weights serving), and only if a checkpoint with these +layers exists or a retrofit is funded. + +### 3.2 Family B — per-instance adaptation of pretrained weights + +An ordinary pretrained model; an explicit optimizer step (usually LoRA or +rank-constrained fast weights) at inference time, on data derived from the +test input; weights discarded afterward. This is the family that works on +open checkpoints TODAY and the one every 2026 agentic result uses. + +- **TTT for ARC** (Akyürek et al., *The Surprising Effectiveness of + Test-Time Training for Abstract Reasoning*, arXiv:2411.07279): per-task + LoRA adapters trained at test time on augmented demonstrations; up to + 6× accuracy over the fine-tuned base; 53% on ARC public with an 8B + model. The canonical evidence that per-instance gradient steps buy real + capability on the right task shape. +- **TTT on nearest neighbors** (Hardt & Sun, arXiv:2305.18466, ICLR + 2024): fine-tune briefly on retrieved neighbors of the test input. + Directly suggestive for Trellis: the retrieval substrate could FEED the + adaptation data path — with all the provenance questions §5 raises. +- **TTT-NTP** (Ouyang, Cai & Hu, *Test-Time Training with Next-Token + Prediction*, arXiv:2606.21803, June 2026): drop-in fast weights at MLP + down-projections, chunk-parallel rank-one updates tied to the native + next-token loss; works on released checkpoints (Llama-3.1-8B, + Mistral-7B, Qwen3 series); +3–4 points on RULER 4k–32k, +3.7–5.6 on + LongBench-v2, general knowledge preserved. The current best evidence + that fast-weight adaptation is deployable on open models without + architectural surgery. +- **Self-guided TTT for long context** (arXiv:2607.09415, July 2026): the + model selects relevant spans before adapting on them — TTT with a + retrieval step in front, again adjacent to Trellis's shape. + +### 3.3 Family C — compiled-state cousins (no per-turn gradient) + +- **Cartridges / self-study** (arXiv:2506.06266): train a compact + KV-like state per corpus OFFLINE, reuse it at inference — amortized + context rather than per-turn training. The nearest existing mechanism + to H2's "compile the meta-prompt" reading. +- **SEAL** (arXiv:2506.10943): the model writes its own finetuning data + and applies persistent self-edits — adjacent but PERSISTENT, which + places it outside this track's per-run-ephemeral scope (§5.3). +- **Transformer²** (arXiv:2501.06252): inference-time expert-vector + selection over SVD components — adaptation without test-time gradients. + +### 3.4 The two 2026 results that most constrain this track + +1. **Agentic TTT** (*No Time Like the Present: Agentic Test-Time Training + for LLM Agents*, arXiv:2607.03441, July 2026): continuous in-episode + LoRA updates for multi-turn agents (vLLM runtime-LoRA serving), with + token-level loss reweighting to stop the feedback loop where each + update changes the policy that generates the next batch of training + text. Gains: up to +5.0 ALFWorld / +4.9 SWE-bench Lite at 1.9× serving + cost — and the authors' own characterization is that aTTT **preserves + existing competence over long trajectories rather than teaching new + abilities.** For Trellis this is the most load-bearing external fact: + the realistic H1 payoff is *protocol-adherence stability over long + REPL episodes*, a quantity the harness already counts + (`TRELLIS_PROTOCOL_VIOLATION`, answer-channel compliance, criterion + items in every measured run). +2. **Beyond Perplexity** (arXiv:2607.00368, July 2026): a behavioral + evaluation framework for TTT deployment-memory claims; finds that + perplexity improvements from TTT frequently fail to appear as + behavioral ability to USE the newly absorbed information. This is the + house measurement doctrine stated independently: a TTT arm must be + judged on task behavior with pre-stated criteria, never on loss + curves. §6 adopts it explicitly. + +### 3.5 What was NOT found + +No unified TTT×sparse-MoE literature (expert-level fast weights, routed +adaptation) as of July 2026 — the intersection is the collaborator's +research premise, not an established result, and §9 asks them for their +formulation. No direct study of fast-weight adaptation to a fixed +harness meta-prompt (H2) was found either; H2 is genuinely open. + +## 4. What TTT would mean inside Trellis — the seams, named + +### 4.1 The backend seam today + +The model backend is hardcoded at exactly the places an R2 audit must +census (initial grep, to be completed by R2): + +- `src/rlm/trellis_agent.py` passes + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` to the rlms + scaffold at both construction sites (research mode and author mode), + and constructs a direct `openai.OpenAI()` client for the checker-model + path. The rlms library (rlms==0.1.3, pinned) owns the actual API + transport; **whether it exposes a base-URL/backend override without + library modification is UNKNOWN and is R2's first question** — + guardrail: no rlms modifications, so if it does not, the serving layer + must present an OpenAI-compatible endpoint (vLLM and SGLang both do; + the aTTT paper's serving stack is vLLM's runtime-LoRA API, which is + encouraging for R4's feasibility). +- The worker-side completions (extraction, entailment judge, sweeps) have + their own client constructions and pricing constants + (gpt-5.4 $2.50/M in, $10/M out appears in runner spend gates) — R2 + censuses these; nothing here assumes they move. **A split backend + (open model for the RLM root, API model for extraction/judging) is a + legitimate intermediate state** and probably the first real + configuration. + +### 4.2 The embedding coupling — a substrate-identity trap named early + +`vector_search` similarity runs against STORED embeddings: +`src/config/schema.ts` pins `embedding vector(1536)` with an HNSW index, +and `search_ast_nodes` orders by distance to a query embedding produced by +the SAME embedder family. Swapping the embedding model is therefore NOT a +config change: stored embeddings and query embeddings must come from the +same space, the schema pins the dimension, and a different embedder +invalidates every stored vector (a re-embed of the full live substrate, at +cost, plus a schema migration if dimensions differ). **The completion +backend and the embedding backend are separable decisions.** The cheap, +sane first configuration keeps the OpenAI embedder while the completion +backend moves. If the embedder ever moves, that is a substrate-identity +event in the Session 38 grammar-pin sense: recorded, owner-visible, +re-measured (the eight pinned seam queries are the standing instrument — +they are embedder-sensitive by construction). + +### 4.3 The meta-prompt prefix and the byte pins (H2, mechanically) + +Every research run presents the same composed prompt prefix, byte-pinned +(`COMPOSED_SYSTEM_PROMPT_SHA256 = 6183de3a…ed50` since the Session 51 +re-pin — `scripts/test_modules.py` is authoritative; the pin moves only +with witting kernel changes). Two consequences if the backend ever carries +fast-weight machinery: + +1. **Determinism of the prefix trajectory.** A fast-weight layer's state + after processing a FIXED prefix is a pure function of (checkpoint + hash, TTT config, prefix bytes). The prefix-adapted state can be + computed once and snapshotted — H2's "optimizes the response to our + internal meta-prompts" becomes, concretely, a **prefix fast-state + cache** whose natural cache key is exactly the composed-prompt sha256 + the module registry already maintains. The house byte-pin discipline, + built for prompt integrity, is coincidentally the exact cache-key + discipline this mechanism needs. (Family C's cartridges are the same + idea with offline compilation.) This is an observed architectural + synergy, NOT a promised speedup — R5 measures or drops it. +2. **The pins become load-bearing for a new reason.** Today a silent + prompt-byte drift breaks a hash check; under a prefix fast-state + cache it would also silently invalidate (or worse, mis-serve) an + adapted state. The existing rule — pins move only wittingly, both + recomputed in the same commit — already covers this; the R5 design + record would add the checkpoint hash and TTT config to the key. + +### 4.4 Per-run state semantics + +The house per-run doctrine transfers wholesale: the Session 30 retrieval +set is "per run = per process, monotone, never parked." Fast weights get +the same shape — **per-run ephemeral, reset at process start, never +serialized, never parked, never seeded across runs.** In the multi-turn +REPL, each turn re-presents the transcript, so a stateless serving backend +re-derives the fast state from the full prefix each turn; any within-run +state carry is a serving optimization, not a semantics change. Cross-run +persistence of adapted weights (the SEAL shape) would be a +capability-promotion event — Tier-3-to-somewhere — and is explicitly OUT +of this track's scope; if it is ever wanted it enters through its own +design record with its own gate, exactly as promotion did. + +## 5. Trust-model analysis + +### 5.1 Fast weights have no provenance standing + +A fast-weight state is derived, ephemeral, and untraceable to specific +source bytes in the substrate sense — it is a compressed function of +everything the run saw. It therefore gets the Tier-3 treatment by +definition: **zero provenance standing, structurally incapable of minting +citations.** Nothing about weight adaptation touches what may be written +to the graph: writes still flow through `write_derived_insight`'s +three-layer enforcement (format → existence → retrieval membership), and +the cited addresses still have to be in the run's retrieval set. + +### 5.2 The gates are model-agnostic by construction — the designed-in strength + +Every enforcement mechanism this project built lives ENGINE-SIDE, in the +tool layer and the write path, not in the model: the Session 14 write +path, the Session 30 retrieval set, the Session 31 membership gate, the +Session 32 sampled detector, the Session 33 dedup/budgets, the Session 41 +guarded splice family. **A backend swap — dense to sparse, API to local, +static to TTT — changes NONE of them.** This is not luck; it is the +tooling-shape doctrine paying out: because no behavioral guarantee was +ever entrusted to the model, no behavioral guarantee is lost when the +model changes. The trust model's answer to "can we swap the model?" is +"the trust model never depended on which model." + +### 5.3 The threats a TTT backend adds (named now, measured later) + +1. **Injection amplification.** Today, adversarial bytes in retrieved + content influence one completion. Under TTT they also influence the + WEIGHTS that process every subsequent token of the run — retrieved + content becomes training data mid-flight. The existing containment + story (bounded tool surfaces, typed refusals, the write gates, sampled + entailment) still holds at the action boundary, and per-run reset + bounds the blast radius to one run. But the T2 lesson generalizes: + *what the model absorbed* is not observable the way *what the model + cited* is. Any R4 proposal must state its adaptation-data policy — + what byte sources are eligible to produce gradients (REPL-resident + retrieved blocks? tool outputs? the meta-prompt only?) — as explicitly + as the retrieval set defines citability today. +2. **Cross-run contamination.** Handled by construction if §4.4's + per-run-ephemeral rule is kept absolute. The rule is stated in this + record precisely so a future convenience ("warm-start from the last + run's adapter") is recognizable as a design change, not an + optimization. +3. **Reproducibility.** A TTT run's behavior is a function of checkpoint + hash + TTT config (rank, learning rate, chunk size, seed) + the full + input trajectory. The Session 38 doctrine transfers: **a model + checkpoint is a substrate-identity object — exact-pinned by hash, + bumped only as a recorded owner-visible event.** TTT config values are + run-stamped in telemetry (counts and config echoes, never content), + the same way arm assignment was verified per run in the Session 43 + measurement. + +## 6. Measurement doctrine applied (before any spend) + +The permanent owner direction (July 11–13, 2026) is that behavioral claims +are settled by paired measurement with pre-stated criteria, and failure +classes close by tooling shape. TTT is neither tooling shape nor prompt +text — it is a third substrate — but the acceptance discipline transfers +unchanged, and Trellis is unusually well-instrumented for it: + +- **The instruments already exist.** The `est` suite (five + sufficiency-bounded questions, truths unit-pinned) is a ready-made + paired-arm harness — it was row 10's acceptance instrument and runs + identically against any OpenAI-compatible backend. The + effective-context probe suites, the OOLONG-hard set, protocol-violation + and answer-channel counters, and the stage-2 criterion mold are all + backend-independent. +- **The positive-control duty (the Session 28 lesson, restated for TTT):** + before believing ANY TTT null OR win, build a condition where the + no-TTT arm demonstrably fails and verify TTT moves it. H1's natural + positive control is a long-horizon episode shaped like aTTT's setting + (protocol drift over many turns); H2's is a protocol-adherence task + where the base open model measurably violates the house protocol at a + known rate. *A null result is meaningless until the experiment has + demonstrated it can produce a positive one* — the A/B eval's + meta-lesson, verbatim. +- **Behavioral, never perplexity** (arXiv:2607.00368 adopted): every + criterion item is a task-behavior count (correctness, violations, + refusals handled, tokens, dollars/GPU-minutes) — loss curves and + perplexity may be RECORDED but never satisfy a criterion. +- **Counts and correctness together** (guardrail 4): a TTT arm that cuts + tokens but drops correctness FAILS; one that lifts correctness at 1.9× + serving cost reports both numbers. + +## 7. The rung ladder (each rung owner-gated, propose-with-estimate) + +The ladder is sequenced so every rung is cheap to refuse and no rung +assumes a later one. R2 is the only rung a session can execute without new +infrastructure or budget beyond its own time. + +- **R1 — collaborator exchange (zero-paid, owner-mediated).** Deliver + this record and §9's questions to the collaborator through the owner + (the briefing's five-line proposal frame). Their formulation of the + TTT×sparse intersection shapes R4's arms. No session dependency — + proceeds in parallel with everything. +- **R2 — the backend-seam audit (zero-paid; the next actionable rung).** + A read-only census + design record: every site that assumes the OpenAI + transport, the gpt-5.4 model id, its pricing, or its token accounting + (`trellis_agent.py` construction sites, the direct client + constructions, worker completions, runner spend gates, telemetry + parsers); whether rlms==0.1.3 admits a base-URL override WITHOUT + library modification (guardrail: no rlms mods — if not, the seam is an + OpenAI-compatible serving endpoint, full stop); the embedding-coupling + boundary (§4.2) stated as a non-goal; the split-backend configuration + (§4.1) designed as config, refusal-typed, defaulting to today's exact + behavior byte-for-byte. Output: a design record in this file's §12 (or + its own file if it outgrows this one) + NO implementation until the + owner separately approves one. +- **R3 — the open-sparse baseline (paid: GPU or hosted-endpoint spend; + needs R2's record).** Serve ONE owner-chosen open sparse checkpoint + (exact-pinned by hash) behind an OpenAI-compatible endpoint; run the + est suite + a protocol-adherence block against it, paired against a + same-day gpt-5.4 arm. **The gating question is R3's, not R4's: can an + open sparse model drive the house REPL protocol at an acceptable + violation rate at all?** If R3 fails its pre-stated criterion, the + track PAUSES at a recorded finding — TTT on a model that cannot drive + the protocol is measurement noise. (R3 is also independently valuable: + it prices the API-cost exit for ordinary runs.) +- **R4 — the paired TTT arm (paid; needs R3 PASS).** The same checkpoint + with a Family-B mechanism (aTTT-style in-episode LoRA or + TTT-NTP-style fast weights — R1's exchange picks), same instruments, + TTT on/off paired, adaptation-data policy pre-stated (§5.3.1), + per-run-ephemeral verified in telemetry both directions (the + Session 43 arm-verification mold). Criterion pre-stated in the R4 + proposal; the H1 expectation calibrated by §3.4 (stability-shaped, not + capability-shaped). +- **R5 — the meta-prompt fast-state measurement (paid; needs R4 to have + produced a mechanism worth keeping).** H2 isolated: prefix fast-state + compiled over the composed prompt (cache key = composed-prompt sha256 + + checkpoint hash + TTT config, §4.3), measured on protocol-adherence + deltas specifically. If R4 died, R5 dies with it — H2 is not reachable + by API. + +**Cost doctrine.** Local serving spends GPU-hours, not per-token dollars. +The standing ≤$5/run cap re-expresses as an owner-set per-run compute +budget stated in the R3/R4 proposals (estimate before, actuals after, in +the roadmap §5 entry — unchanged ceremony). Hosted open-model endpoints +(per-token) stay under the $5 cap as-is. + +## 8. Honest scope — what this record does NOT claim + +- **No TTT is possible on the current backend.** gpt-5.4 is an API model; + nothing in this track changes today's runtime, and no runtime byte + moved in the session that wrote this record. +- **"Increases quality of response overall" is a hypothesis** (H1+H2), + not a finding — and the best current external evidence (§3.4) predicts + the honest win is *stability over long episodes*, at ~2× serving cost, + not a general quality lift. If the measurements come back + stability-only, that is the finding this record's ladder was built to + produce, and it gets reported at exactly that size. +- **H2 has no direct literature support** — it is the collaborator's + conjecture plus an architectural synergy observation (§4.3). It is + listed last in the ladder for that reason. +- **The sparse premise is not evaluated here.** Whether optimized sparse + checkpoints are the right vehicle is R3's empirical question and the + collaborator's expertise; this record maps the harness side only. +- **This record makes no promise that the track proceeds.** If the owner + never gates R2 open, this file is a complete, self-contained account of + why not-yet — which is a legitimate steady state. + +## 9. Questions for the collaborator (via the owner; the briefing's frame) + +1. **Mechanism selection.** For a multi-turn REPL agent with a fixed + ~10k-token protocol prefix and run-resident retrieved context: which + concrete mechanism do you have in mind — architectural fast-weight + layers (TTT-Linear/Titans class, needs a trained-with-TTT + checkpoint), in-episode LoRA (aTTT class, works on any open + checkpoint via runtime-LoRA serving), or drop-in fast weights at MLP + projections (TTT-NTP class)? Our R4 arms depend on this choice. +2. **The sparse intersection.** "Increasingly optimized sparse models" — + is the sparsity doing WORK in your formulation (expert-level + adaptation, routed fast weights — a literature we could not find as + of July 2026), or is it the economics (open MoE = cheap serving) with + TTT orthogonal? If the former: what does a positive control for + expert-level adaptation look like? +3. **The meta-prompt claim (H2).** What is the mechanism by which + fast-weight adaptation over a FIXED prefix improves responses beyond + what the frozen model already extracts from attending to that prefix? + A gradient step over bytes the model has fully attended to is not + obviously additive — is the claim about effective capacity, about + depth-of-processing, or about something empirical you have observed? + A failing case we can reproduce (your five-line frame's "Failure it + closes") would move this from conjecture to rung. +4. **The adaptation-data policy (§5.3).** In your setup, what byte + sources are eligible to produce gradients at test time? Our trust + model needs this stated as precisely as the retrieval set defines + citability — retrieved substrate blocks, tool outputs, the prefix + only, or everything in the REPL? + +## 10. Reading list (dependency order, identifiers verified July 13, 2026) + +| # | work | why it matters here | +|---|---|---| +| 1 | Zhang, Kraska & Khattab, *Recursive Language Models*, arXiv:2512.24601 | the formulation Trellis implements; TTT would live UNDER this; locator-verified note: [OpenCnid/recursive-language-models](https://github.com/OpenCnid/recursive-language-models) | +| 2 | Sun et al., *Learning to (Learn at Test Time)*, arXiv:2407.04620 | Family A's modern statement (TTT-Linear/TTT-MLP) | +| 3 | Behrouz et al., *Titans*, arXiv:2501.00663 (+ *ATLAS*, arXiv:2505.23735) | fast-weight long-term memory at 2M+ context | +| 4 | Ba et al., arXiv:1610.06258; Schlag et al., arXiv:2102.11174 | the FastWeights lineage; attention ≈ fast-weight programming | +| 5 | Akyürek et al., arXiv:2411.07279 | Family B's capability ceiling (ARC, 6×) | +| 6 | Hardt & Sun, arXiv:2305.18466 | TTT on retrieved neighbors — the retrieval-fed variant | +| 7 | Ouyang, Cai & Hu, *TTT-NTP*, arXiv:2606.21803 | drop-in fast weights on open checkpoints (June 2026) | +| 8 | *No Time Like the Present: Agentic TTT*, arXiv:2607.03441 | the multi-turn agent result + the stability-not-capability finding | +| 9 | *Beyond Perplexity*, arXiv:2607.00368 | the behavioral-evaluation framework §6 adopts | +| 10 | *Cartridges*, arXiv:2506.06266; *SEAL*, arXiv:2506.10943 | Family C: compiled prefix state; persistent self-edits (out of scope) | +| 11 | *Self-Guided TTT*, arXiv:2607.09415; LaCT, arXiv:2505.23884 | span-selected adaptation; hardware-efficient large-chunk TTT — the §12 selected mechanism | +| 12 | Szafer et al., *Navigating the Cost-Performance Pareto Frontier of Test-Time LLM Agent Adaptation*, ICLR 2026 (OpenReview tWAnCRYMcT) | cost-performance frontier; adaptation helps reasoning not facts; rollout dominates wall-clock | +| 13 | Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633 (ICML 2025) | reports (Observation 3) LoRA mitigates forgetting more than full-parameter updates in the TTL setting; the drift-bound citation | +| 14 | Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace | workspace / Jacobian-lens; the §12.7 potential avenue; small-model reproductions | + +## 11. Interaction with standing guardrails (nothing weakened) + +- **No rlms library modifications** (guardrail 10): the backend seam, if + ever built, is config + an OpenAI-compatible endpoint, or it is not + built. +- **The write path, retrieval set, membership gate, detector, discipline, + and guarded family are untouched by anything in this track** (§5.2); + fast weights never gain provenance standing (§5.1); per-run-ephemeral + is absolute within this track (§4.4). +- **Model checkpoints and embedders are substrate-identity objects**: + exact-pinned, bumped as recorded owner-visible events (§4.2, §5.3.3); + the embedder does not move as a side effect of the completion backend + moving. +- **All spend owner-gated propose-with-estimate**; the compute-budget + re-expression (§7) changes the unit, never the ceremony. +- **Experiment flags follow the house mold**: any TTT on/off arm flag is + probe-only, off by default, byte-identical unset, stripped by + `buildAgentEnv` — exactly the `TRELLIS_EXP_*` pattern. +- **No default changes**: today's backend, prompt bytes, and pins are the + baseline every rung is measured against; a rung that lands still + changes no default without its own recorded owner decision. + +## 12. The R1 exchange — the collaborator's selection and the reliance claim (added July 13, 2026, same day) + +The owner relayed the collaborator's response to this record the same +day it was written, referring to §3.1's LaCT entry. Verbatim: + +> "This is the model we aim to use. With open weights, we can add a +> synthetic set layers that are the fast weights. Trellis can do this. +> It has provenance to check procedure. It can ensure the meta-prompts +> are followed as strongly as possible based on the data in the REPL. +> Each can be combined to ensure all meta-prompts perform as well as +> possible for output sculpting and efficiency. The research shows this +> improves base model performance. That's the claim we're relying on +> for our application." + +This answers §9 question 1 and sharpens questions 2–4. What it +settles, what it opens, and what the house doctrine requires before +the reliance claim carries weight: + +### 12.1 The selection, verified against the primary source + +LaCT (arXiv:2505.23884) was re-verified against the paper on July 13, +2026; the §3.1 entry now carries the full experimental facts. The two +that matter for the plan as stated: + +1. **"Add a synthetic set of layers that are the fast weights" is the + Wan-2.1 retrofit pattern, and it is a TRAINING JOB** — the paper's + only pretrained-model instance fine-tunes the model with the new + layers in place (attention layers replaced by LaCT + sliding-window + attention). It is not an inference-time configuration. In this + record's terms the selection is **Family A obtained by retrofit**. +2. **The retrofit result reads COMPARABLE, not improved** — quality on + par with the full-attention baseline while enabling autoregressive + generation at linear long-context cost. The paper's superiority + results are from-scratch architecture comparisons (760M/3B language + models at 32k context beating GLA and DeltaNet on long-context + per-token loss; competitive with full attention). + +### 12.2 The reliance claim, decomposed (the Session 28 discipline: a premise relied on is a premise measured) + +- **C1 — SUPPORTED.** Large-chunk fast-weight layers are + hardware-efficient (utilization lifted from <5% by orders of + magnitude; state to ~40% of parameters) and match or beat + efficient-architecture baselines on long-context tasks; the retrofit + path is feasible and quality-preserving. The *efficiency* half of + "output sculpting and efficiency" has real support. +- **C2 — EXTRAPOLATED.** "The research shows this improves base model + performance," applied to retrofitting an open LLM: LaCT does NOT + show this. Its LM results are from-scratch comparisons at ≤3B/32k + against linear-attention baselines; its one retrofit reads + comparable, not improved. The nearest direct support for + pretrained-LLM improvement is TTT-NTP (Family B, +3–4 RULER points) + and aTTT (stability-shaped, §3.4). **C2 is the load-bearing gap that + R3/R4 exist to measure** — stated here so nobody mistakes the + premise for a result. +- **C3 — UNTESTED.** "Ensure the meta-prompts are followed as strongly + as possible … output sculpting" = H2. No literature, LaCT included, + measures prompt-adherence effects of fast weights. Trellis's + instruments (protocol-violation counts, answer-channel compliance, + criterion items) are exactly the right meter; R5 — or an explicit R4 + criterion item — carries it. +- **One overlap named — then CORRECTED by the owner (same day):** the + first version of this bullet argued LaCT's long-context wins do not + apply because the RLM removes the corpus from attention. The owner's + correction, recorded: **large REPL dumps ARE long-context modeling + in practice** — the code-mediated-text discipline stops the model + *retyping* retrieved bytes, not *reading* them; printed fetch + results, block texts, code, and extraction working sets flow through + attention every turn, and the planned workload uses a substantial + share of the worker agents' context to code and extract accurately. + The architecture point survives only in narrow form (the corpus + RESIDES outside attention and is fetched selectively); the per-run + token flow is genuine long-context load, so C1's long-context + quality-and-efficiency results apply to this application directly. + §3.4's stability-shaped expectation remains the calibration for C2. +- **The authors' own limitation transfers:** state-based models are + weaker at REASONING — the capability the RLM leans on hardest (LaCT + pairs fast weights with window attention partly for this reason). + Any R3/R4 criterion must include reasoning-shaped items; the est + suite already is. + +### 12.3 What "Trellis can do this" means, precisely + +Trellis cannot train layers and acquires no training pipeline under +this track. What Trellis contributes — and why the collaboration is +shaped right: + +1. **The acceptance instrument:** backend-independent paired-arm + measurement with pre-stated criteria (§6) — the est suite, the + protocol counters, OOLONG-hard, the probe suites. +2. **Provenance-gated adaptation data** — the collaborator's "it has + provenance to check procedure," read in this record's terms: the + §5.3 adaptation-data policy can be ENFORCED by the substrate. The + fast-weight training signal can be restricted to engine-verified + LIVE blocks with the run's retrieval set as the eligibility + boundary, making *what the model absorbed* auditable the way *what + the model cited* is today — and directly bounding the §5.3 threat 1 + injection amplification. This is a design seed for the R4 proposal, + not machinery. +3. **The serving seam:** R2's audit, unchanged by this exchange. + +Division of labor recorded: the retrofit training job is +COLLABORATOR-SIDE (or its own owner-funded proposal — either way it is +not a rung of this repo's ladder); Trellis-side rungs R2→R5 are +unchanged in order. + +### 12.4 Ladder deltas from this exchange + +- **R1:** question 1 ANSWERED (LaCT). Questions 2–4 stand — and + §12.3's enforcement offer sharpens question 4 into a concrete + proposal for the collaborator: shall the adaptation-data eligibility + boundary BE the run's retrieval set? +- **R3** gains a checkpoint requirement: the baseline arm should be + the SAME open checkpoint the retrofit will start from, so R4's + comparison isolates the added layers. +- **R4** arms are now concrete: the base open checkpoint vs the same + checkpoint with trained-in large-chunk fast-weight layers, same + instruments, adaptation-data policy pre-stated. Its criterion + inherits C2 and C3 explicitly — a stability-only result is a + finding, not a failure, but it is not C2, and it gets reported at + exactly its size (guardrail 8, Session 45's version). +- No rung's gate moved: everything remains owner-approved + propose-with-estimate. + +### 12.5 The empirical decision and the reproduction landscape (added later on July 13, 2026) + +The owner's follow-up framed the undertaking as **"our own private +repro study with expansion"** and asked whether the empiricals are +worth running versus checking existing reproduction studies first. +Both were done in order; the landscape check (same day, zero-paid): + +- **LaCT is peer-reviewed:** published at ICLR 2026 (no longer just a + preprint) — confidence in C1 rises. +- **Official code exists:** github.com/a1600012888/LaCT, including + fused Triton kernels for the TTT layer — a private reproduction + starts from released code, not a reimplementation. +- **Independent groups already retrain the LM setup:** the KV-binding + analysis (arXiv:2602.21204) trains its own 760M LaCT-LLM baseline on + 100B FineWeb-Edu tokens; the mechanism has also been adopted + downstream in other domains (ZipMap, arXiv:2603.04385; elastic + spatial memory, arXiv:2604.07350). The reproduction half of the + undertaking carries good priors. +- **A reproducibility-report culture exists in the TTT space** + (e.g., arXiv:2511.16691 for TTT-on-nearest-neighbors) — but **no + external study covers C2 or C3**: nobody has published "retrofit + fast-weight layers onto an open LLM and measure whether the LLM + improves," and nobody has measured meta-prompt adherence under fast + weights at all. The expansion half is novel measurement. + +**The verdict recorded:** the empiricals are worth running, and they +are the ONLY route to C2/C3 — no amount of literature checking closes +a gap the literature has not measured. The ladder is already shaped as +exactly this study: R3 = the reproduction half on our workload (the +same-checkpoint baseline; does quality hold under the protocol), R4 = +the expansion half (C2 improvement, C3 adherence, the +provenance-gated adaptation-data policy). The house measurement +machinery — pre-stated criteria, paired arms, verdicts recorded +pass-or-fail with actuals — is a reproduction-study harness by +construction. Gates unchanged: each rung still enters as its own +owner-approved proposal. + +### 12.6 The chunking — RATIFIED (owner, July 13, 2026): phases 0–3 and the feature-class self-edit rung + +The owner ratified the following decomposition the same day, together +with the proposal that Trellis itself authors the Trellis-side code +("a prime target for Trellis editing Trellis and expanding +functionality … build this using Trellis, then we come back and +review it"). Ratification covers the SHAPE — every increment and +every paid run below still enters as its own owner-approved proposal +with its own estimate (the standing gate ceremony is untouched). + +**The new rung class this creates, defined here:** a **feature-class +self-edit increment** — a TASK-ASSIGNED functionality increment +authored by Trellis through the stage-2 harness, in the lineage of +the Session 26 W-series and stage-2 increments 1–2 (which were +assigned tasks, not discovered defects). This is DISTINCT from the +defect-class increment 3, whose never-manufacture rule is untouched: +a planted defect invalidates a discovery measurement; an assigned +feature task is not a discovery claim and manufactures nothing. +Feature-class criterion mold (assembled from the standing pieces): +the standing five items (named-file-only diff; the evidence +contract's one recorded insight through the Session 31 gate; +`stage2:check` zero findings; human `git diff` review acceptance; +spend within estimate) PLUS guarded-only (`textedit_raw_splices == +0`) PLUS the parse gate PLUS the increment's own new unit pins green. +The toolkit never touches git; every diff is human-reviewed; landing +is a human PR — "build using Trellis" means Trellis AUTHORS under the +harness, humans land. + +**The spec-before-pen rule (the grounded-authoring lesson applied):** +the seam design record is HUMAN-authored before any T-increment runs +— self-edit runs are only as well-posed as their task text, and the +ratified record is what task texts derive from. + +**Phase 0 — human-authored spec sessions:** +- **R2a** — the backend-seam census + the rlms verdict (Session 46's + §3 objective; read-only, zero-paid; §7 R2 items a/b). +- **R2b** — the seam design record (§7 R2 items c/d): config shape, + typed refusals, the three-way split backend (root completion / + worker completions / embedder), today's behavior as the + byte-identical default; each T-increment's scope and task-text + skeleton pre-stated in it. + +**Phase 1 — the Trellis-edits-Trellis T-series (feature-class +increments; each owner-gated ≤$5, one increment-record each in the +§5e/§5g mold, human-reviewed diff each; smallest first — the +executable-class ladder has never landed a run, so the first rung is +deliberately tiny):** +- **T1** — the config surface: backend config keys + validation + + typed refusals + unit pins (no call-site change). +- **T2** — `buildAgentEnv` forwarding/strip for the new config, with + its unit pins (the experiment-flag mold). +- **T3** — the `trellis_agent.py` construction-site rewire + (`backend_kwargs` from config; default byte-identical; the policy-2 + substrate already covers this file, so graph-informed editing works + today). +- **T4** — the fixture-endpoint drill: a zero-LLM stub + OpenAI-compatible server (the fixture-MCP-server precedent) proving + the byte-identical default and the seam switch. +A failed T-increment gets the increments-1/2 treatment: diagnose, +close the class mechanically, retry as its own proposal. + +**Phase 2 — measurement sessions (runs, not edits):** R3a serving +bring-up + protocol smoke; R3b the paired baseline measurement (the +reproduction half); then the R4 chunks when the collaborator's +retrofit checkpoint lands (exact-pinned): R4a checkpoint acceptance + +smoke, R4b the paired C2 measurement, R4c the C3 adherence +measurement, R4d the adaptation-data-policy record (for Family-A +layers the adaptation data IS the token stream — the policy chunk +states what enters context and how the §12.3 provenance gating +applies). + +**Phase 3 — R5** (meta-prompt fast-state, H2 isolated). + +**Dependencies named:** (1) this record lives in `docs/` — outside +extraction scope — so T-series runs cannot query the graph about the +spec; task text carries the spec verbatim (the increments-1/2 +channel) until stage-1b chunk A lands (a natural synergy, not a +prerequisite). (2) Refresh-before-use applies to every T-increment's +target area (the split-scope recipe; `src/rlm` is the policy-2 leg). + +### 12.7 External cost-performance evidence and an adaptation-behavior avenue (added July 13, 2026, same day) + +Three items logged after the §10 list was compiled, recorded here because they sharpen the R3/R4 criterion and the estimate basis; no gate moves. + +1. Cost-performance frontier (Szafer et al., ICLR 2026; OpenReview tWAnCRYMcT). A unified empirical study of test-time agent adaptation under verifiable feedback (binary correctness, unit tests), streaming evaluation scored on pre-update predictions, adaptation compute measured as wall-clock, comparing in-context memory (ExpRAG, ReMem) against in-weights GRPO (LoRA, full fine-tuning) on open reasoning models (Qwen3-8B, Olmo3-7B). Two findings bear on this track: + - Gains concentrate on tasks that need better reasoning over knowledge the model already holds, and are near-zero on tasks that need facts the model never learned. On Qwen3-8B, AIME24 rises 0.536 to 0.642 for both LoRA and full fine-tuning; AIME25 rises 0.429 to 0.500 (LoRA) and 0.464 (full fine-tuning); GPQA and MMLU-Pro show no consistent gain. This is external support for the H1 framing and against "quality of response overall," and it hardens the existing requirement that an R3/R4 criterion be scored on reasoning- and protocol-shaped items; a knowledge-recall criterion would flatline for reasons unrelated to whether TTT works. + - The backward pass is a small fraction of per-step wall-clock; forward-pass generation (rollout) dominates. Consequence for R4's propose-with-estimate: the paid estimate is a generation-token estimate, not a training-cost estimate, and LoRA versus full fine-tuning is not the cost driver (the paper attributes its slower LoRA wall-clock to an adapter merge-and-reload artifact, not an inherent cost). This sets the unit the R4 estimate is built in; it moves no gate. + +2. LoRA and catastrophic forgetting (Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633, ICML 2025). The paper reports (its Observation 3) that LoRA mitigates catastrophic forgetting more effectively than full-parameter updates in the test-time-learning setting, and adopts LoRA for its test-time updates on that basis. Recorded as complementary to item 1, not conflated with it: the cost-Pareto study does not measure forgetting (it defers retention to future work), so the drift-bound property rests on this citation alone, and on that paper's own TTL-setting observation rather than an independent head-to-head. If an R4 arm is instantiated, this is the citation behind preferring a low-rank adapter as the retention-bounding choice. + +3. Workspace manipulation as a potential avenue of investigation (not a rung). The global-workspace / Jacobian-lens result (Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace, July 6 2026) identifies a small, causally-privileged subspace that a residual-stream read can inspect; the article's own experiments are on Claude models only. What makes it an avenue for a track that can only instrument open checkpoints is the separate tooling: Anthropic released the reference implementation `anthropics/jacobian-lens` (Apache 2.0), which fits the lens on open-weight decoders, and independent third-party replications on small open models exist (e.g. github.com/tao-hpu/jspace-replication, github.com/solarkyle/jspace, spanning GPT-2 124M through Qwen3 and Gemma-3 sizes). Reproduction is partial and mixed: the lens read-out reproduces and beats a logit-lens baseline, while some higher-order effects (e.g. hidden-intermediate multi-hop) do not reproduce at the smallest scales. The possible avenue: use that instrument to probe, and perhaps manipulate, the subspace to strengthen meta-prompt adherence, i.e. H2's mechanism approached through measurement rather than fast weights. Recorded as an avenue only; out of scope for R2 through R5, no criterion attached, no claim, its viability explicitly gated on the still-partial open-checkpoint reproducibility, and subject to the same paired-arm and owner-gated discipline as everything else here should it ever be taken up. **Probe-sensitivity caveat:** a probe that reads *no effect* is informative only once a positive control has shown the probe can detect the effect it seeks — otherwise "no detectable effect" is a blind instrument, not evidence of absence (the positive-control duty, §6; the `self-play` skill's discipline 6, which learned this the hard way when a maximal-strength probe failed to fire across escalating designs). + +No gate moved; no default changed; no TTT claim attaches without a paired arm. + +## 13. R2a — the backend-seam census and the rlms verdict (Session 46, July 13, 2026) + +Rung R2a executed as ratified (§12.6 Phase 0): a READ-ONLY census, +zero paid spend, zero code bytes moved. Method: grep-driven sweep of +`src/rlm/`, `src/workers/`, `src/core/`, `src/config/`, and +`scripts/` for transport constructions, model-id literals, pricing +constants, token accounting, and embedding calls (every +`chat.completions.create` and `embeddings.create` site in the tree is +disposed below), plus a read-only inspection of the installed +`rlms==0.1.3` package (import name `rlm`, site-packages; guardrail 10 +respected — nothing modified). The seam design built on this census +is R2b's, the next session. + +### 13.1 The rlms verdict — YES, with quoted evidence + +**rlms==0.1.3 admits a base-URL/backend override WITHOUT library +modification.** The evidence, from the installed package: + +1. `rlm/core/rlm.py` — the constructor's first two parameters: + `RLM(backend: ClientBackend = "openai", backend_kwargs: dict[str, + Any] | None = None, ...)`. Trellis today passes only + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` and takes + the `"openai"` default backend. +2. `rlm/clients/__init__.py::get_client` routes eight backends: + `['openai', 'vllm', 'portkey', 'openrouter', 'anthropic', + 'azure_openai', 'gemini', 'vercel']`. The `vllm` arm is the + OpenAI client with a mandatory endpoint: it asserts + `"base_url is required to be set to local vLLM server address + for vLLM"` and then constructs the same `OpenAIClient`. +3. `rlm/clients/openai.py::OpenAIClient.__init__(self, api_key=None, + model_name=None, base_url=None, sampling_args=None, **kwargs)` — + `base_url` is a FIRST-CLASS constructor parameter, passed straight + into `openai.OpenAI(**client_kwargs)`. The class docstring says it + plainly: "LM Client for running models with the OpenAI API. Works + with vLLM as well." +4. Sub-call separability exists in the library itself: + `other_backends`/`other_backend_kwargs` (exactly one additional + backend supported) lets depth-1 sub-calls run a DIFFERENT + backend from the root — relevant to R4 arm design, unused today. + +**The seam call is therefore additive kwargs at the two existing +construction sites** (T3's exact scope): +`RLM(backend="openai"|"vllm", backend_kwargs={"model_name": ..., +"base_url": ..., "api_key": ...})`. No rlms byte moves. + +**Recorded caveats the T-series and R3 must respect:** + +- **The usage requirement (the one hard compatibility constraint + beyond chat-completions shape):** `OpenAIClient._track_cost` + RAISES `ValueError("No usage data received. Tracking tokens not + possible.")` when a completion response lacks `usage`. Any serving + endpoint must return usage on non-streaming completions (vLLM does + by default). The R3a smoke test asserts this before anything else. +- **Token/context coupling is soft:** `rlm/utils/token_utils.py` + keys context limits and tokenizers by model name with safe + fallbacks (unknown model → 128,000-token default; tiktoken → + `cl100k_base` → chars/4). Consulted only under `compaction=True`, + which Trellis never sets. Non-blocking. +- **API-key resolution:** known base URLs map to their own env keys + (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`, `AI_GATEWAY_API_KEY`, + `PRIME_API_KEY`, read at import time); an unrecognized/local + base_url leaves `api_key=None`, which the openai SDK resolves from + `OPENAI_API_KEY` env — a local endpoint typically wants an explicit + dummy `api_key` kwarg so runs do not depend on an unrelated real + key being present. +- **rlms calls `load_dotenv()` at import** (both + `rlm/clients/openai.py` and `rlm/clients/__init__.py`): a `.env` + file in the spawned agent's working directory is read into its + environment. An unmanaged credential input channel, recorded here + for R2b's forwarding design. + +### 13.2 The census + +Legend: "moves?" = does the site have to change (or change meaning) +when the completion backend moves. Classes ordered by seam relevance. + +**Class 1 — root RLM completion (the seam; T3 rewires exactly these).** + +| Site | Assumption | Moves? | Pinned by | +|---|---|---|---| +| `src/rlm/trellis_agent.py:353` (author mode) | `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}`; backend defaults to `"openai"`; transport+key from ambient env | YES — T3 | No direct pin (paid-run surface; `test:rlm-sandbox` stubs the `openai` module) | +| `src/rlm/trellis_agent.py:589` (research mode) | same | YES — T3 | same | +| `src/rlm/trellis_agent.py:97,111` (`make_entailment_check`) | direct `openai.OpenAI()` + hardcoded model literal; constructed only under `TRELLIS_CITATION_ENTAIL=1` (experimental) | YES if the checker is kept; R2b decides whether it follows the seam or stays a frozen instrument | none | +| `scripts/probe_workspace_lineage.py:157`, `scripts/probe_workspace_paired.py:89` | same `backend_kwargs` mold | NO — frozen measurement instruments; retrofitting them would invalidate comparability with their recorded runs | recorded here | + +**Class 2 — worker/engine completions (model id ALREADY +config-shaped; only the transport is assumed).** + +The model id routes through ONE seam today: `EXTRACTION_MODEL` +(`src/config/index.ts:109`, zod default `'gpt-5.4-2026-03-05'`) → +`config.llm.extractionModel` (`index.ts:359`). Consumers: +`extraction_worker.ts:77`, `supervisor_worker.ts:76`, +`verification.ts:217` (`makeOpenAIClassifier`), +`entailment_detection.ts:208` (`makeOpenAIEntailmentJudge`), +`alias_resolution.ts:199` (`makeOpenAIAdjudicator`), +`decision_source.ts:51` (`makeOpenAIDecisionSource`), +`resolution_worker.ts:50,65`, `agent_worker.ts:188` + +`verification_worker.ts:79,135` (metric labels), +`scripts/resolve_sweep.ts:67`. **A worker-side model change is an +env-var change today; no code moves.** The transport is zero-arg +`new OpenAI()` at seven sites (`extraction_worker.ts:26`, +`supervisor_worker.ts:25`, `verification.ts:220`, +`entailment_detection.ts:211`, `alias_resolution.ts:202`, +`decision_source.ts:54`, `api/server.ts:263`) — SDK-default +transport, see §13.3. `parseLlmResponse` at the consumption boundary +is model-agnostic by construction (guardrail 7 holds under any +backend). + +**Class 3 — the embedder (NON-GOAL, §4.2; listed so the boundary is +explicit).** + +| Site | Call | +|---|---| +| `src/workers/extraction_worker.ts:30,193–197` | `EMBEDDING_MODEL = 'text-embedding-3-small'` literal; per-block `embeddings.create` | +| `src/rlm/trellis_tools.py:804–806` | `vector_search` query embedding, same literal | +| `src/api/server.ts:263–265` | `/retrieve` vector-fallback embedding, same literal | +| `scripts/chunking_seam_queries.ts:83–84` | the eight PINNED seam queries (standing instrument — never tuned) | +| `scripts/exp_citation_ab.ts:43,98` | experiment instrument, frozen | + +All three production embedding sites are schema-coupled +(`vector(1536)` + HNSW, `src/config/schema.ts` / +`search_ast_nodes`). The embedder does NOT move with the completion +backend; an embedder move is a substrate-identity event. §13.3 names +the one place this boundary is currently soft. + +**Class 4 — pricing constants (estimate-only by design; a backend +move re-prices them, never silently).** + +| Site | Constant | Consumers | Pinned by | +|---|---|---|---| +| `src/benchmarks/oolong/scoring.ts:13–14` | `PRICE_PER_M_INPUT = 2.5`, `PRICE_PER_M_OUTPUT = 10` ("used when the backend does not report exact cost") | `poison_drill_runner.ts`, `exp_effective_context.ts` (spend gate, lines 1628–1630), `exp_citation_ab.ts`, `exp_citation_metadata.ts` | `scoring.test.ts:132` | +| `src/core/authoring/estimate.ts:16` | `AUTHOR_EST_PRICE_PER_1K_USD = 0.02` | `author_module.ts` refuse-before-spend ceiling (line 370, `--max-spend-usd`) | `estimate.test.ts` | + +These gates bound OPENAI spend. An R3 serving arm prices in +GPU-hours or hosted per-token dollars per the §7 cost doctrine — its +proposal restates cost in those units rather than stretching these +constants. + +**Class 5 — token accounting (moves cleanly; one recorded +asymmetry).** + +- Python: the telemetry payload's `input_tokens` / `output_tokens` / + `reported_cost_usd` come from rlms's `UsageSummary`; `model_usage` + is `usage_dict["model_usage_summaries"]`, keyed BY MODEL NAME — a + new backend appears as a new key, no shape change; the Node + telemetry scanner tolerates additive fields (pinned). +- TypeScript: `llm_usage.ts` `chatUsage`/`embeddingUsage` tolerate a + MISSING `usage` block (count the call, zero tokens, never throw) — + the recorded asymmetry with rlms's `_track_cost`, which THROWS + (§13.1). Metric labels are `operation`/`model` — the model name is + already a bounded label value, so a backend change changes label + VALUES only, within the T16 house style. +- `reported_cost_usd` is `None` on plain OpenAI endpoints today + (rlms extracts cost only from OpenRouter-shaped responses); every + house spend gate uses token counts × Class-4 constants, so nothing + breaks when a new backend also reports no cost. + +**Class 6 — report stamps and prose (recorded strings; they gate +nothing and move as wording only).** `oolong_runner.ts:137`, +`update_drill_runner.ts:199`, `poison_drill_runner.ts:467` (report +`model` fields; the poison drill already stamps `'ground-truth +oracle (LLM-free)'` in rehearsal), `author_module.ts:402` +(provenance prose), the comments at `oolong/scoring.ts:11` and +`estimate.ts:8`, `exp_citation_ab.ts:44` (`CHECKER_MODEL`, frozen +experiment instrument), and `scripts/pocs/*` (`gpt-5.4-mini` +literals; PoC archive class, frozen). + +### 13.3 The unmanaged pass-through (the census's one real discovery) + +Every production client in the tree — the seven zero-arg +`new OpenAI()` constructions (Node SDK `openai@^6.45.0`), the two +Python `openai.OpenAI()` constructions, and rlms's own +`OpenAIClient` with `base_url=None` — resolves its base URL from the +SDK's ambient `OPENAI_BASE_URL` environment variable when unset. +Verified in both installed SDKs (`node_modules/openai/client.js` +line 140; site-packages `openai/_client.py` line 251). Three +consequences, recorded: + +1. **The transport is ALREADY overridable today with zero code + change** — but UNMANAGED: no config validation, no typed refusal, + no telemetry visibility, no test pin. +2. **`buildAgentEnv` (`src/workers/rlm_job.ts`) spreads `...base` + and neither deliberately forwards nor strips `OPENAI_BASE_URL`** + (`OPENAI_API_KEY` inherits the same way, by design — the agent + needs it). An `OPENAI_BASE_URL` inherited from the worker's + environment would silently redirect the child agent's root + completions, the experimental checker client, AND the + `vector_search` EMBEDDER together — exactly the coupling §4.2 + forbids (the embedder must never move as a side effect of the + completion backend moving). The worker-side clients read the same + ambient variable, so engine completions and the extraction + embedder are coupled the same way. +3. **This is not a defect today** — no environment sets the + variable, no behavior has changed, nothing is broken; it is a + designed-in SDK affordance that the house config discipline does + not yet manage. It is the precise gap the ratified T-series + closes: T1 gives backend choice a validated config surface with + typed refusals; T2 makes `buildAgentEnv` forward-or-strip it + under the experiment-flag mold (the `TRELLIS_MCP_SERVERS` + discipline); T3 passes explicit `backend_kwargs` so the child + never resolves its transport from ambient env. **R2b's design + must decide:** whether the config seam strips `OPENAI_BASE_URL` + unconditionally so backend choice is expressible ONLY through + validated config — the recommendation this census hands R2b. + +### 13.4 What R2a does not do + +No implementation, no config key, no env twin, no default change — +the seam design (config shape, typed refusals, the three-way root / +worker / embedder split, T-increment task-text skeletons, the R3 +proposal skeleton) is R2b's deliverable, human-authored +spec-before-pen per §12.6. The embedder stays a non-goal (§4.2). The +probe scripts and experiment instruments named frozen above stay +frozen. diff --git a/.claude/skills/self-play/SKILL.md b/.claude/skills/self-play/SKILL.md index 3a61131..653598b 100644 --- a/.claude/skills/self-play/SKILL.md +++ b/.claude/skills/self-play/SKILL.md @@ -274,11 +274,15 @@ skeleton or the isolation it protects. Provenance, not law — one program's instances of the general method, kept short-lived on purpose so they illustrate rather than anchor: -- `docs/architecture/DOUBTS_WORKSPACE.md` §11–§12 — the adversarial run and the - fact-corpus run, with the falsification recorded inline. -- `docs/product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md` — the audit run; - findings 1 and 3 were later **withdrawn** by a follow-up probe. +- `DOUBTS_WORKSPACE.md` §11–§12 — the adversarial run and the fact-corpus run, + with the falsification recorded inline. Mirrored in + [`references/`](references/); canonical at `docs/architecture/`. +- `PRIMITIVE_ENCODING_AUDIT.md` — the audit run; findings 1 and 3 were later + **withdrawn** by a follow-up probe. Mirrored in [`references/`](references/); + canonical at `docs/product/epistemic-support/`. - `fixtures/doubts_workspace/earth_figure_factbase.md` — the blind-built corpus. + **In-repo only, deliberately unmirrored:** it is a corpus to illustrate from, + and a copy that travels is an example that anchors. - Memory: `project-corrosion-bound-critique`, `feedback-encoding-tracks-presentation`. ## House note diff --git a/.claude/skills/self-play/references/AMBIENT.md b/.claude/skills/self-play/references/AMBIENT.md new file mode 100644 index 0000000..108967e --- /dev/null +++ b/.claude/skills/self-play/references/AMBIENT.md @@ -0,0 +1,140 @@ +# AMBIENT.md — the rules whose trigger is that a session exists + +**Status:** part of the repository-wide session contract. `AGENTS.md` +describes Trellis and routes; the task-type files fire on a matched file +or command; this file carries what is left. Invariants only, amended by +ordinary review on a feature branch (rule 12), never by silent edit. +**Scope:** every agent, CLI, harness, and model opening this repository. + +Trellis is OpenCnid's Recursive Language Model runtime: a language model +operating a persistent Python REPL over a knowledge store where every +stored fact traces to immutable content-addressed source bytes. + +Most rules in this repository wait for an event — a file opened, a +command run, bytes written. These six wait for nothing. A session knows +what is being built, has an objective, sits under whatever gates the +collaborator has set, claims things are delivered, rests those claims on +records, and can ask. That is the whole trigger. Numbers are append-only +and cite exactly as they did before the restructure. Rule 21 is split: +21(a) is here, and 21(b) — asking before installing standing +configuration — has a detectable trigger and lives with the task-type +files. + +**Rule 24 is numbered last and printed first, deliberately.** It exists +because what is being built was written only in records a construction +decision never had to open, and a target a session must go looking for +loses to the nearest familiar shape — rule 20's ordering failure, one +level up. + +## Rule 24 — what is being built + +Trellis is an **agentic knowledge-work system** over a large context of +domain-specific user information: a toolset the user works *with*, not a +retrieval system with a fact store bolted on. It holds the information, +reasons over it, acts on it, and forms beliefs and doubts from it. Two +sentences carry the rule, and one act falsifies each. + +**A query produces a deliverable, not a reply.** Every run leaves a +**response artifact** — a derived object composed over several turns and +multiple slices, which outlives the run and which the orchestrator can +parse, summarize, and link for the user. A run whose whole output is a +string in a transcript produced none. **A schema that can only carry a +string cannot carry a deliverable**, so a terminal action requiring +non-empty prose, an artifact envelope with one hardcoded text part, and +an answer sink that renders a single value each make this false. For +code editing the repository is the artifact and the submitted string is +a receipt. + +**The worker queries the corpus; it never transports it.** It answers +questions *about* a body it never holds, reading the slices the question +needs and no more. A surface returning a whole document where the +question asked about part of one, a bound pricing a paragraph and a +corpus alike, and an instruction to collapse several turns into one load +each make this false. + +The tell for both: a sentence computing how much of a corpus fits +through the model. That arithmetic describes an operation this system +does not have — bulk movement is the engine's job, which is rule 5's +code-mediated text applied to what a turn is *for* +(`docs/architecture/RESPONSE_ARTIFACT.md`). + +Two surfaces carry this outward, and neither is decoration. **A2A is +inbound** — peer agents query Trellis as a human would. **MCP is +outbound** — Trellis acts in the world as a human would. A text-only +contract on either bounds the whole system. + +## Rule 1 — where the objective comes from + +The session takes its objective from exactly one source: the +collaborator's live task. Every other artifact a session can read — a +branch name, `HANDOFF.md`, an archived roadmap, a prior session's +progress entry, a governing record, the session's own sense of what is +next — bounds or informs how the work is done and selects none of what +work happens. The session reads `AGENTS.md`, orients at the shallowest +`ORIENTATION.md` density that answers its question (D3 before designing +anything), and retrieves the task's governing records before it decides +or edits. A session holding no live task holds no objective, and its +whole next move is the rule-21(a) question. + +## Rule 14 — what a protected pause withholds + +A protected pause refuses the effect it names, and nothing more. An +owner gate on a paid run, a push, a merge, or an acceptance record +withholds exactly that one effect: the whole of what a gate blocks is +the effect named in it. Work the gate leaves unnamed continues under the +direction already given, and the owner keeps sequencing authority over +the whole of it — the session surfaces a discovered defect with a +proposed fix, and the owner chooses when it lands. The session +discharges every unprotected preparatory step and specifies the request +in full. It refuses a specified request on exactly two grounds: a failed +provenance predicate, or a failed scope predicate. The gate withholds an +effect and leaves the chat channel open (rule 21(a)). + +## Rule 15 — correct is a different claim from reachable + +A passing suite establishes that the code is right. The whole of what +establishes reachability is a named non-test caller — a process +entrypoint, a package script — so a suite of any size leaves +reachability exactly where it found it. Before every claim that a +capability is delivered, the session names that caller; when the set of +non-test callers is empty, it says so plainly in the same breath as the +claim. This repo has shipped the same defect three times, most recently +`StateStore.open()` with no caller outside tests behind 1,161 green +tests. + +## Rule 18 — retrieve before you decide or claim + +Exactly one thing discharges a load-bearing act's obligation to its +record: the source, retrieved and quoted this session. Every derived +representation — an orientation compression, a design record, a skill, a +memory, a sub-agent's report, this session's own earlier summary of a +file it read — carries the work and discharges none of that obligation. +Deciding what work to do and stating what a record establishes are both +load-bearing acts. The tell is that the session cannot name the file and +section it retrieved *this session*. A lossy summary reads exactly like +a faithful one from the inside, so retrieval is what corrects it. +`docs/architecture/CODE_MEDIATED_TEXT.md` §2.9 (the pillar applied to +authority) generalizes the rule ratified for papers in +`docs/RESEARCH_NOTES_COLLECTION.md` §3; Session 71 is the case; +`docs/architecture/SESSION_GOVERNANCE.md` and the trunk's authority ordering (code > glossary > prose, a live instruction outranking all three) are the chain it rests on. + +## Rule 21(a) — ask the collaborator + +The cheapest available move is a question in the chat channel (the +un-tool; owner-directed July 22, 2026). Declining to call anything and +asking is a move: no schema, no install, no recurring cost, and the only +move of any kind that resolves an underdetermined instruction at its +source. Two occasions are ambient — an instruction whose intent is +underdetermined, and a values or scope call that is the collaborator's +to make; rule 21(b) carries the standing-configuration case. The cap is +exactly one question, asked in the turn that has already discharged +every preparatory step rule 14 leaves unprotected. The session then +stops and waits, and the whole of what closes the question is the +collaborator's answer (owner ruling, July 22, 2026, +`docs/architecture/SESSION_GOVERNANCE.md` §2). Stopping is not standing +down: the preparatory work is done and reported when the question is +put. Asking resolves ambiguity in an instruction; the whole of what +closes a behavioral failure class is tooling shape (rule 8). A move with +no surface stays invisible until it is named, and this rule is that +name. Construction: `.claude/skills/spark-steering/SKILL.md` § *Ask +first — the un-tool* (derived; `docs/architecture/SESSION_GOVERNANCE.md`). diff --git a/.claude/skills/self-play/references/DOUBTS_WORKSPACE.md b/.claude/skills/self-play/references/DOUBTS_WORKSPACE.md new file mode 100644 index 0000000..083aa8d --- /dev/null +++ b/.claude/skills/self-play/references/DOUBTS_WORKSPACE.md @@ -0,0 +1,683 @@ +# The Doubts Workspace — Design Record + +**Status: DESIGN — PROPOSED July 20, 2026. Nothing built, nothing +authorized.** Origin: owner and collaborator direction (Cnid and +M. Murphy), relayed in session, following the derivation game recorded +at [`PRIMITIVE_ENCODING_AUDIT.md`](../product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md). +The brief, collaborator's words: *"a doubts workspace where +anti-composite frameworks exist… a user-and-domain-mediated +anti-constructive framework for defeating claims based on the facts."* + +Subordinate to [`WORKSPACE_AND_MODULES.md`](WORKSPACE_AND_MODULES.md) +§1's governing axioms and §4's workspace contract, which this mirrors +rather than reinvents. Where they disagree, that record wins. + +--- + +## 1. What is missing + +Defeat machinery exists today and is a **flag with a label**: +`r.contested = true`, `contestedReason = 'unsupported_citation'`, +`contestedAt`, `orphanedSourceIds` +([`entailment_detection.ts:280`](../../src/core/graph/entailment_detection.ts:280)), +plus quarantine contests on byte change. + +A doubt has no **body** (which facts defeat it — `unsupported_citation` +names a class and cites nothing), no **identity** (no address, so a +doubt cannot be cited, queried, or reasoned over), no **author** (sweep +and user assertions are indistinguishable), and no **defeasibility** +(a doubt cannot itself be doubted). + +So `-1` is currently *residual* — the absence of `+1`, plus a label. +This record makes it **constructed**: positive machinery that defeats, +grounded in facts. + +`grep -rn "doubt" src/ -i` returns nothing. The third REPL type has no +representation at all. + +## 2. The corrosion bound (keystone) + +> **A doubt may cite facts only. A doubt citing beliefs is not a doubt +> — it is a competing belief, and belongs in the beliefs workspace.** + +**Unbounded deconstruction defeats everything. Global skepticism is +free.** Any critique faculty that can ground itself in other critiques +will defeat every claim put to it, and its output carries no +information. This bound is what makes "anti-constructive" a usable +instrument rather than a solvent. + +It does three jobs at once: + +1. **Prevents skeptical collapse** — doubts cannot bootstrap from + doubts. +2. **Bounds the defeater regress structurally**, at one level. The + defeasible-reasoning literature needs a defeat-status computation + over a defeat graph; fact-grounding makes that unnecessary, because + every doubt's support chain terminates in the fact store. +3. **Makes the burden symmetric** — to doubt something you must ground + it, exactly as to promote something you must ground it. Doubt is + never cheaper than belief. + +**FALSIFIED AS WRITTEN — July 20, 2026. See §11 (analysis) and §12 +(empirical test and partial resolution).** An adversarial clean-context +analysis broke all three jobs above. The bound is retained because its +*positive-citation* requirement survives (§11's failed attack), but the +rule as stated is insufficient. The sentence that decides it: + +> §2 constrains the **standing tier** of what an objection cites, never +> the **provenance kind**, and §5 hands objections a direct path into +> the fact store. + +**Status after §12, July 20, 2026 — improved, not closed:** + +- The **relevance** gap (attack 3) is *not* a missing clause in §2. It + is handled one layer up by the applicability gate, and §2 should point + there rather than internalize it (§12.2). Resolved by architecture, + not by amendment. +- The **positive-citation core was empirically validated** against a + real corpus of naturally-occurring corrosive doubt — 13 of 14 + rejected, none admitted with a false conclusion (§12.1). +- The **bootstrap** (attack 1/2 laundering) and **cost** (attack 2 + volume) gaps remain open, with only proposed repairs (§11). + +So: nothing is built against §2 until bootstrap and cost close, but the +bound is on firmer ground than "falsified" alone conveys. + +The claim that this was "the least adjustable element of the design" is +preserved above as written, and was wrong in the direction that matters: +it was the least examined. + +## 3. Support covers; defeat searches + +Defeaters are **not** judges with an inverted sign. The composition +laws differ: + +| | Support | Defeat | +|---|---|---| +| Succeeds when | **enough** seats agree | **one** defeater lands | +| Composition law | a **cover** — total coverage, complementarity (S10 layer 5) | a **search** — reach; find the failing join | +| Shape | roughly universal | existential | + +Support spans the space; defeat penetrates it. Because the laws differ, +defeat needs its own workspace and its own composition method — this is +what earns "anti-composite frameworks," plural. + +## 4. Two defeat kinds + +Adopted from the defeasible-reasoning literature (Pollock) as **exterior +prior art**, per the collaborator's standing rule: *"exterior prior art +where permissible, derive where not via self-play."* + +- **Rebutting** — facts contradict the claim. Attacks the conclusion. +- **Undercutting** — the support chain does not transmit. The premises + may hold and the conclusion may even be true, but *this construction* + does not establish it. + +**Undercutting is the anti-composite operation**, and the system cannot +express it at all today. It attacks a *join* in the composition rather +than the claim itself. It is also what distinguishes this design from +deconstruction proper: deconstruction shows a text undermining itself on +its own terms; undercutting shows a support chain failing to carry, +judged **from the facts**. The facts are the user's and the domain's — +that is the mediation, and it is why the instrument is not a universal +solvent. + +## 5. The three fates of a doubt + +**Collaborator's formulation, recorded verbatim (July 20, 2026):** + +> "doubts expire like beliefs promote to facts! a doubt actually *can* +> be falsified! … I doubt that there are fireballs raining from the sky +> right now. That doubt may exist in the doubt workspace. However, we +> might find evidence that there is a meteorite shower. In that case, +> this doubt could technically bypass beliefs and become a fact through +> its expiry (which is technically the same as promoting it to a fact, +> unless my logic is mistaken)." + +**The conclusion is adopted: a doubt can promote directly to fact, +bypassing the beliefs workspace.** One annotation on the mechanism, +recorded beside the claim rather than folded into it (rule 15). + +**CONFIRMED July 20, 2026 — collaborator: "The three fates are +correct."** The annotation below was filed under rule 15 as a separate +artifact rather than merged into the claimant's words, and is promoted +here on the collaborator's recommendation and the owner's gate. The +verbatim formulation above is preserved unchanged; this is what rule 15 +is for in the direction that is easy to skip — a *correction* filed +beside a claim rather than over it. + +In the fireball example the doubt is *defeated*, not *verified*. What +becomes a fact is the doubt's **target** ("fireballs are raining"); the +doubt itself dies. The bypass appears because the meteorite evidence is +doubly-loaded — it supports the target *and* defeats the doubt in the +same instant. Promotion follows from the support, not from the expiry. + +The distinction is load-bearing: wiring *expiry → promote target* +promotes claims whose doubts died for unrelated reasons. Counterexample +— target "the deploy succeeded"; doubt "the logs show a 500 at 14:02" +citing a log block; the block is superseded on refresh, the doubt loses +its fact-ground and expires, and nothing whatever was learned about the +deploy. That is a laundering path of the same shape as the meet-rule +hazard. + +The case where the collaborator's claim holds exactly is +**verification**: a doubt "this citation does not support that +conclusion", once verified, makes "the citation does not support it" a +**fact** — doubt to fact with no belief stage. + +| Fate | The doubt | Its target | +|---|---|---| +| **Verified** | content promotes to **fact** | demotes | +| **Defeated** | dies | promotes **only if** the defeating evidence independently supports it | +| **Unresolved** | persists as long as its target does | unchanged | + +Symmetric with beliefs (promote / defeated / pending), which is what +makes doubts a peer tier rather than a graveyard. + +## 6. The workspace contract, mirrored + +From `WORKSPACE_AND_MODULES.md` §4: + +- **Capture is mechanical, not behavioral** (§4.1 — *"the single + biggest failure mode of prompt-convention scratchpads is reliance on + model discipline"*). Doubts must never depend on a model choosing to + record one. The mechanical sources already fire: quarantine on byte + change, the entailment sweep, refresh contests, hash-chain breaks. + **The cheapest first version of this workspace is giving those + existing findings a body** — cited facts and an origin stamp on + contests the engine already computes. Zero new model calls. +- **Identifiers structurally disjoint** (§4.2). AST hashes match + `^[0-9a-f]{64}$`; workspace segments are dashed uuids. Doubts need a + third shape, so a doubt can never be shape-confused with a fact or a + segment. §4.2 notes this class of decision cannot be retrofitted. +- **Origin-stamped.** Every doubt carries what raised it — sweep, user, + or composed defeater — and when. This is what a later user gate + reads, and what makes "the agent doubted X because Y" auditable. + +## 7. What doubts do not do + +**A doubt does not demote.** It attaches; the user gates whether +standing moves. This follows the ruling that the panel emits findings +and the user gates in both directions, and +`WORKSPACE_AND_MODULES.md` §13 (Explicit exclusions)'s *"autonomous +promotion (operator gate is absolute)."* + +One line the shipped system already draws, formalized rather than +overridden: + +- **Mechanical contest is automatic** — provenance broke, bytes + changed, the chain is dead. Quarantine does this today without a user + gate, correctly: nothing is being asserted about the world. +- **Semantic defeat is user-gated** — the claim is *wrong*. That is a + judgment about the user's domain, and the engine has no standing to + make it unilaterally. + +## 8. Composed defeaters + +A composed defeater is the anti-composite counterpart of a composed +judge: the same primitive (an orientation bound to an evidence locus), +composed per context from the user's domain, under the **search** law of +§3 rather than a cover law, and constrained by §2 to cite facts. + +**Schema-invariant (owner Cnid, July 21, 2026): a defeater is named, +defined, and instantiated with the *same schema as a judge*** — +the live judge schema (`purpose`, `claim_modes`, `select`, `orientation`, +`taxonomy`, `blind_to`, plus the ten-item anchor set) — its invariant field names +ratified in [`JUDGE_CONTRACT_TEMPLATE.md`](../product/epistemic-support/JUDGE_CONTRACT_TEMPLATE.md) +(Layer rule), **not** `FOUR_JUDGE_BASIC_MODEL.md`, whose `hyperplane_parameters` YAML +was the program's superseded starting point (dated correction below). The +**methods and prompts change** — the search law not the cover law, an +`objection` not a verdict, the ∃ target not the ∀ cover — **but the schema +does not.** One schema, two instruments; the composition law is the +difference, and the shared schema is what lets a single composer emit +either seat from the same primitive (§3; STANDING_MODEL §1). + +Meta-prompt-generated defeater candidates are permitted and must be +tested before shipping (collaborator direction, July 20, 2026). This +sits on the **permitted** side of amended AB-8: composition, not +optimization over compositions. A metric-driven search for better +defeaters crosses into AB-8(b) and needs its own proposal. + +**Dated citation correction (July 21, 2026, owner Cnid + collaborator Matt + Claude, this +session).** §8's schema citation above previously named `FOUR_JUDGE_BASIC_MODEL.md`'s YAML, +but that S10 submission's per-seat schema is `hyperplane_parameters` (the UHE four-plane +model), **not** `select`/`taxonomy`/`blind_to` — a cross-schema mis-attribution introduced +with this paragraph (PR #155). The field names listed are the **live** schema, ratified in +`JUDGE_CONTRACT_TEMPLATE.md` (Layer rule); the citation now points there. A blind self-play +evaluation this session (two runs — a three-way schema comparison and a categorized-`select` +head-to-head, blind judge panels, `$0` paid) confirmed the direction: `taxonomy` + `blind_to` +are the stronger primitives; flat `select` beat **both** the rigid four-plane buckets *and* a +plane-categorized `select` at the per-seat level; and the four-plane structure's only plausible +remaining home is **panel-coverage composition** (a concept, untested), not a per-seat field. +The UHE four-judge model was the program's *starting point*; the schema outgrew it. See +[`FOUR_JUDGE_BASIC_MODEL.md`](../product/epistemic-support/FOUR_JUDGE_BASIC_MODEL.md)'s dated +supersession note. + +## 9. Scope — this is a critique engine + +**Owner framing (Cnid, July 20, 2026):** the feature set is useful for +**any kind of critique** — a reviewer for a professional journal, a film +critic, and so on. + +This is a scope statement, not a metaphor. The machinery is a general +critique instrument: composed defeaters searching a fact base for the +join that fails, grounded in the user's own corpus, with the corrosion +bound keeping the output informative. The domain supplies the facts; +nothing in §§2–8 is Trellis-specific. + +It is also the sharpest available test of the corrosion bound. A critic +who can ground objections only in other objections is exactly the +failure mode §2 forbids, and it is a recognizable one outside software. + +## 10. Vocabulary (GATED July 20, 2026 — owner, in session) + +One word was doing two jobs. The collaborator's test: *"synonyms are +powerful, and connotation might be a guide — is there a clear rename +path for one of them that **covers** Trellis better?"* + +**Rename the object; keep the standing.** The standing sits in a triad +whose parallelism is load-bearing and user-facing (`fact / belief / +doubt`, a held attitude beside a held attitude); the object sits in a +workflow whose *verbs* were unnamed. + +| Term | Job | +|---|---| +| **doubt** | the **standing** of a claim at `-1` | +| **objection** | the **object** that attacks a claim, cites facts (§2), and has the three fates of §5 | +| **defeater** | the composed **instrument** that searches for objections (§8) | + +The connotation carries the fates without forcing: an objection is +**sustained** (§5 verified), **overruled** (defeated), or +**outstanding** (unresolved). That vocabulary already exists in review +and criticism, which is the §9 coverage test passing — *"the reviewer's +objection was sustained"* needs no translation. It also fits the house +register, which is already juridical (contest, ratify, docket, +convocation, remand, merit-refuse). `defeater` stays as the §4 prior-art +term for the instrument, where jargon is appropriate. + +**This resolves the `contested` question.** Under this vocabulary +`contested` stops being a primitive flag and becomes **derived** — *does +this claim carry outstanding objections?* Sweeps raise objections; +re-derivation from live provenance overrules them; `contested` computes +false. The four `alias_resolution.ts` call sites need no migration, and +the result is strictly more informative: the system can be asked *which* +objection, which the boolean can never answer. + +**Learning (dated July 21, 2026 — owner Cnid, in session): a doubt is +*based on* its objection(s).** The objection is the body; the doubt is +the standing that body confers (§1); the defeater is what composes the +objection (§8). The dependency runs one direction — **objection → doubt** — +so a doubt with no surviving objection is empty, which is exactly why +`contested` is *derived from outstanding objections* above rather than +asserted. This names, as a single relation, the symmetry §15 audits: the +`-1` pole's object is the objection, and the doubt rests on it the way a +`+1` fact rests on its verified source bytes. + +## 11. Adversarial analysis of §2 (July 20, 2026) + +Run as an isolated clean-context sub-agent over this document alone, +with no access to the composer's reasoning, authorship, or +expectations. **Verdict: insufficient.** Four attacks; the first was +pre-registered by the composer before the prompt was authored (rule 11), +the other three were not predicted. + +**Attack 1's standing was downgraded the same day — see the note at the +end of this section. Attacks 2, 3 and 4 are unaffected.** + +**1. The laundered bootstrap — succeeds.** An objection cites fact `B`; +verified, its content promotes to a fact `F1` (§5); a second objection +cites `F1`, which is a fact, satisfying §2; iterate. §2's job #1 +("doubts cannot bootstrap from doubts") fails through the promotion +door. Job #2 holds *literally and vacuously* — the chain terminates in +the fact store while remaining a chain of critiques end to end. The +defeat graph §2 claimed to make unnecessary still exists; it has been +moved into the fact store with its edges erased. The operator gate +slows this without stopping it, because every local approval is +correct: each gate asks "does this citation support that conclusion?", +never the global question. + +**2. Unbounded existential search — succeeds.** §2 prices a *single* +objection and is silent on objections *per target*. Generate many legal +defeater candidates (§8 permits this), run them all, keep the one that +lands. This falsifies job #3 ("doubt is never cheaper than belief") +directly against **§3's own table**: support must satisfy a cover +(universal), defeat needs one hit (existential). §2 asserts a symmetry +that §3 denies. Whether candidate-generate-then-select is AB-8(b) +optimization or the §3 search law is genuinely ambiguous as written. + +**3. Relevance-free grounding — succeeds.** §2 requires that grounds +*be* facts; it never requires that the cited fact *bear on* the target. +Cite one fact true of every composed claim in the corpus, compose one +defeater around it, and the whole corpus computes `contested` under +§10 — no forged facts, no rule broken. Global skepticism is not free, +but it is priced at one fact citation amortized across everything, +which at scale is indistinguishable from free. + +**4. Undercuts route to the ungated branch — a determinacy gap.** +§7 discriminates on whether something "is being asserted about the +world." §4 defines undercutting as precisely the operation that asserts +nothing about the world — "the premises may hold and the conclusion may +even be true." So by §7's own criterion an undercut fires *mechanically +and ungated*. The document never says which branch it takes. **The +design's headline capability is the one its gate most plausibly +exempts.** + +**The attack that failed, and what it reveals.** Grounding an objection +in the *absence* of a fact ("nothing in the corpus establishes this +join") defeats every non-exhaustively-enumerated claim, needs no +laundering and no candidate volume — and is blocked cleanly, because +§2 demands an objection *cite* facts and an absence-grounded objection +cites zero. Repairing it by promoting "the corpus contains no fact +establishing `J`" fails too: a completeness claim over the corpus is +derived, not verified bytes, so it is a belief and §2 rejects it by +name. + +**So the bound's real strength is the *positivity* of the citation +requirement, not the standing tier it names.** That is the part to keep. + +**Repair directions — proposed, not adopted, none authorized:** + +- *Bootstrap:* distinguish world-facts from critique-derived facts and + require at least one non-critique-derived ground. This is the + hash-kind-in-the-address move a third time, reusing machinery already + accepted for the user-gated stamp and the meet rule. +- *Relevance:* require the cited fact to be reachable from the target's + own citation chain, or to contradict a member of it. Mechanical, and + it kills attack 3. +- *Cost asymmetry:* either withdraw job #3 as false, or add a + per-target objection budget. Job #3 cannot stand beside §3's table. +- *§7:* state the branch explicitly. Only provenance-mechanical breaks + (bytes changed, hash dead) plausibly belong ungated; semantic + transmission is a domain judgment even when it asserts nothing about + the world. + +**Attack 1 downgraded — July 20, 2026, same session.** A later probe +established that this run does not support attack 1 as an *independent* +finding, on the composer's own published rules: + +- **The forecast shared bytes with the evidence, not the task text.** + §5 — composer-authored, and the analyst's entire evidence universe — + already carries the mechanism (*"doubt to fact with no belief + stage"*), the hazard (*"promotes claims whose doubts died for + unrelated reasons"*), and the word: *"That is a laundering path."* + The rule-11 defence offered above was that the forecast stayed out of + the task text. Failure mode 2 of the `judge-composition` skill + answers it: **the channel moves; audit for the content, not the + location.** The analyst did not independently find a laundering path; + it read one in §5 and pointed it at §2. +- **The prediction was tautological.** §5's promotion door is a + composer-authored gate, and rule 11 strikes predictions of + composer-authored gates from calibration. The composer's + "1-for-4" tally is therefore **0-for-4**. +- **Rule 9 was not satisfied.** Composer conflict must be *externally + reviewed*, never self-absolved. One sub-agent ran, no audit seat, and + the independence claim above was made by the interested party about a + run only that party observed. + +Attack 1 is re-filed as **the composer's own unreviewed conjecture +about the composer's own keystone** — a legitimate thing to record and +a different thing from a falsification. §2 still falls, but it falls on +attacks 2, 3 and 4, which no leaked vocabulary supplied. + +## 12. Empirical validation and the two-layer resolution (July 20, 2026) + +§11 broke §2 by analysis. This section records what a live test then +established, and resolves one of the four gaps §11 opened. + +### 12.1 Stage-2 test — the fact base rejects corrosive doubt + +The question tested: *does a fact base, via the admission test, reject +naturally-occurring corrosive doubt at the per-objection level?* — not +the tautological *does the final verdict come out "sphere"*, which every +fact-grounded design produces and which therefore discriminates nothing +(rule 11). + +Construction, in order, each stage blind to the next: + +1. A **fact base** on the figure of the Earth — ~35 items across three + disjoint scopes — was compiled by three sub-agents **none of which + was told a dispute exists**, so facts were not selected to refute a + known position. Retained verbatim at + [`fixtures/doubts_workspace/earth_figure_factbase.md`](../../fixtures/doubts_workspace/earth_figure_factbase.md). +2. A **corpus of fourteen flat-earth arguments** was compiled as their + proponents actually state them. **Eleven of the fourteen cite real, + correctly-reported observations** (genuine Chicago-skyline + photographs, a correctly-derived surveying formula, the real null + results of Airy and Michelson–Morley, the actual Antarctic Treaty). + This is fact-citing corrosive doubt — the Class-B case the composer + had failed to manufacture by hand across six prior probes; the world + supplied it. +3. A **blind evaluator** applied the admission test, seeing neither the + composer's predictions nor that sufficiency was under test. + +**Result: 13 rejected, 1 admitted, and zero admitted with a false +conclusion.** The pre-committed failure condition — *≥1 corrosive +objection survives → the bound is insufficient* — was **not met**. The +composer had a disclosed stake in the opposite outcome (rule 9); the +result held against that stake, and the measurement was fixed before any +data was seen. + +**Why it held is the load-bearing lesson.** The test is a *derivation* +test — *no load-bearing step may rest on a belief or unverified +assertion* — **not** a citation test. Almost none of the 13 rejections +turned on a false citation; they turned on a broken **inferential** step +over true facts: + +- Chicago skyline — the photographs are real; *"curvature should + conceal it"* needs an unmeasured refraction coefficient. +- Eight-inches-per-mile² — the formula is correctly derived; it computes + drop below the tangent, not height concealed from an elevated + observer. +- Ring laser gyroscope — the proponents' own instrument read **15°/hr**; + the fact base gives ω = 7.292115×10⁻⁵ rad s⁻¹ = **15.04°/hr**. They + measured the rotation they were denying. + +Corrosive doubt characteristically fails at an inferential joint, and a +derivation test is precisely the instrument that catches inferential +joints. A citation test would have admitted most of these. + +### 12.2 The two-layer resolution of the relevance gap + +The one admission (scriptural firmament: *raqia / chug / four corners → +the text describes a flat earth*) is a **sound** derivation from facts +about a text — admitted correctly, true, and **irrelevant** to the +Earth's figure. §11 read this as a hole in §2. It is not a hole in §2; +it is a **layer confusion in the test**, and the composer's. + +The stage-2 test applied the admission rubric **in isolation**, to +pre-composed free-floating objections. The integrated architecture does +not present doubts that way. A doubt is produced by a **defeater composed +from primitives that discriminate the target's context** — the program's +founding thesis, and the `evidence_locus` result of the derivation games +that produced this record. Relevance is **locus intersection**: a +defeater aimed at *the Earth's figure* composes from geodetic loci; a +scriptural-textual claim's locus does not intersect them, so the defeater +either cannot be composed or can only **jurisdiction-abstain** (the +applicability gate already in the engine at `judge_panel.ts:464`). + +So the system is two layers, and each carries one job: + +| Layer | Job | Mechanism | +|---|---|---| +| **Admission** (§2) | **positivity** — is every load-bearing step a fact? | the derivation test | +| **Applicability** | **relevance** — does the doubt's locus meet the target's? | locus intersection / jurisdiction abstention | + +Together they are complete. **§2 should therefore point at the +applicability gate for relevance rather than grow a relevance clause** — +the "discrimination criterion" the composer thought he was *importing* +into §2 was never an addition to the bound; it already lived at the +applicability layer, and the isolated single-layer test could not see +it. Item 14 leaks the isolated rubric and jurisdiction-abstains in the +integrated system. + +**Standing of this resolution:** a design argument, corroborated by the +`evidence_locus` games that built this record, **not** itself exercised +by stage-2 (which tested the isolated admission layer). The applicability +gate has never been run against a composed *defeater*; that is a build +item, not a settled result. + +### 12.3 The workspace membership rule this establishes + +A doubt is admitted to the workspace only if it **survives the fact +base**. Two survivors, mapping onto §5's fates: + +- **fact-grounded** doubts that defeat a claim (sustained); and +- **unverifiable** doubts the facts do not reach — *"I doubt the game is + simple"* — which **gate to the user like a preference**, a permitted + skeptical lens, symmetric with an unverifiable belief. + +A doubt the fact base **refutes**, held anyway, is **delusion**, and is +not admitted. Stage-2 is the validation of exactly this gate: 13 of 14 +delusional doubts refused entry. *(The membership rule and the +unverifiable-lens symmetry are recorded here as they were reached in +session; they extend §5 and §7 and are owner-owed as dated additions to +those sections, not silent edits.)* + +## 13. Open items + +- **§2 relevance gap — RESOLVED (§12.2)** to the applicability layer; + §2 needs a one-line pointer there instead of a relevance clause. + Superseded as an open item. +- **§2 bootstrap and cost gaps — still open.** The proposed repairs + (§11) are not adopted and each needs its own proposal. Nothing is + built against §2 until these close. +- **§2's job #3 contradicts §3's table** and one of the two must be + withdrawn. An internal inconsistency in this record, not an open + design question. +- **§7's branch for undercuts is undetermined** — the gap is in this + record, and it exempts the capability §4 calls the headline one. +- **The §10 vocabulary** is gated by the owner (July 20, 2026) but + renames nothing until the rename lands as its own change. +- **The §12.3 membership rule and unverifiable-lens symmetry** are + owner-owed as dated additions to §5 and §7. +- Nothing here is authorized. Each mechanism is a separately gated + bounded feature and needs its own proposal before implementation. + +## 14. Ratification (dated entry — July 20, 2026, owner, in session) + +The owner ratified the doubts-workspace design as **principle and +direction**, with one part explicitly carved out because it is falsified +and one part left explicitly open. Ratification authorizes **no build**; +each mechanism remains a separately gated bounded feature (§13). +Companion: [`STANDING_MODEL.md`](../product/epistemic-support/STANDING_MODEL.md) +(the `-1` this tier holds). + +**RATIFIED as principle:** + +- **§1 — doubts are a first-class REPL type**, constructed rather than + residual. Direction ratified; the addressable-object build is gated. +- **§2 (the corrosion bound), PARTIAL — see the carve-out below.** +- **§3 — support composes as a cover, defeat as a search.** Ratified; + defeaters are never judges with an inverted sign. +- **§4 — rebutting / undercutting** as the two defeat kinds (Pollock, + exterior prior art). +- **§5 — the three fates** (verified → fact, defeated → dies, unresolved + → persists). Collaborator-confirmed; ratified as law. +- **§10 vocabulary — doubt / objection / defeater.** Now ratified as + canonical (was gated). It **renames no code** until the rename lands + as its own build; `contested` becomes a derived predicate over + outstanding objections. +- **§12.2 — the two-layer resolution.** Ratified as the architecture: + §2 carries *positivity*, the applicability gate carries *relevance*. + Its one untested flank is recorded — the applicability gate has never + run against a composed **defeater**; that is a build item, not a + settled result. +- **§12.3 — the membership rule.** A doubt enters the workspace only if + it **survives the fact base**; a fact-refuted doubt held anyway is + **delusion** and is refused. Unverifiable doubts gate to the user like + a preference, symmetric with unverifiable beliefs. Ratified as law and + hereby adopted into §5/§7 by this dated entry (the owner-owed addition + §13 named). + +**CARVE-OUT — §2 is NOT ratified as sound.** Only its +empirically-validated core is ratified: + +- **RATIFIED:** the **positive-citation requirement** — a doubt must + *cite* facts, not ground itself in absence — which survived adversarial + analysis (§11's failed attack) and was validated against a real corpus + (§12.1: 13/14 flat-earth arguments rejected, zero admitted-false, the + measurement fixed before the data and against the composer's disclosed + stake). The rule is a **derivation** test, not a citation test. +- **NOT RATIFIED / STILL OPEN:** the **bootstrap** gap (attacks 1–2 + laundering, §11) and the **cost** gap (attack 2 volume; job #3 + contradicts §3's table). The proposed repairs are not adopted. **§2 as + a complete bound is not built against until these close.** Ratifying + the bound whole would be the exact instance-promotion failure this + program guards against. + +**Evidence basis, recorded because ratification followed test.** The +positive-citation core was ratified because it *passed a blind empirical +test*, not because it was argued; the two-layer architecture because it +was *corroborated by the evidence-locus games*; the fates because the +*collaborator confirmed* them. Where an item rests on argument alone +(§12.2's untested defeater flank), that is marked, not smoothed over. + +## 15. Parity audit with the support side (dated addition — July 21, 2026, owner Cnid + Claude, in session) + +Recorded as this session's learning; **ratifies nothing new** and authorizes +no build. It consolidates the doubt-vs-fact symmetry already distributed across +the sections above and names one new gap. The audit walked ten dimensions of +the `-1` and `+1` poles around belief (`0`): + +| dimension | fact side `+1` | doubt side `-1` | parity | +|---|---|---|---| +| standing | fact | doubt | **symmetric** (§1; STANDING_MODEL §1) | +| the object it is built on | *unnamed as a single noun* | **objection** (§10) | **GAP — see below** | +| the instrument | judge | defeater | **symmetric** — one primitive (§8) | +| composition law | cover (∀) | search (∃) | **asymmetric BY DESIGN** (§3) | +| typed kinds | grounding / coherence / corroboration / audit | rebutting / undercutting | **symmetric** (§4) | +| the three fates | promote / defeated / pending | verified / defeated / unresolved | **symmetric** (§5) | +| grounding rule | provenance / source bytes | positive-citation of facts | **symmetric burden** (§2, positivity core only) | +| membership | survives the panel + gate | survives the fact base, else delusion | **symmetric** (§12.3) | +| user gate | gates promotion | gates demotion; mechanical contest auto | **symmetric** (§7; STANDING_MODEL §3) | +| build status | **built** | **proposed** (`grep doubt src/` = nothing) | **NOT BUILT** (§1) | + +**Reading:** seven dimensions symmetric (as principle), one asymmetric by +design, two open. The design asymmetry is a feature — *support covers, defeat +searches* — never a parity defect. + +**New gap — the fact side's object has no name.** §10 gave the doubt pole a +clean triad `doubt / objection / defeater`. The fact pole names its **standing** +(`fact`) and its **instrument** (`judge`), but the **object** an objection +mirrors — the fact-grounded thing that *supports* a claim — has no single noun; +it is carried implicitly by judge findings and the J3 *corroboration* role. To +make the two triads read as one, the support-side object wants a name. +**Owner-owed**, gated like the §10 rename. Candidate register (juridical, per +§10): `corroboration` (collides with the judge role), `attestation`, +`submission`. Not adopted here. + +**Resolved this session (July 21, 2026 — collaborator M. Murphy delegated the +choice, owner Cnid endorsed proceeding): the name is `affirmation`.** It is the +fact-grounded object that *affirms* a claim — the direct antonym of the +`objection` that *attacks* it — and it fills the same slot: the fact-grounded +**support object**, never the candidate. That is why `claim` and `proposal` +(floated in session) were set aside: they name the thing supported, not the +support. Collision check that decided it: `corroboration` = the J3 judge role; +`submission` = `STANDING_MODEL.md §2`'s vote; `attestation` = +`HARNESS_SELF_MODEL.md §8`'s informing surface; `warrant` = the `warranted` +adjective; `affirmation` returned zero repo hits and takes the slot cleanly. The +two triads now read as one — **affirmation / fact / judge** ↔ +**objection / doubt / defeater** — differing only by the §3 law (cover ∀ vs +search ∃). Gateable: one owner word overrides it. + +A **three-round clean-room self-play** (July 21, 2026) probed whether the label +`affirmation` biases a reasoner's grounding judgments (connotation → auto-validation). +Across clear items, humanized marginal items (iterated builder, independently +key-verified 12/12), and a rubric-stripped condition, the name showed **no detectable +output bias** — the positive control `proof` (the most auto-validating word a blind +adversary could name) never fired either, so the honest reading is **"no detectable +connotation harm," not "proven neutral"** (single-word priming sits below the detection +floor for a capable model doing explicit adjudication). A third round (Matt-directed) +spread the label across the **full connotation axis** — validating, neutral, a +counter-label (`bunk`), and a nonsense token, 12 blind trials — and every label produced +identical 8/8 verdicts, strengthening the null past the near-synonym limit of rounds 1–2. +`affirmation` **retained**; the self-play method-learnings (including *controls must span +the manipulated axis*) were written into the `self-play` skill. + +**Restated gap — build parity.** The larger asymmetry is §1's: the fact side is +built and the doubt side is not. No new claim; recorded so the audit is honest +that "symmetric" above means *as principle*, not *as shipped*. + +A visual of this audit was produced this session as a private Artifact +(current-state parity map); it is provenance, not authority, and this record +governs on any drift. diff --git a/.claude/skills/self-play/references/PRIMITIVE_ENCODING_AUDIT.md b/.claude/skills/self-play/references/PRIMITIVE_ENCODING_AUDIT.md new file mode 100644 index 0000000..710f732 --- /dev/null +++ b/.claude/skills/self-play/references/PRIMITIVE_ENCODING_AUDIT.md @@ -0,0 +1,346 @@ +# Primitive Encoding Audit — five verified findings + +**Status: FINDINGS ONLY — recorded July 19, 2026. Zero-paid, +session-layer, nothing built, no ratified record amended.** Every item +below is a verified statement about bytes currently in the repository. +Each names a correction that is an **owner act by dated entry**; this +record performs none of them. Where a finding bears on a ratified +record ([`RECONCILIATION.md`](RECONCILIATION.md), +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md), RESEARCH_MAP +§9's adoption bounds), the ratified record continues to govern until +the owner amends it. + +**Provenance.** Produced by a derivation game played July 19, 2026 — +players: the owner (Cnid), the collaborator (M. Murphy), and Claude — +in which each round bound to one real variable at a `path:line` rather +than an invented scenario. The game's *design* output (a signed-ternary +standing axis, user-gated ratification, and the reading that the +promotion machinery is a findings recorder plus a user gate) is +collaborator direction plus session derivation, is **not** recorded +here, and is not ratified anywhere. This record is confined to what was +verified against bytes. + +**Read this with** [`COMPOSITION_FROM_PRIMITIVES.md`](../../architecture/COMPOSITION_FROM_PRIMITIVES.md), +which states the principle these findings instantiate. That record +diagnosed the failure as documentation drift — prose describes the +primitive, machinery encodes an instance. Findings 1–3 show the +machinery additionally **discarded** the primitive, while implementing +a record that specified it. + +--- + +## Verification + +Every finding is re-checkable. Run the command; do not rely on this +record's compression of the result — that is the derived-source +substitution this program has already paid for twice +(`CODE_MEDIATED_TEXT.md` §2.9, `AMBIENT.md` 18). + +## Finding 1 — `orientation` is specified in a ratified record and absent from the engine + +S10's schema +([`FOUR_JUDGE_BASIC_MODEL.md`](FOUR_JUDGE_BASIC_MODEL.md)) gives every +judge a seven-field orientation block: `evidence_standard`, +`uncertainty_posture`, `temporal_horizon`, `stakeholder_scope`, +`reversibility`, `contradiction_sensitivity`, `abstention_boundary`. +[`RECONCILIATION.md`](RECONCILIATION.md) specifies it four times, once +per judge (lines 127, 178, 229, 285). + +The engine has no representation of it. `ComposedJudgePrompt`'s +`definitionSection` carries `role`, `claimModes`, `qualifiedParameters`, +`taxonomy`, `requiredAssumptions` — and no orientation field +([`judge_intake_prompt.ts:61`](../../../src/core/graph/judge_intake_prompt.ts:61)). + +```sh +grep -rn "orientation\|evidence_standard\|uncertainty_posture\|abstention_boundary\|temporal_horizon\|stakeholder_scope\|contradiction_sensitivity" src/ scripts/ --include=*.ts +# only hit: alias_resolution.test.ts — "pair orientation", unrelated +``` + +**LARGELY WITHDRAWN — July 20, 2026, same session.** An adversarial +debate probe broke this finding on two independent grounds, both +verified against bytes: + +1. **The modal claim was false.** The original read: *"Because no code + references it, no drill can detect its absence."* Drills in this + repository assert over **file text**, not the import graph — + `scripts/test_judge_convocation.ts:725-742` `readFileSync`s ten + `src/rlm/*.py` files and `src/config/schema.ts` and token-scans + them, none of them imported by the code under test. A drill + comparing `definitionSection`'s field set against `RECONCILIATION` + §2's is constructible from idioms already in the file this finding + named as the enforcement home. "Can" was asserted over a whole + surface from a property of one sub-surface. +2. **The absence is arguably correct.** `RECONCILIATION` §7.1 + (Composition supersession — dated entry, July 19, 2026) rules that + *"judges, their registry selections, **orientations**, closed + taxonomies, names and anchors all compose per context at ceremony + time,"* and reads §1/§2 as **one composition instance**. Orientation + *values* are therefore precisely what must not be schema-encoded. + The engine declining to encode them is this session's own principle + working, not a divergence from it. + +**What survives, narrowed:** `definitionSection` +([`judge_intake_prompt.ts:61`](../../../src/core/graph/judge_intake_prompt.ts:61)) +has **no slot** for a composed orientation. If orientation composes at +ceremony time and is load-bearing, the composed prompt needs somewhere +to carry it, and there is nowhere. That is a gap about the *invocation +path*, not about a ratified record being ignored. + +**Also unverified in the original:** `manifestSchema` requires +`rubricSha` and `anchorSetSha` as drill-pinned 64-hex byte-pins +([`judge_panel.ts:198`](../../../src/core/graph/judge_panel.ts:198)). +Whether those cover a composed orientation was never checked before +this finding asserted the engine "has no representation of it." The +guard-don't-read mechanism proposed elsewhere in this session as +unbuilt may already partly exist. + +**Owed:** nothing on the original framing, which is withdrawn. The +narrowed gap is a design question for the ceremony's invocation path. + +## Finding 2 — the four registries do no computational work + +S10 calls the registries the primitive: *"These are parameters, not +rules. Their implementations, weights, thresholds, and composition +operators can remain open."* + +In the engine `qualifiedParameters` is +`z.array(z.string().min(1)).min(1)` +([`judge_intake_prompt.ts:65`](../../../src/core/graph/judge_intake_prompt.ts:65)) +— free strings, no enum, no validation of the registry prefix. + +`registryEntry()` +([`judge_panel.ts:132`](../../../src/core/graph/judge_panel.ts:132)) +splits on `/` only, returning the `registry.parameter` half. Nothing +anywhere splits on `.` to recover the registry name: + +```sh +grep -rn "split('\.')\|indexOf('\.')" src/ --include=*.ts +# only hit: src/core/repository/paths.ts:107 — filename basename, unrelated +``` + +Kinship comparison (`judge_panel.ts:524`) therefore operates at +`registry.parameter` granularity. The four plane names — +Emotional/Logical/Sensorial/Ethical — are a prefix convention inside an +unvalidated string. They are never extracted, compared, or gated on. + +**Owed:** a decision on whether the registries are load-bearing. If +they are, they need a representation. If they are a lens — RESEARCH_MAP +R-31 already records that expandable registries are *"counterexample- +proof by construction — the mark of a lens, not a defect"* — then no +gate should ever be described as resting on them. + +## Finding 3 — AB-7 has no enforcement code + +AB-7 (RESEARCH_MAP §9) keeps the non-epistemic registries out of +epistemic questions. `RECONCILIATION.md:120` carries +`emotional: [] # src: AB-7`. + +```sh +grep -rn "AB-7\|AB_7" src/ scripts/ --include=*.ts +# no results +``` + +The bound holds because the four authored role definitions happen to +select no emotional or ethical parameters. Given finding 2, nothing +could enforce it: a composed judge selecting `emotional.affect/reported` +would pass every check in the system. + +**WITHDRAWN — July 20, 2026, same session. This finding tested the +wrong sentence.** AB-7 appears at +[`RESEARCH_MAP.md:595`](RESEARCH_MAP.md) as a table row whose bytes are: + +``` +| AB-7 | **Two planes ship first**; a new plane requires a governance question no existing plane answers, plus its own drill sections | R-17, parent §2.1 | +``` + +**Correction to this withdrawal, July 20, 2026 — a second probe caught +a fresh error inside it.** An earlier version of this paragraph called +that row *"AB-7's ratified text."* **It is not ratified.** +`RESEARCH_MAP.md` declares its own standing in its first nine lines: +*"Status: RESEARCH SYNTHESIS — PROPOSAL. Nothing in this document is +implemented, measured, promoted, or accepted"* and *"Tier-3 standing: +none."* The adopted locus of the plane rule is +[`EPISTEMIC_SUPPORT.md`](../../architecture/EPISTEMIC_SUPPORT.md) §1.1, +which names *three* planes and ends the requirement with a scope +limiter this record twice dropped: *"before any consumer reads it."* +The earlier version also quoted the row with three byte defects — a +terminal period that exists nowhere in the source, stripped `**` +emphasis, and the omitted origin cell — under the word "reads", in a +house whose rule 15 adjudicates quotation at the byte level. + +**So the correction for derived-source substitution itself committed +derived-source substitution**, one paragraph after naming the failure +class. The honest counter, recorded because it is the strongest reply +available: `EPISTEMIC_SUPPORT.md:12` incorporates AB-1…AB-11 by +reference into the adopted record, which may confer ratified standing +on the bounds notwithstanding the host document's header. That question +is open and is not resolved here. + +The row is a **plane-admission procedure**, not a registry allowlist. The +"keep Emotional and Ethical out of epistemic judging" reading this +finding attacked is downstream gloss (`RESEARCH_MAP.md:187`, +`FOUR_JUDGE_DESIGN.md:304`, `RECONCILIATION.md:120`). Asking whether a +plane-admission procedure has enforcement code is a different question, +and this finding never asked it. + +**This is derived-source substitution** — acting on a compression of a +governing record instead of retrieving the record +(`CODE_MEDIATED_TEXT.md` §2.9, `AMBIENT.md` 18). Committed inside an +audit whose subject is encodings drifting from the records they +implement, by an author who had cited that failure class twice in the +same session. + +**A second defect in the method, independent of the first:** grepping +for a bound's *label* does not test for its *mechanism*. AB-9 is +enforced in this repo by import-graph assertions that would keep working +with every occurrence of the string "AB-9" deleted +(`scripts/test_judge_intake.ts:261`, `scripts/test_judge_panel.ts:213`, +`:220`). A label-absent grep cannot distinguish "no mechanism" from +"mechanism under another name." + +**Owed:** nothing on this framing. The open question it should have +asked — whether the plane-admission procedure is enforced, and whether +`judge_panel.ts:464-470`/`:542` already function as a partial registry +gate — is untouched and unexamined. + +## Finding 4 — a promoted ledger row depends on a merit-refused row + +[`JUDGE_COMPOSITION_GAME.md`](JUDGE_COMPOSITION_GAME.md) §7 (The final +ledger), row 1: *game-target spec* — **promote**, carrying +*"record-fit routes through the priority declaration (keystone)."* + +Row 6: *examples have no primacy beyond Trellis* — **merit refused +(typed); grounded declaration**, carrying *"keystone flag."* + +Row 6 is the keystone row 1's note points at (it is the only +merit-refused row carrying the keystone flag; row 7 is merit-refused +without it). So a promoted item's record-fit routes through a +declaration the same ledger declined to promote. + +This is not necessarily a wrong disposition — the §6 grammar has no way +to express a promotion whose support runs through a user declaration, +so the dependency was recorded as a carried note and the note was +honoured. The finding is that **the grammar cannot type it**, and a +carried note is not machine-checkable. + +**Owed:** nothing corrective to the ledger. The gap belongs to the +disposition grammar, and is the strongest argument in the program's +own record for extending it. + +## Finding 5 — the abstention vocabulary encodes an axis the claim-mode vocabulary lacks + +`abstainReasons` is `['evidence', 'jurisdiction']` +([`judge_intake_prompt.ts:80`](../../../src/core/graph/judge_intake_prompt.ts:80)). +The two have different sources: jurisdiction-abstention is +engine-synthesized from a claim-mode mismatch +(`JUDGE_CONVOCATION_DESIGN.md` §3.5 — S10 layer 3 is engine-decidable, +zero spend); evidence-abstention arises at judging time when a seat +cannot reach what would settle the claim. + +The consequence: **reachability has no representation in the +candidate's declared type.** A candidate declares a mode; nothing +declares whether what would settle it is reachable under the active +allowlist. GAME §7 row 8 (*"routine reproduction during own work"* — +`abstain(evidence)`, disclosed untestable-as-composed) is the case in +the record. + +**Owed:** a decision on whether reachability is a declared property of +a candidate or a discovered property of a run. Either is defensible; +the current design assumes the second without recording the choice. + +## Finding 6 — the third REPL type has no representation + +The collaborator's description of the runtime (July 19, 2026) is *"a +REPL where facts, beliefs, and doubts live."* Facts and beliefs have +homes. The third does not: + +```sh +grep -rn "doubt" src/ -i +# no results +``` + +What exists is a boolean with a label — `r.contested = true`, +`contestedReason`, `contestedAt`, `orphanedSourceIds` +([`entailment_detection.ts:280`](../../../src/core/graph/entailment_detection.ts:280)) +and no epistemic defeat vocabulary: + +```sh +grep -rn "rebut\|refut" src/ -i # no results +grep -rn "defeat" src/ -i # 2 results, both ordinary English +# trellis_scaffold.py:78,425 — "would defeat the surface's purpose", +# "defeat the re-read"; prose in comments, not a concept in the design +``` + +A contest marks re-adjudicability; it carries no cited evidence, no +address, and no author, and it cannot itself be contested. + +The consequence is that `-1` is **residual** — defined as the absence +of support rather than constructed as defeat. Any design in which a +panel emits signed findings and a user gates them needs somewhere to +put a finding; there is currently no such object. + +**NARROWED — July 20, 2026.** A probe established that "the third REPL +type has no representation" overreaches, and that the grep is weak +evidence for it. The concept **is** represented, under a juridical +register rather than an epistemic one: `contested` / `contestedReason` +/ `contestedAt` across at least ten non-test `src/` files, +`DISPUTE_CYPHER` (`verification.ts:292`), and +`abstainReason: 'evidence'` with `judge_panel.ts:540`'s *"an unjudged +or undecidable belief holds maximal uncertainty."* This record's own §1 +concedes as much — *"defeat machinery exists today"* — and the +`DOUBTS_WORKSPACE.md` §10 vocabulary proposal states the four +`alias_resolution.ts` call sites need no migration, which concedes the +existing code was already doing the work under another word. + +**A lexical grep measures the probe's vocabulary, not the source +tree's concepts** — and the token chosen was the one word the codebase +had not adopted. What survives is narrower and unaffected: no +**first-class, addressable** doubt object exists — the machinery that +does exist carries no cited evidence, no address, and no author, and +cannot itself be contested. + +**Owed:** nothing corrective. This is a gap, not a defect, and the +design response is proposed separately at +[`DOUBTS_WORKSPACE.md`](../../architecture/DOUBTS_WORKSPACE.md). + +--- + +## The common root (this session's reading — not established) + +Findings 1, 2 and 5 share a mechanism, offered as a reading rather than +a result: + +**A code-mediated design encodes what is token-valued and silently +drops what is prose-valued.** `evidence_standard` takes a sentence; a +design in which the model never counts and never copies has nowhere to +put a sentence it cannot check. So orientation fell out between the +ratified record and the implementation, and nobody decided it. + +The consequence, stated as the inversion: + +| Layer | S10's status | What the engine did | +|---|---|---| +| registries | *the primitive* — explicitly open | free string, never parsed | +| orientation | the per-context composition surface | absent | +| roles | illustrative ecology | frozen enum + three-way parity pins | +| claim modes | *(collaborator, July 19, 2026)* a useful first vocabulary | frozen enum + three-way parity pins | + +The two layers S10 presented as examples are the two the engine froze +hardest. The two it called primitive are decorative and missing. + +**A candidate resolution, recorded as a direction and not a design:** +the engine need not read an orientation to guard one — that it exists, +that its bytes are hash-pinned, that the identical orientation reached +every seat claiming it, and that it was bound before the candidate was +seen. Chain of custody over prose rather than evaluation of prose. This +is unratified and unbuilt. + +## What this record does not contain + +The game also produced collaborator direction and session derivation +that are **not** findings about bytes: the signed-ternary standing axis +(`-1 | 0 | 1`), user-gated ratification with the qualifier carried in +the address, the meet rule for derived claims' hash kinds, and the +reading that the panel never moves standing. Those are unratified, are +not recorded here, and would each need their own proposal before +anything is built. diff --git a/.claude/skills/self-play/references/README.md b/.claude/skills/self-play/references/README.md new file mode 100644 index 0000000..fb53419 --- /dev/null +++ b/.claude/skills/self-play/references/README.md @@ -0,0 +1,55 @@ +# Reference material + +The records this skill cites, mirrored **byte-for-byte** from the Trellis +repository so the skill travels intact: lift this skill's directory out of the +repo and every document it cites comes with it. + +## How to read these + +Pull the cited section; leave the rest on disk. Several of these run past 40 KB, +and loading one whole spends the context the skill exists to spend well. + +``` +Grep "{Section_Number_Or_Exact_Heading}" references/{Mirrored_File} -A 40 +``` + +The skill body names the section it wants at each step. That name is the read +instruction — follow it to the section, not to the file. + +## These are mirrors, not the record + +The canonical copy is the source path in the table below. On any divergence +**the record wins and the mirror is replaced from source**. A mirror is never +edited in place, and never cited as authority against the record it came from. + +Nothing is appended inside the mirrored files. Byte-identity to the source is +what makes a mirror checkable, and a provenance header written into the file +would be the first thing to destroy it — so provenance lives here instead. + +No sync check is installed. These are portability snapshots taken at one commit; +the hashes below are what a reader verifies a mirror against, with or without +the Trellis repository present. + +## Provenance + +Mirrored from the Trellis repository at commit `65fdb1f`, dated 2026-07-25. + +| File | Canonical source | Bytes | SHA-256 | +|---|---|---|---| +| `AMBIENT.md` | `AMBIENT.md` | 8,070 | `dfb614b83b3eb4ba22fb6a33d12e445bbb9ead5c5e1e1a6a51b50d1febf33603` | +| `DOUBTS_WORKSPACE.md` | `docs/architecture/DOUBTS_WORKSPACE.md` | 37,859 | `aec7483652bc6f369f003674c8f3491df5136fd38e0dd98605531397c2663bda` | +| `PRIMITIVE_ENCODING_AUDIT.md` | `docs/product/epistemic-support/PRIMITIVE_ENCODING_AUDIT.md` | 17,249 | `ccc0ee05f8fe84951601103b1da3c4d251b6cfdbd31fe7ada2ff23db81d42836` | +| `TEST_TIME_TRAINING.md` | `docs/architecture/TEST_TIME_TRAINING.md` | 64,208 | `9fd170da66d4d5f57213057ab9bf12a9131346283dd5a304ee79049cb42d5302` | + +Verify a mirror against a checked-out Trellis repository by hashing both working +files, so both get that checkout's line-ending treatment and a content match +hashes equal on any platform: + +``` +sha256sum references/{Mirrored_File} {Trellis_Repo_Path}/{Canonical_Source_Path} +``` + +The column above records the mirrored bytes as committed, which carry CRLF. A +checkout that normalizes line endings hashes differently without any content +having changed — so compare mirror against source, and read the column as the +snapshot's own fingerprint rather than as a cross-platform constant. diff --git a/.claude/skills/self-play/references/TEST_TIME_TRAINING.md b/.claude/skills/self-play/references/TEST_TIME_TRAINING.md new file mode 100644 index 0000000..c3dddfb --- /dev/null +++ b/.claude/skills/self-play/references/TEST_TIME_TRAINING.md @@ -0,0 +1,1009 @@ +# Test-Time Training and the Sparse-Model Backend — Research-Track Record + +**Status: RESEARCH INITIATION (Session 45, July 13, 2026 — owner-directed).** +This record roadmaps a research track; it ratifies NO design decision, lands +NO machinery, and changes NO runtime byte. Every rung of the ladder in §7 is +owner-gated and enters as its own proposal with its own estimate. The record +follows the house document-first mold (rows 9/10/12: the design record +precedes any implementation), one stage earlier — this is the record that +decides whether a design record is ever warranted. + +**Origin.** The owner relayed an external collaborator's active line of work +(the same collaborator whose provenance-threading proposal became roadmap +row 9 — see `docs/COLLABORATOR_BRIEFING.md`): *increasingly optimized sparse +models in this harness*, adapted per turn by **Test-Time Training (TTT)** — +fast-weight layers trained during inference on the contents of the RLM's +context (the REPL variables), and — the collaborator's sharper claim — on the +harness's own composed meta-prompts, "increasing quality of response +overall." This record decomposes that claim, surveys the literature as of +July 2026, maps the mechanism onto Trellis's actual seams, and pre-states how +any adoption claim would be measured before a dollar or a GPU-hour is spent. + +--- + +## 1. Why this record exists + +Trellis's reasoning engine is an RLM — a root LM operating a persistent +Python REPL, with the knowledge substrate injected as live tool objects +(the MIT CSAIL formulation: Zhang, Kraska & Khattab, arXiv:2512.24601). The +root model today is `gpt-5.4-2026-03-05` behind the OpenAI API: a closed +model whose weights Trellis cannot touch. Every behavioral improvement this +project has shipped therefore lives in one of two layers: + +1. **Tooling shape** (the permanent owner direction after Session 28): + typed refusals, engine-computed addresses, gates, budgets — the + mechanism that closed transcription, laundering-T1, retrieval waste, + and the splice pathologies. +2. **Prompt text** (deprioritized after the module #2 retirement): the + composed system prompt, byte-pinned, reinforcing but never carrying the + behavior. + +TTT proposes a **third layer that Trellis has never had access to: the +model's own weights, adapted per run at inference time.** The proposal only +becomes physically possible if the backend moves (in whole or in part) to +open-weights models — which is exactly the collaborator's "increasingly +optimized sparse models" premise: modern sparse mixture-of-experts models +(the open-weights MoE class) are cheap enough to serve locally that +per-turn weight adaptation becomes an affordable, measurable lever rather +than a hypothetical. + +The reason to take this seriously is architectural fit, not fashion: the +RLM already treats context as an external environment queried through +code. TTT layers treat context as a training signal compressed into +weights. These are complementary compressions of the same thing — and the +harness's fixed, byte-pinned meta-prompt is precisely the kind of +repeated-prefix signal that fast-weight machinery amortizes well (§4.3). +The reason for caution is equally concrete: the strongest 2026 agentic +result (§3.4) found TTT gains are *stability-shaped*, not +capability-shaped, and the strongest 2026 evaluation paper found that +perplexity-style TTT wins often fail to appear as behavioral wins. Both +findings align exactly with this project's measurement doctrine, so the +ladder in §7 is built on it. + +## 2. The claim, decomposed + +The collaborator's description compresses three separable hypotheses. They +are stated here so each can be tested — or rejected — on its own. + +- **H1 (context adaptation).** Fast-weight layers trained per turn on the + REPL-resident context improve the model's use of that context — + long-context retrieval, cross-turn variable tracking, protocol + adherence over long episodes. *Literature status: supported at modest + effect sizes on long-context benchmarks (§3.2), with an explicit + behavioral caveat (§3.4). Trellis-specific status: unmeasured.* +- **H2 (meta-prompt adaptation).** Because the harness re-presents the + same composed meta-prompt bytes every turn (`RLM_SYSTEM_PROMPT` + + `TRELLIS_ADDENDUM`, byte-pinned at `COMPOSED_SYSTEM_PROMPT_SHA256`), + fast weights repeatedly trained over that prefix effectively *compile + the protocol into weights*, improving instruction-following on the + house protocol specifically. *Literature status: no direct study found; + the nearest mechanisms are prefix-state compilation (§3.3) and + fast-weight prefix processing (§3.1). This is the most original and + least evidenced hypothesis — it needs a positive control before any + belief attaches (§6).* +- **H3 (the sparse-model vehicle).** Open sparse MoE checkpoints are the + practical substrate: cheap enough to serve, open enough to adapt. + *Status: a premise about infrastructure, not a hypothesis about + behavior — but it smuggles in the real gating question, which is + whether ANY open model drives the house REPL protocol acceptably + before TTT enters the picture at all (§7 R3). No TTT×MoE unified + literature exists as of July 2026 (§3.5); expert-level adaptation is + an open question for the collaborator (§9).* + +The phrase "increasing quality of response overall" is treated throughout +this record as **an unmeasured hypothesis, not a finding.** Guardrail 8 +applies to prospective claims too: no headline until a paired arm exists. + +## 3. What the literature actually says (as of July 2026) + +Three mechanism families get called "test-time training." They differ in +where the weights live, when they update, and what infrastructure they +demand — conflating them is the most common error in secondhand accounts, +and the collaborator's "FastWeights" phrasing spans at least two of them. + +### 3.1 Family A — fast-weight layers as architecture + +The hidden state of a sequence layer IS a small model; the layer's forward +pass IS a gradient step on a self-supervised loss over the incoming +context. "Training during test time" is the layer's normal operation, and +an outer training loop learns the learning rule itself. + +- **TTT-Linear / TTT-MLP** (Sun et al., *Learning to (Learn at Test + Time): RNNs with Expressive Hidden States*, arXiv:2407.04620, ICML + 2025): the modern statement of the idea. Linear-complexity layers whose + hidden state (a linear model or 2-layer MLP) is updated by a + reconstruction loss per token; matches or exceeds Transformer and Mamba + baselines and — unlike Mamba — keeps improving past 16k context. +- **Titans** (Behrouz, Zhong & Mirrokni, Google Research, + arXiv:2501.00663, NeurIPS 2025): a neural long-term memory module + updated at test time by a surprise-metric gradient with momentum and + weight decay (forgetting); attention as short-term memory beside it; + scales past 2M-token context. **ATLAS** (arXiv:2505.23735) and the + test-time-regression unifying framework (arXiv:2501.12352) generalize + the family. +- **Large-chunk TTT / "Test-Time Training Done Right" (LaCT)** (Zhang + et al., MIT + Adobe, arXiv:2505.23884; OpenReview Tb9qAxT3xv): makes + nonlinear fast-weight updates hardware-efficient by batching updates + over extremely large chunks (2K–1M tokens) — lifting fast-weight + FLOPs utilization from <5% by orders of magnitude and scaling + nonlinear state to ~40% of model parameters. Demonstrated in three + domains: novel view synthesis (0.3B, 1M-token context, from + scratch), language modeling (760M + 3B at 32,768 context, FROM + SCRATCH — lower per-token loss at large token indices than GLA and + DeltaNet, competitive with full attention), and autoregressive video + diffusion — the one RETROFIT instance: the pretrained Wan 2.1 model + fine-tuned with all bidirectional attention REPLACED by LaCT + + sliding-window attention, quality COMPARABLE to the full-attention + baseline while enabling autoregressive generation. Authors' stated + limitation: state-based models are weaker at reasoning. **This is + the collaborator's selected mechanism — see §12.** +- **Lineage** (the collaborator's "FastWeights" vocabulary): fast weights + are Schmidhuber 1992 (*Learning to Control Fast-Weight Memories*) and + Ba et al. 2016 (*Using Fast Weights to Attend to the Recent Past*, + arXiv:1610.06258); Schlag, Irie & Schmidhuber 2021 showed linear + attention IS a fast-weight programmer (arXiv:2102.11174) — the formal + bridge explaining why in-context learning and fast-weight adaptation + are siblings. + +**Relevance to Trellis:** Family A requires the backend model to HAVE such +layers — either trained with them or retrofitted (the 2025 video result, +arXiv:2504.05298, grafted TTT layers onto a frozen pretrained DiT). Trellis +cannot add Family A to an API model. This family becomes available only at +or after §7 R3 (open-weights serving), and only if a checkpoint with these +layers exists or a retrofit is funded. + +### 3.2 Family B — per-instance adaptation of pretrained weights + +An ordinary pretrained model; an explicit optimizer step (usually LoRA or +rank-constrained fast weights) at inference time, on data derived from the +test input; weights discarded afterward. This is the family that works on +open checkpoints TODAY and the one every 2026 agentic result uses. + +- **TTT for ARC** (Akyürek et al., *The Surprising Effectiveness of + Test-Time Training for Abstract Reasoning*, arXiv:2411.07279): per-task + LoRA adapters trained at test time on augmented demonstrations; up to + 6× accuracy over the fine-tuned base; 53% on ARC public with an 8B + model. The canonical evidence that per-instance gradient steps buy real + capability on the right task shape. +- **TTT on nearest neighbors** (Hardt & Sun, arXiv:2305.18466, ICLR + 2024): fine-tune briefly on retrieved neighbors of the test input. + Directly suggestive for Trellis: the retrieval substrate could FEED the + adaptation data path — with all the provenance questions §5 raises. +- **TTT-NTP** (Ouyang, Cai & Hu, *Test-Time Training with Next-Token + Prediction*, arXiv:2606.21803, June 2026): drop-in fast weights at MLP + down-projections, chunk-parallel rank-one updates tied to the native + next-token loss; works on released checkpoints (Llama-3.1-8B, + Mistral-7B, Qwen3 series); +3–4 points on RULER 4k–32k, +3.7–5.6 on + LongBench-v2, general knowledge preserved. The current best evidence + that fast-weight adaptation is deployable on open models without + architectural surgery. +- **Self-guided TTT for long context** (arXiv:2607.09415, July 2026): the + model selects relevant spans before adapting on them — TTT with a + retrieval step in front, again adjacent to Trellis's shape. + +### 3.3 Family C — compiled-state cousins (no per-turn gradient) + +- **Cartridges / self-study** (arXiv:2506.06266): train a compact + KV-like state per corpus OFFLINE, reuse it at inference — amortized + context rather than per-turn training. The nearest existing mechanism + to H2's "compile the meta-prompt" reading. +- **SEAL** (arXiv:2506.10943): the model writes its own finetuning data + and applies persistent self-edits — adjacent but PERSISTENT, which + places it outside this track's per-run-ephemeral scope (§5.3). +- **Transformer²** (arXiv:2501.06252): inference-time expert-vector + selection over SVD components — adaptation without test-time gradients. + +### 3.4 The two 2026 results that most constrain this track + +1. **Agentic TTT** (*No Time Like the Present: Agentic Test-Time Training + for LLM Agents*, arXiv:2607.03441, July 2026): continuous in-episode + LoRA updates for multi-turn agents (vLLM runtime-LoRA serving), with + token-level loss reweighting to stop the feedback loop where each + update changes the policy that generates the next batch of training + text. Gains: up to +5.0 ALFWorld / +4.9 SWE-bench Lite at 1.9× serving + cost — and the authors' own characterization is that aTTT **preserves + existing competence over long trajectories rather than teaching new + abilities.** For Trellis this is the most load-bearing external fact: + the realistic H1 payoff is *protocol-adherence stability over long + REPL episodes*, a quantity the harness already counts + (`TRELLIS_PROTOCOL_VIOLATION`, answer-channel compliance, criterion + items in every measured run). +2. **Beyond Perplexity** (arXiv:2607.00368, July 2026): a behavioral + evaluation framework for TTT deployment-memory claims; finds that + perplexity improvements from TTT frequently fail to appear as + behavioral ability to USE the newly absorbed information. This is the + house measurement doctrine stated independently: a TTT arm must be + judged on task behavior with pre-stated criteria, never on loss + curves. §6 adopts it explicitly. + +### 3.5 What was NOT found + +No unified TTT×sparse-MoE literature (expert-level fast weights, routed +adaptation) as of July 2026 — the intersection is the collaborator's +research premise, not an established result, and §9 asks them for their +formulation. No direct study of fast-weight adaptation to a fixed +harness meta-prompt (H2) was found either; H2 is genuinely open. + +## 4. What TTT would mean inside Trellis — the seams, named + +### 4.1 The backend seam today + +The model backend is hardcoded at exactly the places an R2 audit must +census (initial grep, to be completed by R2): + +- `src/rlm/trellis_agent.py` passes + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` to the rlms + scaffold at both construction sites (research mode and author mode), + and constructs a direct `openai.OpenAI()` client for the checker-model + path. The rlms library (rlms==0.1.3, pinned) owns the actual API + transport; **whether it exposes a base-URL/backend override without + library modification is UNKNOWN and is R2's first question** — + guardrail: no rlms modifications, so if it does not, the serving layer + must present an OpenAI-compatible endpoint (vLLM and SGLang both do; + the aTTT paper's serving stack is vLLM's runtime-LoRA API, which is + encouraging for R4's feasibility). +- The worker-side completions (extraction, entailment judge, sweeps) have + their own client constructions and pricing constants + (gpt-5.4 $2.50/M in, $10/M out appears in runner spend gates) — R2 + censuses these; nothing here assumes they move. **A split backend + (open model for the RLM root, API model for extraction/judging) is a + legitimate intermediate state** and probably the first real + configuration. + +### 4.2 The embedding coupling — a substrate-identity trap named early + +`vector_search` similarity runs against STORED embeddings: +`src/config/schema.ts` pins `embedding vector(1536)` with an HNSW index, +and `search_ast_nodes` orders by distance to a query embedding produced by +the SAME embedder family. Swapping the embedding model is therefore NOT a +config change: stored embeddings and query embeddings must come from the +same space, the schema pins the dimension, and a different embedder +invalidates every stored vector (a re-embed of the full live substrate, at +cost, plus a schema migration if dimensions differ). **The completion +backend and the embedding backend are separable decisions.** The cheap, +sane first configuration keeps the OpenAI embedder while the completion +backend moves. If the embedder ever moves, that is a substrate-identity +event in the Session 38 grammar-pin sense: recorded, owner-visible, +re-measured (the eight pinned seam queries are the standing instrument — +they are embedder-sensitive by construction). + +### 4.3 The meta-prompt prefix and the byte pins (H2, mechanically) + +Every research run presents the same composed prompt prefix, byte-pinned +(`COMPOSED_SYSTEM_PROMPT_SHA256 = 6183de3a…ed50` since the Session 51 +re-pin — `scripts/test_modules.py` is authoritative; the pin moves only +with witting kernel changes). Two consequences if the backend ever carries +fast-weight machinery: + +1. **Determinism of the prefix trajectory.** A fast-weight layer's state + after processing a FIXED prefix is a pure function of (checkpoint + hash, TTT config, prefix bytes). The prefix-adapted state can be + computed once and snapshotted — H2's "optimizes the response to our + internal meta-prompts" becomes, concretely, a **prefix fast-state + cache** whose natural cache key is exactly the composed-prompt sha256 + the module registry already maintains. The house byte-pin discipline, + built for prompt integrity, is coincidentally the exact cache-key + discipline this mechanism needs. (Family C's cartridges are the same + idea with offline compilation.) This is an observed architectural + synergy, NOT a promised speedup — R5 measures or drops it. +2. **The pins become load-bearing for a new reason.** Today a silent + prompt-byte drift breaks a hash check; under a prefix fast-state + cache it would also silently invalidate (or worse, mis-serve) an + adapted state. The existing rule — pins move only wittingly, both + recomputed in the same commit — already covers this; the R5 design + record would add the checkpoint hash and TTT config to the key. + +### 4.4 Per-run state semantics + +The house per-run doctrine transfers wholesale: the Session 30 retrieval +set is "per run = per process, monotone, never parked." Fast weights get +the same shape — **per-run ephemeral, reset at process start, never +serialized, never parked, never seeded across runs.** In the multi-turn +REPL, each turn re-presents the transcript, so a stateless serving backend +re-derives the fast state from the full prefix each turn; any within-run +state carry is a serving optimization, not a semantics change. Cross-run +persistence of adapted weights (the SEAL shape) would be a +capability-promotion event — Tier-3-to-somewhere — and is explicitly OUT +of this track's scope; if it is ever wanted it enters through its own +design record with its own gate, exactly as promotion did. + +## 5. Trust-model analysis + +### 5.1 Fast weights have no provenance standing + +A fast-weight state is derived, ephemeral, and untraceable to specific +source bytes in the substrate sense — it is a compressed function of +everything the run saw. It therefore gets the Tier-3 treatment by +definition: **zero provenance standing, structurally incapable of minting +citations.** Nothing about weight adaptation touches what may be written +to the graph: writes still flow through `write_derived_insight`'s +three-layer enforcement (format → existence → retrieval membership), and +the cited addresses still have to be in the run's retrieval set. + +### 5.2 The gates are model-agnostic by construction — the designed-in strength + +Every enforcement mechanism this project built lives ENGINE-SIDE, in the +tool layer and the write path, not in the model: the Session 14 write +path, the Session 30 retrieval set, the Session 31 membership gate, the +Session 32 sampled detector, the Session 33 dedup/budgets, the Session 41 +guarded splice family. **A backend swap — dense to sparse, API to local, +static to TTT — changes NONE of them.** This is not luck; it is the +tooling-shape doctrine paying out: because no behavioral guarantee was +ever entrusted to the model, no behavioral guarantee is lost when the +model changes. The trust model's answer to "can we swap the model?" is +"the trust model never depended on which model." + +### 5.3 The threats a TTT backend adds (named now, measured later) + +1. **Injection amplification.** Today, adversarial bytes in retrieved + content influence one completion. Under TTT they also influence the + WEIGHTS that process every subsequent token of the run — retrieved + content becomes training data mid-flight. The existing containment + story (bounded tool surfaces, typed refusals, the write gates, sampled + entailment) still holds at the action boundary, and per-run reset + bounds the blast radius to one run. But the T2 lesson generalizes: + *what the model absorbed* is not observable the way *what the model + cited* is. Any R4 proposal must state its adaptation-data policy — + what byte sources are eligible to produce gradients (REPL-resident + retrieved blocks? tool outputs? the meta-prompt only?) — as explicitly + as the retrieval set defines citability today. +2. **Cross-run contamination.** Handled by construction if §4.4's + per-run-ephemeral rule is kept absolute. The rule is stated in this + record precisely so a future convenience ("warm-start from the last + run's adapter") is recognizable as a design change, not an + optimization. +3. **Reproducibility.** A TTT run's behavior is a function of checkpoint + hash + TTT config (rank, learning rate, chunk size, seed) + the full + input trajectory. The Session 38 doctrine transfers: **a model + checkpoint is a substrate-identity object — exact-pinned by hash, + bumped only as a recorded owner-visible event.** TTT config values are + run-stamped in telemetry (counts and config echoes, never content), + the same way arm assignment was verified per run in the Session 43 + measurement. + +## 6. Measurement doctrine applied (before any spend) + +The permanent owner direction (July 11–13, 2026) is that behavioral claims +are settled by paired measurement with pre-stated criteria, and failure +classes close by tooling shape. TTT is neither tooling shape nor prompt +text — it is a third substrate — but the acceptance discipline transfers +unchanged, and Trellis is unusually well-instrumented for it: + +- **The instruments already exist.** The `est` suite (five + sufficiency-bounded questions, truths unit-pinned) is a ready-made + paired-arm harness — it was row 10's acceptance instrument and runs + identically against any OpenAI-compatible backend. The + effective-context probe suites, the OOLONG-hard set, protocol-violation + and answer-channel counters, and the stage-2 criterion mold are all + backend-independent. +- **The positive-control duty (the Session 28 lesson, restated for TTT):** + before believing ANY TTT null OR win, build a condition where the + no-TTT arm demonstrably fails and verify TTT moves it. H1's natural + positive control is a long-horizon episode shaped like aTTT's setting + (protocol drift over many turns); H2's is a protocol-adherence task + where the base open model measurably violates the house protocol at a + known rate. *A null result is meaningless until the experiment has + demonstrated it can produce a positive one* — the A/B eval's + meta-lesson, verbatim. +- **Behavioral, never perplexity** (arXiv:2607.00368 adopted): every + criterion item is a task-behavior count (correctness, violations, + refusals handled, tokens, dollars/GPU-minutes) — loss curves and + perplexity may be RECORDED but never satisfy a criterion. +- **Counts and correctness together** (guardrail 4): a TTT arm that cuts + tokens but drops correctness FAILS; one that lifts correctness at 1.9× + serving cost reports both numbers. + +## 7. The rung ladder (each rung owner-gated, propose-with-estimate) + +The ladder is sequenced so every rung is cheap to refuse and no rung +assumes a later one. R2 is the only rung a session can execute without new +infrastructure or budget beyond its own time. + +- **R1 — collaborator exchange (zero-paid, owner-mediated).** Deliver + this record and §9's questions to the collaborator through the owner + (the briefing's five-line proposal frame). Their formulation of the + TTT×sparse intersection shapes R4's arms. No session dependency — + proceeds in parallel with everything. +- **R2 — the backend-seam audit (zero-paid; the next actionable rung).** + A read-only census + design record: every site that assumes the OpenAI + transport, the gpt-5.4 model id, its pricing, or its token accounting + (`trellis_agent.py` construction sites, the direct client + constructions, worker completions, runner spend gates, telemetry + parsers); whether rlms==0.1.3 admits a base-URL override WITHOUT + library modification (guardrail: no rlms mods — if not, the seam is an + OpenAI-compatible serving endpoint, full stop); the embedding-coupling + boundary (§4.2) stated as a non-goal; the split-backend configuration + (§4.1) designed as config, refusal-typed, defaulting to today's exact + behavior byte-for-byte. Output: a design record in this file's §12 (or + its own file if it outgrows this one) + NO implementation until the + owner separately approves one. +- **R3 — the open-sparse baseline (paid: GPU or hosted-endpoint spend; + needs R2's record).** Serve ONE owner-chosen open sparse checkpoint + (exact-pinned by hash) behind an OpenAI-compatible endpoint; run the + est suite + a protocol-adherence block against it, paired against a + same-day gpt-5.4 arm. **The gating question is R3's, not R4's: can an + open sparse model drive the house REPL protocol at an acceptable + violation rate at all?** If R3 fails its pre-stated criterion, the + track PAUSES at a recorded finding — TTT on a model that cannot drive + the protocol is measurement noise. (R3 is also independently valuable: + it prices the API-cost exit for ordinary runs.) +- **R4 — the paired TTT arm (paid; needs R3 PASS).** The same checkpoint + with a Family-B mechanism (aTTT-style in-episode LoRA or + TTT-NTP-style fast weights — R1's exchange picks), same instruments, + TTT on/off paired, adaptation-data policy pre-stated (§5.3.1), + per-run-ephemeral verified in telemetry both directions (the + Session 43 arm-verification mold). Criterion pre-stated in the R4 + proposal; the H1 expectation calibrated by §3.4 (stability-shaped, not + capability-shaped). +- **R5 — the meta-prompt fast-state measurement (paid; needs R4 to have + produced a mechanism worth keeping).** H2 isolated: prefix fast-state + compiled over the composed prompt (cache key = composed-prompt sha256 + + checkpoint hash + TTT config, §4.3), measured on protocol-adherence + deltas specifically. If R4 died, R5 dies with it — H2 is not reachable + by API. + +**Cost doctrine.** Local serving spends GPU-hours, not per-token dollars. +The standing ≤$5/run cap re-expresses as an owner-set per-run compute +budget stated in the R3/R4 proposals (estimate before, actuals after, in +the roadmap §5 entry — unchanged ceremony). Hosted open-model endpoints +(per-token) stay under the $5 cap as-is. + +## 8. Honest scope — what this record does NOT claim + +- **No TTT is possible on the current backend.** gpt-5.4 is an API model; + nothing in this track changes today's runtime, and no runtime byte + moved in the session that wrote this record. +- **"Increases quality of response overall" is a hypothesis** (H1+H2), + not a finding — and the best current external evidence (§3.4) predicts + the honest win is *stability over long episodes*, at ~2× serving cost, + not a general quality lift. If the measurements come back + stability-only, that is the finding this record's ladder was built to + produce, and it gets reported at exactly that size. +- **H2 has no direct literature support** — it is the collaborator's + conjecture plus an architectural synergy observation (§4.3). It is + listed last in the ladder for that reason. +- **The sparse premise is not evaluated here.** Whether optimized sparse + checkpoints are the right vehicle is R3's empirical question and the + collaborator's expertise; this record maps the harness side only. +- **This record makes no promise that the track proceeds.** If the owner + never gates R2 open, this file is a complete, self-contained account of + why not-yet — which is a legitimate steady state. + +## 9. Questions for the collaborator (via the owner; the briefing's frame) + +1. **Mechanism selection.** For a multi-turn REPL agent with a fixed + ~10k-token protocol prefix and run-resident retrieved context: which + concrete mechanism do you have in mind — architectural fast-weight + layers (TTT-Linear/Titans class, needs a trained-with-TTT + checkpoint), in-episode LoRA (aTTT class, works on any open + checkpoint via runtime-LoRA serving), or drop-in fast weights at MLP + projections (TTT-NTP class)? Our R4 arms depend on this choice. +2. **The sparse intersection.** "Increasingly optimized sparse models" — + is the sparsity doing WORK in your formulation (expert-level + adaptation, routed fast weights — a literature we could not find as + of July 2026), or is it the economics (open MoE = cheap serving) with + TTT orthogonal? If the former: what does a positive control for + expert-level adaptation look like? +3. **The meta-prompt claim (H2).** What is the mechanism by which + fast-weight adaptation over a FIXED prefix improves responses beyond + what the frozen model already extracts from attending to that prefix? + A gradient step over bytes the model has fully attended to is not + obviously additive — is the claim about effective capacity, about + depth-of-processing, or about something empirical you have observed? + A failing case we can reproduce (your five-line frame's "Failure it + closes") would move this from conjecture to rung. +4. **The adaptation-data policy (§5.3).** In your setup, what byte + sources are eligible to produce gradients at test time? Our trust + model needs this stated as precisely as the retrieval set defines + citability — retrieved substrate blocks, tool outputs, the prefix + only, or everything in the REPL? + +## 10. Reading list (dependency order, identifiers verified July 13, 2026) + +| # | work | why it matters here | +|---|---|---| +| 1 | Zhang, Kraska & Khattab, *Recursive Language Models*, arXiv:2512.24601 | the formulation Trellis implements; TTT would live UNDER this; locator-verified note: [OpenCnid/recursive-language-models](https://github.com/OpenCnid/recursive-language-models) | +| 2 | Sun et al., *Learning to (Learn at Test Time)*, arXiv:2407.04620 | Family A's modern statement (TTT-Linear/TTT-MLP) | +| 3 | Behrouz et al., *Titans*, arXiv:2501.00663 (+ *ATLAS*, arXiv:2505.23735) | fast-weight long-term memory at 2M+ context | +| 4 | Ba et al., arXiv:1610.06258; Schlag et al., arXiv:2102.11174 | the FastWeights lineage; attention ≈ fast-weight programming | +| 5 | Akyürek et al., arXiv:2411.07279 | Family B's capability ceiling (ARC, 6×) | +| 6 | Hardt & Sun, arXiv:2305.18466 | TTT on retrieved neighbors — the retrieval-fed variant | +| 7 | Ouyang, Cai & Hu, *TTT-NTP*, arXiv:2606.21803 | drop-in fast weights on open checkpoints (June 2026) | +| 8 | *No Time Like the Present: Agentic TTT*, arXiv:2607.03441 | the multi-turn agent result + the stability-not-capability finding | +| 9 | *Beyond Perplexity*, arXiv:2607.00368 | the behavioral-evaluation framework §6 adopts | +| 10 | *Cartridges*, arXiv:2506.06266; *SEAL*, arXiv:2506.10943 | Family C: compiled prefix state; persistent self-edits (out of scope) | +| 11 | *Self-Guided TTT*, arXiv:2607.09415; LaCT, arXiv:2505.23884 | span-selected adaptation; hardware-efficient large-chunk TTT — the §12 selected mechanism | +| 12 | Szafer et al., *Navigating the Cost-Performance Pareto Frontier of Test-Time LLM Agent Adaptation*, ICLR 2026 (OpenReview tWAnCRYMcT) | cost-performance frontier; adaptation helps reasoning not facts; rollout dominates wall-clock | +| 13 | Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633 (ICML 2025) | reports (Observation 3) LoRA mitigates forgetting more than full-parameter updates in the TTL setting; the drift-bound citation | +| 14 | Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace | workspace / Jacobian-lens; the §12.7 potential avenue; small-model reproductions | + +## 11. Interaction with standing guardrails (nothing weakened) + +- **No rlms library modifications** (guardrail 10): the backend seam, if + ever built, is config + an OpenAI-compatible endpoint, or it is not + built. +- **The write path, retrieval set, membership gate, detector, discipline, + and guarded family are untouched by anything in this track** (§5.2); + fast weights never gain provenance standing (§5.1); per-run-ephemeral + is absolute within this track (§4.4). +- **Model checkpoints and embedders are substrate-identity objects**: + exact-pinned, bumped as recorded owner-visible events (§4.2, §5.3.3); + the embedder does not move as a side effect of the completion backend + moving. +- **All spend owner-gated propose-with-estimate**; the compute-budget + re-expression (§7) changes the unit, never the ceremony. +- **Experiment flags follow the house mold**: any TTT on/off arm flag is + probe-only, off by default, byte-identical unset, stripped by + `buildAgentEnv` — exactly the `TRELLIS_EXP_*` pattern. +- **No default changes**: today's backend, prompt bytes, and pins are the + baseline every rung is measured against; a rung that lands still + changes no default without its own recorded owner decision. + +## 12. The R1 exchange — the collaborator's selection and the reliance claim (added July 13, 2026, same day) + +The owner relayed the collaborator's response to this record the same +day it was written, referring to §3.1's LaCT entry. Verbatim: + +> "This is the model we aim to use. With open weights, we can add a +> synthetic set layers that are the fast weights. Trellis can do this. +> It has provenance to check procedure. It can ensure the meta-prompts +> are followed as strongly as possible based on the data in the REPL. +> Each can be combined to ensure all meta-prompts perform as well as +> possible for output sculpting and efficiency. The research shows this +> improves base model performance. That's the claim we're relying on +> for our application." + +This answers §9 question 1 and sharpens questions 2–4. What it +settles, what it opens, and what the house doctrine requires before +the reliance claim carries weight: + +### 12.1 The selection, verified against the primary source + +LaCT (arXiv:2505.23884) was re-verified against the paper on July 13, +2026; the §3.1 entry now carries the full experimental facts. The two +that matter for the plan as stated: + +1. **"Add a synthetic set of layers that are the fast weights" is the + Wan-2.1 retrofit pattern, and it is a TRAINING JOB** — the paper's + only pretrained-model instance fine-tunes the model with the new + layers in place (attention layers replaced by LaCT + sliding-window + attention). It is not an inference-time configuration. In this + record's terms the selection is **Family A obtained by retrofit**. +2. **The retrofit result reads COMPARABLE, not improved** — quality on + par with the full-attention baseline while enabling autoregressive + generation at linear long-context cost. The paper's superiority + results are from-scratch architecture comparisons (760M/3B language + models at 32k context beating GLA and DeltaNet on long-context + per-token loss; competitive with full attention). + +### 12.2 The reliance claim, decomposed (the Session 28 discipline: a premise relied on is a premise measured) + +- **C1 — SUPPORTED.** Large-chunk fast-weight layers are + hardware-efficient (utilization lifted from <5% by orders of + magnitude; state to ~40% of parameters) and match or beat + efficient-architecture baselines on long-context tasks; the retrofit + path is feasible and quality-preserving. The *efficiency* half of + "output sculpting and efficiency" has real support. +- **C2 — EXTRAPOLATED.** "The research shows this improves base model + performance," applied to retrofitting an open LLM: LaCT does NOT + show this. Its LM results are from-scratch comparisons at ≤3B/32k + against linear-attention baselines; its one retrofit reads + comparable, not improved. The nearest direct support for + pretrained-LLM improvement is TTT-NTP (Family B, +3–4 RULER points) + and aTTT (stability-shaped, §3.4). **C2 is the load-bearing gap that + R3/R4 exist to measure** — stated here so nobody mistakes the + premise for a result. +- **C3 — UNTESTED.** "Ensure the meta-prompts are followed as strongly + as possible … output sculpting" = H2. No literature, LaCT included, + measures prompt-adherence effects of fast weights. Trellis's + instruments (protocol-violation counts, answer-channel compliance, + criterion items) are exactly the right meter; R5 — or an explicit R4 + criterion item — carries it. +- **One overlap named — then CORRECTED by the owner (same day):** the + first version of this bullet argued LaCT's long-context wins do not + apply because the RLM removes the corpus from attention. The owner's + correction, recorded: **large REPL dumps ARE long-context modeling + in practice** — the code-mediated-text discipline stops the model + *retyping* retrieved bytes, not *reading* them; printed fetch + results, block texts, code, and extraction working sets flow through + attention every turn, and the planned workload uses a substantial + share of the worker agents' context to code and extract accurately. + The architecture point survives only in narrow form (the corpus + RESIDES outside attention and is fetched selectively); the per-run + token flow is genuine long-context load, so C1's long-context + quality-and-efficiency results apply to this application directly. + §3.4's stability-shaped expectation remains the calibration for C2. +- **The authors' own limitation transfers:** state-based models are + weaker at REASONING — the capability the RLM leans on hardest (LaCT + pairs fast weights with window attention partly for this reason). + Any R3/R4 criterion must include reasoning-shaped items; the est + suite already is. + +### 12.3 What "Trellis can do this" means, precisely + +Trellis cannot train layers and acquires no training pipeline under +this track. What Trellis contributes — and why the collaboration is +shaped right: + +1. **The acceptance instrument:** backend-independent paired-arm + measurement with pre-stated criteria (§6) — the est suite, the + protocol counters, OOLONG-hard, the probe suites. +2. **Provenance-gated adaptation data** — the collaborator's "it has + provenance to check procedure," read in this record's terms: the + §5.3 adaptation-data policy can be ENFORCED by the substrate. The + fast-weight training signal can be restricted to engine-verified + LIVE blocks with the run's retrieval set as the eligibility + boundary, making *what the model absorbed* auditable the way *what + the model cited* is today — and directly bounding the §5.3 threat 1 + injection amplification. This is a design seed for the R4 proposal, + not machinery. +3. **The serving seam:** R2's audit, unchanged by this exchange. + +Division of labor recorded: the retrofit training job is +COLLABORATOR-SIDE (or its own owner-funded proposal — either way it is +not a rung of this repo's ladder); Trellis-side rungs R2→R5 are +unchanged in order. + +### 12.4 Ladder deltas from this exchange + +- **R1:** question 1 ANSWERED (LaCT). Questions 2–4 stand — and + §12.3's enforcement offer sharpens question 4 into a concrete + proposal for the collaborator: shall the adaptation-data eligibility + boundary BE the run's retrieval set? +- **R3** gains a checkpoint requirement: the baseline arm should be + the SAME open checkpoint the retrofit will start from, so R4's + comparison isolates the added layers. +- **R4** arms are now concrete: the base open checkpoint vs the same + checkpoint with trained-in large-chunk fast-weight layers, same + instruments, adaptation-data policy pre-stated. Its criterion + inherits C2 and C3 explicitly — a stability-only result is a + finding, not a failure, but it is not C2, and it gets reported at + exactly its size (guardrail 8, Session 45's version). +- No rung's gate moved: everything remains owner-approved + propose-with-estimate. + +### 12.5 The empirical decision and the reproduction landscape (added later on July 13, 2026) + +The owner's follow-up framed the undertaking as **"our own private +repro study with expansion"** and asked whether the empiricals are +worth running versus checking existing reproduction studies first. +Both were done in order; the landscape check (same day, zero-paid): + +- **LaCT is peer-reviewed:** published at ICLR 2026 (no longer just a + preprint) — confidence in C1 rises. +- **Official code exists:** github.com/a1600012888/LaCT, including + fused Triton kernels for the TTT layer — a private reproduction + starts from released code, not a reimplementation. +- **Independent groups already retrain the LM setup:** the KV-binding + analysis (arXiv:2602.21204) trains its own 760M LaCT-LLM baseline on + 100B FineWeb-Edu tokens; the mechanism has also been adopted + downstream in other domains (ZipMap, arXiv:2603.04385; elastic + spatial memory, arXiv:2604.07350). The reproduction half of the + undertaking carries good priors. +- **A reproducibility-report culture exists in the TTT space** + (e.g., arXiv:2511.16691 for TTT-on-nearest-neighbors) — but **no + external study covers C2 or C3**: nobody has published "retrofit + fast-weight layers onto an open LLM and measure whether the LLM + improves," and nobody has measured meta-prompt adherence under fast + weights at all. The expansion half is novel measurement. + +**The verdict recorded:** the empiricals are worth running, and they +are the ONLY route to C2/C3 — no amount of literature checking closes +a gap the literature has not measured. The ladder is already shaped as +exactly this study: R3 = the reproduction half on our workload (the +same-checkpoint baseline; does quality hold under the protocol), R4 = +the expansion half (C2 improvement, C3 adherence, the +provenance-gated adaptation-data policy). The house measurement +machinery — pre-stated criteria, paired arms, verdicts recorded +pass-or-fail with actuals — is a reproduction-study harness by +construction. Gates unchanged: each rung still enters as its own +owner-approved proposal. + +### 12.6 The chunking — RATIFIED (owner, July 13, 2026): phases 0–3 and the feature-class self-edit rung + +The owner ratified the following decomposition the same day, together +with the proposal that Trellis itself authors the Trellis-side code +("a prime target for Trellis editing Trellis and expanding +functionality … build this using Trellis, then we come back and +review it"). Ratification covers the SHAPE — every increment and +every paid run below still enters as its own owner-approved proposal +with its own estimate (the standing gate ceremony is untouched). + +**The new rung class this creates, defined here:** a **feature-class +self-edit increment** — a TASK-ASSIGNED functionality increment +authored by Trellis through the stage-2 harness, in the lineage of +the Session 26 W-series and stage-2 increments 1–2 (which were +assigned tasks, not discovered defects). This is DISTINCT from the +defect-class increment 3, whose never-manufacture rule is untouched: +a planted defect invalidates a discovery measurement; an assigned +feature task is not a discovery claim and manufactures nothing. +Feature-class criterion mold (assembled from the standing pieces): +the standing five items (named-file-only diff; the evidence +contract's one recorded insight through the Session 31 gate; +`stage2:check` zero findings; human `git diff` review acceptance; +spend within estimate) PLUS guarded-only (`textedit_raw_splices == +0`) PLUS the parse gate PLUS the increment's own new unit pins green. +The toolkit never touches git; every diff is human-reviewed; landing +is a human PR — "build using Trellis" means Trellis AUTHORS under the +harness, humans land. + +**The spec-before-pen rule (the grounded-authoring lesson applied):** +the seam design record is HUMAN-authored before any T-increment runs +— self-edit runs are only as well-posed as their task text, and the +ratified record is what task texts derive from. + +**Phase 0 — human-authored spec sessions:** +- **R2a** — the backend-seam census + the rlms verdict (Session 46's + §3 objective; read-only, zero-paid; §7 R2 items a/b). +- **R2b** — the seam design record (§7 R2 items c/d): config shape, + typed refusals, the three-way split backend (root completion / + worker completions / embedder), today's behavior as the + byte-identical default; each T-increment's scope and task-text + skeleton pre-stated in it. + +**Phase 1 — the Trellis-edits-Trellis T-series (feature-class +increments; each owner-gated ≤$5, one increment-record each in the +§5e/§5g mold, human-reviewed diff each; smallest first — the +executable-class ladder has never landed a run, so the first rung is +deliberately tiny):** +- **T1** — the config surface: backend config keys + validation + + typed refusals + unit pins (no call-site change). +- **T2** — `buildAgentEnv` forwarding/strip for the new config, with + its unit pins (the experiment-flag mold). +- **T3** — the `trellis_agent.py` construction-site rewire + (`backend_kwargs` from config; default byte-identical; the policy-2 + substrate already covers this file, so graph-informed editing works + today). +- **T4** — the fixture-endpoint drill: a zero-LLM stub + OpenAI-compatible server (the fixture-MCP-server precedent) proving + the byte-identical default and the seam switch. +A failed T-increment gets the increments-1/2 treatment: diagnose, +close the class mechanically, retry as its own proposal. + +**Phase 2 — measurement sessions (runs, not edits):** R3a serving +bring-up + protocol smoke; R3b the paired baseline measurement (the +reproduction half); then the R4 chunks when the collaborator's +retrofit checkpoint lands (exact-pinned): R4a checkpoint acceptance + +smoke, R4b the paired C2 measurement, R4c the C3 adherence +measurement, R4d the adaptation-data-policy record (for Family-A +layers the adaptation data IS the token stream — the policy chunk +states what enters context and how the §12.3 provenance gating +applies). + +**Phase 3 — R5** (meta-prompt fast-state, H2 isolated). + +**Dependencies named:** (1) this record lives in `docs/` — outside +extraction scope — so T-series runs cannot query the graph about the +spec; task text carries the spec verbatim (the increments-1/2 +channel) until stage-1b chunk A lands (a natural synergy, not a +prerequisite). (2) Refresh-before-use applies to every T-increment's +target area (the split-scope recipe; `src/rlm` is the policy-2 leg). + +### 12.7 External cost-performance evidence and an adaptation-behavior avenue (added July 13, 2026, same day) + +Three items logged after the §10 list was compiled, recorded here because they sharpen the R3/R4 criterion and the estimate basis; no gate moves. + +1. Cost-performance frontier (Szafer et al., ICLR 2026; OpenReview tWAnCRYMcT). A unified empirical study of test-time agent adaptation under verifiable feedback (binary correctness, unit tests), streaming evaluation scored on pre-update predictions, adaptation compute measured as wall-clock, comparing in-context memory (ExpRAG, ReMem) against in-weights GRPO (LoRA, full fine-tuning) on open reasoning models (Qwen3-8B, Olmo3-7B). Two findings bear on this track: + - Gains concentrate on tasks that need better reasoning over knowledge the model already holds, and are near-zero on tasks that need facts the model never learned. On Qwen3-8B, AIME24 rises 0.536 to 0.642 for both LoRA and full fine-tuning; AIME25 rises 0.429 to 0.500 (LoRA) and 0.464 (full fine-tuning); GPQA and MMLU-Pro show no consistent gain. This is external support for the H1 framing and against "quality of response overall," and it hardens the existing requirement that an R3/R4 criterion be scored on reasoning- and protocol-shaped items; a knowledge-recall criterion would flatline for reasons unrelated to whether TTT works. + - The backward pass is a small fraction of per-step wall-clock; forward-pass generation (rollout) dominates. Consequence for R4's propose-with-estimate: the paid estimate is a generation-token estimate, not a training-cost estimate, and LoRA versus full fine-tuning is not the cost driver (the paper attributes its slower LoRA wall-clock to an adapter merge-and-reload artifact, not an inherent cost). This sets the unit the R4 estimate is built in; it moves no gate. + +2. LoRA and catastrophic forgetting (Hu et al., *Test-Time Learning for Large Language Models*, arXiv:2505.20633, ICML 2025). The paper reports (its Observation 3) that LoRA mitigates catastrophic forgetting more effectively than full-parameter updates in the test-time-learning setting, and adopts LoRA for its test-time updates on that basis. Recorded as complementary to item 1, not conflated with it: the cost-Pareto study does not measure forgetting (it defers retention to future work), so the drift-bound property rests on this citation alone, and on that paper's own TTL-setting observation rather than an independent head-to-head. If an R4 arm is instantiated, this is the citation behind preferring a low-rank adapter as the retention-bounding choice. + +3. Workspace manipulation as a potential avenue of investigation (not a rung). The global-workspace / Jacobian-lens result (Gurnee et al., *Verbalizable Representations Form a Global Workspace in Language Models*, transformer-circuits.pub/2026/workspace, July 6 2026) identifies a small, causally-privileged subspace that a residual-stream read can inspect; the article's own experiments are on Claude models only. What makes it an avenue for a track that can only instrument open checkpoints is the separate tooling: Anthropic released the reference implementation `anthropics/jacobian-lens` (Apache 2.0), which fits the lens on open-weight decoders, and independent third-party replications on small open models exist (e.g. github.com/tao-hpu/jspace-replication, github.com/solarkyle/jspace, spanning GPT-2 124M through Qwen3 and Gemma-3 sizes). Reproduction is partial and mixed: the lens read-out reproduces and beats a logit-lens baseline, while some higher-order effects (e.g. hidden-intermediate multi-hop) do not reproduce at the smallest scales. The possible avenue: use that instrument to probe, and perhaps manipulate, the subspace to strengthen meta-prompt adherence, i.e. H2's mechanism approached through measurement rather than fast weights. Recorded as an avenue only; out of scope for R2 through R5, no criterion attached, no claim, its viability explicitly gated on the still-partial open-checkpoint reproducibility, and subject to the same paired-arm and owner-gated discipline as everything else here should it ever be taken up. **Probe-sensitivity caveat:** a probe that reads *no effect* is informative only once a positive control has shown the probe can detect the effect it seeks — otherwise "no detectable effect" is a blind instrument, not evidence of absence (the positive-control duty, §6; the `self-play` skill's discipline 6, which learned this the hard way when a maximal-strength probe failed to fire across escalating designs). + +No gate moved; no default changed; no TTT claim attaches without a paired arm. + +## 13. R2a — the backend-seam census and the rlms verdict (Session 46, July 13, 2026) + +Rung R2a executed as ratified (§12.6 Phase 0): a READ-ONLY census, +zero paid spend, zero code bytes moved. Method: grep-driven sweep of +`src/rlm/`, `src/workers/`, `src/core/`, `src/config/`, and +`scripts/` for transport constructions, model-id literals, pricing +constants, token accounting, and embedding calls (every +`chat.completions.create` and `embeddings.create` site in the tree is +disposed below), plus a read-only inspection of the installed +`rlms==0.1.3` package (import name `rlm`, site-packages; guardrail 10 +respected — nothing modified). The seam design built on this census +is R2b's, the next session. + +### 13.1 The rlms verdict — YES, with quoted evidence + +**rlms==0.1.3 admits a base-URL/backend override WITHOUT library +modification.** The evidence, from the installed package: + +1. `rlm/core/rlm.py` — the constructor's first two parameters: + `RLM(backend: ClientBackend = "openai", backend_kwargs: dict[str, + Any] | None = None, ...)`. Trellis today passes only + `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}` and takes + the `"openai"` default backend. +2. `rlm/clients/__init__.py::get_client` routes eight backends: + `['openai', 'vllm', 'portkey', 'openrouter', 'anthropic', + 'azure_openai', 'gemini', 'vercel']`. The `vllm` arm is the + OpenAI client with a mandatory endpoint: it asserts + `"base_url is required to be set to local vLLM server address + for vLLM"` and then constructs the same `OpenAIClient`. +3. `rlm/clients/openai.py::OpenAIClient.__init__(self, api_key=None, + model_name=None, base_url=None, sampling_args=None, **kwargs)` — + `base_url` is a FIRST-CLASS constructor parameter, passed straight + into `openai.OpenAI(**client_kwargs)`. The class docstring says it + plainly: "LM Client for running models with the OpenAI API. Works + with vLLM as well." +4. Sub-call separability exists in the library itself: + `other_backends`/`other_backend_kwargs` (exactly one additional + backend supported) lets depth-1 sub-calls run a DIFFERENT + backend from the root — relevant to R4 arm design, unused today. + +**The seam call is therefore additive kwargs at the two existing +construction sites** (T3's exact scope): +`RLM(backend="openai"|"vllm", backend_kwargs={"model_name": ..., +"base_url": ..., "api_key": ...})`. No rlms byte moves. + +**Recorded caveats the T-series and R3 must respect:** + +- **The usage requirement (the one hard compatibility constraint + beyond chat-completions shape):** `OpenAIClient._track_cost` + RAISES `ValueError("No usage data received. Tracking tokens not + possible.")` when a completion response lacks `usage`. Any serving + endpoint must return usage on non-streaming completions (vLLM does + by default). The R3a smoke test asserts this before anything else. +- **Token/context coupling is soft:** `rlm/utils/token_utils.py` + keys context limits and tokenizers by model name with safe + fallbacks (unknown model → 128,000-token default; tiktoken → + `cl100k_base` → chars/4). Consulted only under `compaction=True`, + which Trellis never sets. Non-blocking. +- **API-key resolution:** known base URLs map to their own env keys + (`OPENAI_API_KEY`, `OPENROUTER_API_KEY`, `AI_GATEWAY_API_KEY`, + `PRIME_API_KEY`, read at import time); an unrecognized/local + base_url leaves `api_key=None`, which the openai SDK resolves from + `OPENAI_API_KEY` env — a local endpoint typically wants an explicit + dummy `api_key` kwarg so runs do not depend on an unrelated real + key being present. +- **rlms calls `load_dotenv()` at import** (both + `rlm/clients/openai.py` and `rlm/clients/__init__.py`): a `.env` + file in the spawned agent's working directory is read into its + environment. An unmanaged credential input channel, recorded here + for R2b's forwarding design. + +### 13.2 The census + +Legend: "moves?" = does the site have to change (or change meaning) +when the completion backend moves. Classes ordered by seam relevance. + +**Class 1 — root RLM completion (the seam; T3 rewires exactly these).** + +| Site | Assumption | Moves? | Pinned by | +|---|---|---|---| +| `src/rlm/trellis_agent.py:353` (author mode) | `backend_kwargs={"model_name": "gpt-5.4-2026-03-05"}`; backend defaults to `"openai"`; transport+key from ambient env | YES — T3 | No direct pin (paid-run surface; `test:rlm-sandbox` stubs the `openai` module) | +| `src/rlm/trellis_agent.py:589` (research mode) | same | YES — T3 | same | +| `src/rlm/trellis_agent.py:97,111` (`make_entailment_check`) | direct `openai.OpenAI()` + hardcoded model literal; constructed only under `TRELLIS_CITATION_ENTAIL=1` (experimental) | YES if the checker is kept; R2b decides whether it follows the seam or stays a frozen instrument | none | +| `scripts/probe_workspace_lineage.py:157`, `scripts/probe_workspace_paired.py:89` | same `backend_kwargs` mold | NO — frozen measurement instruments; retrofitting them would invalidate comparability with their recorded runs | recorded here | + +**Class 2 — worker/engine completions (model id ALREADY +config-shaped; only the transport is assumed).** + +The model id routes through ONE seam today: `EXTRACTION_MODEL` +(`src/config/index.ts:109`, zod default `'gpt-5.4-2026-03-05'`) → +`config.llm.extractionModel` (`index.ts:359`). Consumers: +`extraction_worker.ts:77`, `supervisor_worker.ts:76`, +`verification.ts:217` (`makeOpenAIClassifier`), +`entailment_detection.ts:208` (`makeOpenAIEntailmentJudge`), +`alias_resolution.ts:199` (`makeOpenAIAdjudicator`), +`decision_source.ts:51` (`makeOpenAIDecisionSource`), +`resolution_worker.ts:50,65`, `agent_worker.ts:188` + +`verification_worker.ts:79,135` (metric labels), +`scripts/resolve_sweep.ts:67`. **A worker-side model change is an +env-var change today; no code moves.** The transport is zero-arg +`new OpenAI()` at seven sites (`extraction_worker.ts:26`, +`supervisor_worker.ts:25`, `verification.ts:220`, +`entailment_detection.ts:211`, `alias_resolution.ts:202`, +`decision_source.ts:54`, `api/server.ts:263`) — SDK-default +transport, see §13.3. `parseLlmResponse` at the consumption boundary +is model-agnostic by construction (guardrail 7 holds under any +backend). + +**Class 3 — the embedder (NON-GOAL, §4.2; listed so the boundary is +explicit).** + +| Site | Call | +|---|---| +| `src/workers/extraction_worker.ts:30,193–197` | `EMBEDDING_MODEL = 'text-embedding-3-small'` literal; per-block `embeddings.create` | +| `src/rlm/trellis_tools.py:804–806` | `vector_search` query embedding, same literal | +| `src/api/server.ts:263–265` | `/retrieve` vector-fallback embedding, same literal | +| `scripts/chunking_seam_queries.ts:83–84` | the eight PINNED seam queries (standing instrument — never tuned) | +| `scripts/exp_citation_ab.ts:43,98` | experiment instrument, frozen | + +All three production embedding sites are schema-coupled +(`vector(1536)` + HNSW, `src/config/schema.ts` / +`search_ast_nodes`). The embedder does NOT move with the completion +backend; an embedder move is a substrate-identity event. §13.3 names +the one place this boundary is currently soft. + +**Class 4 — pricing constants (estimate-only by design; a backend +move re-prices them, never silently).** + +| Site | Constant | Consumers | Pinned by | +|---|---|---|---| +| `src/benchmarks/oolong/scoring.ts:13–14` | `PRICE_PER_M_INPUT = 2.5`, `PRICE_PER_M_OUTPUT = 10` ("used when the backend does not report exact cost") | `poison_drill_runner.ts`, `exp_effective_context.ts` (spend gate, lines 1628–1630), `exp_citation_ab.ts`, `exp_citation_metadata.ts` | `scoring.test.ts:132` | +| `src/core/authoring/estimate.ts:16` | `AUTHOR_EST_PRICE_PER_1K_USD = 0.02` | `author_module.ts` refuse-before-spend ceiling (line 370, `--max-spend-usd`) | `estimate.test.ts` | + +These gates bound OPENAI spend. An R3 serving arm prices in +GPU-hours or hosted per-token dollars per the §7 cost doctrine — its +proposal restates cost in those units rather than stretching these +constants. + +**Class 5 — token accounting (moves cleanly; one recorded +asymmetry).** + +- Python: the telemetry payload's `input_tokens` / `output_tokens` / + `reported_cost_usd` come from rlms's `UsageSummary`; `model_usage` + is `usage_dict["model_usage_summaries"]`, keyed BY MODEL NAME — a + new backend appears as a new key, no shape change; the Node + telemetry scanner tolerates additive fields (pinned). +- TypeScript: `llm_usage.ts` `chatUsage`/`embeddingUsage` tolerate a + MISSING `usage` block (count the call, zero tokens, never throw) — + the recorded asymmetry with rlms's `_track_cost`, which THROWS + (§13.1). Metric labels are `operation`/`model` — the model name is + already a bounded label value, so a backend change changes label + VALUES only, within the T16 house style. +- `reported_cost_usd` is `None` on plain OpenAI endpoints today + (rlms extracts cost only from OpenRouter-shaped responses); every + house spend gate uses token counts × Class-4 constants, so nothing + breaks when a new backend also reports no cost. + +**Class 6 — report stamps and prose (recorded strings; they gate +nothing and move as wording only).** `oolong_runner.ts:137`, +`update_drill_runner.ts:199`, `poison_drill_runner.ts:467` (report +`model` fields; the poison drill already stamps `'ground-truth +oracle (LLM-free)'` in rehearsal), `author_module.ts:402` +(provenance prose), the comments at `oolong/scoring.ts:11` and +`estimate.ts:8`, `exp_citation_ab.ts:44` (`CHECKER_MODEL`, frozen +experiment instrument), and `scripts/pocs/*` (`gpt-5.4-mini` +literals; PoC archive class, frozen). + +### 13.3 The unmanaged pass-through (the census's one real discovery) + +Every production client in the tree — the seven zero-arg +`new OpenAI()` constructions (Node SDK `openai@^6.45.0`), the two +Python `openai.OpenAI()` constructions, and rlms's own +`OpenAIClient` with `base_url=None` — resolves its base URL from the +SDK's ambient `OPENAI_BASE_URL` environment variable when unset. +Verified in both installed SDKs (`node_modules/openai/client.js` +line 140; site-packages `openai/_client.py` line 251). Three +consequences, recorded: + +1. **The transport is ALREADY overridable today with zero code + change** — but UNMANAGED: no config validation, no typed refusal, + no telemetry visibility, no test pin. +2. **`buildAgentEnv` (`src/workers/rlm_job.ts`) spreads `...base` + and neither deliberately forwards nor strips `OPENAI_BASE_URL`** + (`OPENAI_API_KEY` inherits the same way, by design — the agent + needs it). An `OPENAI_BASE_URL` inherited from the worker's + environment would silently redirect the child agent's root + completions, the experimental checker client, AND the + `vector_search` EMBEDDER together — exactly the coupling §4.2 + forbids (the embedder must never move as a side effect of the + completion backend moving). The worker-side clients read the same + ambient variable, so engine completions and the extraction + embedder are coupled the same way. +3. **This is not a defect today** — no environment sets the + variable, no behavior has changed, nothing is broken; it is a + designed-in SDK affordance that the house config discipline does + not yet manage. It is the precise gap the ratified T-series + closes: T1 gives backend choice a validated config surface with + typed refusals; T2 makes `buildAgentEnv` forward-or-strip it + under the experiment-flag mold (the `TRELLIS_MCP_SERVERS` + discipline); T3 passes explicit `backend_kwargs` so the child + never resolves its transport from ambient env. **R2b's design + must decide:** whether the config seam strips `OPENAI_BASE_URL` + unconditionally so backend choice is expressible ONLY through + validated config — the recommendation this census hands R2b. + +### 13.4 What R2a does not do + +No implementation, no config key, no env twin, no default change — +the seam design (config shape, typed refusals, the three-way root / +worker / embedder split, T-increment task-text skeletons, the R3 +proposal skeleton) is R2b's deliverable, human-authored +spec-before-pen per §12.6. The embedder stays a non-goal (§4.2). The +probe scripts and experiment instruments named frozen above stay +frozen. diff --git a/docs/density-chain/DENSITY-CHAIN.html b/docs/density-chain/DENSITY-CHAIN.html index f6805fd..c259285 100644 --- a/docs/density-chain/DENSITY-CHAIN.html +++ b/docs/density-chain/DENSITY-CHAIN.html @@ -470,12 +470,12 @@

Provenance & the honest ledger

charter: 'The signed-ternary standing axis, the user gate and meet rule, the doubt tier, and the law that every evaluating function composes per context from primitives.', tiers: [ "A claim's worth rides one signed ternary axis — doubt −1, belief 0, fact +1 — orthogonal to custody: provenance says where bytes came from; standing says what they are worth. Only the user moves standing toward fact, because the system's expertise is the user's own data; the panel emits signed deltas and records. Derived claims inherit the meet of their dependencies' qualifiers, so a gate cannot launder itself. Doubt is constructed, not residual: an objection cites facts only, or critique dissolves everything. There is no default cast.", - "Shipped: none of the axis itself. judge_panel.ts hard-codes four role definitions whose claim modes sit in a six-value enum pinned three ways, and the applicability gate keys on those modes. Defeat is a boolean — contested, its reason and its timestamp — spread across forty files. The explanation render prints “doubt-dominant”, but that is subjective-logic disbelief, not the tier. User gates ship as CLI confirm flags on promotion and ratification — custody gates, not standing moves. Nine skills and hard rule 17 carry the composition law.", + "Shipped: none of the axis itself. judge_panel.ts hard-codes four role definitions whose claim modes sit in a six-value enum pinned three ways, and the applicability gate keys on those modes. Defeat is a boolean — contested, its reason and its timestamp — spread across forty files. The explanation render prints “doubt-dominant”, but that is subjective-logic disbelief, not the tier. User gates ship as CLI confirm flags on promotion and ratification — custody gates, not standing moves. Nine skills and hard rule 17 carry the composition law; four now vendor their cited records as 31 byte-identical mirrors, so the law reaches a checkout holding no Trellis repo.", "PR #138 ratified the standing model and the doubts workspace as principle — 179 and 575 lines, zero src/ changes; #137 adopted composition-from-primitives after rolling the roster back. The corrosion bound's empirical test: a ~35-item fact base built by three sub-agents told of no dispute, against fourteen flat-earth arguments, eleven citing real correctly-reported observations — 13 rejected, 1 admitted, zero admitted with a false conclusion. PR #155 named affirmation: three blind self-play rounds, identical 8/8 verdicts, $0 paid.", "The axis is adopted, unbuilt — the record authorizes no build, and its three carve-outs each need separate authorization. The corrosion bound is falsified as written: only the positive-citation core is ratified; bootstrap and cost gaps stay open, one job contradicts the record's own table, and the undercut branch is undetermined. The applicability gate has never run against a composed defeater. Known-broken: the four role definitions are still the default cast rule 17 forbids, and no code refuses a re-registered roster.", "PROPOSED, none authorized: the address hash-kind stamp; reducing promotion machinery to findings-recorder-plus-gate, including code removal; re-deriving applicability onto locus intersection; the repair directions — distinguishing world-facts from critique-derived facts, requiring the cited fact reachable from the target's citation chain, a per-target objection budget; the vocabulary rename landing as its own change; three routing layers reopened behind their own proposal. OPEN: live paid runs stay behind the paid-queue gate." ], - ledger: "standing model · user gate · meet rule · panel-never-moves — ratified as principle, no build; composition-from-primitives — foundational lesson; the nine skills — shipped, DERIVED standing (the record wins on drift). Every entity of the axis reports no non-test caller; enforcement of the composition law is prose." }, + ledger: "standing model · user gate · meet rule · panel-never-moves — ratified as principle, no build; composition-from-primitives — foundational lesson; the nine skills — shipped, DERIVED standing (the record wins on drift, now across 31 vendored mirrors no checker compares). Every entity of the axis reports no non-test caller; enforcement of the composition law is prose, and so is mirror-against-record." }, { id: 'C8', group: 'frontier', title: 'The model-backend seam and the test-time-training research track', charter: 'Whether the completion backend can become a validated configuration choice, and whether test-time-trained sparse weights would improve protocol adherence.', @@ -537,8 +537,8 @@

Provenance & the honest ledger

tiers: [ "A system operated by an agent must be able to explain itself to that agent. Two surfaces carry the burden: the repository, which a cold-start reader meets first, and the runtime, which it meets during work. Both accounts must be derived from whatever actually enforces behavior — the guards that refuse, the allowlists that gate — rather than authored separately as prose, because separately authored description drifts silently from behavior. Discoverability is then a property of each component, not a maintenance chore.", "The root contract is ratified; its machine twin fixes eighteen permitted root files with byte caps, ten top-level directories, forbidden artifacts, deprecation markers, and one near-cap ratio. The checker enforces them plus Markdown links and environment-example coverage through eleven issue codes held as a runtime list; the CLI runs in CI and also prints governed byte headroom tightest-first, calling the document-UPSUM section ranking for anything near its cap. The runtime half ships: a registry bound at each surface's own definition site, validating a key and no field set, and a coverage report that derives the injected roster by AST from the tool-injection seam itself. TEXTEDIT_DESCRIPTOR plus a guard-keyed expects registry compose that toolkit's addendum, mode-selected by the refusing guarded-only bool; llm_help stays specified, authorized, unbuilt.", - "PR #156 (2026-07-21) landed the contract, its twin, and the checker — ten issue codes; its negative control planted four. The ratification landed 2026-07-23 and authorized Workstream B only; the same day PR #177 executed increment 1: byte-identity held on both arms (3,066/3,067 chars), one pin per arm, each seen to fail once on a planted one-byte perturbation, both composed-prompt shas unmoved. The control now plants all eleven codes, each asserted by path, and was seen to fail three ways — including the deprecation-marker branch reduced to an existence check with the fixture untouched. First headroom run: docs/README.md 45 bytes under its cap. Design records: #153, #154, #135, #136.", - "The honest scope of “derived” is recorded: phrase text is still hand-authored once per guard class and pinned; the engine derives the selection, single-encoding ownership, and now the injected-name roster — nothing generates prose from predicate code. Eight of nine injected surfaces still carry no descriptor, which the diagnostic reports rather than leaving to memory, and the two dynamic seams are named as unenumerable rather than dropped. The guarded-arm orphan is closed; the advisory-marking duty stays open, because settling it for one surface would make an instance into law. The record↔twin asymmetry stays structural. Confirmed unfixed, deliberately: the nine-field telemetry allowlist (Workstream A, held). Falsified: Phase 0 proved its own specification impossible.", + "PR #156 (2026-07-21) landed the contract, its twin, and the checker — ten issue codes; its negative control planted four. The ratification landed 2026-07-23 and authorized Workstream B only; the same day PR #177 executed increment 1: byte-identity held on both arms (3,066/3,067 chars), one pin per arm, each seen to fail once on a planted one-byte perturbation, both composed-prompt shas unmoved. The control now plants all eleven codes, each asserted by path, and was seen to fail three ways — including the deprecation-marker branch reduced to an existence check with the fixture untouched. First headroom run: docs/README.md 45 bytes under its cap. The link arm was watched red at 173 issues, green once the exemption followed the skill mirrors in. Design records: #153, #154, #135, #136.", + "The honest scope of “derived” is recorded: phrase text is still hand-authored once per guard class and pinned; the engine derives the selection, single-encoding ownership, and now the injected-name roster — nothing generates prose from predicate code. Eight of nine injected surfaces still carry no descriptor, which the diagnostic reports rather than leaving to memory, and the two dynamic seams are named as unenumerable rather than dropped. The guarded-arm orphan is closed; the advisory-marking duty stays open, because settling it for one surface would make an instance into law. The record↔twin asymmetry stays structural, and the link-exclusion array is the fresh instance: one prefix to five for four skills’ vendored mirrors, with nothing proving a listed prefix still names a folder. Confirmed unfixed, deliberately: the nine-field telemetry allowlist (Workstream A, held). Falsified: Phase 0 proved its own specification impossible.", "Authorized, unbuilt: llm_help() as an always-present kernel builtin listing the run's alive catalog, and llm_help(name) returning purpose, when-to-use, exposes, expects, example and see-also, with expects guard-derived and the human winning on stalemate; the manifest schema extended; one generator emitting human navigation pointers. The remaining surfaces proceed descriptor by descriptor without a pin ceremony: the pins hash the BASE prompt, which conditional addenda never enter, so llm_help — a kernel builtin taught in the base manifest — is the pin-moving event and an addendum edit is not. Gates: the self-play discrimination and drift game (selected-on-a-lie the falsifying cell); the paid adoption probe stays owner-gated. Both open questions closed 2026-07-23: descriptors are a registration, not a schema — the field set dissolved rather than settled, because a vocabulary that becomes law early cannot survive the iteration prompt authoring needs — and that registry, populated at each surface's definition site, is also where llm_help composes from. The registry and its coverage diagnostic are now BUILT. What remains unbuilt: llm_help itself, the eight further descriptors, the human-doc generator, and the advisory-marking convention." ], ledger: "root contract · machine twin · surface checker · CI wiring — shipped-pinned; self-describing surfaces — RATIFIED (2026-07-23); harness self-model — principle endorsed, Workstream B authorized, A gated; the textedit descriptor composition, the surface registry, and the coverage diagnostic — shipped-pinned (increments 1–3), the hand-authored addendum constants retired so the descriptor is the sole encoding; llm_helpspecified, authorized, unbuilt, with no occurrence anywhere in the code tree. The shipped descriptor is a dict literal no validator anywhere reads; the strict manifest schema stays descriptor-free, a different artifact class. The diagnostic is reachable but not in CI, by the same reasoning that keeps the staleness half out." } diff --git a/docs/density-chain/DENSITY-CHAIN.md b/docs/density-chain/DENSITY-CHAIN.md index 78dbcc2..681ce68 100644 --- a/docs/density-chain/DENSITY-CHAIN.md +++ b/docs/density-chain/DENSITY-CHAIN.md @@ -479,19 +479,21 @@ every evaluating function composes per context from categoric primitives. Not th beneath it.* - **T1 — essence.** A claim's worth rides one signed ternary axis — doubt −1, belief 0, fact +1 — - orthogonal to custody: provenance says where bytes came from; standing says what they are worth. Only - the user moves standing toward fact, because the system's expertise *is* the user's own data; the - panel emits signed deltas and records. Derived claims inherit the meet of their dependencies' - qualifiers, so a gate cannot launder itself. Doubt is constructed, not residual: an objection cites - facts only, or critique dissolves everything. Every evaluator composes per context from primitives; - there is no default cast. + orthogonal to custody: provenance says where bytes came from, standing what they are worth. Only the + user moves standing toward fact, because the system's expertise *is* the user's own data; the panel + emits signed deltas and records. Derived claims inherit the meet of their dependencies' qualifiers, + so a gate cannot launder itself. Doubt is constructed, not residual: an objection cites facts only, + or critique dissolves everything. Every evaluator composes per context from primitives; there is no + default cast. - **T2 — current machinery.** Shipped: none of the axis itself. `judge_panel.ts` hard-codes four role - definitions whose claim modes sit in a six-value enum pinned three ways, and the applicability gate - keys on those modes. Defeat is a boolean — `contested`/`contestedReason`/`contestedAt`, spread across - forty files. `judge_explain.ts` prints "doubt-dominant", but that is subjective-logic disbelief, not - the tier. User gates ship as CLI `--confirm` flags on `promote_segment.ts` and `judge_ratify.ts` — - custody gates, not standing moves. Nine `.claude/skills/` and `.claude/rules/composed-evaluators.md` rule 17 carry the composition - law. + definitions whose claim modes sit in a six-value enum pinned three ways; the applicability gate keys + on those modes. Defeat is a boolean — `contested`/`contestedReason`/`contestedAt` across forty files. + `judge_explain.ts` prints "doubt-dominant", but that is subjective-logic disbelief, not the tier. + User gates ship as CLI `--confirm` flags on `promote_segment.ts` and `judge_ratify.ts` — custody + gates, not standing moves. Nine `.claude/skills/` and `.claude/rules/composed-evaluators.md` rule 17 + carry the composition law; four now vendor their cited records as **31 byte-identical mirrors** under + `/references/`, manifested with source path and SHA-256, so the law reaches a checkout holding + no Trellis repo. - **T3 — with receipts.** `e5e7844` (#138, 2026-07-20) ratified the standing model and the doubts workspace **as principle** — 179 and 575 lines, **zero `src/` changes**; `8926e12` (#137) adopted composition-from-primitives after rolling the roster back. The corrosion bound's empirical test: a @@ -500,8 +502,8 @@ beneath it.* admitted with a false conclusion**; the ring-laser refutation turns on 15°/hr versus ω = 7.292115×10⁻⁵ rad s⁻¹ = 15.04°/hr. `880e63a` (#155) named `affirmation`: three blind self-play rounds, identical 8/8 verdicts, $0 paid. -- **T4 — the frontier.** The axis is adopted, unbuilt — the record authorizes no build, and its three - carve-outs each need separate authorization. The corrosion bound is **falsified as written**: only +- **T4 — the frontier.** The axis is adopted, unbuilt — the record authorizes no build, its three + carve-outs each needing separate authorization. The corrosion bound is **falsified as written**: only the positive-citation core is ratified; bootstrap and cost gaps stay open, one job contradicts the record's own table, and the undercut branch is undetermined. The applicability gate has never run against a composed defeater. `affirmation` is gateable and renames nothing; `contested` stays a @@ -509,17 +511,17 @@ beneath it.* and no code refuses a re-registered roster. - **T5 — future plans.** PROPOSED, none authorized: the address hash-kind stamp; reducing promotion machinery to findings-recorder-plus-gate, including code removal; re-deriving applicability onto - locus intersection; the repair directions — distinguishing world-facts from critique-derived facts, - requiring the cited fact reachable from the target's citation chain, a per-target objection budget; - the vocabulary rename landing as its own change; three routing layers reopened behind their own - proposal. OPEN: live paid runs stay behind the paid-queue gate, owner re-opening plus per-run - approval under the ≤$5 cap. + locus intersection; the repair directions — world-facts distinguished from critique-derived, the + cited fact reachable from the target's citation chain, a per-target objection budget; the vocabulary + rename as its own change; three routing layers reopened behind their own proposal. OPEN: live paid + runs behind the paid-queue gate, owner re-opening plus per-run approval under the ≤$5 cap. *Status ledger:* standing model · user gate · meet rule · panel-never-moves — **ratified as principle, no build**; composition-from-primitives — **foundational lesson**; the nine skills — **shipped, DERIVED -standing (the record wins on drift)**; doubts workspace — **proposed** (−1 is still a residual flag); -`affirmation` — **named, zero code hits, which is exactly the collision-check result**. *Reachability:* -every entity of the axis reports **no non-test caller**; enforcement of the composition law is prose. +standing (the record wins on drift, now across 31 vendored mirrors no checker compares)**; doubts +workspace — **proposed** (−1 is still a residual flag); `affirmation` — **named, zero code hits, which +is exactly the collision-check result**. *Reachability:* every entity of the axis reports **no non-test +caller**; enforcement of the composition law is prose, and so is mirror-against-record. *Cross-links:* [[C3]] (support arithmetic sits underneath; verdicts feed standing), [[C9]] (the decomposability bet links to the sidecar), [[C12]] (the doubt tier supplies the sandbox's filter layers), [[all]] (composition governs judges, experts and protocols everywhere). @@ -955,7 +957,8 @@ descriptor program. Not the guards it describes, only the accounts of them.* one in a `docs/` sibling, so widening the prefix loses the sibling and narrowing it fires the archive. First headroom run: `docs/README.md` **45 bytes** under its 20,480 cap, `docs/ORIENTATION.md` **352** under 32,768. Checker - **PASS (0 issues)**. + **PASS (0 issues)** — link arm watched red at **173 issues**, green once the exemption followed the + mirrors, *measured this session*. - **T4 — the frontier.** **The honest scope of "derived" is recorded:** phrase text is still hand-authored once per guard class and pinned; what the engine derives is the selection (the refusing bool), single-encoding ownership, and now the injected-name roster — nothing generates @@ -965,7 +968,9 @@ descriptor program. Not the guards it describes, only the accounts of them.* guarded-arm orphan is **closed**; the advisory-marking duty is deliberately still open, because settling it for one surface would make an instance into law (rule 17). **The record↔twin asymmetry is structural:** the checker proves twin↔tree, never record↔twin — **named-implies-exists is proved; exists-implies-named is not** (green again since - `20e94ae`). **Confirmed unfixed, deliberately:** the nine-field telemetry allowlist — Workstream A's + `20e94ae`). Fresh instance: the link-exclusion array went **one prefix to five** for four skills' + vendored mirrors, and nothing proves a listed prefix still names a folder — a new mirror folder + fails loudly, a retired one silently widens the exemption. **Confirmed unfixed, deliberately:** the nine-field telemetry allowlist — Workstream A's Phase 0a, and A was held back. **Falsified:** Phase 0, 2026-07-19, proved its own specification impossible. **Unscheduled:** `.claude/ceremonies/` — the dedupe loop whose prompt is committed beside the rulings it honors, whose allow-list travels by checkout, and which cannot rewrite its @@ -981,9 +986,9 @@ descriptor program. Not the guards it describes, only the accounts of them.* questions closed 2026-07-23: **descriptors are a registration, not a schema** — the field set is *dissolved* rather than settled, because a vocabulary that becomes law early cannot survive the iteration prompt authoring needs — and that registry, populated at each surface's definition site, - is also where `llm_help` composes from — and that registry, with its **coverage** diagnostic, is - now BUILT. What remains unbuilt: `llm_help` itself, the eight further descriptors, the human-doc - generator, and the advisory-marking convention that belongs with `llm_help`'s frame. + is where `llm_help` composes from and, with its **coverage** diagnostic, is now BUILT. What remains + unbuilt: `llm_help` itself, the eight further descriptors, the human-doc generator, and the + advisory-marking convention that belongs with `llm_help`'s frame. **AMBIENT.md gained rule 24 on 2026-07-24 — what is being built — and it is this class's business because it is a self-description that construction has to be able to see.** The rule is numbered diff --git a/tools/repository-surface/root-contract.json b/tools/repository-surface/root-contract.json index 3366ed7..d67f7f7 100644 --- a/tools/repository-surface/root-contract.json +++ b/tools/repository-surface/root-contract.json @@ -33,7 +33,13 @@ "tools" ], "markdownLinks": { - "excludePrefixes": ["docs/archive/"] + "excludePrefixes": [ + "docs/archive/", + ".claude/skills/complexity-convocation/references/", + ".claude/skills/judge-composition/references/", + ".claude/skills/loop-orchestrator/references/", + ".claude/skills/self-play/references/" + ] }, "environment": { "schemaPath": "src/config/index.ts",