Design (Phase 3)
Produce the artifacts Build will reference and Test will execute against.
Prerequisite
.claude/sdlc/gates/analyze-<task-slug>.md must exist and be signed.
Artifacts produced (or updated)
All live under .claude/sdlc/architecture/ with a manifest.json index:
- Application architecture — components, integrations, data flow, NFRs (performance, availability, scalability)
- Data architecture — entities, schema changes, flows, retention, classification
- Platform architecture — runtimes, orchestration, environments
- Infrastructure architecture — compute, network, storage, identity
- Security architecture — threat model, controls, secrets handling, authn/authz
- Test architecture — pyramid shape, test types, tooling, environments, test-data strategy
- Technical specifications — API contracts, data contracts, module responsibilities (under
.claude/sdlc/tech-specs/)
- Test cases — one or more per requirement, each tied to REQ IDs (under
.claude/sdlc/test-cases/)
- DevOps pipeline design — stages, gates, environments, promotion rules
Rule: validate before rewriting
If architecture artifacts already exist:
- Read them.
- Produce a validation report comparing existing architecture against the current requirements set.
- Surface deltas (new NFRs, new entities, new integrations, new controls) for human decision.
- Only after the human agrees, update the affected files. Never wholesale-regenerate a working architecture.
Test-case rule
Each requirement gets at least one test case. Each test case references:
- The REQ IDs it covers
- The test type (unit / integration / e2e / NFR)
- Preconditions, steps, expected outcome
- Data needs
Use templates/test-case.md.
Tech spec rule
For each in-scope module or service, produce or update a spec under .claude/sdlc/tech-specs/. Specs are the contract Build validates its code against — API shape, inputs/outputs, error modes, side effects, NFR commitments.
Subagent delegation (optional)
When the architect or test-designer subagents are enabled, run them in parallel:
architect validates existing architecture and proposes changes (read-only over code; write-only into architecture/)
test-designer produces test cases from requirements (write-only into test-cases/)
The skill coordinates; the human still approves.
Human gate
Summarize: architecture deltas, test-case count, spec count, pipeline changes. Sign-off goes to .claude/sdlc/gates/design-<task-slug>.md.
What this skill must NOT do
- Do not write application code. That is Build.
- Do not generate a new architecture when a valid one exists — validate first.
- Do not produce test cases that aren't traceable to a REQ ID.
References
templates/tech-spec.md
templates/test-case.md
templates/gate.md
agents/architect.md
agents/test-designer.md
Next step hint
After writing the gate file, pipe the next_suggestions conditions to skills/_shared/next-hint.sh and print any output:
printf '%s\n' \
'design_gate_signed|run /build to write code and unit tests scoped to the plan' \
'pending_signoff_for_current_user|write your sign-off at sign-offs/<REQ-ID>-<role>.md, then /build when all roles are covered' \
| bash skills/_shared/next-hint.sh
Print any output verbatim. If the script outputs nothing, add nothing.
1---2name: design3description: Use this skill after Phase 2 Analyze to produce the design artifacts a build depends on — application architecture, data/platform/infrastructure/security architecture, test architecture, test cases, technical specifications, and DevOps pipeline design. Validates existing architecture artifacts against current requirements before writing new ones. Trigger after requirements have been approved, or when the user asks to "design", "architect", "create specs", or "plan the tests". This is the densest phase — consider delegating architecture validation and test-case generation to subagents when available.4---56# Design (Phase 3)78Produce the artifacts Build will reference and Test will execute against.910## Prerequisite1112`.claude/sdlc/gates/analyze-<task-slug>.md` must exist and be signed.1314## Artifacts produced (or updated)1516All live under `.claude/sdlc/architecture/` with a `manifest.json` index:17181. **Application architecture** — components, integrations, data flow, NFRs (performance, availability, scalability)192. **Data architecture** — entities, schema changes, flows, retention, classification203. **Platform architecture** — runtimes, orchestration, environments214. **Infrastructure architecture** — compute, network, storage, identity225. **Security architecture** — threat model, controls, secrets handling, authn/authz236. **Test architecture** — pyramid shape, test types, tooling, environments, test-data strategy247. **Technical specifications** — API contracts, data contracts, module responsibilities (under `.claude/sdlc/tech-specs/`)258. **Test cases** — one or more per requirement, each tied to REQ IDs (under `.claude/sdlc/test-cases/`)269. **DevOps pipeline design** — stages, gates, environments, promotion rules2728## Rule: validate before rewriting2930If architecture artifacts already exist:3132- Read them.33- Produce a **validation report** comparing existing architecture against the current requirements set.34- Surface deltas (new NFRs, new entities, new integrations, new controls) for human decision.35- Only *after* the human agrees, update the affected files. Never wholesale-regenerate a working architecture.3637## Test-case rule3839Each requirement gets at least one test case. Each test case references:4041- The REQ IDs it covers42- The test type (unit / integration / e2e / NFR)43- Preconditions, steps, expected outcome44- Data needs4546Use `templates/test-case.md`.4748## Tech spec rule4950For each in-scope module or service, produce or update a spec under `.claude/sdlc/tech-specs/`. Specs are the contract Build validates its code against — API shape, inputs/outputs, error modes, side effects, NFR commitments.5152## Subagent delegation (optional)5354When the `architect` or `test-designer` subagents are enabled, run them in parallel:5556- `architect` validates existing architecture and proposes changes (read-only over code; write-only into `architecture/`)57- `test-designer` produces test cases from requirements (write-only into `test-cases/`)5859The skill coordinates; the human still approves.6061## Human gate6263Summarize: architecture deltas, test-case count, spec count, pipeline changes. Sign-off goes to `.claude/sdlc/gates/design-<task-slug>.md`.6465## What this skill must NOT do6667- Do not write application code. That is Build.68- Do not generate a new architecture when a valid one exists — validate first.69- Do not produce test cases that aren't traceable to a REQ ID.7071## References7273- `templates/tech-spec.md`74- `templates/test-case.md`75- `templates/gate.md`76- `agents/architect.md`77- `agents/test-designer.md`7879## Next step hint8081After writing the gate file, pipe the `next_suggestions` conditions to `skills/_shared/next-hint.sh` and print any output:8283```bash84printf '%s\n' \85 'design_gate_signed|run /build to write code and unit tests scoped to the plan' \86 'pending_signoff_for_current_user|write your sign-off at sign-offs/<REQ-ID>-<role>.md, then /build when all roles are covered' \87 | bash skills/_shared/next-hint.sh88```8990Print any output verbatim. If the script outputs nothing, add nothing.