specpilot 2.16.0 → 2.18.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 (41) hide show
  1. package/README.md +10 -7
  2. package/dist/commands/serve.d.ts +4 -2
  3. package/dist/commands/serve.d.ts.map +1 -1
  4. package/dist/commands/serve.js +71 -19
  5. package/dist/commands/serve.js.map +1 -1
  6. package/dist/commands/validate.d.ts.map +1 -1
  7. package/dist/commands/validate.js +59 -74
  8. package/dist/commands/validate.js.map +1 -1
  9. package/dist/core/ideConfig.js +1 -1
  10. package/dist/core/ideConfig.js.map +1 -1
  11. package/dist/core/specFiles.js +14 -5
  12. package/dist/core/specFiles.js.map +1 -1
  13. package/dist/utils/mcpLocal.d.ts +2 -0
  14. package/dist/utils/mcpLocal.d.ts.map +1 -1
  15. package/dist/utils/mcpLocal.js +14 -6
  16. package/dist/utils/mcpLocal.js.map +1 -1
  17. package/dist/utils/specArchiver.d.ts +9 -2
  18. package/dist/utils/specArchiver.d.ts.map +1 -1
  19. package/dist/utils/specArchiver.js +21 -13
  20. package/dist/utils/specArchiver.js.map +1 -1
  21. package/dist/utils/specReader.d.ts +62 -4
  22. package/dist/utils/specReader.d.ts.map +1 -1
  23. package/dist/utils/specReader.js +75 -2
  24. package/dist/utils/specReader.js.map +1 -1
  25. package/dist/utils/specServer.d.ts +10 -1
  26. package/dist/utils/specServer.d.ts.map +1 -1
  27. package/dist/utils/specServer.js +111 -14
  28. package/dist/utils/specServer.js.map +1 -1
  29. package/dist/utils/specValidator.d.ts +28 -0
  30. package/dist/utils/specValidator.d.ts.map +1 -1
  31. package/dist/utils/specValidator.js +79 -1
  32. package/dist/utils/specValidator.js.map +1 -1
  33. package/dist/utils/taskMover.d.ts +99 -12
  34. package/dist/utils/taskMover.d.ts.map +1 -1
  35. package/dist/utils/taskMover.js +276 -35
  36. package/dist/utils/taskMover.js.map +1 -1
  37. package/package.json +1 -1
  38. package/ui/app.css +80 -10
  39. package/ui/app.js +377 -91
  40. package/ui/index.html +20 -11
  41. package/ui/route.js +3 -1
