Technical design document
You are a Software Architect writing a technical design document at
docs/work/{work-id}/tdd.md, for whatever work item the argument names —
an epic, a story, a bug, or a spike. Read
work-item-resolution.md
first — it resolves the source system and canonical ID before you touch
the backlog or the tracker. If the ID resolves to a story, bug, or spike, also
read its parent epic's context (backlog row or tracker epic, and its
tdd.md if one exists) — cite it by ID rather than re-narrating it.
This skill writes design documents. It is not test-driven development —
requests to write a failing test first, or to drive code through red/green/
refactor, belong to implement.
Conventions
Read delivery-conventions.md
when resolving {work-id} or checking artefact boundaries.
Artefact
docs/work/{work-id}/tdd.md — implementation specification for one work
item (skeleton or full), keyed by that item's own canonical ID. A
story's TDD sits at docs/work/{story-id}/tdd.md, alongside its parent
epic's folder, not inside it.
Path resolution
Default: docs/work/{work-id}/tdd.md. User-named paths under docs/work/ override.
Repos written before this skill was renamed from design hold the same
artefact at docs/work/{work-id}/design.md. When that file exists and
tdd.md does not, say so, git mv it to tdd.md, and update it in place —
never leave two copies of the same design side by side.
Mode (--mode)
skeleton — walking skeleton, Phase 0, 2–4 pages
full — Sprint 2+, 5–10 pages
Negative constraints
Do NOT put in tdd.md:
- Architecture-wide patterns already in solution.md — cite
solution.md §{N.M}
- Business strategy →
docs/product/product.md
- Phase sequencing →
docs/product/roadmap.md
- Task-level Gherkin →
docs/work/{work-id}/tasks.md via tasks
Context
[Work item row in backlog.md or the tracker, solution.md, parent epic's
tdd.md if this is a story/bug/spike, existing tdd.md (or legacy design.md)
if updating, codebase]
Steps (skeleton)
- Read solution.md and the work item's row (backlog.md or the tracker); if
it is a story, bug, or spike, also read its parent epic's tdd.md
- Draft §1–§6 per template
- §4 must list what this work item did not ship
Steps (full)
- Read all context
- Draft §1–§12 per template
Pre-save validation
Output format
Save to docs/work/{work-id}/tdd.md. Use assets/tdd.template.md.
Gotchas
- Do not copy solution.md — cite
solution.md §{N.M} instead.
- Task Gherkin belongs in
tasks.md, not the TDD (gates/slice scope only).
skeleton is 2–4 pages; full is 5–10 — do not mix section sets.
- §4 Out of scope must list what this work item explicitly did not ship.
ADR candidates
Decisions recorded in tdd.md do not reach the architecture register on
their own. After the work item ships, run adr plan <work-id> to harvest
them — it triages each candidate into promote, inline, or defer, and hands
the promoted ones to adr write.
Supporting files
- assets/tdd.template.md
- examples/checkout-foundation.md
Related skills
tasks, solution, adr
implement — test-driven development, i.e. actually writing the tests and code
docs-review — review or critique an existing tdd.md
1---2name: tdd3description: Use when the user wants a technical design document (TDD) for any work item — epic, story, bug, or spike — at docs/work/{work-id}/tdd.md, in skeleton or full mode. Pass a work item ID (CHK01, or a Linear/Jira/GitHub key like JIRA-123). Resolves the source system and writes at whatever level the ID names — a story gets its own tdd.md beside its parent epic's, not nested inside it. Cite solution.md — do not re-narrate architecture. Triggers on "tdd CHK01", "write the technical design for JIRA-123", "design the epic", "how should we build this story". For reviewing an existing tdd.md, use docs-review instead. Do NOT use for test-driven development — writing a failing test first, red/green/refactor, or any test-authoring task is implement. Do NOT use to write the breakdown itself — stories, tasks, or sub-tasks (tasks), task Gherkin (tasks), system-wide architecture (solution), ADR write (adr), or code implementation (implement).4license: MIT5---67# Technical design document89You are a Software Architect writing a technical design document at10`docs/work/{work-id}/tdd.md`, for whatever work item the argument names —11an epic, a story, a bug, or a spike. Read12[work-item-resolution.md](../tasks/references/work-item-resolution.md)13**first** — it resolves the source system and canonical ID before you touch14the backlog or the tracker. If the ID resolves to a story, bug, or spike, also15read its parent epic's context (backlog row or tracker epic, and its16`tdd.md` if one exists) — cite it by ID rather than re-narrating it.1718This skill writes design documents. It is **not** test-driven development —19requests to write a failing test first, or to drive code through red/green/20refactor, belong to **implement**.2122## Conventions2324Read [delivery-conventions.md](../tasks/references/delivery-conventions.md)25when resolving `{work-id}` or checking artefact boundaries.2627## Artefact2829`docs/work/{work-id}/tdd.md` — implementation specification for one work30item (skeleton or full), keyed by *that item's own* canonical ID. A31story's TDD sits at `docs/work/{story-id}/tdd.md`, alongside its parent32epic's folder, not inside it.3334## Path resolution3536Default: `docs/work/{work-id}/tdd.md`. User-named paths under `docs/work/` override.3738Repos written before this skill was renamed from `design` hold the same39artefact at `docs/work/{work-id}/design.md`. When that file exists and40`tdd.md` does not, say so, `git mv` it to `tdd.md`, and update it in place —41never leave two copies of the same design side by side.4243## Mode (`--mode`)4445- `skeleton` — walking skeleton, Phase 0, 2–4 pages46- `full` — Sprint 2+, 5–10 pages4748## Negative constraints4950Do NOT put in tdd.md:5152- Architecture-wide patterns already in solution.md — cite `solution.md §{N.M}`53- Business strategy → `docs/product/product.md`54- Phase sequencing → `docs/product/roadmap.md`55- Task-level Gherkin → `docs/work/{work-id}/tasks.md` via **tasks**5657## Context5859[Work item row in backlog.md or the tracker, solution.md, parent epic's60tdd.md if this is a story/bug/spike, existing tdd.md (or legacy design.md)61if updating, codebase]6263## Steps (skeleton)64651. Read solution.md and the work item's row (backlog.md or the tracker); if66 it is a story, bug, or spike, also read its parent epic's tdd.md672. Draft §1–§6 per template683. §4 must list what this work item did **not** ship6970## Steps (full)71721. Read all context732. Draft §1–§12 per template7475## Pre-save validation7677- [ ] Work item resolved per work-item-resolution.md — asked the user on any78 ambiguity in source system or ID79- [ ] Path is `docs/work/{work-id}/tdd.md` keyed by this item's own80 canonical ID (filesystem-only: correct slug, ≤2 words, not the internal ID)81- [ ] A legacy `design.md` for this work item was moved, not duplicated82- [ ] A story/bug/spike TDD cites its parent epic by ID rather than83 duplicating its tdd.md84- [ ] Solution cited by section; no duplicated architecture narrative85- [ ] No Gherkin task scenarios (gates/slice only)86- [ ] Mode-appropriate sections only (skeleton vs full)87- [ ] DRAFTING AIDE block removed8889## Output format9091Save to `docs/work/{work-id}/tdd.md`. Use [assets/tdd.template.md](assets/tdd.template.md).9293## Gotchas9495- **Do not copy solution.md** — cite `solution.md §{N.M}` instead.96- **Task Gherkin** belongs in `tasks.md`, not the TDD (gates/slice scope only).97- **`skeleton`** is 2–4 pages; **`full`** is 5–10 — do not mix section sets.98- **§4 Out of scope** must list what this work item explicitly did not ship.99100## ADR candidates101102Decisions recorded in `tdd.md` do not reach the architecture register on103their own. After the work item ships, run `adr plan <work-id>` to harvest104them — it triages each candidate into promote, inline, or defer, and hands105the promoted ones to **adr write**.106107## Supporting files108109- [assets/tdd.template.md](assets/tdd.template.md)110- [examples/checkout-foundation.md](examples/checkout-foundation.md)111112## Related skills113114- `tasks`, `solution`, `adr`115- `implement` — test-driven development, i.e. actually writing the tests and code116- `docs-review` — review or critique an existing tdd.md