proving-the-regression
Skill0 starsChanged 3 months agoMITView on GitHub
Use when adding a guard, rule, validator, lint, schema, or check; when fixing a bug and about to assert the fix works; when a test claims to cover a scenario; or before stating that a rule is enforced. DO NOT invoke to choose which checks to run before pushing — route that to ledger:refusing-busywork.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adapting-to-a-projectSkill
- curating-decision-recordsSkill
- designing-concurrent-testsSkill
- diagnosing-flakesSkill
- fact-checking-by-executionSkill
- metabolizing-knowledgeSkill
- planning-the-workSkill
- proving-code-is-deadSkill
- pushing-safelySkill
- qualifying-a-requestSkill
- receiptsSkill
- recording-ui-evidenceSkill
- refusing-busyworkSkill
- reviewing-as-cis-complementSkill
- running-a-bounded-loopSkill
- scoping-a-changeSkill
- specifying-acceptanceSkill
- trimming-session-vantageSkill
- using-ledgerSkill
- validating-real-scenariosSkill
- what-counts-as-evidenceSkill
- writing-complete-propositionsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Before trusting a guard, make the case it exists to reject, watch it fail, then revert.
- Distinctive: line 46
A race: use a barrier to place the contested transition at a deterministic point and prove the operations actually overlap.
- Distinctive: line 49
A timeout: keep the outer wait far larger than the deadline under test, or load decides which fires first.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Proving the regression
A check you have not seen fail is not a check. Coverage says a line ran. Only a failing negative control says the scenario is checked. Everything here follows from that one sentence.
This skill owns whether a check can fail. It does not choose which checks to run for a given change.
This matters most where it is least convenient: a new rule feels done when the valid case passes. But a rule that never rejected anything is indistinguishable from a rule that cannot reject anything, and the two stay indistinguishable until the day it was supposed to save you.
The negative control
Before trusting a guard, make the case it exists to reject, watch it fail, then revert.
- Observe an ordinary regression fail before the fix when practical.
- For a new static, schema, or corpus guard, temporarily introduce the rejected case and observe the intended failure. Confirm it fails for the intended reason — a guard that rejects your fixture because of a syntax error has not been proven.
- A strong promise needs both a focused valid fixture and an invalid one that proves the check can fail.
- Where a check is meant to reject a candidate before publication, verify it rejects at that point, not merely somewhere downstream.
references/false-guardrail-forms.md is the recognition catalog: twelve shapes a guard takes when it cannot reject, the question that exposes each, the six checks to run over an assertion you just wrote, and where mutation survivors actually cluster. Reach for it when you cannot see what a control for this guard would even look like — a guard whose negative control is hard to construct is usually one of the twelve.
Verify the world, not the self-report
Assertions must fail on the intended regression and verify external state — files, events, logs, exit codes, disposal, database rows — rather than restating the implementation or trusting a component's own account of what it did.
This is not pedantry about test style. A keyword probe on a worker's own output lets a worker that did nothing pass by claiming success, and that failure mode is now routine rather than hypothetical. So an end-to-end assertion re-runs the command or re-reads the file externally, and asserts that files it did not intend to touch are byte-identical.
Restating the implementation is the same defect wearing different clothes: a test that asserts the function called the method it obviously calls will pass for any implementation that keeps the shape and loses the behavior.
Through the real entry path
Exercise the shipped entry — the published binary, the loader, the worker, the subprocess, the built artifact — wherever the change reaches it. Read commands.real_entry_point and commands.build from .ledger.yml.
A hand-assembled harness silently skips whatever the real entry does: export validation, argument parsing, module resolution, environment setup, packaging. Guards that only ever run against a hand-built fixture are guards against a fixture.
Match the proof to the failure mode
- A race: use a barrier to place the contested transition at a deterministic point and prove the operations actually overlap. Repeated execution alone is not a race test.
- A host resource — port, socket, shared path, subprocess: run independent processes concurrently when cross-process isolation is part of what you are claiming.
- A fixture that spawns with its own deadline: assert that no signal or timeout ended the child before asserting its exit status, or a killed child reports as a status mismatch and sends you after the wrong bug.
- A timeout: keep the outer wait far larger than the deadline under test, or load decides which fires first.
What does not count
- Stress runs supplement a deterministic regression; they do not replace one.
- A passing rerun is not evidence that anything was fixed.
- A green check whose negative case was never tried is an untested check that happens to be green.
- Retries, skipped tests, and pending CI are not passing. Report them as what they are.
When you cannot construct a negative control, say so and name what would be required. An honest gap is worth more than a claim of coverage that nobody can check — and it is the only version of this that survives someone reading it six months later.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

