$npx -y skills add gotalab/cc-sdd --skill kiro-spec-designCreate comprehensive technical design for a specification
| 1 | # Technical Design Generator |
| 2 | |
| 3 | <background_information> |
| 4 | - **Success Criteria**: |
| 5 | - All requirements mapped to technical components with clear interfaces |
| 6 | - The design makes responsibility boundaries explicit enough to guide task generation and review |
| 7 | - Appropriate architecture discovery and research completed |
| 8 | - Design aligns with steering context and existing patterns |
| 9 | - Visual diagrams included for complex architectures |
| 10 | </background_information> |
| 11 | |
| 12 | <instructions> |
| 13 | ## Execution Steps |
| 14 | |
| 15 | ### Step 1: Load Context |
| 16 | |
| 17 | **Read all necessary context**: |
| 18 | - `{{KIRO_DIR}}/specs/$1/spec.json`, `requirements.md`, `design.md` (if exists) |
| 19 | - `{{KIRO_DIR}}/specs/$1/research.md` (if exists, contains gap analysis from `/kiro-validate-gap`) |
| 20 | - Core steering context: `product.md`, `tech.md`, `structure.md` |
| 21 | - Additional steering files only when directly relevant to requirement coverage, architecture boundaries, integrations, runtime prerequisites, security/performance constraints, or team conventions that affect implementation readiness |
| 22 | - `{{KIRO_DIR}}/settings/templates/specs/design.md` for document structure |
| 23 | - Read `rules/design-principles.md` from this skill's directory for design principles |
| 24 | - `{{KIRO_DIR}}/settings/templates/specs/research.md` for discovery log structure |
| 25 | |
| 26 | **Validate requirements approval**: |
| 27 | - If `-y` flag provided ($2 == "-y"): Auto-approve requirements in spec.json |
| 28 | - Otherwise: Verify approval status (stop if unapproved, see Safety & Fallback) |
| 29 | |
| 30 | ### Step 2: Discovery & Analysis |
| 31 | |
| 32 | **Critical: This phase ensures design is based on complete, accurate information.** |
| 33 | |
| 34 | 1. **Classify Feature Type**: |
| 35 | - **New Feature** (greenfield) → Full discovery required |
| 36 | - **Extension** (existing system) → Integration-focused discovery |
| 37 | - **Simple Addition** (CRUD/UI) → Minimal or no discovery |
| 38 | - **Complex Integration** → Comprehensive analysis required |
| 39 | |
| 40 | 2. **Execute Appropriate Discovery Process**: |
| 41 | |
| 42 | **For Complex/New Features**: |
| 43 | - Read and execute `rules/design-discovery-full.md` from this skill's directory |
| 44 | - Conduct thorough research using WebSearch/WebFetch: |
| 45 | - Latest architectural patterns and best practices |
| 46 | - External dependency verification (APIs, libraries, versions, compatibility) |
| 47 | - Official documentation, migration guides, known issues |
| 48 | - Performance benchmarks and security considerations |
| 49 | |
| 50 | **For Extensions**: |
| 51 | - Read and execute `rules/design-discovery-light.md` from this skill's directory |
| 52 | - Focus on integration points, existing patterns, compatibility |
| 53 | - Use Grep to analyze existing codebase patterns |
| 54 | |
| 55 | **For Simple Additions**: |
| 56 | - Skip formal discovery, quick pattern check only |
| 57 | |
| 58 | #### Parallel Research (sub-agent dispatch) |
| 59 | |
| 60 | The following research areas are independent and can be dispatched as **sub-agents**. The agent should decide the optimal decomposition based on feature complexity — split, merge, add, or skip sub-agents as needed. Each sub-agent returns a **findings summary** (not raw data) to keep the main context clean for synthesis. |
| 61 | |
| 62 | **Typical research areas** (adjust as appropriate): |
| 63 | - **Codebase analysis**: Existing architecture patterns, integration points, code conventions |
| 64 | - **External research**: Dependencies, APIs, latest best practices |
| 65 | - **Context loading** (usually main context): Steering files, design principles, discovery rules, templates |
| 66 | |
| 67 | For simple additions, skip sub-agent dispatch entirely and do a quick pattern check in main context. |
| 68 | |
| 69 | After all findings return, synthesize in main context before proceeding. |
| 70 | |
| 71 | 3. **Retain Discovery Findings for Step 3**: |
| 72 | - External API contracts and constraints |
| 73 | - Technology decisions with rationale |
| 74 | - Existing patterns to follow or extend |
| 75 | - Integration points and dependencies |
| 76 | - Identified risks and mitigation strategies |
| 77 | - Boundary candidates, out-of-boundary decisions, and likely revalidation triggers |
| 78 | |
| 79 | 4. **Persist Findings to Research Log**: |
| 80 | - Create or update `{{KIRO_DIR}}/specs/$1/research.md` using the shared template |
| 81 | - Summarize discovery scope and key findings (Summary section) |
| 82 | - Record investigations in Research Log topics with sources and implications |
| 83 | - Document architecture pattern evaluation, design decisions, and risks using the template sections |
| 84 | - Use the language specified in spec.json when writing or updating `research.md` |
| 85 | |
| 86 | ### Step 3: Synthesis |
| 87 | |
| 88 | **Apply design synthesis to discovery findings before writing.** |
| 89 | |
| 90 | - Read and apply `rules/design-synthesis.md` from this skill's directory |
| 91 | - This step requires the full picture from discovery — do not parallelize or delegate to sub-agents |
| 92 | - Record synthesis outcomes (generalizations found, build-vs-adopt decisions, simplifications) in `research.md` |
| 93 | |
| 94 | ### Step 4: Generate Design Draf |