@babylonjs-toolkit/agent 1.1.56 → 1.1.60
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 +10 -3
- package/package.json +1 -1
- package/skills/bt-execute/SKILL.md +15 -7
- package/skills/bt-execute/templates/dashboard/dashboard.html +90 -3
- package/skills/bt-execute/templates/dashboard/dashboard.template.js +69 -106
- package/skills/bt-execute/templates/dashboard/data-schema.md +177 -0
- package/skills/bt-execute/templates/dashboard/live.template.js +7 -23
- package/skills/bt-plan/SKILL.md +4 -3
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.60)
|
|
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
|
|
|
@@ -241,7 +241,7 @@ pair or schedule the bridge.
|
|
|
241
241
|
|-------|---------|--------------|
|
|
242
242
|
| [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. Add `--grill-me` to be interviewed first, `--parity` to allow numeric parity bars in the acceptance criteria. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
243
243
|
| [`bt-plan`](skills/bt-plan/SKILL.md) | `/bt-plan` | Produce a detailed, task-checklist technical plan from a spec. Add `--heavy` for a decision-complete plan that keeps a long, fresh-context-per-task run cohesive, and `--parity` for numeric parity gates instead of the default functional proof. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
244
|
-
| [`bt-execute`](skills/bt-execute/SKILL.md) | `/bt-execute` | Implement one task, a range (`T3-T7`, `T12-`, `NEXT:3`) or all remaining tasks from a plan/spec; with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended overnight run that never stops for human input,
|
|
244
|
+
| [`bt-execute`](skills/bt-execute/SKILL.md) | `/bt-execute` | Implement one task, a range (`T3-T7`, `T12-`, `NEXT:3`) or all remaining tasks from a plan/spec; with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended overnight run that never stops for human input, `--strict` for an adversarial verifier on every task, and `--verbose` for an in-depth write-up of every task and the After Action Report on the dashboard. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
245
245
|
| [`bt-recon`](skills/bt-recon/SKILL.md) | `/bt-recon` | Deep-dive existing code — a subsystem named in a brief, or the whole codebase — and write an evidence-cited technical grounding spec (`.agents/recon/<slug>_recon.md`) plus, when it has UI, a plain-language user guide (`.agents/recon/<slug>_guide.md`). Built for taking over undocumented code; `bt-spec` and `bt-plan` read the recon as grounding. Includes an observe-only live pass when the brief gives a URL; `--refresh` updates a recon after code changes. |
|
|
246
246
|
| [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
|
|
247
247
|
| [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
|
|
@@ -270,7 +270,7 @@ start without a spec:
|
|
|
270
270
|
documents/<slug>_plan.md the plan (bt-plan)
|
|
271
271
|
documents/<slug>_autopilot.md the run log (bt-execute)
|
|
272
272
|
documents/<slug>_dashboard.js the dashboard's data, updated task by task
|
|
273
|
-
documents/<slug>_live.js what is happening this minute, updated step by step
|
|
273
|
+
documents/<slug>_live.js what is happening this minute, updated step by step (git-ignored)
|
|
274
274
|
snapshots/ meaningful snapshots of the build
|
|
275
275
|
tests/ every test the plan's tasks write
|
|
276
276
|
```
|
|
@@ -299,6 +299,13 @@ was built, how it was proven, what surprised, the run's figures — around **one
|
|
|
299
299
|
plan as a whole**, taken from the same camera before the first task and after the last. Recon docs
|
|
300
300
|
stay in `.agents/recon/`; older flat specs and plans in `.agents/specs/` keep working where they are.
|
|
301
301
|
|
|
302
|
+
Add `--verbose` to `bt-execute` for a fully written-up dashboard: every task card gains its approach
|
|
303
|
+
and why, each file's change, every test case and acceptance item with evidence, each failed attempt
|
|
304
|
+
with its root cause and fix, the live check and the time spent, and the After Action Report adds an
|
|
305
|
+
in-depth debrief (architecture, problems and resolutions, deviations from the plan, known limitations,
|
|
306
|
+
lessons learned, estimate vs actual, next steps). It changes what is written, not how the work is
|
|
307
|
+
verified.
|
|
308
|
+
|
|
302
309
|
### Heavy plans (`/bt-plan --heavy`)
|
|
303
310
|
|
|
304
311
|
A plan can hold 50+ tasks and run for days, with each task executed by `bt-execute` in a fresh
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bt-execute
|
|
3
|
-
description: "The Babylon Toolkit Execute Skill runs one task — or all remaining tasks — from a feature plan or spec file. Use when asked to run a task (e.g. `bt-execute @plan T1`), all tasks (e.g. `bt-execute @plan ALL`), or a range (e.g. `bt-execute @plan T3-T7`, `T12-`, `NEXT:3`); with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended run (e.g. `bt-execute --auto-pilot @plan ALL`): the agent owns the whole pipeline (code, UI, shaders, generated assets, Blender, Unity, export, build, dev server, visual QA), every decision is made autonomously from the plan, spec, Babylon Toolkit Agent Reference and codebase, it never asks the user a question, failing tasks are retried then deferred, and the run never stops until the requested range (or every task) is done. Every task is tested, checked by an independent verifier, and checked live in the browser when its result is visual; add `--strict` for an adversarial verifier on every task. Every run keeps the feature's live dashboard (`.agents/specs/<slug>/dashboard.html`) current task by task — what is being worked on right now, each task's result the moment it is built, verifier results, and meaningful snapshots of the build as it progresses — and, once the run is over, puts an After Action Report in place of the live activity: the whole plan's execution summarized, with one before/after for the plan as a whole."
|
|
3
|
+
description: "The Babylon Toolkit Execute Skill runs one task — or all remaining tasks — from a feature plan or spec file. Use when asked to run a task (e.g. `bt-execute @plan T1`), all tasks (e.g. `bt-execute @plan ALL`), or a range (e.g. `bt-execute @plan T3-T7`, `T12-`, `NEXT:3`); with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended run (e.g. `bt-execute --auto-pilot @plan ALL`): the agent owns the whole pipeline (code, UI, shaders, generated assets, Blender, Unity, export, build, dev server, visual QA), every decision is made autonomously from the plan, spec, Babylon Toolkit Agent Reference and codebase, it never asks the user a question, failing tasks are retried then deferred, and the run never stops until the requested range (or every task) is done. Every task is tested, checked by an independent verifier, and checked live in the browser when its result is visual; add `--strict` for an adversarial verifier on every task, and `--verbose` for a fully written-up dashboard — each task and the After Action Report documented in depth. Every run keeps the feature's live dashboard (`.agents/specs/<slug>/dashboard.html`) current task by task — what is being worked on right now, each task's result the moment it is built, verifier results, and meaningful snapshots of the build as it progresses — and, once the run is over, puts an After Action Report in place of the live activity: the whole plan's execution summarized, with one before/after for the plan as a whole."
|
|
4
4
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch(domain:raw.githubusercontent.com), Agent, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Run tasks from a plan: build each one with its tests, have an independent verifier check it, and only then tick its box — and keep the feature's dashboard current as you go (see *Feature folder and dashboard*). Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
/bt-execute [--auto-pilot] [--strict] [--no-time-limit] <plan> [task] [brief]
|
|
10
|
+
/bt-execute [--auto-pilot] [--strict] [--verbose] [--no-time-limit] <plan> [task] [brief]
|
|
11
11
|
|
|
12
12
|
/bt-execute @.agents/specs/<slug>/documents/<slug>_plan.md ALL
|
|
13
13
|
|
|
@@ -20,9 +20,10 @@ Run tasks from a plan: build each one with its tests, have an independent verifi
|
|
|
20
20
|
/bt-execute --strict @plan.md ALL # adversarial verifier on every task
|
|
21
21
|
/bt-execute --auto-pilot @plan.md ALL # unattended; combine with --strict if wanted
|
|
22
22
|
/bt-execute --no-time-limit @plan.md ALL # turn off the default TIME MATTERS mode
|
|
23
|
+
/bt-execute --verbose @plan.md ALL # a fully written-up dashboard: every task and the After Action Report in depth
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
- Strip `--auto-pilot` / `--strict` / `--no-time-limit`, and any literal `TIME MATTERS`, first (anywhere in the arguments, never part of the brief). `<plan>` is required — if missing, ask (auto-pilot: say so and end). Never guess a path.
|
|
26
|
+
- Strip `--auto-pilot` / `--strict` / `--verbose` / `--no-time-limit`, and any literal `TIME MATTERS`, first (anywhere in the arguments, never part of the brief). `<plan>` is required — if missing, ask (auto-pilot: say so and end). Never guess a path.
|
|
26
27
|
- `[task]` is the token right after the plan, only if it is `T<id>`, `T<a>-T<b>`, `T<a>-`, `NEXT`, `NEXT:<n>` or `ALL` (case-insensitive). Otherwise it is part of the brief, and the task defaults to `NEXT` (`ALL` under auto-pilot). Never ask which task to run.
|
|
27
28
|
- A range is a slice of the checklist **in file order** (sub-tasks like `T3.1` between the endpoints included). An unknown id → list the available ids and stop. A reversed range → error; never swap it. Tasks outside the slice are never touched.
|
|
28
29
|
- Tasks already `- [x]` are skipped — that is what makes every mode resumable. Nothing left to do → say so and stop. Except in `ALL` / range / `NEXT:<n>` runs, do one task and do not continue to the next.
|
|
@@ -32,6 +33,7 @@ Run tasks from a plan: build each one with its tests, have an independent verifi
|
|
|
32
33
|
|
|
33
34
|
- **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — follow the *Work fast* rules below to the letter, take the direct route to each task's Acceptance, and do not re-read what you already have. Begin every implementer and verifier prompt with `TIME MATTERS.` Print `⏱️ [bt-execute] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-execute] No time limit`, and do not add it). Speed never relaxes tests, the independent verifier, live checks, or "tick only on PASS".
|
|
34
35
|
- **Scope.** Implement only the selected task(s). No "while I'm here" work on other tasks. Ambiguous, or blocked by an unfinished task → stop and tell the user *(auto-pilot: decide and log it)*.
|
|
36
|
+
- **Open the run before anything else.** The first actions of every run — before fetching docs, reading code, checking the repo or any other pre-flight work — are, in order: take the clock; append the `⏱ Run <n> start` line to the run log; sync the dashboard with the plan and set `status: "in-progress"` (*Run start* under *Feature folder and dashboard*); and write the live file (`role: "orchestrator"`, `title: "Starting run <n> — <what you are checking first>"`). From then on the pre-flight work is narrated in the live file like any other step. Until the run is opened the dashboard still shows the last run's end state — a user who restarts a run and refreshes must see it running within a minute, not after the pre-flight is over.
|
|
35
37
|
- **Read the docs once.** For Babylon work, if you have not read the Agent Reference this session, fetch it once — https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — plus only the sub-documents the plan's tasks need. It is the authority for conventions and API. Fetch fails → stop and tell the user *(auto-pilot: retry 3×, then continue on what you know and log it)*. Read the plan's checklist and the parts of `SPEC.md` the tasks touch; re-read after a context compaction.
|
|
36
38
|
- **SPEC.md** constrains how you build. If the code and SPEC.md disagree, stop and tell the user *(auto-pilot: decide which is right, fix SPEC.md in the same task, log it)*. When a task changes architecture, a system, a convention or a dependency, SPEC.md must end up matching — normally the plan's final `Update SPEC.md` task; if the plan has none, do it anyway; a new dependency is recorded in SPEC.md by the task that introduces it. Follow SPEC.md's "How to update this spec". **Write the product, never the procedure** — no capture protocols, tool lists, ledgers or gates: recorded there, they become a bar every later feature must clear.
|
|
37
39
|
- **Say what you are doing** — one short line at each task and phase boundary, and before anything slow.
|
|
@@ -58,7 +60,7 @@ Work in **phases**: a `### Phase N` group in the plan, or — if the plan has no
|
|
|
58
60
|
|
|
59
61
|
For a task built on a sibling skill (e.g. bt-design's 3D-Hero-Scroll), give the verifier the relevant part of that skill *(where skills load through a tool: `load_skill` + `read_skill_resource`; where they are files: the skills directory this skill was loaded from, e.g. `~/.claude/skills/`, `~/.agents/skills/` or the project's equivalent)* — its documented options (e.g. `sweep: page` really reaches the document bottom) are part of Acceptance.
|
|
60
62
|
|
|
61
|
-
**Every subagent gets a brief, not homework:** the task block(s), the plan Decisions / Design Reference entries they cite, the SPEC.md parts touched, the Agent Reference excerpts needed (with URLs) — **always including the full `Coding Practices — ENFORCED` section**, since implementers write to it and verifiers fail work that breaks it — the test command and the feature folder's `tests/` path, the `snapshots/` path and *Snapshots tell the story* (for any phase with visible output), the dashboard and live file paths with the per-task update rules from *Feature folder and dashboard
|
|
63
|
+
**Every subagent gets a brief, not homework:** the task block(s), the plan Decisions / Design Reference entries they cite, the SPEC.md parts touched, the Agent Reference excerpts needed (with URLs) — **always including the full `Coding Practices — ENFORCED` section**, since implementers write to it and verifiers fail work that breaks it — the test command and the feature folder's `tests/` path, the `snapshots/` path and *Snapshots tell the story* (for any phase with visible output), the dashboard and live file paths with the per-task update rules from *Feature folder and dashboard* (with `--verbose`, the `details` fields that role writes), the project's agent instructions, the *Work fast* rules below, and: *"Do not fetch the Agent Reference or read SPEC.md in full — the parts you need are here, and this overrides any standing instruction to fetch it first. Fetch one sub-document only if you hit an API this brief does not cover, and say which."*
|
|
62
64
|
|
|
63
65
|
## Feature folder and dashboard
|
|
64
66
|
|
|
@@ -78,20 +80,26 @@ Every feature lives in one folder, created by bt-spec (or by bt-plan for a Quick
|
|
|
78
80
|
|
|
79
81
|
`<slug>` is the folder name (the plan sits at `<slug>/documents/<slug>_plan.md`). **Legacy flat plan** (`.agents/specs/<slug>_plan.md`): run it where it is, keep its run log and the test paths its `Tests:` lines name, and still create `.agents/specs/<slug>/` for `dashboard.html`, `documents/<slug>_dashboard.js`, `documents/<slug>_live.js` and `snapshots/` — move nothing unless the user asks.
|
|
80
82
|
|
|
81
|
-
**The dashboard.** `dashboard.html` is a fixed template; `documents/<slug>_dashboard.js` holds everything it shows. Both come from this skill's `templates/dashboard/` *(where skills load through a tool: `load_skill` + `read_skill_resource`; where they are files: the skills directory this skill was loaded from)*: `dashboard.html` copied with `{{slug}}` replaced — never otherwise edited — and `dashboard.template.js
|
|
83
|
+
**The dashboard.** `dashboard.html` is a fixed template; `documents/<slug>_dashboard.js` holds everything it shows. Both come from this skill's `templates/dashboard/` *(where skills load through a tool: `load_skill` + `read_skill_resource`; where they are files: the skills directory this skill was loaded from)*: `dashboard.html` copied with `{{slug}}` replaced — never otherwise edited — and the starter data `dashboard.template.js`. A third file, `documents/<slug>_live.js` (from `live.template.js`), carries what is happening this minute. **`data-schema.md` documents every field and the update recipe — read it once per run and put the parts a role writes into its brief.** bt-plan writes all three in the `planned` state; if any is missing, create it now from the plan.
|
|
82
84
|
|
|
83
85
|
**Update per task, not per phase — the user watches this page instead of asking "what are you doing?"** Whoever is doing the work writes: the implementer while it builds, the verifier while it checks, you (the orchestrator) between them. Only one agent works at a time in this loop, so writes never collide; if you ever run subagents in parallel, they report back and you write. Every implementer and verifier brief carries the three paths and these rules. Every timestamp comes from the shell clock.
|
|
84
86
|
|
|
85
87
|
- **The live file — at every meaningful step.** Rewrite `documents/<slug>_live.js` whole (it is small) when a task starts, at each milestone inside it, before anything slow (a build, an export, a bake, a capture, a test run), at each fix attempt, at the hand-over to the verifier and while it checks each task, and at the commit: the phase, the task, the role, one plain-language sentence on what is happening now, and the task's step log. Never let it go 15 minutes without a write during active work — the page flags a 20-minute silence. Between tasks, `task: ""` and a `title` (`Verifying phase 2`, `Committing phase 2`).
|
|
86
88
|
- **The dashboard data — at every task boundary:** a task becomes `in-progress` when it starts; `built` the moment it is built and its tests are green — with its summary of what was actually done (and anything surprising), files, tests and snapshots filled in **right then**, not at the phase end; `verifying` while the verifier checks it; `done` when it passes (verifier result, attempts, commit, done time, its `DECISION` lines); back to `in-progress` with `attempts` + 1 on a FAIL. Each change also adds an `activity` line and refreshes `updatedAt`.
|
|
87
|
-
- **
|
|
89
|
+
- **Data, written through a parser — never hand-edited.** Each data file is one `window.… =` prefix and one strict-JSON value (the prefix only lets a page opened from disk load it). Every update reads the file, parses the JSON, changes the fields and writes the whole file back — the Python recipe in `data-schema.md`, or Node's `JSON.parse` / `JSON.stringify`. One stray comma written by hand would blank the page; a parser cannot write one.
|
|
88
90
|
|
|
89
91
|
On top of the per-task updates:
|
|
90
92
|
|
|
91
|
-
- **Run start
|
|
93
|
+
- **Run start — the first thing the run does** (*Open the run before anything else*): **sync the dashboard with the plan file** — re-read its checklist and add any phase or task (including sub-tasks like `T3.1`) the dashboard lacks, in plan order, as `pending`, with an `updates` note on it (`Added to the plan after <the plan was complete / phase 2 ran> — <why, if the plan says>`); a task the plan no longer has is removed with an `activity` line saying so. Then `status: "in-progress"`, `runs` + 1, the run-log document link, an `activity` line, and the first live-file write. In a git repository, check `.gitignore` has `.agents/specs/*/documents/*_live.js` and append it once if not — the live file is never staged or committed; `<slug>_dashboard.js` and `snapshots/` are.
|
|
92
94
|
- **Each phase, after its ticks and before its commit:** the phase's status, times and minutes (from its `⏱` line), its verifier result and a two-or-three-sentence summary of what it delivered; the phase-level snapshots (a progression spanning several tasks — below); `decisions`; `activeTime`; an `activity` line; and a current "so far" `outcome` headline.
|
|
93
95
|
- **A deferral:** the task's `status: "deferred"` and `deferredReason`, an `activity` line.
|
|
94
96
|
- **Run end — the After Action Report.** **decide the status by re-reading the plan file's checkboxes, never from memory:** `complete` when every task in the plan is `- [x]`; `incomplete` when every task is either ticked or marked ⏭️ DEFERRED; otherwise `paused` (the run covered only a slice, or tasks were added). The page refuses a `complete` it can see is false — it shows the plan as paused with a warning — but the plan file is the authority; never leave `in-progress` behind, because the status picks the page's top slot: `in-progress` shows *Current run activity* (the live file and the milestones), any other run-ended status shows the After Action Report in its place. Write `followUps` for a human, and `afterAction` — the whole plan's execution, start to finish: a one-sentence headline of what the plan delivered; two to four paragraphs on what was built, how it was proven and what surprised; highlights; and **one before/after for the plan as a whole** (`comparison`) — the plan-wide "before" frame beside a final "after" taken now from the same camera or viewport (the end-to-end check's session supplies it). Add the plan's key progression to `afterAction.snapshots` if one tells the story better than any single phase. The figures (tasks, tests, retries, time) are computed by the page — never type them in. A run that ends before the plan is finished writes it too; the page marks it *Interim* while `paused`, and the next run revises it with an `updates` entry. **A reopened plan** (tasks added after it was complete) works the same way: the run that finishes the added tasks rewrites the After Action Report to cover them, notes the change in its `updates` (`Revised — T7 added after completion: <why>`), and retakes the plan-wide "after" from the same camera so the comparison shows the plan as it now stands.
|
|
97
|
+
- **`--verbose` — the same work, written up in depth.** It changes what is written, never what is done: tests, the verifier, live checks and snapshot captures are exactly as without it, and TIME MATTERS still holds (the extra cost is writing, not checking). Set `detail: "verbose"` at run start. Each task gets a `details` write-up (fields in `data-schema.md`), filled in by whoever has the facts, at the same per-task moments as everything else:
|
|
98
|
+
- **the implementer, when the task is built:** `approach` (how it was built, how the pieces fit together, why this way and not the alternatives it weighed); `changes` — every file touched, with what changed in it and why; `testCases` — every named case with its expected and actual result; `problems` — each failed attempt or dead end, with what failed, the root cause and the fix; `notes` for a future maintainer; `timing.build`;
|
|
99
|
+
- **the verifier, while it checks:** `acceptance` — every Acceptance item with its verdict and the evidence it rests on (command output, the screenshot, the line read); `liveCheck` — what it looked at, on which engine, at what resolution, and how it judged it; `timing.verify`;
|
|
100
|
+
- **you, at the tick and in the fix loop:** each fix round added to `problems`, `timing.fix`, and snapshot captions that say what to notice, not just what is shown.
|
|
101
|
+
|
|
102
|
+
At run end the After Action Report adds `sections`, one card each where it applies: **Architecture** (what now exists and how it connects), **Phase by phase**, **Problems and resolutions**, **Deviations from the plan** (and why), **Known limitations**, **Lessons learned**, **Estimate vs actual** (per phase, from the `⏱` lines), **Recommended next steps**. Plain language a new developer can follow, concrete over vague — name the files, classes, numbers and screenshots. A later run without `--verbose` keeps everything a verbose run wrote and never thins it; `detail` stays `verbose`.
|
|
95
103
|
- **Updated notifications.** Never silently rewrite an earlier part of the dashboard. When later work changes an earlier result — a figure corrected, a decision reversed, a reopened task, a snapshot superseded by a better one — change it and append `{ at, by: "T<n>", note }` to that entry's `updates`. The page badges it **Updated** and lists it under *Updates and revisions*. A superseded snapshot stays; add the new one beside it.
|
|
96
104
|
- The dashboard is a record, never a gate: a dashboard slip never fails or blocks a task. At run end, leave the live file's last entry saying the run finished (the page hides it once the status is no longer `in-progress`).
|
|
97
105
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
This page is a fixed template: copy it to .agents/specs/<slug>/dashboard.html, replace {{slug}} below with the
|
|
12
12
|
feature slug, and never hand-edit anything else. Everything shown comes from the data file
|
|
13
|
-
documents/<slug>_dashboard.js
|
|
14
|
-
|
|
13
|
+
documents/<slug>_dashboard.js and, while a run is going, the live status in documents/<slug>_live.js —
|
|
14
|
+
both strict JSON behind a one-line `window.… =` prefix (fields and update recipe: data-schema.md).
|
|
15
15
|
It opens straight from disk (file://) — no server, no build, no network.
|
|
16
16
|
-->
|
|
17
17
|
<style>
|
|
@@ -632,6 +632,27 @@
|
|
|
632
632
|
font-size: 13.5px;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
+
/* ---------- Verbose task details and After Action Report sections ---------- */
|
|
636
|
+
.task-details { display: grid; gap: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
|
|
637
|
+
.detail-block h4, .aar-section h4 { margin: 0 0 8px; }
|
|
638
|
+
.detail-block h4 { font: 700 11px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
|
|
639
|
+
.detail-block p { margin: 0 0 8px; color: var(--text-muted); }
|
|
640
|
+
.detail-block ul { margin: 0; padding-left: 18px; color: var(--text-muted); display: grid; gap: 4px; }
|
|
641
|
+
.detail-scroll { overflow-x: auto; }
|
|
642
|
+
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
643
|
+
.detail-table th { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line-strong); font: 600 10.5px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); white-space: nowrap; }
|
|
644
|
+
.detail-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
|
|
645
|
+
.detail-table td:first-child { min-width: 140px; }
|
|
646
|
+
.verdict { padding: 2px 7px; border-radius: 5px; font: 700 11px/1.5 var(--font-mono); white-space: nowrap; }
|
|
647
|
+
.verdict-pass { color: var(--done); background: var(--done-soft); }
|
|
648
|
+
.verdict-fail { color: var(--failed); background: var(--failed-soft); }
|
|
649
|
+
.verdict-other { color: var(--text-muted); background: var(--pending-soft); }
|
|
650
|
+
.aar-sections { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 14px; }
|
|
651
|
+
.aar-section { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--bg); }
|
|
652
|
+
.aar-section h4 { font-size: 15.5px; }
|
|
653
|
+
.aar-section p { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
|
|
654
|
+
.aar-section ul { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 14px; display: grid; gap: 4px; }
|
|
655
|
+
|
|
635
656
|
/* ---------- Updated notifications ---------- */
|
|
636
657
|
.updated-badge {
|
|
637
658
|
display: inline-flex;
|
|
@@ -836,6 +857,7 @@
|
|
|
836
857
|
feature.origin ? `<span class="chip">from <strong>${escapeHtml(feature.origin === 'quick-plan' ? 'Quick Plan' : 'Spec')}</strong></span>` : '',
|
|
837
858
|
feature.size ? `<span class="chip">size <strong>${escapeHtml(feature.size)}</strong></span>` : '',
|
|
838
859
|
feature.proof ? `<span class="chip">proof <strong>${escapeHtml(feature.proof)}</strong></span>` : '',
|
|
860
|
+
report.detail === 'verbose' ? '<span class="chip">detail <strong>verbose</strong></span>' : '',
|
|
839
861
|
report.updatedAt ? `<span class="chip">updated <strong>${escapeHtml(report.updatedAt)}</strong></span>` : '',
|
|
840
862
|
report.status !== status ? `<span class="chip chip-warning"><span>status says <strong>${escapeHtml(report.status)}</strong>, but ${escapeHtml(unfinishedTasks().map((task) => task.id).join(', '))} ${unfinishedTasks().length === 1 ? 'is' : 'are'} not done</span></span>` : '',
|
|
841
863
|
].join('');
|
|
@@ -944,6 +966,7 @@
|
|
|
944
966
|
</div>
|
|
945
967
|
${renderFigures(allTasks, doneCount)}
|
|
946
968
|
</div>
|
|
969
|
+
${renderAfterActionSections(afterAction.sections)}
|
|
947
970
|
${updateNotes(afterAction.updates)}
|
|
948
971
|
</article>
|
|
949
972
|
${(afterAction.snapshots || []).length ? `<div class="gallery">${afterAction.snapshots.map(renderSnapshot).join('')}</div>` : ''}`;
|
|
@@ -1035,7 +1058,8 @@
|
|
|
1035
1058
|
factRow('Decisions', (task.decisions || []).length ? task.decisions.map(formatInline).join('<br>') : ''),
|
|
1036
1059
|
].join('');
|
|
1037
1060
|
const isCurrent = isRunActive() && live && live.task === task.id;
|
|
1038
|
-
const
|
|
1061
|
+
const details = renderTaskDetails(task.details);
|
|
1062
|
+
const hasBody = isCurrent || task.summary || facts || details || task.deferredReason || (task.snapshots || []).length || (task.updates || []).length;
|
|
1039
1063
|
|
|
1040
1064
|
return `
|
|
1041
1065
|
<details class="task is-${escapeAttribute(status)}${isCurrent ? ' is-live' : ''}" id="task-${escapeAttribute(task.id || '')}" ${isCurrent || status === 'in-progress' || isNew(task.updates) ? 'open' : ''}>
|
|
@@ -1051,6 +1075,7 @@
|
|
|
1051
1075
|
${task.deferredReason ? `<div class="deferred-note"><strong>Deferred:</strong> ${formatInline(task.deferredReason)}</div>` : ''}
|
|
1052
1076
|
${updateNotes(task.updates)}
|
|
1053
1077
|
${facts ? `<dl class="facts">${facts}</dl>` : ''}
|
|
1078
|
+
${details}
|
|
1054
1079
|
${(task.snapshots || []).length ? `<div class="gallery">${task.snapshots.map(renderSnapshot).join('')}</div>` : ''}
|
|
1055
1080
|
</div>` : ''}
|
|
1056
1081
|
</details>`;
|
|
@@ -1111,6 +1136,68 @@
|
|
|
1111
1136
|
return new Date(year, month - 1, day, hour, minute);
|
|
1112
1137
|
}
|
|
1113
1138
|
|
|
1139
|
+
/**
|
|
1140
|
+
* The verbose write-up of a task (bt-execute --verbose): how it was built and why, every file's change, every
|
|
1141
|
+
* test case, every acceptance item with its evidence, every failed attempt, the live check and the time spent.
|
|
1142
|
+
* Each block renders only when its data exists, so a normal run's task card is unchanged.
|
|
1143
|
+
*/
|
|
1144
|
+
function renderTaskDetails(details) {
|
|
1145
|
+
if (!details) return '';
|
|
1146
|
+
const timing = details.timing
|
|
1147
|
+
? ['build', 'verify', 'fix'].filter((phase) => details.timing[phase] != null).map((phase) => `${phase} ${escapeHtml(details.timing[phase])} min`).join(' · ')
|
|
1148
|
+
: '';
|
|
1149
|
+
const blocks = [
|
|
1150
|
+
detailBlock('Approach', paragraphs(details.approach)),
|
|
1151
|
+
detailBlock('Changes by file', detailTable(['File', 'What changed and why'],
|
|
1152
|
+
(details.changes || []).map((change) => [`<code>${escapeHtml(change.file || '')}</code>`, formatInline(change.change || '')]))),
|
|
1153
|
+
detailBlock('Test cases', detailTable(['Case', 'Expected', 'Result'],
|
|
1154
|
+
(details.testCases || []).map((testCase) => [formatInline(testCase.name || ''), formatInline(testCase.expected || ''), verdict(testCase.result)]))),
|
|
1155
|
+
detailBlock('Acceptance', detailTable(['Criterion', 'Verdict', 'Evidence'],
|
|
1156
|
+
(details.acceptance || []).map((item) => [formatInline(item.criterion || ''), verdict(item.result), formatInline(item.evidence || '')]))),
|
|
1157
|
+
detailBlock('Problems & fixes', detailTable(['Attempt', 'What failed', 'Root cause', 'Fix'],
|
|
1158
|
+
(details.problems || []).map((problem) => [escapeHtml(problem.attempt || ''), formatInline(problem.failed || ''), formatInline(problem.cause || ''), formatInline(problem.fix || '')]))),
|
|
1159
|
+
detailBlock('Live check', paragraphs(details.liveCheck)),
|
|
1160
|
+
detailBlock('Notes', (details.notes || []).length ? `<ul>${details.notes.map((note) => `<li>${formatInline(note)}</li>`).join('')}</ul>` : ''),
|
|
1161
|
+
detailBlock('Time', timing),
|
|
1162
|
+
].join('');
|
|
1163
|
+
return blocks ? `<div class="task-details">${blocks}</div>` : '';
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
/** Verbose After Action Report sections: Architecture, Problems and resolutions, Lessons learned … */
|
|
1167
|
+
function renderAfterActionSections(sections) {
|
|
1168
|
+
if (!(sections || []).length) return '';
|
|
1169
|
+
return `<div class="aar-sections">${sections.map((section) => `
|
|
1170
|
+
<div class="aar-section">
|
|
1171
|
+
<h4>${formatInline(section.title || '')}</h4>
|
|
1172
|
+
${paragraphs(section.body)}
|
|
1173
|
+
${(section.items || []).length ? `<ul>${section.items.map((item) => `<li>${formatInline(item)}</li>`).join('')}</ul>` : ''}
|
|
1174
|
+
</div>`).join('')}</div>`;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
function detailBlock(title, contentHtml) {
|
|
1178
|
+
return contentHtml ? `<div class="detail-block"><h4>${title}</h4>${contentHtml}</div>` : '';
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
/** Text that may be one string or a list of paragraphs. */
|
|
1182
|
+
function paragraphs(text) {
|
|
1183
|
+
const list = Array.isArray(text) ? text : text ? [text] : [];
|
|
1184
|
+
return list.map((paragraph) => `<p>${formatInline(paragraph)}</p>`).join('');
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
function detailTable(headings, rows) {
|
|
1188
|
+
if (!rows.length) return '';
|
|
1189
|
+
return `<div class="detail-scroll"><table class="detail-table">
|
|
1190
|
+
<thead><tr>${headings.map((heading) => `<th>${heading}</th>`).join('')}</tr></thead>
|
|
1191
|
+
<tbody>${rows.map((cells) => `<tr>${cells.map((cell) => `<td>${cell}</td>`).join('')}</tr>`).join('')}</tbody>
|
|
1192
|
+
</table></div>`;
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function verdict(result) {
|
|
1196
|
+
const text = String(result || '');
|
|
1197
|
+
const tone = /^pass/i.test(text) ? 'pass' : /^fail/i.test(text) ? 'fail' : 'other';
|
|
1198
|
+
return text ? `<span class="verdict verdict-${tone}">${escapeHtml(text)}</span>` : '';
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1114
1201
|
function factRow(label, valueHtml) {
|
|
1115
1202
|
return valueHtml ? `<dt>${label}</dt><dd>${valueHtml}</dd>` : '';
|
|
1116
1203
|
}
|
|
@@ -1,118 +1,81 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Feature Dashboard data — .agents/specs/<slug>/documents/<slug>_dashboard.js
|
|
3
|
-
*
|
|
4
|
-
* dashboard.html (copied from this template folder) renders everything from this one object. It is plain
|
|
5
|
-
* JavaScript loaded with <script src>, so the page works opened straight from disk. Rules:
|
|
6
|
-
* - Keep it valid JavaScript: one `window.FEATURE_DASHBOARD = { … };` assignment, JSON-style values.
|
|
7
|
-
* - Paths (documents, snapshots) are relative to the feature folder: "snapshots/…", "documents/…".
|
|
8
|
-
* - Every timestamp is local time from the shell, formatted "YYYY-MM-DD HH:MM" (the page orders and
|
|
9
|
-
* flags "new since your last visit" by plain string comparison).
|
|
10
|
-
* - Text fields may use `code` and **bold**; everything else is shown as plain text.
|
|
11
|
-
* - Never silently rewrite an earlier phase, task, snapshot, decision or the After Action Report. Change it and append
|
|
12
|
-
* an entry to its `updates` list: { at, by, note } — the page shows an "Updated" badge on it and lists
|
|
13
|
-
* it under "Updates and revisions".
|
|
14
|
-
*
|
|
15
|
-
* Status values — report: planned | in-progress (a run is executing right now) | paused (a run ended, plan not
|
|
16
|
-
* finished) | complete | incomplete (plan finished with deferrals)
|
|
17
|
-
* Decide it from the plan file's checkboxes. The page only believes "complete" when every task here is done;
|
|
18
|
-
* otherwise it shows the plan as paused with a warning. A task added to the plan after it was complete is
|
|
19
|
-
* added here as "pending" (with an `updates` note) and the status becomes "paused".
|
|
20
|
-
* The status picks the page's top slot: in-progress shows Current run activity (the live file + milestones);
|
|
21
|
-
* paused / complete / incomplete show the After Action Report instead (paused marks it Interim).
|
|
22
|
-
* phase: pending | in-progress | done | partial | deferred
|
|
23
|
-
* task: pending | in-progress | built (awaiting the verifier) | verifying | done | deferred | failed
|
|
24
|
-
*
|
|
25
|
-
* Update cadence: per TASK, not per phase. A task's entry changes the moment it starts (in-progress), the moment
|
|
26
|
-
* it is built (built — with its summary, files, tests and snapshots filled in right then), while the verifier
|
|
27
|
-
* checks it (verifying) and when it passes (done — verifier, commit, done time). The minute-by-minute "what is
|
|
28
|
-
* happening now" lives in the separate live file, documents/<slug>_live.js (schema: live.template.js).
|
|
29
|
-
*
|
|
30
|
-
* Snapshot shapes (any list of snapshots may mix them):
|
|
31
|
-
* progression — the build told stage by stage, from the same camera, in the order it happened:
|
|
32
|
-
* { title, caption, source, frames: [ { src, stage, caption, task, at }, … ], updates }
|
|
33
|
-
* comparison — one change, side by side (drag slider):
|
|
34
|
-
* { title, caption, source, before: { src, caption }, after: { src, caption }, updates }
|
|
35
|
-
* still — one image that proves one thing:
|
|
36
|
-
* { title, caption, source, src, updates }
|
|
37
|
-
* `source` names where the image came from: "browser", "unity", "blender", "reference".
|
|
38
|
-
*/
|
|
39
1
|
window.FEATURE_DASHBOARD = {
|
|
40
|
-
schema: 1,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
summary: "One paragraph: what this feature is and why it exists, in plain language."
|
|
2
|
+
"schema": 1,
|
|
3
|
+
"feature": {
|
|
4
|
+
"title": "Feature Title",
|
|
5
|
+
"slug": "feature-slug",
|
|
6
|
+
"branch": "project/feature/feature-slug",
|
|
7
|
+
"origin": "spec",
|
|
8
|
+
"size": "medium",
|
|
9
|
+
"proof": "functional",
|
|
10
|
+
"summary": "One paragraph: what this feature is and why it exists, in plain language."
|
|
50
11
|
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
12
|
+
"documents": [
|
|
13
|
+
{
|
|
14
|
+
"label": "Spec",
|
|
15
|
+
"path": "documents/feature-slug_spec.md"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"label": "Plan",
|
|
19
|
+
"path": "documents/feature-slug_plan.md"
|
|
20
|
+
}
|
|
56
21
|
],
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
updatedAt: "2026-01-01 09:00",
|
|
60
|
-
estimate: "3–6 h",
|
|
61
|
-
activeTime: "",
|
|
62
|
-
runs: 0,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// from the same camera or viewport. null when the plan has nothing to see.
|
|
73
|
-
comparison: null, // { title, caption, source, before: { src, caption }, after: { src, caption } }
|
|
74
|
-
snapshots: [], // optional: the plan's key progression, or the end-to-end proof
|
|
75
|
-
updates: []
|
|
22
|
+
"status": "planned",
|
|
23
|
+
"detail": "normal",
|
|
24
|
+
"updatedAt": "2026-01-01 09:00",
|
|
25
|
+
"estimate": "3–6 h",
|
|
26
|
+
"activeTime": "",
|
|
27
|
+
"runs": 0,
|
|
28
|
+
"afterAction": {
|
|
29
|
+
"writtenAt": "",
|
|
30
|
+
"headline": "",
|
|
31
|
+
"body": [],
|
|
32
|
+
"highlights": [],
|
|
33
|
+
"comparison": null,
|
|
34
|
+
"snapshots": [],
|
|
35
|
+
"sections": [],
|
|
36
|
+
"updates": []
|
|
76
37
|
},
|
|
77
|
-
|
|
78
|
-
phases: [
|
|
38
|
+
"phases": [
|
|
79
39
|
{
|
|
80
|
-
number: 1,
|
|
81
|
-
name: "Phase name from the plan",
|
|
82
|
-
status: "pending",
|
|
83
|
-
started: "",
|
|
84
|
-
finished: "",
|
|
85
|
-
minutes: 0,
|
|
86
|
-
summary: "",
|
|
87
|
-
verifier: null,
|
|
88
|
-
snapshots: [],
|
|
89
|
-
updates: [],
|
|
90
|
-
tasks: [
|
|
40
|
+
"number": 1,
|
|
41
|
+
"name": "Phase name from the plan",
|
|
42
|
+
"status": "pending",
|
|
43
|
+
"started": "",
|
|
44
|
+
"finished": "",
|
|
45
|
+
"minutes": 0,
|
|
46
|
+
"summary": "",
|
|
47
|
+
"verifier": null,
|
|
48
|
+
"snapshots": [],
|
|
49
|
+
"updates": [],
|
|
50
|
+
"tasks": [
|
|
91
51
|
{
|
|
92
|
-
id: "T1",
|
|
93
|
-
title: "Task title from the plan",
|
|
94
|
-
kind: "code",
|
|
95
|
-
verifyLevel: "standard",
|
|
96
|
-
status: "pending",
|
|
97
|
-
summary: "",
|
|
98
|
-
files: [],
|
|
99
|
-
tests: null,
|
|
100
|
-
verifier: "",
|
|
101
|
-
attempts: 0,
|
|
102
|
-
commit: "",
|
|
103
|
-
doneAt: "",
|
|
104
|
-
deferredReason: "",
|
|
105
|
-
decisions: [],
|
|
106
|
-
snapshots: [],
|
|
107
|
-
|
|
52
|
+
"id": "T1",
|
|
53
|
+
"title": "Task title from the plan",
|
|
54
|
+
"kind": "code",
|
|
55
|
+
"verifyLevel": "standard",
|
|
56
|
+
"status": "pending",
|
|
57
|
+
"summary": "",
|
|
58
|
+
"files": [],
|
|
59
|
+
"tests": null,
|
|
60
|
+
"verifier": "",
|
|
61
|
+
"attempts": 0,
|
|
62
|
+
"commit": "",
|
|
63
|
+
"doneAt": "",
|
|
64
|
+
"deferredReason": "",
|
|
65
|
+
"decisions": [],
|
|
66
|
+
"snapshots": [],
|
|
67
|
+
"details": null,
|
|
68
|
+
"updates": []
|
|
108
69
|
}
|
|
109
70
|
]
|
|
110
71
|
}
|
|
111
72
|
],
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
73
|
+
"decisions": [],
|
|
74
|
+
"followUps": [],
|
|
75
|
+
"activity": [
|
|
76
|
+
{
|
|
77
|
+
"at": "2026-01-01 09:00",
|
|
78
|
+
"text": "Plan written — 1 task in 1 phase, estimated 3–6 h."
|
|
79
|
+
}
|
|
117
80
|
]
|
|
118
81
|
};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Feature Dashboard data
|
|
2
|
+
|
|
3
|
+
`dashboard.html` renders everything from two data files in the feature folder's `documents/`:
|
|
4
|
+
|
|
5
|
+
| File | Holds | Written |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| `<slug>_dashboard.js` | the feature's record — status, phases, tasks and their results, decisions, snapshots, the After Action Report | at every task boundary (bt-plan creates it from `dashboard.template.js`) |
|
|
8
|
+
| `<slug>_live.js` | what is happening this minute — the current task, one sentence, its step log | at every meaningful step of a run (from `live.template.js`) |
|
|
9
|
+
|
|
10
|
+
They are **data, not code.** Each file is exactly one line of prefix and one strict-JSON value:
|
|
11
|
+
|
|
12
|
+
```js
|
|
13
|
+
window.FEATURE_DASHBOARD = { "schema": 1, "status": "planned", … };
|
|
14
|
+
window.FEATURE_LIVE = { "updatedAt": "2026-01-01 09:00", … };
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The `window.… =` prefix exists only because a page opened from disk (`file://`) may load a neighbouring
|
|
18
|
+
`<script src>` but may not fetch a `.json` file. Everything after `=` and before the final `;` is strict
|
|
19
|
+
JSON — double-quoted keys and strings, no comments, no trailing commas — so any JSON parser can read it.
|
|
20
|
+
The status of the plan itself lives in the plan file's checkboxes; the dashboard mirrors it (see *Status*).
|
|
21
|
+
|
|
22
|
+
## Updating a data file — parse, change, write back
|
|
23
|
+
|
|
24
|
+
Never edit the text by hand: one stray comma blanks the page. Read the file, parse the JSON, change the
|
|
25
|
+
fields, and write the whole file back. Every write then produces valid data by construction.
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
python3 - "$DATA" <<'PY'
|
|
29
|
+
import json, pathlib, sys
|
|
30
|
+
path = pathlib.Path(sys.argv[1])
|
|
31
|
+
text = path.read_text(encoding="utf-8")
|
|
32
|
+
prefix, body = text.split("=", 1)
|
|
33
|
+
data = json.loads(body.strip().rstrip(";"))
|
|
34
|
+
# … change `data` here, e.g. data["status"] = "in-progress" …
|
|
35
|
+
path.write_text(prefix.strip() + " = " + json.dumps(data, indent=2, ensure_ascii=False) + ";\n", encoding="utf-8")
|
|
36
|
+
PY
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Node works the same way (`JSON.parse` / `JSON.stringify(data, null, 2)`). Where neither runs, write the
|
|
40
|
+
whole file from a complete JSON value, never a partial patch. `<slug>_live.js` is small — always write it whole.
|
|
41
|
+
|
|
42
|
+
## Conventions
|
|
43
|
+
|
|
44
|
+
- **Paths** (documents, snapshots) are relative to the feature folder: `"snapshots/…"`, `"documents/…"`.
|
|
45
|
+
- **Timestamps** are local time from the shell, `"YYYY-MM-DD HH:MM"` (`date '+%Y-%m-%d %H:%M'`). The page
|
|
46
|
+
orders entries and flags "new since your last visit" by plain string comparison.
|
|
47
|
+
- **Text** may use `` `code` `` and `**bold**`; everything else is shown as plain text.
|
|
48
|
+
- **Updated notifications.** Never silently rewrite an earlier phase, task, snapshot, decision or the After
|
|
49
|
+
Action Report. Change it and append `{ "at", "by", "note" }` to its `updates` list — the page shows an
|
|
50
|
+
**Updated** badge on it and lists it under *Updates and revisions*.
|
|
51
|
+
|
|
52
|
+
## Status
|
|
53
|
+
|
|
54
|
+
| Field | Values |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `status` | `planned` · `in-progress` (a run is executing right now) · `paused` (a run ended, the plan is not finished) · `complete` · `incomplete` (finished with deferrals) |
|
|
57
|
+
| phase `status` | `pending` · `in-progress` · `done` · `partial` · `deferred` |
|
|
58
|
+
| task `status` | `pending` · `in-progress` · `built` (awaiting the verifier) · `verifying` · `done` · `deferred` · `failed` |
|
|
59
|
+
|
|
60
|
+
- Decide `status` from the plan file's checkboxes, never from memory. The page only believes `complete` when
|
|
61
|
+
every task here is `done`; otherwise it shows the plan as paused with a warning.
|
|
62
|
+
- A task added to the plan after it was complete is added here as `pending`, in plan order, with an `updates`
|
|
63
|
+
note saying why — and `complete` becomes `paused`.
|
|
64
|
+
- The status picks the page's top slot: `in-progress` shows *Current run activity* (the live file and the
|
|
65
|
+
milestones); `paused`, `complete` and `incomplete` show *The plan summary* (the After Action Report, marked
|
|
66
|
+
*Interim* while paused).
|
|
67
|
+
- **Cadence is per task.** A task's entry changes the moment it starts (`in-progress`), the moment it is built
|
|
68
|
+
(`built` — summary, files, tests and snapshots filled in right then), while the verifier checks it
|
|
69
|
+
(`verifying`) and when it passes (`done` — verifier, commit, done time).
|
|
70
|
+
|
|
71
|
+
## `<slug>_dashboard.js` fields
|
|
72
|
+
|
|
73
|
+
Top level:
|
|
74
|
+
|
|
75
|
+
| Field | Meaning |
|
|
76
|
+
|---|---|
|
|
77
|
+
| `schema` | `1` |
|
|
78
|
+
| `feature` | `{ "title", "slug", "branch", "origin": "spec" \| "quick-plan", "size", "proof", "summary" }` — `summary` is one plain-language paragraph |
|
|
79
|
+
| `documents` | `[{ "label", "path" }]` — Spec (omitted for a Quick Plan), Plan, and Run log once bt-execute has run |
|
|
80
|
+
| `status` | see *Status* |
|
|
81
|
+
| `detail` | `"normal"`, or `"verbose"` once any run used `bt-execute --verbose` (never set back) |
|
|
82
|
+
| `updatedAt` | last write, `"YYYY-MM-DD HH:MM"` |
|
|
83
|
+
| `estimate` | the plan's Total line, e.g. `"3–6 h"` |
|
|
84
|
+
| `activeTime` | from the run log's `⏱` lines, e.g. `"2 h 10 min"` |
|
|
85
|
+
| `runs` | number of bt-execute runs so far |
|
|
86
|
+
| `afterAction` | the After Action Report (below) |
|
|
87
|
+
| `phases` | the plan's phases, each with its tasks (below) |
|
|
88
|
+
| `decisions` | `[{ "id": "D1" \| "T7", "text", "source", "updates" }]` |
|
|
89
|
+
| `followUps` | plain strings — what a human should look at next |
|
|
90
|
+
| `activity` | `[{ "at", "text" }]`, oldest first — the milestones (the page shows newest first) |
|
|
91
|
+
|
|
92
|
+
`afterAction` — empty while planned; written by bt-execute at the end of every run:
|
|
93
|
+
|
|
94
|
+
| Field | Meaning |
|
|
95
|
+
|---|---|
|
|
96
|
+
| `writtenAt` | `"YYYY-MM-DD HH:MM"` |
|
|
97
|
+
| `headline` | one sentence: what the plan delivered |
|
|
98
|
+
| `body` | 2–4 paragraphs: what was built, how it was proven, what surprised |
|
|
99
|
+
| `highlights` | the results worth remembering |
|
|
100
|
+
| `comparison` | ONE before/after for the plan as a whole — "before" captured before T1 started, "after" at the end, from the same camera or viewport: `{ "title", "caption", "source", "before": { "src", "caption" }, "after": { "src", "caption" } }`; `null` when the plan has nothing to see |
|
|
101
|
+
| `snapshots` | optional: the plan's key progression, or the end-to-end proof |
|
|
102
|
+
| `sections` | `--verbose` only: `[{ "title", "body": [paragraphs], "items": [bullets] }]`, in this order where they apply — Architecture · Phase by phase · Problems and resolutions · Deviations from the plan · Known limitations · Lessons learned · Estimate vs actual · Recommended next steps |
|
|
103
|
+
| `updates` | see *Updated notifications* |
|
|
104
|
+
|
|
105
|
+
Each phase:
|
|
106
|
+
|
|
107
|
+
| Field | Meaning |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `number`, `name` | from the plan |
|
|
110
|
+
| `status` | see *Status* |
|
|
111
|
+
| `started`, `finished`, `minutes` | `"HH:MM"` and minutes, from the phase's `⏱` line |
|
|
112
|
+
| `summary` | what the phase delivered, in two or three sentences |
|
|
113
|
+
| `verifier` | `{ "result": "PASS" \| "FAIL → PASS on attempt 2", "note" }` or `null` |
|
|
114
|
+
| `snapshots` | phase-level story — progressions spanning several tasks |
|
|
115
|
+
| `tasks` | below |
|
|
116
|
+
| `updates` | see *Updated notifications* |
|
|
117
|
+
|
|
118
|
+
Each task:
|
|
119
|
+
|
|
120
|
+
| Field | Meaning |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `id`, `title` | from the plan (`T1`, `T3.1` …) |
|
|
123
|
+
| `kind` | `code` · `live` · `unity` — the plan's estimate kind |
|
|
124
|
+
| `verifyLevel` | `standard` · `live` |
|
|
125
|
+
| `status` | see *Status* |
|
|
126
|
+
| `summary` | what was actually done, and anything surprising |
|
|
127
|
+
| `files` | paths changed |
|
|
128
|
+
| `tests` | `{ "passed", "failed", "files": [".agents/specs/<slug>/tests/…"], "note" }` or `null` |
|
|
129
|
+
| `verifier` | `"PASS — independent subagent; live check in Chrome"` |
|
|
130
|
+
| `attempts`, `commit`, `doneAt` | as recorded |
|
|
131
|
+
| `deferredReason` | why it was deferred, if it was |
|
|
132
|
+
| `decisions` | `"DECISION T1: … — source"` lines |
|
|
133
|
+
| `snapshots` | this task's progression, comparisons and stills |
|
|
134
|
+
| `details` | `--verbose` only, else `null` — see below |
|
|
135
|
+
| `updates` | see *Updated notifications* |
|
|
136
|
+
|
|
137
|
+
`details` (`--verbose`) — every field optional; the page shows what is present:
|
|
138
|
+
|
|
139
|
+
| Field | Meaning |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `approach` | paragraphs: how it was built, how the pieces fit, why this way and not the alternatives |
|
|
142
|
+
| `changes` | `[{ "file", "change": "what changed in it and why" }]` |
|
|
143
|
+
| `testCases` | `[{ "name", "expected", "result": "PASS" \| "FAIL …" }]` |
|
|
144
|
+
| `acceptance` | `[{ "criterion", "result": "PASS" \| "FAIL", "evidence" }]` |
|
|
145
|
+
| `problems` | `[{ "attempt": "1", "failed", "cause", "fix" }]` |
|
|
146
|
+
| `liveCheck` | what was looked at, where, at what resolution, how it was judged |
|
|
147
|
+
| `notes` | anything a maintainer should know |
|
|
148
|
+
| `timing` | `{ "build": 12, "verify": 6, "fix": 4 }` — minutes |
|
|
149
|
+
|
|
150
|
+
## Snapshot shapes
|
|
151
|
+
|
|
152
|
+
Any list of snapshots may mix them. `source` names where the image came from: `"browser"`, `"unity"`,
|
|
153
|
+
`"blender"`, `"reference"`.
|
|
154
|
+
|
|
155
|
+
| Shape | Use | Fields |
|
|
156
|
+
|---|---|---|
|
|
157
|
+
| progression | the build told stage by stage, from the same camera, in the order it happened | `{ "title", "caption", "source", "frames": [{ "src", "stage", "caption", "task", "at" }], "updates" }` |
|
|
158
|
+
| comparison | one change, side by side (drag slider) | `{ "title", "caption", "source", "before": { "src", "caption" }, "after": { "src", "caption" }, "updates" }` |
|
|
159
|
+
| still | one image that proves one thing | `{ "title", "caption", "source", "src", "updates" }` |
|
|
160
|
+
|
|
161
|
+
## `<slug>_live.js` fields
|
|
162
|
+
|
|
163
|
+
"What are you doing right now?" — answered on the page without asking. Whoever is doing the work rewrites
|
|
164
|
+
this file whole: the implementer while it builds, the verifier while it checks, the orchestrator between them —
|
|
165
|
+
at every meaningful step (starting a task, each milestone inside it, before a build / export / bake / capture /
|
|
166
|
+
test run, a fix attempt, the hand-over to the verifier, the commit). A 20-minute silence shows as a warning.
|
|
167
|
+
The page shows it only while `status` is `in-progress`.
|
|
168
|
+
|
|
169
|
+
| Field | Meaning |
|
|
170
|
+
|---|---|
|
|
171
|
+
| `updatedAt` | `"YYYY-MM-DD HH:MM"` from the shell clock |
|
|
172
|
+
| `phase` | the current phase number |
|
|
173
|
+
| `task` | the task being worked on; `""` between tasks |
|
|
174
|
+
| `title` | only when there is no task: `"Verifying phase 1"`, `"Committing phase 1"` |
|
|
175
|
+
| `role` | `implementer` · `verifier` · `orchestrator` |
|
|
176
|
+
| `activity` | one plain-language sentence on what is happening this minute |
|
|
177
|
+
| `steps` | `[{ "at": "HH:MM", "text" }]` — the current task's log, oldest first; start fresh for each task, keep the last 12. Plain language a non-developer follows: "Painting the road mask from the spline", not "edit RoadNetwork.ts L120" |
|
|
@@ -1,25 +1,9 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Feature Dashboard live status — .agents/specs/<slug>/documents/<slug>_live.js
|
|
3
|
-
*
|
|
4
|
-
* "What are you doing right now?" — answered on the page without asking. Whoever is doing the work writes
|
|
5
|
-
* this file: the implementer while it builds, the verifier while it checks, the orchestrator between them.
|
|
6
|
-
* Rewrite the WHOLE file each time (it is small; never patch it in place) at every meaningful step:
|
|
7
|
-
* starting a task, each milestone inside it, starting a build / export / capture / test run, a fix attempt,
|
|
8
|
-
* handing over to the verifier, committing. A quiet gap of 20 minutes shows as a warning on the page.
|
|
9
|
-
*
|
|
10
|
-
* Rules: valid JavaScript, one assignment. `updatedAt` is the shell clock, "YYYY-MM-DD HH:MM".
|
|
11
|
-
* `steps` is the current task's log, oldest first — start a fresh list when a new task starts; keep the
|
|
12
|
-
* last 12. Plain language a non-developer understands: "Painting the road mask from the spline", not
|
|
13
|
-
* "edit RoadNetwork.ts L120". The page shows it only while the dashboard's status is "in-progress".
|
|
14
|
-
*/
|
|
15
1
|
window.FEATURE_LIVE = {
|
|
16
|
-
updatedAt: "2026-01-01 09:00",
|
|
17
|
-
phase: 1,
|
|
18
|
-
task: "
|
|
19
|
-
title: "
|
|
20
|
-
role: "
|
|
21
|
-
activity
|
|
22
|
-
steps: [
|
|
23
|
-
{ at: "09:00", text: "Started T1 — read the plan's task block and the files it touches." }
|
|
24
|
-
]
|
|
2
|
+
"updatedAt": "2026-01-01 09:00",
|
|
3
|
+
"phase": 1,
|
|
4
|
+
"task": "",
|
|
5
|
+
"title": "Plan written — waiting for bt-execute",
|
|
6
|
+
"role": "orchestrator",
|
|
7
|
+
"activity": "",
|
|
8
|
+
"steps": []
|
|
25
9
|
};
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -22,7 +22,7 @@ Turn a feature spec into `.agents/specs/<slug>/documents/<slug>_plan.md`: an ord
|
|
|
22
22
|
## Ground rules
|
|
23
23
|
|
|
24
24
|
- **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the plan needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-plan] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-plan] No time limit`, and do not add it). Speed never skips a required step, the Heavy Plan cold-context audit, or anything the plan needs to be complete.
|
|
25
|
-
- **Planning only — in every mode.** Research read-only; the only files you write are the plan and the dashboard (`dashboard.html` and its data files) in the feature folder. Never implement a task, edit source, or run builds/tests — not even a trivial first task. Writing the plan is the last action; the user runs `bt-execute` separately.
|
|
25
|
+
- **Planning only — in every mode.** Research read-only; the only files you write are the plan and the dashboard (`dashboard.html` and its data files) in the feature folder, plus the one `.gitignore` line Step 4 names. Never implement a task, edit source, or run builds/tests — not even a trivial first task. Writing the plan is the last action; the user runs `bt-execute` separately.
|
|
26
26
|
- **Babylon work:** if you have not read the Babylon Toolkit Agent Reference in this session, fetch and read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — the authority for conventions and API; fetch sub-documents only when relevant, and again only if a context compaction made you forget it. If the fetch fails, stop and tell the user — do not guess at the API.
|
|
27
27
|
- **Say what you are doing.** Before any step that takes more than a few seconds print one short line — `🔎 [bt-plan] <what> …` — and one when it returns; one line per subagent going out and coming back. A silent run looks like a hang and gets cancelled.
|
|
28
28
|
- **Subagents:** running this skill is the user's request to use them where it says so. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, work inline and say so. Tell exploration subagents they need not fetch the Agent Reference.
|
|
@@ -130,8 +130,9 @@ Each task above is a checkbox. To implement:
|
|
|
130
130
|
Print `🗂️ [bt-plan] Writing the feature dashboard …`. From bt-execute's `templates/dashboard/` *(where skills load through a tool: `load_skill('bt-execute')` + `read_skill_resource`; where they are files: the sibling `bt-execute/` folder in the skills directory this skill was loaded from)*:
|
|
131
131
|
|
|
132
132
|
- copy `dashboard.html` to `.agents/specs/<slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else;
|
|
133
|
-
- write `.agents/specs/<slug>/documents/<slug>_dashboard.js`
|
|
134
|
-
- write `.agents/specs/<slug>/documents/<slug>_live.js`
|
|
133
|
+
- write `.agents/specs/<slug>/documents/<slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin` `spec` or `quick-plan`, size, proof, a plain-language summary), `documents` (Spec — omitted for a Quick Plan — and Plan), `status: "planned"`, `updatedAt` from the shell clock (`date '+%Y-%m-%d %H:%M'`; with no shell, the current local time), `estimate` (the Total line), every phase and task from the plan as `pending` (id, title, kind from the estimate table, verify level), an empty `afterAction` and no snapshots, the plan's Decisions as `decisions` (Heavy Plan; otherwise the spec's), and one `activity` line: `Plan written — <n> tasks in <k> phases, estimated <range>`;
|
|
134
|
+
- write `.agents/specs/<slug>/documents/<slug>_live.js` from `live.template.js`, the same way (whole, strict JSON): no task, `role: "orchestrator"`, `title: "Plan written — waiting for bt-execute"`, no steps (bt-execute rewrites it at every step of a run).
|
|
135
|
+
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents/specs/*/documents/*_live.js` — append it once if missing. The live file is rewritten at every step of a run and is not history worth keeping; `<slug>_dashboard.js` is, and stays tracked. A live file git already tracks is left as it is.
|
|
135
136
|
|
|
136
137
|
Re-planning an existing feature rewrites the data file's phases and tasks from the new plan but keeps the results of tasks already done, its `afterAction` and its `activity` history, adding a `Plan revised` line; new tasks are `pending` with an `updates` note, and a `complete` status becomes `paused`. If the template cannot be found, skip the dashboard and say so — bt-execute creates it on its first run.
|
|
137
138
|
|