specpilot 2.13.0 → 2.15.0

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 (71) hide show
  1. package/README.md +27 -22
  2. package/dist/cli.js +4 -2
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/backfill.d.ts.map +1 -1
  5. package/dist/commands/backfill.js +24 -13
  6. package/dist/commands/backfill.js.map +1 -1
  7. package/dist/commands/serve.d.ts +3 -1
  8. package/dist/commands/serve.d.ts.map +1 -1
  9. package/dist/commands/serve.js +75 -4
  10. package/dist/commands/serve.js.map +1 -1
  11. package/dist/core/agentConfig.d.ts +10 -0
  12. package/dist/core/agentConfig.d.ts.map +1 -1
  13. package/dist/core/agentConfig.js +47 -3
  14. package/dist/core/agentConfig.js.map +1 -1
  15. package/dist/core/chatFlow.js +2 -2
  16. package/dist/core/chatFlow.js.map +1 -1
  17. package/dist/core/slashCommands.d.ts.map +1 -1
  18. package/dist/core/slashCommands.js +25 -16
  19. package/dist/core/slashCommands.js.map +1 -1
  20. package/dist/core/specFiles.js +3 -0
  21. package/dist/core/specFiles.js.map +1 -1
  22. package/dist/core/templateEngine.d.ts +5 -0
  23. package/dist/core/templateEngine.d.ts.map +1 -1
  24. package/dist/core/templateEngine.js +13 -1
  25. package/dist/core/templateEngine.js.map +1 -1
  26. package/dist/utils/addSpecsQuestions.d.ts.map +1 -1
  27. package/dist/utils/addSpecsQuestions.js +2 -0
  28. package/dist/utils/addSpecsQuestions.js.map +1 -1
  29. package/dist/utils/folderPicker.d.ts +28 -0
  30. package/dist/utils/folderPicker.d.ts.map +1 -0
  31. package/dist/utils/folderPicker.js +96 -0
  32. package/dist/utils/folderPicker.js.map +1 -0
  33. package/dist/utils/mcpLocal.d.ts +10 -0
  34. package/dist/utils/mcpLocal.d.ts.map +1 -1
  35. package/dist/utils/mcpLocal.js +61 -2
  36. package/dist/utils/mcpLocal.js.map +1 -1
  37. package/dist/utils/projectDetector.d.ts +11 -0
  38. package/dist/utils/projectDetector.d.ts.map +1 -1
  39. package/dist/utils/projectDetector.js +86 -0
  40. package/dist/utils/projectDetector.js.map +1 -1
  41. package/dist/utils/slashCommandGenerator.d.ts +21 -0
  42. package/dist/utils/slashCommandGenerator.d.ts.map +1 -1
  43. package/dist/utils/slashCommandGenerator.js +166 -0
  44. package/dist/utils/slashCommandGenerator.js.map +1 -1
  45. package/dist/utils/specArchiver.d.ts.map +1 -1
  46. package/dist/utils/specArchiver.js +2 -1
  47. package/dist/utils/specArchiver.js.map +1 -1
  48. package/dist/utils/specBackfiller.d.ts +9 -3
  49. package/dist/utils/specBackfiller.d.ts.map +1 -1
  50. package/dist/utils/specBackfiller.js +52 -48
  51. package/dist/utils/specBackfiller.js.map +1 -1
  52. package/dist/utils/specServer.d.ts +12 -7
  53. package/dist/utils/specServer.d.ts.map +1 -1
  54. package/dist/utils/specServer.js +263 -123
  55. package/dist/utils/specServer.js.map +1 -1
  56. package/dist/utils/specSetup.d.ts +21 -23
  57. package/dist/utils/specSetup.d.ts.map +1 -1
  58. package/dist/utils/specSetup.js +69 -57
  59. package/dist/utils/specSetup.js.map +1 -1
  60. package/dist/utils/specValidator.d.ts.map +1 -1
  61. package/dist/utils/specValidator.js +4 -1
  62. package/dist/utils/specValidator.js.map +1 -1
  63. package/package.json +1 -1
  64. package/ui/app.css +43 -109
  65. package/ui/app.js +155 -305
  66. package/ui/index.html +25 -29
  67. package/ui/route.js +3 -101
  68. package/dist/__tests__/fixtures/allFields.d.ts +0 -3
  69. package/dist/__tests__/fixtures/allFields.d.ts.map +0 -1
  70. package/dist/__tests__/fixtures/allFields.js +0 -31
  71. package/dist/__tests__/fixtures/allFields.js.map +0 -1
package/README.md CHANGED
@@ -35,7 +35,7 @@ For Cursor, VS Code and other clients, add it as an HTTP (streamable) server:
35
35
 
36
36
  No install, no API key. Full setup notes: <https://specpilot.dev/mcp-setup>
37
37
 
38
- To let your AI IDE read this machine's specs and add or move tasks, start `specpilot serve --mcp`: see [Local MCP endpoint](#local-mcp-endpoint-specpilot-serve---mcp) below.
38
+ `specpilot serve` also serves a local MCP endpoint, so your AI IDE can read this machine's specs, add or move tasks and set up a folder: see [Local MCP endpoint](#local-mcp-endpoint-specpilot-serve) below.
39
39
 
40
40
  ## Quick Start
41
41
 
@@ -74,11 +74,11 @@ This AI-assisted approach ensures comprehensive, high-quality specifications tai
74
74
  | `add-specs` | Add specs to existing project |
75
75
  | `validate` | Validate specification files |
76
76
  | `archive` | Archive oversized `prompts.md` / `tasks.md` entries |
77
- | `backfill` | Backfill missing mandates & slash commands into existing project files |
77
+ | `backfill` | Backfill missing mandates, slash commands & the Claude Code skill |
78
78
  | `list` | Show available templates |
79
79
  | `migrate` | Convert legacy `.project-spec` folder (rarely needed) |
80
80
  | `refine [desc]` | Refine project specifications |
81
- | `serve [folders...]` | Serve a local web UI over the `.specs/` of this project, or of each folder named; open more from the page, remembered in `~/.specpilot/projects.json` (task moves, new tasks, Regenerate All for command files, guided setup of a folder without `.specs/`, unless `--read-only`) |
81
+ | `serve [folders...]` | Serve a local web UI over the `.specs/` of this project, or of each folder named; open more from the page, remembered in `~/.specpilot/projects.json` (task moves, new tasks, Regenerate All for command files, the Setup view of a folder without `.specs/`, unless `--read-only`) |
82
82
 
83
83
  > **Tip — command aliases:** All commands have a short alias you can use instead of the full name.
84
84
  > `init` → `i` &nbsp;·&nbsp; `validate` → `v` &nbsp;·&nbsp; `migrate` → `m` &nbsp;·&nbsp; `list` → `ls` &nbsp;·&nbsp; `refine` → `ref` &nbsp;·&nbsp; `archive` → `ar` &nbsp;·&nbsp; `add-specs` → `add` &nbsp;·&nbsp; `backfill` → `bf`
