@babylonjs-toolkit/agent 1.1.36 → 1.1.42

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.
@@ -1,8 +1,19 @@
1
1
  # Pipeline: `unity`
2
2
 
3
3
  **Deliverable:** anything authored in Unity and shipped through the Babylon Toolkit exporter as interactive
4
- glTF — a whole game level, or an individual asset in it. Baked GI, IBL, reflection probes, terrain, fog and
5
- tonemapping for scenes; geometry, UVs, PBR maps, LODs and skinning for models.
4
+ glTF — a whole game level, or an individual asset in it. Baked GI, IBL, light and reflection probes, terrain,
5
+ fog, post-processing volumes, physics, the Recast navmesh, Animator state machines and gameplay components for
6
+ scenes; geometry, UVs, PBR maps, LODs and skinning for models.
7
+
8
+ > ### Unity is the editor; BabylonJS is the engine
9
+ >
10
+ > Nothing here builds a Unity game or player. The level is authored in the Unity Editor exactly as a detailed
11
+ > Unity game level would be — a Mario Kart-style track, a harbour, a landscape — and exported to glTF, where the
12
+ > toolkit runtime recreates every subsystem. **The goal is Unity→Babylon parity.** So build the level in Unity,
13
+ > judge it in Unity every round, and **count on the parity** — confirming it with browser checkpoints at
14
+ > **milestones** (§ 6.B), not every round. How each feature crosses (directly, by a bake, or by a toolkit
15
+ > equivalent) is the Agent Reference's
16
+ > [Unity Authoring Recipes](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/unity-authoring-recipes.md) §0.
6
17
 
7
18
  > ### Unity is the content-creation tool and the asset manager. Blender is a tool inside it.
8
19
  >
@@ -17,9 +28,10 @@ tonemapping for scenes; geometry, UVs, PBR maps, LODs and skinning for models.
17
28
  > and it is judged there, lit by that scene. Blender **cannot** write components — those come from Unity,
18
29
  > and only under a Pro licence.
19
30
  >
20
- > **The loop stays in Unity. Do NOT export every round.** Evidence is a Unity camera snapshot —
21
- > `Camera.Render()` straight to a PNG from the locked camera. A bake → export → dev-server → browser round
22
- > trip on every iteration costs minutes and tells the critic nothing extra about the art.
31
+ > **The loop stays in Unity. Do NOT export every round.** Evidence is a Unity camera snapshot of the locked
32
+ > camera (§ 6.A). A bake → export → dev-server → browser round trip on every iteration costs
33
+ > minutes and tells the critic nothing extra about the art. **Do export at milestones** — round 1, whenever a
34
+ > major part group passes, and the final integration pass — so parity is confirmed as the level grows.
23
35
  >
24
36
  > **Export when you are ready** — the user's call, by prompt or from the Unity Export buttons: the whole
25
37
  > scene as a **game level** (`selection == null`, full scene metadata), or one asset as an **asset
@@ -28,6 +40,7 @@ tonemapping for scenes; geometry, UVs, PBR maps, LODs and skinning for models.
28
40
 
29
41
  > **Required reading before round 1.** Fetch and read the Agent Reference's
30
42
  > [Unity Exporter Instructions](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/unity-exporter-cli.md)
43
+ > and [Unity Authoring Recipes](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/unity-authoring-recipes.md)
31
44
  > in full — and, for any round that touches Blender, the
32
45
  > [Blender Headless CLI Instructions](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/unity-blender-cli.md).
33
46
  > Section numbers below (§4B, §8, §10 …) refer to whichever is named. Builder subagents must be given them
@@ -46,11 +59,11 @@ unity command bt_status --project-path "$PROJ"
46
59
 
47
60
  | Must be true | Why it is fatal |
48
61
  |---|---|
