@babylonjs-toolkit/agent 1.2.3 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Babylon Toolkit Desktop Agent (1.2.3)
1
+ # Babylon Toolkit Desktop Agent (1.2.5)
2
2
 
3
3
  The desktop agent owns the entire pipeline end to end — frontend and UI design, gameplay code, shaders, generated art and audio, 3D models in headless Blender, whole game levels and prefabs in a terminal-driven Unity Editor, the interactive glTF export, the web build, the dev server, and visual QA by screenshotting both Unity and the running browser.
4
4
 
@@ -311,8 +311,10 @@ start without a spec:
311
311
  `dashboard.html` is a live dashboard for the whole feature. `bt-plan` writes it as a roadmap (every
312
312
  phase and task pending, with the time estimate); `bt-execute` updates it **task by task**, not phase
313
313
  by phase: a *Now* banner says which task is being worked on and what is happening this minute (the
314
- dashboard helper rewrites a small live-status file each time a task starts, is built, is being verified
315
- or is done — no agent spends time on it), and each task's result appears the moment it is built. An open tab keeps itself current: it
314
+ dashboard helper rewrites a small live-status file each time a task starts, is built, is being verified,
315
+ fails into a fix round or is done, and each time a snapshot is added; between those the agents write it
316
+ before anything slow, never 15 minutes apart, and a background watchdog writes a heartbeat naming the
317
+ latest file that changed after 10 quiet minutes), and each task's result appears the moment it is built. An open tab keeps itself current: it
316
318
  re-reads its data in the background (every 10 s during a run, every 30 s otherwise) and refreshes
317
319
  only when something changed — a task result, a finished run, the next run starting, or a plan
