$npx -y skills add gotalab/cc-sdd --skill kiro-spec-batchCreate complete specs (requirements, design, tasks) for all features in roadmap.md using parallel sub-agent dispatch by dependency wave.
| 1 | # Spec Batch |
| 2 | |
| 3 | <background_information> |
| 4 | - **Success Criteria**: |
| 5 | - All features have complete spec files (spec.json, requirements.md, design.md, tasks.md) |
| 6 | - Dependency ordering respected (upstream specs complete before downstream) |
| 7 | - Independent features processed in parallel via sub-agent dispatch |
| 8 | - Cross-spec consistency verified (data models, interfaces, naming) |
| 9 | - Mixed roadmap context understood without breaking `## Specs (dependency order)` parsing |
| 10 | - Controller context stays lightweight (sub-agents do the heavy work) |
| 11 | </background_information> |
| 12 | |
| 13 | <instructions> |
| 14 | |
| 15 | ## Step 1: Read Roadmap and Validate |
| 16 | |
| 17 | 1. Read `{{KIRO_DIR}}/steering/roadmap.md` |
| 18 | 2. Parse the `## Specs (dependency order)` section to extract: |
| 19 | - Feature names |
| 20 | - One-line descriptions |
| 21 | - Dependencies for each feature |
| 22 | - Completion status (`[x]` = done, `[ ]` = pending) |
| 23 | 3. If present, also read for context: |
| 24 | - `## Existing Spec Updates` |
| 25 | - `## Direct Implementation Candidates` |
| 26 | Do not include these in dependency-wave execution; they are awareness-only inputs for sequencing and consistency review. |
| 27 | 4. For each pending feature in `## Specs (dependency order)`, verify `{{KIRO_DIR}}/specs/<feature>/brief.md` exists |
| 28 | 5. If any brief.md is missing, stop and report: "Missing brief.md for: [list]. Run `/kiro-discovery` to generate briefs first." |
| 29 | |
| 30 | ## Step 2: Build Dependency Waves |
| 31 | |
| 32 | Group pending features into waves based on dependencies: |
| 33 | |
| 34 | - **Wave 1**: Features with no dependencies (or all dependencies already completed `[x]`) |
| 35 | - **Wave 2**: Features whose dependencies are all in Wave 1 or already completed |
| 36 | - **Wave N**: Features whose dependencies are all in earlier waves or already completed |
| 37 | |
| 38 | Display the execution plan: |
| 39 | ``` |
| 40 | Spec Batch Plan: |
| 41 | Wave 1 (parallel): app-foundation |
| 42 | Wave 2 (parallel): block-editor, page-management |
| 43 | Wave 3 (parallel): sidebar-navigation, database-views |
| 44 | Wave 4 (parallel): cli-integration |
| 45 | Total: 6 specs across 4 waves |
| 46 | ``` |
| 47 | |
| 48 | If roadmap contains `## Existing Spec Updates` or `## Direct Implementation Candidates`, mention them separately as non-batch items so the user can see the whole decomposition. |
| 49 | |
| 50 | ## Step 3: Execute Waves |
| 51 | |
| 52 | For each wave, dispatch all features in the wave as **parallel sub-agents**. |
| 53 | |
| 54 | **For each feature in the wave**, spawn a sub-agent with this task: |
| 55 | |
| 56 | ``` |
| 57 | Create a complete specification for feature "{feature-name}". |
| 58 | |
| 59 | 1. Read the brief at {{KIRO_DIR}}/specs/{feature-name}/brief.md for feature context |
| 60 | 2. Read the roadmap at {{KIRO_DIR}}/steering/roadmap.md for project context |
| 61 | 3. Execute the full spec pipeline. For each phase, read the corresponding skill's SKILL.md for complete instructions (templates, rules, review gates): |
| 62 | a. Initialize: Read .agent/skills/kiro-spec-init/SKILL.md, then create spec.json and requirements.md |
| 63 | b. Generate requirements: Read .agent/skills/kiro-spec-requirements/SKILL.md, then follow its steps |
| 64 | c. Generate design: Read .agent/skills/kiro-spec-design/SKILL.md, then follow its steps |
| 65 | d. Generate tasks: Read .agent/skills/kiro-spec-tasks/SKILL.md, then follow its steps |
| 66 | 4. Set all approvals to true in spec.json (auto-approve mode, equivalent of -y flag) |
| 67 | 5. Report completion with file list and task count |
| 68 | ``` |
| 69 | |
| 70 | Antigravity does not support programmatic sub-agent dispatch. Execute features in the wave sequentially in the main context. |
| 71 | |
| 72 | **After all sub-agents in the wave complete**: |
| 73 | 1. Verify each feature has: spec.json, requirements.md, design.md, tasks.md |
| 74 | 2. If any feature failed, report the error and continue with features that succeeded |
| 75 | 3. Display wave completion: "Wave N complete: [features]. Files verified." |
| 76 | 4. Proceed to next wave |
| 77 | |
| 78 | ## Step 4: Cross-Spec Review |
| 79 | |
| 80 | After all waves complete, perform a cross-spec consistency review. This is the highest-value quality gate -- it catches issues that per-spec review gates cannot. |
| 81 | |
| 82 | Read ALL generated specs and check for consistency across the entire project: |
| 83 | - `{{KIRO_DIR}}/specs/*/design.md` (primary: contains interfaces, data models, architecture) |
| 84 | - `{{KIRO_DIR}}/specs/*/requirements.md` (for scope and acceptance criteria) |
| 85 | - `{{KIRO_DIR}}/specs/*/tasks.md` (for boundary annotations only -- read _Boundary:_ lines, skip task descriptions) |
| 86 | - `{{KIRO_DIR}}/steering/roadmap.md` |
| 87 | |
| 88 | Reading priority: Focus on design.md files (they contain interfaces, data models, architecture). For requirements.md, focus on section headings and acceptance criteria. For tasks.md, focus on _Boundary:_ annotations. |
| 89 | |
| 90 | Check: |
| 91 | 1. **Data model consistency**: Same entities defined consistently across specs (field names, types, relationships) |
| 92 | 2. **Interface alignment**: Where spec A outputs what spec B consumes, do contracts match exactly? |
| 93 | 3. **No duplicate functionality**: Any capability specified in more than one spec? |
| 94 | 4. **Dependency completeness**: Every design.md r |