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

loop

Skill9 starsChanged 5 months agoMITView on GitHub

Run recursive improvement — build → attack → patch → compile — until the artifact is genuinely done. Use to drive an artifact to a stable, tested, serialized state without stopping at the first draft. Repeats the cycle and reports an iteration log and confidence score, stopping only when no critical/high defect, no untested core assumption, and no missing next action remain.

34 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fleet, improve and 7 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • oguzhnatlySkill

    fleet

    Multi-agent fleet management for OpenClaw, Claude Code, Codex, Cursor, Windsurf, Gemini CLI, and custom agent stacks. One CLI to monitor, manage, and orchestrate your entire AI agent fleet. Fleet judges reliability, routes intelligently, tracks deltas, and keeps gateways, HTTP workers, Docker workers, and local processes accountable. Network access stays limited to loopback and explicitly configured endpoints. Operator consent required before install.

    Also in 3 projects that use this

  • AnasX7Skill

    improve

    Survey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on source code — never implements, fixes, or refactors anything itself. Use when asked to audit a codebase, find improvement opportunities (bugs, security, performance, test coverage, tech debt, migrations, DX), suggest features or where to take the project next (roadmap, product direction), or generate handoff plans for another agent to implement.

    Also in 3 projects that use this

  • VercelSkill

    workflow

    Creates durable, resumable workflows using Vercel's Workflow SDK. Use when building workflows that need to survive restarts, pause for external events, retry on failure, or coordinate multi-step operations over time. Triggers on mentions of "workflow", "durable functions", "resumable", "workflow sdk", "queue", "event", "push", "subscribe", or step-based orchestration.

    Also in 3 projects that use this

  • dcs-soniSkill

    codebase-onboarding

    Help developers understand unfamiliar codebases quickly. Use when

    Also in 3 projects that use this

  • BlockSkill

    plan

    Draft a TDD, PRD, or lightweight plan in the conversation without committing it.

    Also in 4 projects that use this

  • DockerSkill

    research

    Research a documentation topic — locate affected files, understand the problem, identify what to change. Use when investigating an issue, a question, or a topic before writing a fix. Triggers on: "research issue 1234", "investigate what needs changing for #500", "what files are affected by #200", "where is X documented", "is our docs page about Y accurate", "look into how we document Z".

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 31 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Patch: only what failed (/ratchet:patch).

    line 28
  2. Very specific:

    Run ratchet score confidence and read BOTH loopClear and the workflow-closure layer (closure.closed).

    line 43
  3. Distinctive:

    If either read is false, run another iteration.

    line 52

“Common” is measured: kept by at least 6 in 10 of the 31 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:loop — recursive advancement

One pass rarely finishes anything. This command repeats the core cycle until the artifact actually holds under attack. It is the closest thing Ratchet has to a software-quality agent: discover the missing thing, build it, try to break it, fix what broke, serialize.

Step 0 — Load state

ratchet status
ratchet score confidence

The cycle (repeat until the stop condition holds)

Each iteration:

  1. Discover the missing thing. The highest-leverage gap right now — an untested assumption, an open defect, a missing piece of the artifact. (Borrow /ratchet:cut and /ratchet:auction logic to pick it.)
  2. Build the artifact or the fix (/ratchet:build).
  3. Attack it with the five-voice board (/ratchet:attack); record defects.
  4. Patch only what failed (/ratchet:patch); resolve the original defect with evidence.
  5. Verify bound to the artifact (/ratchet:verify); on green, ratchet artifact close <id>.
  6. Compile the advance (/ratchet:compile); recompute confidence.

The cycle is build → attack → patch → verify → compile. Compiling before verifying records an unproven state as if it were an advance.

Report each iteration compactly:

ITERATION n: discovered <gap> → built <thing> → attack <c crit / h high> → patched <delta> → confidence <score>

Stop condition (all must hold)

Run ratchet score confidence and read BOTH loopClear and the workflow-closure layer (closure.closed). Stop only when:

  • loopClear holds — no unresolved critical/high defect, no untested core assumption, no missing next action.
  • workflowClosed.closed is true — the active artifact carries a closure certificate and no open defect is unattached.
  • The artifact is genuinely usable (passes its 5-point test).

If either read is false, run another iteration. Do not stop because the output "looks good" — the CLI reads are the arbiter, not your impression.

There is no convergence escape. If two iterations find nothing new while workflowClosed.closed is false, you are not converged — you are blocked. Stop with STOP REASON: blocked-needs-human, name the blocker the closure read printed, and hand it over. "Nothing left to try" and "finished" are different states, and only one of them is an ending.

Output contract

ITERATION LOG:
- ITERATION 1: ...
- ITERATION 2: ...
STOP REASON: closed | blocked-needs-human
WORKFLOW: CLOSED | NOT CLOSED — <blockers, if any>
FINAL CONFIDENCE: <score>/100 (<band>)
REMAINING RISK: <what a human should still watch>
NEXT: <action> → /ratchet:<command>

Then confirm serialization with ratchet export markdown.

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.