Loop Architect
The Problem
Section titled “The Problem”You want to run an autonomous agent loop — but /goal takes whatever condition you type, however vague. No coaching, no second opinion, no structure. The model grades its own homework. When the loop fails or burns tokens, you have nothing portable to inspect, version, or reuse.
The Solution
Section titled “The Solution”Loop Architect is a design coach that helps you scaffold a well-designed agent loop before any runner starts changing files. It interviews you, critiques your design against built-in rubrics, wires in a cross-model reviewer, and emits portable artifacts.
Based on Looper by Kevin Simback, MIT License. Adapted for Kiro CLI with native /goal, subagent, and review loop integration.
When to Use
Section titled “When to Use”- Design an agent loop with explicit verification before running it
- Set up a self-review or LLM-as-judge loop with a different model as reviewer
- Build a multi-model council for plan and delivery gates
- Scaffold a
/goal-driven process with typed verification and termination guards - Create portable loop specs that work across CLI tools
Installation
Section titled “Installation”npx skills add https://github.com/fabricioctelles/skills -s loop-architectHow It Works
Section titled “How It Works”+--------------------------------+| 1. Goal + context || read sources |+--------------------------------+ | v+--------------------------------+| 2. Draft plan.md || state -> state.json |+--------------------------------+ | v+--------------------------------+| 3. Plan gate || verdict: reviewer-1 |+--------------------------------+ | needs work -> revise <= 3 -> step 2 | pass v+--------------------------------+| 4. Write delivery-N.md || log -> run-log.md |+--------------------------------+ | v+--------------------------------+| 5. Delivery gate || verdict: reviewer-1 |+--------------------------------+ | needs work -> revise <= 3 -> step 4 | pass v+--------------------------------+| 6. Final output || all gates clean |+--------------------------------+
Stops: pass gates | max iterations | no progress x2 | budget capThe seven-stage interview
Section titled “The seven-stage interview”- Goal — coached toward outcome, scope, context, and done state
- Verification — typed as programmatic, judge, or human
- Host model — which CLI drives the loop
- Council — reviewer/judge from a different model family
- Gates & control — revision caps, no-progress detection, budget
- Confirmation — ASCII flow preview
- Emit/run — write artifacts and optionally execute
Three execution paths
Section titled “Three execution paths”| Path | When | How |
|---|---|---|
/goal |
Simple loop, no cross-model review | /goal --max 12 <definition_of_done> |
| Subagent pipeline | Cross-model review needed | Native Kiro review loops with NEEDS_CHANGES trigger |
| Python runner | External, scheduled, or CI | python3 ./loop-architect-output/run-loop.py |
Emitted Artifacts
Section titled “Emitted Artifacts”| File | Purpose |
|---|---|
loop.yaml |
Human-authored loop spec |
loop.resolved.json |
Compiled, validated — the runner reads this |
LOOP.md |
Human-readable summary + ASCII flow |
RUN_IN_SESSION.md |
Handoff prompt for in-session execution |
run-loop.py |
Portable Python runner |
loop-workspace/ |
Working directory with state and logs |
Model Detection
Section titled “Model Detection”Loop Architect detects installed CLIs and their capabilities:
python3 ~/.kiro/skills/loop-architect/scripts/looper.py detect-modelsKiro CLI is detected with full capabilities: headless, goal, subagent, review_loop.
vs /goal and Ralph Loop
Section titled “vs /goal and Ralph Loop”/goal |
Ralph Loop | Loop Architect | |
|---|---|---|---|
| Layer | execution | execution (spec tasks) | design (pre-flight) |
| Coaches goal | no | no | yes |
| Typed verification | no | self-correction | programmatic / judge / human |
| Cross-model review | no | no | yes, by default |
| Portable artifact | no | no | loop.yaml + resolved spec |