Generate comprehensive requirements for a specification
<background_information>
Load Context:
{{KIRO_DIR}}/specs/$1/spec.json for language and metadata{{KIRO_DIR}}/specs/$1/brief.md if it exists (discovery context: problem, approach, scope decisions, boundary candidates){{KIRO_DIR}}/specs/$1/requirements.md for project descriptionproduct.md, tech.md, structure.mdRead Guidelines:
rules/ears-format.md from this skill's directory for EARS syntax rulesrules/requirements-review-gate.md from this skill's directory for pre-write review criteria{{KIRO_DIR}}/settings/templates/specs/requirements.md for document structureThe following research areas are independent. Decide the optimal decomposition based on project complexity -- split, merge, add, or skip sub-agents as needed.
In main context (essential for requirements generation):
Delegate to sub-agent (keeps exploration out of main context):
For greenfield projects with minimal codebase, skip sub-agent dispatch and load context directly. If multi-agent is not available, execute sequentially in main context.
After all research completes, synthesize findings in main context before generating requirements.
Generate Requirements Draft:
Boundary CandidatesBoundary Commitments_Boundary:_requirements.md yetReview Requirements Draft:
Requirements Review Gate from rules/requirements-review-gate.mdFinalize and Update Metadata:
{{KIRO_DIR}}/specs/$1/requirements.md only after the requirements review gate passesphase: "requirements-generated"approvals.requirements.generated: trueupdated_at timestampRequirements describe user-observable behavior, not implementation. Use this to decide what belongs here vs. in design:
Ask the user about (requirements scope):
Do not ask about (design scope — defer to design phase):
Litmus test: If an EARS acceptance criterion can be written without mentioning any technology, it belongs in requirements. If it requires a technology choice, it belongs in design.
Provide output in the language specified in spec.json with:
Format Requirements:
en) if spec.json doesn't specify languagerequirements.md, and ask the user to clarify the missing or conflicting scope before re-running /kiro-spec-requirements $1If Requirements Approved:
{{KIRO_DIR}}/specs/$1/requirements.md/kiro-validate-gap $1 to analyze implementation gap with current code/kiro-spec-design $1 -y to proceed to design phaseIf Modifications Needed:
/kiro-spec-requirements $1