Documenting an AI Architecture for Handoff: One Document per Reader, a Handoff Gate and Rules With a Reason
On handoff day the platform team asks how to run the clause search at night, and the builders have moved on. Write one document per reader, check the handoff package for five elements before the team takes over, and keep the reasons behind every rejected option.
What you will learn
- Write one document per reader: summary, implementation guide, runbook and decision record
- Run a handoff gate over five artifacts and block the handoff while any element is missing
- Keep rejected options and a revisit trigger in the decision record
- Write implementation guidance as a rule, a reason and a check
Before you start
- The Claude app life cycle
- Discovery for an AI project
Picture handoff day for an insurance clause search. The platform team opens the architecture and asks: how do I run it at night? The builders can't answer, because they've moved on to the next project.
So the documents have to answer for you. This lesson covers three things: the readers, the documents, and the guidance. And it starts with the architect's first question about any document: who will read this?
The project is plain Python with no model call. It's a handoff gate, a decision-record checker and three implementation rules, all from the example clause search.
One system, three questions
When the clause search moves to a new team, the questions start. A developer asks how to change it safely. The platform team asks how to run it at night. An auditor asks why it was built this way. All three are looking at the same architecture, and each wants a different answer. One document for everyone fits no one, so you write one for each reader.
Think about a house. The owner reads the floor plan. The electrician reads the wiring diagram. The caretaker reads the maintenance manual. The inspector reads the permit file. The electrician never needs the floor plan, and the owner never needs the wiring.
Draw the system once
All those documents start from one picture. A claims handler asks a question. Retrieval finds the policy clauses. Claude answers from them. The answer cites its source clause. And a person decides on every payout, so the model never approves one.
The picture marks three more things. Where it can fail: the wrong clause. Where you measure it: the wrong-clause rate, so you catch it early. And the trust boundary: a person owns payouts, not the model. Feedback comes back around to the start, so you can fix what you measure. Components, data flow, trust boundaries and failure points, drawn once.
The handoff gate: handoff.py
The team that runs the system needs five artifacts in hand, each with one element they can't run without:
# The handoff package and its gate.
PACKAGE = [ # artifact, element inside it
("decision record", "rejected options"),
("assumptions log", "who checks each assumption"),
("dependency list", "an owner for each dependency"),
("runbook", "night alert steps"),
("eval baseline", "the pass line"),
]
FIRST_TRY = {"rejected options", "the pass line"}
SECOND_TRY = FIRST_TRY | {"who checks each assumption",
"an owner for each dependency", "night alert steps"}
def review(label, given):
print(label)
gaps = [a for a, el in PACKAGE if el not in given]
for art, el in PACKAGE:
state = "MISSING" if art in gaps else "in hand"
print(f" {art:<16}| {el:<29}| {state}")
verdict = "blocked" if gaps else "accepted"
total = len(PACKAGE)
have = total - len(gaps)
print(f"handoff {verdict}: {have} of {total} in hand")
first try
decision record | rejected options | in hand
assumptions log | who checks each assumption | MISSING
dependency list | an owner for each dependency | MISSING
runbook | night alert steps | MISSING
eval baseline | the pass line | in hand
handoff blocked: 2 of 5 in hand
second try
decision record | rejected options | in hand
assumptions log | who checks each assumption | in hand
dependency list | an owner for each dependency | in hand
runbook | night alert steps | in hand
eval baseline | the pass line | in hand
handoff accepted: 5 of 5 in hand
On the first try, nobody wrote down who checks each assumption, such as the nightly policy refresh. The dependencies have no owner, so nobody knows who to call. The runbook has no night alert steps, so an alert has no first action. Three gaps, and the handoff is blocked. On the second try all five are in hand, and the handoff is accepted.
A handoff isn't a file transfer. It's a gate, and the architect steps back only when the team can run the system alone.
Keep what you said no to: adr.py
A decision record has five sections: context, decision, alternatives, consequences and when to revisit. The alternatives hold what was rejected and why. A draft that leaves sections empty should fail.
# The decision record for the clause search.
SECTIONS = ["context", "decision", "alternatives",
"consequences", "revisit_if"]
ADR = {
"context": ("Claims handlers must check an answer "
"before they act on it"),
"decision": ("Retrieve policy clauses first, "
"then answer only from them"),
"alternatives": [
("Answer from the model alone",
"no way to check the source"),
("Paste every policy into each prompt",
"cost and answer time grow with every policy"),
],
"consequences": ("Answers depend on retrieval "
"quality, so we monitor it"),
"revisit_if": ("The wrong clause rate stays above "
"target for a month"),
}
DRAFT = {**ADR, "alternatives": [], "revisit_if": ""}
def missing(record):
return [s for s in SECTIONS if not record[s]]
DECISION Retrieve policy clauses first, then answer only from them
REJECTED Answer from the model alone (no way to check the source)
REJECTED Paste every policy into each prompt (cost and answer time grow with every policy)
REVISIT IF The wrong clause rate stays above target for a month
final: complete
draft: missing alternatives, revisit_if
A decision without its rejected options gets argued again and again. The full version of this record, for a whole scenario, is in the architecture decision record for a Claude system.
Guidance: a rule, a reason and a check
Implementation guidance for developers works when each rule comes with why it exists and how it's verified. From guidance.py:
RULE Edit a prompt with the eval set open | because a small edit can break old answers | checked by eval gate
RULE Never let the model approve a payout | because a person owns every payout | checked by approval step
RULE Log the clause id with every answer | because support must trace a wrong clause | checked by weekly log review
Keep these rules in the repository, with an owner. For teams using Claude Code, the project's CLAUDE.md file is a natural home for them. A rule with a reason and a check is guidance people can follow and the team can verify.
The decision rule: which artifact was missing?
On night one, the policy index fails to refresh, and nobody knows who owns it. What was missing from the package? A longer decision record sounds thorough, but it explains why, not who to call. A bigger monitoring dashboard shows the failure but can't fix it. One call with the builders loses everything that isn't written down. The answer is the dependency list: an owner and a fallback for each dependency, written into the package.
Each artifact closes a gap the others can't:
| Gap in the first week | Artifact that closes it |
|---|---|
| Nobody knows why we didn't paste every policy | Decision record |
| Nobody wrote down that policies refresh every night | Assumptions log |
| Nobody knows who owns the index service | Dependency list |
| An alert fires and nobody knows the first step | Runbook |
| Nobody can tell whether answers got worse | Eval baseline |
The trap: the empty why
The build team rejects pasting every policy into each prompt. Then the team moves on, and the reason lived only in a meeting. Months later the new team asks why they don't just paste every policy into the prompt. Nobody can answer, so they build the rejected option, and cost and answer time start to grow.
The fix is cheap: write the why in the decision record, next to each rejected option. A decision with no written reason gets made twice. The documentation stage in the wider life cycle is covered in the Claude app life cycle.
Try it yourself
Add a sixth artifact to PACKAGE, for example a security contact list with "who to call on a suspected leak", and leave it out of SECOND_TRY. Run it and check the gate blocks again. Then add a third rejected alternative to the decision record with its reason. The project files for this lesson are in the community, free to join.
Recap
| Piece | Rule |
|---|---|
| Readers | One document per reader: summary, guide, runbook, decision record |
| System picture | Drawn once: components, data flow, trust boundary, failure points |
| Handoff | A gate over five artifacts; any missing element blocks it |
| Decision record | Keeps rejected options with reasons, and a revisit trigger |
| Guidance | A rule, a reason and a check, kept in the repository with an owner |
Related course on Udemy
Claude Certified Architect - Professional (CCAR-P) Exam Prep
Architecting with Claude: design, models, context, integration, evals, governance and stakeholders.View on Udemy ↗: Claude Certified Architect - Professional (CCAR-P) Exam Prep (paid course, opens in a new tab)Related posts
Reading a Business Requirement Like an Architect: Function, Quality, Constraints and Assumptions
One sentence from an insurer's claims director becomes four buckets (function, quality, constraints, assumptions), two testable targets and five questions back to the business, before any design starts.
Discovery for an AI Project: Running the First Conversation, Five Question Groups and Three Red Flags
An insurance company says 'we would like an AI assistant'. That one sentence could be three different projects. Five question groups, asked to the right people, turn it into a one-page problem statement, and three red flags show what still blocks the design.
Communicating AI Decisions, Trade-offs and Risk to Executives: The Decision Card, the Risk Matrix and One Ask
A week before launch the CEO asks: is it safe to launch? Answer with a decision card that says what each option costs, a risk matrix where controls move a risk but never erase it, a one-page brief that ends with one ask, and an honest answer to 'can you guarantee it?'.
Feedback Loops, Expectations and SLAs for an AI Service: Find the Promise the Architecture Can't Keep
Two weeks after launch, the head of claims says 'I thought it never makes mistakes'. A weekly feedback loop, expectation gaps closed in writing, and a review of the draft SLA find the one clause nothing can measure before anyone signs it.
