@babylonjs-toolkit/agent 1.1.50 → 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-plan/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
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).
|
|
@@ -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
|