design-loop
Design a measurable Agent Looper cycle — frozen GOAL.md, verify.sh finish line, unknowns preflight, and scope limits. Use when creating or tightening a loop before running Agent Looper, or when a finished loop was still wrong and verify needs revision from export packs.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- design-loop
- tags
- [ "agentic_ai", "agents", "documentation", "loops" ]
- description
- Design a measurable Agent Looper cycle — frozen GOAL.md, verify.sh finish line, unknowns preflight, and scope limits. Use when creating or tightening a loop before running Agent Looper, or when a finished loop was still wrong and verify needs revision from export packs.
03 SKILL.md 正文
Design a loop
Agent Looper owns the grind; the human (or this chat) owns the finish line.
Before freezing
- Prefer an unknowns preflight when verify/deps are unfamiliar.
- Design in chat → freeze. Do not edit
GOAL.mdmid-run. Humans can also type an idea intopnpm exec agent-loop-prompt --out .cursor/loops/<name>(judge drafts GOAL/verify). - Optional permissions matrix: tools/MCP/path writes default-deny until named.
Bundle layout
.cursor/loops/<name>/
GOAL.md # frozen spec
RESEARCH.md # optional — frozen brownfield map (indexed, not inlined)
loop.json # verify (+ per-loop overrides). Repo `defaults` in `.cursor/agent-loop.repo.json` supply runtime/models unless this file sets them.
verify.sh # exit 0 = done
VERIFY.skill.md # optional; required when verifyMode is skill
GOAL.md must have
- Four-part finish line: outcome, scoreboard (
verify.sh), permission (maxIterations/ stagnation), budget (stop when further work is not worth it — not "until perfect") - Wiring (name before freeze): EDGE DATA, REDUCER (
verify.sh), FAILURE POLICY, HUMAN GATE — seetemplates/GOAL.template.md - One clear Goal paragraph with canonical paths
- Acceptance criteria tied to the verifier (not agent self-assessment)
- Constraints + Out of scope
- Optional Golden path (screenshot, fixture, baseline) when verify needs a concrete example to hold against
- Optional brownfield Research map (
RESEARCH.example.md) when the change lives in an unfamiliar area — freeze beside GOAL; worker indexes the path - Metric loops: revert if measured worse than baseline (
GOAL.metric.template.md) - Taste / visual loops: decide with the section below (
GOAL.visual.template.md) - HITL via
hitlProviderwhen humans must close residual work (docs/hitl-providers.md) - Taskwarrior UUID (never numeric ID alone) only when linking a TW goal task
verify.sh must be measurable
- Exit
0only when the finish line is met - Prefer repo-local scripts over vibes (
true, empty checks) - For AI-touched work, consider secret/dep smoke from the harness templates
loop.json essentials
verify: shell command (usuallybash .cursor/loops/<name>/verify.sh)- Repo defaults (
.cursor/agent-loop.repo.jsondefaults): runtime, models, review, notify. Set once withagent-loop-setup(humans). Thisloop.jsononly needsverifyplus overrides (taskwarriorUuid,reviewGate, a differentruntime). loop.json wins on conflict. - If no repo defaults yet:
runtime/modelfor the worker (runtime: dsh= PATHdsh --profile headless;runtime: claude= PATHclaude -p --safe-mode); optionalreviewRuntime/reviewModelfor the judge (reviewRuntime: opencodedefaults the judge to Go DeepSeek V4 Pro;reviewRuntime: dshdefaults to official V4 Pro;reviewRuntime: claudedefaults toopus— omitreviewModelunless BYOK) reviewGate: truewhen leftover taste or impact should reopen the worker after verify is green (not for smokes)- Optional
plugins: ["…"]for Agent Plugins skill packages (indexed in the prompt by default;"skillDisclosure": "inline"pastes full SKILL.md) - Default
verifyLogMode: "sidecar"(full logs underverify-logs/, tail preview in prompt). Use"inline"only for short verify. See README /docs/verification-as-skill.md.
Taste / visual loops (decide — not always-on)
Use this slice when a human will look at the result: homepage, landing, mockup, screenshot-as-hero, “fancy / pretty / sparkle,” brand UI. Skip for *-smoke, example-fix, harness probes, docs typos, and other keyword-low chores.
Before freeze, ask in their language (do not ask where files live):
- Who has to like this? (named audience)
- What would make them close the tab? (slow, wrong mood, missing/ugly art)
- Where must it run? (this machine, phone, no wifi)
Translate into restraints they will never type. Measurable ones go in verify.sh (no remote CSS/JS, real hero file, no full-page canvas 2D if the machine must stay usable). The rest go in VERIFY.skill.md. Fill GOAL.visual.template.md.
Golden is a critic, not only img src. If you cannot see the attached image, do not invent a palette — ask, or freeze file facts (B&W vs color, crop chrome) instead of “just go whimsical.”
Judge: do not copy postQualityReview: false / reviewGate: false from *-smoke or example-fix. Omit those keys (harness default postQualityReview: "auto"). Set reviewGate: true on this slice so leftover look can reopen the worker. Freeze the golden mood in GOAL — the harness judge is text/diff, not pixels. Load review-gate only if you need a REVIEWS.md overlay; this section is enough to turn the referee on.
After a run (error discovery)
When a finished loop is still wrong, or you are about to add a verify.sh / REVIEWS.md check from a theory, label ~10 .cursor/loop-exports/ packs first (mix done / continue / waiting). Freeze during a run stays; criteria may drift between freezes. Skip for smokes. Procedure and annotation rules: unknowns preflight — after a run.
Out of scope for this skill
- Running the harness (see
install-agent-looper) - Writing a full
REVIEWS.mdoverlay (seereview-gate) — still apply the judge keys above on visual loops
04 同仓库更多 Skills
hello-verify
Tiny example skill discovered via Agent Plugins skills/ layout.
run-loop-in-opencode
Install Agent Looper and start a frozen loop from OpenCode with the agent_loop_start tool. Use when the user asks to add the harness, grind, run, or implement a loop from an OpenCode session. Do not foreground-bash the grind.
run-loop-in-dsh
After a loop is frozen, start agent-loop as DSH background bash. Use when the user asks to grind from dsh web. Do not foreground-bash the grind.
review-gate
Configure Agent Looper reviewGate / REVIEWS.md. Use only when writing the judge spec.
install-agent-looper
Install the Agent Looper CLI in the current repo. Use only when `agent-loop --help` is missing. Do not dump Doppler or OpenCode secrets.
design-loop
Freeze GOAL.md + verify.sh + loop.json only. Do not implement, SSH-walk production, or dump secrets. Use when the user wants an Agent Looper for a task, or when a finished loop was still wrong and verify needs revision from export packs (still freeze-only).