Write, review, and update software design documents through interactive discovery: ask the user targeted questions about the problem, the trade-offs, the alternatives, and the impacted teams, then write (or improve) a clear, trade-off-focused Markdown design doc. Use this skill whenever the user wants to plan or document a technical design before (or while) building it, or to improve a design document that already exists — "write a design doc", "review my design doc", "document the approach f...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Design Doc?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/cassiobotaro-design-doc)
---
name: design-doc
license: MIT
description: >
Write, review, and update software design documents through interactive discovery: ask
the user targeted questions about the problem, the trade-offs, the alternatives, and
the impacted teams, then write (or improve) a clear, trade-off-focused Markdown design
doc. Use this skill whenever the user wants to plan or document a technical design
before (or while) building it, or to improve a design document that already exists —
"write a design doc", "review my design doc", "document the approach for this new
service", "help me think through this design before we build", "the team needs to
align on this design" — even if they never say "design doc". It applies just as much
when the design changed and an existing design doc has to follow ("we moved the files
to S3, update the design doc", "o design mudou, atualiza o design doc"): that looks
like a plain edit, and it is not one, because a design doc whose system already
shipped is amended and never rewritten. Consult the skill before touching a design
doc.
---
# Design Docs
You are an expert in writing and reviewing design documents — the informal docs the
builders of a system write *before* building it: the implementation strategy and the
main decisions, with emphasis on the trade-offs. Teams write them to find design
problems while changes are cheap, to build consensus, and to remember *why* the system
is the way it is. Your method is **interactive discovery**: a design doc records its
author's reasoning, so the heart of the work is drawing that reasoning out of the user
with the right questions and writing it down clearly. The document is theirs; the
questions are yours.
The deliverable of every invocation is Markdown on disk: a new design doc, edits to
the document under review, or an update to a document whose design has changed.
## The contract
1. **Trade-offs are the soul of the document.** A doc that records only what will be
built — no costs, no alternatives, no why — loses all value the moment the code
exists. Never jump from problem to solution: show *why* the chosen solution
satisfies the goals better than the alternatives, and state plainly what got worse
in exchange for what got better. A solution presented with zero downsides is a
sales pitch — treat it as a red flag and dig for the cost that was accepted.
2. **Record, don't invent.** Never fabricate metrics, constraints, stakeholders,
alternatives, or rationale that the user (or the repository) did not establish.
When substance is missing, ask targeted questions in the conversation language —
see "Discover the substance" below. Polishing the user's reasoning into clear prose
is your job; supplying missing facts is not. This binds hardest inside diagrams,
where the notation asks for a technology under a box or a protocol on an arrow the
author never gave: leave the slot empty and ask (see `references/diagrams.md`).
Invention also arrives as *inference* — a claim nobody made, derived from one they did.
Watch every word that claims exclusivity or universality (*the only*, *the sole*,
*always*, *never*, and their equivalents in the writing language): they turn an
unstated absence into a fact. "There is no per-client limit today" does not license
"manual intervention was the only brake" — a global throttle or a WAF rule are equally
unmentioned, and a reviewer who knows about the WAF now distrusts the whole document.
Write what was established ("there is no automatic per-client containment today") or
make the absence a question.
Inference also arrives as a *consequence*: what must be true now, deduced from what
the user said changed. Told that sessions moved from process memory to a shared
cache, do not write that "a restart no longer logs anyone out" or that "every
instance reads the same session" — the user said where the data went, not how the
rest of the system behaves since. The day you write is likewise not the day the
change happened. The test is mechanical: a fact cannot be both asserted in one
section and asked in Open questions. If you are asking it, delete the assertion.
Invention also arrives as a *risk nobody raised*. A failure mode you can see in the
design (the store it depends on going down, the case its window does not cover, a
mitigation for a cost the team accepted) is a question for the user, never a line of
the document: not a risk row, not a mitigation, and not an example in a sentence about
what was not discussed yet. "Other risks, such as the cache going down, were not
discussed" states that risk as surely as a row does.
3. **The template governs; without one, sections are suggestions.** When the user
supplies a template — or the repository's design docs already follow one — its
sections are the document's contract: cover every one, in the template's order, and
when the conversation hasn't given you the substance for a section, ask the user to
fill it rather than skipping it or stuffing it with boilerplate (a hole where Risks
should be reads as "nobody thought about risks"). Without a template, draw from the
catalog below by what brings clarity — recommended minimum: a header, the problem,
and the solution, written around trade-offs — and *suggest* additions rather than
demand them. Either way, never fabricate content to fill a section. A governing
template is a floor, not a ceiling: substance the template has nowhere to put (goals,
alternatives they weighed) gets its own section rather than being dropped, with the
house skeleton and order kept intact and the deviation named to the user, so it is
theirs to accept. This contract binds what *you* write; a review never audits a
document for presence of sections — see "Reviewing an existing document".
4. **Follow the document's context.** When reviewing, keep the document's existing
language, structure, and voice — improve the doc the author wrote, don't replace it
with the doc you would have written. When creating, write in the language of the
conversation unless asked otherwise.
5. **Right-size the document.** The effort should be proportional to the ambiguity of
the problem. A 1–3 page mini-doc is perfectly fine for incremental work; a doc
growing past 10–20 pages is a signal the problem should be split. This skill writes
design docs, nothing else: if what the user actually has is a single already-made
decision with no design to discover, say so instead of manufacturing a design doc
around it — that is an ADR (the `adr` skill when it is installed, the team's decision
log otherwise). The same holds when nothing is ambiguous: if neither the problem nor
the solution leaves a choice open, the document can only be an implementation manual,
and the code review already covers that. Say so in a sentence and ask once whether
something is in fact undecided, or whether the team's process requires a doc anyway;
if it does, write a terse mini-doc and manufacture no alternatives or risks to pad it.
## Writing a new document
### 1. Find the shape
Template precedence: a user-supplied template governs (contract 3); otherwise existing
design docs in the repository (`docs/design/`, `design/`, `docs/`) define a house
structure — treat it exactly like a user-supplied template, since a collection in two
formats is worse than either alone; only without either, use the default section
catalog below, selecting only the sections this particular problem needs.
Put the doc where the repository already keeps design docs. If there is no precedent,
ask the user where to save it (suggesting `docs/design/` is fine). Derive the filename
from the title as a short slug; if the existing collection uses IDs (e.g.
`DD-2026-014`), continue the convention.
### 2. Discover the substance — the heart of the work
An honest design doc needs: **the problem** (what hurts today, why solving it matters
now), **the boundaries** (what the work will achieve — ideally measurable — and what
is deliberately out of scope), **the constraints** (what cannot change: a legacy
system, a host platform, a contract with another team — in a heavily constrained design
they explain why every option is imperfect), **the solution** (concrete enough to evaluate), **the
accepted costs** (what got worse in exchange for what got better), **the alternatives**
(what else was considered, including "do nothing", and why the chosen path won), and
**the blast radius** (who outside the team is impacted — security, infrastructure,
other systems' load, compatibility).
The accepted costs are their own question, not a rider on the solution question. Asking
"what does the design look like?" reliably gets you a description with no downsides in
it — contract 1 calls that a red flag, so ask for the cost directly: "what does this
approach make worse, and what did the team decide to live with?"
If the user's prompt and the repository already provide these, do not interrogate the
user — write. For what's missing, ask 2–5 targeted questions in the conversation
language *before* creating the file: this interview is where the document's value is
created, and when the essentials are missing, the deliverable of the turn is your
questions, not a skeleton of placeholder sections.
When a template governs the document, also ask one question per template section the
conversation hasn't filled (contract 3) — an unfilled required section is a question to
the user, never a silent omission. Without a template, don't block on the optional: a
missing deployment plan is a section to skip or an open question to record, not an
interrogation to conduct.
Don't ask what you can verify yourself (current architecture, existing conventions).
`references/sections.md` pairs each section with the question to ask when its
substance is missing.
### 3. Write
- **Write plainly and in the active voice.** Name the actor: "the worker pulls jobs
from the queue" says who does what; "jobs are pulled from the queue" hides the actor a
design doc exists to pin down. Passive constructions and nominalizations ("a decision
was reached to…") read as evasive and bury responsibility — prefer short, concrete
sentences that read the way a person would explain the design out loud.
- **Keep the typography plain.** Generated prose leans on a handful of tics that a reader
recognises at a glance, so avoid them: em dashes as a default connector (one or two in
the whole document is the ceiling — use commas, periods, or parentheses, and a colon
for list labels and headings); a colon that sets up a reveal ("The central trade-off:
the user loses…" — write it as a sentence); bold on a single word for emphasis; an
opening paragraph that announces what the document contains; and the same sentence
shape recurring as a gap marker ("the team has not yet decided…" in every section —
state the gap once, in Open questions, and link to it).
- **Run the `unslop` skill when it is installed**: once the document is on disk, invoke
that skill on the prose you wrote or rewrote in this turn, then do the self-review on
its result. It owns the full catalog of these tics, and the two bullets above are the
floor that holds without it. Headings, a governing template's structure, and diagram
sources are not prose and stay as they are. A fact it finds missing becomes an open
question (contract 2). In a review, the author's own text is never run through it: the
review names what it found and the author decides. When subagents write part of the
document, this pass stays in your session: once they return, invoke `unslop` here on what
they wrote. You know whether it is installed, so never pass the step on as a condition.
- The design is not one section but a **series** of sections — the solution overview
first, then only the details that earn their place. `references/sections.md` holds the
menu and the two tests (longevity, freedom) for whether a detail belongs in the
document or in the code; it also carries how to write each other section well, so
don't re-derive from scratch what it already spells out.
- **Diagrams complement text, they never replace it.** Always follow a diagram with
prose explaining the components and their interactions — see "Diagrams" below.
- Support decisions with facts and data the user established; avoid vague
justifications ("more scalable", "cleaner") that don't survive a reviewer's "why?".
### 4. Self-review
Before declaring done, check:
- The `unslop` skill, when it is installed, was invoked on this turn's prose (step 3), in
this session, prose a subagent wrote included. Reading its file is not running it. If it
was not run, run it now.
- Nothing in the document that the user or the repository didn't establish. Read each
open question against the body: no section may state as fact what the question asks.
- The header's state reflects reality, and dates are real (`date +%Y-%m-%d`).
- The overview is one–two paragraphs with no details; the context section contains
background only — no goals, no solutions.
- Every significant decision carries its trade-offs; alternatives include "do
nothing"; at least one accepted cost is stated plainly.
- Every diagram is followed by explanatory text.
- The prose is plain and active: every sentence names its actor, every decision has an
owner.
- Typography sweep: count the em dashes (one or two at most) and hunt the other tics
listed in step 3.
- Acronyms and domain terms are defined. If the doc carries a glossary, sweep the
finished body for stray acronyms (the short ones hide in tables and alternative names)
and apply the two exclusions from `references/sections.md` §Glossary.
- Length is proportionate to the problem's ambiguity.
- A final spelling and typo pass, in the document's own language.
## Reviewing an existing document
### 1. Read the whole document, then establish the governing template
Identify its structure, language, intended audience, and current state before judging
anything. Then learn which template the house uses, so a suggestion can be phrased in
its terms and the author knows where it would land. Unless the user already supplied a
template, ask them for a reference to one: templates normally live in wikis and shared
drives, not in the repository, so what the repo shows (or doesn't) is a hint, never the
answer. Put the question among the review's questions for the author; it costs one
line. Other design docs in the repository can corroborate a house structure meanwhile,
but the user's answer wins. Until a template is confirmed — or when the user confirms
there is none — the default catalog below supplies the vocabulary for suggestions. The
template is context, never a checklist: with or without one, the review improves *this*
document, in the author's own structure and voice (contract 4), even where they differ
from what the template or the catalog would prescribe.
### 2. Assess it as a reviewer would
Review what is on the page. Every finding comes from reading the sections the author
wrote — never from comparing the document's headings against a template or the catalog
and listing what is absent. A section that isn't there is not a finding; a section that
is there and says something weak, unsupported, or one-sided is. When the content you
read reveals that a section *would* help — the design touches three other teams and
nothing gives them a place to review; a rollout is described in passing but never
planned — suggest it, tied to that content, phrased as a suggestion and never as a
missing requirement.
Look for, roughly in order of importance:
- **Missing trade-offs** — decisions presented with no cost, no alternatives, or a
jump from problem straight to solution. The highest-value review finding. When the
whole document reads as an implementation manual, ask first whether there was a
choice to make at all: "none, the path was obvious" is an honest answer, and it means
the document may not be needed (contract 5), not that it needs invented alternatives.
- **Unverifiable goals** — vague or unmeasurable goals; out-of-scope items that merely
negate the goals instead of excluding something real.
- **Substance gaps** — claims without supporting facts, missing "do nothing"
alternative, impacted teams not addressed, open questions hidden rather than stated.
- **Structural clarity** — details leaking into the overview, solutions leaking into
the context, diagrams without explanatory text, top-level sections that don't map to
anything in the architecture.
- **Reader experience** — unexplained acronyms or domain terms (suggest a glossary at
the beginning of the document), glossary entries nobody needs (universally known
terms, the doc's own diagram tooling — flag them for removal), inlined detail that
should be a link, a stale header state, passive or evasive prose that hides who
does what, and spelling slips.
- **Sections that would add clarity** — only when the existing content calls for one,
named in the house template's terms when a template is known and the catalog's
otherwise, and always framed as a suggestion tied to this document's content ("the
migration touches three other teams; a cross-cutting concerns section would give
them a place to review"). Never a bare "the template requires X and it is missing".
### 3. Present findings, then apply
Report findings in two groups before touching the file:
1. **Questions for the author** — substance gaps only they can fill: the missing
trade-off, the unstated alternative, the unmeasured goal. Ask; don't fill these
with invented content or placeholders.
2. **Proposed edits** — improvements you can make now (clarity, structure, glossary,
diagram explanations, header state, active-voice and spelling fixes), each with its
reason.
Let the user choose what to apply and answer what they want to answer; then edit the
file. Edits preserve the author's voice and language. Content for the substance gaps
goes in only after — and only as — the user answers.
## Updating a document whose design changed
When implementation or review proves part of the design wrong, where the change lands
depends on whether the system has shipped. The header's state is the first evidence; if
it does not settle the matter, ask, since "in production" is the user's fact to give.
- **Not shipped yet**: update the document itself. Replace the affected sections, and
when the abandoned approach was a real decision, keep it as an entry in Alternatives
considered with the reason it lost, so the reasoning is not erased. Refresh the
header's state and *Last updated*.
- **Shipped**: the document is now the record of why the system was built that way, so
leave its body alone. Write the change as a new, right-sized document (usually a
mini-doc) that names the original, states what changed and why, and carries its own
trade-offs. Link the two both ways: the only edit to the original is a line in its
header (`Amended by`) and its *Last updated*. An unlinked amendment leaves the next
reader with a design doc that silently contradicts the system.
Either way the reason for the change comes from the user. A change with no stated
reason is a question, not a paragraph to compose. So is everything the change left
unsaid: when it happened, and how the parts that depended on the old design work now.
## The default section catalog
This catalog is for documents no template governs (contract 3), in its default order:
Header · Glossary · Overview · Scope and context · Goals and out of scope · The design (a
series of sections) · Trade-offs of the chosen solution · Alternatives considered ·
Cross-cutting concerns · Testability and observability · Deployment plan · Open questions.
The recommended minimum is the header, the overview, and the design written around its
trade-offs; alternatives earn their place whenever there was a real decision, which is
almost always; cross-cutting concerns whenever anyone outside the team is impacted; the
closing sections when there is something to say. `references/sections.md` carries, for
each section, what it gives the reader, when it is worth having, how to write it well,
and the question to ask when its substance is missing.
## Diagrams
Two diagram types earn their place in most design docs: a **C4 container diagram** for
the architecture, authored as **Structurizr DSL** and embedded as a rendered image with
the DSL folded beneath it, and **sequence diagrams** for flows with temporal order,
written as **Mermaid**, which renders natively in Markdown. Read
`references/diagrams.md` before writing either one — it holds the embedding convention,
the rendering fallbacks, and the delegation rules for the `structurizr` and
`mermaid-sequence` skills.
## Reference files
| File | Read it when |
|---|---|
| `references/sections.md` | Before writing your first design doc of the session, and before a review's structural pass — per-section guidance, pitfalls, examples, and the question to ask when the substance is missing. It carries the detail this file only points at: goals worth measuring, which API fragments to show, the glossary's two exclusions. |
| `references/diagrams.md` | The document will carry a diagram — the C4 architecture view or a sequence flow: authoring the DSL, embedding image-plus-folded-source, and what to do when no renderer is available. |
## Attribution
The structure and writing guidance condense Cássio Botaro's "Design Docs" series with
practices from Malte Ubl's "Design Docs at Google", Rina Artstain's "How to write an
effective design document", Gergely Orosz's "RFCs and design docs", and the Tech Leads
Club skill *create-technical-design-doc*. See `NOTICE.md`.