49
- | `pro : True` | **Community silently drops Terrain**, plus Rigidbody, Animator, AudioSource, NavMeshAgent, CharacterController, ParticleSystem, Canvas, VideoPlayer, **PostProcess volumes** and **LOD groups**. The export still succeeds and still writes scene metadata — it just quietly omits them. See §0. |
62
+ | `pro : True` | **Community silently drops Terrain**, every physics and collision block, the Animator state machine, AudioSource, NavMeshAgent, CharacterController, ParticleSystem, Canvas, VideoPlayer, **PostProcess volumes**, camera AA and **LOD groups**. The export still succeeds and still writes scene metadata — it just quietly omits them. See §0. |
50
63
  | An Editor is reachable | `unity command` needs a live Editor (§6). |
51
- | **A graphics device is available** | In-loop evidence is a real Unity render. `-nographics` has **no** graphics device and cannot render, so this pipeline runs in **copilot mode** (a resident Editor) or batchmode *with* graphics — never `-nographics`. Verify on round 1 by taking one snapshot and confirming the PNG is non-empty. |
64
+ | **The Editor can render the locked cameras** | In-loop evidence is a real Unity render. `-nographics` has no graphics device. With the URP **GPU Resident Drawer** on, camera captures showed **only the skybox** (a failed drawer registration hides every renderer). Run the Editor **with graphics** (copilot resident Editor, or a GUI Editor via `unity open` + `set_autotick --enable true`) and the drawer **off**: `unity command eval 'return RenderPathTools.DisableResidentDrawerReport();'` (the §4B bootstrap does it). Verify on round 1 that the snapshot shows **scene geometry**, not just sky. |
52
65
  | All three packages installed | `com.unity.pipeline` + `org.khronos.unitygltf` + `com.babylontoolkit.editor` (§4.1). |
53
- | Scene Exporter panel bootstrapped once, in a GUI session | Seeds layers, FreeImage, shader list and root namespace, and writes `package.json` (§5.1). **A cold machine that has never run the GUI cannot start a gauntlet.** |
66
+ | Scene Exporter bootstrap has run | Seeds layers, FreeImage, shader list and root namespace, and writes `package.json` (§5.1). Headless is fine: the `bt-bootstrap.cs` script (§4B) replicates the panel's `OnEnable`. |
54
67
  | `npm install` run in the project root | Any build with `CompileProjectScript` needs the local `tsc` (§5.2). |
55
68
  | `unity list --format json \| grep bt_` returns the eight `bt_*` commands | The shipped CLI bridge (`com.babylontoolkit.editor` 9.22.3+, §11). If empty: `recompile` + `recompile_status`. |
56
69
  | `baking : False` | A lightmap bake in progress hard-blocks every export. |
@@ -83,16 +96,16 @@ blender -b --factory-startup --python-exit-code 1 \
83
96
  ```markdown
84
97
  # Pipeline — unity
85
98
  Unity project : /abs/path/UnityProject
86
- Editor mode : copilot (resident GUI) <- REQUIRED; -nographics cannot render
99
+ Editor mode : copilot (graphics on, GPU Resident Drawer off) <- REQUIRED; -nographics cannot render
87
100
  Editor version: 6000.5.10f1
88
101
  Toolkit : 9.22.3 licence: professional
89
102
  Scene : Assets/Scenes/Level01.unity <- authored, rendered and judged here
90
103
  Export root : /abs/path/UnityProject/Export
91
104
  Dev server : http://localhost:8888 (started via bt_devserver_start)
92
- Player page : /index.html?scene=level01.gltf (needs a web-project build — § 6.B)
105
+ Player page : /index.html?scene=Level01.gltf (needs a web-project build — § 6.B)
93
106
  Bake tier : preview | production
94
- Capture mode : unity-snapshot (in-loop) · export+browser (checkpoints only)
95
- Checkpoints : round 1 calibration done [y/n] · last checkpoint round N
107
+ Capture mode : unity-snapshot (in-loop) · export+browser (milestone checkpoints)
108
+ Checkpoints : round 1 calibration done [y/n] · milestones: <part groups> · last checkpoint round N
96
109
  Blender : 5.1.2 (/Applications/Blender.app/Contents/MacOS/Blender) [if in scope]
97
110
  Model assets : Assets/Models/mech.fbx — write mode IN PLACE, backup mech.fbx.bak
98
111
  ```
