Agentic App Loop
Build an app through seven bounded phases — plan, test, implement, review, verify, remember, improve — each its own subagent.
- Status:
- Active
- Stack
- 5
- Architecture notes
- 6
Overview
A Claude Code skill that builds and extends real applications through a fixed seven-phase loop — PLAN, TEST, IMPLEMENT, REVIEW, VERIFY, REMEMBER, IMPROVE — where each phase runs as its own bounded subagent with a written contract. The orchestrator never writes feature code itself: it runs the phases, enforces a gate after each one, and handles loop-backs when review finds a blocking bug or verification fails. Phases never talk directly; they pass state through a single BUILD_STATE.md file in the target repo, which is also what keeps the orchestrator's own context small. It is the difference between 'just build it' and a run that cannot skip its own tests.
Architecture Breakdown
How it works
Core mechanics, failure recovery paths, and system design decisions.
- 01
Orchestrator that writes no code
The main build-app skill runs the loop and nothing else — it starts each phase's subagent, checks the gate, and decides the next move. Delegating every verbose step keeps its context small enough to see the whole run.
- 02
One file between phases
Every phase reads and writes a single BUILD_STATE.md at the repo root: the plan, the numbered acceptance criteria, review findings, verify evidence. No phase calls another, so any one can be re-run in isolation.
- 03
A gate after every phase
PLAN needs tasks, criteria and a test strategy; TEST's tests must fail only because the code is absent, not because of a typo; REVIEW must reach zero unresolved blocking findings; VERIFY must show every criterion met with evidence before the loop moves on.
- 04
Loop-backs, capped
A blocking review finding sends the run back to IMPLEMENT; a failed VERIFY back to IMPLEMENT or PLAN; a wrong test back to TEST. After four iterations without a green VERIFY the loop stops and asks the operator rather than grinding.
- 05
Phases adapt to the job
Greenfield app, new feature, bug fix, refactor and spike keep the same shape: a bug fix makes TEST write a failing regression test first, a refactor makes it add characterization tests, a spike explicitly waives everything but PLAN, IMPLEMENT and REMEMBER.
- 06
Installed as skill plus agents
An npx installer copies the skill, the seven subagents and the /build-app command into a project's .claude or the global one. The plan and review phases default to a stronger model, the rest inherit; the iteration cap and loop-back rules live in one file.
Key Takeaways
Engineering Highlights
- Each concern — tests, review, verification — is a hard checkpoint with its own agent, not an optional step
- The orchestrator never edits feature code, so its context stays small enough to run the whole loop
- Phases communicate only through BUILD_STATE.md, so any phase can be re-run alone
- Tests that fail for the wrong reason bounce back to TEST instead of being counted as red
- A test that would be edited to force a pass sends the run back rather than going green
- Four iterations without a clean verify stops the loop and hands back to the operator
Stack & Tools
- Claude Code skills
- Node.js
- Markdown
- npx installer
- GitHub Actions