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: human-approval-loop
|
|
description: Runs the task, then pauses and sends you approve / revise / skip before anything ships — human review as a first-class queue where the stop condition is your approval.
|
|
category: evaluation
|
|
interval: on-demand
|
|
stop-condition: You approve the result (it ships) or skip/redirect it — nothing ships without explicit human approval.
|
|
components: [hook:quality-gates/plan-gate, hook:automation/telegram-notifications, command:git-workflow/create-pr]
|
|
tags: [human-in-the-loop, approval, safety, loop]
|
|
---
|
|
|
|
# Human-in-the-Loop Approval Loop
|
|
|
|
> **Loop Engineering** — same loop shape as the autonomous ones, but the stop condition is *your approval* instead of a passing test. The agent does the work, then waits at a gate: approve, revise, or skip.
|
|
|
|
## 🎯 Goal
|
|
Run the task, then **pause** and route the result to you for a decision before anything ships — treating human review as its own queue with clear actions.
|
|
|
|
## ⏱️ Schedule
|
|
Trigger: `on-demand` (each item pauses for your call before shipping).
|
|
|
|
## ▶️ Run it
|
|
```
|
|
/loop run the next task, then pause and send me approve / revise / skip before anything ships. On approve, continue and ship. On revise, take my note and redo. On skip, move to the next item. Never ship without my approval.
|
|
```
|
|
|
|
## 🔁 Iteration steps
|
|
1. **Act** — complete the task up to the point of shipping.
|
|
2. **Gate** — the `plan-gate` hook halts before any irreversible/ship step.
|
|
3. **Ask** — send approve / revise / skip via `telegram-notifications`.
|
|
4. **Branch** — approve → ship (e.g. `/create-pr`); revise → apply note and redo; skip → next item.
|
|
5. **Observe** — record the decision; nothing ships unattended.
|
|
|
|
## 🛑 Stopping condition
|
|
You approve (ship) or skip/redirect — the loop never ships without an explicit human decision.
|
|
|
|
## 💰 Budget & guardrails
|
|
The gate is the safety: irreversible actions wait for a human. Add a reminder/deadline so pending items don't pile up silently, and a budget for the work done before each gate.
|
|
|
|
## 🧩 Referenced components
|
|
- `hook:quality-gates/plan-gate` — halts before irreversible/ship steps.
|
|
- `hook:automation/telegram-notifications` — sends the approve/revise/skip prompt.
|
|
- `command:git-workflow/create-pr` — the ship action on approval.
|
|
|
|
## 💡 Example
|
|
The agent drafts a refund-policy change, pauses, and pings you on Telegram. You hit "revise" with a note; it redoes the draft and pings again — and only ships after you approve.
|