@@ -96,7 +96,7 @@ This AI-assisted approach ensures comprehensive, high-quality specifications tai
96
96
  | `archive` | `--dry-run` · `--force` |
97
97
  | `add-specs` | `--no-analysis` · `--deep-analysis` · `--no-prompts` |
98
98
  | `backfill` | `--dir` · `--specs-name` · `--dry-run` · `--no-prompts` |
99
- | `serve` | `--port` · `--poll` · `--read-only` · `--open` · `--mcp` |
99
+ | `serve` | `--port` · `--poll` · `--read-only` · `--open` · `--no-mcp` · `--stop` |
100
100
 
101
101
  > Run `specpilot <command> --help` for full flag descriptions and default values.
102
102
 
@@ -125,51 +125,54 @@ specpilot serve # this project, at http://127.0.0.1:4321
125
125
  specpilot serve --port 5000 --open
126
126
  specpilot serve ../api ../web # two projects on one server; switch in the left rail
127
127
  specpilot serve ../new-project # no .specs/ there yet: the page sets it up (or `specpilot serve .`)
128
+ specpilot serve --stop # stop the server on port 4321 from another terminal (--port for another)
128
129
  ```
129
130
 
130
131
  | Option | Default | Description |
131
132
  | ------------- | ------- | ---------------------------------------------------------------------------------------- |
132
133
  | `--port <n>` | `4321` | Port to listen on (127.0.0.1 only) |
133
134
  | `--poll <ms>` | `1000` | Change-detection interval in ms (minimum 250); polling runs only while a page is open |
134
- | `--read-only` | | No task moves, no new tasks, no guided setup, no opening folders and no registry: the UI only reads, with no drag handles, no New Task button and no write routes |
135
+ | `--read-only` | | No task moves, no new tasks, no Setup view steps, no opening folders and no registry: the UI only reads, with no drag handles, no New Task button and no write routes |
135
136
  | `--open` | | Open the UI in the default browser |
136
- | `--mcp` | | Also serve a local MCP endpoint at `/mcp` for your AI IDE, and show the Connect Your AI IDE card on Home (below) |
137
+ | `--no-mcp` | | Leave out the local MCP endpoint at `/mcp` (served by default for your AI IDE, with the Connect Your AI IDE card on Home and in the Setup view; below). `--mcp` is still accepted and changes nothing |
138
+ | `--stop` | | Stop the SpecPilot server running on this machine on `--port` (default 4321), as Ctrl+C would; takes no other option. A `--read-only` server cannot be stopped this way: press Ctrl+C in its terminal |
137
139
 
138
- - **Several projects**: name any folders; one without `.specs/` is served too and offers guided setup (below). They are numbered in command-line order from 0 (`../api` is project 0, `../web` is project 1), and that number is the `?project=<n>` on the server's `/api/` routes and the `#1/...` at the start of a page link for any project after the first (no number means project 0). Each project keeps its own tasks, files and live reload; a move changes only that project's `tasks.md`. Folders opened from the page (below) get the next numbers; a number never changes while the server runs, and one server holds at most 20 projects.
140
+ - **Several projects**: name any folders; one without `.specs/` is served too and shows the Setup view (below). They are numbered in command-line order from 0 (`../api` is project 0, `../web` is project 1), and that number is the `?project=<n>` on the server's `/api/` routes and the `#1/...` at the start of a page link for any project after the first (no number means project 0). Each project keeps its own tasks, files and live reload; a move changes only that project's `tasks.md`. Folders opened from the page (below) get the next numbers; a number never changes while the server runs, and one server holds at most 20 projects.
141
+ - **Quit**: the power button at the foot of the left rail stops the server after you confirm, as Ctrl+C or `specpilot serve --stop` would (a running clone is stopped and cleaned up first). The page then says SpecPilot has stopped; other open pages simply stop updating. Not shown with `--read-only`.
139
142
  - **Task moves**: drag a row, or use `Alt+Up/Down` to reorder and `Alt+Left/Right` to move between Backlog and Current Sprint. A move changes exactly one line of `.specs/planning/tasks.md` and nothing else, and offers Undo; Completed rows do not move. If the file changed on disk since the page loaded, the move is refused and the page redraws. Start with `--read-only` to turn moves off.
140
- - **Commands and Skills**: each view lists its files in two groups. Under From SpecPilot are the `specpilot-*` commands whose bytes match a version SpecPilot released (in `.claude/commands/` and `.github/prompts/`) and the `specpilot-project` skill; everything else is under Yours, including a `specpilot-*` command you edited. Regenerate All, in the From SpecPilot header of Commands, runs what `specpilot backfill` runs for command files, and nothing else: for each IDE whose instruction file is in the project it adds the missing `specpilot-*` commands and updates the unedited ones to the current version, in every IDE's command folder, also the ones the page does not list (`.cursor/commands/`, `.windsurf/workflows/`, `.agent/workflows/`, `.codex/prompts/`). Edited files, links, files under a linked folder, your own commands, skills, instruction files and `.specs/` are never written. What it did is shown above the groups as it happened: updated, added, kept with the reason, and the folders the page does not list.
143
+ - **Commands and Skills**: each view lists its files in two groups. Under From SpecPilot are the `specpilot-*` commands whose bytes match a version SpecPilot released (in `.claude/commands/` and `.github/prompts/`) and the `specpilot-project` skill while it is still SpecPilot's own render of your `project.yaml`; everything else is under Yours, including a `specpilot-*` command you edited. Regenerate All, in the From SpecPilot header of Commands, runs what `specpilot backfill` runs for command files, and nothing else: for each IDE whose instruction file is in the project it adds the missing `specpilot-*` commands and updates the unedited ones to the current version, in every IDE's command folder, also the ones the page does not list (`.cursor/commands/`, `.windsurf/workflows/`, `.agent/workflows/`, `.codex/prompts/`). It also refreshes `.claude/skills/specpilot-project/SKILL.md` from `.specs/project/project.yaml` (name, language, framework, platforms, package manager, test framework, repository URL, license) when the skill is still SpecPilot's own, and adds it when missing; a skill you edited, or one rendered from values `project.yaml` no longer holds, is kept with the reason `does not match SpecPilot's render of project.yaml`. Edited files, links, files under a linked folder, your own commands and skills, instruction files and `.specs/` are never written. What it did is shown above the groups as it happened: updated, added, kept with the reason, and the folders the page does not list.
141
144
  - **New Task**: the New Task button on the Tasks view opens a small form: a description and a section (Backlog by default, or Current Sprint). SpecPilot adds one row, `| <ID> | <description> |`, at the end of that section's table in `.specs/planning/tasks.md` and changes nothing else in the file. The ID is the next free one: `BL-###` for Backlog, `CS-###` for Current Sprint, one past the highest in use in `tasks.md` and `tasks-archive.md` (only IDs in ID columns and leading tags count, not IDs mentioned in a description; gaps are never filled). The description is written exactly as you typed it, markdown included, with no label or date added; one with a line break, a control character, a `|` or a trailing `\`, or over 4000 characters, is refused with the reason, and what you typed stays in the form. The new row is selected and opened in the details panel. If the file changed on disk since the page loaded, nothing is added and the page redraws. Protected like a task move; off with `--read-only`.
