@babylonjs-toolkit/agent 1.1.50 → 1.1.52
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 +5 -3
- package/package.json +1 -1
- package/skills/bt-copycat/SKILL.md +2 -0
- package/skills/bt-design/SKILL.md +4 -0
- package/skills/bt-execute/SKILL.md +6 -1
- package/skills/bt-landing/SKILL.md +6 -1
- package/skills/bt-plan/SKILL.md +22 -15
- package/skills/bt-recon/SKILL.md +241 -0
- package/skills/bt-spec/SKILL.md +1 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.52)
|
|
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
|
|
|
@@ -242,6 +242,7 @@ pair or schedule the bridge.
|
|
|
242
242
|
| [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. Add `--grill-me` to be interviewed first, `--parity` to allow numeric parity bars in the acceptance criteria. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
243
243
|
| [`bt-plan`](skills/bt-plan/SKILL.md) | `/bt-plan` | Produce a detailed, task-checklist technical plan from a spec. Add `--heavy` for a decision-complete plan that keeps a long, fresh-context-per-task run cohesive, and `--parity` for numeric parity gates instead of the default functional proof. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
244
244
|
| [`bt-execute`](skills/bt-execute/SKILL.md) | `/bt-execute` | Implement one task, a range (`T3-T7`, `T12-`, `NEXT:3`) or all remaining tasks from a plan/spec; with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended overnight run that never stops for human input, and `--strict` for an adversarial verifier on every task. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
245
|
+
| [`bt-recon`](skills/bt-recon/SKILL.md) | `/bt-recon` | Deep-dive existing code — a subsystem named in a brief, or the whole codebase — and write an evidence-cited technical grounding spec (`_specs/<slug>_recon.md`) plus, when it has UI, a plain-language user guide (`_specs/<slug>_guide.md`). Built for taking over undocumented code; `bt-spec` and `bt-plan` read the recon as grounding. Includes an observe-only live pass when the brief gives a URL; `--refresh` updates a recon after code changes. |
|
|
245
246
|
| [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
|
|
246
247
|
| [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
|
|
247
248
|
| [`bt-landing`](skills/bt-landing/SKILL.md) | `/bt-landing` | Re-design the landing page, splash screen, preloader and custom overlays. |
|
|
@@ -325,8 +326,9 @@ attempts, 5 under `--strict`), is then marked `⏭️ DEFERRED (auto-pilot): <re
|
|
|
325
326
|
on; deferred tasks get one more pass at the end. Each verified task is committed as a checkpoint
|
|
326
327
|
on the current branch (an `autopilot/<plan>` branch is created if you are on `main`; nothing is
|
|
327
328
|
ever pushed), and a `<plan>_autopilot.md` run log next to the plan records every task outcome,
|
|
328
|
-
decision and deferral for you to read in the morning
|
|
329
|
-
|
|
329
|
+
decision and deferral for you to read in the morning, plus clock times per phase and per task
|
|
330
|
+
(interactive runs log the clock times too) so bt-plan's time estimates can be recalibrated from
|
|
331
|
+
real runs. Re-running the same command resumes and re-attempts anything deferred.
|
|
330
332
|
|
|
331
333
|
One thing the skill cannot do is answer the host's tool-permission prompts — start the session
|
|
332
334
|
in a non-prompting permission mode (Claude Code auto / bypass-permissions) and leave Unity,
|
package/package.json
CHANGED
|
@@ -142,6 +142,8 @@ Hand the DNA Blueprint to the **bt-design** skill to build the actual frontend a
|
|
|
142
142
|
|
|
143
143
|
**Output target — where the rebuild lands (Babylon Toolkit projects):** the Home page is authored in **`src/pages/Home.tsx` + `src/pages/Home.css`** (supporting pieces in `src/pages/` / `src/components/`). It is deliberately pulled OUT of `app.tsx` — **`app.tsx` and `src/routing/**` are a READ-ONLY routing shell; never write the design into them.** The shell already routes `/` to `Home`, so replacing `Home.tsx`/`Home.css` IS replacing the landing page. Keep the play contract intact (`navigate('/play', { gameMode: … })` via `useUnifiedNavigation`; `src/pages`/`src/components` stay Babylon-free), and if the retheming extends to the game chrome (splash/preloader/overlay), that lives in `src/chrome/**` per the bt-landing skill's rules — including its ENGINE CONTRACT: the splash's engine-required element ids (`xbabylonjsSplashScreen`, `babylonjsLoadingDiv`, `babylonjsLoadingText`, `babylonjsLoadingDivStyle`, `xbabylonjsStatusTextDiv`) must survive any redesign byte-for-byte, or the engine cannot hide the splash to reveal the scene — and its IMPORTS rule: read each file you replace and copy its whole import block across character for character (`GameManager` is a DEFAULT export — `import GameManager from '../babylon/globals'`, never `{ GameManager }`). For non-Toolkit hosts, target whatever the root route's page component actually is — never a router/shell file.
|
|
144
144
|
|
|
145
|
+
**Loading progress you can show.** The runtime reports every loading state a splash can show, in order: the scene download (`GameManager.EventBus` `"OnLoadProgress"`, "Loading scene 45%"), then on `SceneManager.OnLoaderStatusObservable` building the scene (state 1: "Building scene 40%" with a detail line such as "Building 1200 of 3908 meshes" or "Loading 120 of 177 textures"), setting up the scene (state 2: "Setting up scene"), the asset preloader (state 3: "Loading assets", then a status line naming one heavy system at a time — terrain, skins, animations, navigation, water, ray tracing — a steady detail line, and one combined scene fraction) and the shader compile (state 4: "Compiling shaders 67%", ending on "Starting scene"); the splash stays up until the scene is really ready. These are example texts — your splash does not have to use them. The page stays responsive through the whole load, so the splash's own animation keeps playing — keep it visibly moving through every stage, including the moments after a bar reaches 100%. However the rebuilt splash presents it, it should show some kind of progress that keeps moving through every stage so it never looks stuck; keep the framework's progress wiring (`SceneManager.HostDefersSceneStatus = true`, both progress subscriptions, and no download progress once the toolkit reports a `state` of 1 or higher) so that data keeps arriving. The full table of states, the events and an example handler are in the Agent Reference [`ui-design-system.md`](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/ui-design-system.md), section *Loading progress you can show*. **You have full creative freedom.** These are the states the runtime reports, and the default splash screens show them as a status line, a bar and a corner detail line. A custom splash may present them in any way that fits the design — different wording, layout, animation, illustration, a single combined bar, per-system indicators, or none of the raw text at all. Do give the player a sense of real progress during heavy loading: show something that moves with the load (a bar, stage names, counts), never an endless "please wait".
|
|
146
|
+
|
|
145
147
|
Instruct bt-design to:
|
|
146
148
|
|
|
147
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.
|
|
@@ -59,10 +59,14 @@ Treat every loading surface (preloader, splash, initial overlay) as a **designed
|
|
|
59
59
|
- **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.
|
|
60
60
|
- **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).
|
|
61
61
|
|
|
62
|
+
**Loading progress you can show.** The runtime reports every loading state a splash can show, in order: the scene download (`GameManager.EventBus` `"OnLoadProgress"`, "Loading scene 45%"), then on `SceneManager.OnLoaderStatusObservable` building the scene (state 1: "Building scene 40%" with a detail line such as "Building 1200 of 3908 meshes" or "Loading 120 of 177 textures"), setting up the scene (state 2: "Setting up scene"), the asset preloader (state 3: "Loading assets", then a status line naming one heavy system at a time — terrain, skins, animations, navigation, water, ray tracing — a steady detail line, and one combined scene fraction) and the shader compile (state 4: "Compiling shaders 67%", ending on "Starting scene"); the splash stays up until the scene is really ready. These are example texts — your splash does not have to use them. The page stays responsive through the whole load, so the splash's own animation keeps playing — keep it visibly moving through every stage, including the moments after a bar reaches 100%. The full table of states, the events and an example handler are in the Agent Reference [`ui-design-system.md`](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/ui-design-system.md), section *Loading progress you can show*. **You have full creative freedom.** These are the states the runtime reports, and the default splash screens show them as a status line, a bar and a corner detail line. A custom splash may present them in any way that fits the design — different wording, layout, animation, illustration, a single combined bar, per-system indicators, or none of the raw text at all. Do give the player a sense of real progress during heavy loading: show something that moves with the load (a bar, stage names, counts), never an endless "please wait".
|
|
63
|
+
|
|
62
64
|
**ENGINE CONTRACT — splash element IDs are LAW (STRONGLY ENFORCED, zero exceptions).** "Keep the MECHANICS" above includes the DOM identity of the splash skeleton: the engine shows/hides the splash screen and writes its label/status text by looking up these EXACT element ids/names — `xbabylonjsSplashScreen` (the main splash panel), `babylonjsLoadingDiv`, `babylonjsLoadingText`, `babylonjsLoadingDivStyle`, and `xbabylonjsStatusTextDiv`. If any of these is renamed, removed, or unmounted, the engine cannot hide the splash and the scene underneath is never revealed. Every splash redesign keeps all five present with ids byte-for-byte unchanged; creativity happens around them — restyle via CSS targeting the ids, nest new elements inside/beside them, animate them freely. `babylonjsLoadingText` and `xbabylonjsStatusTextDiv` receive engine-written text at runtime, so they must remain real text-bearing elements. Before finishing any splash redesign, verify all five ids still exist — a missing id means the redesign is broken, not done.
|
|
63
65
|
|
|
64
66
|
**IMPORTS ARE COPIED, NEVER RE-DERIVED (STRONGLY ENFORCED, zero exceptions).** The other half of "keep the MECHANICS": when you rewrite an existing file — `splash.tsx`, `overlay.tsx`, `loading.tsx`, any component already wired to the framework — READ it first and carry its **entire import block** across **unchanged, character for character**, along with every `GameManager`, `EventBus` and `useUnifiedNavigation` line. Replace markup, styles and copy; touch nothing above them. Do not retype an import from memory, do not "tidy" or reorder it, do not change a default import into a named one. A single altered import is a build error, and the file you broke is one the player sees before anything else. Concretely, the slip that has already shipped a project that would not compile: **`GameManager` is a DEFAULT export** — `import GameManager from '../babylon/globals'`, NEVER `import { GameManager } from '../babylon/globals'`. A framework's export shape is not something to infer from the name; it is something to copy from the file in front of you. SELF-CHECK before finishing: compare your new import block to the original's — any difference means fix it before you stop.
|
|
65
67
|
|
|
68
|
+
**Never let the splash look stuck.** Whatever the design, the player should always see that loading is progressing — through every stage above, not just the download. How is entirely up to you: the runtime's own text, your own wording, stage icons, counters, a world that assembles piece by piece, one combined bar — none of the default messages are required. What matters is that something tied to the real load keeps moving, and that the splash never sits on a full bar with nothing changing (the old "Loading scene 100%" problem). To keep that progress data arriving, keep the splash's existing wiring: `SceneManager.HostDefersSceneStatus = true`, both progress subscriptions (`"OnLoadProgress"` and `SceneManager.OnLoaderStatusObservable`, removed on cleanup), and the check that stops using download progress once the toolkit reports a `state` of 1 or higher.
|
|
69
|
+
|
|
66
70
|
**LIGHTWEIGHT is a hard constraint, not a style choice.** The splash/preloader IS the progress info — it exists to cover loading, so it must paint instantly and start showing progress immediately. A splash that first loads its own multi-megabyte hero image defeats itself: the player stares at a blank screen while the loading screen loads. Build the creativity from what renders in the first frame — CSS gradients, keyframe animation, typography, particles, inline SVG, canvas-drawn effects — and at most small, fast image assets (a compact logo, a texture tile). Heavy art (AI-generated heroes, full-bleed photography, video) belongs on the landing page, where it can load behind a styled fallback — never on the splash, preloader, or in-game loading transitions.
|
|
67
71
|
|
|
68
72
|
This applies with equal force to loading transitions *inside* the game (level loads, respawns, scene swaps): same world, same metaphor, same bar.
|
|
@@ -33,6 +33,11 @@ Run tasks from a plan: build each one with its tests, have an independent verifi
|
|
|
33
33
|
- **Read the docs once.** For Babylon work, if you have not read the Agent Reference this session, fetch it once — https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — plus only the sub-documents the plan's tasks need. It is the authority for conventions and API. Fetch fails → stop and tell the user *(auto-pilot: retry 3×, then continue on what you know and log it)*. Read the plan's checklist and the parts of `SPEC.md` the tasks touch; re-read after a context compaction.
|
|
34
34
|
- **SPEC.md** constrains how you build. If the code and SPEC.md disagree, stop and tell the user *(auto-pilot: decide which is right, fix SPEC.md in the same task, log it)*. When a task changes architecture, a system, a convention or a dependency, SPEC.md must end up matching — normally the plan's final `Update SPEC.md` task; if the plan has none, do it anyway; a new dependency is recorded in SPEC.md by the task that introduces it. Follow SPEC.md's "How to update this spec". **Write the product, never the procedure** — no capture protocols, tool lists, ledgers or gates: recorded there, they become a bar every later feature must clear.
|
|
35
35
|
- **Say what you are doing** — one short line at each task and phase boundary, and before anything slow.
|
|
36
|
+
- **Clock every run** — auto-pilot or not, so bt-plan's time estimates can be recalibrated from real runs. Take every time from the shell (`date '+%Y-%m-%d %H:%M %Z'`, local time), never from memory, the conversation or a tool result's UTC timestamp. Append to the run log `<plan-basename>_autopilot.md` beside the plan (an interactive run writes only these lines and its task lines):
|
|
37
|
+
- Run start: `⏱ Run <n> start <date time> · queue T<a>–T<b> (<k> tasks) · plan estimate <the plan's Total line, or none> · flags <auto-pilot / strict / interactive>`
|
|
38
|
+
- Each phase — read the clock when the implementer launches, when each verifier launches, and at the tick — once its tasks are ticked or deferred: `⏱ Phase <N> (T<a>–T<b>): <HH:MM>→<HH:MM> · <m> min · build <m> · verify <m> · fix <m> (<rounds> rounds)`. Time spent waiting on the user (a question, a permission prompt) is logged as `· waited <m>` and left out of `<m> min`.
|
|
39
|
+
- Each task line ends `· done <HH:MM>`.
|
|
40
|
+
- Run end: `⏱ Run <n> end <date time> · <done>/<k> tasks · active <h m> · <min> min/task · waited <m>`.
|
|
36
41
|
- **Subagents:** running this skill is the user's request to use them. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, work inline, self-verify with the same checklist, and say so.
|
|
37
42
|
|
|
38
43
|
## The loop
|
|
@@ -94,5 +99,5 @@ An unattended run: **nobody is there to answer, and nothing waits for anyone's a
|
|
|
94
99
|
- **Safety.** Never push, force-push, deploy, publish, spend money, or delete/overwrite anything outside the plan's scope unless the plan explicitly says so — defer that step instead. Asset generation the plan or spec explicitly calls for (images, textures, audio, video, 3D through the documented generation tools) is in scope: do it. Never `git init`.
|
|
95
100
|
- **Checkpoints.** In a git repo, commit after each phase's boxes are ticked: `T<n>: <title> (auto-pilot)` (or `T<a>–T<b>: …`). On the default branch, first switch to `autopilot/<plan-basename>`. Uncommitted changes that are not yours → leave them untouched and stage only the paths this run changed; never ask about them.
|
|
96
101
|
- **Context.** Implement each phase in a fresh implementer subagent (it builds and tests; keep it for that phase's fix loop), so you only orchestrate: read plan → implementer → verifier → tick → commit → log → next phase. The plan's checkboxes and the run log are the only state — re-read them at each phase boundary and after a compaction.
|
|
97
|
-
- **Run log** — `<plan-basename>_autopilot.md` beside the plan, appended per run:
|
|
102
|
+
- **Run log** — `<plan-basename>_autopilot.md` beside the plan, appended per run: the `⏱` lines from *Clock every run* and completed/total; one line per task (outcome, attempts, tests, verifier, files, commit, done time); one line per decision; deferred tasks with what a human should look at first. Narrate the same boundaries to the console: `▶ [auto-pilot] T12/50 — <title>`, `✅ … verified`, `⏭️ … deferred — <reason>`.
|
|
98
103
|
- **Exit report** — only once the queue is empty: tasks completed, completed/total, deferred tasks with reasons, decisions logged and the run-log path, branch and last commit, whether the plan is done. It states results; it asks nothing. Re-running the same command resumes and re-attempts deferred tasks.
|
|
@@ -85,6 +85,10 @@ REDESIGN — do not reskin — all three surfaces to the SAME design language as
|
|
|
85
85
|
|
|
86
86
|
**The splash must NEVER be derived from the default Babylon splash (centered logo + spinner) — recoloring the default IS the failure.** Think out of the box: design the loading experience as a scene in this game's world, with a progress metaphor native to THIS game — a racer's start-lights counting down, a fuel gauge filling, a platformer's level assembling tile by tile, a warp drive charging — driven by the real progress value, not a bare bar under a logo. Atmosphere worth watching: staggered reveals, ambient motion, flavor text in the game's voice. There is no limit to what you can do here.
|
|
87
87
|
|
|
88
|
+
**Loading progress you can show.** The runtime reports every loading state a splash can show, in order: the scene download (`GameManager.EventBus` `"OnLoadProgress"`, "Loading scene 45%"), then on `SceneManager.OnLoaderStatusObservable` building the scene (state 1: "Building scene 40%" with a detail line such as "Building 1200 of 3908 meshes" or "Loading 120 of 177 textures"), setting up the scene (state 2: "Setting up scene"), the asset preloader (state 3: "Loading assets", then a status line naming one heavy system at a time — terrain, skins, animations, navigation, water, ray tracing — a steady detail line, and one combined scene fraction) and the shader compile (state 4: "Compiling shaders 67%", ending on "Starting scene"); the splash stays up until the scene is really ready. These are example texts — your splash does not have to use them. The page stays responsive through the whole load, so the splash's own animation keeps playing — keep it visibly moving through every stage, including the moments after a bar reaches 100%. The full table of states, the events and an example handler are in the Agent Reference [`ui-design-system.md`](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/ui-design-system.md), section *Loading progress you can show*. **You have full creative freedom.** These are the states the runtime reports, and the default splash screens show them as a status line, a bar and a corner detail line. A custom splash may present them in any way that fits the design — different wording, layout, animation, illustration, a single combined bar, per-system indicators, or none of the raw text at all. Do give the player a sense of real progress during heavy loading: show something that moves with the load (a bar, stage names, counts), never an endless "please wait".
|
|
89
|
+
|
|
90
|
+
**Never let the splash look stuck.** Whatever the design, the player should always see that loading is progressing — through every stage above, not just the download. How is entirely up to you: the runtime's own text, your own wording, stage icons, counters, a world that assembles piece by piece, one combined bar — none of the default messages are required. What matters is that something tied to the real load keeps moving, and that the splash never sits on a full bar with nothing changing (the old "Loading scene 100%" problem). To keep that progress data arriving, keep the splash's existing wiring: `SceneManager.HostDefersSceneStatus = true`, both progress subscriptions (`"OnLoadProgress"` and `SceneManager.OnLoaderStatusObservable`, removed on cleanup), and the check that stops using download progress once the toolkit reports a `state` of 1 or higher.
|
|
91
|
+
|
|
88
92
|
**ENGINE CONTRACT — splash element IDs are LAW (STRONGLY ENFORCED, zero exceptions):** the engine's runtime code shows and hides the splash screen and writes its label/status text by looking up these EXACT DOM ids/names — it cannot find renamed elements, and if it can't find them the splash NEVER hides and the scene underneath is never revealed:
|
|
89
93
|
|
|
90
94
|
- `xbabylonjsSplashScreen` — the main splash screen panel (the root element the engine shows/hides)
|
|
@@ -102,7 +106,7 @@ Any redesign of the splash MUST keep every one of these elements present with it
|
|
|
102
106
|
**Keep ONLY each surface's wiring; replace ALL of the visuals:**
|
|
103
107
|
|
|
104
108
|
- `loading.tsx` re-exports `babylonLogo` / `spinnerLogo` that `splash.tsx` imports — keep those exports (or update `splash.tsx`'s import to match).
|
|
105
|
-
- `splash.tsx` keeps its `GameManager.EventBus` `"OnLoadProgress"` subscription —
|
|
109
|
+
- `splash.tsx` keeps its `GameManager.EventBus` `"OnLoadProgress"` subscription and its `SceneManager.OnLoaderStatusObservable` subscription (both removed on cleanup) — together they are the REAL load progress; drive your metaphor from them. It also keeps `SceneManager.HostDefersSceneStatus = true` and its check that stops using download progress once the toolkit reports a `state` of 1 or higher (see *Never let the splash look stuck* above).
|
|
106
110
|
- `overlay.tsx` keeps `pointer-events: none` on its container so input reaches the canvas; only genuinely interactive elements get `pointer-events: auto`.
|
|
107
111
|
- Never delete image files from disk (`public/babylon.png` + `public/spinner.png` are framework-required, whatever your design shows).
|
|
108
112
|
- `src/chrome/**` runs in the viewer context, so it MAY import `GameManager`/`EventBus` and `useUnifiedNavigation` — through `'../babylon/…'` paths (Step 0).
|
|
@@ -123,6 +127,7 @@ Generated art goes on the LANDING PAGE — never on the splash/preloader (Step 3
|
|
|
123
127
|
- No Toolkit/BabylonJS/engine branding anywhere in the user-facing design.
|
|
124
128
|
- The play contract fires with the project's REAL GameMode class.
|
|
125
129
|
- All four surfaces read as one designed product, not four separate efforts.
|
|
130
|
+
- 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.
|
|
126
131
|
- `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.
|
|
127
132
|
|
|
128
133
|
State in one short paragraph what design direction you committed to (it is now also in `DESIGN.md`), so the next `/bt-landing` run can be briefed against it.
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ Turn a feature spec into `_specs/<feature-name>_plan.md`: an ordered checklist o
|
|
|
30
30
|
## Step 1. Analyze (required before writing)
|
|
31
31
|
|
|
32
32
|
1. Read the feature spec in full, and `SPEC.md`'s headings, Architecture, Conventions and the systems the feature touches. The plan must conform to SPEC.md — **if it would conflict, stop and tell the user.** Verification procedures described in SPEC.md are tooling you may reuse, not a bar the plan must meet. Note the spec's `spec_impact`, `size` and `proof`.
|
|
33
|
-
2. **Start from the spec's `## Research Notes
|
|
33
|
+
2. **Start from the spec's `## Research Notes`, and any bt-recon doc (`_specs/*_recon.md`) it cites or whose scope covers the systems the feature touches** — its Extension Points and End-to-End Flows usually name the integration points directly. Spot-check that the paths exist, then research only what a plan needs beyond them: how the app is built and tested, the real conventions and the closest feature to mirror, the concrete files and integration points, available dependencies, constraints from the agent instructions.
|
|
34
34
|
3. Size the research: `small` → inline; `medium` / `large` (or no Research Notes) → up to 3 **read-only** subagents returning findings and paths, not file dumps. Tell each one verbatim: *"Read-only: you may read, search and report. Do not edit or create files, and do not run builds, tests or any command that writes — not even into a build folder. If a fact needs a build or a test run to establish, report it as unknown and say which command would settle it."*
|
|
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).
|
|
@@ -83,25 +83,32 @@ Print `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …`. The file has
|
|
|
83
83
|
|
|
84
84
|
**`## Estimated execution time`** — **agent time, from the calibration below — never developer-hours, and never by adding up activities.** Builds, exports, captures and browser looks are *not* separate line items: they happen inside a task's own run and are already inside the per-task rate. Counting them separately is how a 10-hour plan gets estimated at 45 hours.
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Rate each task by the **kind of work it does** (classify tasks, not the plan — most plans mix kinds), sum, then give a range of **−30 % / +40 %**. Nothing else is added — no per-phase overhead (it did not show up in the measurements):
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
| Kind | min/task | What puts a task here |
|
|
89
|
+
| --- | --- | --- |
|
|
90
|
+
| **Code** | 8 | Code + tests, at most a quick browser look or one small scripted export. |
|
|
91
|
+
| **Live** | 18 | Proven by running it: live external APIs, browser game builds, live memory or perf runs in one engine, a visual match to a reference image. |
|
|
92
|
+
| **Unity / parity / GPU** | 35 | Authoring or re-exporting Unity content, measured parity against Unity Play mode, GPU shader backends, perf A/B across beds, exporter DLL + runtime changed together. |
|
|
91
93
|
|
|
92
|
-
**
|
|
94
|
+
- **Do not budget fix rounds.** They are inside the rates: across the 2026-10 runs about one task in four needed a second attempt, 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.
|
|
95
|
+
- **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.
|
|
96
|
+
- **Outsized work:** a task that builds a compiler or transpiler, or must prove coverage across many Unity sample projects, runs about **2×** the Unity rate (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).
|
|
97
|
+
- **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. Say so in the biggest-uncertainty line when the scope is still moving.
|
|
93
98
|
|
|
94
|
-
|
|
95
|
-
| --- | --- | --- | --- | --- |
|
|
96
|
-
| auto-exposure-parity | 8 | 3 | 1 h 19 | 9.9 |
|
|
97
|
-
| procedural-skybox | 8 | 3 | 2 h 12 | 16.5 |
|
|
98
|
-
| camera-antialiasing-parity | 11 | 4 | 2 h 56 | 16.0 |
|
|
99
|
-
| camera-antialiasing-taa | 9 | 5 | 4 h 08 | 27.5 |
|
|
100
|
-
| shuriken-particle-system (3 Unity projects, 9 promotions) | 27 | 8 | 9 h 59 | 22.2 |
|
|
99
|
+
**Calibration (measured 2026-10-07 from transcript + commit timestamps; 21 clean bt-execute runs across Runtime and AgentWorkspace, 242 tasks, waits on the user and planning subagents excluded):**
|
|
101
100
|
|
|
102
|
-
|
|
101
|
+
| Kind | Plans (min/task) | Median |
|
|
102
|
+
| --- | --- | --- |
|
|
103
|
+
| Code | effort-selector 5 · scene-loading-progress 7 · unity-gzip-sidecar-binaries 10 · texture-image-deduplication 11 | 8.5 |
|
|
104
|
+
| Live | auto-exposure-parity 10 · procedural-skybox 16 · camera-antialiasing-parity 16 · no-unbilled-usage 16 · kie-sound 16 · tool-loop 17 · media-gateways 18 · managed-agents-engine 21 · scene-dispose-memory-leaks 25 | 16.5 |
|
|
105
|
+
| Unity / parity / GPU | shuriken-particle-system 22 · unity-gui-pipeline-parity 23 · unity-export-parity-gaps 27 · camera-antialiasing-taa 28 · hdrp-raster-parity-followup 31 · hdrp-complete-parity 37 · terrain-performance 38 · hdrp-raytracing-polyfill 40 | 29 |
|
|
103
106
|
|
|
104
|
-
|
|
107
|
+
These rates put 17 of the 21 runs inside the −30 % / +40 % range and 20 of 21 within 0.6–1.6× (the old flat `tasks × 17 + phases × 10`: 13 of 21 within 0.6–1.6×), and the misses ran fast, not slow. Under the flat rate, plans estimated themselves about **2.5× too high** when the work was mostly code and up to **2× too low** when it was Unity, parity or GPU work — wrong in both directions, so classify every task.
|
|
108
|
+
|
|
109
|
+
To recalibrate later, read the `⏱` lines bt-execute writes to each `<plan>_autopilot.md` — they carry the plan's estimate, active minutes per phase and per run, and waits already separated out.
|
|
110
|
+
|
|
111
|
+
Write a table `Phase | Tasks | Kind (code / live / Unity) | What makes it slow | Estimate`, then one **Total** line in hours (days only if over ~16 h), the `--strict` multiplier, and the biggest uncertainty in one line. If the total averages above ~40 or below ~6 min per task, the estimate is wrong before the plan is: re-check it. An estimate, never a pin.
|
|
105
112
|
|
|
106
113
|
**`## How to execute this plan`** — this text verbatim:
|
|
107
114
|
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bt-recon
|
|
3
|
+
description: "The Babylon Toolkit Recon Skill deep-dives existing code — a subsystem named in a brief, or the whole codebase — and writes a comprehensive, evidence-cited technical grounding spec (`_specs/<slug>_recon.md`) plus, when the scope has UI, a plain-language user guide (`_specs/<slug>_guide.md`), for maintaining inherited or undocumented code and grounding future bt-spec features. Use when asked to document, reverse-engineer, explain, map or take over existing code (e.g. `bt-recon the &session=camera system`, `bt-recon the whole codebase`). Not a diff or bug review."
|
|
4
|
+
allowed-tools: Read, Grep, Glob, Write, Bash(git log:*), Bash(git show:*), Bash(git blame:*), Bash(git rev-parse:*), Bash(git ls-files:*), Bash(git diff:*), WebFetch(domain:raw.githubusercontent.com), AskUserQuestion, Agent, Task
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run reconnaissance on existing code nobody has documented — one subsystem or the whole codebase — and bring back everything it does as a grounding spec that `bt-spec` and `bt-plan` build future features on, plus a plain-language user guide when there is something a user operates. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
/bt-recon [--guide|--no-guide] [--no-live] [--quick] [--out <dir>] <brief>
|
|
11
|
+
/bt-recon --refresh @_specs/<slug>_recon.md
|
|
12
|
+
|
|
13
|
+
/bt-recon "the default camera system"
|
|
14
|
+
/bt-recon "the save/load pipeline"
|
|
15
|
+
/bt-recon "the whole codebase"
|
|
16
|
+
/bt-recon --no-guide "the physics layer helpers in src/physics"
|
|
17
|
+
/bt-recon --refresh @_specs/session-camera_recon.md # update an existing recon after code changes
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `--guide` — always write the user guide. `--no-guide` — never write it. Neither → write it when the scope has UI — anything a person operates (Step 8).
|
|
21
|
+
- `--no-live` — skip the live pass (Step 5) even when the brief gives a URL.
|
|
22
|
+
- `--quick` — a lighter recon: one reader per slice, no coverage audit (Step 6). The output keeps the same sections.
|
|
23
|
+
- `--out <dir>` — write the outputs to `<dir>` instead of `_specs/`.
|
|
24
|
+
- `--refresh @<recon file>` — update an existing recon against what changed since it was written (Refresh mode, at the end).
|
|
25
|
+
- Strip the flags first; they are never part of the brief or the file name. No brief → ask for one. Never guess a path or URL.
|
|
26
|
+
|
|
27
|
+
## Ground rules
|
|
28
|
+
|
|
29
|
+
- **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.
|
|
30
|
+
- **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `_specs/<slug>_recon/` — nothing else. No source edits, no builds, no installs, no tests, no shell commands beyond the read-only `git` commands above.
|
|
31
|
+
- **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.
|
|
32
|
+
- **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).
|
|
33
|
+
- **Babylon work:** if the scope uses BabylonJS or the Babylon Toolkit and you have not read the Babylon Toolkit Agent Reference in this session, fetch and read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — 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. Fetch its sub-documents only when relevant. If the fetch fails, stop and tell the user.
|
|
34
|
+
- **Say what you are doing.** Before any step that takes more than a few seconds (a search sweep, a big read, each subagent, the live pass) print one short line — `🔎 [bt-recon] <what> …` — and one when it returns. A recon runs long; a silent run looks like a hang and gets cancelled.
|
|
35
|
+
- **Subagents:** running this skill is the user's request to use them where this skill says so. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, do the work inline, slice by slice, and say so.
|
|
36
|
+
|
|
37
|
+
## Step 1. Parse the brief
|
|
38
|
+
|
|
39
|
+
From the flag-stripped brief derive `recon_title` (Title Case, e.g. `Session Camera`), `recon_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and the **scope kind**:
|
|
40
|
+
|
|
41
|
+
- **subsystem** — the brief names a feature, module, flow or mode. Pull out every **anchor**: query-string keys and values, URLs and routes, class / function / component names, UI labels, file or folder names, endpoint fragments, and the vaguer clues ("something about edge rendering", "mask images") — each clue is a search term.
|
|
42
|
+
- **codebase** — the brief asks for the whole project.
|
|
43
|
+
|
|
44
|
+
Note any URL (it enables the live pass), and any audience or emphasis hints ("focus on the CMS endpoints") — emphasis deepens a section, it never drops one. If you cannot infer a sensible title, ask.
|
|
45
|
+
|
|
46
|
+
If `_specs/<recon_slug>_recon.md` already exists, ask whether to refresh it (Refresh mode) or replace it. Never overwrite it silently.
|
|
47
|
+
|
|
48
|
+
## Step 2. Locate and map the scope
|
|
49
|
+
|
|
50
|
+
1. **Find the entry points.** Search for every anchor: where a query parameter is read, a route registered, a flag checked, a component mounted, a mode switched on. For a codebase recon, start from the build config, the package manifest, the HTML entry pages and the bootstrap modules.
|
|
51
|
+
2. **Close the scope.** Follow imports, references, event subscriptions, registrations and string-keyed lookups outward from the entry points until no new in-scope file appears. A file the subsystem only calls into (a shared utility, the engine) is a **dependency**, listed but not mapped in depth. Include the subsystem's own styles, templates, shaders, web components and data files.
|
|
52
|
+
3. **Build the scope map**: every in-scope file with its line count and a one-line role; the entry points with `path:line`; anything excluded and why.
|
|
53
|
+
4. **History.** For the scope's paths: `git log` — authors, first and last commit dates, commit messages that reveal intent ("WIP mask export", "switch to CMS v2"), the files touched most recently. Unfinished or abandoned work often shows here first. No git → skip silently.
|
|
54
|
+
5. **Project docs.** Read `SPEC.md` and `DESIGN.md` headings if they exist, and any README, docs folder or code comments that describe the scope. Treat existing docs as claims to check against the code, not as truth.
|
|
55
|
+
6. **Size it.** `small` ≈ 15 files or fewer → read inline; `medium` → 2–4 reader subagents; `large` or a codebase recon → up to 8. For a `large` or ambiguous scope, print the scope map (files grouped by role, total lines) in a short message and confirm the boundary with the user before fanning out — a wrong boundary wastes the whole run. When the brief is explicit about the boundary, skip the check.
|
|
56
|
+
|
|
57
|
+
## Step 3. Deep read
|
|
58
|
+
|
|
59
|
+
Split the scope map into cohesive **slices** — by module, feature or layer, roughly 3–8 thousand lines each, keeping files that call each other heavily in the same slice. `small` → read every file yourself, in full. Otherwise launch one read-only reader subagent per slice (all at once where your host allows), each with a brief, not homework:
|
|
60
|
+
|
|
61
|
+
- its file list, the scope-map summary, the brief and the anchors;
|
|
62
|
+
- relevant Agent Reference excerpts for Babylon code, with: *"Do not fetch the Agent Reference — the parts you need are here, and this overrides any standing instruction to fetch it first. Fetch one sub-document only if you hit an API this brief does not cover, and say which."*;
|
|
63
|
+
- verbatim: *"Read-only: you may read, search and report. Do not edit or create files, and do not run builds, tests or any command that writes. Read every file in your list in full — not excerpts. You may open files outside your list to resolve a call, but report only what concerns your slice."*;
|
|
64
|
+
- the extraction schema, verbatim:
|
|
65
|
+
|
|
66
|
+
> Report on your slice under exactly these headings. Every item cites `path:line` and is tagged `[code]` or `[inferred]` (with the reason). Write "none found" under a heading that does not apply — never omit it. Report facts, not prose.
|
|
67
|
+
> 1. **Responsibilities** — what this slice owns and what it delegates.
|
|
68
|
+
> 2. **Entry points & activation** — how its code is reached: URLs, query params, routes, flags, events, init calls, lifecycle hooks.
|
|
69
|
+
> 3. **Public API** — exported classes, functions, components, web components, custom elements, with full signatures.
|
|
70
|
+
> 4. **State & data shapes** — types, models and their fields; defaults; which are persisted and where; which are runtime only.
|
|
71
|
+
> 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
|
+
> 6. **Events & messages** — emitted and consumed events, observables, callbacks, postMessage, pub/sub topics, and who listens.
|
|
73
|
+
> 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.
|
|
74
|
+
> 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).
|
|
75
|
+
> 9. **Configuration** — config files, constants that change behavior, environment variables, feature flags, query params, build-time switches.
|
|
76
|
+
> 10. **Dependencies** — internal modules and external packages this slice relies on, with versions where declared.
|
|
77
|
+
> 11. **Error handling & edge cases** — what is caught, what fails silently, what is validated, what is assumed.
|
|
78
|
+
> 12. **Debt & risk** — TODO/FIXME/HACK comments, dead or unreachable code, commented-out features, half-finished work, duplicated logic, suspected bugs (say why).
|
|
79
|
+
> 13. **Open questions** — what you could not determine from the code, and what would settle it.
|
|
80
|
+
|
|
81
|
+
Print one line per reader going out and one per reader coming back. If a reader returns thin or uncited findings for a heading that clearly applies, re-read that part yourself — do not pass a thin finding through.
|
|
82
|
+
|
|
83
|
+
## Step 4. Trace the end-to-end flows
|
|
84
|
+
|
|
85
|
+
Merge the findings into one picture, resolving any contradiction between readers by reading the code yourself. Then trace, step by step with citations, every journey a maintainer must understand end to end — the user-visible workflows (e.g. *activate → position the camera → save the view → CMS request → reload it later*), each data round trip (load and save), each render or export pipeline from trigger to output file, and startup and teardown. These cross-slice traces are what no single reader can see. Add a Mermaid sequence or flow diagram wherever a flow has more than a handful of hops.
|
|
86
|
+
|
|
87
|
+
## Step 5. Live pass (observe only)
|
|
88
|
+
|
|
89
|
+
Runs when the brief gives a URL and your host has a browser tool (e.g. the Chrome DevTools MCP server, Playwright), unless `--no-live`.
|
|
90
|
+
|
|
91
|
+
**Observe-only, without exception.** Never click Save, Delete, Publish, Submit, Upload or anything whose handler (from Step 3) writes data. Never send, replay or let the page send a request that changes data on a real backend (POST / PUT / PATCH / DELETE) through an action of yours. Open, tab, hover, toggle a panel's visibility, pan or orbit the view — fine. Requests the page makes on its own while loading are observed, never triggered. A write path stays documented from the code and tagged `[code]`.
|
|
92
|
+
|
|
93
|
+
1. Open the URL, wait for the app to settle, and screenshot the initial state.
|
|
94
|
+
2. Open each panel, dialog and mode that safe navigation reaches (the Step 3 UI inventory is your checklist) and screenshot each one to `_specs/<slug>_recon/<nn>-<panel-slug>.png`.
|
|
95
|
+
3. Record the network requests the page makes: real endpoint URLs, status codes, and the response shapes of the reads (field names and types — never copy secrets, tokens or personal data into the docs).
|
|
96
|
+
4. Record console errors and warnings.
|
|
97
|
+
5. Reconcile: upgrade each claim the run confirmed to `[live]`; flag every contradiction between code and runtime in the doc — a contradiction usually means a stale code path or a different deployed build, and is worth recording either way.
|
|
98
|
+
|
|
99
|
+
The app is not reachable → print how to start it (from the package scripts or README), record that in the doc header as `live: no (<reason>)`, and continue from the code.
|
|
100
|
+
|
|
101
|
+
## Step 6. Coverage audit (skipped under `--quick`)
|
|
102
|
+
|
|
103
|
+
Draft the recon doc (Step 7 template) in your context, then launch one fresh read-only auditor subagent with the draft, the scope map and this charter, verbatim:
|
|
104
|
+
|
|
105
|
+
*"You are auditing a recon document of existing code against the code itself. Read-only: do not edit or create files. (1) Inventory the scope yourself — every exported symbol, UI control handler, network call, storage key, query param, config key, event and render/export output in the listed files — and list each one the draft does not mention. (2) Pick at least 20 cited claims spread across the sections and check each against its `path:line`; report every citation that is wrong or does not support the claim. (3) List every factual claim with no citation or with the wrong confidence tag, and every section that says 'none found' when the code has something. (4) List every place the draft guesses, hedges ('probably', 'seems to') or generalizes without evidence. Report `section · item · what is wrong or missing`. Change nothing."*
|
|
106
|
+
|
|
107
|
+
Fix every gap — re-read the source rather than trusting the auditor's summary — and move what still cannot be settled into `## Unknowns`. One pass.
|
|
108
|
+
|
|
109
|
+
## Step 7. Write the recon doc
|
|
110
|
+
|
|
111
|
+
Print `✍️ [bt-recon] Writing _specs/<slug>_recon.md …` and write it to `_specs/<slug>_recon.md` (or `--out`). Get the header `commit` from `git rev-parse --short HEAD` (no git → `commit: n/a`).
|
|
112
|
+
|
|
113
|
+
Include every section. A section that genuinely does not apply says so in one line (`No network I/O in this scope [code].`) — never delete the heading, so the next reader knows it was checked. For a codebase recon with more than about 6 major systems, make this file the index (header, Summary, Architecture, End-to-End Flows, Known Issues, Extension Points, History, Unknowns, Files Reviewed) and give each system its own chapter at `_specs/<slug>_recon/<system-slug>.md` using the same template.
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
# Recon: <recon_title>
|
|
117
|
+
|
|
118
|
+
scope: <the brief, one line> · kind: <subsystem|codebase>
|
|
119
|
+
commit: <short sha> · date: <YYYY-MM-DD> · files: <n> (<total> lines)
|
|
120
|
+
guide: <_specs/<slug>_guide.md | none> · live: <yes | no (<reason>)>
|
|
121
|
+
confidence tags: [code] read in source · [live] seen running · [history] from git · [inferred] deduced
|
|
122
|
+
|
|
123
|
+
## Summary
|
|
124
|
+
<What it is, who uses it, why it exists, and its current state (finished / partial / abandoned parts), in one or two paragraphs.>
|
|
125
|
+
|
|
126
|
+
## How to Activate
|
|
127
|
+
<URLs, query params, routes, flags, entry calls — exactly how to get into it, with examples.>
|
|
128
|
+
|
|
129
|
+
## Architecture
|
|
130
|
+
<Module map table: path · role · lines. A component/module diagram. Lifecycle: init → run → teardown.>
|
|
131
|
+
|
|
132
|
+
## Feature Inventory
|
|
133
|
+
### <Feature>
|
|
134
|
+
- Purpose · Trigger · Behavior · Code path (`path:line` chain) · Data read/written · Status (working / partial / dead)
|
|
135
|
+
|
|
136
|
+
## UI Reference
|
|
137
|
+
### <Panel or dialog>
|
|
138
|
+
<When it appears, how it opens and closes, screenshot link if live.>
|
|
139
|
+
| Control | What it does | Handler |
|
|
140
|
+
| --- | --- | --- |
|
|
141
|
+
|
|
142
|
+
## Data Model & State
|
|
143
|
+
<Types and fields, defaults, persisted vs runtime, serialization formats, example payloads.>
|
|
144
|
+
|
|
145
|
+
## External Interfaces
|
|
146
|
+
| Method | URL | Request | Response | Auth | Errors |
|
|
147
|
+
| --- | --- | --- | --- | --- | --- |
|
|
148
|
+
<Storage keys and file outputs.>
|
|
149
|
+
|
|
150
|
+
## Rendering & Pipelines
|
|
151
|
+
<Cameras, render targets, passes, shaders, image exports — what each output is, how it is made, what it encodes, where it goes.>
|
|
152
|
+
|
|
153
|
+
## Configuration
|
|
154
|
+
<Every switch that changes behavior, its default, where it is read.>
|
|
155
|
+
|
|
156
|
+
## End-to-End Flows
|
|
157
|
+
<The Step 4 traces, numbered steps with citations, plus diagrams.>
|
|
158
|
+
|
|
159
|
+
## Dependencies
|
|
160
|
+
<Internal modules and external packages (with versions) this scope relies on, and what for.>
|
|
161
|
+
|
|
162
|
+
## Error Handling & Edge Cases
|
|
163
|
+
|
|
164
|
+
## Known Issues & Tech Debt
|
|
165
|
+
<Bugs, silent failures, TODO/FIXME, dead code, half-finished work, risks — each with a citation and severity.>
|
|
166
|
+
|
|
167
|
+
## Extension Points
|
|
168
|
+
<For each kind of change a future feature is likely to make (a new panel, a new output type, a new endpoint, a new saved field…): where it plugs in, the pattern to mirror (`path:line`), and what else must change with it.>
|
|
169
|
+
|
|
170
|
+
## History
|
|
171
|
+
<Authors, timeline, notable commits and what they reveal about intent and unfinished work.>
|
|
172
|
+
|
|
173
|
+
## Glossary
|
|
174
|
+
<Every domain term, acronym and in-code name a newcomer will meet.>
|
|
175
|
+
|
|
176
|
+
## Unknowns
|
|
177
|
+
- <what is unknown> — <why> — <what would settle it>
|
|
178
|
+
|
|
179
|
+
## Files Reviewed
|
|
180
|
+
<The full scope map: path · lines · role. Excluded files and why.>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Step 8. Write the user guide (when the scope has UI)
|
|
184
|
+
|
|
185
|
+
Write `_specs/<slug>_guide.md` when the scope has anything a person operates — panels, controls, modes, gestures, outputs they use — or with `--guide`; skip it under `--no-guide` or when there is no UI (and set `guide: none` in the recon header). Print `✍️ [bt-recon] Writing _specs/<slug>_guide.md …`.
|
|
186
|
+
|
|
187
|
+
The reader has never seen the feature and does not read code: plain language, no code, no `path:line`, every term explained on first use. It must agree with the recon doc — it is the same facts told as tasks. Use the live screenshots wherever they exist (relative links into `_specs/<slug>_recon/`). Anything the recon could not confirm is stated with a short caveat rather than presented as certain.
|
|
188
|
+
|
|
189
|
+
```markdown
|
|
190
|
+
# <recon_title> — User Guide
|
|
191
|
+
|
|
192
|
+
## What it's for
|
|
193
|
+
<What you can do with it, and why you would — in a paragraph a newcomer understands.>
|
|
194
|
+
|
|
195
|
+
## Getting started
|
|
196
|
+
<How to open it, step by step, with an example URL. What you see first.>
|
|
197
|
+
|
|
198
|
+
## A tour of the screen
|
|
199
|
+
<Every area of the screen, what it is for. Screenshots.>
|
|
200
|
+
|
|
201
|
+
## Panel by panel
|
|
202
|
+
### <Panel>
|
|
203
|
+
<What it is for, then every control: what it does, when to use it, what you see happen.>
|
|
204
|
+
|
|
205
|
+
## How do I…
|
|
206
|
+
### <task, e.g. "save the current view so I can load it later">
|
|
207
|
+
1. <step> …
|
|
208
|
+
<What success looks like. Common mistakes.>
|
|
209
|
+
|
|
210
|
+
## Concepts explained
|
|
211
|
+
<The ideas behind the outputs and modes — e.g. what each kind of mask or render shows, what it is used for, how it differs from the others, and how your choices in the scene change it.>
|
|
212
|
+
|
|
213
|
+
## Troubleshooting
|
|
214
|
+
<Symptom → cause → fix.>
|
|
215
|
+
|
|
216
|
+
## FAQ
|
|
217
|
+
|
|
218
|
+
## Glossary
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Step 9. Report
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
Recon: _specs/<slug>_recon.md
|
|
225
|
+
Guide: _specs/<slug>_guide.md | none (<why>)
|
|
226
|
+
Scope: <n> files, <total> lines · live: <yes|no>
|
|
227
|
+
Claims: <n> [code] · <n> [live] · <n> [history] · <n> [inferred] · <n> unknowns
|
|
228
|
+
Top risks: <three one-liners from Known Issues>
|
|
229
|
+
Next: /bt-spec "<a feature>" — bt-spec reads this recon as grounding. Re-run with --refresh after code changes.
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
If the scope was the whole codebase and `SPEC.md` is missing or an empty stub, offer once to seed it from the recon using bt-spec's Project SPEC.md scaffold — the short, current-state summary (architecture, systems, conventions, dependencies); the recon keeps the depth. Do not print the docs unless asked.
|
|
233
|
+
|
|
234
|
+
## Refresh mode (`--refresh @<recon file>`)
|
|
235
|
+
|
|
236
|
+
1. Read the recon's header (`commit`, `scope`, `kind`) and its `## Files Reviewed`.
|
|
237
|
+
2. `git diff --stat <commit>..HEAD -- <reviewed files>`, plus a search for the original anchors to find new in-scope files. No git, or `commit: n/a` → treat every file as changed and say so.
|
|
238
|
+
3. Nothing changed → say so and stop.
|
|
239
|
+
4. Re-run Steps 3–6 for the changed and new files only, re-tracing any End-to-End Flow that passes through them, and the live pass if the recon had one and the UI changed.
|
|
240
|
+
5. Update the affected sections in place; set `commit` and `date` to now; update `## Files Reviewed`; append `## Changelog` (create it at the end on the first refresh): `- <date> · <old sha>..<new sha> · <what changed in the system, one line per change>`. Refresh the guide's affected sections too.
|
|
241
|
+
6. Report as in Step 9, plus the changelog lines.
|
package/skills/bt-spec/SKILL.md
CHANGED
|
@@ -39,6 +39,7 @@ Git is optional. **Where git is available:** stop now if the working tree has un
|
|
|
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
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.
|
|
42
|
+
- **Recon docs (`_specs/*_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`.
|
|
42
43
|
- **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.
|
|
43
44
|
|
|
44
45
|
## Step 3. Sibling-skill patterns
|