@@ -108,9 +121,16 @@ Everything runs against the **live active scene** through the CLI. The Editor ke
108
121
  sync; raw file edits cannot.
109
122
 
110
123
  ```bash
111
- unity command eval_file /tmp/round-12-lighting.cs --project-path "$PROJ" --format json
124
+ # builders: a real .cs file (using directives allowed), run with a long timeout — Unity Editor Commands §5.1
125
+ unity command run_script --file AgentScripts/Round12Lighting.cs --entry Round12Lighting.Build \
126
+ --timeout_ms 300000 --timeout 300 --project-path "$PROJ" --format json
127
+ # one-liners: unity command eval '...' (no using directives; ~5 s main-thread limit)
112
128
  ```
113
129
 
130
+ Prefer the typed commands (`create_gameobject`, `set_component_properties`, `set_lighting_settings`,
131
+ `bake_lighting`, `create_animator_controller`, …) where one exists. Check `data.result.success` on
132
+ `run_script` — a compile error still returns an outer `success: true`.
133
+
114
134
  > ⚠️ **Never hand-edit `.unity`, `.prefab` or `.asset` YAML while a live Editor is reachable.** fileIDs and
115
135
  > GUIDs are easy to get wrong, the Editor will not see the change until a reimport, and it is very easy to
116
136
  > write valid-looking YAML into the wrong scene. Only edit files directly when `unity status` /
@@ -237,12 +257,18 @@ Round 1 records the checklist in `progress.md`. A job takes the scene block, the
237
257
  | **Blockout & composition** | major masses, silhouette, sightlines, framing at each locked camera | geometry |
238
258
  | **Set dressing & scatter** | props, clutter, decals, LOD groups | geometry, LOD (**Pro-gated**) |
239
259
  | **Materials & surfacing** | albedo/roughness/metallic/normal, texel density, wear | materials, textures |
240
- | **Light rig** | sun angle + colour temp, practicals, shadow distance and softness | `light`, `sunposition`, `sunrotation` |
241
- | **GI / lightmap bake** | lightmapper, resolution, bounces, denoiser, AO, UV padding | `ambientlightmap`, `lightmaplevel`, lightmap textures |
260
+ | **Light rig** | sun (Mixed) angle + colour temp, Baked fills and practicals, shadow distance and softness | `light` components, `sunposition`, `sunrotation` — Baked lights cross as lightmaps + probes |
261
+ | **GI / lightmap bake** | lightmapper, mixed-lighting mode, resolution, bounces, denoiser, AO, UV padding | `lightmapbakemode`, `shadowmaskmode`, lightmap + shadowmask textures |
262
+ | **Light probes** | `LightProbeGroup` / APV coverage wherever dynamic objects move | `lightprobes` + `<scene>.lightprobes.bin`, `TOOLKIT.LightProbeNetwork` |
242
263
  | **IBL / skybox / ambient** | skybox material or cubemap, ambient mode/source, SH, sky reflections | `skybox`, `skyreflections`, `createpolynomials`, `ambientlighting`, `ambientskymode`, `ambientskysource`, `ambientskycolor`, `ambientgroundcolor`, `ambientlightintensity` |
243
264
  | **Reflection probes** | placement, resolution, box projection, intensity | `reflectionprobeintensity` |
244
265
  | **Atmosphere & fog** | fog type/mode/colour/density, height fog, volumetrics | `fogtype`, `fogmode`, `fogcolor`, `fogdensity`, `fogstart`, `fogend`, `fogvolumetric`, `fogbaseheight`, `fogmaximumheight`, `fogmeanfreepath`, `foganisotropy` |
