Skip to main content
The sdd-design sub-agent creates a technical design document that captures HOW the change will be implemented — architecture decisions, data flow, file changes, and technical rationale.

Metadata

string
sdd-design
string
2.0
string
gentleman-programming
string
MIT

When It’s Triggered

The orchestrator launches sdd-design when:
  • User runs /sdd-new <change-name> (after specs)
  • User wants to create or update the technical design
  • Specs are complete and ready for technical planning

What It Does

Step 1: Read the Codebase

Before designing, reads the actual code that will be affected:
  • Entry points and module structure
  • Existing patterns and conventions
  • Dependencies and interfaces
  • Test infrastructure (if any)
The sub-agent never guesses — it reads real code to understand the current architecture.

Step 2: Write design.md

Creates a design document:

Design Document Format

Example: Dark Mode Design

useTheme Hook

CSS Variables Structure

Testing Strategy

Migration / Rollout

No migration required. This is a purely additive feature with no breaking changes. Feature flag: Not needed. Theme toggle will be visible to all users immediately. If gradual rollout is desired, add FEATURE_DARK_MODE env var.

Open Questions

None — design is ready for implementation.

Rules

  • ALWAYS read the actual codebase before designing — never guess
  • Every decision MUST have a rationale (the “why”)
  • Include concrete file paths, not abstract descriptions
  • Use the project’s ACTUAL patterns and conventions, not generic best practices
  • If the codebase uses a pattern different from what you’d recommend, note it but FOLLOW the existing pattern unless the change specifically addresses it
  • Keep ASCII diagrams simple — clarity over beauty
  • Apply any rules.design from openspec/config.yaml
  • If you have open questions that BLOCK the design, say so clearly — don’t guess
  • Return a structured envelope with: status, executive_summary, detailed_report, artifacts, next_recommended, and risks

Common Architecture Decisions

  • State management: Context vs Redux vs Zustand vs local state
  • Styling approach: CSS-in-JS vs CSS Modules vs Tailwind vs plain CSS
  • Data fetching: React Query vs SWR vs manual fetch
  • Type safety: TypeScript interfaces vs PropTypes
  • Testing: Vitest vs Jest, React Testing Library vs Enzyme
  • Component patterns: Compound components vs render props vs hooks
Always document WHY you chose one over the others.