Back to Research

An AI coding workflow that holds up under audit

An AI coding workflow built on receipts: child receipt blocks, decision stubs, scope ledgers, and precedence files that survive audit.

View of the Hudson River Valley from Olana, landscape painting by Frederic Edwin Church (1867).
Rogier MullerApril 15, 20266 min read

An AI coding workflow holds up under audit when every step leaves a receipt a reviewer can read later. An AI coding workflow is the agreed loop your agent-assisted changes follow from prompt to merge: brief, edit, verify, receipt, review. The thing that breaks first under pressure is not the agent. It is your ability to explain, weeks later, why a change was safe to ship.

This matters most during a crunch week, when summaries shrink to a few bullets and the agents keep landing diffs anyway. The bottleneck quietly moves from typing speed to traceability, right when nobody has time to rebuild it. If you build the workflow for that week instead of the calm ones, the calm weeks take care of themselves.

Why receipts beat trust

Trust does not scale when the reasoning stays in chat. A faster agent just moves the review queue to the part of your system that cannot read chat: the reviewer six commits later, the auditor next quarter, you on a Monday.

The hard case is the unlabeled fence. Agent diffs remove and rebuild guardrails constantly, and a reviewer who cannot see why a guardrail moved has two bad options: block everything or approve everything. Neither is a workflow.

So make traceability cheap before you make generation fast. The four patterns below each turn one common failure into a small artifact you can paste into a PR or a rules file today.

The four receipts your audit will ask for

Each pattern targets a specific way agent work goes opaque.

Recursive handoff blur. Chained agents return summaries that drop the paths a child touched. It is the telephone game, except the players have commit access. The fix is a child receipt block: every child returns the paths it changed, the commands it ran, and the tests proving its regression guards. Parents stop green-lighting mystery diffs.

Review queue theater. CI is green, and reviewers still ask "why this approach?" with no written answer anywhere. The fix is a decision stub. Your PR template forces three lines: constraints considered, rejected alternatives, verification proof. The fence gets a label before anyone is asked to move it.

Cursor scope fog. Teams shipping Cursor agent work weekly watch .mdc rules sound precise until two reviewers argue about what a rule meant. Rules compete with chat memory and lose. The fix is a scope ledger: the parent chat carries five lines, goal, allowed paths, forbidden paths, verification command, merge owner. Review checks the ledger against the diff instead of relitigating the prompt.

Claude permission creep. On shared laptops, Claude Code bash approvals become muscle memory, and permission literacy needs something file-backed to point at. The fix is a CLAUDE.md supremacy clause. The top of CLAUDE.md states which hooks win, which folders require human eyes, and where temporary overrides live. Sessions stop inventing policy mid-run.

Here is a delegation boundary snapshot you can drop in and adapt. It names what each agent owes the next reviewer.

---
description: Delegation boundary snapshot (adapt globs to your repo)
globs:
  - "**/*"
alwaysApply: false
---

- Cursor: keep scopes explicit in `.mdc`; forbid undeclared MCP domains.
- Claude Code: cite `CLAUDE.md` precedence before expanding bash scope.
- Codex: ensure `AGENTS.md` carries replay-friendly verification notes for CLI runs.

The review gate is where this pays off: parallel agent output should be inspectable without replaying a single session. The companion patterns live on the agentic coding governance page, and specs and tests as the stable stack covers the contract these receipts get checked against.

Audit questions worth answering from the PR body alone

An auditable workflow answers these four without anyone reopening the chat. If your PR body cannot, you have found the gap.

Gate Question
Replay proof Which commands prove the regression guards?
Receipt match Does the PR body list scopes plus a verification transcript?
Rules precedence Which .mdc, SKILL.md, or CLAUDE.md governed behavior?
Connector truth Which MCP servers fired, and were they expected?

Agents are relief crews. The blueprint still belongs to the humans standing outside the trench. If your repo cannot state its boundaries plainly, agents will guess, and guessing is the one behavior that gets worse as you scale it.

Pick one pattern to standardize next

You do not need all four at once. The fastest start is the child receipt block, since it produces the artifact every other pattern reuses. Turn it into a .mdc rule, an AGENTS.md note, a subagent receipt, or a review checklist before your next automated run, then compare the receipt-first loop against your current Cursor review path. Keep whichever leaves the shorter auditable trail.

Common questions

What does a good AI coding workflow look like? It is a loop where every step leaves an artifact. A scope ledger goes in before the run, receipts and transcripts during it, a decision stub in the PR, and precedence files in the repo. The honest test is whether a reviewer can defend the merge without replaying the chat history.

How do we audit agent work after the fact? From the receipts, not from memory. Child receipt blocks list the paths, commands, and regression tests; decision stubs preserve the constraints and rejected alternatives; the scope ledger shows what was allowed. When those artifacts are missing, the audit turns into archaeology, and archaeology during crunch week simply does not happen.

How do we make AI-written code easier to review? Shrink what the reviewer has to reconstruct. Ship the verification command and its output alongside the diff, keep the scopes in the PR body, and label every removed guardrail with the reason it moved. Reviewers move fast when the narrative arrives with the change instead of living in someone's chat tab.

Which pattern should a Cursor team adopt first? Start with the scope ledger if reviewers keep arguing about what .mdc rules meant, or the child receipt block if chained agents return diffs nobody can trace. Both are five lines or fewer. You can add the decision stub and the CLAUDE.md clause once the first one sticks. Browse the training topics to see where each fits.

Next step

Pick the one failure that bit you last week and write its receipt into your repo today. When you want the full loop as a checklist your next audit can run against, read the white paper.

Further reading

Related training topics

Related research

Ready to start?

Transform how your team builds software.

Book a 15-minute sync