Andrew's Digital Garden

Loop engineering with AI

Loop engineering is replacing yourself as the person who prompts the agent. You design the system that does it instead. A loop here can be thought of a recursive goal where you define a purpose and the AI iterates until complete

A loop needs 6 things:

  1. Automations that go off on a schedule and do discovery and triage by themselves.
  2. Worktrees so two agents working in paralell dont step on each other.
  3. Skills to write down the project knowledge the agent would otherwise just guess.
  4. Plugins and connectors to plug the agent into the tools you already use.
  5. Sub-agents so one of them has the idea and a different one checks it.
  6. Memory (markdown, JIRA board, etc) that holds what's done and what is next
PrimitiveJob in the loopCodex appClaude Code
Automationsdiscovery + triage on a scheduleAutomations tab: pick project, prompt, cadence, environment; results land in a Triage inbox; /goal for run-until-doneScheduled tasks and cron, /loop, /goal, hooks, GitHub Actions
Worktreesisolate parallel featuresBuilt-in worktree per threadgit worktree, --worktree, isolation: worktree on a subagent
Skillscodify project knowledgeAgent Skills (SKILL.md), invoked with $name or implicitlyAgent Skills (SKILL.md)
Plugins / connectorsconnect your toolsConnectors (MCP) plus plugins for distributionMCP servers plus plugins
Sub-agentsideate and verifySubagents defined as TOML in .codex/agents/Task subagents in .claude/agents/, agent teams
Statetrack what’s doneMarkdown or Linear via a connectorMarkdown (AGENTS.md, progress files) or Linear via MCP

Automations are the crux of this. It's the thing that makes it a loop, and not just a process run once. The most useful structural thing in a loop, by far, is splitting the one who writes from the one who checks.

Even with a loop, the verification is on you. [[20260625012124-ai-code-review]]

[[20260625104409-comprehension-debt]] [[20260604045417-ai-software-development-loops]] [[20260528095327-ai-sdlc]]

https://addyosmani.com/blog/loop-engineering/

[[ai]] [[engineering]]

Loop engineering with AI