Architecture documentation is a communication tool for a reader who was not in the room: the build team, the on-call engineer, the security reviewer, the successor who inherits the system in a year. Its test is whether that reader can build, operate, question and safely change the system without you. For Claude systems the standard content (context, views, interfaces, quality attributes, operations) needs some additions, because the behaviour of the system depends on artifacts that traditional documents omit: prompts, model configuration, tool contracts and evaluation sets.
What the document must contain
Organise the document so each section answers a question a reader will actually have.
- Context and goals: the problem, scope and explicit non-goals, key requirements, the architecturally significant quality attributes (latency, accuracy, availability, cost, auditability) and the success criteria from discovery (lesson 5.1).
- Constraints and assumptions: each marked confirmed or assumed, with an owner for resolving the assumed ones.
- Views: context, container and runtime diagrams (below).
- Components and interfaces: responsibilities and contracts. For Claude systems this includes the prompt set as a versioned artifact, tool definitions with input schemas, permissions and side effects, retrieval sources and their freshness, the model configuration (pinned model ID and settings such as effort or output limits), validation and guardrail steps, and the points where a human reviews or approves.
- Data: what enters prompts, how it is classified, what is logged, and the retention and residency arrangement chosen.
- Failure modes and resilience: API errors, timeouts, refusals or malformed output, truncated responses, and the defined degraded mode.
- Quality and evaluation: where the eval set lives, who owns it, the thresholds, and the regression gate that protects changes (lesson 5.3).
- Observability, cost, security: what is logged and alerted, the cost levers, credential handling, environment separation, least privilege for tools.
- Decisions, risks, open questions: a link to the decision log and a dated list of what remains unresolved.
- Operations: owners, on-call, and links to runbooks.
Key concept
In a Claude system the prompts, model ID and settings, tool schemas and eval set are architectural artifacts, not tuning details. They determine behaviour, they change over time, and they must be documented, versioned and owned like code and configuration. A document that describes only boxes and arrows leaves the most volatile part of the system unrecorded.
Diagrams that earn their place
The C4 model gives a useful hierarchy: a system context diagram shows the system, its users and neighbouring systems and orients any audience; a container diagram shows the major building blocks and technology choices for technical readers; a component diagram opens up one container for developers; and a code-level view is rarely worth drawing by hand. C4 also describes supplementary dynamic diagrams (behaviour over time) and deployment diagrams (runtime infrastructure), and it is notation and tooling independent.
For a Claude system, add three things regardless of notation. Show where the non-deterministic component sits and what validates its output. Show trust and data boundaries: what leaves your environment, to which service, under which data-handling arrangement. And show where humans intervene. A dynamic diagram of a single request or agent loop (assemble prompt, call model, execute tool, validate, review, act) is often the most valuable picture in the document, because it exposes the failure and review points. Give each diagram one message and a legend, and keep its source in version control.
Decision records and the living document
The architecture document describes the current design; the decision log explains how it got here. Keep both, and link them. Write a record for each significant, hard-to-reverse choice: platform, pattern (single call, workflow or agent), model selection, retrieval approach, human-review placement, data handling. Records follow the format in lesson 5.2 (context, decision, consequences, status), are never edited to hide history, and are marked superseded when replaced. When the document and a record disagree, the document is stale; assign an owner and a review trigger, such as every model change and every architecture-affecting release, so it does not drift.
Runbooks: turning architecture into operations
A runbook maps a symptom to diagnosis and action for someone woken at night. Write them from the failure modes in the architecture, keep them short, and rehearse them. Claude-specific examples grounded in Anthropic's documented behaviour:
| Symptom | First checks | Action |
|---|---|---|
| Rising 429 responses | Which limit (requests, input tokens or output tokens) using the rate-limit response headers; workspace limits; a recent traffic ramp; whether the error carries a retry-after header | Back off and smooth traffic; raise limits if legitimate. A 429 with no retry-after can mean a monthly spend cap, where retries keep failing until access resumes, so escalate rather than retry |
| 529 overloaded or 5xx | The public status page; error rate across regions or workloads | Backoff, queue asynchronous work, switch to the degraded mode; include the request ID when contacting support |
| Spike in parse or schema failures | Recent prompt, model or schema change; truncated outputs; a new input type | Roll back the last change, run the regression set, add the failing inputs to the eval set |
| Quality alert with no code change | Model ID and prompt version in logs; the deprecation page; sampled outputs | Collect examples with request IDs. Anthropic notes that infrastructure around a fixed model ID can change and cause minor differences, so raise it with support and re-run evals |
Log the request ID (Anthropic returns one in every response for support cases), model ID, prompt version and token usage on every call, and use separate workspaces for development, staging and production.
Implementation guidance and handoff
Good guidance gives a build team constraints, rationale and acceptance criteria, and leaves room for their engineering judgement. Distinguish clearly between non-negotiables (data may not leave a boundary, a human approves before any irreversible action, the model ID is pinned, releases pass the eval gate) and team choices (framework, code structure, libraries).
Suggest a build order that reduces risk early: an evaluation harness and a thin end-to-end slice first, then broaden. This matches Anthropic's advice to test extensively in sandboxed environments, keep designs simple and start evaluation from a small set of real cases. Define “done” through the eval thresholds, the runbooks and the monitoring, not through feature completion alone. Put prompts, tool schemas and model configuration in the repository and in one configuration source, so a change is reviewable and revertible.
The handoff itself is a process: a walkthrough of the document and decisions, an agreed channel and contact for questions, checkpoints at design review and before launch, and a rule that deviations from a non-negotiable become a new decision record rather than a quiet change.
Common exam distractor
Distractors here include a document that is only a diagram plus a technology list (no rationale, quality attributes or operations), one that treats prompts and model settings as implementation detail left out of the design, and a handoff that consists of finished code and then silence. Equally wrong is a runbook that says “retry until it works” for every error. The strong answer packages requirements, views, interface and artifact specifications, decision records, quality gates, runbooks, explicit non-negotiables and open questions, and stays reachable through the build.