<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>KFR | Blog</title><description>Personal blog of KFR, Principal Engineer</description><link>https://kfr.mr-rejstrom.workers.dev/</link><language>en</language><item><title>It&apos;s all a Yoke to you, isn&apos;t it?</title><link>https://kfr.mr-rejstrom.workers.dev/blog/no-yoke/</link><guid isPermaLink="true">https://kfr.mr-rejstrom.workers.dev/blog/no-yoke/</guid><description>Your AI agent will happily work for 14 hours straight. It will also happily delete your test suite to make the tests &apos;pass.&apos; Yoke is the difference between those two outcomes.

</description><pubDate>Mon, 09 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Or: How to put your agents to work and actually trust the results&lt;/em&gt;&lt;/p&gt;
&lt;aside aria-label=&quot;Series Context&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Series Context&lt;/p&gt;&lt;div&gt;&lt;p&gt;This is the fifth post in the AI-Augmented Development series. The first covered &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;steering and guardrails&lt;/a&gt;. Then came a &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook&quot;&gt;case study on autonomous test fixing&lt;/a&gt;, &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;scaling to parallel agents&lt;/a&gt;, and &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/the-loop-within-the-loop&quot;&gt;the inner/outer loop model&lt;/a&gt;. This one packages everything into something you can actually use.&lt;/p&gt;&lt;p&gt;If you haven’t read the first post, go do that. This one assumes you already buy the premise that agents need structure, not just prompts.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h2 id=&quot;why-yoke&quot;&gt;Why “Yoke”?&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;A yoke is the wooden beam that connects draft animals to the plow. It doesn’t make the ox weaker. It makes the ox &lt;em&gt;useful&lt;/em&gt;. Without it, you’ve got a very powerful animal wandering around your field eating your crops.&lt;/p&gt;
&lt;p&gt;And let’s be honest about what’s happening here. The agents are already doing the heavy lifting. The grunt work. The “write 400 lines of test scaffolding” work. The “implement this CRUD endpoint for the seventh time this week” work. They’re the ones pulling the plow through the dirt at 3 AM while you sleep.&lt;/p&gt;
&lt;p&gt;What you need to do is give them a proper harness so they don’t plow straight through your neighbor’s fence.&lt;/p&gt;
&lt;p&gt;Yes, “yoke” rhymes with “joke.” No, that wasn’t an accident. The joke is giving six agents commit access to your repo. The yoke is what keeps that from being a horror story.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-gap-between-steering-and-shipping&quot;&gt;The Gap Between “Steering” and “Shipping”&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;first post in this series&lt;/a&gt; laid out the approach: AGENTS.md for master instructions, skill files for task-specific procedures, automated quality gates for enforcement. &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;Later posts&lt;/a&gt; showed how to scale that to parallel agents with git worktrees, and the &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/the-loop-within-the-loop&quot;&gt;inner/outer loop model&lt;/a&gt; formalized where agents end and humans begin.&lt;/p&gt;
&lt;p&gt;But there was a gap. A pretty big one, actually.&lt;/p&gt;
&lt;p&gt;Setting all of that up by hand is a &lt;em&gt;lot&lt;/em&gt; of work. You need the config file, the completion checker, the plan-first hook, the grind loop implementation (different for every agent tool), the commands, the code reviewer, the documentation structure, the CI workflows, the enforcement scripts. And they all need to reference each other correctly, use the right test commands for your toolchain, and not have any typos in the shell scripts that silently break everything at 2 AM.&lt;/p&gt;
&lt;aside aria-label=&quot;The Manual Setup Problem&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Manual Setup Problem&lt;/p&gt;&lt;div&gt;&lt;p&gt;And the entire thing was built around human-in-the-loop orchestration. One wrong path in a shell script, one missing template variable, and the whole harness silently does nothing. You won’t find out until an agent cheerfully ignores every guardrail you thought you had.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;I built this harness incrementally over several weeks in a single repo. It worked great. But “just copy these 30 files and manually adjust all the paths and commands” is not a viable distribution strategy.&lt;/p&gt;
&lt;p&gt;So I built Yoke: a portable, run-once bootstrap that sets up the entire harness in any Git repository. Point your agent at a spec file, answer two questions, get the whole thing.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-two-question-setup&quot;&gt;The Two-Question Setup&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;You: &quot;Read YOKE_SPEC.md and set up the agentic harness for this repository&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent: &quot;Which profile?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;- minimal: Core quality gates&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;- standard: Full knowledge layer + commands&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;- full: Parallel orchestration&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;You: &quot;standard&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent: &quot;Which agent tools? Claude Code, OpenCode, Codex, Kiro?&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;You: &quot;claude and opencode&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent: *sets up your entire harness in 5-10 minutes*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The agent reads the spec, runs the scaffolding script, detects your toolchain (Python/uv? TypeScript/npm? Rust/cargo? Go?), fills in templates, generates tool-native components, analyzes your codebase, and validates everything. You answer two questions and go make coffee.&lt;/p&gt;
&lt;p&gt;After setup, the repo owns everything. No daemon. No SaaS. No subscription. Just files in your repo that you can read, modify, and commit. Yoke lays the foundation, then gets out of the way.&lt;/p&gt;
&lt;aside aria-label=&quot;No Lock-In&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;No Lock-In&lt;/p&gt;&lt;div&gt;&lt;p&gt;Every file Yoke generates is plain text you can read and modify. If you outgrow it, delete it. If you want to change it, change it. There’s no runtime, no API key, no vendor relationship.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;three-layers-one-harness&quot;&gt;Three Layers, One Harness&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;If you read the previous posts, you know the three-layer model. Here’s how Yoke implements it concretely — the parts that are new, not the philosophy you’ve already heard.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-2-the-agentic-loop&quot;&gt;Layer 2: The Agentic Loop&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The core. Install nothing else if you want, but install this.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Grind Loop&lt;/strong&gt; — The completion checker runs after each agent turn and produces structured JSON:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&quot;complete&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&quot;iteration&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;2&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&quot;max_iterations&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&quot;checks&quot;&lt;/span&gt;&lt;span&gt;: {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;&quot;tests_pass&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;&quot;review_clean&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;&quot;scratchpad_done&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;},&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;&quot;followup_prompt&quot;&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;Tests are still failing. Fix these:&lt;/span&gt;&lt;span&gt;\n\n&lt;/span&gt;&lt;span&gt;FAILED test_momentum_strategy...&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;If incomplete, the agent gets a targeted follow-up. If stuck on the same thing for three iterations, it gets an escalation: “Try a different approach.” If it hits the iteration cap, it stops gracefully instead of spiraling.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Without iteration control, agents will happily spend four hours on a problem that needed a five-minute workaround. The grind loop is a leash, not a cage.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Every agent tool — Claude, OpenCode, Kiro, bash wrapper — calls the same &lt;code dir=&quot;auto&quot;&gt;check-completion.sh&lt;/code&gt;. The iteration mechanics are tool-native (because Claude’s hook model and OpenCode’s plugin model are architecturally different), but the evaluation is shared. One source of truth for “are we done yet.”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Plan-First Enforcement&lt;/strong&gt; — A pre-write hook blocks code changes until a plan file exists in &lt;code dir=&quot;auto&quot;&gt;docs/plans/&lt;/code&gt;. Sounds draconian. Is draconian. Also the single most effective quality gate in the entire harness. Agents that plan before coding produce dramatically better results. Almost like thinking before acting is a good idea.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Shared Config&lt;/strong&gt; — One YAML file, parseable by both shell scripts and structured parsers:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;grind_loop&lt;/span&gt;&lt;span&gt;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;max_iterations&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;5&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;stall_timeout_seconds&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;300&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;idle_timeout_seconds&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;120&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-3-inner-knowledge&quot;&gt;Layer 3: Inner Knowledge&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Layer 2 keeps agents from going off the rails. Layer 3 makes them good at their job.&lt;/p&gt;
&lt;p&gt;Yoke generates all of this from your actual codebase — not empty scaffolds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AGENTS.md&lt;/strong&gt; from your architecture, toolchain, and detected patterns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Four commands&lt;/strong&gt; (&lt;code dir=&quot;auto&quot;&gt;/plan-feature&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;/start-issue&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;/create-pr&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;/fix-issue&lt;/code&gt;) with your actual test/lint/typecheck commands baked in&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Skills&lt;/strong&gt; detected from codebase patterns (Pydantic models? You get a skill for that. Strategy pattern? Skill. API routes? Skill.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Documentation&lt;/strong&gt; — architecture overview, testing guide, debugging guide, principles derived from your linter and CI config&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Code reviewer&lt;/strong&gt; agent definition parameterized with your tech stack&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;code dir=&quot;auto&quot;&gt;issue-decomposition&lt;/code&gt; skill is always included. It teaches agents how to break features into the right-sized chunks: one issue = one agent session = one worktree. With dependency ordering, parallel safety rules, and acceptance criteria that are actually testable. “Implement the feature” is not an acceptance criterion. It’s a wish.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-1-outer-orchestration&quot;&gt;Layer 1: Outer Orchestration&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;This is where the yoke metaphor gets literal. Multiple agents, pulling together.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Dispatch all orchestrator-ready issues&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;scripts/orchestrate.sh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--label&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;orchestrator-ready&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Or be specific&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;scripts/orchestrate.sh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--issues&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;101,102,103,104,105&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Peek at the plan without launching anything&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;scripts/orchestrate.sh&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--dry-run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--label&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;orchestrator-ready&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The orchestrator discovers issues, resolves dependencies via topological sort, groups them into waves, and dispatches agents to isolated worktrees in parallel. Wave 1 (no dependencies) runs in parallel. When done, Wave 2 starts. Each agent gets its own git worktree, its own dependency install, its own &lt;code dir=&quot;auto&quot;&gt;.env&lt;/code&gt;. Complete isolation.&lt;/p&gt;
&lt;p&gt;Stall detection kills agents that go silent. Auto-merge handles low-risk PRs. Issue preflight validates everything before an agent touches it. All using native &lt;code dir=&quot;auto&quot;&gt;git worktree&lt;/code&gt; — no third-party CLIs.&lt;/p&gt;
&lt;aside aria-label=&quot;Parallel Agents Without Isolation&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Parallel Agents Without Isolation&lt;/p&gt;&lt;div&gt;&lt;p&gt;Running multiple agents against the same working directory is how you get merge conflicts at 3 AM, corrupted lockfiles, and PRs that somehow contain changes from three different features. Each agent needs its own worktree. No exceptions.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-intelligence-boundary&quot;&gt;The Intelligence Boundary&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The design decision that makes Yoke work: a clean split between mechanical scaffolding and intelligent generation.&lt;/p&gt;
&lt;p&gt;&lt;code dir=&quot;auto&quot;&gt;install.sh&lt;/code&gt; handles the boring stuff. Directory creation. Template files with &lt;code dir=&quot;auto&quot;&gt;{{placeholder}}&lt;/code&gt; markers. Gitignore entries. It’s a POSIX shell script. Idempotent (run it twice, same result). Safe (never overwrites existing files). Paranoid (32 automated self-test checks).&lt;/p&gt;
&lt;p&gt;The agent handles the smart stuff. Toolchain detection. Placeholder substitution. Tool-native component generation. Codebase analysis. The spec (&lt;code dir=&quot;auto&quot;&gt;YOKE_SPEC.md&lt;/code&gt;) walks the agent through all of it step by step.&lt;/p&gt;
&lt;p&gt;This split means &lt;code dir=&quot;auto&quot;&gt;install.sh&lt;/code&gt; is dead simple and testable, while the agent does what agents are good at: reading code and making decisions.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;shared-scripts-tool-native-loops&quot;&gt;Shared Scripts, Tool-Native Loops&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Every agent tool shares the same underlying scripts. But the iteration loop itself is tool-native. Because Claude Code’s hook-based model (Stop hook fires → output becomes next prompt → Claude re-enters automatically) is fundamentally different from OpenCode’s event-driven plugin model (session.idle → plugin calls checker → plugin sends new prompt via API).&lt;/p&gt;
&lt;p&gt;Pretending these are the same thing would produce a worse result than acknowledging the difference. The shared contract is the JSON output from &lt;code dir=&quot;auto&quot;&gt;check-completion.sh&lt;/code&gt;. The loop mechanics are each tool’s business.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Share what can be shared, go native where it matters.&lt;/strong&gt; Forced abstraction over genuinely different architectures is how you get leaky abstractions that nobody trusts.&lt;/p&gt;
&lt;aside aria-label=&quot;The Shared Contract&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Shared Contract&lt;/p&gt;&lt;div&gt;&lt;p&gt;The JSON output from &lt;code dir=&quot;auto&quot;&gt;check-completion.sh&lt;/code&gt; is the only thing that needs to be consistent. Everything else — how the loop runs, how prompts get injected, how the agent re-enters — is each tool’s problem to solve.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-plan-feature-pipeline&quot;&gt;The Plan-Feature Pipeline&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The most impactful addition was also the last one built. The orchestrator needs well-formed GitHub issues. But where do those issues come from?&lt;/p&gt;
&lt;p&gt;Before &lt;code dir=&quot;auto&quot;&gt;/plan-feature&lt;/code&gt;, the answer was “the developer writes them by hand.” Fine for three issues. Less fine for fifteen.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Developer: /plan-feature &quot;Add backtesting support with historical data replay&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent: *reads AGENTS.md, architecture docs, scans codebase*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span&gt;*decomposes into 7 issues across 3 waves*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&quot;Here&apos;s the proposed breakdown into 7 issues across 3 waves.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Want me to:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span&gt;1. Create all issues as-is&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span&gt;2. Modify the plan&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span&gt;3. Cancel&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Developer: &quot;Merge issues 3 and 4, they&apos;re too small separately.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent: *adjusts, creates 6 issues with Agent Metadata tables*&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;       &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&quot;Created 6 issues. To run:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;        &lt;/span&gt;&lt;/span&gt;&lt;span&gt;scripts/orchestrate.sh --issues 101,102,103,104,105,106&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The human-in-the-loop gate is non-negotiable. The agent proposes, the developer approves. No issues get created without explicit sign-off. This is where human judgment matters most — scoping, prioritization, and “actually, that’s way more complex than you think.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The agent is good at decomposition. It’s terrible at knowing what matters. That’s still your job.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This closes the loop: idea → issues → dispatch → implementation → review → merge. You decide what to build. The agents handle the rest.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;what-this-looks-like-in-practice&quot;&gt;What This Looks Like In Practice&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;A real workflow from the project where Yoke was born:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;9.00 am:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;/plan-feature &quot;Add sentiment analysis scanner with LLM-based scoring&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;→ 5 issues created across 2 waves&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;scripts/orchestrate.sh --issues 201,202,203,204,205&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;9.40 am:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Wave 1 complete. Both PRs merged.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Wave 2 in progress. Agent on #203 hit a test failure,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;grind loop re-prompted twice, fixed on iteration 3.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;Agent on #204 completed first try.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;10.30 am:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;All 5 PRs merged. Feature complete.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Total human time: 2 minutes reviewing the plan,&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;5 minutes spot-checking the final PRs.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Five issues, three waves, two agents in parallel, one afternoon. The agents did the implementation. The harness did the quality enforcement. The human did the thinking.&lt;/p&gt;
&lt;p&gt;That’s the yoke working. The agents pulled the plow. The harness kept them in the furrow. The farmer picked the field.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Copy the two files into your repo&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;cp&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;/path/to/yoke/{install.sh,YOKE_SPEC.md}&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Point your agent at the spec&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&quot;Read YOKE_SPEC.md and set up the agentic harness for this repository&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Start with &lt;code dir=&quot;auto&quot;&gt;standard&lt;/code&gt; profile. Upgrade to &lt;code dir=&quot;auto&quot;&gt;full&lt;/code&gt; when you’re ready for parallel orchestration. Drop to &lt;code dir=&quot;auto&quot;&gt;minimal&lt;/code&gt; if you just want the grind loop and plan-first enforcement.&lt;/p&gt;

























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Profile&lt;/th&gt;&lt;th&gt;What You Get&lt;/th&gt;&lt;th&gt;When to Use&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;minimal&lt;/td&gt;&lt;td&gt;Grind loop, plan-first enforcement, shared config&lt;/td&gt;&lt;td&gt;Solo dev, single agent&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;standard&lt;/td&gt;&lt;td&gt;+ AGENTS.md, commands, skills, code reviewer&lt;/td&gt;&lt;td&gt;Most projects&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;full&lt;/td&gt;&lt;td&gt;+ Orchestrator, wave dispatch, stall detection&lt;/td&gt;&lt;td&gt;Parallel agents at scale&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Supports Python (uv/pip), TypeScript (npm/yarn/pnpm), Rust (cargo), and Go. Toolchain detection is automatic.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;run-once-repo-owns-it&quot;&gt;Run Once, Repo Owns It&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;After setup, Yoke is done. No daemon. No version to update. The files are in your repo, committed to git, owned by your team.&lt;/p&gt;
&lt;p&gt;Want to change the grind loop iterations? Edit &lt;code dir=&quot;auto&quot;&gt;.agents/config.yaml&lt;/code&gt;. Want a new skill? Create a file in &lt;code dir=&quot;auto&quot;&gt;.agents/skills/&lt;/code&gt;. Want to modify the completion checker? It’s a shell script. Read it. Change it. It’s yours.&lt;/p&gt;
&lt;p&gt;If you can’t read it, you can’t trust it. And if you can’t trust it, you shouldn’t be letting it control your AI agents.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Yoke is open source. Because the only thing worse than an uncontrolled AI agent is a proprietary system controlling your AI agents.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;further-reading&quot;&gt;Further Reading&lt;/h2&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Stop Prompting, Start Steering&lt;/a&gt; — The steering philosophy that Yoke implements&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook&quot;&gt;Let It Cook&lt;/a&gt; — Guardrails enabling autonomous problem-solving&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;From One Agent to Many&lt;/a&gt; — Scaling to parallel agents with git worktrees&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/the-loop-within-the-loop&quot;&gt;The Loop Within the Loop&lt;/a&gt; — Inner and outer loops in AI-assisted development&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://github.com/kimrejstrom/yoke&quot;&gt;Yoke on GitHub&lt;/a&gt; — Source code, YOKE_SPEC.md, install.sh&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>ai</category><category>agentic-development</category><category>yoke</category><category>orchestration</category><category>open-source</category></item><item><title>The Loop Within the Loop</title><link>https://kfr.mr-rejstrom.workers.dev/blog/the-loop-within-the-loop/</link><guid isPermaLink="true">https://kfr.mr-rejstrom.workers.dev/blog/the-loop-within-the-loop/</guid><description>Your AI agent is a caffeinated tornado spinning through code-build-test cycles at inhuman speed. But that tornado needs to land somewhere safe. Enter the outer loop: where CI/CD, security scans, and actual humans make sure the tornado didn&apos;t just level a hospital.

</description><pubDate>Wed, 04 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Or: Why Your Agent Needs a Babysitter (And Why That Babysitter is You)&lt;/em&gt;&lt;/p&gt;
&lt;aside aria-label=&quot;Series Context&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Series Context&lt;/p&gt;&lt;div&gt;&lt;p&gt;This post builds on &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt; and &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;Scaling to Parallel Agents&lt;/a&gt;. Here we zoom out to see the full picture: the tight inner loop where agents work, and the outer loop where humans verify nothing caught fire.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;two-loops&quot;&gt;Two Loops&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Look at any diagram of modern software development and you’ll see loops. Loops within loops. It’s loops all the way down.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AI agents have fundamentally changed which loop matters&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The traditional inner loop (write code, build, test, debug, repeat) used to be where developers spent 80% of their feature development time. It was slow. It was manual. It was in many cases also beautiful. But, it was the bottleneck.&lt;/p&gt;
&lt;p&gt;Not anymore.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The inner loop is now a caffeinated tornado. The outer loop is where you make sure the tornado didn’t just level a hospital.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-stochastic-reality&quot;&gt;The Stochastic Reality&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;LLMs are fundamentally unpredictable.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Same prompt. Same model. Different day. Different output.&lt;/p&gt;
&lt;p&gt;This isn’t a bug. It’s the nature of the technology. Large language models are stochastic systems — they sample from probability distributions, and that sampling introduces variance. Sometimes helpful variance. Sometimes “why did you delete the entire authentication module” variance.&lt;/p&gt;
&lt;p&gt;Traditional development tools are deterministic. Run the compiler twice, get the same output. Run the linter twice, get the same warnings. Run the tests twice, get the same results (flaky tests notwithstanding).&lt;/p&gt;
&lt;p&gt;AI agents? Not so much.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Traditional Tool:  Input → Deterministic Process → Predictable Output&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;AI Agent:          Input → Stochastic Process → ¯\_(ツ)_/¯&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This changes everything about how we need to structure development.&lt;/p&gt;
&lt;aside aria-label=&quot;The Repeatability Problem&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Repeatability Problem&lt;/p&gt;&lt;div&gt;&lt;p&gt;If your process depends on an AI agent doing the same thing twice, you don’t have a process. You have a hope. And hope is not a strategy.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;&lt;strong&gt;The solution isn’t to fight the stochasticity. It’s to build structure around it.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Structure that creates repeatability from chaos. Artifacts that document what happened. Checkpoints that verify quality. Guardrails that catch when the dice roll badly.&lt;/p&gt;
&lt;p&gt;The funny thing: traditional engineering concepts like TDD and BDD work surprisingly well in this context. Why? They were designed for humans. And humans are stochastic systems too.&lt;/p&gt;
&lt;p&gt;Give two developers the same spec, you’ll get two different implementations. Give them the same bug report, they’ll debug it differently. The whole history of software engineering is basically “how do we get predictable outcomes from unpredictable meat-based processors?”&lt;/p&gt;
&lt;p&gt;TDD doesn’t care &lt;em&gt;how&lt;/em&gt; you write the code. It cares that the code passes the tests. BDD doesn’t care &lt;em&gt;what&lt;/em&gt; approach you take. It cares that the behavior matches the specification. These methodologies abstract away the implementation variance and focus on verifiable outcomes.&lt;/p&gt;
&lt;p&gt;Turns out, that’s exactly what you need for AI agents too.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We spent decades building processes to handle human unpredictability. Now those same processes handle AI unpredictability. The more things change, the more they stay the same.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s what the two-loop model is really about: &lt;strong&gt;taming stochastic systems with deterministic process&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-three-forces&quot;&gt;The Three Forces&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Before diving into the loops, let’s establish the framework. Three forces govern AI-assisted development:&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;force-1-quality&quot;&gt;Force 1: Quality&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The end product has to work. Not “works most of the time.” Not “works if you squint.” Actually works.&lt;/p&gt;
&lt;p&gt;Both loops serve quality, but at different levels:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inner loop: Does the code compile? Do tests pass? Is it syntactically correct?&lt;/li&gt;
&lt;li&gt;Outer loop: Does it meet requirements? Is it secure? Does it fit the architecture?&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;force-2-repeatability&quot;&gt;Force 2: Repeatability&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The process has to be repeatable. Not “repeatable if the model is in a good mood.” Actually repeatable.&lt;/p&gt;
&lt;p&gt;This is where stochastic systems fight you. The same issue assigned to the same agent might produce different implementations. That’s fine, as long as both implementations pass the same quality gates.&lt;/p&gt;
&lt;p&gt;Repeatability comes from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Consistent guardrails (AGENTS.md, SKILL.md files)&lt;/li&gt;
&lt;li&gt;Consistent verification (same tests, same linting, same checks)&lt;/li&gt;
&lt;li&gt;Consistent artifacts (same documentation structure, same PR format)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;force-3-structure&quot;&gt;Force 3: Structure&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The process needs to produce traceable artifacts. Why? Because &lt;strong&gt;black-box models can’t explain their reasoning&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When something goes wrong (and it will) you need a paper trail:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What was the plan?&lt;/li&gt;
&lt;li&gt;What tests were written?&lt;/li&gt;
&lt;li&gt;What did the code review find?&lt;/li&gt;
&lt;li&gt;What decisions were made and why?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The model won’t remember. The artifacts will.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;These three forces (Quality, Repeatability, Structure) are the lens through which to evaluate every process decision. If it doesn’t serve at least one of these forces, it’s probably unnecessary complexity.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-ai-assisted-inner-loop&quot;&gt;The AI-Assisted Inner Loop&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Picture this: you assign an issue to your AI agent. What happens next is a blur of activity that would take a human developer hours, compressed into minutes.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://kfr.mr-rejstrom.workers.dev/_astro/inner-loop-diagram.DMhQt-lA_Z1qiwIu.webp&quot; alt=&quot;AI-Assisted Inner Loop diagram showing the flow from Issue through Worktree, Plan, TDD, Implement, Build/Test/Debug cycle, Self-Review, conditional specialist reviews (GDPR, Security, A11y), and PR Creation&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;2376&quot; height=&quot;1836&quot;&gt;&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-1-setup-30-seconds&quot;&gt;Phase 1: Setup (30 seconds)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent receives an issue number. Within seconds:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Worktree creation&lt;/strong&gt;: Isolated branch, unique ports, fresh database&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environment setup&lt;/strong&gt;: Hooks fire, dependencies copy (copy-on-write magic)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Issue fetch&lt;/strong&gt;: GitHub API pulls full context, labels, comments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan generation&lt;/strong&gt;: Local markdown file with implementation strategy&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;What Happens When You Run &apos;wti 42&apos;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Worktree created: ~/projects/myapp-issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Branch: issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Ports: API=14521, Web=16893&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Database: myapp_issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Agent launched with context...&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Artifact produced&lt;/strong&gt;: &lt;code dir=&quot;auto&quot;&gt;PLAN_42.md&lt;/code&gt; — the decision record&lt;/p&gt;
&lt;p&gt;This isn’t just a todo list. It’s documentation of &lt;em&gt;why&lt;/em&gt; this approach, not just &lt;em&gt;what&lt;/em&gt;. When the agent (or a future human) needs to understand the reasoning, the plan file provides context the model’s weights can’t.&lt;/p&gt;
&lt;aside aria-label=&quot;The Plan as Memory&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Plan as Memory&lt;/p&gt;&lt;div&gt;&lt;p&gt;That local markdown plan isn’t just for show. It’s the agent’s external memory. When context windows fill up and things get fuzzy, the plan file keeps the agent on track. It’s like leaving yourself notes before a drinking binge, except the binge is 50,000 tokens of code generation.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-2-tdd-cycle-the-tight-loop&quot;&gt;Phase 2: TDD Cycle (The Tight Loop)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Here’s where the magic happens. The agent enters a tight loop:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;TDD Cycle&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;1.&lt;/span&gt;&lt;span&gt; Write failing test&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;2.&lt;/span&gt;&lt;span&gt; Run test (verify it fails)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;3.&lt;/span&gt;&lt;span&gt; Write minimal implementation&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;4.&lt;/span&gt;&lt;span&gt; Run test (verify it passes)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;5.&lt;/span&gt;&lt;span&gt; Refactor if needed&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;6.&lt;/span&gt;&lt;span&gt; Repeat&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This isn’t new. TDD has been around since Kent Beck was in diapers. What’s new is the &lt;strong&gt;speed&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;An AI agent can complete a TDD cycle in 30-60 seconds. A human developer? 5-15 minutes. That’s not a small difference. That’s an order of magnitude.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Human TDD:     ████████████████████████████████████████ 10 min&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Agent TDD:     ████ 1 min&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Artifact produced&lt;/strong&gt;: Test files — intent documentation&lt;/p&gt;
&lt;p&gt;Tests written before implementation capture &lt;em&gt;what should happen&lt;/em&gt; before the agent decides &lt;em&gt;how to make it happen&lt;/em&gt;. This is crucial for stochastic systems: the tests are the specification, and they’re deterministic even when the implementation isn’t.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-3-verification-the-safety-net&quot;&gt;Phase 3: Verification (The Safety Net)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;After implementation, the agent doesn’t just declare victory and go home. It verifies:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;New tests pass&lt;/strong&gt;: The thing it just built actually works&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linting passes&lt;/strong&gt;: Code style is consistent&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Type checking passes&lt;/strong&gt;: TypeScript isn’t screaming&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full test suite passes&lt;/strong&gt;: Nothing else broke&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Verification Commands&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;lint&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;typecheck&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;test&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;build&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Artifact produced&lt;/strong&gt;: Passing test suite — the quality gate&lt;/p&gt;
&lt;p&gt;This is where repeatability comes from. The stochastic agent might produce different code each time, but the deterministic tests verify the same properties each time.&lt;/p&gt;
&lt;aside aria-label=&quot;The Sycophancy Trap&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Sycophancy Trap&lt;/p&gt;&lt;div&gt;&lt;p&gt;Without proper guardrails, agents will sometimes “fix” failing tests by… deleting them. Or modifying assertions to match wrong output. The verification phase catches this, but only if you’re actually running the full suite, not just the new tests.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-4-self-review-the-mirror&quot;&gt;Phase 4: Self-Review (The Mirror)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Before any human sees the code, a &lt;strong&gt;sub-agent&lt;/strong&gt; reviews it.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Code Review Checklist&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Tests present for all changes&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] No hardcoded secrets&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Follows architecture patterns&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Handles edge cases&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Error handling is appropriate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] No obvious security issues&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The main agent reads the review, fixes issues, and iterates. This catches 60-70% of problems before a human ever looks at the code.&lt;/p&gt;
&lt;p&gt;But review quality varies wildly.&lt;/p&gt;
&lt;p&gt;The model matters. Claude finds different issues than GPT-5.2 finds different issues than Gemini. Temperature matters — a creative reviewer catches different things than a conservative one. Instructions matter — “look for security issues” produces different results than “look for maintainability concerns.”&lt;/p&gt;
&lt;p&gt;This is actually an opportunity. Instead of relying on a single reviewer, you can run &lt;strong&gt;multi-model reviews&lt;/strong&gt;:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Multi-Model Review Strategy&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;1.&lt;/span&gt;&lt;span&gt; Claude (low temp): Architecture and patterns&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;2.&lt;/span&gt;&lt;span&gt; GPT-5.2 Codex (medium temp): Edge cases and error handling&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;3.&lt;/span&gt;&lt;span&gt; Gemini (low temp): Performance and efficiency&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;4.&lt;/span&gt;&lt;span&gt; Consolidate findings → CODE_REVIEW_42.md&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Different models have different blind spots. What one misses, another catches. The consolidated review is stronger than any single model could produce.&lt;/p&gt;
&lt;aside aria-label=&quot;Ensemble Reviews&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Ensemble Reviews&lt;/p&gt;&lt;div&gt;&lt;p&gt;Think of it like a code review committee, except the committee members never get tired, never have ego conflicts, and can review a PR in parallel in under a minute.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;&lt;strong&gt;Artifact produced&lt;/strong&gt;: &lt;code dir=&quot;auto&quot;&gt;CODE_REVIEW_42.md&lt;/code&gt; — the consolidated validation record&lt;/p&gt;
&lt;p&gt;This document shows what was checked and what was found. When a bug slips through later, you can trace back: did the review miss it, or was it a novel issue?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It’s like having a junior developer review their own code, except the junior developer is also a senior developer, and also never gets tired, and also doesn’t have feelings you can hurt by pointing out their mistakes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-5-pr-creation&quot;&gt;Phase 5: PR Creation&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Finally, the agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Creates a GitHub issue (if one doesn’t exist)&lt;/li&gt;
&lt;li&gt;Commits with conventional format&lt;/li&gt;
&lt;li&gt;Pushes to the feature branch&lt;/li&gt;
&lt;li&gt;Creates a pull request with detailed description&lt;/li&gt;
&lt;li&gt;Links everything together&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Artifact produced&lt;/strong&gt;: The PR itself — the integration contract&lt;/p&gt;
&lt;p&gt;The PR is the handoff between loops. It contains everything the outer loop needs: what changed, why, how it was tested, what the reviews found.&lt;/p&gt;
&lt;p&gt;The inner loop is complete. Time elapsed: 10-30 minutes for a typical feature.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;why-artifacts-matter-more-now&quot;&gt;Why Artifacts Matter More Now&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;In traditional development, documentation is nice to have. In AI-assisted development, it’s essential.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Black-box models don’t explain their reasoning.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ask a human developer why they chose approach A over approach B, and they’ll tell you. Ask an AI agent the same question next week, and it has no idea. It doesn’t remember the conversation, let alone the reasoning.&lt;/p&gt;
&lt;p&gt;Artifacts fill this gap:&lt;/p&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Artifact&lt;/th&gt;&lt;th&gt;What It Captures&lt;/th&gt;&lt;th&gt;Why It Matters&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Plan file&lt;/td&gt;&lt;td&gt;Design decisions, rejected alternatives&lt;/td&gt;&lt;td&gt;Future context for changes&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Test files&lt;/td&gt;&lt;td&gt;Expected behavior, edge cases&lt;/td&gt;&lt;td&gt;Specification that survives the session&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Review file&lt;/td&gt;&lt;td&gt;What was checked, what was found&lt;/td&gt;&lt;td&gt;Audit trail for quality&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;PR description&lt;/td&gt;&lt;td&gt;Summary, trade-offs, concerns&lt;/td&gt;&lt;td&gt;Handoff context for reviewers&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;This isn’t bureaucracy. It’s &lt;strong&gt;institutional memory for a system with no memory&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;When the agent goes off the rails (and it will) artifacts show where and why. When a future agent (or human) needs to modify the code, artifacts provide context the model can’t.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The artifacts are the paper trail. The model is the ghost that wrote them.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-t-shaped-agent-team&quot;&gt;The T-Shaped Agent Team&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Your main agent is a generalist. Good at many things, expert at none.&lt;/p&gt;
&lt;p&gt;But some domains require deep expertise:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GDPR compliance requires specific knowledge of data protection regulations&lt;/li&gt;
&lt;li&gt;Security review requires adversarial thinking and vulnerability patterns&lt;/li&gt;
&lt;li&gt;Accessibility requires WCAG expertise and assistive technology understanding&lt;/li&gt;
&lt;li&gt;Performance requires profiling knowledge and optimization patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One agent can’t hold all this context effectively. Enter the &lt;strong&gt;T-shaped team&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://kfr.mr-rejstrom.workers.dev/_astro/t-shaped-team-diagram.B6Q-WpuS_ZdwFjg.webp&quot; alt=&quot;T-Shaped Agent Team diagram showing a Main Agent (Generalist) with broad capability across all tasks, connected to specialist sub-agents for GDPR, Security, A11y, Performance, and API expertise&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;2059&quot; height=&quot;1626&quot;&gt;&lt;/p&gt;
&lt;p&gt;The main agent is the horizontal bar: broad capability. Specialist sub-agents are the vertical bars: deep expertise called on demand.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;conditional-activation&quot;&gt;Conditional Activation&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Not every feature needs every specialist.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A simple bug fix doesn’t need GDPR review. A backend refactor doesn’t need accessibility review. Running all specialists on all features is wasteful.&lt;/p&gt;
&lt;p&gt;Instead, issue metadata triggers relevant reviews:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Issue-Driven Specialist Activation&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Issue Labels          → Triggered Specialists&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;─────────────────────────────────────────────&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;pii&lt;/span&gt;&lt;span&gt;] [&lt;/span&gt;&lt;span&gt;user-data&lt;/span&gt;&lt;span&gt;]     → GDPR sub-agent&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;auth&lt;/span&gt;&lt;span&gt;] [&lt;/span&gt;&lt;span&gt;user-input&lt;/span&gt;&lt;span&gt;]   → Security sub-agent&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;ui&lt;/span&gt;&lt;span&gt;] [&lt;/span&gt;&lt;span&gt;frontend&lt;/span&gt;&lt;span&gt;]       → Accessibility sub-agent&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;api&lt;/span&gt;&lt;span&gt;] [&lt;/span&gt;&lt;span&gt;breaking&lt;/span&gt;&lt;span&gt;]      → API design sub-agent&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;performance&lt;/span&gt;&lt;span&gt;]         → Performance sub-agent&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This keeps the inner loop fast for simple features while ensuring thorough review for sensitive ones.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;why-inner-loop-not-outer&quot;&gt;Why Inner Loop, Not Outer?&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;You might think specialist reviews belong in the outer loop with CI/CD. But consider:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Speed&lt;/strong&gt;: Automated sub-agents take minutes, not days&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost&lt;/strong&gt;: Catching issues before PR is cheaper than after&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Focus&lt;/strong&gt;: Human reviewers can focus on judgment calls, not checklists&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Artifacts&lt;/strong&gt;: Specialist reviews produce documents that help human reviewers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The outer loop is for things that require human judgment or external systems. Specialist sub-agents are automated; they belong in the inner loop.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-over-engineering-trap&quot;&gt;The Over-Engineering Trap&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Time for the caveat.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Everything in this post is a workaround for model limitations.&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sub-agents exist because one agent can’t hold enough context&lt;/li&gt;
&lt;li&gt;Artifacts exist because models can’t explain their reasoning&lt;/li&gt;
&lt;li&gt;Guardrails exist because models make unpredictable mistakes&lt;/li&gt;
&lt;li&gt;Structure exists to force repeatability from stochastic systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And those limitations are shrinking fast.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-moving-target&quot;&gt;The Moving Target&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Each model generation gets smarter, more capable, handles larger context:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://kfr.mr-rejstrom.workers.dev/_astro/moving-target-diagram.CmQgAQgC_12qPK6.webp&quot; alt=&quot;Model evolution diagram showing progression from GPT-4 through GPT-4o, Claude 3.5, GPT-5.2, Claude 4.6 and beyond, with each leap reducing the need for scaffolding&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;2088&quot; height=&quot;1296&quot;&gt;&lt;/p&gt;
&lt;p&gt;What required a dedicated sub-agent last year might need just a paragraph in AGENTS.md today. What requires elaborate guardrails now might be handled by a simple instruction tomorrow.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-pragmatic-test&quot;&gt;The Pragmatic Test&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Before adding complexity, ask:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Can the main agent handle this with a SKILL.md file?&lt;/strong&gt;
If yes, skip the sub-agent.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Does a simple AGENTS.md section solve the problem?&lt;/strong&gt;
If yes, skip the elaborate process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Is the sub-agent actually catching issues the main agent misses?&lt;/strong&gt;
If not, remove it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Is the overhead worth the quality improvement?&lt;/strong&gt;
If 90% of the benefit comes from 10% of the structure, keep only that 10%.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;aside aria-label=&quot;The 90% Rule&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The 90% Rule&lt;/p&gt;&lt;div&gt;&lt;p&gt;If a well-written instruction in AGENTS.md achieves 90% of what a dedicated sub-agent does, skip the sub-agent. The last 10% isn’t worth the complexity.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;signs-youre-over-engineering&quot;&gt;Signs You’re Over-Engineering&lt;/h3&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Sub-agents that rarely find issues&lt;/li&gt;
&lt;li&gt;Artifacts nobody reads&lt;/li&gt;
&lt;li&gt;Guardrails the agent never triggers&lt;/li&gt;
&lt;li&gt;Process that slows you down more than it helps&lt;/li&gt;
&lt;li&gt;More time configuring the system than using it&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;signs-you-need-more-structure&quot;&gt;Signs You Need More Structure&lt;/h3&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Repeated mistakes the agent keeps making&lt;/li&gt;
&lt;li&gt;Quality issues slipping through to production&lt;/li&gt;
&lt;li&gt;Inconsistent outputs across similar tasks&lt;/li&gt;
&lt;li&gt;“It worked last time, why not now?” confusion&lt;/li&gt;
&lt;li&gt;Post-mortems that reveal the same root cause&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;the-right-amount-of-structure&quot;&gt;The Right Amount of Structure&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Start minimal:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;AGENTS.md with golden rules and architecture&lt;/li&gt;
&lt;li&gt;One or two SKILL.md files for common tasks&lt;/li&gt;
&lt;li&gt;Basic code review sub-agent&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Add complexity only when you hit real problems. Remove complexity when models outgrow the need. Re-evaluate quarterly as models improve.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The goal isn’t maximum structure. It’s minimum viable structure that produces consistent quality. That minimum keeps shrinking.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;h3 id=&quot;a-prediction&quot;&gt;A Prediction&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;In 12-18 months, half of what’s in this post will be unnecessary.&lt;/p&gt;
&lt;p&gt;The sub-agent architecture might collapse into “just tell the main agent to check for GDPR compliance.” The elaborate artifact chain might become “the model just… remembers and explains.” The careful phase separation might merge into “the agent handles it.”&lt;/p&gt;
&lt;p&gt;That’s not a failure of this approach. That’s success. We’re building scaffolding for a building that’s learning to stand on its own.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Build for today’s models. Plan for tomorrow’s.&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-bottleneck-outer-loop&quot;&gt;The Bottleneck Outer Loop&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Now the code leaves the agent’s domain and enters… the real world.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://kfr.mr-rejstrom.workers.dev/_astro/bottleneck-outer-loop-diagram.DfVPUpJM_Z2aOO5n.webp&quot; alt=&quot;Bottleneck Outer Loop diagram showing PR flowing through CI/CD, Tests, Security, Compliance, Queue, Manual Review, Deploy, and Monitor stages, with hourglass symbols indicating wait times&quot; loading=&quot;lazy&quot; decoding=&quot;async&quot; fetchpriority=&quot;auto&quot; width=&quot;2376&quot; height=&quot;1836&quot;&gt;&lt;/p&gt;
&lt;p&gt;Those hourglasses aren’t decorative. They’re warnings.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;verification-at-higher-abstraction&quot;&gt;Verification at Higher Abstraction&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The outer loop isn’t just “slow CI.” It’s verification at a fundamentally different abstraction level.&lt;/p&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Inner Loop Verifies&lt;/th&gt;&lt;th&gt;Outer Loop Verifies&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Does the code compile?&lt;/td&gt;&lt;td&gt;Does it meet requirements?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Do tests pass?&lt;/td&gt;&lt;td&gt;Is it secure in production?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Is syntax correct?&lt;/td&gt;&lt;td&gt;Does it fit the architecture?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Are types valid?&lt;/td&gt;&lt;td&gt;Will it scale?&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Does it match the spec?&lt;/td&gt;&lt;td&gt;Should we ship this?&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;AI handles low-level verification well. Syntax, tests, linting — these are pattern-matching problems, and models excel at pattern matching.&lt;/p&gt;
&lt;p&gt;Humans handle high-level verification. Intent, security implications, architectural fit, business value — these require judgment, context, and accountability.&lt;/p&gt;
&lt;p&gt;This isn’t a limitation. It’s appropriate division of labor.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-slow-feedback-problem&quot;&gt;The Slow Feedback Problem&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The outer loop is slow by design. It has to be. You’re not just checking if code works — you’re checking if it’s:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Secure&lt;/strong&gt;: No SQL injection, no XSS, no “oops we exposed the database”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compliant&lt;/strong&gt;: Meets regulatory requirements, follows policies&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compatible&lt;/strong&gt;: Works with existing systems, doesn’t break production&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reviewed&lt;/strong&gt;: A human with context has blessed it&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each of these checks takes time. Minutes. Hours. Sometimes days.&lt;/p&gt;
&lt;aside aria-label=&quot;The Noisy Signal&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Noisy Signal&lt;/p&gt;&lt;div&gt;&lt;p&gt;CI/CD pipelines are notoriously noisy. Flaky tests. Intermittent failures. “Works on my machine” syndrome. The signal-to-noise ratio in the outer loop is often terrible, which means humans spend time investigating false positives instead of actual problems.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;why-the-outer-loop-cant-be-fully-automated&quot;&gt;Why the Outer Loop Can’t Be Fully Automated&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;“Just automate everything!”&lt;/p&gt;
&lt;p&gt;Sure. Automate the security scans. Automate the compliance checks. Automate the deployment.&lt;/p&gt;
&lt;p&gt;But who reviews the automation? Who decides if a security warning is a false positive or a real threat? Who makes the call when the compliance check flags something ambiguous?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Humans.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The outer loop is slow because it requires judgment. And judgment, for now, is still a human specialty.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-handoff-where-loops-meet&quot;&gt;The Handoff: Where Loops Meet&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The magic happens at the boundary between loops.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;INNER LOOP                              OUTER LOOP&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│                                       │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│       ┌─────────────────────┐         │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│       │                     │         │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;└───────│    PULL REQUEST     │─────────┘&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│                     │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│  - Code changes     │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│  - Test results     │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│  - Review artifacts │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│  - Agent summary    │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│  - Specialist reports&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;│                     │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;            &lt;/span&gt;&lt;/span&gt;&lt;span&gt;└─────────────────────┘&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The PR is the contract between loops. It contains everything the outer loop needs to make a decision:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;What changed&lt;/strong&gt;: Diff, file list, line counts&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Why it changed&lt;/strong&gt;: Issue link, description, context&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;How it was tested&lt;/strong&gt;: Test results, coverage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What reviews found&lt;/strong&gt;: Code review, specialist reviews&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What the agent thinks&lt;/strong&gt;: Summary, concerns, trade-offs&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A good PR makes the outer loop faster. A bad PR makes it slower. Agents that write good PRs are worth their weight in compute credits.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;optimizing-the-system&quot;&gt;Optimizing the System&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;speed-up-the-inner-loop&quot;&gt;Speed Up the Inner Loop&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The inner loop is already fast, but you can make it faster:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Better guardrails&lt;/strong&gt;: Fewer wrong turns, less backtracking&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cached dependencies&lt;/strong&gt;: Copy-on-write node_modules&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parallel testing&lt;/strong&gt;: Run tests concurrently&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Incremental builds&lt;/strong&gt;: Only rebuild what changed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Smarter specialist triggers&lt;/strong&gt;: Only run relevant reviews&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Worktree Optimization&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[post-create]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Instant dependency copy&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;deps&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;cp -c -r {{ main_worktree_path }}/node_modules . 2&gt;/dev/null || npm install&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;reduce-outer-loop-friction&quot;&gt;Reduce Outer Loop Friction&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The outer loop is slow, but you can reduce unnecessary friction:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Reliable CI&lt;/strong&gt;: Fix flaky tests, reduce false positives&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast security scans&lt;/strong&gt;: Incremental scanning, cached results&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Clear review process&lt;/strong&gt;: Checklists, templates, expectations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automated merging&lt;/strong&gt;: Auto-merge when all checks pass&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Trust the inner loop&lt;/strong&gt;: If specialist reviews passed, focus human review on higher-level concerns&lt;/li&gt;
&lt;/ol&gt;
&lt;aside aria-label=&quot;The 80/20 Rule&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The 80/20 Rule&lt;/p&gt;&lt;div&gt;&lt;p&gt;80% of PRs are routine. They pass all checks, get approved quickly, and merge without drama. Optimize for these. The other 20% need human attention anyway — don’t slow down the 80% trying to automate the 20%.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;balance-the-loops&quot;&gt;Balance the Loops&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The goal isn’t to make both loops as fast as possible. It’s to &lt;strong&gt;balance&lt;/strong&gt; them.&lt;/p&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Inner Loop Too Fast&lt;/th&gt;&lt;th&gt;Outer Loop Too Slow&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;PRs pile up in queue&lt;/td&gt;&lt;td&gt;Developers wait for feedback&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Reviews become bottleneck&lt;/td&gt;&lt;td&gt;Context lost between loops&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Quality suffers&lt;/td&gt;&lt;td&gt;Momentum dies&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;





