142
- - **Guided setup**: a folder you name that has no `.specs/` shows, instead of the views, a Start Guided Setup button. It starts a chat that asks the questions `specpilot add-specs` asks (project type, language and framework when they are not detected, API paradigm, handle, IDE) one at a time: a friendly line per question with the CLI's own question under it, chips or a field with Continue and Skip, step dividers and a progress bar, then a recap of your answers by step with the files that will be written folded inside, before anything is created. What SpecPilot detected in the folder is already answered and marked `detected`: the language, the framework and the project name, which `add-specs` takes from your files without asking, so they cannot be changed here, and a platform it can see directly (React Native, Next.js, React or Vue / Nuxt from `package.json`, iOS Native from an Xcode project, also a macOS one), which you can change; the chat starts at the first question it still needs. Tap any other answer, in the thread or the recap, to change it; you come straight back. It then creates exactly what `add-specs` creates for those answers. A handle that would be refused is caught where you type it. Your answers stay in the page while it is open; they are not saved anywhere. Files outside `.specs/` that already exist (your own `.gitattributes`, `CLAUDE.md`, `.vscode/settings.json`, a command file) are never changed: the recap's file list marks them (`Already here, will be kept`) and the page lists them again afterwards, and `specpilot backfill` adds missing SpecPilot sections to kept instruction and command files (a kept `.gitattributes` does not get the `merge=union` lines). Setup is offered only for folders named on the command line, not for the current-directory default, which still needs `.specs/` (`specpilot serve .` names it). The request is protected like a task move. While it runs, the files are generated into a `.specpilot-setup-<id>/` folder inside the project, which is removed when done; if a run is interrupted, the next `specpilot serve` removes that folder (and only that folder, recognised by its marker file).
145
+ - **Setup view**: a folder without `.specs/` (one you name, open from the page or clone) shows the Setup view instead of the other views, and Start a New Project on Home shows it too, with a Project name and a Parent folder (with Browse…). Your AI IDE does the setup: it reads the code, answers what it can, and asks you the rest. The view says how, in three steps: 1 Connect your AI IDE, the config for this server with Copy and a status, `Waiting for a connection` until an IDE connects to `/mcp`, then `Connected · <the IDE's name>`; 2 Tell it what to do, one line to paste into the IDE (`Set up SpecPilot for <folder>`, or `Start a SpecPilot project called <name> in <parent>`); 3 Progress, four rows that follow the IDE's calls (Read the code, Answer the questions, Write the files, Validate). When `.specs/` appears, the page opens the project; there is no Finish button. For a new project, the page checks the name and the parent as you type and remembers `<parent>/<name>` for this run of the server as the one place a new project may be made; nothing is created until your IDE does it, and the folder must be missing or empty. Without MCP the view says so and how to restart. `specpilot add-specs` (in an existing folder) or `specpilot init` (for a new one) asks the same questions in the terminal. The current-directory default is never offered setup (it needs `.specs/` to start; `specpilot serve .` names it). If a setup is interrupted, the next `specpilot serve` removes the `.specpilot-setup-<id>/` folder it left (and only that folder, recognised by its marker file).
143
146
  - **Home**: the logo at the top of the left rail, the `+` tile below the projects (or the `h` key, or `#home`) shows "Your specs, as a board.", an Open a Project Folder button and your Recent projects (path, last-opened time and, for projects already open, the git branch); click one to open it, or Remove from list to forget it (the folder is not touched). `specpilot serve` still starts on the first project's Tasks view, and `--read-only` has no Home.
