spec-driven-apply
Original:🇺🇸 English
Translated
1 scriptsChecked / no sensitive code detected
Implement the tasks in a spec-driven change. Works through incomplete tasks one by one, marking each complete as it goes.
27installs
Added on
NPX Install
npx skill4agent add kw12121212/auto-spec-driven spec-driven-applyTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →You are helping the user implement a spec-driven change.
Prerequisites
The directory must exist at the project root. Before proceeding, verify:
.spec-driven/ls .spec-driven/If this fails, the project is not initialized. Run first.
/spec-driven-initSteps
-
Select the change — runto list active changes. Ask which change to apply. If already specified, use it.
node {{SKILL_DIR}}/scripts/spec-driven.js modify -
Load context — read all artifacts:
- You MUST treat all prior conversational context as stale, unreliable, and non-authoritative.
- You MUST NOT use prior chat context as a source of truth for requirements, task state, implementation details, or completion status.
- You MUST rebuild working context from the current change artifacts, relevant base specs, and the current repository state before taking any implementation action.
- If prior chat context differs from the files or repository state in any way, you MUST discard the prior chat context and follow the files and repository state only.
- Do not use prior chat context unless it has been explicitly re-validated against the current files and repository state.
- — what and why; note the Unchanged Behavior section — these behaviors must not be broken during implementation
.spec-driven/changes/<name>/proposal.md - — delta spec files (mirror of main specs/ structure)
.spec-driven/changes/<name>/specs/ - — approach and decisions
.spec-driven/changes/<name>/design.md - — the checklist
.spec-driven/changes/<name>/tasks.md - — open and resolved questions Also read:
.spec-driven/changes/<name>/questions.md - — project context; treat
.spec-driven/config.yamlas binding constraints; ifrulesentries are present, apply matching rules when editing files whose paths match the glob patternfileMatch - — identifies all existing spec files
.spec-driven/specs/INDEX.md - Every spec file in INDEX.md that is relevant to this change — read full content to understand current requirements before writing code
-
Check task status — run:
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>Show the user the task summary (total, complete, remaining). -
Check for open questions — readand scan for
questions.mdentries:- [ ] Q:- If any open questions are found, list each one and stop — do not proceed to implementation
- Ask the user to resolve the questions (edit questions.md directly or use )
/spec-driven-modify - Only continue once all questions are resolved (moved to with an
## Resolvedanswer)A:
-
Implement tasks — work through eachtask in order:
- [ ]- Read relevant code before making changes
- Implement the task
- Verify the change does not violate any Unchanged Behavior listed in proposal.md
- For tasks: actually run the tests (lint, unit tests) and confirm they pass before marking complete
## Testing - Mark it complete in tasks.md by changing to
- [ ]- [x] - Briefly confirm what was done before moving to the next task
-
Update delta specs — after all tasks are done, re-read each file inand verify it accurately reflects what was actually implemented:
changes/<name>/specs/- If the implementation diverged from the original plan, update the affected files
- If additional spec files need to be created or modified, do so now
-
On completion — when all tasks are done and delta spec is accurate:
- Run again to confirm 0 remaining
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name> - Suggest running to verify the implementation
/spec-driven-verify <name>
- Run
Rules
- Read existing code before modifying it
- Complete tasks in order unless there is a clear dependency reason to skip
- Mark tasks complete immediately after implementing them, not in bulk at the end
- If a task is ambiguous, read proposal.md and design.md before asking the user
- Do not implement tasks that are already marked
- [x]