@babylonjs-toolkit/agent 1.2.1 → 1.2.3
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 +34 -21
- package/lib/claude-settings.js +146 -1
- package/lib/doctor.js +21 -4
- package/lib/install.js +67 -4
- package/package.json +1 -1
- package/scripts/hooks/block-sleep.js +138 -0
- package/skills/bt-execute/SKILL.md +99 -117
- package/skills/bt-execute/scripts/dashboard.mjs +441 -24
- package/skills/bt-execute/templates/dashboard/data-schema.md +43 -16
- package/skills/bt-plan/SKILL.md +52 -62
|
@@ -1,170 +1,152 @@
|
|
|
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 (
|
|
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 (`@plan ALL`) or a range (`T3-T7`, `T12-`, `NEXT:3`); with no task id it runs the next unchecked task. `--auto-pilot` runs unattended: the agent owns the whole pipeline (code, UI, assets, Blender, Unity, export, build, visual QA), never asks a question, defers what keeps failing, and never stops until the range is done. Each task is built with its tests and checked once by an independent verifier, live when visual; plan tracks build in parallel. `--strict` adds an adversarial verifier per task; `--verbose` an in-depth dashboard. The feature's dashboard (`.agents/specs/<slug>/dashboard.html`) stays current task by task with snapshots of the build, then shows an After Action Report with a plan-wide before/after; a complete plan also gets a plain-language `documents/<slug>_summary.html`."
|
|
4
4
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch(domain:raw.githubusercontent.com), Agent, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Run tasks from a plan: build each
|
|
7
|
+
Run tasks from a plan: build each with its tests, have an independent verifier check it once, tick only on PASS, keep the feature's dashboard current. 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
10
|
/bt-execute [--auto-pilot] [--strict] [--verbose] [--no-time-limit] <plan> [task] [brief]
|
|
11
11
|
|
|
12
|
-
/bt-execute @.agents/specs/<slug>/documents/<slug>_plan.md ALL
|
|
13
|
-
|
|
14
|
-
/bt-execute @plan.md
|
|
15
|
-
/bt-execute @plan.md
|
|
16
|
-
/bt-execute @plan.md T3-T7 # a range, in plan order (T12- = through the end)
|
|
17
|
-
/bt-execute @plan.md NEXT:3 # the next three unchecked tasks
|
|
18
|
-
/bt-execute @plan.md ALL # every remaining task (resumable)
|
|
19
|
-
/bt-execute @plan.md "mind the physics layer" # a brief shapes HOW, never WHICH task
|
|
20
|
-
/bt-execute --strict @plan.md ALL # adversarial verifier on every task
|
|
21
|
-
/bt-execute --auto-pilot @plan.md ALL # unattended; combine with --strict if wanted
|
|
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
|
|
12
|
+
/bt-execute @.agents/specs/<slug>/documents/<slug>_plan.md ALL # every remaining task (resumable)
|
|
13
|
+
/bt-execute @plan.md # NEXT: the next unchecked task
|
|
14
|
+
/bt-execute @plan.md T4 # one task · T3-T7 a range · T12- to the end · NEXT:3
|
|
15
|
+
/bt-execute @plan.md "mind the physics layer" # a brief shapes HOW, never WHICH task
|
|
24
16
|
```
|
|
25
17
|
|
|
26
|
-
-
|
|
27
|
-
- `[task]` is the token
|
|
28
|
-
- A range is a slice
|
|
29
|
-
-
|
|
30
|
-
- **`--auto-pilot` overrides every
|
|
18
|
+
- `--auto-pilot`: unattended. `--strict`: an adversarial verifier on every task. `--verbose`: an in-depth dashboard. `--no-time-limit`: TIME MATTERS off. Strip these and any literal `TIME MATTERS` first. `<plan>` is required — missing → ask *(auto-pilot: say so, end)*; never guess a path.
|
|
19
|
+
- `[task]` is the token after the plan only if it is `T<id>`, `T<a>-T<b>`, `T<a>-`, `NEXT`, `NEXT:<n>` or `ALL` (any case); otherwise it is brief, and the task is `NEXT` (`ALL` under auto-pilot). Never ask which.
|
|
20
|
+
- A range is a checklist slice in file order, sub-tasks (`T3.1`) included. Unknown id → list the ids, stop; reversed → error, never swap. Nothing outside it is touched.
|
|
21
|
+
- `- [x]` tasks are skipped, so every mode resumes; nothing left → say so, stop. Only `ALL`, ranges and `NEXT:<n>` run past one task.
|
|
22
|
+
- **`--auto-pilot` overrides every *stop*, *ask* and *tell the user* below** — read **Auto-pilot** first.
|
|
31
23
|
|
|
32
24
|
## Ground rules
|
|
33
25
|
|
|
34
|
-
- **TIME MATTERS**
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
37
|
-
- **Scope
|
|
38
|
-
- **Open the run
|
|
39
|
-
- **Read the docs once
|
|
40
|
-
- **SPEC.md** constrains
|
|
41
|
-
- **Say what you are doing**
|
|
42
|
-
- **Clock every run
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
- **Subagents:**
|
|
26
|
+
- **TIME MATTERS** (default): follow *Work fast*, take the direct route, never re-read. Print `⏱️ [bt-execute] TIME MATTERS` (or `⏱️ [bt-execute] No time limit`) and start every subagent prompt with `TIME MATTERS.` unless it is off. Speed never relaxes tests, the verifier, live checks or "tick only on PASS".
|
|
27
|
+
- **Never commit** — no git commit, stage, stash, reset, checkout, push or branch switch, in any mode. Changes stay in the working tree.
|
|
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
|
+
- **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.
|
|
31
|
+
- **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
|
+
- **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
|
+
- **Say what you are doing** in one line at each boundary.
|
|
34
|
+
- **Clock every run**, any mode — bt-plan re-fits its estimates from it. Shell times only (`date '+%Y-%m-%d %H:%M %Z'`), appended to `documents/<slug>_autopilot.md` (legacy plans: `<plan-basename>_autopilot.md`; interactive runs write only these and task lines):
|
|
35
|
+
- `⏱ Run <n> start <date time> · queue T<a>–T<b> (<k> tasks) · plan estimate <the plan's Total line, or none> · flags <auto-pilot / strict / interactive>`
|
|
36
|
+
- per phase, after its ticks (clock read at build start, verifier launch, tick): `⏱ Phase <N> (T<a>–T<b>): <HH:MM>→<HH:MM> · <m> min · build <m> · verify <m> · fix <m> (<rounds> rounds)`, plus `· waited <m>` for time waiting on the user, not counted in `<m> min`
|
|
37
|
+
- task lines end `· done <HH:MM>`
|
|
38
|
+
- `⏱ Run <n> end <date time> · <done>/<k> tasks · active <h m> · <min> min/task · waited <m>`
|
|
39
|
+
- **Subagents:** this skill is the request to use them (`Agent`, `Task`, …). None → work inline, self-verify with the charter, say so.
|
|
48
40
|
|
|
49
41
|
## The loop
|
|
50
42
|
|
|
51
|
-
Work in **phases**:
|
|
43
|
+
Work in **phases**: the plan's `### Phase N` groups, else up to 3 consecutive tasks (a `live` task, `Update SPEC.md` and the last task close a group). `--strict` makes every task a phase.
|
|
52
44
|
|
|
53
|
-
|
|
54
|
-
2. **Verify** the phase with a fresh **independent verifier** subagent (charter below), giving it the list of files changed. It returns PASS/FAIL per task, with evidence, and marks each task `verifying` on the dashboard (and the live file) as it checks it.
|
|
55
|
-
3. **Tick** `- [ ]` → `- [x]` for every task that passed, immediately — except a task that depends on one that failed in the same phase, which waits for it. Never tick partial, skipped or unverified work. Mark each ticked task `done` on the dashboard as you tick it, then write the phase's dashboard entry.
|
|
56
|
-
4. **Fix loop** for a task that failed: fix the code in the context that wrote it; re-run its tests; re-verify with a **fresh** verifier given only the failed items and the evidence (`--strict`: the whole task). A records-only slip (a stale number or note) is fixed directly and re-checked by you. 3 attempts (`--strict`: 5), each changing something material; stop early if two attempts fail the same way with no new idea. Still failing → leave it unticked, stop and report *(auto-pilot: defer and continue)*.
|
|
57
|
-
5. **Report:** tasks done (for `ALL` / ranges: the range asked for, completed/total, and whether the plan is now finished; if fewer than `n` tasks remained for `NEXT:<n>`, say so), files changed, tests run (`tests: 4 passed (implementer) · verifier-checked`), verifier result (`verified (independent subagent)` or `verified (self)`), the dashboard path (`.agents/specs/<slug>/dashboard.html` — open it in a browser), the plan summary path when this run wrote it (`.agents/specs/<slug>/documents/<slug>_summary.html`), and the next task id — for reference only.
|
|
45
|
+
**Who builds:**
|
|
58
46
|
|
|
59
|
-
|
|
47
|
+
- **A queue of 3 tasks or fewer** (a small plan says *Runs inline*): you build them, then one independent verifier checks them all.
|
|
48
|
+
- **Tracks** (`Track: <letter>`): one builder subagent per track, all at once, each given its owned files from the plan's *Tracks and owned files* and the *Parallel rules*. A `Track: integration` task is the closing step you run once the phase's tracks are built. The phase verifier starts when all of it is built; the next phase may build meanwhile unless it depends on this one.
|
|
49
|
+
- **No tracks:** one builder subagent per phase, tasks in order, kept for its fix loop.
|
|
60
50
|
|
|
61
|
-
|
|
51
|
+
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
|
+
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
|
+
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
|
+
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.
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
### Parallel rules — in every track builder's brief
|
|
64
58
|
|
|
65
|
-
**
|
|
59
|
+
- **Files:** edit only your track's files. A file two tracks need (route table, `package.json`, lockfile, shared stylesheet, test list) belongs to one track or to integration. Need another track's file → stop that item and report it; never edit it.
|
|
60
|
+
- **Shared processes:** never restart, stop or re-launch a shared dev server, game server or proxy. Use your own DevTools port and scratch folder. Unity or Blender work on one project stays on one track.
|
|
61
|
+
- **Builds and installs:** no `npm install` or dependency change while tracks run (one track does it first, or integration). Run only your own type-check and tests; the full build that writes shared output (`dist/`, `*.tsbuildinfo`, kit bundles) runs once, by the orchestrator, after the tracks. A type error in a file you do not own is noted, never fixed.
|
|
62
|
+
- **Tests and records:** your tests write only to their own `mkdtemp` folders; write only your own tasks' dashboard entries; no git command that changes the working tree or index.
|
|
66
63
|
|
|
67
|
-
|
|
64
|
+
### The verifier's charter
|
|
65
|
+
|
|
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."*
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
`[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
|
+
**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
|
+
|
|
72
|
+
## Feature folder and dashboard
|
|
70
73
|
|
|
71
74
|
```
|
|
72
75
|
.agents/specs/<slug>/
|
|
73
|
-
dashboard.html the feature dashboard — opens
|
|
76
|
+
dashboard.html the feature dashboard — opens from disk
|
|
74
77
|
documents/<slug>_spec.md bt-spec (absent for a Quick Plan)
|
|
75
78
|
documents/<slug>_plan.md bt-plan
|
|
76
|
-
documents/<slug>_autopilot.md
|
|
77
|
-
documents/<slug>_dashboard.js the dashboard's data
|
|
78
|
-
documents/<slug>_live.js what is happening
|
|
79
|
-
documents/<slug>_summary.html the
|
|
80
|
-
|
|
81
|
-
snapshots/ the meaningful snapshots the dashboard shows
|
|
82
|
-
tests/ every test this plan's tasks write
|
|
83
|
-
recon/ copies of the recons the spec rests on (bt-spec, when its brief cites any)
|
|
79
|
+
documents/<slug>_autopilot.md the run log
|
|
80
|
+
documents/<slug>_dashboard.js the dashboard's data
|
|
81
|
+
documents/<slug>_live.js what is happening now (written by the helper)
|
|
82
|
+
documents/<slug>_summary.html the plain-language summary, once complete (+ _summary.js)
|
|
83
|
+
snapshots/ tests/ recon/
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
**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.
|
|
89
|
-
|
|
90
|
-
**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 helper's exact command lines with the paths filled in, and these rules. Every timestamp comes from the local clock (the helper takes it for you).
|
|
86
|
+
**The feature folder is wherever the plan is** (`<slug>` is its name); paths are relative to it. The user moves folders between `.agents/specs/`, `complete/` and `archived/`; a reopened plan runs where it is. **Never move a feature folder.** A legacy flat plan (`.agents/specs/<slug>_plan.md`) runs in place and gets `.agents/specs/<slug>/` for the dashboard files and `snapshots/`.
|
|
91
87
|
|
|
92
|
-
|
|
88
|
+
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).
|
|
93
89
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
- **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.
|
|
92
|
+
- **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
|
+
- **`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
|
+
- **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.
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
- **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, done time, its `DECISION` lines, and `checkedLive` — one line on what the verifier ran live and where, for every task it checked in the browser or Unity whatever the plan's verify level, `""` when tests alone proved it); back to `in-progress` with `attempts` + 1 on a FAIL. Each change also adds an `activity` line and refreshes `updatedAt`.
|
|
100
|
-
- **Every write goes through this skill's `scripts/dashboard.mjs` — 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); the helper parses it, changes it, checks the shapes and writes it back atomically, so the page never sees a half-written or malformed file. Use it, not a one-off script of your own: `node <skills>/bt-execute/scripts/dashboard.mjs live <feature-folder> --task T7 --role implementer --activity "…" --step "…"` · `task <feature-folder> T7 --set '{"status":"built","summary":"…"}'` · `snapshot <feature-folder> T7 --src snapshots/T7-01-stage.png --caption "…"` (or `--before … --after …`, or `--frame "src|stage|caption"` repeated) · `activity <feature-folder> "…"` · `status <feature-folder> in-progress` · `check <feature-folder>` (all options in the script's header). **Snapshots go in only through `snapshot`** — it builds the shape the page renders and refuses an image that is not on disk. As a backstop, every helper write repairs an entry the page could not show (an image under `path`, `file`, `image`, `url` or `href` moves to `src`; an unknown `source` becomes `browser`), `check` repairs any already in the file, and the watchdog repairs one written around the helper within a minute; an image that is not on disk is still refused. Run `check` at every phase boundary and at run end; a failure there is fixed before the phase closes. Only where Node cannot run, fall back to the parse-and-write-back recipe in `data-schema.md`. Keep each field its documented shape too — a list stays a list (`updates`, `snapshots`, `files`, `decisions`, `notes` …: append, never assign a string); a helper script you give subagents checks the shapes before it writes.
|
|
96
|
+
### Snapshots tell the story — ENFORCED
|
|
101
97
|
|
|
102
|
-
|
|
98
|
+
The snapshots are how a human sees what was built and how it came together. Choose them for meaning, not coverage, and never just one before and one after per task: show **the story of the build**.
|
|
103
99
|
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
106
|
-
- **
|
|
107
|
-
- **
|
|
108
|
-
- **
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
- **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`;
|
|
112
|
-
- **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.
|
|
113
|
-
|
|
114
|
-
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`.
|
|
115
|
-
- **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.
|
|
116
|
-
- 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`).
|
|
117
|
-
|
|
118
|
-
### Snapshots tell the story
|
|
100
|
+
- **Progressions first.** For a task with visible output, capture a frame each time a meaningful layer of the work lands, from the **same camera or viewport** every time so the frames line up, and caption each with what that stage added. A terrain: heightmap → splat textures → road network → trees → foliage → baked lighting. A UI: layout → styling → states → motion. A shader: base colour → each lighting term → final. A level: blockout → props → lighting → post. A fix: the fault → the fix. A progression can span several tasks; record it on the phase (`P<N>`), each frame's `task` set.
|
|
101
|
+
- **Then whatever proves the point.** A comparison when a change is best seen side by side (a fix, the state before the phase, Unity beside the browser for parity); a second angle when one view hides it (overview, ground level, close detail); a still when one image proves one thing.
|
|
102
|
+
- **As many frames as the build has meaningful stages:** usually 3–8 for a visual task, none for a task with nothing to see. No near-duplicates and no frame per iteration; a failed attempt only when it explains a decision (say so in the caption).
|
|
103
|
+
- **Who takes them.** *You:* before T1 of the first run changes anything, the **plan-wide "before"** (`snapshots/plan-before.png`) from the camera or viewport that will best show the finished feature. That is the starting state, even if it is an empty scene or the old page; skip it only when the plan has nothing to see. At run end, the plan-wide "after" from the same camera. *The builder:* a "before" frame before the first change of a visual task, milestone frames as each layer lands, and its built frame. It is already capturing to iterate, so it keeps the meaningful frames instead of discarding them, and adds them **before** its `built` write. *The verifier:* the verified frames from its live session. *You* pick, order and caption them into the phase's progression, and add any frame a subagent returned without adding.
|
|
104
|
+
- **Cheap, never extra.** Frames come from the sessions and exports the work already runs, never an extra page session or re-export just for a picture. Inside a session that is open anyway, a capture costs seconds: take it.
|
|
105
|
+
- **The helper holds the line.** `snapshots/` holds only frames worth showing; iteration captures go to scratch. A task cannot move to `built`, `verifying` or `done` while a `snapshots/T<n>-…` frame of its own is on no dashboard entry. A visual task (kind `live`, `game` or `unity`) cannot be `built` with no snapshot at all; `--no-frame "<why>"` is only for a task that truly has nothing to show yet, and the reason lands in the activity log. `check` also fails on a closed phase's unshown `P<N>-…` frames and, once a run has ended, on a `plan-before` the After Action Report does not use. A refusal is fixed by adding the frames, never by moving or deleting them.
|
|
106
|
+
- **Files.** `snapshots/T<n>-<NN>-<stage>.png` (phase-level `P<N>-<NN>-<stage>.png`; plan-wide `plan-before` / `plan-after`), at most about 1600 px wide; JPEG or WebP for large scenes. Unity frames come through the bridge's camera capture, browser frames through `bt-cdp.mjs`. Every frame reaches the page only through `dashboard.mjs snapshot`; a subagent that cannot run it returns paths and captions for you to add.
|
|
119
107
|
|
|
120
|
-
|
|
108
|
+
### Run start, phases, run end
|
|
121
109
|
|
|
122
|
-
- **
|
|
123
|
-
- **
|
|
124
|
-
- **
|
|
125
|
-
- **
|
|
126
|
-
-
|
|
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*).
|
|
111
|
+
- **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.
|
|
113
|
+
- **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
|
+
- **`--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.
|
|
127
115
|
|
|
128
116
|
## Work fast
|
|
129
117
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
- **
|
|
133
|
-
- **
|
|
134
|
-
- **
|
|
135
|
-
- **
|
|
136
|
-
- **Reuse the project's tools; keep evidence light.** No one-off tools per task; no ledgers, md5 or environment records, archives or checked-in capture trees unless the plan asks. The dashboard's curated snapshots are the one exception — they are the record a human reads, alongside the run log.
|
|
137
|
-
- **Someone else's red is not your task.** A failing test that belongs to another feature and that you did not touch is logged as pre-existing and left alone.
|
|
118
|
+
- **Iterate narrow, confirm wide:** while building, the task's tests, the fastest build, the quick look; the full chain, full build and wider checks (second engine, full resolution, parity gates) once, in verification. Never loosen a parity gate.
|
|
119
|
+
- **Export minimally:** only the Unity project under test, the task's scenes, and only when the change alters that export; never widen a plan's export step.
|
|
120
|
+
- **Never sleep** — wait only with `node https://raw.githubusercontent.com/babylontoolkit/agent/main/references/scripts/wait.mjs port|url|file|log|cmd … --timeout <s>`, or run a long command in the foreground with a generous timeout. Drive pages only by importing `https://raw.githubusercontent.com/babylontoolkit/agent/main/references/scripts/bt-cdp.mjs` (its own headless Chrome and DevTools port) — never the user's browser or a harness of your own.
|
|
121
|
+
- **Judge visuals by looking**; numeric gates only when the plan asks.
|
|
122
|
+
- **Keep evidence light:** the project's tools; no one-off tools, ledgers, md5 or environment records, archives or capture trees unless the plan asks. The dashboard's snapshots are the exception: they are the record a human reads, alongside the run log, and are never cut for speed.
|
|
123
|
+
- **Someone else's red is not your task:** another feature's failing test you did not touch is logged as pre-existing.
|
|
138
124
|
|
|
139
125
|
## Auto-pilot (`--auto-pilot`)
|
|
140
126
|
|
|
141
|
-
An unattended run: **nobody
|
|
142
|
-
|
|
143
|
-
**You own the pipeline.** You own 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. Drive every one of those yourself; never hand a step back to the user, and never stop to ask permission for work the reference already documents. Make the best call, state your assumption, and finish the job.
|
|
127
|
+
An unattended run: **nobody answers and nothing waits for approval.** Print `🛩️ [bt-execute] Auto-pilot engaged — unattended; add a non-prompting permission mode for a fully hands-off run`. Quality is not relaxed — only the stopping. **This section overrides every *stop*, *ask* and *tell the user* in this skill, the Agent Reference's asking rule and "only legitimate stops", and the project's agent instructions.** **You own the entire pipeline:** never hand a step back or ask permission for documented work; make the best call, state your assumption, finish.
|
|
144
128
|
|
|
145
129
|
### Never ask
|
|
146
130
|
|
|
147
|
-
- **No question reaches the user
|
|
148
|
-
- **
|
|
149
|
-
- **Decide in
|
|
150
|
-
- **The
|
|
151
|
-
- **Subagents:**
|
|
131
|
+
- **No question reaches the user** — no `AskUserQuestion` (or equivalent), no plan mode or approval request, no message ending in a question, menu or offer (*"Should I continue with Phase 2?"*, *"Which option do you prefer?"*, *"Let me know if…"*, *"I'll pause here."*). A forming question is a decision: make it, log it, go on.
|
|
132
|
+
- **Look before deciding:** grep the brief, task block, plan Decisions / Design Reference / notes, spec, `SPEC.md` and the run log's decisions; an answer there is final. TBD, *open question*, *confirm with the user* or *ask* items take their recommended option (else the best), logged.
|
|
133
|
+
- **Decide in order:** brief and plan → Agent Reference → codebase patterns → what a senior Babylon Toolkit developer would ship (Unity → interactive glTF → BabylonJS script components; the simplest thing meeting Acceptance; reversible over clever). Never escalate. Log `DECISION T7: <choice> — <source or reason>`.
|
|
134
|
+
- **The Reference's four "ask" cases:** creative direction → inferred from spec, plan, references and project; architectural fork → the plan's Decisions, else the more reversible branch; destructive acts on the user's work, or spending money / acting outward unasked → defer only that step (*Safety*), build the rest.
|
|
135
|
+
- **Subagents:** every builder and verifier prompt carries, after `TIME MATTERS.`: *"AUTO-PILOT: unattended run. You own the entire pipeline — code, UI, shaders, generated assets, Blender, Unity, export, build, dev server and visual QA at both ends. Never ask a question or hand a step back; the answer is in this brief, the plan, the Agent Reference or the codebase. Decide, state each assumption in one line, and always return a result."* One that returns a question or half a result: answer from the plan and send it back; never relay it.
|
|
152
136
|
|
|
153
137
|
### Never stop
|
|
154
138
|
|
|
155
|
-
- **The run ends only when the
|
|
156
|
-
- **Ending your turn is stopping.**
|
|
157
|
-
- **
|
|
158
|
-
- After a compaction, re-read the plan and
|
|
139
|
+
- **The run ends only when the queue is empty** — each task in it `- [x]` or deferred (the range, or every remaining task for `ALL` / no id); re-read the plan before ending.
|
|
140
|
+
- **Ending your turn is stopping.** No boundary, milestone, compaction, error, ambiguity or blocker ends it: one console line, then the next phase. The only mid-queue turn end is waiting on a background job or subagent that will notify you — one status line (`waiting on the phase 2 verifier`), never a question.
|
|
141
|
+
- **Exactly four early exits:** the plan file is missing; a range endpoint is unknown or reversed (say so, end); the brief names a stop point (`stop after T5`); the user says stop. An unreadable Reference → retry 3×, carry on, log it. A license, account, credential or sign-in only the user has → defer the tasks that need it, run the rest.
|
|
142
|
+
- After a compaction, re-read the plan and run log — the only state — and continue at the first unticked, undeferred task.
|
|
159
143
|
|
|
160
144
|
### Keep moving
|
|
161
145
|
|
|
162
|
-
- **Blocked by an unfinished task:**
|
|
163
|
-
- **Errors:**
|
|
164
|
-
- **Permission denied
|
|
165
|
-
- **Defer, don't stall
|
|
166
|
-
- **Safety
|
|
167
|
-
- **
|
|
168
|
-
- **
|
|
169
|
-
- **Run log** — `documents/<slug>_autopilot.md` beside the plan, appended per run: the `⏱` lines from *Clock every run* and completed/total; one line per task (outcome, attempts, tests, verifier, files, done time); one line per decision; deferred tasks with what a human should look at first. Narrate the same boundaries to the console: `▶ [auto-pilot] T12/50 — <title>`, `✅ … verified`, `⏭️ … deferred — <reason>`.
|
|
170
|
-
- **Exit report** — only once the queue is empty: tasks completed, completed/total, deferred tasks with reasons, decisions logged and the run-log path, the dashboard path, that every change is left uncommitted for the user, whether the plan is done. It states results; it asks nothing. Re-running the same command resumes and re-attempts deferred tasks.
|
|
146
|
+
- **Blocked by an unfinished task:** re-attempt it if deferred this run and the fix is now clear; else do the minimum to unblock, log it; never tick outside the queue.
|
|
147
|
+
- **Errors:** fix the cause, retry; transient ones (network, port in use, lock file, editor compiling) → `wait.mjs`, retry up to 3×. **Tools down** (Unity, Blender, dev server, browser) → restart or install via their CLI; truly unavailable → defer.
|
|
148
|
+
- **Permission denied** is respected, never worked around: log it, defer that step (`permission denied: <action>`), continue.
|
|
149
|
+
- **Defer, don't stall:** keep `- [ ]` and append ` ⏭️ DEFERRED (auto-pilot): <reason>`; dependents are deferred `blocked by T<n>`. After the queue, one more pass: a deferred task that now passes loses the marker and is ticked.
|
|
150
|
+
- **Safety:** never push, deploy, publish, spend money, or delete/overwrite outside the plan's scope unless it says so — defer instead. Asset generation the plan or spec calls for is in scope. Never `git init`; leave others' uncommitted changes alone, unasked.
|
|
151
|
+
- **Run log** per run: the `⏱` lines, completed/total, a line per task (outcome, attempts, tests, verifier, files, done time) and per decision, deferred tasks with where to look first. Console: `▶ [auto-pilot] T12/50 — <title>`, `✅ … verified`, `⏭️ … deferred — <reason>`.
|
|
152
|
+
- **Exit report** once the queue is empty: completed/total, deferrals with reasons, decisions and the run-log path, the dashboard path, that all changes are uncommitted, whether the plan is done. It asks nothing; re-running resumes and retries deferrals.
|