144
- - **Open a project from the page**: Open a Project Folder on Home opens a sheet (Clone a Repository opens it on its Clone tab); type a folder path (`/Users/you/project` or `~/project`) and Open, and the folder is served alongside the others, with guided setup if it has no `.specs/`. Folders you open this way are listed under Recent projects next time, remembered in `~/.specpilot/projects.json` (path, last-opened time and a pinned flag, at most 50; the file is created the first time you open a folder from the page, and folders named on the command line are added to it only once it exists). Remove from list forgets a folder without touching it. The home folder, the root of a drive and folders already open are refused; a `projects.json` that cannot be read is left exactly as it is, and the page and the terminal say so. The request is protected like a task move.
145
- - **Start a new project from the page**: Start a New Project on Home opens the same chat: name the project to start, then it asks for the parent folder (`/Users/you/dev` or `~/dev`) and the questions `specpilot init` asks, one at a time, then shows your answers and the files that will be written, and creates `<parent>/<name>`, writes the files `init` writes there and opens it on its onboarding prompt. An existing folder is used only if it is empty; one with content is refused (open it from the Folder tab to add `.specs/` to it). The parent must already exist and cannot be your home folder itself, the root of a drive, or a `.specs/` folder or anything under one. A project name that would be refused is caught where you type it. For a Brownfield project the four project-context questions are not asked, because `init` writes those answers only for Greenfield. Nothing that exists is changed, a run that fails removes what it created, and no `git init` is run. Not offered here: `--specs-name` and `--dry-run`.
146
- - **Clone a repository from the page**: Clone a Repository on Home (or the Clone tab of the same sheet) asks for a repository URL, a parent folder and a folder name (leave it empty for the repository's name), runs your installed `git clone` and opens the result: on Tasks when the repository has `.specs/`, in guided setup when it has none. Accepted URLs: `https://host/path`, `git@host:path` and `ssh://host/path`; an https URL must not contain a user name or password (git uses your credential helper and ssh keys, as in a terminal), so for Azure DevOps drop the `org@` part. Submodules are not cloned, and there is no branch or depth option. The target folder must not exist or must be empty; the parent follows the rules of Start a New Project. As you type or paste the URL, Folder name is filled with the repository's name until you type one yourself. While the clone runs the sheet shows the elapsed time and, once git reports it, git's stage and percentage (`Receiving objects 42% · 0:13`, then `Resolving deltas` and `Updating files`); until then, or when git reports none, a moving bar. git is never asked a question it would wait on: a repository that needs a login it cannot get fails with git's own message, its last `fatal:` line with the line before it, for example `Host key verification failed. fatal: Could not read from remote repository.`, and a clone is stopped after 10 minutes. The page cannot accept an ssh host key for you: for a host you have never connected to, run `ssh -T git@host` once in a terminal, then clone again. Your ssh setup is used as it is; SpecPilot sets no ssh option on macOS and Linux. One clone runs at a time. A clone that fails, is stopped, or is cancelled (Cancel, Escape, closing the tab, Ctrl+C) removes what it downloaded; on Ctrl+C the server waits at most 5 seconds for that. Needs `git` on your `PATH`. This is the only time SpecPilot starts another program for the page and the only time it uses the network. On Windows ssh is put in batch mode (unless you have set `GIT_SSH_COMMAND`, `GIT_SSH` or `core.sshCommand`), and a stopped clone can leave git's helper process running until it ends by itself, and the clean-up can then fail on a file that helper still holds; the message says so.
147
+ - **Open a project from the page**: Open a Project Folder on Home opens a sheet (Clone a Repository opens it on its Clone tab); type a folder path (`/Users/you/project` or `~/project`), or click Browse… to pick it in your system's folder dialog (macOS; Linux with `zenity` or `kdialog`; Windows), and Open, and the folder is served alongside the others, with the Setup view if it has no `.specs/`. Folders you open this way are listed under Recent projects next time, remembered in `~/.specpilot/projects.json` (path, last-opened time and a pinned flag, at most 50; the file is created the first time you open a folder from the page, and folders named on the command line are added to it only once it exists). Remove from list forgets a folder without touching it. Browse… only fills in the path; nothing is opened until you click Open. The Clone tab's Parent folder and the Setup view's Parent folder (Start a New Project) have the same Browse… button, which likewise only fills in the field. Checked on macOS: picking a folder fills the field and Open opens it, and no privacy prompt appears at Browse… or at Open, also for a folder inside `~/Documents`; the Linux and Windows dialogs are not yet checked by hand. The home folder, the root of a drive and folders already open are refused; a `projects.json` that cannot be read is left exactly as it is, and the page and the terminal say so. The request is protected like a task move.
148
+ - **Clone a repository from the page**: Clone a Repository on Home (or the Clone tab of the same sheet) asks for a repository URL, a parent folder and a folder name (leave it empty for the repository's name), runs your installed `git clone` and opens the result: on Tasks when the repository has `.specs/`, in the Setup view when it has none. Accepted URLs: `https://host/path`, `git@host:path` and `ssh://host/path`; an https URL must not contain a user name or password (git uses your credential helper and ssh keys, as in a terminal), so for Azure DevOps drop the `org@` part. Submodules are not cloned, and there is no branch or depth option. The target folder must not exist or must be empty; the parent follows the rules of Start a New Project. As you type or paste the URL, Folder name is filled with the repository's name until you type one yourself. While the clone runs the sheet shows the elapsed time and, once git reports it, git's stage and percentage (`Receiving objects 42% · 0:13`, then `Resolving deltas` and `Updating files`); until then, or when git reports none, a moving bar. git is never asked a question it would wait on: a repository that needs a login it cannot get fails with git's own message, its last `fatal:` line with the line before it, for example `Host key verification failed. fatal: Could not read from remote repository.`, and a clone is stopped after 10 minutes. The page cannot accept an ssh host key for you: for a host you have never connected to, run `ssh -T git@host` once in a terminal, then clone again. Your ssh setup is used as it is; SpecPilot sets no ssh option on macOS and Linux. One clone runs at a time. A clone that fails, is stopped, or is cancelled (Cancel, Escape, closing the tab, Ctrl+C) removes what it downloaded; on Ctrl+C the server waits at most 5 seconds for that. Needs `git` on your `PATH`. This is the only time SpecPilot starts another program for the page and the only time it uses the network. On Windows ssh is put in batch mode (unless you have set `GIT_SSH_COMMAND`, `GIT_SSH` or `core.sshCommand`), and a stopped clone can leave git's helper process running until it ends by itself, and the clean-up can then fail on a file that helper still holds; the message says so.
147
149
  - **Open in VS Code**: the icon at the top right of every project view (and beside each Recent project on Home whose folder still exists) is a `vscode://file/` link to that project's folder. Your browser hands it to VS Code, which asks before opening it; SpecPilot starts nothing itself. Nothing happens if VS Code is not installed. A task's details panel has Open tasks.md in VS Code, which opens `.specs/planning/tasks.md` at that task's line; VS Code puts a file in the window it picks (by default the last one you used), which may not be this project's. It opens VS Code only, not Insiders or another editor. The file view of every `.specs/` file and the details panel of every Instructions, Commands and Skills file also have Open in VS Code, which opens that file.
148
150
  - **Open in AI IDE**: the sparkle icon beside Open in VS Code shows a short menu when it has something to offer. Open in Cursor (`cursor://file/`) appears when the project has `.cursor/rules/specpilot.mdc`, the file SpecPilot writes for Cursor. While `.specs/development/onboarding.md` exists, Send onboarding prompt to Cursor puts the prompt into Cursor's chat through Cursor's own link (it stays on this machine; Cursor waits for you to confirm, and uses the window it has in front, so open the project in Cursor first), and Copy onboarding prompt copies it for Claude Code, which has no link to open, or any other IDE. A prompt too long for a Cursor link (10,000 characters) is copied instead. It is on project views only, not on Home's rows.
149
- - **Nothing else is written**: in a project with `.specs/`, its `.specs/planning/tasks.md` and, through Regenerate All, its `specpilot-*` command files are the only files the server can change; in a named folder without `.specs/`, setup creates new files and changes none; a new project is one new folder (or an empty one) with new files; a clone is one new folder (or an empty one) filled by `git clone`; `~/.specpilot/projects.json` is the one file written outside your projects; everything else is read on every request.
151
+ - **Nothing else is written**: in a project with `.specs/`, its `.specs/planning/tasks.md` and, through Regenerate All, its `specpilot-*` command files and its `specpilot-project` skill are the only files the server can change; in a named folder without `.specs/`, setup creates new files and changes none; a new project is one new folder (or an empty one) with new files; a clone is one new folder (or an empty one) filled by `git clone`; `~/.specpilot/projects.json` is the one file written outside your projects; everything else is read on every request.
150
152
  - **Loopback only**: binds 127.0.0.1 only; rejects any Host header other than `127.0.0.1:<port>` or `localhost:<port>` (403).
151
153
  - **Live reload**: polls allowlisted files with `stat()` every `--poll` ms while a page is open, and pushes changed paths on `/api/events`; open pages update in place.
152
154
  - **What it shows**: `.specs/`, `CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`, `.claude/commands/`, `.claude/skills/` and `.github/prompts/`, as the files' own text.
153
- - **Limits**: paths through symlinked folders, hidden files and `node_modules` are not shown. Task moves and new tasks are refused, not approximated, when they cannot change exactly one line: a section with no table yet (a fresh project's `[TODO]`), a move involving the file's last line when it has no trailing newline, and a `tasks.md` that is not valid UTF-8. If an editor saves `tasks.md` in the same instant the server writes it, that save can be overwritten; git keeps it recoverable. VS Code reads a path ending in `:<number>` as a line number, so a project folder whose name ends that way (`notes:12`) may not open as a folder from Open in VS Code. Windows paths (`C:\…`) in that link are untested. The Cursor links are untested on a machine with Cursor installed, and Windsurf has none yet. Adding or removing `.cursor/rules/specpilot.mdc` shows on the page at its next refresh, not at once, since that file is not watched.
155
+ - **Limits**: paths through symlinked folders, hidden files and `node_modules` are not shown. Task moves and new tasks are refused, not approximated, when they cannot change exactly one line: a section with no table yet (a fresh project's `[TODO]`), a move involving the file's last line when it has no trailing newline, and a `tasks.md` that is not valid UTF-8. If an editor saves `tasks.md` in the same instant the server writes it, that save can be overwritten; git keeps it recoverable. VS Code reads a path ending in `:<number>` as a line number, so a project folder whose name ends that way (`notes:12`) may not open as a folder from Open in VS Code. Windows paths (`C:\…`) in that link are untested. The Cursor links are untested on a machine with Cursor installed, and Windsurf has none yet. Adding or removing `.cursor/rules/specpilot.mdc` shows on the page at its next refresh, not at once, since that file is not watched. The Setup view's Connected status shows the name the IDE sends when it connects (`clientInfo`); it was checked with test requests in both MCP revisions, not with every IDE. The order the setup tools want is sent as the MCP `instructions` and in the tools' descriptions; whether an IDE shows `instructions` to its agent is up to the IDE, and only test requests were checked. A local program that can read the page can also register a new project's folder itself: the setup tools guard against an agent writing elsewhere by mistake, not against software already running on your machine.
154
156
 
155
- ### Local MCP endpoint (`specpilot serve --mcp`)
157
+ ### Local MCP endpoint (`specpilot serve`)
156
158
 
157
- With `--mcp`, the server also answers MCP at `http://127.0.0.1:<port>/mcp`, so Claude Code, Cursor and other AI IDEs on this machine can read the specs and add or move tasks through the same checks as the page. It is off by default; without the flag nothing changes.
159
+ The server also answers MCP at `http://127.0.0.1:<port>/mcp`, so Claude Code, Cursor and other AI IDEs on this machine can read the specs and add or move tasks through the same checks as the page. It is on by default; start with `--no-mcp` to leave it out (the Setup view then says how to restart). `--mcp` is still accepted and changes nothing.
158
160
 
159
161
  ```bash
160
- specpilot serve --mcp
162
+ specpilot serve
161
163
  # MCP endpoint: http://127.0.0.1:4321/mcp
162
164
  # Add to your IDE's MCP settings: {"mcpServers":{"specpilot-local":{"type":"http","url":"http://127.0.0.1:4321/mcp","headers":{"X-SpecPilot-Token":"<token>"}}}}
163
165
  ```
164
166
 
165
- Copy that line from the terminal or from the **Connect Your AI IDE** card on Home (Copy button) into your IDE's MCP settings, or into `.mcp.json` in your project and add `.mcp.json` to `.gitignore`.
167
+ Copy that line from the terminal, from the **Connect Your AI IDE** card on Home, or from step 1 of the Setup view (Copy button) into your IDE's MCP settings, or into `.mcp.json` in your project and add `.mcp.json` to `.gitignore`.
166
168
 
167
169
  - **Tools**: `specpilot_list_projects`, `specpilot_read_spec`, `specpilot_list_tasks`, `specpilot_new_task`, `specpilot_move_task`, `specpilot_validate_specs` (no `--fix`, writes nothing) and `specpilot_regenerate_commands`. Each takes an optional `project` index. The two task writes need the `sha256` that `specpilot_list_tasks` returned; if `tasks.md` changed since, the write is refused ("since you last read it") and nothing is written. Open pages show the change through live reload.
168
- - **Same guards as the page**: loopback only, the Host check, the token (a wrong or missing `X-SpecPilot-Token` gets 403), JSON only, 16 KB, the page's read allowlist, the page's write allowlist and one write lock for page and IDE. A request from a web page (any other `Origin`) is refused with 403; IDEs send none. Setup, new projects, clones and the project list are not tools.
170
+ - **Setup tools**: `specpilot_setup_questions` (a path) returns what was detected in the code and every question, with choices and suggestions; `specpilot_setup_project` (the path, the answers, and which ones the user gave) writes `.specs/`, the instruction files and the skill (creating a new project's folder), runs `specpilot validate` and returns the files written and the result. Nine tools in all. They work only on a folder the page is setting up: one you named, opened or cloned that has no `.specs/`, or the new project's folder you named on the Setup view. The server tells the IDE the order (questions, answer from the code, ask the user the rest, write, report). The Setup view's Progress rows follow these calls.
171
+ - **Same guards as the page**: loopback only, the Host check, the token (a wrong or missing `X-SpecPilot-Token` gets 403), JSON only, 64 KB, the page's read allowlist, the page's write allowlist and one write lock for page and IDE. A request from a web page (any other `Origin`) is refused with 403; IDEs send none. Clones and the project list are not tools.
169
172
  - **Protocol revisions**: MCP `2026-07-28` (no handshake; the version, `Mcp-Method` and `Mcp-Name` headers must match the request body), and `2025-11-25` and `2025-06-18` (with `initialize`), on the same URL. A client that speaks both picks one; the config line is the same. Streamable HTTP, POST only, no sessions; answers are JSON, never a stream, and no change notifications are sent.
170
173
  - **Token**: a new one each time `serve` starts, so the line needs copying again after a restart. To keep one line, set `SPECPILOT_MCP_TOKEN` (at least 32 characters, no spaces) in the environment of `serve` and of your IDE; the line then says `${SPECPILOT_MCP_TOKEN}`, which Claude Code fills in from the environment (other IDEs: put the token in its place). SpecPilot never writes the token anywhere.
171
- - **`--read-only --mcp`**: only the four read tools; the endpoint gets its own token and the page stays read-only.
172
- - **Instruction files**: files generated by `init`, `add-specs` and the page's setup carry one more process mandate: use the SpecPilot MCP tools for tasks when they are connected, otherwise edit `.specs/planning/tasks.md` and keep its table format. `specpilot backfill` does not add it to existing files yet.
174
+ - **`--read-only`**: only the four read tools (no task writes, no Regenerate, no setup tools); the endpoint gets its own token and the page stays read-only.
175
+ - **Instruction files**: files generated by `init`, `add-specs` and the setup through your AI IDE carry one more process mandate: use the SpecPilot MCP tools for tasks when they are connected, otherwise edit `.specs/planning/tasks.md` and keep its table format. `specpilot backfill` does not add it to existing files yet.
173
176
 
174
177
  ## Supported Languages & Frameworks
175
178
 
@@ -382,7 +385,7 @@ npx playwright-core install chromium-headless-shell # once, if Playwright's Chr
382
385
  npm run test:browser # builds, then runs src/__browser__/ (about 10 s)
383
386
  ```
384
387
 
385
- The suite starts the built server on scratch copies of `.specs/` under a temporary `HOME`, so it writes nothing in the repo or in `~/.specpilot/`. A failing test prints the paths of its error message and stack, a screenshot and the page's HTML, kept in a temp folder.
388
+ The suite starts the built server on scratch copies of a fixture project (`src/__browser__/fixture/`, never this repo's own `.specs/`) under a temporary `HOME`, so it writes nothing in the repo or in `~/.specpilot/`. A failing test prints the paths of its error message and stack, a screenshot and the page's HTML, kept in a temp folder.
386
389
 
387
390
  ### Quick Contribution Guide
388
391
 
@@ -391,6 +394,8 @@ The suite starts the built server on scratch copies of `.specs/` under a tempora
391
394
  3. Update specs when making changes
392
395
  4. Run `specpilot validate` before committing
393
396
 
397
+ Releases follow the checklist in [`docs/RELEASING.md`](docs/RELEASING.md).
398
+
394
399
  ## Documentation
395
400
 
396
401
  - **[Full Guide](docs/GUIDE.md)**: Comprehensive documentation
package/dist/cli.js CHANGED
@@ -105,13 +105,15 @@ commander_1.program
105
105
  // Serve command
106
106
  commander_1.program
107
107
  .command('serve')
108
- .description('Serve a local web UI over the .specs/ of this project, or of each folder named (127.0.0.1 only; task moves, and guided setup of a named folder without .specs/, unless --read-only)')
108
+ .description('Serve a local web UI over the .specs/ of this project, or of each folder named (127.0.0.1 only; task moves, and setup of a folder without .specs/ through your AI IDE, unless --read-only)')
109
109
  .argument('[folders...]', 'Project folders to serve, in this order (default: the current directory)')
110
110
  .option('-p, --port <number>', 'Port to listen on', '4321')
111
111
  .option('--poll <ms>', 'How often to check spec files for changes, in ms (minimum 250)', '1000')
112
112
  .option('--read-only', 'Turn off task moves and guided setup: the page only reads')
113
113
  .option('--open', 'Open the UI in your default browser')
114
- .option('--mcp', 'Also serve a local MCP endpoint at /mcp for your AI IDE (SPECPILOT_MCP_TOKEN sets its token)')
114
+ .option('--mcp', 'Serve the local MCP endpoint at /mcp for your AI IDE (the default; SPECPILOT_MCP_TOKEN sets its token)')
115
+ .option('--no-mcp', 'Do not serve the local MCP endpoint')
116
+ .option('--stop', 'Stop the SpecPilot server running on this machine (on --port; a --read-only one stops with Ctrl+C)')
115
117
  .action(serve_1.serveCommand);
116
118
  commander_1.program.addHelpText('after', `
117
119
  Aliases:
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,kDAA0B;AAC1B,0CAA8C;AAC9C,kDAAsD;AACtD,gDAAoD;AACpD,0CAA8C;AAC9C,8CAAkD;AAClD,oDAAuD;AACvD,gDAAoD;AACpD,kDAAsD;AACtD,uDAAgF;AAChF,4CAAgD;AAChD,2CAAwC;AAExC,MAAM,WAAW,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAE/C,mBAAO;KACJ,IAAI,CAA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AAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E"}
1
+ {"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../../src/commands/backfill.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E"}
@@ -55,13 +55,6 @@ function ideFileResultLines(r, dryRun) {
55
55
  if (r.action === 'warn') {
56
56
  lines.push(chalk_1.default.yellow(` ⚠️ ${r.reason}`));
57
57
  }
58
- else if (r.action === 'stale') {
59
- lines.push(chalk_1.default.yellow(` ⚠️ Stale — ${r.found}/${r.total} structural fingerprints found`));
60
- r.added.forEach((label) => lines.push(chalk_1.default.white(` • Missing: ${label}`)));
61
- if (r.reason) {
62
- lines.push(chalk_1.default.white(` ${r.reason}`));
63
- }
64
- }
65
58
  else {
66
59
  const fileResult = {
67
60
  action: r.action,
@@ -74,6 +67,21 @@ function ideFileResultLines(r, dryRun) {
74
67
  }
75
68
  return lines;
76
69
  }
70
+ /** The Claude Code skill's line (BL-PM-012): refreshed from project.yaml, or kept with the reason. */
71
+ function skillResultLines(r, dryRun) {
72
+ const done = {
73
+ added: dryRun ? 'Would add it from project.yaml' : 'Added from project.yaml',
74
+ updated: dryRun ? "Would update it from project.yaml (it is SpecPilot's own render)" : "Updated from project.yaml (it was SpecPilot's own render)",
75
+ current: 'Current — nothing to do',
76
+ };
77
+ return [
78
+ chalk_1.default.blue.bold('Claude Code skill'),
79
+ '',
80
+ chalk_1.default.cyan(`📄 ${r.path}`),
81
+ r.action === 'kept' ? chalk_1.default.yellow(` ⚠️ Kept as it was (${r.reason})`) : chalk_1.default.green(` ✅ ${done[r.action]}`),
82
+ '',
83
+ ];
84
+ }
77
85
  function slashCommandResultLines(r, dryRun) {
78
86
  const lines = [chalk_1.default.cyan(`📄 ${r.ide} slash commands`)];
79
87
  if (r.added.length === 0 && r.updated.length === 0 && r.kept.length === 0) {
@@ -126,20 +134,23 @@ function displayResult(result, dryRun, logger) {
126
134
  '',
127
135
  ...ideLines,
128
136
  ...slashLines,
137
+ ...(result.skill ? skillResultLines(result.skill, dryRun) : []),
129
138
  ];
130
139
  const updatedCount = allResults.filter((r) => r.action === 'updated' || r.action === 'created').length +
131
- result.slashCommands.filter((r) => r.added.length > 0 || r.updated.length > 0).length;
140
+ result.slashCommands.filter((r) => r.added.length > 0 || r.updated.length > 0).length +
141
+ (result.skill?.action === 'added' || result.skill?.action === 'updated' ? 1 : 0);
132
142
  const skippedCount = allResults.filter((r) => r.action === 'skipped').length +
133
- result.slashCommands.filter((r) => r.added.length === 0 && r.updated.length === 0).length;
134
- const staleCount = allResults.filter((r) => r.action === 'stale').length;
135
- if (updatedCount === 0 && staleCount === 0) {
143
+ result.slashCommands.filter((r) => r.added.length === 0 && r.updated.length === 0).length +
144
+ (result.skill?.action === 'current' ? 1 : 0);
145
+ const keptCount = result.skill?.action === 'kept' ? 1 : 0;
146
+ if (updatedCount === 0 && keptCount === 0) {
136
147
  content.push(chalk_1.default.green('✅ Everything is up to date — nothing to backfill.'));
137
148
  }
138
149
  else if (dryRun) {
139
- content.push(chalk_1.default.yellow(`ℹ️ ${updatedCount} file(s) would be updated, ${skippedCount} already up to date, ${staleCount} stale. Run without --dry-run to apply.`));
150
+ content.push(chalk_1.default.yellow(`ℹ️ ${updatedCount} file(s) would be updated, ${skippedCount} already up to date, ${keptCount} kept. Run without --dry-run to apply.`));
140
151
  }
141
152
  else {
142
- content.push(chalk_1.default.green(`✅ ${updatedCount} file(s) updated, ${skippedCount} already up to date, ${staleCount} stale.`));
153
+ content.push(chalk_1.default.green(`✅ ${updatedCount} file(s) updated, ${skippedCount} already up to date, ${keptCount} kept.`));
143
154
  content.push('');
144
155
  content.push(chalk_1.default.cyan('📖 Next steps:'));
145
156
  content.push(chalk_1.default.white(' specpilot validate # Verify your specs are complete'));
@@ -1 +1 @@
1
- {"version":3,"file":"backfill.js","sourceRoot":"","sources":["../../src/commands/backfill.ts"],"names":[],"mappings":";;;;;AAkBA,0CAsBC;AAxCD,kDAA0B;AAC1B,+BAA+B;AAC/B,4DAMiC;AACjC,4CAAyC;AASlC,KAAK,UAAU,eAAe,CAAC,OAAwB;IAC5D,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAC5B,MAAM,UAAU,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAExC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,+CAA+C,CAAC,CAAC;IAC/D,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,+BAAc,EAAE,CAAC;IAExC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,QAAQ,CACtC,UAAU,EACV,OAAO,CAAC,SAAS,EACjB,OAAO,CAAC,MAAM,IAAI,KAAK,EACvB,OAAO,CAAC,SAAS,IAAI,KAAK,CAC3B,CAAC;QACF,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,KAAK,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,KAAK,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAC9E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAa,EAAE,CAAqB,EAAE,MAAe;IAC5E,MAAM,KAAK,GAAa,CAAC,eAAK,CAAC,IAAI,CAAC,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC;IAEpD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CAAC,EAAE,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,KAAK,CAAC,mDAAmD,CAAC,CAAC,CAAC;IACjF,CAAC;SAAM,IAAI,MAAM,EAAE,CAAC;QAClB,OAAO,CAAC,IAAI,CACV,eAAK,CAAC,MAAM,CACV,OAAO,YAAY,8BAA8B,YAAY,wBAAwB,SAAS,wCAAwC,CACvI,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CACV,eAAK,CAAC,KAAK,CACT,KAAK,YAAY,qBAAqB,YAAY,wBAAwB,SAAS,QAAQ,CAC5F,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -1,9 +1,11 @@
1
+ import { Command } from 'commander';
1
2
  export interface ServeOptions {
2
3
  port?: string;
3
4
  poll?: string;
4
5
  readOnly?: boolean;
5
6
  open?: boolean;
6
7
  mcp?: boolean;
8
+ stop?: boolean;
7
9
  }
8
10
  /** Longest a stop signal waits for a running clone to be killed and cleaned up. */
9
11
  export declare const STOP_CLONE_MS = 5000;
@@ -16,5 +18,5 @@ export declare function mcpConfigLine(host: string, token: string): string;
16
18
  * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
17
19
  * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
18
20
  */
19
- export declare function serveCommand(folders: string[], options: ServeOptions): Promise<void>;
21
+ export declare function serveCommand(folders: string[], options: ServeOptions, command?: Command): Promise<void>;
20
22
  //# sourceMappingURL=serve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAID,mFAAmF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAGlC,4HAA4H;AAC5H,eAAO,MAAM,iBAAiB,QAAuB,CAAC;AAEtD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAaD;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAiI1F"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAID,mFAAmF;AACnF,eAAO,MAAM,aAAa,OAAO,CAAC;AAGlC,4HAA4H;AAC5H,eAAO,MAAM,iBAAiB,QAAuB,CAAC;AAEtD,mGAAmG;AACnG,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE;AAsED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAiJ7G"}
@@ -9,6 +9,8 @@ exports.serveCommand = serveCommand;
9
9
  const chalk_1 = __importDefault(require("chalk"));
10
10
  const child_process_1 = require("child_process");
11
11
  const fs_1 = require("fs");
12
+ const http_1 = require("http");
13
+ const net_1 = require("net");
12
14
  const path_1 = require("path");
13
15
  const specServer_1 = require("../utils/specServer");
14
16
  const specSetup_1 = require("../utils/specSetup");
@@ -35,13 +37,80 @@ function openBrowser(url, logger) {
35
37
  child.on('error', () => logger.warn(`Could not open a browser. Open ${url} yourself.`));
36
38
  child.unref();
37
39
  }
40
+ /** The most of `GET /` that `--stop` reads (BL-098). */
41
+ const MAX_PAGE_BYTES = 1024 * 1024;
42
+ /** One request to 127.0.0.1:<port>: status and body (at most MAX_PAGE_BYTES), no redirect followed. */
43
+ function loopback(port, method, path, headers = {}, body) {
44
+ return new Promise((resolveRequest, reject) => {
45
+ const req = (0, http_1.request)({ host: '127.0.0.1', port, method, path, headers, timeout: 5000, agent: false }, res => {
46
+ let text = '';
47
+ res.setEncoding('utf8');
48
+ res.on('data', (chunk) => {
49
+ text += chunk;
50
+ if (text.length > MAX_PAGE_BYTES)
51
+ req.destroy(new Error('too large'));
52
+ });
53
+ res.on('end', () => resolveRequest({ status: res.statusCode ?? 0, body: text }));
54
+ res.on('error', reject);
55
+ });
56
+ req.on('timeout', () => req.destroy(new Error('timeout')));
57
+ req.on('error', reject);
58
+ req.end(body);
59
+ });
60
+ }
61
+ /** Whether something accepts connections on 127.0.0.1:<port>. */
62
+ function listening(port) {
63
+ return new Promise(resolveCheck => {
64
+ const socket = (0, net_1.connect)(port, '127.0.0.1');
65
+ socket.once('connect', () => (socket.destroy(), resolveCheck(true)));
66
+ socket.once('error', () => resolveCheck(false));
67
+ });
68
+ }
69
+ /**
70
+ * `specpilot serve --stop` (BL-098): the page's own Quit, sent from here. Reads the page token from `GET /`
71
+ * as any page on this machine can, posts `/api/quit` with it, then waits for the port to close. Never
72
+ * prints the token, signals no process and writes nothing.
73
+ */
74
+ async function stopRunningServer(port, logger) {
75
+ const page = await loopback(port, 'GET', '/').catch(() => null);
76
+ const token = page?.status === 200 ? /<meta name="specpilot-token" content="([0-9a-f]{64})">/.exec(page.body)?.[1] : undefined;
77
+ if (!token) {
78
+ logger.error(`No SpecPilot server that --stop can reach is running on port ${port}. A --read-only server stops with Ctrl+C in its terminal.`);
79
+ return process.exit(1);
80
+ }
81
+ const headers = { Origin: `http://127.0.0.1:${port}`, 'X-SpecPilot-Token': token, 'Content-Type': 'application/json' };
82
+ const quit = await loopback(port, 'POST', '/api/quit', headers, '{}').catch(() => null);
83
+ const deadline = Date.now() + exports.STOP_CLONE_MS + 2000;
84
+ while (quit?.status === 202 && Date.now() < deadline) {
85
+ if (!(await listening(port))) {
86
+ console.log(`Stopped the SpecPilot server on port ${port}.`);
87
+ return;
88
+ }
89
+ await new Promise(r => setTimeout(r, 100));
90
+ }
91
+ logger.error(`Asked the server on port ${port} to stop; it is still running.`);
92
+ return process.exit(1);
93
+ }
38
94
  /**
39
95
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
40
96
  * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
41
97
  * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
42
98
  */
43
- async function serveCommand(folders, options) {
99
+ async function serveCommand(folders, options, command) {
44
100
  const logger = new logger_1.Logger();
101
+ if (options.stop) {
102
+ const pollGiven = command ? command.getOptionValueSource('poll') === 'cli' : options.poll !== undefined;
103
+ if (folders.length || options.readOnly || options.open || options.mcp !== undefined || pollGiven) {
104
+ logger.error('--stop takes only --port. Run `specpilot serve --stop` or `specpilot serve --stop --port <n>`.');
105
+ return process.exit(1);
106
+ }
107
+ const port = options.port === undefined ? DEFAULT_PORT : Number(options.port);
108
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
109
+ logger.error(`Invalid --port "${options.port}". Use a whole number from 1 to 65535.`);
110
+ return process.exit(1);
111
+ }
112
+ return stopRunningServer(port, logger);
113
+ }
45
114
  const roots = [];
46
115
  if (!folders.length) {
47
116
  const root = (0, fs_1.realpathSync)(process.cwd()); // like a named folder, so "already served" compares like for like (BL-067)
@@ -78,8 +147,10 @@ async function serveCommand(folders, options) {
78
147
  logger.error(`Invalid --poll "${options.poll}". Use a whole number of milliseconds, ${MIN_POLL_MS} or more.`);
79
148
  return process.exit(1);
80
149
  }
150
+ // MCP is on unless --no-mcp (BL-105, D3); Commander leaves `mcp` undefined without either flag.
151
+ const mcp = options.mcp !== false;
81
152
  // Read here, never written anywhere: with it the IDE's config line survives restarts (BL-PM-007).
82
- const envToken = options.mcp ? process.env.SPECPILOT_MCP_TOKEN : undefined;
153
+ const envToken = mcp ? process.env.SPECPILOT_MCP_TOKEN : undefined;
83
154
  if (envToken !== undefined && !exports.MCP_TOKEN_PATTERN.test(envToken)) {
84
155
  logger.error('SPECPILOT_MCP_TOKEN must be at least 32 characters, with no spaces or other invisible characters. Set a longer one, or unset it to get a new token each run.');
85
156
  return process.exit(1);
@@ -110,7 +181,7 @@ async function serveCommand(folders, options) {
110
181
  }
111
182
  let handle;
112
183
  try {
113
- handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, registry, mcp: !!options.mcp, mcpToken: envToken, log: m => logger.warn(m) });
184
+ handle = await (0, specServer_1.startSpecServer)(roots, port, packageJson.version, { pollMs, readOnly: !!options.readOnly, named, registry, mcp, mcpToken: envToken, log: m => logger.warn(m), onQuit: () => stop() });
114
185
  }
115
186
  catch (err) {
116
187
  if (err.code === 'EADDRINUSE') {
@@ -140,7 +211,7 @@ async function serveCommand(folders, options) {
140
211
  console.log(chalk_1.default.gray(`Folders opened in the page are remembered in ${(0, specServer_1.displayRoot)(registry, home)}.`));
141
212
  if (registryNote)
142
213
  console.log(registryNote);
143
- if (options.mcp) {
214
+ if (mcp) {
144
215
  console.log(`MCP endpoint: ${url}/mcp${options.readOnly ? ' (read tools only)' : ''}`);
145
216
  console.log(`Add to your IDE's MCP settings: ${mcpConfigLine(`127.0.0.1:${port}`, envToken !== undefined ? '${SPECPILOT_MCP_TOKEN}' : handle.mcpToken)}`);
146
217
  }
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":";;;;;;AA6BA,sCAEC;AAkBD,oCAiIC;AAlLD,kDAA0B;AAC1B,iDAAsC;AACtC,2BAAwD;AACxD,+BAAqC;AACrC,oDAA+E;AAC/E,kDAAsE;AACtE,8DAA2G;AAC3G,4CAAyC;AAEzC,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAUlD,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC;AAC7B,mFAAmF;AACtE,QAAA,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,WAAW,GAAG,GAAG,CAAC;AAExB,4HAA4H;AAC/G,QAAA,iBAAiB,GAAG,oBAAoB,CAAC;AAEtD,mGAAmG;AACnG,SAAgB,aAAa,CAAC,IAAY,EAAE,KAAa;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,IAAI,MAAM,EAAE,OAAO,EAAE,EAAE,mBAAmB,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACrJ,CAAC;AAED,wFAAwF;AACxF,SAAS,WAAW,CAAC,GAAW,EAAE,MAAc;IAC9C,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GACf,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;QAC/C,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,O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AU,CAAC;IACzD,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,IAAI,GAAG,GAAG,EAAE;QAChB,IAAI,QAAQ;YAAE,OAAO;QACrB,QAAQ,GAAG,IAAI,CAAC;QAChB,IAAI,GAAmB,CAAC;QACxB,MAAM,MAAM,GAAG,IAAI,OAAO,CAAU,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,qBAAa,CAAC,CAAC,CAAC,CAAC;QAC5F,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;aAC7D,IAAI,CAAC,OAAO,CAAC,EAAE;YACd,YAAY,CAAC,GAAG,CAAC,CAAC;YAClB,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YACnE,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,CAAC,IAAI,CAAC,4CAA4C,qBAAa,GAAG,IAAI,0CAA0C,CAAC,CAAC;gBACxH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACzB,CAAC;YACD,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC,CAAC;aACD,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC,CAAC;IACF,KAAK,MAAM,MAAM,IAAI,OAAO;QAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC"}
@@ -6,4 +6,14 @@ export declare function agentFile(engine: TemplateEngine, context: TemplateConte
6
6
  path: string;
7
7
  content: string;
8
8
  } | null;
9
+ /** The two skill templates SpecPilot released, oldest first (REQ-002.H.40); `fillReleasedSkill()` fills them. */
10
+ export declare const KNOWN_SKILL_TEMPLATES: string[];
11
+ /** A released template filled the way that version did, `.replace` patterns such as `$&` included: the bytes it wrote. */
12
+ export declare function fillReleasedSkill(template: string, context: {
13
+ projectName: string;
14
+ language: string;
15
+ framework?: string;
16
+ }): string;
17
+ /** A value the skill can hold on one line: a non-blank string with no control character (REQ-002.H.40). */
18
+ export declare function skillValue(value: unknown): string | undefined;
9
19
  //# sourceMappingURL=agentConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agentConfig.d.ts","sourceRoot":"","sources":["../../src/core/agentConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAWnE,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpD;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAInI"}
1
+ {"version":3,"file":"agentConfig.d.ts","sourceRoot":"","sources":["../../src/core/agentConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAWnE,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAGpD;AAED,4DAA4D;AAC5D,wBAAgB,SAAS,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAInI;AA+FD,iHAAiH;AACjH,eAAO,MAAM,qBAAqB,UAAuB,CAAC;AAE1D,0HAA0H;AAC1H,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAMlI;AAED,2GAA2G;AAC3G,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAI7D"}