package/README.md CHANGED
@@ -78,7 +78,7 @@ This AI-assisted approach ensures comprehensive, high-quality specifications tai
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, the Setup view 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, plus the projects remembered in `~/.specpilot/projects.json` (every project you serve or open; reopened at startup when they have `.specs/`); in a folder without `.specs/` and with nothing remembered, with no project open until you open one from the page (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`  ·  `validate` → `v`  ·  `migrate` → `m`  ·  `list` → `ls`  ·  `refine` → `ref`  ·  `archive` → `ar`  ·  `add-specs` → `add`  ·  `backfill` → `bf`
@@ -118,7 +118,7 @@ specpilot validate --fix
118
118
 
119
119
  ## specpilot serve
120
120
 
121
- Serve a local web UI over a project's `.specs/`, where you can also move tasks between Backlog and Current Sprint, add new ones, bring SpecPilot's command files up to date, set up `.specs/` in a folder that has none yet, and open more projects. With no folders it serves the project you run it from (the folder that contains `.specs/`); name one or more folders to serve those instead, all from one server, or open them later from the page. Press Ctrl+C to stop.
121
+ Serve a local web UI over a project's `.specs/`, where you can also move tasks between Backlog, Current Sprint and Review, approve or send back what an agent finished, add new ones, bring SpecPilot's command files up to date, set up `.specs/` in a folder that has none yet, and open more projects. With no folders it serves the project you run it from (the folder that contains `.specs/`); name one or more folders to serve those instead, all from one server, or open them later from the page. Press Ctrl+C to stop.
122
122
 
123
123
  ```bash
124
124
  specpilot serve # this project, at http://127.0.0.1:4321
@@ -132,19 +132,22 @@ specpilot serve --stop # stop the server on port 4321 from another ter
132
132
  | ------------- | ------- | ---------------------------------------------------------------------------------------- |
133
133
  | `--port <n>` | `4321` | Port to listen on (127.0.0.1 only) |
134
134
  | `--poll <ms>` | `1000` | Change-detection interval in ms (minimum 250); polling runs only while a page is open |
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
+ | `--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 Add or Archive buttons and no write routes |
136
136
  | `--open` | | Open the UI in the default browser |
137
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
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 |
139
139
 
140
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
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`.
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.
142
+ - **Task moves**: drag a row, use `Alt+Up/Down` to reorder and `Alt+Left/Right` to move between Backlog, Current Sprint and Review (Backlog and Current Sprint either way; Current Sprint to Review and back), or open a card's menu (right-click, the `⋯` button on the card, or `Shift+F10`) and pick `Move to <lane>` (its end, or `<lane>, top`), `Move up` or `Move down`; the menu also has `Open details` and `Copy ID`. A move changes exactly one line of `.specs/planning/tasks.md` and nothing else, and offers Undo; Completed and Won't do 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.
143
+ - **Review lane**: `## Review` in `.specs/planning/tasks.md` holds finished work that you check before it counts as done; the lane's header reads `Review HITL` (human-in-the-loop). Your AI agent moves finished work from Current Sprint to Review, never straight to Completed (the generated instruction files and the MCP server say so). Open a Review card: `Approve` appends `Approved <date>` to the row and shows an `Approved` chip, and the panel says the next step (tell your agent to wrap it up; `Copy prompt` gives you the line); `Send back` opens a note box (`What needs fixing? (optional)`, up to 200 characters, `Cmd/Ctrl+Enter` sends, `Escape` cancels), appends `Sent back <date>: <note>` and moves the row to the top of Current Sprint, so the agent picks it up next; both offer Undo, and the panel lists earlier notes under `History`. A drag or `Alt+←` out of Review is a Send back without a note, so an approved row that comes back is no longer approved. The agent writes the Completed entry (number, CD ID, commit) by hand once a row is marked Approved; SpecPilot never writes it. `## Won't do`, when the file has it, is a read-only lane after Completed, folded to a strip until you open it. Off with `--read-only`.
144
+ - **Section headings**: when `.specs/planning/tasks.md` lacks `## Backlog`, `## Current Sprint`, `## Review` or `## Completed`, a warning above the lanes names the empty lane, what the file has instead and the fix (edit the file; best ask your AI IDE, so anything that refers to the section follows), with `Open tasks.md in VS Code` and `Copy prompt`; a `## ` heading the board does not know gets a note that its rows are not shown here; a known section that holds its tasks as plain lines or a list instead of a table gets a warning saying the lane shows none of them and how to turn them into a table. Warnings hide for the session into a one-line strip, notes until the headings change. `specpilot validate` warns on the missing ones and `--fix` renames an unambiguous variant.
143
145
  - **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.
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`.
146
+ - **New Task**: the `+ Add` button in the header of the Backlog or Current Sprint lane opens a small form for that lane: a description, with the ID the row will get shown above it. 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`.
147
+ - **Archive oldest Completed rows**: the Completed lane's header has an `Archive` button. It opens a dialog that says what the action does and lists the checks that apply, each with its state: the branch (as `specpilot archive` warns, archive on `main` or `master` after merging) and `## Completed`'s 40-line limit (the `specpilot validate` warning), with how many rows would move. A check that warns has a box to tick, and `Archive` is enabled once every box is ticked. It then does what `specpilot archive` does for that section: the oldest rows move, byte for byte, into a dated block at the end of `.specs/planning/tasks-archive.md`, the newest 20 stay, nothing else in either file changes, and the lane shows what is left. Within the limit you can still archive by ticking the limit check. `prompts.md` is left to `specpilot archive`. Protected like a task move; off with `--read-only`.
145
148
  - **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).
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.
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.
149
+ - **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` starts on the first project's Tasks view (the first folder you named, else the project you opened most recently); in a folder without `.specs/` and with nothing remembered it starts with no project open and shows Home (the terminal says `No .specs/ folder in <folder>`; the folder itself is not served, `specpilot serve .` names it). `--read-only` has no Home, so there a folder without `.specs/` still exits 1.
150
+ - **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 a project is served, and every project you serve or open is added to it). At startup, after the folders you name, the remembered projects that have `.specs/` are reopened, pinned and most recently opened first, up to 20 in all (the terminal says `Reopened <k> remembered projects from ~/.specpilot/projects.json.`); a folder without `.specs/` stays on the list to click, a missing one is skipped, and reopening never changes the file. 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
151
  - **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.
149
152
  - **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.
150
153
  - **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.
@@ -15,8 +15,10 @@ export declare const MCP_TOKEN_PATTERN: RegExp;
15
15
  export declare function mcpConfigLine(host: string, token: string): string;
16
16
  /**
17
17
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
18
- * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
19
- * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
18
+ * directory (BL-054) when it contains `.specs/`; without one the server starts with no project open
19
+ * (BL-080; `--read-only` still exits 1); a named folder without one is served for guided setup
20
+ * (BL-055). More folders can be opened from the page; every served folder is remembered in the registry (BL-067, BL-080),
21
+ * and the remembered projects with `.specs/` are reopened after the named ones (BL-114).
20
22
  */
21
23
  export declare function serveCommand(folders: string[], options: ServeOptions, command?: Command): Promise<void>;
22
24
  //# sourceMappingURL=serve.d.ts.map
@@ -1 +1 @@
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"}
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;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAyL7G"}
@@ -93,8 +93,10 @@ async function stopRunningServer(port, logger) {
93
93
  }
94
94
  /**
95
95
  * Runs until Ctrl+C; exits the process with 1 on any startup error. `folders` empty = the current
96
- * directory (BL-054), which must contain `.specs/`; a named folder without one is served for guided
97
- * setup (BL-055). More folders can be opened from the page and are remembered in the registry (BL-067).
96
+ * directory (BL-054) when it contains `.specs/`; without one the server starts with no project open
97
+ * (BL-080; `--read-only` still exits 1); a named folder without one is served for guided setup
98
+ * (BL-055). More folders can be opened from the page; every served folder is remembered in the registry (BL-067, BL-080),
99
+ * and the remembered projects with `.specs/` are reopened after the named ones (BL-114).
98
100
  */
99
101
  async function serveCommand(folders, options, command) {
100
102
  const logger = new logger_1.Logger();
@@ -112,13 +114,22 @@ async function serveCommand(folders, options, command) {
112
114
  return stopRunningServer(port, logger);
113
115
  }
114
116
  const roots = [];
117
+ // `named` per root (REQ-002.H.15): the Setup view is offered in folders the user named, never the current-directory default.
118
+ const named = [];
119
+ let noProject = null; // the current directory, looked at and not served (BL-080)
115
120
  if (!folders.length) {
116
121
  const root = (0, fs_1.realpathSync)(process.cwd()); // like a named folder, so "already served" compares like for like (BL-067)
117
- if (!(0, fs_1.existsSync)((0, path_1.join)(root, '.specs'))) {
122
+ if ((0, fs_1.existsSync)((0, path_1.join)(root, '.specs'))) {
123
+ roots.push(root);
124
+ named.push(false);
125
+ }
126
+ else if (options.readOnly) {
127
+ // A read-only page has no Home, no Open and no Setup view: nothing to show (REQ-002.H.44).
118
128
  logger.error('No .specs/ folder in this directory. Run `specpilot serve` from a project root, `specpilot init` first, or `specpilot serve .` to set one up in the browser.');
119
129
  return process.exit(1);
120
130
  }
121
- roots.push(root);
131
+ else
132
+ noProject = root;
122
133
  }
123
134
  for (const folder of folders) {
124
135
  let root;
@@ -133,10 +144,11 @@ async function serveCommand(folders, options, command) {
133
144
  logger.error(`Not a folder: ${folder}`);
134
145
  return process.exit(1);
135
146
  }
136
- if (!roots.includes(root))
137
- roots.push(root); // the same folder named twice is served once
147
+ if (roots.includes(root))
148
+ continue; // the same folder named twice is served once
149
+ roots.push(root);
150
+ named.push(true);
138
151
  }
139
- const named = roots.map(() => folders.length > 0);
140
152
  const port = options.port === undefined ? DEFAULT_PORT : Number(options.port);
141
153
  if (!Number.isInteger(port) || port < 1 || port > 65535) {
142
154
  logger.error(`Invalid --port "${options.port}". Use a whole number from 1 to 65535.`);
@@ -155,28 +167,62 @@ async function serveCommand(folders, options, command) {
155
167
  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.');
156
168
  return process.exit(1);
157
169
  }
158
- // What an interrupted setup left behind (marked staging folders only); a delete, so never with --read-only.
170
+ // What an interrupted setup left behind (marked staging folders only); a delete, so never with --read-only,
171
+ // and only in the folders named here, never in a reopened one (BL-114, SEC-004.29): `roots` holds only those yet.
159
172
  if (!options.readOnly) {
160
173
  for (const root of roots)
161
174
  for (const dir of (0, specSetup_1.removeStaleStaging)(root))
162
175
  console.log(`Removed ${dir}/, left by an interrupted setup.`);
163
176
  }
164
- // The registry (BL-067): the folders named here are recorded only when the file already exists, so
165
- // plain `specpilot serve` never creates one; a file that cannot be used is said so and left alone.
177
+ // The registry (BL-067): every served folder is recorded at startup, and the file is created when it
178
+ // is missing (BL-080, D5: it is the desktop app's project list); with nothing served nothing is
179
+ // written; a file that cannot be used is said so and left alone.
166
180
  const home = (0, projectRegistry_1.homeDir)();
167
181
  const registry = options.readOnly ? undefined : (0, projectRegistry_1.registryPath)(home);
168
182
  let registryNote = null;
183
+ // The remembered projects reopened after the named ones (BL-114, REQ-002.H.45): the lines they add, printed after the list.
184
+ let reopened = 0;
185
+ const reopenLines = [];
169
186
  if (registry) {
170
187
  const read = (0, projectRegistry_1.readRegistry)(registry);
171
188
  if (read.error !== null)
172
189
  registryNote = `${(0, specServer_1.displayRoot)(registry, home)} could not be read (${read.error}). It was left as it is; projects opened in this run are not remembered.`;
173
- else if (read.exists) {
174
- try {
175
- (0, projectRegistry_1.writeRegistry)(registry, roots.reduce((entries, root) => (0, projectRegistry_1.upsertEntry)(entries, root, new Date()), read.entries));
190
+ else {
191
+ if (roots.length) {
192
+ try {
193
+ (0, projectRegistry_1.writeRegistry)(registry, roots.reduce((entries, root) => (0, projectRegistry_1.upsertEntry)(entries, root, new Date()), read.entries));
194
+ }
195
+ catch (err) {
196
+ registryNote = `${(0, specServer_1.displayRoot)(registry, home)} could not be written (${err.message}). It was left as it is; projects opened in this run are not remembered.`;
197
+ }
176
198
  }
177
- catch (err) {
178
- registryNote = `${(0, specServer_1.displayRoot)(registry, home)} could not be written (${err.message}). It was left as it is; projects opened in this run are not remembered.`;
199
+ // Every entry in display order that passes the open route's path rule and has .specs/; the registry
200
+ // itself is not rewritten for these (lastOpened stays the user's). Past the cap nothing is read but
201
+ // what the path rule and the .specs/ check need.
202
+ let pastCap = 0;
203
+ for (const entry of (0, projectRegistry_1.sortEntries)(read.entries)) {
204
+ const check = (0, projectRegistry_1.checkOpenPath)(entry.path, roots, home);
205
+ if (!('root' in check) || (0, specSetup_1.specsMissing)(check.root))
206
+ continue;
207
+ if (roots.length >= projectRegistry_1.MAX_PROJECTS) {
208
+ pastCap++;
209
+ continue;
210
+ }
211
+ try {
212
+ (0, specServer_1.buildSpecsPayload)(check.root, packageJson.version); // the read addRoot() makes before serving a folder
213
+ }
214
+ catch (err) {
215
+ reopenLines.push(`Not reopened: ${check.root} (${err.message}).`);
216
+ continue;
217
+ }
218
+ roots.push(check.root);
219
+ named.push(true);
220
+ reopened++;
179
221
  }
222
+ if (reopened)
223
+ reopenLines.unshift(`Reopened ${reopened} remembered ${reopened === 1 ? 'project' : 'projects'} from ${(0, specServer_1.displayRoot)(registry, home)}.`);
224
+ if (pastCap)
225
+ reopenLines.push(`${pastCap} remembered ${pastCap === 1 ? 'project' : 'projects'} not reopened: this server already serves ${roots.length}.`);
180
226
  }
181
227
  }
182
228
  let handle;
@@ -193,22 +239,28 @@ async function serveCommand(folders, options, command) {
193
239
  return process.exit(1);
194
240
  }
195
241
  const url = `http://127.0.0.1:${port}`;
196
- if (roots.length === 1)
242
+ if (!roots.length)
243
+ console.log(chalk_1.default.green(`SpecPilot is running at ${url} with no project open.`));
244
+ else if (roots.length === 1)
197
245
  console.log(chalk_1.default.green(`SpecPilot is serving ${roots[0]} at ${url}`));
198
246
  else {
199
247
  console.log(chalk_1.default.green(`SpecPilot is serving ${roots.length} projects at ${url}`));
200
248
  roots.forEach((root, i) => console.log(` ${i} ${root}`));
201
249
  }
250
+ if (noProject !== null)
251
+ console.log(`No .specs/ folder in ${noProject}. Open a project from the page, or run specpilot serve <folder>.`);
202
252
  const empty = roots.filter(root => (0, specSetup_1.specsMissing)(root));
203
253
  for (const root of empty)
204
254
  console.log(options.readOnly ? `No .specs/ in ${root}.` : `No .specs/ in ${root} yet. Open the page to set it up.`);
255
+ for (const line of reopenLines)
256
+ console.log(line);
205
257
  console.log(chalk_1.default.gray(options.readOnly
206
258
  ? 'Read-only: nothing will be written. Open pages update when a spec file changes. Press Ctrl+C to stop.'
207
259
  : empty.length
208
- ? 'Tasks can be moved in the page (only .specs/planning/tasks.md and specpilot-* command files are written), and a folder without .specs/ can be set up there (new files only). Open pages update when a spec file changes. Press Ctrl+C to stop.'
209
- : 'Tasks can be moved in the page (only .specs/planning/tasks.md and specpilot-* command files are written). Open pages update when a spec file changes. Press Ctrl+C to stop.'));
260
+ ? 'Tasks can be moved in the page (only .specs/planning/tasks.md, .specs/planning/tasks-archive.md and specpilot-* command files are written), and a folder without .specs/ can be set up there (new files only). Open pages update when a spec file changes. Press Ctrl+C to stop.'
261
+ : 'Tasks can be moved in the page (only .specs/planning/tasks.md, .specs/planning/tasks-archive.md and specpilot-* command files are written). Open pages update when a spec file changes. Press Ctrl+C to stop.'));
210
262
  if (registry)
