Files
Daniel Avila 7f890b1b3b feat: add Loops component type with referenced components (#643)
* 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>
2026-06-21 20:19:16 -04:00

43 lines
1.9 KiB
Markdown

---
name: quality-streak-loop
description: Runs realistic scenarios and fixes failures until the suite passes N times in a row with no regressions.
category: evaluation
interval: 20m
stop-condition: The scenario suite passes N consecutive times (e.g. 5) with zero failures.
components: [agent:performance-testing/test-automator, hook:testing/test-runner, command:testing/test-quality-analyzer]
tags: [evaluation, reliability, testing, loop]
---
# Quality Streak Loop
> **Loop Engineering** — don't trust a single green run. Require a *streak* of clean passes to prove stability before stopping.
## 🎯 Goal
Exercise the product with realistic scenarios, fix every failure, and keep going until the suite passes N consecutive times — catching flakiness and intermittent bugs.
## ⏱️ Schedule
Suggested interval: `20m`.
## ▶️ Run it
```
/loop 20m "Run the realistic scenario suite. Fix any failure you find, including flaky ones. Reset the streak counter on any failure. Continue until the suite passes 5 times in a row."
```
## 🔁 Iteration steps
1. **Perceive** — run the scenario suite via the `test-runner` hook.
2. **Reason** — analyze failures (real bug vs flake) with `/test-quality-analyzer`.
3. **Plan** — fix the failure and harden the test.
4. **Act** — implement the fix with `test-automator`; reset the streak on any failure.
5. **Observe** — repeat; only stop after N consecutive clean runs.
## 🛑 Stopping condition
N consecutive passes (default 5) with zero failures or flakes.
## 🧩 Referenced components
- `agent:performance-testing/test-automator` — fixes and hardens tests.
- `hook:testing/test-runner` — auto-runs the suite.
- `command:testing/test-quality-analyzer` — distinguishes real bugs from flakes.
## 💡 Example
The suite passes 4 times then a timing-dependent test flakes; the loop stabilizes it with a deterministic clock and restarts the streak until it hits 5 clean.