Skip to content

bench(lab): write the method down as the phase plans - #274

Merged
luuuc merged 1 commit into
lab/05-02-the-levers-and-the-ceilingsfrom
lab/05-03-the-plan-files
Aug 17, 2026
Merged

bench(lab): write the method down as the phase plans#274
luuuc merged 1 commit into
lab/05-02-the-levers-and-the-ceilingsfrom
lab/05-03-the-plan-files

Conversation

@luuuc

@luuuc luuuc commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Problem

This is the method. Everything else in the rebuild is machinery that runs it.

The binary holds no prompt logic by design, so how a scenario is crafted, how a mini-bench is read, how a session is expanded, how a pay call is made and how a win is confirmed all live as prose in files a human wrote. In the retired instrument that is five files and 792 lines, the largest being authoring at 264.

Those lines are the distilled residue of a year: which asks discriminate, which gold rows can never score, what a mini-bench actually tells you, when to re-question and when to re-anchor. Almost none of it is derivable from first principles, and all of it was paid for.

The risk is specific. A rewrite ships a cleaner engine on day one and quietly loses the discipline, because the scoreboard stays green either way. These files, and lab/LAWS.md, are the only defence.

Summary

lab/plans/ holds one plan per phase in the graph, each written against the declared contract. lab/internal/plans checks them against that contract mechanically.

Changes

  • Eleven plans, one per phase. Each declares, in a four-key header, the phase it belongs to, the artifact it reads, the artifact it writes and its verdict enum. The header is a fixed set of keys rather than general YAML, so a malformed contract fails to parse instead of parsing into something plausible.
  • The checks run in both directions. A plan naming a verdict the graph does not know is a plan whose routing cannot be tested. A plan silent on a verdict its phase can emit is worse and quieter: a case the phase really meets with no instruction for it, which is how a phase writes nothing and stalls a campaign at three in the morning. Also checked: every phase has a plan, every plan names a phase, no two plans claim one phase, and the artifacts match exactly.
  • The precedents survive. Each plan carries the specific measured cases that justify its instructions — the seam-profile calibration, the free-row floor, the within-arm spread, the baseline route that killed a scenario, the arithmetic ceiling. Nine figures were spot-checked mechanically against their sources in the tree; none drifted.
  • The five killers move to lab/KILLERS.md, tracked beside LAWS.md, because an instructions file that is not in the repository is one a fresh session does not have. With the rule that makes them work attached: a confirming check is not evidence, it is the absence of a test, and the killer runs before the finding is stated.
  • A plan's body is the file verbatim. Nothing is composed; the loader hands on the bytes after the header and there is nowhere for a sentence to be added.

The port found a hole in the graph

The old expand plan emits REQUESTION when the discriminator step cannot survive verbatim — a gold row that does not hold at its line, or a step that cannot be written without naming a gold file. The declared graph gave expansion AUTO alone, so a phase that genuinely meets that case would write nothing and stall the loop.

REQUESTION joins expansion's enum, the re-entry table and the lever list. A lever a recorded campaign used and the table does not carry is a hole in the test set, not a plan to bend around.

Recorded during the build

Eleven plans, not six. The shaped contract table named six; the done-means says every phase in the graph has a plan, and the graph has eleven. The stricter reading won, and the mechanical check is total rather than partial.

The largest loss in the move, stated rather than discovered. The old plans named a specific command at every step — the citation ranking, the retention sweep, the seam profile, the shown-set probe, the gold audit. Those scripts are not ported into this tree, and a plan naming a path that does not exist is worse than one naming the computation, because a plan is followed literally. So the steps name what to compute, and the flywheel cycle binds each one to its command. It is recorded in Questioned, not changed on all five judgment plans.

Test Plan

  • make ci green: build, tests, per-file coverage floor with no new exception, zero complexity suppressions, lint clean.
  • 100% line and function coverage on the new checker.
  • The contract check runs against the shipped plans rather than a fixture, so the real files are the thing under test.
  • Every failure mode has its own fixture: wrong input artifact, wrong output artifact, a verdict outside the enum, a verdict with no instruction, a plan for a phase that does not exist, a phase with no plan, two plans claiming one phase, a header with nothing under it, and three shapes of malformed header.
  • Every judgment plan is checked to carry a precedent section.
  • Nine precedent figures traced mechanically to their sources.

This is the method. Everything else in nine cycles is machinery that
runs it. The binary holds no prompt logic by design, so how a scenario is
crafted, how a mini-bench is read, how a session is expanded, how a pay
call is made and how a win is confirmed all live as prose a human wrote.

The risk is specific: a rewrite ships a cleaner engine on day one and
quietly loses the discipline, because the scoreboard stays green either
way. These files and LAWS.md are the only defence.

Eleven plans, one per phase in the graph, each declaring the phase it
belongs to, the artifact it reads, the artifact it writes and its verdict
enum. lab/internal/plans checks all four against the graph in both
directions: a plan naming a verdict the graph does not know cannot be
routed, and a plan silent on a verdict its phase can emit is a case with
no instruction, which is how a phase writes nothing and stalls a campaign
unattended.

Porting found a hole. The old expand plan emits REQUESTION when the
discriminator step cannot survive verbatim, and the graph gave expansion
AUTO alone. REQUESTION joins its enum, the re-entry table and the lever
list, because a lever a recorded campaign used and the table does not
carry is a hole in the test set.

The five killers move to lab/KILLERS.md, tracked beside LAWS.md, since an
instructions file outside the repository is one a fresh session does not
have.
@luuuc
luuuc merged commit 38b88d7 into lab/05-02-the-levers-and-the-ceilings Aug 17, 2026
@luuuc
luuuc deleted the lab/05-03-the-plan-files branch August 17, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant