| name | speckit-refine-update |
| description | Update an existing spec.md in-place based on new requirements or feedback |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"refine:commands/speckit.refine.update.md"} |
Refine Specification
Update an existing specification in-place without creating a new feature branch. Use this when requirements change, feedback arrives, or you need to iterate on an existing spec.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty). The user input describes what to change in the existing specification.
Prerequisites
- Verify a spec-kit project exists by checking for
.specify/ directory
- Identify the current feature by checking for an active feature branch (pattern:
###-feature-name or YYYYMMDD-HHMMSS-feature-name)
- If no feature branch is detected, look for the most recently modified
specs/*/spec.md
- If no spec.md is found, inform the user and suggest running
/speckit.specify first
Outline
-
Locate the spec: Find the current feature's spec.md:
- Check git branch name for feature number/prefix
- Map to
specs/{branch-name}/spec.md
- If not on a feature branch, prompt the user to select from available specs in
specs/*/spec.md
-
Read current artifacts: Load the following files from the feature directory:
- Required:
spec.md (the specification to refine)
- Optional:
plan.md, tasks.md, research.md, data-model.md, contracts/
- Note which optional artifacts exist — they will need propagation later
-
Understand the change request: Analyze the user's input to determine:
- Which sections of spec.md are affected
- Whether this is an additive change (new requirements), a modification (changed requirements), or a removal (dropped requirements)
- Whether the change affects user stories, requirements, success criteria, or assumptions
-
Apply the update: Modify spec.md in-place:
-
Mark downstream artifacts as stale: After updating spec.md, check which downstream artifacts exist and append a staleness warning to each:
-
Report: Output a summary:
- What sections were updated in spec.md
- Which downstream artifacts are now stale
- Suggest next step:
/speckit.refine.propagate to cascade changes, or /speckit.refine.diff to preview impact first
Rules
- Never create a new feature branch — refine works on the current branch
- Never delete content — mark removed items with strikethrough and a reason
- Preserve formatting — match the existing spec.md style exactly
- Preserve section order — do not reorder sections
- Track changes — always add a refinement note with date and description
- Mark staleness — always warn downstream artifacts about spec changes