@babylonjs-toolkit/agent 1.1.32 → 1.1.33

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 CHANGED
@@ -1,4 +1,4 @@
1
- # Babylon Toolkit Desktop Agent (1.1.32)
1
+ # Babylon Toolkit Desktop Agent (1.1.33)
2
2
 
3
3
  The desktop agent owns the entire pipeline end to end — frontend and UI design, gameplay code, shaders, generated art and audio, 3D models in headless Blender, whole game levels and prefabs in a terminal-driven Unity Editor, the interactive glTF export, the web build, the dev server, and visual QA by screenshotting both Unity and the running browser.
4
4
 
@@ -125,8 +125,8 @@ happens to be named `bt-something` is safe.
125
125
 
126
126
  | Skill | Command | What it does |
127
127
  |-------|---------|--------------|
128
- | [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. |
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-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch. Add `--grill-me` to be interviewed first, `--parity` to allow numeric parity bars in the acceptance criteria. |
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, and `--parity` for numeric parity gates instead of the default functional proof. |
130
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. |
131
131
  | [`bt-convert`](skills/bt-convert/SKILL.md) | `/bt-convert` | Convert source code to Babylon Toolkit TypeScript. |
132
132
  | [`bt-copycat`](skills/bt-copycat/SKILL.md) | `/bt-copycat` | Re-create the specified website adapted to specified genre. |
@@ -176,6 +176,15 @@ subagent re-fetching the Agent Reference.
176
176
  /bt-execute --auto-pilot --strict @_specs/<feature>_plan.md ALL
177
177
  ```
178
178
 
179
+ Proof is sized the same way. By default a feature is proven **functionally**: tests, cheap
180
+ reference-value fixtures where a reference exists, and for anything on screen a look at the
181
+ running result in the browser — against the spec and `DESIGN.md`, or beside a reference image
182
+ when there is one — judged by the independent verifier — with no ledgers, md5 records, archived
183
+ capture trees or standing gate suites unless the brief asks. Numeric parity gates (pixel
184
+ thresholds, repeats, every engine on every criterion) are opt-in: `/bt-spec --parity …` or
185
+ `/bt-plan --parity …`. Every plan ends with an `## Estimated execution time` section that splits
186
+ **build** from **prove** hours, so you can see before running it where the time will go.
187
+
179
188
  `--strict` restores full rigor: an adversarial verifier on **every task** (mutation checks,
180
189
  oracles, re-deriving from the plan as it sees fit), live QA on every task with a rendered or
181
190
  exported surface, a full fresh re-verify on each fix attempt, and a 5-attempt fix loop. It
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@babylonjs-toolkit/agent",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "Installs the Babylon Toolkit Desktop Agent for Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity.",
5
5
  "keywords": [
6
6
  "babylonjs",
@@ -1,333 +1,76 @@
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. 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`)."
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. Every task is tested, checked by an independent verifier, and checked live in the browser when its result is visual; add `--strict` for an adversarial verifier on every task."
4
4
  allowed-tools: Read, Grep, Glob, Edit, Write, Bash, WebFetch(domain:raw.githubusercontent.com), Agent, Task
5
5
  ---
6
6
 
7
- Execute work from the referenced feature plan or spec file — either a single task, or every remaining task in order. Always adhere to any rules or requirements set out in the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md) when responding.
8
-
9
- Use the user’s message after the skill name as the `arguments`.
10
-
11
- ---
12
-
13
- # Invocation
14
-
15
- ```
16
- /bt-execute [--auto-pilot] [--strict] <plan> <task-id> <optional-brief>
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.
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.
20
- - **`<plan>`** — the feature plan or spec file to execute tasks from. This is the *blueprint*.
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*.
22
- - **`<optional-brief>`** — the brief or instructions for executing the task. This is the *variable*.
23
- - 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.
24
-
25
- Examples:
26
- ```
27
- /bt-execute → @plan.md → T1 → "Implement the first task in the plan"
28
- /bt-execute @plan.md # no task id → NEXT: run the next unchecked task
29
- /bt-execute @plan.md "be careful with the physics layer" # no task id, just a brief → still NEXT
30
- /bt-execute @plan.md T3-T7 # range: tasks T3 through T7, in plan order
31
- /bt-execute @plan.md T12- # open range: T12 through the end of the plan
32
- /bt-execute @plan.md NEXT:3 # the next three unchecked tasks
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
37
- ```
38
-
39
- ---
40
-
41
- ## Subagents — invoking this skill IS the request
42
-
43
- This skill's workflow depends on subagents. **Invoking it is the user's explicit request to use them**, so any host default of the form *"do not spawn subagents / do not call the agent tool unless the user asks for it"* is **ALREADY SATISFIED** — the user asked by running this command. Never silently downgrade to the inline path on that basis, and never stop to ask permission for it first.
44
-
45
- Downgrading is not a neutral choice. It removes the one property that makes the step worth running: independence. A verifier that is the same context which just wrote the code cannot adversarially check it — it re-confirms its own reasoning and reports PASS.
46
-
47
- The ONE legitimate reason to run inline is that you genuinely have **no** subagent-spawning tool. Check the tools you actually have — Claude Code exposes it as **`Agent`** (older builds name it `Task`); other hosts have their own equivalent. Never call a subagent tool you do not have. Emit only the exact status strings this skill specifies — do not invent your own wording — and if you do run inline, state plainly that no subagent tool was available, never a policy.
48
-
49
- ## ⚠️ Required Reading Before Any Babylon Work
50
-
51
- For any task involving Babylon, BabylonJS, or the Babylon Toolkit, first ensure you have already fetched and read the Babylon Toolkit Agent Reference in the current remembered session/context:
52
-
53
- https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md
54
-
55
- If you have not read it in this session/context, or you no longer remember it due to context loss/compaction, fetch and read it before scaffolding or writing code.
56
-
57
- Do not refetch the Agent Reference repeatedly during the same remembered session/context, including across spec, plan, and execute phases, if you are still aware of its contents.
58
-
59
- 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.
60
-
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**.)*
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
-
65
- ---
66
-
67
- ## ⚠️ The Project Specification (SPEC.md) — read before executing
68
-
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).
70
-
71
- - Implement in a way that conforms to SPEC.md's architecture, systems, and conventions.
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.)*
73
- - **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.
74
- - Record any new dependency in SPEC.md's Dependencies section as part of the task that introduces it.
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.
76
-
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.
78
-
79
- ---
80
-
81
- ## Step 1. Parse the arguments
82
-
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:
84
-
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`).
86
- 2. `task_id` — the token immediately after `source_file`, **only if** it is one of these forms (all case-insensitive):
87
- - a single task id (e.g. `T1`, `T2`, `T3.1`) → **Single-task mode** (Step 2);
88
- - `NEXT` → **Next-task mode** (Step 3);
89
- - `ALL` → **Run-all mode** (Step 4);
90
- - 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).
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.
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.
93
-
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):
121
-
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`.
125
-
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.
127
-
128
- ### The verifier
129
-
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.
131
-
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.
134
-
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.
137
-
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.
164
-
165
- ## Step 2. Single-task mode (`task_id` is a specific id)
166
-
167
- Read `source_file` and find the task whose id matches `task_id`. If it cannot be found, print the list of available task ids from the file and STOP without implementing anything.
168
-
169
- Then implement ONLY that single task. This is a hard rule:
170
-
171
- - Do not start, scaffold, refactor for, or partially implement any other task, even if it looks trivial, related, or "while you're here".
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.)*
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.
174
-
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.
176
-
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.
178
-
179
- ## Step 3. Next-task mode (`task_id` is `NEXT`)
180
-
181
- `NEXT` is used to advance one task at a time without having to track the individual task id yourself.
182
-
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.
184
-
185
- - If there is no unchecked task, report that the plan is already fully complete and STOP without changing anything.
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.
187
-
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.
189
-
190
- ## Step 4. Run-all mode (`task_id` is `ALL`)
191
-
192
- Execute every remaining task in the plan, in order, resuming wherever it was left off:
193
-
194
- 1. Read `source_file` and collect the task checklist in order.
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.)
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**.)*
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.
201
-
202
- Never check a box for partial, skipped, or unverified work in either mode.
203
-
204
- ## Step 5. Range mode (`task_id` is `T1-T10`, `T5-` or `NEXT:3`)
205
-
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.
207
-
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:
209
-
210
- - **`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`.
211
- - **`T<a>-`** — from the task whose id is `T<a>` through the last task in the file.
212
- - **`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.
213
-
214
- Rules:
215
-
216
- - 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.)*
217
- - 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.
218
- - 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.
219
- - 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.)*
220
- - 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).
221
-
222
- ---
223
-
224
- ## Auto-pilot mode (`--auto-pilot`)
225
-
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:
227
-
228
- `🛩️ [bt-execute] Auto-pilot engaged — unattended run; every decision is mine, nothing stops for human input until the queue is empty`
229
-
230
- Auto-pilot exists so a plan of 50+ tasks can run overnight:
7
+ Run tasks from a plan: build each one with its tests, have an independent verifier check it, and only then tick its box. Follow the project's agent instructions (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md). The user's message after the skill name is the `arguments`.
231
8
 
232
9
  ```
