loop-verify
Skill1 starsChanged 4 months agoMITView on GitHub
Outer-loop verification step for run.sh — checks the repo against PROMPT.md and .claude/IMPLEMENTATION_PLAN.md, runs mechanical checks, invokes the verifier subagent, and records the verdict. Invoked externally as `/loop-verify` by run.sh, once per outer-loop iteration. Not for ad hoc use — during interactive work, invoke the `verifier` subagent directly instead.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- manastalukdar/ai-devstudiotheir own version, first seen Oct 13, 2026
- erp-mafia/accountedtheir own version, first seen Oct 8, 2026
- cbdreamer11/CB-loop-kit-claude-plugintheir own version, first seen Jul 25, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- erp-mafia/accounted★ 403same name
- cbdreamer11/CB-loop-kit-claude-plugin★ 8same name
- manastalukdar/ai-devstudio★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- agent-llmSkill
- dataSkill
- debugSkill
- doc-coauthoringSkill
- frontend-designSkill
- git-opsSkill
- refactorSkill
- securitySkill
- testingSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
2
Distinctive
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 24
If PROMPT.md (project root) or .claude/IMPLEMENTATION_PLAN.md is missing: append a note to .claude/IMPLEMENTATION_PLAN.md's Verify log …
- Very specific: line 28
Run the mechanical checks: bash .claude/scripts/run-checks.sh.
- Very specific: line 49
If PASS: change the STATUS: line to exactly STATUS: done — this exact string is what run.sh greps to end the loop.
- Very specific: line 51
If FAIL: leave STATUS: as in_progress, UNLESS the same failure reason has now appeared 3+ times across consecutive Verify log entries — …
- Distinctive: line 65
Keep both files terse. Their entire purpose is giving the next fresh-context iteration exactly what it needs and nothing more — a verbose …
- Distinctive: line 70
Do not edit, format, or "fix" application code, even something trivially wrong you notice in passing.
- Very specific: line 72
Do not second-guess or rewrite ## Steps — that's the implementer step's plan, not yours to redesign here.
- Very specific: line 74
Do not set STATUS: done unless both the mechanical checks and the verifier subagent actually passed.
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
/loop-verify
You are the verify step of the outer loop (run.sh). You are a reporter, not
a fixer: you never edit application code — only .claude/IMPLEMENTATION_PLAN.md
and .claude/MEMORY.md. This is enforced by a hook (CLAUDE_VERIFY_MODE=1
restricts Edit/Write to those two files), not just this instruction, so don't
fight it.
You are running in a fresh session with no memory of prior iterations. SessionStart
should have already injected PROMPT.md, .claude/IMPLEMENTATION_PLAN.md, and the
tail of .claude/MEMORY.md into your context — but SessionStart caps each at 4000
bytes, so if .claude/IMPLEMENTATION_PLAN.md looks truncated, re-Read it in full.
Procedure
- If
PROMPT.md(project root) or.claude/IMPLEMENTATION_PLAN.mdis missing: append a note to.claude/IMPLEMENTATION_PLAN.md's Verify log saying so (create the file with just that note if it doesn't exist), leaveSTATUS:untouched, and stop — there is nothing to verify yet. - Run the mechanical checks:
bash .claude/scripts/run-checks.sh. Exit 0 means typecheck/tests are green — this is the same check the inner Stop gate uses. - Invoke the
verifiersubagent (@agent-verifier) to judge the current diff and commits againstPROMPT.md. Let it gather its own diff (git diff,git diff --staged, recent commits) — don't pre-filter it for them. Use its{passes, failures}verdict. - Combine: overall PASS only if the mechanical checks were green AND the
verifier returned
passes: trueAND every step in.claude/IMPLEMENTATION_PLAN.md's## Stepsis checked off. Anything else is FAIL.
Recording the verdict
Edit .claude/IMPLEMENTATION_PLAN.md only:
- Insert a new entry at the top of
## Verify log(newest first — do not touch or remove prior entries):## <date> — verdict: PASS|FAIL Mechanical: <green | which check(s) failed> Semantic: <verifier passes:true | its failures, one per line> - If PASS: change the
STATUS:line to exactlySTATUS: done— this exact string is whatrun.shgreps to end the loop. Get it right. - If FAIL: leave
STATUS:asin_progress, UNLESS the same failure reason has now appeared 3+ times across consecutive Verify log entries — that means the plan itself is wrong, not just unfinished. In that case setSTATUS: blockedand say why in the log entry, so a human looks at it instead of the loop burning iterations on a plan that can't succeed.
Then append (do not prepend) a short dated entry to .claude/MEMORY.md — create
it if missing. .claude/MEMORY.md is read chronologically tail-first by the next
session, so append at the end:
## <date> — loop-verify (iteration N)
Verdict: PASS|FAIL. <one line on what's still missing, or "shipped">Keep both files terse. Their entire purpose is giving the next fresh-context iteration exactly what it needs and nothing more — a verbose log defeats that.
What NOT to do
- Do not edit, format, or "fix" application code, even something trivially wrong you notice in passing. Not your job this step; note it in the Verify log instead.
- Do not second-guess or rewrite
## Steps— that's the implementer step's plan, not yours to redesign here. - Do not set
STATUS: doneunless both the mechanical checks and the verifier subagent actually passed. A falsedonesilently ends the loop on unfinished work.
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.