245
266
  | **Image processing** | exposure, tonemapping, gamma, clear colour | `exposure`, `tonemapping`, `gammacorrection`, `imageprocessing`, `clearcolor` |
267
+ | **Post-processing volumes** | grade, bloom, vignette, DOF, AA on the camera | `TOOLKIT.PostProcessor` components (the whole colour grade baked to a LUT), camera `antialiasing` (**Pro-gated**) |
268
+ | **Navigation** | walkable surfaces, agent radius/height/slope, the toolkit **Recast** bake | `navigation.prebaked` → `scenes/<scene>.nav.bin` |
269
+ | **Physics & colliders** | colliders, rigidbodies, physics materials, triggers, vehicles (`RaycastWheel`) | node `physics` / `collision`, `TOOLKIT.RigidbodyPhysics` (**Pro-gated**) |
270
+ | **Animation & FX** | Animator controllers, particles, audio sources | `TOOLKIT.AnimationState`, `ShurikenParticles`, `AudioSource` (**Pro-gated**) |
271
+ | **Gameplay components** | TypeScript script components (e.g. the racing starter's checkpoints, track manager, kart controllers) | `extras.metadata.components` `script` entries |
246
272
  | **Perf & budget** | draw calls, texture format, lightmap memory, render groups | `webptextures`, `ktxtextures`, `webplightmaps`, `ktxlightmaps`, `rendergroups`, `freezeactivemeshes`, `prewarmup`, `performancepriority` |
247
273
 
248
274
  ### Asset parts (Blender + Unity)
@@ -271,10 +297,13 @@ Two modes. **Almost every round uses mode A.**
271
297
  #### 1. Bake
272
298
 
273
299
  ```bash
274
- unity command eval 'UnityEditor.Lightmapping.BakeAsync(); return "started";' --project-path "$PROJ"
275
- unity command eval 'return UnityEditor.Lightmapping.isRunning;' --project-path "$PROJ" # poll to False
300
+ unity command bake_lighting --project-path "$PROJ"
301
+ until unity command lighting_bake_status --project-path "$PROJ" --result-only 2>/dev/null | grep -q completed; do sleep 5; done
302
+ unity command save_scene --project-path "$PROJ"
276
303
  ```
277
304
 
305
+ (`--result-only` prints the status as a JSON-encoded string — match `completed` without quotes.)
306
+
278
307
  **Bake tiering is the dominant cost** now that the export is out of the loop. Converge on a **preview** tier
279
308
  (low lightmap resolution, few bounces, fast/no denoiser); switch to **production** only for the final rounds
280
309
  and the integration pass. Record the tier in `progress.md` and every round journal — *a preview-tier score is
@@ -283,36 +312,23 @@ entirely on rounds that change nothing GI-dependent (a roughness tweak, a prop m
283
312
 
284
313
  #### 2. Snapshot the locked camera
285
314
 
286
- Render the actual camera through the actual pipeline, straight to a PNG. No export, no server, no browser.
287
-
288
- ```csharp
289
- // eval_file: snapshot one locked camera to disk
290
- string camName = "gauntlet_hero";
291
- string outPath = "/abs/_gauntlet/<name>/evidence/round-12-p7-hero.png";
292
- int w = 1920, h = 1080;
293
-
294
- var go = UnityEngine.GameObject.Find(camName);
295
- if (go == null) throw new System.Exception("locked camera missing: " + camName);
296
- var cam = go.GetComponent<UnityEngine.Camera>();
297
-
298
- var rt = new UnityEngine.RenderTexture(w, h, 24, UnityEngine.RenderTextureFormat.ARGB32);
299
- rt.antiAliasing = 8;
300
- var prevTarget = cam.targetTexture; var prevActive = UnityEngine.RenderTexture.active;
301
- cam.targetTexture = rt;
302
- cam.Render();
303
- UnityEngine.RenderTexture.active = rt;
304
- var tex = new UnityEngine.Texture2D(w, h, UnityEngine.TextureFormat.RGB24, false);
305
- tex.ReadPixels(new UnityEngine.Rect(0, 0, w, h), 0, 0);
306
- tex.Apply();
307
- UnityEngine.RenderTexture.active = prevActive; cam.targetTexture = prevTarget;
308
- System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(outPath));
309
- System.IO.File.WriteAllBytes(outPath, tex.EncodeToPNG());
310
- UnityEngine.Object.DestroyImmediate(tex); rt.Release(); UnityEngine.Object.DestroyImmediate(rt);
311
- return "wrote " + outPath + " bytes=" + new System.IO.FileInfo(outPath).Length;
315
+ Render the actual camera through the actual pipeline, straight to a PNG (§ 1). No export, no server, no
316
+ browser. `capture_game_view` renders a named camera through URP; without `--save_path` it returns the PNG
317
+ inline, so decode it to wherever the evidence lives (a `--save_path` would land under `Assets/` and be imported):
318
+
319
+ ```bash
320
+ unity command capture_game_view --camera gauntlet_hero --width 1920 --height 1080 \
321
+ --project-path "$PROJ" --result-only | jq -r .base64 | base64 -d \
322
+ > "_gauntlet/<name>/evidence/round-12-p7-hero.png"
323
+ file "_gauntlet/<name>/evidence/round-12-p7-hero.png" # PNG image data, 1920 x 1080
312
324
  ```
313
325
 
314
- Repeat per locked camera. **Check the returned byte count** — a zero-length or tiny PNG means no graphics
315
- device (§ 1), not a dark scene.
326
+ > Do not hand-roll `Camera.Render()` into a `RenderTexture` from `eval`: under URP in a batch Editor that
327
+ > wrote an **all-black** frame, while `capture_game_view` of the same camera rendered the lit scene
328
+ > (verified, Unity 6000.5.10f1).
329
+
330
+ Repeat per locked camera. **Look at the image** — an empty file means no graphics device, and a sky-only
331
+ frame means the GPU Resident Drawer is on (§ 1), not a dark or empty scene.
316
332
 
317
333
  #### 3. Collect what Unity can measure
318
334
 
@@ -324,23 +340,31 @@ BabylonJS perf gate**; they catch a scene going wildly heavy, they do not predic
324
340
 
325
341
  That is the whole in-loop verify. Seconds, not minutes.
326
342
 
327
- ### 6.B Checkpoint verification — export + browser (rare, deliberate)
343
+ ### 6.B Checkpoint verification — export + browser (at milestones)
344
+
345
+ Checkpoints confirm the Unity→Babylon parity the loop relies on. Run one:
328
346
 
329
- Run a checkpoint **only** at round 1 (calibration — proves the chain works before investing 40 rounds, and
330
- records what actually crosses the export boundary), and when the work is done. An optional every-N cadence
331
- exists; set it in the loop card, **off by default**.
347
+ 1. **At round 1** — calibration: proves the chain works before investing 40 rounds, and records what actually
348
+ crosses the export boundary.
349
+ 2. **At each milestone** — when a major **part group** passes: landform + terrain, blockout + composition, light
350
+ rig + GI bake + probes, materials + set dressing, post-processing + atmosphere, gameplay components. Agree the
351
+ milestone groups in the interview and record them in `pipeline.md`.
352
+ 3. **At the end** — the integration pass (production bake).
353
+
354
+ Between milestones the loop stays in Unity. A fixed every-N cadence also exists; set it in the loop card, off by
355
+ default.
332
356
 
333
357
  **What you export is the user's call — by prompt, or from the Unity Export buttons.**
334
358
 
335
359
  #### Game level (the default)
336
360
 
337
361
  ```bash
338
- unity command bt_export_level --scene Assets/Scenes/Level01.unity --project-path "$PROJ" --timeout 900
362
+ unity command bt_export_level --scene Assets/Scenes/Level01.unity --geometryOnly false --project-path "$PROJ" --timeout 900
339
363
  unity command bt_devserver_start --project-path "$PROJ"
340
364
  jq '.scenes[0].extras.metadata
341
- | {license, skybox, ambientlighting, ambientskymode, ambientlightmap, lightmaplevel,
342
- reflectionprobeintensity, exposure, tonemapping, fogmode, fogvolumetric, sunposition}' \
343
- "$PROJ/Export/scenes/level01.gltf" > evidence/checkpoint-NN-metadata.json
365
+ | {license, renderpipeline, lightmapbakemode, shadowmaskmode, skybox, lightprobes, navigation,
366
+ ambientlighting, ambientskymode, exposure, tonemapping, fogmode, sunposition}' \
367
+ "$PROJ/Export/scenes/Level01.gltf" > evidence/checkpoint-NN-metadata.json
344
368
  ```
345
369
 
346
370
  `selection == null` gates the **entire scene-metadata block** — skybox, ambient/IBL, SH, reflection probe
@@ -379,8 +403,8 @@ given with no `scenes/` subfolder. Correct for a container; wrong for anything m
379
403
  | URL | Serves |
380
404
  |---|---|
381
405
  | `http://localhost:8888/index.html` | the generated web project, default scene |
382
- | `http://localhost:8888/index.html?scene=level01.gltf` | the player pointed at one scene (**file name, not a path**) |
383
- | `http://localhost:8888/scenes/level01.gltf` | the raw exported asset |
406
+ | `http://localhost:8888/index.html?scene=Level01.gltf` | the player pointed at one scene (**file name, not a path**) |
407
+ | `http://localhost:8888/scenes/Level01.gltf` | the raw exported asset |
384
408
  | `http://localhost:8888/containers/mech.glb` | an asset container written to an explicit folder |
385
409
 
386
410
  ### 6.C What the Unity snapshot cannot tell you
@@ -449,16 +473,25 @@ boundary the gap is on**:
449
473
 
450
474
  ---
451
475
 
452
- ## 8. Scope the target to what can actually cross the boundary
476
+ ## 8. Scope the target — most of Unity crosses
477
+
478
+ The goal is parity, and most of a Unity level crosses. Volumes (grade baked to a LUT, bloom, vignette, DOF,
479
+ motion blur, film grain, lens distortion, chromatic aberration), HDRP SSAO/SSR, lightmaps in every mixed-lighting
480
+ mode, light probes, baked reflection probes, IBL, fog, terrain, Animator state machines, particles, physics and
481
+ the Recast navmesh all carry. The short list that does **not** is the Agent Reference's Unity Authoring Recipes
482
+ §22, each item with a Babylon-side substitute:
483
+ - URP renderer features (SSAO, custom passes);
484
+ - Panini projection and screen-space lens flare;
485
+ - realtime GI and realtime reflection probes;
486
+ - cookies, Timeline, VFX Graph, and trail/line renderers.
453
487
 
454
- The 73-key metadata list **is** the export surface for scene-level look. Anything the target image depends on
455
- that has no key — screen-space reflections, SSGI/SSAO, custom render passes, bespoke volume stacks — does not
456
- survive, and a critic that keeps raising it will name the same gap forever.
488
+ During the interview's target-reachability pass, check the target against that list:
489
+ - Something that can be *approximated* on the BabylonJS side (a baked reflection probe for SSR, a Babylon
490
+ SSAO2 pipeline from a script component for URP SSAO) goes in **Approximable**, with that approach.
491
+ - Only what has no substitute goes in **`OUT OF REACH`**. Critics are instructed not to raise gaps against it.
457
492
 
458
- During the interview's target-reachability pass, walk the target against that key list and record whatever
459
- cannot cross in the loop card's **`OUT OF REACH`** slot. Critics are instructed not to raise gaps against it.
460
- Where an effect can be *approximated* on the BabylonJS side instead (a reflection probe standing in for SSR,
461
- baked contact shadows for SSAO), record that as the approach rather than as out of reach.
493
+ A gap found at a checkpoint that none of this explains is a **toolkit parity gap**. Record it with both frames
494
+ for the toolkit instead of re-authoring the scene around it.
462
495
 
463
496
  > The precise URP/HDRP boundary is worth **measuring on your first real export** rather than assuming. Export
464
497
  > one scene with the effects you care about, dump `scenes[0].extras.metadata`, and record what actually
@@ -487,4 +520,8 @@ baked contact shadows for SSAO), record that as the approach rather than as out
487
520
  | Every scene reference to a model broke | wrote to a new path, or delete-then-recreate | edit in place; never remove the `.meta` |
488
521
  | Model imports at 1/100 scale or on its side | FBX unit mismatch, or a generated asset's orientation | `transform_apply` after fixing scale/rotation |
489
522
  | Unity Hub cannot open the project | copilot mode leaves a resident Editor holding the lock | `bt-stop-editor.sh <ProjectPath>` (§4B.3) |
490
- | `unity command` cannot connect | Safe Mode, or a batch Editor invisible to `status` | `unity pipeline list`; gate on `unity command`, not `unity status` |
523
+ | `unity command` cannot connect | Safe Mode, a sandboxed shell blocking loopback, or several Editors (`AMBIGUOUS_EDITOR`) | `unity pipeline list`; pass `--project-path`; gate on `unity command` |
524
+ | Snapshot shows only the sky | The URP GPU Resident Drawer is on | `RenderPathTools.DisableResidentDrawerReport()` (reloads the scene) — § 1 |
525
+ | A Baked light "missing" from the export | Expected — Baked lights cross as lightmaps + light probes | Nothing to fix; but its **children** were skipped too — never parent under a Baked light |
526
+ | Dynamic objects flat in the browser | No light-probe network: no active `SceneController`, ambient not Skybox, no IBL bake, or no probe group | Fix and re-bake (Recipes §5) |
527
+ | No navigation in the export | Unity's navmesh was baked, not the toolkit Recast surface | Bake `UniRcNavMeshSurface` (Recipes §12) |
@@ -7,19 +7,21 @@ allowed-tools: Read, Grep, Glob, Write, WebFetch(domain:raw.githubusercontent.co
7
7
  Turn a feature spec into `_specs/<feature-name>_plan.md`: an ordered checklist of tasks that `bt-execute` runs. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
8
8
 
9
9
  ```
10
- /bt-plan [--heavy] [--parity] <feature-spec> <optional-brief>
10
+ /bt-plan [--heavy] [--parity] [--no-time-limit] <feature-spec> <optional-brief>
11
11
 
12
12
  /bt-plan @_specs/mute-game-audio_spec.md
13
13
  /bt-plan "add a settings toggle to mute all game audio" # no spec file → Quick Plan: short interview, then plan
14
14
  /bt-plan --heavy @_specs/feature_spec.md # decision-complete plan for a long or cheaper-model run
15
15
  /bt-plan --heavy --parity @_specs/feature_spec.md # numeric parity gates against the reference (slow)
16
+ /bt-plan --no-time-limit @_specs/feature_spec.md # turn off the default TIME MATTERS mode
16
17
  ```
17
18
 
18
- - `--heavy` — Heavy Plan mode (below). `--parity` — plan numeric parity proof; also on when the spec says `proof: parity`. Strip flags first; they are never part of the brief.
19
+ - `--heavy` — Heavy Plan mode (below). `--parity` — plan numeric parity proof; also on when the spec says `proof: parity`. `--no-time-limit` — turn off TIME MATTERS mode (Ground rules). Strip flags, and any literal `TIME MATTERS`, first; they are never part of the brief.
19
20
  - Spec file (± brief) → plan from it. **Brief only → Quick Plan.** Neither → ask for a brief. Never guess a path or URL.
20
21
 
21
22
  ## Ground rules
22
23
 
24
+ - **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the plan needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-plan] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-plan] No time limit`, and do not add it). Speed never skips a required step, the Heavy Plan cold-context audit, or anything the plan needs to be complete.
23
25
  - **Planning only — in every mode.** Research read-only; the plan file is the only file you write. Never implement a task, edit source, or run builds/tests — not even a trivial first task. Writing the plan is the last action; the user runs `bt-execute` separately.
24
26
  - **Babylon work:** if 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 — the authority for conventions and API; fetch sub-documents only when relevant, and again only if a context compaction made you forget it. If the fetch fails, stop and tell the user — do not guess at the API.
25
27
  - **Say what you are doing.** Before any step that takes more than a few seconds print one short line — `🔎 [bt-plan] <what> …` — and one when it returns; one line per subagent going out and coming back. A silent run looks like a hang and gets cancelled.
@@ -45,7 +47,8 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
45
47
  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
48
  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
49
  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.
50
+ 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.
51
+ 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.
49
52
  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".
50
53
 
51
54
  ## Step 3. Write the plan
@@ -7,19 +7,22 @@ allowed-tools: Read, Grep, Glob, Write, WebFetch(domain:raw.githubusercontent.co
7
7
  Turn a short feature idea into a spec file that `bt-plan` can plan from. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
8
8
 
9
9
  ```
