agentleFS
v1n33thv1n33th/evident/skills/fix-and-prove/SKILL.md

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

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
  1. Very specific:

    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 …

    line 60
  2. Very specific:

    Check each claim's source in one command: its quoted sentence must be in its document, word for word (grep -F).

    line 74
  3. Very specific:

    Follow <show-your-work directory>/RUN.md with kind proof for the verify run.

    line 111
  4. Very specific:

    Run node <skill directory>/scripts/fix-claims.mjs <verify run> <ledger dir, or none> [--spec <baseline run>] <the round's fixed and partly …

    line 112
  5. Very specific:

    Run node <skill directory>/scripts/build-fix-report.mjs <fix run>.

    line 148
  6. Very specific:

    Only when the run is in auto mode.

    line 165

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 to fix-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.md and, in auto mode, AUTO.md at §1; show-your-work's PROOF.md at §2 or §5; bug-bash's at §3. CLAIMS.md is the claim writer's file and FIXER.md the fixers'; never read them yourself.
  • Request folder and fix run: the Request folder: and Fix run: lines fix-setup.mjs prints. The request folder holds brief.md, decisions.md and every step of this request. The fix run is its fix step (fix-2 when the folder was fixed before), with fixes/ (the patches), rounds.json and, 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.md the request folder, so step 3 runs run-folder.mjs --in <request folder> <explore | proof>. They skip RUN.md steps 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's run.lock covers 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 --auto or auto mode, or Preferences say Mode: auto, as AUTO.md §1 says. Then read AUTO.md and ## Auto mode at the end of this file now, and make AUTO.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.md steps 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 --report in Fix a report mode, --improve in Self-improvement, --all-features when 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 as Older run: <run> <n> pending; with --batch, the most severe up to the batch, and the rest as Left out by Batch:; with --improve, each bug the newest earlier request left not-fixed as Not 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 --list once the user answers, naming the older run they pick, if any. When another run holds the lock, it prints Lock: held by <folder> and creates nothing: do step 1, then ask as RUN.md step 3 says (auto mode: stop), and run it again with --take-lock if the user says take it. With --report and no pending bug, it creates nothing. Else it makes the fix run with fixes/ (RUN.md step 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 as Baseline run:. A Problem: line naming a definition file is RUN.md step 3's: on a Problem: line, stop and show it to the user; in auto mode, stop with it.
  1. Mode, from the request:

    ModeRequest, for exampleDoes
    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.mjs printed: 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 second fix-setup.mjs call; "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, or Mode: auto in Preferences) skips it: it takes the pending bugs fix-setup.mjs printed, records Ruling: 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.

  2. 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: none counts as local: its target is an API run from the code path on this machine. On any other host, the Restart: 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."
  3. Code: must name the app repo; none: stop, as there is nothing to fix.
  4. Production: in ## Target. unknown or missing: ask the user once, in these words, with the main branch fix-setup.mjs printed 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 to environment.md.
  5. Restart: in ## Target: the command that restarts the app on changed code, or none when the app reloads changed code itself (a dev server in watch mode). Missing: use none, 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 is none, 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.
  6. Fix commits: from Preferences, else current branch. A value from Preferences is a rule, not a default.
    • none: fixes stay uncommitted, as patches in fixes/.
    • current branch: fixers commit on the branch the code path is on.
    • new branch: with uncommitted work, use current branch and say so. Else run git -C '<code path>' switch -c fix-and-prove/<feature>-<YYYY-MM-DD> before the first fix.
  7. Gaps: the request's "with gaps" or "no gaps", else Gaps: in Preferences, else yes in auto mode and self-improvement and no otherwise. Auto fixes, the highest risk a fix may have without asking: off outside auto mode. In auto mode, the request's "auto fixes up to <risk>", else Auto fixes: in Preferences, else very-high. A value from the request or Preferences is a rule, not a default.
  8. Self-improvement: say in one line, and go on without waiting: <rounds> round(s): about <45–90 × rounds> minutes and $<25–60 × rounds>.
  9. In one message, write the request folder's brief.md (RUN.md step 4; when it already has one, append this request's sections below), decisions.md there in auto mode (appended too, never over an earlier request's rulings), the fix run's rounds.json and, when §2 runs, the baseline run's brief.md (§2 step 2). rounds.json is {"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 set baseline.

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.

  1. Documents: the spec or plan documents the request names. None: the ## Documents of the brief of each bug-bash run round 1 starts from. Still none: there is no baseline. Delete the baseline run fix-setup.mjs made, and say in one line: No spec document named: no baseline. Name one to get spec claims.
  2. The baseline run's brief.md holds exactly: ## Request: the ## Request of 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.
  3. Dispatch the claim writer with exactly this prompt, filled in. Run no code check. If it returns too big, read show-your-work's SKILL.md §2 then, and do as it says (auto mode: AUTO.md's too big row).
    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>
  4. Check each claim's source in one command: its quoted sentence must be in its document, word for word (grep -F). Drop each claim whose sentence is not, as PROOF.md §1 step 4 drops a claim.
  5. 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

  1. The fix list: the round's bug folders, plus its extra bug folders. With Earlier rounds: (§3), compare each new bug with the bugs of those runs: one whose title and actual show the same failure as an earlier bug left wont-fix or not-fixed, or needs-decision outside auto mode, is a repeat. In auto mode a repeat of a needs-decision bug 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 its bug.json a fix that copies the earlier bug's status, risk, riskReason, inProduction and decision, with summary "Same as round <n> BUG-NNN" (an earlier request's bug: "Same as <its request folder's name> BUG-NNN"). A repeat of an earlier fixed bug means that fix did not hold: keep it on the list. So is a repeat of a bug whose fix §5 step 4 undid (its decision starts "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 (an extra): keep both, as one cause (step 2).
  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 ending not confirmed: <why> gets no fixer: its own picture does not show it. Take it off the list, and merge into its bug.json a fix with status "wont-fix", summary "Not confirmed: <why>" and decision "Its own evidence does not show it. Fix it anyway?". Group from that output alone, never from the code: each bug's title and actual, and the source files 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 the evident:evident-fixer agent type (the plugin's) or evident-fixer (evident's setup installs it), use that type: it carries only Read, Edit, Write and Bash, so no tool list rides on each of its turns.
    Read <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>
    Send the groups that name files together in one message, then the no-file groups together after they return. With Fix commits: current branch or new branch, write Fix commits: later in 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.
  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 in changesClaims. For each BUG-NNN undo | <decision> line, undo that fix (git apply -R its patch: nothing is committed yet), keep the patch file, and set its status to needs-decision with that decision. A "Fixed with BUG-NNN" record follows that bug: it is undone with it, with the same decision. Then run fix-list.mjs on the fix list again. Last, with Fix commits: current branch or new 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 in bug.json. A staged changes refusal, or a Conflict <patch> line (that patch did not apply on the commits before it): say so in one line; the fixes not committed stay as patches.
  4. 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.

  1. Run the Restart: command from the code path; with none, 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 -R each patch, or git revert --no-edit <commit>), restart again, and set each one's status to not-fixed with decision "The app did not start with this round's fixes. Fix by hand?". Still not up after 2 more minutes: set "stopped" in rounds.json to "The app does not start, even with this round's fixes undone<with none: ; Restart: none cannot 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.ts as dist/a.js). An Unknown: line is no evidence either way: go on. On Stale: lines, wait 30 seconds and run it once more. Still Stale:: 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 as Restart: and do this step again. In auto mode, or with no answer, set "stopped" in rounds.json to "The app did not rebuild <file> after it changed: <with none: Restart: none is 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.
  2. Prove the fixes. You write no claim text and no evidence value:
    1. Follow <show-your-work directory>/RUN.md with kind proof for the verify run. Its ## To prove is "the bugs fixed in round <n>".
    2. 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 --spec in round 1 when there is a baseline. When it prints Writer: and a prompt, dispatch the claim writer once with it, word for word, before PROOF.md. With no bug folder (round 1 with a baseline only) it prints none: go on.
    3. The writer returns a Conflict: line for each fix that changes what a proven ledger claim expects. One that ends changed: 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's fix.changesClaims, so an undo of the fix leaves the ledger claim as it was. One that ends unchanged: before PROOF.md, undo that fix as §4 step 3 does, set its status to needs-decision with decision "It changes what <ledger id> proved: <its statement> Change it?", and drop its bug claim as PROOF.md §1 step 4 drops a claim. A "Fixed with BUG-NNN" record follows that bug.
    4. 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 in claims.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 a Problem: line --plan prints, follow neither PROOF.md §1 step 3's rewording nor AUTO.md's approve row: in both modes, drop the claim it names as PROOF.md §1 step 4 drops a claim; the bugs it proved show as fixed, not proven.
    5. 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.
  3. 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's actual describes, the app may not be running the fixed code:

    1. Re-prove one of those bugs' claims (a re-proof, above).
    2. 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.
    3. 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 verify unset for this round, so its fixes show as not verified. Set "stopped" in rounds.json to "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 verify for this round in rounds.json.

  4. Roll back. Undo a fix with git apply -R its patch and re-apply fixes with node <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 never git reset --hard. Undo newest first; re-apply oldest first. reapply merges a patch that no longer applies as it is with the code as it is now ((three-way)). A Conflict <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.
    1. 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 is none. Last, Not undone alone: BUG-NNN ... names each fix whose patch later fixes changed, so git apply -R fails on it alone. Before the first re-proof, read each failing case's actual beside those fixes' summary.
    2. A bug claim disproved with 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 claim disproved: whatever the reason, even when the fix covers only part of the bug, undo that bug's fix, and set its status to not-fixed with decision "The fix did not hold: <the claim>. Fix by hand?".
    3. Ledger claims disproved (fix-claims.mjs copies only ledger claims that last held), spec claims disproved on 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 with none before | 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 as extra; with no next round, the report lists the claim as not holding. Take the rest together:
      1. 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" in rounds.json (the report lists it). It leaves the search, and nothing is undone for it.
      2. Undo each remaining claim's fixes before | (for a claim with none, every suspect), and re-prove.
      3. A fix there cannot be undone alone (step 1's Not undone alone:, or git apply -R fails):
        • 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), with decision "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.
      4. A bug claim still disproved: its own fix did not hold. Undo it as step 2 says. It leaves the search.
      5. 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 none does (extra). Holds now: every fix of the round is its suspect.
      6. 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.
      7. 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.
      8. Each culprit stays undone (undo it again if it is applied): mark it not-fixed with decision "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.
    4. A patch several bugs share (a record whose summary is "Fixed with BUG-NNN" points at another bug's patch): undo it once, and every bug it covers becomes not-fixed with the same decision.
    5. not-proven: keep the fix; the report lists it under Needs your attention.
    6. Rebuild, after the search: for the fixes that got a Conflict line 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 as Bugs: 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 is not-fixed with "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) is not-fixed with "It builds on BUG-MMM's fix, which was undone. Fix by hand?" (auto mode: a rule).
    7. Last, with Fix commits: not none: commit the undo of each committed fix this step left undone, newest first, once git diff --cached --quiet passes: 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 message revert(<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.
  5. After any undo, restart once more (with none, wait for the reload) so the app runs the kept fixes. Then run PROOF.md §3 step 5 for the verify run, with this round's reproofs after 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 is not-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

  1. Run node <skill directory>/scripts/build-fix-report.mjs <fix run>. Fix a Problem: line that names a broken data file and run it again; for fixes but no verify run, do §5 for that round, then run it again; never edit report.html or result.json.
  2. Show two lines and nothing more: the summary's first line (its Stopped: line instead, when step 3 of §5 stopped the run) and the Open: URL. The page holds the bugs, fixes, proofs and problems; never repeat them in chat or rewrite them as a table.
  3. 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.
  4. 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) and Shipped:: 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's verify and reproofs from the fix step's rounds.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 whose fix-claims.json names that bug's folder. Several Prove: lines of one proof step are one re-prove.
  • Fix: lines for a check name the bug its provers filed, or the one decide.mjs filed 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.

WhereIn auto modeKind
§1 step 2: the app does not run the code pathStop: 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 bugStop: Stopped: no bug-bash bugs to fix. Name a run, or ask to explore and fix.hard stop
§1 step 4: Production: unknownThe 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 workcurrent branch. Record it.default
§2 and §5: inner show-your-work approvalsAs 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 doesThe 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 changedKeep 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 writerDrop 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.