Hypothetical scenario. Northwind wants its support service to display a policy’s effective date. Maya requests the behavior; Dev prepares PM, architect, coder and QA stages. Priya discovers that the patch changed after QA checked it.
Maya: “The date must come from the authoritative policy, not a guessed value.”
Dev: “Each role can produce a versioned artifact for the next stage.”
Priya: “Then QA evidence must identify the exact patch and specification it checked.”
You will trace the PM → architect → coder → QA workflow as versioned proposals with explicit owners, rejection paths and recovery. The prerequisite is version-bound approval; this hypothetical exercise grants no production deployment authority.
What artifact does each role hand to the next?
The PM role produces a specification: the employee action, the accepted result and examples that distinguish success from failure. For this change, a recommendation must show the policy's effective date from an authoritative source. “Make the result clearer” is not enough. The specification should also say what happens when that date is missing or conflicting.
The architect produces a decision record about where the date comes from, how its identity travels through the service and which interface changes. The coder produces a candidate patch against a named baseline. QA produces evidence tied to that exact patch and the approved specification. Each artifact includes its input versions and its owner. A conversational statement such as “the architect agreed” is not a substitute for a retrievable decision record.
Begin with one owner for the workflow state. Several agents can propose work concurrently, but an authoritative transition decides which artifact advances. Splitting roles is useful when the separation improves task evidence or permission boundaries. If a single bounded worker and a separate review step meet the same requirements, the more elaborate topology needs another justification.
Keep the source revision in every handoff
A patch describes a change relative to a baseline. If that baseline changes, applying the same textual edit may have a different effect. Record the repository or artifact revision as an identity, but do not give the model unrestricted credentials to the production environment. The implementation workspace needs only the inputs and capabilities required for the assigned task.
The conditional-request rules in RFC 9110 illustrate why an update can depend on a representation's current version. A source-control or artifact service needs its own concrete concurrency contract. Do not claim that an HTTP precondition alone implements the whole software-release workflow. Specify which service owns the baseline check and what a stale result means.
If a baseline changes after approval, the workflow must revalidate the patch against the new state and obtain the required new evidence. An old approval can remain a historical record without remaining executable authority. This is the same principle used for a document-maintenance proposal: the object being approved is a particular change to a particular version, not the agent's role name.
Make each development handoff an immutable artifact
Hypothetical scenario. The PM supplies a versioned requirement, the architect returns a decision packet, the coder produces a patch against a named baseline and QA records evidence against that exact patch. Role names alone do not establish what was reviewed.
| Artifact | Concrete evidence | Decision boundary |
|---|---|---|
| Requirement / ADR | artifact revision, assumptions, decision | Reviewed input |
| Patch | baseline + content identity | Exact proposed change |
| QA evidence | patch identity, actual checks, disposition | Supported acceptance |
A rejection returns a reason and the artifact identity to revise. New code invalidates tests that ran against the old patch. Separate model-generated test claims from observed test results, preserving command, environment and actual outcome evidence where available. Applying the patch is a protected operation with a baseline precondition and stable identity. A lost apply reply must be reconciled at the target before another patch intention is created.
Reconcile work when stages reject an artifact
Hypothetical scenario. Choose four stages with one initial attempt each. The architect rejects the initial specification because it does not explain a missing effective date. The PM revises it once. Later, QA rejects the first patch because it displays a cached date after the policy changes. The coder revises that patch once. Stage-attempt count is 4 + 1 + 1 = 6.
That count is not six deployed changes. It records attempted stage work in this invented trace. The accepted specification and accepted patch are new versions. Keep the rejected versions and reasons as evidence of the decision path, with an appropriate retention policy; do not silently overwrite them and leave an approval pointing to an object that has changed.
Set both per-stage and whole-run budgets. A coder might have attempts remaining while the overall deadline has expired. A QA rejection may require a specification change rather than another code attempt. The orchestrator should route the rejection to the owner of the violated condition instead of bouncing the same unresolved task indefinitely between roles.
A reviewer needs observable test evidence
For the policy-date change, define cases before examining a polished demonstration. Include a current policy, a missing date, a conflicting revision, a restricted source and a policy changed between retrieval and display. A test result must identify its input case, artifact version and observed behavior. “The QA agent approves” is a generated conclusion unless supported by recorded checks.
Separate mechanical evidence from judgment. A schema check may establish that a date field exists. It does not establish that the field belongs to the policy cited in the recommendation. A reviewer should trace that relationship to the authoritative artifact and reject a plausible date copied from another source. Passing a screenshot review cannot replace the service's data and permission checks.
Execution belongs in a bounded environment. Remove production credentials, restrict network access, bound CPU and time, and preserve only the required outputs. A test runner is still a tool whose result can be incomplete or malformed. Keep the sandbox policy independent of the agent's instructions, and mark an interrupted test as inconclusive rather than inventing a pass.
The apply succeeds while its response disappears
Hypothetical failure scenario. An authorized executor applies the accepted patch to the artifact store, but its response never reaches the workflow worker. The worker restarts with a dispatched operation and no stored completion. Generating a new patch and applying it again can produce a second effect or obscure which version is authoritative.
Preserve the stable operation identity and inspect authoritative operation status or read back the target artifact under the service's actual guarantees. If those observations establish the outcome, record them as reconciliation evidence. If they cannot, stop with an unresolved state and the information needed for an authorized decision. Remaining retry budget does not make the effect absent.
Cancellation has the same boundary. Stopping a local worker cannot undo a remote operation that already committed. Revoke undispatched work, record cancellation intent and reconcile dispatched effects. The workflow should distinguish proposed, approved, dispatched, confirmed and unresolved states rather than representing all of them with a single “done” flag.
Know when the extra roles are worth their cost
Use the role split when artifacts, expertise or authority genuinely differ. It can make a change easier to inspect by giving each decision an owner and a visible handoff. It can also add model calls, stale context and opportunities for inconsistent assumptions. Compare it with a simpler worker-and-reviewer baseline under the same task and acceptance conditions.
Do not confuse multiple agents agreeing with independent verification. They may share the same incorrect specification or source. Nor does an architect role imply permission to change any interface, or a QA role permission to deploy. Authorization remains a runtime contract. The example provides a design for bounded work, not evidence that autonomous software development is safe for every change.
Test the requirement / adr boundary
QA approved patch A, but patch B is applied after a small model edit. What was lost?
Reveal the design reasoning
The link between approval, tests and executed content. Re-run the required review for B and check its baseline. A small textual edit is still a different artifact.
Decision: Keep artifact identity, rejection and protected apply evidence through every role.
Check the artifact, not the role label
QA approves a candidate patch, then the coder changes one line. Does the approval still authorize applying it?
No. The new patch is a different artifact version. Repeat the checks and approval required for that version. A small textual change can still alter the effect the reviewer evaluated.
The worker has no apply response and still has one retry left. Should it create a new operation identity?
No. Reconcile the dispatched operation first. A new identity may bypass deduplication and repeat an effect that already happened. Retry allowance does not resolve uncertainty.
The chosen trace has six stage attempts. Can the team claim it completed six useful software changes?
No. Four initial stages and two revisions produced the six attempts. The ledger must distinguish effort, artifact versions, accepted changes and actual applied effects.
Keep a three-line decision log
Decision: hand off immutable specification, decision, patch and QA artifacts under one workflow owner.
Reason: approvals and test results must describe the exact effect that can be applied.
Reconsider when: a simpler execution path provides equivalent evidence, or a changed baseline invalidates the accepted artifact.
Go deeper into conditional effects and control
- Book chapter: AI Engineering, chapter 6: RAG and Agents — Chip Huyen. Connect bounded agent orchestration to permissioned document edits.
- Book chapter: AI Engineering, chapter 10: AI Engineering Architecture and User Feedback — Chip Huyen. Connect bounded agent orchestration to permissioned document edits.
- Video lecture: What Durable Execution Changes for Developers | Temporal — Techstrong TV. Use durable execution to locate restart and reconciliation boundaries around an approved action.
- Primary specification: RFC 9110: HTTP Semantics — Roy Fielding, Mark Nottingham and Julian Reschke. Read conditional request behavior alongside the actual document API.
Carry the decision forward
Northwind can now follow a versioned workflow to its accepted artifact. Page 30 turns to the serving work underneath these calls, separating waiting for a first token from gaps between later tokens.