mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
7f890b1b3b
* feat: add Loops component type with referenced components Introduce "loops" as a new first-class component type — autonomous agentic workflows (goal + interval + stop condition) inspired by Loop Engineering and the Forward Future Loop Library. A loop references other components (agents, skills, hooks, commands) and the dashboard renders those references as clickable cards on the loop detail page. - Add 10 starter loops under cli-tool/components/loops/ (engineering, evaluation, operations) - Catalog generator: scan loops + write per-component content files - Dashboard: new type in icons/types/data, /loops page, and a "Referenced Components" section on the loop detail page - CLI: --loop flag installs the loop to .claude/loops/ and auto-installs its referenced components - Docs: CLAUDE.md and cli-tool rule updated Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9ynMiCHt8JwdMd8KjCkES * feat: add 8 more loops (goal/loop/schedule patterns) Expand the loops catalog to 18, drawing ideas from community "Loop Engineering" patterns. Adds loops across the three trigger verbs (/goal, /loop, /schedule) and emphasizes the verifier-in-the-loop and budget / anti-spin guardrails: - engineering/five-minute-maintainer-loop - engineering/build-test-fix-loop - engineering/anti-spin-build-loop - engineering/completion-contract-loop (goal) - engineering/goal-refiner-loop (goal) - engineering/adversarial-review-loop (cross-model) - operations/overnight-pr-routine-loop (schedule) - evaluation/human-approval-loop (human-in-the-loop) All referenced components verified to exist; catalog regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T9ynMiCHt8JwdMd8KjCkES --------- Co-authored-by: Claude <noreply@anthropic.com>
1 line
2.4 KiB
JSON
1 line
2.4 KiB
JSON
{"content": "---\nname: build-test-fix-loop\ndescription: Builds the next item on the plan, then runs tests, typecheck and lint, feeding every failure back as the next instruction until the build is green.\ncategory: engineering\ninterval: 10m\nstop-condition: The build is green — tests, typecheck and lint all pass — and the checker reports nothing left to fix.\ncomponents: [agent:development-team/test-runner, hook:testing/test-runner, command:testing/generate-tests]\ntags: [testing, build, ci, loop]\n---\n\n# Build–Test–Fix Loop\n\n> **Loop Engineering** — the single most-demoed loop pattern: a builder writes code and a checker runs tests, typecheck and lint and reports exactly what broke. They pass work back and forth until it's clean. A one-shot agent ships its bugs; this loop catches them.\n\n## 🎯 Goal\nImplement the next item on the plan, then run the full check gate (tests + typecheck + lint), feed **every** failure back as the next instruction, and repeat until the build is green.\n\n## ⏱️ Schedule\nSuggested interval: `10m` (or run until done on a feature).\n\n## ▶️ Run it\n```\n/loop 10m \"Build the next item on the plan, then run tests, typecheck and lint. Feed every failure back as the next instruction and fix it. Add a test for anything that lacked coverage. Stop when the build is green and the checker has nothing left to report.\"\n```\n\n## 🔁 Iteration steps\n1. **Build** — implement the next plan item.\n2. **Check** — the `test-runner` hook runs tests, typecheck and lint automatically.\n3. **Reason** — collect every failure into a concrete fix list.\n4. **Act** — fix each; add tests with `/generate-tests` for uncovered paths.\n5. **Observe** — re-run the gate; loop until fully green.\n\n## 🛑 Stopping condition\nTests, typecheck and lint all pass and the checker reports nothing outstanding.\n\n## 💰 Budget & guardrails\nCap iterations or spend so a stubborn failure can't spin forever — surface anything that fails the same way twice for human eyes.\n\n## 🧩 Referenced components\n- `agent:development-team/test-runner` — runs and interprets the check gate.\n- `hook:testing/test-runner` — fires the suite automatically each pass.\n- `command:testing/generate-tests` — covers gaps the loop uncovers.\n\n## 💡 Example\nImplementing a new endpoint, the loop catches a type error, then a failing integration test, then a lint warning — fixing each in turn — and exits only when all three gates are green.\n"} |