@babylonjs-toolkit/agent 1.1.84 → 1.1.86
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 +2 -2
- package/package.json +1 -1
- package/skills/bt-convert/SKILL.md +2 -1
- package/skills/bt-copycat/SKILL.md +2 -2
- package/skills/bt-design/SKILL.md +6 -2
- package/skills/bt-design/references/3d-hero-scroll.md +9 -0
- package/skills/bt-design/templates/3d-hero-scroll/hero-scroll.css +4 -2
- package/skills/bt-design/templates/3d-hero-scroll/hero-scroll.js +32 -5
- package/skills/bt-execute/SKILL.md +3 -3
- package/skills/bt-execute/templates/dashboard/dashboard.html +2 -2
- package/skills/bt-gauntlet/references/critic-rubrics.md +1 -1
- package/skills/bt-hero/SKILL.md +2 -2
- package/skills/bt-landing/SKILL.md +9 -1
- package/skills/bt-plan/SKILL.md +5 -5
- package/skills/bt-profile/SKILL.md +3 -2
- package/skills/bt-prototype/SKILL.md +1 -1
- package/skills/bt-recon/SKILL.md +2 -2
- package/skills/bt-spec/SKILL.md +4 -4
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.86)
|
|
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
|
|
|
@@ -331,7 +331,7 @@ activity logs at the bottom. The After Action Report is the whole plan's executi
|
|
|
331
331
|
was built, how it was proven, what surprised, the run's figures — around **one before/after for the
|
|
332
332
|
plan as a whole**, taken from the same camera before the first task and after the last — and a
|
|
333
333
|
**Testing and verification** section: each test suite's final result from one last full run, what is
|
|
334
|
-
not covered, and every task's tests, test cases, live check and verifier result. Every project keeps
|
|
334
|
+
not covered, and every task's tests, test cases, live check and verifier result. Every project keeps five default `.agents` folders, created together the first time any of them is needed and kept with a `.gitkeep` even while empty: `specs/` (the features being worked on), `complete/` (move a feature's whole folder here when its plan is done — the small set of finished work under active review), `archived/` (the long-running store of older completed work, moved on from `complete/` when you see fit), `profile/` and `recon/`. The agent never moves a feature folder; a feature missing from `specs/` is never treated as an error, a reopened plan runs from wherever its folder is, and a new slug never reuses one in any of the three. Recon docs
|
|
335
335
|
stay in `.agents/recon/`; older flat specs and plans in `.agents/specs/` keep working where they are.
|
|
336
336
|
|
|
337
337
|
Add `--verbose` to `bt-execute` for a fully written-up dashboard: every task card gains its approach
|
package/package.json
CHANGED
|
@@ -10,7 +10,8 @@ Your goal is to convert source code to Babylon Toolkit based TypeScript or JavaS
|
|
|
10
10
|
* If an interface is only referenced (not defined in the source code being converted), do **not** generate the interface, just reference it
|
|
11
11
|
* Follow the Agent Reference's **Coding Practices — ENFORCED** in every converted file: 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, but never a reason to fail a test or verification). Carry the source's doc comments (C# `///` XML docs and the like) across as JSDoc, and write meaningful JSDoc where the source has none
|
|
12
12
|
* Keep the source's public and serialized names (classes, methods, properties, fields) in camelCase, because exported Unity metadata binds to them by name. Give meaningful names to every local, parameter and helper the conversion introduces, and rename obfuscated or minified locals in the source to meaningful names
|
|
13
|
-
*
|
|
13
|
+
* Follow the Agent Reference's **Game UI Performance — ENFORCED** when the source updates UI. Unity scripts routinely write `Text.text`, `TMP_Text.text`, `Slider.value`, `Image.fillAmount` or a needle's rotation in `Update()` every frame, and other engines do the same in their render loop. Do not convert that cadence as-is: telemetry (speed, timers, bars, needles) is written only when its quantized shown value changes — through refs and one frame loop in a DOM HUD, or a changed-value check on a `@babylonjs/gui` control / `TOOLKIT.UserInterface.SetText` / `SetValue`; discrete values (score, ammo, lap) are set from the event that changed them; readouts nobody reads at 60 Hz are throttled; nothing is updated while hidden. Converted HUD code never pushes per-frame values through React state or posts them on the `EventBus` every frame (`ui-design-system.md` › **Live HUD Values — ENFORCED** and **Per frame or not**)
|
|
14
|
+
* Before finishing, re-read every converted file against the Coding Practices and Game UI Performance rules and fix every violation
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -148,7 +148,7 @@ Instruct bt-design to:
|
|
|
148
148
|
|
|
149
149
|
- Match the blueprint's mechanics and timing **exactly** — this is a fidelity job, not a fresh design. Where bt-design would normally improvise, here it executes the blueprint.
|
|
150
150
|
- Generate the re-imagined video/image/3D assets (image & video generation) to fill the asset manifest under the new theme — as beautiful and cinematic as the original's.
|
|
151
|
-
- Reproduce the load choreography, scroll behavior, and micro-interactions from the motion table.
|
|
151
|
+
- Reproduce the load choreography, scroll behavior, and micro-interactions from the motion table — **with the Agent Reference's Game UI Performance — ENFORCED cadence, even where the original wastes frames.** Load reveals, staggers, hovers, pulses and enter / exit motion are CSS `@keyframes` / `transition` on `transform` and `opacity`, never a JavaScript frame loop. Only genuinely scroll- or time-driven motion (a scrub hero, a WebGL scene, scroll-linked parallax) runs per frame, and it writes nothing while the scroll is at rest, pauses off-screen (`IntersectionObserver`) and in a background tab, never animates `width` / `height` / `top` / `left`, and never reads layout in the loop. Copy the original's *feel*, not its per-frame cost (`ui-design-system.md` › **Per frame or not**).
|
|
152
152
|
- **Reproduce the audio model from the blueprint** — if the original has sound, rebuild the equivalent behavior (ambient bed, interaction/scroll SFX, mute toggle, autoplay-gating on first user gesture per browser policy) and generate re-imagined audio assets that match the new theme. If the original is silent, do not add audio unless the brief asks for it.
|
|
153
153
|
|
|
154
154
|
**Enforced build mandate (always apply):**
|
|
@@ -168,7 +168,7 @@ A copycat that "feels off" has failed. Before declaring done, verify the rebuild
|
|
|
168
168
|
|
|
169
169
|
- Open the rebuilt site in the browser and capture the **same scroll-depth storyboard** you captured in Phase 1. Compare side by side against the blueprint — does each beat land at the same scroll position with the same motion?
|
|
170
170
|
- Check the load sequence, easings, and stagger match the motion table.
|
|
171
|
-
- Confirm nothing is janky: smooth scrubbing, no layout shift, motion holds 60fps where the original does.
|
|
171
|
+
- Confirm nothing is janky: smooth scrubbing, no layout shift, motion holds 60fps where the original does. Record a short performance trace with the page at rest after load: with nothing scrolling and nothing hovered, the main thread is idle — no frame loop doing work, no style or layout recalculation each frame.
|
|
172
172
|
- Confirm the audio behavior matches the blueprint: if the original had sound, ours has the equivalent ambient bed / SFX, a working mute toggle, and correct autoplay-gating; if the original was silent, ours is too (unless the brief asked otherwise).
|
|
173
173
|
- Confirm the *skin* fully reads as the new brief, not a recolor of the original's content.
|
|
174
174
|
|
|
@@ -32,7 +32,7 @@ Then implement working code (HTML/CSS/JS, React, Vue, etc.) that is:
|
|
|
32
32
|
Focus on:
|
|
33
33
|
- **Typography**: Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
|
|
34
34
|
- **Color & Theme**: Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
|
|
35
|
-
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions
|
|
35
|
+
- **Motion**: Use animations for effects and micro-interactions. Prioritize CSS-only solutions — `@keyframes` and `transition` on `transform` and `opacity`, which run on the compositor and stay smooth while the game loads or plays. Use Motion library for React when available, for enter / exit and layout transitions, never as a per-frame driver of game values. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
|
|
36
36
|
- **Spatial Composition**: Default to **full-bleed, full-viewport layouts that stay fully responsive down to mobile** — edge-to-edge like a console dashboard, with UI anchored to the viewport edges rather than trapped in a centered fixed-width column (see *Layout Philosophy* below). Within that full canvas: unexpected layouts, asymmetry, overlap, diagonal flow, grid-breaking elements, generous negative space OR controlled density.
|
|
37
37
|
- **Backgrounds & Visual Details**: Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
|
|
38
38
|
|
|
@@ -47,7 +47,10 @@ Interpret creatively and make unexpected choices that feel genuinely designed fo
|
|
|
47
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
48
|
- **Never per frame:** `width` / `height` / `top` / `left`, `innerHTML`, SVG geometry (`d`, `points`), layout reads, allocations.
|
|
49
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
|
-
- **
|
|
50
|
+
- **Per frame only when it must be — pick the cheapest cadence for every element** (`ui-design-system.md` › **Per frame or not**): *events* for state (set only when the value changed); *CSS* for decorative motion and fixed transitions (pulses, glows, particles, scanlines, hover, modal / toast enter and exit, a bar easing after a hit); *the frame loop* only for telemetry the player watches track the game; *throttled* (a few hertz in the same loop) for FPS, distance, standings and distant minimap markers; *nothing* for what is not on screen — a HUD behind a modal, a paused game, an off-screen canvas.
|
|
51
|
+
- **No frame loop on menus, pause / settings / results screens, the splash, the preloader or the landing page.** Their motion is CSS. The one exception is a real-time 3D, canvas or scroll-scrubbed hero, which pauses off-screen (`IntersectionObserver`, `visibilitychange`), writes nothing while the scroll is at rest, and honors `prefers-reduced-motion`.
|
|
52
|
+
- **A property the frame loop writes has no CSS `transition`** — it restarts every frame and lags the game. Smooth in the loop.
|
|
53
|
+
- **Before finishing**, search the HUD files for state setters, `dispatch(`, store updates and unguarded `EventBus.PostMessage(` inside `requestAnimationFrame`, `useFrameLoop`, render observables and `update()` / `late()` / `after()`, and search every menu, splash, preloader and landing-page file for `requestAnimationFrame`, `useFrameLoop`, `setInterval` and animation-library ticks; any hit is a violation to fix.
|
|
51
54
|
|
|
52
55
|
**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.
|
|
53
56
|
|
|
@@ -62,6 +65,7 @@ The most common failure in generated game chrome: the splash / loading screen is
|
|
|
62
65
|
Treat every loading surface (preloader, splash, initial overlay) as a **designed scene in the game's world**, not a utility screen:
|
|
63
66
|
|
|
64
67
|
- **Invent a progress metaphor native to THIS game.** A racer: track start-lights counting down, a fuel gauge filling, a speedometer needle sweeping to redline. A platformer: the level assembling tile by tile. A space game: a warp drive charging, a star map resolving. A dungeon crawler: torches igniting one by one down a corridor. The progress percentage should *drive the scene* — not sit under it as a bare bar.
|
|
68
|
+
- **Animate the splash on the compositor, not the main thread (ENFORCED).** Every bit of splash and preloader atmosphere — particles, parallax, scanlines, pulses, a needle sweeping, tiles assembling — is CSS `@keyframes` / `transition` on `transform` and `opacity`, never a `requestAnimationFrame` loop, a `useFrameLoop` or React state ticking per frame. The scene build holds the main thread in slices; compositor animations keep playing through them, JavaScript-driven ones stutter exactly when the load is heaviest and slow the load down. Progress is an event: keep it in state as the whole percent shown (so React skips identical updates) and draw bars with `scaleX`, never `width`. If the design truly needs a canvas effect, keep it small, draw it in a worker with `OffscreenCanvas` where the browser supports it, and stop it the moment the splash hides.
|
|
65
69
|
- **Bring the full aesthetic direction with you.** The splash uses the same typography, palette, motion language, and atmosphere as the landing page and HUD — it is the first screen of the experience, often seen for several seconds, and it sets the tone. Full-bleed, edge-to-edge, like everything else (see *Layout Philosophy*).
|
|
66
70
|
- **Design the wait itself.** Staggered reveals, ambient motion (drifting particles, scanlines, parallax layers, animated environment art), rotating flavor text/lore/tips in the game's voice, a bold wordmark treatment for the game's own title. The player should *want* to watch it load.
|
|
67
71
|
- **The default's anatomy is a placeholder, not a seed.** Centered-logo-plus-spinner, a thin bar at the bottom, a percentage in a corner — if the result still reads as "the stock loader, restyled," start over from the game's fantasy instead. NO stock spinner, NO engine/toolkit branding, nothing carried over from the default splash except the wiring the host platform requires (progress subscription, mount points, re-exports — keep the MECHANICS, replace ALL of the look, layout, and behavior of the visuals).
|
|
@@ -294,3 +294,12 @@ overlays, and the fixed chrome. Apply the handoff rule (§3) at the seam.
|
|
|
294
294
|
re-entry in either scroll direction.
|
|
295
295
|
- The HUD hides itself when the journey hands off to normal-flow sections;
|
|
296
296
|
jump-nav buttons dim at the end they're already at.
|
|
297
|
+
- The frame loop writes nothing at rest: while the scroll offset and the
|
|
298
|
+
smoothed scrub are unchanged it skips every DOM write (overlays, HUD, video
|
|
299
|
+
seek, blur), so a page left open costs one scroll read per frame. Layout is
|
|
300
|
+
read only on load and resize, never in the loop. Keep both when you extend
|
|
301
|
+
the engine — a per-frame write that does not check for a change is a
|
|
302
|
+
violation of the Agent Reference's *Game UI Performance — ENFORCED*.
|
|
303
|
+
- The loader bar is a full-width fill scaled with `scaleX`, written only when
|
|
304
|
+
its whole percent changes — never `width` (a download fires many chunks a
|
|
305
|
+
second).
|
|
@@ -113,11 +113,13 @@ body[data-hs-state="ready"] #hs-loader { opacity: 0; visibility: hidden; }
|
|
|
113
113
|
overflow: hidden;
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
/* The fill is full width and scaled, never resized: progress writes a transform (no layout). */
|
|
116
117
|
#hs-loader-fill {
|
|
117
|
-
display: block; height: 100%; width:
|
|
118
|
+
display: block; height: 100%; width: 100%;
|
|
119
|
+
transform: scaleX(0); transform-origin: left;
|
|
118
120
|
background: var(--hs-accent);
|
|
119
121
|
box-shadow: 0 0 12px var(--hs-accent), 0 0 32px var(--hs-accent-soft);
|
|
120
|
-
transition:
|
|
122
|
+
transition: transform 0.25s ease;
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
/* ── telemetry HUD (optional) ───────────────────────────────────── */
|
|
@@ -156,9 +156,14 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
156
156
|
let objectUrl = null;
|
|
157
157
|
let alive = true;
|
|
158
158
|
|
|
159
|
+
let shownLoaderPct = -1;
|
|
160
|
+
|
|
161
|
+
/** Shows download progress; writes only when the whole percent shown changes (a stream fires many chunks). */
|
|
159
162
|
function setLoader(p) {
|
|
160
163
|
const pct = Math.round(clamp(p, 0, 1) * 100);
|
|
161
|
-
if (
|
|
164
|
+
if (pct === shownLoaderPct) return;
|
|
165
|
+
shownLoaderPct = pct;
|
|
166
|
+
if (loaderFill) loaderFill.style.transform = `scaleX(${pct / 100})`;
|
|
162
167
|
if (loaderPct) loaderPct.textContent = String(pct).padStart(3, "0");
|
|
163
168
|
}
|
|
164
169
|
|
|
@@ -189,6 +194,7 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
189
194
|
duration = video.duration;
|
|
190
195
|
video.currentTime = 0;
|
|
191
196
|
videoReady = true;
|
|
197
|
+
invalidateFrame(); // seek to wherever the viewer already scrolled while it loaded
|
|
192
198
|
} catch (e) {
|
|
193
199
|
document.body.classList.add(CFG.fallbackClass); // poster still shows
|
|
194
200
|
setLoader(1);
|
|
@@ -306,6 +312,16 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
306
312
|
if (element && element.textContent !== text) element.textContent = text;
|
|
307
313
|
}
|
|
308
314
|
let frameRaf = null;
|
|
315
|
+
// The scrub position and scroll offset the chrome was last drawn at. While both are unchanged the frame
|
|
316
|
+
// loop writes nothing: a page at rest costs one scroll read per frame, not a full redraw of the chrome.
|
|
317
|
+
let drawnP = Number.NaN;
|
|
318
|
+
let drawnY = Number.NaN;
|
|
319
|
+
|
|
320
|
+
/** Forces the next frame to redraw everything (after a re-measure or when the video becomes seekable). */
|
|
321
|
+
function invalidateFrame() {
|
|
322
|
+
drawnP = Number.NaN;
|
|
323
|
+
drawnY = Number.NaN;
|
|
324
|
+
}
|
|
309
325
|
|
|
310
326
|
function measure() {
|
|
311
327
|
const sTop = isDocScroller ? 0 : scroller.getBoundingClientRect().top;
|
|
@@ -314,6 +330,7 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
314
330
|
viewportHeight = viewportH();
|
|
315
331
|
journeyScroll = Math.max(1, journeyHeight - viewportHeight);
|
|
316
332
|
frameEndY = endY();
|
|
333
|
+
invalidateFrame();
|
|
317
334
|
}
|
|
318
335
|
|
|
319
336
|
// where PLAY/END consider "the end": journey end (sweep:"hero") or
|
|
@@ -324,12 +341,21 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
324
341
|
: maxY();
|
|
325
342
|
|
|
326
343
|
function frame() {
|
|
327
|
-
const
|
|
344
|
+
const scrollY = getY();
|
|
345
|
+
const y = clamp(scrollY - journeyTop, 0, journeyScroll);
|
|
328
346
|
const p = y / journeyScroll;
|
|
329
347
|
|
|
330
348
|
smoothP += (p - smoothP) * (reduced ? 1 : CFG.smoothing);
|
|
331
349
|
if (Math.abs(p - smoothP) < 0.0004) smoothP = p;
|
|
332
350
|
|
|
351
|
+
// At rest — same scroll, scrub settled, nothing invalidated: every value below is already on screen.
|
|
352
|
+
if (smoothP === drawnP && scrollY === drawnY) {
|
|
353
|
+
if (alive) frameRaf = requestAnimationFrame(frame);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
drawnP = smoothP;
|
|
357
|
+
drawnY = scrollY;
|
|
358
|
+
|
|
333
359
|
if (videoReady && duration) {
|
|
334
360
|
const t = smoothP * Math.max(0, duration - 0.05);
|
|
335
361
|
if (Math.abs(t - video.currentTime) > 0.02) video.currentTime = t;
|
|
@@ -338,6 +364,7 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
338
364
|
if (CFG.motionBlur && !reduced && videoReady) {
|
|
339
365
|
const blur = Math.min(5, Math.abs(smoothP - lastP) * 620);
|
|
340
366
|
video.style.filter = blur > 0.35 ? `blur(${blur.toFixed(2)}px)` : "none";
|
|
367
|
+
if (blur > 0.35) drawnP = Number.NaN; // still blurred: draw the next frame too, so the blur clears at rest
|
|
341
368
|
}
|
|
342
369
|
lastP = smoothP;
|
|
343
370
|
|
|
@@ -353,12 +380,12 @@ export function initHeroScroll(root = document, userConfig = {}) {
|
|
|
353
380
|
}
|
|
354
381
|
hud.classList.toggle(
|
|
355
382
|
"hs-hud-off",
|
|
356
|
-
|
|
383
|
+
scrollY > journeyTop + journeyHeight - viewportHeight * 0.55
|
|
357
384
|
);
|
|
358
385
|
}
|
|
359
386
|
|
|
360
|
-
if (gotoTop) gotoTop.classList.toggle("hs-nav-dim",
|
|
361
|
-
if (gotoEnd) gotoEnd.classList.toggle("hs-nav-dim",
|
|
387
|
+
if (gotoTop) gotoTop.classList.toggle("hs-nav-dim", scrollY < 4);
|
|
388
|
+
if (gotoEnd) gotoEnd.classList.toggle("hs-nav-dim", scrollY >= frameEndY - 4);
|
|
362
389
|
|
|
363
390
|
for (const o of overlays) styleOverlay(o, smoothP);
|
|
364
391
|
|
|
@@ -54,7 +54,7 @@ Work in **phases**: a `### Phase N` group in the plan, or — if the plan has no
|
|
|
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), the plan summary path when this run wrote it (`.agents/specs/<slug>/documents/<slug>_summary.html`), 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. 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."*
|
|
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; a frame loop (`requestAnimationFrame`, `useFrameLoop`, `setInterval`, an animation-library tick) on a menu, pause / settings / results screen, splash, preloader or landing page, or driving motion CSS could do (a real-time 3D / canvas / scroll-scrubbed hero is allowed when it pauses off-screen and writes nothing at rest); a HUD loop that keeps writing while its HUD is hidden, behind a modal or the game is paused; a CSS `transition` on a property the frame loop writes. 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
|
|
|
@@ -81,7 +81,7 @@ Every feature lives in one folder, created by bt-spec (or by bt-plan for a Quick
|
|
|
81
81
|
recon/ copies of the recons the spec rests on (bt-spec, when its brief cites any)
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
`<slug>` is the folder name (the plan sits at `<slug>/documents/<slug>_plan.md`). **Legacy flat plan** (`.agents/specs/<slug>_plan.md`): run it where it is, keep its run log and the test paths its `Tests:` lines name, and still create `.agents/specs/<slug>/` for `dashboard.html`, `documents/<slug>_dashboard.js`, `documents/<slug>_live.js` and `snapshots/` — move nothing unless the user asks.
|
|
84
|
+
`<slug>` is the folder name (the plan sits at `<slug>/documents/<slug>_plan.md`). **The feature folder is wherever the plan is.** The user moves a whole slug folder from `.agents/specs/` to `.agents/complete/` when they are ready for it to be reviewed, and later on to `.agents/archived/` as they see fit. A plan reopened there (tasks added after it was complete) runs where it is: every path in this skill is relative to that folder. **Never move a feature folder** — not on completion, not to reopen it; the user moves folders when they are ready. **Legacy flat plan** (`.agents/specs/<slug>_plan.md`): run it where it is, keep its run log and the test paths its `Tests:` lines name, and still create `.agents/specs/<slug>/` for `dashboard.html`, `documents/<slug>_dashboard.js`, `documents/<slug>_live.js` and `snapshots/` — move nothing unless the user asks.
|
|
85
85
|
|
|
86
86
|
**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.
|
|
87
87
|
|
|
@@ -99,7 +99,7 @@ Every feature lives in one folder, created by bt-spec (or by bt-plan for a Quick
|
|
|
99
99
|
|
|
100
100
|
On top of the per-task updates:
|
|
101
101
|
|
|
102
|
-
- **Run start — the first thing the run does** (*Open the run before anything else*): make sure the default `.agents` folders exist — `.agents/
|
|
102
|
+
- **Run start — the first thing the run does** (*Open the run before anything else*): make sure the default `.agents` folders exist — `.agents/specs/`, `.agents/complete/`, `.agents/archived/`, `.agents/profile/` and `.agents/recon/`, each with an empty `.gitkeep` (write only the ones missing); **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), and `documents/<slug>_summary.html` the same way from `templates/summary/summary.html` when the feature already has one; 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/*/*/documents/*_live.js` and append it once if not — the live file is never staged or committed; `<slug>_dashboard.js` and `snapshots/` are.
|
|
103
103
|
- **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.
|
|
104
104
|
- **A deferral:** the task's `status: "deferred"` and `deferredReason`, an `activity` line.
|
|
105
105
|
- **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.
|
|
@@ -2063,7 +2063,7 @@
|
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Where a recorded file path opens from this page. A path inside this feature's folder
|
|
2065
2065
|
* (`.agents/specs/<slug>/tests/…`, or `tests/…`) opens relative to the page, so the link survives the folder being
|
|
2066
|
-
* moved to `.agents/
|
|
2066
|
+
* moved to `.agents/complete/` or anywhere under `.agents/archived/`. Any other project path opens from the project root: the part of this page's address
|
|
2067
2067
|
* before `/.agents/`.
|
|
2068
2068
|
*/
|
|
2069
2069
|
function fileHref(file) {
|
|
@@ -2072,7 +2072,7 @@
|
|
|
2072
2072
|
if (/^[a-z][a-z0-9+.-]*:/i.test(value)) return cleanUrl(value);
|
|
2073
2073
|
if (value.startsWith('/')) return `file://${value}`;
|
|
2074
2074
|
const slug = report.feature && report.feature.slug;
|
|
2075
|
-
const ownFolder = /^\.agents\/(?:archive
|
|
2075
|
+
const ownFolder = /^\.agents\/(?:specs|complete|archived|archive)\/(?:[^/]+\/)*?([^/]+)\/(?=(?:tests|documents|snapshots|recon)\/)/.exec(value);
|
|
2076
2076
|
if (ownFolder && (!slug || ownFolder[1] === slug)) return value.slice(ownFolder[0].length);
|
|
2077
2077
|
if (/^(?:tests|documents|snapshots|recon)\//.test(value)) return value;
|
|
2078
2078
|
const here = location.href.split(/[?#]/)[0];
|
|
@@ -101,7 +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
|
+
| **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; a frame loop on a menu, splash, preloader or landing page, or driving motion CSS could do (a real-time hero that pauses off-screen and at rest is allowed); a HUD loop still writing while its HUD is hidden or the game is paused. Quote the offending lines |
|
|
105
105
|
| **Camera lock** | the evidence was not captured from the transform recorded in `cameras.md` |
|
|
106
106
|
| **Pipeline gate** | whatever the deliverable kind's pipeline reference declares (export-boundary integrity, GUID survival, licence tier …) |
|
|
107
107
|
|
package/skills/bt-hero/SKILL.md
CHANGED
|
@@ -66,7 +66,7 @@ Then resolve every unfilled slot by exactly one of two paths:
|
|
|
66
66
|
|
|
67
67
|
## Step 2 — Write the hero brief (the save file)
|
|
68
68
|
|
|
69
|
-
Write the resolved slots to `.agents/specs/<feature-name>/documents/<feature-name>_hero-brief.md` — the feature's folder (create it if needed, after you make sure the default `.agents` folders exist — `.agents/
|
|
69
|
+
Write the resolved slots to `.agents/specs/<feature-name>/documents/<feature-name>_hero-brief.md` — the feature's folder (create it if needed, after you make sure the default `.agents` folders exist — `.agents/specs/`, `.agents/complete/`, `.agents/archived/`, `.agents/profile/` and `.agents/recon/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds); inside a bt-spec run it is the spec's own folder). The brief is the **record**, not a gate: the user never has to touch it, but `/bt-hero @<brief-file>` later must rebuild the same hero with zero questions — that is what makes a hero repeatable, shareable, and tweakable (edit a line, re-run). Record **only Tier 3 answers and explicit Tier 2 overrides** — never Tier 1 mechanics; the brief describes the film, not the engine.
|
|
70
70
|
|
|
71
71
|
```markdown
|
|
72
72
|
---
|
|
@@ -139,7 +139,7 @@ Show the filled brief as a **compact for-the-record report** — which slots cam
|
|
|
139
139
|
Then build by following bt-design's 3D-Hero-Scroll protocol end-to-end:
|
|
140
140
|
|
|
141
141
|
1. **Load the sibling bt-design skill, then read its `references/3d-hero-scroll.md` in full — before writing any code.** Two hosts, two mechanisms. Where skills are loaded with a tool (the Babylon Toolkit App Builder platform): call `load_skill('bt-design')`, then fetch the reference with `read_skill_resource` using a path from the resource list the load returns — never a guessed path. Where skills are files on disk (Claude Code): read `bt-design/references/3d-hero-scroll.md` from the same skills directory, `~/.claude/skills/` or the project's `.claude/skills/`. If bt-design is already in your context, skip the load and go straight to the reference. For Babylon Toolkit projects, the project's Agent Reference rule applies as usual (fetch it first if not already in context; if using the KIE MCP servers, its `web-kie-servers.md` sub-document too).
|
|
142
|
-
2. **Copy the drop-in templates** from `bt-design/templates/3d-hero-scroll/` for the host type (React/TS or plain HTML) — never re-implement the engine from memory.
|
|
142
|
+
2. **Copy the drop-in templates** from `bt-design/templates/3d-hero-scroll/` for the host type (React/TS or plain HTML) — never re-implement the engine from memory. The engine already follows the Agent Reference's **Game UI Performance — ENFORCED** (its frame loop writes nothing at rest, reads layout only on resize, writes the HUD only on change); anything you add around it — overlays, below-the-journey sections, the console home — keeps that: decorative motion in CSS, no extra frame loop.
|
|
143
143
|
3. Run the footage pipeline (anchor → chained beats → concat → scrub encode), wire-up, and calibration exactly as the reference specifies, configured from the brief's slots.
|
|
144
144
|
4. **Run the reference's verification protocol (§5) in a real browser. This is unconditional** — the hero is not done until it passes; never report done without it.
|
|
145
145
|
5. If the project keeps a `SPEC.md`, record the shipped hero per the project's working agreement.
|
|
@@ -73,7 +73,7 @@ Rewrite BOTH files COMPLETELY, as a landing page designed from scratch for this
|
|
|
73
73
|
- SELF-CHECK before finishing: re-read your Home.css — any structural container with `max-width` + auto margins means the task is failed; fix it first. At 1920px there must be NO empty margin strip on either side of the hero.
|
|
74
74
|
- Responsive from ~320px to ~2560px, no horizontal scrollbar at any width, nothing clipped or overlapping.
|
|
75
75
|
|
|
76
|
-
Design to the bt-design skill's standards — the ones you loaded in the Prerequisite — **through the lens `DESIGN.md` commits to (Step 1)**: full-bleed console UI, the file's palette and typography, real motion in the file's motion language. `src/pages/` and `src/components/` stay Babylon-free — never import `GameManager` or any Babylon module there; navigation goes through `useUnifiedNavigation`.
|
|
76
|
+
Design to the bt-design skill's standards — the ones you loaded in the Prerequisite — **through the lens `DESIGN.md` commits to (Step 1)**: full-bleed console UI, the file's palette and typography, real motion in the file's motion language. **That motion is CSS** — `@keyframes` and `transition` on `transform` and `opacity` — and the landing page runs **no frame loop** (`requestAnimationFrame`, `useFrameLoop`, `setInterval`, animation-library ticks). The one exception is a real-time 3D, canvas or scroll-scrubbed hero: it pauses when scrolled out of view (`IntersectionObserver`) and in a background tab (`visibilitychange`), writes nothing while the scroll is at rest, and honors `prefers-reduced-motion` (see *UI performance* in Step 3). `src/pages/` and `src/components/` stay Babylon-free — never import `GameManager` or any Babylon module there; navigation goes through `useUnifiedNavigation`.
|
|
77
77
|
|
|
78
78
|
# Step 3 — the chrome (`src/chrome/**`): splash, preloader, overlay — ALL THREE, one theme
|
|
79
79
|
|
|
@@ -113,6 +113,13 @@ Any redesign of the splash MUST keep every one of these elements present with it
|
|
|
113
113
|
|
|
114
114
|
The Layout law from Step 2 binds these surfaces too — full-bleed, responsive, edge-to-edge.
|
|
115
115
|
|
|
116
|
+
**UI PERFORMANCE — when to update per frame and when NOT to (ENFORCED, every surface).** Follow the Agent Reference's **Game UI Performance — ENFORCED** and `ui-design-system.md` › **Live HUD Values — ENFORCED** and **Per frame or not**. A beautiful frontend that janks the game, or slows the load it is covering, is not finished. Give every element the cheapest cadence that shows it correctly:
|
|
117
|
+
|
|
118
|
+
- **Splash and preloader — no frame loop.** All atmosphere (particles, parallax, scanlines, pulses, a gauge sweeping, tiles assembling) is CSS `@keyframes` / `transition` on `transform` and `opacity`: the compositor keeps it playing while the scene build holds the main thread, where a JavaScript-driven animation stutters and steals time from the load. Progress is an **event**: keep it in state as the whole percent shown, so React skips identical updates (the download fires many a second), and draw bars with `scaleX` (`transform-origin: left`), never `width`. Your metaphor may be *driven by* progress — write it on the progress event, not every frame.
|
|
119
|
+
- **Overlay / HUD — classify every value.** *State* (score, lap, gear, position, health after a hit, which menu is open) is React state set from an EventBus message, only when it changed. *Telemetry* (speed, RPM, needles, timers, bars, markers) **never** touches React state, props, context, a store or a per-frame EventBus message: the HUD renders once and **one** `useFrameLoop` writes it through refs, only when the shown value changes (`textContent`, `transform`, `scaleX`, `stroke-dashoffset`, `opacity`; never `width` / `height` / `top` / `left` / `innerHTML` / SVG geometry, never a layout read). Readouts nobody reads at 60 Hz (FPS, distance, standings) are throttled to a few hertz in that same loop. A property the loop writes carries no CSS `transition`.
|
|
120
|
+
- **Nothing updates while it is not on screen.** The HUD is unmounted (or its loop skips) behind a pause, settings or results modal and while the game is paused. Menus, pause / settings / results screens and the landing page run no frame loop at all — their motion is CSS.
|
|
121
|
+
- **The redesign's initial overlay is usually all static and state** (a brand corner, a frame, a pause button). It needs no frame loop until a live value arrives; do not add one "for later".
|
|
122
|
+
|
|
116
123
|
# Step 4 — bespoke art (when media generation is available)
|
|
117
124
|
|
|
118
125
|
If the platform's `generate_image` / `generate_video` tools are available on this turn, use them to make the design beautiful: a hero background, a logo/wordmark, splash-adjacent accents (16:9 for wide heroes, 1:1 for badges/logos; png when alpha matters). Make ALL generate calls FIRST, in ONE parallel round, before writing any files; reference the returned `/assets/generated/…` paths exactly as returned (the one exception to never-invent-an-asset-path) — the renders land in the background, so every surface must look finished while they do (styled color/gradient fallback behind each image, never a blank box). At most ONE short looping hero video, and only if it truly elevates the design — video costs the user hundreds of credits. If the tools are absent, design with CSS + the images on disk instead.
|
|
@@ -127,6 +134,7 @@ Generated art goes on the LANDING PAGE — never on the splash/preloader (Step 3
|
|
|
127
134
|
- No Toolkit/BabylonJS/engine branding anywhere in the user-facing design.
|
|
128
135
|
- The play contract fires with the project's REAL GameMode class.
|
|
129
136
|
- All four surfaces read as one designed product, not four separate efforts.
|
|
137
|
+
- **UI performance holds (Step 3, ENFORCED):** grep `src/pages/Home.tsx`, `src/chrome/loading.tsx`, `splash.tsx` and `overlay.tsx` for `requestAnimationFrame`, `useFrameLoop`, `setInterval` and animation-library ticks — on the landing page, splash and preloader any hit is a violation (move the motion to CSS), except a real-time hero that pauses off-screen and at rest. In the overlay, any state setter, `dispatch(`, store update or unguarded `EventBus.PostMessage(` inside a frame loop is a violation. Grep the CSS and inline styles for `width` / `height` / `top` / `left` animated or written for progress or telemetry — use `scaleX` / `transform` instead.
|
|
130
138
|
- The splash shows some kind of progress — in its own form and words — that keeps moving through every loading stage (download, building and setting up the scene, assets, shaders) and never looks stuck on a finished bar; its progress wiring is carried over from the file it replaced.
|
|
131
139
|
- `DESIGN.md` records the direction that actually shipped — freshly written if it was missing/placeholder, rewritten if the brief redirected it, untouched if this run honored it as-is. A shipped design the file does not describe is a failed Step 1.
|
|
132
140
|
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -35,7 +35,7 @@ Turn a feature spec into `.agents/specs/<slug>/documents/<slug>_plan.md`: an ord
|
|
|
35
35
|
4. Sibling-skill pattern (e.g. bt-design's 3D-Hero-Scroll): read that skill's reference **and templates** *(where skills load through a tool: `load_skill` + `read_skill_resource`, never a guessed path; where they are files: the skills directory this skill was loaded from, e.g. `~/.claude/skills/`, `~/.agents/skills/` or the project's equivalent)*. The plan **copies and configures the template engine — never re-implements it**; each behavioral option the spec records (e.g. `sweep: page`) becomes an Acceptance item stated in observable terms. Prefer copying and wiring the template as the first task, so later tasks only configure it.
|
|
36
36
|
5. Too ambiguous to plan responsibly → ask the user. **Already built?** If the research shows some or all of the feature already exists, say so first and plan only what is missing (often just tests and the live check).
|
|
37
37
|
|
|
38
|
-
**Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief — the `<slug>`: lowercase kebab-case, `a-z 0-9 -` only, max 40 chars, with `-02`, `-03` … appended if
|
|
38
|
+
**Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief — the `<slug>`: lowercase kebab-case, `a-z 0-9 -` only, max 40 chars, with `-02`, `-03` … appended if a folder of that name already exists in `.agents/specs/`, `.agents/complete/` or anywhere under `.agents/archived/`; `spec_impact` and `size` inferred from the analysis; `proof: functional` unless `--parity`. List the assumptions in Codebase Analysis. **A Quick Plan is a creation point:** it first makes sure the default `.agents` folders exist — `.agents/specs/`, `.agents/complete/`, `.agents/archived/`, `.agents/profile/` and `.agents/recon/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds), then creates the feature folder `.agents/specs/<slug>/` (with `documents/`), exactly as bt-spec would, and the plan, report and tests live there.
|
|
39
39
|
|
|
40
40
|
**The feature folder.** Every feature has one: `.agents/specs/<slug>/` holding `dashboard.html` (the feature dashboard), `documents/` (`<slug>_spec.md`, `<slug>_plan.md`, bt-execute's `<slug>_autopilot.md`, the dashboard data `<slug>_dashboard.js` and live status `<slug>_live.js`), `snapshots/` and `tests/`. From a spec, `<slug>` is its folder name. A **legacy flat spec** (`.agents/specs/<slug>_spec.md`) is read where it is and left there; the plan and report still go into the new `.agents/specs/<slug>/` folder, and the report's Spec link points back to the flat file.
|
|
41
41
|
|
|
@@ -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. 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.
|
|
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. Every UI element also gets the cheapest cadence in `ui-design-system.md` › **Per frame or not** — events for state, CSS for decorative motion, the frame loop only for telemetry, throttled readouts, nothing while hidden — and no plan snippet puts a frame loop on a menu, splash, preloader or landing page (a real-time hero excepted, paused off-screen and at rest). 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
|
|
|
@@ -97,7 +97,7 @@ Rate each task by the **kind of work it does** (classify tasks, not the plan —
|
|
|
97
97
|
- **Live or Game?** Loading a scene and reading values from it is Live. Playing it until something happens is Game. Game work ran 1.2–2.8× its estimate when it was rated Live, because every scenario is a real-time play session and a bug that only shows on lap three costs three laps each time it is checked.
|
|
98
98
|
- **Do not budget fix rounds.** They are inside the rates: about one task in four needed a second attempt in both calibrations, and every one of those is already in the numbers. Defensively budgeting rounds per phase was the single largest source of over-estimation in the first calibration.
|
|
99
99
|
- **Do not add a further margin.** The range is the margin. Do not discount for parallel phases either — the rates are wall-clock with bt-execute's usual parallelism.
|
|
100
|
-
- **Outsized work is 2× the task's own kind rate**, never a flat figure. A task that ports a whole engine subsystem rated as Code is 12 min, not the Unity rate doubled (
|
|
100
|
+
- **Outsized work is 2× the task's own kind rate**, never a flat figure. A task that ports a whole engine subsystem rated as Code is 12 min, not the Unity rate doubled (babylon-toolkit-networking rated its nine engine-scale code tasks at a flat 72 min each, estimated 15.7 h and ran 6.4 h). A task that builds a compiler or transpiler, or must prove coverage across many Unity sample projects, is 2× Unity (shadergraph-transpiler-complete-coverage: 72 min/task). Multiply by ~2 for `proof: parity` only if the plan really carries numeric gates, and by ~2–3 for `bt-execute --strict` (neither measured yet).
|
|
101
101
|
- **Unity frame-matching runs long.** A task proven by matching Unity frame by frame (animation feel, foot IK, landing poses) is where Unity tasks overran most (starter-assets-third-person: 2.4×). Name it as the biggest uncertainty.
|
|
102
102
|
- **The estimate covers the plan as written.** Tasks added mid-run cost far more than planned ones — unity-terrain-system-parity's 17 planned tasks took about 6 h, the 9 added during the run about 21 h; mario-kart-port grew from 22 to 42 tasks. Say so in the biggest-uncertainty line when the scope is still moving. Tasks added after a plan is complete get their own estimate at these rates.
|
|
103
103
|
|
|
@@ -115,7 +115,7 @@ Rate each task by the **kind of work it does** (classify tasks, not the plan —
|
|
|
115
115
|
| unity-timeline-playback | code 5 · Unity 6 | 186 min | 0.78 |
|
|
116
116
|
| babylon-game-server | code 8 · live 8 | 157 min | 0.89 |
|
|
117
117
|
| mario-kart-leftover-particles | game 5 | 189 min | 0.94 |
|
|
118
|
-
|
|
|
118
|
+
| babylon-toolkit-networking | code 20 · Unity 8 | 385 min | 0.96 |
|
|
119
119
|
| mario-kart-drift-vfx-parity | Unity 2 · game 1 | 107 min | 0.97 |
|
|
120
120
|
| cinemachine-port | code 10 · Unity 14 | 560 min | 1.02 |
|
|
121
121
|
| vfx-graph-port | code 10 · Unity 7 | 310 min | 1.02 |
|
|
@@ -151,7 +151,7 @@ Print `🗂️ [bt-plan] Writing the feature dashboard …`. **A spec from bt-sp
|
|
|
151
151
|
- copy `dashboard.html` to `.agents/specs/<slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else (always — over a copy bt-spec wrote too, so the page is the current template);
|
|
152
152
|
- write `.agents/specs/<slug>/documents/<slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin` `spec` or `quick-plan`, size, proof, a plain-language summary), `documents` (Spec — omitted for a Quick Plan — and Plan), `status: "planned"`, `updatedAt` from the shell clock (`date '+%Y-%m-%d %H:%M'`; with no shell, the current local time), `estimate` (the Total line), every phase and task from the plan as `pending` (id, title, kind from the estimate table, verify level), an empty `afterAction` and no snapshots, the plan's Decisions as `decisions` (Heavy Plan; otherwise the spec's), and one more `activity` line: `Plan written — <n> tasks in <k> phases, estimated <range>` (after bt-spec's `Spec written` line when there is one);
|
|
153
153
|
- write `.agents/specs/<slug>/documents/<slug>_live.js` from `live.template.js`, the same way (whole, strict JSON): no task, `role: "orchestrator"`, `title: "Plan written — waiting for bt-execute"`, no steps (bt-execute rewrites it at every step of a run).
|
|
154
|
-
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents
|
|
154
|
+
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents/*/*/documents/*_live.js` — append it once if missing. The live file is rewritten at every step of a run and is not history worth keeping; `<slug>_dashboard.js` is, and stays tracked. A live file git already tracks is left as it is.
|
|
155
155
|
|
|
156
156
|
Re-planning an existing feature rewrites the data file's phases and tasks from the new plan but keeps the results of tasks already done, its `afterAction` and its `activity` history, adding a `Plan revised` line; new tasks are `pending` with an `updates` note, and a `complete` status becomes `paused`. If the template cannot be found, skip the dashboard and say so — bt-execute creates it on its first run.
|
|
157
157
|
|
|
@@ -100,7 +100,7 @@ The clock of the CPU profile is tied to the page's clock by a named busy-wait ma
|
|
|
100
100
|
|
|
101
101
|
# Pipeline
|
|
102
102
|
|
|
103
|
-
Read the Babylon Toolkit Agent Reference router and the sub-documents the project's code touches (`node-esm.md` or `classic.md`, `scene-components.md`, `react-framework.md` for a React host, `
|
|
103
|
+
Read the Babylon Toolkit Agent Reference router and the sub-documents the project's code touches (`node-esm.md` or `classic.md`, `scene-components.md`, `react-framework.md` for a React host, `networking.md` for networked play) before the first run in a session — unless your prompt already carries those excerpts.
|
|
104
104
|
|
|
105
105
|
The names below are shorthand for absolute paths used throughout this skill — write them out in every command (or set them at the top of the same command): most agent shells keep no variables between commands.
|
|
106
106
|
|
|
@@ -146,7 +146,7 @@ The project is just **the root folder of the web app**: where its source lives (
|
|
|
146
146
|
## Phase 0 — Preflight
|
|
147
147
|
|
|
148
148
|
```bash
|
|
149
|
-
for folder in
|
|
149
|
+
for folder in specs complete archived profile recon; do mkdir -p "$PROJ/.agents/$folder"; [ -e "$PROJ/.agents/$folder/.gitkeep" ] || : > "$PROJ/.agents/$folder/.gitkeep"; done # the default .agents folders
|
|
150
150
|
mkdir -p "$TOOLS" "$DATA/runs" "$DATA/logs"
|
|
151
151
|
cp -R "$SKILL_DIR"/scripts/* "$TOOLS/" # refresh on every skill update
|
|
152
152
|
node "$TOOLS/progress.mjs" start "$S" --title "<Project> — <scenario> performance" --brief "<the user's words>" --project "$PROJ" --url "<url, or the dev server's / until known>" --open true
|
|
@@ -306,6 +306,7 @@ What a heavy function usually means, and where to look. Always confirm with `cal
|
|
|
306
306
|
| `(program)` | Browser-internal work (parse, compile, style, layout, GPU IPC) | Large during load = script parse / compile; during play = DOM / layout churn (HUD) |
|
|
307
307
|
| React (`react` owner) above ~0% during play, `jsxDEV` among the heaviest functions | A HUD re-rendering every frame: speed, timers, needles or bars pushed through React state, props or per-frame EventBus messages | The HUD's frame loop (`yours` names the component). Fix: the Agent Reference's *Live HUD Values — ENFORCED* — render once, one frame loop, write through refs only on change. Budget: ≤ 0.5 ms/frame, `react` near 0% in play phases |
|
|
308
308
|
| `AdvancedDynamicTexture._checkUpdate` / `_render`, `updateDynamicTexture` every frame | A Babylon GUI control assigned every frame: each change re-lays out, redraws and re-uploads the whole GUI texture | Assign a control only when its shown value changes (*Game UI Performance — ENFORCED*) |
|
|
309
|
+
| A UI frame loop (`requestAnimationFrame` / `useFrameLoop` callback, `yours`) busy during a load, menu, pause or at-rest phase; `Recalculate Style` / `Layout` every frame with nothing moving | Per-frame code where no per-frame update is needed: a splash, menu or landing page animated from JavaScript, a HUD loop still running behind a modal or while paused, a scroll loop rewriting the page at rest, `width` / `top` animated | Move decorative motion to CSS `transform` / `opacity`; stop or skip the loop while its UI is hidden; skip writes at rest; throttle readouts nobody reads at 60 Hz (the Agent Reference's `ui-design-system.md` › *Per frame or not*) |
|
|
309
310
|
|
|
310
311
|
---
|
|
311
312
|
|
|
@@ -133,7 +133,7 @@ Each prototype subagent gets: its **direction**, the **theme**, the **world anch
|
|
|
133
133
|
3. **Produce assets** via any mix of the available workflows: Pinterest pulls for reference, **GPT Image 2** for stills, **KIE MCP servers (default) / the Higgsfield CLI (Kling, Seedance, etc.)** for motion/video, hand-authored WebGL/SVG/CSS. All assets stay faithful to the world anchor and live in the prototype's folder. **On Higgsfield, every generation goes through the reference's `scripts/hf-generate.mjs` wrapper** with `--out .agents/prototypes/<NN-slug>/<file>`: the CLI alone only returns a CDN URL, and a prototype must never hot-link one. Local reference images are passed as file paths (`--image-references`, `--start-image`, `--end-image`) and uploaded automatically.
|
|
134
134
|
4. **3D-hero-scroll directions:** follow *The 3D-hero-scroll batch rule* below.
|
|
135
135
|
5. Run its own **iteration passes** (Step 4) before returning.
|
|
136
|
-
6. **Write clean, readable code.** Every file follows the Coding Practices: 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, but never a reason to fail a test or verification). The chosen prototype becomes the user's real front end, so its code must be maintainable. Every HUD follows the Agent Reference's **Game UI Performance — ENFORCED**: per-frame values (speed, timers, bars, needles) reach the screen through refs and one frame loop, never React state or a per-frame EventBus message.
|
|
136
|
+
6. **Write clean, readable code.** Every file follows the Coding Practices: 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, but never a reason to fail a test or verification). The chosen prototype becomes the user's real front end, so its code must be maintainable. Every HUD follows the Agent Reference's **Game UI Performance — ENFORCED**: per-frame values (speed, timers, bars, needles) reach the screen through refs and one frame loop, never React state or a per-frame EventBus message. And nothing runs per frame that does not need to: the "otherworldly animation" is CSS `@keyframes` / `transition` on `transform` and `opacity` wherever CSS can do it; a WebGL / canvas / scroll-scrubbed scene pauses off-screen (`IntersectionObserver`) and in a background tab, writes nothing while the scroll is at rest, and honors `prefers-reduced-motion`; nothing animates `width` / `height` / `top` / `left` or reads layout per frame (`ui-design-system.md` › **Per frame or not**). Spectacle that costs frames when nothing is moving is not finished.
|
|
137
137
|
|
|
138
138
|
## The 3D-hero-scroll batch rule
|
|
139
139
|
|
package/skills/bt-recon/SKILL.md
CHANGED
|
@@ -28,7 +28,7 @@ Run reconnaissance on existing code nobody has documented — one subsystem or t
|
|
|
28
28
|
## Ground rules
|
|
29
29
|
|
|
30
30
|
- **Thorough by default.** Unlike the other bt-* skills, recon has no TIME MATTERS default: the whole point is that nothing is missed. Print `🔬 [bt-recon] Deep recon` at the start (`--quick`: `⚡ [bt-recon] Quick recon`). Still do not re-read what you already have.
|
|
31
|
-
- **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `.agents/recon/<slug>_recon/` — nothing else, except that before the first of them you make sure the default `.agents` folders exist — `.agents/
|
|
31
|
+
- **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `.agents/recon/<slug>_recon/` — nothing else, except that before the first of them you make sure the default `.agents` folders exist — `.agents/specs/`, `.agents/complete/`, `.agents/archived/`, `.agents/profile/` and `.agents/recon/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds) (unless `--out` points elsewhere). No source edits, no builds, no installs, no tests, no shell commands beyond the read-only `git` commands above.
|
|
32
32
|
- **Evidence or it is unknown.** Every factual claim cites `path:line` (or `path:start-end`) and carries one confidence tag: `[code]` read in the source · `[live]` seen in the running app · `[history]` from git history · `[inferred]` deduced, with the reason in the same line. Anything you cannot establish goes in `## Unknowns` with what would settle it. Never fill a gap with a plausible guess — an inherited system is exactly where a confident wrong guess does the most damage.
|
|
33
33
|
- **Write the system, not the review process.** The recon describes what the code does and why. It never records how the recon was carried out (subagent counts, tool lists, audit logs).
|
|
34
34
|
- **Babylon work:** if the scope uses BabylonJS or the Babylon Toolkit and you have not read the Babylon Toolkit Agent Reference in this session, read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — it is the authority for the API and conventions the code is built on, so it tells you what is toolkit behavior and what is project code. Read its sub-documents only when relevant. If it cannot be read, stop and tell the user.
|
|
@@ -69,7 +69,7 @@ Split the scope map into cohesive **slices** — by module, feature or layer, ro
|
|
|
69
69
|
> 2. **Entry points & activation** — how its code is reached: URLs, query params, routes, flags, events, init calls, lifecycle hooks.
|
|
70
70
|
> 3. **Public API** — exported classes, functions, components, web components, custom elements, with full signatures.
|
|
71
71
|
> 4. **State & data shapes** — types, models and their fields; defaults; which are persisted and where; which are runtime only.
|
|
72
|
-
> 5. **UI inventory** — every panel, dialog, toolbar, menu and overlay; for each, every control (button, input, toggle, slider, list, hotkey, mouse / touch gesture) → what it does → its handler `path:line`. Include enabled/disabled and visibility conditions.
|
|
72
|
+
> 5. **UI inventory** — every panel, dialog, toolbar, menu and overlay; for each, every control (button, input, toggle, slider, list, hotkey, mouse / touch gesture) → what it does → its handler `path:line`. Include enabled/disabled and visibility conditions. For every live value a HUD, overlay or GUI shows, record how it is updated (event, frame loop, throttle, CSS) and `path:line`, and flag each break of the Agent Reference's **Game UI Performance — ENFORCED** — per-frame React state or EventBus posts, unchanged values rewritten every frame, layout written or read per frame, a frame loop on a menu / splash / landing page or running while its UI is hidden — as a maintenance risk.
|
|
73
73
|
> 6. **Events & messages** — emitted and consumed events, observables, callbacks, postMessage, pub/sub topics, and who listens.
|
|
74
74
|
> 7. **External I/O** — every network call: method, URL or URL template, request body/params shape, response shape as consumed, auth/headers, error and retry handling. Every storage use: localStorage, IndexedDB, cookies, files.
|
|
75
75
|
> 8. **Rendering & pipelines** — cameras, render targets, passes, post-processes, shaders and materials, offscreen renders and image exports: what each produces, at what size and format, and what each output encodes (e.g. which geometry a mask isolates, what a color or channel means).
|
package/skills/bt-spec/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ Turn a short feature idea into a spec file that `bt-plan` can plan from. Follow
|
|
|
30
30
|
|
|
31
31
|
## Step 1. Arguments, name, branch
|
|
32
32
|
|
|
33
|
-
From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If
|
|
33
|
+
From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If a folder of that name already exists in `.agents/specs/`, `.agents/complete/` or anywhere under `.agents/archived/` (the user moves finished features from `specs/` to `complete/` for review, and later on to `archived/`), append `-02`, `-03` … to the slug, so any of them can be moved back. If you cannot infer a sensible title, ask. Make a first estimate of the feature's `size` (defined in Step 5) — it sizes the research in Step 2.
|
|
34
34
|
|
|
35
35
|
Git is optional. **Where git is available:** stop now if the working tree has uncommitted or untracked files (ask the user to commit or stash); switch to a new branch `branch_name` (if taken, append `-01`, `-02` …) just before writing the spec in Step 5, so a conflict stop leaves no empty branch behind. **Where it is not** (no binary, sandboxed host such as the Babylon Toolkit App Builder): skip this silently — the branch name recorded in the spec header is the deliverable. Do not mention git as missing.
|
|
36
36
|
|
|
@@ -38,7 +38,7 @@ Git is optional. **Where git is available:** stop now if the working tree has un
|
|
|
38
38
|
|
|
39
39
|
- **`SPEC.md`** (repository root) is the project's source of truth for architecture, systems, conventions and decisions. Read its headings, Architecture, Conventions, and the systems this feature touches. The feature must fit it. **If the idea conflicts with SPEC.md, stop and tell the user before writing.** Verification procedures described in SPEC.md are tooling the feature may reuse, not requirements it inherits.
|
|
40
40
|
- **If `SPEC.md` is missing or an empty stub, ask the user first** whether to create it from the scaffold at the end of this file. Yes → write it, then continue against it. No → continue, and note in the spec: `"No project SPEC.md content yet — following existing codebase conventions."`
|
|
41
|
-
- **`DESIGN.md`** (only if the feature has UI): it is the single source of truth for design — never Figma or invented values. Cite the tokens and shared components the feature uses in 3–8 bullets. Missing → note `"No DESIGN.md design system found — follow the existing UI conventions already in the codebase."` No UI → say no design tokens apply.
|
|
41
|
+
- **`DESIGN.md`** (only if the feature has UI): it is the single source of truth for design — never Figma or invented values. Cite the tokens and shared components the feature uses in 3–8 bullets. Missing → note `"No DESIGN.md design system found — follow the existing UI conventions already in the codebase."` No UI → say no design tokens apply. When the feature has a HUD, overlay, menu, splash or landing page, add one bullet naming its live values and their cadence under the Agent Reference's **Game UI Performance — ENFORCED** (state on events, telemetry through the frame loop, throttled readouts, decorative motion in CSS, no frame loop on menus / splash / landing pages), so the plan builds it that way.
|
|
42
42
|
- **Recon docs (`.agents/recon/*_recon.md`, written by bt-recon):** if any recon's `scope` covers a system this feature touches, read its Summary, Architecture, the relevant Feature Inventory / UI Reference / External Interfaces sections, Known Issues and Extension Points — it is the grounding for code nobody else documented, so build on it instead of re-deriving it. Cite it in `## Research Notes`. If its `commit:` is well behind HEAD for the files this feature touches, note the drift there and suggest `bt-recon --refresh`.
|
|
43
43
|
- **Recons the brief cites (`… using @<path>_recon.md`):** bt-profile's fix commands cite the recon of the code behind the fixes, kept in the profile's own folder (`.agents/profile/<slug>/recon/`) or in `.agents/recon/`. Always read a cited recon in full, whatever its scope says. It is the map of the code the fix changes: callers, invariants, tests, extension points. Turn what it says must not break into Acceptance Criteria or named test cases. **Copy each cited recon into this feature's `recon/` folder** and cite the copy in `## Research Notes`. The feature folder then holds everything it rests on, and still works after the profile is archived or moved. A cited recon that does not exist yet: say so, give the `/bt-recon` command that makes it (the profile report's **Copy recon command**), and carry on with your own research.
|
|
44
44
|
- **Research the codebase, sized to the feature.** Find the closest existing feature to mirror, the real conventions, and the integration points. For a `small` feature do this inline; fan out to up to 3 **read-only** subagents only for `medium` / `large` (they report findings and file paths, never draft the spec; if a finding contradicts SPEC.md, raise it with the user rather than resolving it silently). Record the result in the spec's `## Research Notes` so bt-plan starts from it.
|
|
@@ -79,7 +79,7 @@ Interview the user until the design is decided, after Steps 2–3 so questions a
|
|
|
79
79
|
recon/ copies of the recons the brief cites (`using @…_recon.md`), when it cites any
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md …`, then make sure the default `.agents` folders exist — `.agents/
|
|
82
|
+
Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md …`, then make sure the default `.agents` folders exist — `.agents/specs/`, `.agents/complete/`, `.agents/archived/`, `.agents/profile/` and `.agents/recon/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds), and write the spec to `.agents/specs/<feature_slug>/documents/<feature_slug>_spec.md` (creating the folders) using the project's `FEATURE.md` template if it exists (add any header field or section below that it lacks), otherwise this structure. No implementation detail or code examples. Then go straight to Step 6 for this feature.
|
|
83
83
|
|
|
84
84
|
```markdown
|
|
85
85
|
# Spec for <feature-name>
|
|
@@ -137,7 +137,7 @@ Print `🗂️ [bt-spec] Writing the feature dashboard …`. The feature's dashb
|
|
|
137
137
|
- copy `dashboard.html` to `.agents/specs/<feature_slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else;
|
|
138
138
|
- write `.agents/specs/<feature_slug>/documents/<feature_slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin: "spec"`, size, proof, a plain-language summary from the spec's Summary), `documents` (the Spec alone), **`status: "specified"`**, `updatedAt` (the current local time, `YYYY-MM-DD HH:MM`), `estimate` empty, **no phases**, an empty `afterAction`, the spec's Decisions as `decisions` when it has any (`D1` …), no follow ups, and one `activity` line: `Spec written — <size>, <proof> proof`;
|
|
139
139
|
- write `.agents/specs/<feature_slug>/documents/<feature_slug>_live.js` from `live.template.js`, the same way: no task, `role: "orchestrator"`, `title: "Spec written — waiting for bt-plan"`, no steps;
|
|
140
|
-
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents
|
|
140
|
+
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents/*/*/documents/*_live.js` — append it once if missing.
|
|
141
141
|
|
|
142
142
|
If the template cannot be found, skip the dashboard and say so — bt-plan creates it with the plan.
|
|
143
143
|
|