@babylonjs-toolkit/agent 1.1.54 → 1.1.56

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.
Files changed (27) hide show
  1. package/README.md +61 -20
  2. package/package.json +1 -1
  3. package/skills/bt-execute/SKILL.md +60 -13
  4. package/skills/bt-execute/templates/dashboard/dashboard.html +1610 -0
  5. package/skills/bt-execute/templates/dashboard/dashboard.template.js +118 -0
  6. package/skills/bt-execute/templates/dashboard/live.template.js +25 -0
  7. package/skills/bt-gauntlet/SKILL.md +19 -19
  8. package/skills/bt-gauntlet/references/loop-templates.md +12 -12
  9. package/skills/bt-gauntlet/references/spec-composition.md +8 -7
  10. package/skills/bt-gauntlet/references/target-images.md +6 -6
  11. package/skills/bt-gauntlet/references/unity-pipeline.md +3 -3
  12. package/skills/bt-gauntlet/references/workspace.md +5 -5
  13. package/skills/bt-hero/SKILL.md +2 -2
  14. package/skills/bt-optimize/SKILL.md +338 -0
  15. package/skills/{bt-combine → bt-optimize}/scripts/BtCombine.cs +32 -25
  16. package/skills/bt-optimize/scripts/BtOptimize.cs +969 -0
  17. package/skills/{bt-combine → bt-optimize}/scripts/qa/compare-browser.mjs +1 -1
  18. package/skills/bt-optimize/scripts/qa/compare-profiles.mjs +80 -0
  19. package/skills/{bt-combine → bt-optimize}/scripts/qa/gltf-stats.mjs +1 -1
  20. package/skills/bt-optimize/scripts/qa/package.json +9 -0
  21. package/skills/bt-optimize/scripts/qa/profile-browser.mjs +547 -0
  22. package/skills/bt-plan/SKILL.md +30 -17
  23. package/skills/bt-prototype/SKILL.md +4 -4
  24. package/skills/bt-recon/SKILL.md +14 -14
  25. package/skills/bt-spec/SKILL.md +20 -9
  26. package/skills/bt-combine/SKILL.md +0 -262
  27. package/skills/bt-combine/scripts/qa/package.json +0 -9
@@ -1,19 +1,19 @@
1
1
  ---
2
2
  name: bt-plan
3
- description: "The Babylon Toolkit Plan Skill creates the detailed technical plan for the specified feature spec file. Use when asked to plan or produce implementation tasks for an existing spec. Also supports a Quick Plan mode: when given only a brief (no spec file), it interviews the user to build a mini-spec and plans from that. Add `--heavy` for Heavy Plan mode: a decision-complete plan (numbered Decisions log, Design Reference with real interfaces and patterns, self-contained task blocks, cold-context audit) that keeps a long run of fresh-context tasks cohesive. Add `--parity` for numeric parity gates instead of the default functional proof. Always planning-only — it writes the plan file and stops; execution is the separate bt-execute skill."
3
+ description: "The Babylon Toolkit Plan Skill creates the detailed technical plan for the specified feature spec file. Use when asked to plan or produce implementation tasks for an existing spec. Also supports a Quick Plan mode: when given only a brief (no spec file), it interviews the user to build a mini-spec and plans from that. Add `--heavy` for Heavy Plan mode: a decision-complete plan (numbered Decisions log, Design Reference with real interfaces and patterns, self-contained task blocks, cold-context audit) that keeps a long run of fresh-context tasks cohesive. Add `--parity` for numeric parity gates instead of the default functional proof. Always planning-only — it writes the plan file into the feature's folder (`.agents/specs/<slug>/`, which a Quick Plan creates) plus the feature's live dashboard in its planned state, and stops; execution is the separate bt-execute skill."
4
4
  allowed-tools: Read, Grep, Glob, Write, WebFetch(domain:raw.githubusercontent.com), Agent, Task
5
5
  ---
6
6
 
