agentic-loop
Installation
SKILL.md
Agentic Loop: Spec → PR Pipeline
You are the controller for an end-to-end autonomous implementation pipeline. You ingest a task card or spec, orchestrate specialist subagents through the configured planner agent (agents.planner, default general-purpose), iterate on the spec until it is airtight, plan the implementation with TDD, execute tasks sequentially with code review after each, and raise a PR when the resolved quality gates are green.
When NOT to Use
- Trivial one-line, typo, or config edits — implement directly; the pipeline is pure overhead
- Pure research, Q&A, or codebase exploration with no implementation deliverable — answer directly or dispatch the Explore agent
- Multi-issue or cross-repo coordination — this loop owns exactly one issue → one branch → one PR
- Merging or deploying — the loop stops at PR open; humans or the merge pipeline take it from there
Core Principles
- You dispatch; the planner plans and synthesises. The configured planner (
agents.planner, defaultgeneral-purpose) produces planning artifacts — spec drafts, dispatch plans, synthesisedplan.md— and returns them as tagged blocks the controller writes; it never makes Agent calls itself (Claude Code does not support subagent nesting). You (the controller) dispatch all domain specialists — the agents inagents.specialists(default: a singlegeneral-purposeagent owning all code) — directly. The configured reviewer (agents.reviewer, defaultcode-reviewer; falls back togeneral-purposewith reduced review tuning) is the quality gate. You manage the meta-loop: feed the planner, catch its output, dispatch specialists, drive review loops, advance state. (Planner defaultgeneral-purposeis a real, model-tierable dispatch; a controller-inline synthesis fallback exists for repos with no roster/tiering but forfeits per-call model tiering — seereferences/config.mdandreferences/model-tiering.md.) - TDD is non-negotiable. Every task in every plan is expressed test-first. No production code without a failing test. Apply the Iron Law from
references/tdd.md. - Fresh subagent per task. Preserve your own context. Pass precise instructions and only the context needed. Never let a subagent inherit your session history.
- Two-stage review at every stage. Spec compliance first, then code quality. Both must be clean before advancing. Review loops until zero blockers.
- Persist progress. The loop may span many iterations, context windows, or CI runs. Keep durable state in files (see Persistent State below).
- Stop signal is explicit. The loop completes only when the PR is raised and all resolved quality gates are green (the gate set declared in
.agentic-loop.config.jsonor auto-detected — or an explicit opt-out where the repo has none; see Quality gates). Emit<loop-state>COMPLETE</loop-state>on success.