@benjaminthomas/spec-driven-dev 0.0.0-stage → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +557 -2
  3. package/bin/cli.mjs +415 -0
  4. package/package.json +12 -4
  5. package/skills/generative-seo/SKILL.md +255 -0
  6. package/skills/generative-seo/assets/citation-log-template.md +17 -0
  7. package/skills/generative-seo/assets/competitor-analysis-template.md +20 -0
  8. package/skills/generative-seo/assets/content-plan-template.md +15 -0
  9. package/skills/generative-seo/assets/geo-config-template.md +33 -0
  10. package/skills/generative-seo/assets/geo-playbook-template.md +22 -0
  11. package/skills/generative-seo/assets/social-queue-template.md +8 -0
  12. package/skills/generative-seo/references/geo-methodology.md +143 -0
  13. package/skills/spec-checkpoint/SKILL.md +106 -0
  14. package/skills/spec-create/SKILL.md +149 -0
  15. package/skills/spec-create/references/action-required-template.md +53 -0
  16. package/skills/spec-create/references/readme-template.md +53 -0
  17. package/skills/spec-create/references/requirements-template.md +54 -0
  18. package/skills/spec-create/references/task-template.md +86 -0
  19. package/skills/spec-implement/SKILL.md +236 -0
  20. package/skills/spec-implement/references/coder-prompt-template.md +48 -0
  21. package/skills/spec-implement/references/fix-prompt-template.md +38 -0
  22. package/skills/spec-implement/references/review-prompt-template.md +50 -0
  23. package/skills/spec-investigate/SKILL.md +323 -0
  24. package/skills/spec-investigate/references/report-template.md +53 -0
  25. package/skills/spec-setup/SKILL.md +105 -0
  26. package/skills/spec-setup/references/config-template.yml +45 -0
  27. package/skills/spec-ship/SKILL.md +218 -0
  28. package/skills/spec-verify/SKILL.md +153 -0
  29. package/skills/spec-verify/references/report-template.md +57 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 benjaminbarnabas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,558 @@
