To write a technical design document with Claude, supply the engineering context, request plausible alternatives, and shape the proposal for review. Keep assumptions visible and require reasons for consequential choices. A useful design explains what the team intends to build, why that approach fits, and what evidence is still needed before implementation.
Give Claude a decision to help with
Start with a question narrow enough to answer. “Design our reporting platform” leaves too much room for invented requirements. “How should an existing service accept a report request and let its requester retrieve the result later?” gives the discussion a boundary. Supply the current architecture, relevant constraints, and the people or roles who must review a change. Mark anything you have not checked as an assumption.
This example is a proposed design for an internal report service. Assume it currently generates reports within the original HTTP request, uses a SQL database, and has a team willing to operate a background worker. These are scenario inputs, not observations. Without workload measurements, database capacity remains a question for validation.
Its goals are to record a job durably before acknowledging the request, return without waiting for generation, expose status to the requester, and recover interrupted work. Scheduled reports, email delivery, and multiple regions are non-goals. Accepting background jobs would therefore leave the scheduler and notification system for a later design.
Use this original prompt after replacing the scenario inputs with confirmed facts:
Help draft a technical design proposal for asynchronous report jobs.
Known scenario inputs:
- Reports currently run inside the requesting HTTP call.
- The service has a SQL database.
- A background worker is an acceptable proposed component.
- We have no workload measurements yet.
Goals: durable acceptance, requester-visible status, recoverable work.
Non-goals: recurring schedules, email, multiple regions.
Compare keeping synchronous execution, a database job table,
and a separate message broker. Use the same criteria for each.
Separate facts, assumptions, proposed behavior, and open questions.
Explain failure between publishing a result and recording completion.
Do not invent benchmarks, team approval, or successful tests.
Before drafting, identify missing inputs that could change the choice.
Examine the response for an added queue service, assumed unlimited retention, or a promise that work happens exactly once. Ask for the basis of each addition, then confirm or remove it. The guide to verifying Claude’s answers covers broader checks; here, concentrate on claims that could change the decision.
Use a template that exposes trade-offs
In Design Docs at Google, Malte Ubl writes, “The design doc is the place to write down the trade-offs you made in designing your software.” Use that as an editing test: a component description should explain a choice, constraint, or consequence. Shorten passages that merely recite what a worker or database does, and give uncertain parts more attention.
The following original template keeps the proposal, its review, and its implementation status visible. Fill it with your own evidence and decisions. A small change may need only a sentence under some headings. A change involving data loss or a difficult migration deserves more detail where the consequences are hardest to reverse.
## [Design title]
Proposal status: Draft / In review / Accepted / Rejected / Superseded
Implementation status: [not started / in progress / deployed; evidence]
Owner: [responsible person or role]
Reviewers and decision owner: [names or roles]
Last revised: [date]
### Context and decision
[Current behavior, problem, evidence, and the question to settle.]
### Goals and non-goals
[Observable desired outcomes; plausible work excluded from this design.]
### Constraints and assumptions
[Confirmed constraints with sources; assumptions needing confirmation.]
### Alternatives
[Including the current approach: benefits, costs, risks, rejection reason.]
### Proposed design
[Interfaces, data ownership, state changes, and a focused diagram.]
### Risks and recovery
[Failure, detection, recovery, responsible owner, unresolved questions.]
### Validation and delivery
[Evidence still needed, rollout, rollback, and implementation links.]
### Review and decision record
[Objections and responses; choice, rationale, consequences, acceptance
date and approver; links to superseding decisions when applicable.]
Keep requirements distinguishable from evidence. “An accepted job must survive a worker restart” is desired behavior. “The restart test passed” requires a result linked to the tested implementation. Label each clearly; rephrasing a requirement cannot supply the missing result.
Compare alternatives against the same constraints
For the proposed report service, compare three credible choices, including the current approach. Explain why a change is worth making. Give alternatives the same scrutiny as the preferred option: replace dismissive adjectives such as “complex” or “unscalable” with specific burdens or unanswered questions.
| Option | Why consider it here? | What this proposal would need to resolve |
|---|---|---|
| Keep synchronous generation | Keeps the existing request path and operating model. | Does not meet the goal of returning acceptance without waiting for generation. |
| Add a database job table and worker | Keeps the durable job record in an existing component. | Requires claim rules, recovery behavior, retention, and evidence about database contention. |
| Add a message broker and worker | Separates work delivery from the service’s job-status storage. | Introduces a component for this team to operate and requires a policy for keeping delivery and status consistent. |
The choice is a database job table, subject to validating its effect on the existing workload. The assumed database already exists, and the initial scope is narrow. Collect performance evidence from a relevant workload; if a prototype exposes unacceptable contention, revisit the decision.
Give the proposal enough detail to be challenged. A request would create a job owned by the requester, and the API would return its identifier only after the transaction commits. A worker would claim work under a lease, publish a result associated with the job identifier, and update its state. The status endpoint would check the requester’s access before exposing state or a result link. Lease duration, retry limits, and retention remain explicit questions until someone supplies a justified policy.
Draw the recovery path in Mermaid
For this proposal, the diagram connects a durable result to the job’s completion state. The Mermaid below shows intended recovery: before generating a report, the worker checks for an already completed result. It is a proposed model, not captured behavior from a running service.
flowchart TD
API["Report API"] -->|"Commit job"| Jobs["Job table"]
Jobs -->|"Claim lease"| Worker["Worker"]
Worker --> Existing{"Complete result exists?"}
Existing -->|"Yes"| Complete["Record completion"]
Existing -->|"No"| Build["Generate and publish by job ID"]
Build --> Complete
Complete --> Jobs
The diagram leaves a hard question visible: what counts as a complete result? The design must distinguish an available, finished report from a partially written file. It must also explain whether an expired worker can publish after another worker has taken over. Add the proposed rule in prose and name the test that would challenge it.
GitHub supports Mermaid in Markdown diagrams through a fenced block labeled mermaid. Keep the definition beside the design so reviewers can propose changes to its meaning as well as its appearance. The Claude Mermaid guide covers obtaining source and checking rendering. Preview your actual file in its destination before requesting review.
Use GitHub review to settle an objection
Put the edited proposal in a Markdown file such as docs/designs/report-jobs.md and open a pull request. In desktop Google Chrome, DocMyChat can export a regular claude.ai conversation or one reply as Markdown; the Claude-to-GitHub guide covers the transfer. Turn useful reasoning into the proposal and link saved discussion as context. A transcript of abandoned suggestions makes a poor substitute for a current recommendation.
Ask reviewers to examine named questions. The service maintainer might assess the job lifecycle, a database reviewer the contention risk, and whoever owns access controls the result-link policy. These are suggested responsibilities, not approvals obtained for this example. Put the decision deadline, if one is needed, and the person authorized to resolve disagreement in the review request so an unresolved thread cannot quietly become an assumed agreement.
GitHub’s review workflow supports comments on changed lines and suggested edits. Reviewers can submit Comment, Approve, or Request changes. Whether a change request prevents merging depends on repository review rules and permissions. Agree on the team’s acceptance process and check the repository settings instead of treating the button label as the entire policy.
A reviewer could ask what happens when the worker publishes a complete report, then stops before updating the job row. Record the concern beside the relevant text and explain how the amended proposal addresses it. Preserve consequential disagreement. Before resolving the comment, make sure the design contains a specific answer.
Test the gap between output and completion
In that proposed failure scenario, a report exists while its job still appears unfinished. Blindly rerunning generation could duplicate expensive work or overwrite a result a client has already received. The revised design would use the stable job identifier to locate a completed result and reconcile job state before starting again. This is a requirement for recovery, not a claim that any particular storage API makes publication atomic.
The author should now specify a completion marker or equivalent storage guarantee, how incomplete output is cleaned up, and how competing workers are prevented from replacing a completed report. Ask Claude to trace interruptions at each boundary and identify missing rules. Have an engineer verify the proposed mechanism against the chosen database and storage documentation. If the mechanism remains uncertain, keep that part of the proposal open for a prototype.
The validation plan should attempt to reproduce that failure: interrupt the worker after publication but before the job-state update, restart processing, and check the resulting report and status. Separately challenge lease expiry and access to another requester’s result. Record expected outcomes before running these checks, then attach actual results to the implementation review.
Preserve the decision separately from delivery evidence
Once the responsible people accept the design, record the chosen approach, why alternatives were declined, and the consequences they accepted. Link the review that contains the discussion, but put the rationale in the document so readers need not reconstruct it from a long thread. AWS’s ADR guidance treats an accepted architecture decision record as immutable: a later decision can supersede it. The working proposal can evolve during review. An accepted record should preserve what was decided at that time.
For the report service, this is a sample of a future accepted record, to complete after real review. Resolve the publication and lease rules, or explicitly assign a bounded investigation before acceptance. Say whether acceptance authorizes an experiment or an implementation; the placeholders below do not imply approval.
Decision: Use a database job table for initial asynchronous reports.
Status: [Accepted only after the named review is complete]
Accepted on / by: [actual date and decision owner]
Review: [pull request or other review record]
Scope authorized: [prototype / implementation; explicit boundaries]
Reason: Fits the existing database and the agreed initial scope.
Declined: Synchronous handling misses the acceptance goal; a separate
broker adds operating work not justified by the evidence collected.
Consequences: Own lease recovery, completed-output detection, access
checks, retention, and validation of database impact.
Revisit when: [measured contention or changed requirements; criteria]
Implementation status: Not established by this decision.
Implementation and test evidence: [links when available]
Supersedes / superseded by: [decision identifiers, if applicable]
Keep implementation progress somewhere that can change without rewriting the historical rationale. Link code changes, migrations, test results, and rollout evidence when they become available. A merged Markdown pull request establishes that a document was merged. It does not prove that workers were deployed or failure recovery was exercised. If implementation reveals a different constraint, record the changed decision and connect it to the earlier one.
Google’s documentation guidance distinguishes design documents used to discuss proposals from documentation that describes an implemented system. Preserve the accepted design for its reasoning, and maintain operating instructions against the system that actually ships. The next engineer should be able to find both the reason the team chose background jobs and the evidence showing how those jobs behave today.
Questions
Does a small design need a separate architecture decision record?
A short design can contain its own dated decision section if your team can find and preserve it. A separate record becomes useful when several proposals contribute to one decision, or one proposal contains several decisions with different owners. Follow your team’s existing convention rather than duplicating the same explanation in two places.
How should a design handle a dependency another team has not agreed to?
Name the dependency, its proposed owner, and the unanswered commitment. Treat it as an open condition of the design instead of assuming the other team will deliver. Record an agreed fallback or resolve the dependency before accepting a design that relies on it.
What if two reviewers prefer different alternatives?
Identify which constraint or assumption makes their choices differ, then record the evidence needed to resolve that difference. Have the designated decision owner explain the choice and its consequences. Keep a consequential objection in the decision history even when the team chooses another route.
When is a prototype more useful than another revision of the document?
Use a prototype when the remaining disagreement depends on behavior that prose cannot establish, such as recovery after interruption or load on an existing database. Define the question and the evidence that would change the decision before building it. Record the result separately from the original prediction.