A Solo Developer's Loop Engineering System That Learns From Its Own Mistakes
Solo developers and small teams get a production-tested alternative to vibe coding that catches confirmation bias, review fatigue, and institutional amnesia through systematic constraints rather than discipline. The memory loop means the system's review accuracy improves with use — a compound effect that prompt-by-prompt workflows cannot replicate.
Loop Engineering replaces ad-hoc AI prompting with a structured seven-agent pipeline: clarify, architect, third-party review, dev, review, qa, and retro. Each agent runs in an isolated context with model assignments matched to cognitive demands — Opus for high-judgment review, Sonnet for fast execution. The review agent predicts likely defect areas before reading code, using a memory bank of hard-won, codebase-specific incident patterns that grows with every completed feature. A state-machine orchestrator enforces hard gates: critical issues block the loop, minor issues must be fixed if low-risk, and the pipeline terminates after five rounds to prevent token burn.
The system's real differentiator is an evolution loop. After each feature, the retro agent stores only non-Googleable, codebase-specific, hard-won lessons into a capped memory of 5–8 files. The next feature's review retrieves these patterns as starting points for pre-commit predictions, creating a measurable calibration loop where missed defect types expose cognitive blind spots. Over six months, prediction hit rates rose from roughly 50% to over 70% without any model upgrade.
Known bottlenecks include context-window pressure from accumulating review documents, shared blind spots between review and qa running on the same model family, and the pipeline's excessive weight for trivial tasks. The system also assumes a well-maintained CLAUDE.md; garbage project context produces garbage output across all agents. The repository installs with a single script into ~/.claude and runs via four slash commands in any project.
Review fatigue is not laziness but cognitive economics: when 95% of AI output is correct, the brain automatically reduces scrutiny, and the 5% of errors don't self-label.
Running review and qa in isolated subagents prevents the dev agent's thought process from contaminating the reviewer's judgment — a subtle but critical design choice.
The "low-risk fix" rule trades frictionless execution for zero technical debt accumulation, closing the loophole where minor suggestions get perpetually deferred.
Memory quality matters more than quantity for evolution: storing 100 generic platitudes degrades retrieval signal, while 7 precise, codebase-specific patterns raised prediction hit rates from ~50% to ~70%.
The pre-commit prediction mechanism creates a measurable calibration loop — missed defect types become explicit cognitive blind spots that drive the next round of system improvement.
Loop Engineering's compound advantage is that process rules themselves evolve: each agent's current constraints are the accumulated design judgment from dozens of prior loop iterations.
The system's honest defect list — context-window pressure, model-family collusion, heavy process for small tasks — shows the gap between a working pipeline and a polished product.