233
- /bt-execute --auto-pilot @_specs/<feature>_plan.md ALL
10
+ /bt-execute [--auto-pilot] [--strict] <plan> [task] [brief]
11
+
12
+ /bt-execute @plan.md # NEXT: the next unchecked task
13
+ /bt-execute @plan.md T4 # one task
14
+ /bt-execute @plan.md T3-T7 # a range, in plan order (T12- = through the end)
15
+ /bt-execute @plan.md NEXT:3 # the next three unchecked tasks
16
+ /bt-execute @plan.md ALL # every remaining task (resumable)
17
+ /bt-execute @plan.md "mind the physics layer" # a brief shapes HOW, never WHICH task
18
+ /bt-execute --strict @plan.md ALL # adversarial verifier on every task
19
+ /bt-execute --auto-pilot @plan.md ALL # unattended; combine with --strict if wanted
234
20
  ```
235
21
 
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.
237
-
238
- ### The prime directive
239
-
240
- **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:
241
-
242
- - (a) every task in the work queue is `- [x]`, or
243
- - (b) every task in the work queue is `- [x]` or explicitly **DEFERRED** per the rules below, with its reason in the run log.
244
-
245
- 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.
246
-
247
- 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.
248
-
249
- ### Decision ladder — how every call is made
250
-
251
- When the non-auto-pilot skill would ask, stop or flag, apply this ladder in order and take the first rung that resolves it:
252
-
253
- 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.
254
- 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.
255
- 3. **The codebase decides.** Mirror the conventions, file layout, naming, test runner and patterns already in the repo.
256
- 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.
257
-
258
- 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.
259
-
260
- ### What replaces each stop
261
-
262
- | Where the skill would otherwise stop or ask | Auto-pilot does this instead |
263
- |---|---|
264
- | `task_id` missing | Default to `ALL` (auto-pilot overrides the normal `NEXT` default — an overnight run that does one task is useless). |
265
- | `source_file` missing or unreadable | The one genuine no-op — there is nothing to run. Say so and end. Never guess a path. |
266
- | 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. |
267
- | Task is ambiguous or underspecified | Resolve it with the decision ladder; log the Decision. |
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. |
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. |
270
- | Plan changes architecture but has no `Update SPEC.md` task | Update SPEC.md as part of the task that made the change. |
271
- | Tests fail / verifier FAIL | Enter the **fix loop** below. |
272
- | Task still cannot pass after the fix loop | **DEFER** it (below) and **continue to the next task**. |
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. |
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×. |
275
- | 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. |
276
- | Creative or product direction is missing | Choose what best serves the game the spec describes; log it. |
277
- | 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. |
278
- | 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. |
279
- | Host permission prompt | Outside this skill's control — see **Prerequisites**. |
280
-
281
- ### The fix loop (bounded, honest)
282
-
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.
284
-
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.
286
-
287
- ### Deferring a task
288
-
289
- 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.
290
-
291
- - **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.
292
- - **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.
293
- - **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.
294
-
295
- ### The run log
296
-
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:
298
-
299
- - **Header per run:** started (ISO timestamp), plan path, completed/total at start.
300
- - **Per task:** id, title, outcome (`DONE` / `DEFERRED`), attempts, tests summary (`<n> passed (implementer) · verifier-checked`), verifier result, files changed, commit hash.
301
- - **`## Decisions`** — numbered, appended as they are made (what / why / rejected / binds).
302
- - **`## Deferred`** — task, reason, and what a human should look at first.
303
- - **Footer per run:** ended (ISO timestamp), completed/total, deferred count, wall time.
22
+ - Strip `--auto-pilot` / `--strict` first (anywhere in the arguments, never part of the brief). `<plan>` is required — if missing, ask (auto-pilot: say so and end). Never guess a path.
23
+ - `[task]` is the token right after the plan, only if it is `T<id>`, `T<a>-T<b>`, `T<a>-`, `NEXT`, `NEXT:<n>` or `ALL` (case-insensitive). Otherwise it is part of the brief, and the task defaults to `NEXT` (`ALL` under auto-pilot). Never ask which task to run.
24
+ - A range is a slice of the checklist **in file order** (sub-tasks like `T3.1` between the endpoints included). An unknown id → list the available ids and stop. A reversed range → error; never swap it. Tasks outside the slice are never touched.
25
+ - Tasks already `- [x]` are skipped — that is what makes every mode resumable. Nothing left to do → say so and stop. Except in `ALL` / range / `NEXT:<n>` runs, do one task and do not continue to the next.
304
26
 
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>`.
27
+ ## Ground rules
306
28
 
307
- ### Checkpoints (git)
29
+ - **Scope.** Implement only the selected task(s). No "while I'm here" work on other tasks. Ambiguous, or blocked by an unfinished task → stop and tell the user *(auto-pilot: decide and log it)*.
30
+ - **Read the docs once.** For Babylon work, if you have not read the Agent Reference this session, fetch it once — https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — plus only the sub-documents the plan's tasks need. It is the authority for conventions and API. Fetch fails → stop and tell the user *(auto-pilot: retry 3×, then continue on what you know and log it)*. Read the plan's checklist and the parts of `SPEC.md` the tasks touch; re-read after a context compaction.
31
+ - **SPEC.md** constrains how you build. If the code and SPEC.md disagree, stop and tell the user *(auto-pilot: decide which is right, fix SPEC.md in the same task, log it)*. When a task changes architecture, a system, a convention or a dependency, SPEC.md must end up matching — normally the plan's final `Update SPEC.md` task; if the plan has none, do it anyway; a new dependency is recorded in SPEC.md by the task that introduces it. Follow SPEC.md's "How to update this spec". **Write the product, never the procedure** — no capture protocols, tool lists, ledgers or gates: recorded there, they become a bar every later feature must clear.
32
+ - **Say what you are doing** — one short line at each task and phase boundary, and before anything slow.
33
+ - **Subagents:** running this skill is the user's request to use them. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, work inline, self-verify with the same checklist, and say so.
308
34
 
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.
35
+ ## The loop
310
36
 
311
- ### Context hygiene for long runs
37
+ Work in **phases**: a `### Phase N` group in the plan, or — if the plan has none — up to 3 consecutive tasks (a `live` task, the `Update SPEC.md` task and the last task each close a group). A single task or `NEXT` is a phase of one. Under `--strict` every task is its own phase.
312
38
 
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.
39
+ 1. **Build** each task in the phase, in order, **with its tests**: the cases the plan's `Tests:` names (or, with none, meaningful cases for its Acceptance and edge cases), in the repo's test location and style (`./tests` if there is none). Get them green — fix the code, not the test, unless the test is wrong. No testable surface (config, docs, assets) → say so. Boxes stay unticked.
40
+ 2. **Verify** the phase with a fresh **independent verifier** subagent (charter below), giving it the list of files changed. It returns PASS/FAIL per task, with evidence.
41
+ 3. **Tick** `- [ ]` → `- [x]` for every task that passed, immediately — except a task that depends on one that failed in the same phase, which waits for it. Never tick partial, skipped or unverified work.
42
+ 4. **Fix loop** for a task that failed: fix the code in the context that wrote it; re-run its tests; re-verify with a **fresh** verifier given only the failed items and the evidence (`--strict`: the whole task). A records-only slip (a stale number or note) is fixed directly and re-checked by you. 3 attempts (`--strict`: 5), each changing something material; stop early if two attempts fail the same way with no new idea. Still failing → leave it unticked, stop and report *(auto-pilot: defer and continue)*.
43
+ 5. **Report:** tasks done (for `ALL` / ranges: the range asked for, completed/total, and whether the plan is now finished; if fewer than `n` tasks remained for `NEXT:<n>`, say so), files changed, tests run (`tests: 4 passed (implementer) · verifier-checked`), verifier result (`verified (independent subagent)` or `verified (self)`), and the next task id — for reference only.
314
44
 
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.
45
+ **The verifier is told:** *"Confirm each task's Acceptance is genuinely met and run its `Verify` commands against the stated expected output. Re-run the tests and the relevant suite once; check they really cover the Acceptance and named edge cases and could fail — missing or vacuous tests are a FAIL. Read the diff for real defects: logic errors, broken callers, unhandled edge cases the plan names, a documented behavior dropped or inverted, a sibling-skill template re-implemented instead of copied. For any task whose correctness shows only at runtime — rendering, UI, interaction, Unity↔Babylon parity — check it live in the browser (and Unity where relevant) whether or not the plan marks it `live`, and do the plan's final end-to-end check live: look at the running result, beside the reference image when there is one, and judge it as a user would; passing unit tests never substitute. Do all of a phase's live checks in one session on the already-running dev server, and re-export from Unity only if the phase changed Unity-side content. Treat an absolute count in the plan as 'named tests pass, no new failures'. [SCOPE] Return PASS/FAIL per task with evidence, listing records-only slips separately."*
316
46
 
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.
47
+ `[SCOPE]` is one of two sentences. **Standard:** *"Do not add mutation testing, fuzzing, restarts or audits of untouched files unless something you found points there; aim for about 25 tool calls and report rather than expand."* **`--strict`:** *"Be adversarial: actively look for any reason the Acceptance is NOT met, using whatever you judge worthwhile — mutation checks against the tests, randomized inputs, re-deriving values from the plan's Decisions and Design Reference, live QA of every rendered or exported surface."*
318
48
 
