@babylonjs-toolkit/agent 1.1.18 → 1.1.25
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 +34 -6
- package/package.json +2 -2
- package/persona.md +1 -1
- package/skills/bt-atlas/SKILL.md +31 -8
- package/skills/bt-design/references/3d-hero-docs.md +9 -6
- package/skills/bt-design/references/3d-hero-scroll.md +32 -10
- package/skills/bt-execute/SKILL.md +90 -35
- package/skills/bt-gauntlet/SKILL.md +4 -4
- package/skills/bt-gauntlet/references/spec-composition.md +4 -2
- package/skills/bt-gauntlet/references/target-images.md +34 -2
- package/skills/bt-gauntlet/references/unity-pipeline.md +12 -3
- package/skills/bt-hero/SKILL.md +3 -2
- package/skills/bt-landing/SKILL.md +2 -0
- package/skills/bt-plan/SKILL.md +34 -11
- package/skills/bt-prototype/SKILL.md +3 -3
- package/skills/bt-spec/SKILL.md +5 -3
package/README.md
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Babylon Toolkit Agent
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.25)
|
|
2
|
+
|
|
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.
|
|
2
4
|
|
|
3
5
|
Universal [Agent Skills](https://agentskills.io) for the `Babylon Toolkit` web game development framework.
|
|
4
6
|
Each `SKILL.md` follows the open standard, so the **same file works unchanged** in Claude Code, Codex CLI, and GitHub Copilot.
|
|
@@ -125,7 +127,7 @@ happens to be named `bt-something` is safe.
|
|
|
125
127
|
|-------|---------|--------------|
|
|
126
128
|
| [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. |
|
|
127
129
|
| [`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. |
|
|
128
|
-
| [`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. |
|
|
130
|
+
| [`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. |
|
|
129
131
|
| [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
|
|
130
132
|
| [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
|
|
131
133
|
| [`bt-landing`](skills/bt-landing/SKILL.md) | `/bt-landing` | Re-design the landing page, splash screen, preloader and custom overlays. |
|
|
@@ -154,6 +156,32 @@ that task 40 uses the same names, shapes and patterns as task 3 — whichever se
|
|
|
154
156
|
it. Without the flag, `bt-plan` produces its standard plan; `bt-execute` runs either kind the
|
|
155
157
|
same way.
|
|
156
158
|
|
|
159
|
+
### Proportional verification (`/bt-execute` default) and `--strict`
|
|
160
|
+
|
|
161
|
+
Execution time is dominated by verification, not by the code edits, so the loop is sized to the
|
|
162
|
+
feature. `bt-spec` records a `size` (small / medium / large); `bt-plan` uses it to set the task
|
|
163
|
+
budget (a small feature is 1–3 tasks in one phase), groups tasks into phases, marks each task's
|
|
164
|
+
`Verify level` (`standard` or `live`), and never pins absolute test counts. By default
|
|
165
|
+
`bt-execute` has the implementer write and run each task's named tests, then runs **one
|
|
166
|
+
independent verifier per phase** with a scoped charter (Acceptance, the Verify commands, the
|
|
167
|
+
tests re-run and judged for coverage, a diff review for real defects), always does live
|
|
168
|
+
Unity/browser QA on any task whose correctness shows only at runtime (rendering, visuals,
|
|
169
|
+
interaction, Unity↔Babylon parity) plus one end-to-end check at the end, and re-checks only
|
|
170
|
+
what failed.
|
|
171
|
+
Docs are read once by the orchestrator and handed to subagents as a brief instead of every
|
|
172
|
+
subagent re-fetching the Agent Reference.
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
/bt-execute --strict @_specs/<feature>_plan.md ALL
|
|
176
|
+
/bt-execute --auto-pilot --strict @_specs/<feature>_plan.md ALL
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`--strict` restores full rigor: an adversarial verifier on **every task** (mutation checks,
|
|
180
|
+
oracles, re-deriving from the plan as it sees fit), live QA on every task with a rendered or
|
|
181
|
+
exported surface, a full fresh re-verify on each fix attempt, and a 5-attempt fix loop. It
|
|
182
|
+
combines with `--auto-pilot`. There is no separate testing subagent in either mode — the
|
|
183
|
+
implementer writes the tests and the independent verifier judges them.
|
|
184
|
+
|
|
157
185
|
### Unattended runs (`/bt-execute --auto-pilot`)
|
|
158
186
|
|
|
159
187
|
```
|
|
@@ -163,10 +191,10 @@ same way.
|
|
|
163
191
|
Auto-pilot is for running a 50-task plan overnight. There is no one to ask, so `bt-execute`
|
|
164
192
|
makes every call itself — from the plan's Decisions, then the Babylon Toolkit Agent Reference
|
|
165
193
|
(Unity → interactive glTF → BabylonJS script components), then the codebase, then senior-developer
|
|
166
|
-
default — and logs each one. Nothing is relaxed on quality: every task still
|
|
167
|
-
|
|
168
|
-
What changes is that a failure never halts the run: a failing task gets a bounded fix loop (
|
|
169
|
-
5
|
|
194
|
+
default — and logs each one. Nothing is relaxed on quality: every task still has passing tests
|
|
195
|
+
and goes through an independent verifier, and a box only flips on a genuine PASS.
|
|
196
|
+
What changes is that a failure never halts the run: a failing task gets a bounded fix loop (3
|
|
197
|
+
attempts, 5 under `--strict`), is then marked `⏭️ DEFERRED (auto-pilot): <reason>` in the plan, and the run moves
|
|
170
198
|
on; deferred tasks get one more pass at the end. Each verified task is committed as a checkpoint
|
|
171
199
|
on the current branch (an `autopilot/<plan>` branch is created if you are on `main`; nothing is
|
|
172
200
|
ever pushed), and a `<plan>_autopilot.md` run log next to the plan records every task outcome,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs-toolkit/agent",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "Installs the Babylon Toolkit
|
|
3
|
+
"version": "1.1.25",
|
|
4
|
+
"description": "Installs the Babylon Toolkit Desktop Agent for Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"babylonjs",
|
|
7
7
|
"babylon-toolkit",
|
package/persona.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Babylon Toolkit Agent Persona
|
|
2
2
|
|
|
3
|
-
You are an expert web game developer using BabylonJS and the Babylon Toolkit. Whenever the user's request involves Babylon, BabylonJS, or the Babylon Toolkit, you must always fetch and read the `Agent Reference` at https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md before doing anything else. Treat that document as your source of truth for conventions, api, patterns and training examples. If the fetch fails, stop immediately and tell the user. This applies even on the very first turn of a new or empty project, before any scaffolding.
|
|
3
|
+
You are an expert web game developer using BabylonJS and the Babylon Toolkit. Whenever the user's request involves Babylon, BabylonJS, or the Babylon Toolkit, you must always fetch and read the `Agent Reference` at https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md before doing anything else. Treat that document as your source of truth for conventions, api, patterns and training examples. If the fetch fails, stop immediately and tell the user. This applies even on the very first turn of a new or empty project, before any scaffolding. The one exception: a subagent launched by a bt-* skill whose prompt carries a context brief with the Reference excerpts it needs uses that brief instead of re-fetching — the orchestrator has already read the Reference, and fetching it again in every subagent adds time, not rigor.
|
|
4
4
|
|
|
5
5
|
You own 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. Drive every one of those yourself; never hand a GUI step back to the user, and never stop to ask permission for work the reference already documents. Make the best call, state your assumption, and finish the job. See `Agent Authority — The Entire Pipeline Is Yours` in the reference.
|
|
6
6
|
|
package/skills/bt-atlas/SKILL.md
CHANGED
|
@@ -61,17 +61,37 @@ guess, substitute a different file, or continue with a partial setup. Tell the
|
|
|
61
61
|
user exactly which input failed and why, and ask for a corrected path/URL.
|
|
62
62
|
|
|
63
63
|
## Tools
|
|
64
|
-
- **Image generation**:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
tool is used, pass BOTH the base texture and the UV layout as reference
|
|
64
|
+
- **Image generation**: pick the backend in this order:
|
|
65
|
+
1. the tool or model the user named (e.g. "use nano-banana-2", "use Flux", "use Higgsfield");
|
|
66
|
+
2. the **kie** image MCP (`kie-image-mcp`), the **default** where configured;
|
|
67
|
+
3. the **Higgsfield** MCP (`mcp__higgsfield__generate_image`) where configured;
|
|
68
|
+
4. the host's built-in image generation, or any other configured image tool.
|
|
69
|
+
|
|
70
|
+
Whichever tool is used, pass BOTH the base texture and the UV layout as reference
|
|
71
71
|
images to it. Match `aspect_ratio` to the texture (usually `1:1`), request a
|
|
72
72
|
resolution/size close to the texture size (e.g. `2K` for 2048px), and request
|
|
73
73
|
PNG output. If no image-generation tool is available at all, tell the user
|
|
74
74
|
and ask them to configure one before proceeding.
|
|
75
|
+
|
|
76
|
+
- **kie**: `generate_image` with `reference_paths: [<base.png>, <uv_layout.png>]`
|
|
77
|
+
(in that order), `out_path: <scratch>/raw/skin_var_NN.png`, `output_format: "png"`.
|
|
78
|
+
- **Higgsfield**: it cannot read local files and has no `out_path`.
|
|
79
|
+
1. **Upload both references once**: `media_upload {files:[{filename:"base.png"},{filename:"uv_layout.png"}]}`,
|
|
80
|
+
then `curl -f -X PUT --upload-file <file> '<upload_url>'` for each, then
|
|
81
|
+
`media_confirm {type:"image", media_ids:[…]}`. Reuse the two `media_id`s for every variant.
|
|
82
|
+
2. **Pick a model that takes several reference images**: `gpt_image_2_5` (default),
|
|
83
|
+
`nano_banana_2`, or `seedream_v4_5`. Never use `z_image`, which accepts no references. Pass
|
|
84
|
+
`medias: [{role:"image_references", value:<base id>}, {role:"image_references", value:<uv id>}]`,
|
|
85
|
+
with the base texture first, and `resolution: "2k"` for a 2048 texture.
|
|
86
|
+
3. **Preflight once** with `get_cost: true` and tell the user the per-variant credit cost before a
|
|
87
|
+
large batch. Always send `use_unlim: false`.
|
|
88
|
+
4. For several variants, use `generate_image_batch` (≤12 per call, `index` = variant number) and then
|
|
89
|
+
`jobs_wait`. For one variant, use `generate_image` then `job_status {jobId, sync:true}`.
|
|
90
|
+
5. **Download each result** from `results.rawUrl`:
|
|
91
|
+
`curl -fL -o <scratch>/raw/skin_var_NN.png '<rawUrl>'`. Step 5 composites local files only.
|
|
92
|
+
`composite_skin.py` resizes the output to the base texture's size itself, so an output at a
|
|
93
|
+
different size needs no extra step.
|
|
94
|
+
See the Babylon Toolkit reference `web-higgsfield-mcp.md` for the full tool list.
|
|
75
95
|
- **Helper scripts** live in the `scripts/` folder next to this SKILL.md
|
|
76
96
|
(need Python 3 + Pillow + numpy):
|
|
77
97
|
- `scripts/uv_island_mask.py` — build the island mask from the UV layout.
|
|
@@ -168,7 +188,10 @@ for just those indices.
|
|
|
168
188
|
|
|
169
189
|
## Notes & gotchas
|
|
170
190
|
- Always pass BOTH base + UV layout as references to the generator; never rely on
|
|
171
|
-
the prompt alone to hold the layout.
|
|
191
|
+
the prompt alone to hold the layout. On Higgsfield that means two uploaded
|
|
192
|
+
`media_id`s in `medias`, not file paths.
|
|
193
|
+
- Generated outputs (kie or Higgsfield) must end up as local files in `<scratch>/raw/`;
|
|
194
|
+
never reference a remote result URL from the finals or the engine project.
|
|
172
195
|
- The mask is the safety net. If a variant's island content is shifted inside its
|
|
173
196
|
island, the composite clips it to the island shape — re-prompt that variant
|
|
174
197
|
rather than widening the mask.
|
|
@@ -64,12 +64,15 @@ all beats ffmpeg concat → journey.mp4
|
|
|
64
64
|
**Which tool backs `generate_image` / `generate_video`?** These are generic
|
|
65
65
|
calls, not a specific vendor. The skill routes them to whatever image/video
|
|
66
66
|
generation is configured in your environment — KIE MCP servers (e.g.
|
|
67
|
-
`kie-image-mcp` and `kie-video-mcp
|
|
68
|
-
image/video generation, or any other configured image/video tool.
|
|
69
|
-
just says "generate the footage"; the wiring picks the backend.
|
|
70
|
-
`reference_paths`
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
`kie-image-mcp` and `kie-video-mcp`, the default), Higgsfield MCP, the model's
|
|
68
|
+
own built-in image/video generation, or any other configured image/video tool.
|
|
69
|
+
The prompt just says "generate the footage"; the wiring picks the backend.
|
|
70
|
+
`image_paths` / `reference_paths` / `out_path` are the KIE/Kling parameter names.
|
|
71
|
+
On **Higgsfield**, `image_paths[0]` / `[1]` become `medias` roles `start_image` /
|
|
72
|
+
`end_image` on `kling3_0` or `seedance_2_5`. Local frames are uploaded first
|
|
73
|
+
(`media_upload` → PUT → `media_confirm`), and `out_path` becomes "poll
|
|
74
|
+
`job_status`, then `curl` the result into `media/`". The full table is in
|
|
75
|
+
`3d-hero-scroll.md` §2.
|
|
73
76
|
|
|
74
77
|
**"Chain last-frame-to-first-frame" decoded:** Kling's `image_paths[0]` pins a
|
|
75
78
|
clip's FIRST frame. The pipeline extracts clip N's LAST frame with ffmpeg and
|
|
@@ -39,9 +39,9 @@ memory in any framework; copy it and configure it.
|
|
|
39
39
|
1. **Footage source** (pick one):
|
|
40
40
|
- **(a) Provided video** — skip to §3 (still needs the scrub re-encode).
|
|
41
41
|
- **(b) Generate the footage** with whatever image/video generation is
|
|
42
|
-
configured — KIE MCP servers (`kie-image-mcp` / `kie-video-mcp
|
|
43
|
-
Higgsfield MCP, the model's own built-in image/video
|
|
44
|
-
other configured image/video tool — §2.
|
|
42
|
+
configured — KIE MCP servers (`kie-image-mcp` / `kie-video-mcp`, the
|
|
43
|
+
**default**), Higgsfield MCP, the model's own built-in image/video
|
|
44
|
+
generation, or any other configured image/video tool — §2.
|
|
45
45
|
- **(c) No footage possible** — this pattern is wrong; use a static hero.
|
|
46
46
|
2. **Brand tokens** — map `--hs-bg / --hs-ink / --hs-dim / --hs-accent /
|
|
47
47
|
--hs-display / --hs-mono` to the host site's design system (DESIGN.md or
|
|
@@ -74,18 +74,39 @@ memory in any framework; copy it and configure it.
|
|
|
74
74
|
## 2 · Footage pipeline (generation path)
|
|
75
75
|
|
|
76
76
|
The generation backend is pluggable — the pipeline below is the same whatever
|
|
77
|
-
produces the frames.
|
|
78
|
-
KIE MCP servers (`kie-image-mcp` / `kie-video-mcp
|
|
79
|
-
own built-in image/video generation
|
|
80
|
-
The parameter names below (`reference_paths`, `image_paths
|
|
81
|
-
|
|
82
|
-
under their own names — map to whichever you're using.
|
|
77
|
+
produces the frames. Choose the backend in this order: the one the user named →
|
|
78
|
+
**KIE MCP servers** (`kie-image-mcp` / `kie-video-mcp`, the default) → **Higgsfield
|
|
79
|
+
MCP** → the model's own built-in image/video generation → any other configured
|
|
80
|
+
image/video tool. The parameter names below (`reference_paths`, `image_paths`,
|
|
81
|
+
`out_path`) are KIE/Kling's; map them to your backend (Higgsfield mapping below).
|
|
83
82
|
|
|
84
83
|
> **If using the KIE MCP servers** (Babylon Toolkit projects): fetch the
|
|
85
84
|
> Babylon Toolkit Agent Reference and its `web-kie-servers.md` sub-document
|
|
86
85
|
> first (per CLAUDE.md). Those servers read the key from `.env` — a file named
|
|
87
86
|
> `env` is ignored.
|
|
88
87
|
|
|
88
|
+
> **If using the Higgsfield MCP** (`mcp__higgsfield__*`): fetch the Agent
|
|
89
|
+
> Reference's `web-higgsfield-mcp.md` sub-document first. Higgsfield has no
|
|
90
|
+
> `out_path` and cannot read local files, so every KIE-shaped call maps like this:
|
|
91
|
+
>
|
|
92
|
+
> | KIE shape | Higgsfield |
|
|
93
|
+
> |---|---|
|
|
94
|
+
> | local `reference_paths` / `image_paths` | upload first: `media_upload` → `curl -f -X PUT --upload-file <f> '<upload_url>'` → `media_confirm {type:"image"}` → `media_id`. A previous Higgsfield output (anchor image, generated still) needs no upload; pass its `job_id` |
|
|
95
|
+
> | anchor/reference image | `generate_image` `medias: [{role:"image_references", value}]` (`gpt_image_2_5` or `nano_banana_pro`) |
|
|
96
|
+
> | `image_paths[0]` = first frame | `generate_video` `medias: [{role:"start_image", value}]` |
|
|
97
|
+
> | `image_paths[1]` = last frame | `medias: [{role:"end_image", value}]` |
|
|
98
|
+
> | Kling 3 `std`/`pro` | `model: "kling3_0"`, `mode: "std"|"pro"|"4k"`, `duration` 3–15, `aspect_ratio` 16:9 |
|
|
99
|
+
> | general video | `model: "seedance_2_5"` (`duration` 4–30, `resolution` 480p/720p/1080p) |
|
|
100
|
+
> | `out_path` | `job_status {jobId, sync:true}` until `completed` (video ~60–180 s), then `curl -fL -o clipN.mp4 '<result url>'` |
|
|
101
|
+
>
|
|
102
|
+
> The scrub encode strips audio (`-an`), so turn generated audio **off**. That is
|
|
103
|
+
> `sound: "off"` on `kling3_0` and `generate_audio: false` on `seedance_2_5`, and
|
|
104
|
+
> it also lowers the credit cost. Preflight each clip with `get_cost: true`,
|
|
105
|
+
> always send `use_unlim: false`, and tell the user the total credits for the
|
|
106
|
+
> film before submitting it: a 4-clip film is the expensive part of this pattern.
|
|
107
|
+
> The extracted last frame (`last.jpg`) is a local file, so it goes through
|
|
108
|
+
> the upload step before it can pin the next clip's `start_image`.
|
|
109
|
+
|
|
89
110
|
1. **One hero anchor image first** (image model, e.g. nano-banana-pro, 16:9,
|
|
90
111
|
2K). Every other asset references it (reference/anchor image input) so it is
|
|
91
112
|
the same product everywhere.
|
|
@@ -103,7 +124,8 @@ under their own names — map to whichever you're using.
|
|
|
103
124
|
3. **Know your video model's real output** (example — KIE/Kling 3: `std` mode
|
|
104
125
|
returns 1284×716, not 1080p — use `pro` if that matters; clips run ~8.04s
|
|
105
126
|
for a requested 8s). Whatever the backend, ffprobe everything; never assume
|
|
106
|
-
resolutions or durations.
|
|
127
|
+
resolutions or durations. Download every clip into the project (`media/`)
|
|
128
|
+
before ffmpeg touches it; never hot-link a backend CDN URL.
|
|
107
129
|
4. **Concat + scrub encode** (the scrub encode is NON-NEGOTIABLE):
|
|
108
130
|
```
|
|
109
131
|
ffmpeg -y -f concat -safe 0 -i list.txt -c:v libx264 -preset slow -crf 18 -pix_fmt yuv420p -an journey.mp4
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bt-execute
|
|
3
|
-
description: "The Babylon Toolkit Execute Skill runs one task — or all remaining tasks — from a feature plan or spec file. Use when asked to run a task (e.g. `bt-execute @plan T1`), all tasks (e.g. `bt-execute @plan ALL`), or a range (e.g. `bt-execute @plan T3-T7`, `T12-`, `NEXT:3`); with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended run (e.g. `bt-execute --auto-pilot @plan ALL`): every decision is made autonomously from the plan, the Babylon Toolkit Agent Reference and the codebase, failing tasks are retried then deferred, and the run never stops for human input until the work queue is empty."
|
|
3
|
+
description: "The Babylon Toolkit Execute Skill runs one task — or all remaining tasks — from a feature plan or spec file. Use when asked to run a task (e.g. `bt-execute @plan T1`), all tasks (e.g. `bt-execute @plan ALL`), or a range (e.g. `bt-execute @plan T3-T7`, `T12-`, `NEXT:3`); with no task id it runs the next unchecked task. Add `--auto-pilot` for an unattended run (e.g. `bt-execute --auto-pilot @plan ALL`): every decision is made autonomously from the plan, the Babylon Toolkit Agent Reference and the codebase, failing tasks are retried then deferred, and the run never stops for human input until the work queue is empty. By default verification is proportional (one scoped independent verifier per phase, browser/Unity QA on every task whose correctness shows only at runtime); add `--strict` for per-task adversarial verification (e.g. `bt-execute --strict @plan ALL`)."
|
|
4
4
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch(domain:raw.githubusercontent.com), Agent, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,8 +13,9 @@ Use the user’s message after the skill name as the `arguments`.
|
|
|
13
13
|
# Invocation
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
/bt-execute [--auto-pilot] <plan> <task-id> <optional-brief>
|
|
16
|
+
/bt-execute [--auto-pilot] [--strict] <plan> <task-id> <optional-brief>
|
|
17
17
|
```
|
|
18
|
+
- **`--strict`** *(optional flag)* — **Strict mode**: full-rigor verification — an adversarial independent verifier on **every task**, live QA on every task with a rendered/exported surface, a full fresh re-verify on every fix attempt, and a 5-attempt fix loop. Without it the run uses **Standard mode** (see **Verification modes**). Like `--auto-pilot`, it may appear anywhere, is never part of the brief, and is stripped first. The two flags combine.
|
|
18
19
|
- **`--auto-pilot`** *(optional flag)* — **Auto-pilot mode**: an unattended run. Every decision is made by you, nothing stops for human input, failing tasks are retried and then deferred rather than halting the run. See **Auto-pilot mode**. The flag may appear anywhere in the arguments and is never part of the brief — **strip it first**, then resolve the rest below.
|
|
19
20
|
- **`<plan>`** — the feature plan or spec file to execute tasks from. This is the *blueprint*.
|
|
20
21
|
- **`<task-id>`** *(optional)* — what to run: a single task id (`T4`), a **range** (`T1-T10`, `T5-`, `NEXT:3`), `NEXT` (the next unchecked task), or `ALL` (every remaining task). **Defaults to `NEXT`** when omitted (`ALL` under `--auto-pilot`). This is the *variable*.
|
|
@@ -30,6 +31,9 @@ Examples:
|
|
|
30
31
|
/bt-execute @plan.md T12- # open range: T12 through the end of the plan
|
|
31
32
|
/bt-execute @plan.md NEXT:3 # the next three unchecked tasks
|
|
32
33
|
/bt-execute --auto-pilot @_specs/<feature>_plan.md ALL # unattended overnight run of every remaining task
|
|
34
|
+
/bt-execute --strict @_specs/<feature>_plan.md ALL # full-rigor: adversarial verifier on every task
|
|
35
|
+
/bt-execute --strict @plan.md T4 # strict on a single task
|
|
36
|
+
/bt-execute --auto-pilot --strict @_specs/<feature>_plan.md ALL # unattended AND full-rigor
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
---
|
|
@@ -56,11 +60,13 @@ Treat the Agent Reference as the authority for conventions, API, and patterns. I
|
|
|
56
60
|
|
|
57
61
|
If a required fetch fails, STOP and tell me. Do not guess at the API. *(Auto-pilot: retry, then proceed on remembered Toolkit knowledge and log it — see **Auto-pilot mode**.)*
|
|
58
62
|
|
|
63
|
+
**This reading is done once, by you — the orchestrating context.** Before the first task, identify the sub-documents the plan's tasks actually need (from the tasks' Files, Applies and API usage) and read those. Subagents you launch do not re-fetch any of it: they receive a **context brief** with the parts they need (see *The context brief*).
|
|
64
|
+
|
|
59
65
|
---
|
|
60
66
|
|
|
61
67
|
## ⚠️ The Project Specification (SPEC.md) — read before executing
|
|
62
68
|
|
|
63
|
-
The project's **SPEC.md** at the repository root is the source of truth for the durable architecture, systems, conventions, and decisions. **Read it
|
|
69
|
+
The project's **SPEC.md** at the repository root is the source of truth for the durable architecture, systems, conventions, and decisions. **Read it once at the start of the run** (and again after a context compaction or when a task writes to it), and follow it while implementing (it constrains how you build, not just what).
|
|
64
70
|
|
|
65
71
|
- Implement in a way that conforms to SPEC.md's architecture, systems, and conventions.
|
|
66
72
|
- **If reality diverges from SPEC.md during execution** — the code as it actually exists contradicts the spec, or the task can only be done by breaking a documented decision/convention — STOP and flag it to the user. Do not let the spec and the code silently drift apart. *(Auto-pilot: decide which is right, update SPEC.md in the same task, log the Decision — never stop.)*
|
|
@@ -68,13 +74,13 @@ The project's **SPEC.md** at the repository root is the source of truth for the
|
|
|
68
74
|
- Record any new dependency in SPEC.md's Dependencies section as part of the task that introduces it.
|
|
69
75
|
- When writing back, follow SPEC.md's **"How to update this spec"** contract, keyed off each section's heading tag: **replace/merge** the current-state sections (Architecture, Game Systems, Conventions, Dependencies), removing seed placeholders on first real content and keeping the text matching the shipped code; **append** to the Decisions log (newest last), superseding rather than deleting.
|
|
70
76
|
|
|
71
|
-
The `Update SPEC.md` task is a task like any other: it goes through the same
|
|
77
|
+
The `Update SPEC.md` task is a task like any other: it goes through the same verification (see *Verification modes*) before its checkbox is flipped — the spec write-back is verified, not assumed.
|
|
72
78
|
|
|
73
79
|
---
|
|
74
80
|
|
|
75
81
|
## Step 1. Parse the arguments
|
|
76
82
|
|
|
77
|
-
First strip the `--auto-pilot`
|
|
83
|
+
First strip the `--auto-pilot` and `--strict` flags if present and remember which modes are in effect for the whole run (**Auto-pilot mode**; **Strict** vs the default **Standard** verification mode). Then, from the remaining `arguments`, extract:
|
|
78
84
|
|
|
79
85
|
1. `source_file` — the plan or spec file reference to read tasks from (e.g. `_specs/new-heist-form_plan.md` or `_specs/new-heist-form_spec.md`).
|
|
80
86
|
2. `task_id` — the token immediately after `source_file`, **only if** it is one of these forms (all case-insensitive):
|
|
@@ -85,23 +91,76 @@ First strip the `--auto-pilot` flag if present and remember that **Auto-pilot mo
|
|
|
85
91
|
If the token after `source_file` is none of these forms, then no `task_id` was given: **default to `NEXT`** (or `ALL` when auto-pilot is engaged), and treat everything after `source_file` as the `optional-brief`. Never ask which task to run — the default is the answer. Never treat a brief as a task id: a `task_id` must match one of the forms above exactly.
|
|
86
92
|
3. `brief` — whatever remains after `source_file` and `task_id`. It shapes *how* the selected task(s) are done, never *which* tasks are selected.
|
|
87
93
|
|
|
88
|
-
##
|
|
94
|
+
## Verification modes — Standard (default) and Strict (`--strict`)
|
|
95
|
+
|
|
96
|
+
Every mode keeps the same gates: tests are written and green, an **independent verifier** checks the work, SPEC.md is written back, and a box flips **only on a genuine PASS**. The modes differ only in *how often* the verifier runs and *how far* it digs. Proportional rigor is not less rigor: a scoped check of a two-line change is a complete check.
|
|
97
|
+
|
|
98
|
+
At the start of the run, **emit one visible status line** for the mode in effect:
|
|
99
|
+
- `⚡ [bt-execute] Standard mode — scoped verifier per phase; add --strict for per-task adversarial verification`
|
|
100
|
+
- `🔒 [bt-execute] Strict mode — per-task adversarial verification`
|
|
101
|
+
|
|
102
|
+
and one for the verification path — `🔍 [bt-execute] subagent tool detected — using an independent verifier` or `🔍 [bt-execute] no subagent tool — self-verifying`. When you report each task, note `verified (independent subagent)` or `verified (self)`.
|
|
103
|
+
|
|
104
|
+
| | **Standard** (default) | **Strict** (`--strict`) |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| Verifier runs | once per **phase** (see *Phases*) | once per **task** |
|
|
107
|
+
| Verifier charter | scoped (below) | adversarial (below) |
|
|
108
|
+
| Live QA (Unity export / dev server / browser screenshots) | every task whose correctness shows only at runtime (rendering, visuals, interaction, Unity↔Babylon parity), marked `live` or not, plus the final end-to-end check | every task with a rendered or exported surface |
|
|
109
|
+
| Re-verify after a fix | only the failed items, by a fresh verifier given the prior FAIL list | a full fresh re-verify of the task |
|
|
110
|
+
| Fix-loop attempts | 3 | 5 |
|
|
111
|
+
|
|
112
|
+
### Phases (Standard mode)
|
|
113
|
+
|
|
114
|
+
The verifier runs once per phase, not once per task. A phase is a `### Phase N` group in the plan. If the plan has no phase headings, batch the work queue into runs of **up to 3 consecutive tasks**; a task marked `Verify level: live`, the `Update SPEC.md` task, and the last task in the work queue each close a batch. Single-task and `NEXT` modes are a phase of one.
|
|
115
|
+
|
|
116
|
+
Within a phase, implement the tasks in order, one at a time, each with its own tests green (see *Tests*), **without flipping boxes yet**. Then launch one verifier for the whole phase. It returns a verdict **per task**: flip the box of every task that PASSed; each FAILed task enters the fix loop. A task that depends on a FAILed task in the same phase stays unchecked until that task passes. Resume behavior is unchanged: the next run starts at the first unchecked task.
|
|
117
|
+
|
|
118
|
+
### Tests (both modes — owned by the implementer, judged by the verifier)
|
|
119
|
+
|
|
120
|
+
There is no separate testing subagent. Whoever implements a task (you, or the implementer subagent under auto-pilot) also writes its tests. Unless the task genuinely has no testable surface (pure config/docs/asset moves — say so explicitly rather than skipping silently):
|
|
89
121
|
|
|
90
|
-
|
|
122
|
+
1. Author the test cases the plan's `Tests:` field names (or, with none named, meaningful cases covering the task's Acceptance and its likely edge cases, from the feature spec's `Testing Guidelines`), in the repo's existing test location and patterns — under `./tests` if there is no convention. Do not over-test.
|
|
123
|
+
2. Run them (and the relevant suite) until green, fixing the implementation, not the test, unless the test is wrong.
|
|
124
|
+
3. Report the command and result per task, e.g. `tests: 4 passed (implementer) · verifier-checked`.
|
|
91
125
|
|
|
92
|
-
**
|
|
126
|
+
The **verifier owns test judgment**: it re-runs the tests itself and checks that they exercise each Acceptance item and the plan's named edge cases. Missing tests, or a test that cannot fail (vacuous, asserts nothing, mocks away the behavior under test), is a **FAIL** for that task, exactly like broken code.
|
|
93
127
|
|
|
94
|
-
|
|
128
|
+
### The verifier
|
|
95
129
|
|
|
96
|
-
|
|
130
|
+
If a subagent-spawning tool is available (check the tools you actually have — Claude Code's `Agent`, Lovable's subagent tool, or your host's equivalent), launch an **independent verifier subagent** with a fresh context. Give it the **context brief** (below), the Details + Acceptance + Verify of each task it checks, and the list of changes made. It returns PASS/FAIL **per task** with evidence. If no subagent tool is available (or you are unsure), self-verify with the same charter — never call a subagent tool you do not have.
|
|
97
131
|
|
|
98
|
-
|
|
132
|
+
**Scoped charter (Standard mode)** — the verifier is told:
|
|
133
|
+
> Confirm each task's Acceptance items are genuinely met, and run each task's `Verify` commands, comparing against the stated expected output. Re-run the tests and the relevant suite once; check the tests actually cover the Acceptance items and named edge cases and could fail. Read the diff and look 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. Do live QA (dev server / browser / Unity) for every task whose correctness shows only at runtime — rendered output, visuals, interaction, Unity↔Babylon parity — whether or not the plan marks it `live`, and for the final end-to-end check; passing unit tests never substitute for it. Do the phase's live checks in one session on the already-running dev server, and re-export from Unity only when the phase changed Unity-side content. Check an absolute count in the plan (tests passed, suite size) as "named tests pass, no new failures versus baseline"; a count that is stale only because earlier tasks added tests is records-only. Out of scope unless something you found points there: mutation testing, generated oracles or fuzzing, re-deriving the plan's decisions, forced restarts of editors or servers, auditing files the phase did not touch. Aim for roughly 25 tool calls; if you find yourself going far past that, report what you have and what you would check next rather than expanding. Return PASS/FAIL per task with evidence.
|
|
99
134
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
3. Only once tests are green does the acceptance verifier run. The verifier may re-run the tests as part of its adversarial check — that overlap is intentional. The checkbox flips only when both tests pass **and** the verifier returns PASS.
|
|
135
|
+
**Adversarial charter (Strict mode)** — the verifier is told:
|
|
136
|
+
> Adversarially confirm the task's Acceptance: actively look for a reason it is NOT met. Inspect the files, run the build, the tests and the `Verify` commands, and use any technique you judge worthwhile — mutation checks against the tests, oracles or randomized inputs for non-trivial logic, re-deriving values from the plan's Decisions and Design Reference, live QA for any rendered or exported surface. Return PASS/FAIL with evidence.
|
|
103
137
|
|
|
104
|
-
|
|
138
|
+
In both modes a plausible-looking result that silently dropped a documented behavior is a **FAIL**, and records-only defects (a stale ledger line, a wrong count in a notes file) are reported separately from code defects so they can be fixed cheaply (see the fix loop). Never check a box for partial, skipped, or unverified work.
|
|
139
|
+
|
|
140
|
+
**Sibling-skill behaviors are part of Acceptance.** When a task implements a feature built on a sibling-skill template engine (e.g. bt-design's 3D-Hero-Scroll), load that sub-skill before verifying — you cannot check a behavior against a spec you have not read. *(Where skills are loaded with a tool — the Babylon Toolkit App Builder platform — call `load_skill('<name>')`, then fetch its references with `read_skill_resource` using the paths the load returns, never a guessed path. Where skills are files on disk — Claude Code — read them from `~/.claude/skills/` or the project's `.claude/skills/`. Skip the load for anything already in your context.)* Put the relevant excerpt of that skill in the verifier's brief. The verifier must confirm the skill-defined behavioral options are actually present and correct — e.g. `sweep: page` means PLAY/END genuinely reach the **document bottom**, not just the journey's end. If a task re-implemented a sub-skill's engine from memory instead of copying its template (dropping veiled cuts, the preload gate, degradation, etc.), flag it and fail the task.
|
|
141
|
+
|
|
142
|
+
### The fix loop (both modes)
|
|
143
|
+
|
|
144
|
+
A FAIL — from your own test run or from the verifier — does not flip the box. For each failed task:
|
|
145
|
+
|
|
146
|
+
1. Read the evidence and fix the **implementation** (fix a test only when the test itself is wrong, and say why). Keep the implementing context — it already understands the change.
|
|
147
|
+
2. **Records-only failures** (text, ledger, notes, counts — no code defect) are fixed directly and re-checked by you against that one item; no fresh verifier is needed for them.
|
|
148
|
+
3. Re-run the tests. On green, re-verify with a **fresh** verifier (never one that already holds an opinion): in Standard mode, give it only the failed items and the prior FAIL evidence; in Strict mode, re-verify the whole task.
|
|
149
|
+
4. Up to **3 attempts** (Standard) or **5** (Strict). Each attempt must change something material. If two consecutive attempts hit the same failure with no new hypothesis, stop the loop early.
|
|
150
|
+
|
|
151
|
+
When the loop is exhausted, the task stays `- [ ]`: outside auto-pilot, stop and report it (see each Step); under auto-pilot, DEFER it and continue.
|
|
152
|
+
|
|
153
|
+
### The context brief — read the docs once, hand them down
|
|
154
|
+
|
|
155
|
+
Every fresh subagent that re-fetches the Agent Reference, its sub-documents and the whole SPEC.md re-reads hundreds of KB before doing any work — the biggest fixed cost of a run, and it adds no rigor. So **you** read them once (see *Required Reading*), and every subagent you launch (implementer or verifier) gets a **context brief** instead:
|
|
156
|
+
|
|
157
|
+
- the task block(s) it works on, plus the plan's `Decisions` and `Design Reference` entries those tasks cite (the whole plan only if it is short and has neither section);
|
|
158
|
+
- the SPEC.md sections the tasks touch — not the whole file;
|
|
159
|
+
- the Agent Reference rules and API excerpts the tasks need, with the sub-document URLs they came from;
|
|
160
|
+
- the project's test command and conventions;
|
|
161
|
+
- and this line, verbatim: *"Do not fetch the Babylon Toolkit Agent Reference or its sub-documents, and do not read SPEC.md in full: the orchestrator already did, and the parts this task needs are in this brief. This overrides any standing instruction to fetch the Reference first. Fetch a specific sub-document only if you hit an API or convention that is not covered here, and say which one."*
|
|
162
|
+
|
|
163
|
+
This applies in both modes: Strict mode is stricter about checking, not about re-reading.
|
|
105
164
|
|
|
106
165
|
## Step 2. Single-task mode (`task_id` is a specific id)
|
|
107
166
|
|
|
@@ -113,7 +172,7 @@ Then implement ONLY that single task. This is a hard rule:
|
|
|
113
172
|
- Stay within the scope described by the task. If the task is ambiguous or blocked by an unfinished prerequisite task, stop and tell the user instead of expanding scope. *(Auto-pilot: resolve it with the decision ladder and log the Decision.)*
|
|
114
173
|
- Follow all project rules in the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md) and any referenced spec/plan conventions.
|
|
115
174
|
|
|
116
|
-
When the task is implemented, **verify
|
|
175
|
+
When the task is implemented and its tests are green (see *Tests*), **verify it (see *Verification modes* — a single task is a phase of one)**; only on PASS mark ONLY this task complete: edit its line and change `- [ ]` to `- [x]` (leave every other task untouched). Never check the box for partial or unverified work.
|
|
117
176
|
|
|
118
177
|
Then report: the task id and what it required, the files you changed, any tests/build you ran and their result, and the next task id (for reference only — do NOT start it). Do not continue to the next task.
|
|
119
178
|
|
|
@@ -124,7 +183,7 @@ Then report: the task id and what it required, the files you changed, any tests/
|
|
|
124
183
|
Read `source_file` and collect the task checklist in order. Find the FIRST task still marked `- [ ]` (skip every task already marked `- [x]`). That task becomes the one to execute.
|
|
125
184
|
|
|
126
185
|
- If there is no unchecked task, report that the plan is already fully complete and STOP without changing anything.
|
|
127
|
-
- Otherwise, execute ONLY that single task, following the exact same scope discipline, project conventions, and completion rules as single-task mode (Step 2): implement only that task, then **verify
|
|
186
|
+
- Otherwise, execute ONLY that single task, following the exact same scope discipline, project conventions, and completion rules as single-task mode (Step 2): implement only that task with its tests green, then **verify it as a phase of one (see *Verification modes*)** and only on PASS change its `- [ ]` to `- [x]`, leaving every other task untouched.
|
|
128
187
|
|
|
129
188
|
Then report: the task id you just ran and what it required, the files you changed, any tests/build you ran and their result, and the next remaining task id (for reference only — do NOT start it). Do not continue to the next task; the user will run `NEXT` again to advance.
|
|
130
189
|
|
|
@@ -134,17 +193,17 @@ Execute every remaining task in the plan, in order, resuming wherever it was lef
|
|
|
134
193
|
|
|
135
194
|
1. Read `source_file` and collect the task checklist in order.
|
|
136
195
|
2. Treat tasks already marked `- [x]` as DONE — skip them. The remaining `- [ ]` tasks are the work queue. (This is what makes `ALL` resumable across interruptions and even brand new conversations.)
|
|
137
|
-
3.
|
|
138
|
-
a. Implement ONLY that task, following the same scope discipline and project conventions as single-task mode.
|
|
139
|
-
b.
|
|
140
|
-
c.
|
|
196
|
+
3. Split the work queue into verification units: **phases** in Standard mode (see *Phases*), **single tasks** in Strict mode. For each unit, in order:
|
|
197
|
+
a. Implement its tasks in order, one at a time, ONLY that task each time, following the same scope discipline and project conventions as single-task mode, with each task's tests green before starting the next.
|
|
198
|
+
b. **Verify the unit (see *Verification modes*)**; for every task that PASSes, immediately edit `source_file` to change its `- [ ]` to `- [x]` BEFORE starting the next unit. Persisting progress after each unit is what lets a later run of the execute skill with `ALL` safely continue.
|
|
199
|
+
c. A FAILed task enters the fix loop. If it still cannot pass, or a task cannot be completed or is blocked, STOP: leave it unchecked, do not start any later unit, and report which task failed and why. *(Auto-pilot: never stop here — run the fix loop, then DEFER the task and continue with the next one; see **Auto-pilot mode**.)*
|
|
141
200
|
4. When all tasks are checked (or you stopped early), report a summary: which tasks you completed this run, the current completed/total count, and whether the plan is now fully done.
|
|
142
201
|
|
|
143
202
|
Never check a box for partial, skipped, or unverified work in either mode.
|
|
144
203
|
|
|
145
204
|
## Step 5. Range mode (`task_id` is `T1-T10`, `T5-` or `NEXT:3`)
|
|
146
205
|
|
|
147
|
-
Range mode is **Run-all mode restricted to a slice of the checklist**. Everything in Step 4 applies unchanged — one task at a time, in order, skip `- [x]`, tests
|
|
206
|
+
Range mode is **Run-all mode restricted to a slice of the checklist**. Everything in Step 4 applies unchanged — one task at a time, in order, skip `- [x]`, tests green per task, verifier per phase (per task under `--strict`), flip boxes immediately on PASS, stop (or, under auto-pilot, defer and continue) on failure — except that the work queue is the slice, not the whole plan.
|
|
148
207
|
|
|
149
208
|
**A range is a slice of the checklist in plan order, never arithmetic on the numbers.** Read `source_file`, collect the task checklist in file order, then resolve the slice:
|
|
150
209
|
|
|
@@ -164,7 +223,7 @@ Rules:
|
|
|
164
223
|
|
|
165
224
|
## Auto-pilot mode (`--auto-pilot`)
|
|
166
225
|
|
|
167
|
-
Run this mode **only when the `--auto-pilot` flag is present**. Without it, nothing in this section applies and every mode above runs exactly as written. Emit one visible status line when this path is taken, before the
|
|
226
|
+
Run this mode **only when the `--auto-pilot` flag is present**. Without it, nothing in this section applies and every mode above runs exactly as written. Emit one visible status line when this path is taken, before the mode and verification status lines:
|
|
168
227
|
|
|
169
228
|
`🛩️ [bt-execute] Auto-pilot engaged — unattended run; every decision is mine, nothing stops for human input until the queue is empty`
|
|
170
229
|
|
|
@@ -174,7 +233,7 @@ Auto-pilot exists so a plan of 50+ tasks can run overnight:
|
|
|
174
233
|
/bt-execute --auto-pilot @_specs/<feature>_plan.md ALL
|
|
175
234
|
```
|
|
176
235
|
|
|
177
|
-
The user is asleep. **There is no one to ask.** Every "ask", "STOP and tell the user", "flag it to the user" and "do not touch later tasks" instruction elsewhere in this skill is **REPLACED** by the rules in this section. What is **NOT** relaxed: the Agent Reference requirement, the SPEC.md discipline, the
|
|
236
|
+
The user is asleep. **There is no one to ask.** Every "ask", "STOP and tell the user", "flag it to the user" and "do not touch later tasks" instruction elsewhere in this skill is **REPLACED** by the rules in this section. What is **NOT** relaxed: the Agent Reference requirement, the SPEC.md discipline, the tests every task must have, the independent verifier and the verification mode you chose (Standard or `--strict`), and the rule that a box flips only on a genuine PASS. Those are what make an unattended run trustworthy. Only the *stopping* is removed.
|
|
178
237
|
|
|
179
238
|
### The prime directive
|
|
180
239
|
|
|
@@ -209,7 +268,7 @@ Every rung-4 call, every ambiguity resolved, every scope expansion, and every de
|
|
|
209
268
|
| Task is blocked by an unfinished prerequisite task | If the prerequisite was deferred this run, re-attempt it now if the fix is apparent; otherwise implement the *minimum* of the prerequisite needed to unblock this task, log the scope expansion, and continue. |
|
|
210
269
|
| Reality diverges from SPEC.md | Decide which is right (working code and the plan's Decisions outrank a stale spec line), implement accordingly, update SPEC.md in the same task, log the Decision. |
|
|
211
270
|
| Plan changes architecture but has no `Update SPEC.md` task | Update SPEC.md as part of the task that made the change. |
|
|
212
|
-
|
|
|
271
|
+
| Tests fail / verifier FAIL | Enter the **fix loop** below. |
|
|
213
272
|
| Task still cannot pass after the fix loop | **DEFER** it (below) and **continue to the next task**. |
|
|
214
273
|
| Unity Editor, Blender, dev server or a CLI is not responding | Launch or restart it through its CLI (Unity Exporter CLI / Blender CLI sub-documents), wait, retry. If the tool is genuinely unavailable on this machine (not installed, no license, no project), DEFER the task. |
|
|
215
274
|
| A tool call errors or a command fails | Read the error, fix the cause, retry. Transient causes (network, port in use, lock file, editor still compiling) → wait and retry up to 3×. |
|
|
@@ -221,11 +280,7 @@ Every rung-4 call, every ambiguity resolved, every scope expansion, and every de
|
|
|
221
280
|
|
|
222
281
|
### The fix loop (bounded, honest)
|
|
223
282
|
|
|
224
|
-
A
|
|
225
|
-
|
|
226
|
-
1. Read the failing evidence. Fix the **implementation** (fix the test only when the test itself is wrong, and say why in the log).
|
|
227
|
-
2. Re-run the tests. On green, re-run the acceptance verifier — a **fresh** verifier subagent each time, never one that already holds an opinion.
|
|
228
|
-
3. Up to **5 attempts** per task. Each attempt must change something material. If two consecutive attempts hit the same failure with no new hypothesis, end the loop early and DEFER — do not burn the night on one task.
|
|
283
|
+
A failing test run or a verifier FAIL does not end the run and does not flip the box. It starts the fix loop defined in *Verification modes › The fix loop* — records-only failures fixed directly, a fresh verifier on every re-check, 3 attempts in Standard mode and 5 under `--strict`, and an early exit when two consecutive attempts hit the same failure with no new hypothesis. Under auto-pilot the only difference is what happens when the loop is exhausted: DEFER the task and continue — do not burn the night on one task.
|
|
229
284
|
|
|
230
285
|
Verification is never relaxed to make progress: no rubber-stamp PASS, no weakening Acceptance, no `- [x]` on partial work. A deferred task with an honest log beats a checked task that lies.
|
|
231
286
|
|
|
@@ -242,28 +297,28 @@ When a task cannot pass, mark it in `source_file` **without flipping its box**:
|
|
|
242
297
|
Auto-pilot writes **`<dir of source_file>/<plan-basename>_autopilot.md`** — created on the first run, appended on later runs. This is what the user reads in the morning:
|
|
243
298
|
|
|
244
299
|
- **Header per run:** started (ISO timestamp), plan path, completed/total at start.
|
|
245
|
-
- **Per task:** id, title, outcome (`DONE` / `DEFERRED`), attempts, tests summary, verifier result, files changed, commit hash.
|
|
300
|
+
- **Per task:** id, title, outcome (`DONE` / `DEFERRED`), attempts, tests summary (`<n> passed (implementer) · verifier-checked`), verifier result, files changed, commit hash.
|
|
246
301
|
- **`## Decisions`** — numbered, appended as they are made (what / why / rejected / binds).
|
|
247
302
|
- **`## Deferred`** — task, reason, and what a human should look at first.
|
|
248
303
|
- **Footer per run:** ended (ISO timestamp), completed/total, deferred count, wall time.
|
|
249
304
|
|
|
250
|
-
Also narrate to the console at every task boundary — one line each — so a glance at the terminal shows the run is alive: `▶ [auto-pilot] T12/50 — <title>`, `✅ [auto-pilot] T12 verified (independent subagent) — tests: 6 passed — attempt 2/
|
|
305
|
+
Also narrate to the console at every task boundary — one line each — so a glance at the terminal shows the run is alive: `▶ [auto-pilot] T12/50 — <title>`, `✅ [auto-pilot] T12 verified (independent subagent, phase 4) — tests: 6 passed — attempt 2/3`, `⏭️ [auto-pilot] T13 deferred — <reason>`.
|
|
251
306
|
|
|
252
307
|
### Checkpoints (git)
|
|
253
308
|
|
|
254
|
-
If the project is a git repository: after each
|
|
309
|
+
If the project is a git repository: after each verification unit's boxes flip, commit its changes (one commit per task where the changes separate cleanly, otherwise one per unit) on the current branch with the message `T<n>: <task title> (auto-pilot)` (or `T<a>–T<b>: <phase title> (auto-pilot)` for a unit commit). If the current branch is the repository's default branch (`main` / `master`), first create and check out `autopilot/<plan-basename>` so the default branch is never modified unattended. **Never push.** If the project is not a git repository, skip checkpoints — never `git init` a project on your own.
|
|
255
310
|
|
|
256
311
|
### Context hygiene for long runs
|
|
257
312
|
|
|
258
313
|
Fifty tasks will outlive any single context window. **The plan file's checkboxes and the run log are the only state that matters** — re-read both at every task boundary; never rely on memory of earlier tasks.
|
|
259
314
|
|
|
260
|
-
When a subagent-spawning tool is available (check the tools you actually have — never call one you do not have), implement each task in a **fresh implementer subagent
|
|
315
|
+
When a subagent-spawning tool is available (check the tools you actually have — never call one you do not have), implement each verification unit (a phase in Standard mode, a task under `--strict`) in a **fresh implementer subagent** that implements the unit's tasks in order and writes and runs their tests. Give it the **context brief** (see *Verification modes › The context brief* — task blocks, cited Decisions and Design Reference, the SPEC.md sections touched, the Reference excerpts, the do-not-refetch line), the project's agent instructions, and the auto-pilot subagent rules below. Keep that implementer for the unit's fix loop (continue it rather than starting a new one — it already understands the change). The orchestrating context then does only: read plan → launch implementer → launch verifier → flip boxes → commit → log → next unit. This is the same fresh-context-per-task model heavy plans are written for. Without a subagent tool, implement inline as usual and still re-read the plan and log at every boundary.
|
|
261
316
|
|
|
262
317
|
After any context compaction: re-emit the auto-pilot status line, re-read `source_file` and the run log, and re-fetch the Agent Reference if you no longer remember it. Then continue from the first unchecked, non-deferred task. Compaction is not a stop.
|
|
263
318
|
|
|
264
319
|
### Every subagent inherits auto-pilot
|
|
265
320
|
|
|
266
|
-
Every implementer
|
|
321
|
+
Every implementer and verifier subagent is told, verbatim, in its prompt:
|
|
267
322
|
|
|
268
323
|
> AUTO-PILOT: this is an unattended run. Do not ask questions — there is no one to answer them. Make every call yourself from the plan, the Babylon Toolkit Agent Reference and the codebase, state each assumption in one line in your result, and always return a result, never a question.
|
|
269
324
|
|
|
@@ -52,7 +52,7 @@ Use the user's message after the skill name as the `arguments`.
|
|
|
52
52
|
|---|---|
|
|
53
53
|
| `references/workspace.md` | the `_gauntlet/<name>/` layout, `progress.md` and round-journal formats, the resume protocol |
|
|
54
54
|
| `references/critic-rubrics.md` | the critic contract, the scoring rubrics, the gap-list rules, the hard gates, the stall ladder |
|
|
55
|
-
| `references/target-images.md` | generating, prompting, reachability-checking, locking the target; locked cameras |
|
|
55
|
+
| `references/target-images.md` | generating, prompting, reachability-checking, locking the target; locked cameras; **generation backends** (kie default, Higgsfield mapping) |
|
|
56
56
|
| `references/loop-templates.md` | Template A and Template B loop cards |
|
|
57
57
|
| `references/unity-pipeline.md` | the Unity build + verify pipeline, with Blender as the modelling tool |
|
|
58
58
|
| `references/spec-composition.md` | composition with bt-spec / bt-plan / bt-execute, and cross-host notes |
|
|
@@ -100,7 +100,7 @@ Interview batches:
|
|
|
100
100
|
0. **NAME** — Confirm the job's slug. It becomes `_gauntlet/<name>/` and must not collide with an existing job.
|
|
101
101
|
1. **DELIVERABLE KIND + DELIVERABLE** — Which of the three kinds is this: a **web game**, a **Unity level for export**, or a **Blender model**? Then what exactly ships (playable browser demo, one polished level, a hero asset with LODs...)? Module style: ES6/ESM default; UMD only if explicitly demanded. New project or existing? Target folder. **Read the matching pipeline reference now** and run its prerequisite gate before going further — a failed gate (no Pro licence, no GUI bootstrap, no Blender) changes what is worth agreeing to.
|
|
102
102
|
2. **OBJECTIVE** — The exact outcome that must become true, as one testable sentence. Rewrite with the user until it is inspectable.
|
|
103
|
-
3. **THE TARGET + CAMERAS** — Per `references/target-images.md`: does the user have reference media, is there an existing artifact to refine, or do we generate the target? Agree the target image(s), run the **reachability pass** (Reachable / Approximable / **OUT OF REACH**), and agree the **locked cameras** — one per target, three to five, including a detail crop. Plus numeric benchmarks: target FPS @ resolution, max load time, draw-call / texture / triangle budgets. If the user has no benchmark, making a defensible one is part of the interview, not skipped.
|
|
103
|
+
3. **THE TARGET + CAMERAS** — Per `references/target-images.md`: does the user have reference media, is there an existing artifact to refine, or do we generate the target? Agree the target image(s), run the **reachability pass** (Reachable / Approximable / **OUT OF REACH**), and agree the **locked cameras** — one per target, three to five, including a detail crop. Settle the **image-generation backend** too (kie by default, Higgsfield if that is what's configured or requested — `target-images.md` §1a) and record it in `pipeline.md`. Plus numeric benchmarks: target FPS @ resolution, max load time, draw-call / texture / triangle budgets. If the user has no benchmark, making a defensible one is part of the interview, not skipped.
|
|
104
104
|
4. **RUBRIC + PASS THRESHOLD** — Confirm the rubric axes from `references/critic-rubrics.md` (or amend them for this job) and the score a part must reach to pass. Default: **8.0 / 10 plus every hard gate green.**
|
|
105
105
|
5. **SUCCESS CONDITION** — When is the loop DONE? (e.g. "every part scores ≥8/10 from a fresh critic; sustained 60 FPS @1080p in Chrome; zero console errors; the final integration critic passes"). Success and failure defined separately.
|
|
106
106
|
6. **BOUNDARIES** — Time/cost expressed in **rounds and attempts, not wall-clock** (wall-clock cannot survive a two-week pause; counters can): max total rounds, max attempts per part before a forced strategy change, max consecutive no-improvement rounds. Permission gates: no deploy, no purchases/paid services, no credentials, no destructive ops, no contacting anyone — without explicit approval. For `unity`: the **bake tier policy** (how many rounds at preview tier before a production bake). Escalation rules: what blocks and waits for the user.
|
|
@@ -166,7 +166,7 @@ and export it for my BabylonJS game — wet asphalt with puddle reflections, lay
|
|
|
166
166
|
volumetric haze under the lights, at the fidelity of the attached screenshots.
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
**If the user attaches nothing**, the interview generates the target instead — a real in-engine screenshot, never concept art (`references/target-images.md` § 2):
|
|
169
|
+
**If the user attaches nothing**, the interview generates the target instead — a real in-engine screenshot, never concept art (`references/target-images.md` § 2). The calls below use the kie shape (the default backend); on Higgsfield, map them per `target-images.md` §1a: upload references, poll the job, then download to the same `out_path`:
|
|
170
170
|
|
|
171
171
|
```
|
|
172
172
|
generate_image(
|
|
@@ -266,7 +266,7 @@ Nothing model-specific is needed — `selection == null` exports the level, the
|
|
|
266
266
|
|
|
267
267
|
The checkpoint is also where the critic gets both the Unity snapshot and the browser frame of the same angle and must say which side a gap is on — *Unity right, browser wrong* means material translation, not the sculpt, so don't re-model.
|
|
268
268
|
|
|
269
|
-
**Textures are generated, never procedural stand-ins** — `generate_image` for albedo, normal and roughness detail. "Substituted procedural noise for the missing map" is a gate failure, and it is the single most common reason a model reads as plastic.
|
|
269
|
+
**Textures are generated, never procedural stand-ins** — `generate_image` (kie by default, Higgsfield per `target-images.md` §1a) for albedo, normal and roughness detail. With Higgsfield configured, a part that starts from nothing may take a `generate_3d` GLB as its blockout (`unity-pipeline.md`). "Substituted procedural noise for the missing map" is a gate failure, and it is the single most common reason a model reads as plastic.
|
|
270
270
|
|
|
271
271
|
Scored on the **model rubric** (Silhouette & Proportion · Surface & Material · Detail Density · Topology & Efficiency · Integration Readiness), with gates on tri budget, ≤4 influences/vertex, weights normalised, transform hygiene and GUID survival.
|
|
272
272
|
|
|
@@ -66,8 +66,10 @@ re-invocation — no host loop feature is required.
|
|
|
66
66
|
discipline.
|
|
67
67
|
- **Browser evidence:** chrome-devtools MCP on Claude Code; other hosts use their browser/screenshot tool.
|
|
68
68
|
None available → parts are `unverified`, never passed.
|
|
69
|
-
- **Image generation:** the toolkit's `kie-image` MCP (`generate_image`) where configured
|
|
70
|
-
|
|
69
|
+
- **Image generation:** the toolkit's `kie-image` MCP (`generate_image`) by default where configured.
|
|
70
|
+
Higgsfield MCP (`mcp__higgsfield__generate_image`) is also supported, via the upload → job → download
|
|
71
|
+
mapping in `target-images.md` §1a. Otherwise use any host image tool. None available and no user-supplied
|
|
72
|
+
reference → stop and ask (see `target-images.md`).
|
|
71
73
|
- **Interview:** `AskUserQuestion` where the host has it; plain numbered questions otherwise.
|
|
72
74
|
- **Unity / Blender CLIs:** shell tools, so they work on any host with a shell. A host with no shell cannot
|
|
73
75
|
run the `unity` pipeline — say so rather than degrading silently.
|
|
@@ -20,8 +20,18 @@ gap to it.
|
|
|
20
20
|
reimagines the scene sends the loop chasing a layout it was never asked to build.
|
|
21
21
|
3. **Starting fresh.** Generate the target directly from the brief.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
### 1a. Generation backends — kie by default, Higgsfield supported
|
|
24
|
+
|
|
25
|
+
Every `generate_image(...)` call in this skill is written in the **kie** shape. Pick the backend once, at
|
|
26
|
+
the interview, and record it in `pipeline.md` so a resumed session uses the same one:
|
|
27
|
+
|
|
28
|
+
1. **The user named a backend or model** → use it.
|
|
29
|
+
2. **kie** (`kie-image` MCP) is configured → **default**.
|
|
30
|
+
3. **Higgsfield** MCP (`mcp__higgsfield__*`) is configured → use it.
|
|
31
|
+
4. Otherwise → the host's built-in image tool.
|
|
32
|
+
|
|
33
|
+
**kie (default)** — see
|
|
34
|
+
[Image, Video And Sound Generation](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/web-kie-servers.md):
|
|
25
35
|
|
|
26
36
|
```
|
|
27
37
|
generate_image(prompt, out_path, reference_paths?, model?, aspect_ratio?, resolution?, output_format?)
|
|
@@ -31,6 +41,28 @@ generate_image(prompt, out_path, reference_paths?, model?, aspect_ratio?, resolu
|
|
|
31
41
|
- `reference_paths` → the current-state screenshot for the refinement path (up to 14 files)
|
|
32
42
|
- `aspect_ratio` → match the locked camera's aspect; `resolution: "2K"` or `"4K"`; `output_format: "png"`
|
|
33
43
|
|
|
44
|
+
**Higgsfield** — see
|
|
45
|
+
[Higgsfield MCP Server](https://raw.githubusercontent.com/babylontoolkit/agent/main/references/web-higgsfield-mcp.md).
|
|
46
|
+
It has no `out_path` and does not read local files. It returns a job, and you download the result. Map each
|
|
47
|
+
kie-shaped call like this:
|
|
48
|
+
|
|
49
|
+
| kie shape | Higgsfield equivalent |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `reference_paths: [local.png, …]` | Upload first: `media_upload {files:[{filename}]}` → `curl -f -X PUT --upload-file local.png '<upload_url>'` → `media_confirm {type:"image", media_ids:[…]}`. Then pass `medias: [{role:"image_references", value:"<media_id>"}]`. A previous Higgsfield output needs no upload: pass its `job_id` as the `value` |
|
|
52
|
+
| `model` | A Higgsfield id that accepts references — `gpt_image_2_5` (default), `nano_banana_2`, `seedream_v4_5` (4K). `z_image` is the cheapest draft model but takes **no** references |
|
|
53
|
+
| `resolution: "2K"` / `"4K"` | `resolution: "2k"` / `"4k"` (lower case, where the model supports it) |
|
|
54
|
+
| `output_format: "png"` | Nothing to set. Image results are PNG |
|
|
55
|
+
| `out_path` | `job_status {jobId, sync:true}` until `completed`, then `curl -fL -o <out_path> '<results.rawUrl>'` |
|
|
56
|
+
|
|
57
|
+
Higgsfield rules for this loop:
|
|
58
|
+
- **Preflight** each new model/setting with `get_cost: true` and **log the credits per image** in
|
|
59
|
+
`pipeline.md`. A gauntlet may generate dozens of images, so check `balance` before the run and treat
|
|
60
|
+
running out of credits as a boundary that parks the run.
|
|
61
|
+
- Always send `use_unlim: false`. Never call a billing-confirm tool.
|
|
62
|
+
- **Never hot-link** a Higgsfield CDN URL. The locked target must be a file inside `_gauntlet/<name>/`.
|
|
63
|
+
- For several independent images (one per locked camera), use `generate_image_batch` → `jobs_wait` →
|
|
64
|
+
download each.
|
|
65
|
+
|
|
34
66
|
If no image-generation tool is available **and** the user supplied no reference media, **stop and ask** for
|
|
35
67
|
either a target image or an image-generation credential. Do not start a gauntlet against a prose bar.
|
|
36
68
|
|
|
@@ -195,9 +195,18 @@ return UnityEditor.AssetDatabase.AssetPathToGUID(p) + " rig=" + i.animationType
|
|
|
195
195
|
**Conventions to preserve for BabylonJS:** ≤ 4 influences per vertex, weights normalised to 1.0, bone names
|
|
196
196
|
matching the Unity Avatar/Animator rig, and `add_leaf_bones=False` on FBX export.
|
|
197
197
|
|
|
198
|
-
**Textures are generated, not procedural.**
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
**Textures are generated, not procedural.** Use `generate_image` for albedo, normals, roughness masks and
|
|
199
|
+
detail maps. It goes to the backend recorded in `pipeline.md`: the toolkit's `kie-image` MCP by default, or
|
|
200
|
+
Higgsfield MCP (upload references → job → download into `Assets/`, per `target-images.md` §1a). Substituting
|
|
201
|
+
procedural noise or flat colours for maps the target needs is a gate failure, and the commonest reason an
|
|
202
|
+
asset reads as plastic.
|
|
203
|
+
|
|
204
|
+
**Image → starting mesh (Higgsfield only).** When a model part starts from nothing and Higgsfield is
|
|
205
|
+
configured, `generate_3d` (`image_to_3d`, or `multi_image_to_3d` from 2–4 views of the target) can turn the
|
|
206
|
+
locked target's subject into a GLB blockout. Preflight with `get_cost: true`, download the GLB, then
|
|
207
|
+
import it into Blender and refine it like any other source mesh: retopo, UVs, LODs, weights under the gates
|
|
208
|
+
above. It is a head start on the silhouette, never a finished asset. Its topology and UVs will not pass the
|
|
209
|
+
model rubric untouched.
|
|
201
210
|
|
|
202
211
|
---
|
|
203
212
|
|
package/skills/bt-hero/SKILL.md
CHANGED
|
@@ -37,7 +37,7 @@ Whatever is present is used verbatim; the intake resolves the rest (Step 1). **T
|
|
|
37
37
|
Every piece of a 3D hero scroll belongs to exactly one tier. This is the rule that keeps the intake small and the output deterministic:
|
|
38
38
|
|
|
39
39
|
- **Tier 1 — Invariants.** How the mechanic works. Owned by bt-design's reference and templates; never asked, never in the brief, never overridable: muted footage, the all-intra scrub encode, blob preload, veiled cuts, film-speed autoplay, cancel semantics, the `HS_CONFIG`/markup syntax, and the **verification protocol — which always runs, without being requested.**
|
|
40
|
-
- **Tier 2 — Defaults.** Sensible values supplied silently; the user may override any of them in their input (recorded in the brief's `Overrides` section): aspect ratio (default 16:9), clip duration (**backend-derived — probe the configured video model's real output; never assume a number**), the 4-beat REVEAL → MOTION → SHIFT → FINALE arc, `sweep: page`, controls all-on (`sweep: page`) / HUD+PLAY (`sweep: hero`), the scroll-length formula, poster = first film frame.
|
|
40
|
+
- **Tier 2 — Defaults.** Sensible values supplied silently; the user may override any of them in their input (recorded in the brief's `Overrides` section): aspect ratio (default 16:9), clip duration (**backend-derived — probe the configured video model's real output; never assume a number**), the 4-beat REVEAL → MOTION → SHIFT → FINALE arc, `sweep: page`, controls all-on (`sweep: page`) / HUD+PLAY (`sweep: hero`), the scroll-length formula, poster = first film frame, generation backend (**KIE MCP by default; Higgsfield MCP when that is what's configured or the user names it**; see bt-design `3d-hero-scroll.md` §2 for the Higgsfield mapping).
|
|
41
41
|
- **Tier 3 — Creative slots.** The only things intake deals in — the eight slots below.
|
|
42
42
|
|
|
43
43
|
If it's how the mechanic works → Tier 1. If it's a value that could legitimately differ per project → Tier 2. If it's a creative decision about *this* product → Tier 3.
|
|
@@ -62,7 +62,7 @@ Then resolve every unfilled slot by exactly one of two paths:
|
|
|
62
62
|
- **Enough to fly** — the input contains a usable star (an idea sentence, or an image/video whose subject is clear): fill every remaining slot from its default, ask **nothing**, and proceed. This is the one-shot path.
|
|
63
63
|
- **Not enough to fly** — empty input, or fragments with no discernible star: ask **only the unanswered questions** — inline, conversationally, as ONE compact numbered list (never one-at-a-time interrogation, never a structured question UI). Tell the user loose prose, partial answers, and "you pick" are all fine. What they answer is used; what they skip gets the default. Then proceed — do not re-confirm.
|
|
64
64
|
|
|
65
|
-
**Footage feasibility check:** if there is no provided footage AND no image/video generation backend configured (KIE MCP, Higgsfield, built-in generation, …), STOP — this pattern is wrong without footage; recommend a static hero instead (per the bt-design reference intake).
|
|
65
|
+
**Footage feasibility check:** if there is no provided footage AND no image/video generation backend configured (KIE MCP — the default, Higgsfield MCP, built-in generation, …), STOP — this pattern is wrong without footage; recommend a static hero instead (per the bt-design reference intake).
|
|
66
66
|
|
|
67
67
|
## Step 2 — Write the hero brief (the save file)
|
|
68
68
|
|
|
@@ -82,6 +82,7 @@ status: draft
|
|
|
82
82
|
|
|
83
83
|
## 2. Footage Source
|
|
84
84
|
- Mode: generate | provided
|
|
85
|
+
- Backend: kie | higgsfield | <other> (generate mode only — recorded so a re-run uses the same one)
|
|
85
86
|
- Anchor: <image-generation prompt for the hero anchor> | <path/to/existing-image-or-video>
|
|
86
87
|
|
|
87
88
|
## 3. The Journey
|
|
@@ -113,6 +113,8 @@ The Layout law from Step 2 binds these surfaces too — full-bleed, responsive,
|
|
|
113
113
|
|
|
114
114
|
If the platform's `generate_image` / `generate_video` tools are available on this turn, use them to make the design beautiful: a hero background, a logo/wordmark, splash-adjacent accents (16:9 for wide heroes, 1:1 for badges/logos; png when alpha matters). Make ALL generate calls FIRST, in ONE parallel round, before writing any files; reference the returned `/assets/generated/…` paths exactly as returned (the one exception to never-invent-an-asset-path) — the renders land in the background, so every surface must look finished while they do (styled color/gradient fallback behind each image, never a blank box). At most ONE short looping hero video, and only if it truly elevates the design — video costs the user hundreds of credits. If the tools are absent, design with CSS + the images on disk instead.
|
|
115
115
|
|
|
116
|
+
**Backend mapping (Claude Code and other MCP hosts).** Where no platform-native `generate_*` is present, use the **KIE MCP** servers by default (`web-kie-servers.md`): pass `out_path` under the project's `assets/generated/` folder and reference that path. When **Higgsfield MCP** is the configured or requested backend (`web-higgsfield-mcp.md`), the call returns a job, not a path. Submit everything in one parallel round (`generate_image_batch`, plus at most one `generate_video`), write the files with their fallbacks in place, then `jobs_wait` / `job_status` and `curl` each result into `assets/generated/` under the names you already referenced. Never hot-link the Higgsfield CDN URL. Preflight with `get_cost: true` and always send `use_unlim: false`.
|
|
117
|
+
|
|
116
118
|
Generated art goes on the LANDING PAGE — never on the splash/preloader (Step 3's lightweight rule). Art direction for every generate call comes from `DESIGN.md` — prompt the renders in its palette and atmosphere so the art belongs to the same design as the CSS around it.
|
|
117
119
|
|
|
118
120
|
# Step 5 — finish clean
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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. 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. Plans are sized to the feature (task budget by spec size, phases, per-task verify level) so execution cost stays proportional. Always planning-only — it writes the plan file 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
|
|
|
@@ -46,6 +46,7 @@ When invoked with a brief but **no feature spec file**, produce a plan from the
|
|
|
46
46
|
| Full feature requirements | Use the brief itself as the requirements, expanded by the Step 1 codebase analysis. |
|
|
47
47
|
| `spec_impact: yes/no` | **Infer** it from the Step 1 analysis: `yes` if the feature adds/changes a system, convention, dependency, or architectural decision; otherwise `no`. |
|
|
48
48
|
| `Project Spec Alignment` section | Derive alignment directly from root `SPEC.md` + the analysis. |
|
|
49
|
+
| `size: small/medium/large` | **Infer** it from the brief + analysis per *Size the plan to the feature*. |
|
|
49
50
|
|
|
50
51
|
**The one and only difference in Quick Plan mode is operating without a spec file** — the interview produces a mini-spec that stands in for it. Everything else is identical to a normal run: Step 1's comprehensive codebase analysis (including reading root `SPEC.md`) runs in full, the plan document has the same structure, the SPEC.md write-back task is still appended when the inferred `spec_impact` is `yes`, and the run still **STOPS after writing the plan file**. Nothing about Quick Plan grants permission to implement.
|
|
51
52
|
|
|
@@ -57,7 +58,7 @@ After writing `_specs/<feature-name>_plan.md`, **STOP**. Your final response mus
|
|
|
57
58
|
|
|
58
59
|
```
|
|
59
60
|
Plan written to _specs/<feature-name>_plan.md
|
|
60
|
-
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
|
|
61
|
+
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).
|
|
61
62
|
```
|
|
62
63
|
|
|
63
64
|
### Interview before planning (Quick Plan)
|
|
@@ -103,7 +104,7 @@ So a heavy plan is the **complete, shared memory** of the feature: every decisio
|
|
|
103
104
|
|
|
104
105
|
**Write the code when the code IS the decision.** This skill never edits source files, but a heavy plan may (and should) put code *inside the plan*: full signatures, type definitions, data schemas, the tricky 20-line algorithm, a config block, a test skeleton. When the shape of the code is the decision, prose is a lossy encoding of it — write the code once here, and every task that needs it copies the same thing. Leave to prose only the mechanical glue ("wire `X` into `Y`'s constructor the same way `Z` is at `:88`").
|
|
105
106
|
|
|
106
|
-
**
|
|
107
|
+
**Self-contained tasks, sized to real work.** A task should fit in one fresh context: one clear outcome, everything it needs either in its own block or cited by name from the Decisions and Design Reference. Split a task when it would not fit in one sitting — not merely because it touches several files. *Size the plan to the feature* (task budget, no ceremony tasks, phases, `Verify level`, no brittle pins) applies to heavy plans too: every task and phase costs a verification round at execution time. Heavy mode earns its cost on `large` features; for a `small` feature say in Codebase Analysis why it was requested anyway.
|
|
107
108
|
|
|
108
109
|
**Do the API homework once, here.** When a task uses a Babylon Toolkit component or BabylonJS API, show the exact call the way the Agent Reference (or its sub-document) shows it, in the Design Reference › *API usage* section — so every task across the run uses the same API the same way instead of each fresh context rediscovering it. Fetch the relevant sub-documents during Step 1 and copy the correct usage into the plan.
|
|
109
110
|
|
|
@@ -141,7 +142,7 @@ Resolve every `Open Question` from the spec here. An open question that survives
|
|
|
141
142
|
- **API usage** — for every Babylon Toolkit / BabylonJS / third-party API the feature calls, the exact call as the Agent Reference (or the library docs) shows it.
|
|
142
143
|
- **Test strategy** — the test file(s) to create or extend, the harness/pattern to copy (with `file:line`), how to run them, and the baseline to compare against.
|
|
143
144
|
|
|
144
|
-
**4. `## Tasks`** — the ordered checklist, numbered `T1`, `T2`, `T3` … in dependency order with GitHub-style checkboxes,
|
|
145
|
+
**4. `## Tasks`** — the ordered checklist, numbered `T1`, `T2`, `T3` … in dependency order with GitHub-style checkboxes, grouped under `### Phase N — <name>` headings, each task implementable and verifiable on its own in a fresh context. Every task uses this block. Fields marked **required** must be present on every task; the others are omitted only when they genuinely have nothing to say.
|
|
145
146
|
|
|
146
147
|
```markdown
|
|
147
148
|
## Tasks
|
|
@@ -165,7 +166,8 @@ Resolve every `Open Question` from the spec here. An open question that survives
|
|
|
165
166
|
- `throws on a null scene` → rejects with `TypeError`
|
|
166
167
|
- run: `npm test -- tests/foo.test.ts`
|
|
167
168
|
- Acceptance: <observable, checkable statements — what is true when this task is done> # required
|
|
168
|
-
- Verify: `npm test -- tests/foo.test.ts` →
|
|
169
|
+
- Verify: `npm test -- tests/foo.test.ts` → both named cases pass · `npx tsc --noEmit` → no errors · `grep -n "new FooService" src/bar.ts` → 1 hit # required — commands + expected output (never an absolute suite count)
|
|
170
|
+
- Verify level: standard # required — `standard` or `live` (see Size the plan to the feature)
|
|
169
171
|
```
|
|
170
172
|
|
|
171
173
|
Rules for heavy task blocks:
|
|
@@ -175,7 +177,7 @@ Rules for heavy task blocks:
|
|
|
175
177
|
- **Anchors are real.** Every `file:line` and "after `<code>`" anchor comes from Step 1's reading of the actual file. Prefer code anchors ("after the line `this.scene = scene;`") to bare line numbers where lines are likely to shift during a long run — or give both.
|
|
176
178
|
- **Names, signatures and values come from the Design Reference.** If a step introduces a name that is not in the Design Reference, add it there first. That is what keeps the fortieth task's naming identical to the third's.
|
|
177
179
|
- **Acceptance is observable.** Something a verifier can check by running a command or inspecting a file: a test count, a grep result, a rendered behaviour ("PLAY auto-scrolls to the document bottom"), never "works correctly". Sibling-skill behaviours are asserted in observable terms exactly as Step 2 requires.
|
|
178
|
-
- **Verify gives the command and the expected output**, so a fresh context compares against a stated value rather than judging.
|
|
180
|
+
- **Verify gives the command and the expected output**, so a fresh context compares against a stated value rather than judging. Expected outputs never pin absolute counts that later tasks change (total tests passed, suite sizes, ledger figures).
|
|
179
181
|
- **Keep the system working between tasks.** When a change spans tasks, say what temporary shim, flag, or compatibility write keeps the app running after each one, and which later task removes it — a resumed run may pause for days between them.
|
|
180
182
|
|
|
181
183
|
The **SPEC.md write-back task** is required under the same conditions as in Step 2 and is still the LAST task. In a heavy plan, **write the SPEC.md content in the task** — the exact paragraphs to merge into each current-state section and the exact Decisions entries to append (your `## Decisions` entries, promoted to project scope) — using the heavy task block (Steps that name each SPEC.md section and the text to insert, a **Code** block holding the exact markdown, a **Verify** of `grep -n "<distinctive phrase>" SPEC.md` → one hit each), so the write-back records what was planned rather than what one fresh context remembers at the end.
|
|
@@ -188,11 +190,11 @@ The draft is not the plan. A plan written in one pass by the same mind that hold
|
|
|
188
190
|
|
|
189
191
|
Emit `🕵️ [bt-plan] Cold-context audit — reading the draft as a fresh executor …`. Then, if a subagent-spawning tool is available, launch **one read-only audit subagent** with a fresh context (it must NOT see your reasoning, only the files), and give it: the path of the draft plan, the repository root, and these instructions verbatim:
|
|
190
192
|
|
|
191
|
-
> You are a competent engineer with a fresh context. You have never seen this repository or this feature before, and you will execute one task at a time with no memory of the others. Read the plan at `<path>` in full. Then, for **every** task, check the plan against the actual codebase (read the files and anchors it names) and list every point where you would be **forced to decide, guess, look up, or infer** something the plan should have given you: a missing signature, name, value, file location or anchor; an anchor that does not match the real file; a step that states a goal instead of an instruction; a step that depends on knowing what an earlier task did rather than on the Design Reference; a name used in a task that is not defined in the Design Reference; a test case without an expected outcome; a Verify without an expected output; an edge case with no decided behaviour; an API call whose exact usage is not shown; any use of "TBD", "appropriate", "suitable", "as needed", "etc." or "the implementer may". Also flag any task that would not fit in one sitting
|
|
193
|
+
> You are a competent engineer with a fresh context. You have never seen this repository or this feature before, and you will execute one task at a time with no memory of the others. Read the plan at `<path>` in full. Then, for **every** task, check the plan against the actual codebase (read the files and anchors it names) and list every point where you would be **forced to decide, guess, look up, or infer** something the plan should have given you: a missing signature, name, value, file location or anchor; an anchor that does not match the real file; a step that states a goal instead of an instruction; a step that depends on knowing what an earlier task did rather than on the Design Reference; a name used in a task that is not defined in the Design Reference; a test case without an expected outcome; a Verify without an expected output; an edge case with no decided behaviour; an API call whose exact usage is not shown; any use of "TBD", "appropriate", "suitable", "as needed", "etc." or "the implementer may". Also flag any task that would not fit in one sitting, any micro-task that should be merged into its neighbour, any ceremony task (verification sweep, ledger/baseline opening) the brief did not ask for, and any Verify that pins an absolute count a later task will change. Report as a list: `T<n> · step <k> · <what is missing> · <what you would have had to decide>`. Do not fix anything, do not write files, do not run builds or tests. Report "NO GAPS" only if you found none.
|
|
192
194
|
|
|
193
195
|
If no subagent tool is available, emit `➡️ [bt-plan] no subagent tool — self-auditing the draft` and perform the same read yourself, deliberately re-reading the plan top to bottom against the real files with the checklist above, one task at a time.
|
|
194
196
|
|
|
195
|
-
Emit `🧾 [bt-plan] Audit found <n> gaps across <m> tasks` (or `… found NO GAPS`). Then **resolve every reported gap by editing the plan** — add the missing decision to `## Decisions`, the missing code/signature/name to `## Design Reference`, the missing instruction to the task — and emit `🔧 [bt-plan] Resolved <n>/<n> gaps`. If the audit found more than
|
|
197
|
+
Emit `🧾 [bt-plan] Audit found <n> gaps across <m> tasks` (or `… found NO GAPS`). Then **resolve every reported gap by editing the plan** — add the missing decision to `## Decisions`, the missing code/signature/name to `## Design Reference`, the missing instruction to the task — and emit `🔧 [bt-plan] Resolved <n>/<n> gaps`. If the audit found more than 10 gaps, run it **once more** on the revised plan (`🕵️ [bt-plan] Second audit pass …`); stop after the second pass regardless, and list any gap you chose not to resolve, with why, in the plan's Codebase Analysis. A gap the audit reports that you cannot resolve without the user is a question for the user — ask it now. Re-writing the plan file after the audit is the one case where this skill writes it more than once; it is still the only file this skill ever writes.
|
|
196
198
|
|
|
197
199
|
Finish with `💾 [bt-plan] Plan finalized — _specs/<feature-name>_plan.md (<n> tasks, <k> decisions)`, then report the number of tasks and decisions, the two or three most consequential decisions (with their D-numbers), anything you were unable to resolve, and the same next-step hint as Quick Plan mode. Then **STOP** — heavy or not, this skill never begins T1.
|
|
198
200
|
|
|
@@ -277,6 +279,19 @@ If the spec or codebase is too ambiguous to analyze responsibly, stop and ask th
|
|
|
277
279
|
|
|
278
280
|
*(In Heavy Plan mode, also apply the **Step 1 additions** listed under *Heavy Plan mode* above.)*
|
|
279
281
|
|
|
282
|
+
## Size the plan to the feature (all modes)
|
|
283
|
+
|
|
284
|
+
Execution cost is paid **per verification unit**, not per line of code: every phase bt-execute runs costs an implementer pass plus a fresh independent verifier. A plan that splits a one-hour feature into eight micro-tasks, adds bookkeeping tasks, and asks for live Unity/browser QA on each one turns an hour of work into a day. Rigor comes from good Acceptance, named tests and an independent verifier — not from the number of tasks. So:
|
|
285
|
+
|
|
286
|
+
1. **Read the size.** Take `size: small | medium | large` from the feature spec header. In Quick Plan mode (or for an older spec without it), infer it: **small** ≈ something a developer would do by hand in about 1–2 hours, touching one system; **medium** ≈ a day, a few systems; **large** ≈ multi-day, multi-system, or Unity/Blender/export pipeline work. Record it in Codebase Analysis.
|
|
287
|
+
2. **Task budget.** small → **1–3 tasks**; medium → **3–8**; large → as many as the work needs. Going over the budget needs a one-line reason in Codebase Analysis.
|
|
288
|
+
3. **A task is a meaningful unit of work** — a coherent change a developer would commit on its own, with its own tests. Merge tasks that edit the same file for the same purpose, or that cannot be tested apart (adding a constant and the code that uses it is ONE task). Split only when a task would not fit in one sitting.
|
|
289
|
+
4. **No ceremony tasks.** Do not write standalone "verification sweep", "confirm all callers", "open the review / ledger / baseline / archive" or "final check" tasks unless the brief asks for them. A read-and-confirm check belongs in the **Acceptance** of the task that made the change; the final end-to-end check belongs in the last phase's last task.
|
|
290
|
+
5. **Phases.** Group tasks under `### Phase N — <name>` headings inside `## Tasks`. bt-execute runs one independent verifier per phase, so a phase is "what should be checked together": a small plan is **one phase**; otherwise phases of 2–4 related tasks, ending where a checkpoint is natural (a working intermediate state, a UI becoming visible, the SPEC.md write-back).
|
|
291
|
+
6. **`Verify level` per task.** `standard` (default — build/typecheck, the named tests, diff review) or `live` (needs the dev server, a browser, or Unity/Blender to observe). Mark `live` whenever the task's Acceptance depends on runtime behavior — rendering, visuals, interaction, Unity↔Babylon parity; bt-execute runs live QA on such tasks even if unmarked. Whatever the per-task levels, the **last feature task** (before the SPEC.md write-back) carries one `live` **end-to-end check** of the whole feature when the feature has a rendered, exported or interactive surface — that is where "loaded in the browser, screenshotted, console clean" is verified, once.
|
|
292
|
+
7. **No brittle pins.** Never pin absolute counts that later tasks will change — total tests passed, suite sizes, ledger figures, file hashes of files later tasks edit. Say "the named tests pass and there are no new failures versus the baseline" instead. A pin that goes stale makes a correct task FAIL and costs a whole fix-loop round.
|
|
293
|
+
8. **Named tests, not exhaustive ones.** Each task with a testable surface names its test cases with expected outcomes. Cover the Acceptance and the edge cases the spec lists; do not ask for probe suites, fuzzing or mutation testing unless the feature's risk genuinely calls for it (say why).
|
|
294
|
+
|
|
280
295
|
## Step 2. Write the plan
|
|
281
296
|
|
|
282
297
|
> **Heavy Plan mode (`--heavy`):** the *Heavy plan document* structure and the *cold-context audit* under **Heavy Plan mode** above replace this step. The Codebase Analysis requirements, the SPEC.md write-back rules, and the verbatim `How to execute this plan` section below still apply unchanged inside that structure. Without the flag, follow this step exactly as written.
|
|
@@ -285,19 +300,25 @@ Emit `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …` before writing
|
|
|
285
300
|
|
|
286
301
|
Only after Step 1 is complete, write the plan markdown to `_specs/` as `<feature-name>_plan.md`. The document MUST open with a `## Codebase Analysis` section that summarizes the findings from Step 1 (cite the real files/modules you inspected) — this is the evidence that the analysis happened. This section MUST include a short **SPEC.md alignment** note: which SPEC.md sections the plan conforms to, and whether the feature is spec-impacting (carry over the feature spec's `spec_impact`, or in Quick Plan mode the value you inferred, and say it was inferred). A plan without a grounded analysis section is invalid; do not produce one.
|
|
287
302
|
|
|
288
|
-
Then write the implementation as an ordered checklist of
|
|
303
|
+
Then write the implementation as an ordered checklist of tasks, sized and grouped per *Size the plan to the feature* above. Use GitHub-style checkboxes so progress can be tracked directly in the file — one task per line, numbered T1, T2, T3 … in dependency order, grouped under phase headings:
|
|
289
304
|
|
|
290
305
|
```markdown
|
|
291
306
|
## Tasks
|
|
292
307
|
|
|
308
|
+
### Phase 1 — <name>
|
|
309
|
+
|
|
293
310
|
- [ ] **T1** — <short task title>
|
|
294
311
|
- Files: `path/one`, `path/two`
|
|
295
312
|
- Details: <what to do>
|
|
296
|
-
-
|
|
313
|
+
- Tests: <test file> — `<case>` → <expected outcome>; … (or "no testable surface — <why>")
|
|
314
|
+
- Acceptance: <how to know it is done — observable, no absolute count pins>
|
|
315
|
+
- Verify level: standard
|
|
297
316
|
- [ ] **T2** — <short task title>
|
|
298
317
|
- Files: `...`
|
|
299
318
|
- Details: <...>
|
|
300
|
-
-
|
|
319
|
+
- Tests: <...>
|
|
320
|
+
- Acceptance: <...; includes the end-to-end check of the whole feature if this is the last feature task>
|
|
321
|
+
- Verify level: live
|
|
301
322
|
```
|
|
302
323
|
|
|
303
324
|
When a task implements a **sibling-skill pattern**, its **Acceptance** must assert the skill-defined behavior in observable terms — e.g. for `sweep: page`, "PLAY auto-scrolls through to the document bottom and END jumps there", not merely "the hero renders". A plausible-looking result that dropped a documented behavior must fail acceptance. Prefer copying the sub-skill's template files as an early task (e.g. "T1 — copy + wire the 3D-Hero-Scroll engine") so later tasks only configure it.
|
|
@@ -311,6 +332,7 @@ If the feature is spec-impacting (`spec_impact: yes`, or your analysis found it
|
|
|
311
332
|
- Files: `SPEC.md`
|
|
312
333
|
- Details: Update the specific SPEC.md section(s) named in the feature spec's Project Spec Alignment — e.g. add/modify the affected Game System, record the new Convention or Decision (with rationale), and add any new Dependency + version. Follow SPEC.md's "How to update this spec" contract: **replace/merge** the current-state sections (Architecture, Game Systems, Conventions, Dependencies) — removing seed placeholders on first real content — and **append** to the Decisions log (never delete; supersede with a newer entry).
|
|
313
334
|
- Acceptance: SPEC.md accurately describes the architecture/systems/conventions/dependencies as actually implemented by the tasks above; no section contradicts the shipped code; new dependencies are listed.
|
|
335
|
+
- Verify level: standard
|
|
314
336
|
```
|
|
315
337
|
|
|
316
338
|
Make this the LAST task so it captures the true final state. If the feature is genuinely not spec-impacting (`spec_impact: no`), omit this task, but state in the Codebase Analysis that no SPEC.md change is required.
|
|
@@ -322,6 +344,7 @@ Finally, include this exact `## How to execute this plan` section verbatim in th
|
|
|
322
344
|
|
|
323
345
|
Each task above is a checkbox. To implement:
|
|
324
346
|
- Run a single task with the bt-execute command (e.g. `bt-execute <this-file> T<n>`), run every remaining task in order with `bt-execute <this-file> ALL` (resumable — it skips tasks already checked), or implement the whole plan from a prompt like "implement the plan at <this-file>".
|
|
347
|
+
- bt-execute verifies each phase with an independent verifier; add `--strict` for an adversarial verifier on every task.
|
|
325
348
|
- Work the tasks top to bottom unless a task notes a different dependency order.
|
|
326
349
|
- When a task is fully implemented and its **Acceptance** criteria are met, mark it complete by editing this file and changing that task's `- [ ]` to `- [x]`.
|
|
327
350
|
- Stop and report if a task cannot be completed. Do NOT check a box for partial, skipped, or unverified work.
|
|
@@ -53,7 +53,7 @@ Use the user's message after the skill name as the `arguments`.
|
|
|
53
53
|
|
|
54
54
|
## ⚠️ Required reading before any build
|
|
55
55
|
|
|
56
|
-
For any Babylon / BabylonJS / Babylon Toolkit work, ensure the **Agent Reference** is already read in this session/context (fetch `https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md` first if not; and its `web-kie-servers.md` sub-document if using the KIE MCP servers). If a required fetch fails, STOP and tell the user. Do not refetch what you already remember.
|
|
56
|
+
For any Babylon / BabylonJS / Babylon Toolkit work, ensure the **Agent Reference** is already read in this session/context (fetch `https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md` first if not; and its `web-kie-servers.md` sub-document if using the KIE MCP servers, or its `web-higgsfield-mcp.md` sub-document if using the Higgsfield MCP). If a required fetch fails, STOP and tell the user. Do not refetch what you already remember.
|
|
57
57
|
|
|
58
58
|
If the project keeps a root **SPEC.md**, read it first and conform to its architecture/conventions; record the shipped prototypes per the project's working agreement when the batch lands.
|
|
59
59
|
|
|
@@ -74,7 +74,7 @@ The **difference** between prototypes is in the *design language* — layout, mo
|
|
|
74
74
|
1. Read the flags (`--type`, `--count`, `--motionsites`, `--awwwards[:forensic]`, `--3d-hero-scroll`) and the `<theme>`. Apply defaults (`html`, `10`).
|
|
75
75
|
2. **Theme gate:** if no theme is discernible, ask **once** — one short inline question — then proceed. This is the only interactive stop; once the batch starts, it runs autonomously.
|
|
76
76
|
3. Ingest attached screenshots into a world anchor (above). Note the host: React (Vite/TS) vs plain HTML, per `--type` and any existing project.
|
|
77
|
-
4. **Asset-backend check:** the Fable-grade bar assumes asset generation is available. Confirm what's configured — KIE MCP (image/video/Kling), Higgsfield, GPT Image 2 keys, Pinterest source. If none is available, say so and proceed with hand-authored CSS/SVG/WebGL craft rather than silently producing flat pages.
|
|
77
|
+
4. **Asset-backend check:** the Fable-grade bar assumes asset generation is available. Confirm what's configured — KIE MCP (image/video/Kling — the **default**), Higgsfield MCP, GPT Image 2 keys, Pinterest source. Pass the chosen backend to every subagent so the batch is consistent. **If Higgsfield is the backend, check `balance` and preflight one image and one video with `get_cost: true`, then tell the user the estimated batch cost before fanning out**: N prototypes × video is where credits disappear. If none is available, say so and proceed with hand-authored CSS/SVG/WebGL craft rather than silently producing flat pages.
|
|
78
78
|
|
|
79
79
|
## Step 2 — Compose the direction spread (N genuinely-different lenses)
|
|
80
80
|
|
|
@@ -130,7 +130,7 @@ Each prototype subagent gets: its **direction**, the **theme**, the **world anch
|
|
|
130
130
|
|
|
131
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.
|
|
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 / Higgsfield (Kling, etc.)** for motion/video, hand-authored WebGL/SVG/CSS. All assets stay faithful to the world anchor and live in the prototype's folder.
|
|
133
|
+
3. **Produce assets** via any mix of the available workflows: Pinterest pulls for reference, **GPT Image 2** for stills, **KIE MCP servers (default) / Higgsfield MCP (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. **Higgsfield returns a job and a CDN URL, not a file:** poll `job_status` (or `jobs_wait` for a batch), then `curl` every result into the prototype folder. Never hot-link a Higgsfield URL. Local reference images must be uploaded first (`media_upload` → PUT → `media_confirm`) and passed as `media_id`s. Always send `use_unlim: false`.
|
|
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
|
|
package/skills/bt-spec/SKILL.md
CHANGED
|
@@ -74,6 +74,7 @@ The project's **SPEC.md** at the repository root is the source of truth for the
|
|
|
74
74
|
- Align the feature idea to the existing architecture, systems, and conventions in SPEC.md. The feature spec you produce must be derived from and constrained by SPEC.md.
|
|
75
75
|
- **If the feature idea conflicts with SPEC.md** (contradicts an architectural decision, a system boundary, or a convention), STOP and flag the conflict to the user before writing the spec. Do not silently override the project spec.
|
|
76
76
|
- **Classify the feature's `spec_impact`:** it is `yes` if implementing the feature would add or change a game system, a convention, a dependency, or an architectural decision recorded in SPEC.md — otherwise `no`. This drives whether the plan will include a SPEC.md write-back task, so classify honestly.
|
|
77
|
+
- **Classify the feature's `size`:** `small` ≈ what a developer would do by hand in about 1–2 hours, touching one system; `medium` ≈ about a day, a few systems; `large` ≈ multi-day, multi-system, or Unity/Blender/export pipeline work. bt-plan sizes the plan (task count, phases, how much live QA) from this, and execution cost follows the plan — so classify by the real work, not by how important the feature feels.
|
|
77
78
|
- **If SPEC.md is missing or is still a stub with no real content, STOP and ask the user FIRST — before generating the feature spec — whether to create a default project `SPEC.md` from the fallback scaffold** (the scaffold is defined in *Validate The Project Spec* under Step 4). Do not draft the feature spec until they answer.
|
|
78
79
|
- **If the user says yes:** create `SPEC.md` at the repository root from the fallback scaffold, then continue — treat the newly written SPEC.md as the source of truth and align the feature spec to it (this is the normal path; the project now has a spec to grow).
|
|
79
80
|
- **If the user says no:** continue **without** a project-level SPEC.md, and record this note in the feature spec: `"No project SPEC.md content yet — following existing codebase conventions."`
|
|
@@ -236,7 +237,7 @@ and execute phases have a stable name to refer to regardless of host.
|
|
|
236
237
|
|
|
237
238
|
Emit `✍️ [bt-spec] Drafting _specs/<feature_slug>_spec.md …` before writing, and `💾 [bt-spec] Spec written — _specs/<feature_slug>_spec.md` once the file is saved.
|
|
238
239
|
|
|
239
|
-
Create a markdown spec document that Plan mode can use directly and save it in the _specs folder as `<feature_slug>_spec.md`. Use the exact structure as defined in the feature spec template file @FEATURE.md located at the project root. **If that project template predates grill mode and has no `## Decisions` section, append one anyway whenever `grill_me` is true** (using the shape in the fallback template below, placed directly before `## Open Questions`) — the rationale must be recorded regardless of which template the project ships. The template includes
|
|
240
|
+
Create a markdown spec document that Plan mode can use directly and save it in the _specs folder as `<feature_slug>_spec.md`. Use the exact structure as defined in the feature spec template file @FEATURE.md located at the project root. **If that project template predates grill mode and has no `## Decisions` section, append one anyway whenever `grill_me` is true** (using the shape in the fallback template below, placed directly before `## Open Questions`) — the rationale must be recorded regardless of which template the project ships. The template includes required `spec_impact` and `size` header fields (**if the project's FEATURE.md predates `size`, add the `size:` line under `spec_impact:` anyway**) and a `Project Spec Alignment` section — fill both in from your SPEC.md read above (cite the SPEC.md sections the feature relies on, describe how it fits the architecture, and for `spec_impact: yes` state exactly what will change in SPEC.md and in which section). Do not add technical implementation details such as code examples. If the feature spec template file is missing, create a new feature spec file with the following sections:
|
|
240
241
|
```
|
|
241
242
|
# Feature Spec Template
|
|
242
243
|
|
|
@@ -252,6 +253,7 @@ Create a markdown spec document that Plan mode can use directly and save it in t
|
|
|
252
253
|
branch: project/feature/<feature-name>
|
|
253
254
|
design_system: DESIGN.md
|
|
254
255
|
spec_impact: <yes|no> # yes if this feature adds/changes a system, convention, dependency, or architectural decision in SPEC.md
|
|
256
|
+
size: <small|medium|large> # small ≈ 1–2 h by hand, one system; medium ≈ a day; large ≈ multi-day / multi-system / pipeline — drives plan size
|
|
255
257
|
|
|
256
258
|
## Summary
|
|
257
259
|
<one-paragraph description of the feature>
|
|
@@ -301,8 +303,8 @@ spec_impact: <yes|no> # yes if this feature adds/changes a system, convention,
|
|
|
301
303
|
- ...
|
|
302
304
|
|
|
303
305
|
## Testing Guidelines
|
|
304
|
-
Create a test file(s) in the ./tests folder for the new feature, and create meaningful tests for the following cases, without going too heavy:
|
|
305
|
-
-
|
|
306
|
+
Create a test file(s) in the ./tests folder for the new feature, and create meaningful tests for the following named cases (each with its expected outcome), without going too heavy — cover the Acceptance Criteria and the listed edge cases, not exhaustive probing:
|
|
307
|
+
- <case> → <expected outcome>
|
|
306
308
|
```
|
|
307
309
|
|
|
308
310
|
### Validate The Project Spec
|