The FIRST thing you do, before anything else in this file — before Step 1, before reading a spec: ask **web console** (browser page, suggested) or **terminal**? Console → run `node "<D>/console.mjs" open --workflow revise-plan` before reading (<D>: references/web-console/ beside this SKILL.md — ~/.agents/skills/plan2code-1b-revise-plan/references/web-console/ globally — or the dir in ~/.plan2code/console/console-dir; add `--spec specs/<feature-name>` if known, else post `specDir` later), then read <D>/console.md and <D>/notes/revise-plan.md; the Step 1 confirmation, the Step 2 approval and every cleanup question go through it. Switchable anytime. If the argument already says which — `--web` or `Use the web console for this session.` — take it and do not ask; drop the flag. Launched by the dashboard? Its session is already open — resume it (console-launches.md), then Step 1.
- STOP at Step 2 for approval before applying spec updates
- This mode modifies **`specs/` paths only** — do NOT implement code or modify any file outside `specs/`
- **Allowed file paths:** ONLY paths under `specs/`. Forbidden: `skills/`, `src/`, `.claude/`, `.agents/`, `.codeium/`, configs, source code. Creating, modifying, or deleting any file outside `specs/` is a violation.
- **Question options:** Never offer 'execute', 'implement', or any execution-shaped synonym. Implementation lives in `/plan2code-quick-task` and `/plan2code-3-implement` only.
- **Web console exception:** the console's temporary payload files (outside the repo, in the session folder `open` prints) are the one allowed write outside `specs/`. They are messages to the page, never project files.
`<S>` is `scripts/` beside this SKILL.md (`~/.agents/skills/plan2code-1b-revise-plan/scripts/` globally). Run from the project root; each prints one JSON object, and on a non-zero exit `next` says what to do. They only ever touch `specs/`.
-`node "<S>/specs.mjs" list`: the active specs (it reads gitignored `specs/`, where Glob silently finds nothing).
-`node "<S>/specs.mjs" status <spec>`: phases, task counts by marker, `checks`, `pending`.
-`node "<S>/specs.mjs" mark <spec> --phase <N> --to open`: re-open a completed phase in overview.md.
2. Understand the requested change. Before asking for one, look in the Notes of every `[/]` phase for a waiting `**Plan change:**` line: Implement paused there for this revision (`### Paused <date>` above it). Take that brief as the requested change and present it for confirmation rather than asking from scratch; what the person says in their argument or reply wins over it, and a brief they replace or decline is marked dropped at Step 3.
**Hard guardrail (verify before every edit):** the file path must start with `specs/`. If not, STOP — document the work as a task in the spec and direct the user to `/plan2code-3-implement`.
**Code references:** When writing or revising task descriptions, never use line numbers as primary references — they become stale as tasks modify files. Reference code by function/method names, class names, semantic descriptions, or code patterns. Line numbers may only appear as supplemental context (e.g., "Update `validateEmail()` (currently ~L45) to...").
- Update overview.md: `[x]` → `[ ]` (`specs.mjs mark <spec> --phase <N> --to open`, which also sets that phase file's `**Status:**` back to In Progress)
6. **A waiting brief:** rewrite its `**Plan change:**` line to `**Plan change (applied <YYYY-MM-DD>):**` when this revision covers it, or `**Plan change (dropped <YYYY-MM-DD>):**` when the person replaced or declined it at Step 1, so the dashboard and Implement stop pointing back here.
Run `specs.mjs status <spec>`. Its `checks` cover the mechanical items: task numbers sequential (`task-numbering`), overview.md checklist matches the phase files (`missing-checklist-row`, `missing-phase-file`), incomplete phases unchecked and complete ones checked (`checked-with-open-tasks`, `unchecked-with-done-tasks`; `partly-done-unchecked` is the normal look of a phase you just re-opened). Then verify the rest yourself:
**Pending phases after revision** — list `status`'s `pending` (every phase not `[x]`, re-opened ones included) with its task count so the user can plan next implementation sessions.
**On the web console:** a `__stop` action in a send is the person ending the session: see console-stop.md. Specs change only at Step 3, so a stop before then saves nothing and needs none. At every session end post `finish` BEFORE `stop`: `"command": "/plan2code-3-implement specs/<feature-name>/overview.md"` when revised, or the revise-plan command on an abort. The closing box above is printed to a terminal the browser user is not watching.