fix-and-prove
Skill4 starsChanged 17 days agoMITView on GitHub
Use when the user asks to fix the bugs of a bug-bash run or a bug report, to explore and fix a feature, or to improve a feature in rounds ("self-improvement", "improve <feature>"), in an app whose code is at hand, or pastes "decide BUG-NNN of <folder>: ..." lines copied from a report page.
- Deletes or force-pushes
In this repository3 other files it gives its agents.
- bug-bashSkill
- evidenceSkill
- show-your-workSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 0 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Only when fix-setup.mjs printed a Baseline run: (no ledger claim is tagged with the feature): write how the feature is meant to work as …
- Very specific: line 74
Check each claim's source in one command: its quoted sentence must be in its document, word for word (grep -F).
- Very specific: line 111
Follow <show-your-work directory>/RUN.md with kind proof for the verify run.
- Very specific: line 112
Run node <skill directory>/scripts/fix-claims.mjs <verify run> <ledger dir, or none> [--spec <baseline run>] <the round's fixed and partly …
- Very specific: line 148
Run node <skill directory>/scripts/build-fix-report.mjs <fix run>.
- Very specific: line 165
Only when the run is in auto mode.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Fix and prove
Fix the bugs an exploring run found, prove each fix blind in the running app, and report what changed in a page a person can judge without reading code. Self-improvement mode repeats explore, fix and verify for several rounds.
Core rule: fix only what FIXER.md calls confident, and prove every fix. Fixers change code; provers never see it. You only orchestrate: never edit the app's code yourself, and never count your own checks (curl, a browser, tests) as proof. Prompts hold only their dispatch lines: never add a note, a suspicion or a code detail. Every round runs §4 with fixer subagents and §5 with blind provers; a fix only §5 proved counts as fixed. A fix whose claim is disproved, or that breaks a claim the ledger already proved, is undone. Never push, deploy or run a migration.
Terms
- Skill directory: the absolute folder that holds this
SKILL.md. - Bug-bash directory:
<skill directory>/../bug-bash/. Show-your-work directory:<skill directory>/../show-your-work/. If either is missing, stop and tell the user to install it next tofix-and-prove. - Read another skill's file only when a step sends you to it, when that step starts, and read each step's files in one message:
RUN.md(the run terms),<project folder>/environment.mdand, in auto mode,AUTO.mdat §1; show-your-work'sPROOF.mdat §2 or §5; bug-bash's at §3.CLAIMS.mdis the claim writer's file andFIXER.mdthe fixers'; never read them yourself. - Request folder and fix run: the
Request folder:andFix run:linesfix-setup.mjsprints. The request folder holdsbrief.md,decisions.mdand every step of this request. The fix run is itsfixstep (fix-2when the folder was fixed before), withfixes/(the patches),rounds.jsonand, once the report is built,result.json. The request's page is<request folder>/report.html. - Inner runs: the bug-bash and show-your-work runs this run starts, and every re-proof below. Each is a step of the request folder: give
RUN.mdthe request folder, so step 3 runsrun-folder.mjs --in <request folder> <explore | proof>. They skipRUN.mdsteps 1 and 2 (they take §1's project folder, feature and ledger dir: no check or slug to confirm again) and step 3's lock: this run'srun.lockcovers them.
1. Set up
Before step 1:
- In a conversation that already holds other work, say in one line:
This round's every turn carries this conversation: a new session costs less.Then go on. - Auto mode is on when the request says
--autoorauto mode, or Preferences sayMode: auto, asAUTO.md§1 says. Then readAUTO.mdand## Auto modeat the end of this file now, and makeAUTO.md§1 step 4's line your first line in chat. Self-improvement turns it on too, right after step 1's question: read them then. Every inner run runs in the same mode. - Follow
RUN.mdsteps 1 and 2, and check steps 2 and 3 below. Then run §1's checks and make the run folders in one call, never by hand:node <skill directory>/scripts/fix-setup.mjs <project folder> <feature> <code path> [<the run the request names>] [--report] [--improve] [--all-features] [--batch <n>], with--reportin Fix a report mode,--improvein Self-improvement,--all-featureswhen the request names no feature, and--batch <Batch: from Preferences, else 30>in every mode but Fix a report. It prints the pending bugs (step 1): with no run named, only those of the newest run that has any, and each older run asOlder run: <run> <n> pending; with--batch, the most severe up to the batch, and the rest asLeft out by Batch:; with--improve, each bug the newest earlier request leftnot-fixedasNot fixed before: <bug folder> <title>(§3); the branch, the main branch and whether there is uncommitted work. When step 1 will ask its question (no context, not auto mode), run it first with--list: it prints the same lines and creates nothing; run it again without--listonce the user answers, naming the older run they pick, if any. When another run holds the lock, it printsLock: held by <folder>and creates nothing: do step 1, then ask asRUN.mdstep 3 says (auto mode: stop), and run it again with--take-lockif the user says take it. With--reportand no pending bug, it creates nothing. Else it makes the fix run withfixes/(RUN.mdstep 3): with--report, in the request folder the bugs are in, so fixing an explore grows its folder; and when no ledger claim is tagged with the feature, it makes the baseline run and prints it asBaseline run:. AProblem:line naming a definition file isRUN.mdstep 3's: on aProblem:line, stop and show it to the user; in auto mode, stop with it.
Mode, from the request:
Mode Request, for example Does Fix a report "fix the bugs of <run folder>", "fix BUG-002 and BUG-005 of<run folder>"§2, then §4 and §5 on that run's bugs, once Explore and fix "explore and fix team invites" §2, then one round Self-improvement "improve team invites", "self-improve invites --rounds 5" §2, then rounds Rounds: the request's number, else
Rounds:in Preferences, else 1. Explore and fix is one round.Start from bug-bash's bugs. In every mode, round 1 can fix bugs bug-bash already found instead of exploring again:
- With context, start from it without asking, and say in one line:
Round 1 starts from <run folder> (<n> bugs): no new explore.Context is a run or bug ids the request names ("fix BUG-002 of<run folder>", "improve invites from<run folder>"), or a bug-bash run this conversation just finished or talked about. - Without context, take the pending bugs
fix-setup.mjsprinted: one run's, never an older run's, since older runs file the same defects again. None: explore, as the mode says. Some: show them as it printed them,Older run:lines included, and ask once: "Fix these instead of exploring first? Answer all, the bug ids to fix, an older run to fix instead, or explore." Round 1 fixes what the user picks; for an older run, name it in the secondfix-setup.mjscall; "explore" explores as the mode says. - "explore first" or "fresh explore" in the request: explore, and skip this.
Self-improvement asks it too: it is the one question before the rounds run on their own. Only a request in auto mode (
--auto, orMode: autoin Preferences) skips it: it takes the pending bugsfix-setup.mjsprinted, recordsRuling: default: round 1 fixes <n> bugs of <run>; <the Left out by Batch: and Older run: lines, or none> wait for a request that names them, and says the one line above.- With context, start from it without asking, and say in one line:
- The app under test must run the code fixers edit, or verify proves old code. With
Restart: none(step 5), App must be on a local host, where the app reloads the code path itself.App: nonecounts as local: its target is an API run from the code path on this machine. On any other host, theRestart:command must put the code path live there. Else stop: "fix-and-prove needs the app at<App>to run the code in<Code>. Run it locally, or add a Restart command that puts that code live there." Code:must name the app repo;none: stop, as there is nothing to fix.Production:in## Target.unknownor missing: ask the user once, in these words, with the main branchfix-setup.mjsprinted filled in: "Which branch or tag does your live app run? I only read it, to tell bugs your users already have from bugs added on this branch; that sets each fix's risk. Nothing is checked out or deployed. Answer, or say ok for<main branch>." Add their answer toenvironment.md.Restart:in## Target: the command that restarts the app on changed code, ornonewhen the app reloads changed code itself (a dev server in watch mode). Missing: usenone, add it, and say in one line: "No Restart line: assuming the app reloads changed code. Add one to environment.md if it does not." Whenever it isnone, also say in one line: "If the app reloads when files change, exclude .evident from its watcher." Never write a command from reading the code.Fix commits:from Preferences, elsecurrent branch. A value from Preferences is a rule, not a default.none: fixes stay uncommitted, as patches infixes/.current branch: fixers commit on the branch the code path is on.new branch: with uncommitted work, usecurrent branchand say so. Else rungit -C '<code path>' switch -c fix-and-prove/<feature>-<YYYY-MM-DD>before the first fix.
- Gaps: the request's "with gaps" or "no gaps", else
Gaps:in Preferences, elseyesin auto mode and self-improvement andnootherwise. Auto fixes, the highest risk a fix may have without asking:offoutside auto mode. In auto mode, the request's "auto fixes up to<risk>", elseAuto fixes:in Preferences, elsevery-high. A value from the request or Preferences is a rule, not a default. - Self-improvement: say in one line, and go on without waiting:
<rounds> round(s): about <45–90 × rounds> minutes and $<25–60 × rounds>. - In one message, write the request folder's
brief.md(RUN.mdstep 4; when it already has one, append this request's sections below),decisions.mdthere in auto mode (appended too, never over an earlier request's rulings), the fix run'srounds.jsonand, when §2 runs, the baseline run'sbrief.md(§2 step 2).rounds.jsonis{"feature": "<slug>", "production": "<Production line>", "auto": <true|false>, "autoFixes": "<Auto fixes, step 7>", "fixCommits": "<current branch | none | new branch>", "baseline": <the Baseline run path when §2 step 1 finds documents, else null>, "rounds": []}; never rewrite it to setbaseline.
2. Baseline
Only when fix-setup.mjs printed a Baseline run: (no ledger claim is tagged with the feature): write how the feature is meant to work as claims, and prove nothing yet. Round 1's §5 gives these claims their first proof.
- Documents: the spec or plan documents the request names. None: the
## Documentsof the brief of each bug-bash run round 1 starts from. Still none: there is no baseline. Delete the baseline runfix-setup.mjsmade, and say in one line:No spec document named: no baseline. Name one to get spec claims. - The baseline run's
brief.mdholds exactly:## Request: the## Requestof the brief that named the documents, verbatim.## To prove:How <feature> works, as the documents describe. Only what they state.## Documents: the documents from step 1. Add no run folder or bug to it. - Dispatch the claim writer with exactly this prompt, filled in. Run no code check. If it returns
too big, read show-your-work'sSKILL.md§2 then, and do as it says (auto mode:AUTO.md'stoo bigrow).Read <show-your-work directory>/CLAIMS.md and follow it. Run folder: <baseline run> Project folder: <project folder> Skill directory: <show-your-work directory> Code path: <app repo> Diff command: none Ledger dir: <ledger dir> - Check each claim's
sourcein one command: its quoted sentence must be in its document, word for word (grep -F). Drop each claim whose sentence is not, asPROOF.md§1 step 4 drops a claim. - Approve as
PROOF.md§1 says, in the baseline run. Never run its §2 or §3 here. Go on to §3.
3. Explore (one round's first step)
Round 1 starting from bug-bash's bugs (§1 step 1), in any mode: skip exploring. The fix list is the bugs named or picked, else the bugs fix-setup.mjs printed as pending. Append {"n": 1, "explore": "<the newest run they come from>", "only": [<their bug folders>], "verify": null} to rounds.json (leave out only when the list is every bug of that one run). Later rounds explore as below, with those runs among Earlier rounds and the newest as round 2's Learnings from.
Else follow <bug-bash directory>/SKILL.md §1 to §3 and §4 steps 1 and 2 only (never its step 4: this run holds the lock), with the request's feature. Give it these lines to pass on: Batch: <Batch: from Preferences, else 30>, only when another round follows this one (a batch stops explorers early, and only a later round explores what they skipped); only when the request names an explore time ("explore for 15 min") or Preferences has Explore time: <minutes>, Until: <the time you dispatch the explorers + that time, HH:MM> (a time box trades bugs for speed, so explorers run their full budget unless asked); in round 1 with a baseline, Spec claims: <baseline run>/claims.json; Earlier rounds: <explore run folders, comma-separated>: in Self-improvement, the explore steps of the feature's earlier request folders (<project folder>/<feature>/*/explore*), from round 1, so explorers aim past bugs already filed; from round 2, also the earlier rounds'; and from round 2 Learnings from: <the previous round's explore run folder> and Changed files: <every file the previous round's patches touch, comma-separated>. Append {"n": <round>, "explore": "<its run folder>", "verify": null} to rounds.json, with "extra": [<bug folders>] when the previous round's verify filed bugs for spec claims (§5 step 4).
Self-improvement: round 1's entry, explored or not, also gets "extra": [<each Not fixed before: bug folder>]. A needs-decision bug waits for the user, so it is never carried.
4. Fix
- The fix list: the round's bug folders, plus its
extrabug folders. WithEarlier rounds:(§3), compare each new bug with the bugs of those runs: one whose title andactualshow the same failure as an earlier bug leftwont-fixornot-fixed, orneeds-decisionoutside auto mode, is a repeat. In auto mode a repeat of aneeds-decisionbug stays on the list: nobody answered its question, so the fixer decides it as## Auto mode's §4 row says. Leave it off the list and merge into itsbug.jsonafixthat copies the earlier bug'sstatus,risk,riskReason,inProductionanddecision, withsummary"Same as round<n>BUG-NNN" (an earlier request's bug: "Same as <its request folder's name> BUG-NNN"). A repeat of an earlierfixedbug means that fix did not hold: keep it on the list. So is a repeat of a bug whose fix §5 step 4 undid (itsdecisionstarts "The fix did not hold", "Broke ", "It builds on" or "Its fix conflicts"): that verdict may come from a flaky claim or a lost patch, so it gets one more fixer; never copy it. A repeat of a bug on this list (anextra): keep both, as one cause (step 2). - Print the fix list and the learnings in one command:
node <skill directory>/scripts/fix-list.mjs <bug folders>; cat <each explore run>/learnings.jsonl <each explore run>/leads.jsonl 2>/dev/null, where a bug's explore run is two folders above its bug folder. A line endingnot confirmed: <why>gets no fixer: its own picture does not show it. Take it off the list, and merge into itsbug.jsonafixwithstatus"wont-fix",summary"Not confirmed:<why>" anddecision"Its own evidence does not show it. Fix it anyway?". Group from that output alone, never from the code: each bug's title andactual, and thesourcefiles of the learnings lines about it (a learnings line is about a bug when it names the bug's page, its URL path or the thing its title names; a line about none of them groups nothing). A bug's page and server sides go to one fixer. Bugs with one cause go in one group. Bugs whose learnings name a common file are one group, transitively: when A and B name one file and B and C another, A, B and C are one group. Bugs that name no file make groups of their own, at most 5 bugs each, bugs of one area (the same page or part of the title) together. Dispatch one fixer per group with exactly this prompt, filled in. In Claude Code, when it lists theevident:evident-fixeragent type (the plugin's) orevident-fixer(evident'ssetupinstalls it), use that type: it carries only Read, Edit, Write and Bash, so no tool list rides on each of its turns.
Send the groups that name files together in one message, then the no-file groups together after they return. WithRead <skill directory>/FIXER.md and follow it. Fix run: <fix run> Ledger dir: <ledger dir> Round: <n> Bugs: <bug folders, comma-separated> Code path: <app repo> Production: <Production line> Gaps: <yes | no> Auto fixes: <off | low | medium | high | very-high> Fix commits: <none | later>Fix commits:current branchornew branch, writeFix commits: laterin every fixer's prompt: fixers then write patches and commit nothing. Step 3 commits them, after the gate. A round with one bug still gets a fixer: in §4 you change app code only to undo a fix in step 3. - Check the fix records by the rules the fixers' gate used, in one command:
node <skill directory>/scripts/fix-gate.mjs --gaps <yes | no> --auto <Auto fixes> --code '<app repo>' --ledger '<ledger dir, or none>' --feature <feature> --fix-run <fix run> <the fix list's bug folders>. It also names each fix whose patch removes text a proven ledger claim of the feature quotes, unless its record lists that claim inchangesClaims. For eachBUG-NNN undo | <decision>line, undo that fix (git apply -Rits patch: nothing is committed yet), keep the patch file, and set itsstatustoneeds-decisionwith thatdecision. A "Fixed with BUG-NNN" record follows that bug: it is undone with it, with the samedecision. Then runfix-list.mjson the fix list again. Last, withFix commits:current branchornew branch, commit the kept fixes in one command from the code path:node <skill directory>/scripts/fix-patch.mjs commit <fix run> <feature> <the fix list's bug folders>. It makes one commit per fixed bug, in the order the patches were written, with the message a fixer would write, and records each inbug.json. Astaged changesrefusal, or aConflict <patch>line (that patch did not apply on the commits before it): say so in one line; the fixes not committed stay as patches. - With no bug fixed or partly fixed in the round, skip §5 and stop the rounds here; except in round 1 with a baseline, where §5 still runs to give the spec claims their first proof.
5. Verify
A re-proof (step 3 and step 4) proves some of the verify run's claims again, in one new proof run: restart (with none, wait for the reload); RUN.md with kind proof; node <skill directory>/scripts/fix-claims.mjs <that run> none --spec <verify run> --only <their ids, comma-separated>; node <show-your-work directory>/scripts/build-proof.mjs <that run> --approve --by <the verify run's approvedBy, from its claims.json> (they are approved claims: never ask again); then PROOF.md §2 and §3 steps 1 to 3. Append the run to this round's reproofs in rounds.json: the report and the ledger take a re-proved claim's verdict from the last re-proof of it.
- Run the
Restart:command from the code path; withnone, wait a few seconds for the app to reload. Then run the health check until the app is up, for at most 2 minutes. It does not come up: undo the round's fixes newest first (git apply -Reach patch, orgit revert --no-edit <commit>), restart again, and set each one'sstatustonot-fixedwithdecision"The app did not start with this round's fixes. Fix by hand?". Still not up after 2 more minutes: set"stopped"inrounds.jsonto "The app does not start, even with this round's fixes undone<withnone: ;Restart: nonecannot restart it>. Start it, then run again." and go to §7. Up: go to §6. Up: check that the app runs the code the tree now has, from the code path:node <skill directory>/scripts/fix-patch.mjs live <every patch in fixes/>. It compares each changed file with its compiled twin (src/a.tsasdist/a.js). AnUnknown:line is no evidence either way: go on. OnStale:lines, wait 30 seconds and run it once more. StillStale:: the app serves old code, and every proof would test it. Undo nothing. Outside auto mode, ask once: "The app did not rebuild<file>after it changed, so it still runs the old code. Which command restarts it on changed code? It goes in environment.md as Restart." Write the answer asRestart:and do this step again. In auto mode, or with no answer, set"stopped"inrounds.jsonto "The app did not rebuild<file>after it changed: <withnone:Restart: noneis wrong for this app; else: the Restart command does not rebuild it>. Add a Restart line to environment.md that rebuilds it, then run again." and go to §7. Every later restart in this section ("restart" below) runs this check too. - Prove the fixes. You write no claim text and no evidence value:
- Follow
<show-your-work directory>/RUN.mdwith kindprooffor the verify run. Its## To proveis "the bugs fixed in round<n>". - Run
node <skill directory>/scripts/fix-claims.mjs <verify run> <ledger dir, or none> [--spec <baseline run>] <the round's fixed and partly fixed bug folders>, with--specin round 1 when there is a baseline. When it printsWriter:and a prompt, dispatch the claim writer once with it, word for word, beforePROOF.md. With no bug folder (round 1 with a baseline only) it prints none: go on. - The writer returns a
Conflict:line for each fix that changes what a proven ledger claim expects. One that endschanged: the writer wrote that ledger claim as changed, and approval shows it (auto mode: record it, as the table below says); add its id to that bug'sfix.changesClaims, so an undo of the fix leaves the ledger claim as it was. One that endsunchanged: beforePROOF.md, undo that fix as §4 step 3 does, set itsstatustoneeds-decisionwithdecision"It changes what<ledger id>proved:<its statement>Change it?", and drop its bug claim asPROOF.md§1 step 4 drops a claim. A "Fixed with BUG-NNN" record follows that bug. - Follow
<show-your-work directory>/PROOF.md§1, §2 and §3 steps 1 to 4. Its §3 step 5 waits for §5 step 5 below, so step 4 still sees which claims held before this round. Never write or reword a claim inclaims.json, even one word: you have seen the fixes. Only the user's own words at approval (ask mode), step 3's drops and the drop the table below gives (auto mode) change it. For aProblem:line--planprints, follow neitherPROOF.md§1 step 3's rewording norAUTO.md's approve row: in both modes, drop the claim it names asPROOF.md§1 step 4 drops a claim; the bugs it proved show as fixed, not proven. - A prover session that reports a blocker a retry can clear is dispatched once more with the blocked claims' ids, as
PROOF.md§2 step 5 says, before you read verdicts; for a rate limit, wait five minutes first. Never build the report on a block a retry could clear that you did not retry.
- Follow
Read the verdicts:
node <skill directory>/scripts/build-fix-report.mjs <fix run> --verdicts <verify run folder>. Each line names the bug folders its claim proves, and for a disproved claim its failing cases'actual; a claim with no bug folder is a ledger or spec re-check. Before you act on them, check that the app changed. When the disproved fix claims (at least two, or the round's only fix) all show the app behaving as the bug'sactualdescribes, the app may not be running the fixed code:- Re-prove one of those bugs' claims (a re-proof, above).
- It holds now: the app was slow to pick up the code. Re-prove the round's other disproved fix claims in one re-proof, and use those verdicts in step 4.
- It fails the same way again: the app is not running the fixed code, which is an environment problem, not a bad fix. Undo nothing and leave
verifyunset for this round, so its fixes show as not verified. Set"stopped"inrounds.jsonto "The app did not change after<n>fixes and a restart: it still behaves as the bugs describe. It may not run the code in<Code>(a build step, a cache, another server on the port, or a Restart line that restarts something else). Check how the app is started, then run again." Skip the other rounds and go to §7.
Else set
verifyfor this round inrounds.json.- Roll back. Undo a fix with
git apply -Rits patch and re-apply fixes withnode <skill directory>/scripts/fix-patch.mjs reapply <their patches, oldest first>from the code path, on the working tree only, even when they were committed: commit nothing until this step ends, and nevergit reset --hard. Undo newest first; re-apply oldest first.reapplymerges a patch that no longer applies as it is with the code as it is now ((three-way)). AConflict <patch>line: that fix changed lines of a fix that is undone. It stays undone, and sub-step 6 rebuilds it. Each re-proof below (as defined above) covers every claim still searched.- Suspects of every disproved claim, in one command:
node <skill directory>/scripts/fix-gate.mjs --suspects <verify run> <the claim ids, comma-separated> --fix-run <fix run> --code '<app repo>' <the round's kept fixes' bug folders>. Per claim (a bug claim followed by its bugs) it prints first the fixes whose patch adds text its failing cases show and their expect does not, best first, with that text (shows "<text>"); then, after|, the fixes whose patch touches a file it names or a line with text it quotes, oldest first. An empty side isnone. Last,Not undone alone: BUG-NNN ...names each fix whose patch later fixes changed, sogit apply -Rfails on it alone. Before the first re-proof, read each failing case'sactualbeside those fixes'summary. - A bug claim
disprovedwith fixes before|, none of them its own bug's: another fix's text explains the failure. Keep its own fix and search it with the claims of step 3. Any other bug claimdisproved: whatever the reason, even when the fix covers only part of the bug, undo that bug's fix, and set itsstatustonot-fixedwithdecision"The fix did not hold:<the claim>. Fix by hand?". - Ledger claims
disproved(fix-claims.mjscopies only ledger claims that last held), spec claimsdisprovedon their first proof (--spec: first proven after this round's fixes), and the bug claims step 2 keeps: find which fix broke each. A spec claim withnonebefore|leaves the search at once: no fix of this round adds what its failing case shows, so it never held. Add the bug folders its provers filed to the next round asextra; with no next round, the report lists the claim as not holding. Take the rest together:- Re-prove them all once, with every fix still applied (skip the ones §5 step 3 already re-proved). A claim that holds now is flaky: it held and failed on the same code, so no fix is to blame. Add its id to this round's
"flaky"inrounds.json(the report lists it). It leaves the search, and nothing is undone for it. - Undo each remaining claim's fixes before
|(for a claim with none, every suspect), and re-prove. - A fix there cannot be undone alone (step 1's
Not undone alone:, orgit apply -Rfails):- For a bug claim, search no further. The fix before
|already adds the text its failing case shows, so the two fixes conflict. Keep that fix. Undo the claim's own fix as step 2 says (when its patch does not reverse alone, undo the fixes after it newest first, then re-apply them oldest first), withdecision"Its fix conflicts with BUG-NNN's fix, which shows "<text>". Fix by hand?". It leaves the search. - For any other claim, undo every kept fix of the round instead, newest first, and re-prove once, as sub-step 5 does.
- For a bug claim, search no further. The fix before
- A bug claim still disproved: its own fix did not hold. Undo it as step 2 says. It leaves the search.
- Another claim still disproved: undo the round's other kept fixes too, and re-prove. Still disproved with every fix undone: no fix of this round broke it, and it leaves the search as a spec claim with
nonedoes (extra). Holds now: every fix of the round is its suspect. - A claim that holds: one of its undone suspects broke it. With one, that is the culprit. With more, halve: re-apply the older half and re-prove. It fails: the culprit is in that half; undo it again and halve it. It holds: the culprit is in the half still undone; halve that.
- One re-proof covers every claim still searched. When two claims' next halves would undo and re-apply the same fix, finish the older claim's search first, then go on with the other.
- Each culprit stays undone (undo it again if it is applied): mark it
not-fixedwithdecision"Broke<claim id>:<statement>". When every claim is done, re-apply every other fix the search undid, keep them, and re-prove every claim the search took part in once more, on the code that stays: the report and the ledger take that last verdict.
- Re-prove them all once, with every fix still applied (skip the ones §5 step 3 already re-proved). A claim that holds now is flaky: it held and failed on the same code, so no fix is to blame. Add its id to this round's
- A patch several bugs share (a record whose
summaryis "Fixed with BUG-NNN" points at another bug's patch): undo it once, and every bug it covers becomesnot-fixedwith the samedecision. not-proven: keep the fix; the report lists it under Needs your attention.- Rebuild, after the search: for the fixes that got a
Conflictline and are not undone for a failure of their own (a culprit, a claim that did not hold), dispatch one fixer as §4 step 2 does, with those bug folders asBugs:and one more line,Rebuild: <BUG-NNN on BUG-MMM, comma-separated>, BUG-MMM being the undone fix each built on. Then re-prove their bug claims in one re-proof. One that holds is kept. One disproved: undo its new patch, and it isnot-fixedwith "The fix did not hold:<the claim>. Fix by hand?". A fix that stays undone (BUG-MMM was undone again, or the fixer could not rebuild it) isnot-fixedwith "It builds on BUG-MMM's fix, which was undone. Fix by hand?" (auto mode: a rule). - Last, with
Fix commits:notnone: commit the undo of each committed fix this step left undone, newest first, oncegit diff --cached --quietpasses:git apply -R -3 --cached '<fix run>/<its patch>' && git commit -m 'revert(<feature>): BUG-NNN <its decision>'(a rebuilt fix: its first patch, with the messagerevert(<feature>): BUG-NNN rebuilt without BUG-MMM). Then commit the rebuilt fixes:node <skill directory>/scripts/fix-patch.mjs commit <fix run> <feature> <their bug folders>. Commit nothing else.
- Suspects of every disproved claim, in one command:
- After any undo, restart once more (with
none, wait for the reload) so the app runs the kept fixes. Then runPROOF.md§3 step 5 for the verify run, with this round'sreproofsafter the ledger dir:node <show-your-work directory>/scripts/build-proof.mjs <verify run> --ledger <ledger dir> <each re-proof run, oldest first>. The ledger then holds the code that stays: a claim of an undone fix isnot-proven, a ledger claim an undone fix changed keeps its old line, and a claim a re-proof covered takes its verdict from the re-proofs.
6. Rounds
Self-improvement: after §5, start the next round at §3 until the rounds are done. Stop early when a round has no bug to fix (its explore filed none and it has no extra), or §4 fixed none.
7. Report
- Run
node <skill directory>/scripts/build-fix-report.mjs <fix run>. Fix aProblem:line that names a broken data file and run it again; forfixes but no verify run, do §5 for that round, then run it again; never editreport.htmlorresult.json. - Show two lines and nothing more: the summary's first line (its
Stopped:line instead, when step 3 of §5 stopped the run) and theOpen:URL. The page holds the bugs, fixes, proofs and problems; never repeat them in chat or rewrite them as a table. - In one more line, say where the changes are: the branch and its commits, or uncommitted in the working tree with the patches in
<fix run>/fixes/. Never push. - Release the lock (
node <show-your-work directory>/scripts/run-folder.mjs --release <project folder>) and stop.
Decisions from a page
A page's Copy answers gives lines such as decide BUG-003 of .evident/invites/2026-11-01-1941-explore-and-fix/explore: Yes, change it, and decide C-02e4 of .../proof: Fix the app for a test (check) that failed or gave no result. Hand any answer Q-... lines among them to show-your-work's SKILL.md ## Answering a question. A line with the user's own words instead of a choice: read them first. When they say the app is right as it is (intended, by design, invalid, how it should work), pass Drop this test: <their words, verbatim> for a check (C-id) and Not a bug: <their words, verbatim> for a bug, so its tests leave the ledger with their reason and later runs learn the rule; otherwise pass their words as they are. Record every decide line in one command from the app repo: node <skill directory>/scripts/decide.mjs '<step folder>' <BUG-NNN or C-id> '<decision>', one call per line joined with &&. Show its lines, then:
Kept:,Not a bug:,Retired:(a dropped test, or a bug's tests, leave the ledger),Also <bug> of <step>: the same change(the decision covers a bug fixed by the same change) andShipped:: nothing more to do.Undo: <bug> commit <id>:git revert --no-edit <id>.Undo: <bug> patch <file>:git apply -R '<file>'. Then restart as §5 step 1 says, and rebuild the ledger so the bug's claim is no longer proven:node <show-your-work directory>/scripts/build-proof.mjs <verify run> --ledger <ledger dir> <its reproofs, oldest first>, with the round'sverifyandreproofsfrom the fix step'srounds.json.Fix: <bug folder>: run Fix a report mode on exactly those bug folders: they are the context, so ask nothing. The fixer reads each bug's decision.Prove: C-id of <proof step>: follow show-your-work's "re-prove run<proof step>" (REPROVE.md).Prove: BUG-NNN of <step>: the same for the proof step whosefix-claims.jsonnames that bug's folder. SeveralProve:lines of one proof step are one re-prove.Fix:lines for a check name the bug its provers filed, or the onedecide.mjsfiled from its failed case: run Fix a report mode on them as above.
Auto mode
Only when the run is in auto mode. AUTO.md's rows hold here too; where a row here and an AUTO.md row differ, this one wins.
| Where | In auto mode | Kind |
| §1 step 2: the app does not run the code path | Stop: Stopped: fix-and-prove needs the app at <App> to run the code in <Code>. Run it locally, or add a Restart line to <project folder>/environment.md that puts that code live there. | hard stop |
| §1 step 1: Fix a report with no run named and no pending bug | Stop: Stopped: no bug-bash bugs to fix. Name a run, or ask to explore and fix. | hard stop |
§1 step 4: Production: unknown | The main branch, else master. Record it. | default |
§1 step 5: no Restart: | none, as §1 step 5 says. Record it. | default |
§1 step 6: new branch with uncommitted work | current branch. Record it. | default |
| §2 and §5: inner show-your-work approvals | As AUTO.md approves claims. In §2 the writer already ran --plan and returned its text: show that, and do not run it again. Approve and record in one call: node <show-your-work directory>/scripts/build-proof.mjs <run> --approve --by auto && printf '%s\n' '<ruling>' >> <run>/decisions.md. --approve refuses on the same Problem: lines as --plan, and then records nothing. | default |
| §4: a question about what production does | The fixer decides it up to Auto fixes:, and writes the choice as source auto: <choice>; the report lists each choice, and the user can undo it there. Ones above that level stay needs-decision: record nothing more, and never ask. | rule |
§5 step 2: a Conflict: line that ends changed | Keep the writer's changed ledger claim, and record Ruling: default: <ledger id> now expects what <bug id>'s fix does: "<its new statement>" — the fix's source: <fix.source> — the ledger drops what <ledger id> proved before if the fix is wrong. | default |
§5 step 2: --plan still prints Problem: lines after the claim writer | Drop each claim it names as PROOF.md §1 step 4 drops a claim, and record it. Never stop the run: the bugs those claims proved show as fixed, not proven. | rule |
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.

