You ask your agent to build something. It builds it, says "done", and grades its own homework. goat-iterate splits the job across three roles, so the judge never wrote the code it scores:
- Lead (your main agent) keeps the bar, dispatches builders, owns best-so-far.
- Builders (worker subagents) produce the deliverable with per-line evidence.
- Critic (fresh subagent each round) judges from evidence, scores aspects 1-10, rejects like a professional reviewer.
How a loop runs
- Round 0 - the bar. Lead writes
spec.md(what "done" means, observable) andeye.md(how the real output is observed). Critic setup mode writesrubric.md(5-8 aspects, top-professional descriptors) andchecklist.md(15-30 pass/fail lines with numbers). - Round 1 - full build. Every checklist line built in one round, complete first version, parallel builders.
- Rounds 2..N - judge / keep / batch. Fresh critic each round: PASS/FAIL/UNSEEN per line with evidence, aspect scores vs best-so-far, at most 3 professional rejections. Lead keeps what passed, batches every FAIL + new line into the next build round.
- Stop. Bar met (>=90% PASS, every aspect >=8, no open rejection), plateau, or budget (4 judged rounds default). Every stop without the bar met writes
BAR NOT METat the top of the report. The word "done" appears only when the bar is met.
Install
Claude Code, as two separate prompts:
/plugin marketplace add 1Rizqi/goat-iterate
/plugin install goat-iterate@goat-iterate
After install, the hooks (delegate guard + rules injection) activate on restart. Other agents: run node scripts/emit.js session manually at session start, or wire their own hook to the same script.
Codex:
codex plugin marketplace add 1Rizqi/goat-iterate
codex plugin add goat-iterate@goat-iterate
Gemini CLI:
gemini extensions install https://github.com/1Rizqi/goat-iterate
Hermes Agent:
hermes plugins install 1Rizqi/goat-iterate
hermes plugins enable goat-iterate
Any other agent:
npx skills add 1Rizqi/goat-iterate
or copy skills/goat-iterate/ into the agent's skills directory.
Use
Tell your agent "use goat-iterate for this". The loop folder .iterate/<slug>/ holds the spec, rubric, checklist, per-round verdicts, evidence, and state.md (loop memory - a new chat resumes from it).
Commands
| Command | What it does |
|---|---|
/goat-iterate:iterate [resume <slug> | amend <slug>] | Run the loop on the task at hand. No argument starts a new loop; resume continues from the loop's state.md in a fresh chat; amend turns a follow-up request into new checklist lines in a finished loop and runs them as a small batch. |
/goat-iterate:on | Switch the rules and the delegate guard back on (clears the ~/.goat-off flag). |
/goat-iterate:off | Switch them off, for this session and new ones, until /goat-iterate:on. |
Commands need a host that maps plugin commands or skills to slash commands (Claude Code, Codex, Gemini CLI, Hermes Agent, OpenCode); everywhere else, tell your agent "use goat-iterate for this" - same loop, no slash; the scripts run anywhere Node runs.
Run the scripts
Run them from the repo root with Node:
node scripts/emit.js session # print the session rules (manual wiring)
node scripts/emit.js subagent # print the subagent rules (hook or brief)
node scripts/goat-off.js # rules and guard off (flag at ~/.goat-off)
node scripts/goat-on.js # switch them back on
What's in the box
plugin.json Agent Plugins v1.0.0 manifest
skills/goat-iterate/SKILL.md the skill: decision path, lead rules, delegation, rounds, stop conditions
skills/goat-iterate/references/eye.md eye table by deliverable type (evidence beats source)
skills/goat-iterate/references/rounds.md round-by-round detail incl. amend
skills/goat-iterate/references/spec-template.md
skills/goat-iterate/references/subagent.md builder/critic rules for dispatch briefs
rules/session.md / subagent.md the rules the emitter prints (lean lead, delegation, model ladder)
agents/builder.md / critic.md universal agent definitions: builder, critic
commands/iterate.md / on.md / off.md the slash commands: the loop, on, off
scripts/delegate.js the delegate guard: the lead edits at most 3 deliverable files per session
scripts/emit.js prints the rules: node scripts/emit.js session | subagent
scripts/goat-off.js / goat-on.js the off switch (flag file at ~/.goat-off) and back on
tests/delegate.test.js the guard's tests: node --test tests/delegate.test.js
assets/banner-dark.svg / banner-light.svg README banner, dark + light
assets/loop-dark.svg / loop-light.svg the loop diagram, dark + light
LICENSE MIT
License
MIT.