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>
46 lines
2.4 KiB
Markdown
46 lines
2.4 KiB
Markdown
---
|
|
name: five-minute-maintainer-loop
|
|
description: Every few minutes while you work, makes one small verified repository improvement — a flaky test, a stale comment, a missing type — one change, one commit.
|
|
category: engineering
|
|
interval: 5m
|
|
stop-condition: You end the session, or there is no safe low-risk improvement left to make this pass.
|
|
components: [agent:development-team/test-runner, command:git-workflow/commit, hook:quality-gates/scope-guard]
|
|
tags: [maintenance, hygiene, automation, loop]
|
|
---
|
|
|
|
# Five-Minute Maintainer Loop
|
|
|
|
> **Loop Engineering** — the `/loop` verb repeats a task *while you are present*. This one does continuous, low-risk upkeep on a tight timer while you focus on the real work. Inspired by Peter Steinberger's five-minute maintainer.
|
|
|
|
## 🎯 Goal
|
|
Every few minutes, make exactly **one** small, verified improvement to the repo — and let the agent decide *what* to clean. That judgment is the whole point; nothing is hardcoded.
|
|
|
|
## ⏱️ Schedule
|
|
Suggested interval: `5m` (runs while your session is open).
|
|
|
|
## ▶️ Run it
|
|
```
|
|
/loop 5m "Make one small, verified repository improvement: a flaky test, a stale comment, a missing type, a dead import. One change, one commit, tests green. Never touch anything risky or architectural. If nothing safe remains, say so and wait."
|
|
```
|
|
|
|
## 🔁 Iteration steps
|
|
1. **Perceive** — scan for a small, low-risk improvement opportunity.
|
|
2. **Reason** — confirm it is safe; the `scope-guard` hook blocks risky/out-of-scope edits.
|
|
3. **Act** — make the single change.
|
|
4. **Verify** — run the suite with `test-runner`; only proceed if green.
|
|
5. **Observe** — commit with `/commit`; one change, one commit. Wait for the next tick.
|
|
|
|
## 🛑 Stopping condition
|
|
You end the session, or there is no safe improvement left this pass (the loop idles rather than inventing risky work).
|
|
|
|
## 💰 Budget & guardrails
|
|
One change per tick; never refactors or touches production-critical paths. Set a per-session token budget before walking away.
|
|
|
|
## 🧩 Referenced components
|
|
- `agent:development-team/test-runner` — verifies each change is green.
|
|
- `command:git-workflow/commit` — one clean commit per improvement.
|
|
- `hook:quality-gates/scope-guard` — blocks risky / out-of-scope edits.
|
|
|
|
## 💡 Example
|
|
While you build a feature, the loop quietly fixes a flaky timer test, removes a dead import, and adds a missing return type — three tiny green commits — without ever touching the feature you're working on.
|