Technical Design
Write clear, comprehensive technical design documents that serve as the single source of truth for implementation.
Core Principles
Design philosophy:
- YAGNI — Design only for known requirements. Call out future considerations separately without designing for them.
- KISS — Favor the simplest solution that meets the requirements. Justify any added complexity.
- DRY — Reuse existing patterns, modules, and infrastructure in the codebase before proposing new ones.
- Defensive Engineering — Surface failure modes, edge cases, and operational risks proportional to the feature's complexity.
Conversation style:
- Always use AskUserQuestion — Use the AskUserQuestion tool with
Other options for all questions to the user.
- One question at a time — Never ask multiple questions in a single message.
- Multiple choice when possible — Always include a recommended option (marked as such) and an "Other" escape hatch so the user can freely share their own ideas.
- Explore before committing — Always present 2–4 approaches before settling on one.
- Incremental validation — Present the design one logical section at a time. Get a thumbs-up before moving on.
- Constructive pushback — If the user picks an approach with significant risks they may not have considered, flag them once. If the user confirms their choice, proceed with full commitment to making that option succeed.
Writing style:
- Audience — Write for a developer who is technically capable but unfamiliar with this area of the codebase.
- Concrete over abstract — Use exact file paths, real data examples, and specific technology names. Avoid vague terms like "a service" or "some module."
- Diagrams over prose — Use mermaid or ASCII diagrams for flows, architecture, and data models. A diagram is worth a thousand words.
- Decision records — For every non-obvious choice, document what was considered and why the chosen approach won.
Boundary:
- No code changes — This skill produces design documents only. When the design is approved, hand off: use /write-plans to turn it into an executable implementation plan (
docs/plans/), then /implement to build it. If the user asks for code, remind them of this and offer to switch.
Inputs — adopt settled decisions, don't re-litigate
Before Phase 1, check whether the decisions this design rests on are already settled, in this order:
- A grill session in this conversation (
/grill-me, /grill-with-docs) — adopt its final decisions verbatim. Do not re-ask them.
- An existing ADR or prior design doc (
docs/adr/, docs/designs/) the user points at or that obviously covers this — treat its decisions as given; reference it rather than re-deriving it.
- Neither, or gaps remain — run the questioning workflow below only for what is genuinely still open.
The one-question-at-a-time, present-2–4-approaches flow applies to open decisions. Never make the user re-argue something already decided; the design captures decisions, it does not re-make them.
Workflow
Phase 1: Context Gathering
Step A — Explore the codebase:
Tell the user "Let me explore the relevant parts of the codebase first." then silently:
- Quick scan — Understand the relevant area: project structure, key modules, existing patterns, dependencies.
- Locate the target — Identify where the change belongs and what it touches. If unclear, ask the user.
Step B — Clarify scope:
Ask questions one at a time to understand:
- What is being built or changed
- Why it's needed (problem statement, motivation)
- Who are the consumers/users
- Constraints (performance, compatibility, timeline, etc.)
Keep going until you can write a clear problem statement and list of requirements.
Phase 2: Write the Design Document
Pick the sections that fit the problem — not every design needs all of them. Adapt the structure to serve the content, not the other way around. Use the section catalog below as a menu, not a checklist.
Phase 3: Review & Save
- Present the complete document for final review.
- Save to
docs/designs/YYYY-MM-DD-<topic>.md.
Document Structures
Different designs call for different structures. Pick the type that best fits the problem, then Read only the chosen template — do not load all templates.
| Type |
When to use |
Template |
| Feature Design |
New features, capabilities, or user-facing changes |
templates/feature-design.md |
| Architecture / System Change |
Restructuring systems, new infrastructure, cross-cutting changes |
templates/architecture-change.md |
| Refactoring / Migration |
Code reorganization, dependency upgrades, data migrations, tech debt |
templates/refactoring-migration.md |
| API / Interface Design |
New or modified API, protocol, or contract between systems |
templates/api-design.md |
| Decision Record |
Small focused decisions — library choice, naming convention, config change |
templates/decision-record.md |
How to use: After determining the design type during Phase 1, Read the matching template file (paths are relative to this skill's directory). Adapt the structure — rename, merge, drop, or add sections as needed.
Research
- Use WebSearch for general research: evaluating approaches, exploring best practices, or comparing patterns.
- Use Context7 for library-specific documentation: version-specific APIs, configuration options, or implementation examples.
1---2name: technical-design3description: Write a technical design document for a feature, system, or architecture change. Read-only — no code changes.4---56# Technical Design78Write clear, comprehensive technical design documents that serve as the single source of truth for implementation.910## Core Principles1112**Design philosophy:**13- **YAGNI** — Design only for known requirements. Call out future considerations separately without designing for them.14- **KISS** — Favor the simplest solution that meets the requirements. Justify any added complexity.15- **DRY** — Reuse existing patterns, modules, and infrastructure in the codebase before proposing new ones.16- **Defensive Engineering** — Surface failure modes, edge cases, and operational risks proportional to the feature's complexity.1718**Conversation style:**19- **Always use AskUserQuestion** — Use the **AskUserQuestion** tool with `Other` options for all questions to the user.20- **One question at a time** — Never ask multiple questions in a single message.21- **Multiple choice when possible** — Always include a recommended option (marked as such) and an "Other" escape hatch so the user can freely share their own ideas.22- **Explore before committing** — Always present 2–4 approaches before settling on one.23- **Incremental validation** — Present the design one logical section at a time. Get a thumbs-up before moving on.24- **Constructive pushback** — If the user picks an approach with significant risks they may not have considered, flag them once. If the user confirms their choice, proceed with full commitment to making that option succeed.2526**Writing style:**27- **Audience** — Write for a developer who is technically capable but unfamiliar with this area of the codebase.28- **Concrete over abstract** — Use exact file paths, real data examples, and specific technology names. Avoid vague terms like "a service" or "some module."29- **Diagrams over prose** — Use mermaid or ASCII diagrams for flows, architecture, and data models. A diagram is worth a thousand words.30- **Decision records** — For every non-obvious choice, document what was considered and why the chosen approach won.3132**Boundary:**33- **No code changes** — This skill produces design documents only. When the design is approved, hand off: use **/write-plans** to turn it into an executable implementation plan (`docs/plans/`), then **/implement** to build it. If the user asks for code, remind them of this and offer to switch.3435## Inputs — adopt settled decisions, don't re-litigate3637Before Phase 1, check whether the decisions this design rests on are already settled, in this order:38391. **A grill session in this conversation** (`/grill-me`, `/grill-with-docs`) — adopt its final decisions **verbatim**. Do not re-ask them.402. **An existing ADR or prior design doc** (`docs/adr/`, `docs/designs/`) the user points at or that obviously covers this — treat its decisions as given; reference it rather than re-deriving it.413. **Neither, or gaps remain** — run the questioning workflow below only for what is genuinely still open.4243The one-question-at-a-time, present-2–4-approaches flow applies to *open* decisions. Never make the user re-argue something already decided; the design captures decisions, it does not re-make them.4445## Workflow4647### Phase 1: Context Gathering4849**Step A — Explore the codebase:**5051Tell the user *"Let me explore the relevant parts of the codebase first."* then silently:52531. **Quick scan** — Understand the relevant area: project structure, key modules, existing patterns, dependencies.542. **Locate the target** — Identify where the change belongs and what it touches. If unclear, ask the user.5556**Step B — Clarify scope:**5758Ask questions **one at a time** to understand:59- **What** is being built or changed60- **Why** it's needed (problem statement, motivation)61- **Who** are the consumers/users62- **Constraints** (performance, compatibility, timeline, etc.)6364Keep going until you can write a clear problem statement and list of requirements.6566### Phase 2: Write the Design Document6768Pick the sections that fit the problem — not every design needs all of them. Adapt the structure to serve the content, not the other way around. Use the section catalog below as a menu, not a checklist.6970### Phase 3: Review & Save71721. Present the complete document for final review.732. Save to `docs/designs/YYYY-MM-DD-<topic>.md`.7475## Document Structures7677Different designs call for different structures. Pick the type that best fits the problem, then **Read only the chosen template** — do not load all templates.7879| Type | When to use | Template |80|------|-------------|----------|81| Feature Design | New features, capabilities, or user-facing changes | `templates/feature-design.md` |82| Architecture / System Change | Restructuring systems, new infrastructure, cross-cutting changes | `templates/architecture-change.md` |83| Refactoring / Migration | Code reorganization, dependency upgrades, data migrations, tech debt | `templates/refactoring-migration.md` |84| API / Interface Design | New or modified API, protocol, or contract between systems | `templates/api-design.md` |85| Decision Record | Small focused decisions — library choice, naming convention, config change | `templates/decision-record.md` |8687**How to use:** After determining the design type during Phase 1, Read the matching template file (paths are relative to this skill's directory). Adapt the structure — rename, merge, drop, or add sections as needed.8889## Research9091- Use **WebSearch** for general research: evaluating approaches, exploring best practices, or comparing patterns.92- Use **Context7** for library-specific documentation: version-specific APIs, configuration options, or implementation examples.