10
- /bt-spec [--grill-me] [--parity] <feature-brief>
10
+ /bt-spec [--grill-me] [--parity] [--no-time-limit] <feature-brief>
11
11
 
12
12
  /bt-spec "add a settings toggle to mute all game audio"
13
13
  /bt-spec --grill-me "add a settings toggle to mute all game audio" # interview first, then spec
14
14
  /bt-spec --parity "port the Unity water shader and match it to within 2% in the browser" # numeric parity bars allowed (slow — hours become days)
15
+ /bt-spec --no-time-limit "redesign the save system" # turn off the default TIME MATTERS mode
15
16
  ```
16
17
 
17
18
  - `--grill-me` — interview the user, one question at a time, before writing (Step 4).
18
19
  - `--parity` — the spec may set numeric parity bars against a reference. Without it, `proof: functional`.
19
- - Strip the flags first; they are never part of the brief or the file name. An unrecognised `--flag` is part of the brief only if it is clearly prose — otherwise ask. No brief → ask for one. Never guess a path or URL.
20
+ - `--no-time-limit` — turn off TIME MATTERS mode (Ground rules).
21
+ - Strip the flags, and any literal `TIME MATTERS`, first; they are never part of the brief or the file name. An unrecognised `--flag` is part of the brief only if it is clearly prose — otherwise ask. No brief → ask for one. Never guess a path or URL.
20
22
 
21
23
  ## Ground rules
22
24
 
25
+ - **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the spec needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-spec] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-spec] No time limit`, and do not add it). Speed never skips a required step or lowers the quality of the spec.
23
26
  - **Planning only.** Research read-only and write only the spec file (plus `SPEC.md` from the scaffold, if the user says yes below). No source edits, no builds, no tests, no other shell commands.
24
27
  - **Babylon work:** if 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 conventions and API; fetch its sub-documents only when relevant, and again only if a context compaction made you forget it. If the fetch fails, stop and tell the user — do not guess at the API.
25
28
  - **Say what you are doing.** Before any step that takes more than a few seconds (a fetch, a big read, subagents) print one short line — `🔎 [bt-spec] <what> …` — and one line when it returns. A silent run looks like a hang and gets cancelled.