mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-16 04:45:33 -08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bb1b11296 | ||
|
|
9199fc00af | ||
|
|
567a65ff5b | ||
|
|
1d064b18f3 | ||
|
|
d1aab9d006 | ||
|
|
7f32c351b1 | ||
|
|
b3768b47a3 | ||
|
|
8efa1aece1 | ||
|
|
6e84e6a6a4 |
No files matched your search
@@ -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 |
|
||||
|---|---|
|
||||
|
||||
@@ -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) |
|
||||
|
||||
@@ -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 @@
|
||||
U0VOQwGrCRNv/is5f2tebFg9olqnWS6/DBeWvY1oCHyaX3bV14wburXibwHxysSAsHqUiMQBwfDzOQGguTcyoBx/V61a+u0gNWiK7dXyDh+UCLR2+JhKcvrXknJ/3xG7RZA+trrB6zanaloZRl0FADkeROal64nWUGT8WxOPHnfj0An4Epe3OyP6dAs6WZkPu8gjm6HS5QmDuPwrW2sxyMOrmfuxltf7wyQsnGMK3RyG+PnrHmZbMtQ2SCqzxHtSnpt1tXDv7tW8/lFBeQUcdipZT57E/NxzPloRHLtlzwM8Bfn5RQ+aji5X5KermeGqHr8UXYAKhPsLKIYt0qogq06YsLA2cTbLDiqbSawqNm8lJLBohmFMLu3YjJVRIIjFfi4PcGLz2w8extZhIuXICAYlsPwEVhVJ0DQHevxbGigbc9+jknWT7+p92xvfj26LrywQhXELtyKqFDr8Aaoac35rKHmWEUwVuMo3JDgeLP0RZJkgLBQ9NY61cW9rbOMDt7XSKf6YFBcdSz34M3FCkk9N9eVSMwEe1kGGBghFQIWckWFmSEKXNzzEddf4/yIxk1YeDKrPD0Xkkykkrnfzqewhzg2zbfUrdbH1t/UGss+GTo05qEZT93beZd+CqasGCZGSiWFAENYscpp6PC+7A55vr7VA9nsQUv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Alt5+BUfso5BioB1RS/xSlGi5Hrkk0SN8iSdp76ChmIcmb6I9yi9rDtBxVvoKT0w/KAbxfuldD1Lu0EoubDqWnW6YdlnHuahMLiEnOIOzE+yEp7ESHz3wqNVQF+o9ElWZ6+X85mRDtfGD+rn4nUMmgqK8cWkBaFXsTmyrW7/INyt6jGgMwq9nLjNa0KY3H6RLAHje40YszdAWwRqVxlo4A8FabBHyfH29p/0zyJtFpbvDt9BiG9ZkbmQJT2lCj9Z/AXTpV9Z67PhHIZg2jhE/5pUaC7oU2Yj+9B3Zd1NUtM6HUK9DJY06W+qFFIA48x/T+ZoiG4/EydXiihgfza9ufgNCsVbLNjeSsqfPy4ELr0GDwJ/dKlXNygX1wOHRVC6QTzUN+BveyV+Jp94ArB/NTjlFiJbqi2lskx/PfRi/9PbLQu1PPj/5uJc6WIfXOfSYR/tLwhU/qbSFpmrosvh3sYV5ApWC7rRCamgs8bv5X5gfNUOu8HheArSPfjklEU66rSfG4+la2iXauBUBgDO1VlYVTmGL5fqG6ytAtyMw6IVPJqgkgpJKoJB0eq8lxS3nIFO0LRp1/BTNVlCH7trZQv0wxwJKUk0Udqs3aIdE/lhJvWrK1L7bdRhieqGEn8QhnqxG3NErDuMFy20uo42KX506SlvMag6qxZX54rjbThAtuO8iDbcGy9Line truncated
|
||||
@@ -25,3 +25,4 @@ prototypes/
|
||||
plan2code-app/target/
|
||||
plan2code-app/src-tauri/gen/
|
||||
plan2code-app/ui/vendor/
|
||||
.plan2code-dead-code/reports/
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
@@ -131,8 +132,9 @@ one on a brief built from the session, and the console's own Session meter point
|
||||
session is getting long. Once it is installed, `plan2code` opens the app instead of running the agent
|
||||
in your terminal. `plan2code --classic` keeps the terminal flow, and so does a Linux machine with no
|
||||
display (over SSH, say) or any machine over an SSH session. `plan2code update` updates the skills, the
|
||||
command and the app together, and the bar offers the same **Update skills** when the app and the
|
||||
installed skills disagree. `plan2code uninstall` removes all three.
|
||||
command and the app together; run it in a terminal outside the app when the bar says **Update
|
||||
available**, then reopen the app. The bar also offers **Update skills** when the app and the installed
|
||||
skills disagree. `plan2code uninstall` removes all three.
|
||||
|
||||
The app can also build a whole spec unattended with the Implementation Loop; see [docs/desktop-app.md](docs/desktop-app.md#implementation-loop).
|
||||
|
||||
|
||||
+14
-6
@@ -121,9 +121,9 @@ to that offers the same **Reconnect the console** button — never "Restart the
|
||||
The console also knows when it is running inside the app (the agent it talks to carries that signal):
|
||||
its session meter, the "Before you close this" guide on a finished step, and the dashboard's red-session
|
||||
banner all point at the app's own **New Session** button instead of a command to paste into a new
|
||||
conversation, since New Session already does that in one click; and the console's own "update available"
|
||||
banner never shows, since the app's **Update skills** button (below) already covers it with no shell
|
||||
involved. A slash command still offered to continue a step (such as `/plan2code-4-finalize`) stays
|
||||
conversation, since New Session already does that in one click. The dashboard's **UPDATE AVAILABLE**
|
||||
banner still shows, beside the bar's own **Update available**, and its steps say to run the command in a
|
||||
terminal outside the app and then reopen the app (see "Keep it up to date" below). A slash command still offered to continue a step (such as `/plan2code-4-finalize`) stays
|
||||
exactly as it would in a terminal: paste it into the app's own terminal panel, which runs the real
|
||||
agent CLI.
|
||||
|
||||
@@ -248,9 +248,17 @@ clean tree. The in-app **Help** has a matching topic, **Implementation Loop**, w
|
||||
|
||||
## Keep it up to date
|
||||
|
||||
`plan2code update` brings the skills, the `plan2code` command and the app up together. If the app
|
||||
and the installed skills ever differ in version, the app's top bar says so and offers **Update
|
||||
skills**, which runs that same update when you press it. It never updates on its own.
|
||||
`plan2code update` brings the skills, the `plan2code` command and the app up together.
|
||||
|
||||
When a newer release is out, the app's top bar shows **Update available** with **Copy update command**,
|
||||
and the dashboard shows its **UPDATE AVAILABLE** banner. Neither updates for you: the app cannot replace
|
||||
itself while it runs (Windows will not overwrite a running file), so copy the command, run it in a
|
||||
terminal outside the app (not the app's terminal panel, which runs your agent), then close the app and
|
||||
open it again.
|
||||
|
||||
If the app and the installed skills ever differ in version, the app's top bar says so and offers **Update
|
||||
skills**, which brings the skills level with the app's own version when you press it. That one is a
|
||||
single click, because it never has to replace the app. Nothing updates on its own.
|
||||
|
||||
To remove the app along with the skills and the command, run `plan2code uninstall`. It asks first,
|
||||
then asks whether your own data in `~/.plan2code/` (notebooks, handoffs, settings) goes too.
|
||||
|
||||
+792
-924
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 |
+10
-5
@@ -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' }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -2902,9 +2909,7 @@ async function installDesktopApp({ quiet = false, unattended = false, outcome =
|
||||
return fail(`the file was verified but could not be put in ${APP_DIR} (${error.message}); close the app and try again.`);
|
||||
}
|
||||
recordInstalled('app');
|
||||
console.log(` ${COLORS.GREEN}${SYMBOLS.SUCCESS}${COLORS.RESET} Installed: ${APP_DEST}`);
|
||||
console.log(` ${COLORS.YELLOW}${SYMBOLS.WARNING}${COLORS.RESET} The app is unsigned, and it starts the agent with permission checks off.`);
|
||||
console.log(` ${COLORS.YELLOW}${SYMBOLS.WARNING}${COLORS.RESET} See docs/desktop-app.md for how to allow it on macOS and Windows if needed.`);
|
||||
console.log(` ${COLORS.YELLOW}${SYMBOLS.INFO}${COLORS.RESET} The app is unsigned; if needed, see docs/desktop-app.md for how to allow it.`);
|
||||
console.log('');
|
||||
outcome.app = true;
|
||||
return 0;
|
||||
|
||||
+2
-1
@@ -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",
|
||||
|
||||
Generated
+2
-2
@@ -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,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
|
||||
|
||||
Generated
+2
-2
@@ -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,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,6 +1,6 @@
|
||||
[package]
|
||||
name = "plan2code-app"
|
||||
version = "3.0.5"
|
||||
version = "3.0.6"
|
||||
description = "Plan2Code desktop app"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
@@ -1894,8 +1894,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn ids_round_trip() {
|
||||
for entry in [entry("claude"), entry("devin"), entry("codex")] {
|
||||
assert_eq!(builtin_entry(&entry.id), Some(entry));
|
||||
// Ids only: builtin_entry reads the installed agents.json first, which
|
||||
// can be older than the source on a machine with a release installed.
|
||||
for id in ["claude", "devin", "codex"] {
|
||||
assert_eq!(builtin_entry(id).map(|e| e.id), Some(id.to_string()));
|
||||
}
|
||||
assert!(builtin_entry("nope").is_none());
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 |
|
||||
|
||||
@@ -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
@@ -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.");
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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`);
|
||||
|
||||
@@ -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}`);
|
||||
});
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -31,9 +31,10 @@ const UK = new RegExp(
|
||||
|
||||
// Names that keep the UK spelling because they are data contracts read in
|
||||
// several places (see Code Style in .agents-docs/AGENTS-code-style.md), plus
|
||||
// HTML's own attribute. Removed before the scan.
|
||||
// HTML's own attribute and PHPStan's own subcommand. Removed before the scan.
|
||||
const CONTRACTS = [
|
||||
/aria-labelledby/g,
|
||||
/\banalyse(?= --level)/g,
|
||||
/\.greyed\b/g,
|
||||
/\bgreyed(?=\s*:)/g,
|
||||
/\bconst greyed\b/g,
|
||||
|
||||
@@ -466,10 +466,10 @@ test("the update banner shows on the dashboard only, and its dismiss hides it",
|
||||
await banner.waitFor({ state: "hidden" });
|
||||
});
|
||||
|
||||
// Under the desktop app (PLAN2CODE_IN_APP=1) the app's own top bar already
|
||||
// nags about a skills/app mismatch and updates in one click, so this banner
|
||||
// (a copy-pasted shell command) must never show there, newer release or not.
|
||||
test("under the app, the update banner never shows", async (t) => {
|
||||
// Under the desktop app (PLAN2CODE_IN_APP=1) the banner shows too: the app
|
||||
// cannot replace itself, so a new release is a terminal command there as well,
|
||||
// and the modal says to run it outside the app and reopen the app.
|
||||
test("under the app, the update banner shows and its steps are worded for the app", async (t) => {
|
||||
aNewerReleaseExists(t);
|
||||
const dash = await openSession(await suite.browser(), {
|
||||
t,
|
||||
@@ -479,8 +479,12 @@ test("under the app, the update banner never shows", async (t) => {
|
||||
env: { PLAN2CODE_IN_APP: "1" },
|
||||
});
|
||||
const main = await toTheMenu(dash);
|
||||
await main.getByText("One spec on disk, with a plan drafted.").waitFor();
|
||||
assert.equal(await main.getByText("UPDATE AVAILABLE").count(), 0, "no banner under the app");
|
||||
await main.getByRole("button", { name: /UPDATE AVAILABLE · v99\.0\.0/ }).click();
|
||||
const modal = dash.page.locator("#update-modal");
|
||||
await modal.waitFor();
|
||||
await modal.getByText("a terminal outside the app", { exact: false }).waitFor();
|
||||
await modal.getByText("close the app and open it again", { exact: false }).waitFor();
|
||||
assert.equal(await modal.locator("#update-command code").textContent(), "plan2code update");
|
||||
});
|
||||
|
||||
// Same reasoning for the dashboard's own red-meter banner: under the app it
|
||||
|
||||
@@ -300,10 +300,9 @@ test("the update banner opens a modal with the exact update commands, and its di
|
||||
assert.equal(await main.getByRole("button", { name: /UPDATE AVAILABLE/ }).count(), 0, "the banner came back after a reload");
|
||||
});
|
||||
|
||||
// Under the app the dashboard's own UPDATE AVAILABLE banner never shows (a
|
||||
// separate test already covers that), so Help's own line about it must not
|
||||
// send an in-app reader to a terminal command for a banner they can never see.
|
||||
test("under the app, Help's update line points at Update skills, not the dashboard banner's terminal command", async (t) => {
|
||||
// Under the app Help's update line names both notices, says the command runs
|
||||
// outside the app with a reopen after, and keeps Update skills for a mismatch.
|
||||
test("under the app, Help's update line says to run the command outside the app and keeps Update skills for a mismatch", async (t) => {
|
||||
savedLooks(t, { welcomeSeen: true });
|
||||
const s = await openSession(await suite.browser(), {
|
||||
t,
|
||||
@@ -317,8 +316,9 @@ test("under the app, Help's update line points at Update skills, not the dashboa
|
||||
await tabButton(s, "dashboard").click();
|
||||
const text = s.page.locator("#help-update-text");
|
||||
await text.getByText("Update skills", { exact: false }).waitFor();
|
||||
assert.equal(await text.locator("code").count(), 0, "no terminal command under the app");
|
||||
assert.equal(await text.getByText("UPDATE AVAILABLE", { exact: false }).count(), 0, "no mention of a banner that never shows there");
|
||||
assert.equal(await text.locator("code").textContent(), "plan2code update");
|
||||
await text.getByText("outside the app", { exact: false }).waitFor();
|
||||
assert.equal(await text.getByText("/plan2code", { exact: false }).count(), 0, "no restart through /plan2code under the app");
|
||||
});
|
||||
|
||||
// Under the app, when the console server itself is gone, the live "About"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 });
|
||||
|
||||
@@ -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,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,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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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".
|
||||
|
||||
@@ -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];
|
||||
|
||||
|
||||
@@ -4174,7 +4174,7 @@
|
||||
<p class="modal-blurb" id="update-versions"></p>
|
||||
<ol class="update-steps">
|
||||
<li>
|
||||
Run this in your terminal (not in this page or your agent):
|
||||
<span id="update-step-run">Run this in your terminal (not in this page or your agent):</span>
|
||||
<div class="update-command" id="update-command"></div>
|
||||
It updates everything that was installed (the skills, the <code>plan2code</code>
|
||||
command and any extras you added), with no menu. If the <code>plan2code</code>
|
||||
@@ -4184,7 +4184,7 @@
|
||||
could not reach the repository and hid the reason: run
|
||||
<code>git ls-remote https://github.com/jparkerweb/plan2code.git</code> to see it.
|
||||
</li>
|
||||
<li>When it finishes, close this console and start <code>plan2code</code> again.</li>
|
||||
<li id="update-step-restart">When it finishes, close this console and start <code>plan2code</code> again.</li>
|
||||
</ol>
|
||||
<div class="modal-actions">
|
||||
<button type="button" class="btn primary" id="update-done">Close</button>
|
||||
|
||||
@@ -143,6 +143,16 @@ function openUpdateModal() {
|
||||
const fallbackRow = $("update-fallback");
|
||||
const fallback = el("code", null, UPDATE_FALLBACK_COMMAND);
|
||||
fallbackRow.replaceChildren(fallback, copyButton(UPDATE_FALLBACK_COMMAND, "btn small ghost handoff-copy", fallback));
|
||||
// Under the app, its terminal panel runs the agent, and the app it would
|
||||
// update is the one running this page.
|
||||
$("update-step-run").textContent = page.inApp
|
||||
? "Run this in a terminal outside the app (not in its terminal panel, which runs your agent):"
|
||||
: "Run this in your terminal (not in this page or your agent):";
|
||||
$("update-step-restart").replaceChildren(
|
||||
...(page.inApp
|
||||
? ["When it finishes, close the app and open it again."]
|
||||
: ["When it finishes, close this console and start ", el("code", null, "plan2code"), " again."])
|
||||
);
|
||||
$("update-modal").showModal();
|
||||
}
|
||||
|
||||
@@ -164,10 +174,12 @@ export function renderDashboard(main) {
|
||||
warn.setAttribute("role", "status");
|
||||
wrap.appendChild(warn);
|
||||
}
|
||||
// Built here only, so no other workflow's page ever shows it. Under the app
|
||||
// this never shows at all: the app's own top bar already says so and, unlike
|
||||
// this banner's copy-pasted command, updates the skills itself in one click.
|
||||
if (page.updateFrame && !page.inApp && !updateDismissed()) {
|
||||
// Built here only, so no other workflow's page ever shows it. It shows under
|
||||
// the app too, beside the app bar's own "Update available": the app cannot
|
||||
// replace itself, so a new release is the same terminal command either way
|
||||
// (the bar's one-click Update skills only levels skills to the app's own
|
||||
// version), and the modal words its steps for the app.
|
||||
if (page.updateFrame && !updateDismissed()) {
|
||||
const notice = el("div", "dash-nudge update-banner");
|
||||
notice.setAttribute("role", "status");
|
||||
const open = el("button", "update-banner-open", "UPDATE AVAILABLE · v" + page.updateFrame.latest);
|
||||
|
||||
@@ -67,18 +67,23 @@ function renderAbout() {
|
||||
}
|
||||
}
|
||||
|
||||
// Under the app, the dashboard's own UPDATE AVAILABLE banner never shows (the
|
||||
// app's bar already nags about a skills/app mismatch and updates in one
|
||||
// click, see docs/desktop-app.md), so this line would describe a banner the
|
||||
// reader can never find and send them to a terminal the app's own button
|
||||
// already makes unnecessary. Patched once, the first time Help opens, since
|
||||
// page.inApp never changes for the session's life.
|
||||
// Under the app, a new release still needs a terminal (the app cannot replace
|
||||
// itself), but not the terminal panel, and the restart is the app's, not a
|
||||
// new /plan2code; a skills/app mismatch is the bar's one-click Update
|
||||
// skills (see docs/desktop-app.md). Patched once, the first time Help opens,
|
||||
// since page.inApp never changes for the session's life.
|
||||
function renderUpdateHelp() {
|
||||
if (!page.inApp) return;
|
||||
$("help-update-text").replaceChildren(
|
||||
"When the app and the installed skills fall out of step, its own top bar says so and offers ",
|
||||
"When a newer Plan2Code release is out, the dashboard shows ",
|
||||
el("strong", null, "UPDATE AVAILABLE"),
|
||||
" at the top and the app's top bar shows ",
|
||||
el("strong", null, "Update available"),
|
||||
". Both give you the same command, ",
|
||||
el("code", null, "plan2code update"),
|
||||
": run it in a terminal outside the app (not its terminal panel), then close the app and open it again. The app cannot replace itself while it runs, so a new release has no one-click update. When the app and the installed skills fall out of step, the bar offers ",
|
||||
el("strong", null, "Update skills"),
|
||||
", which brings them level in one click, no terminal needed."
|
||||
" instead, which brings them level in one click."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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"
|
||||
}
|
||||
Reference in new issue
Block a user