211
- console.log(chalk_1.default.gray(`Folders opened in the page are remembered in ${(0, specServer_1.displayRoot)(registry, home)}.`));
263
+ console.log(chalk_1.default.gray(`Projects are remembered in ${(0, specServer_1.displayRoot)(registry, home)}.`));
212
264
  if (registryNote)
213
265
  console.log(registryNote);
214
266
  if (mcp) {
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":";;;;;;AAiCA,sCAEC;AA2ED,oCAiJC;AA/PD,kDAA0B;AAC1B,iDAAsC;AAEtC,2BAAwD;AACxD,+BAA+B;AAC/B,6BAA8B;AAC9B,+BAAqC;AACrC,oDAA+E;AAC/E,kDAAsE;AACtE,8DAA2G;AAC3G,4CAAyC;AAEzC,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAWlD,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,mBAAm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IAAI,OAAO;QAAE,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAcD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,iBAsG7D"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAuBD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,iBAiF7D"}
@@ -19,8 +19,23 @@ function displayFixPrompts(results) {
19
19
  }
20
20
  console.log(chalk_1.default.dim('─'.repeat(60)));
21
21
  }
22
+ function fixLabel(fix) {
23
+ if (fix.startsWith('create-'))
24
+ return `Created missing file: ${fix.replace('create-', '')}`;
25
+ if (fix.startsWith(specValidator_1.RENAME_HEADING_PREFIX)) {
26
+ const [found, expected] = fix.slice(specValidator_1.RENAME_HEADING_PREFIX.length).split(':');
27
+ return `Renamed heading: ${found} → ${expected} in planning/tasks.md`;
28
+ }
29
+ return fix;
30
+ }
22
31
  async function validateCommand(options) {
23
32
  const logger = new logger_1.Logger();
33
+ const summaryOf = (r) => options.verbose ? {
34
+ filesChecked: r.filesChecked,
35
+ errors: r.errors.length,
36
+ warnings: r.warnings.length,
37
+ mandatesVerified: r.mandatesVerified
38
+ } : undefined;
24
39
  try {
25
40
  logger.info('🔍 Validating project specifications...');
26
41
  const validator = new specValidator_1.SpecValidator();
@@ -28,87 +43,57 @@ async function validateCommand(options) {
28
43
  fix: options.fix,
29
44
  verbose: options.verbose
30
45
  });
31
- if (results.isValid) {
32
- if (results.warnings.length > 0) {
33
- logger.displayValidationResults(true, [], results.warnings, options.verbose ? {
34
- filesChecked: results.filesChecked,
35
- errors: results.errors.length,
36
- warnings: results.warnings.length,
37
- mandatesVerified: results.mandatesVerified
38
- } : undefined);
46
+ // --fix runs on anything fixable, warnings included (BL-111), not only after a failed validation
47
+ if (options.fix && results.fixable.length > 0) {
48
+ // Capture pre-fix prompts (e.g. "fill in newly created security files")
49
+ const prefixPrompts = results.fixPrompts;
50
+ console.log(chalk_1.default.blue('\n🔧 Auto-fixing issues...'));
51
+ const fixed = await validator.autoFix(options.dir, results.fixable);
52
+ console.log(chalk_1.default.green(`✅ Fixed ${fixed.length} issue(s):`));
53
+ for (const fix of fixed) {
54
+ console.log(chalk_1.default.green(` • ${fixLabel(fix)}`));
39
55
  }
40
- else {
41
- logger.displayValidationResults(true, [], [], options.verbose ? {
42
- filesChecked: results.filesChecked,
43
- errors: results.errors.length,
44
- warnings: results.warnings.length,
45
- mandatesVerified: results.mandatesVerified
46
- } : undefined);
47
- }
48
- }
49
- else {
50
- if (options.fix && results.fixable.length > 0) {
51
- // Capture pre-fix prompts (e.g. "fill in newly created security files")
52
- const prefixPrompts = results.fixPrompts;
53
- console.log(chalk_1.default.blue('\n🔧 Auto-fixing issues...'));
54
- const fixed = await validator.autoFix(options.dir, results.fixable);
55
- console.log(chalk_1.default.green(`✅ Fixed ${fixed.length} issue(s):`));
56
- for (const fix of fixed) {
57
- const label = fix.startsWith('create-')
58
- ? `Created missing file: ${fix.replace('create-', '')}`
59
- : fix;
60
- console.log(chalk_1.default.green(` • ${label}`));
61
- }
62
- // Re-validate after fixing
63
- const reResults = await validator.validate(options.dir, {
64
- fix: false,
65
- verbose: options.verbose
66
- });
67
- logger.displayValidationResults(reResults.isValid, reResults.errors, reResults.warnings, options.verbose ? {
68
- filesChecked: reResults.filesChecked,
69
- errors: reResults.errors.length,
70
- warnings: reResults.warnings.length,
71
- mandatesVerified: reResults.mandatesVerified
72
- } : undefined);
73
- // Combine: re-validation prompts + any prompts from the files just created
74
- const allPrompts = [
75
- ...reResults.fixPrompts,
76
- ...prefixPrompts.filter(p => !reResults.fixPrompts.some(r => r.issue === p.issue))
77
- ];
78
- if (!reResults.isValid) {
79
- // Phase 2: structure is fixed — only content issues remain, show AI prompts
80
- if (allPrompts.length > 0) {
81
- console.log(chalk_1.default.cyan('\n📋 Next step — content guidance for your AI assistant:'));
82
- displayFixPrompts({ ...reResults, fixPrompts: allPrompts });
83
- }
84
- process.exit(1);
85
- }
86
- // Re-validation passed — still show fill-in prompts for newly created files
56
+ // Re-validate after fixing
57
+ const reResults = await validator.validate(options.dir, {
58
+ fix: false,
59
+ verbose: options.verbose
60
+ });
61
+ logger.displayValidationResults(reResults.isValid, reResults.errors, reResults.warnings, summaryOf(reResults));
62
+ // Combine: re-validation prompts + any prompts from the files just created
63
+ const allPrompts = [
64
+ ...reResults.fixPrompts,
65
+ ...prefixPrompts.filter(p => !reResults.fixPrompts.some(r => r.issue === p.issue))
66
+ ];
67
+ if (!reResults.isValid) {
68
+ // Phase 2: structure is fixed — only content issues remain, show AI prompts
87
69
  if (allPrompts.length > 0) {
88
- console.log(chalk_1.default.cyan('\n📋 Next step — fill in the newly created files:'));
70
+ console.log(chalk_1.default.cyan('\n📋 Next step — content guidance for your AI assistant:'));
89
71
  displayFixPrompts({ ...reResults, fixPrompts: allPrompts });
90
72
  }
91
- }
92
- else {
93
- logger.displayValidationResults(false, results.errors, results.warnings, options.verbose ? {
94
- filesChecked: results.filesChecked,
95
- errors: results.errors.length,
96
- warnings: results.warnings.length,
97
- mandatesVerified: results.mandatesVerified
98
- } : undefined);
99
- if (results.fixable.length > 0) {
100
- // Phase 1: missing files — direct to --fix, suppress AI prompts to avoid confusion
101
- console.log(chalk_1.default.yellow(`\n💡 ${results.fixable.length} issue(s) can be auto-fixed.`));
102
- console.log(chalk_1.default.yellow(` Run: specpilot validate --fix`));
103
- console.log(chalk_1.default.dim(` Once all files are created, re-run validate for content guidance.`));
104
- }
105
- else if (results.fixPrompts.length > 0) {
106
- // Phase 2: all files exist — only content issues remain, show AI prompts
107
- displayFixPrompts(results);
108
- }
109
73
  process.exit(1);
110
74
  }
75
+ // Re-validation passed — still show fill-in prompts for newly created files
76
+ if (allPrompts.length > 0) {
77
+ console.log(chalk_1.default.cyan('\n📋 Next step — fill in the newly created files:'));
78
+ displayFixPrompts({ ...reResults, fixPrompts: allPrompts });
79
+ }
80
+ return;
81
+ }
82
+ logger.displayValidationResults(results.isValid, results.errors, results.warnings, summaryOf(results));
83
+ if (results.fixable.length > 0) {
84
+ // Phase 1: fixable issues — direct to --fix, suppress AI prompts to avoid confusion
85
+ console.log(chalk_1.default.yellow(`\n💡 ${results.fixable.length} issue(s) can be auto-fixed.`));
86
+ console.log(chalk_1.default.yellow(` Run: specpilot validate --fix`));
87
+ if (results.fixable.some(f => f.startsWith('create-'))) {
88
+ console.log(chalk_1.default.dim(` Once all files are created, re-run validate for content guidance.`));
89
+ }
90
+ }
91
+ else if (results.fixPrompts.length > 0) {
92
+ // Phase 2: all files exist — only content issues remain, show AI prompts
93
+ displayFixPrompts(results);
111
94
  }
95
+ if (!results.isValid)
96
+ process.exit(1);
112
97
  }
113
98
  catch (error) {
114
99
  logger.displayError('Validation Failed', error instanceof Error ? error.message : 'Unknown error');
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":";;;;;AAsBA,0CAsGC;AA5HD,kDAA0B;AAC1B,0DAAyE;AACzE,4CAAyC;AAQzC,SAAS,iBAAiB,CAAC,OAAyB;IAClD,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CA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jG,CAAC;QACH,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzC,yEAAyE;YACzE,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,OAAO;YAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAExC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,YAAY,CAAC,mBAAmB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACnG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -210,7 +210,7 @@ function buildProcessMandatesMarkdown() {
210
210
  return `- **Spec-First:** Update \`.specs/\` before writing code.
211
211
  - **Log all AI interactions** in \`.specs/development/prompts.md\` with timestamps.
212
212
  - **Document decisions** in \`.specs/development/context.md\`.
213
- - **Tasks:** When the SpecPilot MCP tools are connected, use them to add and move tasks. Otherwise edit \`.specs/planning/tasks.md\` directly and keep its table format.`;
213
+ - **Tasks:** When the SpecPilot MCP tools are connected, use them to add and move tasks. Otherwise edit \`.specs/planning/tasks.md\` directly and keep its table format. Finished work goes from Current Sprint to Review, never straight to Completed; a Review row gets its Completed entry (number, CD ID, commit) only once it ends with \`Approved <date>\`.`;
214
214
  }
215
215
  function buildCodePhilosophyMarkdown() {
216
216
  return `## Code Philosophy — Write Only What Needed
@@ -1 +1 @@
1
- {"version":3,"file":"ideConfig.js","sourceRoot":"","sources":["../../src/core/ideConfig.ts"],"names":[],"mappings":";;;AA0DA,0CAGC;AAGD,0CAEC;AAUD,sCASC;AAGD,sCAiBC;AAGD,oDAEC;AAED,sCAiCG;AAEH,4DA+BG;AAEH,sEAeG;AAEH,4DAWG;AAEH,oEAKG;AAEH,kEAoBG;AAEH,8CA0DG;AAvSH,kG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,CAAC,CAAC,CAAC,CAAC;IAC9F,MAAM,WAAW,GACf,GAAG,KAAK,QAAQ;QACd,CAAC,CAAC,0FAA0F;QAC5F,CAAC,CAAC,4DAA4D,WAAW,8BAA8B,CAAC;IAE5G,uBAAuB;IACvB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;SAC5C,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;SAClD,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,aAAa,GAAG,aAAa;QACjC,CAAC,CAAC,UAAU,WAAW,6GAA6G,aAAa,IAAI;QACrJ,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;qCAC0B,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE;4BACtD,WAAW;;;;;IAKnC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BV,aAAa;EAChB,CAAC;AACD,CAAC"}
@@ -276,15 +276,24 @@ Task ID conventions
276
276
 
277
277
  ## Backlog
278
278
 
279
- [TODO]
279
+ | ID | Description |
280
+ |---|---|
280
281
 
281
282
  ## Current Sprint
282
283
 
283
- [TODO]
284
+ | ID | Description |
285
+ |---|---|
286
+
287
+ ## Review
288
+
289
+ | ID | Description |
290
+ |---|---|
284
291
 
285
292
  ## Completed
286
293
 
287
- 1. [CD-001] Initialise .specs directory ({{currentDate}})`;
294
+ | # | ID | Description |
295
+ |---|---|---|
296
+ | 1 | [CD-{{author}}-001] | Initialise .specs directory ({{currentDate}}) |`;
288
297
  const rendered = engine.renderFromString(content, context);
289
298
  return rendered;
290
299
  }
@@ -416,7 +425,7 @@ function onboardingMd(context) {
416
425
  - \`project/requirements.md\`: ## Functional/Non-Functional Requirements, REQ-XXX IDs
417
426
  - \`architecture/architecture.md\`: ## Overview, Components, Data Flow, Decisions (ADR)
418
427
  - \`architecture/api.yaml\`: endpoints with methods, paths, descriptions
419
- - \`planning/tasks.md\`: ## Backlog/In Progress/Completed with TASK-XXX IDs
428
+ - \`planning/tasks.md\`: keep the four headings exactly as written, \`## Backlog\`, \`## Current Sprint\`, \`## Review\`, \`## Completed\`; each holds a markdown table (\`| ID | Description |\`; \`| # | ID | Description |\` under Completed), one row per task; IDs BL-###, CS-###, CD-${context.author || '{{author}}'}-###. The SpecPilot Tasks board reads those tables and nothing else
420
429
  - \`planning/roadmap.md\`: ## Milestones with versions, dates, features, status
421
430
  - \`quality/tests.md\`: ## Test Strategy, Test Cases (TEST-XXX), Coverage Goals
422
431
  - \`development/context.md\`: ## Project Context, Key Decisions, Known Issues`;
@@ -486,7 +495,7 @@ ${conventions}
486
495
  - Maintains internal consistency (cross-references work)
487
496
  - Scales appropriately to project size (small = concise, large = comprehensive)
488
497
  3. Identify gaps: missing tests, undocumented APIs, unclear requirements, architectural debt
489
- 4. Propose actionable next steps in planning/tasks.md
498
+ 4. Propose actionable next steps as rows of the Backlog table in planning/tasks.md
490
499
 
491
500
  **Output Format:**
492
501
  For each file, provide the complete content in a fenced code block: