Compare commits

...
6 Commits
47 changed files with 1073 additions and 979 deletions

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ The web console is split by area: this file (the server, the CLI and the agent c
## Web Console
Optional local browser UI shipped with **every** skill. Source lives in `src/web-console/` and is fanned into each skill by an `additionalReferences: [{ source: 'web-console', target: 'web-console' }]` entry in `SOURCE_PROMPTS`, landing at `skills/<skill>/references/web-console/`. The bare `plan2code` skill is the hub: it opens the console as `--workflow dashboard`, the page draws the skill menu itself (from each `SKILLS` entry's `card` in `public/skills.js`, through `SKILL_CATALOG` in `public/answers.js`, kept in sync with the install set by a test), and a card click reaches the agent as a `{ "i": "__launch", "skill": ..., "workflow": ... }` send — the dashboard then **resumes its own session** under the launched skill's workflow (`open --resume <sid> --workflow <w>` restates `workflow`/`title`/`specDir` on the live server) and runs that skill's file. `plan2code-review` now has a console of its own AND still runs inside builds on the page (a `review` verdict on Implementation's sign-off card, the **Review it now** button on a finished quick task, or Finalize's Step 2.5 final review, offered on every run), so `plan2code-3-implement`, `plan2code-quick-task` and `plan2code-4-finalize` also carry `review.md`, the review references and `review-scope.mjs`, the same way `implement-review` does. `CONSOLE_WORKFLOWS` in `public/answers.js`, built from the same `SKILLS` list, decides whether a copied hand-off asks the next session for the console.
Optional local browser UI shipped with **every** skill. Source lives in `src/web-console/` and is fanned into each skill by an `additionalReferences: [{ source: 'web-console', target: 'web-console' }]` entry in `SOURCE_PROMPTS`, landing at `skills/<skill>/references/web-console/`. The bare `plan2code` skill is the hub: it opens the console as `--workflow dashboard`, the page draws the skill menu itself (from each `SKILLS` entry's `card` in `public/skills.js`, through `SKILL_CATALOG` in `public/answers.js`, kept in sync with the install set by a test), and a card click reaches the agent as a `{ "i": "__launch", "skill": ..., "workflow": ... }` send — the dashboard then **resumes its own session** under the launched skill's workflow (`open --resume <sid> --workflow <w>` restates `workflow`/`title`/`specDir` on the live server) and runs that skill's file. `plan2code-review` now has a console of its own AND still runs inside builds on the page (a `review` verdict on Implementation's sign-off card, the **Review it now** button on a finished quick task, Finalize's Step 2.5 final review, offered on every run, or Dead Code's Step 7.5 final review of its removals), so `plan2code-3-implement`, `plan2code-quick-task`, `plan2code-4-finalize` and `plan2code-dead-code` also carry `review.md`, the review references and `review-scope.mjs`, the same way `implement-review` does. `CONSOLE_WORKFLOWS` in `public/answers.js`, built from the same `SKILLS` list, decides whether a copied hand-off asks the next session for the console.
| File | Role |
|---|---|
+2 -2
View File
@@ -18,7 +18,7 @@ plan2code/
│ ├── shared-references/ # Reference files shared across skills
│ │ ├── building-habits.md # Find the cause, test first, pin behavior (quick-task, implement, implement-review, test)
│ │ ├── helper-strength.md # How strong a model and how much effort each helper gets (init, init-update, pathfinder, plan, revise-plan, document, quick-task, implement, implement-review, review, finalize, xray, diagnose, pr-prep, test)
│ │ └── test-runs.md # Choosing what tests to run: targeted per task and phase, full suite only where the plan puts it (document, implement, implement-review, quick-task, review, finalize, pr-prep, test)
│ │ └── test-runs.md # Choosing what tests to run: targeted per task and phase, full suite only where the plan puts it (document, implement, implement-review, quick-task, review, finalize, pr-prep, test, dead-code)
│ ├── plan2code-review-references/ # Reference files for review skill
│ │ ├── verification-protocol.md # Deep verification + confidence calibration
│ │ ├── dimensions.md # 11 dimensions with detailed checklists
@@ -145,7 +145,7 @@ plan2code/
| `plan2code-diagnose.md` | diagnose | Find a bug's cause under the find-the-cause-first habit (`references/building-habits.md`) and write it up as `specs/<bug-name>/DIAGNOSIS-<YYYYMMDD>.md` without fixing it, then offer Quick Task to fix it, or Plan when the fix is big. The dashboard scan reports such a folder as spec state `diagnosed` ("Bug diagnosed"), which lights Quick Task (suggested) and Plan. Once Quick Task marks the diagnosis `Fixed` (nothing past it in the folder) the state is `fixed` ("Bug fixed"): no pipeline card lights, the picker never pre-selects it, and Quick Task offers to archive it with `specs.mjs archive` |
| `plan2code-pr-prep.md` | pr-prep | Get a branch ready for review: pick the checks its changes need from the project's `## Test map` (or its config files), let the person trim the plan, run it, give Ready, Ready with notes or Not ready, and write a PR description to copy (following the repo's template) with the create-a-PR link; offers to save `PR-READINESS-<date>.md` into the branch's spec folder; never commits, pushes or opens the PR |
| `plan2code-test.md` | test | Write missing tests: ask where to look, find source files no test covers (matching, plus real coverage when the project already has a coverage tool, offered first), show a plan opening with how this project writes tests, then write and run unit and integration tests; escalates past 8 source files, 8 new test files or 2 runners to a PLAN-DRAFT for Plan, hands a real bug to Diagnose, never changes source code |
| `plan2code-dead-code.md` | dead-code | Find unused code and dead code: use the project's own dead-code tools, one per language that has files (Knip, vulture, cargo check and others), or search by itself, check every item for callers across the project (`references/caller-search.md`), label each Safe to remove, Check first or Warning, remove only what the person picks, then run the tests and build and put back anything that breaks them; never commits, never installs a tool. Scripts: `dead-code.mjs` (own), `test-map.mjs`, `glob.mjs`, `test-commands.mjs`, `run-check.mjs` |
| `plan2code-dead-code.md` | dead-code | Find unused code and dead code: use the project's own dead-code tools, one per language that has files (Knip, vulture, cargo check and others), or search by itself, check every item for callers across the project (`references/caller-search.md`), label each Safe to remove, Check first or Warning, remove only what the person picks, then run the tests and build and put back anything that breaks them, then offer a final review of the removals in the same session (Step 7.5, recommended yes; ships `review.md`, `review-in-build.md`, `test-runs.md` and the review references, as Finalize does); never commits, never installs a tool. Scripts: `dead-code.mjs` (own), `test-map.mjs`, `glob.mjs`, `test-commands.mjs`, `run-check.mjs`, `specs.mjs`, `commit-msg.mjs`, `review-scope.mjs` |
| `plan2code-changelog.md` | changelog | Check the CHANGELOG version against the default branch, suggest editable entries for new work, keep `package.json` aligned, offer to commit the result through Git |
| `plan2code-git.md` | git | Branches, pull (with conflict help), push, publish and commits (clear message, suggested splits) on the web console's git board, or plain instructions in the terminal (`switch to main`, `commit and push`); asks before every push, publish and delete |
@@ -14,9 +14,9 @@ Anything a workflow step decides with one correct answer (parsing a spec's check
| Script | Skills | Does |
|---|---|---|
| `specs.mjs` | plan, revise-plan, document, implement, implement-review, review, quick-task, finalize, handoff, diagnose | `list` / `status` (the dashboard state, Phase Checklist, groups, task markers, numbering, the implement selection verdict, consistency checks) / `check` / `check-draft` / `metrics` / `mark` / `tick` / `archive`. `list` imports `scanProject()` from the bundled `web-console/scan.mjs`, and `status` calls `deriveSpecState()` and `pickPhaseFiles()` from `web-console/spec-files.mjs`, the one rule the scan also uses, so the dashboard and the skills never disagree on a spec's state (a phase with only blocked tasks left stays `building`, and `finalizeReady` lights Finalize once each has a written reason). `mark` writes the phase file's Status line on every move (`--to in-progress` too). `check`'s format rules (no Status line, a checkbox under Notes, a task pointing at a line number, a bare `[!]`) warn, and fail only a spec whose overview.md carries `<!-- plan2code-format: 2 -->`. `archive` that has to copy removes the source only once every file name and size at the target matches (`PLAN2CODE_ARCHIVE_FAULT` is its test seam) |
| `commit-msg.mjs` | implement(-review), review, quick-task, finalize, init-update, git | The `<subject>` / `AI Assisted` commit command (two `-m` flags), with an optional `git add -- <files>` from `--files`. There is no add-everything option: `--add-all` was retired, and `scripts/test-script-git.mjs` fails if it returns anywhere in `src/` |
| `review-scope.mjs` | review, implement(-review), quick-task, finalize, pr-prep, test | Review Mode's git fallback: files, lines, doc share, base branch |
| `specs.mjs` | plan, revise-plan, document, implement, implement-review, review, quick-task, finalize, handoff, diagnose, dead-code | `list` / `status` (the dashboard state, Phase Checklist, groups, task markers, numbering, the implement selection verdict, consistency checks) / `check` / `check-draft` / `metrics` / `mark` / `tick` / `archive`. `list` imports `scanProject()` from the bundled `web-console/scan.mjs`, and `status` calls `deriveSpecState()` and `pickPhaseFiles()` from `web-console/spec-files.mjs`, the one rule the scan also uses, so the dashboard and the skills never disagree on a spec's state (a phase with only blocked tasks left stays `building`, and `finalizeReady` lights Finalize once each has a written reason). `mark` writes the phase file's Status line on every move (`--to in-progress` too). `check`'s format rules (no Status line, a checkbox under Notes, a task pointing at a line number, a bare `[!]`) warn, and fail only a spec whose overview.md carries `<!-- plan2code-format: 2 -->`. `archive` that has to copy removes the source only once every file name and size at the target matches (`PLAN2CODE_ARCHIVE_FAULT` is its test seam) |
| `commit-msg.mjs` | implement(-review), review, quick-task, finalize, init-update, git, dead-code | The `<subject>` / `AI Assisted` commit command (two `-m` flags), with an optional `git add -- <files>` from `--files`. There is no add-everything option: `--add-all` was retired, and `scripts/test-script-git.mjs` fails if it returns anywhere in `src/` |
| `review-scope.mjs` | review, implement(-review), quick-task, finalize, pr-prep, test, dead-code | Review Mode's git fallback: files, lines, doc share, base branch |
| `glob.mjs` | init, init-update, implement(-review), quick-task, finalize, pr-prep, test, dead-code | The glob subset (`**`, `*`, `?`, `{a,b}`) as a RegExp, and forward-slash path normalizing; imported by `test-map.mjs` and `test-match.mjs` |
| `test-map.mjs` | init, init-update, implement(-review), quick-task, finalize, pr-prep, test, dead-code | `read` / `write` the project test map (one `\| Area \| Paths \| Run \| Shared \|` table under `## Test map` in `AGENTS.md`, or behind one link to `.agents-docs/`); every line outside the table stays byte-identical |
| `test-match.mjs` | implement(-review), quick-task, finalize, pr-prep, test | `covers` (changed files to the map rows and tests that cover them, plus shared-ground hints), `gaps` (source files no test covers, ranked by recent change) and `nearest` (existing tests to read for style) |
+1 -1
View File
@@ -14,7 +14,7 @@
## Gotchas / Pitfalls
- **Version sync:** When adding a new version to `CHANGELOG.md`, run `node scripts/set-version.mjs <x.y.z>` (the one writer of every carrier; it never edits the changelog), which updates `version.json` and `package.json` (root) to match. `README.md` (the `Version X.Y.Z` line near the top) also carries the version, and `version.json`'s `releaseDate` moves with it. `version.json` is copied into every skill's `references/web-console/` (the console's Help shows it), so after a bump run `npm run build:skills` or `npm test` (`--verify-skills`) fails. The installer displays the version from `version.json` in its header. All three files (`CHANGELOG.md`, `version.json`, `package.json`) must always show the same version number. The desktop app carries it too (under `plan2code-app/`: `package.json`, `package-lock.json` with two lines, `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml`, `fake-agent/Cargo.toml`, and `Cargo.lock`'s `plan2code-app` and `fake-agent` entries): `node scripts/check-versions.mjs [--tag vX.Y.Z]` compares those, `version.json`, `package.json`, `CHANGELOG.md` and README's line (twelve places in all), `npm test` runs it first on this tree, and the release workflow runs it before building.
- **Version sync:** When adding a new version to `CHANGELOG.md`, run `npm run set-version -- <x.y.z>` (`node scripts/set-version.mjs`; with no version on a terminal it shows the current one and asks, Enter taking the next patch; the one writer of every carrier; it never edits the changelog), which updates `version.json` and `package.json` (root) to match. `README.md` (the `Version X.Y.Z` line near the top) also carries the version, and `version.json`'s `releaseDate` moves with it. `version.json` is copied into every skill's `references/web-console/` (the console's Help shows it), so after a bump run `npm run build:skills` or `npm test` (`--verify-skills`) fails. The installer displays the version from `version.json` in its header. All three files (`CHANGELOG.md`, `version.json`, `package.json`) must always show the same version number. The desktop app carries it too (under `plan2code-app/`: `package.json`, `package-lock.json` with two lines, `src-tauri/tauri.conf.json`, `src-tauri/Cargo.toml`, `fake-agent/Cargo.toml`, and `Cargo.lock`'s `plan2code-app` and `fake-agent` entries): `node scripts/check-versions.mjs [--tag vX.Y.Z]` compares those, `version.json`, `package.json`, `CHANGELOG.md` and README's line (twelve places in all), `npm test` runs it first on this tree, and the release workflow runs it before building.
- **CHANGELOG ordering:** Entries in `CHANGELOG.md` must be in reverse-chronological order — newest version at the top, oldest at the bottom. New entries are always inserted immediately after the file header.
- **CHANGELOG house format is not Keep a Changelog:** version headings are `## vX.Y.Z` — with a `v` prefix and **no date**. The release date is recorded only in `version.json`'s `releaseDate`. Category headings carry emoji: `### ✨ Added`, `### 🔧 Changed`, `### 🐛 Fixed`, `### 💥 Breaking`, `### 🗑️ Removed`, `### 📚 Documentation`. Older entries contain one-off variants (`🎁 Added`, `📦 Updated`, `📝 Documentation`, `🏎️ Improved`, `🧪 Testing`) — do not introduce new ones. The `.claude/skills/plan2code-changelog/` skill automates version selection and formatting; use it rather than hand-rolling an entry.
- **PowerShell mangles the CHANGELOG emoji:** `Get-Content` / `Select-String` render the `###` heading emoji as `?` under the default Windows console encoding, so a heading audit done that way reports garbage. Read `CHANGELOG.md` with a file-read or grep tool instead.
+1 -1
View File
@@ -1 +1 @@
U0VOQwGPpUJ2xM0JBF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jlFiJbqi2lskx/PfRi/9PbLQu1PPj/5uJc6WIfXOfSYR/tLwhU/qbSFpmrosvh3sYV5ApWC7rRCamgs8bv5X5gfNUOu8HheArSPfjklEU66rSfG4+la2iXauBUBgDO1VlYVTmGL5fqG6ytAtyMw6IVPJqgkgpJKoJB0eq8lxS3nIFO0LRp1/BTNVlCH7trZQv0wxwJKUk0Udqs3aIdE/lhJvWrK1L7bdRhieqGEn8QhnqxG3NErDuMFy20uo42KX506SlvMag6qxZX54rjbThAtuO8iDbcGy9Line truncated
+1
View File
@@ -25,3 +25,4 @@ prototypes/
plan2code-app/target/
plan2code-app/src-tauri/gen/
plan2code-app/ui/vendor/
.plan2code-dead-code/reports/
+1
View File
@@ -10,6 +10,7 @@ Each session stays short, and the specs on disk carry everything from one sessio
## Before you start
- **Node.js 18 or newer.** Check with `node --version`. No Node? Get it from [nodejs.org](https://nodejs.org/) (the LTS download), or run `winget install OpenJS.NodeJS.LTS` on Windows, `brew install node` on macOS, or use `nvm` on Linux. Then open a new terminal.
- **Git.** Check with `git --version`. The installer is fetched from GitHub with Git, and without it npm stops with `spawn git ENOENT`. No Git? Get it from [git-scm.com](https://git-scm.com/downloads), or run `winget install Git.Git` on Windows, `brew install git` on macOS, or use your package manager on Linux. Then open a new terminal.
- **Start from your project.** Open your terminal in the project you want to work on (`cd` into it) before you run anything. Plan2Code works on the folder you start it in.
- **Ways in.** `plan2code` (Claude Code, Devin or Codex), or type `/plan2code` in your agent (`$plan2code` in Codex).
- **No agent yet?** Install Claude Code, Codex or Devin first, or let the `plan2code` command's setup page walk you through it.
+6
View File
@@ -2,6 +2,12 @@
All notable changes to Plan2Code will be documented in this file.
## v3.0.6
### 🔧 Changed
- **tooling**: `npm run set-version` runs `scripts/set-version.mjs`, and with no version on a terminal it shows the current one and asks for the new one, Enter taking the next patch; a script or a pipe still gets the usage line and exits 2.
## v3.0.5
### 🔧 Changed
+1
View File
@@ -3,6 +3,7 @@
## Before you start
- **Node.js 18 or newer.** Check with `node --version`. No Node? Get it from [nodejs.org](https://nodejs.org/) (the LTS download), or run `winget install OpenJS.NodeJS.LTS` on Windows, `brew install node` on macOS, or use `nvm` on Linux. Then open a new terminal.
- **Git.** Check with `git --version`. The installer is fetched from GitHub with Git, and without it npm stops with `spawn git ENOENT`. No Git? Get it from [git-scm.com](https://git-scm.com/downloads), or run `winget install Git.Git` on Windows, `brew install git` on macOS, or use your package manager on Linux. Then open a new terminal.
- **Start from your project.** Open your terminal in the project you want to work on (`cd` into it) before you run anything. Plan2Code works on the folder you start it in.
- **Ways in.** `plan2code` (Claude Code, Devin or Codex), or type `/plan2code` in your agent (`$plan2code` in Codex).
- **No agent yet?** Install Claude Code, Codex or Devin first, or let the `plan2code` command's setup page walk you through it.
+2 -1
View File
@@ -13,7 +13,7 @@ the next engineer all start from the same specs.
One command opens it, every step is a card, and the terminal is always there if you prefer it.
Version 3.0.5 · MIT · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
Version 3.0.6 · MIT · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
---
@@ -33,6 +33,7 @@ The dashboard, in a project halfway through a build. It suggests the next step f
### Before you start
- **Node.js 18 or newer.** Check with `node --version`. No Node? Get it from [nodejs.org](https://nodejs.org/) (the LTS download), or run `winget install OpenJS.NodeJS.LTS` on Windows, `brew install node` on macOS, or use `nvm` on Linux. Then open a new terminal.
- **Git.** Check with `git --version`. The installer is fetched from GitHub with Git, and without it npm stops with `spawn git ENOENT`. No Git? Get it from [git-scm.com](https://git-scm.com/downloads), or run `winget install Git.Git` on Windows, `brew install git` on macOS, or use your package manager on Linux. Then open a new terminal.
- **Start from your project.** Open your terminal in the project you want to work on (`cd` into it) before you run anything. Plan2Code works on the folder you start it in.
- **Ways in.** `plan2code` (Claude Code, Devin or Codex), or type `/plan2code` in your agent (`$plan2code` in Codex).
- **No agent yet?** Install Claude Code, Codex or Devin first, or let the `plan2code` command's setup page walk you through it.
+792 -924
View File
File diff suppressed because it is too large. Load diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

+9 -2
View File
@@ -397,11 +397,18 @@ const SOURCE_PROMPTS = [
// Shown to the agent in place of the generic header text: when the skill fits and its command.
skillDescription: "Use when you want unused code paths and dead code in your project found, labeled by how safe each is to remove, and removed only where you pick. Run it as /plan2code-dead-code.",
isUtility: true,
scripts: ['test-map.mjs', 'glob.mjs', 'test-commands.mjs', 'run-check.mjs'],
// review.md rides along for Step 7.5's final review of the removals, which
// runs in the same session, as Finalize's Step 2.5 does, with the scripts
// review.md names.
scripts: ['test-map.mjs', 'glob.mjs', 'test-commands.mjs', 'run-check.mjs', 'specs.mjs', 'commit-msg.mjs', 'review-scope.mjs'],
additionalReferences: [
{ source: 'web-console', target: 'web-console' },
{ source: 'plan2code-dead-code-references/caller-search.md', target: 'caller-search.md' },
{ source: 'shared-references/helper-strength.md', target: 'helper-strength.md' }
{ source: 'shared-references/helper-strength.md', target: 'helper-strength.md' },
{ source: 'shared-references/test-runs.md', target: 'test-runs.md' },
{ source: 'shared-references/review-in-build.md', target: 'review-in-build.md' },
{ source: 'plan2code-review.md', target: 'review.md' },
{ source: 'plan2code-review-references' }
]
},
{
+2 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code",
"version": "3.0.5",
"version": "3.0.6",
"private": true,
"bin": {
"plan2code-install": "./install.js"
@@ -9,6 +9,7 @@
"prepare": "husky",
"build:skills": "node install.js --build-skills",
"fix:eol": "node scripts/fix-line-endings.mjs",
"set-version": "node scripts/set-version.mjs",
"play": "node scripts/play.mjs",
"pretest": "node scripts/fix-line-endings.mjs",
"test:fast": "node scripts/test-fast.mjs",
+2 -2
View File
@@ -757,7 +757,7 @@ dependencies = [
[[package]]
name = "fake-agent"
version = "3.0.5"
version = "3.0.6"
dependencies = [
"serde_json",
"terminal_size",
@@ -2371,7 +2371,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]]
name = "plan2code-app"
version = "3.0.5"
version = "3.0.6"
dependencies = [
"chrono",
"libc",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "fake-agent"
version = "3.0.5"
version = "3.0.6"
description = "A stand-in agent program for the Plan2Code app's tests"
edition = "2021"
publish = false
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "plan2code-app",
"version": "3.0.5",
"version": "3.0.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "plan2code-app",
"version": "3.0.5",
"version": "3.0.6",
"dependencies": {
"@tauri-apps/api": "2.12.4",
"@xterm/addon-fit": "0.11.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code-app",
"version": "3.0.5",
"version": "3.0.6",
"private": true,
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "plan2code-app"
version = "3.0.5"
version = "3.0.6"
description = "Plan2Code desktop app"
edition = "2021"
publish = false
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Plan2Code",
"version": "3.0.5",
"version": "3.0.6",
"identifier": "com.plan2code.desktop",
"build": {
"frontendDist": "../ui",
+28 -3
View File
@@ -13,7 +13,7 @@
// The shots use the console's Ocean highlight rather than its default orange:
// it is the console's nearest to the Plan2Code blue the site and README use.
//
// Shots: dashboard, dashboard-utilities, question, doc, build, signoff, finish, ask, git.
// Shots: dashboard, dashboard-plan, dashboard-utilities, question, doc, build, signoff, finish, ask, git.
// --compare adds workspace, stop, delete, help, prefs and cleanup: screens the
// docs never show, for checking a change by eye against a "before" set. Its
// --out must be outside docs/screenshots/, so the set is never published.
@@ -64,6 +64,15 @@ const SHOTS = {
scrollTo: ".dash-toggle",
mustShow: ".dash-card:has(.pill.suggested)",
},
// The same dashboard in a project with no specs yet, where Plan is the
// suggested card: the landing page's first step, before the questions.
"dashboard-plan": {
workflow: "dashboard",
posts: ["dashboard-plan"],
fresh: true,
scrollTo: ".dash-toggle",
mustShow: ".dash-card:has(.pill.suggested)",
},
// The utility cards sit even lower: scroll until the Git card is the
// last row in frame ("cmd:" picks a card by its command).
"dashboard-utilities": {
@@ -285,6 +294,15 @@ function makeSampleProject() {
return project;
}
// The dashboard-plan shot's project: the same name and AGENTS.md, nothing
// planned yet. It sits in its own folder so both can be called task-api.
function makeFreshProject() {
const project = path.join(SCRATCH, "fresh", "task-api");
fs.mkdirSync(project, { recursive: true });
fs.copyFileSync(path.join(SCRATCH, "task-api", "AGENTS.md"), path.join(project, "AGENTS.md"));
return project;
}
// The Workspace shot's second folder, beside the sample project.
function makeExtraFolder() {
const dir = path.join(SCRATCH, "task-web");
@@ -517,10 +535,17 @@ async function captureAsk(browser, project, sid, url, question) {
if (send) send.click();
});
// `chat` hands over only the message's seq (its text goes in `reply`) and
// moves its cursor past it, so the first seq seen is the one; the entry
// itself, with its conversation, is read from the session's chat log.
let entry = null;
for (let i = 0; i < 40 && !entry; i++) {
const r = cli(project, "chat", "--session", sid);
if (r.code === 0 && r.out && r.out.chat) entry = r.out.chat.find((c) => c.kind === "message");
const seq = r.code === 0 && r.out && Array.isArray(r.out.chat) ? r.out.chat[0] : undefined;
if (Number.isInteger(seq)) {
const log = path.join(HOME, "sessions", sid, "chat.ndjson");
entry = fs.readFileSync(log, "utf8").split("\n").filter(Boolean).map((l) => JSON.parse(l)).find((e) => e.seq === seq) || null;
}
if (!entry) await sleep(250);
}
if (!entry) throw new Error("the Ask question never reached the console");
@@ -580,7 +605,7 @@ async function main() {
args: ["--no-first-run", "--no-default-browser-check", "--mute-audio"],
});
for (const name of names) {
const where = table[name].repo ? makeGitProject() : project;
const where = table[name].repo ? makeGitProject() : table[name].fresh ? makeFreshProject() : project;
const { sid, url } = stage(where, table[name]);
try {
if (table[name].ask) await captureAsk(browser, where, sid, url, table[name].ask);
+1
View File
@@ -8,6 +8,7 @@ and dark WebP images in `docs/screenshots/`.
| File | Stages |
| --- | --- |
| `dashboard.json` | The dashboard menu, suggesting the next build phase |
| `dashboard-plan.json` | The dashboard in a project with no specs yet, suggesting Plan (the script builds that project) |
| `question.json` | A Plan session with three questions open (also the base of the Ask shot) |
| `doc.json` | A living document with settled, assumed and draft sections, and its review card |
| `build.json` | A phase being built: the progress bar, the task list and the current task |
+9
View File
@@ -0,0 +1,9 @@
{
"menu": {
"note": "Nothing is planned in task-api yet. Plan is the place to start.",
"recommend": "plan2code-1-plan"
},
"agent": {
"status": "waiting"
}
}
+62 -5
View File
@@ -5,8 +5,11 @@
// entries). It never touches CHANGELOG.md: write its heading by hand, then run this.
// `check-versions.mjs` is the reader of the same places and stays the judge.
//
// node scripts/set-version.mjs <x.y.z> [--date YYYY-MM-DD] [--root <dir>]
// node scripts/set-version.mjs [x.y.z] [--date YYYY-MM-DD] [--root <dir>]
// npm run set-version [-- x.y.z]
//
// With no version on a terminal it shows the current one and asks (Enter takes the next patch);
// with no version and no terminal (a script, a pipe) it prints the usage line and exits 2.
// The release date defaults to today (local time). Every carrier is read and checked before any is
// written, so a file that has no version leaves the tree as it was. Exit 0 when written, 1 when a
// carrier could not be edited, 2 for bad arguments.
@@ -111,6 +114,47 @@ export function setVersion(root, version, date = today()) {
export const CARRIER_FILES = CARRIERS.map((c) => c.file);
// The next patch after `current` (x.y.z), or "" when `current` is not one.
export function nextPatch(current) {
if (!SEMVER.test(current || "")) return "";
const [major, minor, patch] = current.split(".").map(Number);
return `${major}.${minor}.${patch + 1}`;
}
// Ask on the terminal until a valid x.y.z is typed. Enter takes the suggested next patch.
// Returns "" when the input ends (Ctrl+D, Ctrl+C) without one.
async function askVersion(root) {
let current = "";
try {
current = JSON.parse(fs.readFileSync(path.join(root, "version.json"), "utf8")).version || "";
} catch {
// No readable version.json: ask without a current version or a suggestion.
}
const suggested = nextPatch(current);
const { createInterface } = await import("node:readline");
const rl = createInterface({ input: process.stdin, terminal: false });
// The line iterator buffers what is typed and ends on Ctrl+D or Ctrl+C, where a pending
// rl.question() would never settle and leave the process to exit on an unsettled await.
const lines = rl[Symbol.asyncIterator]();
rl.on("SIGINT", () => rl.close());
try {
if (current) console.log(`Current version: ${current}`);
for (;;) {
process.stdout.write(`New version (x.y.z)${suggested ? ` [${suggested}]` : ""}: `);
const { value, done } = await lines.next();
if (done) {
process.stdout.write("\n");
return "";
}
const picked = value.trim() || suggested;
if (SEMVER.test(picked)) return picked;
console.log(picked ? `"${picked}" is not x.y.z, for example 3.1.0.` : "Type a version, for example 3.1.0.");
}
} finally {
rl.close();
}
}
if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
const args = process.argv.slice(2);
const take = (flag) => {
@@ -121,13 +165,26 @@ if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.me
};
const date = take("--date");
const rootArg = take("--root");
const [version, ...extra] = args;
const usage = "Usage: node scripts/set-version.mjs <x.y.z> [--date YYYY-MM-DD] [--root <dir>]";
if (!version || extra.length || !SEMVER.test(version) || (date !== undefined && !validDate(date)) || rootArg === "") {
let [version, ...extra] = args;
const usage = "Usage: node scripts/set-version.mjs [x.y.z] [--date YYYY-MM-DD] [--root <dir>] (npm run set-version)";
const root = rootArg ? path.resolve(rootArg) : ROOT;
if (extra.length || (version !== undefined && !SEMVER.test(version)) || (date !== undefined && !validDate(date)) || rootArg === "") {
console.error(usage);
process.exit(2);
}
const { ok, written, problems } = setVersion(rootArg ? path.resolve(rootArg) : ROOT, version, date);
// No version given: ask for one on a terminal; a script or a pipe gets the usage line instead.
if (version === undefined) {
if (!process.stdin.isTTY) {
console.error(usage);
process.exit(2);
}
version = await askVersion(root);
if (!version) {
console.error("No version given. Nothing was written.");
process.exit(2);
}
}
const { ok, written, problems } = setVersion(root, version, date);
if (!ok) {
for (const problem of problems) console.error(`CANNOT SET: ${problem}`);
console.error("Nothing was written.");
+1 -1
View File
@@ -29,7 +29,7 @@ export const BUDGETS = {
// Each topic file under notes/, read when its workflow starts.
notes: {
"changelog.md": 1400,
"dead-code.md": 4250,
"dead-code.md": 4900,
"diagnose.md": 2700,
"document.md": 400,
"finalize.md": 2000,
+2 -1
View File
@@ -31,7 +31,8 @@ function blockOf(file) {
for (const file of DOCS) {
test(`${file} tells a newcomer how to get started`, () => {
const block = blockOf(file);
for (const needle of ['Node.js 18', 'node --version', 'nodejs.org', '/plan2code', '$plan2code']) {
// Git is a prerequisite too: npm fetches the installer with it (git+https).
for (const needle of ['Node.js 18', 'node --version', 'nodejs.org', 'git --version', 'git-scm.com', '/plan2code', '$plan2code']) {
assert.ok(block.includes(needle), `${file} is missing "${needle}" in its "Before you start" block`);
}
assert.match(block, /project you want to (work on|work in)/, `${file} does not say to start from your project`);
+16
View File
@@ -1225,3 +1225,19 @@ test("run: each tail line is capped at 400 characters", () => {
assert.equal(r.json.tail.length, 1);
assert.equal(r.json.tail[0].length, 400);
});
/* ---------------------------------------------------- the final review */
test("the built skill ships the Review files its Step 7.5 final review reads", () => {
const refs = path.join(SKILLS, "plan2code-dead-code", "references");
for (const file of ["review.md", "review-in-build.md", "test-runs.md", "reviewer-brief.md", "verification-protocol.md", "dimensions.md", "false-positives.md", "session-end.md"]) {
assert.ok(fs.existsSync(path.join(refs, file)), `references/${file} is missing from plan2code-dead-code`);
}
// review.md runs these from <S>.
for (const script of ["specs.mjs", "commit-msg.mjs", "review-scope.mjs"]) {
assert.ok(fs.existsSync(path.join(SKILLS, "plan2code-dead-code", "scripts", script)), `scripts/${script} is missing from plan2code-dead-code`);
}
const skill = fs.readFileSync(path.join(SKILLS, "plan2code-dead-code", "SKILL.md"), "utf8");
assert.match(skill, /### Step 7\.5: Final review/);
for (const ref of ["references/review.md", "references/review-in-build.md"]) assert.ok(skill.includes(ref), `SKILL.md names ${ref}`);
});
+19 -2
View File
@@ -12,7 +12,7 @@ import path from "node:path";
import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import { checkVersions } from "./check-versions.mjs";
import { CARRIER_FILES } from "./set-version.mjs";
import { CARRIER_FILES, nextPatch } from "./set-version.mjs";
const here = path.dirname(fileURLToPath(import.meta.url));
const ROOT = path.resolve(here, "..");
@@ -124,12 +124,29 @@ test("a carrier with no version in it fails and writes nothing", () => {
test("bad arguments exit 2 and write nothing", () => {
const dir = scratch();
// Compared with the file as copied, not with a number: the repo may already be at 3.0.1.
const before = read(dir, "version.json");
for (const args of [[], ["3.0"], ["v3.0.1"], ["3.0.1-beta"], ["3.0.1", "extra"], ["3.0.1", "--date", "yesterday"], ["3.0.1", "--root"]]) {
const r = run(...args, ...(args.includes("--root") ? [] : ["--root", dir]));
assert.equal(r.status, 2, `${args.join(" ")}: ${r.stderr}`);
assert.match(r.stderr, /Usage: node scripts\/set-version\.mjs/);
}
assert.ok(!read(dir, "version.json").includes("3.0.1"));
assert.equal(read(dir, "version.json"), before);
});
test("no version and no terminal prints the usage line instead of asking", () => {
// run() pipes stdin, so this is the script-or-pipe case: no prompt, exit 2, nothing written.
const dir = scratch();
const r = run("--root", dir);
assert.equal(r.status, 2, r.stderr);
assert.match(r.stderr, /npm run set-version/);
});
test("the prompt suggests the next patch", () => {
assert.equal(nextPatch("3.0.9"), "3.0.10");
assert.equal(nextPatch("2.10.0"), "2.10.1");
assert.equal(nextPatch("v3.0.1"), "");
assert.equal(nextPatch(undefined), "");
});
test("an impossible date is refused", () => {
+2 -1
View File
@@ -47,7 +47,7 @@ test("Document writes Targeted, Quick checks and Full suite lines and reads test
assert.match(doc, /no Full Suite row: ask/);
});
test("test-runs.md ships in the eight skills that run, write or offer tests, and in no other", () => {
test("test-runs.md ships in the nine skills that run, write or offer tests, and in no other", () => {
// npm test has just built skills/; a direct run builds it so the check never reads a stale tree.
if (process.env.npm_lifecycle_event !== "test") {
execFileSync(process.execPath, [path.join(ROOT, "install.js"), "--build-skills"], { stdio: "ignore" });
@@ -59,6 +59,7 @@ test("test-runs.md ships in the eight skills that run, write or offer tests, and
"plan2code-3-implement",
"plan2code-3-implement-review",
"plan2code-4-finalize",
"plan2code-dead-code",
"plan2code-pr-prep",
"plan2code-quick-task",
"plan2code-review",
+1 -1
View File
@@ -43,7 +43,7 @@ test("settle: true records the send wait handed over, never a later one still un
assert.equal((await s.send("/submit", EXPORT_A)).status, 200);
assert.equal(waitFor(s).status, 0);
assert.deepEqual(readState(s.session).collected.ids, ["q1"], "collecting records which cards the send carried");
postPatch(s, { items: [choice("q2")] });
postPatch(s, { settle: true, items: [choice("q2")] });
assert.equal((await s.send("/submit", { actions: [{ i: "q2", type: "answer", kind: "choice", k: "B" }], reply: "Question q2: B" })).status, 200);
postPatch(s, { settle: true });
const items = readState(s.session).items;
+25
View File
@@ -1380,6 +1380,31 @@ test("rejects more than three open required questions", () => {
assert.match(res.stderr, /open at once/);
});
// The Dead Code run left the first two questions open after they were
// answered, because the next post never settled them, and the page landed on
// the old card. A post that asks something new now has to deal with them.
test("refuses a new question while the cards just collected stay open and unsettled", () => {
const sent = { at: "2026-11-10T10:00:00.000Z", kind: "choice", k: "A" };
const base = {
collected: { at: sent.at, ids: ["q1"] },
items: [{ id: "q1", kind: "choice", title: "Where to look", body: "b", status: "open", required: true, options: [], thread: [], submitted: sent }],
};
const ask = { id: "q2", kind: "text", title: "What next", body: "b" };
assert.throws(() => applyPatch(base, { items: [ask] }), /item "q1" settle: .*settle/);
const settled = applyPatch(base, { settle: true, items: [ask] });
assert.equal(settled.items.find((i) => i.id === "q1").status, "answered", "settle: true closes the card just answered");
assert.doesNotThrow(() => applyPatch(base, { settle: ["q1"], items: [ask] }));
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "q1", stands: true }, ask] }), "stands keeps a card open on purpose");
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "q1", _delete: true }, ask] }), "a deleted card is dealt with");
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "q1", body: "reworded" }, ask] }), "a reworded card is a new question");
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "q1", status: "reopened", body: "asked again" }, ask] }), "a reopened card is asked again");
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "q1", answer: { k: "A" } }, ask] }), "the agent's own answer settles the card");
assert.doesNotThrow(() => applyPatch({ ...base, collected: { at: sent.at, ids: ["q9"] } }, { items: [ask] }), "an id that is no longer on the page holds nothing up");
assert.doesNotThrow(() => applyPatch(base, { items: [{ ...ask, required: false }] }), "an optional card asks nothing new");
assert.doesNotThrow(() => applyPatch(base, { items: [{ id: "n1", kind: "notice", title: "Heads up", body: "b" }] }), "a notice asks nothing");
assert.doesNotThrow(() => applyPatch(base, { finish: { headline: "Done", body: "b" }, items: [ask] }), "a finish is not held to it");
});
test("rejects internal vocabulary in a title", () => {
const p = { items: [{ id: "j1", kind: "text", title: "Frontier grill posture", body: "b", required: false }] };
const res = cli(["post", "--session", sid, "--file", payload("jargon.json", p)], { expectFail: true });
+21 -4
View File
@@ -4,7 +4,7 @@ Start all DEAD CODE MODE responses with '💀 [DEAD CODE]'
## Role
Finds unused code paths and dead code in the person's own project. Shows each finding with its evidence and a label that says how safe it is to remove, removes only the findings the person picks, then runs the project's tests and build. **Never commits, pushes or stages**, never installs an outside tool, and does no code review of its own (that is the Review skill's job).
Finds unused code paths and dead code in the person's own project. Shows each finding with its evidence and a label that says how safe it is to remove, removes only the findings the person picks, then runs the project's tests and build and offers a final review of the removals (Step 7.5, the Review skill's own prompt, run in this session). **Never commits, pushes or stages**, and never installs an outside tool.
## Interface
@@ -33,13 +33,14 @@ Read `./AGENTS.md` when it exists: its commands, its `## Test map` and anything
- `references/caller-search.md`: what to search besides the plain name, per language group. Read it before Step 4.
- `references/helper-strength.md`: helper strength and effort.
- `references/review.md` and `references/review-in-build.md`: the Review skill and how it runs inside this session. Read them only on a yes to Step 7.5.
## Rules
- Follow `./AGENTS.md` when it exists.
- **Never** run `git commit`, `git push`, `git add` or `git stash`. Read-only git is fine. The changes stay unstaged for the person to look at.
- **Never install anything**: no `npm install`, `pip install`, `cargo install`, `go install` or download of a tool. A tool the project already has may be run.
- **Write only** code removals, `.plan2code-dead-code/keep.md`, and, on a yes, the saved report and the `.gitignore` line.
- **Write only** code removals, the Step 7.5 review fixes the person picks, `.plan2code-dead-code/keep.md`, and, on a yes, the saved report and the `.gitignore` line.
- **Nothing is removed before the person picks it.** Nothing is pre-ticked.
- **Silence is not proof.** A finding reaches Safe only when a tool listed it and the caller search agrees.
- **Never partial without saying so.** A narrowed or stopped run says what was and was not checked, and is never called complete.
@@ -126,9 +127,25 @@ Nothing picked → skip to Step 8.
Nothing is staged or committed at any point.
### Step 7.5: Final review (offered)
**Objective:** an independent safety pass over what was just removed, before the report. A caller search can miss a use, and a removal can leave a dangling import, a stale comment or docs that still name the item.
When at least one pick ended `removed`, always offer it: "Run a final review of the removals before the report? (yes / no)", with its size (files, ~lines removed). **Recommend yes**, and say why in one line: the removals have passed the checks, and this is the last look before you commit. The person may skip. Nothing removed: no offer. Skipped: record `skipped (your choice)` and go to Step 8.
On yes, read `references/review.md` and run it as `references/review-in-build.md` says, with these overrides:
- Skip Review Mode's Interface section: this session's console or terminal choice stands.
- **Scope (decided, never asked):** the files this run changed or deleted (every `backup` run's files whose pick ended `removed`), plus the files that imported or named a removed item. Other working-tree changes stay out.
- **Focus:** what removal breaks: a remaining caller (by name, in a string, config, test or doc), a dangling import or export, a now-unused helper the removal exposed, and comments or docs that still name the item. Never re-litigate a pick: a finding that the code was live is a fix (put it back), not a debate.
- **Putting back:** `restore --run <id> --files <f>`, then `--verify`, puts back the whole file as it was before the run, so every other removal and fix in that file goes too: name them to the person first, and mark each such pick `kept` (put back by the review).
- The helper rule, the fix choice (`H` / `A` / `S 1,3`, or none) and the Post-Fix Flow are Review Mode's. Before applying fixes, `backup` the files they touch as a new run. After fixes, rerun Step 7's checks once through `run-check.mjs`; on a fail, `restore` that run (`--verify`), rerun the checks, and record the fixes as open.
Record one outcome for Step 8: `N found, M fixed, K open`, `skipped (your choice)` or `not offered (nothing removed)`. Zero findings: say so with the dimension coverage. An open Critical: say so plainly and offer the put-back above.
### Step 8: Report, keep list and finish
**Report.** Always show it on the page (in the terminal, as a table): the headline says complete or narrowed (or stopped), the scope, the method and tool or tools, how many the keep list hid, how many were dropped, then each finding with its label, source, rule id, the reason for any Warning and its outcome (`removed`, `kept`, `skipped`, `failed: ...`), and whether removal was unchecked.
**Report.** Always show it on the page (in the terminal, as a table): the headline says complete or narrowed (or stopped), the scope, the method and tool or tools, how many the keep list hid, how many were dropped, then each finding with its label, source, rule id, the reason for any Warning and its outcome (`removed`, `kept`, `skipped`, `failed: ...`), whether removal was unchecked, and the final review's outcome (Step 7.5) with any open finding and its file.
Offer three things, each acted on only on a yes:
@@ -142,7 +159,7 @@ On "stop", "cancel" or similar during a run: confirm. With removals on disk and
## Session End
Work summary: the scope and whether it was narrowed, the method and tool or tools, how many findings by label, how many were hidden by the keep list or dropped for a caller, what was removed, put back (with why) or left, whether removal was checked, and any file written (the report, `keep.md`, `.gitignore`).
Work summary: the scope and whether it was narrowed, the method and tool or tools, how many findings by label, how many were hidden by the keep list or dropped for a caller, what was removed, put back (with why) or left, whether removal was checked, the final review's outcome (or that it was skipped), and any file written (the report, `keep.md`, `.gitignore`).
**Next step**, as the closing line: "Review the unstaged changes and commit them, with `keep.md`, using `/plan2code-git`." Nothing removed and no keep-list change: "Nothing to commit."
+1 -1
View File
@@ -1,5 +1,5 @@
# Review Inside a Build
> Read by Review, Implement, Implement + Review and Quick Task when a review runs inside a build: before a phase is signed off, or after a quick task is built. Never invoked as a skill. The web console's `building-review.md` adds only what the page does differently.
> Read by Review, Implement, Implement + Review, Quick Task, Finalize and Dead Code when a review runs inside a session: before a phase is signed off, after a quick task is built, or as a final review (Finalize's Step 2.5, Dead Code's Step 7.5, whose own steps replace "Back to the build"). Never invoked as a skill. The web console's `building-review.md` adds only what the page does differently.
Run Review Mode (`references/review.md`, or this skill's own SKILL.md in Review) with these rules. They win over Review Mode's own scope questions, completion and session-end steps.
+1 -1
View File
@@ -1,5 +1,5 @@
# Choosing what to run
> Read by Document, Implement, Implement + Review, Quick Task, Review, Finalize, PR Prep and Test before they write, run or offer tests. Never invoked as a skill.
> Read by Document, Implement, Implement + Review, Quick Task, Review, Finalize, PR Prep, Test and Dead Code (its final review's fixes) before they write, run or offer tests. Never invoked as a skill.
## Three tiers
+4 -1
View File
@@ -1,11 +1,12 @@
# The Review, Mid-Session
The console points here on `__review`, or on a `review` card answered with a verdict. Part of the build contract (`building.md`). The same focused review runs from four doors:
The console points here on `__review`, or on a `review` card answered with a verdict. Part of the build contract (`building.md`). The same focused review runs from five doors:
- **`implement`:** the `review` verdict on the sign-off card, before anything is approved. A note sent with it is focus for the review. Settle the card in the post that goes back to work: `{"settle":true,"headline":{"stage":"Reviewing Phase 3","cleared":0,"total":0},"run":{"event":"review","id":"review"},"agent":{"status":"working","activity":"Reviewing the 7 files this phase changed","quietMinutes":15}}`
- **`quick-task`:** the **Review it now** button on the finished screen (`finish.review`), arriving as `__review`. Take it up with the same post minus `settle`, plus `"finish":null`.
- **`implement-review`:** Stage 2 (`notes/implement.md`).
- **`finalize`:** a yes on Step 2.5's "Run a final review" card (`notes/finalize.md`). Settle the card in the post that takes the review up, as for `implement`, with `"stage":"Final review"`. Scope is the whole feature's change set (Step 2.5), not one phase.
- **`dead-code`:** a yes on Step 7.5's "Run a final review" card (`notes/dead-code.md`). Settle it as for `finalize`, with `"stage":"Final review"`. Scope is the removals and the files that named a removed item (Step 7.5).
Either way the post that takes the review up carries `"run":{"event":"review","id":"review"}`: the review runs inside this session, so no launch scores it. Never also resume under `--workflow review`, or it counts twice.
@@ -50,6 +51,8 @@ In loop mode the way out is the `loopOutcome` post, not a sign-off.
**`finalize`: the closing gate, then Step 3.** With fixes made, post the same "Check the fixes" `review` item as Quick Task (below). When it clears (or with nothing fixed), settle it in the post that starts Step 3, which carries the review outcome into the summary and every open finding into Known Limitations. No finish here; the `review` doc stays as a tab.
**`dead-code`: the same closing gate, then Step 8.** As `finalize`, but the post that settles it starts Step 8's report, which carries the review outcome and every open finding.
**`quick-task`: the closing gate, then the finish.** Post a `review` item "Check the fixes": `doc:"review"`, `"nothingYet":false`, verdicts `approve` ("The fixes look right") and `changes`, token `approved` / `needs changes`. When it clears, settle it in the same post as the new finish, posted without `review` and with `dashboard:true`; keep waiting for its buttons, `stop` only on `__done`. The finish:
- `headline`: "The review is done"
+1
View File
@@ -89,6 +89,7 @@ After the person's note on an open question, reword it (same `id`), retire it wi
- a doc `version` that goes back (leave `version` out)
- a finish `command` with `<` or `>` in it
- a note left without a reply
- a new open required question while a card from the send you just collected is still open (add `"settle":true`, or reword, reopen, delete or `"stands":true` it)
- a `finish` while `stopWarning` is set or a helper is still `running`
- a `stop` with no `finish` (`stop --session <sid> --force` for a dead page)
+4
View File
@@ -26,6 +26,10 @@ With no test map: one `confirm` listing each command and the folder it runs in,
One progress post per check, no `--wait`, its `activity` naming the check and `quietMinutes` sized to its timeout (600 s is 10 minutes, plus a margin). Run the `chat` check between checks, as a build does.
## Final review
Once Step 7 ends with at least one pick `removed` (Step 7.5): `confirm` "Run a final review", `--wait`, `"yesLabel":"Review it","noLabel":"Skip it"`, files and ~lines removed in `body` with the one-line reason to say yes. Yes: read `<D>/building-review.md`, the `dead-code` door.
## The report and the offers
Doc `report`: one `md` block, the headline first (Complete, Narrowed or Stopped), then scope, method and tools, the hidden and dropped counts, and the findings table with each outcome. Then each offer as a `confirm`, `--wait`, `"doc":"report"`: "Save the report" (naming `.plan2code-dead-code/reports/DEAD-CODE-<date>.md`), "Keep these findings" (the reasons asked as a `text` card after a yes), and on first save ".gitignore line".
+41
View File
@@ -639,6 +639,7 @@ export function applyPatch(state, patch) {
delete next.finish;
}
refuseQuestionPastNote(state, next);
refuseQuestionPastAnswers(state, next, patch);
return stampTimes(state, settleAgent(next, patch, state));
}
@@ -677,6 +678,46 @@ function refuseQuestionPastNote(before, next) {
);
}
/**
* The cards the person just sent (`state.collected.ids`, written when `wait`
* handed the send over) are the agent's to settle. A patch that asks a new
* question while one of them is still open, untouched and unsettled, leaves
* two cards in front of the person, and the page can land on the old, already
* answered one (seen in the Dead Code skill: the first and second questions
* stayed in the list after they were answered). So the patch that adds a new
* open required question must also settle each of them (`settle: true`),
* reword it, reopen it, delete it or say it `stands`. A finish ends the
* session and the dashboard draws no cards, so neither is held to it.
*/
function refuseQuestionPastAnswers(before, next, patch) {
if (next.finish != null || next.workflow === "dashboard" || !Array.isArray(next.items)) return;
const ids = Array.isArray(before.collected?.ids) ? before.collected.ids : [];
if (!ids.length) return;
const had = new Set((Array.isArray(before.items) ? before.items : []).map((i) => i && i.id));
const asksNew = next.items.some(
(i) => isPlainObject(i) && !had.has(i.id) && i.required !== false && i.kind !== "notice" && isOpen(i),
);
if (!asksNew) return;
// `stands` keeps a card open on purpose; an `answer` in the patch is the agent settling it with its own reading (see settleItems).
const dealt = new Set((patch.items || []).filter((e) => isPlainObject(e) && (e.stands === true || "answer" in e)).map((e) => e.id));
const left = next.items.filter(
(i) => isPlainObject(i) && ids.includes(i.id) && i.kind !== "notice" && isOpen(i) && isPlainObject(i.submitted) && !dealt.has(i.id),
);
if (!left.length) return;
throw new Error(
left
.map((i) =>
rule(
`item "${i.id}"`,
"settle",
'was answered in the send you just collected and is still open: settle it in the same patch that adds a new question, with "settle": true (or a list of ids), or reword it, reopen it ("status": "reopened"), delete it ("_delete": true) or send "stands": true',
{ settle: true },
),
)
.join("\n"),
);
}
// The person had the last word in a card's thread: their note waits for a reply.
function lastWordIsTheirs(item) {
const thread = Array.isArray(item.thread) ? item.thread : [];
@@ -34,7 +34,6 @@ export const RIVALS = Object.freeze({
export const RIVAL_KINDS = Object.freeze(Object.keys(RIVALS));
// A car this heavy gives no ground to a ram, and its back is a wall.
export const HEAVY = 4;
export const HAUL_MASS = RIVALS.hauler.mass;
// Rivals spawn SPAWN_AHEAD to SPAWN_AHEAD + 40 units ahead of you (just over
// the board's top), one that comes from behind SPAWN_BEHIND under its
@@ -542,8 +542,6 @@ export function ensureRoad(road, d) {
// The row index for `d`, kept on the road.
export const rowIn = (road, d) => clamp(rowOf(d), 0, road.rows - 1);
export const hasBed = (road, i) => road.ML[i] < road.MR[i];
/* ---------------------------------------------------- the timed parts */
// A swaying bridge's shift across at `t`.
@@ -6,7 +6,7 @@
// (ghoul-sfx-ride.js) at the event's `level` and `pitch`. A heart lost is the
// game's own `lose` event with one of the ride's causes (ghoul-ride.js CAUSES).
import { CAUSES, EVENTS, SOUNDS } from "./ghoul-ride.js";
import { SOUNDS } from "./ghoul-ride.js";
const freeze = (o) => Object.freeze(o);
const cap = (s) => s[0].toUpperCase() + s.slice(1);
@@ -71,5 +71,3 @@ export function react(e, k) {
k.tone(name, Math.min(1, 0.55 * (e.level ?? 1)), (e.pitch ?? 1) * (0.97 + Math.random() * 0.06));
return true;
}
export const RIDE_EVENTS = EVENTS;
export const RIDE_CAUSES = CAUSES;
@@ -42,7 +42,6 @@ export const SPD = 2.1;
export const FIRE_GAP = 0.16;
export const RIDE_FLOOR = 5;
export const RIDE_EXTRA = 4;
export const DEAD_BAND = freeze({ on: DUCK_ON, off: DUCK_OFF });
/* ------------------------------------------------------------- sounds */
@@ -1054,5 +1053,4 @@ export const RIDE = freeze({
// What the art and the tests read of the rules.
export { K, bossActive, miniHp, mirRect, groundSpeedWant, update as stepRide };
export const popRect = (e) => K.pop.rect(e);
export const handTip = (e) => K.hand.tip(e);
@@ -139,7 +139,6 @@ export const CANARY_REST_MS = 4500;
// A dead miner: see the header.
export const MINER_NEAR = 44;
export const MINER_DIG_MS = 650;
export const MINER_V = 8;
export const PICK_NEAR = 5;
export const PICK_WIND_MS = 400;
export const PICK_REACH = 5;
@@ -1041,7 +1041,6 @@ const DECOR = {
// Every kind of scenery a hole on `theme` may use: the built-in ones and its
// look's own.
export const decorKinds = (theme) => [...Object.keys(DECOR), ...Object.keys((LOOKS[theme] || {}).decor || {})];
export const DECOR_KINDS = Object.freeze(Object.keys(DECOR));
const decorKind = (theme, kind) => ((LOOKS[theme] || {}).decor || {})[kind] || DECOR[kind];
+1 -2
View File
@@ -34,8 +34,7 @@ export const HELPER_STATES = Object.freeze(["running", "done", "failed"]);
// The person's Helper strength profile, applied on top of helper-strength.md's table.
export const STRENGTHS = Object.freeze(["balanced", "thrifty", "best", "session"]);
export const DEFAULT_STRENGTH = "balanced";
// What the dialog's strength radios say, and the line under them for the picked one.
export const STRENGTH_LABELS = Object.freeze({ balanced: "Balanced", thrifty: "Thrifty", best: "Best", session: "Match my session" });
// The line under the dialog's strength radios for the picked one.
export const STRENGTH_HELP = Object.freeze({
balanced: "Each helper gets the strength its job needs: light for lookups, stronger for reviews and design work.",
thrifty: "One step lighter everywhere to save cost; reviews stay at standard or above.",
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "Plan2Code",
"version": "3.0.5",
"version": "3.0.6",
"description": "A structured 4-step workflow methodology for AI-assisted software development",
"keywords": [
"ai",
@@ -17,6 +17,6 @@
"url": "https://github.com/jparkerweb/plan2code"
},
"homepage": "https://github.com/jparkerweb/plan2code",
"releaseDate": "2026-11-08",
"releaseDate": "2026-11-10",
"mode": "utility"
}