319
- ### Every subagent inherits auto-pilot
49
+ For a task built on a sibling skill (e.g. bt-design's 3D-Hero-Scroll), give the verifier the relevant part of that skill *(where skills load through a tool: `load_skill` + `read_skill_resource`; where they are files: the skills directory this skill was loaded from, e.g. `~/.claude/skills/`, `~/.agents/skills/` or the project's equivalent)* — its documented options (e.g. `sweep: page` really reaches the document bottom) are part of Acceptance.
320
50
 
321
- Every implementer and verifier subagent is told, verbatim, in its prompt:
51
+ **Every subagent gets a brief, not homework:** the task block(s), the plan Decisions / Design Reference entries they cite, the SPEC.md parts touched, the Agent Reference excerpts needed (with URLs), the test command, the project's agent instructions, the *Work fast* rules below, and: *"Do not fetch the Agent Reference or read SPEC.md in full — the parts you need are here, and this overrides any standing instruction to fetch it first. Fetch one sub-document only if you hit an API this brief does not cover, and say which."*
322
52
 
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.
53
+ ## Work fast
324
54
 
325
- A verifier still returns an honest PASS/FAIL with evidence. Auto-pilot never asks it to be lenient.
55
+ Writing the code is about a tenth of a run; keep the loop around it short.
326
56
 