&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Inner Loop Too Slow&lt;/th&gt;&lt;th&gt;Outer Loop Too Fast&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Agents underutilized&lt;/td&gt;&lt;td&gt;Bad code ships&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Human time wasted&lt;/td&gt;&lt;td&gt;Security issues slip through&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Parallelism limited&lt;/td&gt;&lt;td&gt;Technical debt accumulates&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The sweet spot: inner loop produces PRs at the rate the outer loop can process them. No faster, no slower.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-compound-effect&quot;&gt;The Compound Effect&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;What happens over time:&lt;/p&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Week&lt;/th&gt;&lt;th&gt;Inner Loop Speed&lt;/th&gt;&lt;th&gt;Specialist Coverage&lt;/th&gt;&lt;th&gt;Features/Week&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;Slow (learning)&lt;/td&gt;&lt;td&gt;None&lt;/td&gt;&lt;td&gt;2-3&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;Medium&lt;/td&gt;&lt;td&gt;Basic code review&lt;/td&gt;&lt;td&gt;4-6&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;Fast&lt;/td&gt;&lt;td&gt;+ Security&lt;/td&gt;&lt;td&gt;8-12&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;8&lt;/td&gt;&lt;td&gt;Very Fast&lt;/td&gt;&lt;td&gt;+ A11y, GDPR&lt;/td&gt;&lt;td&gt;15-20&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;The inner loop gets faster as guardrails improve. Specialists catch more issues earlier. The outer loop gets faster because humans review cleaner PRs.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;After two months, you’re shipping more features per week than you used to ship per month. And the quality is higher, because every feature went through both loops with appropriate specialist review.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;when-loops-collide&quot;&gt;When Loops Collide&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Sometimes the loops fight each other.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-revert-scenario&quot;&gt;The Revert Scenario&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;Feature complete! PR created!&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;CI failed. Security issue found.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;Fixed! New commit pushed!&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;Different CI failure. Flaky test.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;That&apos;s not my code...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;Doesn&apos;t matter. Red is red.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This is where human judgment matters. Is the flaky test related? Should you fix it? Ignore it? Revert and try again?&lt;/p&gt;
&lt;p&gt;The agent can’t make this call. You can.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-scope-creep-scenario&quot;&gt;The Scope Creep Scenario&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;While fixing the bug, I noticed three other issues...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;This PR touches 47 files across 12 modules.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;But they&apos;re all related!&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;REJECTED. One thing at a time.&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Agents love to “help” by fixing everything they see. The outer loop enforces discipline. One issue, one PR, one review.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-overbaking-scenario&quot;&gt;The Overbaking Scenario&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;Tests still failing. Trying another approach...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;Still failing. Refactoring the test framework...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Inner Loop: &quot;Still failing. Maybe if I rewrite the database layer...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Outer Loop: &quot;It&apos;s been 4 hours. What are you doing?&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Without time limits, agents will work forever on impossible problems. The outer loop (you) needs to recognize when to pull the plug.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;key-takeaways&quot;&gt;Key Takeaways&lt;/h2&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;The inner loop is the agent’s domain&lt;/strong&gt;: Fast, automated, tireless&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The outer loop is your domain&lt;/strong&gt;: Slow, deliberate, judgmental&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The PR is the contract&lt;/strong&gt;: Good PRs make everything faster&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Balance matters&lt;/strong&gt;: Neither loop should bottleneck the other&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Judgment is human&lt;/strong&gt;: Automation handles the routine; you handle the exceptions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Artifacts are your paper trail&lt;/strong&gt;: When the AI can’t explain itself, artifacts can&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structure creates repeatability&lt;/strong&gt;: Deterministic process tames stochastic tools&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specialists extend, not replace&lt;/strong&gt;: T-shaped teams for deep expertise on demand&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Complexity should earn its place&lt;/strong&gt;: Start minimal, add only what’s needed&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;This is all temporary scaffolding&lt;/strong&gt;: Models improve; your process should too&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-future&quot;&gt;The Future&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The inner loop will keep getting faster. Better models, better tools, better guardrails.&lt;/p&gt;
&lt;p&gt;The outer loop will keep getting smarter. Better CI, better security scanning, better automated checks.&lt;/p&gt;
&lt;p&gt;The specialist sub-agents might merge back into the main agent as context windows grow and capabilities expand.&lt;/p&gt;
&lt;p&gt;But the boundary between loops — the place where machine speed meets human judgment — that’s where developers live now.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You’re a loop balancer. A judgment provider. A chaos wrangler. A scaffolding architect for systems that are learning to stand on their own.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Welcome to the future. It’s loops all the way down.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;And the loops keep getting tighter.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;Shoutout to the awesome peeps over at &lt;a href=&quot;https://www.aimbition.com/&quot;&gt;Aimbition&lt;/a&gt;, many of the concepts in this text came from sparring and discussions in their workshop.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;See &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt; for the steering framework, &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook&quot;&gt;Case Study: Self-Correcting Test Isolation&lt;/a&gt; for guardrails in action, or &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;Scaling to Parallel Agents&lt;/a&gt; for parallel execution infrastructure.&lt;/em&gt;&lt;/p&gt;</content:encoded><category>ai</category><category>agentic-development</category><category>inner-loop</category><category>outer-loop</category><category>ci-cd</category><category>workflow</category></item><item><title>From One Agent to Many: The Worktree Way</title><link>https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many/</link><guid isPermaLink="true">https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many/</guid><description>Running multiple AI agents in one repo? You&apos;ll hit branch conflicts, port conflicts, and database conflicts. Git worktrees provide the isolation you need to scale without chaos.

