Architecture Artifact Review Drills: Find What a Diagram, Config, Trace, Eval Table, ADR or Settings File Leaves Out
Seven artifacts from four scenarios (healthcare, multi-tenant SaaS, government, CI/CD) each look fine at a glance. A checklist per artifact asks what is missing, finds 15 gaps, and the revised copies come back with 0.
What you will learn
- Review an artifact for what is missing instead of what is present
- Spot missing end-user identity, a missing trust case and an unbound tenant in diagrams, eval tables and tool configs
- Read a trace from the bottom to find the first failure, not the visible one
- Check an ADR, a handoff note and a Claude Code settings file for the trade-off, the owner and the deny rules
Before you start
- Reading an agent trace
- Planted bugs in Claude Code settings, plugins and MCP auth
Picture a reviewer handed an integration diagram and told it looks fine. Does it? That depends on what you look for.
Think of a home inspector. The wiring is neat, the paint is fresh, everything on the list works, so she signs it off. A better inspector asks a different question: where's the smoke detector? Where's the exit sign? Where's the shut-off valve? She looks for what's missing. That's the whole skill in this lesson: review the artifact for what it leaves out.
We review seven files from four scenarios: healthcare, multi-tenant SaaS, government, and CI/CD. Each has a gap. The project is a single review.py with one checklist per artifact; nothing in it calls a model.
How every drill runs
An artifact goes in. review.py runs that artifact's checklist, and each check looks for something that should be there. A gap comes out. Then the fix goes in as a revised copy under fixed/, and the same checklist runs again. A clean review means nothing is missing. Here's one of the checklists, for the tool config:
def tool_config(t):
tools = str(json.loads(t)["tools"])
gaps = []
if "sql" in tools:
gaps.append("raw SQL reaches all tenants")
if "tenant_id" in tools:
gaps.append("model picks tenant")
return gaps
Healthcare: the diagram and the eval table
Here's integration.txt, a patient message summariser:
CareDesk - patient message summarizer (integration diagram)
[Patient portal] --message--> [Gateway]
[Gateway] --prompt: name, DOB, MRN, message--> [Claude API]
[Claude API] --tool_use: get_lab_results--> [Records tool]
[Records tool] --service key svc-caredesk--> [Records database]
[Records database] --lab results--> [Records tool]
[Records tool] --tool_result--> [Claude API]
[Claude API] --summary--> [Patient portal]
Two things are missing. The prompt carries the patient's name, date of birth and record number: personal data going to the model. And the records tool calls the database with one shared service key, with no end-user identity on the call. The database can't tell who is asking, so any patient's labs are within reach. This is an authentication and authorisation gap. The fix: a case id in the prompt, and the user's token on the tool call.
The eval table, eval_results.csv, has three groups and every row is the patient's own record. Ninety-seven of a hundred passed. That says nothing about trust, because there's no row for another patient's record. Add that row and see which component fails first: here, the records tool with its shared key. An eval that never tests the trust condition can't find the trust failure.
Multi-tenant SaaS: the tool config and the trace
The tools.json for a ticket-replying agent:
{
"agent": "ticket-replier",
"role": "read one ticket, draft a reply for the same tenant",
"tools": [
{"name": "get_ticket",
"input": {"tenant_id": "string", "ticket_id": "string"}},
{"name": "run_sql",
"input": {"sql": "string"}},
{"name": "draft_reply",
"input": {"ticket_id": "string", "text": "string"}}
]
}
The role says one tenant only, but nothing enforces it. A raw SQL tool on the shared database reaches every tenant. And get_ticket takes a tenant_id, so the model chooses the tenant. That's a least-privilege problem. The fix removes run_sql and binds the tenant on the server from the session:
{
"agent": "ticket-replier",
"role": "read one ticket, draft a reply for the same tenant",
"tools": [
{"name": "get_ticket",
"input": {"ticket_id": "string"}},
{"name": "draft_reply",
"input": {"ticket_id": "string", "text": "string"}}
],
"tenant": "bound by the server from the session"
}
Read the trace from the bottom
Same product, now a trace, trace.jsonl:
{"span": 1, "step": "prompt", "tenant": "acme", "q": "refund?"}
{"span": 2, "step": "retrieval", "tenant": "ACME", "hits": 0}
{"span": 3, "step": "model", "chunks": 0, "out": "30 days"}
{"span": 4, "step": "answer", "verdict": "wrong: 14 days"}
The symptom is a wrong answer: the policy says 14 days. The tempting call is hallucination, and the model did invent 30 days. But one span earlier, retrieval found zero hits. The tenant there is in capitals, and the prompt's tenant is lower case. The fix: match the tenant, and give no answer when there are zero hits. For a longer walk through traces, see reading an agent trace.
Government: the decision record
An ADR for an application-processing system. The context names a stakeholder constraint: applicants can appeal a refusal. But the decision says Claude decides every application, which ignores that constraint. And the consequences say Claude always classifies correctly, which overstates certainty about the model. The checklist looks for a trade-off section, a residual-risk section, and words like "always" or "guarantee". The fix: a named officer decides refusals, and the trade-off and residual risk are written down. A full ADR is built in the architecture decision record for a Claude system.
CI/CD: the handoff note and the settings file
handoff.md hands a headless job from the platform team to the web team. Who owns it once it's handed over? It doesn't say. How does the new team switch it off? Not said. It depends on an API key; what happens when the key or the API fails? No runbook. The fix adds an owner and on-call, a switch-off section, and failure steps. The handoff gate idea is covered in documenting the architecture for handoff.
The same package holds a Claude Code settings.json:
{
"env": {"CI": "true"},
"permissions": {
"defaultMode": "bypassPermissions",
"allow": ["Bash"]
}
}
In a job nobody watches, bypassPermissions skips the permission prompts. The allow list holds all of Bash, so every shell command is allowed. And there are no deny rules, not even for the env file. The revised copy:
{
"env": {"CI": "true"},
"permissions": {
"defaultMode": "dontAsk",
"allow": ["Read", "Bash(git diff *)", "Bash(git log *)"],
"deny": ["Read(./.env)", "Bash(curl *)", "Edit"]
}
}
dontAsk mode, a short allow list, and deny rules. More settings traps are in planted bugs in Claude Code settings, plugins and MCP auth.
Review, then review the fixes
Here's what run_all.py printed. Each line starts with the checklist's topic number, then the file and what's missing:
3.2 integration.txt found 2: PII in the prompt; no end-user identity on call
1.2 eval_results.csv found 1: no trust condition
3.1 tools.json found 2: raw SQL reaches all tenants; model picks tenant
4.5 trace.jsonl found 1: first failure: retrieval, span 2
6.2 adr.md found 3: no trade-off; no residual risk; overclaims
6.3 handoff.md found 3: no owner; no switch off; no failure runbook
7.2 settings.json found 3: bypass mode; all of Bash; no deny rules
before: 15 gaps in 6 artifacts
after the revisions: 0 gaps
One note on the counts: the run says "6 artifacts" while the review covers seven files, because the CI/CD handoff package holds both the handoff note and the settings file.
The trap: reviewing for what is present
Every artifact in this lesson would pass a review that only checks what's on the page. The diagram has neat boxes. The eval table shows 97 of 100. The ADR has a decision. The settings file has an allow list. The gaps are all absences: no user identity, no trust case, no tenant scope, no owner, no deny rules. So the decision rule for any artifact review is one question: what does this artifact leave out?
Try it yourself
Take the revised settings.json and add "Bash" back to the allow list. Does the checklist catch it? It checks for ["Bash"] exactly, so think about how you'd make that check stricter. The project files for this lesson are in the community, free to join.
Recap
| Artifact | Ask | Fix |
|---|---|---|
| Integration diagram | Who is asking? What personal data goes to the model? | Case id in the prompt, user token on the tool call |
| Eval table | Where is the trust case? | Add the other-patient row |
| Tool config | What's too broad, and who picks the tenant? | Remove raw SQL, bind the tenant on the server |
| Trace | What failed first? | Match the tenant, refuse on zero hits |
| ADR | Trade-off, residual risk, overclaims? | Named officer for refusals, both sections written |
| Handoff note | Owner, switch off, failure steps? | Add all three |
| Claude Code settings | Mode, allow list, deny rules? | dontAsk, short allow list, deny rules |
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
The Claude Messages API: Your First Call, Field by Field
One request in, one Message out. The four fields of a Messages API call (model, max_tokens, system, messages), how to read content blocks, stop_reason and usage, and why every turn resends the history.
Claude Tool Use: How tool_use and tool_result Work in the Messages API
Follow one order question through Claude's tool round trip: define a tool, read the tool_use block, run your own function and send a matching tool_result back, including parallel calls and is_error.
Claude Client SDKs Wrap One REST API: Raw HTTP, Python, TypeScript and Async Calls Compared
Every Claude client SDK wraps the same REST request: a POST to /v1/messages with a JSON body. See it built by hand, through the Python and TypeScript SDKs, as typed errors, and as async calls that wait together.
Anthropic SDK Timeouts, Retries and Error Classes: Configure the Client Once, Then Give 429, 529, 400 and Timeouts Their Own Move
Configure the Anthropic SDK client (timeout, max_retries, with_options, async, pagination), see which errors it retries by itself, then repair a retry wrapper so a 429, a 529, a 400 and a timeout each get the move the docs support.