327
- ### Prerequisites (the user's side, before going to bed)
57
+ - **Iterate narrow, confirm wide.** While getting something to work, run only that task's tests, the fastest build the repo has, and one low-resolution capture on one engine. The full test chain, full build and any wider check (second engine, full resolution, numeric parity gates) run **once**, when the phase is ready to verify. A parity gate is never loosened to pass.
58
+ - **Never sleep-poll.** No `until …; do sleep N; done`. Run long commands in the foreground with a generous timeout, or in the background and wait for the completion notice.
59
+ - **Judge visuals by looking** — screenshot the running result and compare it to what it must match. Build numeric gates only when the plan asks for them.
60
+ - **Reuse the project's tools; keep evidence light.** No one-off tools per task; no ledgers, md5 or environment records, archives or checked-in capture trees unless the plan asks. The report (and the run log) is the record.
61
+ - **Someone else's red is not your task.** A failing test that belongs to another feature and that you did not touch is logged as pre-existing and left alone.
328
62
 
329
- 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.
63
+ ## Auto-pilot (`--auto-pilot`)
330
64
 
331
- ### Exit report
65
+ An unattended run: **nobody is there to answer.** Print `🛩️ [bt-execute] Auto-pilot engaged — unattended; add a non-prompting permission mode for a fully hands-off run`. Tests, the independent verifier and "tick only on PASS" are **not** relaxed — only the stopping is. The run ends when every task in the work queue is `- [x]` or deferred; before ending, re-read the plan — an unticked, undeferred task means you are not done. A long session, a compaction, a tool error or an ambiguity is never a reason to stop; the only early exits are a missing plan file and a range whose endpoint does not exist or is reversed (a typo the user must fix — say so and end). After a compaction, re-read the plan and the run log and continue from the first unticked, undeferred task.
332
66
 
