agentleFS
MegapromptingMegaprompting/torque-loop/skills/patch/SKILL.md

patch

Skill10 starsChanged 4 months agoMITView on GitHub

Fix only what failed — nothing else. Use after an attack surfaced defects, to prevent the model from rewriting everything for elegance. Returns the minimal delta under REMOVE / ADD / CHANGE, the patched artifact, the relevant retest result, and any defects still open.

10 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 10 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Take the defect list as the work order: Only defects found by /ratchet:attack (or recorded in state) are in scope.

    line 20
  2. Distinctive:

    Retest the patched path: Run the specific 5-point test items the defect touched.

    line 32

“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “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

/ratchet:patch — minimal delta

The temptation after criticism is to rewrite. Rewriting throws away working parts and introduces new defects. This command patches the specific failures and nothing else.

Step 0 — Load state and open defects

ratchet status
ratchet state get defects

Procedure

  1. Take the defect list as the work order. Only defects found by /ratchet:attack (or recorded in state) are in scope. If you feel the urge to change something not on the list, stop — that is scope creep, not a patch.
  2. Express each fix as a minimal delta:
    • REMOVE: what to delete.
    • ADD: what to introduce.
    • CHANGE: what to alter, from → to.
  3. Preserve everything that passed. Working parts are untouched. Prefer the smallest diff that clears the defect over the "cleaner" larger one.
  4. Retest the patched path. Run the specific 5-point test items the defect touched. Report the actual result — if a fix didn't hold, say so; do not claim green on faith.
  5. Update defect status. Resolved defects get marked; anything still failing stays open and honest.

Output contract

PATCH (per defect):
- <defect> → REMOVE: ... | ADD: ... | CHANGE: ...
PATCHED ARTIFACT: <the changed artifact or diff>
RETEST: <which checks were re-run + pass/fail>
REMAINING DEFECTS: <still-open items, or "none">

Serialize

Clear the ORIGINAL defect with the proof that it is fixed. Do not record a second, already-resolved defect: a defect cannot be born terminal (the CLI refuses it), and a freshly-minted "resolved" record leaves the real one draining forever.

ratchet defect resolve <original-defect-id> --evidence "<the retest result that proves it>"
ratchet state set phase patch
ratchet score confidence

Anything still failing stays open and honest — ratchet defect list shows what drains.

Next: if defects remain critical/high, loop back to /ratchet:attack. If clear, /ratchet:compile to serialize the advance.

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.