spec-driven-init
You are helping the user initialize the spec-driven workflow in a project.
Steps
-
Confirm the target project — ask which project to initialize. If the user is already in the project root, use the current directory. Accept either
.or an explicit path. -
Run init — run:
node {{SKILL_DIR}}/scripts/spec-driven.js init [path]Pass the path only if it differs from the current directory.
-
Draft context — read any existing project files that describe the project (
README.md,AGENTS.md,CLAUDE.md,package.json,pom.xml, etc.). Draft acontextvalue of 3–5 sentences covering:- What the project does
- Tech stack and language(s)
- Key conventions or constraints worth noting
Write the draft into the
contextfield of.spec-driven/config.yaml, then show it to the user and ask if they want to adjust anything. -
Capture existing behavior — ask: "Does this project already have behavior worth documenting?" If yes, help the user write initial spec files under
.spec-driven/specs/<category>/using the standard format:- Group by domain area (e.g.
auth/,api/,core/) - Use
### Requirement: <name>headings with RFC 2119 keywords - Describe what the system currently does, not what it should do
- Add an entry for each new file to
.spec-driven/specs/INDEX.md
This step is important for existing projects — without initial specs,
proposehas nothing to read and cannot detect conflicts. - Group by domain area (e.g.
-
Confirm — show the user what was created and suggest running
/spec-driven-proposeto create their first change.
Rules
- Do not create any changes — initialization only
- Keep the context field concise: 3–5 sentences is enough for the AI to work from
- If .spec-driven/ already exists, do not reinitialize — suggest
/spec-driven-proposeinstead