$npx -y skills add gotalab/cc-sdd --skill kiro-spec-initInitialize a new specification with detailed project description
| 1 | # Spec Initialization |
| 2 | |
| 3 | <instructions> |
| 4 | ## Core Task |
| 5 | Generate a unique feature name from the project description ($ARGUMENTS) and initialize the specification structure. |
| 6 | |
| 7 | ## Execution Steps |
| 8 | 1. **Check for Brief**: If `{{KIRO_DIR}}/specs/{feature-name}/brief.md` exists (created by `/kiro-discovery`), read it. The brief contains problem, approach, scope, and constraints from the discovery session. Use this to pre-fill the project description and skip clarification questions that the brief already answers. |
| 9 | 2. **Clarify Intent**: The Project Description in requirements.md must contain three elements: (a) who has the problem, (b) current situation, (c) what should change. If a brief.md exists and covers these, skip to step 3. Otherwise, ask the user to clarify before proceeding. Ask as many questions as needed; do not fill in gaps with your own assumptions. |
| 10 | 3. **Check Uniqueness**: Verify `{{KIRO_DIR}}/specs/` for naming conflicts. If the directory already exists with only `brief.md` (no `spec.json`), use that directory (discovery created it). |
| 11 | 4. **Create Directory**: `{{KIRO_DIR}}/specs/[feature-name]/` (skip if already exists from discovery) |
| 12 | 5. **Initialize Files Using Templates**: |
| 13 | - Read `{{KIRO_DIR}}/settings/templates/specs/init.json` |
| 14 | - Read `{{KIRO_DIR}}/settings/templates/specs/requirements-init.md` |
| 15 | - Replace placeholders: |
| 16 | - `{{FEATURE_NAME}}` → generated feature name |
| 17 | - `{{TIMESTAMP}}` → current ISO 8601 timestamp |
| 18 | - `{{PROJECT_DESCRIPTION}}` → from brief.md if available, otherwise $ARGUMENTS |
| 19 | - `{{LANG_CODE}}` → language code (detect from user's input language, default to `en`) |
| 20 | - Write `spec.json` and `requirements.md` to spec directory |
| 21 | |
| 22 | ## Important Constraints |
| 23 | - Do NOT generate requirements, design, or tasks. This skill only creates spec.json and requirements.md. |
| 24 | </instructions> |
| 25 | |
| 26 | ## Output Description |
| 27 | Provide output in the language specified in `spec.json` with the following structure: |
| 28 | |
| 29 | 1. **Generated Feature Name**: `feature-name` format with 1-2 sentence rationale |
| 30 | 2. **Project Summary**: Brief summary (1 sentence) |
| 31 | 3. **Created Files**: Bullet list with full paths |
| 32 | 4. **Next Step**: Command block showing `/kiro-spec-requirements <feature-name>` |
| 33 | |
| 34 | **Format Requirements**: |
| 35 | - Use Markdown headings (##, ###) |
| 36 | - Wrap commands in code blocks |
| 37 | - Keep total output concise (under 250 words) |
| 38 | - Use clear, professional language per `spec.json.language` |
| 39 | |
| 40 | ## Safety & Fallback |
| 41 | - **Ambiguous Feature Name**: If feature name generation is unclear, propose 2-3 options and ask user to select |
| 42 | - **Template Missing**: If template files don't exist in `{{KIRO_DIR}}/settings/templates/specs/`, report error with specific missing file path and suggest checking repository setup |
| 43 | - **Directory Conflict**: If feature name already exists, append numeric suffix (e.g., `feature-name-2`) and notify user of automatic conflict resolution |
| 44 | - **Write Failure**: Report error with specific path and suggest checking permissions or disk space |