</description><pubDate>Wed, 14 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Or: How to Run Multiple Workstreams Without Losing Your Mind&lt;/em&gt;&lt;/p&gt;
&lt;aside aria-label=&quot;Series Introduction&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Series Introduction&lt;/p&gt;&lt;div&gt;&lt;p&gt;This post is a follow-up to &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt;. Here we cover the infrastructure for running multiple agents simultaneously. Because one tireless worker is good, but three is better.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-problem-with-naive-parallelism&quot;&gt;The Problem with Naive Parallelism&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;“Just open multiple IDE windows and run multiple agents!”&lt;/p&gt;
&lt;p&gt;Sure. Try it. I’ll wait.&lt;/p&gt;
&lt;p&gt;You’ll immediately hit conflicts:&lt;/p&gt;
&lt;aside aria-label=&quot;The Four Horsemen of Parallel Chaos&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;The Four Horsemen of Parallel Chaos&lt;/p&gt;&lt;div&gt;&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Branch conflicts&lt;/strong&gt;: Can’t checkout multiple branches in one repo. Git will look at you like you just asked it to divide by zero.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Port conflicts&lt;/strong&gt;: Multiple dev servers fight for the same port. It’s like musical chairs, except everyone loses.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database conflicts&lt;/strong&gt;: Agents see each other’s test data. Tests fail randomly. You spend three hours debugging a “flaky test.”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File conflicts&lt;/strong&gt;: Simultaneous package.json modifications cause merge hell.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;Naive parallelism doesn’t work. You need &lt;strong&gt;isolation&lt;/strong&gt;. Real isolation. The kind where your agents can’t even see each other, let alone interfere.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;git-worktrees-the-foundation&quot;&gt;Git Worktrees: The Foundation&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Git worktrees solve the fundamental problem: &lt;strong&gt;multiple working directories, one repository&lt;/strong&gt;.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Worktree Directory Structure&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Main worktree&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;~&lt;/span&gt;&lt;span&gt;/projects/myapp/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;├──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.git/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;├──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;apps/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;└──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;node_modules/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Additional worktrees (isolated)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;~&lt;/span&gt;&lt;span&gt;/projects/myapp-issue-42/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;├──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;apps/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;└──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;node_modules/&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Copy-on-write from main&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;~&lt;/span&gt;&lt;span&gt;/projects/myapp-issue-43/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;├──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;apps/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;└──&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;node_modules/&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Copy-on-write from main&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Each worktree:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Has its own branch (no conflicts)&lt;/li&gt;
&lt;li&gt;Has its own working directory (no file conflicts)&lt;/li&gt;
&lt;li&gt;Shares git history (no duplication)&lt;/li&gt;
&lt;li&gt;Can have its own ports and database&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It’s like having multiple parallel universes, except they all share the same timeline and you can merge them back together when you’re done.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;worktrunk-configuration&quot;&gt;Worktrunk Configuration&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Managing worktrees manually is tedious. Like, “I’d rather just do the work myself” tedious. &lt;strong&gt;Worktrunk&lt;/strong&gt; (&lt;code dir=&quot;auto&quot;&gt;wt&lt;/code&gt;) automates setup with hooks. For more details see the &lt;a href=&quot;https://github.com/max-sixty/worktrunk&quot;&gt;worktrunk github repo&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;.config/wt.toml&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[post-create]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Copy environment from main&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;env&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;cp {{ main_worktree_path }}/.env . 2&gt;/dev/null || cp {{ main_worktree_path }}/.env.example .env&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Configure unique ports and database&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;API_PORT={{ branch | hash_port }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;WEB_PORT={{ (&apos;web-&apos; ~ branch) | hash_port }}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;DB_NAME=&quot;myapp_{{ branch | sanitize }}&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;sed -i.bak &quot;s|^PORT=.*|PORT=${API_PORT}|&quot; .env&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;sed -i.bak &quot;s|^VITE_PORT=.*|VITE_PORT=${WEB_PORT}|&quot; .env&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;sed -i.bak &quot;s|&lt;/span&gt;&lt;span&gt;\\&lt;/span&gt;&lt;span&gt;(DATABASE_URL=.*:[0-9]*/&lt;/span&gt;&lt;span&gt;\\&lt;/span&gt;&lt;span&gt;)[^?]*|&lt;/span&gt;&lt;span&gt;\\&lt;/span&gt;&lt;span&gt;1${DB_NAME}|&quot; .env&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Copy node_modules (instant on APFS)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;deps&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;if cp -c /dev/null /dev/null 2&gt;/dev/null; then&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;cp -c -r {{ main_worktree_path }}/node_modules . 2&gt;/dev/null || npm install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;else&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;npm install&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Create isolated database&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;db&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;npm run wt:db:create &amp;#x26;&amp;#x26; npm run db:migrate&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;[pre-remove]&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Clean up database when removing worktree&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;db-cleanup&lt;/span&gt;&lt;span&gt; = &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;npm run wt:db:drop 2&gt;/dev/null || true&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;What this does:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Copies &lt;code dir=&quot;auto&quot;&gt;.env&lt;/code&gt; with unique ports (deterministic hash)&lt;/li&gt;
&lt;li&gt;Creates isolated database per worktree&lt;/li&gt;
&lt;li&gt;Copies &lt;code dir=&quot;auto&quot;&gt;node_modules&lt;/code&gt; instantly (copy-on-write magic)&lt;/li&gt;
&lt;li&gt;Cleans up database when worktree is removed&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;issue-driven-workflow&quot;&gt;Issue-Driven Workflow&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Shell functions for issue-driven development:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;~/.zshrc&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Create worktree and launch agent for an issue&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;local&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;issue_num&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;$1&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;local&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;branch_name&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;issue-&lt;/span&gt;&lt;span&gt;$issue_num&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;switch&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-c&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;$branch_name&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; [ &lt;/span&gt;&lt;span&gt;$?&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-eq&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt; ]; &lt;/span&gt;&lt;span&gt;then&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;        &lt;/span&gt;&lt;span&gt;opencode&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--prompt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;read AGENTS.md and start work on issue &lt;/span&gt;&lt;span&gt;$issue_num&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;fi&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Remove worktree when done&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wtr&lt;/span&gt;&lt;span&gt;() {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;local&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;issue_num&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;$1&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;    &lt;/span&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;remove&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;issue-&lt;/span&gt;&lt;span&gt;$issue_num&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-D&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Usage:&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Create worktree, launch agent for issue #42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wtr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Clean up when done&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Two commands. That’s it. Create a fully isolated workspace with its own branch, ports, and database, launch an AI agent with context, and point it at a specific issue.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;parallel-execution-in-practice&quot;&gt;Parallel Execution in Practice&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;morning-workflow&quot;&gt;Morning Workflow&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Terminal Session&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Spin up agents&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on authentication&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;43&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on data export&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;44&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on UI improvements&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Monitor progress&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;list&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# + main        ~/projects/myapp&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#   issue-42    ~/projects/myapp-issue-42  http://localhost:12847&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#   issue-43    ~/projects/myapp-issue-43  http://localhost:14521&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;#   issue-44    ~/projects/myapp-issue-44  http://localhost:16893&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Review PRs as they complete&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Agent: &quot;Feature #42 ready for review. PR url: ...&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Ask for changes, improvements&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Agent addresses the points&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Final review&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Tell Agent to finalize&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Cleanup&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wtr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wtr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;43&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wtr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;44&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;: Three features in no-time, with supervision where it counts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;You’re not writing most of the code. You’re reviewing end results. You’re making architectural decisions. You’re doing the parts of the job that actually require a human brain. Orchestrating.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;why-this-beats-fire-and-forget&quot;&gt;Why This Beats “Fire and Forget”&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Tools like the Ralph Wiggum loop run agents indefinitely until completion. The parallel worktree approach is different:&lt;/p&gt;

































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Fire and Forget&lt;/th&gt;&lt;th&gt;Issue-Driven Worktrees&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Single long-running agent&lt;/td&gt;&lt;td&gt;Multiple scoped agents&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;No isolation&lt;/td&gt;&lt;td&gt;Full isolation (branch, ports, DB)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Completion = agent decides&lt;/td&gt;&lt;td&gt;Completion = PR reviewed&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hard to monitor&lt;/td&gt;&lt;td&gt;Easy to check &lt;code dir=&quot;auto&quot;&gt;wt list&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Hard to abort&lt;/td&gt;&lt;td&gt;Just &lt;code dir=&quot;auto&quot;&gt;wtr &amp;#x3C;issue&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;No review until end&lt;/td&gt;&lt;td&gt;Sub-agent review per PR&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Each agent is &lt;strong&gt;scoped&lt;/strong&gt; (one issue, one branch, one PR), &lt;strong&gt;isolated&lt;/strong&gt; (can’t interfere with others), &lt;strong&gt;reviewable&lt;/strong&gt; (work visible in PR before merge), and &lt;strong&gt;disposable&lt;/strong&gt; (easy to abort and clean up).&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;deterministic-ports&quot;&gt;Deterministic Ports&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;API_PORT&lt;/span&gt;&lt;span&gt;={{ branch | hash_port }&lt;/span&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This hashes the branch name to generate a port between 10000-19999.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why this matters:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Same branch always gets same ports. Predictable.&lt;/li&gt;
&lt;li&gt;No collisions between worktrees. Ever.&lt;/li&gt;
&lt;li&gt;Predictable URLs for bookmarking.&lt;/li&gt;
&lt;li&gt;No manual configuration.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;database-isolation&quot;&gt;Database Isolation&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Each worktree gets its own PostgreSQL database:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Database URLs&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Main worktree&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;DATABASE_URL&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;postgresql://localhost:5432/myapp&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Issue 42 worktree&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;DATABASE_URL&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;postgresql://localhost:5432/myapp_issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This is the thing that makes parallel agents actually work. Without database isolation, you’re just running multiple agents that randomly break each other’s tests. With it: no test interference, clean state per worktree, automatic cleanup on removal.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;copy-on-write-dependencies&quot;&gt;Copy-on-Write Dependencies&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The fastest install is no install.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Copy-on-Write Commands&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# macOS APFS&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;cp&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-c&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-r&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main/node_modules&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Linux btrfs/xfs&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;cp&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;--reflink=auto&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-r&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;main/node_modules&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Copy-on-write means instant “copy” (just metadata), no disk space until files modified, and 500MB of node_modules in less than 1 second. Without it, each worktree needs 30-60 seconds for &lt;code dir=&quot;auto&quot;&gt;npm install&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;scaling-limits&quot;&gt;Scaling Limits&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Practical limits per machine:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;~500MB disk per worktree (node_modules)&lt;/li&gt;
&lt;li&gt;~200MB RAM per dev server&lt;/li&gt;
&lt;li&gt;~100MB RAM per database&lt;/li&gt;
&lt;li&gt;2 ports per worktree&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Human attention limits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1-2 agents: Easy, minimal supervision&lt;/li&gt;
&lt;li&gt;3-4 agents: Optimal balance&lt;/li&gt;
&lt;li&gt;5-6 agents: Requires more monitoring&lt;/li&gt;
&lt;li&gt;7+: Diminishing returns&lt;/li&gt;
&lt;/ul&gt;
&lt;aside aria-label=&quot;Sweet Spot&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Sweet Spot&lt;/p&gt;&lt;div&gt;&lt;p&gt;3-4 parallel agents for most developers. More than that and you’re not orchestrating anymore. You’re just watching chaos unfold and hoping for the best.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;port-already-in-use&quot;&gt;Port Already in Use&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;lsof&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-i&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;:12847&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;kill&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-9&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&amp;#x3C;PID&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Something’s squatting on your port. Evict it.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;database-connection-errors&quot;&gt;Database Connection Errors&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;wt:db:create&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;run&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;db:migrate&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Database doesn’t exist or isn’t migrated. Create it. Migrate it. Move on.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;worktree-already-exists&quot;&gt;Worktree Already Exists&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;list&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;remove&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;switch&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-c&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;issue-42&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Clean up the old one, create a fresh one.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;agent-confused-about-environment&quot;&gt;Agent Confused About Environment&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;AGENTS.md should include clear boundaries. Agents need to know: “You are working in a git worktree. The human orchestrator manages worktree creation/removal. Your job is feature implementation. DO implement features, write tests, create PRs. DO NOT create worktrees, remove worktrees, switch branches.”&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;step-1-single-worktree&quot;&gt;Step 1: Single Worktree&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;brew&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;install&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;worktrunk/tap/wt&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Create .config/wt.toml&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;switch&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-c&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;test-feature&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Verify ports, database work&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;remove&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Get comfortable with the basics. Make sure everything works.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;step-2-two-parallel-agents&quot;&gt;Step 2: Two Parallel Agents&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Simple bug fix&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;43&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Documentation update&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Monitor both, get comfortable&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Start small. Two agents on simple tasks. Get used to the rhythm.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;step-3-more-parallel-agents&quot;&gt;Step 3: More Parallel Agents&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;44&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# New feature&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;45&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Refactoring&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;46&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Tests&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Practice monitoring and unblocking&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Add a third. Or a fourth. Find your personal limit.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;step-4-optimize&quot;&gt;Step 4: Optimize&lt;/h3&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Add shell functions (wti, wtr)&lt;/li&gt;
&lt;li&gt;Refine AGENTS.md worktree section&lt;/li&gt;
&lt;li&gt;Find your optimal parallel count&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Parallel agent execution changes how you work:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before&lt;/strong&gt;: Implement features sequentially, wait for each to complete, context-switch constantly, lose half your productivity to “where was I again?”&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;After&lt;/strong&gt;: Orchestrate multiple features simultaneously, review in batches, maintain focus, actually use your brain for the hard problems&lt;/p&gt;
&lt;p&gt;The key enablers: git worktrees for isolation, Worktrunk for automation, deterministic ports, isolated databases, issue-driven workflow, and clear agent boundaries in AGENTS.md.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Result&lt;/strong&gt;: 3-4x throughput with maintained quality.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The future isn’t one developer, one feature at a time. It’s one developer orchestrating multiple AI agents, each on isolated features, all in parallel.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;See &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt; for the full framework, or &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook&quot;&gt;Case Study: Self-Correcting Test Isolation&lt;/a&gt; for guardrails in action.&lt;/em&gt;&lt;/p&gt;</content:encoded><category>ai</category><category>parallel-agents</category><category>worktrees</category><category>git</category><category>infrastructure</category></item><item><title>Let It Cook: When AI Fixes Its Own Mess</title><link>https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook/</link><guid isPermaLink="true">https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook/</guid><description>Case Study: Self-Correcting Test Isolation. Ask an AI agent to fix flaky tests and walk away. 10 minutes later: 164 insertions, 85 deletions, and zero failures. Here&apos;s how guardrails enabled that level of autonomy.

</description><pubDate>Sat, 10 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Or: Guardrails in Action: The AI That Fixed Itself (And Documented It)&lt;/em&gt;&lt;/p&gt;
&lt;aside aria-label=&quot;Series Introduction&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Series Introduction&lt;/p&gt;&lt;div&gt;&lt;p&gt;This post is a follow-up to &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt;, which covers the philosophy and framework. Here we see it in action. Spoiler: it actually works.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-challenge&quot;&gt;The Challenge&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Here’s the experiment: ask an AI agent to “fix the flaky tests” and walk away. No hand-holding. No step-by-step instructions. No hovering over its shoulder like a helicopter parent at a chess camp.&lt;/p&gt;
&lt;p&gt;Just… let it work.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Results:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Compute time&lt;/strong&gt;: 10 minutes 26 seconds&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human intervention&lt;/strong&gt;: Minimal (initial request + final approval)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Changes&lt;/strong&gt;: 164 insertions, 85 deletions across 4 files&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Outcome&lt;/strong&gt;: 6-14 random failures → 0 failures, 100% pass rate&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s break down how guardrails enabled this level of autonomy.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-session-timeline&quot;&gt;The Session Timeline&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-1-diagnosis-2m-12s&quot;&gt;Phase 1: Diagnosis (2m 12s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Ran full test suite once: &lt;code dir=&quot;auto&quot;&gt;npm test -- --run &gt; test-output.txt&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Identified 6-14 flaky failures across 3 test files&lt;/li&gt;
&lt;li&gt;Analyzed failure patterns (race conditions in parallel execution)&lt;/li&gt;
&lt;li&gt;Discovered root cause: shared ticker symbols (&lt;code dir=&quot;auto&quot;&gt;&apos;AAPL&apos;&lt;/code&gt;) causing database conflicts&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Guardrail in action:&lt;/strong&gt;&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Step 1: Run ONCE and save output&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm test -- --run &gt; test-output.txt 2&gt;&amp;#x26;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Step 4: Run ONLY failing test file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm test tests/api/specific-test.test.ts -- --run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The agent &lt;strong&gt;never ran the full suite repeatedly&lt;/strong&gt;. It followed the guardrail: run once, analyze, target specific failures. This saved approximately five minutes of wasted compute.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-2-implementation-1m-24s&quot;&gt;Phase 2: Implementation (1m 24s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Designed solution: file-specific ticker symbols for isolation&lt;/li&gt;
&lt;li&gt;Created unique identifiers respecting database constraints (VARCHAR(10))&lt;/li&gt;
&lt;li&gt;Updated 3 test files with new ticker constants&lt;/li&gt;
&lt;li&gt;Modified cleanup logic to filter by ticker&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Clean. Methodical. Almost suspiciously competent.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-3-iteration-1m-32s&quot;&gt;Phase 3: Iteration (1m 32s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;First attempt failed. Ticker symbols too long (&lt;code dir=&quot;auto&quot;&gt;TEST_CANDLE_CACHE&lt;/code&gt; = 17 chars &gt; 10 char limit).&lt;/p&gt;
&lt;p&gt;The agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Analyzed the VARCHAR constraint error&lt;/li&gt;
&lt;li&gt;Shortened to &lt;code dir=&quot;auto&quot;&gt;TESTCC&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;TESTCS1-3&lt;/code&gt;, &lt;code dir=&quot;auto&quot;&gt;TESTPH&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Fixed all occurrences before testing again&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;No flailing. No “let me try that again” with the exact same approach. Just methodical problem-solving.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-4-verification-1m-51s&quot;&gt;Phase 4: Verification (1m 51s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent ran the full suite three times:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run 1: 630/630 passed ✅&lt;/li&gt;
&lt;li&gt;Run 2: 630/630 passed ✅&lt;/li&gt;
&lt;li&gt;Run 3: 630/630 passed ✅&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It knew multiple successful runs were needed to prove consistency. One passing run means nothing when you’re dealing with flaky tests.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-5-documentation-2m-53s&quot;&gt;Phase 5: Documentation (2m 53s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent &lt;strong&gt;proactively documented the solution&lt;/strong&gt; without being asked:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md Addition&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## Test Isolation for Parallel Execution&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;CRITICAL&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;: Tests run in parallel by default. Ensure proper isolation.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;// ✅ CORRECT - Use file-specific test data identifiers&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;const TEST_TICKER = &apos;TESTCC&apos;; // Unique per test file, max 10 chars&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;beforeEach(async () =&gt; {&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;// Clean up ONLY this file&apos;s data&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span&gt;await db.delete(candleCache).where(eq(candleCache.ticker, TEST_TICKER));&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;});&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;// ❌ WRONG - Shared identifiers cause race conditions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;const TEST_TICKER = &apos;AAPL&apos;; // Other test files may use same ticker&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;await db.delete(candleCache); // Wipes ALL data, breaks parallel tests&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;aside aria-label=&quot;Self-Improvement Loop&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Self-Improvement Loop&lt;/p&gt;&lt;div&gt;&lt;p&gt;This is the self-improvement loop in action. Future agents won’t make this mistake. The system literally got smarter because one agent had a bad day and learned from it.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;phase-6-completion-34s&quot;&gt;Phase 6: Completion (34s)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Created GitHub issue #116 with problem/solution description&lt;/li&gt;
&lt;li&gt;Committed: &lt;code dir=&quot;auto&quot;&gt;fix(tests): isolate parallel test execution for #116&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Created PR #117 with detailed description&lt;/li&gt;
&lt;li&gt;Invoked code-reviewer subagent&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All the paperwork. All the process. All without being reminded.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;what-would-have-gone-wrong-without-guardrails&quot;&gt;What Would Have Gone Wrong Without Guardrails&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;the-ralph-wiggum-approach&quot;&gt;The Ralph Wiggum Approach&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Imagine running this same task with a stateless loop and no guardrails:&lt;/p&gt;
&lt;aside aria-label=&quot;Chaos Mode&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Chaos Mode&lt;/p&gt;&lt;div&gt;&lt;p&gt;&lt;strong&gt;Iteration 1&lt;/strong&gt;: Agent runs tests, sees failures, tries random fix
&lt;strong&gt;Iteration 2&lt;/strong&gt;: Different failures, tries another random fix
&lt;strong&gt;Iteration 3&lt;/strong&gt;: Breaks something else, reverts, tries again
&lt;strong&gt;Iteration 4-20&lt;/strong&gt;: Thrashing between approaches like a confused roomba
&lt;strong&gt;Iteration 21&lt;/strong&gt;: Finally stumbles on isolation, but uses 20-char identifiers
&lt;strong&gt;Iteration 22-30&lt;/strong&gt;: Debugging VARCHAR constraint without understanding why
&lt;strong&gt;Eventually&lt;/strong&gt;: Maybe succeeds. Maybe “overbakes” by refactoring the entire test suite.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 1-2 hours of compute
&lt;strong&gt;Quality&lt;/strong&gt;: Unknown. No review, no documentation.
&lt;strong&gt;Learning&lt;/strong&gt;: None. No guardrails updated.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;the-guardrailed-approach&quot;&gt;The Guardrailed Approach&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Phase 1&lt;/strong&gt;: Systematic diagnosis following documented procedure
&lt;strong&gt;Phase 2&lt;/strong&gt;: Solution designed with constraints in mind
&lt;strong&gt;Phase 3&lt;/strong&gt;: Quick iteration when first attempt fails
&lt;strong&gt;Phase 4&lt;/strong&gt;: Verification with multiple runs
&lt;strong&gt;Phase 5&lt;/strong&gt;: Documentation for future benefit
&lt;strong&gt;Phase 6&lt;/strong&gt;: Proper issue/PR workflow with review&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Time&lt;/strong&gt;: 10 minutes
&lt;strong&gt;Quality&lt;/strong&gt;: Verified by tests and code review
&lt;strong&gt;Learning&lt;/strong&gt;: Guardrails updated for future agents&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Same problem. Wildly different outcomes.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;key-guardrails-that-enabled-autonomy&quot;&gt;Key Guardrails That Enabled Autonomy&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;process-guardrails&quot;&gt;Process Guardrails&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Step 1: Run ONCE and save output&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm test -- --run &gt; test-output.txt 2&gt;&amp;#x26;1&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Step 4: Run ONLY failing test file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;npm test tests/api/specific-test.test.ts -- --run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Saved approximately five minutes by avoiding repeated full test runs.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;quality-guardrails&quot;&gt;Quality Guardrails&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## Pre-Commit Checklist&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] GitHub issue exists and referenced&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Tests pass&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Commit follows conventional format&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Agent created issue, linked commits, followed conventions. All without prompting.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;safety-guardrails&quot;&gt;Safety Guardrails&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## Never Do This&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Run full test suite repeatedly to debug&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Hardcode or assume GitHub repo owner/name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Skip code review after PR creation&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;The “never do this” list is just as important as the “do this” list. Maybe more important.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;permission-to-iterate&quot;&gt;Permission to Iterate&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;If you encounter repeat failures doing the same thing, explain what&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;you think might be happening, and try another approach.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Agent tried multiple approaches without giving up after first failure. It had explicit permission to fail, learn, and try again.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;results&quot;&gt;Results&lt;/h2&gt;&lt;/div&gt;






























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Metric&lt;/th&gt;&lt;th&gt;Before&lt;/th&gt;&lt;th&gt;After&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Pass rate&lt;/td&gt;&lt;td&gt;98.7-99.2%&lt;/td&gt;&lt;td&gt;&lt;strong&gt;100%&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Random failures&lt;/td&gt;&lt;td&gt;6-14&lt;/td&gt;&lt;td&gt;&lt;strong&gt;0&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Test duration&lt;/td&gt;&lt;td&gt;~7-9s&lt;/td&gt;&lt;td&gt;~8-9s (no impact)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Consistency&lt;/td&gt;&lt;td&gt;Flaky&lt;/td&gt;&lt;td&gt;&lt;strong&gt;3+ perfect runs&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Plus: comprehensive documentation added to AGENTS.md for future reference.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-autonomy-spectrum&quot;&gt;The Autonomy Spectrum&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;This session demonstrates high autonomy:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Low Autonomy                                    High Autonomy&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;│────────────────────────────────────────────────────────────│&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;│                                                         ✓   │&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Micromanaged        Guided           Supervised      Autonomous&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;(step-by-step)   (with hints)    (check-ins)      (goal-oriented)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;What made this possible:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Clear goal: “Fix the flaky tests”&lt;/li&gt;
&lt;li&gt;Comprehensive guardrails: AGENTS.md with 400+ lines&lt;/li&gt;
&lt;li&gt;Tool access: Git, GitHub API, file operations, test execution&lt;/li&gt;
&lt;li&gt;Feedback loops: Test results, git status, diagnostics&lt;/li&gt;
&lt;li&gt;Trust boundaries: Agent can commit/push, human approves merge&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The agent had everything it needed to succeed. And crucially, it had constraints that prevented it from doing something catastrophically stupid.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;lessons-learned&quot;&gt;Lessons Learned&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;guardrails-enable-not-restrict&quot;&gt;Guardrails Enable, Not Restrict&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Bad guardrail&lt;/strong&gt;: “Always use AAPL as the test ticker symbol.”
&lt;strong&gt;Good guardrail&lt;/strong&gt;: “Use file-specific test data identifiers to prevent race conditions.”&lt;/p&gt;
&lt;p&gt;The good guardrail explains the principle and provides an example, but lets the agent choose specifics. It’s the difference between “paint this wall blue” and “make sure the wall color complements the furniture.”&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;document-the-why&quot;&gt;Document the “Why”&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;The agent added:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md Addition&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;### Why Not Use Transactions?&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;While transaction rollback isolation seems ideal, it has drawbacks:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Requires complex transaction context management&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Interferes with code that uses its own transactions&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Harder to debug when tests fail&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;File-specific identifiers are simpler, faster, and more reliable.&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This isn’t just a solution. It’s decision documentation. Future agents won’t waste time re-exploring rejected alternatives.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;checklists-beat-instructions&quot;&gt;Checklists Beat Instructions&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Instead of prose instructions, use scannable checklists:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## Pre-Commit Checklist&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] GitHub issue exists and referenced&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Tests pass&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; [ ] Commit follows conventional format&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Checklists are non-linear. The agent can verify nothing was missed. Prose instructions are easy to skim and miss details.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-guardrail-paradox&quot;&gt;The Guardrail Paradox&lt;/h2&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;More structure enables more freedom.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This sounds backwards until you think about it. By providing comprehensive guardrails, we enabled the agent to work completely autonomously for 10 minutes. No hand-holding. No micromanagement.&lt;/p&gt;
&lt;p&gt;The agent diagnosed a complex race condition, tried multiple solutions, implemented the optimal fix, verified it worked, documented the pattern, created an issue and PR, and invoked code review.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;All without a single human intervention.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The guardrails didn’t restrict the agent. They gave it the confidence to act. They provided the boundaries within which it could operate freely. Like bumpers at a bowling alley. You’re not limiting the game. You’re making it possible to play without constant gutter balls.&lt;/p&gt;
&lt;p&gt;This is the future: humans set goals, guardrails guide execution, AI agents do the work, and the system gets smarter with each problem solved.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;em&gt;See &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering&quot;&gt;Effective AI-Augmented Development&lt;/a&gt; for the full framework, or &lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;Scaling to Parallel Agents&lt;/a&gt; for running multiple agents simultaneously.&lt;/em&gt;&lt;/p&gt;</content:encoded><category>ai</category><category>autonomous-agents</category><category>guardrails</category><category>testing</category><category>case-study</category></item><item><title>Stop Prompting, Start Steering</title><link>https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering/</link><guid isPermaLink="true">https://kfr.mr-rejstrom.workers.dev/blog/stop-prompting-start-steering/</guid><description>AI agents have the patience of a saint, the work ethic of a caffeinated squirrel, and the long-term memory of a goldfish. The fix isn&apos;t better prompting — it&apos;s treating them as workflow executors who need documentation, procedures, and constraints.

</description><pubDate>Thu, 08 Jan 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;em&gt;Or: How to vibe-code without going mad&lt;/em&gt;&lt;/p&gt;
&lt;aside aria-label=&quot;Series Introduction&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Series Introduction&lt;/p&gt;&lt;div&gt;&lt;p&gt;This post is the first in a series on effective AI-Augmented Development: Steering, Guardrails, and the Human Orchestrator.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h2 id=&quot;the-proof-is-in-the-pudding&quot;&gt;The Proof is in the Pudding&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Over the 2025 Christmas holiday, I vibecoded two fully working applications on and off across about two weeks. The result? Over 100 closed issues and merged PRs, with only a single revert (before the I got the proper guardrails in place) and just one PR that failed to achieve its goals. This series documents the approach that made that possible.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-problem-with-prompting-alone&quot;&gt;The Problem with Prompting Alone&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Every new chat session with an AI agent is like waking up with no memory of how you got there. Except you’re not the one with amnesia. Your AI companion is. Every. Single. Time.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Hey, remember yesterday when I explained our entire architecture? The testing conventions? The part where I specifically said ‘never touch the database migrations without asking first’?”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The AI stares at you with the enthusiasm of a golden retriever who just discovered a tennis ball. &lt;em&gt;“I’d be happy to help you with your database migrations!”&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;AI agents have the patience of a saint, the work ethic of a caffeinated squirrel, and the long-term memory of a goldfish with a head injury. That’s a dangerous combination.&lt;/p&gt;
&lt;p&gt;The fix isn’t better prompting. It’s treating your AI agents like what they actually are: &lt;strong&gt;workflow executors who need documentation, procedures, and constraints&lt;/strong&gt;. You know, like training a very eager, very powerful puppy that can accidentally delete your production database.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-steering-and-guardrails-approach&quot;&gt;The Steering and Guardrails Approach&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;AI agents follow explicit rules better than implicit expectations. This shouldn’t surprise anyone who’s ever tried to explain “just use common sense” to a literal machine.&lt;/p&gt;
&lt;p&gt;Instead of “write good tests” (which is about as useful as telling someone to “just be funnier”), you document:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Where test files go (&lt;code dir=&quot;auto&quot;&gt;tests/api/&lt;/code&gt; or &lt;code dir=&quot;auto&quot;&gt;tests/ui/&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;When to write them (before implementation, always, no exceptions. TDD)&lt;/li&gt;
&lt;li&gt;How to verify them (run once, save output, analyze)&lt;/li&gt;
&lt;li&gt;What makes a good test (deterministic, covers edge cases)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This shift from conversational prompting to structured steering is the difference between asking your assistant to “help with the problem” versus handing them a detailed manual with exact steps.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;three-layers-of-control&quot;&gt;Three Layers of Control&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-1-master-steering-document-agentsmd&quot;&gt;Layer 1: Master Steering Document (AGENTS.md)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;At the repository root sits &lt;code dir=&quot;auto&quot;&gt;AGENTS.md&lt;/code&gt;. Think of it as the sacred constitution that governs your entire development workflow. (For more on this convention, see &lt;a href=&quot;https://agents.md/&quot;&gt;agents.md&lt;/a&gt;.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Golden Rules&lt;/strong&gt; — The non-negotiable commandments:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;1.&lt;/span&gt;&lt;span&gt; GitHub Issue First - No work without an issue.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;2.&lt;/span&gt;&lt;span&gt; Tests Before Code - Write tests, &lt;/span&gt;&lt;span&gt;_&lt;/span&gt;&lt;span&gt;then&lt;/span&gt;&lt;span&gt;_&lt;/span&gt;&lt;span&gt; implement.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;3.&lt;/span&gt;&lt;span&gt; One Thing At A Time - Single feature per PR.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;4.&lt;/span&gt;&lt;span&gt; No Secrets - Use environment variables.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;5.&lt;/span&gt;&lt;span&gt; Debug Efficiently - Run tests once, analyze output.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Architecture Overview&lt;/strong&gt; — The map of your system:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;| Component | Tech | Location | Key Pattern |&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;|-----------|------|----------|-------------|&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;| Frontend  | React + Vite | apps/web | Hooks only |&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;| Backend   | Hono + Node  | apps/api | process.env.PORT |&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;| Database  | PostgreSQL   | packages/db | Drizzle ORM |&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;aside aria-label=&quot;Without Explicit Procedures&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Without Explicit Procedures&lt;/p&gt;&lt;div&gt;&lt;p&gt;Agents will wander into random files, tackle three different features simultaneously, and cheerfully ignore the architecture you spent hours designing. They’ll create PRs that touch seventeen unrelated files and somehow break things that weren’t even connected to what they were working on.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-2-skill-files-task-specific-procedures&quot;&gt;Layer 2: Skill Files (Task-Specific Procedures)&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;For common tasks, you create “skill files.” These are procedural guides that turn complex operations into repeatable recipes. (Check out &lt;a href=&quot;https://skills.sh/&quot;&gt;skills.sh&lt;/a&gt; for more on this pattern.)&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;.claude/skills/api-endpoint/SKILL.md&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;name&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;api-endpoint&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;description&lt;/span&gt;&lt;span&gt;: &lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;span&gt;Use ONLY when creating API routes.&lt;/span&gt;&lt;span&gt;&quot;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;---&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Procedural Steps&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## 1. Ensure validation schemas exist&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Check packages/types for schemas.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;If missing, use validation-schema skill first.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## 2. Create route file&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Location: apps/api/src/routes/&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;#x3C;&lt;/span&gt;&lt;span&gt;resource&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;.ts&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## 3. Register route&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Edit apps/api/src/index.ts to mount route.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## 4. Write tests&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;Location: tests/api/&lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;#x3C;&lt;/span&gt;&lt;span&gt;resource&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;.test.ts&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Four to six skill files cover 85% of development tasks. Each one transforms a 30-minute adventure with potential disasters into a 5-minute task done correctly.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;layer-3-automated-quality-gates&quot;&gt;Layer 3: Automated Quality Gates&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Documentation guides behavior. Automation enforces it with the cold, unfeeling efficiency of a tax audit.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CI Pipeline&lt;/strong&gt; — Every PR runs lint, typecheck, test, build. Nothing merges without green checks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code Review Agent&lt;/strong&gt; — A specialized subagent reviews every PR:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Code Review Checklist&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Tests present for all changes&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; No hardcoded secrets&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Follows architecture patterns&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Handles edge cases&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-speed-vs-quality-tradeoff&quot;&gt;The Speed vs Quality Tradeoff&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;Tools that automate agent workflows optimize for &lt;strong&gt;speed over quality&lt;/strong&gt; and &lt;strong&gt;generality over specificity&lt;/strong&gt;. They’re like “one size fits all” solutions that technically work for everyone but work well for no one.&lt;/p&gt;
&lt;p&gt;Several projects have emerged to push agents harder and longer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://ghuntley.com/ralph/&quot;&gt;Ralph Wiggum Loop&lt;/a&gt;&lt;/strong&gt; — A bash script that resets context each iteration, maintaining state only through the filesystem and git. Loops until a “done” condition is satisfied. Requires YOLO mode.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/code-yeongyu/oh-my-opencode&quot;&gt;Oh My OpenCode&lt;/a&gt;&lt;/strong&gt; — A plugin for OpenCode that orchestrates multiple specialized agents (Oracle for debugging, Librarian for docs, etc.) with a “Sisyphus” agent that keeps rolling until the task is done. Features like “ultrawork” mode let it run autonomously for hours.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&quot;https://github.com/obra/superpowers&quot;&gt;Superpowers&lt;/a&gt;&lt;/strong&gt; — A skills-based workflow that enforces brainstorming before coding, creates detailed implementation plans, and uses subagent-driven development with two-stage code review. Emphasizes TDD and structured execution.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These tools share a common philosophy: let the agent keep working until it’s done. The question is whether “done” means “actually working” or “the agent said so.”&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-ralph-wiggum-loop&quot;&gt;The Ralph Wiggum Loop&lt;/h3&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;Named after The Simpsons character whose dim-witted persistence occasionally produces results despite complete lack of awareness.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The pattern:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Reset context window each iteration (avoid context rot)&lt;/li&gt;
&lt;li&gt;Maintain state only through filesystem and git&lt;/li&gt;
&lt;li&gt;Loop until “done” condition is satisfied&lt;/li&gt;
&lt;li&gt;Requires YOLO mode (&lt;code dir=&quot;auto&quot;&gt;--dangerously-skip-permissions&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;aside aria-label=&quot;Critical Warning&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Critical Warning&lt;/p&gt;&lt;div&gt;&lt;p&gt;When your development approach requires a flag with “dangerously” in the name, you’re not engineering. You’re gambling.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;p&gt;&lt;strong&gt;The pitfalls are significant:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Overbaking&lt;/strong&gt;: Agents spend hours on impossible tasks&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sycophancy loops&lt;/strong&gt;: Agents may delete tests to make them “pass”&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Governance void&lt;/strong&gt;: No human oversight during execution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Context blindness&lt;/strong&gt;: Every iteration forgets the last three hours of debugging&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;&lt;h3 id=&quot;why-issue-driven-development-is-superior&quot;&gt;Why Issue-Driven Development is Superior&lt;/h3&gt;&lt;/div&gt;





























&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Ralph Wiggum Loop&lt;/th&gt;&lt;th&gt;Issue-Driven Development&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Fire and forget&lt;/td&gt;&lt;td&gt;Scoped to single issue&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;YOLO mode required&lt;/td&gt;&lt;td&gt;Permissions preserved&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;No review until “done”&lt;/td&gt;&lt;td&gt;Sub-agent review before human sees PR&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Completion = agent says so&lt;/td&gt;&lt;td&gt;Completion = tests pass + review approved&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;Governance void&lt;/td&gt;&lt;td&gt;Quality gates at every step&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Speed without quality is technical debt at 10x velocity. An agent that ships broken code fast is worse than an agent that ships working code slower.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-sweet-spot-scoped-autonomy&quot;&gt;The Sweet Spot: Scoped Autonomy&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Here’s the thing: these tools aren’t bad. The patterns they use — specialized subagents, persistent execution, structured workflows — are genuinely powerful. The danger is letting them orchestrate &lt;em&gt;everything&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Use these superpowers &lt;em&gt;within&lt;/em&gt; a single, well-scoped issue. Let the agent brainstorm, plan, and execute autonomously — but on a task you’ve defined, with guardrails you’ve set, and with a PR that gets reviewed before merging. That’s the difference between “agent as tireless implementer” and “agent as unsupervised architect.”&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The best results come from combining autonomous execution patterns with issue-driven scope. Let them cook — just make sure you picked the recipe.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-human-orchestrator-role&quot;&gt;The Human Orchestrator Role&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;With proper steering, your role shifts from writing every line of code to orchestrating parallel work streams.&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;Terminal Commands&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Terminal 1: Main worktree - monitoring your domain&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wt&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;list&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;# Terminal 2-4: Feature worktrees - your agents at work&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-o&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;42&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on authentication&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-o&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;43&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on data export&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;wti&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-o&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;44&lt;/span&gt;&lt;span&gt;  &lt;/span&gt;&lt;span&gt;# Agent works on UI improvements&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;You’re not writing most of the code anymore. You’re:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Deciding which tasks to assign&lt;/li&gt;
&lt;li&gt;Unblocking agents when they get stuck&lt;/li&gt;
&lt;li&gt;Reviewing completed PRs&lt;/li&gt;
&lt;li&gt;Making architectural decisions&lt;/li&gt;
&lt;li&gt;Handling novel problems that require actual thinking&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It’s like managing a team of developers, except they work 24/7, never get tired, never complain about legacy code. They will, however, cheerfully refactor your entire codebase if you look away for five minutes.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;incremental-self-improvement&quot;&gt;Incremental Self-Improvement&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;The most powerful aspect of this approach: &lt;strong&gt;guardrails evolve with the project&lt;/strong&gt;.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;the-feedback-loop&quot;&gt;The Feedback Loop&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;When an agent encounters a new pattern or solves a novel problem, it updates the guardrails:&lt;/p&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md (added during debugging)&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;## Test Isolation for Parallel Execution&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;CRITICAL&lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;: Tests run in parallel by default. Ensure proper isolation.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;### Database Test Isolation Pattern&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Use file-specific test data identifiers&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Clean up ONLY this file&apos;s data in beforeEach&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; Never use production-like data (&apos;AAPL&apos;, &apos;GOOGL&apos;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;This creates a positive feedback loop:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Agent encounters problem&lt;/li&gt;
&lt;li&gt;Agent solves problem&lt;/li&gt;
&lt;li&gt;Agent documents solution in AGENTS.md&lt;/li&gt;
&lt;li&gt;Future agents (and humans) benefit&lt;/li&gt;
&lt;li&gt;System becomes more capable over time&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;h3 id=&quot;the-compound-effect&quot;&gt;The Compound Effect&lt;/h3&gt;&lt;/div&gt;



































&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;Month&lt;/th&gt;&lt;th&gt;Skills&lt;/th&gt;&lt;th&gt;AGENTS.md Lines&lt;/th&gt;&lt;th&gt;Agent Autonomy&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;100&lt;/td&gt;&lt;td&gt;Low (frequent hand-holding)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;td&gt;200&lt;/td&gt;&lt;td&gt;Medium (occasional unblocking)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;400&lt;/td&gt;&lt;td&gt;High (mostly autonomous)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;/td&gt;&lt;td&gt;10+&lt;/td&gt;&lt;td&gt;600+&lt;/td&gt;&lt;td&gt;Very High (novel problems only)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;aside aria-label=&quot;Living Knowledge Base&quot;&gt;&lt;p aria-hidden=&quot;true&quot;&gt;Living Knowledge Base&lt;/p&gt;&lt;div&gt;&lt;p&gt;The guardrails become accumulated wisdom from every problem solved — not just rules, but institutional memory.&lt;/p&gt;&lt;/div&gt;&lt;/aside&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;key-patterns-that-work&quot;&gt;Key Patterns That Work&lt;/h2&gt;&lt;/div&gt;
&lt;div&gt;&lt;h3 id=&quot;explicit-over-implicit&quot;&gt;Explicit Over Implicit&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt; “Write good code”
&lt;strong&gt;Good:&lt;/strong&gt; “Create file at &lt;code dir=&quot;auto&quot;&gt;apps/api/src/routes/&amp;#x3C;resource&gt;.ts&lt;/code&gt;, use template from skill file, register in &lt;code dir=&quot;auto&quot;&gt;apps/api/src/index.ts&lt;/code&gt;”&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;constraints-enable-creativity&quot;&gt;Constraints Enable Creativity&lt;/h3&gt;&lt;/div&gt;
&lt;p&gt;Strict rules make agents more productive:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;“GitHub issue first”&lt;/strong&gt; prevents scope creep&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;“Tests before code”&lt;/strong&gt; catches design issues early&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;“One thing at a time”&lt;/strong&gt; makes PRs reviewable&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;&lt;h3 id=&quot;procedures-over-principles&quot;&gt;Procedures Over Principles&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;TDD Procedure&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;1.&lt;/span&gt;&lt;span&gt; Write test in tests/api/&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;2.&lt;/span&gt;&lt;span&gt; Run: npm test &lt;/span&gt;&lt;span&gt;&lt;span&gt;&amp;#x3C;&lt;/span&gt;&lt;span&gt;file&lt;/span&gt;&lt;span&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt; -- --run&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;3.&lt;/span&gt;&lt;span&gt; Verify test fails (if it passes, something is wrong)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;4.&lt;/span&gt;&lt;span&gt; Implement minimal code&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;5.&lt;/span&gt;&lt;span&gt; Verify test passes&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;6.&lt;/span&gt;&lt;span&gt; Commit with conventional format&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Agents follow procedures reliably. Principles are too abstract. “Be thorough” doesn’t help. “Check these five specific things in this exact order” does.&lt;/p&gt;
&lt;div&gt;&lt;h3 id=&quot;negative-guardrails&quot;&gt;Negative Guardrails&lt;/h3&gt;&lt;/div&gt;
&lt;div&gt;&lt;figure&gt;&lt;figcaption&gt;&lt;span&gt;AGENTS.md - Never Do This&lt;/span&gt;&lt;/figcaption&gt;&lt;pre&gt;&lt;code&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Run full test suite repeatedly to debug&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Hardcode or assume GitHub repo owner/name&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; ❌ Skip code review after PR creation&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div&gt;&lt;div aria-live=&quot;polite&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/figure&gt;&lt;/div&gt;
&lt;p&gt;Knowing what NOT to do is half the battle.&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;getting-started&quot;&gt;Getting Started&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;You don’t need everything at once. Build incrementally.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Start with AGENTS.md&lt;/strong&gt;: Define golden rules, architecture overview, and development flow&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add a skill file&lt;/strong&gt; for your most common task&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Set up CI&lt;/strong&gt; for lint, typecheck, test, and build jobs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Add code review agent&lt;/strong&gt; configuration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Let the system evolve&lt;/strong&gt;: Add skills as patterns emerge&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;the-future-of-development&quot;&gt;The Future of Development&lt;/h2&gt;&lt;/div&gt;
&lt;p&gt;AI-augmented development isn’t about replacing developers. It’s about &lt;strong&gt;amplifying them&lt;/strong&gt;. You’re not being automated out of a job. You’re being promoted to orchestrator.&lt;/p&gt;
&lt;p&gt;With proper steering and guardrails:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Junior developers become more productive&lt;/li&gt;
&lt;li&gt;Senior developers become force multipliers&lt;/li&gt;
&lt;li&gt;Teams move faster with parallel execution&lt;/li&gt;
&lt;li&gt;Quality stays high with automated enforcement&lt;/li&gt;
&lt;li&gt;Knowledge compounds with self-improving guardrails&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;The future isn’t “AI writes all the code.” The real future is “humans design systems, AI implements them, automation enforces quality, and the system gets smarter over time.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;You’re not being replaced. You’re being given an army.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Try not to let them burn down the building.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;div&gt;&lt;h2 id=&quot;further-reading&quot;&gt;Further Reading&lt;/h2&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/let-it-cook&quot;&gt;Case Study: Self-Correcting Test Isolation&lt;/a&gt; - A real-world example of guardrails enabling autonomous problem-solving&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://kfr.mr-rejstrom.workers.dev/blog/from-one-agent-to-many&quot;&gt;Scaling to Parallel Agents with Git Worktrees&lt;/a&gt; - Technical deep-dive on parallel execution infrastructure&lt;/li&gt;
&lt;/ul&gt;</content:encoded><category>ai</category><category>agentic-development</category><category>steering</category><category>guardrails</category></item></channel></rss>