318
320
  reopened because you added a task after it was complete (the dashboard drops back to *paused* and
@@ -321,7 +323,9 @@ at run end fails if anything was skipped — a plan without its dashboard, tasks
321
323
  a *complete* that is not, a visual task with no snapshot, frames saved to `snapshots/` that never reached
322
324
  the page, a ticked task with no verifier result. Phase by
323
325
  phase and task by task it shows what was actually done, files, tests, verifier verdicts, attempts,
324
- decisions, deferrals and follow-ups. The snapshots tell the story of the build, taken from the captures
326
+ decisions, deferrals and follow-ups. Follow-ups are numbered `F1`, `F2` … and each comes with a
327
+ `/bt-spec Fix F1 from @…/documents/<slug>_followups.md` command to copy (tick several to spec them together),
328
+ the same way bt-profile hands its fixes to bt-spec. The snapshots tell the story of the build, taken from the captures
325
329
  the work already makes (never an extra session just for a picture): a plan-wide "before" ahead of T1;
326
330
  for every visual task a **progression** from the same camera as each meaningful layer lands (a terrain:
327
331
  heightmap → textures → roads → trees → foliage → lighting) — the builder's before, milestone and built
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs-toolkit/agent",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Installs the Babylon Toolkit Desktop Agent for Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity.",
5
5
  "keywords": [
6
6
  "babylonjs",
@@ -27,7 +27,8 @@ Run tasks from a plan: build each with its tests, have an independent verifier c
27
27
  - **Never commit** — no git commit, stage, stash, reset, checkout, push or branch switch, in any mode. Changes stay in the working tree.
28
28
  - **Snapshots tell the story — ENFORCED.** The dashboard's snapshots are the chronicle of how the plan came together, read long after the run; a row of "No snapshot" loses that record for good. Every visual task leaves its progression on the page *as it is built*, through `dashboard.mjs snapshot` only (*Snapshots tell the story*, below). Speed, TIME MATTERS and `--auto-pilot` never thin it.
29
29
  - **Scope:** only the selected tasks. Ambiguous, or blocked by an unfinished task → stop and tell the user *(auto-pilot: decide, log it)*.
30
- - **Open the run first** — before docs, code or pre-flight: take the clock, append `⏱ Run <n> start`, do *Run start*, so a refreshed dashboard shows the run within a minute.
30
+ - **Open the run first** — before docs, code or pre-flight: take the clock, append `⏱ Run <n> start`, do *Run start* and launch the watchdog, so a refreshed dashboard shows the run within a minute.
31
+ - **Never let the dashboard go silent — ENFORCED.** *Current run activity* is how the user knows the run is alive; a "no update for 28 min" while work goes on reads as a hung run. Keep the live file current between status changes and run the watchdog behind it (*The live file*, below).
31
32
  - **Read the docs once:** for Babylon work, the Agent Reference (https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md) once per session plus only the sub-documents the tasks need, searched — the authority on conventions and API. Unreadable → stop and tell the user *(auto-pilot: retry 3×, carry on, log it)*. Read the checklist and the `SPEC.md` parts the tasks touch; re-read after a compaction.
32
33
  - **SPEC.md** constrains the build. It disagrees with the code → stop and tell the user *(auto-pilot: decide, fix SPEC.md in that task, log it)*. Changes to architecture, systems, conventions or dependencies leave SPEC.md matching (the plan's `Update SPEC.md` task, or anyway), per its "How to update this spec". **Write the product, never the procedure** — no capture protocols, tool lists, ledgers or gates, which would bind every later feature.
33
34
  - **Say what you are doing** in one line at each boundary.
@@ -51,7 +52,7 @@ Work in **phases**: the plan's `### Phase N` groups, else up to 3 consecutive ta
51
52
  1. **Build** to the Agent Reference's **Coding Practices — ENFORCED** (clean code in the project's language, full-word names, maintainable structure; JSDoc always, never a fail reason) and, for HUDs and overlays, **Game UI Performance — ENFORCED** (per-frame values through refs and one frame loop, never React state, props, a store or per-frame EventBus messages). Write the tests `Tests:` names (else meaningful Acceptance and edge cases) in the feature folder's `tests/`, in the repo's runner and style; get them green — fix the code, not the test, unless the test is wrong; nothing testable → say so. A visual task **saves its progression as it builds** (*Snapshots tell the story*): a "before" frame before its first change, a frame each time a meaningful layer lands, and its built frame, kept from the captures it takes to iterate, from the same camera, and added with `dashboard.mjs snapshot` **before** its `built` write. It checks its own work with **one quick look** (a capture at one viewport, or a scripted probe) and never runs the Acceptance's live proof; that is the verifier's.
52
53
  2. **Verify** with an **independent verifier** subagent (charter below) given the changed files — one per phase (`--strict`: per task), the only live checker, returning PASS/FAIL per task with evidence.
53
54
  3. **Tick** each passed task `- [x]` at once, unless it depends on one that failed this phase. Never tick partial, skipped or unverified work.
54
- 4. **Fix loop:** the task's builder fixes it and re-runs its tests; then **resume the same verifier** (`SendMessage` or equivalent) with only the failed items and the fix — never a fresh verifier (`--strict`: a fresh adversarial verifier re-checks the whole task). Records-only slips (a stale number or note) you fix and re-check. 3 attempts (`--strict`: 5), each changing something material; stop early when two fail alike with no new idea. Still failing → unticked; stop and report *(auto-pilot: defer, continue)*.
55
+ 4. **Fix loop:** write the FAIL first (`task <feature-folder> T<n> --set '{"status":"in-progress","attempts":<n>}'`), so the dashboard shows the fix round instead of a task stuck at `verifying`; the task's builder fixes it and re-runs its tests; then **resume the same verifier** (`SendMessage` or equivalent) with only the failed items and the fix — never a fresh verifier (`--strict`: a fresh adversarial verifier re-checks the whole task). Records-only slips (a stale number or note) you fix and re-check. 3 attempts (`--strict`: 5), each changing something material; stop early when two fail alike with no new idea. Still failing → unticked; stop and report *(auto-pilot: defer, continue)*.
55
56
  5. **Report:** tasks done (range, completed/total, plan finished?), files changed, tests (`tests: 4 passed (builder) · verifier-checked`), `verified (independent subagent)` or `verified (self)`, the dashboard path, the plan summary path if written, the next task id.
56
57
 
57
58
  ### Parallel rules — in every track builder's brief
@@ -63,11 +64,11 @@ Work in **phases**: the plan's `### Phase N` groups, else up to 3 consecutive ta
63
64
 
64
65
  ### The verifier's charter
65
66
 
66
- *"Confirm each task's Acceptance is met and run its `Verify` commands against their expected output. Re-run the tests and the relevant suite once; tests that miss the Acceptance or named edge cases, or could not fail, are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled named edge cases, documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. FAIL a touched code file that breaks Coding Practices — ENFORCED: not in the project's language; needless `any`; one- or two-letter names, cryptic abbreviations or code-golf tricks (loop counters, axis/`uv` names, toolkit aliases and exported-data names excepted); dead code, unused imports, leftover `console.log`; structure a newcomer cannot maintain. FAIL a HUD, overlay or GUI file that breaks Game UI Performance — ENFORCED: a per-frame value (speed, needles, timers, bars) through React state, props, context, a store or a per-frame EventBus post; a setter, `dispatch(` or `EventBus.PostMessage(` inside `requestAnimationFrame`, a frame-loop hook, a render observable or `update()`; `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry written, or layout read, per frame; a Babylon GUI control assigned every frame without a changed-value check; a frame loop on a menu, pause or results screen, splash, preloader or landing page, or doing what CSS could (a 3D or scroll-scrubbed hero that pauses off-screen is fine); a HUD loop writing while hidden or paused; a CSS `transition` on a property the loop writes. Quote the lines. JSDoc is never a FAIL — list gaps under non-blocking `JSDoc notes`. You are the only live checker: check live (browser through `bt-cdp.mjs`, Unity where relevant) every task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — and the plan's final end-to-end check, judging the running result as a user would, beside any reference image; unit tests never substitute. One session per phase on the running dev server, exporting only as *Work fast* allows. Save the frames from that session that show each visual task's verified result to `[SNAPSHOTS]` as `T<n>-<NN>-<stage>.png`: the same camera or viewport as the builder's progression, plus any angle or comparison (Unity beside browser, before beside after, running beside reference) that proves the Acceptance. Add each to its task with `dashboard.mjs snapshot` and return each path with its one-line caption. Snapshots never add a page session or an export of their own, but inside your session a capture costs seconds, so take it. Set each task `verifying` as you start it. A test count in the plan means 'named tests pass, no new failures'. Resumed after a fix, re-check only the failed items and what the fix touched. [SCOPE] Return PASS/FAIL per task with evidence, one line on what you ran live and where (or `none — tests only`), and records-only slips separately."*
67
+ *"Confirm each task's Acceptance is met and run its `Verify` commands against their expected output. Re-run the tests and the relevant suite once; tests that miss the Acceptance or named edge cases, or could not fail, are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled named edge cases, documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. FAIL a touched code file that breaks Coding Practices — ENFORCED: not in the project's language; needless `any`; one- or two-letter names, cryptic abbreviations or code-golf tricks (loop counters, axis/`uv` names, toolkit aliases and exported-data names excepted); dead code, unused imports, leftover `console.log`; structure a newcomer cannot maintain. FAIL a HUD, overlay or GUI file that breaks Game UI Performance — ENFORCED: a per-frame value (speed, needles, timers, bars) through React state, props, context, a store or a per-frame EventBus post; a setter, `dispatch(` or `EventBus.PostMessage(` inside `requestAnimationFrame`, a frame-loop hook, a render observable or `update()`; `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry written, or layout read, per frame; a Babylon GUI control assigned every frame without a changed-value check; a frame loop on a menu, pause or results screen, splash, preloader or landing page, or doing what CSS could (a 3D or scroll-scrubbed hero that pauses off-screen is fine); a HUD loop writing while hidden or paused; a CSS `transition` on a property the loop writes. Quote the lines. JSDoc is never a FAIL — list gaps under non-blocking `JSDoc notes`. You are the only live checker: check live (browser through `bt-cdp.mjs`, Unity where relevant) every task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — and the plan's final end-to-end check, judging the running result as a user would, beside any reference image; unit tests never substitute. One session per phase on the running dev server, exporting only as *Work fast* allows. Save the frames from that session that show each visual task's verified result to `[SNAPSHOTS]` as `T<n>-<NN>-<stage>.png`: the same camera or viewport as the builder's progression, plus any angle or comparison (Unity beside browser, before beside after, running beside reference) that proves the Acceptance. Add each to its task with `dashboard.mjs snapshot` and return each path with its one-line caption. Snapshots never add a page session or an export of their own, but inside your session a capture costs seconds, so take it. Set each task `verifying` as you start it, and write the live file (`dashboard.mjs live`) before each slow step — an export, a capture pass across tracks or scenes, a long test run — so it is never 15 minutes silent. A test count in the plan means 'named tests pass, no new failures'. Resumed after a fix, re-check only the failed items and what the fix touched. [SCOPE] Return PASS/FAIL per task with evidence, one line on what you ran live and where (or `none — tests only`), and records-only slips separately."*
67
68
 
68
69
  `[SNAPSHOTS]` is the feature folder's `snapshots/` path. `[SCOPE]` — **standard:** *"Do not add mutation testing, fuzzing, restarts or audits of untouched files unless something you found points there; aim for about 25 tool calls and report rather than expand."* **`--strict`:** *"Be adversarial: actively look for any reason the Acceptance is NOT met — mutation checks against the tests, randomized inputs, re-deriving values from the plan's Decisions and Design Reference, live QA of every rendered or exported surface."* For a task built on a sibling skill (e.g. bt-design's 3D-Hero-Scroll), give the verifier its relevant part — its documented options are Acceptance.
69
70
 
70
- **Every subagent gets a brief, not homework:** its task blocks with the Decisions / Design Reference entries they cite, the SPEC.md parts touched, the Reference excerpts needed with links (**always the full Coding Practices — ENFORCED**), its owned files (track builders: plus the *Parallel rules*), the test command, the `wait.mjs` and `bt-cdp.mjs` paths, its exact `dashboard.mjs` lines with the folder filled in (`task`, `snapshot`; `--verbose`: its `details` fields), **builders and verifiers: the whole *Snapshots tell the story* section**, the project's agent instructions, *Work fast*, and: *"Do not read the Agent Reference or SPEC.md in full — the parts you need are here, and this overrides any standing instruction to read it first. Read one sub-document (search it, never the whole file) only if you hit an API this brief does not cover, and say which."*
71
+ **Every subagent gets a brief, not homework:** its task blocks with the Decisions / Design Reference entries they cite, the SPEC.md parts touched, the Reference excerpts needed with links (**always the full Coding Practices — ENFORCED**), its owned files (track builders: plus the *Parallel rules*), the test command, the `wait.mjs` and `bt-cdp.mjs` paths, its exact `dashboard.mjs` lines with the folder filled in (`task`, `snapshot`, `live`; `--verbose`: its `details` fields), **builders and verifiers: the whole *Snapshots tell the story* section and the *live file* rule**, the project's agent instructions, *Work fast*, and: *"Do not read the Agent Reference or SPEC.md in full — the parts you need are here, and this overrides any standing instruction to read it first. Read one sub-document (search it, never the whole file) only if you hit an API this brief does not cover, and say which."*
71
72
 
72
73
  ## Feature folder and dashboard
73
74
 
@@ -80,6 +81,7 @@ Work in **phases**: the plan's `### Phase N` groups, else up to 3 consecutive ta
80
81
  documents/<slug>_dashboard.js the dashboard's data
81
82
  documents/<slug>_live.js what is happening now (written by the helper)
82
83
  documents/<slug>_summary.html the plain-language summary, once complete (+ _summary.js)
84
+ documents/<slug>_followups.md the follow-ups in full, for bt-spec (written by the helper)
83
85
  snapshots/ tests/ recon/
84
86
  ```
85
87
 
@@ -88,7 +90,8 @@ Work in **phases**: the plan's `### Phase N` groups, else up to 3 consecutive ta
88
90
  The page, starter data and live file come from `templates/dashboard/` *(skills loaded through a tool: `load_skill` + `read_skill_resource`; as files: this skill's folder)*; `dashboard.html` is copied with `{{slug}}` replaced, never edited. **`data-schema.md` documents every field, status and snapshot shape — read it once per run; brief each role on its parts.** bt-plan writes all three; create any that is missing. **Every write goes through `scripts/dashboard.mjs`** (atomic, shape-checked; options in its header; no Node → `data-schema.md`'s fallback).
89
91
 
90
92
  - **Three writes per task** (`task <feature-folder> T7 --set '{…}'`): `in-progress` at start (you, launching its builder, or a builder starting its next task); `built` by the builder once green **and its frames are on the dashboard**, with `summary` (what was done, anything surprising), `files`, `tests`; `done` by you at the tick, with `verifier`, `attempts`, `doneAt`, `DECISION` lines and `checkedLive` (what ran live and where, or `""`). The verifier adds `verifying`; a FAIL is `in-progress` with `attempts` + 1; a deferral `deferred` with `deferredReason`.
91
- - **The helper writes the live file** on every `task` status change and `status` write, keeping *Current run activity* current. Agents never write it; no watchdog is launched.
93
+ - **The live file — never 15 minutes silent.** The helper rewrites it on every `task` status change, every `snapshot` and every `status` write. Between those, whoever is working writes it: `live <feature-folder> --task T7 --role implementer|verifier|orchestrator --activity "<one plain sentence on what is happening now>" --step "…"`. Write it at each milestone inside a task, **before anything slow** (a build, an export, a bake, a live session, a test run), at each fix attempt, and as the verifier moves to each task, track or scene. Never let it go 15 minutes without a write during active work; the page flags a 20-minute silence.
94
+ - **The watchdog is the safety net, never the substitute.** At run start, launch `node <skills>/bt-execute/scripts/dashboard.mjs watch <feature-folder> --watch <the project's source folder> --watch <your scratch folder>` in the background, adding `--watch` for any other folder the work writes (exports, logs, captures). After 10 quiet minutes it writes a heartbeat naming the latest file that changed ("still working — latest activity: snapshots/T2-03-fix.png at 16:42"). After 30 with no file change either, it says the run may be stalled. It exits by itself once the status is no longer `in-progress` (or after 12 hours). A host that cannot run a background process skips it and keeps the live writes tighter.
92
95
  - **Snapshots are the chronicle — ENFORCED**, added only with `snapshot <feature-folder> <T<n>|P<N>|plan> --src snapshots/… --caption "…"` (`--before … --after …`: comparison; `--frame "src|stage|caption"` repeated: progression; target `comparison` with `--before`/`--after`: the plan-wide before/after), never snapshot JSON. Who takes which frames, and when: *Snapshots tell the story*, below.
93
96
  - **`check <feature-folder>` is the gate** at every phase boundary and run end; nothing closes while it fails. It catches snapshots that cannot show and skipped deliverables: a missing page or data file, tasks unlike the plan's checklist, a false or summary-less `complete`, a visual task `done` without a snapshot, frames left in `snapshots/` that no entry shows, a ticked task without a verifier result.
94
97
  - **A record, never a gate on a task.** Never silently rewrite an earlier result: change it and add `{ at, by: "T<n>", note }` to its `updates` (`--note "…" --by T<n>`), badged **Updated**; superseded snapshots stay.
@@ -107,9 +110,9 @@ The snapshots are how a human sees what was built and how it came together. Choo
107
110
 
108
111
  ### Run start, phases, run end
109
112
 
110
- - **Run start:** create any missing `.agents/specs/`, `complete/`, `archived/`, `profile/`, `recon/` (each with an empty `.gitkeep`); re-copy `dashboard.html` and an existing `documents/<slug>_summary.html` from their templates; **sync the dashboard with the plan** — add missing phases and tasks in plan order as `pending` with an `updates` note (`Added to the plan after <phase 2 ran / it was complete> — <why>`), remove dropped ones with an `activity` line. Then `status <feature-folder> in-progress`, `runs` + 1, the run-log link, an `activity` line; in git, add `.agents/*/*/documents/*_live.js` to `.gitignore` once. Before T1 of the first run changes anything, save `snapshots/plan-before.png`, the plan-wide "before" (*Snapshots tell the story*).
113
+ - **Run start:** create any missing `.agents/specs/`, `complete/`, `archived/`, `profile/`, `recon/` (each with an empty `.gitkeep`); re-copy `dashboard.html` and an existing `documents/<slug>_summary.html` from their templates; **sync the dashboard with the plan** — add missing phases and tasks in plan order as `pending` with an `updates` note (`Added to the plan after <phase 2 ran / it was complete> — <why>`), remove dropped ones with an `activity` line. Then `status <feature-folder> in-progress`, `runs` + 1, the run-log link, an `activity` line, and **the watchdog launched in the background**; in git, add `.agents/*/*/documents/*_live.js` to `.gitignore` once. Before T1 of the first run changes anything, save `snapshots/plan-before.png`, the plan-wide "before" (*Snapshots tell the story*).
111
114
  - **Each phase, after its ticks:** status, times and minutes (its `⏱` line), verifier result, a 2–3 sentence summary, the phase's progression (its tasks' frames in build order from one camera, `snapshot P<N> --frame …`) when it spans tasks, `decisions`, `activeTime` (all runs: each `⏱ Run <n> end` line's `active` plus this run's), an `activity` line, a "so far" `outcome`, and `check` passing.
112
- - **Run end — the After Action Report.** Status from **re-reading the checkboxes**: all `- [x]` → `complete`; all ticked or ⏭️ DEFERRED → `incomplete`; else `paused` — never `in-progress`. Write `followUps` and `afterAction` (fields in `data-schema.md`): headline, body, highlights, **one plan-wide before/after** (`snapshot <feature-folder> comparison --before snapshots/plan-before.png --after snapshots/plan-after.png --caption "…"`), the "after" from the same camera in the final end-to-end session; the key progression in `afterAction.snapshots` if it tells the story best; and every run `afterAction.testing` — each suite the plan touched re-run **once in full** (one `suites` entry each, never summed from tasks), a `summary` and `gaps`. An early end writes it too (*Interim* while `paused`; revised next run with an `updates` entry); finishing a reopened plan rewrites it, notes the change and retakes the "after". Then open `dashboard.html` headless once: every snapshot shows.
115
+ - **Run end — the After Action Report.** Status from **re-reading the checkboxes**: all `- [x]` → `complete`; all ticked or ⏭️ DEFERRED → `incomplete`; else `paused` — never `in-progress`. **Follow-ups:** add each with `followup <feature-folder> --title "<one line>" --detail "…" --source "T<n> <role>" [--file <path>]…` — one per thing a human should look at next (a pre-existing problem the run logged, work outside the plan's scope, a gap no check covered), never a note about what went well. Each carries enough to be specced on its own: what is wrong, the evidence (numbers, where it showed), where to look, what fixing it involves. The helper numbers them `F1`, `F2` …, writes `documents/<slug>_followups.md`, and the dashboard offers a `/bt-spec Fix F<n> from …` command for each, and for any ticked together. A later run revises one with `--id F2 … --note "why"`, never by rewriting it. Then write `afterAction` (fields in `data-schema.md`): headline, body, highlights, **one plan-wide before/after** (`snapshot <feature-folder> comparison --before snapshots/plan-before.png --after snapshots/plan-after.png --caption "…"`), the "after" from the same camera in the final end-to-end session; the key progression in `afterAction.snapshots` if it tells the story best; and every run `afterAction.testing` — each suite the plan touched re-run **once in full** (one `suites` entry each, never summed from tasks), a `summary` and `gaps`. An early end writes it too (*Interim* while `paused`; revised next run with an `updates` entry); finishing a reopened plan rewrites it, notes the change and retakes the "after". Then open `dashboard.html` headless once: every snapshot shows.
113
116
  - **Plan summary, only when `complete`:** copy `templates/summary/summary.html` to `documents/<slug>_summary.html` (`{{slug}}` replaced) and write `documents/<slug>_summary.js` per **`summary-guide.md`** and its worked example `summary.template.js` — the plan for people who never see the code, on-screen names in **bold**, real values, no file names, task IDs or test counts. Set `afterAction.planSummary`. A reopened plan keeps its summary until it completes again; then rewrite it, add the date to `stamp` (`Fixed on 2026-10-19; updated on 2026-11-02`) and say in the lead what changed.
114
117
  - **`--verbose`** changes what is written, never what is done: `detail: "verbose"`, each task's `details` from whoever has the facts (the builder at `built`, the verifier as it checks, you in fix rounds), and at run end `afterAction.sections` — fields and card order in `data-schema.md`. Later runs never thin it.
115
118
 
@@ -13,6 +13,8 @@
13
13
  * progression: --frame "snapshots/x.png|stage|caption" repeated)
14
14
  * node dashboard.mjs snapshot <feature-folder> comparison --before snapshots/plan-before.png --after snapshots/plan-after.png --caption "…"
15
15
  * (the After Action Report's one plan-wide before/after — replaces the previous one)
16
+ * node dashboard.mjs followup <feature-folder> --title "…" --detail "…" [--source "T2 verifier"] [--file path]…
17
+ * (revise one: --id F2 [--title …] [--detail …] [--file …] --note "why it changed" [--by T4])
16
18
  * node dashboard.mjs activity <feature-folder> "Phase 2 verified — T4–T6 PASS"
17
19
  * node dashboard.mjs status <feature-folder> in-progress|paused|complete|incomplete
18
20
  * node dashboard.mjs check <feature-folder>
@@ -20,11 +22,12 @@
20
22
  *
21
23
  * <feature-folder> is .agents/specs/<slug>. Timestamps come from this machine's local clock.
22
24
  *
23
- * The live file (`documents/<slug>_live.js`) is written by this helper, not by agents: every `task --set` that
24
- * changes a task's `status` rewrites it from that change (the task, its phase, the role its status implies, one
25
- * sentence on its new state plus the summary's first sentence, and a step in its log), and every `status` write
26
- * records the run starting or ending. A `--set` without `status` leaves it untouched. `live` remains for a hand
27
- * write; `watch` is a manual tool — no skill launches it.
25
+ * The live file (`documents/<slug>_live.js`) is how the page shows the run is alive. Every `task --set` that changes a
26
+ * task's `status` rewrites it from that change (the task, its phase, the role its status implies, one sentence on its
27
+ * new state plus the summary's first sentence, and a step in its log), every `snapshot` adds a step, and every
28
+ * `status` write records the run starting or ending. A `--set` without `status` leaves it untouched. Between those,
29
+ * agents write `live` at each meaningful step (before anything slow, at each fix attempt), and `watch` — the
30
+ * watchdog bt-execute launches in the background at run start — writes a heartbeat after 10 quiet minutes.
28
31
  *
29
32
  * Snapshots go in only through `snapshot`. `task --set` and `check` refuse any snapshot entry the page cannot show —
30
33
  * an image under `path` (or `file`, `image`, …) instead of `src`, or a `src` that is not a file under the feature
@@ -35,6 +38,11 @@
35
38
  * shows — add each with `snapshot` first. Moving a visual task (kind live, game or unity) to `built` with no snapshot
36
39
  * at all is refused too, unless `--no-frame "<reason>"` records why it has nothing to show yet.
37
40
  *
41
+ * Follow-ups — what a human should look at next — are added with `followup`, which numbers them `F1`, `F2`, … and
42
+ * rewrites `documents/<slug>_followups.md`: each follow-up in full, the document bt-spec reads when the dashboard's
43
+ * `/bt-spec Fix F1 and F3 from @…_followups.md` command is run. A follow-up written as plain text is repaired into
44
+ * one with an id by every write, and `check` rewrites the document.
45
+ *
38
46
  * `check` is the gate at every phase boundary and at run end. Beyond the snapshots it fails, listing every problem in
39
47
  * one message, when a deliverable was skipped: a `documents/<slug>_plan.md` without `dashboard.html`, the dashboard
40
48
  * data or the live file; dashboard tasks that differ from the plan's checklist (ids or order); a `complete` status
@@ -53,6 +61,8 @@ const MAXIMUM_LIVE_STEPS = 12;
53
61
  const LIVE_PREFIX = 'window.FEATURE_LIVE';
54
62
  /** Who is working on a task in each status — the live file's `role` after a `task` write; anything else is the orchestrator. */
55
63
  const ROLE_FOR_TASK_STATUS = { 'in-progress': 'implementer', built: 'implementer', verifying: 'verifier' };
64
+ /** How the live file names a snapshot target that is not a task or phase id. */
65
+ const SNAPSHOT_OWNER_NAMES = { plan: 'the After Action Report', comparison: 'the plan-wide before/after' };
56
66
  /** Task kinds whose result is seen on screen, so a `done` task of this kind must have a snapshot. */
57
67
  const VISUAL_TASK_KINDS = new Set(['live', 'game', 'unity']);
58
68
  /** Task statuses that mean its builder is finished, so every frame saved for it belongs on the dashboard. */
@@ -61,6 +71,12 @@ const BUILT_TASK_STATUSES = new Set(['built', 'verifying', 'done']);
61
71
  const CLOSED_PHASE_STATUSES = new Set(['done', 'partial', 'deferred']);
62
72
  /** Run statuses that mean a run has ended and written its After Action Report. */
63
73
  const RUN_ENDED_STATUSES = new Set(['paused', 'complete', 'incomplete']);
74
+ /** A follow-up id: `F1`, `F12`. */
75
+ const FOLLOW_UP_ID = /^F(\d+)$/;
76
+ /** A follow-up written as plain text that starts with its id: `"F3 — The banner stays up"`. */
77
+ const FOLLOW_UP_TEXT_WITH_ID = /^(F\d+)\s+[—–-]\s+([\s\S]*)$/;
78
+ /** The longest title a follow-up repaired from plain text keeps; the whole text stays in its detail. */
79
+ const MAXIMUM_FOLLOW_UP_TITLE = 100;
64
80
  /** Image files a snapshot can show. */
65
81
  const SNAPSHOT_IMAGE_FILE = /\.(png|jpe?g|webp|gif|avif)$/i;
66
82
  /** The plan-wide "before" frame, saved before T1 of the first run. */
@@ -91,13 +107,28 @@ const SNAPSHOT_SHAPES_HELP = [
91
107
 
92
108
  const [command, featureFolder, ...rest] = process.argv.slice(2);
93
109
 
110
+ /**
111
+ * The feature's slug: the folder's name, as bt-spec creates it. A folder renamed after the fact keeps its files'
112
+ * original names, so when `documents/<folder name>_dashboard.js` is missing and the folder holds exactly one
113
+ * `documents/*_dashboard.js`, that file's prefix is the slug.
114
+ * @param {string} folder The feature folder.
115
+ * @returns {string}
116
+ */
117
+ function featureSlug(folder) {
118
+ const folderName = basename(folder.replace(/[\\/]+$/, ''));
119
+ const documentsFolder = join(folder, 'documents');
120
+ if (existsSync(join(documentsFolder, `${folderName}_dashboard.js`)) || !existsSync(documentsFolder)) return folderName;
121
+ const dataFiles = readdirSync(documentsFolder).filter((name) => name.endsWith('_dashboard.js'));
122
+ return dataFiles.length === 1 ? dataFiles[0].slice(0, -'_dashboard.js'.length) : folderName;
123
+ }
124
+
94
125
  /**
95
126
  * Reads the paths of a feature folder's two data files.
96
127
  * @param {string} folder The feature folder, `.agents/specs/<slug>`.
97
128
  * @returns {{ slug: string, dashboardPath: string, livePath: string }}
98
129
  */
99
130
  function dataPaths(folder) {
100
- const slug = basename(folder.replace(/[\\/]+$/, ''));
131
+ const slug = featureSlug(folder);
101
132
  return {
102
133
  slug,
103
134
  dashboardPath: join(folder, 'documents', `${slug}_dashboard.js`),
@@ -129,6 +160,7 @@ function writeData(path, prefix, data) {
129
160
  // reads) can never reach the page as "No snapshot", whoever wrote it.
130
161
  if (data && Array.isArray(data.phases)) repairSnapshots(data);
131
162
  if (data && Array.isArray(data.decisions)) repairDecisions(data);
163
+ if (data && Array.isArray(data.followUps)) repairFollowUps(data);
132
164
  const temporaryPath = `${path}.${process.pid}.tmp`;
133
165
  writeFileSync(temporaryPath, `${prefix} = ${JSON.stringify(data, null, 2)};\n`, 'utf8');
134
166
  renameSync(temporaryPath, path);
@@ -274,6 +306,32 @@ function writeLiveForTask(folder, phaseNumber, task, summary) {
274
306
  });
275
307
  }
276
308
 
309
+ /**
310
+ * Records a snapshot just added as a step in the live file, so the page sees the work moving between status changes
311
+ * (frames are added as they are saved). The task, phase and role stay as they were.
312
+ * @param {string} folder The feature folder.
313
+ * @param {string} target The snapshot's target: a task, a phase, `plan` or `comparison`.
314
+ * @param {string} caption The snapshot's caption.
315
+ */
316
+ function writeLiveForSnapshot(folder, target, caption) {
317
+ const { livePath } = dataPaths(folder);
318
+ const { prefix, data: live } = readLive(livePath);
319
+ const now = localTime();
320
+ const owner = SNAPSHOT_OWNER_NAMES[target] || target;
321
+ const activity = caption ? `Added a snapshot to ${owner} — ${caption}` : `Added a snapshot to ${owner}.`;
322
+ const steps = Array.isArray(live.steps) ? live.steps : [];
323
+ steps.push({ at: now.clock, text: activity });
324
+ writeData(livePath, prefix, {
325
+ ...live,
326
+ updatedAt: now.stamp,
327
+ task: live.task || '',
328
+ role: live.role || 'orchestrator',
329
+ activity,
330
+ steps: steps.slice(-MAXIMUM_LIVE_STEPS),
331
+ source: 'agent',
332
+ });
333
+ }
334
+
277
335
  /**
278
336
  * Rewrites the live file when the run's status changes: a run starting clears the last run's task and steps; a run
279
337
  * ending says so (the page hides the live file once the status is no longer in-progress).
@@ -532,6 +590,7 @@ function writeSnapshot(folder, argumentList) {
532
590
  }
533
591
  data.updatedAt = localTime().stamp;
534
592
  writeData(dashboardPath, prefix, data);
593
+ writeLiveForSnapshot(folder, target, caption);
535
594
  }
536
595
 
537
596
  /**
@@ -636,6 +695,175 @@ function repairDecisions(dashboard) {
636
695
  return repairs;
637
696
  }
638
697
 
698
+ /**
699
+ * The next free follow-up id: one past the highest `F<n>` in the list, so ids never repeat after one is revised.
700
+ * @param {any[]} followUps The follow-ups so far.
701
+ * @param {Set<string>} [alsoTaken] Ids claimed by entries not yet in the list.
702
+ * @returns {string}
703
+ */
704
+ function nextFollowUpId(followUps, alsoTaken = new Set()) {
705
+ const taken = [...followUps.map((followUp) => followUp && followUp.id), ...alsoTaken];
706
+ const highest = taken.reduce((maximum, id) => {
707
+ const match = FOLLOW_UP_ID.exec(String(id || ''));
708
+ return match ? Math.max(maximum, Number(match[1])) : maximum;
709
+ }, 0);
710
+ return `F${highest + 1}`;
711
+ }
712
+
713
+ /**
714
+ * A short title from a follow-up written as one block of text: its first sentence, cut at a word near
715
+ * `MAXIMUM_FOLLOW_UP_TITLE` characters when longer. A sentence ends only where the next word starts with a capital,
716
+ * so "the GO! banner" stays whole.
717
+ * @param {string} text The follow-up's text.
718
+ * @returns {string}
719
+ */
720
+ function followUpTitleFrom(text) {
721
+ const trimmed = String(text || '').trim();
722
+ const sentenceMatch = /^[\s\S]*?[.!?](?=\s+[A-Z]|$)/.exec(trimmed);
723
+ const sentence = sentenceMatch ? sentenceMatch[0] : trimmed;
724
+ if (sentence.length <= MAXIMUM_FOLLOW_UP_TITLE) return sentence;
725
+ const cut = sentence.lastIndexOf(' ', MAXIMUM_FOLLOW_UP_TITLE);
726
+ return `${sentence.slice(0, cut > 0 ? cut : MAXIMUM_FOLLOW_UP_TITLE).replace(/[\s,;:—–-]+$/, '')}…`;
727
+ }
728
+
729
+ /**
730
+ * The ids the follow-ups already carry — an entry's `id`, or the `F3 — ` a plain-text one starts with — so a repair
731
+ * never hands out an id that a later entry in the list already has.
732
+ * @param {any[]} followUps The follow-ups, possibly mixed with plain text.
733
+ * @returns {Set<string>}
734
+ */
735
+ function claimedFollowUpIds(followUps) {
736
+ const ids = followUps.map((followUp) => {
737
+ if (followUp && typeof followUp === 'object') return followUp.id;
738
+ const match = FOLLOW_UP_TEXT_WITH_ID.exec(String(followUp));
739
+ return match ? match[1] : '';
740
+ });
741
+ return new Set(ids.filter(Boolean));
742
+ }
743
+
744
+ /**
745
+ * Repairs the follow-ups in place, so each has the id the dashboard's bt-spec commands name: a follow-up written as
746
+ * plain text becomes `{ "id": "F3", "title", "detail", … }` (its own `F3 — ` prefix kept as the id, else the next free
747
+ * one), and an entry without an id gets the next free one. Lists and `updates` are made lists.
748
+ * @param {any} dashboard The dashboard data.
749
+ * @returns {string[]} One line per repair made.
750
+ */
751
+ function repairFollowUps(dashboard) {
752
+ const repairs = [];
753
+ if (!Array.isArray(dashboard.followUps)) return repairs;
754
+ const claimed = claimedFollowUpIds(dashboard.followUps);
755
+ dashboard.followUps = dashboard.followUps.map((followUp, index) => {
756
+ if (typeof followUp === 'string') {
757
+ const match = FOLLOW_UP_TEXT_WITH_ID.exec(followUp);
758
+ const text = match ? match[2] : followUp;
759
+ const id = match ? match[1] : nextFollowUpId([], claimed);
760
+ claimed.add(id);
761
+ const title = followUpTitleFrom(text);
762
+ repairs.push(`followUps[${index}]: plain text → { "id": "${id}", "title", "detail" }`);
763
+ return { id, title, detail: title === text ? '' : text, source: '', files: [], at: '', updates: [] };
764
+ }
765
+ if (!followUp || typeof followUp !== 'object') return followUp;
766
+ if (!followUp.id) {
767
+ followUp.id = nextFollowUpId([], claimed);
768
+ claimed.add(followUp.id);
769
+ repairs.push(`followUps[${index}]: no id → "${followUp.id}"`);
770
+ }
771
+ if (!Array.isArray(followUp.files)) followUp.files = [];
772
+ if (!Array.isArray(followUp.updates)) followUp.updates = [];
773
+ return followUp;
774
+ }).filter((followUp) => followUp && typeof followUp === 'object');
775
+ return repairs;
776
+ }
777
+
778
+ /**
779
+ * This feature's folder as a path from the project root (`.agents/specs/<slug>`, or wherever the user moved it),
780
+ * for the bt-spec commands. The helper runs from the project root, so a folder under it is named as it is.
781
+ * @param {string} folder The feature folder.
782
+ * @returns {string}
783
+ */
784
+ function featureFolderFromRoot(folder) {
785
+ const fromRoot = relative(process.cwd(), resolve(folder)).split('\\').join('/');
786
+ return fromRoot.startsWith('.agents/') ? fromRoot : `.agents/specs/${dataPaths(folder).slug}`;
787
+ }
788
+
789
+ /**
790
+ * Joins follow-up ids the way the bt-spec commands read: `F1`, `F1 and F2`, `F1, F2 and F3`.
791
+ * @param {string[]} ids The ids.
792
+ * @returns {string}
793
+ */
794
+ function joinFollowUpIds(ids) {
795
+ if (ids.length <= 1) return ids.join('');
796
+ return `${ids.slice(0, -1).join(', ')} and ${ids[ids.length - 1]}`;
797
+ }
798
+
799
+ /**
800
+ * The follow-ups document bt-spec reads: the feature it came from, the commands that spec its follow-ups, and every
801
+ * follow-up in full under its id.
802
+ * @param {string} folder The feature folder.
803
+ * @param {any} dashboard The dashboard data, follow-ups repaired.
804
+ * @returns {string} Markdown.
805
+ */
806
+ function followUpsDocument(folder, dashboard) {
807
+ const { slug } = dataPaths(folder);
808
+ const featureTitle = (dashboard.feature && dashboard.feature.title) || slug;
809
+ const source = `@${featureFolderFromRoot(folder)}/documents/${slug}_followups.md`;
810
+ const ids = dashboard.followUps.map((followUp) => followUp.id);
811
+ const documents = (Array.isArray(dashboard.documents) ? dashboard.documents : [])
812
+ .filter((document) => document && document.path && !/follow/i.test(document.label || ''))
813
+ .map((document) => `${String(document.label).toLowerCase()} \`${document.path}\``);
814
+ const lines = [
815
+ `# Follow-ups — ${featureTitle}`,
816
+ '',
817
+ `What the bt-execute runs of **${featureTitle}** left for a human to look at next. Spec any of them on its own, or several together, with bt-spec:`,
818
+ '',
819
+ '```',
820
+ `/bt-spec Fix ${ids[0]} from ${source}`,
821
+ ...(ids.length > 1 ? [`/bt-spec Fix ${joinFollowUpIds(ids)} from ${source}`] : []),
822
+ '```',
823
+ '',
824
+ `Where they came from: this feature's ${documents.length ? documents.join(', ') : 'plan and run log'} (paths relative to \`${featureFolderFromRoot(folder)}/\`).`,
825
+ '',
826
+ `> Written by bt-execute's dashboard helper from \`${slug}_dashboard.js\`. Add or revise a follow-up with \`dashboard.mjs followup\`, never by editing this file.`,
827
+ ];
828
+ for (const followUp of dashboard.followUps) {
829
+ const raised = [followUp.at, followUp.source].filter(Boolean).join(' · ');
830
+ lines.push('', `## ${followUp.id} — ${followUp.title || 'Untitled follow-up'}`, '');
831
+ if (raised) lines.push(`- **Raised:** ${raised}`);
832
+ if (followUp.files.length) lines.push(`- **Files:** ${followUp.files.map((file) => `\`${file}\``).join(', ')}`);
833
+ for (const update of followUp.updates) lines.push(`- **Revised ${update.at || ''}${update.by ? ` by ${update.by}` : ''}:** ${update.note || ''}`);
834
+ if (raised || followUp.files.length || followUp.updates.length) lines.push('');
835
+ lines.push(followUp.detail || followUp.title || '');
836
+ }
837
+ return `${lines.join('\n')}\n`;
838
+ }
839
+
840
+ /**
841
+ * Lists the follow-ups document among the dashboard's documents, once, so the page links it.
842
+ * @param {string} folder The feature folder.
843
+ * @param {any} dashboard The dashboard data.
844
+ * @returns {boolean} Whether the list changed.
845
+ */
846
+ function linkFollowUpsDocument(folder, dashboard) {
847
+ const path = `documents/${dataPaths(folder).slug}_followups.md`;
848
+ dashboard.documents = Array.isArray(dashboard.documents) ? dashboard.documents : [];
849
+ if (dashboard.documents.some((document) => document && document.path === path)) return false;
850
+ dashboard.documents.push({ label: 'Follow-ups', path });
851
+ return true;
852
+ }
853
+
854
+ /**
855
+ * Rewrites the follow-ups document from the dashboard data, atomically; nothing is written while there are none.
856
+ * @param {string} folder The feature folder.
857
+ * @param {any} dashboard The dashboard data, follow-ups repaired.
858
+ */
859
+ function writeFollowUpsDocument(folder, dashboard) {
860
+ if (!Array.isArray(dashboard.followUps) || !dashboard.followUps.length) return;
861
+ const path = join(folder, 'documents', `${dataPaths(folder).slug}_followups.md`);
862
+ const temporaryPath = `${path}.${process.pid}.tmp`;
863
+ writeFileSync(temporaryPath, followUpsDocument(folder, dashboard), 'utf8');
864
+ renameSync(temporaryPath, path);
865
+ }
866
+
639
867
  /**
640
868
  * Every snapshot entry in the dashboard with where it sits: the After Action Report, each phase and each task.
641
869
  * @param {any} dashboard The dashboard data.
@@ -720,6 +948,49 @@ function writeActivity(folder, argumentList) {
720
948
  writeData(dashboardPath, prefix, data);
721
949
  }
722
950
 
951
+ /**
952
+ * Adds a follow-up with the next free id (`F1`, `F2`, …), or revises one (`--id F2 … --note "why"`), then rewrites
953
+ * the follow-ups document bt-spec reads. The dashboard offers `/bt-spec Fix F2 from @…_followups.md` for each, so a
954
+ * follow-up carries enough to be specced alone: what is wrong, the evidence, where to look, what fixing it involves.
955
+ * @param {string} folder The feature folder.
956
+ * @param {string[]} argumentList Follow-up options.
957
+ */
958
+ function writeFollowUp(folder, argumentList) {
959
+ const { options } = parseOptions(argumentList, ['file']);
960
+ const usage = 'usage: followup <feature-folder> --title "…" --detail "…" [--source "T2 verifier"] [--file path]… (revise: --id F2 [--title …] [--detail …] [--file …] --note "why it changed" [--by T4])';
961
+ const { dashboardPath } = dataPaths(folder);
962
+ const { prefix, data } = readData(dashboardPath);
963
+ data.followUps = Array.isArray(data.followUps) ? data.followUps : [];
964
+ repairFollowUps(data);
965
+ const now = localTime();
966
+ const fields = {
967
+ ...(typeof options.title === 'string' ? { title: options.title } : {}),
968
+ ...(typeof options.detail === 'string' ? { detail: options.detail } : {}),
969
+ ...(typeof options.source === 'string' ? { source: options.source } : {}),
970
+ ...(options.file.length ? { files: options.file.map(String) } : {}),
971
+ };
972
+ const isRevision = typeof options.id === 'string';
973
+ let followUpId;
974
+ if (isRevision) {
975
+ const followUp = data.followUps.find((candidate) => candidate.id === options.id);
976
+ if (!followUp) throw new Error(`no follow-up "${options.id}" — the dashboard has ${data.followUps.map((candidate) => candidate.id).join(', ') || 'none'}`);
977
+ if (typeof options.note !== 'string') throw new Error('revising a follow-up needs --note "why it changed" — an earlier result is never rewritten silently');
978
+ Object.assign(followUp, fields);
979
+ followUp.updates.push({ at: now.stamp, by: typeof options.by === 'string' ? options.by : followUp.id, note: options.note });
980
+ followUpId = followUp.id;
981
+ } else {
982
+ if (!fields.title || !fields.detail) throw new Error(usage);
983
+ followUpId = nextFollowUpId(data.followUps);
984
+ data.followUps.push({ id: followUpId, title: '', detail: '', source: '', files: [], at: now.stamp, updates: [], ...fields });
985
+ }
986
+ linkFollowUpsDocument(folder, data);
987
+ data.updatedAt = now.stamp;
988
+ writeData(dashboardPath, prefix, data);
989
+ writeFollowUpsDocument(folder, data);
990
+ const followUpsSource = `@${featureFolderFromRoot(folder)}/documents/${dataPaths(folder).slug}_followups.md`;
991
+ console.log(`${isRevision ? 'revised' : 'added'} ${followUpId} — spec it with: /bt-spec Fix ${followUpId} from ${followUpsSource}`);
992
+ }
993
+
723
994
  /**
724
995
  * Sets the dashboard's run status, and records the run starting or ending in the live file.
725
996
  * @param {string} folder The feature folder.
@@ -906,13 +1177,20 @@ function checkData(folder) {
906
1177
  if (existsSync(livePath)) readData(livePath);
907
1178
  const repairs = repairSnapshots(data);
908
1179
  const decisionRepairs = repairDecisions(data);
909
- if (repairs.length || decisionRepairs.length) writeData(dashboardPath, prefix, data);
1180
+ const followUpRepairs = repairFollowUps(data);
1181
+ const hasFollowUps = Array.isArray(data.followUps) && data.followUps.length > 0;
1182
+ const linkedFollowUps = hasFollowUps && linkFollowUpsDocument(folder, data);
1183
+ if (repairs.length || decisionRepairs.length || followUpRepairs.length || linkedFollowUps) writeData(dashboardPath, prefix, data);
1184
+ if (hasFollowUps) writeFollowUpsDocument(folder, data);
910
1185
  if (repairs.length) {
911
1186
  console.log(`repaired ${repairs.length} snapshot entr${repairs.length === 1 ? 'y' : 'ies'} the page could not show:\n ${repairs.join('\n ')}`);
912
1187
  }
913
1188
  if (decisionRepairs.length) {
914
1189
  console.log(`repaired ${decisionRepairs.length} decision${decisionRepairs.length === 1 ? '' : 's'} written as plain text:\n ${decisionRepairs.join('\n ')}`);
915
1190
  }
1191
+ if (followUpRepairs.length) {
1192
+ console.log(`repaired ${followUpRepairs.length} follow-up${followUpRepairs.length === 1 ? '' : 's'} without an id:\n ${followUpRepairs.join('\n ')}`);
1193
+ }
916
1194
  const snapshots = allSnapshots(data);
917
1195
  const problems = snapshots.flatMap(({ snapshot, where }) => snapshotProblems(folder, snapshot, where));
918
1196
  const deliverables = [...missing, ...visualTaskProblems(data), ...unshownFrameProblems(folder, data), ...(planTasks ? planProblems(folder, data, planTasks) : [])];
@@ -969,8 +1247,9 @@ function parseStamp(stamp) {
969
1247
  }
970
1248
 
971
1249
  /**
972
- * The watchdog — a manual tool (no skill launches it; `task` and `status` keep the live file current). While the
973
- * dashboard says a run is in progress it checks the live status every interval:
1250
+ * The watchdog — bt-execute launches it in the background at run start, as the safety net behind the agents' own
1251
+ * live writes, so the page never shows a long silence while work goes on. While the dashboard says a run is in
1252
+ * progress it checks the live status every interval:
974
1253
  * - the live status names a task that is already finished while another task is active → it points the live
975
1254
  * status at the active task (the agent working on it has not written yet);
976
1255
  * - nothing has been written for `quiet-minutes` → it writes a heartbeat naming the latest file that changed in
@@ -1092,10 +1371,10 @@ function checkLive(dashboard, livePath, roots, projectRoot, quietMinutes, stallM
1092
1371
  console.log(`watchdog ${clock}: ${activity}`);
1093
1372
  }
1094
1373
 
1095
- const commands = { live: writeLive, task: writeTask, snapshot: writeSnapshot, activity: writeActivity, status: writeStatus, check: checkData, watch };
1374
+ const commands = { live: writeLive, task: writeTask, snapshot: writeSnapshot, followup: writeFollowUp, activity: writeActivity, status: writeStatus, check: checkData, watch };
1096
1375
 
1097
1376
  if (!commands[command] || !featureFolder) {
1098
- console.error('usage: node dashboard.mjs <live|task|snapshot|activity|status|check|watch> <feature-folder> [options] — see the header of this file');
1377
+ console.error('usage: node dashboard.mjs <live|task|snapshot|followup|activity|status|check|watch> <feature-folder> [options] — see the header of this file');
1099
1378
  process.exit(2);
1100
1379
  }
1101
1380
  try {
@@ -756,6 +756,15 @@
756
756
  .row:first-child { border-top: 0; }
757
757
  .row-key { font: 600 12.5px/1.6 var(--font-mono); color: var(--accent); overflow-wrap: anywhere; }
758
758
  .row-source { margin-top: 4px; color: var(--text-faint); font-size: 12.5px; }
759
+ /* A follow-up: a tick box to spec several together, its id, then its text and its own bt-spec command. */
760
+ .row.follow-up { grid-template-columns: 22px 56px minmax(0, 1fr); gap: 12px; }
761
+ .follow-up-pick { padding-top: 2px; }
762
+ .follow-up-pick input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
763
+ .follow-up-detail { margin-top: 4px; color: var(--text-muted); font-size: 13.5px; }
764
+ .follow-up .run-copy { margin-top: 10px; }
765
+ .follow-up-bar { display: grid; gap: 10px; padding: 16px 22px 18px; border-top: 1px solid var(--line); }
766
+ .follow-up-bar-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; }
767
+ .follow-up-bar .copy-command:disabled { opacity: 0.45; cursor: default; }
759
768
  .timeline { position: relative; margin: 0; padding: 4px 0 4px 26px; list-style: none; }
760
769
  .timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
761
770
  .timeline li { position: relative; padding: 8px 0; }
@@ -820,6 +829,9 @@
820
829
  .task-tags { grid-column: 2 / -1; justify-content: flex-start; }
821
830
  .task-body { padding: 0 14px 16px; }
822
831
  .row { grid-template-columns: 1fr; gap: 4px; padding: 12px 16px; }
832
+ .row.follow-up { grid-template-columns: 22px minmax(0, 1fr); gap: 4px 10px; }
833
+ .row.follow-up > div:last-child { grid-column: 2; }
834
+ .follow-up-bar { padding: 14px 16px 16px; }
823
835
  .after-action { padding: 18px; }
824
836
  .after-action-columns { grid-template-columns: 1fr; }
825
837
  .route-label { display: none; }
@@ -874,6 +886,10 @@
874
886
  { key: 'noTimeLimit', flag: '--no-time-limit', label: 'No time limit', hint: 'Turns off the default TIME MATTERS mode' },
875
887
  ];
876
888
  const planChoice = { heavy: false, parity: false, noTimeLimit: false, brief: '' };
889
+ // The follow-ups ticked to spec together, kept when the page refreshes; one the page has not shown before arrives ticked.
890
+ const followUpChoice = { selected: new Set(), seen: new Set() };
891
+ /** The longest title a follow-up written as plain text shows; the whole text stays below it — the helper's rule. */
892
+ const MAXIMUM_FOLLOW_UP_TITLE = 100;
877
893
  // A verifier result that names a live check: "live two-tab race in headless Chrome", "end-to-end on WebGPU".
878
894
  const LIVE_CHECK_WORDS = /\blive\b|chrome|browser|webgl|webgpu|unity editor|play ?mode/i;
879
895
  /** Where the Babylon Toolkit Desktop Agent, whose skills generate this dashboard, is published. */
@@ -1617,20 +1633,60 @@
1617
1633
  </section>`;
1618
1634
  }
1619
1635
 
1636
+ /**
1637
+ * Deferred tasks (finished by running the plan again), then the follow-ups — each with its own bt-spec command, and
1638
+ * tick boxes to spec several together, like bt-profile's fixes.
1639
+ */
1620
1640
  function renderFollowUps(allTasks) {
1621
1641
  const deferredRows = allTasks
1622
1642
  .filter((task) => task.status === 'deferred' || task.status === 'failed')
1623
1643
  .map((task) => `<div class="row"><div class="row-key">${escapeHtml(task.id || '')}</div><div><strong>${escapeHtml(task.title || '')}</strong>${task.deferredReason ? `<div class="row-source">${formatInline(task.deferredReason)}</div>` : ''}</div></div>`);
1624
- const followUpRows = (report.followUps || [])
1625
- .map((item, index) => `<div class="row"><div class="row-key">#${index + 1}</div><div>${formatInline(item)}</div></div>`);
1644
+ const followUps = report.followUps || [];
1645
+ const ids = followUps.map((followUp) => followUp.id);
1646
+ for (const id of ids.filter((candidate) => !followUpChoice.seen.has(candidate))) {
1647
+ followUpChoice.seen.add(id);
1648
+ followUpChoice.selected.add(id);
1649
+ }
1650
+ const followUpRows = followUps.map((followUp) => {
1651
+ const raised = [followUp.source, followUp.at].filter(Boolean).join(' · ');
1652
+ const files = followUp.files.length ? `Files: ${followUp.files.map((file) => `\`${file}\``).join(', ')}` : '';
1653
+ const where = [raised && `Raised by ${raised}`, files].filter(Boolean).join(' — ');
1654
+ return `
1655
+ <div class="row follow-up">
1656
+ <label class="follow-up-pick"><input type="checkbox" data-follow-up="${escapeAttribute(followUp.id)}"${followUpChoice.selected.has(followUp.id) ? ' checked' : ''} aria-label="Spec ${escapeAttribute(followUp.id)} together with the others ticked"></label>
1657
+ <div class="row-key">${escapeHtml(followUp.id)}</div>
1658
+ <div>
1659
+ <strong>${formatInline(followUp.title || '')}</strong> ${updatedBadge(followUp.updates)}
1660
+ ${followUp.detail ? `<div class="follow-up-detail">${formatInline(followUp.detail)}</div>` : ''}
1661
+ ${where ? `<div class="row-source">${formatInline(where)}</div>` : ''}
1662
+ ${updateNotes(followUp.updates)}
1663
+ ${copyableCommand(followUpSpecCommand([followUp.id]))}
1664
+ </div>
1665
+ </div>`;
1666
+ });
1667
+ const together = ids.length > 1 ? `
1668
+ <div class="follow-up-bar">
1669
+ <div class="follow-up-bar-head"><span class="run-builder-title">Spec the ticked follow ups together</span><button type="button" class="copy-command" data-copy="${escapeAttribute(followUpSpecCommand(ids))}" data-label="Copy all ${ids.length}" title="${escapeAttribute(followUpSpecCommand(ids))}">Copy all ${ids.length}</button></div>
1670
+ ${selectedFollowUpsCommand()}
1671
+ </div>` : '';
1626
1672
  const rows = deferredRows.concat(followUpRows).join('');
1673
+ const note = followUps.length ? 'What a human should look at next — copy a command to spec any of them with bt-spec' : 'What a human should look at next';
1627
1674
  return `
1628
1675
  <section id="follow-ups">
1629
- <div class="section-head"><h2>Deferred follow ups</h2><span class="section-note">What a human should look at next</span></div>
1630
- ${rows ? `<div class="card list-card">${rows}</div>` : '<div class="empty">Nothing deferred, nothing outstanding.</div>'}
1676
+ <div class="section-head"><h2>Follow ups</h2><span class="section-note">${note}</span></div>
1677
+ ${rows ? `<div class="card list-card">${rows}${together}</div>` : '<div class="empty">Nothing deferred, nothing outstanding.</div>'}
1631
1678
  </section>`;
1632
1679
  }
1633
1680
 
1681
+ /** The command for the ticked follow-ups, or a disabled hint when none is ticked; redrawn as the boxes change. */
1682
+ function selectedFollowUpsCommand() {
1683
+ const ids = (report.followUps || []).map((followUp) => followUp.id).filter((id) => followUpChoice.selected.has(id));
1684
+ if (!ids.length) {
1685
+ return '<div class="run-copy" id="selected-follow-ups"><code class="run-command">Tick the follow ups to spec together</code><button type="button" class="copy-command" disabled>Copy</button></div>';
1686
+ }
1687
+ return `<div id="selected-follow-ups">${copyableCommand(followUpSpecCommand(ids))}</div>`;
1688
+ }
1689
+
1634
1690
  function renderUpdateLog(allUpdates) {
1635
1691
  const rows = allUpdates
1636
1692
  .slice()
@@ -1756,7 +1812,7 @@
1756
1812
  data.decisions = asList(data.decisions).map(asDecision)
1757
1813
  .filter((decision) => decision && typeof decision === 'object')
1758
1814
  .map((decision) => Object.assign(decision, { updates: asUpdates(decision.updates) }));
1759
- data.followUps = asList(data.followUps);
1815
+ data.followUps = asFollowUps(asList(data.followUps));
1760
1816
  data.activity = asList(data.activity);
1761
1817
  if (data.afterAction && typeof data.afterAction === 'object') {
1762
1818
  const afterAction = data.afterAction;
@@ -1806,6 +1862,42 @@
1806
1862
  if (typeof value === 'string') return value ? [value] : [];
1807
1863
  return asList(value).filter((item) => item !== null && item !== undefined && item !== '');
1808
1864
  }
1865
+
1866
+ /**
1867
+ * Follow-ups as objects with the ids the bt-spec commands name. One written as plain text (an older dashboard)
1868
+ * gets its own `F3 — ` prefix as the id, else the next free one, and a short title — the helper's repair, so the
1869
+ * page and `documents/<slug>_followups.md` name the same F-numbers.
1870
+ */
1871
+ function asFollowUps(list) {
1872
+ const textId = (text) => (/^(F\d+)\s+[—–-]\s+/.exec(text) || [])[1] || '';
1873
+ const claimed = new Set(list.map((item) => (item && typeof item === 'object' ? item.id : textId(String(item)))).filter(Boolean));
1874
+ const nextId = () => {
1875
+ const highest = [...claimed].reduce((maximum, id) => Math.max(maximum, Number((/^F(\d+)$/.exec(id) || [])[1] || 0)), 0);
1876
+ const id = `F${highest + 1}`;
1877
+ claimed.add(id);
1878
+ return id;
1879
+ };
1880
+ return list.map((item) => {
1881
+ if (typeof item === 'string') {
1882
+ const id = textId(item) || nextId();
1883
+ const text = item.replace(/^F\d+\s+[—–-]\s+/, '');
1884
+ const title = followUpTitleFrom(text);
1885
+ return { id, title, detail: title === text ? '' : text, source: '', files: [], updates: [] };
1886
+ }
1887
+ if (!item || typeof item !== 'object') return null;
1888
+ return Object.assign(item, { id: item.id || nextId(), files: asTextList(item.files), updates: asUpdates(item.updates) });
1889
+ }).filter(Boolean);
1890
+ }
1891
+ }
1892
+
1893
+ /** A short title from a follow-up written as one block of text: its first sentence, cut at a word when long. */
1894
+ function followUpTitleFrom(text) {
1895
+ const trimmed = String(text || '').trim();
1896
+ const sentenceMatch = /^[\s\S]*?[.!?](?=\s+[A-Z]|$)/.exec(trimmed);
1897
+ const sentence = sentenceMatch ? sentenceMatch[0] : trimmed;
1898
+ if (sentence.length <= MAXIMUM_FOLLOW_UP_TITLE) return sentence;
1899
+ const cut = sentence.lastIndexOf(' ', MAXIMUM_FOLLOW_UP_TITLE);
1900
+ return `${sentence.slice(0, cut > 0 ? cut : MAXIMUM_FOLLOW_UP_TITLE).replace(/[\s,;:—–-]+$/, '')}…`;
1809
1901
  }
1810
1902
 
1811
1903
  /* ===================== Updated notifications ===================== */
@@ -1985,24 +2077,62 @@
1985
2077
  return runCommand(RUN_OPTIONS.filter((option) => runChoice[option.key]).map((option) => option.flag), runChoice.tasks);
1986
2078
  }
1987
2079
 
1988
- function copyableCommand(command, id = '') {
1989
- return `<div class="run-copy"><code class="run-command"${id ? ` id="${id}"` : ''}>${escapeHtml(command)}</code><button type="button" class="copy-command" data-copy="${escapeAttribute(command)}">Copy</button></div>`;
2080
+ /**
2081
+ * This feature's folder from the project root. Read from the page's own address when it sits under `.agents/`,
2082
+ * so a feature the user moved to `complete/` or `archived/` still gets commands that resolve; else the usual
2083
+ * `.agents/specs/<slug>`.
2084
+ */
2085
+ function featureFolderPath() {
2086
+ const slug = (report.feature && report.feature.slug) || '';
2087
+ const pagePath = decodeURIComponent(window.location.pathname || '');
2088
+ const agentsAt = pagePath.lastIndexOf('/.agents/');
2089
+ const pageName = '/dashboard.html';
2090
+ if (agentsAt >= 0 && pagePath.endsWith(pageName)) return pagePath.slice(agentsAt + 1, pagePath.length - pageName.length);
2091
+ return `.agents/specs/${slug}`;
2092
+ }
2093
+
2094
+ /** The follow-ups document as bt-spec takes it: `@.agents/specs/<slug>/documents/<slug>_followups.md`. */
2095
+ function followUpsReference() {
2096
+ const slug = (report.feature && report.feature.slug) || '';
2097
+ const listed = (report.documents || []).find((document) => /follow/i.test(document.label || '') && document.path);
2098
+ const relativePath = listed ? String(listed.path).replace(/^\.?\//, '') : `documents/${slug}_followups.md`;
2099
+ return `@${featureFolderPath()}/${relativePath}`;
2100
+ }
2101
+
2102
+ /** The bt-spec command for some follow-ups, worded like bt-profile's: `/bt-spec Fix F1, F2 and F4 from @…`. */
2103
+ function followUpSpecCommand(ids) {
2104
+ const joined = ids.length <= 1 ? ids.join('') : `${ids.slice(0, -1).join(', ')} and ${ids[ids.length - 1]}`;
2105
+ return `/bt-spec Fix ${joined} from ${followUpsReference()}`;
2106
+ }
2107
+
2108
+ function copyableCommand(command, id = '', label = 'Copy') {
2109
+ return `<div class="run-copy"><code class="run-command"${id ? ` id="${id}"` : ''}>${escapeHtml(command)}</code><button type="button" class="copy-command" data-copy="${escapeAttribute(command)}" data-label="${escapeAttribute(label)}">${escapeHtml(label)}</button></div>`;
1990
2110
  }
1991
2111
 
1992
2112
  /** Copy buttons and the command builder; delegated, so they keep working after the page redraws. */
1993
2113
  function wireRunCommands() {
1994
2114
  document.addEventListener('click', (event) => {
1995
2115
  const button = event.target.closest('.copy-command');
1996
- if (!button) return;
2116
+ if (!button || button.disabled) return;
1997
2117
  const text = button.getAttribute('data-copy') || '';
2118
+ const label = button.getAttribute('data-label') || 'Copy';
1998
2119
  const copied = () => {
1999
2120
  button.textContent = 'Copied';
2000
2121
  button.classList.add('is-copied');
2001
- setTimeout(() => { button.textContent = 'Copy'; button.classList.remove('is-copied'); }, 1500);
2122
+ setTimeout(() => { button.textContent = label; button.classList.remove('is-copied'); }, 1500);
2002
2123
  };
2003
2124
  if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).then(copied, () => { copyWithSelection(text); copied(); });
2004
2125
  else { copyWithSelection(text); copied(); }
2005
2126
  });
2127
+ document.addEventListener('change', (event) => {
2128
+ const box = event.target.closest('[data-follow-up]');
2129
+ if (!box) return;
2130
+ const id = box.getAttribute('data-follow-up');
2131
+ if (box.checked) followUpChoice.selected.add(id);
2132
+ else followUpChoice.selected.delete(id);
2133
+ const output = document.getElementById('selected-follow-ups');
2134
+ if (output) output.outerHTML = selectedFollowUpsCommand();
2135
+ });
2006
2136
  const updateBuilt = (event) => {
2007
2137
  const control = event.target.closest('[data-run-choice], [data-plan-choice]');
2008
2138
  if (!control) return;
@@ -5,7 +5,8 @@
5
5
  | File | Holds | Written |
6
6
  |---|---|---|
7
7
  | `<slug>_dashboard.js` | the feature's record — status, phases, tasks and their results, decisions, snapshots, the After Action Report | bt-spec creates it from `dashboard.template.js` (`specified`), bt-plan fills in the plan (`planned`), bt-execute writes it at every task boundary; a Quick Plan creates it at bt-plan |
8
- | `<slug>_live.js` | what is happening this minute — the current task, one sentence, its step log | by bt-execute's helper, never by an agent: every `dashboard.mjs task` write that changes a task's status, and every `status` write (bt-plan creates it from `live.template.js`) |
8
+ | `<slug>_live.js` | what is happening this minute — the current task, one sentence, its step log | by bt-execute's helper: every `dashboard.mjs task` write that changes a task's status, every `snapshot` and every `status` write; between them every `live` write an agent makes at a meaningful step, and the watchdog's heartbeat after 10 quiet minutes (bt-plan creates it from `live.template.js`) |
9
+ | `<slug>_followups.md` | every follow-up in full under its id, and the bt-spec commands that spec them — the document the dashboard's `/bt-spec Fix F1 from @…` commands point at | by bt-execute's helper, from `followUps`: every `followup` write and every `check` (never by hand) |
9
10
 
10
11
  They are **data, not code.** Each file is exactly one line of prefix and one strict-JSON value:
11
12
 
@@ -21,11 +22,11 @@ The status of the plan itself lives in the plan file's checkboxes; the dashboard
21
22
 
22
23
  ## Updating a data file
23
24
 
24
- Use bt-execute's helper — `node <skills>/bt-execute/scripts/dashboard.mjs task|snapshot|activity|status|check <feature-folder> …`
25
- (every option is in its header). It parses, checks field shapes and writes atomically. Its `task` and `status`
26
- commands also rewrite the live file, so agents never write it. `live` remains for a hand write, and `watch` is an
27
- optional watchdog for manual use (a heartbeat into the live file when nothing has been written for 10 minutes) —
28
- no skill launches it.
25
+ Use bt-execute's helper — `node <skills>/bt-execute/scripts/dashboard.mjs task|snapshot|followup|live|activity|status|check <feature-folder> …`
26
+ (every option is in its header). It parses, checks field shapes and writes atomically. Its `task`, `snapshot` and
27
+ `status` commands also rewrite the live file; between them agents write it with `live` at each meaningful step, never
28
+ 15 minutes apart. `watch` is the watchdog bt-execute launches in the background at run start: a heartbeat into the
29
+ live file when nothing has been written for 10 minutes, naming the latest file that changed.
29
30
 
30
31
  ### Fallback — parse, change, write back
31
32
 
@@ -107,7 +108,7 @@ Top level:
107
108
  | `afterAction` | the After Action Report (below) |
108
109
  | `phases` | the plan's phases, each with its tasks (below) |
109
110
  | `decisions` | `[{ "id": "D1" \| "T7", "text", "source", "updates" }]` — objects, never plain `"D1 — …"` strings (the page and `check` repair one, but it is a slip) |
110
- | `followUps` | plain strings — what a human should look at next |
111
+ | `followUps` | what a human should look at next: `[{ "id": "F1", "title", "detail", "source", "files": [], "at", "updates": [] }]`, added with `dashboard.mjs followup` (it numbers them and writes `documents/<slug>_followups.md`; `--id F2 … --note` revises one). `title` is one line; `detail` carries enough to spec it alone — what is wrong, the evidence, where to look, what fixing it involves; `source` names who raised it (`T2 verifier`). The page gives each a `/bt-spec Fix F1 from @…_followups.md` command, plus one for those ticked together. A plain string (older dashboards) is repaired into an entry with the next free id |
111
112
  | `activity` | `[{ "at", "text" }]`, oldest first — the milestones (the page shows newest first) |
112
113
 
113
114
  `afterAction` — empty while planned; written by bt-execute at the end of every run:
@@ -201,8 +202,10 @@ Any list of snapshots may mix them. `source` names where the image came from: `"
201
202
  whole from each change it makes: a `task` write that sets a status names the task, its phase, the role the status
202
203
  implies (`in-progress` / `built` → implementer, `verifying` → verifier, otherwise orchestrator), one sentence on the
203
204
  new state plus the first sentence of the summary written with it, and appends that sentence to the task's step log;
204
- a `status` write records the run starting or ending. A `task` write without a status leaves it untouched, and
205
- agents never write it. A 20-minute silence shows as a warning. The page shows it only while `status` is
205
+ a `snapshot` adds a step naming the frame; a `status` write records the run starting or ending. A `task` write
206
+ without a status leaves it untouched. Between those, the agent doing the work writes it with `dashboard.mjs live` at
207
+ each milestone, before anything slow and at each fix attempt, never 15 minutes apart, and the watchdog writes a
208
+ heartbeat after 10 quiet minutes. A 20-minute silence shows as a warning. The page shows it only while `status` is
206
209
  `in-progress`.
207
210
 
208
211
  | Field | Meaning |
@@ -213,7 +216,7 @@ agents never write it. A 20-minute silence shows as a warning. The page shows it
213
216
  | `title` | only when there is no task: `"Verifying phase 1"`, `"Closing phase 1"` |
214
217
  | `role` | `implementer` · `verifier` · `orchestrator` |
215
218
  | `activity` | one plain-language sentence on what is happening this minute |
216
- | `source` | `agent` (the helper, from an agent's write) or `watchdog` (a heartbeat from the manual watchdog — the page tags it) |
219
+ | `source` | `agent` (the helper, from an agent's write) or `watchdog` (a heartbeat from the watchdog bt-execute launches at run start — the page tags it) |
217
220
  | `steps` | `[{ "at": "HH:MM", "text" }]` — the current task's log, oldest first; fresh for each task, the last 12 kept. Plain language a non-developer follows, which is why a task's `summary` leads with a plain first sentence |
218
221
 
219
222
  ## `check` — the gate
@@ -13,6 +13,7 @@ Turn a short feature idea into a spec file that `bt-plan` can plan from. Follow
13
13
  /bt-spec --grill-me "add a settings toggle to mute all game audio" # interview first, then spec
14
14
  /bt-spec --parity "port the Unity water shader and match it to within 2% in the browser" # numeric parity bars allowed (slow — hours become days)
15
15
  /bt-spec --no-time-limit "redesign the save system" # turn off the default TIME MATTERS mode
16
+ /bt-spec Fix F1 and F3 from @.agents/specs/<slug>/documents/<slug>_followups.md # a finished feature's follow-ups (its dashboard's copy buttons)
16
17
  ```
17
18
 
18
19
  - `--grill-me` — interview the user, one question at a time, before writing (Step 4).
@@ -41,6 +42,7 @@ From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug`
41
42
  - **`DESIGN.md`** (only if the feature has UI): it is the single source of truth for design — never Figma or invented values. Cite the tokens and shared components the feature uses in 3–8 bullets. Missing → note `"No DESIGN.md design system found — follow the existing UI conventions already in the codebase."` No UI → say no design tokens apply. When the feature has a HUD, overlay, menu, splash or landing page, add one bullet naming its live values and their cadence under the Agent Reference's **Game UI Performance — ENFORCED** (state on events, telemetry through the frame loop, throttled readouts, decorative motion in CSS, no frame loop on menus / splash / landing pages), so the plan builds it that way.
42
43
  - **Recon docs (`.agents/recon/*_recon.md`, written by bt-recon):** if any recon's `scope` covers a system this feature touches, read its Summary, Architecture, the relevant Feature Inventory / UI Reference / External Interfaces sections, Known Issues and Extension Points — it is the grounding for code nobody else documented, so build on it instead of re-deriving it. Cite it in `## Research Notes`. If its `commit:` is well behind HEAD for the files this feature touches, note the drift there and suggest `bt-recon --refresh`.
43
44
  - **Recons the brief cites (`… using @<path>_recon.md`):** bt-profile's fix commands cite the recon of the code behind the fixes, kept in the profile's own folder (`.agents/profile/<slug>/recon/`) or in `.agents/recon/`. Always read a cited recon in full, whatever its scope says. It is the map of the code the fix changes: callers, invariants, tests, extension points. Turn what it says must not break into Acceptance Criteria or named test cases. **Copy each cited recon into this feature's `recon/` folder** and cite the copy in `## Research Notes`. The feature folder then holds everything it rests on, and still works after the profile is archived or moved. A cited recon that does not exist yet: say so, give the `/bt-recon` command that makes it (the profile report's **Copy recon command**), and carry on with your own research.
45
+ - **Follow-ups the brief cites (`Fix F1 and F3 from @<feature-folder>/documents/<slug>_followups.md`):** a finished feature's dashboard offers this command for what its bt-execute runs left for a human to look at next. Read each cited follow-up in full: it is the brief (what is wrong, the evidence, where to look, what fixing it involves). Then read what it points at in the source feature: its plan's Decisions, the run-log lines and files it names, and the source feature's `recon/` copies when it touches that code. Spec only the cited follow-ups, as **one new feature** with its own slug, named for what they fix (`network-hud-banner-fix`), never `fix-f1` and never the source feature's slug. Cite the source feature folder and the follow-up ids in `## Research Notes`, and say there which follow-ups the spec covers. A cited id the file does not have: list the ids it does have, and stop.
44
46
  - **Research the codebase, sized to the feature.** Find the closest existing feature to mirror, the real conventions, and the integration points. For a `small` feature do this inline; fan out to up to 3 **read-only** subagents only for `medium` / `large` (they report findings and file paths, never draft the spec; if a finding contradicts SPEC.md, raise it with the user rather than resolving it silently). Record the result in the spec's `## Research Notes` so bt-plan starts from it.
45
47
 
46
48
  ## Step 3. Sibling-skill patterns