Orchestrate agents without the codebase rotting
Lesson 5 of 5 — keep one coherent system while the agent does the typing.
How to give an agent the right context, set guardrails that prevent drift, and close every task with a verification step that catches rot early.
Prerequisites
Lessons 1–4 — architecture, spec, decomposition, and review are the moves this loop sequences.
Agent orchestration
Running coding agents across a codebase while keeping it coherent — context, guardrails, and a verification loop that catches drift.
Want the full picture? Open the reference →
The loop
Every move in this course is one phase of a single loop you run per task. Run it tight and a codebase stays coherent at high speed; run it loose and it rots into something nobody, including you, understands.
CONTEXT → give the agent the architecture sketch, the contracts it must honour, and the 2–3 real files to match. Relevant beats abundant.TASK → one decomposed, spec-driven task with its acceptance check.REVIEW → run the rubric. Reject or refine; do not "fix it yourself" silently.VERIFY → run the test / the app. Green, or it is not done.INTEGRATE→ commit the small, reviewed unit. Then the next task builds on trust.Guardrails that prevent drift
- Pin the conventions — point the agent at the files and patterns to match, every task. Left alone, it invents a second style.
- Constrain the blast radius — "touch only these files" keeps a task reviewable and stops silent edits elsewhere.
- Keep context relevant — feed the contracts and the few real files, not the whole repo. Noise dilutes the target.
- Verify before you trust the next layer — an unverified task is a cracked foundation the rest of the feature is poured onto.
Milestone· closes the promise from step 1
You can direct the build now
Architecture, spec, decomposition, review, orchestration — the full senior loop. You can hand the typing to a model and stay the author of the system: the one who decided its shape and can prove it is right. That is the job the AI era actually pays for, and it is yours.
Path
Back to the path
See where this sits in "Production software, built with AI".
Concepts covered · 2
More like this
Review what comes back like a senior
Models produce confident, plausible, well-formatted code — which is exactly what makes their mistakes dangerous. This lesson is the review rubric: the specific failure classes to hunt for, because "it looks right" is not review.
Structure & style the app
Lay down the HTML skeleton and a calm dark style for a todo app. No JavaScript yet — just the shape, so the behaviour you add next has somewhere to live.
Write the spec the model can hit
A prompt is a specification. The difference between a junior and a senior prompt is the constraints a senior names that a junior leaves to chance. This lesson turns your architecture sketch into a prompt that produces reviewable code.
Liked this one?
Pass it on
Discussion
Be the first to ask
Your questions stay private with the team. We can pin answers to share with everyone.
Sign in to ask a question privately on this tutorial.
Sign inNo pinned answers yet for this tutorial.