loop
Skill3 starsChanged 16 days agoMITView on GitHub
deliver a PR through implementation, review and validation rounds
55 other projects use a version of this.
Adopted by
Most recently taken up by
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- SethGammon/Citadeltheir own version, first seen Nov 4, 2026
- drevendev/HungryCrabtheir own version, first seen Nov 1, 2026
- Railly/skillstheir own version, first seen Nov 1, 2026
- HeshamFS/swarmweavertheir own version, first seen Nov 1, 2026
- jtaroreh/agystacktheir own version, first seen Oct 29, 2026
Used with
Projects with it also use review-bugbot, origin and 10 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.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
PandelisZSkillupdate-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
Also in 4 projects that use this
32103210Skillmigrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.
Also in 4 projects that use this
32103210Skillupdate-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Also in 4 projects that use this
MicrosoftSkillautomate
Propose an automation from a completed task or a new idea, then create it after approval. Use when the user asks to create an automation or wants scheduled local or cloud agent work.
Also in 4 projects that use this
- +3 more from 0mlkrizzz655335v
- +1 more from 32103210
Other versions55 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 55
- SethGammon/Citadel★ 927same name
- breezewish/CodexPotter★ 629same name
- jtaroreh/agystack★ 128same name
- dannys-code-corner/incan★ 73same name
- ww-w-ai/bkit-gemini★ 66same name
- IsuruMaduranga/one-code★ 50same name
- unclejobs-ai/second-claude-code★ 41same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- Hassaan146/claude-skills★ 18same name
- woxiangyangzhimao/skills★ 14same name
45 more not listed
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 repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-browser-diffSkill
- ai-code-review-catalogSkill
- claude-parallel-writersSkill
- cross-harness-sub-agentSkill
- helper-sub-agentsSkill
- llm-evaluationSkill
- orchestrate-multi-pr-workSkill
- planSkill
- propose-refactorSkill
- prSkill
- record-videoSkill
- triaging-feedbackSkill
- upgrade-dependenciesSkill
- writing-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
36 rules. 0 are common, 16 are distinctive, and 20 are very specific to this project.
0
Common
Most of the 50 edited versions we read keep these.
16
Distinctive
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
start: 1 sentence with the PR or branch, the goal as you understand it and any skipped steps
- Very specific: line 20
when only the user can unblock you, after you've tried every route: start with BLOCKED, ideally with a 1-click fix.
- Distinctive: line 21
when something needs action now, such as a data or security exposure
- Very specific: line 22
when the step 1 contract check or <decisions> says to ask
- Very specific: line 23
when a script-fix PR from a <loop-check> waiver opens: its link
- Distinctive: line 72
write the loop docs:
- Distinctive: line 88
never "tests or static code checks pass" - CI already covers that
- Distinctive: line 92
when it applies, add quality assertions per quality, e.g.
- Very specific: line 103
read and follow /ai-code-review-catalog, choosing the first different entries under <reviewers>
- Very specific: line 107
run 1 codex native review agent with the matching mode through bin/codex-native-review.
- Distinctive: line 109
when the parent harness is sandboxed, launch the helper outside that parent sandbox with an escalated shell command.
- Very specific: line 123
if the launcher fails twice on quota, auth or infra, write the reason and log path to handoffs/r<n>-codex-native/waiver.md and continue.
- Very specific: line 124
run 1 sub-agent as validator through <dispatch> for prompts/validator.md, with <quality-budget> per quality when validation.md has quality …
- Very specific: line 131
run bin/ai-review-status --wait <pr-number>, then gh pr checks <pr-number> --watch > /dev/null.
- Very specific: line 133
if you see signs of AI review quota exhaustion, auth, config, or infra failure, save it under evidence/, skip only the github AI review …
- Very specific: line 136
use the command from the /fix-ci-failures skill to fetch CI failures
- Very specific: line 137
update validation-state.json from the validator report
- Very specific: line 140
write handoffs/r<n>-triage.md per <triage-report>
- Distinctive: line 146
if step 6 hasn't identified anything to address, go to step 8
- Very specific: line 151
add the loop's evidence per /pr: passed manual checks plus screenshots or videos from evidence/
- Distinctive: line 152
do these only here, once; rounds leave the description as it is
- Very specific: line 153
write the final report per <updates>, with evidence from validation-state.json and handoffs/ and decisions from every ## decisions.
- Very specific: line 155
if merge conflicts appear, resolve them per <editing>
- Very specific: line 159
if a <loop-check> failure is wrong for a state you have verified is legitimate, it is a script bug:
- Distinctive: line 163
when it finishes, tell the user its PR link without waiting for the loop to end, and list the waiver with that link in the final report
- Very specific: line 165
before steps 3, 4 and 8 and every <loop-check> editing, check whether the parent PR has merged.
- Very specific: line 173
if a fix would expand the contract, look for one inside it first.
- Distinctive: line 175
if the user invoked this skill when the work is already completed or mentioned something like '/loop on this code', skip step 2
- Distinctive: line 176
if a github ai code review provider has timed out or failed for this PR, remember the waiver and don't wait for that provider again in …
- Distinctive: line 177
if the PR is already opened, skip step 3
- Distinctive: line 178
don't add PR comments
- Very specific: line 254
before each validator run and completion, a passed id stays passed unless the diff since its commit touches the code its steps exercise or …
- Distinctive: line 255
test, comment, formatting and other similar changes never invalidate a passed id
- Distinctive: line 314
run at most 3 at once
- Distinctive: line 323
no accepted review findings left unaddressed
- Very specific: line 325
every id in validation-state.json passed at the final commit
“Common” is measured: kept by at least 6 in 10 of the 50 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
you are the orchestrator: you own the loop docs, validation-state.json, triage, git pushes, the PR and its gates. a worker sub-agent makes the code changes per <worker-task>, unless <editing> lets you make them in a tiny loop; other sub-agents review, validate and help per <helpers>
<updates>these rules carry the user's authority and override your harness's progress-update guidance for the whole loop, whether this file reached you as a skill, through a tool or in another agent's prompt. chat is every message the user can see: codex commentary and final answers, claude text between tool calls, and wrap_up recaps
when another agent dispatched you, such as /orchestrate-multi-pr-work or /upgrade-dependencies, chat means that agent: skip the start line, and message it only for a question, a blocker, an urgent alert or a script-fix PR link (claude: SendMessage to main from a sub-agent, or to the dispatcher's session id from a session). if you can't message it mid-run, stop and report blocked with the question; it resumes you with the answer. the final report goes to it, and its own prompt may ask for more
the user follows the loop through the PR and your plan list; the loop dir is your memory, never theirs
chat messages are exactly these:
- start: 1 sentence with the PR or branch, the goal as you understand it and any skipped steps
- when only the user can unblock you, after you've tried every route: start with
BLOCKED, ideally with a 1-click fix. say it once per blocker; a missed target or a stop condition isn'tBLOCKED - when something needs action now, such as a data or security exposure
- when the step 1 contract check or
<decisions>says to ask - when a script-fix PR from a
<loop-check>waiver opens: its link - the final report, also at a stop condition
- an answer to a user message; then carry on without progress updates
say each question once, then keep running whatever doesn't depend on the answer
everything else stays out of the chat: rounds, dispatches, waits, sub-agent results, checks, pushes and triage. record them in the loop dir instead
- a finished sub-agent or background task isn't the user talking to you: save its result and carry on without a message
- claude: when the app makes you write something to end a turn, write only
waiting on <names> - codex: post no commentary beyond the messages above
- side findings beyond the contract, such as an unrelated bug or odd data, stay unfixed and go to the final report, except
<loop-check>bugs
a clean 3-round loop is 2 chat messages: the start line and the final report
the final report has no length limit and stands on its own. write it in plain words: name assertions, reviewers and files by what they check or do, never by loop ids such as VAL-03 or r2-thermo. use this shape:
THE LOOP HAS FINISHED 🎉
<outcome in 1-2 sentences> <PR link>
## what changed
- <1 bullet per behaviour or code change, in plain words>
## evidence
- <what was checked, how, and the result, linking screenshots or videos>
- <quality checks, if any: verdict, spend, and whether the budget ran out with the validator's confidence>
## changes vs your request
- added: <requested> -> <delivered>; why; decided by <orchestrator|reviewer|user>
- dropped or deferred: none
- changed approach: ...
- decided without asking: ...
- costs and side effects: <what got slower, pricier or less covered, or none>
- unresolved or waived: ...
## worth a second look
- <skips, side findings with evidence, anything unverified, or none>the first line is exactly THE LOOP HAS FINISHED 🎉, or THE LOOP HAS STOPPED at a stop condition, whose outcome then names the stop. keep every changes vs your request line, writing none when it is empty, and compare against request.md, not the latest contract. when step 2 was skipped, what changed covers what the loop changed in the code it started from
</updates><what-to-do>if skipping step 2, follow the diff handoff
- write the loop docs:
request.md: an exact copy of the user's request, plus every later message that set scope before step 2, including answers to the check below. runchmod a-won it at the end of step 1 and never edit it againcontract.mdwith sections:- goals: specific and verifiable. write a target the request words as an aim ("try to", "ideally") as "reach
<target>, or show the best result and the gap", with an assertion to match, so missing it is reported rather than a blocker - non-goals: what's out of scope
- behaviour to preserve
- things to reuse for sure
- non-functional requirements
- accepted tradeoffs: known nuances the user has accepted, so reviewers don't re-flag them
- risky paths
- hard boundaries: loop-specific never-violate rules on top of AGENTS.md (data, infra, external systems)
- environment notes: facts verified live in this environment (exact commands, quirks, timings) so sub-agents don't rediscover them
- stop conditions
- editing:
inlineorworkerper<editing>
- goals: specific and verifiable. write a target the request words as an aim ("try to", "ideally") as "reach
validation.md: 1-20 testable behavioural assertions that define completion and correctness, each a## VAL-01 <title>heading with a stable id- each is manual and side-effect-free: a headless
agent-browserflow, a curl call against a local endpoint, a read-only data check (local/prod) - never "tests or static code checks pass" - CI already covers that
- each assertion states surface, exact steps, pass criteria, and required evidence (screenshots mandatory for UI flows)
- each must be executable by a fresh agent with no context beyond the loop dir
- for any user-facing change, manual
agent-browservalidation is mandatory. to make testing easier consider adding atmpstory per the/storybookskill - when it applies, add quality assertions per quality, e.g. for LLM output, UI or copy
- each is manual and side-effect-free: a headless
- init
validation-state.jsonper<validation-state> - run
mkdir -p "playground/loops/<loop-name>"/{handoffs,evidence} - size the docs to the change: a small loop may be a few-line contract with sections marked "n/a" and 1 assertion; a 500 loc loop earns the full template
- check the contract against
request.md. if it settles a choice the request leaves open and a wrong guess would be expensive to undo (product behaviour, scope, data, a 1-way door), ask the user about only those choices, each with a recommended answer, and wait; otherwise continue without asking. add the answers torequest.mdand the contract - done when
<loop-check> docspasses
- complete the task against that contract per
<editing>, with every contract goal as the items; the report goes tohandoffs/r0-worker.md- done when you have verified the report,
<loop-check> editingpasses, every contract goal is implemented and every assertion is either marked passed from the worker's evidence (trivially cheap ones only) or left failed for the validator
- done when you have verified the report,
- open a PR with the
/prskill - pin round
<n>to the pushed commit: on a clean worktree rungit rev-parse --verify 'HEAD^{commit}' > playground/loops/<loop-name>/round-head, check<loop-check> round-startpasses, then leave the worktree untouched until step 7. run reviewers and the validator in parallel (reports go tohandoffs/r<n>-*):- independent review agents with clear chat history: default 1; up to 4 for high-risk changes
- read and follow /ai-code-review-catalog, choosing the first different entries under
<reviewers> - full review in rounds 1 and 2 and every multiple of 10, or after a contract/core-design or base change; diff-only review otherwise
- end every reviewer prompt with
<dispatch>forprompts/reviewer.md, adding its<slug>and the mode,fullordiff-only - read-only reviewers return their report as the final response. pass the handoff path to the claude launcher with
--output, or use a fresh attempt path outsidehandoffs/with codex--output-last-message; accept only a non-empty report from a confirmed successful current attempt, then copy the accepted codex attempt to the handoff path. persist native sub-agent final responses to the handoff path yourself. failed or partial output is diagnostic evidence, never a completed review
- read and follow /ai-code-review-catalog, choosing the first different entries under
- run 1 codex native review agent with the matching mode through
bin/codex-native-review; local reviewers still carry contract and skip coverage- record available verification in
evidence/r<n>-verification.md: exact commit, commands or CI links, scope and pass/fail/pending status. pending checks may stay pending while review runs - when the parent harness is sandboxed, launch the helper outside that parent sandbox with an escalated shell command; its reviewer remains read-only and uses the evidence rather than running tests/static checks
- full:
bin/codex-native-review origin/<base> \ playground/loops/<loop-name>/handoffs/r<n>-codex-native \ playground/loops/<loop-name>/evidence/r<n>-verification.md - diff-only:
bin/codex-native-review "$(cat playground/loops/<loop-name>/last-reviewed-head)" \ playground/loops/<loop-name>/handoffs/r<n>-codex-native \ playground/loops/<loop-name>/evidence/r<n>-verification.md - retain the helper's report path for triage and its log for launcher/provider failures
- if the launcher fails twice on quota, auth or infra, write the reason and log path to
handoffs/r<n>-codex-native/waiver.mdand continue; the other reviewers still run
- record available verification in
- run 1 sub-agent as validator through
<dispatch>forprompts/validator.md, with<quality-budget>per quality whenvalidation.mdhas quality assertions
- independent review agents with clear chat history: default 1; up to 4 for high-risk changes
- collect every step 4 report before triage
- until every reviewer and validator has finished, only wait and persist each report as it lands. wait in blocking calls, never in short polls:
- codex:
wait_agentwithtimeout_ms: 3600000for sub-agents; after a timeout, call it again without commentary. wait for a shell launcher such asbin/codex-native-reviewon its own shell session, with the longest wait that tool allows - claude main session: in 1 message, start
bin/codex-native-reviewas a background shell command and spawn the round's reviewers and validator withoutrun_in_background, so they all report back together - claude sub-agent, such as a fallback PR owner or dependency worker: ending a turn ends your run.
Agentspawns block until the child finishes, so spawn a round's reviewers and validator in 1 message to run them in parallel. aSendMessageresume and a background shell command, such asbin/codex-native-review, return at once, and their results reach you only with your next tool result. wait for those in foreground shell calls of at most 270s, which also keep your 5-minute prompt cache warm, until every result has landed. a call can return early on a file the job writes, e.g.sh -c 'i=0; until [ -s <report> ] || [ $i -ge 18 ]; do sleep 15; i=$((i+1)); done'
- codex:
- once
<loop-check> reportspasses, runcp playground/loops/<loop-name>/{round-head,last-reviewed-head}
- until every reviewer and validator has finished, only wait and persist each report as it lands. wait in blocking calls, never in short polls:
- run
bin/ai-review-status --wait <pr-number>, thengh pr checks <pr-number> --watch > /dev/null; gh pr checks <pr-number>so the check table prints once- proceed to triage when
bin/ai-review-statusexits 0 and the checks have finished; check failures go to triage - if you see signs of AI review quota exhaustion, auth, config, or infra failure, save it under
evidence/, skip only the github AI review gate and proceed to triage, retain all existing review feedback - use the
/triaging-feedbackskill to triage from 2 sources: thehandoffs/files and unresolved PR comments (runbin/unresolved-pr-comments <pr-number>). filter findings through the contract to prevent looping, disobeying the user and out-of-scope work: skip comments that go beyond thecontract.mdscope. factor in the price of a new loop round; sometimes good enough beats perfect - deduplicate skips by proposed change, append new sources to existing entries, and remove entries made obsolete by design changes
- use the command from the
/fix-ci-failuresskill to fetch CI failures - update
validation-state.jsonfrom the validator report - apply useful
validation_updatesfrom the validator report tovalidation.md - record skipped comments in
skipped-review-comments.md - write
handoffs/r<n>-triage.mdper<triage-report> - done when every handoff finding, validator failure, PR comment and CI failure is in
r<n>-triage.mdas queued, skipped or a waiver, and<loop-check> triagepasses
- proceed to triage when
- per
<editing>, address feedback that passed triaging, failed validations and CI failures, with## queuedfromhandoffs/r<n>-triage.mdas the items; the report goes tohandoffs/r<n>-worker.md. verify the report, then push- turn
## queuedinhandoffs/r<n>-triage.mdinto## fixed <sha>, 1 heading per commit;not reproduceditems move to## skipped, and a round left with no fix replaces## queuedwithno findings queued - mark addressed github comments as resolved:
bin/resolve-pr-comments --confirm <pr-number> - done when every queued item from step 6 is addressed and, after the push,
<loop-check> fixedand<loop-check> editingpass; then go to step 4 (next round) - if step 6 hasn't identified anything to address, go to step 8
- turn
- finish the loop:
- mark all github comments as resolved
- spawn
<helpers>to collect evidence that's missing or stale, especially screenshots or videos of the final state - once they've finished, rewrite the PR title and description per
/prwhere the loop changed what they describe, including material changes vs the request - add the loop's evidence per
/pr: passed manual checks plus screenshots or videos fromevidence/ - do these only here, once; rounds leave the description as it is
- write the final report per
<updates>, with evidence fromvalidation-state.jsonandhandoffs/and decisions from every## decisions. the loop is finished once<loop-check> allpasses
- if merge conflicts appear, resolve them per
<editing> <base>is the PR's base branch: the parent branch for a stacked PR, elsedevelop; before the PR exists, the branch it will target<dispatch>for a prompt file is a sub-agent prompt that says to read<checkout>/.agents/skills/loop/<file>in full before anything else and follow it, then gives each value the file names (<loop-name>,<n>,<base>, ...) already resolved.<checkout>isgit rev-parse --show-toplevel<loop-check>isnode .agents/skills/loop/scripts/loop-check.mts <loop-name> <check> --base origin/<base> --round <n>, where<check>is the name after<loop-check>(e.g.docs,all) and<n>is 0 in steps 1-2 and the current round from step 4 on; each failure names what to fix- if a
<loop-check>failure is wrong for a state you have verified is legitimate, it is a script bug:- quote the exact failure line under
## waiversin the round's triage with why the state is legitimate, and continue. that check then counts as passed, including inall - right away, send a worker to fix the script or this skill and open its PR. it works on a new branch from
origin/developin its own worktree, as<helpers>sets one up, and leaves this loop's checkout alone - send script bugs you find later to that worker while it runs; spawn a fresh one once it has finished
- when it finishes, tell the user its PR link without waiting for the loop to end, and list the waiver with that link in the final report
- quote the exact failure line under
- stacked PR:
- before steps 3, 4 and 8 and every
<loop-check> editing, check whether the parent PR has merged. if so, this PR must targetdevelopwith only its own changes - the repo squash-merges and deletes merged branches, so the parent's commits stay in the child until you drop them (
pull/<parent-number>/headkeeps the parent's final head) - github may already have rebased or retargeted the child, so start from the freshly fetched PR branch and force-push only with a lease from that fetch
- once a round was reviewed, compare those changes with the last reviewed ones (e.g.
git range-diff). equivalent goes to step 8 once CI passes on the new head, where<loop-check> donereplacesallbecause the rebase rewrote the reviewed SHAs. a real difference, such as a conflict resolution, runs another round - a rebase during step 2 rewrites the reported commits, so append a block to
r0-worker.mdwithagent: orchestrator,base: <new base>and the rebased commits - a rebase during step 7 ends the round, so skip
<loop-check> fixedand go to step 4
- before steps 3, 4 and 8 and every
- CI failures evidenced as unrelated to the PR are waivers: record them, continue the loop, and exclude them from the 3-round stop condition
- if 3 rounds expose symptoms of the same in-scope problem, don't stop yet: per
<decisions>, name the assumption the failed fixes share, check it, then run 1 recovery round with a materially different in-scope approach and a fresh worker, recorded under## decisions. if the problem survives that round, stop and report the exact blocker with 1 recommended way forward and the closest real alternative - if a fix would expand the contract, look for one inside it first; if there is none, ask per
<decisions> - if the user supplied a max round count (i.e. '/loop --max-rounds 8', '/loop r8'), add it to
contract.mdstop conditions as a cap, not a target. if you've reached it, only execute the next round (in this example, it will be round 9) until step 6 and report the status (feedback that passed triaging, failed validations, CI failures, etc.) so that the user can decide what to address and how to resume - if the user invoked this skill when the work is already completed or mentioned something like '/loop on this code', skip step 2
- if a github ai code review provider has timed out or failed for this PR, remember the waiver and don't wait for that provider again in later rounds unless it recovers
- if the PR is already opened, skip step 3
- don't add PR comments
- talk to the user only per
<updates>
</what-to-do><loop-dir>everything lives in playground/loops/<loop-name>/:
request.md- the user's original request, read-only after step 1; the baseline for the final report, so later user answers go to## decisions, not herecontract.md- the contract (step 1)validation.md- manual validation assertions with stable ids (step 1)validation-state.json- assertion state, rules in<validation-state>round-head- exact commit under review in the current roundlast-reviewed-head- exact commit reviewed in the previous roundskipped-review-comments.md- only deduplicated skipped findings:## <plain title>comment: proposed change and whyreason: reasonsource: handoff or PR comment link(s)
handoffs/- 1 report per spawned agent per round:r<n>-worker.mdfor the code changes (r0for step 2) plusr<n>-worker-progress.mdfor a long batch,r<n>-<slug>.mdfor reviewers,r<n>-validator.jsonfor the validator,r<n>-codex-native/review-*/review.md(orwaiver.md) for codex native review, andr<n>-triage.mdfor your dispositions per<triage-report>;r0-triage.mdholds decisions, user answers and waivers from steps 1-2evidence/- screenshots, response dumps, output snippets referenced from reportshelpers/- full results from<helpers>, 1 file or folder per helper
update verified environment facts, validation details and evidence at any time; only the user may change goals, non-goals, accepted tradeoffs or hard boundaries
playground/ is gitignored
</loop-dir><triage-report>handoffs/r<n>-triage.mdrecords your disposition of every finding in the round: handoff findings, validator failures, PR comments and CI failures; reasons for skips stay inskipped-review-comments.md- step 6 writes it with queued items under
## queued; step 7 turns that into 1## fixed <sha>heading per commit - a round with nothing to queue still gets the file, stating
no findings queued ## decisionsrecords each material decision per<decisions>, and each user answer, with who decided
sample:
# r2 - <round sha> - orchestrator: claude|codex
## fixed <sha>
- r2-thermo stale cache key after the rename
- r2-validator VAL-03 empty name accepted
- PR comment <id> missing nil guard
## skipped
- r2-thermo, r2-ponytail extract a shared helper
## waivers
- CI chromium timeout in storybook, unrelated - evidence/ci-r2.txt
## decisions
- r2-thermo cache invalidation: keyed the cache by record version instead of adding an expiry job; options: version key, expiry job; why: removes the stale-read class with no new moving part; if wrong: 1 cache miss per write - orchestrator</triage-report><validation-state>validation-state.json is a flat map:
{
"VAL-01": {
"status": "passed|failed",
"commit": "<latest SHA this evidence remains valid through, or null>",
"evidence": "<1 sentence with optional evidence/ path>"
}
}- you (the orchestrator) are its only writer; the validator only reports
- init with every id failed
- map validator
passat unchanged committedHEADto passed with thatcommit; mapfailorblockedto failed - before each validator run and completion, a passed id stays passed unless the diff since its
committouches the code its steps exercise or its assertion invalidation.mdwas materially edited; re-fail on a real touch, not a possible one, otherwise advancecommittoHEAD - test, comment, formatting and other similar changes never invalidate a passed id
</validation-state><decisions>decide choices inside the contract yourself and continue; don't ask the user about them. when choosing, apply in order:
- the contract and
request.md: satisfy every goal and behaviour to preserve. never meet a goal by weakening its validation or relaxing its acceptance criteria - evidence over opinion: prefer the option a test, repro or measurement supports. when 2 options stay close, run the cheapest reversible experiment that separates them
- repeated failure is evidence against the approach: name the assumption the failed attempts share and check it before you try another variant
- structural guarantees over heuristics: a permission, constraint, allowlist or deny-by-default removes a class of bugs that patching a matcher won't
- the user's tendencies, as tie-breakers only: delete or narrow rather than patch; fewer moving parts long term beats the smallest diff; out-of-scope work goes to its own PR, except deleting dead code the change touches; accept a low-severity tradeoff rather than add code to close it
record each material decision in the round's triage under ## decisions: options, choice, why and the cost if wrong. a decision can't waive a failed assertion or a contract goal
ask the user only when the next step would:
- change goals, non-goals, behaviour to preserve, accepted tradeoffs or hard boundaries
- need authority the user hasn't granted, or be a 1-way door (data loss, irreversible external effects)
- choose between materially different product outcomes that nothing above settles
ask with 1 recommended answer and the closest real alternative, record the answer under ## decisions, then continue
</decisions><editing>the contract's editing decides who makes code changes:
inline: only for a tiny loop, under 10 changed lines of prod code across the whole loop, as<loop-check> editingcounts them (tests, stories, docs and tooling don't count), where every change is mechanical. recordgit rev-parse HEADas<worker-base>, make the edits perprompts/worker.mdand write its report underagent: inlineandbase: <worker-base>linesworker: everything else, including tiny changes that are hard to get right, e.g. auth, concurrency, money, tenant isolation or a design call. a worker makes the edits per<worker-task>, never you: a fresh worker edits more cheaply than you can with your long context- switch from
inlinetoworkeronce the loop outgrows that bound, and stay there
</editing><worker-task>use a same-harness worker with a fresh context, never a fork of yours. for each batch of items, resume the previous worker through your harness's follow-up to that agent while it is healthy: it already holds the code and the decisions behind it. spawn a fresh one instead when there is no previous worker, or it:
- failed, stopped or can't be reached
- returned
blockedlast time - has had an item come back unfixed twice; a fresh worker gets fresh eyes and is told how many attempts came before
- has compacted, or, where your harness shows its usage, has spent 50+% of its context window. never ask a sub-agent to judge its own headroom
a fresh worker also gets every earlier handoffs/r*-worker*.md and git log origin/<base>..HEAD; the loop dir and commits, not chat history, are the memory that survives a swap. either way, record git rev-parse HEAD as <worker-base> before dispatch and state it in the request. while it runs it is the only writer in the checkout, so wait for its report before you touch the worktree
send a fresh worker <dispatch> for prompts/worker.md; a resumed one already holds that file, so it gets only the new values. both get their items, any decision you made that the loop dir doesn't record, and the files and facts you already verified, so they skip re-reading them. persist its report to the handoff path under agent: <id> and base: <worker-base> lines; a later dispatch in the same round appends its own block
verify the report before you continue: git status is clean, git log <worker-base>..HEAD matches the reported commits, git diff <worker-base> covers each done item and stays inside contract.md, and the cheapest reported check passes when you rerun it. send a blocked or unverified item back to a worker; a contract gap is a fix that expands the contract
</worker-task><helpers>read and follow /helper-sub-agents. spawn helpers whenever they save your context or time: internet research, codebase investigation or diagnosis, read-only data checks, screenshots or videos, before/after comparisons, etc.
- output dir:
helpers/; evidence meant for the PR or validation goes toevidence/ - the worker, or you in an
inlineloop, stays the only code writer - run at most 3 at once
- triage, contract changes and
validation-state.jsonstay with you
</helpers><result>the result of your work must be a ready-to-merge, prod-ready PR with:
- no accepted review findings left unaddressed
- green CI except evidenced unrelated failures recorded as waivers
- every id in
validation-state.jsonpassed at the final commit
</result>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.

