@babylonjs-toolkit/agent 1.1.15 → 1.1.18
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 +25 -2
- package/package.json +1 -1
- package/persona.md +2 -0
- package/skills/bt-execute/SKILL.md +161 -13
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Agent Skills (1.1.
|
|
1
|
+
# Babylon Toolkit Agent Skills (1.1.18)
|
|
2
2
|
|
|
3
3
|
Universal [Agent Skills](https://agentskills.io) for the `Babylon Toolkit` web game development framework.
|
|
4
4
|
Each `SKILL.md` follows the open standard, so the **same file works unchanged** in Claude Code, Codex CLI, and GitHub Copilot.
|
|
@@ -125,7 +125,7 @@ happens to be named `bt-something` is safe.
|
|
|
125
125
|
|-------|---------|--------------|
|
|
126
126
|
| [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. |
|
|
127
127
|
| [`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 (or all remaining tasks
|
|
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. |
|
|
129
129
|
| [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
|
|
130
130
|
| [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
|
|
131
131
|
| [`bt-landing`](skills/bt-landing/SKILL.md) | `/bt-landing` | Re-design the landing page, splash screen, preloader and custom overlays. |
|
|
@@ -154,6 +154,29 @@ that task 40 uses the same names, shapes and patterns as task 3 — whichever se
|
|
|
154
154
|
it. Without the flag, `bt-plan` produces its standard plan; `bt-execute` runs either kind the
|
|
155
155
|
same way.
|
|
156
156
|
|
|
157
|
+
### Unattended runs (`/bt-execute --auto-pilot`)
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
/bt-execute --auto-pilot @_specs/<feature>_plan.md ALL
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Auto-pilot is for running a 50-task plan overnight. There is no one to ask, so `bt-execute`
|
|
164
|
+
makes every call itself — from the plan's Decisions, then the Babylon Toolkit Agent Reference
|
|
165
|
+
(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 goes through the
|
|
167
|
+
testing subagent and an independent acceptance verifier, and a box only flips on a genuine PASS.
|
|
168
|
+
What changes is that a failure never halts the run: a failing task gets a bounded fix loop (up to
|
|
169
|
+
5 attempts), is then marked `⏭️ DEFERRED (auto-pilot): <reason>` in the plan, and the run moves
|
|
170
|
+
on; deferred tasks get one more pass at the end. Each verified task is committed as a checkpoint
|
|
171
|
+
on the current branch (an `autopilot/<plan>` branch is created if you are on `main`; nothing is
|
|
172
|
+
ever pushed), and a `<plan>_autopilot.md` run log next to the plan records every task outcome,
|
|
173
|
+
decision and deferral for you to read in the morning. Re-running the same command resumes and
|
|
174
|
+
re-attempts anything deferred.
|
|
175
|
+
|
|
176
|
+
One thing the skill cannot do is answer the host's tool-permission prompts — start the session
|
|
177
|
+
in a non-prompting permission mode (Claude Code auto / bypass-permissions) and leave Unity,
|
|
178
|
+
Blender and the dev server reachable if the plan needs them.
|
|
179
|
+
|
|
157
180
|
## Universal Installations
|
|
158
181
|
|
|
159
182
|
Where each tool looks for GLOBAL skills (**Default Installation** — `~` = your home directory):
|
package/package.json
CHANGED
package/persona.md
CHANGED
|
@@ -2,4 +2,6 @@
|
|
|
2
2
|
|
|
3
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.
|
|
4
4
|
|
|
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
|
+
|
|
5
7
|
---
|
|
@@ -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`)
|
|
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."
|
|
4
4
|
allowed-tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch(domain:raw.githubusercontent.com), Agent, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -13,16 +13,23 @@ Use the user’s message after the skill name as the `arguments`.
|
|
|
13
13
|
# Invocation
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
/bt-execute <plan> <task-id> <optional-brief>
|
|
16
|
+
/bt-execute [--auto-pilot] <plan> <task-id> <optional-brief>
|
|
17
17
|
```
|
|
18
|
+
- **`--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.
|
|
18
19
|
- **`<plan>`** — the feature plan or spec file to execute tasks from. This is the *blueprint*.
|
|
19
|
-
- **`<task-id>`** —
|
|
20
|
+
- **`<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*.
|
|
20
21
|
- **`<optional-brief>`** — the brief or instructions for executing the task. This is the *variable*.
|
|
21
|
-
- If
|
|
22
|
+
- If `<plan>` is missing, ask for it before starting. Never guess a file path or URL. The plan is the one argument that cannot be defaulted — under auto-pilot, say so and end.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
Examples:
|
|
24
25
|
```
|
|
25
26
|
/bt-execute → @plan.md → T1 → "Implement the first task in the plan"
|
|
27
|
+
/bt-execute @plan.md # no task id → NEXT: run the next unchecked task
|
|
28
|
+
/bt-execute @plan.md "be careful with the physics layer" # no task id, just a brief → still NEXT
|
|
29
|
+
/bt-execute @plan.md T3-T7 # range: tasks T3 through T7, in plan order
|
|
30
|
+
/bt-execute @plan.md T12- # open range: T12 through the end of the plan
|
|
31
|
+
/bt-execute @plan.md NEXT:3 # the next three unchecked tasks
|
|
32
|
+
/bt-execute --auto-pilot @_specs/<feature>_plan.md ALL # unattended overnight run of every remaining task
|
|
26
33
|
```
|
|
27
34
|
|
|
28
35
|
---
|
|
@@ -47,7 +54,7 @@ Do not refetch the Agent Reference repeatedly during the same remembered session
|
|
|
47
54
|
|
|
48
55
|
Treat the Agent Reference as the authority for conventions, API, and patterns. It routes to deeper docs. Fetch linked subpages only when they are relevant to the task, and do not refetch a subpage in the same remembered session/context unless you no longer remember it.
|
|
49
56
|
|
|
50
|
-
If a required fetch fails, STOP and tell me. Do not guess at the API.
|
|
57
|
+
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**.)*
|
|
51
58
|
|
|
52
59
|
---
|
|
53
60
|
|
|
@@ -56,7 +63,7 @@ If a required fetch fails, STOP and tell me. Do not guess at the API.
|
|
|
56
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 before executing any task**, and follow it while implementing (it constrains how you build, not just what).
|
|
57
64
|
|
|
58
65
|
- Implement in a way that conforms to SPEC.md's architecture, systems, and conventions.
|
|
59
|
-
- **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.
|
|
66
|
+
- **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.)*
|
|
60
67
|
- **This is the write-up half of the spec-driven loop.** When a task changes the architecture, a system, a convention, or a dependency, SPEC.md must end up matching what was built. A well-formed plan makes this an explicit final `Update SPEC.md` task (see below); if you are executing a plan that changes architecture but has no such task, flag the gap and update SPEC.md as part of completing the work rather than leaving it stale.
|
|
61
68
|
- Record any new dependency in SPEC.md's Dependencies section as part of the task that introduces it.
|
|
62
69
|
- 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.
|
|
@@ -67,14 +74,20 @@ The `Update SPEC.md` task is a task like any other: it goes through the same acc
|
|
|
67
74
|
|
|
68
75
|
## Step 1. Parse the arguments
|
|
69
76
|
|
|
70
|
-
|
|
77
|
+
First strip the `--auto-pilot` flag if present and remember that **Auto-pilot mode** is in effect for the whole run. Then, from the remaining `arguments`, extract:
|
|
71
78
|
|
|
72
79
|
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`).
|
|
73
|
-
2. `task_id` —
|
|
80
|
+
2. `task_id` — the token immediately after `source_file`, **only if** it is one of these forms (all case-insensitive):
|
|
81
|
+
- a single task id (e.g. `T1`, `T2`, `T3.1`) → **Single-task mode** (Step 2);
|
|
82
|
+
- `NEXT` → **Next-task mode** (Step 3);
|
|
83
|
+
- `ALL` → **Run-all mode** (Step 4);
|
|
84
|
+
- a **range** → **Range mode** (Step 5): `T1-T10` (two ids joined by `-`), `T5-` (an id followed by `-`, meaning through the end of the plan), or `NEXT:3` (`NEXT:` followed by a positive integer).
|
|
85
|
+
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
|
+
3. `brief` — whatever remains after `source_file` and `task_id`. It shapes *how* the selected task(s) are done, never *which* tasks are selected.
|
|
74
87
|
|
|
75
88
|
## Verifying a task before checking its box
|
|
76
89
|
|
|
77
|
-
Before changing any task's `- [ ]` to `- [x]` (this applies to every mode below), verify its **Acceptance** criteria are genuinely met. At the start of the run, **emit one visible status line** so the user sees which verification path is in effect — either `🔍 [bt-execute] subagent tool detected — using an independent verifier before each checkbox` or `🔍 [bt-execute] no subagent tool — self-verifying before each checkbox` — and when you report each task, note whether it was `verified (independent subagent)` or `verified (self)`. If a subagent-spawning tool is available to you (e.g. Claude Code's `Agent`, Lovable's subagent tool, or your host's equivalent — check the tools you actually have), launch an **independent verifier subagent**: give it the task's Details + Acceptance and the changes just made, and instruct it to adversarially confirm the criteria — actively look for a reason they are NOT met, inspecting files and running the relevant build/test/commands as needed — then return PASS/FAIL with evidence. Flip the checkbox only on PASS. On FAIL, leave it `- [ ]`, do not touch later tasks, and report what failed. If no subagent tool is available (or you are unsure), self-verify the Acceptance the same way before flipping — never call a subagent tool you do not have. The verifier need not re-read the Agent Reference. Never check a box for partial, skipped, or unverified work.
|
|
90
|
+
Before changing any task's `- [ ]` to `- [x]` (this applies to every mode below), verify its **Acceptance** criteria are genuinely met. At the start of the run, **emit one visible status line** so the user sees which verification path is in effect — either `🔍 [bt-execute] subagent tool detected — using an independent verifier before each checkbox` or `🔍 [bt-execute] no subagent tool — self-verifying before each checkbox` — and when you report each task, note whether it was `verified (independent subagent)` or `verified (self)`. If a subagent-spawning tool is available to you (e.g. Claude Code's `Agent`, Lovable's subagent tool, or your host's equivalent — check the tools you actually have), launch an **independent verifier subagent**: give it the task's Details + Acceptance and the changes just made, and instruct it to adversarially confirm the criteria — actively look for a reason they are NOT met, inspecting files and running the relevant build/test/commands as needed — then return PASS/FAIL with evidence. Flip the checkbox only on PASS. On FAIL, leave it `- [ ]`, do not touch later tasks, and report what failed. *(Auto-pilot: a FAIL enters the bounded fix loop, then defers the task and continues — see **Auto-pilot mode**.)* If no subagent tool is available (or you are unsure), self-verify the Acceptance the same way before flipping — never call a subagent tool you do not have. The verifier need not re-read the Agent Reference. Never check a box for partial, skipped, or unverified work.
|
|
78
91
|
|
|
79
92
|
**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.)* 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. A plausible-looking result that silently dropped or inverted a documented behavior is a **FAIL**, even if the surface looks right. Likewise, 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.
|
|
80
93
|
|
|
@@ -85,7 +98,7 @@ Testing for each task is owned by a dedicated **testing subagent** — separate
|
|
|
85
98
|
For each task, unless the task genuinely has no testable surface (pure config/docs/asset moves — say so explicitly rather than skipping silently):
|
|
86
99
|
|
|
87
100
|
1. If a subagent-spawning tool is available to you (check the tools you actually have; if there is none, or you are unsure, do this inline yourself — never call a subagent tool you do not have), launch a **testing subagent** and give it: the task's Details + Acceptance, the changes just made, the project's test conventions/runner, and the feature spec's `Testing Guidelines`. Instruct it to (a) author meaningful test file(s) under `./tests` (or wherever this repo's tests live) covering the task's Acceptance and its likely edge cases — following existing test patterns, without over-testing — then (b) run the test suite (or at least the relevant tests) and return the command used, PASS/FAIL, and the failing output on failure. The testing subagent need not re-read the Agent Reference.
|
|
88
|
-
2. Treat a test **FAIL** exactly like an acceptance failure: fix the implementation (not the test, unless the test is wrong) and re-run until green, or if it cannot pass, leave the box `- [ ]`, do not touch later tasks, and report which task's tests failed and why.
|
|
101
|
+
2. Treat a test **FAIL** exactly like an acceptance failure: fix the implementation (not the test, unless the test is wrong) and re-run until green, or if it cannot pass, leave the box `- [ ]`, do not touch later tasks, and report which task's tests failed and why. *(Auto-pilot: fix loop, then defer and continue.)*
|
|
89
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.
|
|
90
103
|
|
|
91
104
|
The `Update SPEC.md` task and other non-code tasks typically have no test surface — note that explicitly and let the acceptance verifier alone gate them.
|
|
@@ -97,7 +110,7 @@ Read `source_file` and find the task whose id matches `task_id`. If it cannot be
|
|
|
97
110
|
Then implement ONLY that single task. This is a hard rule:
|
|
98
111
|
|
|
99
112
|
- Do not start, scaffold, refactor for, or partially implement any other task, even if it looks trivial, related, or "while you're here".
|
|
100
|
-
- 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.
|
|
113
|
+
- 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.)*
|
|
101
114
|
- Follow all project rules in the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md) and any referenced spec/plan conventions.
|
|
102
115
|
|
|
103
116
|
When the task is implemented, **verify its Acceptance per _Verifying a task before checking its box_ above**; 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.
|
|
@@ -124,7 +137,142 @@ Execute every remaining task in the plan, in order, resuming wherever it was lef
|
|
|
124
137
|
3. For each unchecked task, in order, one at a time:
|
|
125
138
|
a. Implement ONLY that task, following the same scope discipline and project conventions as single-task mode.
|
|
126
139
|
b. Once it is implemented, **verify its Acceptance (see _Verifying a task before checking its box_)**; only on PASS immediately edit `source_file` to change that task's `- [ ]` to `- [x]` BEFORE starting the next task. Persisting progress after each task is what lets a later run of the execute skill with `ALL` safely continue.
|
|
127
|
-
c. If a task cannot be completed, is blocked, or its acceptance criteria are not met, STOP: leave it unchecked, do not touch any later task, and report which task failed and why.
|
|
140
|
+
c. If a task cannot be completed, is blocked, or its acceptance criteria are not met, STOP: leave it unchecked, do not touch any later task, 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**.)*
|
|
128
141
|
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.
|
|
129
142
|
|
|
130
143
|
Never check a box for partial, skipped, or unverified work in either mode.
|
|
144
|
+
|
|
145
|
+
## Step 5. Range mode (`task_id` is `T1-T10`, `T5-` or `NEXT:3`)
|
|
146
|
+
|
|
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 then verifier, flip the box 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
|
+
|
|
149
|
+
**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
|
+
|
|
151
|
+
- **`T<a>-T<b>`** — every task from the one whose id is `T<a>` through the one whose id is `T<b>`, **inclusive**, as they appear in the file. Sub-tasks (`T3.1`, `T3.2`) sitting between the endpoints are part of the slice. `T3-T3` is the same as `T3`.
|
|
152
|
+
- **`T<a>-`** — from the task whose id is `T<a>` through the last task in the file.
|
|
153
|
+
- **`NEXT:<n>`** — the first `n` tasks that are still `- [ ]`, in file order, wherever they sit. `NEXT:1` is the same as `NEXT`. If fewer than `n` remain, run the ones that do and say so.
|
|
154
|
+
|
|
155
|
+
Rules:
|
|
156
|
+
|
|
157
|
+
- Both endpoint ids must exist in `source_file`. If either does not, print the list of available task ids and STOP without implementing anything. *(Auto-pilot: the one exception to "never stop" besides a missing plan — a mistyped range is a typo the user must fix. Say so and end.)*
|
|
158
|
+
- The start must come **before or at** the end in file order. A reversed range (`T10-T1`) is an error — report it and STOP; never silently swap the endpoints.
|
|
159
|
+
- Tasks already `- [x]` inside the slice are skipped, so a range is resumable exactly like `ALL`: re-running the same range continues from its first unchecked task. If every task in the slice is already checked, report that and STOP without changing anything.
|
|
160
|
+
- Tasks **outside** the slice are never touched, even when a task inside the slice depends on an unchecked task outside it. In that case treat the dependency as a blocker per Step 4 3c: stop and report it. *(Auto-pilot: apply the prerequisite row of the stop-replacement table — do the minimum of the outside task needed to unblock, log the scope expansion, but never flip the outside task's box.)*
|
|
161
|
+
- Report at the end exactly as Step 4 does, plus the range that was requested, how many of its tasks were completed this run, and the next unchecked task id after the slice (for reference only — do NOT start it).
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## Auto-pilot mode (`--auto-pilot`)
|
|
166
|
+
|
|
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 verification and testing status lines:
|
|
168
|
+
|
|
169
|
+
`🛩️ [bt-execute] Auto-pilot engaged — unattended run; every decision is mine, nothing stops for human input until the queue is empty`
|
|
170
|
+
|
|
171
|
+
Auto-pilot exists so a plan of 50+ tasks can run overnight:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
/bt-execute --auto-pilot @_specs/<feature>_plan.md ALL
|
|
175
|
+
```
|
|
176
|
+
|
|
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 testing subagent, the independent acceptance verifier, 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
|
+
|
|
179
|
+
### The prime directive
|
|
180
|
+
|
|
181
|
+
**The run ends when the work queue is empty — never before.** The work queue is every unchecked task the selected mode covers — the whole plan for `ALL`, the slice for a range, the one task for a single id or `NEXT`. The only acceptable end states are:
|
|
182
|
+
|
|
183
|
+
- (a) every task in the work queue is `- [x]`, or
|
|
184
|
+
- (b) every task in the work queue is `- [x]` or explicitly **DEFERRED** per the rules below, with its reason in the run log.
|
|
185
|
+
|
|
186
|
+
Ending the turn while an unchecked, non-deferred task remains in the work queue — for any reason other than the plan file itself being missing or unreadable, or a range endpoint that does not exist — is a failure of this skill. Before you end the turn, re-read `source_file`: if such a task exists, you are not done. Continue. Do not stop because the session is long, because the context was compacted, because a tool errored, because a subagent asked a question, because something was ambiguous, or because you would "normally check with the user". None of those are reasons to stop under auto-pilot.
|
|
187
|
+
|
|
188
|
+
You are the studio, not an advisor (Agent Reference). You decide as a senior Babylon Toolkit game developer whose goal is authoring content in Unity, exporting it with the Toolkit exporter as **interactive glTF**, and running it in **BabylonJS** through script components — and you keep going until the plan is done.
|
|
189
|
+
|
|
190
|
+
### Decision ladder — how every call is made
|
|
191
|
+
|
|
192
|
+
When the non-auto-pilot skill would ask, stop or flag, apply this ladder in order and take the first rung that resolves it:
|
|
193
|
+
|
|
194
|
+
1. **The plan decides.** The plan's `Decisions` log, `Design Reference`, the task's Details and Acceptance, then the feature spec, then SPEC.md. A heavy plan is decision-complete by design — obey it.
|
|
195
|
+
2. **The Toolkit decides.** The Agent Reference and its sub-documents: the ES6/ESM style guide, Interactive Scene Components (`TOOLKIT.*` script components — compose and tune them, never re-implement them, never ad-hoc BabylonJS wiring), the Unity Exporter CLI (`bt_export_level` / `bt_export_prefab`, `unity command eval` for anything without a command), and the Blender CLI for model work. If the reference documents a pattern, that pattern is the answer.
|
|
196
|
+
3. **The codebase decides.** Mirror the conventions, file layout, naming, test runner and patterns already in the repo.
|
|
197
|
+
4. **Expert default.** Choose what a senior Toolkit developer would ship: the simplest option that satisfies Acceptance, keeps the Unity → interactive glTF → BabylonJS pipeline intact, and is easiest to revise later. Prefer reversible over clever. State the assumption in one line and proceed.
|
|
198
|
+
|
|
199
|
+
Every rung-4 call, every ambiguity resolved, every scope expansion, and every deviation from a documented decision is written to the **run log** as a numbered Decision: what was decided, why, what was rejected, and which task(s) it binds. If the project's SPEC.md has a Decisions log, append it there too (newest last, superseding rather than deleting) so plan, spec and code do not drift. Assumptions are **logged** — never silently made, never asked.
|
|
200
|
+
|
|
201
|
+
### What replaces each stop
|
|
202
|
+
|
|
203
|
+
| Where the skill would otherwise stop or ask | Auto-pilot does this instead |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `task_id` missing | Default to `ALL` (auto-pilot overrides the normal `NEXT` default — an overnight run that does one task is useless). |
|
|
206
|
+
| `source_file` missing or unreadable | The one genuine no-op — there is nothing to run. Say so and end. Never guess a path. |
|
|
207
|
+
| Agent Reference (or a needed sub-document) fetch fails | Retry up to 3× with a short wait between attempts. If still failing, emit `⚠️ [auto-pilot] reference fetch failed after 3 retries — proceeding on remembered Babylon Toolkit knowledge`, log it, proceed, and retry the fetch at the next task boundary. |
|
|
208
|
+
| Task is ambiguous or underspecified | Resolve it with the decision ladder; log the Decision. |
|
|
209
|
+
| 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
|
+
| 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
|
+
| Plan changes architecture but has no `Update SPEC.md` task | Update SPEC.md as part of the task that made the change. |
|
|
212
|
+
| Testing subagent FAIL / acceptance verifier FAIL | Enter the **fix loop** below. |
|
|
213
|
+
| Task still cannot pass after the fix loop | **DEFER** it (below) and **continue to the next task**. |
|
|
214
|
+
| 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
|
+
| 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×. |
|
|
216
|
+
| A subagent returns a question instead of a result | Answer it yourself with the decision ladder and re-launch the subagent with the answer included. Never relay a question to the user. |
|
|
217
|
+
| Creative or product direction is missing | Choose what best serves the game the spec describes; log it. |
|
|
218
|
+
| Two architectures with no clear winner | Pick the one closest to the Toolkit's documented patterns and the existing code; log it and what was rejected. |
|
|
219
|
+
| An action would spend money, deploy externally, push to a remote, or destroy work outside this plan's scope | Do it only if the plan or spec explicitly instructs it. Otherwise DEFER that *step* (not the whole task, if the rest can still pass) and continue. Never `git push`, never force-push, never delete or overwrite files outside the plan's scope, never `rm -rf` outside the project. |
|
|
220
|
+
| Host permission prompt | Outside this skill's control — see **Prerequisites**. |
|
|
221
|
+
|
|
222
|
+
### The fix loop (bounded, honest)
|
|
223
|
+
|
|
224
|
+
A FAIL from the testing subagent or the acceptance verifier does not end the run and does not flip the box. It starts a fix loop for that task:
|
|
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.
|
|
229
|
+
|
|
230
|
+
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
|
+
|
|
232
|
+
### Deferring a task
|
|
233
|
+
|
|
234
|
+
When a task cannot pass, mark it in `source_file` **without flipping its box**: keep `- [ ]` and append ` ⏭️ DEFERRED (auto-pilot): <one-line reason>` to the end of that task's checkbox line. Log the details in the run log's `## Deferred` section. Then move on to the next task.
|
|
235
|
+
|
|
236
|
+
- **Dependents:** a later task that depends on a deferred task is still attempted (see the prerequisite row above). If it genuinely cannot proceed, defer it too with `blocked by T<n>` as the reason.
|
|
237
|
+
- **Second pass:** once the queue is exhausted, make **one** more pass over the deferred tasks in order — a later task often fixes what blocked an earlier one. A task that passes on the second pass has its `DEFERRED` marker removed and its box flipped. Tasks still failing stay deferred. Then the run ends.
|
|
238
|
+
- **Resumable:** a deferred task is simply an unchecked task with a note. Re-running the same auto-pilot command re-attempts it; `/bt-execute @plan T<n>` on another day runs it with a human present, and the marker tells them why it was left.
|
|
239
|
+
|
|
240
|
+
### The run log
|
|
241
|
+
|
|
242
|
+
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
|
+
|
|
244
|
+
- **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.
|
|
246
|
+
- **`## Decisions`** — numbered, appended as they are made (what / why / rejected / binds).
|
|
247
|
+
- **`## Deferred`** — task, reason, and what a human should look at first.
|
|
248
|
+
- **Footer per run:** ended (ISO timestamp), completed/total, deferred count, wall time.
|
|
249
|
+
|
|
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/5`, `⏭️ [auto-pilot] T13 deferred — <reason>`.
|
|
251
|
+
|
|
252
|
+
### Checkpoints (git)
|
|
253
|
+
|
|
254
|
+
If the project is a git repository: after each task's box flips, commit that task's changes on the current branch with the message `T<n>: <task title> (auto-pilot)`. 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
|
+
|
|
256
|
+
### Context hygiene for long runs
|
|
257
|
+
|
|
258
|
+
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
|
+
|
|
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**. Give it: the task's full block, the plan's `Decisions` and `Design Reference` sections (or the whole plan if it is not a heavy plan), SPEC.md, the project's agent instructions, the Agent Reference URL with the instruction to fetch and read it first, and the auto-pilot subagent rules below. The orchestrating context then does only: read plan → launch implementer → launch tester → launch verifier → flip box → commit → log → next. 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
|
+
|
|
262
|
+
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
|
+
|
|
264
|
+
### Every subagent inherits auto-pilot
|
|
265
|
+
|
|
266
|
+
Every implementer, testing and verifier subagent is told, verbatim, in its prompt:
|
|
267
|
+
|
|
268
|
+
> 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
|
+
|
|
270
|
+
A verifier still returns an honest PASS/FAIL with evidence. Auto-pilot never asks it to be lenient.
|
|
271
|
+
|
|
272
|
+
### Prerequisites (the user's side, before going to bed)
|
|
273
|
+
|
|
274
|
+
This skill controls its own decisions, not the host's. For a truly unattended run the user must launch the session in a permission mode that does not prompt (Claude Code: an auto / bypass-permissions mode, or pre-approved tools covering this skill's `allowed-tools`), and leave Unity, Blender and the dev server reachable if the plan needs them. Remind the user of this once, in the first status line of the run: `ℹ️ [auto-pilot] host permission prompts are outside this skill's control — run in a non-prompting permission mode for a fully unattended run`. Then continue regardless.
|
|
275
|
+
|
|
276
|
+
### Exit report
|
|
277
|
+
|
|
278
|
+
When the queue is empty (after the second pass), print: the tasks completed this run, completed/total, the deferred tasks with their one-line reasons, the number of Decisions logged with the run-log path, the branch and last commit hash, and whether the plan is now fully done. Then end. Re-running the same command resumes safely: it re-attempts deferred tasks and continues from the first unchecked one.
|