7
- Turn a feature spec into `_specs/<feature-name>_plan.md`: an ordered checklist of tasks that `bt-execute` runs. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
7
+ Turn a feature spec into `.agents/specs/<slug>/documents/<slug>_plan.md`: an ordered checklist of tasks that `bt-execute` runs — plus the feature's dashboard (`.agents/specs/<slug>/dashboard.html`) in its planned state, which bt-execute keeps current — live activity while a run is going, an After Action Report once it is over. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
8
8
 
9
9
  ```
10
10
  /bt-plan [--heavy] [--parity] [--no-time-limit] <feature-spec> <optional-brief>
11
11
 
12
- /bt-plan @_specs/mute-game-audio_spec.md
13
- /bt-plan "add a settings toggle to mute all game audio" # no spec file → Quick Plan: short interview, then plan
14
- /bt-plan --heavy @_specs/feature_spec.md # decision-complete plan for a long or cheaper-model run
15
- /bt-plan --heavy --parity @_specs/feature_spec.md # numeric parity gates against the reference (slow)
16
- /bt-plan --no-time-limit @_specs/feature_spec.md # turn off the default TIME MATTERS mode
12
+ /bt-plan @.agents/specs/mute-game-audio/documents/mute-game-audio_spec.md
13
+ /bt-plan "add a settings toggle to mute all game audio" # no spec file → Quick Plan: short interview, creates the feature folder, then plans
14
+ /bt-plan --heavy @.agents/specs/<slug>/documents/<slug>_spec.md # decision-complete plan for a long or cheaper-model run
15
+ /bt-plan --heavy --parity @.agents/specs/<slug>/documents/<slug>_spec.md # numeric parity gates against the reference (slow)
16
+ /bt-plan --no-time-limit @.agents/specs/<slug>/documents/<slug>_spec.md # turn off the default TIME MATTERS mode
17
17
  ```
18
18
 
19
19
  - `--heavy` — Heavy Plan mode (below). `--parity` — plan numeric parity proof; also on when the spec says `proof: parity`. `--no-time-limit` — turn off TIME MATTERS mode (Ground rules). Strip flags, and any literal `TIME MATTERS`, first; they are never part of the brief.
@@ -22,7 +22,7 @@ Turn a feature spec into `_specs/<feature-name>_plan.md`: an ordered checklist o
22
22
  ## Ground rules
23
23
 
24
24
  - **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the plan needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-plan] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-plan] No time limit`, and do not add it). Speed never skips a required step, the Heavy Plan cold-context audit, or anything the plan needs to be complete.
25
- - **Planning only — in every mode.** Research read-only; the plan file is the only file you write. Never implement a task, edit source, or run builds/tests — not even a trivial first task. Writing the plan is the last action; the user runs `bt-execute` separately.
25
+ - **Planning only — in every mode.** Research read-only; the only files you write are the plan and the dashboard (`dashboard.html` and its data files) in the feature folder. Never implement a task, edit source, or run builds/tests — not even a trivial first task. Writing the plan is the last action; the user runs `bt-execute` separately.
26
26
  - **Babylon work:** if you have not read the Babylon Toolkit Agent Reference in this session, fetch and read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — the authority for conventions and API; fetch sub-documents only when relevant, and again only if a context compaction made you forget it. If the fetch fails, stop and tell the user — do not guess at the API.
27
27
  - **Say what you are doing.** Before any step that takes more than a few seconds print one short line — `🔎 [bt-plan] <what> …` — and one when it returns; one line per subagent going out and coming back. A silent run looks like a hang and gets cancelled.
28
28
  - **Subagents:** running this skill is the user's request to use them where it says so. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, work inline and say so. Tell exploration subagents they need not fetch the Agent Reference.
@@ -30,12 +30,14 @@ 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`, 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.
33
+ 2. **Start from the spec's `## Research Notes`, and any bt-recon doc (`.agents/recon/*_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).
37
37
 
