Sync upstream v3.2.6: Loop checkboxes, Notes drag handle, US English replies, app update fetch (v3.2.6)

- Implement's and Review's confirm panes carry a Loop checkbox in place of
  the dashboard's loop cards; loop end-screen buttons show a spinner.
- The stacked Notes panel gets a drag handle.
- Every skill prompt and the console contracts say to reply in US English.
- The desktop app offers Update to latest when the skills are newer, and
  plan2code update refetches an app that install.json does not record.
- Devin Balanced maps to Sonnet 5.5 Medium.
This commit is contained in:
jparkerweb committed 2026-12-04 22:35:28 -08:00
1 parent 9629961f36
commit 658c813428
70 files changed
+818 -242

No files matched your search

@@ -21,7 +21,7 @@ One row per file under `src/web-console/public/` (the games and their sound are
| `public/render.js` | Markdown to DOM, safely: no HTML string is ever produced, only nodes built with `createElement` and `textContent`; also the shared page helpers (`el`, `md`, `copyButton`, `lightDismiss`) |
| `public/selectors.js` | what the page reads off its state: the questions, the finish, the scan, who has the ball |
| `public/send-state.js` | whether Send is available, and what its button says |
| `public/skills.js` | the skill list: every per-skill fact the console uses (card, order, start pose, launch scoring, subagent opt-in, which spec states light its card), data only, imported by the page and by Node; the older tables (`SKILL_CATALOG`, `START_POSES`, `CONSOLE_WORKFLOWS` and the rest, in `answers.js`) are lookups on it. Each entry also carries `weight` (what its launch and `run` score on the meter, or null), `started` and `ran` (the meter's labels for them, or null), `resume` (`"overview"`, `"folder"` or null: what the resume command takes after the skill's command) and an optional `card.help` (Help's line for the card when it differs from `blurb`). `WORKFLOWS` (every entry's workflow, in order) and `isWorkflow()` are what the CLI checks a `--workflow` against. The meter's `WEIGHTS`, `LAUNCH_LABELS` and `RUN_LABELS`, `resumeCommand()`, Help's card list and `cmd-help`'s workflow list are all derived from it, so a new skill is one entry here, not an edit to each of those |
| `public/skills.js` | the skill list: every per-skill fact the console uses (card, order, start pose, launch scoring, subagent opt-in, which spec states light its card), data only, imported by the page and by Node; the older tables (`SKILL_CATALOG`, `START_POSES`, `CONSOLE_WORKFLOWS` and the rest, in `answers.js`) are lookups on it. Each entry also carries `weight` (what its launch and `run` score on the meter, or null), `started` and `ran` (the meter's labels for them, or null), `resume` (`"overview"`, `"folder"` or null: what the resume command takes after the skill's command) and an optional `card.help` (Help's line for the card when it differs from `blurb`). An optional `loop` names the card-less app-only loop entry a confirm pane offers; those entries carry only availability facts, with `card: null`. `WORKFLOWS` (every entry's workflow, in order) and `isWorkflow()` are what the CLI checks a `--workflow` against. The meter's `WEIGHTS`, `LAUNCH_LABELS` and `RUN_LABELS`, `resumeCommand()`, Help's card list and `cmd-help`'s workflow list are all derived from it, so a new skill is one entry here, not an edit to each of those |
| `public/sound.js` | the sound cues: which plays, one at a time, held until the first click; seven cues (not Planny snoring or waking) play the file picked in Preferences, saved flat as `soundFile<Event>` (`soundFileQuestion`) out of the 19 files `sound-01` to `sound-19` in `public/sounds/` |
| `public/spec-states.js` | the spec states (`diagnosed`, `fixed`, `upgrade`, `upgraded`, `exploring`, `mapped`, `planned`, `documented`, `building`, `built`, `unrecognized`): each one's picker label, the card it is the natural next step for and its recommendation, data only; which cards a state lights lives in `skills.js`, how a folder maps to a state in `classifySpec()` in `scan.mjs` |
| `public/card-rows.js` | how many cards a dashboard group draws per row (`steadyColumns(count, width)`): one card width per group, what fits or one column more or fewer to leave no card alone on a row (one empty corner is fine from three across), a last row still short centered; `screens/dashboard.js` applies it as `--dash-cols` and `is-centered` on draw and on resize; tested in `scripts/test-web-console-card-rows.mjs` |
@@ -31,11 +31,11 @@ One row per file under `src/web-console/public/` (the games and their sound are
| `public/screens/cards.js` | question cards: every kind (one builder per kind in `BUILDERS`), the pager, settled and in-flight records. The `lessons` kind's builder is `buildLessons()`: the approval card for noted lessons, one row per waiting item (`lessonRow()`) decided on its own with the words its type takes, the choices kept as a draft (`lessons-<id>`) until Send, or the first ask's three answers when the card carries `firstAsk`; a `suggested` map (row id to one of that row's choices, or `{ choice, text?, why? }` where the words go only with Reword, Reword and move or Rename; checked in `lessonsProblems()` in `patches.mjs`, read by `lessonSuggestion()` in `answers.js`) draws a dashed `is-suggested` ring on those buttons without picking them, and its words fill that row's edit boxes once the suggested edit is open (`lessonsFillSuggested()`, once per suggestion, remembered in the draft's `applied`, so later typing stays); on the dashboard it is drawn in the Lessons to review dialog (`renderLessonsDialog()` in `screens/learning-row.js`). A `multi` option may carry `ticked: true` (the row starts ticked the first time the card shows, never on a `locked` row) and `tag` (1 to 16 characters, drawn as a neutral `.pill.tag` beside the label and read in the checkbox's accessible name after the `k: text`); on a card with a ticked row, unticking the last box (or pressing a lit preset off) stages `ks: []`, an answer that reads `none`, where other cards stage nothing. |
| `public/screens/cleanup.js` | User Preferences' Cleanup section, on the System tab |
| `public/screens/core.js` | the core every screen sits inside: connection, the render loop, the page chrome and Send; the only file that imports the screens, and only `app.js` imports it |
| `public/screens/dashboard.js` | the dashboard: cards, the spec picker, handoff chips, delete, the first-open wake-up, and Learning's waiting banner (`learningBanner()`: the line from `learningBannerText()` and a **Review** button sending `__learning` `review`, last of the banners), which places Learning's row through `hooks.renderLearningRow` |
| `public/screens/dashboard.js` | the dashboard: cards, the spec picker, the confirm pane's launch options (the Review box and the Loop box; app-only entries have no dashboard cards), handoff chips, delete, the first-open wake-up, and Learning's waiting banner (`learningBanner()`: the line from `learningBannerText()` and a **Review** button sending `__learning` `review`, last of the banners), which places Learning's row through `hooks.renderLearningRow` |
| `public/screens/learning-row.js` | Learning's row on the dashboard (`renderLearningRow(scan, position)`): four states in two places (under the picker while not set up, off or paused; after the last card group while on), Pause for me posting `/learning/pause` with no agent, More, Open the lessons and the Remove confirm, plus `renderLessonsDialog()`, the Lessons to review dialog that draws an open `lessons` card over the menu; the agent-run controls send `__learning` through `hooks.sendLearning` and gray out under `learningBlocked()` |
| `public/screens/review-loop-setup.js` | the Review Loop's setup screen on the dashboard (app only): scope, round cap, commit and the pre-run commit tick, Suggestions, strength, silence, notify (the lifted `notifyFields` and `silenceField` of `loop-setup.js`), the hands-off and reviewer lines, the Start checks, and the `review-loop-start` request to the app. |
| `public/screens/review-loop-setup.js` | the Review Loop's setup screen (app only), opened from the Loop box on Review's confirm pane: scope, round cap, commit and the pre-run commit tick, Suggestions, strength, silence, notify (the lifted `notifyFields` and `silenceField` of `loop-setup.js`), the hands-off and reviewer lines, the Start checks, and the `review-loop-start` request to the app. |
| `public/review-loop-end.js` | how a Review Loop run ends (`renderLoopEnd` hands a `loopEnd` with `kind: "review"` to `renderReviewLoopEnd`): a heading by `reason` (Clean, Stopped at the round cap, Stopped by you, Failed) with `line`, the `report` doc behind Read the full report, after Stop now (`partial`) the partial diff drawn by `diff-view.js` with Keep and Discard (`review-loop-partial`), Continue ("Run one more round" at the cap) only when `canContinue` and no `partial` (`review-loop-continue`), the Suggestions pick (nothing ticked) and the squash switch (only when `canSquash`, off) kept in module state per ending, and Sign off (`review-loop-sign-off` with `picks` and `squash`, always on offer); once `signedOff`, the finished screen: PR Prep and Fix what's left by hand (hidden when `open` is empty) send `review-loop-next` (`pr-prep` or `quick-task`), Back to the dashboard sends `loop-dashboard`. The app's answers land in `page.reviewAction` (`wireLoopMessages`) and show under the card; a pressed button stays disabled until the ending changes or an answer carries an error |
| `public/screens/loop-setup.js` | the Implementation Loop's setup screen on the dashboard (app only): the fields, their defaults and read-only facts, the Start checks, and the request to the app. The **Strength per phase** field (`strengthField`) is a grid: four headed columns (Match my session, Thrifty, Balanced, Best; level 0 to 3) and one `radiogroup` row per phase left, one radio per column (`#loop-strength-<n>-<word>`, `match` for Match my session; an unmapped word's radio is disabled and its header says "(not mapped)"), the cell's dot (`strengthBars`) over the hidden radio, and the model the pick becomes at the row's end. **Set all to** stays a select (`#loop-strength-all`, blank again after use). **Suggest for me** (`#loop-strength-suggest`, right of it) sends a no-hop `__loopSuggest` (`id`, `spec`, `phases`, the mapped `strengths`) to the dashboard agent and grays the field under `.loop-suggest-overlay` (`.is-suggesting`, `aria-busy`); the agent posts `loopSuggest` (`{ id, spec, picks: [{ n, strength, why }] }`, checked by `loopSuggestProblems` in `patches.mjs`), and the page applies only the answer whose `id` and `spec` match its own request, mapped words only, with each `why` as a `.loop-strength-why` line that a hand change or Set all to clears; `SUGGEST_WAIT_MS` (two minutes) gives the field back with a note when nobody answers. The dashboard skill answers it under "A strength suggestion arrives". `drawStrengthLine(grid)` draws the grid's SVG from the checked nodes' measured positions, never from state: a very light dashed `line.col` per column and a thick square-step `path.step` from each row's node to the next (one path fewer than rows, none under two rows or with the toggle off). It redraws on the window's resize, a `ResizeObserver` on the grid (Preferences' page width), fonts loading and every redraw of the section, and stops once the grid is gone. The colors are the `--lvl-0` to `--lvl-3` tokens (`--lvl-0` is the neutral gray of Match my session); tests wait for the drawn state before reading the line. The page locks while `state.loop.driving` is set (`loopDriving()` in `selectors.js`) until the app posts `loopEnd`; Activities, Notebook, Help and Preferences stay usable. `loopEnd` takes a third `kind`, `"review"` (the Review Loop's end, `reviewLoopEndProblems` in `patches.mjs`: `reason`, `report`, `canContinue`, `canSquash`, optional `partial`, `suggestions`, `open`, `signedOff`, `note`; `report` and `partial.diff` name docs on the page, no `phases` or `uncommitted` needed); `loopEnd.can` accepts `ask` (`LOOP_CAN` in `patches.mjs`); the app adds it first to every stop that offers `resume`, and the stopped screen's **Ask a question** wakes an ordinary agent on the same session |
| `public/screens/loop-setup.js` | the Implementation Loop's setup screen (app only), opened from the Loop box on Implement's confirm pane: the fields, their defaults and read-only facts, the Start checks, and the request to the app. The **Strength per phase** field (`strengthField`) is a grid: four headed columns (Match my session, Thrifty, Balanced, Best; level 0 to 3) and one `radiogroup` row per phase left, one radio per column (`#loop-strength-<n>-<word>`, `match` for Match my session; an unmapped word's radio is disabled and its header says "(not mapped)"), the cell's dot (`strengthBars`) over the hidden radio, and the model the pick becomes at the row's end. **Set all to** stays a select (`#loop-strength-all`, blank again after use). **Suggest for me** (`#loop-strength-suggest`, right of it) sends a no-hop `__loopSuggest` (`id`, `spec`, `phases`, the mapped `strengths`) to the dashboard agent and grays the field under `.loop-suggest-overlay` (`.is-suggesting`, `aria-busy`); the agent posts `loopSuggest` (`{ id, spec, picks: [{ n, strength, why }] }`, checked by `loopSuggestProblems` in `patches.mjs`), and the page applies only the answer whose `id` and `spec` match its own request, mapped words only, with each `why` as a `.loop-strength-why` line that a hand change or Set all to clears; `SUGGEST_WAIT_MS` (two minutes) gives the field back with a note when nobody answers. The dashboard skill answers it under "A strength suggestion arrives". `drawStrengthLine(grid)` draws the grid's SVG from the checked nodes' measured positions, never from state: a very light dashed `line.col` per column and a thick square-step `path.step` from each row's node to the next (one path fewer than rows, none under two rows or with the toggle off). It redraws on the window's resize, a `ResizeObserver` on the grid (Preferences' page width), fonts loading and every redraw of the section, and stops once the grid is gone. The colors are the `--lvl-0` to `--lvl-3` tokens (`--lvl-0` is the neutral gray of Match my session); tests wait for the drawn state before reading the line. The page locks while `state.loop.driving` is set (`loopDriving()` in `selectors.js`) until the app posts `loopEnd`; Activities, Notebook, Help and Preferences stay usable. `loopEnd` takes a third `kind`, `"review"` (the Review Loop's end, `reviewLoopEndProblems` in `patches.mjs`: `reason`, `report`, `canContinue`, `canSquash`, optional `partial`, `suggestions`, `open`, `signedOff`, `note`; `report` and `partial.diff` name docs on the page, no `phases` or `uncommitted` needed); `loopEnd.can` accepts `ask` (`LOOP_CAN` in `patches.mjs`); the app adds it first to every stop that offers `resume`, and the stopped screen's **Ask a question** wakes an ordinary agent on the same session |
| `public/screens/docs.js` | documents: tabs, blocks, print and download, and the brief button |
| `public/screens/ending.js` | how a session ends: the finished screen, its offers, Stop and the way home; a Diagnose finish whose `doc` is saved shows that file whole as a Bug report box with Copy report (the raw Markdown), above Next step |
| `public/screens/git-host.js` | hosts the git board: the tools fold-out (`board.tools`, saved with the board), tabs, panels and what each click sends |
+1 -1
View File
@@ -1 +1 @@
U0VOQwGUhBJO3dPZPDQc4L7k1lalN/wixLSs7lYYWIVd2ppas/1v1M+5GnT0T63hjpl7QhRFKmepKi1Rv/cr4EMWgHswWemJxRRW6q7usEhHzTawHeALuKzdQAR9hQ0+8s3Ca0iVBTa/DQ4N95fpNi3VHoHxm+UtT6wN44R/yFthry0flHOnAoQc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oU3C2p/a/LrXMIRQgzuuxvscA4GEmEJvE2udg25i9c3YECrGzDfJCrQQGn1RHNaSDLine truncated
+5
View File
@@ -67,6 +67,11 @@
- About: src/web-console/public/styles/tokens.css, src/web-console/public/styles/learning.css
- Noted: 2026-11-19, quick-task
### From a desktop app terminal, run console tests with its PLAN2CODE_* vars unset (env -u PLAN2CODE_IN_APP ...): test-web-console-server.mjs and the loop tests read process.env directly.
- Kind: command
- About: scripts/web-console-test-helpers.mjs
- Noted: 2026-12-04, implement-review
### 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
- About: src/web-console/public/md-field.js
+5
View File
@@ -43,3 +43,8 @@ Paths: install.js, src/installer/**, scripts/bench-install-update.mjs, scripts/p
- Kind: how-it-works
- About: install.js
- Noted: 2026-11-17, implement-review
### update() says Already on from the record, command, skills and console; the app file is judged only by install.json's appVersion, so a piece that can stay old needs its own recorded version.
- Kind: how-it-works
- About: install.js
- Noted: 2026-12-04, quick-task
+7 -5
View File
@@ -475,14 +475,16 @@ the `/plan2code` command instead. That command is on both of these screens
anyway, for starting the dashboard in a fresh conversation — the better choice
after a long skill, since a fresh conversation starts with a clean context.
The Implementation Loop's own end screen works the same way: finished or
stopped, its actions sit beside a **Back to the dashboard** button that opens
The Implementation Loop is app only: with a spec picked, open **Implement** on the dashboard, tick its
**Loop** checkbox, and press **Set up Implementation Loop**. Its setup asks how many review rounds
per phase to allow (default 2): when a phase's own review leaves Critical or Warning, fresh reviewers
run up to that many more rounds before the phase is committed. Its own end screen works the same way:
finished or stopped, its actions sit beside a **Back to the dashboard** button that opens
a fresh dashboard in the frame, no agent needed, and its status line marks it
as your move rather than leaving a stale "starting" line behind.
Review rounds per phase (default 2): when a phase's own review leaves Critical or Warning, fresh reviewers run up to this many more rounds before the phase is committed.
The **Review Loop** card, also app only, sits beside the Implementation Loop's: it reviews and fixes a
The **Review Loop** is app only too: open **Review** on the dashboard, tick its **Loop** checkbox, and
press **Set up Review Loop**. It reviews and fixes a
finished change in rounds while you are away (round 1 the whole change, each later round only the last
round's fixes, a fresh reviewer every time), stops on a clean round, the round cap, your stop or a failure,
and ends on its own screen with the report, **Continue**, the Suggestions pick, an optional squash, **PR
+1 -1
View File
@@ -36,7 +36,7 @@ Details: [Status line](./.agents-docs/AGENTS-architecture-statusline.md)
## Web Console
Optional local browser UI (`src/web-console/`, zero dependencies, detached `node` server on `127.0.0.1`) installed once under `~/.plan2code/console/<version>/` (`installSharedConsole` in `install.js`) and reached from every skill through a forwarding stub, `src/web-console-stub/console.mjs`. Whether a skill starts in the terminal or the console is asked each run until the person saves a default (`console.mjs interface`, saved in `~/.plan2code/console/interface.json`); `--web` / `--terminal` or plain words override it for one session. The bare `plan2code` skill opens its dashboard, a card menu that launches any skill in the same session. Pages cover questions, sign-off gates (with an in-page code review, and in Implement, Implement + Review and Quick task a **Changes** tab: a `diff` doc block fed by the `changes.mjs` skill script, parsed by `public/diff-parse.js` and drawn by `public/diff-view.js`), build progress, the living document, a spec's saved prototypes (a **Prototypes** tab: an `.md` read in place, an `.html` opened in the default browser), an **Ask** chat, a read-only **Workspace** of extra folders (remembered per folder and spec in `~/.plan2code/console/workspaces.json`), a session meter, a **git board** for the `git` workflow (a Save, Share, Review, Tidy path, one task card for the step you are on, and the Changes, Branches and Sync tabs folded into **All branches and tools**; branches, pull, push, commits and pull-request links, drawn from `state.git`; contract in `notes/git.md`), **Stop with a handoff** (handoffs live in `~/.plan2code/handoffs/`, owned by `handoffs.mjs`, swept after 30 days, and offered as dashboard chips to pick up in the same session), a private **Notebook** in the top bar (named tabs of Markdown and pictures, a live-preview CodeMirror editor, one notepad per folder in `~/.plan2code/notepads/`, owned by `notepads.mjs`, private: the agent reads a tab only when you start Pathfinder, Plan, Quick task, Diagnose, UI Prototype or Revise plan from the dashboard with it and send the box it fills (an idea box marked `fill: "note"`, up to five ticked pictures attached), which then marks the tab sent via `POST /notepad/tab/sent`; the agent CLI never imports the store; removed only through Cleanup once a month untouched), **Activities** behind the top bar's die (thirteen small games, Snake, Mini golf, Light Trails, Bug Hunt, Sunset Drive, Stack Deploy, Bumper Ring, Rapids Run, Hot Potato, Crossing Rush, Bounce Road, Ghoul Rush and Flock Dash, listed in `public/activities.js` with one module per game under `public/activities/` (Ghoul Rush is its own folder of modules, `public/activities/ghoul-rush/`) and a card line (`blurb`) each, a picker of game rows in two columns, ordered Recently played or A to Z (saved in `activityOrder`), with never-picked games under Not played yet, once two are listed, that plays one game at a time (another pick drops the last game's round), driven by `screens/activities.js` (keys, key releases for a game with `release()`, canvas pointer events for a game with `pointer()`, one frame timer), paused whenever the person's turn comes and resumed only by the person (while that pause's banner is up, only by its **Unpause game** button), best scores in flat `activityBest<Id>` keys in `looks.json` (and the time each game was last picked in `activityPlayed<Id>`) (lowest wins for a game that sets `lowerIsBetter`; Mini golf opens on a dashboard of its six 18-hole courses, one file each under `public/activities/golf-course-<id>.js`, and keeps a best per course, `activityBestGolf<Course>`), and one number a game may keep between sessions in `activityMemo<Id>` (Snake's tally of surprises found, Light Trails' furthest arena, Bug Hunt's tally of finds, Sunset Drive's roads found, Stack Deploy's highest floor, Bumper Ring's furthest arena, Rapids Run's furthest dam, Hot Potato's furthest venue, Crossing Rush's furthest zone, Bounce Road's furthest stage, Ghoul Rush's most stages cleared in a run, Flock Dash's furthest stage), never shown to the agent), a built-in 24-topic Help, the app-only **Implementation Loop** (a dashboard card and a setup screen drawn by the page, `public/screens/loop-setup.js`; the last setup remembered per project in `~/.plan2code/console/loop-setup.json`, owned by `loop-setup.mjs`; a page that locks while `state.loop.driving` is set, until the app posts `loopEnd`; a skill run with `--loop` reports a `loopOutcome` instead of asking for sign-off, per `notes/loop.md`), the app-only **Review Loop** (a card beside it, `screens/review-loop-setup.js`, the setup remembered in `~/.plan2code/console/review-loop-setup.json` owned by `review-loop-setup.mjs`; the app's `review_loop.rs` drives review-and-fix rounds, each a Review session opened with `--loop --round N --role` that reports a `roundOutcome` per `notes/review-loop.md`; its end screen is `public/review-loop-end.js`), a first-run Welcome, User Preferences (gear: four tabs, Appearance, Agents & models, SystLine truncated
Optional local browser UI (`src/web-console/`, zero dependencies, detached `node` server on `127.0.0.1`) installed once under `~/.plan2code/console/<version>/` (`installSharedConsole` in `install.js`) and reached from every skill through a forwarding stub, `src/web-console-stub/console.mjs`. Whether a skill starts in the terminal or the console is asked each run until the person saves a default (`console.mjs interface`, saved in `~/.plan2code/console/interface.json`); `--web` / `--terminal` or plain words override it for one session. The bare `plan2code` skill opens its dashboard, a card menu that launches any skill in the same session. Pages cover questions, sign-off gates (with an in-page code review, and in Implement, Implement + Review and Quick task a **Changes** tab: a `diff` doc block fed by the `changes.mjs` skill script, parsed by `public/diff-parse.js` and drawn by `public/diff-view.js`), build progress, the living document, a spec's saved prototypes (a **Prototypes** tab: an `.md` read in place, an `.html` opened in the default browser), an **Ask** chat, a read-only **Workspace** of extra folders (remembered per folder and spec in `~/.plan2code/console/workspaces.json`), a session meter, a **git board** for the `git` workflow (a Save, Share, Review, Tidy path, one task card for the step you are on, and the Changes, Branches and Sync tabs folded into **All branches and tools**; branches, pull, push, commits and pull-request links, drawn from `state.git`; contract in `notes/git.md`), **Stop with a handoff** (handoffs live in `~/.plan2code/handoffs/`, owned by `handoffs.mjs`, swept after 30 days, and offered as dashboard chips to pick up in the same session), a private **Notebook** in the top bar (named tabs of Markdown and pictures, a live-preview CodeMirror editor, one notepad per folder in `~/.plan2code/notepads/`, owned by `notepads.mjs`, private: the agent reads a tab only when you start Pathfinder, Plan, Quick task, Diagnose, UI Prototype or Revise plan from the dashboard with it and send the box it fills (an idea box marked `fill: "note"`, up to five ticked pictures attached), which then marks the tab sent via `POST /notepad/tab/sent`; the agent CLI never imports the store; removed only through Cleanup once a month untouched), **Activities** behind the top bar's die (thirteen small games, Snake, Mini golf, Light Trails, Bug Hunt, Sunset Drive, Stack Deploy, Bumper Ring, Rapids Run, Hot Potato, Crossing Rush, Bounce Road, Ghoul Rush and Flock Dash, listed in `public/activities.js` with one module per game under `public/activities/` (Ghoul Rush is its own folder of modules, `public/activities/ghoul-rush/`) and a card line (`blurb`) each, a picker of game rows in two columns, ordered Recently played or A to Z (saved in `activityOrder`), with never-picked games under Not played yet, once two are listed, that plays one game at a time (another pick drops the last game's round), driven by `screens/activities.js` (keys, key releases for a game with `release()`, canvas pointer events for a game with `pointer()`, one frame timer), paused whenever the person's turn comes and resumed only by the person (while that pause's banner is up, only by its **Unpause game** button), best scores in flat `activityBest<Id>` keys in `looks.json` (and the time each game was last picked in `activityPlayed<Id>`) (lowest wins for a game that sets `lowerIsBetter`; Mini golf opens on a dashboard of its six 18-hole courses, one file each under `public/activities/golf-course-<id>.js`, and keeps a best per course, `activityBestGolf<Course>`), and one number a game may keep between sessions in `activityMemo<Id>` (Snake's tally of surprises found, Light Trails' furthest arena, Bug Hunt's tally of finds, Sunset Drive's roads found, Stack Deploy's highest floor, Bumper Ring's furthest arena, Rapids Run's furthest dam, Hot Potato's furthest venue, Crossing Rush's furthest zone, Bounce Road's furthest stage, Ghoul Rush's most stages cleared in a run, Flock Dash's furthest stage), never shown to the agent), a built-in 24-topic Help, the app-only **Implementation Loop** (a **Loop** checkbox on Implement's confirm pane, disabled outside the app, and a setup screen drawn by the page, `public/screens/loop-setup.js`; the last setup remembered per project in `~/.plan2code/console/loop-setup.json`, owned by `loop-setup.mjs`; a page that locks while `state.loop.driving` is set, until the app posts `loopEnd`; a skill run with `--loop` reports a `loopOutcome` instead of asking for sign-off, per `notes/loop.md`), the app-only **Review Loop** (a **Loop** checkbox on Review's confirm pane, disabled outside the app, `screens/review-loop-setup.js`, the setup remembered in `~/.plan2code/console/review-loop-setup.json` owned by `review-loop-setup.mjs`; the app's `review_loop.rs` drives review-and-fix rounds, each a Review session opened with `--loop --round N --role` that reports a `roundOutcome` per `notes/review-loop.md`; its end screen is `publicLine truncated
One agent list and one lookup rule serve the launcher, the console and the app: `src/launcher/agents.json` (the built-ins and starter templates with per-OS install data) and `src/web-console/agent-lookup.mjs` (`loadAgentList()` and `findAgent()`, both copied by `install.js` into `~/.plan2code/bin/`); the app carries a Rust twin held to the same cases by `scripts/fixtures/agent-lookup-cases.json`.
+18
View File
@@ -4,6 +4,24 @@ 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. -->
## v3.2.6 (2026-12-04)
### ✨ Added
- **Web console**: when the Notes panel is stacked under the question (window 1080px wide or narrower), a drag handle on its top edge makes it taller or shorter; arrow keys nudge it, a double-click gives back the automatic height, and the size is kept between sessions.
### 🔧 Changed
- **Web console**: the dashboard's Implementation Loop and Review Loop cards are gone; Implement's and Review's confirm panes carry a Loop checkbox instead (app only, disabled outside the app and while a loop runs), whose Start opens the matching loop setup screen.
- **Skills**: every skill prompt, the console card and the Ask chat contract now say to reply in US English unless the person asks for another language, so replies and question cards stay in English when the person's messages or the project's files are not.
- **Desktop app**: when the skills are newer than the app, the bar now reads "Update to latest: vX.Y.Z" with an Update and restart button, instead of "Skills vX.Y.Z are newer than this app" with no way forward.
- **Launcher**: Devin's Balanced choice maps to Sonnet 5.5 Medium instead of SWE-2.1 High.
### 🐛 Fixed
- **Installer**: `plan2code update` and the app's Update and restart now fetch the desktop app again when `install.json` does not record it at this version, instead of stopping at Already on while the app file stays on an older release; the record keeps the app's version as `appVersion`, so a machine already on the app gets one app reinstall on its next update.
- **Web console**: after you press Finalize, Continue building, Fix together or Back to the dashboard on the Implementation Loop end screen, the button now shows a spinner and a working label and stays disabled until the page moves on; the Review Loop end screen's pressed button shows the same spinner.
## v3.2.5 (2026-12-03)
### 🔧 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.
Version 3.2.5 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
Version 3.2.6 · Apache 2.0 · 📖 [plan2code.jparkerweb.com](https://plan2code.jparkerweb.com)
---
+6 -6
View File
@@ -146,9 +146,9 @@ agent CLI.
## Implementation Loop
The Implementation Loop builds every remaining phase of a documented spec for you, one after another,
while you do something else. It is in the app only: the dashboard shows an **Implementation Loop**
card there, and nowhere else. Pick a spec, answer a short setup, press **Start the loop**, and the app
confirms it once in its own window before anything runs.
while you do something else. It is in the app only: with a spec picked, open **Implement** on the
dashboard, tick its **Loop** checkbox, and press **Set up Implementation Loop**. Answer a short setup,
press **Start the loop**, and the app confirms it once in its own window before anything runs.
![The Implementation Loop setup screen.](screenshots/loop-setup-dark.webp)
@@ -267,13 +267,13 @@ the quick check and the commits are the app's own. The finish screen counts each
the full report** opens it, saved as `specs/<feature>/LOOP-SUMMARY-<date>.md` (`-2` and so on for another
the same day). After a stop, **Read why, and the report so far** shows it on the stop screen. While a build
is unfinished it lives in `~/.plan2code/console/loop-reports.json`, not the project, because Continue building needs a
clean tree. The in-app **Help** has a matching topic, **Implementation Loop**, which the loop card links to as "How the loop works".
clean tree. The in-app **Help** has a matching topic, **Implementation Loop**, linked as **How the loop works** on the loop setup screen.
## Review Loop
The Review Loop reviews and fixes a finished change for you, round after round, while you do something
else. Like the Implementation Loop it is in the app only: the dashboard shows a **Review Loop** card beside
the Implementation Loop's, grayed out while either loop runs (one loop per window).
else. Like the Implementation Loop it is in the app only: open **Review** on the dashboard and tick its
**Loop** checkbox to reach the setup screen. The checkbox is disabled while either loop runs (one loop per window).
**How rounds work.** Round 1 reviews everything you chose. Every later round reviews only what the round
before it changed, so the work shrinks as it goes. Each round's reviewer is a fresh one that never saw the
+31 -12
View File
@@ -2942,7 +2942,8 @@ const INSTALL_PIECES = ['skills', 'launcher', 'app', 'statusline', 'metrics', 'b
const LAUNCHER_PICK_FOLDER_FLAG = '--pick-folder';
/**
* `~/.plan2code/install.json` as `{ version, scope, pieces }`, or null when missing or unparsable.
* `~/.plan2code/install.json` as `{ version, scope, pieces, appVersion? }`, or null when missing or unparsable.
* `appVersion` is the release the desktop app file is, set when the app is placed (see appCurrent()).
* `skipped` lists optional pieces (the desktop app) the person said no to, so an unattended
* `plan2code update` does not install them; it is left out of the file while empty.
*/
@@ -2960,12 +2961,15 @@ function readInstallRecord() {
let recordVersionHold = null;
/** 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 = recordVersionHold ? recordVersionHold.version : projectVersion.version) {
function writeInstallRecord(pieces, skipped = (readInstallRecord() || {}).skipped || [], version = recordVersionHold ? recordVersionHold.version : projectVersion.version, appVersion = (readInstallRecord() || {}).appVersion) {
const record = {
version,
scope: 'global',
pieces: [...new Set(pieces)].filter((piece) => INSTALL_PIECES.includes(piece)).sort(),
};
// Which release the desktop app file is, kept apart from `version`: that one is stamped by the
// skills step before the app is placed, so it cannot say whether the app file is current.
if (record.pieces.includes('app') && typeof appVersion === 'string' && appVersion) record.appVersion = appVersion;
const declined = [...new Set(skipped)].filter((piece) => INSTALL_PIECES.includes(piece) && !record.pieces.includes(piece)).sort();
if (declined.length > 0) record.skipped = declined;
const tmp = `${INSTALL_RECORD}.${process.pid}.tmp`;
@@ -3000,10 +3004,21 @@ function installedLauncherVersion() {
}
}
/** Add a piece after a successful global install. */
function recordInstalled(piece) {
/** Add a piece after a successful global install; `appVersion` names the release the desktop app file is. */
function recordInstalled(piece, { appVersion } = {}) {
const record = readInstallRecord();
writeInstallRecord([...(record ? record.pieces : []), piece]);
writeInstallRecord([...(record ? record.pieces : []), piece], undefined, undefined, appVersion);
}
/**
* Whether the desktop app file is the release `version`: true when the record lists no app, else
* only when it names that release. A record from before `appVersion` existed, or one an update
* stamped while the app stayed old, says no, so the next update fetches the app instead of
* stopping at "Already on".
*/
function appCurrent(version, record = readInstallRecord()) {
if (!record || !record.pieces.includes('app')) return true;
return record.appVersion === version;
}
/** Remember that an optional piece was declined. Needs a record: one holding no pieces would make update do nothing. */
@@ -3609,7 +3624,7 @@ async function installDesktopApp({ quiet = false, unattended = false, outcome =
} catch (error) {
return fail(`the file was verified but could not be put in ${APP_DIR} (${error.message}); close the app and try again.`);
}
recordInstalled('app');
recordInstalled('app', { appVersion: version });
outcome.appSize = bytes.length;
console.log(` ${COLORS.GREEN}${MARKS.DONE}${COLORS.RESET} Installed: ${APP_DEST}`);
console.log(` The app is not code-signed. ${appAllowLine()}`);
@@ -4154,12 +4169,13 @@ function releaseNotesUrl(version) {
* 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
* `force`, and only when the installed command's bin/version.json agrees with the record whenever
* the record lists `launcher`, and the canonical skills manifest and the shared console are complete
* for it whenever the record lists `skills`), one line per piece by its human name, then the release notes link and the restart
* the record lists `launcher`, the canonical skills manifest and the shared console are complete
* for it whenever the record lists `skills`, and the record names this version as the app's whenever it
* lists `app`), 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.
* Returns the exit code: 0 when every piece updated, 1 naming the pieces that failed.
*/
async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims, force = false, skillsCurrent = canonicalSkillsCurrent, consoleCurrent = sharedConsoleCurrent, progress = writeProgressToStdout, devTools = devToolCapabilities() } = {}) {
async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims, force = false, skillsCurrent = canonicalSkillsCurrent, consoleCurrent = sharedConsoleCurrent, appInPlaceFor = appCurrent, progress = writeProgressToStdout, devTools = devToolCapabilities() } = {}) {
const record = readInstallRecord();
const version = projectVersion.version;
const before = record && typeof record.version === 'string' ? record.version : null;
@@ -4175,7 +4191,10 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
// And the shared console the skills forward to: its folder complete for this version, named by
// console-dir, with no interrupted copy or backup of it left beside it.
const consoleInPlace = sameVersion && pieces.includes('skills') ? consoleCurrent(version) : true;
if (sameVersion && skillsInPlace && consoleInPlace && !force) {
// And the desktop app file: the record's version is stamped before the app step runs, so an app
// left on an older release under a new record would otherwise never be fetched.
const appInPlace = sameVersion && pieces.includes('app') ? appInPlaceFor(version, record) : true;
if (sameVersion && skillsInPlace && consoleInPlace && appInPlace && !force) {
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}`);
return 0;
@@ -4184,8 +4203,8 @@ async function update({ steps = UPDATE_STEPS, cleanShims = removeLegacyLoopShims
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 (sameVersion && (!skillsInPlace || !consoleInPlace) && !force) {
const unfinished = [!skillsInPlace && 'the installed skills do not match it on disk', !consoleInPlace && 'the shared console is not complete'].filter(Boolean).join(' and ');
if (sameVersion && (!skillsInPlace || !consoleInPlace || !appInPlace) && !force) {
const unfinished = [!skillsInPlace && 'the installed skills do not match it on disk', !consoleInPlace && 'the shared console is not complete', !appInPlace && `the desktop app is not recorded at ${version}`].filter(Boolean).join(' and ');
console.log(`${COLORS.DIM}${version} is installed, but ${unfinished}, so it is installed again.${COLORS.RESET}`);
}
if (!record) console.log(`${COLORS.DIM}No install record found; updating the skills and the plan2code command.${COLORS.RESET}`);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code",
"version": "3.2.5",
"version": "3.2.6",
"private": true,
"license": "Apache-2.0",
"engines": {
+2 -2
View File
@@ -957,7 +957,7 @@ dependencies = [
[[package]]
name = "fake-agent"
version = "3.2.5"
version = "3.2.6"
dependencies = [
"serde_json",
"terminal_size",
@@ -2647,7 +2647,7 @@ checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]]
name = "plan2code-app"
version = "3.2.5"
version = "3.2.6"
dependencies = [
"chrono",
"libc",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "fake-agent"
version = "3.2.5"
version = "3.2.6"
description = "A stand-in agent program for the Plan2Code app's tests"
edition = "2021"
publish = false
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "plan2code-app",
"version": "3.2.5",
"version": "3.2.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "plan2code-app",
"version": "3.2.5",
"version": "3.2.6",
"dependencies": {
"@tauri-apps/api": "2.12.4",
"@xterm/addon-fit": "0.11.0",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "plan2code-app",
"version": "3.2.5",
"version": "3.2.6",
"private": true,
"description": "Plan2Code desktop app (Tauri). Separate from the repo root so the root and the web console stay dependency-free.",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "plan2code-app"
version = "3.2.5"
version = "3.2.6"
description = "Plan2Code desktop app"
edition = "2021"
publish = false
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Plan2Code",
"version": "3.2.5",
"version": "3.2.6",
"identifier": "com.plan2code.desktop",
"build": {
"frontendDist": "../ui",
+16 -4
View File
@@ -110,6 +110,12 @@ export function lastAgentNotice(list, remembered) {
export function barNextSteps({ consoleDead = false, version = null, newRelease = null, updatedTo = null, notReplaced = null } = {}) {
const v = version || {};
const steps = [];
const rel = newRelease || {};
const notes = rel.latest ? { label: "What's new", url: releaseNotesUrl(rel.latest) } : null;
// A release that is merely out, with no update under way: while skills are ahead of the app,
// the lead step below offers it, so the same button is not shown twice.
const releasePlain = Boolean(rel.latest) && !rel.restartNeeded && rel.updating === undefined && !rel.failed;
let aheadOffersUpdate = false;
if (v.kind === 'updated') {
steps.push({ id: 'updated', text: 'Skills updated', title: 'Updated. Reconnect the console to use the new version.', tone: 'ok', action: 'restart-console' });
} else if (consoleDead) {
@@ -134,7 +140,15 @@ export function barNextSteps({ consoleDead = false, version = null, newRelease =
steps.push({ id: 'failed', text: 'Update failed', title: String(v.error || 'The update did not finish.'), tone: 'err', action: 'update' });
break;
case 'ahead':
steps.push({ id: 'ahead', text: `Skills v${v.skills} are newer than this app`, title: `The installed skills are v${v.skills}, newer than this app (v${v.app}). Get the new app.`, tone: 'warn', action: null });
// The skills are ahead of the app, so another Update skills run cannot help: the release's
// Update and restart replaces the app file. While that is under way, failed or waiting for
// a restart, its own step below says so instead.
if (releasePlain) {
steps.push({ id: 'ahead', text: `Update to latest: v${rel.latest}`, title: `The installed skills are v${v.skills}, newer than this app (v${v.app}). Update and restart installs v${rel.latest}; nothing needs a terminal.`, tone: 'warn', action: 'update-restart', link: notes });
aheadOffersUpdate = true;
} else if (!rel.latest) {
steps.push({ id: 'ahead', text: `App v${v.app} is older than the skills (v${v.skills})`, title: `The installed skills are v${v.skills}, newer than this app (v${v.app}). Get the new app.`, tone: 'warn', action: null });
}
break;
default:
break;
@@ -144,8 +158,6 @@ export function barNextSteps({ consoleDead = false, version = null, newRelease =
// `{ latest, failed: reason }`, `{ latest, restartNeeded: true }` (installed, waiting for the
// restart) or `{ problem }` (the check could not run); `updatedTo` is the version the app
// restarted into, shown once.
const rel = newRelease || {};
const notes = rel.latest ? { label: "What's new", url: releaseNotesUrl(rel.latest) } : null;
if (rel.latest) {
const latest = rel.latest;
if (rel.restartNeeded) {
@@ -155,7 +167,7 @@ export function barNextSteps({ consoleDead = false, version = null, newRelease =
steps.push({ id: 'new-release', text: line, title: line, tone: 'warn', busy: true, action: null });
} else if (rel.failed) {
steps.push({ id: 'new-release', text: 'Update failed', title: `${rel.failed} Plan2Code is still running as it was. You can try again, or run \`${NEW_RELEASE_COMMAND}\` in a terminal.`, tone: 'err', action: 'update-restart', link: notes });
} else {
} else if (!aheadOffersUpdate) {
steps.push({ id: 'new-release', text: `Update available: v${latest}`, title: `Plan2Code v${latest} is out. Update and restart installs it; nothing needs a terminal.`, tone: 'warn', action: 'update-restart', link: notes });
}
} else if (rel.problem) {
+19
View File
@@ -124,6 +124,25 @@ export async function openSession(browser, { t, workflow, payload: first, projec
return s;
}
// Stands a real window in for the desktop app that frames the page, listening
// to what the page tells it (kept in window.__told); the returned function
// replies the way the app's window does.
export async function frameInFakeApp(s) {
await s.page.evaluate(() => {
const frame = document.createElement("iframe");
frame.hidden = true;
document.body.appendChild(frame);
const app = frame.contentWindow;
window.__told = [];
app.postMessage = (message) => window.__told.push(message);
Object.defineProperty(window, "parent", { value: app, configurable: true });
});
return (data) =>
s.page.evaluate((message) => {
window.dispatchEvent(new MessageEvent("message", { source: window.parent, data: message }));
}, data);
}
// Waits until the document has not changed for `quietMs`, or `maxMs` at most (a page that never
// goes quiet must not block a test). Counts mutations in the page and polls the count from
// here, so it needs no timer in the page.
+10
View File
@@ -119,6 +119,16 @@ test("each version state reads and acts as the old version bar did", () => {
const [ahead] = barNextSteps({ version: { kind: "ahead", skills: "3.2.0", app: "3.1.0" } });
assert.equal(ahead.action, null, "another Update skills run cannot help when the skills are ahead");
assert.match(ahead.title, /newer than this app \(v3\.1\.0\)\. Get the new app\./);
assert.equal(ahead.text, "App v3.1.0 is older than the skills (v3.2.0)", "no release known: the plain facts, never 'Skills ... are newer'");
// A release is out: the same step offers Update and restart, and the release step is not shown twice.
const leadSteps = barNextSteps({ version: { kind: "ahead", skills: "3.2.5", app: "3.2.4" }, newRelease: { latest: "3.2.5" } });
assert.deepEqual(leadSteps.map((step) => [step.id, step.text, step.action]), [["ahead", "Update to latest: v3.2.5", "update-restart"]]);
assert.match(leadSteps[0].title, /Update and restart installs v3\.2\.5/);
assert.equal(leadSteps[0].link.label, "What's new");
// While it runs, fails or waits for the restart, the release's own step says so, with no second button.
for (const newRelease of [{ latest: "3.2.5", updating: "Downloading" }, { latest: "3.2.5", failed: "No." }, { latest: "3.2.5", restartNeeded: true }]) {
assert.deepEqual(barNextSteps({ version: { kind: "ahead", skills: "3.2.5", app: "3.2.4" }, newRelease }).map((step) => step.id), ["new-release"]);
}
const [updating] = barNextSteps({ version: { kind: "updating", line: "Installing skills (4 of 9)" } });
assert.deepEqual([updating.text, updating.busy, updating.action], ["Installing skills (4 of 9)", true, null], "no button while it runs");
const [remains] = barNextSteps({ version: { kind: "remains", skills: "3.0.0", app: "3.1.0" } });
+1 -1
View File
@@ -25,7 +25,7 @@ const OUTSIDE_APP = Object.fromEntries(
export const BUDGETS = {
// The card an agent reads once per session.
card: { "console.md": 9700 },
card: { "console.md": 9800 },
// Each topic file under notes/, read when its workflow starts.
notes: {
"changelog.md": 1400,
+39
View File
@@ -97,6 +97,20 @@ test("install record: recordInstalled and forgetInstalled round trip a sorted se
assert.deepEqual(fs.readdirSync(path.dirname(RECORD)), ["install.json"]);
});
test("install record: appVersion belongs to the app piece, survives other writes and goes with the piece", () => {
clearRecord();
installer.recordInstalled("skills");
installer.recordInstalled("app", { appVersion: "9.9.9" });
assert.equal(installer.readInstallRecord().appVersion, "9.9.9");
installer.recordInstalled("launcher");
installer.recordInstalled("statusline");
assert.equal(installer.readInstallRecord().appVersion, "9.9.9", "another piece's write keeps it");
installer.forgetInstalled("statusline");
assert.equal(installer.readInstallRecord().appVersion, "9.9.9");
installer.forgetInstalled("app");
assert.equal("appVersion" in installer.readInstallRecord(), false, "no app, no appVersion");
});
test("install record: a missing or unparsable record reads as null, and forgetting needs none", () => {
clearRecord();
installer.forgetInstalled("skills");
@@ -279,6 +293,30 @@ test("update: a record on the new version over an older plan2code command instal
assert.deepEqual(idle.ran(), []);
});
test("update: a record on the new version over an app that was never recorded at it installs the app again, without --force", async () => {
// The stuck state: skills and command are new, the app file is still an older release's, and the record already says new.
writeLauncherVersion(VERSION);
for (const appVersion of [undefined, "1.0.0"]) {
fs.mkdirSync(path.dirname(RECORD), { recursive: true });
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["app", "launcher", "skills"], ...(appVersion ? { appVersion } : {}) }));
const fake = fakeSteps();
const { code, out } = await runUpdate(fake.steps);
assert.equal(code, 0, out);
assert.doesNotMatch(out, /Already on/);
assert.match(out, /desktop app is not recorded at/);
assert.deepEqual(fake.ran(), ["skills", "app"]);
}
// The app recorded at this version is in place: nothing to do.
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["app", "launcher", "skills"], appVersion: VERSION }));
const idle = fakeSteps();
assert.match((await runUpdate(idle.steps)).out, /Already on/);
assert.deepEqual(idle.ran(), []);
// A record without the app never asks about it.
fs.writeFileSync(RECORD, JSON.stringify({ version: VERSION, scope: "global", pieces: ["launcher", "skills"] }));
const noApp = fakeSteps();
assert.match((await runUpdate(noApp.steps)).out, /Already on/);
});
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 = [];
@@ -824,6 +862,7 @@ test("app installed: the file is downloaded, verified, placed and recorded", { s
assert.equal(outcome.app, true);
assert.deepEqual(fs.readFileSync(installer.APP_DEST), bytes);
assert.deepEqual(installer.readInstallRecord().pieces, ["app", "launcher", "skills"]);
assert.equal(installer.readInstallRecord().appVersion, VERSION, "the record says which release the app file is");
assert.deepEqual(fs.readdirSync(APP_DIR), [path.basename(installer.APP_DEST)], "no temp or .old file is left");
assert.match(out, /Downloading the desktop app \(1 KB\)\.\.\./, "piped: the size, on one plain line");
assert.match(out, /not code-signed/);
+181 -1
View File
@@ -11,7 +11,7 @@ import fs from "node:fs";
import path from "node:path";
import test from "node:test";
import assert from "node:assert/strict";
import { pageSuite, openSession, tempProject, textOf, styleOf } from "./page-test-helpers.mjs";
import { pageSuite, openSession, tempProject, textOf, styleOf, frameInFakeApp } from "./page-test-helpers.mjs";
import { cli, until, CONSOLE_CLI, HOME, JPEG } from "./web-console-test-helpers.mjs";
import { addImage, createTab, deleteTab, markTabSent, saveNote } from "../src/web-console/notepads.mjs";
import { steadyColumns } from "../src/web-console/public/card-rows.js";
@@ -922,3 +922,183 @@ test("with the flag set the dashboard shows the quiet extras line", async (t) =>
await line.waitFor();
assert.match(await textOf(line), /Two optional extras: set your role, switch on Learning\./);
});
// The Loop box: Implement's and Review's confirm panes carry a Loop checkbox
// that opens the desktop app's matching loop setup screen in place of a
// launch. NOTE_PROJECT's documented spec (ready) is the only one here, so the
// picker opens on it and Implement's card is lit.
const LOOP_PROJECT = {
"AGENTS.md": DRAFT_PROJECT["AGENTS.md"],
"specs/ready/overview.md": NOTE_PROJECT["specs/ready/overview.md"],
"specs/ready/phase-1.md": NOTE_PROJECT["specs/ready/phase-1.md"],
};
const IMPLEMENT_LOOP_BOX = "Build every phase unattended (Implementation Loop)";
const REVIEW_LOOP_BOX = "Review and fix in rounds (Review Loop)";
const REVIEW_BOX = "Review each phase with a fresh agent before sign-off";
// The dashboard on LOOP_PROJECT, under the app (PLAN2CODE_IN_APP=1, framed
// by a fake app) or in a plain browser, with the picker on `ready`.
async function openLoopMenu(t, { inApp }) {
const s = await openSession(await suite.browser(), {
t,
workflow: "dashboard",
payload: MENU,
project: tempProject(LOOP_PROJECT),
...(inApp ? { env: { PLAN2CODE_IN_APP: "1" } } : {}),
});
const main = await toTheMenu(s);
if (inApp) await frameInFakeApp(s);
await pickedChip(main, "ready").waitFor();
return { s, main };
}
// Opens `command`'s card on the menu, landing on its confirm pane.
async function openPane(main, command) {
await lightOf(main, command).click();
await main.getByRole("button", { name: "Back" }).waitFor();
}
async function backToMenu(main) {
await main.getByRole("button", { name: "Back" }).click();
await main.getByRole("heading", { name: "What are we doing today?" }).waitFor();
}
// A checkbox's own `disabled`, read in the page: Playwright's isDisabled()
// also counts aria-disabled.
const disabledOf = (box) => box.evaluate((input) => input.disabled);
// What the page holds in `page.<key>`, read through its own state module.
const pageField = (s, key) =>
s.page.evaluate(async (name) => {
const { page } = await import(new URL("state.js", document.baseURI).href);
return JSON.parse(JSON.stringify(page[name] ?? null));
}, key);
// Sets `loop` on the page's copy of the session state and redraws, the way a
// state frame from a loop-driven session would. The server only locks
// implement, implement-review and review sessions with `open --loop`, so the
// dashboard's pane is driven from the page.
async function setLoop(s, loop) {
await s.page.evaluate(async (value) => {
const { page, redraw } = await import(new URL("state.js", document.baseURI).href);
page.S = { ...page.S, loop: value };
redraw();
}, loop);
}
test("under the app, Implement's Loop box is enabled, grays the Review box and swaps the command and Start while ticked", async (t) => {
const { main } = await openLoopMenu(t, { inApp: true });
await openPane(main, "/plan2code-3-implement");
const loop = main.getByRole("checkbox", { name: IMPLEMENT_LOOP_BOX });
const review = main.getByRole("checkbox", { name: REVIEW_BOX });
const cmd = main.locator(".confirm-cmd code");
assert.equal(await disabledOf(loop), false, "the Loop box is enabled in the app");
assert.equal(await loop.isChecked(), false, "the Loop box starts unticked");
assert.equal(await main.locator(".confirm-loop-off").count(), 0, "no reason line while it is enabled");
const command = await textOf(cmd);
assert.match(command, /^\/plan2code-3-implement/);
await main.getByRole("button", { name: "Start Implement" }).waitFor();
await loop.check();
assert.equal(await disabledOf(review), true, "ticking Loop grays the Review box");
assert.equal(await textOf(cmd), "Desktop app only");
await main.getByRole("button", { name: "Set up Implementation Loop" }).waitFor();
assert.equal(await main.getByRole("button", { name: "Start Implement" }).count(), 0, "Start names the loop");
await loop.uncheck();
assert.equal(await disabledOf(review), false, "unticking Loop gives the Review box back");
assert.equal(await textOf(cmd), command, "the command line comes back");
await main.getByRole("button", { name: "Start Implement" }).waitFor();
assert.equal(await main.getByRole("button", { name: "Set up Implementation Loop" }).count(), 0);
});
test("under the app, Start on Implement with Loop ticked opens the Implementation Loop setup for the picked spec", async (t) => {
const { s, main } = await openLoopMenu(t, { inApp: true });
await openPane(main, "/plan2code-3-implement");
await main.getByRole("checkbox", { name: IMPLEMENT_LOOP_BOX }).check();
await main.getByRole("button", { name: "Set up Implementation Loop" }).click();
await s.page.locator("#loop-start").waitFor();
assert.equal((await pageField(s, "loopSetup"))?.spec, "specs/ready");
assert.equal(await textOf(main.locator(".confirm-spec code")), "specs/ready", "the setup screen names the picker's spec");
assert.equal(s.wait(1).code, 10, "nothing was launched");
});
test("under the app, Review's Loop box is enabled and Start opens the Review Loop setup with the spec filled in", async (t) => {
const { s, main } = await openLoopMenu(t, { inApp: true });
await openPane(main, "/plan2code-review");
const loop = main.getByRole("checkbox", { name: REVIEW_LOOP_BOX });
assert.equal(await disabledOf(loop), false, "the Loop box is enabled in the app");
await main.getByRole("button", { name: "Start Review" }).waitFor();
await loop.check();
await main.getByRole("button", { name: "Set up Review Loop" }).click();
await s.page.locator("#review-loop-start").waitFor();
const setup = await pageField(s, "reviewLoopSetup");
assert.equal(setup?.spec, "specs/ready", "the setup opened for the picker's spec");
assert.equal(setup?.form?.spec, "specs/ready", "the picker's spec fills the setup's spec");
assert.equal(s.wait(1).code, 10, "nothing was launched");
});
test("outside the app, both Loop boxes are grayed with the desktop-app line, and Start still launches", async (t) => {
// A launch ends the menu, so each pane gets a session of its own.
// Review's card takes no spec, so its launch carries none.
for (const [command, name, title, skill, spec] of [
["/plan2code-3-implement", IMPLEMENT_LOOP_BOX, "Implement", "plan2code-3-implement-review", "specs/ready"],
["/plan2code-review", REVIEW_LOOP_BOX, "Review", "plan2code-review", undefined],
]) {
const { s, main } = await openLoopMenu(t, { inApp: false });
await openPane(main, command);
const loop = main.getByRole("checkbox", { name });
assert.equal(await disabledOf(loop), true, `${title}'s Loop box is grayed outside the app`);
await loop.click({ force: true });
assert.equal(await loop.isChecked(), false, "a press on the grayed box ticks nothing");
assert.equal(await textOf(main.locator(".confirm-loop-off")), "Runs only in the Plan2Code desktop app.");
if (title === "Implement") assert.equal(await disabledOf(main.getByRole("checkbox", { name: REVIEW_BOX })), false, "the Review box stays usable");
await main.getByRole("button", { name: `Start ${title}` }).click();
const launch = collect(s).actions.find((a) => a.i === "__launch");
assert.ok(launch, `Start launched ${title}`);
assert.deepEqual({ skill: launch.skill, spec: launch.spec }, { skill, spec });
}
});
test("no Implementation Loop or Review Loop card is drawn, in the app or outside it", async (t) => {
for (const inApp of [true, false]) {
const { main } = await openLoopMenu(t, { inApp });
await hideUnavailable(main, false);
const titles = (await main.locator(".dash-card .dash-card-title").allInnerTexts()).map((title) => title.trim());
assert.ok(titles.includes("Implement") && titles.includes("Review"), `the cards the boxes ride on are drawn: ${titles.join(", ")}`);
for (const gone of ["Implementation Loop", "Review Loop"]) {
assert.equal(titles.includes(gone), false, `no ${gone} card ${inApp ? "in the app" : "outside it"}`);
}
}
});
test("while a loop runs, both Loop boxes are grayed with the running line", async (t) => {
const { s, main } = await openLoopMenu(t, { inApp: true });
for (const [command, name] of [
["/plan2code-3-implement", IMPLEMENT_LOOP_BOX],
["/plan2code-review", REVIEW_LOOP_BOX],
]) {
await openPane(main, command);
const loop = main.getByRole("checkbox", { name });
assert.equal(await disabledOf(loop), false, `${command}'s box is enabled before the loop starts`);
await setLoop(s, { driving: true });
const reason = main.locator(".confirm-loop-off");
await reason.waitFor();
assert.equal(await textOf(reason), "A loop is running. Stop it from the banner at the top of the window first.");
assert.equal(await disabledOf(loop), true, `${command}'s box is grayed while a loop runs`);
await loop.click({ force: true });
assert.equal(await loop.isChecked(), false, "a press on the grayed box ticks nothing");
await setLoop(s, null);
await reason.waitFor({ state: "detached" });
await backToMenu(main);
}
});
+41
View File
@@ -51,3 +51,44 @@ test("the one-column layout (900px and narrower) keeps its page scroll", async (
const narrow = await s.page.evaluate(() => getComputedStyle(document.documentElement).overflowY);
assert.equal(narrow, "visible", "its content sits under the first screen, so the lock must not apply");
});
test("a stacked Notes panel has a handle that drags its height, keeps it and resets on double-click", async (t) => {
const s = await openSession(await suite.browser(), { t, workflow: "plan", payload: PLAN_QUESTION });
await s.page.setViewportSize({ width: 1000, height: 700 });
await s.page.locator("#main [data-item=\"q1\"]").first().waitFor();
const grip = s.page.locator("#aside .aside-grip");
await grip.waitFor();
const asideHeight = async () => Math.round((await s.page.locator("#aside").boundingBox()).height);
const auto = await asideHeight();
const drag = async (dy) => {
const box = await grip.boundingBox();
const x = box.x + box.width / 2;
const y = box.y + box.height / 2;
await s.page.mouse.move(x, y);
await s.page.mouse.down();
await s.page.mouse.move(x, y + dy / 2, { steps: 4 });
await s.page.mouse.move(x, y + dy, { steps: 4 });
await s.page.mouse.up();
};
await drag(-120);
const taller = await asideHeight();
assert.ok(taller >= auto + 100, `dragging the handle up makes the panel taller (${auto} -> ${taller})`);
await s.page.waitForFunction((h) => Number(document.querySelector("#aside .aside-grip").getAttribute("aria-valuenow")) === h, taller);
await drag(60);
const shorter = await asideHeight();
assert.ok(shorter <= taller - 40 && shorter >= 96, `dragging it down makes the panel shorter (${taller} -> ${shorter})`);
// Kept with the saved looks, so the next session opens at this height.
const saved = async () => s.page.evaluate(async () => (await (await fetch("/looks")).json()).looks?.asideHeight);
await s.page.waitForFunction(async (h) => (await (await fetch("/looks")).json()).looks?.asideHeight === h, shorter);
assert.equal(await saved(), shorter, "the height is kept in the saved looks");
await grip.dblclick();
assert.equal(await asideHeight(), auto, "a double-click goes back to the automatic height");
assert.equal(await s.page.evaluate(() => document.documentElement.hasAttribute("data-aside-h")), false);
await s.page.setViewportSize({ width: 1400, height: 700 });
assert.equal(await grip.isVisible(), false, "side by side, the panel has no handle");
});
+49 -21
View File
@@ -1,6 +1,6 @@
// Page tests for the Implementation Loop's setup screen. The dashboard card
// that opens it only shows inside the desktop app, so these open the screen
// through its own module, then drive the real page. Run with:
// Page tests for the Implementation Loop's setup screen. Its Loop box only
// enables inside the desktop app, so these open the screen through its own
// module, then drive the real page. Run with:
// node --test scripts/test-web-console-page-loop.mjs
import test from "node:test";
@@ -8,7 +8,7 @@ import assert from "node:assert/strict";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { pageSuite, openSession, tempProject, textOf } from "./page-test-helpers.mjs";
import { pageSuite, openSession, tempProject, textOf, frameInFakeApp } from "./page-test-helpers.mjs";
import { MODELS_DIR } from "./web-console-test-helpers.mjs";
const suite = pageSuite(test);
@@ -112,23 +112,6 @@ test("the web address field shows the name only beside an address, warns while t
assert.equal(reread.remembered, true);
});
// Stands a real window in for the app that frames the page, listening to what
// the page tells it; `answer` then replies the way the app's window does.
async function frameInFakeApp(s) {
await s.page.evaluate(() => {
const frame = document.createElement("iframe");
frame.hidden = true;
document.body.appendChild(frame);
const app = frame.contentWindow;
window.__told = [];
app.postMessage = (message) => window.__told.push(message);
Object.defineProperty(window, "parent", { value: app, configurable: true });
});
return (data) =>
s.page.evaluate((message) => {
window.dispatchEvent(new MessageEvent("message", { source: window.parent, data: message }));
}, data);
}
test("Cancel in the app's confirm leaves Start ready to press again; a real start locks it", async (t) => {
const s = await openSetup(t);
@@ -459,6 +442,51 @@ test("after Continue building replaces the Ask agent, the same stop again offers
assert.deepEqual(seen.told, ["loop-ask", "loop-resume"]);
});
const FINISHED = { kind: "finished", line: "All 1 phases built", phases: [{ n: 1, name: "API", commit: "abc1234" }], uncommitted: [], can: ["finalize", "dashboard"] };
test("a pressed Finalize shows a spinner and stays busy after the app's ok answer, and an error frees it", async (t) => {
const s = await openSetup(t);
await frameInFakeApp(s);
const seen = await s.page.evaluate(async (end) => {
const m = await import(new URL("screens/ending.js", document.baseURI).href);
const { page } = await import(new URL("state.js", document.baseURI).href);
const read = () => {
const card = m.renderLoopEnd(end);
const choices = [...card.querySelectorAll(".loop-end-choice")];
const of = (text) => choices.find((c) => c.querySelector("button").textContent.includes(text));
const fin = of("Finalize") || of("Starting Finalize");
const home = of("dashboard");
const b = fin.querySelector("button");
return {
busy: b.classList.contains("is-busy"),
disabled: b.disabled,
spinner: Boolean(b.querySelector(".spinner")),
label: b.textContent,
hint: fin.querySelector(".loop-end-hint").textContent,
otherDisabled: home.querySelector("button").disabled,
};
};
const before = read();
m.renderLoopEnd(end).querySelector(".loop-end-actions button").click();
const waiting = read();
page.loopAction = { kind: "loop-finalize-result", ok: true, error: null };
const started = read();
page.loopAction = { kind: "loop-finalize-result", ok: false, error: "no" };
const failed = read();
m.forgetLoopEnd();
page.loopAction = null;
return { before, waiting, started, failed, told: window.__told.map((x) => x.plan2code) };
}, FINISHED);
assert.deepEqual([seen.before.busy, seen.before.disabled], [false, false]);
for (const phase of [seen.waiting, seen.started]) {
assert.deepEqual([phase.busy, phase.disabled, phase.spinner, phase.otherDisabled], [true, true, true, true]);
assert.equal(phase.label, "Starting Finalize…");
assert.match(phase.hint, /starting in the terminal/);
}
assert.deepEqual([seen.failed.busy, seen.failed.disabled, seen.failed.label], [false, false, "Finalize"], "an error gives the button back");
assert.deepEqual(seen.told, ["loop-finalize"]);
});
// A real loop session: `open --loop` under the app's signal stamps the lock.
async function openLoopPage(t) {
return openSession(await suite.browser(), {
+5 -22
View File
@@ -1,7 +1,7 @@
// Page tests for the Review Loop's setup screen. The dashboard card that opens
// it only shows inside the desktop app, so these open the screen through its
// own module, then drive the real page, the way test-web-console-page-loop.mjs
// does for the Implementation Loop's. Run with:
// Page tests for the Review Loop's setup screen. Its Loop box only enables
// inside the desktop app, so these open the screen through its own module,
// then drive the real page, the way test-web-console-page-loop.mjs does for
// the Implementation Loop's. Run with:
// node --test scripts/test-web-console-page-review-loop.mjs
import test from "node:test";
@@ -9,7 +9,7 @@ import assert from "node:assert/strict";
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import { pageSuite, openSession, tempProject, textOf } from "./page-test-helpers.mjs";
import { pageSuite, openSession, tempProject, textOf, frameInFakeApp } from "./page-test-helpers.mjs";
import { MODELS_DIR } from "./web-console-test-helpers.mjs";
const ROOT = path.dirname(path.dirname(fileURLToPath(import.meta.url)));
@@ -26,23 +26,6 @@ const MENU = { menu: { note: "Ready when you are." }, agent: { status: "waiting"
const FACTS = { agent: "claude", agentLabel: "Claude Code", helpers: true, strengthsMapped: true, running: false, promptSupport: true, notifyKind: "query", notifyUrl: "", notifyParam: "message" };
// Stands a real window in for the app that frames the page, listening to what
// the page tells it; the returned function replies the way the app does.
async function frameInFakeApp(s) {
await s.page.evaluate(() => {
const frame = document.createElement("iframe");
frame.hidden = true;
document.body.appendChild(frame);
const app = frame.contentWindow;
window.__told = [];
app.postMessage = (message) => window.__told.push(message);
Object.defineProperty(window, "parent", { value: app, configurable: true });
});
return (data) =>
s.page.evaluate((message) => {
window.dispatchEvent(new MessageEvent("message", { source: window.parent, data: message }));
}, data);
}
// The installed copy of the shipped model menu, with its strengths, as install.js drops it.
function installShippedModels() {
+30 -13
View File
@@ -19,7 +19,8 @@ import {
isWorkflow,
isAgentless,
} from "../src/web-console/public/skills.js";
import { APP_ONLY_ENTRIES, REVIEW_LOOP_ENTRY, cardAvailability, CONSOLE_WORKFLOWS, SKILL_CATALOG, catalogEntry, launchVariant, START_POSES, WORKFLOW_LABEL, dashNoteKind, onInitialPick, startPose, startingHint } from "../src/web-console/public/answers.js";
import * as ANSWERS from "../src/web-console/public/answers.js";
import { cardAvailability, CONSOLE_WORKFLOWS, loopBoxState, loopFor, OUTSIDE_APP_LINE, SKILL_CATALOG, catalogEntry, launchVariant, START_POSES, WORKFLOW_LABEL, dashNoteKind, onInitialPick, startPose, startingHint } from "../src/web-console/public/answers.js";
import { LAUNCH_COUNTED, PROGRESS_WORKFLOWS } from "../src/web-console/public/meter.js";
import { BUILD_WORKFLOWS } from "../src/web-console/public/labels.js";
import { helpTabFor } from "../src/web-console/public/help.js";
@@ -428,8 +429,9 @@ test("helper-strength.md ships in the eighteen skills that start helpers (the da
]);
});
// The Implementation Loop and the Review Loop are cards the desktop app offers,
// not skills: neither has a workflow, so no list built from the workflows may hold them.
// The Implementation Loop and the Review Loop are features the desktop app
// offers, not skills: neither has a workflow, so no list built from the
// workflows may hold them, and neither draws a card of its own.
test("the app-only Implementation Loop and Review Loop entries stay out of every workflow list", () => {
const apps = EVERY_ENTRY.filter((s) => s.appOnly);
assert.deepEqual(apps.map((s) => s.skill), ["plan2code-loop", "plan2code-review-loop"], "both, the Implementation Loop first");
@@ -439,23 +441,38 @@ test("the app-only Implementation Loop and Review Loop entries stay out of every
assert.ok(!isWorkflow(entry.skill));
assert.equal(skillByName(entry.skill), null);
assert.ok(!CONSOLE_WORKFLOWS.includes(entry.command), "no console page is offered for it");
assert.ok(!SKILL_CATALOG.some((e) => e.skill === entry.skill), "the dashboard draws it apart from the catalog");
assert.ok(!SKILL_CATALOG.some((e) => e.skill === entry.skill), "the catalog leaves it out");
assert.equal(entry.subagents, null);
assert.equal(entry.card.group, "pipeline", "beside the Implementation Loop");
assert.equal(entry.card, null, "no card: its parent card's Loop box opens it");
}
assert.ok(!WORKFLOWS.includes(null) && !isWorkflow(null));
assert.ok(!("null" in WORKFLOW_LABEL));
assert.deepEqual([...apps[0].states], ["documented", "building"]);
assert.equal(apps[1].states, "any", "a Review Loop needs no spec");
assert.equal(apps[1].card.title, "Review Loop");
assert.equal(apps[1].card.blurb, "Review and fix in rounds on its own, each round checked by a fresh reviewer.");
});
test("the Review card carries the app-only pointer line, and the app-only cards are the dashboard's extras", () => {
test("Implement's and Review's cards name the loop their Loop box opens, and no card carries an app-only line", () => {
const byId = (skill) => SKILL_CATALOG.find((e) => e.skill === skill);
assert.equal(byId("plan2code-3-implement").loop, "plan2code-loop");
assert.equal(byId("plan2code-review").loop, "plan2code-review-loop");
assert.deepEqual(SKILL_CATALOG.filter((e) => e.loop).map((e) => e.skill), ["plan2code-3-implement", "plan2code-review"], "no other card has a Loop box");
assert.equal(loopFor(byId("plan2code-3-implement")).name, "Implementation Loop");
assert.equal(loopFor(byId("plan2code-review")).name, "Review Loop");
assert.equal(loopFor(byId("plan2code-4-finalize")), null);
assert.deepEqual(EVERY_ENTRY.filter((s) => s.card && s.card.appNote).map((s) => s.skill), [], "no entry carries appNote");
assert.ok(!("APP_ONLY_ENTRIES" in ANSWERS) && !("REVIEW_LOOP_ENTRY" in ANSWERS) && !("LOOP_ENTRY" in ANSWERS), "the app-only card entries are gone");
});
test("the Loop box: grayed outside the app and while a loop runs, else the loop's own availability", () => {
const implement = SKILL_CATALOG.find((e) => e.skill === "plan2code-3-implement");
const review = SKILL_CATALOG.find((e) => e.skill === "plan2code-review");
assert.equal(review.appNote, "In the app, the Review Loop runs review and fix rounds on its own.");
assert.deepEqual(SKILL_CATALOG.filter((e) => e.appNote).map((e) => e.skill), ["plan2code-review"], "no other card has one");
assert.deepEqual(APP_ONLY_ENTRIES.map((e) => e.skill), ["plan2code-loop", "plan2code-review-loop"]);
assert.equal(REVIEW_LOOP_ENTRY.command, "Desktop app only");
assert.equal(cardAvailability(REVIEW_LOOP_ENTRY, { hasAgents: true }, null).on, true, "lit for any project state");
const scanned = { hasAgents: true };
const documented = { dir: "specs/x", state: "documented" };
assert.deepEqual(loopBoxState(implement, scanned, documented, { inApp: false, driving: false }), { on: false, reason: OUTSIDE_APP_LINE });
const running = loopBoxState(review, scanned, null, { inApp: true, driving: true });
assert.equal(running.on, false);
assert.match(running.reason, /A loop is running/);
assert.equal(loopBoxState(implement, scanned, documented, { inApp: true, driving: false }).on, true);
assert.equal(loopBoxState(implement, scanned, null, { inApp: true, driving: false }).on, false, "the Implementation Loop needs a documented or building spec");
assert.equal(loopBoxState(review, scanned, null, { inApp: true, driving: false }).on, true, "the Review Loop is lit for any project state");
});
-4
View File
@@ -411,10 +411,6 @@ test("help: each loop's link opens its own Help topic", () => {
const ids = HELP_TABS.map((t) => t.id);
assert.ok(ids.includes("review-loop"), "Help has a Review Loop topic");
assert.equal(HELP_TABS[ids.indexOf("review-loop")].label, "Review Loop");
const dash = publicSource("screens/dashboard.js");
const link = dash.match(/function loopHelpLink\(entry\) \{([\s\S]*?)\n\}/);
assert.ok(link, "dashboard.js has loopHelpLink");
assert.match(link[1], /openHelpOn\(review \? "review-loop" : "loop"\)/, "the dashboard's Review Loop link opens Review Loop, the other opens Implementation Loop");
const setup = publicSource("screens/review-loop-setup.js");
assert.match(setup, /"How the Review Loop works"/, "the Review Loop setup screen names its own loop");
assert.match(setup, /openHelpOn\("review-loop"\)/, "the Review Loop setup screen opens Review Loop");
+1
View File
@@ -65,6 +65,7 @@ test("state: the rest of the shared state starts as app.js always started it", (
prototypes: { key: null, files: [], open: null, texts: {} },
wake: null,
dashPick: null,
dashLoop: false,
mentionPop: null,
heldPose: null,
newQuestions: new Set(),
+6
View File
@@ -75,6 +75,12 @@ const AMBIENT_ENV_KEYS = [
"SSH_CONNECTION",
"PLAN2CODE_PICKER_ECHO",
"PLAN2CODE_NOW",
// Set by the desktop app for its own terminal: a run from inside the app
// would otherwise frame every plain-browser test as in the app.
"PLAN2CODE_IN_APP",
"PLAN2CODE_CONSOLE_SID",
"PLAN2CODE_APP_ANNOUNCE",
"PLAN2CODE_APP_TOKEN",
];
const scrubbed = { ...process.env };
for (const k of AMBIENT_ENV_KEYS) delete scrubbed[k];
+1 -1
View File
@@ -194,7 +194,7 @@
"model": "swe-2-flash-high"
},
"balanced": {
"model": "swe-2-1-high"
"model": "claude-sonnet-5-5-medium"
},
"best": {
"model": "claude-opus-5-5-medium"
+2
View File
@@ -1,5 +1,7 @@
# 🧭 PATHFINDER MODE
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
Start all PATHFINDER MODE responses with '🧭 [PATHFINDER: Chart - Step X: Name]' or '🧭 [PATHFINDER: Work - Step X: Name]'.
## Role
+2
View File
@@ -2,6 +2,8 @@
Start all PLANNING MODE responses with '🤔 [PLANNING PHASE X: Phase Name]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Senior software architect and technical PM. Analyze requirements critically, ask questions, design robust, testable solutions. Output: SOW and Implementation Plan. Do NOT write code - plan and architect only.
+2
View File
@@ -2,6 +2,8 @@
Start all REVISION MODE responses with '🔄 [REVISION]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Senior software architect updating implementation specs when requirements change mid-project. **Output: spec-file edits only — never implementation.**
+2
View File
@@ -2,6 +2,8 @@
Start all DOCUMENTATION MODE responses with '📝 [DOCUMENTATION]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Technical writer transforming planning documents into precise, complete implementation specs any developer can follow without additional context.
+2
View File
@@ -1,5 +1,7 @@
# ⚡ IMPLEMENT + REVIEW MODE
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
Start implementation responses with `⚡ [PHASE X: Phase Name]`. Start the review transition and review responses with `🔬 [Review Mode]` as directed by the review workflow. Return to the implementation header for final sign-off.
## Role
+2
View File
@@ -2,6 +2,8 @@
Start all IMPLEMENTATION MODE responses with '⚡ [PHASE X: Phase Name]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Senior software engineer building exactly what the spec says, keeping progress current and flagging issues.
+2
View File
@@ -2,6 +2,8 @@
Start all FINALIZATION MODE responses with '🧹 [FINALIZATION STEP X: Step Name]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
QA engineer and technical lead performing rigorous final validation. Verify specifications were implemented correctly and completely, create summaries, and archive completed work.
+2
View File
@@ -2,6 +2,8 @@
Start all CHANGELOG MODE responses with '📝'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Careful release scribe. Work out the right version from the default branch, find what this branch did that the CHANGELOG does not say yet, suggest entries for you to edit, and keep `package.json` in step. Nothing is written without a yes, and nothing is committed here.
+2
View File
@@ -2,6 +2,8 @@
Start all DEAD CODE MODE responses with '💀 [DEAD CODE]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## 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 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.
+2
View File
@@ -2,6 +2,8 @@
Start all UPDATE DEPENDENCIES MODE responses with '📦 [UPDATE DEPENDENCIES]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Finds the outdated dependencies in the person's own project, labels each update Safe (should just work), Check first (likely fine, worth a look) or Warning (your code probably needs changing) with its reason, applies only the updates the person picks, in groups, runs the project's install and checks after each group, and undoes whatever breaks, leaving the project exactly as found. Small breakage may be fixed with the person's approval; bigger code changes go to Quick Task or Plan as an upgrade brief.
+2
View File
@@ -2,6 +2,8 @@
Start all DIAGNOSE MODE responses with '🔎 [DIAGNOSE]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Bug detective. Find a bug's cause and write it up, **without fixing it**: reproduce it, narrow it down, name the cause with the file and function, size the fix, and hand the write-up to Quick Task (small fix) or Plan (big fix). Reads, runs and judges; never repairs.
+2
View File
@@ -2,6 +2,8 @@
Start all GIT MODE responses with '🔀'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Careful git operator. Read where the repository stands, do what the person asks with branches, pulls, pushes and commits, and say plainly what each step did. Nothing leaves the machine without a yes.
+2
View File
@@ -1,5 +1,7 @@
# plan2code-handoff
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
Turn everything useful in the current conversation into a single, self-contained
handoff document that lets a *different* agent — a new session, a teammate's
session, or a subagent — resume the work without re-reading this transcript.
+2
View File
@@ -2,6 +2,8 @@
Start all UPDATE AGENTS MODE responses with '🛞'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
```
⋅
╭───╮
+2
View File
@@ -2,6 +2,8 @@
Start all CREATE AGENTS MODE responses with '💡'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
```
⋅
╭───╮
+2
View File
@@ -2,6 +2,8 @@
Start all PR PREP MODE responses with '✅ [PR PREP]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Gets a branch ready for review. Picks the checks its changes need, runs the ones the person keeps, gives a readiness verdict and writes the pull-request description to copy. **Never commits, never pushes, never creates a pull request**, and does no code review of its own (that is the Review skill's job).
+2
View File
@@ -2,6 +2,8 @@
Start all QUICK TASK MODE responses with '🚀'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Senior software architect. Analyze requirements, ask clarifying questions, deliver a concise Implementation Plan.
+2
View File
@@ -2,6 +2,8 @@
Start all responses with '🔬 [Review Mode]'. At step transitions, use '🔬 [Review Mode Step X: Step Name]'.
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Critical review specialist -- experienced senior engineer providing independent second opinion. Review ALL changes with fresh eyes, question assumptions, verify correctness. Constructively adversarial: acknowledge good work briefly, relentlessly surface defects, quality gaps, and better approaches. Adapts to any context -- code, tests, docs, specs, plans, or bug fixes.
+2
View File
@@ -2,6 +2,8 @@
Start all TEST MODE responses with '🧪 [TEST]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Finds code no test covers and writes the missing tests. Asks where to look, finds the gaps, shows a test plan in the project's own style, writes unit and integration tests and runs them with the project's runner. **Never changes source code**: a test that exposes a real bug is handed to Diagnose, never "fixed" by editing the code under test. **Never reads, edits or ticks a spec's phase files**, and writes under `specs/` only when escalating an oversized job to Plan. No browser or end-to-end tests.
+2
View File
@@ -2,6 +2,8 @@
Start all UI PROTOTYPE MODE responses with '🎨 [UI PROTOTYPE]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Product designer who shows several real options instead of describing them. Draws two to five variants of a screen, a flow or a terminal screen on one page the person opens in their browser, tunes with live dials and hands back with Copy and a paste. **Never builds production code**: a prototype is a reference that Plan and Implement build from.
+2
View File
@@ -2,6 +2,8 @@
Start all X-RAY MODE responses with '🩻 [X-RAY]'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
Codebase guide. Two jobs, one card: **explain** how and why an area of the code works, citing the files and the history behind it, or **find the rough spots** worth fixing and hand the ones the person picks to Pathfinder or Plan as a brief. Reads, counts and judges; never builds.
+2
View File
@@ -2,6 +2,8 @@
Start all DASHBOARD MODE responses with '🎛️'
**Language:** Write every reply, question, option and summary in US English, even when the person's messages or the project's files are in another language. Switch only when the person asks for a different language.
## Role
The front door. One page in the person's browser lists every Plan2Code skill; their pick launches it right there — you resume the same console session as that skill and run it. No typing command names, no second window.
+1 -1
View File
@@ -1,6 +1,6 @@
# Quick Questions (the Ask tab)
The console points here the first time a Quick question reaches you. The person can ask anything on the Ask tab at any time, about this project's files or in general, without waiting for a card. A message never blocks a card send and a card send never blocks a message.
The console points here the first time a Quick question reaches you. The person can ask anything on the Ask tab at any time, about this project's files or in general, without waiting for a card. A message never blocks a card send and a card send never blocks a message. Answer in US English, even when the question or the project is in another language, unless the person asks for one.
## How they arrive
+1 -1
View File
@@ -1,6 +1,6 @@
# The Web Console (the card)
A local page where the person answers your questions, reads your drafts and approves things. Read this card once per session. Read a topic file only when your workflow notes or the console's `read` output name it.
A local page where the person answers your questions, reads your drafts and approves things. Read this card once per session. Read a topic file only when your workflow notes or the console's `read` output name it. Write everything the person reads in US English unless they ask otherwise.
`<CONSOLE>` is `<SKILL_ROOT>/references/web-console/console.mjs` (globally `~/.agents/skills/<skill-name>/references/web-console/`; `~/.plan2code/console/console-dir` may hold the folder). Always quote the path. `node "<CONSOLE>" help <topic>` prints any topic file.
+18 -15
View File
@@ -738,24 +738,27 @@ export const SKILL_CATALOG = FLOW_SKILLS.filter((s) => s.card).map((s) => ({
command: s.command,
workflow: s.workflow,
...(s.review ? { review: s.review } : {}),
...(s.loop ? { loop: s.loop } : {}),
...s.card,
}));
// The desktop app's Implementation Loop card: not a skill, so not in
// SKILL_CATALOG. The dashboard draws it after its group's other cards, and its
// click opens the setup screen instead of launching anything.
const LOOP_SKILL = SKILLS.find((s) => s.appOnly && s.card);
export const LOOP_ENTRY = LOOP_SKILL
? { skill: LOOP_SKILL.skill, command: "Desktop app only", workflow: null, appOnly: true, ...LOOP_SKILL.card }
: null;
// The Review Loop's card, the second app-only entry: same shape, own setup screen.
const REVIEW_LOOP_SKILL = SKILLS.find((s) => s.appOnly && s.card && s !== LOOP_SKILL);
export const REVIEW_LOOP_ENTRY = REVIEW_LOOP_SKILL
? { skill: REVIEW_LOOP_SKILL.skill, command: "Desktop app only", workflow: null, appOnly: true, ...REVIEW_LOOP_SKILL.card }
: null;
// Every app-only card, in the order the dashboard draws them.
export const APP_ONLY_ENTRIES = Object.freeze([LOOP_ENTRY, REVIEW_LOOP_ENTRY].filter(Boolean));
export const OUTSIDE_APP_LINE = "Runs only in the Plan2Code desktop app.";
export const LOOP_RUNNING_LINE = "A loop is running. Stop it from the banner at the top of the window first.";
// The app-only entry a card's Loop box opens the setup screen for (the
// Implementation Loop on Implement, the Review Loop on Review), or null.
export function loopFor(entry) {
return SKILLS.find((s) => s.appOnly && s.skill === entry.loop) || null;
}
// The Loop box on a confirm pane, as { on, reason }: off with the desktop-app
// line outside the app, off while a loop runs, else the loop entry's own
// availability for the picked spec.
export function loopBoxState(entry, scan, sel, { inApp, driving }) {
if (!inApp) return { on: false, reason: OUTSIDE_APP_LINE };
if (driving) return { on: false, reason: LOOP_RUNNING_LINE };
return cardAvailability({ skill: entry.loop, appOnly: true }, scan, sel);
}
// A workflow by the name its dashboard card gives it ("Implement"), for the
// screens that speak of it as a thing being started rather than as a badge.
@@ -873,7 +876,7 @@ export function cardAvailability(entry, scan, sel, lookup = stateFor) {
const hasAgents = Boolean(scan && scan.hasAgents);
const state = sel && sel.state && sel.state !== "unrecognized" ? sel.state : null;
const next = sel ? Boolean(state) && NEXT_FOR_STATE[state] === entry.skill : entry.skill === "plan2code-0-pathfinder";
const rule = skillByName(entry.skill) || (entry.appOnly ? SKILLS.find((s) => s.appOnly && s.skill === entry.skill) || LOOP_SKILL : null);
const rule = skillByName(entry.skill) || (entry.appOnly ? SKILLS.find((s) => s.appOnly && s.skill === entry.skill) : null);
if (!rule || !rule.states) return ON;
// The three cards whose rules read the scan rather than the spec.
+4 -9
View File
@@ -407,13 +407,6 @@
<path d="m16 18 6-6-6-6" />
<path d="m8 6-6 6 6 6" />
</symbol>
<!-- Implementation Loop: repeat arrows. -->
<symbol id="ci-loop" viewBox="0 0 24 24" fill="none">
<path d="m17 2.5 4 4-4 4" />
<path d="M3 11V9a4 4 0 0 1 4-4h14" />
<path d="m7 21.5-4-4 4-4" />
<path d="M21 13v2a4 4 0 0 1-4 4H3" />
</symbol>
<!-- Finalize: a finish flag. -->
<symbol id="ci-finalize" viewBox="0 0 24 24" fill="none">
<path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V4s-1 1-4 1-5-2-8-2-4 1-4 1z" />
@@ -2479,7 +2472,8 @@
<p class="help-lead">
In the desktop app, the Implementation Loop builds every remaining
phase of a documented spec for you, one after another, while you do
something else. The dashboard's Implementation Loop card starts it.
something else. Start it from Implement's confirm pane: tick the
<strong>Loop</strong> checkbox, then <strong>Set up Implementation Loop</strong>.
</p>
<figure class="help-figure" data-figure="loop">
<svg class="help-diagram" viewBox="0 0 560 110" role="img" aria-labelledby="hd-loop-title hd-loop-desc">
@@ -2634,7 +2628,8 @@
<p class="help-lead">
In the desktop app, the Review Loop reviews a finished change and fixes
what it finds, in rounds, on its own. Each round's reviewer starts
fresh. The dashboard's Review Loop card starts it.
fresh. Start it from Review's confirm pane: tick the <strong>Loop</strong>
checkbox, then <strong>Set up Review Loop</strong>.
</p>
<figure class="help-figure" data-figure="review-loop">
<svg class="help-diagram" viewBox="0 0 560 110" role="img" aria-labelledby="hd-review-loop-title hd-review-loop-desc">
+25
View File
@@ -34,6 +34,9 @@ export const DEFAULT_LOOKS = {
width: DEFAULT_CARD_WIDTH,
// The top bar's text size, in percent (palette.js TEXT_SIZES).
textSize: DEFAULT_TEXT_SIZE,
// The Notes panel's height in pixels when it is stacked under the question
// (its drag handle sets it); 0 is the automatic height.
asideHeight: 0,
hideUnavailable: true,
// Skip the wake-up intro: never play the dashboard's first-open wake-up (Planny asleep), off by default.
skipIntro: false,
@@ -64,6 +67,13 @@ export const DEFAULT_LOOKS = {
activityOrder: "recent",
};
// The stacked Notes panel's smallest height; a saved number is a whole count of pixels, or 0 for automatic.
export const ASIDE_MIN_HEIGHT = 96;
export const asideHeightOf = (value) => {
const n = Number(value);
return Number.isFinite(n) && n > 0 ? Math.max(ASIDE_MIN_HEIGHT, Math.round(n)) : 0;
};
export let looks = { ...DEFAULT_LOOKS };
let syncedLooks = null;
@@ -80,6 +90,7 @@ export function adoptLooks(saved) {
if (typeof looks.hideUnavailable !== "boolean") looks.hideUnavailable = DEFAULT_LOOKS.hideUnavailable;
looks.width = cardWidth(looks.width);
looks.textSize = textSize(looks.textSize);
looks.asideHeight = asideHeightOf(looks.asideHeight);
if (typeof looks.skipIntro !== "boolean") looks.skipIntro = DEFAULT_LOOKS.skipIntro;
if (typeof looks.skillLaunched !== "boolean") looks.skillLaunched = DEFAULT_LOOKS.skillLaunched;
if (typeof looks.meterTipSeen !== "boolean") looks.meterTipSeen = DEFAULT_LOOKS.meterTipSeen;
@@ -205,6 +216,19 @@ function paintTextSize() {
$("btn-text-larger").setAttribute("aria-disabled", String(at >= TEXT_SIZES.length - 1));
}
// The stacked Notes panel's height, as a variable the stylesheet reads
// (responsive.css); with none set the panel keeps its automatic height.
export function paintAsideHeight(height = looks.asideHeight) {
const root = document.documentElement;
if (height > 0) {
root.style.setProperty("--aside-h", height + "px");
root.setAttribute("data-aside-h", "");
} else {
root.style.removeProperty("--aside-h");
root.removeAttribute("data-aside-h");
}
}
export function applyLooks() {
const root = document.documentElement;
// The desktop app's shell wears this page's theme and highlight: the resolved
@@ -226,6 +250,7 @@ export function applyLooks() {
if (looks.textSize === DEFAULT_TEXT_SIZE) root.removeAttribute("data-text-size");
else root.dataset.textSize = String(looks.textSize);
paintTextSize();
paintAsideHeight();
// The default lives in the stylesheet, where it is written once per theme.
// Clearing the override is how it gets its own values back.
+22 -11
View File
@@ -40,8 +40,18 @@ function tickKey(end) {
return `review|${end.line}|${end.reason}|${end.signedOff ? "signed" : "open"}`;
}
function button(label, id, cls, disabled, onClick) {
const b = el("button", "btn" + (cls ? " " + cls : ""), label);
// The press the page is waiting on (set each draw), so its button can show work.
let busyWhat = "";
function button(label, id, cls, disabled, onClick, what = "") {
const working = Boolean(what) && busyWhat === what;
const b = el("button", "btn" + (cls ? " " + cls : "") + (working ? " is-busy" : ""), working ? "" : label);
if (working) {
const spin = el("span", "spinner tiny");
spin.setAttribute("aria-hidden", "true");
b.append(spin, document.createTextNode("Working…"));
b.setAttribute("aria-busy", "true");
}
b.type = "button";
b.id = id;
b.disabled = disabled;
@@ -75,6 +85,7 @@ export function renderReviewLoopEnd(end) {
const failed =
page.reviewAction && !page.reviewAction.ok ? page.reviewAction.error : page.loopAction && !page.loopAction.ok ? page.loopAction.error : "";
const busy = pressed.key === key && !failed;
busyWhat = busy ? pressed.what : "";
const press = (what, kind, extra) => {
if (page.gone || busy) return;
pressed = { key, what };
@@ -125,8 +136,8 @@ function drawPartial(card, end, busy, press) {
}
box.appendChild(el("p", "loop-end-hint", "Keep leaves these changes in your files. Discard takes them out and cannot be undone."));
const row = el("div", "btn-row");
row.appendChild(button("Keep these changes", "review-end-keep", "primary", busy, () => press("keep", "review-loop-partial", { keep: true })));
row.appendChild(button("Discard them", "review-end-discard", "", busy, () => press("discard", "review-loop-partial", { keep: false })));
row.appendChild(button("Keep these changes", "review-end-keep", "primary", busy, () => press("keep", "review-loop-partial", { keep: true }), "keep"));
row.appendChild(button("Discard them", "review-end-discard", "", busy, () => press("discard", "review-loop-partial", { keep: false }), "discard"));
box.appendChild(row);
card.appendChild(box);
}
@@ -137,7 +148,7 @@ function drawStop(card, end, busy, press) {
if (end.canContinue && !end.partial) {
const choice = el("div", "loop-end-choice");
const label = end.reason === "cap" ? "Run one more round" : "Continue";
choice.appendChild(button(label, "review-end-continue", "", busy, () => press("continue", "review-loop-continue")));
choice.appendChild(button(label, "review-end-continue", "", busy, () => press("continue", "review-loop-continue"), "continue"));
choice.appendChild(el("p", "loop-end-hint", "Pick the review up again with the same setup."));
card.appendChild(choice);
}
@@ -167,7 +178,7 @@ function drawStop(card, end, busy, press) {
}
const row = el("div", "btn-row");
row.appendChild(
button("Sign off", "review-end-signoff", "primary", busy || Boolean(end.partial), () => press("sign-off", "review-loop-sign-off", { picks: [...ticks.picks], squash: ticks.squash }))
button("Sign off", "review-end-signoff", "primary", busy || Boolean(end.partial), () => press("sign-off", "review-loop-sign-off", { picks: [...ticks.picks], squash: ticks.squash }), "sign-off")
);
card.appendChild(row);
card.appendChild(
@@ -177,19 +188,19 @@ function drawStop(card, end, busy, press) {
function drawFinished(card, end, busy, press) {
const actions = el("div", "loop-end-actions review-end-next");
const add = (label, id, hint, primary, onClick) => {
const add = (label, id, hint, primary, onClick, what) => {
const choice = el("div", "loop-end-choice" + (primary ? " is-recommended" : ""));
choice.appendChild(button(label, id, primary ? "primary" : "", busy, onClick));
choice.appendChild(button(label, id, primary ? "primary" : "", busy, onClick, what));
choice.appendChild(el("p", "loop-end-hint", hint));
actions.appendChild(choice);
};
add("PR Prep", "review-end-pr-prep", "Get the branch ready for a pull request.", true, () => press("pr-prep", "review-loop-next", { next: "pr-prep" }));
add("PR Prep", "review-end-pr-prep", "Get the branch ready for a pull request.", true, () => press("pr-prep", "review-loop-next", { next: "pr-prep" }), "pr-prep");
if (Array.isArray(end.open) && end.open.length) {
add("Fix what's left by hand", "review-end-quick-task", "Start a Quick task with the Critical and Warning findings still open.", false, () =>
press("quick-task", "review-loop-next", { next: "quick-task" })
press("quick-task", "review-loop-next", { next: "quick-task" }), "quick-task"
);
}
add("Back to the dashboard", "review-end-dashboard", "Leave this screen and pick another skill. Your work stays as it is.", false, () => press("dashboard", "loop-dashboard"));
add("Back to the dashboard", "review-end-dashboard", "Leave this screen and pick another skill. Your work stays as it is.", false, () => press("dashboard", "loop-dashboard"), "dashboard");
card.appendChild(actions);
}
+64 -1
View File
@@ -6,7 +6,7 @@ import { chatAnswering, chatOffline, chatView, sendState as chatSendState, newes
import { finish, activity, agentAdrift, isDashboard, selSpec, byId, isOpen, loopAskLocked, loopDriving } from "../selectors.js";
import { el, icon, md, isMac, lightDismiss, shortTime } from "../render.js";
import { startersFor } from "../starters.js";
import { looks } from "../looks.js";
import { looks, saveLooks, paintAsideHeight, ASIDE_MIN_HEIGHT } from "../looks.js";
import { thumbs, uploadUrl, docChip, attachTray, CHAT_IMAGES, attachFiles, incomingFiles, deleteUrl, sentAttachments, noteImages, attachRow, openPicview, refocusThumb } from "../uploads.js";
import { attachMentions } from "../mention-box.js";
import { destroyFields, makeMdField } from "../md-field.js";
@@ -703,6 +703,68 @@ const askOffered = () => {
};
const ASK_HINT = "Press Ask a question to wake an agent, then ask in the Ask tab.";
// The handle on the top edge of the Notes panel while it is stacked under the
// question (responsive.css draws it only then). Dragging it up makes the panel
// taller; the height is kept in the looks, double-click gives the automatic
// height back, and the arrow keys move it a step. The drag listens on the
// window, so a redraw that replaces the handle mid-drag does not end it.
const GRIP_STEP = 24;
function asideGrip(aside) {
const grip = el("div", "aside-grip");
grip.setAttribute("role", "separator");
grip.setAttribute("aria-orientation", "horizontal");
grip.setAttribute("aria-label", "Resize the notes panel");
grip.title = "Drag to resize, double-click to reset";
grip.tabIndex = 0;
// Never past what leaves the question its room (the stylesheet caps it the same way).
const clamp = (h) => (h > 0 ? Math.min(Math.max(ASIDE_MIN_HEIGHT, window.innerHeight - 260), Math.max(ASIDE_MIN_HEIGHT, Math.round(h))) : 0);
const keep = (h) => {
looks.asideHeight = h;
saveLooks();
announce();
};
// A focusable separator tells a screen reader its value: the panel's height in pixels.
// Measured after the next frame, once the panel has the height just set (or, drawn fresh, has its content).
const announce = () =>
requestAnimationFrame(() => {
grip.setAttribute("aria-valuemin", String(ASIDE_MIN_HEIGHT));
grip.setAttribute("aria-valuemax", String(Math.max(ASIDE_MIN_HEIGHT, window.innerHeight - 260)));
grip.setAttribute("aria-valuenow", String(Math.round(aside.getBoundingClientRect().height)));
});
announce();
grip.addEventListener("pointerdown", (e) => {
if (e.button !== 0) return;
e.preventDefault();
const startY = e.clientY;
const startH = Math.round(aside.getBoundingClientRect().height);
let h = startH;
const move = (m) => {
h = clamp(startH + startY - m.clientY);
paintAsideHeight(h);
announce();
};
const up = () => {
window.removeEventListener("pointermove", move);
window.removeEventListener("pointerup", up);
window.removeEventListener("pointercancel", up);
// A plain click (the first half of a double-click) saves nothing.
if (h !== startH) keep(h);
};
window.addEventListener("pointermove", move);
window.addEventListener("pointerup", up);
window.addEventListener("pointercancel", up);
});
grip.addEventListener("dblclick", () => keep(0));
grip.addEventListener("keydown", (e) => {
const dir = e.key === "ArrowUp" ? 1 : e.key === "ArrowDown" ? -1 : 0;
if (!dir) return;
e.preventDefault();
keep(clamp(Math.round(aside.getBoundingClientRect().height) + dir * GRIP_STEP));
});
return grip;
}
export function renderAside() {
const aside = $("aside");
// Redrawing empties the panel, which drops its scroll to the top. An image
@@ -723,6 +785,7 @@ export function renderAside() {
// Off the question's own page (a doc tab, Ask) "this" points at nothing on
// screen, so the pane names the question a note here will go to.
const onQuestion = page.view === "questions" || page.view === "end";
aside.appendChild(asideGrip(aside));
aside.appendChild(el("h2", null, onQuestion ? "Notes on this" : `Notes on “${item.title || "this question"}”`));
const thread = item.thread || [];
+9 -2
View File
@@ -84,7 +84,7 @@ import { openPrefs as openPrefsDialog } from "./prefs-dialog.js";
import { continueButton } from "../continue-button.js";
import { askOfflineFlipped, askState, declineOpen, renderAside, renderAsk, renderSubagents, renderSubagentsButton } from "./ask.js";
import { forgetReviewEnd } from "../review-loop-end.js";
import { renderHandoff, renderLoopEnd, renderHomeButton, renderStopButton, renderStopControls, renderStopping, renderFooterDashboard, stopInProgress, stopWarning } from "./ending.js";
import { forgetLoopEnd, renderHandoff, renderLoopEnd, renderHomeButton, renderStopButton, renderStopControls, renderStopping, renderFooterDashboard, stopInProgress, stopWarning } from "./ending.js";
import { renderNotepadButton } from "./notepad.js";
import { renderActivities } from "./activities.js";
import { renderSetup, setupMoved } from "./setup.js";
@@ -452,6 +452,7 @@ export function adopt(body) {
// or the session ended; either way the menu is not mid-handoff any more.
if (!isDashboard() || finish()) {
page.dashPick = null;
page.dashLoop = false;
page.loopSetup = null;
page.reviewLoopSetup = null;
}
@@ -1685,6 +1686,7 @@ export function renderSidebar() {
// straight to a launch. From the Overview tab too, so the pane shows.
b.addEventListener("click", () => {
page.dashPick = e;
page.dashLoop = false;
page.view = "questions";
render();
});
@@ -1820,6 +1822,7 @@ function paintMain(main) {
if (cardAvailability(page.dashPick, scan(), selSpec()).on) renderConfirm(main, page.dashPick);
else {
page.dashPick = null;
page.dashLoop = false;
renderDashboard(main);
}
} else renderDashboard(main);
@@ -1857,7 +1860,10 @@ function paintMain(main) {
// How the Implementation Loop ended, from the app's `loopEnd`: its own
// screen, ahead of any card the last phase left behind.
if (!page.S.loopEnd) forgetReviewEnd();
if (!page.S.loopEnd) {
forgetReviewEnd();
forgetLoopEnd();
}
if (page.S.loopEnd && !finish()) {
const card = renderLoopEnd(page.S.loopEnd);
card.classList.add("is-primary");
@@ -2612,6 +2618,7 @@ export function wireChrome() {
// same time would be two undos for one press.
if (e.key === "Escape" && (page.dashPick || page.loopSetup || page.reviewLoopSetup) && isDashboard() && !finish() && !document.querySelector("dialog[open]")) {
page.dashPick = null;
page.dashLoop = false;
page.loopSetup = null;
page.reviewLoopSetup = null;
redraw();
+52 -46
View File
@@ -30,9 +30,8 @@ import {
CATALOG_GROUPS,
SKILL_CATALOG,
catalogEntry,
LOOP_ENTRY,
APP_ONLY_ENTRIES,
OUTSIDE_APP_LINE,
loopFor,
loopBoxState,
launchVariant,
SPEC_STATE_LABELS,
chipDetail,
@@ -298,17 +297,12 @@ export function renderDashboard(main) {
let shown = 0;
for (const g of CATALOG_GROUPS) {
const entries = SKILL_CATALOG.filter((e) => e.group === g.id && (!hide || available(e)));
// The desktop app's Implementation Loop and Review Loop cards close their
// group. Outside the app they are always drawn, grayed, so the features can
// be found.
const loopCards = APP_ONLY_ENTRIES.filter((e) => e.group === g.id && (!page.inApp || !hide || available(e)));
if (!entries.length && !loopCards.length) continue;
shown += entries.length + loopCards.length;
if (!entries.length) continue;
shown += entries.length;
const section = el("section", "dash-group");
section.appendChild(el("h3", "dash-group-title", g.title));
const grid = el("div", "dash-grid");
for (const e of entries) grid.appendChild(dashCard(e, menu));
for (const e of loopCards) grid.appendChild(dashCard(e, menu));
section.appendChild(grid);
wrap.appendChild(section);
}
@@ -755,10 +749,8 @@ async function readHandoff(h) {
}
}
const REVIEW_LOOP_SKILL = "plan2code-review-loop";
function dashCard(entry, menu) {
const presentation = entry.appOnly ? loopPresentation(entry, menu) : cardPresentation(entry, scan(), selSpec(), menu);
const presentation = cardPresentation(entry, scan(), selSpec(), menu);
// The agent's `recommend` and detail describe the initially selected spec.
// Other picker choices derive both from the scan, so stale context never
// follows a person to a different spec or to "start from scratch". A grayed
@@ -789,7 +781,7 @@ function dashCard(entry, menu) {
title.appendChild(document.createTextNode(entry.title));
b.appendChild(title);
b.appendChild(el("span", "dash-card-blurb", entry.blurb));
// A line only the desktop app shows (the Review card's pointer to the Review Loop).
// A line only the desktop app shows (a card's `appNote`).
if (entry.appNote && page.inApp) b.appendChild(el("span", "dash-card-detail", entry.appNote));
if (presentation.detail) b.appendChild(el("span", "dash-card-detail", presentation.detail));
if (!presentation.on && presentation.reason) b.appendChild(el("span", "dash-card-off", presentation.reason));
@@ -800,43 +792,13 @@ function dashCard(entry, menu) {
b.appendChild(foot);
b.addEventListener("click", () => {
// A loop card opens its own setup screen instead of a confirm pane.
if (entry.appOnly) return entry.skill === REVIEW_LOOP_SKILL ? hooks.openReviewLoopSetup(selSpec()) : hooks.openLoopSetup(selSpec());
page.dashPick = entry;
page.dashLoop = false;
redraw();
});
// "How the loop works" is a link of its own beside the card, never inside
// the button (a link in a button is not valid and reads badly aloud).
if (entry.appOnly) {
const wrap = el("div", "dash-card-wrap");
wrap.appendChild(b);
wrap.appendChild(loopHelpLink(entry));
return wrap;
}
return b;
}
// The loop card is lit only inside the desktop app and, there, by the same
// rule as Implement (a documented or building spec). Never recommended or
// pre-selected: a person opts into running unattended.
function loopPresentation(entry, menu) {
if (!page.inApp) return { on: false, reason: OUTSIDE_APP_LINE, recommended: false, detail: "" };
if (entry.skill === REVIEW_LOOP_SKILL && loopDriving()) {
return { on: false, reason: "A loop is running. Stop it from the banner at the top of the window first.", recommended: false, detail: "" };
}
return { ...cardPresentation(entry, scan(), selSpec(), menu), recommended: false };
}
// "How the loop works" under the card: a real button styled as a link, a
// sibling of the card button inside its wrapper.
function loopHelpLink(entry) {
const review = entry && entry.skill === REVIEW_LOOP_SKILL;
const a = el("button", "dash-card-link", review ? "How the Review Loop works" : "How the loop works");
a.type = "button";
a.addEventListener("click", () => hooks.openHelpOn(review ? "review-loop" : "loop"));
return a;
}
// "Start with a note from your Notebook": the switch a lit card's confirm
// pane offers when noteSwitchShows() says so. The pane is rebuilt on every
// state frame, so what the person did lives here, keyed to the card and the
@@ -1066,6 +1028,12 @@ function notePreview(picked, state, again) {
return pane;
}
// The Loop box's words on each confirm pane, before the loop's name.
const LOOP_BOX_TEXT = {
"plan2code-loop": "Build every phase unattended",
"plan2code-review-loop": "Review and fix in rounds",
};
// The confirm pane. A card or rail click lands here rather than launching
// straight away: picking a skill is the one irreversible-feeling click on the
// dashboard, and it deserves a beat: what it is, what it will do, and a
@@ -1134,6 +1102,29 @@ export function renderConfirm(main, entry) {
pane.appendChild(label);
}
// Implement's and Review's cards: the Loop box opens the desktop app's
// matching loop setup screen in place of a launch. Outside the app, or while
// a loop runs, it shows grayed with the reason, so the feature can be found.
let loop = null;
const loopEntry = entry.loop ? loopFor(entry) : null;
if (loopEntry) {
const box = loopBoxState(entry, scan(), selSpec(), { inApp: page.inApp, driving: loopDriving() });
if (!review) pane.appendChild(el("hr", "confirm-rule"));
const label = el("label", "confirm-review confirm-loop" + (box.on ? "" : " is-off"));
loop = el("input");
loop.type = "checkbox";
loop.disabled = !box.on;
loop.checked = box.on && page.dashLoop === true;
loop.addEventListener("change", () => {
page.dashLoop = loop.checked;
showLoop();
});
label.append(loop, el("span", null, `${LOOP_BOX_TEXT[loopEntry.skill] || "Run unattended"} (${loopEntry.name})`));
pane.appendChild(label);
if (!box.on && box.reason) pane.appendChild(el("p", "confirm-loop-off", box.reason));
}
const looping = () => Boolean(loop) && !loop.disabled && loop.checked;
// The Notebook switch, on the cards and specs noteSwitchShows() names.
const cmdNote = el("span", "confirm-cmd-note");
cmdNote.hidden = true;
@@ -1163,17 +1154,31 @@ export function renderConfirm(main, entry) {
const start = el("button", "btn primary", "Start " + entry.title);
start.type = "button";
start.disabled = page.gone || page.pendingResult;
start.addEventListener("click", () => launchSkill(launchVariant(entry, Boolean(review) && review.checked)));
start.addEventListener("click", () => {
if (!looping()) return launchSkill(launchVariant(entry, Boolean(review) && review.checked));
if (entry.loop === "plan2code-loop") hooks.openLoopSetup(selSpec());
else hooks.openReviewLoopSetup(selSpec());
});
const back = el("button", "btn ghost", "Back");
back.type = "button";
back.addEventListener("click", () => {
page.dashPick = null;
page.dashLoop = false;
redraw();
});
actions.appendChild(back);
actions.appendChild(start);
tail.appendChild(actions);
pane.appendChild(tail);
// A ticked Loop box hands Start to the loop's setup screen: the Review box
// grays (the loop setup has its own review choice) and the command and
// Start name the loop. Run once here so a re-render keeps the tick's look.
function showLoop() {
if (review) review.disabled = looping();
cmdCode.textContent = looping() ? "Desktop app only" : launchVariant(entry, !review || review.checked).command;
start.textContent = looping() ? "Set up " + loopEntry.name : "Start " + entry.title;
}
if (loopEntry) showLoop();
main.appendChild(pane);
// Focus lands on START after a pick (the clicked control was rebuilt away,
@@ -1200,6 +1205,7 @@ export async function launchSkill(entry) {
return;
}
page.dashPick = null;
page.dashLoop = false;
const action = {
i: "__launch",
type: "launch",
+40 -3
View File
@@ -165,6 +165,24 @@ function closeGuideHeld() {
// Which stop-screen button was pressed and is waiting on the app's answer, so a
// second press cannot send the same request twice.
let loopPressed = null;
// The ending that press was made on, so a later ending never inherits it.
let loopPressedKey = null;
/** The loop's end screen is gone (the loop runs again): its press is over. */
export function forgetLoopEnd() {
loopPressed = null;
loopPressedKey = null;
}
// What a pressed stop-screen button says while its request is under way, and
// the line under it. The app's ok answer only means the request went out: the
// agent still takes seconds to start in its terminal, so the button stays busy.
const LOOP_BUSY = {
resume: ["Continuing…", "Starting the loop again. This page updates when it is running."],
fix: ["Opening…", "Opening a session on this phase. Watch the terminal; this page updates when it is ready."],
finalize: ["Starting Finalize…", "Finalize is starting in the terminal. This can take a few seconds; this page updates when it is ready."],
dashboard: ["Opening the dashboard…", "Leaving this screen. Your work stays as it is."],
};
// The stop screen's Ask agent is up once the app answered a press of Ask a
// question: from then on the button opens the Ask tab, so it can never ask the
@@ -330,14 +348,30 @@ export function renderLoopEnd(end) {
// takes files back out of the index.
if (!finished && can.length) card.appendChild(el("p", "loop-end-safe", "Nothing is lost. Your work stays on disk."));
const mine = loopPressedKey === key ? loopPressed : null;
const actions = el("div", "loop-end-actions");
// A press waits for the app's answer, and then (an ok answer to anything but
// Ask) for the page to move on; only an error frees the buttons again.
const busyKey = LOOP_BUTTONS.map(([k, message]) => {
const waiting = mine === message && !page.loopAction;
const started = mine === message && k !== "ask" && page.loopAction && page.loopAction.ok && page.loopAction.kind === "loop-" + k + "-result";
return waiting || started ? k : null;
}).find(Boolean);
for (const [k, message, label] of LOOP_BUTTONS) {
if (!can.includes(k)) continue;
const choice = el("div", "loop-end-choice" + (k === recommended ? " is-recommended" : ""));
const asked = k === "ask" && askUp;
const b = el("button", "btn" + (k === recommended ? " primary" : ""), asked ? "Open the Ask tab" : label);
const busy = busyKey === k && LOOP_BUSY[k];
const b = el("button", "btn" + (k === recommended ? " primary" : "") + (busy ? " is-busy" : ""), asked ? "Open the Ask tab" : busy ? "" : label);
b.type = "button";
b.disabled = page.gone || (!asked && loopPressed === message && !page.loopAction);
if (busy) {
const spin = el("span", "spinner tiny");
spin.setAttribute("aria-hidden", "true");
b.append(spin, document.createTextNode(busy[0]));
b.setAttribute("aria-busy", "true");
}
// One press at a time: another button waits until this one's request fails.
b.disabled = page.gone || (!asked && Boolean(busyKey) && (busyKey === k || (busyKey !== "ask" && k !== "ask")));
b.addEventListener("click", () => {
if (asked) {
page.view = "ask";
@@ -349,12 +383,15 @@ export function renderLoopEnd(end) {
askUpFor = null;
loopDetailsOpen = null;
loopPressed = message;
loopPressedKey = key;
page.loopAction = null;
tellApp(message);
redraw();
});
choice.appendChild(b);
choice.appendChild(el("p", "loop-end-hint", loopButtonLine(k, stoppedPhase, asked)));
const hint = el("p", "loop-end-hint", busy ? busy[1] : loopButtonLine(k, stoppedPhase, asked));
if (busy) hint.setAttribute("role", "status");
choice.appendChild(hint);
actions.appendChild(choice);
}
if (actions.childElementCount) card.appendChild(actions);
+5 -5
View File
@@ -1,10 +1,10 @@
// Plan2Code Web Console - the Implementation Loop's setup screen, drawn by the page from the console's saved setup and the app's facts; defines only.
//
// The dashboard's loop card opens this in place of the cards. Nothing here
// runs an agent: Start saves the setup through POST /loop-setup, then asks the
// desktop app (`loop-start { spec }`), which reads the setup itself and
// confirms in its own window. The quick check is typed text the page never
// runs or sends to the app.
// The Loop box on Implement's confirm pane opens this in place of an ordinary
// Implement launch. Nothing here runs an agent: Start saves the setup through
// POST /loop-setup, then asks the desktop app (`loop-start { spec }`), which
// reads the setup itself and confirms in its own window. The quick check is
// typed text the page never runs or sends to the app.
import { el } from "../render.js";
import { hooks, page, redraw, saveNow } from "../state.js";
@@ -1,7 +1,7 @@
// Plan2Code Web Console - the Review Loop's setup screen, drawn by the page from the console's saved setup and the app's facts; defines only.
//
// The dashboard's Review Loop card opens this in place of the cards. Nothing
// here runs an agent: Start saves the picks through POST /review-loop-setup,
// The Loop box on Review's confirm pane opens this in place of an ordinary
// Review launch. Nothing here runs an agent: Start saves the picks through POST /review-loop-setup,
// then sends them to the desktop app (`review-loop-start { setup }`), which
// confirms in its own window. Its field builders come from ../loop-parts.js, shared with
// the Implementation Loop's screen. The notification address belongs to the
+18 -30
View File
@@ -39,13 +39,15 @@
// AGENTS.md check, which is a rule on the scan, not on the spec
// review the skill the card launches instead when its Review box is
// ticked (Implement's card, which draws the box), or absent
// loop the app-only entry its Loop box opens the setup screen for, or absent
// card the dashboard card (group, chip, title, blurb, about, and
// `spec: true` when it takes the picked spec), or null; an
// optional `help` is Help's line for the card when it differs
// from `blurb`, `appNote` is a line only the desktop app shows (card and Help), and `icon` names the `ci-*` symbol in
// index.html's card-icons sheet drawn before the title
// appOnly the entry is a card the desktop app alone offers (the
// Implementation Loop and the Review Loop): no workflow, no installed skill, and no
// appOnly the entry is a feature the desktop app alone offers (the
// Implementation Loop and the Review Loop, opened from their
// parent card's Loop box): no workflow, no installed skill, and no
// list derived from the workflows (WORKFLOWS, the meter, the
// resume command, Help's card list) holds it. `skill` is an id
// only; `workflow` is null. Use FLOW_SKILLS for those lists.
@@ -229,6 +231,7 @@ export const SKILLS = Object.freeze([
weight: null, started: null, ran: null, resume: "overview",
subagents: BUILD_HELPERS,
review: "plan2code-3-implement-review",
loop: "plan2code-loop",
states: ["documented", "building"], marksNext: true,
greyed: BUILD_GREYED,
card: {
@@ -256,10 +259,11 @@ export const SKILLS = Object.freeze([
// No card of its own: Implement's card launches it when Review is ticked.
card: null,
}),
// The desktop app's Implementation Loop: a card, not a skill. It has no
// SKILL.md and no console workflow; it drives Implement (or Implement +
// Review) once per phase, each in a fresh agent. Drawn by the dashboard in
// the app only.
// The desktop app's Implementation Loop: not a skill. It has no SKILL.md
// and no console workflow; it drives Implement (or Implement + Review) once
// per phase, each in a fresh agent. No card of its own: the entry exists for
// its availability facts only (`appOnly`, `states`, `greyed`), and
// Implement's Loop box opens its setup screen.
skill({
skill: "plan2code-loop",
workflow: null,
@@ -272,21 +276,13 @@ export const SKILLS = Object.freeze([
subagents: null,
states: ["documented", "building"],
greyed: BUILD_GREYED,
card: {
group: "pipeline",
chip: "Step 3",
spec: true,
title: "Implementation Loop",
icon: "loop",
blurb: "Build every remaining phase unattended, one fresh agent per phase.",
about:
"Builds every remaining phase of the spec without you at the keyboard. Each phase gets a fresh agent that builds it and reviews it. The app checks the result against the spec, runs your quick check, commits, and moves on. It stops at the first phase that goes wrong and tells you why. Desktop app only.",
},
card: null,
}),
// The desktop app's Review Loop, a second app-only card beside the
// Implementation Loop: it runs review and fix rounds over a finished change,
// each round checked by a fresh reviewer. Any project state lights it; the
// setup screen picks the scope.
// The desktop app's Review Loop: review and fix rounds over a finished
// change, each round checked by a fresh reviewer. No card of its own: the
// entry exists for its availability facts only (`appOnly`, `states`,
// `greyed`), and Review's Loop box opens its setup screen, which picks the
// scope.
skill({
skill: "plan2code-review-loop",
workflow: null,
@@ -299,15 +295,7 @@ export const SKILLS = Object.freeze([
subagents: null,
states: "any",
greyed: null,
card: {
group: "pipeline",
chip: "Step 3",
title: "Review Loop",
icon: "loop",
blurb: "Review and fix in rounds on its own, each round checked by a fresh reviewer.",
about:
"Reviews a finished change and fixes what it finds, round after round, without you at the keyboard. The first round reviews everything in scope; each later round reviews only what the last round changed, with a reviewer that never saw the fix being written. It stops on a clean round, at the round cap, or when you say so, then hands back one report and the usual sign-off. Desktop app only.",
},
card: null,
}),
skill({
skill: "plan2code-4-finalize",
@@ -361,6 +349,7 @@ export const SKILLS = Object.freeze([
builds: false, phased: false, metered: true, templates: false,
weight: 2, started: "Review started", ran: "Code review run", resume: null,
subagents: "Run the review's analysis in one fresh helper briefed only with the spec and the change set (references/reviewer-brief.md); verify every finding yourself before you report. At standard strength or above (strongest for branch or full scope), high effort.",
loop: "plan2code-review-loop",
states: "any",
greyed: null,
card: {
@@ -369,7 +358,6 @@ export const SKILLS = Object.freeze([
title: "Review",
icon: "review",
blurb: "A second opinion on the changes. Problems ranked, and you pick what gets fixed.",
appNote: "In the app, the Review Loop runs review and fix rounds on its own.",
about:
"A fresh-eyes pass over what changed: bugs, gaps, and the things the builder was too close to see. Problems come back ranked with a suggestion each, you pick which ones get fixed, and it fixes them.",
},
+3 -1
View File
@@ -127,7 +127,7 @@ export const page = {
// same for the stop screen's Resume, Fix and Finalize; `loopNotifyTest` is
// Send a test's `{ waiting }`, then `{ ok, sent, error }` once the app answered.
loop: null,
// The setup screen the dashboard's Implementation Loop card opened, or null
// The setup screen the Loop box on Implement's confirm pane opened, or null
// (screens/loop-setup.js owns the shape).
loopSetup: null,
// The Review Loop's setup screen (screens/review-loop-setup.js owns the shape), what
@@ -166,6 +166,8 @@ export const page = {
// The dashboard pick being looked at on the confirm pane, before START is
// pressed. Page-local like `view`: a reload simply shows the menu again.
dashPick: null,
// The confirm pane's Loop tick, reset whenever `dashPick` changes.
dashLoop: false,
// The `@name` suggestions popover, owned by whichever box last asked for it.
mentionPop: null,
// The pose pane on screen when a render began, held back from the clear so
+3 -7
View File
@@ -162,7 +162,7 @@
flex-wrap: wrap;
gap: 12px;
}
.dash-grid > .dash-card, .dash-grid > .dash-card-wrap { flex: 0 0 calc((100% - (var(--dash-cols) - 1) * 12px) / var(--dash-cols)); min-width: 0; }
.dash-grid > .dash-card { flex: 0 0 calc((100% - (var(--dash-cols) - 1) * 12px) / var(--dash-cols)); min-width: 0; }
.dash-grid.is-centered { justify-content: center; }
/* A card is a button, so it carries the usual reset; panel look, lifts on hover. */
@@ -390,6 +390,8 @@
.confirm-rule { width: 100%; height: 0; margin: 6px 0 2px; border: 0; border-top: 1px solid var(--accent); }
.confirm-review { display: flex; gap: 8px; align-items: center; margin: 4px 0 8px; color: var(--ink-2); cursor: pointer; }
.confirm-review input { accent-color: var(--accent, currentColor); }
.confirm-loop.is-off { color: var(--ink-3); cursor: default; }
.confirm-loop-off { margin: -6px 0 8px; font-size: var(--fs-xs); color: var(--ink-3); font-style: italic; }
.confirm-cmd { margin: 2px 0 0; }
.confirm-cmd code {
font-family: var(--mono);
@@ -551,12 +553,6 @@
/* --------------------------------------------- the Implementation Loop */
/* A span: a link may not sit inside a button. */
/* The loop card's wrapper: the card button, and its link under it. */
.dash-card-wrap { display: flex; flex-direction: column; gap: 6px; }
.dash-card-wrap > .dash-card { flex: 1 1 auto; }
.dash-card-link { align-self: flex-start; padding: 0; border: 0; background: none; font: inherit; font-size: var(--fs-xs); color: var(--accent); text-decoration: underline; cursor: pointer; }
/* The setup screen: the confirm pane's width, with a left-aligned form. */
.loop-setup { display: grid; justify-items: stretch; text-align: left; gap: 14px; }
.loop-setup .card-kicker, .loop-setup .dash-title, .loop-setup .confirm-spec { justify-self: start; }
@@ -20,11 +20,29 @@
/* ------------------------------------------------------------ responsive */
/* The Notes panel's resize handle exists only while the panel is stacked. */
.aside-grip { display: none; }
@media (max-width: 1080px) {
.layout,
.layout:has(> .aside:empty),
.layout:has(.git-board) { grid-template-columns: 210px minmax(0, 1fr); }
.aside { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); }
/* The grab bar rides the panel's top edge (over its padding) while the notes scroll under it. */
.aside-grip {
display: block; position: sticky; top: 0; z-index: 1; flex: none;
height: 14px; margin: -20px -20px 6px; background: var(--panel-2);
cursor: ns-resize; touch-action: none;
}
.aside-grip::before {
content: ""; position: absolute; left: 50%; top: 5px; width: 44px; height: 4px; margin-left: -22px;
border-radius: 2px; background: var(--ink-3); opacity: 0.6;
}
.aside-grip:hover::before, .aside-grip:focus-visible::before { background: var(--accent); opacity: 1; }
.aside-grip:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
/* A height the person dragged to: the question takes the rest, and it replaces the 30vh cap below 900px. */
html[data-aside-h] .layout { grid-template-rows: minmax(0, 1fr) auto; }
html[data-aside-h] .aside { height: var(--aside-h); min-height: 96px; max-height: calc(100vh - 260px); }
}
/* V20, from a live look at 700 to 1000px: from 900px down the rail beside the
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "Plan2Code",
"version": "3.2.5",
"version": "3.2.6",
"description": "A structured workflow of six steps (Pathfinder, Plan, Document, Implement, Review, Finalize) 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-12-03",
"releaseDate": "2026-12-04",
"mode": "utility"
}