@babylonjs-toolkit/agent 1.1.33 → 1.1.34

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 CHANGED
@@ -1,4 +1,4 @@
1
- # Babylon Toolkit Desktop Agent (1.1.33)
1
+ # Babylon Toolkit Desktop Agent (1.1.34)
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs-toolkit/agent",
3
- "version": "1.1.33",
3
+ "version": "1.1.34",
4
4
  "description": "Installs the Babylon Toolkit Desktop Agent for Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity.",
5
5
  "keywords": [
6
6
  "babylonjs",
@@ -29,7 +29,7 @@ Turn a feature spec into `_specs/<feature-name>_plan.md`: an ordered checklist o
29
29
 
30
30
  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`.
31
31
  2. **Start from the spec's `## Research Notes`.** 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.
32
- 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.
32
+ 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."*
33
33
  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.
34
34
  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).
35
35
 
@@ -41,11 +41,12 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
41
41
 
42
42
  1. **Tasks are real units of work** — something a developer would commit on its own, with its tests. Guide: `small` 1–3 tasks, `medium` 3–8, `large` as needed. Merge tasks that touch the same code for the same purpose; split only when a task would not fit in one sitting. Going well past the guide needs a one-line reason in Codebase Analysis.
43
43
  2. **Phases.** Group tasks under `### Phase N — <name>`. bt-execute runs one independent verifier per phase. Small plan = one phase; otherwise 2–4 related tasks ending at a natural checkpoint.
44
- 3. **`Verify level`** per task: `standard` (build, named tests, diff review) or `live` (needs the dev server, a browser, Unity or Blender to observe). Mark `live` whenever correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity. The last feature task carries one `live` end-to-end check of the whole feature when it has anything on screen — write it into that task's Acceptance, not as a separate task; a read-and-confirm check likewise belongs in the Acceptance of the task that made the change. bt-execute's verifier performs the live checks. If a live check may be impossible where the plan runs (needs credentials, data or hardware), say in the task what to report instead.
44
+ 3. **`Verify level`** per task: `standard` (build, named tests, diff review) or `live` (needs the dev server, a browser, Unity or Blender to observe). Mark `live` whenever correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity. The last feature task carries one `live` end-to-end check of the whole feature when it has anything on screen — write it into that task's Acceptance, not as a separate task; a read-and-confirm check likewise belongs in the Acceptance of the task that made the change. bt-execute's verifier performs the live checks, and does all of a phase's live tasks in **one** session. So mark as many tasks `live` as truly need it, but never schedule a capture, screenshot or page session **per task** in the Steps — the phase gets one session covering all of them, and any second engine or full-resolution pass happens once, in the final end-to-end task. A plan with more planned looks than phases is the single most expensive mistake this skill can make. If a live check may be impossible where the plan runs (needs credentials, data or hardware), say in the task what to report instead.
45
45
  4. **Named tests** with expected outcomes for every task that has a testable surface. No probe suites, fuzzing or mutation testing unless the risk calls for it.
46
46
  5. **Functional proof by default:** unit tests; for anything on screen, one look per visual phase — the running result in the browser, judged against the spec and DESIGN.md, or beside a reference image when one exists (a mockup, the original site, the Unity view) — on one browser/engine at reduced resolution, with any second engine checked once in the final end-to-end task; cheap value fixtures sampled once from a reference implementation where there is one. Keep Acceptance to what a user of the feature would notice. **Numeric parity gates** (pixel thresholds, repeats, several engines) only under `--parity` / `proof: parity` or when the brief states a number — and then planned to run once per phase (iteration inside the phase uses the quick look), never loosened.