38
- **Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief (kebab-case); `spec_impact` and `size` inferred from the analysis; `proof: functional` unless `--parity`. List the assumptions in Codebase Analysis.
38
+ **Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief — the `<slug>`: lowercase kebab-case, `a-z 0-9 -` only, max 40 chars, with `-02`, `-03` … appended if `.agents/specs/<slug>/` already holds another feature; `spec_impact` and `size` inferred from the analysis; `proof: functional` unless `--parity`. List the assumptions in Codebase Analysis. **A Quick Plan is a creation point:** it creates the feature folder `.agents/specs/<slug>/` (with `documents/`), exactly as bt-spec would, and the plan, report and tests live there.
39
+
40
+ **The feature folder.** Every feature has one: `.agents/specs/<slug>/` holding `dashboard.html` (the feature dashboard), `documents/` (`<slug>_spec.md`, `<slug>_plan.md`, bt-execute's `<slug>_autopilot.md`, the dashboard data `<slug>_dashboard.js` and live status `<slug>_live.js`), `snapshots/` and `tests/`. From a spec, `<slug>` is its folder name. A **legacy flat spec** (`.agents/specs/<slug>_spec.md`) is read where it is and left there; the plan and report still go into the new `.agents/specs/<slug>/` folder, and the report's Spec link points back to the flat file.
39
41
 
40
42
  ## Step 2. Rules for a good plan
41
43
 
@@ -44,7 +46,7 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
44
46
  1. **Tasks are real units of work** — something a developer would commit on its own, with its tests. Guide: `small` 1–3 tasks, `medium` 3–8, `large` as needed. Merge tasks that touch the same code for the same purpose; split only when a task would not fit in one sitting. Going well past the guide needs a one-line reason in Codebase Analysis.
45
47
  2. **Phases.** Group tasks under `### Phase N — <name>`. bt-execute runs one independent verifier per phase. Small plan = one phase; otherwise 2–4 related tasks ending at a natural checkpoint.
46
48
  3. **`Verify level`** per task: `standard` (build, named tests, diff review) or `live` (needs the dev server, a browser, Unity or Blender to observe). Mark `live` whenever correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity. The last feature task carries one `live` end-to-end check of the whole feature when it has anything on screen — write it into that task's Acceptance, not as a separate task; a read-and-confirm check likewise belongs in the Acceptance of the task that made the change. bt-execute's verifier performs the live checks, and does all of a phase's live tasks in **one** session. So mark as many tasks `live` as truly need it, but never schedule a capture, screenshot or page session **per task** in the Steps — the phase gets one session covering all of them, and any second engine or full-resolution pass happens once, in the final end-to-end task. A plan with more planned looks than phases is the single most expensive mistake this skill can make. If a live check may be impossible where the plan runs (needs credentials, data or hardware), say in the task what to report instead.
47
- 4. **Named tests** with expected outcomes for every task that has a testable surface. No probe suites, fuzzing or mutation testing unless the risk calls for it.
49
+ 4. **Named tests** with expected outcomes for every task that has a testable surface, in test files under the feature folder's `tests/` (`.agents/specs/<slug>/tests/` — never a root `tests/` folder). No probe suites, fuzzing or mutation testing unless the risk calls for it.
48
50
  5. **Functional proof by default:** unit tests; for anything on screen, one look per visual phase — the running result in the browser, judged against the spec and DESIGN.md, or beside a reference image when one exists (a mockup, the original site, the Unity view) — on one browser/engine at reduced resolution, with any second engine checked once in the final end-to-end task; cheap value fixtures sampled once from a reference implementation where there is one. Keep Acceptance to what a user of the feature would notice. **Numeric parity gates** (pixel thresholds, repeats, several engines) only under `--parity` / `proof: parity` or when the brief states a number — and then planned to run once per phase (iteration inside the phase uses the quick look), never loosened.
49
51
  6. **Proportional safety.** When the spec requires a safety outcome (nothing unfinished reaches the user's folders, the app keeps working between tasks), pick the cheapest mechanism that achieves it — normally a feature branch, a build output the user's folders do not read, and one copy across at the end after the live check. Version control is the archive. Add staged promotions, per-step archives or hash records only if the brief asks for them by name.
50
52
  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.
@@ -54,7 +56,7 @@ Execution time is mostly *how the work is proven*, not the code. Keep proof stro
54
56
 
55
57
  ## Step 3. Write the plan
56
58
 
57
- Print `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …`. The file has, in order:
59
+ Print `✍️ [bt-plan] Writing .agents/specs/<slug>/documents/<slug>_plan.md …`. The file has, in order:
58
60
 
59
61
  **`## Codebase Analysis`** — what Step 1 found, citing real files; the SPEC.md sections the plan conforms to; `spec_impact`, `size`, `proof` (say which were inferred); Quick Plan assumptions.
60
62
 
@@ -66,7 +68,7 @@ Print `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …`. The file has
66
68
  - [ ] **T1** — <short imperative title>
67
69
  - Files: `path/one` (create), `path/two` (modify)
68
70
  - Details: <what to do>
69
- - Tests: `<test file>` — `<case>` → <expected outcome>; … (or "no testable surface — <why>")
71
+ - Tests: `.agents/specs/<slug>/tests/<test file>` — `<case>` → <expected outcome>; … (or "no testable surface — <why>")
70
72
  - Acceptance: <observable, checkable statements>
71
73
  - Verify level: standard
72
74
  ```
@@ -106,7 +108,7 @@ Rate each task by the **kind of work it does** (classify tasks, not the plan —
106
108
 
107
109
  These rates put 17 of the 21 runs inside the −30 % / +40 % range and 20 of 21 within 0.6–1.6× (the old flat `tasks × 17 + phases × 10`: 13 of 21 within 0.6–1.6×), and the misses ran fast, not slow. Under the flat rate, plans estimated themselves about **2.5× too high** when the work was mostly code and up to **2× too low** when it was Unity, parity or GPU work — wrong in both directions, so classify every task.
108
110
 
109
- To recalibrate later, read the `⏱` lines bt-execute writes to each `<plan>_autopilot.md` — they carry the plan's estimate, active minutes per phase and per run, and waits already separated out.
111
+ To recalibrate later, read the `⏱` lines bt-execute writes to each `documents/<slug>_autopilot.md` (older runs: `<plan>_autopilot.md` beside a flat plan) — they carry the plan's estimate, active minutes per phase and per run, and waits already separated out.
110
112
 
111
113
  Write a table `Phase | Tasks | Kind (code / live / Unity) | What makes it slow | Estimate`, then one **Total** line in hours (days only if over ~16 h), the `--strict` multiplier, and the biggest uncertainty in one line. If the total averages above ~40 or below ~6 min per task, the estimate is wrong before the plan is: re-check it. An estimate, never a pin.
112
114
 
@@ -123,11 +125,22 @@ Each task above is a checkbox. To implement:
123
125
  - Stop and report if a task cannot be completed. Do NOT check a box for partial, skipped, or unverified work.
124
126
  ```
125
127
 
128
+ ## Step 4. Write the dashboard (planned state)
129
+
130
+ Print `🗂️ [bt-plan] Writing the feature dashboard …`. From bt-execute's `templates/dashboard/` *(where skills load through a tool: `load_skill('bt-execute')` + `read_skill_resource`; where they are files: the sibling `bt-execute/` folder in the skills directory this skill was loaded from)*:
131
+
132
+ - copy `dashboard.html` to `.agents/specs/<slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else;
133
+ - write `.agents/specs/<slug>/documents/<slug>_dashboard.js` following `dashboard.template.js` (its header comment is the schema): `feature` (title, slug, branch, `origin` `spec` or `quick-plan`, size, proof, a plain-language summary), `documents` (Spec — omitted for a Quick Plan — and Plan), `status: "planned"`, `updatedAt` from the shell clock (`date '+%Y-%m-%d %H:%M'`; with no shell, the current local time), `estimate` (the Total line), every phase and task from the plan as `pending` (id, title, kind from the estimate table, verify level), an empty `afterAction` and no snapshots, the plan's Decisions as `decisions` (Heavy Plan; otherwise the spec's), and one `activity` line: `Plan written — <n> tasks in <k> phases, estimated <range>`;
134
+ - write `.agents/specs/<slug>/documents/<slug>_live.js` following `live.template.js`: no task, `role: "orchestrator"`, `title: "Plan written — waiting for bt-execute"`, no steps (bt-execute rewrites it at every step of a run).
135
+
136
+ Re-planning an existing feature rewrites the data file's phases and tasks from the new plan but keeps the results of tasks already done, its `afterAction` and its `activity` history, adding a `Plan revised` line; new tasks are `pending` with an `updates` note, and a `complete` status becomes `paused`. If the template cannot be found, skip the dashboard and say so — bt-execute creates it on its first run.
137
+
126
138
  Then **stop**. Final message: a short summary, the estimated time, and:
127
139
 
128
140
  ```
129
- Plan written to _specs/<feature-name>_plan.md — <n> tasks, estimated <total range> of agent time
130
- Run a single task with `bt-execute _specs/<feature-name>_plan.md T1`, or every task with `bt-execute _specs/<feature-name>_plan.md ALL` (add `--strict` for an adversarial verifier on every task).
141
+ Plan written to .agents/specs/<slug>/documents/<slug>_plan.md — <n> tasks, estimated <total range> of agent time
142
+ Dashboard: .agents/specs/<slug>/dashboard.html (open it in a browser; bt-execute keeps it current)
143
+ Run a single task with `bt-execute .agents/specs/<slug>/documents/<slug>_plan.md T1`, or every task with `bt-execute .agents/specs/<slug>/documents/<slug>_plan.md ALL` (add `--strict` for an adversarial verifier on every task).
131
144
  ```
132
145
 
133
146
  ## Heavy Plan mode (`--heavy`)
@@ -142,4 +155,4 @@ Sections, in order: `## Codebase Analysis` (plus the test baseline) · **`## Dec
142
155
  `- **D3 — <decision, stated as a fact>.** <why / precedent with file:line> Rejected: <alternative> (<why not>). Binds: T4, T7.`
143
156
  - **`## 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.
144
157
  - **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.
145
- - **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.
158
+ - **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, write the dashboard (Step 4) from the finished plan, then finalize: `💾 [bt-plan] Plan finalized — <n> tasks, <k> decisions`, and report the two or three most consequential decisions and anything left unresolved.
@@ -88,7 +88,7 @@ Before building anything, decide the **N distinct directions** so the batch does
88
88
 
89
89
  **Full-bleed does not mean a single locked screen — these are landing pages, so scroll stays first-class** (bt-design's *scroll is the transport, not the enemy* rule). Full-viewport views scroll between and through each other, and any **3D-hero-scroll direction plays its cinematic scroll, then settles into the full-bleed console home view at the end** (the sweep-into-console handoff) rather than dead-ending or dropping into a stock template. Compose each view full-bleed; let scroll carry the user between them.
90
90
 
91
- Write the plan to `_prototypes/_directions.md` (id, name, one-line design language, inspiration source + attribution if any, whether it's a 3D-hero-scroll direction). This is the batch's manifest.
91
+ Write the plan to `.agents/prototypes/_directions.md` (id, name, one-line design language, inspiration source + attribution if any, whether it's a 3D-hero-scroll direction). This is the batch's manifest.
92
92
 
93
93
  ## Sourcing directions from awwwards
94
94
 
@@ -128,16 +128,16 @@ Build the N prototypes **in parallel via subagents** — if a subagent-spawning/
128
128
 
129
129
  Each prototype subagent gets: its **direction**, the **theme**, the **world anchor** (screenshots + extracted palette/mood/silhouettes), the **`--type`**, and the **asset workflows** available, plus the full text of the Agent Reference's **Coding Practices — ENFORCED**. It must:
130
130
 
131
- 1. **Own its folder.** Create `_prototypes/<NN-slug>/` and put **everything self-contained inside it** — markup, styles, scripts, and all generated/downloaded assets. No shared globals; a prototype is copy-out-able on its own.
131
+ 1. **Own its folder.** Create `.agents/prototypes/<NN-slug>/` and put **everything self-contained inside it** — markup, styles, scripts, and all generated/downloaded assets. No shared globals; a prototype is copy-out-able on its own.
132
132
  2. **Build to the Fable bar for its lens** — advanced 3D tactics, otherworldly animation, exceptional palette, novel type. Not a template with the colors swapped; a distinct, *mind-blowing* execution of that direction for this game. **Full-bleed console UI by default** (bt-design's *Layout Philosophy*): fill the whole viewport edge-to-edge like a console dashboard / game menu, not a centered fixed-width website — unless this direction is the noted contained exception.
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.
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 .agents/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
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
 
140
- When `--3d-hero-scroll` is set (or a direction inherently calls for the cinematic hero), that prototype is built via **bt-hero → bt-design's 3D-Hero-Scroll protocol** — copy the templates, run the footage pipeline, calibrate, verify. **But this is a batch: bt-hero must never prompt.** So all of bt-hero's creative slots must be **pre-resolved before the subagent starts** — the star, look/anchor, journey/beats, HUD, controls, sweep, brand/overlays, and below-the-journey are derived from the theme + world anchor + direction and written into a hero brief (`_prototypes/<NN-slug>/_hero-brief.md`) up front. The subagent runs bt-hero's build against that brief with **zero questions** ("enough to fly," always). If a slot genuinely can't be resolved without the user, resolve it with a sensible default and note it — do **not** pause the batch.
140
+ When `--3d-hero-scroll` is set (or a direction inherently calls for the cinematic hero), that prototype is built via **bt-hero → bt-design's 3D-Hero-Scroll protocol** — copy the templates, run the footage pipeline, calibrate, verify. **But this is a batch: bt-hero must never prompt.** So all of bt-hero's creative slots must be **pre-resolved before the subagent starts** — the star, look/anchor, journey/beats, HUD, controls, sweep, brand/overlays, and below-the-journey are derived from the theme + world anchor + direction and written into a hero brief (`.agents/prototypes/<NN-slug>/_hero-brief.md`) up front. The subagent runs bt-hero's build against that brief with **zero questions** ("enough to fly," always). If a slot genuinely can't be resolved without the user, resolve it with a sensible default and note it — do **not** pause the batch.
141
141
 
142
142
  ## Step 4 — Iteration passes (the quality gate)
143
143
 
@@ -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>
@@ -23,14 +23,14 @@ Turn a short feature idea into a spec file that `bt-plan` can plan from. Follow
23
23
  ## Ground rules
24
24
 
25
25
  - **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the spec needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-spec] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-spec] No time limit`, and do not add it). Speed never skips a required step or lowers the quality of the spec.
26
- - **Planning only.** Research read-only and write only the spec file (plus `SPEC.md` from the scaffold, if the user says yes below). No source edits, no builds, no tests, no other shell commands.
26
+ - **Planning only.** Research read-only and write only the spec file into the new feature folder (plus `SPEC.md` from the scaffold, if the user says yes below, and a builder skill's intake file in the same `documents/` folder — Step 3). No source edits, no builds, no tests, no other shell commands.
27
27
  - **Babylon work:** if you have not read the Babylon Toolkit Agent Reference in this session, fetch and read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — it is the authority for conventions and API; fetch its sub-documents only when relevant, and again only if a context compaction made you forget it. If the fetch fails, stop and tell the user — do not guess at the API.
28
28
  - **Say what you are doing.** Before any step that takes more than a few seconds (a fetch, a big read, subagents) print one short line — `🔎 [bt-spec] <what> …` — and one line when it returns. A silent run looks like a hang and gets cancelled.
29
29
  - **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 and say so. Tell research subagents they need not fetch the Agent Reference.
30
30
 
31
31
  ## Step 1. Arguments, name, branch
32
32
 
33
- From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If you cannot infer a sensible title, ask. Make a first estimate of the feature's `size` (defined in Step 5) — it sizes the research in Step 2.
33
+ From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If `.agents/specs/<feature_slug>/` already holds another feature, append `-02`, `-03` … to the slug. If you cannot infer a sensible title, ask. Make a first estimate of the feature's `size` (defined in Step 5) — it sizes the research in Step 2.
34
34
 
35
35
  Git is optional. **Where git is available:** stop now if the working tree has uncommitted or untracked files (ask the user to commit or stash); switch to a new branch `branch_name` (if taken, append `-01`, `-02` …) just before writing the spec in Step 5, so a conflict stop leaves no empty branch behind. **Where it is not** (no binary, sandboxed host such as the Babylon Toolkit App Builder): skip this silently — the branch name recorded in the spec header is the deliverable. Do not mention git as missing.
36
36
 
@@ -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
@@ -49,7 +49,7 @@ If the feature is built on a pattern owned by another skill (bt-design's 3D-Hero
49
49
  - Record the pattern's behavioral config as explicit Functional Requirements, using the sub-skill's **own names and defaults, unchanged** (e.g. 3D-Hero-Scroll `sweep: page` — PLAY glides to the document bottom and END jumps there). State any override and why.
50
50
  - Keep a behavioral option separate from the feature's route/DOM scope — `sweep` is not "which page it lives on".
51
51
  - List which optional controls are in or out.
52
- - For a named builder skill, run **only its intake steps** here (bt-hero Steps 1–2 → the hero brief; bt-prototype Steps 1–2 → the `_directions.md` manifest) and fold the result in; resolve its questions now so nothing prompts later. The builder contributes intake only — this spec → plan → execute loop owns the build and the verification.
52
+ - For a named builder skill, run **only its intake steps** here (bt-hero Steps 1–2 → the hero brief, written to `.agents/specs/<feature_slug>/documents/<feature_slug>_hero-brief.md`; bt-prototype Steps 1–2 → the `_directions.md` manifest) and fold the result in; resolve its questions now so nothing prompts later. The builder contributes intake only — this spec → plan → execute loop owns the build and the verification.
53
53
 
54
54
  ## Step 4. `--grill-me` (only with the flag)
55
55
 
@@ -67,7 +67,17 @@ 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
+ **The feature folder.** This spec creates the feature's folder, which holds everything about it from here on:
71
+
72
+ ```
73
+ .agents/specs/<feature_slug>/
74
+ dashboard.html the feature dashboard (bt-plan writes it; bt-execute keeps it current)
75
+ documents/ <feature_slug>_spec.md, _plan.md, _autopilot.md, _dashboard.js, _live.js, and any builder intake file
76
+ snapshots/ the meaningful snapshots of the build, shown by the dashboard
77
+ tests/ every test the plan's tasks write
78
+ ```
79
+
80
+ Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md …`, then write the spec to `.agents/specs/<feature_slug>/documents/<feature_slug>_spec.md` (creating the folders) 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
81
 
72
82
  ```markdown
73
83
  # Spec for <feature-name>
@@ -112,7 +122,7 @@ proof: <functional|parity>
112
122
  - ...
113
123
 
114
124
  ## Testing Guidelines
115
- Create test file(s) in ./tests for these named cases, without going heavy:
125
+ Create test file(s) in .agents/specs/<feature-name>/tests/ for these named cases, without going heavy:
116
126
  - <case> → <expected outcome>
117
127
  ```
118
128
 
@@ -120,7 +130,8 @@ Create test file(s) in ./tests for these named cases, without going heavy:
120
130
 
121
131
  ```
122
132
  Branch: <branch_name>
123
- Spec file: _specs/<feature_slug>_spec.md
133
+ Spec file: .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md
134
+ Feature folder: .agents/specs/<feature_slug>/ (bt-plan adds the plan and the dashboard)
124
135
  Title: <feature_title>
125
136
  ```
126
137
 
@@ -132,7 +143,7 @@ Do not print the spec unless asked.
132
143
  # Project Spec
133
144
 
134
145
  > 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** —
146
+ > Feature specs in `.agents/specs/` are derived from and constrained by this file. It describes the **product** —
136
147
  > what exists and why — never how a feature was verified (capture protocols, tool lists, ledgers).
137
148
 
138
149
  ## Architecture & Module Layout _(current-state — replace/merge)_
@@ -156,7 +167,7 @@ Do not print the spec unless asked.
156
167
 
157
168
  ## How to update this spec
158
169
  - `(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.
170
+ - `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
171
  - Add each new Game System as its own subsection; record every new dependency (version + why) in the task that introduces it.
161
172
  - 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
173
  ```