Compare commits

..
6 Commits
24 changed files with 216 additions and 66 deletions

No files matched your search

+1 -1
View File
@@ -148,7 +148,7 @@ The root `npm test` does not run the metrics or bot vitest suites; run them in t
|------|--------| |------|--------|
| `--build-skills` | Regenerate `skills/` from `src/`, pruning stale skills and reference files | | `--build-skills` | Regenerate `skills/` from `src/`, pruning stale skills and reference files |
| `--verify-skills` | Diff local `skills/` against `src/`; exits 1 on drift. Diagnostic only, the installer rebuilds anyway | | `--verify-skills` | Diff local `skills/` against `src/`; exits 1 on drift. Diagnostic only, the installer rebuilds anyway |
| `--update [--force]` | No menu: reinstall what `~/.plan2code/install.json` lists (skills, launcher, app, statusline; metrics and bot only when run from a git checkout, since they run from the install folder, which npx's cache is not), never uninstalling; with no record, the skills and the `plan2code` command. Compact output: `Updating <old> -> <new>` from the record's version (or `Already on <new>`, which stops unless `--force`), each piece's own output held back (`captureOutput()`) and shown only for a warning or a failure, one summary with human piece names (`PIECE_LABELS`), the release notes link and the restart hint; a failed update also prints `plan2code update --tag v<old>`. A failed update, or one whose desktop app was kept because the release has no app file yet, puts the old version back on `install.json`, so the next update (the app's Update and restart included) runs instead of stopping at Already on. `plan2code update` runs it through npx, pinned to the newest `vX.Y.Z` tag the launcher finds with update-check.mjs's `git ls-remote` pick (`--main` takes the tip of `main`, `--tag <ref>` any ref, `--force` is passed on; `PLAN2CODE_LS_REMOTE_FILE` replaces the git call in tests) | | `--update [--force]` | No menu: reinstall what `~/.plan2code/install.json` lists (skills, launcher, app, statusline; metrics and bot only when run from a git checkout, since they run from the install folder, which npx's cache is not), never uninstalling; with no record, the skills and the `plan2code` command. Compact output: `Updating <old> -> <new>` from the record's version (or `Already on <new>`, which stops unless `--force`, and only when the installed command's `bin/version.json` agrees with the record, so an update stopped after its skills step installs again), each piece's own output held back (`captureOutput()`) and shown only for a warning or a failure, one summary with human piece names (`PIECE_LABELS`), the release notes link and the restart hint; a failed update also prints `plan2code update --tag v<old>`. While an update runs, record writes keep the old version (`recordVersionHold`) and the new one is stamped only when every piece is in; a failed update, or one whose desktop app was kept because the release has no app file yet, leaves the old version on `install.json`, so the next update (the app's Update and restart included) runs instead of stopping at Already on. `plan2code update` runs it through npx, pinned to the newest `vX.Y.Z` tag the launcher finds with update-check.mjs's `git ls-remote` pick (`--main` takes the tip of `main`, `--tag <ref>` any ref, `--force` is passed on; `PLAN2CODE_LS_REMOTE_FILE` replaces the git call in tests) |
| `--uninstall [--yes] [--purge]` | No menu: confirm y/N (`--yes` skips it), run `uninstallAll()`, then ask whether to also delete `~/.plan2code` (`purgeData()`; `--purge` says yes without asking, `--yes` alone keeps the data). `uninstallAll()` is driven by the pieces `install.json` records plus a quiet probe for strays (`UNINSTALL_STEPS`, `UNINSTALL_PROBES`), prints one line per piece actually removed, falls back to deleting the `plan2code*` folders under `~/.agents/skills` when the skills CLI is unreachable, and removes the versioned console folders and `console-dir` (`removeConsoleFolders()`, stopping a running console first). What stays in `~/.plan2code` is listed by name with its size (`listKeptData()`), and the run always ends with the Removed / Could not remove / To finish block (`printUninstallReport()`). Deleting the data also removes the app's webview data outside `~/.plan2code` (`appWebviewDirs()`, `purgeAppWebview()`), and a running app is named before anything is removed (`appRunning()`). `plan2code uninstall [--yes] [--purge]` runs it through npx | | `--uninstall [--yes] [--purge]` | No menu: confirm y/N (`--yes` skips it), run `uninstallAll()`, then ask whether to also delete `~/.plan2code` (`purgeData()`; `--purge` says yes without asking, `--yes` alone keeps the data). `uninstallAll()` is driven by the pieces `install.json` records plus a quiet probe for strays (`UNINSTALL_STEPS`, `UNINSTALL_PROBES`), prints one line per piece actually removed, falls back to deleting the `plan2code*` folders under `~/.agents/skills` when the skills CLI is unreachable, and removes the versioned console folders and `console-dir` (`removeConsoleFolders()`, stopping a running console first). What stays in `~/.plan2code` is listed by name with its size (`listKeptData()`), and the run always ends with the Removed / Could not remove / To finish block (`printUninstallReport()`). Deleting the data also removes the app's webview data outside `~/.plan2code` (`appWebviewDirs()`, `purgeAppWebview()`), and a running app is named before anything is removed (`appRunning()`). `plan2code uninstall [--yes] [--purge]` runs it through npx |
## How the Installer Works ## How the Installer Works
+1
View File
@@ -7,6 +7,7 @@ Which checks cover which files, read by PR Prep and Test (`test-map.mjs read` ch
|---|---|---|---| |---|---|---|---|
| Activities games | `src/web-console/public/activities/**`, `src/web-console/public/tones.js`, `src/web-console/public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs` | no | | Activities games | `src/web-console/public/activities/**`, `src/web-console/public/tones.js`, `src/web-console/public/music.js` | `node --test scripts/test-web-console-tones.mjs scripts/test-web-console-activities.mjs` | no |
| Launcher | `src/launcher/**` | `node --test scripts/test-launcher.mjs` | no | | Launcher | `src/launcher/**` | `node --test scripts/test-launcher.mjs` | no |
| Installer update | `scripts/test-install-update.mjs` | `node --test scripts/test-install-update.mjs` | no |
| Dead Code script | `src/plan2code-dead-code-scripts/**`, `scripts/fixtures/dead-code/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-dead-code.mjs` | no | | Dead Code script | `src/plan2code-dead-code-scripts/**`, `scripts/fixtures/dead-code/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-dead-code.mjs` | no |
| Update Dependencies script | `src/plan2code-deps-scripts/**`, `scripts/fixtures/deps/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-deps.mjs` | no | | Update Dependencies script | `src/plan2code-deps-scripts/**`, `scripts/fixtures/deps/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-deps.mjs` | no |
| UI Prototype script and shell | `src/skill-scripts/ui-prototype*.mjs`, `src/plan2code-ui-prototype-references/**`, `scripts/fixtures/ui-prototype/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-ui-prototype.mjs scripts/test-ui-prototype-page.mjs` | no | | UI Prototype script and shell | `src/skill-scripts/ui-prototype*.mjs`, `src/plan2code-ui-prototype-references/**`, `scripts/fixtures/ui-prototype/**` | `npm run build:skills && node scripts/node-test.mjs scripts/test-script-ui-prototype.mjs scripts/test-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JPzGYewwvNr3GEx/94RXep5z+q8XvNrocHZshX3+XiGPalwN28joBPb7P6jrOsPIuFKrBkHuSBxpSuOejd1SSVGnFHjrU2Cw4iZo8SGwUNWZjTjpgF/J1Wc1ulM5fWukiINp8dSbBwn9SKD4sj23kIwp128A8FHbuZGsTx6slutVJ11SiPa0q9ly5etA8MgbLXggNrJJ7OANcrrDSL6ZE/GJOEzOzKgvZPQy4xk5jE+98ydiVBPX5BS/pjug/yxvyuiklDo635jhFI6YDsPr6robNEgDpM1p/CKVS+aM8aQEvmIOmZX9aTtCsSOxViMFVgLqRsWEmm4rxuwTjD13J4JXobC8SeeIe2+Qyio1KWPmw3kxUFEV4aCW2PWXGqJLine truncated
+11
View File
@@ -81,7 +81,18 @@ jobs:
defaults: defaults:
run: run:
working-directory: plan2code-app working-directory: plan2code-app
env:
# Debug info and incremental state are most of target/'s size; the ubuntu
# runner ran out of disk building both the debug and the release app.
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
steps: steps:
- name: Free disk space on the Linux runner
if: runner.os == 'Linux'
working-directory: .
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h /
- uses: actions/checkout@v7.0.1 - uses: actions/checkout@v7.0.1
- uses: actions/setup-node@v7.1.0 - uses: actions/setup-node@v7.1.0
with: with:
+5
View File
@@ -38,6 +38,11 @@
- About: install.js - About: install.js
- Noted: 2026-11-17, implement-review - Noted: 2026-11-17, implement-review
### Every heading and .md-h gets text-wrap: balance from tokens.css, so a long heading such as a lesson title splits into two even halves; set text-wrap: wrap where a heading runs longer than a line.
- Kind: how-it-works
- About: src/web-console/public/styles/tokens.css, src/web-console/public/styles/learning.css
- Noted: 2026-11-19, quick-task
### In a Markdown field (md-field.js), CodeMirror's scroller and content are only as tall as the text, not the bordered host: code that hit-tests the scroller must not assume it fills the box. ### In a Markdown field (md-field.js), CodeMirror's scroller and content are only as tall as the text, not the bordered host: code that hit-tests the scroller must not assume it fills the box.
- Kind: how-it-works - Kind: how-it-works
- About: src/web-console/public/md-field.js - About: src/web-console/public/md-field.js
+11
View File
@@ -4,6 +4,17 @@ All notable changes to Plan2Code will be documented in this file.
<!-- Format from 3.1.0 on: `## vX.Y.Z (YYYY-MM-DD)` with the date from version.json; a minor release opens with a three-bullet `### Highlights`; sections run Added, Changed, Fixed; game changes sit under one Activities line; tooling and test lines go under "For contributors". Older headings have no date and are not backfilled. --> <!-- Format from 3.1.0 on: `## vX.Y.Z (YYYY-MM-DD)` with the date from version.json; a minor release opens with a three-bullet `### Highlights`; sections run Added, Changed, Fixed; game changes sit under one Activities line; tooling and test lines go under "For contributors". Older headings have no date and are not backfilled. -->
## v3.1.4 (2026-11-20)
### 🔧 Changed
- **launcher**: the model menu offers Claude Fable 5.2 in place of 5.1, Gemini 4 Hydrogen and Gemini 4 Neon for Devin, and GPT-6.2 Astra and GPT-6.2 Sol for Codex; Gemini 3.8 Flash, GLM-5.3 Low and SWE-2 Flash Medium leave Devin's list, and Claude's `haiku` and `fable` labels follow the Claude Code docs.
- **launcher**: Claude Code's install options add the Windows CMD installer and install `@latest` through npm, the OpenCode starter template opens with `@plan2code`, and the Gemini CLI note also names Gemini Code Assist for GitHub.
### 🐛 Fixed
- **launcher**: `plan2code update` no longer stops at "Already on" after an earlier update stopped partway and left the `plan2code` command on the old version; the install record keeps the old version until every piece is in.
## v3.1.3 (2026-11-18) ## v3.1.3 (2026-11-18)
### 🔧 Changed ### 🔧 Changed
+1 -1
View File
@@ -13,7 +13,7 @@
Plan2Code is a spec-driven workflow for AI coding agents. You work through it on a page in your browser: the dashboard lists every step as a card, and each step's questions, progress and sign-offs arrive on that same page while your agent does the work. An approved plan becomes phase documents, and the agent builds to them one phase at a time. Plan2Code is a spec-driven workflow for AI coding agents. You work through it on a page in your browser: the dashboard lists every step as a card, and each step's questions, progress and sign-offs arrive on that same page while your agent does the work. An approved plan becomes phase documents, and the agent builds to them one phase at a time.
Version 3.1.3 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com) Version 3.1.4 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
--- ---
+45 -9
View File
@@ -2569,8 +2569,13 @@ function readInstallRecord() {
return null; return null;
} }
// While update() runs, every record write keeps the version the update started from (`{ version }`),
// so an update stopped partway (Ctrl+C, a closed window, a killed child) never leaves the record
// claiming the new version over pieces that are still old. update() stamps the new one at the end.
let recordVersionHold = null;
/** Temp file, then rename, so a crash never leaves a half-written record. A failure only skips the record. */ /** Temp file, then rename, so a crash never leaves a half-written record. A failure only skips the record. */
function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skipped || [], version = projectVersion.version) { function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skipped || [], version = recordVersionHold ? recordVersionHold.version : projectVersion.version) {
const record = { const record = {
version, version,
scope: 'global', scope: 'global',
@@ -2591,15 +2596,25 @@ function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skippe
} }
/** /**
* Put `version` back in the record (null when none was known) without touching its pieces: every * Write `version` on the record without touching its pieces: update() uses it to stamp the new
* recordInstalled() stamps the version being installed, so an update that failed uses this to * version once every piece is in, and to keep the old one (null when none was known) after a
* stay behind, and the next `plan2code update` does not answer "Already on". * failure or a kept app, so the next `plan2code update` does not answer "Already on".
*/ */
function setRecordVersion(version) { function setRecordVersion(version) {
const record = readInstallRecord(); const record = readInstallRecord();
if (record) writeInstallRecord(record.pieces, record.skipped || [], version); if (record) writeInstallRecord(record.pieces, record.skipped || [], version);
} }
/** The version in the installed plan2code command's version.json, or null when it is missing or unreadable. */
function installedLauncherVersion() {
try {
const { version } = JSON.parse(fs.readFileSync(LAUNCHER_VERSION_DEST, 'utf8'));
return typeof version === 'string' ? version : null;
} catch {
return null;
}
}
/** Add a piece after a successful global install. */ /** Add a piece after a successful global install. */
function recordInstalled(piece) { function recordInstalled(piece) {
const record = readInstallRecord(); const record = readInstallRecord();
@@ -3725,7 +3740,8 @@ function releaseNotesUrl(version) {
/** /**
* Reinstall whatever ~/.plan2code/install.json lists, without the menu or any prompt, and print * Reinstall whatever ~/.plan2code/install.json lists, without the menu or any prompt, and print
* one compact summary: `Updating <old> -> <new>` (or `Already on <new>`, which stops early unless * one compact summary: `Updating <old> -> <new>` (or `Already on <new>`, which stops early unless
* `force`), one line per piece by its human name, then the release notes link and the restart * `force`, and only when the installed command's bin/version.json agrees with the record whenever
* the record lists `launcher`), one line per piece by its human name, then the release notes link and the restart
* hint. Each piece's own output is held back and shown only when that piece warns or fails. * hint. Each piece's own output is held back and shown only when that piece warns or fails.
* Returns the exit code: 0 when every piece updated, 1 naming the pieces that failed. * Returns the exit code: 0 when every piece updated, 1 naming the pieces that failed.
*/ */
@@ -3733,15 +3749,33 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
const record = readInstallRecord(); const record = readInstallRecord();
const version = projectVersion.version; const version = projectVersion.version;
const before = record && typeof record.version === 'string' ? record.version : null; const before = record && typeof record.version === 'string' ? record.version : null;
if (before === version && !force) { const pieces = record ? record.pieces : ['skills', 'launcher'];
// The record alone is not proof: an update stopped before its launcher step (or one run by a
// launcher too old to pass --force on) left the record new and the command old, and every later
// update stopped here. The command's own version.json says what is really in place.
const launcherVersion = pieces.includes('launcher') ? installedLauncherVersion() : version;
if (before === version && launcherVersion === version && !force) {
console.log(`${COLORS.GREEN}${MARKS.DONE}${COLORS.RESET} Already on ${version}`); console.log(`${COLORS.GREEN}${MARKS.DONE}${COLORS.RESET} Already on ${version}`);
console.log(`${COLORS.DIM}Run plan2code update --force to install it again.${COLORS.RESET}`); console.log(`${COLORS.DIM}Run plan2code update --force to install it again.${COLORS.RESET}`);
return 0; return 0;
} }
console.log(`${COLORS.BRIGHT}${before ? `Updating ${before} -> ${version}` : `Updating to ${version}`}${COLORS.RESET}`); console.log(`${COLORS.BRIGHT}${before ? `Updating ${before} -> ${version}` : `Updating to ${version}`}${COLORS.RESET}`);
const pieces = record ? record.pieces : ['skills', 'launcher']; if (before === version && launcherVersion !== version && !force) {
console.log(`${COLORS.DIM}The plan2code command is still on ${launcherVersion || 'an unknown version'}, so everything is installed again.${COLORS.RESET}`);
}
if (!record) console.log(`${COLORS.DIM}No install record found; updating the skills and the plan2code command.${COLORS.RESET}`); if (!record) console.log(`${COLORS.DIM}No install record found; updating the skills and the plan2code command.${COLORS.RESET}`);
recordVersionHold = { version: before };
try {
return await updatePieces({ steps, cleanShims, pieces, before, version });
} finally {
recordVersionHold = null;
}
}
/** update()'s body once it has decided to install: the pieces, the summary, and the version stamp. */
async function updatePieces({ steps, cleanShims, pieces, before, version }) {
await captureOutput(async () => cleanShims()); await captureOutput(async () => cleanShims());
const results = {}; const results = {};
@@ -3798,7 +3832,7 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
console.log(''); console.log('');
if (failed.length > 0) { if (failed.length > 0) {
console.log(`${COLORS.RED}${MARKS.FAIL} Update failed for: ${failed.join(', ')}${COLORS.RESET}`); console.log(`${COLORS.RED}${MARKS.FAIL} Update failed for: ${failed.join(', ')}${COLORS.RESET}`);
// The pieces that did install stamped the new version on the record: take it back, so running // Keep the old version on the record (writes during the update already held it), so running
// plan2code update again retries instead of stopping at "Already on". // plan2code update again retries instead of stopping at "Already on".
setRecordVersion(before); setRecordVersion(before);
console.log(`To try again, run: ${COLORS.CYAN}plan2code update${COLORS.RESET}`); console.log(`To try again, run: ${COLORS.CYAN}plan2code update${COLORS.RESET}`);
@@ -3809,7 +3843,9 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
// The release had no desktop app file yet, so the installed app is still the old one: keep the // The release had no desktop app file yet, so the installed app is still the old one: keep the
// old version on the record, or the next update (the app's Update and restart among them) stops // old version on the record, or the next update (the app's Update and restart among them) stops
// at "Already on" and never fetches the app once the file is attached. // at "Already on" and never fetches the app once the file is attached.
if (before && typeof results.app === 'string' && results.app.startsWith('kept')) setRecordVersion(before); // Otherwise every piece is in: only now does the record name the new version.
const appKept = typeof results.app === 'string' && results.app.startsWith('kept');
setRecordVersion(before && appKept ? before : version);
console.log(`${COLORS.GREEN}${MARKS.DONE} Plan2Code is up to date (v${version})${COLORS.RESET}`); console.log(`${COLORS.GREEN}${MARKS.DONE} Plan2Code is up to date (v${version})${COLORS.RESET}`);
console.log(`What's new: ${releaseNotesUrl(version)}`); console.log(`What's new: ${releaseNotesUrl(version)}`);
console.log('Close any open Plan2Code console or app and start `plan2code` again.'); console.log('Close any open Plan2Code console or app and start `plan2code` again.');
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "plan2code", "name": "plan2code",
"version": "3.1.3", "version": "3.1.4",
"private": true, "private": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"engines": { "engines": {
+2 -2
View File
@@ -957,7 +957,7 @@ dependencies = [
[[package]] [[package]]
name = "fake-agent" name = "fake-agent"
version = "3.1.3" version = "3.1.4"
dependencies = [ dependencies = [
"serde_json", "serde_json",
"terminal_size", "terminal_size",
@@ -2647,7 +2647,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]] [[package]]
name = "plan2code-app" name = "plan2code-app"
version = "3.1.3" version = "3.1.4"
dependencies = [ dependencies = [
"chrono", "chrono",
"libc", "libc",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "fake-agent" name = "fake-agent"
version = "3.1.3" version = "3.1.4"
description = "A stand-in agent program for the Plan2Code app's tests" description = "A stand-in agent program for the Plan2Code app's tests"
edition = "2021" edition = "2021"
publish = false publish = false
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.4",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.4",
"dependencies": { "dependencies": {
"@tauri-apps/api": "2.12.4", "@tauri-apps/api": "2.12.4",
"@xterm/addon-fit": "0.11.0", "@xterm/addon-fit": "0.11.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "plan2code-app", "name": "plan2code-app",
"version": "3.1.3", "version": "3.1.4",
"private": true, "private": true,
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.", "description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
"scripts": { "scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "plan2code-app" name = "plan2code-app"
version = "3.1.3" version = "3.1.4"
description = "Plan2Code desktop app" description = "Plan2Code desktop app"
edition = "2021" edition = "2021"
publish = false publish = false
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "Plan2Code", "productName": "Plan2Code",
"version": "3.1.3", "version": "3.1.4",
"identifier": "com.plan2code.desktop", "identifier": "com.plan2code.desktop",
"build": { "build": {
"frontendDist": "../ui", "frontendDist": "../ui",
+55
View File
@@ -175,9 +175,18 @@ test("update: prints the version change, one line per piece by name, the release
assert.doesNotMatch(out, /Happy coding|PARAMETERS|To go back to a release/); assert.doesNotMatch(out, /Happy coding|PARAMETERS|To go back to a release/);
}); });
const LAUNCHER_VERSION = path.join(HOME, ".plan2code", "bin", "version.json");
/** The installed plan2code command's version.json, as installLauncher() writes it. */
function writeLauncherVersion(version) {
fs.mkdirSync(path.dirname(LAUNCHER_VERSION), { recursive: true });
fs.writeFileSync(LAUNCHER_VERSION, JSON.stringify({ name: "Plan2Code", version }));
}
test("update: already on the new version it says so and stops, until --force", async () => { test("update: already on the new version it says so and stops, until --force", async () => {
fs.mkdirSync(path.dirname(RECORD), { recursive: true }); fs.mkdirSync(path.dirname(RECORD), { recursive: true });
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] })); fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] }));
writeLauncherVersion(VERSION);
const idle = fakeSteps(); const idle = fakeSteps();
const stopped = await runUpdate(idle.steps); const stopped = await runUpdate(idle.steps);
assert.equal(stopped.code, 0, stopped.out); assert.equal(stopped.code, 0, stopped.out);
@@ -202,6 +211,52 @@ test("update: already on the new version it says so and stops, until --force", a
assert.match(out, new RegExp(`Updating ${VERSION.replace(/\./g, "\\.")} -> ${VERSION.replace(/\./g, "\\.")}`)); assert.match(out, new RegExp(`Updating ${VERSION.replace(/\./g, "\\.")} -> ${VERSION.replace(/\./g, "\\.")}`));
}); });
test("update: a record on the new version over an older plan2code command installs again, without --force", async () => {
// An update stopped after the skills step: the record says new, the command is still old.
fs.mkdirSync(path.dirname(RECORD), { recursive: true });
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["skills", "launcher"] }));
for (const launcher of ["1.0.0", null]) {
if (launcher) writeLauncherVersion(launcher);
else fs.rmSync(LAUNCHER_VERSION, { force: true });
const fake = fakeSteps();
const { code, out } = await runUpdate(fake.steps);
assert.equal(code, 0, out);
assert.doesNotMatch(out, /Already on/);
assert.match(out, new RegExp(`The plan2code command is still on ${launcher ? "1\\.0\\.0" : "an unknown version"}`));
assert.deepEqual(fake.ran(), ["skills"]);
assert.match(out, /plan2code command: updated/);
}
// A record without the command does not look at its version.json.
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["statusline"] }));
const idle = fakeSteps();
assert.match((await runUpdate(idle.steps)).out, /Already on/);
assert.deepEqual(idle.ran(), []);
});
test("update: the record keeps the old version until every piece is in, so a stopped update retries", async () => {
writeRecord(["skills", "launcher", "app"]);
const seen = [];
const fake = fakeSteps();
// As the real steps: each records its piece as it finishes.
for (const piece of ["skills", "app"]) {
const step = fake.steps[piece];
fake.steps[piece] = async (options) => {
const code = await step(options);
installer.recordInstalled(piece);
seen.push(installer.readInstallRecord().version);
return code;
};
}
const { code, out } = await runUpdate(fake.steps);
assert.equal(code, 0, out);
assert.deepEqual(seen, ["1.0.0", "1.0.0"], "mid-update writes keep the old version");
assert.equal(installer.readInstallRecord().version, VERSION, "stamped once the update finished");
assert.deepEqual(installer.readInstallRecord().pieces, ["app", "launcher", "skills"]);
// Outside an update, a record write stamps the version being installed again.
installer.recordInstalled("statusline");
assert.equal(installer.readInstallRecord().version, VERSION);
});
test("update: a step's own output stays out of the summary, except its warnings and its failures", async () => { test("update: a step's own output stays out of the summary, except its warnings and its failures", async () => {
writeRecord(["skills", "statusline", "bot"]); writeRecord(["skills", "statusline", "bot"]);
const fake = fakeSteps(); const fake = fakeSteps();
+15 -4
View File
@@ -27,6 +27,17 @@ const FIXTURES = path.join(ROOT, "scripts", "fixtures", "deps");
const MANIFESTS = path.join(FIXTURES, "manifests"); const MANIFESTS = path.join(FIXTURES, "manifests");
const readJson = (...p) => JSON.parse(fs.readFileSync(path.join(FIXTURES, ...p), "utf8")); const readJson = (...p) => JSON.parse(fs.readFileSync(path.join(FIXTURES, ...p), "utf8"));
// Recorded npm projects keep their lockfile as package-lock.fixture.json, so
// dependency scanners never read the old versions the recordings pin as the
// repository's own. A copy gets the real name back.
const FIXTURE_LOCK = "package-lock.fixture.json";
function copyFixture(src, dir) {
fs.cpSync(src, dir, { recursive: true });
for (const rel of fs.readdirSync(dir, { recursive: true })) {
if (path.basename(rel) === FIXTURE_LOCK) fs.renameSync(path.join(dir, rel), path.join(dir, path.dirname(rel), "package-lock.json"));
}
}
const runDeps = (args, opts) => runScript("plan2code-deps", "deps.mjs", args, opts); const runDeps = (args, opts) => runScript("plan2code-deps", "deps.mjs", args, opts);
const made = []; const made = [];
@@ -849,7 +860,7 @@ function runStubbed(args, pathDir) {
/** The recorded project copied into a temp folder (extra files on top), so a run never touches the fixture. */ /** The recorded project copied into a temp folder (extra files on top), so a run never touches the fixture. */
function project(extra = {}) { function project(extra = {}) {
const dir = tmp("deps-project"); const dir = tmp("deps-project");
fs.cpSync(path.join(NPM, "project"), dir, { recursive: true }); copyFixture(path.join(NPM, "project"), dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, typeof content === "string" ? content : JSON.stringify(content, null, 2) + "\n"); for (const [rel, content] of Object.entries(extra)) write(dir, rel, typeof content === "string" ? content : JSON.stringify(content, null, 2) + "\n");
return dir; return dir;
} }
@@ -1206,7 +1217,7 @@ test("apply refuses a batch with no backup (exit 5) and reports a pick that neve
test("backup then restore --verify puts an untracked CRLF lockfile and a tracked one back byte for byte", () => { test("backup then restore --verify puts an untracked CRLF lockfile and a tracked one back byte for byte", () => {
const root = project({ const root = project({
"web/package.json": fs.readFileSync(path.join(NPM, "project", "package.json"), "utf8"), "web/package.json": fs.readFileSync(path.join(NPM, "project", "package.json"), "utf8"),
"web/package-lock.json": fs.readFileSync(path.join(NPM, "project", "package-lock.json"), "utf8"), "web/package-lock.json": fs.readFileSync(path.join(NPM, "project", FIXTURE_LOCK), "utf8"),
}); });
// The root lockfile is untracked and written with CRLF, as some Windows tools leave one: put back exactly as found. // The root lockfile is untracked and written with CRLF, as some Windows tools leave one: put back exactly as found.
const lockPath = path.join(root, "package-lock.json"); const lockPath = path.join(root, "package-lock.json");
@@ -1534,7 +1545,7 @@ const UV = fx("uv-0.13.7");
/** A recorded project folder copied into a temp folder, extra files on top. */ /** A recorded project folder copied into a temp folder, extra files on top. */
function copyFrom(src, extra = {}) { function copyFrom(src, extra = {}) {
const dir = tmp("deps-eco"); const dir = tmp("deps-eco");
fs.cpSync(src, dir, { recursive: true }); copyFixture(src, dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, content); for (const [rel, content] of Object.entries(extra)) write(dir, rel, content);
return dir; return dir;
} }
@@ -2564,7 +2575,7 @@ const PINS = fx("pins", "project");
/** The pins fixture project copied into a temp folder, with extra files on top. */ /** The pins fixture project copied into a temp folder, with extra files on top. */
function pinsProject(extra = {}) { function pinsProject(extra = {}) {
const dir = tmp("deps-pins"); const dir = tmp("deps-pins");
fs.cpSync(PINS, dir, { recursive: true }); copyFixture(PINS, dir);
for (const [rel, content] of Object.entries(extra)) write(dir, rel, content); for (const [rel, content] of Object.entries(extra)) write(dir, rel, content);
return dir; return dir;
} }
+3
View File
@@ -973,6 +973,9 @@ test("the Subagents dialog looks as it did before Preferences moved to tabs", as
second: await stylesOf(modal.locator("fieldset.modal-ranges").nth(1), ["margin-top"]), second: await stylesOf(modal.locator("fieldset.modal-ranges").nth(1), ["margin-top"]),
actions: await stylesOf(modal.locator(".modal-actions"), ["display", "justify-content"]), actions: await stylesOf(modal.locator(".modal-actions"), ["display", "justify-content"]),
}; };
// Chrome 158 reads `justify-content: flex-end` back as "flow-end"; older Chrome and Edge
// say "flex-end". The stylesheet is the same either way, so count them as one.
if (got.actions["justify-content"] === "flow-end") got.actions["justify-content"] = "flex-end";
if (process.env.P2C_PRINT_SUBAGENTS) console.log("SUBAGENTS " + JSON.stringify(got)); if (process.env.P2C_PRINT_SUBAGENTS) console.log("SUBAGENTS " + JSON.stringify(got));
assert.deepEqual(got, SUBAGENTS_BEFORE); assert.deepEqual(got, SUBAGENTS_BEFORE);
}); });
+6 -5
View File
@@ -14,15 +14,16 @@
"install": { "install": {
"win": [ "win": [
{ "label": "PowerShell", "run": "irm https://claude.ai/install.ps1 | iex" }, { "label": "PowerShell", "run": "irm https://claude.ai/install.ps1 | iex" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "CMD", "run": "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
], ],
"mac": [ "mac": [
{ "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" }, { "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
], ],
"linux": [ "linux": [
{ "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" }, { "label": "Terminal", "run": "curl -fsSL https://claude.ai/install.sh | bash" },
{ "label": "npm", "run": "npm install -g @anthropic-ai/claude-code", "note": "Needs Node.js 22 or later" } { "label": "npm", "run": "npm install -g @anthropic-ai/claude-code@latest", "note": "Needs Node.js 22 or later" }
] ]
}, },
"installDirs": { "installDirs": {
@@ -103,7 +104,7 @@
"name": "OpenCode", "name": "OpenCode",
"kind": "template", "kind": "template",
"command": "opencode", "command": "opencode",
"prompt": "Use the plan2code skill", "prompt": "@plan2code",
"args": ["{model}", "--prompt", "{prompt}"], "args": ["{model}", "--prompt", "{prompt}"],
"bypassArgs": ["--auto"], "bypassArgs": ["--auto"],
"modelArgs": ["--model", "{model}"] "modelArgs": ["--model", "{model}"]
@@ -117,7 +118,7 @@
"args": ["{model}", "{prompt}"], "args": ["{model}", "{prompt}"],
"bypassArgs": ["--approval-mode=yolo"], "bypassArgs": ["--approval-mode=yolo"],
"modelArgs": ["--model", "{model}"], "modelArgs": ["--model", "{model}"],
"note": "For Google AI Pro and Ultra accounts and free Gemini Code Assist for individuals, Gemini CLI was replaced by Antigravity CLI on June 18, 2026; Standard and Enterprise licenses and paid API keys are unaffected." "note": "For Google AI Pro and Ultra accounts, free Gemini Code Assist for individuals and Gemini Code Assist for GitHub, Gemini CLI was replaced by Antigravity CLI on June 18, 2026; Standard and Enterprise licenses and paid API keys are unaffected."
}, },
{ {
"id": "pi", "id": "pi",
+46 -34
View File
@@ -15,7 +15,7 @@
}, },
{ {
"id": "haiku", "id": "haiku",
"label": "latest Haiku" "label": "fast and efficient Haiku"
}, },
{ {
"id": "opusplan", "id": "opusplan",
@@ -23,7 +23,7 @@
}, },
{ {
"id": "fable", "id": "fable",
"label": "latest Fable" "label": "Fable for your hardest tasks"
}, },
{ {
"id": "best", "id": "best",
@@ -79,22 +79,6 @@
"id": "gpt-6-luna-high", "id": "gpt-6-luna-high",
"label": "GPT-6 Luna High Thinking" "label": "GPT-6 Luna High Thinking"
}, },
{
"id": "gemini-3-8-flash-low",
"label": "Gemini 3.8 Flash Low"
},
{
"id": "gemini-3-8-flash-medium",
"label": "Gemini 3.8 Flash Medium"
},
{
"id": "gemini-3-8-flash-high",
"label": "Gemini 3.8 Flash High"
},
{
"id": "glm-5-3-low",
"label": "GLM-5.3 Low"
},
{ {
"id": "glm-5-3-high", "id": "glm-5-3-high",
"label": "GLM-5.3 High" "label": "GLM-5.3 High"
@@ -115,18 +99,6 @@
"id": "claude-haiku-5-5-high", "id": "claude-haiku-5-5-high",
"label": "Claude Haiku 5.5 High" "label": "Claude Haiku 5.5 High"
}, },
{
"id": "claude-fable-5-1-low",
"label": "Claude Fable 5.1 Low"
},
{
"id": "claude-fable-5-1-medium",
"label": "Claude Fable 5.1 Medium"
},
{
"id": "claude-fable-5-1-high",
"label": "Claude Fable 5.1 High"
},
{ {
"id": "gpt-6-astra-low", "id": "gpt-6-astra-low",
"label": "GPT-6 Astra Low Thinking" "label": "GPT-6 Astra Low Thinking"
@@ -139,13 +111,45 @@
"id": "gpt-6-astra-high", "id": "gpt-6-astra-high",
"label": "GPT-6 Astra High Thinking" "label": "GPT-6 Astra High Thinking"
}, },
{
"id": "swe-2-flash-medium",
"label": "SWE-2 Flash Medium"
},
{ {
"id": "swe-2-flash-high", "id": "swe-2-flash-high",
"label": "SWE-2 Flash High" "label": "SWE-2 Flash High"
},
{
"id": "claude-fable-5-2-low",
"label": "Claude Fable 5.2 Low"
},
{
"id": "claude-fable-5-2-medium",
"label": "Claude Fable 5.2 Medium"
},
{
"id": "claude-fable-5-2-high",
"label": "Claude Fable 5.2 High"
},
{
"id": "gemini-4-hydrogen-low",
"label": "Gemini 4 Hydrogen Low"
},
{
"id": "gemini-4-hydrogen-medium",
"label": "Gemini 4 Hydrogen Medium"
},
{
"id": "gemini-4-hydrogen-high",
"label": "Gemini 4 Hydrogen High"
},
{
"id": "gemini-4-neon-low",
"label": "Gemini 4 Neon Low"
},
{
"id": "gemini-4-neon-medium",
"label": "Gemini 4 Neon Medium"
},
{
"id": "gemini-4-neon-high",
"label": "Gemini 4 Neon High"
} }
], ],
"codex": [ "codex": [
@@ -164,6 +168,14 @@
{ {
"id": "gpt-6-luna", "id": "gpt-6-luna",
"label": "GPT-6 Luna" "label": "GPT-6 Luna"
},
{
"id": "gpt-6.2-astra",
"label": "GPT-6.2 Astra"
},
{
"id": "gpt-6.2-sol",
"label": "GPT-6.2 Sol"
} }
], ],
"strengths": { "strengths": {
@@ -116,6 +116,10 @@
/* Open the lessons: each file under its own name. */ /* Open the lessons: each file under its own name. */
.learn-lessons-file + .learn-lessons-file { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); } .learn-lessons-file + .learn-lessons-file { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-3); } .learn-lessons-name { margin: 0 0 6px; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-3); }
/* Each file's own .md block would keep the page-wide 68ch cap; let it fill the dialog.
A lesson's title is a long heading: balanced wrapping (tokens.css) halves it, so fill each line. */
.learn-lessons-file .md { max-width: none; }
.learn-lessons-file .md-h { text-wrap: wrap; }
/* The lessons card (cards.js buildLessons): one block per item, none chosen at first. */ /* The lessons card (cards.js buildLessons): one block per item, none chosen at first. */
.lessons-opening { margin: 14px 0 0; font-size: var(--fs-md); color: var(--ink-3); } .lessons-opening { margin: 14px 0 0; font-size: var(--fs-md); color: var(--ink-3); }
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "Plan2Code", "name": "Plan2Code",
"version": "3.1.3", "version": "3.1.4",
"description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) for AI-assisted software development", "description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) for AI-assisted software development",
"keywords": [ "keywords": [
"ai", "ai",
@@ -17,6 +17,6 @@
"url": "https://github.com/jparkerweb/plan2code" "url": "https://github.com/jparkerweb/plan2code"
}, },
"homepage": "https://github.com/jparkerweb/plan2code", "homepage": "https://github.com/jparkerweb/plan2code",
"releaseDate": "2026-11-18", "releaseDate": "2026-11-20",
"mode": "utility" "mode": "utility"
} }