name: speckit-refine-diff description: Show what changed in spec.md and predict downstream impact on plan and tasks compatibility: Requires spec-kit project structure with .specify/ directory metadata: author: github-spec-kit source: refine:commands/speckit.refine.diff.md
Diff Spec Changes
Preview the impact of spec.md changes on downstream artifacts before propagating. Use this to understand the blast radius of a refinement.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Prerequisites
- Verify a spec-kit project exists by checking for
.specify/directory - Locate the current feature's spec directory
- Verify spec.md exists
Outline
-
Load all artifacts: Read from the current feature directory:
spec.md(check for**Refined**:entries)plan.md(if exists)tasks.md(if exists)
-
Extract refinement history: Parse all
**Refined**:entries in spec.md to build a change log:## Refinement History - [DATE]: [Description of change] - [DATE]: [Description of change] -
Analyze spec changes: For each refinement, classify the impact:
Change Type Spec Impact Plan Impact Tasks Impact New user story New section added New structure/complexity entry New phase with tasks Modified requirement Updated requirement text May affect technical context May affect task descriptions Removed requirement Strikethrough marking Sections to mark removed Tasks to mark removed Changed priority Reordered user story May affect implementation order May reorder phases New success criterion Added to criteria list Minimal May need verification task -
Generate impact report: Output a structured diff report:
# Spec Refinement Impact Report ## Changes Detected - [List each change from refinement notes] ## Downstream Impact ### plan.md - **Status**: [Up to date | Stale | Does not exist] - **Sections affected**: [List of plan sections that need updates] - **Estimated changes**: [Number of sections to add/modify/remove] ### tasks.md - **Status**: [Up to date | Stale | Does not exist] - **Tasks affected**: [List of task IDs that need updates] - **New tasks needed**: [Count] - **Tasks to mark removed**: [Count] - **Dependency changes**: [Yes/No — describe if yes] ## Consistency Check - [ ] All spec user stories have plan sections: [Pass/Fail] - [ ] All spec requirements have task coverage: [Pass/Fail] - [ ] No orphaned tasks from removed requirements: [Pass/Fail] ## Recommended Action - Run `/speckit.refine.propagate` to apply these changes - Or run `/speckit.refine.propagate only plan` to update plan.md first -
Report: Output the impact report. Do not modify any files — this command is read-only.
Rules
- Read-only — this command never modifies any files
- Always show impact — even if no downstream artifacts exist, report what would be needed
- Be specific — list exact section names and task IDs affected, not vague summaries