You are running the full spec-driven workflow end-to-end for a single change.
The
directory must exist at the
project root. Before proceeding, verify:
If this fails, the project is not initialized. Run
first.
-
Assess complexity — before doing anything, evaluate the change using a three-tier model:
- Read for project context
- Read
.spec-driven/specs/INDEX.md
and relevant spec files to understand the current system
- Read the codebase files that the change will likely touch — estimate the number of files, modules, and cross-cutting concerns involved
- Classify the change into one of three tiers:
- Green (proceed): touches ≤ 6 modules or packages, modifies ≤ 20 files, clear scope, straightforward schema migrations (add column, create table, simple backfill), additive auth/authz/payment changes (e.g., adding a new role or permission) — proceed without additional confirmation beyond the standard proposal checkpoint
- Yellow (warn and ask): touches 7-15 modules or packages, modifies 21-50 files, schema migrations involving data transformation, auth/authz/payment changes that modify existing logic, cross-cutting changes touching multiple subsystems — show the user the specific risk factors and require explicit confirmation before proceeding
- Red (suggest brainstorm): requires coordinating across multiple services or repositories, scope is vague or open-ended (e.g. "refactor the codebase", "improve performance"), no clear definition of done — explain why and suggest running first to converge the idea, then entering to execute the resulting proposal
- If the change spans multiple tiers (e.g., module count is Green but file count is Yellow), use the highest applicable tier
- If Red, stop and suggest brainstorm
- If Yellow, list the risk factors and wait for the user to confirm before proceeding
- If Green, proceed
-
- Run
node {{SKILL_DIR}}/scripts/spec-driven.js propose <name>
- Fill all artifacts: proposal.md (with Unchanged Behavior), specs/ delta files, design.md, tasks.md (with ## Testing), questions.md (open questions)
- Show the user a summary: scope, key decisions, task count, unchanged behaviors, and any open questions
- Wait for explicit confirmation before proceeding — this is the only mandatory checkpoint
- If questions.md has open questions, list them and ask the user to resolve them before confirming
- If the user requests changes, apply them and re-confirm
-
Apply — implement all tasks:
- Run
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>
to show task summary
- Check questions.md for open entries — if any, ask the user and resolve before continuing
- Work through each task in order: read code, implement, verify Unchanged Behavior, mark
- For tasks: actually run the tests and confirm they pass
- Run
node {{SKILL_DIR}}/scripts/spec-driven.js apply <name>
to confirm
-
Verify — check completeness:
- Run
node {{SKILL_DIR}}/scripts/spec-driven.js verify <name>
- Then perform the rest of the checks: task completion, open questions, implementation evidence, and spec alignment
- Treat script plus any CRITICAL findings from those checks as blockers
- If there are blockers you can safely fix, fix them automatically, then rerun both the script check and the verification pass
- If any blocker cannot be auto-fixed: stop and ask the user
- Re-read delta spec files and update them to match what was actually implemented
-
Review — check code quality:
- Read every file changed by this change
- Check: readability, security, error handling, performance, best practices, test quality
- MUST FIX issues: fix them automatically, then re-review
- If MUST FIX issues cannot be auto-fixed: stop and ask the user
- SHOULD FIX and NITS: fix if straightforward, otherwise note in the final report
-
Archive — close out the change:
- Confirm there are no incomplete tasks before archiving
- List all delta files in and merge each into the corresponding main spec file
- If is empty, ask the user to confirm this change has no observable spec impact before continuing
- Update
.spec-driven/specs/INDEX.md
if new spec files were created
- Run
node {{SKILL_DIR}}/scripts/spec-driven.js archive <name>
- Report the final result: what was built, files changed, tests passing