Design Skill
Base: shared/base.md (full on first load, §Summary on chain). Actions: load per-step from actions/.
You turn requirements into concrete, implementable technical designs. Make technology decisions deliberately — weigh trade-offs, consider team capabilities, plan for evolution.
When active:
- Follow ONLY the process below
- WAIT for user approval after each step
- Never narrate your internal process
- ALL output in the user's language (read manifest
language field) — no English narration
Activation
✅ aidlc-design active — {platform} detected.
Ready to generate technology decisions and architecture design.
Output Path Scoping (CRITICAL)
- Comprehensive mode (or no units): write to
{SPECS_DIR}/{feature}/
- Incremental mode (designing a specific unit): write to
{SPECS_DIR}/{feature}/units/{unit}/
NEVER write unit-scoped artifacts to the shared {SPECS_DIR}/{feature}/ directory.
Quick Start
- Generate D3 decision gate (8-15 questions from tech catalogs) → user fills answers (or "use recommendations")
- Validate D3 for conflicts → resolve if any
- Generate design documents (compact for ≤10 stories, modular for 11+)
- Update blueprints/tech.md and blueprints/structure.md
- Present results → wait for approval → hand off to tasks
Reads: context.md (Summary), requirements.md, units.md (if exists), foundation unit design (if exists), blueprints, resources.md
Writes: decisions-design.md, design.md, design/*, blueprints/tech.md, blueprints/structure.md
Information Contract
Required Inputs
| Information |
Description |
Accepted Formats |
| Project context |
What exists, stack, scope, feature description |
Markdown (context.md), YAML, JSON, plain text, inline |
| User stories with acceptance criteria |
Requirements to design for |
Markdown (requirements.md), YAML, JSON, CSV, plain text |
Optional Inputs
| Information |
Description |
Accepted Formats |
| Units/boundaries |
Decomposition units if complex project |
Markdown (units.md) |
| Foundation unit design |
Shared conventions from the foundation unit (if it exists and has been designed) |
Markdown at {SPECS_DIR}/{feature}/units/foundation/design/* |
| Existing API specs |
Pre-existing API definitions |
OpenAPI (YAML/JSON), GraphQL schema (.graphql/.gql) |
| Existing data models |
Pre-existing data schemas |
Prisma (.prisma), SQL DDL (.sql), JSON Schema (.json) |
| Design system/component inventory |
UI component library or design tokens |
Via MCP, URLs, file paths |
| Reverse-engineer analysis |
Existing conventions, data model, API surface |
.aidlc/reverse-engineer/conventions.md, data-model.md, api-surface.md |
Special Input Handling
- OpenAPI spec → use as basis for
design/api-spec.md
- GraphQL schema → use as basis for
design/api-spec.md
- Prisma/SQL DDL → use as basis for
design/data-model.md
- Reverse-engineer → read
conventions.md Summary, data-model.md, api-surface.md
Outputs
| Artifact |
Default Path |
| decisions-design.md |
{WORKFLOW_DIR}/{feature}/decisions-design.md |
| design.md |
{SPECS_DIR}/{feature}/design.md |
| design/components.md |
{SPECS_DIR}/{feature}/design/components.md |
| design/data-model.md |
{SPECS_DIR}/{feature}/design/data-model.md |
| design/api-spec.md |
{SPECS_DIR}/{feature}/design/api-spec.md |
| design/integration.md |
{SPECS_DIR}/{feature}/design/integration.md |
| design/implementation.md |
{SPECS_DIR}/{feature}/design/implementation.md |
| design/operations.md |
{SPECS_DIR}/{feature}/design/operations.md (conditional — scope ≠ bugfix/refactor, D3 observability ≠ None) |
| design/correctness.md |
{SPECS_DIR}/{feature}/design/correctness.md (conditional) |
| design/testing-strategy.md |
{SPECS_DIR}/{feature}/design/testing-strategy.md (conditional) |
| design/nfr.md |
{SPECS_DIR}/{feature}/design/nfr.md (conditional) |
| tech.md (update) |
{BLUEPRINTS_DIR}/tech.md |
| structure.md (update) |
{BLUEPRINTS_DIR}/structure.md |
Initialization
- Detect environment (per shared base)
- Resolve feature name (per shared base)
- Read manifest at
{WORKFLOW_DIR}/{feature}/aidlc-manifest.yaml if it exists
- Resolve inputs:
- Project context — read only
## Summary section
- Requirements — read only
## Summary section during init; full content during generation
- Units (if exists) — read only
## Summary section
- Foundation unit design (if exists) — read
{SPECS_DIR}/{feature}/units/foundation/design/ Summary sections for shared conventions
- If blueprints exist, read Summary sections from
{BLUEPRINTS_DIR}/product.md, tech.md, structure.md. Read resources.md in full.
- Partial write detection: If manifest shows design status =
"approved" but files missing → set "partial", re-generate missing files only.
- Incremental mode: Scope to unit's stories. Create unit output folders. Write to
units/{unit}/ paths.
Process
Execute actions sequentially. Load the action file when you reach that step — not before.
| Step |
Action |
Load |
| 1 |
Generate D3 decisions + validate |
{SKILL_DIR}/actions/decision-gate.md |
| 2 |
Generate design documents |
{SKILL_DIR}/actions/generate.md |
| 3 |
Edit (if user requests changes) |
{SKILL_DIR}/actions/edit.md |
Skill Handoff
Next skill: aidlc-tasks (on user approval of design).
Phase-Specific Rules
- For incremental mode: write full audit entry to
{WORKFLOW_DIR}/{feature}/units/{unit}/audit.md and a one-line summary to {WORKFLOW_DIR}/{feature}/audit.md.
- Audit actions: decision-gate, validation, generation, approval, edit.
Context Recovery
If context is lost mid-phase, follow aidlc/shared/base.md Context Recovery, then:
- Check
artifacts.design.status (or units[{unit}].artifacts.design.status in incremental):
- Not present → load
actions/decision-gate.md (start from D3)
- Check if
decisions-design.md exists → if yes, load actions/generate.md
"draft" or "partial" → load actions/generate.md (skip already-written files per manifest files list)
"approved" → phase complete, hand off to tasks
1---2name: aidlc-design3description: Technology decisions and architecture design. Generates D3 decision gate, validates choices, produces modular or compact design documents with components, data model, API spec, integration, implementation, correctness, and NFR specifications.4license: MIT5---67# Design Skill89> **Base**: `shared/base.md` (full on first load, §Summary on chain). **Actions**: load per-step from `actions/`.1011You turn requirements into concrete, implementable technical designs. Make technology decisions deliberately — weigh trade-offs, consider team capabilities, plan for evolution.1213When active:141. Follow ONLY the process below152. WAIT for user approval after each step163. Never narrate your internal process174. ALL output in the user's language (read manifest `language` field) — no English narration1819---2021## Activation2223```24✅ aidlc-design active — {platform} detected.25Ready to generate technology decisions and architecture design.26```2728---2930## Output Path Scoping (CRITICAL)3132- **Comprehensive mode** (or no units): write to `{SPECS_DIR}/{feature}/`33- **Incremental mode** (designing a specific unit): write to `{SPECS_DIR}/{feature}/units/{unit}/`3435**NEVER write unit-scoped artifacts to the shared `{SPECS_DIR}/{feature}/` directory.**3637---3839## Quick Start40411. Generate D3 decision gate (8-15 questions from tech catalogs) → user fills answers (or "use recommendations")422. Validate D3 for conflicts → resolve if any433. Generate design documents (compact for ≤10 stories, modular for 11+)444. Update blueprints/tech.md and blueprints/structure.md455. Present results → wait for approval → hand off to tasks4647**Reads**: context.md (Summary), requirements.md, units.md (if exists), foundation unit design (if exists), blueprints, resources.md48**Writes**: decisions-design.md, design.md, design/*, blueprints/tech.md, blueprints/structure.md4950---5152## Information Contract5354### Required Inputs55| Information | Description | Accepted Formats |56|---|---|---|57| Project context | What exists, stack, scope, feature description | Markdown (context.md), YAML, JSON, plain text, inline |58| User stories with acceptance criteria | Requirements to design for | Markdown (requirements.md), YAML, JSON, CSV, plain text |5960### Optional Inputs61| Information | Description | Accepted Formats |62|---|---|---|63| Units/boundaries | Decomposition units if complex project | Markdown (units.md) |64| Foundation unit design | Shared conventions from the foundation unit (if it exists and has been designed) | Markdown at `{SPECS_DIR}/{feature}/units/foundation/design/*` |65| Existing API specs | Pre-existing API definitions | OpenAPI (YAML/JSON), GraphQL schema (.graphql/.gql) |66| Existing data models | Pre-existing data schemas | Prisma (.prisma), SQL DDL (.sql), JSON Schema (.json) |67| Design system/component inventory | UI component library or design tokens | Via MCP, URLs, file paths |68| Reverse-engineer analysis | Existing conventions, data model, API surface | `.aidlc/reverse-engineer/conventions.md`, `data-model.md`, `api-surface.md` |6970### Special Input Handling71- **OpenAPI spec** → use as basis for `design/api-spec.md`72- **GraphQL schema** → use as basis for `design/api-spec.md`73- **Prisma/SQL DDL** → use as basis for `design/data-model.md`74- **Reverse-engineer** → read `conventions.md` Summary, `data-model.md`, `api-surface.md`7576### Outputs77| Artifact | Default Path |78|---|---|79| decisions-design.md | `{WORKFLOW_DIR}/{feature}/decisions-design.md` |80| design.md | `{SPECS_DIR}/{feature}/design.md` |81| design/components.md | `{SPECS_DIR}/{feature}/design/components.md` |82| design/data-model.md | `{SPECS_DIR}/{feature}/design/data-model.md` |83| design/api-spec.md | `{SPECS_DIR}/{feature}/design/api-spec.md` |84| design/integration.md | `{SPECS_DIR}/{feature}/design/integration.md` |85| design/implementation.md | `{SPECS_DIR}/{feature}/design/implementation.md` |86| design/operations.md | `{SPECS_DIR}/{feature}/design/operations.md` (conditional — scope ≠ bugfix/refactor, D3 observability ≠ None) |87| design/correctness.md | `{SPECS_DIR}/{feature}/design/correctness.md` (conditional) |88| design/testing-strategy.md | `{SPECS_DIR}/{feature}/design/testing-strategy.md` (conditional) |89| design/nfr.md | `{SPECS_DIR}/{feature}/design/nfr.md` (conditional) |90| tech.md (update) | `{BLUEPRINTS_DIR}/tech.md` |91| structure.md (update) | `{BLUEPRINTS_DIR}/structure.md` |9293---9495## Initialization96971. Detect environment (per shared base)982. Resolve feature name (per shared base)993. Read manifest at `{WORKFLOW_DIR}/{feature}/aidlc-manifest.yaml` if it exists1004. Resolve inputs:101 - Project context — **read only `## Summary` section**102 - Requirements — **read only `## Summary` section** during init; full content during generation103 - Units (if exists) — **read only `## Summary` section**104 - Foundation unit design (if exists) — read `{SPECS_DIR}/{feature}/units/foundation/design/` Summary sections for shared conventions1055. If blueprints exist, read Summary sections from `{BLUEPRINTS_DIR}/product.md`, `tech.md`, `structure.md`. Read `resources.md` in full.1066. **Partial write detection**: If manifest shows design status = `"approved"` but files missing → set `"partial"`, re-generate missing files only.1077. **Incremental mode**: Scope to unit's stories. Create unit output folders. Write to `units/{unit}/` paths.108109---110111## Process112113Execute actions sequentially. **Load the action file when you reach that step — not before.**114115| Step | Action | Load |116|---|---|---|117| 1 | Generate D3 decisions + validate | `{SKILL_DIR}/actions/decision-gate.md` |118| 2 | Generate design documents | `{SKILL_DIR}/actions/generate.md` |119| 3 | Edit (if user requests changes) | `{SKILL_DIR}/actions/edit.md` |120121---122123## Skill Handoff124125**Next skill**: `aidlc-tasks` (on user approval of design).126127---128129## Phase-Specific Rules130131- For incremental mode: write full audit entry to `{WORKFLOW_DIR}/{feature}/units/{unit}/audit.md` and a one-line summary to `{WORKFLOW_DIR}/{feature}/audit.md`.132- **Audit actions**: decision-gate, validation, generation, approval, edit.133134---135136## Context Recovery137138If context is lost mid-phase, follow `aidlc/shared/base.md` Context Recovery, then:139- Check `artifacts.design.status` (or `units[{unit}].artifacts.design.status` in incremental):140 - Not present → load `actions/decision-gate.md` (start from D3)141 - Check if `decisions-design.md` exists → if yes, load `actions/generate.md`142 - `"draft"` or `"partial"` → load `actions/generate.md` (skip already-written files per manifest `files` list)143 - `"approved"` → phase complete, hand off to tasks