1
- # Temporary Holding Version
1
+ # spec-driven-dev
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/@benjaminthomas/spec-driven-dev?label=npm)](https://www.npmjs.com/package/@benjaminthomas/spec-driven-dev)
4
+ [![check](https://github.com/benjaminthomas/spec-driven-dev/actions/workflows/check.yml/badge.svg)](https://github.com/benjaminthomas/spec-driven-dev/actions/workflows/check.yml)
5
+ [![license: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
6
+
7
+ **A step-by-step workflow that gets AI coding agents from "here's a ticket" to "here's a reviewed PR"
8
+ without guessing.** It first investigates the problem, then writes a plan you approve, then builds it
9
+ in parallel with tests and review, then checks the real running app, and finally commits and opens
10
+ the PR.
11
+
12
+ It's a set of eight [Agent Skills](https://agentskills.io), plain Markdown instruction files that
13
+ AI coding tools load on demand. It works with Claude Code, Codex CLI, Cursor, and Google Antigravity,
14
+ in any language or framework, and in a single repo, a monorepo, or several repos that change
15
+ together. Install it from npm with `npm install -g @benjaminthomas/spec-driven-dev`, then run
16
+ `spec-driven-dev` in your project.
17
+
18
+ ---
19
+
20
+ ## Contents
21
+
22
+ - [Why use it](#why-use-it)
23
+ - [Quick start (5 minutes)](#quick-start-5-minutes)
24
+ - [Project setup: your team's rules](#project-setup-your-teams-rules)
25
+ - [How the workflow fits together](#how-the-workflow-fits-together)
26
+ - [The skills, one by one](#the-skills-one-by-one)
27
+ - [What ends up in your repo](#what-ends-up-in-your-repo)
28
+ - [Safety rails](#safety-rails)
29
+ - [FAQ](#faq)
30
+ - [Install](#install)
31
+ - [Compatibility](#compatibility)
32
+ - [By the numbers](#by-the-numbers)
33
+ - [Working on this repo](#working-on-this-repo)
34
+ - [Changelog](CHANGELOG.md)
35
+
36
+ ---
37
+
38
+ ## Why use it
39
+
40
+ Asking an AI agent to "just build it" tends to fail in predictable ways:
41
+
42
+ | Problem | What this workflow does instead |
43
+ |---|---|
44
+ | The agent guesses how your system works and builds on a wrong assumption | **`spec-investigate`** reads the real code first and labels every finding as verified, inferred, assumed, or unknown |
45
+ | A big plan won't fit in the agent's context, or is too vague to act on | **`spec-create`** splits the work into small, self-contained task files, so each agent reads only its own |
46
+ | One agent working alone is slow | **`spec-implement`** runs several coder agents in parallel, each in its own copy of the repo |
47
+ | "It compiles" gets treated as "it works" | **`spec-verify`** drives the real running app and checks every acceptance criterion, with evidence |
48
+ | Broken code gets committed, or a PR is pushed by accident | **`spec-checkpoint`** commits only once lint, types, tests, and build all pass. **`spec-ship`** asks before it pushes |
49
+
50
+ Each stage writes its result to a file, so you can stop at any point, hand over to a teammate, or
51
+ start a new session and continue where you left off.
52
+
53
+ ---
54
+
55
+ ## Quick start (5 minutes)
56
+
57
+ **1. Install the CLI from npm** (once per machine):
58
+
59
+ ```bash
60
+ npm install -g @benjaminthomas/spec-driven-dev
61
+ ```
62
+
63
+ **2. Run it in your project folder** (or, for several repos, in their shared parent folder):
64
+
65
+ ```bash
66
+ spec-driven-dev
67
+ ```
68
+
69
+ It:
70
+ 1. **Finds your AI tools** (Claude Code, Cursor, Codex CLI, Antigravity) and installs the skills
71
+ into each one you choose, for this project or for all projects.
72
+ 2. **Sets up your project** by detecting its layout, issue tracker, branch conventions, and
73
+ commands, then asking you to confirm. The answers go into `.spec-driven.yml`
74
+ ([details below](#project-setup-your-teams-rules)).
75
+
76
+ **3. In your AI tool, run each stage in order.** You can type the slash command or just say the
77
+ words in quotes.
78
+
79
+ ```
80
+ /spec-investigate STP-123 "look into STP-123 before we plan it"
81
+ → read specs/stp-123-…/investigation.md
82
+
83
+ /spec-create "turn this into a spec"
84
+ → review specs/stp-123-…/ ← YOU APPROVE HERE
85
+
86
+ /spec-implement "implement the spec"
87
+ /spec-verify "does it actually work?"
88
+ /spec-checkpoint "checkpoint"
89
+ /spec-ship "ship it"
90
+ ```
91
+
92
+ That's the whole workflow. Every stage can be used on its own as well: use `/spec-create` straight
93
+ from a planning chat, or `/spec-checkpoint` on any work in progress.
94
+
95
+ ---
96
+
97
+ ## Project setup: your team's rules
98
+
99
+ Teams work differently. Some branch from `main`, some from `staging`. Some name branches `STP-123`,
100
+ others `fix/STP-123-short-name`. Some have one repo, others have six. None of this is built into the
101
+ skills. Each project describes its own rules in **`.spec-driven.yml`**, and every skill reads that
102
+ file before doing anything.
103
+
104
+ **How the file gets created:** `spec-driven-dev` (or `spec-driven-dev setup` to run only this
105
+ step) detects the answers from your repos and asks you to confirm them. In your AI tool you can also
106
+ say **"run spec-setup"**: that does a deeper version that also reads `CLAUDE.md`/`AGENTS.md`, CI
107
+ config, and recent PRs, and fills in what the installer can't (such as each repo's role, or commands
108
+ for stacks other than Node). If a skill finds no config, it runs this setup first.
109
+
110
+ **What `spec-driven-dev` asks, in order** (every answer comes pre-filled with what it detected, so you
111
+ can usually just press Enter):
112
+
113
+ | Question | Detected from | Example answer |
114
+ |---|---|---|
115
+ | Which AI tools get the skills | tool folders in your home directory and commands on your `PATH` | Claude Code, Cursor |
116
+ | This project only, or all projects | (you choose) | `project` |
117
+ | Project layout | git repos and workspace files (`pnpm-workspace.yaml`, `turbo.json`, `nx.json`, `go.work`, …) | `single`, `monorepo`, or `multi-repo` |
118
+ | *multi-repo:* workspace folder (where the config goes) | the folder you ran it in, or the parent of the repo you're in | `~/work` |
119
+ | *multi-repo:* which repos belong together | git repos in the workspace folder, grouped by GitHub owner | `api`, `web` |
120
+ | *multi-repo:* repos from other folders | (you type paths) | `~/clients/billing, ../shared-lib` |
121
+ | *monorepo:* package folders | the workspaces your `package.json`/`pnpm-workspace.yaml` declares, or `apps/*`, `packages/*` | `apps/web, packages/ui` |
122
+ | Issue tracker | ticket keys in branch names and commits | Jira, key `STP` |
123
+ | Base branch / PR target | default branch, `staging`/`develop` branches | `staging` |
124
+ | Branch name pattern | your recent branch names | `{ticket}` → `STP-123` |
125
+ | Commit style | your recent commit messages | `conventional` (`feat: …`) or `ticket` (`STP-123: …`) |
126
+ | Lint / typecheck / test / build / dev commands | `package.json` scripts and lockfile (per repo or package) | `pnpm run lint` |
127
+ | Where specs go | (you choose) | `specs/` |
128
+
129
+ **Where the file lives, by layout:**
130
+
131
+ | Layout | What it means | `.spec-driven.yml` goes in | How the workflow adapts |
132
+ |---|---|---|---|
133
+ | **single** | one repo, one app | the repo root (commit it, so the team shares it) | as described below |
134
+ | **monorepo** | one repo, many apps/packages | the repo root (commit it) | tasks name their package, and checks run per package |
135
+ | **multi-repo** | several repos that change together | their shared parent folder (personal to your machine) | investigation searches every listed repo, tasks stay inside one repo each, and `spec-ship` opens one PR per repo, each linking the others |
136
+
137
+ Repos outside the workspace folder are saved with their full path. Paths that don't exist or
138
+ aren't git repos are skipped with a message, and setup stops if a multi-repo workspace ends up with
139
+ no repos. You can choose a different layout from the one detected: for example, choose
140
+ `multi-repo` from inside one repo and it uses the parent folder as the workspace, with your current
141
+ repo pre-selected.
142
+
143
+ Every question also has a flag, for scripts and CI:
144
+ `--layout=multi-repo --repos=api,web,~/clients/billing`, `--layout=monorepo --packages=apps/web,packages/ui`,
145
+ `--tools=cursor,codex`, `--global`, `--yes` (accept everything detected).
146
+
147
+ To change the rules later, edit the file or run setup again, then run `spec-driven-dev doctor`
148
+ to confirm the file still matches your repos. Setup never overwrites the file without
149
+ asking. See [`config-template.yml`](skills/spec-setup/references/config-template.yml) for every field.
150
+
151
+ ## How the workflow fits together
152
+
153
+ ```
154
+ ┌──────────────────┐ ┌─────────────┐ ┌──────────┐ ┌────────────────┐ ┌─────────────┐ ┌─────────────────┐ ┌───────────┐
155
+ │ spec-investigate │ → │ spec-create │ → │ YOU │ → │ spec-implement │ → │ spec-verify │ → │ spec-checkpoint │ → │ spec-ship │
156
+ │ understand │ │ plan │ │ approve │ │ build + test │ │ prove │ │ commit │ │ open PR │
157
+ └──────────────────┘ └─────────────┘ └──────────┘ └────────────────┘ └─────────────┘ └─────────────────┘ └───────────┘
158
+ investigation.md specs/<feature>/ code + tests, verification- local commit pushed branch
159
+ + work branch task files one commit/batch report.md + GitHub PR
160
+ ```
161
+
162
+ - **The approval step is yours.** Nothing builds until you've read the spec and run `spec-implement`
163
+ yourself. `spec-investigate` never moves on to the next stage by itself.
164
+ - **Each stage reads the previous stage's files.** `spec-create` uses `investigation.md` as its
165
+ evidence, `spec-implement` works through the task files, and `spec-verify` checks against their
166
+ acceptance criteria.
167
+ - **Stages can be skipped.** For new projects with nothing to investigate, start at `spec-create`.
168
+ For a quick fix, use only `spec-checkpoint` and `spec-ship`.
169
+
170
+ ---
171
+
172
+ ## The skills, one by one
173
+
174
+ ### 0. `spec-setup`: learn the project's rules
175
+
176
+ **Say:** "run spec-setup", "configure the pipeline", "change our branch rules"
177
+
178
+ **What it does:** see [Project setup](#project-setup-your-teams-rules). It writes `.spec-driven.yml` and
179
+ nothing else: no branches, commits, or code.
180
+
181
+ ### 1. `spec-investigate`: understand before planning
182
+
183
+ **Say:** "investigate STP-123", "look into this before we plan it", or `/spec-investigate <input>`
184
+
185
+ **Give it any of these:**
186
+
187
+ | Input | Example |
188
+ |---|---|
189
+ | Jira ticket | `STP-123` or `https://acme.atlassian.net/browse/STP-123` |
190
+ | GitHub issue | `#482` or `https://github.com/acme/app/issues/482` |
191
+ | Linear issue | `https://linear.app/acme/issue/ENG-91` |
192
+ | Transcript / notes / PRD / log file | `./call-transcript.txt`, `./prd.md`, `./error.log` |
193
+ | Plain text | `"Checkout times out for EU users since Tuesday's deploy"` |
194
+ | Pasted material | a Slack thread or stack trace pasted into the same message |
195
+
196
+ You can add `--context ./notes.md` to supply extra background, such as meeting notes.
197
+
198
+ **What it does:**
199
+ 1. Loads the input. For tickets, that includes comments and linked issues. Free text is read
200
+ carefully: "maybe we should add an endpoint" is recorded as a proposal, not a requirement.
201
+ 2. Creates a work branch from the base branch in `.spec-driven.yml`, named by its pattern, and never
202
+ touches existing work. In a multi-repo setup, it creates the branch only in the repos that need
203
+ changes.
204
+ 3. Traces how the system actually works, naming real files and functions. For bugs, it finds the
205
+ root cause.
206
+ 4. Sorts the work into **required / supporting / optional / out of scope**, and lists risks, security
207
+ and performance concerns, and existing tests.
208
+
209
+ **You get:** `specs/<feature>/investigation.md`, with every finding labelled **VERIFIED**,
210
+ **INFERRED**, **ASSUMPTION**, or **UNKNOWN**.
211
+
212
+ **It won't:** write code, write tests, or start `spec-create` without being asked.
213
+
214
+ ### 2. `spec-create`: turn the plan into tasks
215
+
216
+ **Say:** "create a spec", "plan this feature", "break this into tasks"
217
+
218
+ **What it does:** It reads `investigation.md` if one exists, plus your planning conversation. If
219
+ there's no conversation, it asks you a few questions first. It then splits the work into tasks,
220
+ each touching 1–5 files, and groups them into **batches**. Tasks in the same batch don't depend on
221
+ each other and don't touch the same files, so they can be built at the same time.
222
+
223
+ **You get:** a `specs/<feature>/` folder (see [What ends up in your repo](#what-ends-up-in-your-repo)).
224
+ Each task file is complete on its own: description, files to change, implementation steps, **tests
225
+ to write**, and acceptance criteria.
226
+
227
+ **Then:** read it, edit anything you disagree with, and only then run `spec-implement`.
228
+
229
+ ### 3. `spec-implement`: build it, batch by batch
230
+
231
+ **Say:** "implement this feature", "run the spec", "continue implementing"
232
+
233
+ **What it does, for each batch:**
234
+ 1. Starts one coder agent per task, running at the same time. Each one works in its **own git
235
+ worktree** (a separate copy of the repo) so they can't overwrite each other's work.
236
+ 2. Each coder **writes the task's tests first**, then writes code until they pass, and then runs
237
+ lint and typecheck.
238
+ 3. Merges the worktrees back. If two tasks conflict, it stops and asks you.
239
+ 4. A **separate reviewer agent** runs lint, typecheck, and tests and checks every acceptance
240
+ criterion. If anything fails, fix agents are sent in, for up to 3 rounds before it stops and
241
+ asks you.
242
+ 5. Commits the batch and ticks it off in the spec's README.
243
+
244
+ **It can resume:** if you stop halfway, run it again and it carries on from the first unfinished
245
+ batch. If your tool can't run agents in parallel, it does the tasks one at a time instead.
246
+
247
+ ### 4. `spec-verify`: prove it works
248
+
249
+ **Say:** "verify this", "test it end to end", "does this actually work?"
250
+
251
+ **What it does:** It collects every acceptance criterion from the spec, starts your app, and checks
252
+ each one the way a user would: clicking through the UI, calling real API routes, and reading the
253
+ database only to confirm the result.
254
+
255
+ **You get:** `specs/<feature>/verification-report.md`, with pass or fail for each criterion and the
256
+ evidence (screenshots, responses, data). If there's no spec, it asks you what "working" means and
257
+ checks that instead.
258
+
259
+ ### 5. `spec-checkpoint`: commit safely
260
+
261
+ **Say:** "checkpoint", "commit everything", "save my progress"
262
+
263
+ **What it does:** It runs the lint, typecheck, test, and build commands from `.spec-driven.yml` (or
264
+ finds them in `package.json`, `Makefile`, `pyproject.toml`, CI config, and so on) and fixes failures.
265
+ Then it stages everything and commits in your configured style (`feat: …` or `STP-123: …`). In a
266
+ multi-repo setup, it makes one commit in each repo that changed.
267
+
268
+ **It won't:** push. Committing is a local step.
269
+
270
+ ### 6. `spec-ship`: open the PR
271
+
272
+ **Say:** "ship it", "push this", "open a PR"
273
+
274
+ **What it does:** It creates a branch using your naming pattern if you're on the default branch,
275
+ **shows you exactly what will be pushed and waits for your "yes"**, then pushes and opens a GitHub PR
276
+ against your configured PR target, with a written description. In a multi-repo setup, it opens one
277
+ PR per repo, each linking the others. If a PR already exists for the branch, it pushes the new commits to that PR
278
+ instead of opening another one.
279
+
280
+ **Needs:** the [GitHub CLI](https://cli.github.com) (`gh`), logged in.
281
+
282
+ ### Bonus: `generative-seo`, a separate skill for SEO
283
+
284
+ This one isn't part of the workflow. It runs SEO and **GEO** (Generative Engine Optimization: getting
285
+ your content cited by ChatGPT, Perplexity, and Google AI Overviews) for any website codebase. It has
286
+ seven modes: `audit`, `content`, `optimize`, `competitors`, `citations`, `report`, and `social`. The
287
+ first time, it asks a few questions about your brand, domain, and framework, and remembers the
288
+ answers. See `skills/generative-seo/SKILL.md`.
289
+
290
+ ---
291
+
292
+ ## What ends up in your repo
293
+
294
+ ```
295
+ specs/
296
+ └── stp-123-csv-export-missing-rows/
297
+ ├── investigation.md ← spec-investigate: what's true today, with evidence
298
+ ├── requirements.md ← spec-create: what we're building and why
299
+ ├── action-required.md ← spec-create: things only a human can do (API keys, DNS, accounts)
300
+ ├── README.md ← spec-create: batches, dependency graph, progress checkboxes
301
+ ├── tasks/
302
+ │ ├── task-01-fix-pagination.md
303
+ │ ├── task-02-add-export-test-fixtures.md
304
+ │ └── …
305
+ └── verification-report.md ← spec-verify: pass/fail per acceptance criterion
306
+ ```
307
+
308
+ These are plain Markdown files, so you can review them in a PR, edit them, or hand them to a
309
+ teammate. If your repo gitignores `specs/`, the skills respect that.
310
+
311
+ ---
312
+
313
+ ## Safety rails
314
+
315
+ Built into the skills, not left to the agent's judgment:
316
+
317
+ - **You approve before anything is built.** Nothing goes from investigation to implementation by
318
+ itself.
319
+ - **Your work is never destroyed.** No stash, reset, force-push, or branch deletion without your
320
+ say-so. If there are uncommitted changes it doesn't recognise, it stops and asks.
321
+ - **No guessing.** Gaps are marked UNKNOWN, and missing tickets are asked for rather than made up.
322
+ - **Tests can't be cheated.** Coders may not delete, skip, or weaken a test to make it pass, and the
323
+ reviewer checks for this.
324
+ - **Pushing needs an explicit "yes".**
325
+ - **Investigation stays in scope.** Ideas that come up along the way go under "optional" or "out of
326
+ scope" instead of being folded into the work.
327
+
328
+ ---
329
+
330
+ ## FAQ
331
+
332
+ **Do I need Jira?**
333
+ No. Use GitHub Issues, Linear, a transcript, a document, or a sentence of plain text. Jira is just
334
+ one of the options.
335
+
336
+ **How does it choose the base branch and branch name?**
337
+ From `.spec-driven.yml`, which setup fills in by looking at your recent branches and asking you to
338
+ confirm. To change it, edit `git.base_branch` / `git.branch_name` or run setup again.
339
+
340
+ **Should I commit `.spec-driven.yml`?**
341
+ For a single repo or monorepo, yes: the whole team then follows the same rules. A multi-repo
342
+ config sits outside any repo, so it stays on your machine.
343
+
344
+ **Does it work with my stack?**
345
+ Yes. No skill assumes a language or framework. Each one finds the repo's own commands.
346
+
347
+ **Can I skip stages?**
348
+ Yes. Every skill works on its own. `spec-verify` even works without a spec: it asks what to check.
349
+
350
+ **What if my tool can't run agents in parallel?**
351
+ `spec-implement` builds tasks one at a time instead. You get the same results, just more slowly.
352
+
353
+ **Can I stop halfway?**
354
+ Yes. Progress is saved in the spec's `README.md` checkboxes and the commit for each batch. Run
355
+ `spec-implement` again to continue.
356
+
357
+ **How do I update?**
358
+ Run `npm install -g @benjaminthomas/spec-driven-dev@latest`, then `spec-driven-dev` in your project.
359
+ Claude Code plugin users run
360
+ `/plugin marketplace update spec-driven-dev` and then update the plugin. Your config is never
361
+ touched by an update.
362
+
363
+ **Can I trust the npm package?**
364
+ Releases are published by this repo's GitHub Actions workflow, not from anyone's laptop, through
365
+ npm [trusted publishing](https://docs.npmjs.com/trusted-publishers). Each version's npm page shows
366
+ a provenance badge linking it to the exact commit and workflow run that built it. The package has
367
+ no dependencies, and it contains only `bin/cli.mjs` and the `skills/` folder.
368
+
369
+ **Something isn't working. Where do I start?**
370
+ Run `spec-driven-dev doctor` in your project. It checks the config against your
371
+ repos and names anything that doesn't match. If that passes, open an
372
+ [issue](https://github.com/benjaminthomas/spec-driven-dev/issues) with the doctor output and the
373
+ skill you were running.
374
+
375
+ **`spec-verify` says it skipped some UI checks.**
376
+ Your tool needs browser automation (an MCP browser server, a built-in browser tool, or an
377
+ extension) for checks that involve the UI. Checks that only touch the API or database work
378
+ everywhere.
379
+
380
+ ---
381
+
382
+ ## Install
383
+
384
+ ### Any tool: npm (recommended)
385
+
386
+ ```bash
387
+ npm install -g @benjaminthomas/spec-driven-dev # once per machine; adds the `spec-driven-dev` command
388
+ ```
389
+
390
+ Then, in a project:
391
+
392
+ ```bash
393
+ spec-driven-dev # detect tools, install skills, set up the project
394
+ spec-driven-dev setup # only (re)run project setup
395
+ spec-driven-dev --global # install skills for all projects, not just this one
396
+ spec-driven-dev --tools=cursor,codex # pick tools without being asked
397
+ spec-driven-dev --skills=spec-create,spec-ship # install only some skills
398
+ spec-driven-dev --yes # accept every detected default (CI-friendly)
399
+ spec-driven-dev doctor # check .spec-driven.yml against the real repos
400
+ spec-driven-dev status # list specs with unfinished work
401
+ spec-driven-dev --help # show all of the above
402
+ ```
403
+
404
+ **Without installing:** replace `spec-driven-dev` with `npx @benjaminthomas/spec-driven-dev`, for
405
+ example `npx @benjaminthomas/spec-driven-dev setup`. That downloads and runs the latest version once,
406
+ which is handy in CI or on a machine you won't use again.
407
+
408
+ `doctor` checks that every branch, folder, and `npm run` script named in the config exists, and
409
+ that each value is one the skills understand. It exits 1 if anything is wrong, so you can run it in
410
+ CI. `status` prints nothing when all specs are finished.
411
+
412
+ **Updating:** run `npm install -g @benjaminthomas/spec-driven-dev@latest` to get the newest CLI,
413
+ then `spec-driven-dev` in each project to refresh its skills. This replaces the installed skill
414
+ folders and leaves your `.spec-driven.yml` alone. If you use `npx`, add `@latest`, because `npx`
415
+ can otherwise reuse an older copy it cached. What changed in each version is in
416
+ [CHANGELOG.md](CHANGELOG.md).
417
+
418
+ `npx github:benjaminthomas/spec-driven-dev` installs straight from GitHub instead, for example to
419
+ try an unreleased commit on `main`.
420
+
421
+ **Requirements:** Node.js 18 or newer and git. The installer has no dependencies.
422
+
423
+ ### Claude Code (plugin, with automatic updates)
424
+
425
+ ```
426
+ /plugin marketplace add https://github.com/benjaminthomas/spec-driven-dev.git
427
+ /plugin install spec-driven-dev@spec-driven-dev
428
+ ```
429
+
430
+ To update, run `/plugin marketplace update spec-driven-dev`, then update the plugin from `/plugin`.
431
+
432
+ The plugin also adds a **session-start reminder**. When you open Claude Code in a project with
433
+ unfinished specs, Claude is told which ones and what the next step is (for example,
434
+ `specs/stp-123: 3/5 tasks done → next: spec-implement`). It prints nothing when everything is
435
+ finished. If
436
+ you use the plugin, `spec-driven-dev` skips Claude Code so you don't get every skill twice. Run
437
+ `spec-driven-dev setup` for the project config.
438
+
439
+ ### By hand
440
+
441
+ Copy the `skills/<name>/` folders you want. Each one is self-contained. Where each tool looks for
442
+ skills:
443
+
444
+ | Tool | This project | All projects |
445
+ |---|---|---|
446
+ | Claude Code | `.claude/skills/<name>/` | `~/.claude/skills/<name>/` |
447
+ | Codex CLI | `.agents/skills/<name>/` | `~/.agents/skills/<name>/` |
448
+ | Cursor | `.cursor/skills/<name>/` (also reads `.agents/skills/`) | `~/.cursor/skills/<name>/` |
449
+ | Antigravity | `.agents/skills/<name>/` | `~/.gemini/config/skills/<name>/` |
450
+
451
+ Codex CLI and Antigravity share the project path, so installing for one covers both.
452
+
453
+ ### Fallback: MCP server (for tools without Agent Skills support)
454
+
455
+ If your tool supports MCP but not Agent Skills, `mcp-server/` serves the same eight skills as MCP
456
+ tools. It reads `skills/` directly, so there's nothing to keep in sync.
457
+
458
+ ```bash
459
+ cd mcp-server && npm install
460
+ ```
461
+
462
+ Point your tool's MCP config at `node /path/to/spec-driven-dev/mcp-server/server.js` (stdio).
463
+ Each skill becomes a tool that returns its instructions, and supporting files are available as
464
+ `skill://<name>/<path>` resources. Prefer native skills support where your tool has it.
465
+
466
+ ---
467
+
468
+ ## Compatibility
469
+
470
+ | Skill | Claude Code | Codex CLI | Cursor | Antigravity | Notes |
471
+ |---|---|---|---|---|---|
472
+ | `spec-setup` | ✅ | ✅ | ✅ | ✅ | Reads git and project files, and writes one config file |
473
+ | `spec-investigate` | ✅ | ✅ | ✅ | ✅ | Fetches tickets via whatever access the tool has (Atlassian/Linear MCP, `gh`); otherwise asks you to paste the ticket. Files and text need nothing extra |
474
+ | `spec-create` | ✅ | ✅ | ✅ | ✅ | Planning and writing files only |
475
+ | `spec-implement` | ✅ | ✅ | ✅ | ✅ | Parallel agents and worktrees where the tool supports them; otherwise one task at a time |
476
+ | `spec-verify` | ✅ | ⚠️ | ⚠️ | ⚠️ | UI checks need browser automation; API and database checks work everywhere |
477
+ | `spec-checkpoint` | ✅ | ✅ | ✅ | ✅ | Plain git plus your repo's own check commands |
478
+ | `spec-ship` | ✅ | ✅ | ✅ | ✅ | git plus the GitHub CLI (`gh`) |
479
+ | `generative-seo` | ✅ | ✅ | ✅ | ✅ | Web search and writing files |
480
+
481
+ ⚠️ = works, but one step depends on a capability your tool might not have. The skill tells you and
482
+ skips that step rather than failing.
483
+
484
+ ---
485
+
486
+ ## By the numbers
487
+
488
+ | Skill | Stage | SKILL.md lines | Words | Supporting files |
489
+ |---|---|---:|---:|---:|
490
+ | `spec-setup` | 0 · configure | 105 | 935 | 1 |
491
+ | `spec-investigate` | 1 · understand | 323 | 2,708 | 1 |
492
+ | `spec-create` | 2 · plan | 149 | 1,328 | 4 |
493
+ | `spec-implement` | 3 · build | 236 | 1,790 | 3 |
494
+ | `spec-verify` | 4 · prove | 153 | 1,459 | 1 |
495
+ | `spec-checkpoint` | 5 · commit | 106 | 762 | 0 |
496
+ | `spec-ship` | 6 · PR | 218 | 1,235 | 0 |
497
+ | `generative-seo` | standalone | 255 | 2,209 | 7 |
498
+ | **Total** | | **1,545** | **12,426** | **17** |
499
+
500
+ - **8** skills: **1** setup + **6** workflow stages + **1** standalone
501
+ - **4** tools supported natively (Claude Code, Codex CLI, Cursor, Antigravity), plus an MCP fallback
502
+ - **3** layouts: single repo, monorepo, multi-repo
503
+ - **1** npm package, `@benjaminthomas/spec-driven-dev`, plus the Claude Code plugin and an MCP fallback
504
+ - **0** stack assumptions: lint, typecheck, test, build, and dev commands come from your repo
505
+
506
+ _The table is generated by `python3 scripts/check.py --fix`; CI fails if it goes out of date._
507
+
508
+ ---
509
+
510
+ ## Working on this repo
511
+
512
+ ```
513
+ skills/<name>/SKILL.md the skill itself (frontmatter: name, description, license)
514
+ skills/<name>/references/ templates and prompts the skill loads when needed
515
+ .claude-plugin/ Claude Code plugin + marketplace manifests
516
+ .agents/skills/ symlinks so Codex/Antigravity pick the skills up inside this repo
517
+ bin/cli.mjs the `spec-driven-dev` CLI: installer, setup, doctor, status (no dependencies)
518
+ package.json npm package (ships bin/ and skills/)
519
+ mcp-server/ MCP fallback server
520
+ hooks/hooks.json Claude Code session-start hook (runs `cli.mjs status`)
521
+ CHANGELOG.md what changed in each version
522
+ scripts/check.py consistency checks + metrics generator
523
+ scripts/test-cli.mjs installer self-test (fake HOME, throwaway repos)
524
+ .github/workflows/check.yml CI: consistency checks + installer self-test on every push and PR
525
+ .github/workflows/publish.yml publishes to npm when a vX.Y.Z tag is pushed
526
+ evals/ `claude plugin eval` cases
527
+ ```
528
+
529
+ - **Adding a skill:** create `skills/<name>/SKILL.md`, then add the name to the two manifests, a `.agents/skills/<name>` symlink, the `STAGES` map in
530
+ `scripts/check.py`, and this README. `python3 scripts/check.py` lists anything you missed.
531
+ - **Before pushing:** run `python3 scripts/check.py --fix`, then `npm test` (which runs the checks
532
+ and the installer self-test). CI (`.github/workflows/check.yml`) runs
533
+ the same checks, the installer self-test, and a syntax check on the MCP server.
534
+ - **Evals:** `claude plugin eval . --runs 1` checks that skills trigger on their phrases and stay
535
+ within their own stage. These runs use your Claude credentials, so they aren't part of CI.
536
+ - **Skill rules** (from [Anthropic's skill authoring guide](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices),
537
+ enforced by `scripts/check.py`):
538
+ - Names are lowercase with hyphens.
539
+ - Descriptions are 1,024 characters or fewer, in the third person, and say both what the skill
540
+ does and when to use it.
541
+ - `SKILL.md` stays under 500 lines, with detail in `references/` one link deep.
542
+ - Facts are read from the repo, not assumed.
543
+ - **Releasing:**
544
+ 1. Increase `version` in both `package.json` and `.claude-plugin/plugin.json` (the check fails if
545
+ they differ).
546
+ 2. Add a `CHANGELOG.md` entry, then commit and push.
547
+ 3. Tag the release and push the tag: `git tag v1.4.1 && git push origin v1.4.1`.
548
+ 4. Watch the **publish** run in the repo's Actions tab. When it's green, the new version is on
549
+ npm. Claude Code plugin users get it from the marketplace once the commit is on `main`.
550
+
551
+ `.github/workflows/publish.yml` then runs the tests and publishes to npm through
552
+ [trusted publishing](https://docs.npmjs.com/trusted-publishers). No npm token or passkey is
553
+ needed, and the package page shows a provenance badge linking the release to the exact commit.
554
+ The workflow refuses to publish if the tag doesn't match `package.json`.
555
+
556
+ ## License
557
+
558
+ MIT. See `LICENSE`.