333
- 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.
67
+ - **Decide instead of asking**, in this order: the plan (Decisions, Design Reference, the task, the spec, SPEC.md) → the Agent Reference and its sub-documents → the codebase's existing patterns → what a senior Babylon Toolkit developer would ship: simplest thing that meets Acceptance, reversible over clever. Log each such decision in one line.
68
+ - **Blocked by an unfinished task:** if it was deferred this run and the fix is now apparent, re-attempt it; otherwise do the minimum of it needed to unblock, log the scope expansion; never tick a task outside the work queue.
69
+ - **Errors:** read the error, fix the cause, retry; transient ones (network, port in use, lock file, editor still compiling) → wait and retry up to 3×. **Tools down** (Unity, Blender, dev server): restart through their CLI and retry; genuinely unavailable → defer the task.
70
+ - **A subagent asks a question:** answer it yourself and relaunch. Tell every subagent: *"AUTO-PILOT: unattended run. Do not ask questions; decide from the plan, the Agent Reference and the codebase, state each assumption in one line, and always return a result."*
71
+ - **Defer, don't stall.** A task that cannot pass keeps `- [ ]` and gets ` ⏭️ DEFERRED (auto-pilot): <reason>` appended to its line; continue. A dependent that cannot proceed is deferred `blocked by T<n>`. When the queue is done, make one more pass over the deferred tasks; one that now passes loses the marker and gets its tick.
72
+ - **Safety.** Never push, force-push, deploy, spend money, or delete/overwrite anything outside the plan's scope unless the plan explicitly says so — defer that step instead. Never `git init`.
73
+ - **Checkpoints.** In a git repo, commit after each phase's boxes are ticked: `T<n>: <title> (auto-pilot)` (or `T<a>–T<b>: …`). On the default branch, first switch to `autopilot/<plan-basename>`.
74
+ - **Context.** Implement each phase in a fresh implementer subagent (it builds and tests; keep it for that phase's fix loop), so you only orchestrate: read plan → implementer → verifier → tick → commit → log. The plan's checkboxes and the run log are the only state — re-read them at each phase boundary and after a compaction.
75
+ - **Run log** — `<plan-basename>_autopilot.md` beside the plan, appended per run: start/end times and completed/total; one line per task (outcome, attempts, tests, verifier, files, commit); one line per decision; deferred tasks with what a human should look at first. Narrate the same boundaries to the console: `▶ [auto-pilot] T12/50 — <title>`, `✅ … verified`, `⏭️ … deferred — <reason>`.
76
+ - **Exit report:** tasks completed, completed/total, deferred tasks with reasons, decisions logged and the run-log path, branch and last commit, whether the plan is done. Re-running the same command resumes and re-attempts deferred tasks.