@babylonjs-toolkit/agent 1.1.66 → 1.1.69
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 +3 -2
- package/package.json +1 -1
- package/skills/bt-design/SKILL.md +7 -0
- package/skills/bt-design/templates/3d-hero-scroll/hero-scroll.js +27 -9
- package/skills/bt-execute/SKILL.md +4 -4
- package/skills/bt-execute/templates/dashboard/dashboard.html +96 -21
- package/skills/bt-execute/templates/dashboard/data-schema.md +4 -3
- package/skills/bt-gauntlet/references/critic-rubrics.md +1 -0
- package/skills/bt-plan/SKILL.md +1 -1
- package/skills/bt-profile/SKILL.md +318 -0
- package/skills/bt-profile/scripts/analyze.mjs +735 -0
- package/skills/bt-profile/scripts/compare.mjs +87 -0
- package/skills/bt-profile/scripts/lib/chrome.mjs +22 -0
- package/skills/bt-profile/scripts/lib/probe.mjs +340 -0
- package/skills/bt-profile/scripts/lib/progress-panel.mjs +371 -0
- package/skills/bt-profile/scripts/lib/symbolize.mjs +356 -0
- package/skills/bt-profile/scripts/package.json +10 -0
- package/skills/bt-profile/scripts/profile.mjs +566 -0
- package/skills/bt-profile/scripts/progress.mjs +516 -0
- package/skills/bt-profile/scripts/report.mjs +803 -0
- package/skills/bt-profile/templates/census.template.mjs +76 -0
- package/skills/bt-profile/templates/scenario.template.mjs +78 -0
- package/skills/bt-prototype/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.69)
|
|
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
|
|
|
@@ -281,6 +281,7 @@ pair or schedule the bridge.
|
|
|
281
281
|
| [`bt-hero`](skills/bt-hero/SKILL.md) | `/bt-hero` | Create smooth cinematic 3D scrolling hero sections. |
|
|
282
282
|
| [`bt-atlas`](skills/bt-atlas/SKILL.md) | `/bt-atlas` | Generate texture atlas skin variations. |
|
|
283
283
|
| [`bt-optimize`](skills/bt-optimize/SKILL.md) | `/bt-optimize` | Make an exported Unity scene run fast in the browser: profile the BabylonJS frame (draw calls per pass, lights, shadows, post-processing, resolution, materials, textures), fix the causes on a copy of the scene — runtime lights, shadows, post, exporter settings, static / lightmap / mirrored unlocks — and merge static meshes and LOD groups (packed lightmap UVs, LOD clusters); then re-bake, export and verify frame rate and look against the original. `--no-combine`, `--combine-only`. |
|
|
284
|
+
| [`bt-profile`](skills/bt-profile/SKILL.md) | `/bt-profile` | Find what makes a web app slow and list the fixes (spec them with `/bt-spec`, or apply them with `--auto-fix`) — built for BabylonJS / Babylon Toolkit games, usable on any front end (give it a URL and the project folder): drive the running game in Chrome through a repeatable scenario (a cold load, a level start, a countdown), record the CPU profile, allocations, every frame and every GPU pipeline compile (with `--gpu-cold`, as on a first visit), map each millisecond to its source line and owner (your code, the toolkit runtime, BabylonJS, Havok, React), then list the fixes, or with `--auto-fix` apply them one at a time and re-measure each. Writes `.agents/profile/<slug>/dashboard.html` (live progress, Print / Download PDF) and a spec-ready `findings.md`. `--auto-fix`, `--snapshots`, `--watch`, `--gpu-cold`, `--stop`, `--resume`, `--restart`, `--project`, `--slug`. |
|
|
284
285
|
|
|
285
286
|
Every tool derives the slash-command from the **folder name** (`bt-spec/` → `/bt-spec`) and reads
|
|
286
287
|
the frontmatter `name` + `description` to decide when the skill applies. The `allowed-tools`
|
|
@@ -445,7 +446,7 @@ Where each tool looks for PROJECT-LOCAL skills (only when the user explicitly re
|
|
|
445
446
|
> for everything else (Codex, Copilot, Gemini CLI, Antigravity). By default use the
|
|
446
447
|
> GLOBAL (per-user home) locations; use the project-local locations only when the user
|
|
447
448
|
> explicitly asks for a project install. Copy **whole folders** into each — the
|
|
448
|
-
> `bt-atlas/scripts/` and `bt-
|
|
449
|
+
> `bt-atlas/scripts/`, `bt-optimize/scripts/` and `bt-profile/scripts/` + `bt-profile/templates/` assets must be present in every location.
|
|
449
450
|
|
|
450
451
|
|
|
451
452
|
# Babylon Toolkit Loop Engineering (Gauntlet Loop)
|
package/package.json
CHANGED
|
@@ -42,6 +42,13 @@ Interpret creatively and make unexpected choices that feel genuinely designed fo
|
|
|
42
42
|
|
|
43
43
|
**CODE QUALITY is not traded for visual ambition.** Every component, style and script follows the Agent Reference's **Coding Practices — ENFORCED**: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names for components, props, state, variables, functions and CSS classes (never one- or two-letter names or obfuscation); well-structured code a human developer can read and maintain; and meaningful JSDoc on every component, hook, function and exported member (always written, but never a reason to fail a test or verification). Elaborate effects are split into well-named components and hooks, not packed into one dense file. Before finishing, re-read every file you created or changed against those rules and fix every violation.
|
|
44
44
|
|
|
45
|
+
**LIVE HUD VALUES are ENFORCED — a beautiful HUD that re-renders every frame is not finished.** Follow the Agent Reference's **Game UI Performance — ENFORCED** and `ui-design-system.md` › **Live HUD Values — ENFORCED** in every HUD, gauge, timer, bar and overlay you design or build:
|
|
46
|
+
- **Classify every HUD value.** *State* changes on discrete events (screens, pause, gear, lap, position, score, health after a hit) and lives in React. *Telemetry* changes every frame (speed, RPM, needles, arcs, timers, boost / health / charge bars, minimap markers) and **never touches React state, props, context, a store or a per-frame EventBus message**.
|
|
47
|
+
- **Render once, then write through refs.** Static furniture (ticks, numerals, bezels, frames, labels) is memoized or static SVG / CSS. One `useFrameLoop` per HUD reads the game (`GameManager.GlobalState`, component getters) and writes only what changed: `textContent` for numbers, `transform` for needles and markers, `scaleX` for bars, `stroke-dashoffset` on a full arc drawn once for rings and sweeps, `opacity` for fades, `classList.toggle` for state styles.
|
|
48
|
+
- **Never per frame:** `width` / `height` / `top` / `left`, `innerHTML`, SVG geometry (`d`, `points`), layout reads, allocations.
|
|
49
|
+
- **Design for it.** Prefer looks that animate with transforms, opacity and dash offsets (rotating needles, scaling fills, sweeping dashes) over looks that need geometry rebuilt every frame.
|
|
50
|
+
- **Before finishing**, search the HUD files for state setters, `dispatch(`, store updates and `EventBus.PostMessage(` inside `requestAnimationFrame`, `useFrameLoop`, render observables and `update()`; any hit is a violation to fix.
|
|
51
|
+
|
|
45
52
|
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
46
53
|
|
|
47
54
|
Remember: You are capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
|
|
@@ -295,19 +295,32 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
295
295
|
let lastP = 0;
|
|
296
296
|
let journeyTop = 0;
|
|
297
297
|
let journeyScroll = 1;
|
|
298
|
+
// Layout is read here, on load and resize — never in the frame loop, where a read after a style write
|
|
299
|
+
// forces a synchronous layout every frame (Agent Reference › Live HUD Values — ENFORCED).
|
|
300
|
+
let journeyHeight = 0;
|
|
301
|
+
let viewportHeight = 0;
|
|
302
|
+
let frameEndY = 0;
|
|
303
|
+
|
|
304
|
+
/** Writes text into an element only when it differs from what is shown. */
|
|
305
|
+
function writeText(element, text) {
|
|
306
|
+
if (element && element.textContent !== text) element.textContent = text;
|
|
307
|
+
}
|
|
298
308
|
let frameRaf = null;
|
|
299
309
|
|
|
300
310
|
function measure() {
|
|
301
311
|
const sTop = isDocScroller ? 0 : scroller.getBoundingClientRect().top;
|
|
302
312
|
journeyTop = journey.getBoundingClientRect().top - sTop + getY();
|
|
303
|
-
|
|
313
|
+
journeyHeight = journey.offsetHeight;
|
|
314
|
+
viewportHeight = viewportH();
|
|
315
|
+
journeyScroll = Math.max(1, journeyHeight - viewportHeight);
|
|
316
|
+
frameEndY = endY();
|
|
304
317
|
}
|
|
305
318
|
|
|
306
319
|
// where PLAY/END consider "the end": journey end (sweep:"hero") or
|
|
307
320
|
// document bottom (sweep:"page")
|
|
308
321
|
const endY = () =>
|
|
309
322
|
CFG.sweep === "hero"
|
|
310
|
-
? journeyTop +
|
|
323
|
+
? journeyTop + journeyHeight - viewportHeight
|
|
311
324
|
: maxY();
|
|
312
325
|
|
|
313
326
|
function frame() {
|
|
@@ -329,25 +342,23 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
329
342
|
lastP = smoothP;
|
|
330
343
|
|
|
331
344
|
if (hud) {
|
|
332
|
-
|
|
345
|
+
writeText(hudValue, String(Math.round(valueAt(smoothP))));
|
|
333
346
|
if (hudProgress)
|
|
334
347
|
hudProgress.style.transform = `scaleX(${smoothP.toFixed(4)})`;
|
|
335
|
-
|
|
336
|
-
hudPct.textContent =
|
|
337
|
-
String(Math.round(smoothP * 100)).padStart(3, "0") + "%";
|
|
348
|
+
writeText(hudPct, String(Math.round(smoothP * 100)).padStart(3, "0") + "%");
|
|
338
349
|
if (hudSeg && TEL && TEL.segments) {
|
|
339
350
|
let seg = TEL.segments[0][1];
|
|
340
351
|
for (const [at, label] of TEL.segments) if (smoothP >= at) seg = label;
|
|
341
|
-
hudSeg
|
|
352
|
+
writeText(hudSeg, seg);
|
|
342
353
|
}
|
|
343
354
|
hud.classList.toggle(
|
|
344
355
|
"hs-hud-off",
|
|
345
|
-
getY() > journeyTop +
|
|
356
|
+
getY() > journeyTop + journeyHeight - viewportHeight * 0.55
|
|
346
357
|
);
|
|
347
358
|
}
|
|
348
359
|
|
|
349
360
|
if (gotoTop) gotoTop.classList.toggle("hs-nav-dim", getY() < 4);
|
|
350
|
-
if (gotoEnd) gotoEnd.classList.toggle("hs-nav-dim", getY() >=
|
|
361
|
+
if (gotoEnd) gotoEnd.classList.toggle("hs-nav-dim", getY() >= frameEndY - 4);
|
|
351
362
|
|
|
352
363
|
for (const o of overlays) styleOverlay(o, smoothP);
|
|
353
364
|
|
|
@@ -509,6 +520,12 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
509
520
|
// (element scroll doesn't bubble to window; capture on document catches it).
|
|
510
521
|
const onResize = () => measure();
|
|
511
522
|
on(window, "resize", onResize);
|
|
523
|
+
// Content that grows after load (images, fonts) changes the page height without a window resize.
|
|
524
|
+
const sizeWatcher = typeof ResizeObserver === "function" ? new ResizeObserver(onResize) : null;
|
|
525
|
+
if (sizeWatcher) {
|
|
526
|
+
sizeWatcher.observe(journey);
|
|
527
|
+
for (const child of (isDocScroller ? document.body : scroller).children) sizeWatcher.observe(child);
|
|
528
|
+
}
|
|
512
529
|
|
|
513
530
|
/* ── go ────────────────────────────────────────────────────────── */
|
|
514
531
|
|
|
@@ -527,6 +544,7 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
527
544
|
timers.clear();
|
|
528
545
|
for (const [target, ev, fn, opts] of bound)
|
|
529
546
|
target.removeEventListener(ev, fn, opts);
|
|
547
|
+
if (sizeWatcher) sizeWatcher.disconnect();
|
|
530
548
|
if (veil.parentNode) veil.parentNode.removeChild(veil);
|
|
531
549
|
if (objectUrl) URL.revokeObjectURL(objectUrl);
|
|
532
550
|
delete document.body.dataset.hsState;
|
|
@@ -48,13 +48,13 @@ Run tasks from a plan: build each one with its tests, have an independent verifi
|
|
|
48
48
|
|
|
49
49
|
Work in **phases**: a `### Phase N` group in the plan, or — if the plan has none — up to 3 consecutive tasks (a `live` task, the `Update SPEC.md` task and the last task each close a group). A single task or `NEXT` is a phase of one. Under `--strict` every task is its own phase.
|
|
50
50
|
|
|
51
|
-
1. **Build** each task in the phase, in order, **following the Agent Reference's Coding Practices — ENFORCED** (clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member — always written, never a reason to fail a task), **with its tests**: the cases the plan's `Tests:` names (or, with none, meaningful cases for its Acceptance and edge cases), in the feature folder's `tests/` (`.agents/specs/<slug>/tests/` — never a root `tests/` folder), using the repo's test runner and style. Get them green — fix the code, not the test, unless the test is wrong. No testable surface (config, docs, assets) → say so. A task with visible output also **saves its progression snapshots** as it builds (*Snapshots tell the story*, below). The implementer keeps the **dashboard current task by task** — the live file at every step, the task's entry at start and the moment it is built — so the user never waits for the phase to end to see progress. Boxes stay unticked.
|
|
51
|
+
1. **Build** each task in the phase, in order, **following the Agent Reference's Coding Practices — ENFORCED** (clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member — always written, never a reason to fail a task), and every HUD or overlay **following Game UI Performance — ENFORCED** (per-frame values reach the screen through refs and one frame loop, never React state, props, a store or a per-frame EventBus message; only changed values written, with cheap properties), **with its tests**: the cases the plan's `Tests:` names (or, with none, meaningful cases for its Acceptance and edge cases), in the feature folder's `tests/` (`.agents/specs/<slug>/tests/` — never a root `tests/` folder), using the repo's test runner and style. Get them green — fix the code, not the test, unless the test is wrong. No testable surface (config, docs, assets) → say so. A task with visible output also **saves its progression snapshots** as it builds (*Snapshots tell the story*, below). The implementer keeps the **dashboard current task by task** — the live file at every step, the task's entry at start and the moment it is built — so the user never waits for the phase to end to see progress. Boxes stay unticked.
|
|
52
52
|
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.
|
|
53
53
|
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 before its commit.
|
|
54
54
|
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)*.
|
|
55
55
|
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), and the next task id — for reference only.
|
|
56
56
|
|
|
57
|
-
**The verifier is told:** *"Confirm each task's Acceptance is genuinely met and run its `Verify` commands against the stated expected output. Re-run the tests and the relevant suite once; check they really cover the Acceptance and named edge cases and could fail — missing or vacuous tests are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled edge cases the plan names, a documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. Check every code file the task created or changed against the Agent Reference's Coding Practices — ENFORCED: clean, professional TypeScript or JavaScript in the language the project already uses (never converted to the other unasked); strict types with no needless `any` in TypeScript; meaningful full-word names for every class, method, property, variable and parameter (one- or two-letter names, cryptic abbreviations and code-golf tricks are violations, except the allowed loop counters, axis/`uv` names and toolkit aliases, and names that bind to exported data); no dead code, unused imports or leftover `console.log`; well-structured code a developer new to the project can read and maintain. Any violation is a FAIL for that task — quote the offending lines. JSDoc is never a FAIL: missing, thin or stale JSDoc (including JavaScript type tags) never fails a test, a verification or an Acceptance item — list it under a separate non-blocking `JSDoc notes` heading. For any task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — check it live in the browser (and Unity where relevant) whether or not the plan marks it `live`, and do the plan's final end-to-end check live: look at the running result, beside the reference image when there is one, and judge it as a user would; passing unit tests never substitute. Do all of a phase's live checks in one session on the already-running dev server, and re-export from Unity only if the phase changed that scene's export — then only the project and the scenes the phase works on. Save the frames from your live session that show each visual task's verified result to `[SNAPSHOTS]` as `T<n>-<NN>-<stage>.png` — the same camera or viewport as the implementer's progression frames, plus any angle or comparison (Unity beside browser, before beside after) that proves the Acceptance — and return each path with a one-line caption saying what it shows. Snapshots never add a page session or an export of their own. Keep the dashboard current as you go: set each task `verifying` when you start checking it, and rewrite the live file at each check (what you are checking, on what) — never 15 minutes without a write. Treat an absolute count in the plan as 'named tests pass, no new failures'. [SCOPE] Return PASS/FAIL per task with evidence, listing records-only slips separately."*
|
|
57
|
+
**The verifier is told:** *"Confirm each task's Acceptance is genuinely met and run its `Verify` commands against the stated expected output. Re-run the tests and the relevant suite once; check they really cover the Acceptance and named edge cases and could fail — missing or vacuous tests are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled edge cases the plan names, a documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. Check every code file the task created or changed against the Agent Reference's Coding Practices — ENFORCED: clean, professional TypeScript or JavaScript in the language the project already uses (never converted to the other unasked); strict types with no needless `any` in TypeScript; meaningful full-word names for every class, method, property, variable and parameter (one- or two-letter names, cryptic abbreviations and code-golf tricks are violations, except the allowed loop counters, axis/`uv` names and toolkit aliases, and names that bind to exported data); no dead code, unused imports or leftover `console.log`; well-structured code a developer new to the project can read and maintain. Any violation is a FAIL for that task — quote the offending lines. Check every HUD, overlay or GUI file the task created or changed against the Agent Reference's Game UI Performance — ENFORCED: a value that changes every frame (speed, RPM, needles, timers, bars, markers) set through React state, props, context or a store, or posted on the EventBus per frame; a state setter, `dispatch(`, store update or `EventBus.PostMessage(` inside `requestAnimationFrame`, a frame-loop hook, a render observable or a component's `update()`; `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry written per frame, or layout read in the loop; a Babylon GUI control assigned every frame without a changed-value check. Any of these is a FAIL for that task — quote the offending lines. JSDoc is never a FAIL: missing, thin or stale JSDoc (including JavaScript type tags) never fails a test, a verification or an Acceptance item — list it under a separate non-blocking `JSDoc notes` heading. For any task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — check it live in the browser (and Unity where relevant) whether or not the plan marks it `live`, and do the plan's final end-to-end check live: look at the running result, beside the reference image when there is one, and judge it as a user would; passing unit tests never substitute. Do all of a phase's live checks in one session on the already-running dev server, and re-export from Unity only if the phase changed that scene's export — then only the project and the scenes the phase works on. Save the frames from your live session that show each visual task's verified result to `[SNAPSHOTS]` as `T<n>-<NN>-<stage>.png` — the same camera or viewport as the implementer's progression frames, plus any angle or comparison (Unity beside browser, before beside after) that proves the Acceptance — and return each path with a one-line caption saying what it shows. Snapshots never add a page session or an export of their own. Keep the dashboard current as you go: set each task `verifying` when you start checking it, and rewrite the live file at each check (what you are checking, on what) — never 15 minutes without a write. Treat an absolute count in the plan as 'named tests pass, no new failures'. [SCOPE] Return PASS/FAIL per task with evidence and one line on what you ran live and where (or `none — tests only`), listing records-only slips separately."*
|
|
58
58
|
|
|
59
59
|
`[SNAPSHOTS]` is the feature folder's `snapshots/` path (`.agents/specs/<slug>/snapshots/`). `[SCOPE]` is one of two sentences. **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, using whatever you judge worthwhile — 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."*
|
|
60
60
|
|
|
@@ -91,13 +91,13 @@ Every feature lives in one folder, created by bt-spec (or by bt-plan for a Quick
|
|
|
91
91
|
3. **Long commands are narrated.** Before any command that may run more than a few minutes (a full test chain, an export or bake, a multi-race or multi-scene browser run), write a step saying what it is and roughly how long it takes; run it in the background where the host allows, and write a step at each milestone its output shows ("race 2 of 4 reached results"). A long run is exactly when the user is watching.
|
|
92
92
|
|
|
93
93
|
- **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`).
|
|
94
|
-
- **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`.
|
|
94
|
+
- **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, 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`.
|
|
95
95
|
- **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":"…"}'` · `activity <feature-folder> "…"` · `status <feature-folder> in-progress` · `check <feature-folder>` (all options in the script's header). 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
96
|
|
|
97
97
|
On top of the per-task updates:
|
|
98
98
|
|
|
99
99
|
- **Run start — the first thing the run does** (*Open the run before anything else*): **refresh `dashboard.html`** — copy it again from the template with `{{slug}}` replaced (it is never edited, so this is always safe, and it is how layout fixes reach dashboards created by older versions); then **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, the first live-file write, and the watchdog launched in the background. 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.
|
|
100
|
-
- **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
|
|
100
|
+
- **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` — the plan's total across **every run so far** (each finished run's `active` from its `⏱ Run <n> end` line, plus this run's so far), never this run alone; an `activity` line; and a current "so far" `outcome` headline.
|
|
101
101
|
- **A deferral:** the task's `status: "deferred"` and `deferredReason`, an `activity` line.
|
|
102
102
|
- **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. Write `afterAction.testing` on every run, not only `--verbose`: run every test suite the plan touched **once more, in full, at run end** and record each as a `suites` entry (name, command, passed, failed, how many tests this plan added, and a `note` for any failure that pre-dates the plan) — never add up the tasks' counts, which re-count the same suite once per task; a `summary` of how the plan was tested (unit tests, the verifier's re-runs, what was checked live and on what, the end-to-end check); and `gaps` — what no test or live check covers. The page builds the task-by-task table and the list of test cases from the tasks. 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.
|
|
103
103
|
- **`--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:
|
|
@@ -299,10 +299,12 @@
|
|
|
299
299
|
.stat-sub { margin-top: 4px; font-size: 12.5px; color: var(--text-muted); }
|
|
300
300
|
|
|
301
301
|
/* ---------- Phase route ---------- */
|
|
302
|
-
.route { display: flex; gap:
|
|
302
|
+
.route { display: flex; gap: 10px; margin-top: 16px; }
|
|
303
303
|
.route a {
|
|
304
304
|
flex: 1;
|
|
305
305
|
min-width: 0;
|
|
306
|
+
display: flex;
|
|
307
|
+
flex-direction: column;
|
|
306
308
|
text-decoration: none;
|
|
307
309
|
color: inherit;
|
|
308
310
|
}
|
|
@@ -310,11 +312,30 @@
|
|
|
310
312
|
.route-fill { height: 100%; border-radius: 999px; background: var(--done); }
|
|
311
313
|
.route a.is-in-progress .route-fill { background: var(--active); }
|
|
312
314
|
.route a.is-deferred .route-fill, .route a.is-partial .route-fill { background: var(--deferred); }
|
|
315
|
+
/* Each name sits on a panel as wide as its bar; every panel is the row's height, sized for two lines. */
|
|
313
316
|
.route-label {
|
|
317
|
+
flex: 1;
|
|
314
318
|
margin-top: 7px;
|
|
319
|
+
padding: 7px 9px;
|
|
320
|
+
min-height: calc(2 * 1.3em + 14px);
|
|
321
|
+
border: 1px solid var(--line);
|
|
322
|
+
border-radius: var(--radius-small);
|
|
323
|
+
background: var(--bg-raised);
|
|
315
324
|
font: 500 11.5px/1.3 var(--font-mono);
|
|
316
325
|
color: var(--text-muted);
|
|
326
|
+
transition: border-color 0.15s, color 0.15s;
|
|
327
|
+
}
|
|
328
|
+
/* At most two lines, so one long phase name never stretches the row; the full name is the tooltip. */
|
|
329
|
+
.route-name {
|
|
330
|
+
display: -webkit-box;
|
|
331
|
+
-webkit-box-orient: vertical;
|
|
332
|
+
-webkit-line-clamp: 2;
|
|
333
|
+
line-clamp: 2;
|
|
334
|
+
overflow: hidden;
|
|
335
|
+
overflow-wrap: anywhere;
|
|
317
336
|
}
|
|
337
|
+
.route a:hover .route-label { border-color: var(--line-strong); color: var(--text); }
|
|
338
|
+
.route a.is-in-progress .route-label { border-color: color-mix(in srgb, var(--active) 45%, transparent); background: var(--active-soft); color: var(--text); }
|
|
318
339
|
|
|
319
340
|
/* ---------- Summary ---------- */
|
|
320
341
|
.headline { margin: 0 0 12px; font-size: 21px; line-height: 1.35; letter-spacing: -0.01em; }
|
|
@@ -802,6 +823,8 @@
|
|
|
802
823
|
const VERDICT_BADGE_MAX_LENGTH = 16;
|
|
803
824
|
// The report's task-by-task testing table starts open for a short plan and folded for a long one.
|
|
804
825
|
const TESTING_TABLE_OPEN_ROWS = 12;
|
|
826
|
+
// A verifier result that names a live check: "live two-tab race in headless Chrome", "end-to-end on WebGPU".
|
|
827
|
+
const LIVE_CHECK_WORDS = /\blive\b|chrome|browser|webgl|webgpu|unity editor|play ?mode/i;
|
|
805
828
|
/** Where the Babylon Toolkit Desktop Agent, whose skills generate this dashboard, is published. */
|
|
806
829
|
const SKILLS_DOWNLOAD_URL = 'https://www.npmjs.com/package/@babylonjs-toolkit/agent';
|
|
807
830
|
/** Minutes without a live update before the Now banner warns that the run has gone quiet. */
|
|
@@ -863,7 +886,7 @@
|
|
|
863
886
|
|
|
864
887
|
const view = pageView();
|
|
865
888
|
// Stat tiles and phase bars first; then one slot that follows the run: Current run activity while it runs,
|
|
866
|
-
// the plan summary (After Action Report) once it is over.
|
|
889
|
+
// the Final plan summary (the After Action Report) once it is over.
|
|
867
890
|
appRoot.innerHTML = [
|
|
868
891
|
renderMasthead(feature, allTasks.length, doneCount),
|
|
869
892
|
renderNav(allUpdates.length, view),
|
|
@@ -923,7 +946,7 @@
|
|
|
923
946
|
function renderNav(updateCount, view) {
|
|
924
947
|
const links = [
|
|
925
948
|
view === 'running' ? ['current-activity', 'Current run'] : null,
|
|
926
|
-
view === 'finished' ? ['after-action', '
|
|
949
|
+
view === 'finished' ? ['after-action', 'Summary'] : null,
|
|
927
950
|
['phases', 'Phases'],
|
|
928
951
|
['decisions', 'Decisions'],
|
|
929
952
|
['follow-ups', 'Follow ups'],
|
|
@@ -938,19 +961,20 @@
|
|
|
938
961
|
const phases = report.phases || [];
|
|
939
962
|
const donePhases = phases.filter((phase) => phase.status === 'done').length;
|
|
940
963
|
const deferredCount = allTasks.filter((task) => task.status === 'deferred' || task.status === 'failed').length;
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
|
|
964
|
+
// The final suites are the true count; each task reports the whole suite it ran, so a sum of tasks over-counts.
|
|
965
|
+
const suites = finalSuites();
|
|
966
|
+
const testsTile = suites.length
|
|
967
|
+
? statTile('Tests', `${suites.reduce((total, suite) => total + (Number(suite.passed) || 0), 0)}<small> passed</small>`, sumFailed(suites) ? `${sumFailed(suites)} failing` : 'final suites, all green')
|
|
968
|
+
: statTile('Tests', `${allTasks.filter(hasTests).length}<small> / ${allTasks.length}</small>`, 'tasks with tests');
|
|
969
|
+
const activeTime = shortDuration(report.activeTime);
|
|
970
|
+
const estimate = shortEstimate(report.estimate);
|
|
948
971
|
|
|
949
972
|
const tiles = [
|
|
950
973
|
statTile('Tasks', `${doneCount}<small> / ${allTasks.length}</small>`, 'verified and ticked'),
|
|
951
974
|
statTile('Phases', `${donePhases}<small> / ${phases.length}</small>`, 'independently verified'),
|
|
952
|
-
|
|
953
|
-
statTile('Active time',
|
|
975
|
+
testsTile,
|
|
976
|
+
statTile('Active time', activeTime ? durationHtml(activeTime) : '—', estimate ? `of ${/[–-]/.test(estimate) ? '' : '~'}${escapeHtml(estimate)} estimated` : 'no estimate',
|
|
977
|
+
[report.activeTime, report.estimate && `Estimate: ${report.estimate}`].filter(Boolean).join('\n')),
|
|
954
978
|
statTile('Deferred', String(deferredCount), deferredCount ? 'see Follow ups' : 'nothing deferred'),
|
|
955
979
|
statTile('Runs', String(report.runs || 0), 'bt-execute runs so far'),
|
|
956
980
|
].join('');
|
|
@@ -962,15 +986,52 @@
|
|
|
962
986
|
const fill = tasks.length ? Math.round(((finished + awaitingVerifier / 2) / tasks.length) * 100) : 0;
|
|
963
987
|
return `<a href="#phase-${escapeAttribute(phase.number)}" class="is-${escapeAttribute(phase.status || 'pending')}" title="Phase ${escapeAttribute(phase.number)} — ${escapeAttribute(phase.name || '')}">
|
|
964
988
|
<div class="route-bar"><div class="route-fill" style="width:${fill}%"></div></div>
|
|
965
|
-
<div class="route-label">P${escapeHtml(phase.number)} · ${escapeHtml(phase.name || '')}</div>
|
|
989
|
+
<div class="route-label"><span class="route-name">P${escapeHtml(phase.number)} · ${escapeHtml(phase.name || '')}</span></div>
|
|
966
990
|
</a>`;
|
|
967
991
|
}).join('');
|
|
968
992
|
|
|
969
993
|
return `<div class="stats">${tiles}</div>${route ? `<nav class="route" aria-label="Phase progress">${route}</nav>` : ''}`;
|
|
970
994
|
}
|
|
971
995
|
|
|
972
|
-
function statTile(label, valueHtml, subText) {
|
|
973
|
-
return `<div class="card stat"><div class="stat-label">${label}</div><div class="stat-value">${valueHtml}</div><div class="stat-sub">${subText}</div></div>`;
|
|
996
|
+
function statTile(label, valueHtml, subText, title = '') {
|
|
997
|
+
return `<div class="card stat"${title ? ` title="${escapeAttribute(title)}"` : ''}><div class="stat-label">${label}</div><div class="stat-value">${valueHtml}</div><div class="stat-sub">${subText}</div></div>`;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* The first duration in a time note — "5 h 54 min (run 5); earlier runs in the run log" → { hours: 5, minutes: 54 }.
|
|
1002
|
+
* The data holds whatever the run log said; the card shows only the time, the full note is its tooltip.
|
|
1003
|
+
*/
|
|
1004
|
+
function shortDuration(text) {
|
|
1005
|
+
const match = /(?:(\d+(?:\.\d+)?)\s*h(?:ours?)?\b)?\s*(?:(\d+)\s*min)?/i;
|
|
1006
|
+
for (const candidate of String(text || '').matchAll(new RegExp(match.source, 'gi'))) {
|
|
1007
|
+
if (candidate[1] || candidate[2]) {
|
|
1008
|
+
const total = Math.round(Number(candidate[1] || 0) * 60) + Number(candidate[2] || 0);
|
|
1009
|
+
return { hours: Math.floor(total / 60), minutes: total % 60 };
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
return null;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
function durationText({ hours, minutes }) {
|
|
1016
|
+
return hours ? `${hours} h${minutes ? ` ${minutes} min` : ''}` : `${minutes} min`;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
function durationHtml({ hours, minutes }) {
|
|
1020
|
+
if (!hours) return `${minutes}<small> min</small>`;
|
|
1021
|
+
return `${hours}<small> h</small>${minutes ? ` ${minutes}<small> min</small>` : ''}`;
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
/**
|
|
1025
|
+
* The headline figure of an estimate note: "about 944 min ≈ 15.7 h of agent time (range …)" → "15.7 h";
|
|
1026
|
+
* "3–6 h" stays a range. Brackets are detail; after a "≈" comes the rounded figure.
|
|
1027
|
+
*/
|
|
1028
|
+
function shortEstimate(text) {
|
|
1029
|
+
let main = String(text || '').split('(')[0];
|
|
1030
|
+
if (main.includes('≈')) main = main.slice(main.lastIndexOf('≈') + 1);
|
|
1031
|
+
const hours = /(\d+(?:\.\d+)?(?:\s*[–-]\s*\d+(?:\.\d+)?)?)\s*h\b/i.exec(main);
|
|
1032
|
+
if (hours) return `${hours[1].replace(/\s+/g, '')} h`;
|
|
1033
|
+
const duration = shortDuration(main);
|
|
1034
|
+
return duration ? `${duration.hours ? `${duration.hours} h ` : ''}${duration.minutes ? `${duration.minutes} min` : ''}`.trim() : '';
|
|
974
1035
|
}
|
|
975
1036
|
|
|
976
1037
|
/**
|
|
@@ -1011,7 +1072,7 @@
|
|
|
1011
1072
|
}
|
|
1012
1073
|
return `
|
|
1013
1074
|
<section id="after-action">
|
|
1014
|
-
<div class="section-head"><h2>
|
|
1075
|
+
<div class="section-head"><h2>Final plan summary</h2><span class="section-note">The whole plan's execution, start to finish</span></div>
|
|
1015
1076
|
${body}
|
|
1016
1077
|
</section>`;
|
|
1017
1078
|
}
|
|
@@ -1033,8 +1094,8 @@
|
|
|
1033
1094
|
testsFigure,
|
|
1034
1095
|
['Needed a second attempt', String(retried)],
|
|
1035
1096
|
['Deferred', String(deferred)],
|
|
1036
|
-
['Active time', report.activeTime
|
|
1037
|
-
['Estimate', report.estimate || '—'],
|
|
1097
|
+
['Active time', shortDuration(report.activeTime) ? durationText(shortDuration(report.activeTime)) : '—'],
|
|
1098
|
+
['Estimate', shortEstimate(report.estimate) || '—'],
|
|
1038
1099
|
['Runs', String(report.runs || 0)],
|
|
1039
1100
|
];
|
|
1040
1101
|
return `<dl class="figures">${rows.map(([label, value]) => `<div><dt>${label}</dt><dd>${escapeHtml(value)}</dd></div>`).join('')}</dl>`;
|
|
@@ -1097,7 +1158,7 @@
|
|
|
1097
1158
|
const tags = [
|
|
1098
1159
|
snapshotBadge(task.snapshots),
|
|
1099
1160
|
task.kind ?`<span class="tag">${escapeHtml(task.kind)}</span>` : '',
|
|
1100
|
-
task
|
|
1161
|
+
hasLiveCheck(task) ? `<span class="tag" title="${escapeAttribute(liveCheckNote(task))}">live check</span>` : '',
|
|
1101
1162
|
task.attempts > 1 ? `<span class="tag">${escapeHtml(task.attempts)} attempts</span>` : '',
|
|
1102
1163
|
status === 'built' || status === 'verifying' ? `<span class="status status-${status}">${STATUS_LABELS[status]}</span>` : '',
|
|
1103
1164
|
updatedBadge(task.updates),
|
|
@@ -1240,8 +1301,22 @@
|
|
|
1240
1301
|
return Boolean(task.tests && (Number(task.tests.passed) || Number(task.tests.failed)));
|
|
1241
1302
|
}
|
|
1242
1303
|
|
|
1304
|
+
/**
|
|
1305
|
+
* Whether the task was checked by running the real thing. The plan's `verifyLevel` is only the intent — a
|
|
1306
|
+
* verifier often checks a `standard` task live too — so the record of the check counts as well: the
|
|
1307
|
+
* `checkedLive` note, a verbose `liveCheck`, a verifier result that names a live check, or a snapshot
|
|
1308
|
+
* captured in the browser or Unity.
|
|
1309
|
+
*/
|
|
1243
1310
|
function hasLiveCheck(task) {
|
|
1244
|
-
return task.verifyLevel === 'live'
|
|
1311
|
+
return task.verifyLevel === 'live'
|
|
1312
|
+
|| Boolean(task.checkedLive || (task.details && task.details.liveCheck))
|
|
1313
|
+
|| LIVE_CHECK_WORDS.test(task.verifier || '')
|
|
1314
|
+
|| (task.snapshots || []).some((snapshot) => ['browser', 'unity'].includes(snapshot.source));
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
function liveCheckNote(task) {
|
|
1318
|
+
return task.checkedLive || (task.details && task.details.liveCheck) || (LIVE_CHECK_WORDS.test(task.verifier || '') ? task.verifier : '')
|
|
1319
|
+
|| ((task.snapshots || []).length ? 'Snapshots captured from the running result' : 'Checked live');
|
|
1245
1320
|
}
|
|
1246
1321
|
|
|
1247
1322
|
function testCasesOf(task) {
|
|
@@ -1285,7 +1360,7 @@
|
|
|
1285
1360
|
: `<span class="cell-note" title="${escapeAttribute(tests.note || '')}">${tests.note ? escapeHtml(tests.note) : '—'}</span>`,
|
|
1286
1361
|
(tests.files || []).length ? tests.files.map((file) => `<code>${escapeHtml(file)}</code>`).join('<br>') : '—',
|
|
1287
1362
|
cases.length ? `${cases.length}${casesFailed ? `<div class="count count-fail">${casesFailed} failed</div>` : ''}` : '—',
|
|
1288
|
-
hasLiveCheck(task) ? `<span title="${escapeAttribute((task
|
|
1363
|
+
hasLiveCheck(task) ? `<span title="${escapeAttribute(liveCheckNote(task))}">Yes</span>` : '—',
|
|
1289
1364
|
];
|
|
1290
1365
|
}));
|
|
1291
1366
|
|
|
@@ -77,7 +77,7 @@ instead of a blank page if something still cannot render — it keeps checking a
|
|
|
77
77
|
- A task added to the plan after it was complete is added here as `pending`, in plan order, with an `updates`
|
|
78
78
|
note saying why — and `complete` becomes `paused`.
|
|
79
79
|
- The status picks the page's top slot: `in-progress` shows *Current run activity* (the live file and the
|
|
80
|
-
milestones); `paused`, `complete` and `incomplete` show *
|
|
80
|
+
milestones); `paused`, `complete` and `incomplete` show *Final plan summary* (the After Action Report, marked
|
|
81
81
|
*Interim* while paused).
|
|
82
82
|
- **Cadence is per task.** A task's entry changes the moment it starts (`in-progress`), the moment it is built
|
|
83
83
|
(`built` — summary, files, tests and snapshots filled in right then), while the verifier checks it
|
|
@@ -95,8 +95,8 @@ Top level:
|
|
|
95
95
|
| `status` | see *Status* |
|
|
96
96
|
| `detail` | `"normal"`, or `"verbose"` once any run used `bt-execute --verbose` (never set back) |
|
|
97
97
|
| `updatedAt` | last write, `"YYYY-MM-DD HH:MM"` |
|
|
98
|
-
| `estimate` | the plan's Total
|
|
99
|
-
| `activeTime` |
|
|
98
|
+
| `estimate` | the plan's Total, short: `"3–6 h"` or `"about 7 h"` — the card shows its hours; keep ranges and working-out in the plan |
|
|
99
|
+
| `activeTime` | the plan's total active time across **every run so far** — each run's `active` from its `⏱ Run <n> end` line, added up — as the duration only: `"14 h 10 min"`, no notes. The card shows it beside the estimate, so one run's time alone understates the plan |
|
|
100
100
|
| `runs` | number of bt-execute runs so far |
|
|
101
101
|
| `afterAction` | the After Action Report (below) |
|
|
102
102
|
| `phases` | the plan's phases, each with its tasks (below) |
|
|
@@ -154,6 +154,7 @@ Each task:
|
|
|
154
154
|
| `files` | paths changed |
|
|
155
155
|
| `tests` | `{ "passed", "failed", "files": [".agents/specs/<slug>/tests/…"], "note" }` or `null` |
|
|
156
156
|
| `verifier` | `"PASS — independent subagent; live check in Chrome"` |
|
|
157
|
+
| `checkedLive` | every run, not only `--verbose`: one line on what the verifier ran live and where — `"two-tab Shared race in headless Chrome, 150 ms lag"`; `""` when it was proven by tests alone. The page's *live check* badge and column read it (a task the plan marked `live` always counts) |
|
|
157
158
|
| `attempts`, `commit`, `doneAt` | as recorded |
|
|
158
159
|
| `deferredReason` | why it was deferred, if it was |
|
|
159
160
|
| `decisions` | `"DECISION T1: … — source"` lines |
|
|
@@ -101,6 +101,7 @@ threshold AND every gate passes.**
|
|
|
101
101
|
| **Console** | any error in the browser console (warnings are reported, not fatal, unless the card says otherwise) |
|
|
102
102
|
| **Component authority** | a protected `TOOLKIT.*` component was reimplemented, bypassed or deleted without the full replacement-evidence checklist in the round journal |
|
|
103
103
|
| **Coding practices** | any code the round created or changed breaks the Agent Reference's **Coding Practices — ENFORCED**: TypeScript or JavaScript that is not clean and professional (needless `any` or loose typing, code converted to the other language unasked), one- or two-letter or obfuscated names (outside the allowed loop counters, axis/`uv` names, toolkit aliases and names that bind to exported data), dead code or leftover `console.log`, or code a developer new to the project could not read and maintain. **JSDoc never fails this gate**: list missing or thin JSDoc as a low-priority entry in the gap list. Quote the offending lines |
|
|
104
|
+
| **Game UI performance** | any HUD, overlay or GUI the round created or changed breaks the Agent Reference's **Game UI Performance — ENFORCED**: a per-frame value (speed, RPM, needles, timers, bars, markers) set through React state, props, context or a store, or posted on the EventBus per frame; a state setter, `dispatch(` or `EventBus.PostMessage(` inside `requestAnimationFrame`, a frame-loop hook, a render observable or `update()`; `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry written per frame or layout read in the loop; a Babylon GUI control assigned every frame without a changed-value check. Quote the offending lines |
|
|
104
105
|
| **Camera lock** | the evidence was not captured from the transform recorded in `cameras.md` |
|
|
105
106
|
| **Pipeline gate** | whatever the deliverable kind's pipeline reference declares (export-boundary integrity, GUID survival, licence tier …) |
|
|
106
107
|
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -52,7 +52,7 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
|
|
|
52
52
|
7. **Minimal exports.** A task's Steps re-export only the Unity project the task tests and only the scenes it works on, and only when the change alters that scene's export. Never write "re-export every scene" or "re-export all projects" for consistency — other scenes pick the change up at their next natural export. Name the scenes explicitly.
|
|
53
53
|
8. **No ceremony.** No standalone "verification sweep / open the review / final check" tasks, and no ledgers, md5 or environment records, archives, checked-in capture trees, standing evidence suites, doc-integrity registration or staged promotions — unless the brief asks.
|
|
54
54
|
9. **No brittle pins.** Never pin counts later tasks will change (tests passed, suite sizes, hashes). Say "the named tests pass, no new failures versus the baseline".
|
|
55
|
-
10. **Plan code follows the Agent Reference's Coding Practices — ENFORCED.** Every snippet, signature, interface, class, method, property, variable, constant and file name the plan writes or decides is clean, professional TypeScript or JavaScript in the language the project uses (never switched unasked), with meaningful full-word names (never one- or two-letter names, cryptic abbreviations or code-golf tricks), well structured, readable and maintainable by human developers, and carries meaningful JSDoc on every class, function, method, interface and public member it defines. JSDoc is always written but never a gate: never write an Acceptance item, Test or Verify step that fails on missing JSDoc. The executor copies plan code word for word, so a badly named snippet ships badly named. Names that bind to exported data (component properties, serialized fields, Unity property names) keep the source's names. Code-quality checks are never a separate task; bt-execute's verifier enforces them on every task.
|
|
55
|
+
10. **Plan code follows the Agent Reference's Coding Practices — ENFORCED.** Every snippet, signature, interface, class, method, property, variable, constant and file name the plan writes or decides is clean, professional TypeScript or JavaScript in the language the project uses (never switched unasked), with meaningful full-word names (never one- or two-letter names, cryptic abbreviations or code-golf tricks), well structured, readable and maintainable by human developers, and carries meaningful JSDoc on every class, function, method, interface and public member it defines. JSDoc is always written but never a gate: never write an Acceptance item, Test or Verify step that fails on missing JSDoc. The executor copies plan code word for word, so a badly named snippet ships badly named. Names that bind to exported data (component properties, serialized fields, Unity property names) keep the source's names. Plan UI code also follows **Game UI Performance — ENFORCED**: every HUD value the plan introduces is classified as *state* (React, set on events) or *telemetry* (refs and one frame loop, never React state or a per-frame EventBus message), and the plan's snippets show telemetry that way. Code-quality checks are never a separate task; bt-execute's verifier enforces them on every task.
|
|
56
56
|
|
|
57
57
|
## Step 3. Write the plan
|
|
58
58
|
|