Quick Spec Generator
If --auto flag is present in $ARGUMENTS, you are in AUTOMATIC MODE.
If --auto flag is present in $ARGUMENTS, you are in AUTOMATIC MODE.
--- name: kiro-spec-quick description: Quick spec generation with interactive or automatic mode ---
<instructions>
**If `--auto` flag is present in `$ARGUMENTS`, you are in AUTOMATIC MODE.**
In Automatic Mode:
---
Execute 4 spec phases sequentially. In automatic mode, execute all phases without stopping. In interactive mode, prompt user for approval between phases.
Before claiming quick generation is complete, run one lightweight sanity review over the generated requirements, design, and tasks. If the host supports fresh sub-agents, use one. Otherwise run the sanity review inline.
Parse `$ARGUMENTS`:
Example:
"User profile with avatar upload --auto" → mode=automatic, description="User profile with avatar upload"
"User profile feature" → mode=interactive, description="User profile feature"Display mode banner and proceed to Step 2.
Execute these 4 phases in order:
---
**Core Logic**:
a. Read templates:
- {{KIRO_DIR}}/settings/templates/specs/init.json
- {{KIRO_DIR}}/settings/templates/specs/requirements-init.mdb. Replace placeholders:
{{FEATURE_NAME}} → feature-name
{{TIMESTAMP}} → current ISO 8601 timestamp (use `date -u +"%Y-%m-%dT%H:%M:%SZ"`)
{{PROJECT_DESCRIPTION}} → description
{{LANG_CODE}} → language code (detect from user's input language, default to `en`)c. Write files using Write tool:
- {{KIRO_DIR}}/specs/{feature-name}/spec.json
- {{KIRO_DIR}}/specs/{feature-name}/requirements.md**Automatic Mode**: IMMEDIATELY continue to Phase 2.
**Interactive Mode**: Prompt "Continue to requirements generation? (yes/no)"
---
Invoke `/kiro-spec-requirements {feature-name}`.
Wait for completion. IGNORE any "Next Step" message (it is for standalone usage).
**Output Progress**: "Phase 2/4 complete: Requirements generated"
**Automatic Mode**: IMMEDIATELY continue to Phase 3.
**Interactive Mode**: Prompt "Continue to design generation? (yes/no)"
---
Invoke `/kiro-spec-design {feature-name} -y`. The `-y` flag auto-approves requirements.
Wait for completion. IGNORE any "Next Step" message.
**Output Progress**: "Phase 3/4 complete: Design generated"
**Automatic Mode**: IMMEDIATELY continue to Phase 4.
**Interactive Mode**: Prompt "Continue to tasks generation? (yes/no)"
---
Invoke `/kiro-spec-tasks {feature-name} -y`. The `-y` flag auto-approves requirements, design, and tasks.
Wait for completion.
**Output Progress**: "Phase 4/4 complete: Tasks generated"
After Phase 4, run a lightweight sanity review before claiming completion.
**All 4 phases plus sanity review complete.**
Output final completion summary (see Output Description section) and exit.
---
</instructions>
**Interactive Mode**:
Quick Spec Generation (Interactive Mode)
You will be prompted at each phase.
Note: Skips gap analysis and design validation.**Automatic Mode**:
Quick Spec Generation (Automatic Mode)
All phases execute automatically without prompts.
Note: Skips optional validations (gap analysis, design review) and user approval prompts. Internal review gates still run.
Final sanity review still runs.After each phase, show brief progress:
Spec initialized at {{KIRO_DIR}}/specs/{feature}/
Requirements generated → Continuing to design...
Design generated → Continuing to tasks...Provide output in the language specified in `spec.json`:
Quick Spec Generation Complete!
## Generated Files:
- {{KIRO_DIR}}/specs/{feature}/spec.json
- {{KIRO_DIR}}/specs/{feature}/requirements.md ({X} requirements)
- {{KIRO_DIR}}/specs/{feature}/design.md ({Y} components, {Z} endpoints)
- {{KIRO_DIR}}/specs/{feature}/tasks.md ({N} tasks)
Quick generation skipped:
- `/kiro-validate-gap` - Gap analysis (integration check)
- `/kiro-validate-design` - Design review (architecture validation)
Sanity review: PASSED | FOLLOW-UP REQUIRED
## Next Steps:
1. Review generated specs (especially design.md)
2. Optional validation:
- `/kiro-validate-gap {feature}` - Check integration with existing codebase
- `/kiro-validate-design {feature}` - Verify architecture quality
3. Start implementation: `/kiro-impl {feature}`
**Template Missing**:
**Directory Creation Failed**:
**Phase Execution Failed** (Phase 2-4):
**Sanity Review Failed**:
**User Cancellation** (Interactive Mode):