try, test, fix, save. This cycle runs continuously until the agent reaches its goal. Two immutable foundations must be defined first in every project:
- A clear goal that specifies what “done” looks like.
- A scorekeeper that measures what “correct” means.
Start with the goal and the scorekeeper in every project. Get one small, saved win (a green state) early — it reduces risk and provides a reliable baseline for iteration.
- Automations — repeat the loop’s work reliably and without drift.
- Worktrees — create safe branches or disposable copies for experiments.
- Skills — package reusable procedures, heuristics, or models.
- Connectors and plugins — enable interaction with external tools, APIs, or services.
- Sub-agents — delegate focused responsibilities or subtasks to specialized agents.
- Memory — persist notes, context, checkpoints, and other state across sessions.
Design order and practical rules
- Define the goal and the scorekeeper first. Without them, the loop cannot measure progress.
- Get one small win saved (green) quickly — this becomes your rollback/safety point.
- Add components in this sequence only as problems demand them: Automations → Worktrees → Skills → Connectors/Plugins → Sub-agents → Memory.
- Keep each addition minimal and justified by a measurable need.
- Make small, incremental changes and
saveoften to ensure rollback points exist. - Inspect the actual outputs shipped by the loop — don’t rely only on the score flipping green.
- Decide up front when the loop should stop, and define the criteria for human handoff.
Automate carefully. Over-automation without clear stop conditions can produce brittle behavior. Define explicit termination or escalation rules to ensure safe handoffs to humans.
- Kubernetes Documentation — for worktree and environment isolation concepts
- Continuous Integration (CI) Practices — for automation and frequent saves
- Designing Reliable Systems — resilience and safe handoffs