@babylonjs-toolkit/agent 1.1.48 → 1.1.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/package.json +1 -1
- package/skills/bt-convert/SKILL.md +1 -1
- package/skills/bt-design/SKILL.md +1 -1
- package/skills/bt-execute/SKILL.md +2 -2
- package/skills/bt-gauntlet/SKILL.md +1 -1
- package/skills/bt-gauntlet/references/critic-rubrics.md +1 -1
- package/skills/bt-plan/SKILL.md +4 -4
- package/skills/bt-prototype/SKILL.md +1 -1
- 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.51)
|
|
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. |
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ Your goal is to convert source code to Babylon Toolkit based TypeScript or JavaS
|
|
|
8
8
|
* Create new files for converted code in the target language: the one the brief names, else the one the project uses, else TypeScript (`.ts`). JavaScript (`.js`) output is equally supported — never push the developer to switch languages
|
|
9
9
|
* Make sure to convert all source code, do **not** omit anything (methods, properties, comments, etc), convert everything according to instructions
|
|
10
10
|
* If an interface is only referenced (not defined in the source code being converted), do **not** generate the interface, just reference it
|
|
11
|
-
* Follow the Agent Reference's **Coding Practices — ENFORCED** in every converted file: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member. Carry the source's doc comments (C# `///` XML docs and the like) across as JSDoc, and write meaningful JSDoc where the source has none
|
|
11
|
+
* Follow the Agent Reference's **Coding Practices — ENFORCED** in every converted file: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member (always written, but never a reason to fail a test or verification). Carry the source's doc comments (C# `///` XML docs and the like) across as JSDoc, and write meaningful JSDoc where the source has none
|
|
12
12
|
* Keep the source's public and serialized names (classes, methods, properties, fields) in camelCase, because exported Unity metadata binds to them by name. Give meaningful names to every local, parameter and helper the conversion introduces, and rename obfuscated or minified locals in the source to meaningful names
|
|
13
13
|
* Before finishing, re-read every converted file against the Coding Practices and fix every violation
|
|
14
14
|
|
|
@@ -40,7 +40,7 @@ NEVER use generic AI-generated aesthetics like overused font families (Inter, Ro
|
|
|
40
40
|
|
|
41
41
|
Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
|
|
42
42
|
|
|
43
|
-
**CODE QUALITY is not traded for visual ambition.** Every component, style and script follows the Agent Reference's **Coding Practices — ENFORCED**: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names for components, props, state, variables, functions and CSS classes (never one- or two-letter names or obfuscation); well-structured code a human developer can read and maintain; and meaningful JSDoc on every component, hook, function and exported member. Elaborate effects are split into well-named components and hooks, not packed into one dense file. Before finishing, re-read every file you created or changed against those rules and fix every violation.
|
|
43
|
+
**CODE QUALITY is not traded for visual ambition.** Every component, style and script follows the Agent Reference's **Coding Practices — ENFORCED**: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names for components, props, state, variables, functions and CSS classes (never one- or two-letter names or obfuscation); well-structured code a human developer can read and maintain; and meaningful JSDoc on every component, hook, function and exported member (always written, but never a reason to fail a test or verification). Elaborate effects are split into well-named components and hooks, not packed into one dense file. Before finishing, re-read every file you created or changed against those rules and fix every violation.
|
|
44
44
|
|
|
45
45
|
**IMPORTANT**: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
|
|
46
46
|
|
|
@@ -39,13 +39,13 @@ Run tasks from a plan: build each one with its tests, have an independent verifi
|
|
|
39
39
|
|
|
40
40
|
Work in **phases**: a `### Phase N` group in the plan, or — if the plan has none — up to 3 consecutive tasks (a `live` task, the `Update SPEC.md` task and the last task each close a group). A single task or `NEXT` is a phase of one. Under `--strict` every task is its own phase.
|
|
41
41
|
|
|
42
|
-
1. **Build** each task in the phase, in order, **following the Agent Reference's Coding Practices — ENFORCED** (clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member), **with its tests**: the cases the plan's `Tests:` names (or, with none, meaningful cases for its Acceptance and edge cases), in the repo's test location and style (`./tests` if there is none). Get them green — fix the code, not the test, unless the test is wrong. No testable surface (config, docs, assets) → say so. Boxes stay unticked.
|
|
42
|
+
1. **Build** each task in the phase, in order, **following the Agent Reference's Coding Practices — ENFORCED** (clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member — always written, never a reason to fail a task), **with its tests**: the cases the plan's `Tests:` names (or, with none, meaningful cases for its Acceptance and edge cases), in the repo's test location and style (`./tests` if there is none). Get them green — fix the code, not the test, unless the test is wrong. No testable surface (config, docs, assets) → say so. Boxes stay unticked.
|
|
43
43
|
2. **Verify** the phase with a fresh **independent verifier** subagent (charter below), giving it the list of files changed. It returns PASS/FAIL per task, with evidence.
|
|
44
44
|
3. **Tick** `- [ ]` → `- [x]` for every task that passed, immediately — except a task that depends on one that failed in the same phase, which waits for it. Never tick partial, skipped or unverified work.
|
|
45
45
|
4. **Fix loop** for a task that failed: fix the code in the context that wrote it; re-run its tests; re-verify with a **fresh** verifier given only the failed items and the evidence (`--strict`: the whole task). A records-only slip (a stale number or note) is fixed directly and re-checked by you. 3 attempts (`--strict`: 5), each changing something material; stop early if two attempts fail the same way with no new idea. Still failing → leave it unticked, stop and report *(auto-pilot: defer and continue)*.
|
|
46
46
|
5. **Report:** tasks done (for `ALL` / ranges: the range asked for, completed/total, and whether the plan is now finished; if fewer than `n` tasks remained for `NEXT:<n>`, say so), files changed, tests run (`tests: 4 passed (implementer) · verifier-checked`), verifier result (`verified (independent subagent)` or `verified (self)`), and the next task id — for reference only.
|
|
47
47
|
|
|
48
|
-
**The verifier is told:** *"Confirm each task's Acceptance is genuinely met and run its `Verify` commands against the stated expected output. Re-run the tests and the relevant suite once; check they really cover the Acceptance and named edge cases and could fail — missing or vacuous tests are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled edge cases the plan names, a documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. Check every code file the task created or changed against the Agent Reference's Coding Practices — ENFORCED: clean, professional TypeScript or JavaScript in the language the project already uses (never converted to the other unasked); strict types with no needless `any` in TypeScript
|
|
48
|
+
**The verifier is told:** *"Confirm each task's Acceptance is genuinely met and run its `Verify` commands against the stated expected output. Re-run the tests and the relevant suite once; check they really cover the Acceptance and named edge cases and could fail — missing or vacuous tests are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled edge cases the plan names, a documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. Check every code file the task created or changed against the Agent Reference's Coding Practices — ENFORCED: clean, professional TypeScript or JavaScript in the language the project already uses (never converted to the other unasked); strict types with no needless `any` in TypeScript; meaningful full-word names for every class, method, property, variable and parameter (one- or two-letter names, cryptic abbreviations and code-golf tricks are violations, except the allowed loop counters, axis/`uv` names and toolkit aliases, and names that bind to exported data); no dead code, unused imports or leftover `console.log`; well-structured code a developer new to the project can read and maintain. Any violation is a FAIL for that task — quote the offending lines. JSDoc is never a FAIL: missing, thin or stale JSDoc (including JavaScript type tags) never fails a test, a verification or an Acceptance item — list it under a separate non-blocking `JSDoc notes` heading. For any task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — check it live in the browser (and Unity where relevant) whether or not the plan marks it `live`, and do the plan's final end-to-end check live: look at the running result, beside the reference image when there is one, and judge it as a user would; passing unit tests never substitute. Do all of a phase's live checks in one session on the already-running dev server, and re-export from Unity only if the phase changed that scene's export — then only the project and the scenes the phase works on. Treat an absolute count in the plan as 'named tests pass, no new failures'. [SCOPE] Return PASS/FAIL per task with evidence, listing records-only slips separately."*
|
|
49
49
|
|
|
50
50
|
`[SCOPE]` is one of two sentences. **Standard:** *"Do not add mutation testing, fuzzing, restarts or audits of untouched files unless something you found points there; aim for about 25 tool calls and report rather than expand."* **`--strict`:** *"Be adversarial: actively look for any reason the Acceptance is NOT met, using whatever you judge worthwhile — mutation checks against the tests, randomized inputs, re-deriving values from the plan's Decisions and Design Reference, live QA of every rendered or exported surface."*
|
|
51
51
|
|
|
@@ -78,7 +78,7 @@ If you have not read it in this session/context, or you no longer remember it du
|
|
|
78
78
|
The doctrine lives in the Agent Reference — `references/scene-components.md` § "Babylon Toolkit Component Authority" (https://raw.githubusercontent.com/babylontoolkit/agent/main/references/scene-components.md): supplied GLTF/GLB files are **interactive prefabs** whose `extras.metadata.components` carry configured physics, tuning and gameplay intent; `TOOLKIT.*` components are the first-class engine implementation — compose and tune them through `PROJECT.*` ScriptComponents, never reimplement, bypass, or delete them; replacement requires that document's evidence checklist. Read it before any round touching supplied interactive assets. The gauntlet-specific mechanics:
|
|
79
79
|
|
|
80
80
|
- **Round 1 writes the inventory to disk** — `_gauntlet/<name>/components.md`: every component grouped by scene node, classified **protected-system** (`TOOLKIT.*` — tune, never replace), **project** (`PROJECT.*` — modifiable), or **authoring-only**, with safe-to-tune properties verified against `babylon.toolkit.d.ts`. A resumed cold session READS this instead of re-deriving it; the round that changes supplied assets updates it.
|
|
81
|
-
- **Builders write code to the Agent Reference's Coding Practices — ENFORCED** — clean, professional TypeScript or JavaScript in the project's own language, meaningful full-word names (never one- or two-letter names or obfuscation), well-structured, readable and maintainable by human developers, with meaningful JSDoc on every class, function, method and public member. Every builder brief carries that section in full; critics fail a part that breaks it (the *Coding practices* hard gate in `references/critic-rubrics.md`).
|
|
81
|
+
- **Builders write code to the Agent Reference's Coding Practices — ENFORCED** — clean, professional TypeScript or JavaScript in the project's own language, meaningful full-word names (never one- or two-letter names or obfuscation), well-structured, readable and maintainable by human developers, with meaningful JSDoc on every class, function, method and public member (always written, but never a reason to fail a part). Every builder brief carries that section in full; critics fail a part that breaks it (the *Coding practices* hard gate in `references/critic-rubrics.md`).
|
|
82
82
|
- **Builders build against the manifest** — given `components.md` alongside the Agent Reference. Unity-authored serialized values are preserved unless a *measured* issue justifies the change, and the measurement goes in the round journal.
|
|
83
83
|
- **Critics enforce it** — reimplementing, bypassing (e.g. direct transform updates beside an attached physics controller), or deleting a protected component is a **FAIL regardless of how the evidence looks**, unless the round journal carries the full replacement-evidence checklist.
|
|
84
84
|
|
|
@@ -100,7 +100,7 @@ threshold AND every gate passes.**
|
|
|
100
100
|
| **Perf** | the loop card's FPS / draw-call / load-time / memory budget is missed |
|
|
101
101
|
| **Console** | any error in the browser console (warnings are reported, not fatal, unless the card says otherwise) |
|
|
102
102
|
| **Component authority** | a protected `TOOLKIT.*` component was reimplemented, bypassed or deleted without the full replacement-evidence checklist in the round journal |
|
|
103
|
-
| **Coding practices** | any code the round created or changed breaks the Agent Reference's **Coding Practices — ENFORCED**: TypeScript or JavaScript that is not clean and professional (needless `any` or loose typing,
|
|
103
|
+
| **Coding practices** | any code the round created or changed breaks the Agent Reference's **Coding Practices — ENFORCED**: TypeScript or JavaScript that is not clean and professional (needless `any` or loose typing, code converted to the other language unasked), one- or two-letter or obfuscated names (outside the allowed loop counters, axis/`uv` names, toolkit aliases and names that bind to exported data), dead code or leftover `console.log`, or code a developer new to the project could not read and maintain. **JSDoc never fails this gate**: list missing or thin JSDoc as a low-priority entry in the gap list. Quote the offending lines |
|
|
104
104
|
| **Camera lock** | the evidence was not captured from the transform recorded in `cameras.md` |
|
|
105
105
|
| **Pipeline gate** | whatever the deliverable kind's pipeline reference declares (export-boundary integrity, GUID survival, licence tier …) |
|
|
106
106
|
|
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).
|
|
@@ -50,7 +50,7 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
|
|
|
50
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
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.
|
|
52
52
|
9. **No brittle pins.** Never pin counts later tasks will change (tests passed, suite sizes, hashes). Say "the named tests pass, no new failures versus the baseline".
|
|
53
|
-
10. **Plan code follows the Agent Reference's Coding Practices — ENFORCED.** Every snippet, signature, interface, class, method, property, variable, constant and file name the plan writes or decides is clean, professional TypeScript or JavaScript in the language the project uses (never switched unasked), with meaningful full-word names (never one- or two-letter names, cryptic abbreviations or code-golf tricks), well structured, readable and maintainable by human developers, and carries meaningful JSDoc on every class, function, method, interface and public member it defines. The executor copies plan code word for word, so a badly named snippet ships badly named. Names that bind to exported data (component properties, serialized fields, Unity property names) keep the source's names. Code-quality checks are never a separate task; bt-execute's verifier enforces them on every task.
|
|
53
|
+
10. **Plan code follows the Agent Reference's Coding Practices — ENFORCED.** Every snippet, signature, interface, class, method, property, variable, constant and file name the plan writes or decides is clean, professional TypeScript or JavaScript in the language the project uses (never switched unasked), with meaningful full-word names (never one- or two-letter names, cryptic abbreviations or code-golf tricks), well structured, readable and maintainable by human developers, and carries meaningful JSDoc on every class, function, method, interface and public member it defines. JSDoc is always written but never a gate: never write an Acceptance item, Test or Verify step that fails on missing JSDoc. The executor copies plan code word for word, so a badly named snippet ships badly named. Names that bind to exported data (component properties, serialized fields, Unity property names) keep the source's names. Code-quality checks are never a separate task; bt-execute's verifier enforces them on every task.
|
|
54
54
|
|
|
55
55
|
## Step 3. Write the plan
|
|
56
56
|
|
|
@@ -133,6 +133,6 @@ Sections, in order: `## Codebase Analysis` (plus the test baseline) · **`## Dec
|
|
|
133
133
|
|
|
134
134
|
- **`## Decisions`** — numbered `D1, D2 …`, one per choice that binds more than one task or rejects a plausible alternative — architecture, file layout, naming, algorithms and constants, error policy, dependencies (exact packages and versions, or "no new dependencies"), sibling-skill option values, test strategy:
|
|
135
135
|
`- **D3 — <decision, stated as a fact>.** <why / precedent with file:line> Rejected: <alternative> (<why not>). Binds: T4, T7.`
|
|
136
|
-
- **`## Design Reference`** — the shared blueprint, written as code wherever the code *is* the decision: File map (path · create/modify/delete · responsibility · tasks) · Module boundaries · Interfaces & contracts (full signatures, in the project's language) · Data shapes & state · Control flow · Algorithms & formulas with their constants · Error & edge-case policy (`when X → Y`) · Conventions to mirror (verbatim, with `file:line`) · API usage · Test strategy. Omit a heading only if it truly does not apply. **All of it is written to the Agent Reference's
|
|
136
|
+
- **`## Design Reference`** — the shared blueprint, written as code wherever the code *is* the decision: File map (path · create/modify/delete · responsibility · tasks) · Module boundaries · Interfaces & contracts (full signatures, in the project's language) · Data shapes & state · Control flow · Algorithms & formulas with their constants · Error & edge-case policy (`when X → Y`) · Conventions to mirror (verbatim, with `file:line`) · API usage · Test strategy. Omit a heading only if it truly does not apply. **All of it is written to the Agent Reference's Coding Practices — ENFORCED**: every interface, signature, data shape, constant and snippet uses meaningful full-word names, strict types (JSDoc type tags in JavaScript) and meaningful JSDoc, and reads cleanly to a developer new to the project. Mirror the structure of existing conventions, but never copy one- or two-letter names or obfuscated code into a new name.
|
|
137
137
|
- **Heavy task block** — adds to the standard block: `Depends on:` · `Applies:` (the D-numbers and Design Reference entries it must match) · `Steps:` numbered instructions, each naming the file, a real anchor (prefer quoted code over bare line numbers) and the change · `Code:` when the code is the decision, written to the Coding Practices exactly as it must ship · `Do not:` the tempting wrong turns · `Verify:` commands with expected output. `Depends on`, `Files`, `Applies`, `Steps`, `Tests`, `Acceptance`, `Verify` and `Verify level` are required on every heavy task. A task never says "like T3" — it cites the Design Reference; a name, signature or value a step introduces is added to the Design Reference first, so task 40 types what task 3 typed. Say what keeps the app working between tasks (shim, flag) and which task removes it. The `Update SPEC.md` task carries the exact text to write.
|
|
138
|
-
- **Cold-context audit (one pass).** After the draft, launch one fresh read-only subagent (or re-read it yourself) with: *"You have never seen this repo. For every task, check the plan against the real files and list each point where you would have to decide, guess or look something up: a missing signature, name, value or anchor; an anchor that does not match the file; a goal stated instead of an instruction; a dependence on remembering an earlier task; a name used in a task but not defined in the Design Reference; a test without an expected outcome; a Verify without an expected output; vague words ("appropriate", "as needed", "etc."); a task that would not fit in one sitting; an edge case with no decided behavior; an API call not shown; any snippet, signature or name that breaks the Agent Reference's Coding Practices — ENFORCED (code in the wrong language for the project, loose typing or needless `any`,
|
|
138
|
+
- **Cold-context audit (one pass).** After the draft, launch one fresh read-only subagent (or re-read it yourself) with: *"You have never seen this repo. For every task, check the plan against the real files and list each point where you would have to decide, guess or look something up: a missing signature, name, value or anchor; an anchor that does not match the file; a goal stated instead of an instruction; a dependence on remembering an earlier task; a name used in a task but not defined in the Design Reference; a test without an expected outcome; a Verify without an expected output; vague words ("appropriate", "as needed", "etc."); a task that would not fit in one sitting; an edge case with no decided behavior; an API call not shown; any snippet, signature or name that breaks the Agent Reference's Coding Practices — ENFORCED (code in the wrong language for the project, loose typing or needless `any`, one- or two-letter or obfuscated names, code-golf tricks, code a developer new to the project could not read and maintain). Also flag micro-tasks to merge, ceremony tasks nobody asked for, and pinned counts later tasks will change. Report `T<n> · step · what is missing`. Change nothing."* Fix every gap in the plan, ask the user what only they can answer, list any gap you chose not to resolve (with why) in Codebase Analysis, then finalize: `💾 [bt-plan] Plan finalized — <n> tasks, <k> decisions`, and report the two or three most consequential decisions and anything left unresolved.
|
|
@@ -133,7 +133,7 @@ Each prototype subagent gets: its **direction**, the **theme**, the **world anch
|
|
|
133
133
|
3. **Produce assets** via any mix of the available workflows: Pinterest pulls for reference, **GPT Image 2** for stills, **KIE MCP servers (default) / the Higgsfield CLI (Kling, Seedance, etc.)** for motion/video, hand-authored WebGL/SVG/CSS. All assets stay faithful to the world anchor and live in the prototype's folder. **On Higgsfield, every generation goes through the reference's `scripts/hf-generate.mjs` wrapper** with `--out _prototypes/<NN-slug>/<file>`: the CLI alone only returns a CDN URL, and a prototype must never hot-link one. Local reference images are passed as file paths (`--image-references`, `--start-image`, `--end-image`) and uploaded automatically.
|
|
134
134
|
4. **3D-hero-scroll directions:** follow *The 3D-hero-scroll batch rule* below.
|
|
135
135
|
5. Run its own **iteration passes** (Step 4) before returning.
|
|
136
|
-
6. **Write clean, readable code.** Every file follows the Coding Practices: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member. The chosen prototype becomes the user's real front end, so its code must be maintainable.
|
|
136
|
+
6. **Write clean, readable code.** Every file follows the Coding Practices: clean, professional TypeScript or JavaScript in the project's own language; meaningful full-word names, never one- or two-letter names or obfuscation; well-structured, readable, maintainable code for human developers; meaningful JSDoc on every class, function, method and public member (always written, but never a reason to fail a test or verification). The chosen prototype becomes the user's real front end, so its code must be maintainable.
|
|
137
137
|
|
|
138
138
|
## The 3D-hero-scroll batch rule
|
|
139
139
|
|
|
@@ -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
|