Vibe Coding
Pattern: Stop-Hook Completion Gating Is the Core Loop-Engineering Primitive
The canonical loop-engineering building block is a Stop Hook that intercepts the agent's exit attempt, checks whether completion criteria are actually met, and reinjects the task prompt if they aren't — turning a one-shot run into a self-verifying loop. Paired with the 'compounding engineering' practice of codifying each feature's learnings into reusable slash commands, subagents, and hooks, codebases become progressively self-teaching. Builders should wire explicit done-criteria into SubagentStop/Stop hooks rather than trusting the model to decide it's finished.
↳ Follow the thread