@babylonjs-toolkit/agent 1.1.6 → 1.1.8
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/package.json +1 -1
- package/skills/bt-plan/SKILL.md +26 -1
- package/skills/bt-spec/SKILL.md +31 -2
package/package.json
CHANGED
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -77,7 +77,23 @@ This skill's workflow depends on subagents. **Invoking it is the user's explicit
|
|
|
77
77
|
|
|
78
78
|
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.
|
|
79
79
|
|
|
80
|
-
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.
|
|
80
|
+
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. Use the exact fan-out / inline status strings this skill specifies for the *path-chosen* line (the progress-narration lines below carry a fixed prefix but free wording), and if you do run inline, state plainly that no subagent tool was available, never a policy.
|
|
81
|
+
|
|
82
|
+
## ⚠️ Progress narration — NEVER go silent
|
|
83
|
+
|
|
84
|
+
The user is watching a terminal, not your reasoning. Research and analysis in this skill routinely take several minutes, and **a silent span of more than about 30 seconds is indistinguishable from a hang or a crash** — users cancel runs on exactly that basis, throwing away all the work done so far. Silence is therefore a failure of this skill, not a neutral default. Narrate continuously, in short one-line status updates, from the first action to the final summary.
|
|
85
|
+
|
|
86
|
+
**Hard rules:**
|
|
87
|
+
|
|
88
|
+
1. **Announce before every long action.** Before any tool call that can take more than a few seconds — fetching the Agent Reference, reading `SPEC.md` / `DESIGN.md` / a sibling skill, launching subagents, a broad search — emit one visible line saying what you are about to do and why. Example: `🔎 [bt-plan] Reading SPEC.md and DESIGN.md to find the sections this feature must conform to …`
|
|
89
|
+
2. **Report after every result.** After each tool result, emit one line stating what you learned and what comes next, *before* the next tool call. The text between tool calls IS the progress display; a run of back-to-back tool calls with no text between them is a silent run.
|
|
90
|
+
3. **Subagents get a line each, going out and coming back.** When fanning out, print one line per subagent naming what it is investigating (`🚀 [bt-plan] Subagent 1/3 → mapping project structure, build + dependencies`). Prefer the host's background / non-blocking launch mode where it exists (Claude Code's `Agent` with `run_in_background: true`), so each completion returns control to you and you can report it: `✅ [bt-plan] Subagent 1/3 done — <one-line finding>`. Never block on all subagents in silence and then report them together.
|
|
91
|
+
4. **Waiting is also something to say.** If you are waiting on subagents with nothing else to do, say so once, naming what is still outstanding: `⏳ [bt-plan] Waiting on 2/3 research subagents (conventions to mirror, integration points) — typically 1–3 minutes …`. One line per wait, not repeated spam.
|
|
92
|
+
5. **Mark the phase transitions.** Emit a line when research starts, when it completes, and when drafting begins — e.g. `🧩 [bt-plan] Research complete — <n> findings synthesized` followed by a **3–6 bullet research summary** (the key findings, with file paths) so the user can see what the run is based on, then `✍️ [bt-plan] Drafting the document …`.
|
|
93
|
+
6. **Keep the lines short and uniform.** Format: `<emoji> [bt-plan] <what> — <detail>`. One line each. The prefix and emoji are fixed; the `<what>` / `<detail>` wording is yours. Do not dump findings, file contents, or tool output as progress — a status line says what happened, the document holds the detail.
|
|
94
|
+
7. **A silent gap may never span more than a single tool call.** If one tool call is itself long (a subagent, a large fetch), the line *preceding* it must say what it is and roughly how long it is expected to take.
|
|
95
|
+
|
|
96
|
+
This applies to every phase of this skill — the Agent Reference fetch, `SPEC.md`/`DESIGN.md` reads, the fan-out research, sibling-skill reads, interviewing, and drafting. When in doubt, say what you are doing.
|
|
81
97
|
|
|
82
98
|
## ⚠️ Required Reading Before Any Babylon Work
|
|
83
99
|
|
|
@@ -112,6 +128,13 @@ A trustworthy plan requires a thorough, read-only investigation of the codebase
|
|
|
112
128
|
|
|
113
129
|
This analysis can be **fanned out**. First check whether you actually have a subagent-spawning tool, and **emit one visible status line** so the user can see the path chosen — either `🔀 [bt-plan] subagent tool detected — fanning out analysis to N read-only subagents` or `➡️ [bt-plan] no subagent tool — analyzing sequentially`. 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; if there is none, or you are unsure, do the analysis yourself sequentially), launch up to 3 parallel **read-only** exploration subagents and divide the eight investigation points below among them (for example: one maps structure/build and dependencies; one extracts the real conventions and the closest existing feature to mirror; one lists integration points and constraints). Each subagent returns concise conclusions — findings and file paths, not file dumps — which you synthesize into the `## Codebase Analysis` section. Exploration subagents need not re-read the Agent Reference. Never call a subagent tool you do not actually have.
|
|
114
130
|
|
|
131
|
+
**Narrate the whole step** (see *Progress narration — NEVER go silent* above). This is the step that most often runs for minutes, so it is where the rule matters most. The required cadence:
|
|
132
|
+
|
|
133
|
+
- One `🚀 [bt-plan] Subagent i/N → <what it investigates>` line per subagent as it is launched, and prefer the background / non-blocking launch mode so completions return to you one at a time.
|
|
134
|
+
- One `✅ [bt-plan] Subagent i/N done — <one-line finding>` line as each returns; a `⏳ [bt-plan] Waiting on …` line if you are idle with subagents still outstanding.
|
|
135
|
+
- On the sequential path, one `🔎 [bt-plan] …` line before each read/search (each of the eight investigation points below) and one result line after it.
|
|
136
|
+
- When everything is in: `🧩 [bt-plan] Analysis complete — <n> findings synthesized`, followed by a 3–6 bullet analysis summary (key findings with file paths), before moving on to the interview (Quick Plan) or Step 2.
|
|
137
|
+
|
|
115
138
|
Before writing a single implementation step, investigate the actual codebase read-only. This is mandatory — do NOT generate any plan content until this analysis is complete. Read and search the repo to discover, not assume:
|
|
116
139
|
|
|
117
140
|
1. Read the referenced feature spec in full (from `_specs/` or the file named in `arguments`), **and read the project `SPEC.md` at the repository root in full.** SPEC.md is the source of truth for the durable architecture, systems, conventions, and decisions — the plan MUST conform to it. Note the feature spec's `spec_impact` field and its `Project Spec Alignment` section. **In Quick Plan mode there is no feature spec file** — treat the brief as the feature request, still read root `SPEC.md` in full, and *infer* the `spec_impact` and Project Spec Alignment from the analysis per the Quick Plan defaults table. If the plan you are about to write would conflict with SPEC.md (contradict a decision, cross a system boundary, break a convention), STOP and flag the conflict to the user before writing the plan; do not silently override the project spec.
|
|
@@ -127,6 +150,8 @@ If the spec or codebase is too ambiguous to analyze responsibly, stop and ask th
|
|
|
127
150
|
|
|
128
151
|
## Step 2. Write the plan
|
|
129
152
|
|
|
153
|
+
Emit `✍️ [bt-plan] Writing _specs/<feature-name>_plan.md …` before writing, and `💾 [bt-plan] Plan written — _specs/<feature-name>_plan.md` once the file is saved.
|
|
154
|
+
|
|
130
155
|
Only after Step 1 is complete, write the plan markdown to `_specs/` as `<feature-name>_plan.md`. The document MUST open with a `## Codebase Analysis` section that summarizes the findings from Step 1 (cite the real files/modules you inspected) — this is the evidence that the analysis happened. This section MUST include a short **SPEC.md alignment** note: which SPEC.md sections the plan conforms to, and whether the feature is spec-impacting (carry over the feature spec's `spec_impact`, or in Quick Plan mode the value you inferred, and say it was inferred). A plan without a grounded analysis section is invalid; do not produce one.
|
|
131
156
|
|
|
132
157
|
Then write the implementation as an ordered checklist of discrete tasks. Use GitHub-style checkboxes so progress can be tracked directly in the file — one task per line, numbered T1, T2, T3 … in dependency order, each small enough to be implemented and verified on its own:
|
package/skills/bt-spec/SKILL.md
CHANGED
|
@@ -33,7 +33,23 @@ This skill's workflow depends on subagents. **Invoking it is the user's explicit
|
|
|
33
33
|
|
|
34
34
|
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.
|
|
35
35
|
|
|
36
|
-
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.
|
|
36
|
+
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. Use the exact fan-out / inline status strings this skill specifies for the *path-chosen* line (the progress-narration lines below carry a fixed prefix but free wording), and if you do run inline, state plainly that no subagent tool was available, never a policy.
|
|
37
|
+
|
|
38
|
+
## ⚠️ Progress narration — NEVER go silent
|
|
39
|
+
|
|
40
|
+
The user is watching a terminal, not your reasoning. Research and analysis in this skill routinely take several minutes, and **a silent span of more than about 30 seconds is indistinguishable from a hang or a crash** — users cancel runs on exactly that basis, throwing away all the work done so far. Silence is therefore a failure of this skill, not a neutral default. Narrate continuously, in short one-line status updates, from the first action to the final summary.
|
|
41
|
+
|
|
42
|
+
**Hard rules:**
|
|
43
|
+
|
|
44
|
+
1. **Announce before every long action.** Before any tool call that can take more than a few seconds — fetching the Agent Reference, reading `SPEC.md` / `DESIGN.md` / a sibling skill, launching subagents, a broad search — emit one visible line saying what you are about to do and why. Example: `🔎 [bt-spec] Reading SPEC.md and DESIGN.md to find the sections this feature must conform to …`
|
|
45
|
+
2. **Report after every result.** After each tool result, emit one line stating what you learned and what comes next, *before* the next tool call. The text between tool calls IS the progress display; a run of back-to-back tool calls with no text between them is a silent run.
|
|
46
|
+
3. **Subagents get a line each, going out and coming back.** When fanning out, print one line per subagent naming what it is investigating (`🚀 [bt-spec] Subagent 1/3 → mapping project structure, build + dependencies`). Prefer the host's background / non-blocking launch mode where it exists (Claude Code's `Agent` with `run_in_background: true`), so each completion returns control to you and you can report it: `✅ [bt-spec] Subagent 1/3 done — <one-line finding>`. Never block on all subagents in silence and then report them together.
|
|
47
|
+
4. **Waiting is also something to say.** If you are waiting on subagents with nothing else to do, say so once, naming what is still outstanding: `⏳ [bt-spec] Waiting on 2/3 research subagents (conventions to mirror, integration points) — typically 1–3 minutes …`. One line per wait, not repeated spam.
|
|
48
|
+
5. **Mark the phase transitions.** Emit a line when research starts, when it completes, and when drafting begins — e.g. `🧩 [bt-spec] Research complete — <n> findings synthesized` followed by a **3–6 bullet research summary** (the key findings, with file paths) so the user can see what the run is based on, then `✍️ [bt-spec] Drafting the document …`.
|
|
49
|
+
6. **Keep the lines short and uniform.** Format: `<emoji> [bt-spec] <what> — <detail>`. One line each. The prefix and emoji are fixed; the `<what>` / `<detail>` wording is yours. Do not dump findings, file contents, or tool output as progress — a status line says what happened, the document holds the detail.
|
|
50
|
+
7. **A silent gap may never span more than a single tool call.** If one tool call is itself long (a subagent, a large fetch), the line *preceding* it must say what it is and roughly how long it is expected to take.
|
|
51
|
+
|
|
52
|
+
This applies to every phase of this skill — the Agent Reference fetch, `SPEC.md`/`DESIGN.md` reads, the fan-out research, sibling-skill reads, interviewing, and drafting. When in doubt, say what you are doing.
|
|
37
53
|
|
|
38
54
|
## ⚠️ Required Reading Before Any Babylon Work
|
|
39
55
|
|
|
@@ -137,6 +153,17 @@ this feature must conform to; one finds the closest existing feature and extract
|
|
|
137
153
|
mirror; one lists integration points, constraints, and existing dependencies. Each returns concise
|
|
138
154
|
conclusions — findings and file paths, not file dumps — which you synthesize yourself.
|
|
139
155
|
|
|
156
|
+
**Narrate the whole step** (see *Progress narration — NEVER go silent* above). This is the step that most
|
|
157
|
+
often runs for minutes, so it is where the rule matters most. The required cadence:
|
|
158
|
+
|
|
159
|
+
- One `🚀 [bt-spec] Subagent i/N → <what it investigates>` line per subagent as it is launched, and prefer
|
|
160
|
+
the background / non-blocking launch mode so completions return to you one at a time.
|
|
161
|
+
- One `✅ [bt-spec] Subagent i/N done — <one-line finding>` line as each returns; a `⏳ [bt-spec] Waiting on
|
|
162
|
+
…` line if you are idle with subagents still outstanding.
|
|
163
|
+
- On the sequential path, one `🔎 [bt-spec] …` line before each read/search and one result line after it.
|
|
164
|
+
- When everything is in: `🧩 [bt-spec] Research complete — <n> findings synthesized`, followed by a 3–6
|
|
165
|
+
bullet research summary (key findings with file paths), before moving on to Step 2.5.
|
|
166
|
+
|
|
140
167
|
Two hard rules, because this skill is planning-only: every subagent is **read-only** (it may read,
|
|
141
168
|
search and report; it may NOT edit files, write files, or run build/test/shell commands), and **you**
|
|
142
169
|
write the spec — a subagent never drafts spec content. Research subagents need not re-read the Agent
|
|
@@ -186,7 +213,7 @@ Run this **after Step 2.4**, so every question is grounded in the real codebase
|
|
|
186
213
|
The rules that make that loop work:
|
|
187
214
|
|
|
188
215
|
1. **One question at a time.** Use `AskUserQuestion` where you have it, with your recommended answer as the FIRST option, labelled `(Recommended)`. Never batch a wall of questions, and never move on past a question the user has not answered.
|
|
189
|
-
2. **Explore before you ask.** If the answer is discoverable in the repo — an existing convention, how the closest prior feature did it, a dependency already present — go find it and offer what you found as the recommendation, rather than spending a question on it. Reuse the Step 2.4 findings first; a read-only subagent is the right tool only when the search is genuinely broad.
|
|
216
|
+
2. **Explore before you ask.** If the answer is discoverable in the repo — an existing convention, how the closest prior feature did it, a dependency already present — go find it and offer what you found as the recommendation, rather than spending a question on it. Reuse the Step 2.4 findings first; a read-only subagent is the right tool only when the search is genuinely broad. Say so while you do it — `🔎 [bt-spec] Checking the codebase for <X> before asking …` — so a pause between questions never reads as the interview having stalled.
|
|
190
217
|
3. **Depth-first down the design tree.** Resolve a branch's dependencies before opening the next branch — a decision that invalidates three later questions must be asked *before* them. Name the branch you are on, so the user can see the shape of what remains.
|
|
191
218
|
4. **Never ask what is already settled.** The brief, `SPEC.md`, `DESIGN.md`, and a named sibling skill's documented defaults are answers, not questions. Confirm one of them in a single line only where this feature would plausibly override it.
|
|
192
219
|
5. **Record as you go.** Write every answer into the spec body — as a requirement, an acceptance criterion, or an edge case — *plus* a `## Decisions` entry carrying the *why* and the rejected alternative. An answer that exists only in this transcript is gone the moment the plan phase opens a fresh context.
|
|
@@ -207,6 +234,8 @@ and execute phases have a stable name to refer to regardless of host.
|
|
|
207
234
|
|
|
208
235
|
## Step 4. Draft the spec content
|
|
209
236
|
|
|
237
|
+
Emit `✍️ [bt-spec] Drafting _specs/<feature_slug>_spec.md …` before writing, and `💾 [bt-spec] Spec written — _specs/<feature_slug>_spec.md` once the file is saved.
|
|
238
|
+
|
|
210
239
|
Create a markdown spec document that Plan mode can use directly and save it in the _specs folder as `<feature_slug>_spec.md`. Use the exact structure as defined in the feature spec template file @FEATURE.md located at the project root. **If that project template predates grill mode and has no `## Decisions` section, append one anyway whenever `grill_me` is true** (using the shape in the fallback template below, placed directly before `## Open Questions`) — the rationale must be recorded regardless of which template the project ships. The template includes a required `spec_impact` header field and a `Project Spec Alignment` section — fill both in from your SPEC.md read above (cite the SPEC.md sections the feature relies on, describe how it fits the architecture, and for `spec_impact: yes` state exactly what will change in SPEC.md and in which section). Do not add technical implementation details such as code examples. If the feature spec template file is missing, create a new feature spec file with the following sections:
|
|
211
240
|
```
|
|
212
241
|
# Feature Spec Template
|