47
- 6. **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.
48
- 7. **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".
47
+ 6. **Proportional safety.** When the spec requires a safety outcome (nothing unfinished reaches the user's folders, the app keeps working between tasks), pick the cheapest mechanism that achieves it — normally a feature branch, a build output the user's folders do not read, and one copy across at the end after the live check. Version control is the archive. Add staged promotions, per-step archives or hash records only if the brief asks for them by name.
48
+ 7. **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.
49
+ 8. **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".
49
50
 
50
51
  ## Step 3. Write the plan
51
52
 
@@ -76,7 +77,18 @@ Print `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …`. The file has
76
77
  - Verify level: standard
77
78
  ```
78
79
 
79
- **`## Estimated execution time`** — a table `Phase | Tasks | Build | Prove | Estimate` (Build = code and tests; Prove = exports, captures, comparisons, fix-until-green), then one **Total** range in hours (days if over ~16 h) = the sum of the phases plus 20–40 % for fix loops, the `--strict` multiplier (~2–3×), what would cut Prove if it exceeds Build, and the biggest uncertainty. Rates per phase (whole-phase figures; split each into Build and Prove by what the phase does): code + unit tests 15–25 min · adds a C#/native build or a full test chain 30–45 min · adds Unity authoring/bake/export or browser captures 45–90 min · a visual fix-until-green loop 1–3 h. An estimate, never a pin.
80
+ **`## Estimated execution time`** — **agent time, computed from the measured rates below — never from how long a developer would take.** An agent writes a 500-line module with its tests in about ten minutes; what costs time is running things. Count, per phase:
81
+
82
+ | What the phase contains | Measured agent time |
83
+ | --- | --- |
84
+ | each code + unit-test task (any language) | 5–10 min |
85
+ | each task that also rebuilds a native/C# library or runs a full test chain — once per task, however many builds it runs | + 10–20 min |
86
+ | each Unity / Blender **Editor operation** — one authoring pass, one bake, one export, one capture (count a job that authors dozens of objects as 2–3) | + 15–30 min |
87
+ | each live look — one **scene × engine page session**, not one screenshot; a build that exists only to serve a look is already inside this rate | + 10–20 min |
88
+ | a visual "adjust until it looks right" loop — only where the plan says it expects to iterate on a picture | + 45–90 min |
89
+ | the phase's independent verifier (counts under Prove) | + 5–10 min |
90
+
91
+ Write a table `Phase | Tasks | Build | Prove | Estimate` (Build = code and tests; Prove = exports, captures, looks, adjust-until-right), then one **Total** = the sum plus 20–40 % for fix loops, in hours (days only if over ~16 h), the `--strict` multiplier (~2–3×), what would cut Prove if it exceeds Build, and the biggest uncertainty. If the total exceeds ~1 h per task, re-check it against the table. Usual causes: developer-hours thinking in the Build column; ceremony the brief did not ask for; or per-task captures that rule 5 says to batch. If the cost is load-bearing work the brief *did* ask for, say so in one line and keep the number. An estimate, never a pin.
80
92
 
81
93
  **`## How to execute this plan`** — this text verbatim:
82
94
 
@@ -85,6 +85,9 @@ proof: <functional|parity>
85
85
 
86
86
  ## Functional Requirements
87
87
  - ... <!-- sibling-skill behavioral config goes here verbatim, separate from route/scope -->
88
+ <!-- State the outcome, not the machinery: "an unfinished build never reaches a folder the
89
+ user looks at", not "a nine-step gated promotion script with archives and md5 records".
90
+ The plan picks the cheapest mechanism that gets the outcome. -->
88
91
 
89
92
  ## Design System Reference (only if the feature has UI)
90
93
  - DESIGN.md tokens/components used: ...
@@ -139,8 +142,9 @@ Do not print the spec unless asked.
139
142
  - Use Babylon Toolkit script component patterns rather than ad-hoc BabylonJS wiring, per the Agent Reference.
140
143
  - Keep game systems modular.
141
144
 
142
- ## Decisions _(append-only log)_
143
- - _(Newest last. To reverse a decision, add a new entry that supersedes it.)_
145
+ ## Decisions _(the decisions that still bind — one or two lines each)_
146
+ - _(Newest last. When a decision is superseded, fold what still matters into the sections
147
+ above and drop the old entry; the feature's own spec keeps the full rationale and history.)_
144
148
 
145
149
  ## Dependencies _(current-state — replace/merge)_
146
150
  - **BabylonJS** — engine.
@@ -148,7 +152,7 @@ Do not print the spec unless asked.
148
152
 
149
153
  ## How to update this spec
150
154
  - `(current-state — replace/merge)` sections say what is true now: replace seed placeholders with real content, then keep them matching the shipped code.
151
- - `(append-only log)`: append, never delete.
155
+ - `Decisions` holds only what still binds the current design, briefly. A decision's full rationale, its rejected alternatives and its history live in that feature's spec in `_specs/`, not here — this file must stay short enough to read before every feature.
152
156
  - Add each new Game System as its own subsection; record every new dependency (version + why) in the task that introduces it.
153
157
  - bt-spec reads this file and aligns the feature to it; bt-plan conforms to it and adds an `Update SPEC.md` task for spec-impacting features; bt-execute runs that task through the same verifier as every other task.
154
158
  ```