agent-loop
Agent Loop
Plan → Act → Observe → Verify → Stop
A stateful control cycle for autonomous engineering work. Read .agent/context/loops.md first (fallback: docs/agents/loops.md); if missing, use conservative defaults (iteration cap 5, no push/deploy/CI changes) and suggest /setup-agent-loops.
When exploring the codebase, read CONTEXT.md (if it exists) so changes use the project's domain vocabulary.
When you encounter a knowledge gap (unknown terminology, missing concepts, need to ground a decision), reach for research-from-vault (or run external research first then synthesize into the vault). Goals of the form "research X using the vault until a synthesis note and learning record exist" are valid and encouraged when the vault is configured.
1. Plan
Before the first change:
- State the goal and done signal (what verifier output means success).
- Read
.agent/context/loops.md(fallback:docs/agents/loops.md) for verification commands, stop rules, and editable scope. - Read
.agent/context/project-context.md(fallback:docs/agents/project-context.md) when present — project filter over global vault knowledge. - If building features test-first, reach for the
/tddskill. - Track iteration count from 1.