@babylonjs-toolkit/agent 1.1.52 → 1.1.55

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,6 +1,6 @@
1
1
  ---
2
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."
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 (`.agents/recon/<slug>_recon.md`) plus, when the scope has UI, a plain-language user guide (`.agents/recon/<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
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
5
  ---
6
6
 
@@ -8,26 +8,26 @@ Run reconnaissance on existing code nobody has documented — one subsystem or t
8
8
 
9
9
  ```
10
10
  /bt-recon [--guide|--no-guide] [--no-live] [--quick] [--out <dir>] <brief>
11
- /bt-recon --refresh @_specs/<slug>_recon.md
11
+ /bt-recon --refresh @.agents/recon/<slug>_recon.md
12
12
 
13
13
  /bt-recon "the default camera system"
14
14
  /bt-recon "the save/load pipeline"
15
15
  /bt-recon "the whole codebase"
16
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
17
+ /bt-recon --refresh @.agents/recon/session-camera_recon.md # update an existing recon after code changes
18
18
  ```
19
19
 
20
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
21
  - `--no-live` — skip the live pass (Step 5) even when the brief gives a URL.
22
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/`.
23
+ - `--out <dir>` — write the outputs to `<dir>` instead of `.agents/recon/`.
24
24
  - `--refresh @<recon file>` — update an existing recon against what changed since it was written (Refresh mode, at the end).
25
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
26
 
27
27
  ## Ground rules
28
28
 
29
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.
30
+ - **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `.agents/recon/<slug>_recon/` — nothing else. No source edits, no builds, no installs, no tests, no shell commands beyond the read-only `git` commands above.
31
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
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
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.
@@ -43,7 +43,7 @@ From the flag-stripped brief derive `recon_title` (Title Case, e.g. `Session Cam
43
43
 
44
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
45
 
46
- If `_specs/<recon_slug>_recon.md` already exists, ask whether to refresh it (Refresh mode) or replace it. Never overwrite it silently.
46
+ If `.agents/recon/<recon_slug>_recon.md` already exists, ask whether to refresh it (Refresh mode) or replace it. Never overwrite it silently.
47
47
 
48
48
  ## Step 2. Locate and map the scope
49
49
 
@@ -91,7 +91,7 @@ Runs when the brief gives a URL and your host has a browser tool (e.g. the Chrom
91
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
92
 
93
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`.
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 `.agents/recon/<slug>_recon/<nn>-<panel-slug>.png`.
95
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
96
  4. Record console errors and warnings.
97
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.
@@ -108,16 +108,16 @@ Fix every gap — re-read the source rather than trusting the auditor's summary
108
108
 
109
109
  ## Step 7. Write the recon doc
110
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`).
111
+ Print `✍️ [bt-recon] Writing .agents/recon/<slug>_recon.md …` and write it to `.agents/recon/<slug>_recon.md` (or `--out`). Get the header `commit` from `git rev-parse --short HEAD` (no git → `commit: n/a`).
112
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.
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 `.agents/recon/<slug>_recon/<system-slug>.md` using the same template.
114
114
 
115
115
  ```markdown
116
116
  # Recon: <recon_title>
117
117
 
118
118
  scope: <the brief, one line> · kind: <subsystem|codebase>
119
119
  commit: <short sha> · date: <YYYY-MM-DD> · files: <n> (<total> lines)
120
- guide: <_specs/<slug>_guide.md | none> · live: <yes | no (<reason>)>
120
+ guide: <.agents/recon/<slug>_guide.md | none> · live: <yes | no (<reason>)>
121
121
  confidence tags: [code] read in source · [live] seen running · [history] from git · [inferred] deduced
122
122
 
123
123
  ## Summary
@@ -182,9 +182,9 @@ confidence tags: [code] read in source · [live] seen running · [history] from
182
182
 
183
183
  ## Step 8. Write the user guide (when the scope has UI)
184
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 …`.
185
+ Write `.agents/recon/<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 .agents/recon/<slug>_guide.md …`.
186
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.
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 `.agents/recon/<slug>_recon/`). Anything the recon could not confirm is stated with a short caveat rather than presented as certain.
188
188
 
189
189
  ```markdown
190
190
  # <recon_title> — User Guide
@@ -221,8 +221,8 @@ The reader has never seen the feature and does not read code: plain language, no
221
221
  ## Step 9. Report
222
222
 
223
223
  ```
224
- Recon: _specs/<slug>_recon.md
225
- Guide: _specs/<slug>_guide.md | none (<why>)
224
+ Recon: .agents/recon/<slug>_recon.md
225
+ Guide: .agents/recon/<slug>_guide.md | none (<why>)
226
226
  Scope: <n> files, <total> lines · live: <yes|no>
227
227
  Claims: <n> [code] · <n> [live] · <n> [history] · <n> [inferred] · <n> unknowns
228
228
  Top risks: <three one-liners from Known Issues>
@@ -39,7 +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
+ - **Recon docs (`.agents/recon/*_recon.md`, written by bt-recon):** if any recon's `scope` covers a system this feature touches, read its Summary, Architecture, the relevant Feature Inventory / UI Reference / External Interfaces sections, Known Issues and Extension Points — it is the grounding for code nobody else documented, so build on it instead of re-deriving it. Cite it in `## Research Notes`. If its `commit:` is well behind HEAD for the files this feature touches, note the drift there and suggest `bt-recon --refresh`.
43
43
  - **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.
44
44
 
45
45
  ## Step 3. Sibling-skill patterns
@@ -67,7 +67,7 @@ Interview the user until the design is decided, after Steps 2–3 so questions a
67
67
  - **`size`** — `small` ≈ 1–2 hours by hand, one system; `medium` ≈ a day, a few systems; `large` ≈ multi-day, multi-system, or Unity/Blender/export pipeline work. Classify by the real work.
68
68
  - **`proof`** — `functional` (default) or `parity` (only with `--parity`, or when the brief itself states a numeric bar). Under `functional`, Acceptance Criteria are what a user would notice — it works, it looks and feels right (against DESIGN.md, or next to a reference when there is one), the console is clean — proven by tests and a look at the running result. Never invent numeric pixel thresholds, repeat counts, per-engine matrices or evidence archives: how a feature is proven is most of what it costs to build.
69
69
 
70
- Print `✍️ [bt-spec] Drafting _specs/<feature_slug>_spec.md …`, then write the spec to `_specs/<feature_slug>_spec.md` using the project's `FEATURE.md` template if it exists (add any header field or section below that it lacks), otherwise this structure. No implementation detail or code examples.
70
+ Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>_spec.md …`, then write the spec to `.agents/specs/<feature_slug>_spec.md` using the project's `FEATURE.md` template if it exists (add any header field or section below that it lacks), otherwise this structure. No implementation detail or code examples.
71
71
 
72
72
  ```markdown
73
73
  # Spec for <feature-name>
@@ -120,7 +120,7 @@ Create test file(s) in ./tests for these named cases, without going heavy:
120
120
 
121
121
  ```
122
122
  Branch: <branch_name>
123
- Spec file: _specs/<feature_slug>_spec.md
123
+ Spec file: .agents/specs/<feature_slug>_spec.md
124
124
  Title: <feature_title>
125
125
  ```
126
126
 
@@ -132,7 +132,7 @@ Do not print the spec unless asked.
132
132
  # Project Spec
133
133
 
134
134
  > The source of truth for this project: its durable architecture, systems, conventions and decisions.
135
- > Feature specs in `_specs/` are derived from and constrained by this file. It describes the **product** —
135
+ > Feature specs in `.agents/specs/` are derived from and constrained by this file. It describes the **product** —
136
136
  > what exists and why — never how a feature was verified (capture protocols, tool lists, ledgers).
137
137
 
138
138
  ## Architecture & Module Layout _(current-state — replace/merge)_
@@ -156,7 +156,7 @@ Do not print the spec unless asked.
156
156
 
157
157
  ## How to update this spec
158
158
  - `(current-state — replace/merge)` sections say what is true now: replace seed placeholders with real content, then keep them matching the shipped code.
159
- - `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.
159
+ - `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 `.agents/specs/`, not here — this file must stay short enough to read before every feature.
160
160
  - Add each new Game System as its own subsection; record every new dependency (version + why) in the task that introduces it.
161
161
  - 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.
162
162
  ```