Course outline
Agentic Engineering: the hands-on course · Module 6: Agentic engineering in teams
Code review and ownership when agents write the code
An agent can write the code, but it can't own it. Set a simple ownership rule, make agent involvement visible in pull requests, and keep reviewers from drowning.
Lesson 22 / 24 · ⏱ 8 min
When agents write a growing share of the code, two things quietly break. Authors stop feeling responsible for code they didn’t type. Reviewers get more pull requests, bigger ones, and start rubber-stamping.
Both problems have the same root: nobody decided who owns agent-written code. So decide it.
One rule: whoever opens the PR owns it
I use a single rule on every team I work with. The person who opens the pull request owns every line in it, exactly as if they had typed it. “The agent wrote that” is never an answer in review.
- Author briefsScope and acceptance criteria
- Agent buildsCode, tests, summary
- Author reviewsFull self-review first
- PR with contextBrief, map, open questions
- Peer reviewHuman judgment, not a rerun
↺ Review findings go back to the author, who re-briefs the agent or fixes by hand
The middle step is where teams cut corners. If the author hasn’t read the diff, the reviewer is doing the author’s job, and doing it with less context.
Make agent involvement visible
Hiding that an agent wrote the code helps nobody. Reviewers read differently when they know: they look harder at tests, edge cases and invented dependencies.
## What and why
Adds CSV export to the invoices page. Closes the ticket linked below.
## How this was built
Agent-assisted. I wrote the brief (linked) and reviewed every file.
Agent wrote: export service, tests. I rewrote: the date formatting.
## Where to look
- core logic: services/export.ts (column mapping, escaping)
- tests: export.test.ts, includes quotes and commas in fields
- mechanical: route registration, imports
## Not verified
- Exports over 10k rows (no fixture that large yet)
The “Where to look” block comes straight from the review guide you ask the agent for, covered in Module 4. The author checks it, then passes it on.
✕ Review theatre
- –Author opens the PR without reading it
- –One 1,500-line PR per agent run
- –Reviewer re-prompts an agent to review it and approves
- –Changed tests pass without comment
- –Nobody can explain a design choice
✓ Real ownership
- +Author self-reviews before requesting review
- +PRs sized for a human to read in one sitting
- +AI review is a first pass; a human still decides
- +Any changed test gets a sentence of justification
- +Author can defend every decision, whoever typed it
Who owns what: check yourself
🧠 Ownership scenarios
Score: 0 / 4
1. A bug ships in code an agent wrote and the author only skimmed. Who owns the fix?
2. An AI review bot approves a PR with no comments. What should happen?
3. A reviewer asks why the agent picked a new library. The author doesn't know. Best move?
4. An agent run produced a 2,000-line PR touching three features. What do you do?
Before you move on
✅ Key takeaways
0 / 5 completed