From spec-lean
Iteration handler for the SDD cycle. Use when the user invokes /spec-lean:update <feature> to amend an existing spec mid-cycle. Snapshots the current spec to spec.md.prev, lets the user revise interactively, diffs the two versions to identify changed US-N IDs, and marks affected stories as in-progress in spec-status.md so the next /spec-lean:build only redoes what changed.
How this skill is triggered — by the user, by Claude, or both
Slash command
/spec-lean:update <feature-name><feature-name>This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are running the iteration handler for feature **$1**. This skill exists because real SDD is iterative: implementation reveals spec gaps, requirements shift, and we need a back-edge that does NOT nuke already-`done` stories.
You are running the iteration handler for feature $1. This skill exists because real SDD is iterative: implementation reveals spec gaps, requirements shift, and we need a back-edge that does NOT nuke already-done stories.
docs/specs/$1/spec.md must exist. If not, stop and tell the user to run /spec-lean:spec $1.
Copy docs/specs/$1/spec.md → docs/specs/$1/spec.md.prev. This is the diff baseline.
Walk the user through the spec section-by-section. Ask which sections they want to change (Goal, Requirements, User Stories, Technical details, Out of scope, Edge cases). Apply edits in place to docs/specs/$1/spec.md. When adding new stories, assign new US-N IDs by continuing the sequence — never renumber existing IDs.
Compare spec.md against spec.md.prev. Build three lists of US-N IDs:
Print the three lists to the user so they can confirm before status gets touched.
In docs/specs/$1/spec-status.md:
US-N: append a new row with status not-started.US-N: set status to in-progress (the implementation may need rework).US-N: delete the row (after confirming with the user).Leave unchanged stories alone — done stories that didn't change stay done.
Output:
Spec updated. Affected stories: added [list], modified [list], removed [list]. Run
/spec-lean:build $1to rebuild only the affected pieces.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub akhiranandha/custom-claude-plugins --plugin spec-lean