@babylonjs-toolkit/agent 1.1.69 → 1.1.77
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 +4 -4
- package/package.json +1 -1
- package/skills/bt-execute/SKILL.md +1 -1
- package/skills/bt-execute/templates/dashboard/dashboard.html +270 -2
- package/skills/bt-execute/templates/dashboard/data-schema.md +4 -4
- package/skills/bt-hero/SKILL.md +1 -1
- package/skills/bt-plan/SKILL.md +5 -5
- package/skills/bt-profile/SKILL.md +1 -0
- package/skills/bt-recon/SKILL.md +1 -1
- package/skills/bt-spec/SKILL.md +18 -7
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Babylon Toolkit Desktop Agent (1.1.
|
|
1
|
+
# Babylon Toolkit Desktop Agent (1.1.77)
|
|
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
|
|
|
@@ -268,7 +268,7 @@ pair or schedule the bridge.
|
|
|
268
268
|
|
|
269
269
|
| Skill | Command | What it does |
|
|
270
270
|
|-------|---------|--------------|
|
|
271
|
-
| [`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. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
271
|
+
| [`bt-spec`](skills/bt-spec/SKILL.md) | `/bt-spec` | Turn a short idea into a feature spec file on a new git branch, plus the feature's dashboard with the `bt-plan` commands to copy. Add `--grill-me` to be interviewed first, `--parity` to allow numeric parity bars in the acceptance criteria. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
272
272
|
| [`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. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
273
273
|
| [`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, `--strict` for an adversarial verifier on every task, and `--verbose` for an in-depth write-up of every task and the After Action Report on the dashboard. Runs in `TIME MATTERS` mode by default; `--no-time-limit` turns it off. |
|
|
274
274
|
| [`bt-recon`](skills/bt-recon/SKILL.md) | `/bt-recon` | Deep-dive existing code — a subsystem named in a brief, or the whole codebase — and write an evidence-cited technical grounding spec (`.agents/recon/<slug>_recon.md`) plus, when it has UI, a plain-language user guide (`.agents/recon/<slug>_guide.md`). Built for taking over undocumented code; `bt-spec` and `bt-plan` read the recon as grounding. Includes an observe-only live pass when the brief gives a URL; `--refresh` updates a recon after code changes. |
|
|
@@ -324,14 +324,14 @@ storyboard, plus before/after sliders and stills where those prove the point. Wh
|
|
|
324
324
|
revises an earlier result, the earlier entry is marked **Updated** with who changed it and why —
|
|
325
325
|
nothing is rewritten silently.
|
|
326
326
|
|
|
327
|
-
The top of the page follows the
|
|
327
|
+
The top of the page follows the feature. bt-spec creates the dashboard with the spec, and until there is a plan it shows **Plan this feature** — the `bt-plan` commands to copy (a standard plan, `--heavy`, `--parity`, `--no-time-limit`) and a builder for those options plus a brief; bt-plan then fills in the phases and tasks (a Quick Plan, with no spec, creates the dashboard there). Before the first run it shows **Start this plan** — ready-made `bt-execute` commands with copy buttons (every task unattended, every task with you on hand, one phase, the first task, fully written up) and a builder for any task range with `--auto-pilot`, `--strict`, `--verbose` or `--no-time-limit`; a paused plan shows the same as **Continue this plan**. While a run is going it shows **Current run activity** — the *Now*
|
|
328
328
|
banner and the milestones so far. Once the run is over, that slot becomes the **After Action Report**
|
|
329
329
|
(marked *Interim* if the plan is not finished yet), and the milestone history folds into the Milestone
|
|
330
330
|
activity logs at the bottom. The After Action Report is the whole plan's execution summarized — what
|
|
331
331
|
was built, how it was proven, what surprised, the run's figures — around **one before/after for the
|
|
332
332
|
plan as a whole**, taken from the same camera before the first task and after the last — and a
|
|
333
333
|
**Testing and verification** section: each test suite's final result from one last full run, what is
|
|
334
|
-
not covered, and every task's tests, test cases, live check and verifier result. Recon docs
|
|
334
|
+
not covered, and every task's tests, test cases, live check and verifier result. Every project keeps four default `.agents` folders, created together the first time any of them is needed and kept with a `.gitkeep` even while empty: `archive/` (move finished or shelved feature folders here — a feature missing from `specs/` is never treated as an error, and a new slug never reuses an archived one), `profile/`, `recon/` and `specs/`. Recon docs
|
|
335
335
|
stay in `.agents/recon/`; older flat specs and plans in `.agents/specs/` keep working where they are.
|
|
336
336
|
|
|
337
337
|
Add `--verbose` to `bt-execute` for a fully written-up dashboard: every task card gains its approach
|
package/package.json
CHANGED
|
@@ -96,7 +96,7 @@ Every feature lives in one folder, created by bt-spec (or by bt-plan for a Quick
|
|
|
96
96
|
|
|
97
97
|
On top of the per-task updates:
|
|
98
98
|
|
|
99
|
-
- **Run start — the first thing the run does** (*Open the run before anything else*): **refresh `dashboard.html`** — copy it again from the template with `{{slug}}` replaced (it is never edited, so this is always safe, and it is how layout fixes reach dashboards created by older versions); then **sync the dashboard with the plan file** — re-read its checklist and add any phase or task (including sub-tasks like `T3.1`) the dashboard lacks, in plan order, as `pending`, with an `updates` note on it (`Added to the plan after <the plan was complete / phase 2 ran> — <why, if the plan says>`); a task the plan no longer has is removed with an `activity` line saying so. Then `status: "in-progress"`, `runs` + 1, the run-log document link, an `activity` line, the first live-file write, and the watchdog launched in the background. In a git repository, check `.gitignore` has `.agents/specs/*/documents/*_live.js` and append it once if not — the live file is never staged or committed; `<slug>_dashboard.js` and `snapshots/` are.
|
|
99
|
+
- **Run start — the first thing the run does** (*Open the run before anything else*): make sure the default `.agents` folders exist — `.agents/archive/`, `.agents/profile/`, `.agents/recon/` and `.agents/specs/`, each with an empty `.gitkeep` (write only the ones missing); **refresh `dashboard.html`** — copy it again from the template with `{{slug}}` replaced (it is never edited, so this is always safe, and it is how layout fixes reach dashboards created by older versions); then **sync the dashboard with the plan file** — re-read its checklist and add any phase or task (including sub-tasks like `T3.1`) the dashboard lacks, in plan order, as `pending`, with an `updates` note on it (`Added to the plan after <the plan was complete / phase 2 ran> — <why, if the plan says>`); a task the plan no longer has is removed with an `activity` line saying so. Then `status: "in-progress"`, `runs` + 1, the run-log document link, an `activity` line, the first live-file write, and the watchdog launched in the background. In a git repository, check `.gitignore` has `.agents/specs/*/documents/*_live.js` and append it once if not — the live file is never staged or committed; `<slug>_dashboard.js` and `snapshots/` are.
|
|
100
100
|
- **Each phase, after its ticks and before its commit:** the phase's status, times and minutes (from its `⏱` line), its verifier result and a two-or-three-sentence summary of what it delivered; the phase-level snapshots (a progression spanning several tasks — below); `decisions`; `activeTime` — the plan's total across **every run so far** (each finished run's `active` from its `⏱ Run <n> end` line, plus this run's so far), never this run alone; an `activity` line; and a current "so far" `outcome` headline.
|
|
101
101
|
- **A deferral:** the task's `status: "deferred"` and `deferredReason`, an `activity` line.
|
|
102
102
|
- **Run end — the After Action Report.** **decide the status by re-reading the plan file's checkboxes, never from memory:** `complete` when every task in the plan is `- [x]`; `incomplete` when every task is either ticked or marked ⏭️ DEFERRED; otherwise `paused` (the run covered only a slice, or tasks were added). The page refuses a `complete` it can see is false — it shows the plan as paused with a warning — but the plan file is the authority; never leave `in-progress` behind, because the status picks the page's top slot: `in-progress` shows *Current run activity* (the live file and the milestones), any other run-ended status shows the After Action Report in its place. Write `followUps` for a human, and `afterAction` — the whole plan's execution, start to finish: a one-sentence headline of what the plan delivered; two to four paragraphs on what was built, how it was proven and what surprised; highlights; and **one before/after for the plan as a whole** (`comparison`) — the plan-wide "before" frame beside a final "after" taken now from the same camera or viewport (the end-to-end check's session supplies it). Add the plan's key progression to `afterAction.snapshots` if one tells the story better than any single phase. Write `afterAction.testing` on every run, not only `--verbose`: run every test suite the plan touched **once more, in full, at run end** and record each as a `suites` entry (name, command, passed, failed, how many tests this plan added, and a `note` for any failure that pre-dates the plan) — never add up the tasks' counts, which re-count the same suite once per task; a `summary` of how the plan was tested (unit tests, the verifier's re-runs, what was checked live and on what, the end-to-end check); and `gaps` — what no test or live check covers. The page builds the task-by-task table and the list of test cases from the tasks. The figures (tasks, tests, retries, time) are computed by the page — never type them in. A run that ends before the plan is finished writes it too; the page marks it *Interim* while `paused`, and the next run revises it with an `updates` entry. **A reopened plan** (tasks added after it was complete) works the same way: the run that finishes the added tasks rewrites the After Action Report to cover them, notes the change in its `updates` (`Revised — T7 added after completion: <why>`), and retakes the plan-wide "after" from the same camera so the comparison shows the plan as it now stands.
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
.status-done, .status-complete { color: var(--done); background: var(--done-soft); }
|
|
188
188
|
.status-in-progress { color: var(--active); background: var(--active-soft); }
|
|
189
189
|
.status-in-progress::before { animation: pulse 1.6s ease-in-out infinite; }
|
|
190
|
-
.status-pending, .status-planned, .status-paused { color: var(--pending); background: var(--pending-soft); }
|
|
190
|
+
.status-pending, .status-specified, .status-planned, .status-paused { color: var(--pending); background: var(--pending-soft); }
|
|
191
191
|
.status-deferred, .status-partial, .status-incomplete { color: var(--deferred); background: var(--deferred-soft); }
|
|
192
192
|
.status-failed { color: var(--failed); background: var(--failed-soft); }
|
|
193
193
|
.status-built, .status-verifying { color: var(--accent); background: var(--accent-soft); }
|
|
@@ -651,6 +651,37 @@
|
|
|
651
651
|
font-size: 13.5px;
|
|
652
652
|
}
|
|
653
653
|
|
|
654
|
+
/* ---------- Run commands ---------- */
|
|
655
|
+
.run-card { padding: 6px 22px 20px; }
|
|
656
|
+
.run-list { display: grid; grid-template-columns: minmax(0, 1fr); }
|
|
657
|
+
.run-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px 20px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
|
|
658
|
+
.run-what { display: grid; gap: 2px; min-width: 0; }
|
|
659
|
+
.run-what strong { font-size: 14.5px; }
|
|
660
|
+
.run-what span { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
|
|
661
|
+
.run-copy { display: flex; gap: 8px; align-items: center; min-width: 0; }
|
|
662
|
+
.run-command { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--bg-sunken); font: 600 12.5px/1.45 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
|
|
663
|
+
.copy-command { flex: none; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--text-muted); font: 600 11.5px/1 var(--font-mono); cursor: pointer; }
|
|
664
|
+
.copy-command:hover { color: var(--text); border-color: var(--accent); }
|
|
665
|
+
.copy-command.is-copied { color: var(--done); border-color: var(--done); }
|
|
666
|
+
.run-builder { margin-top: 16px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
|
|
667
|
+
.run-builder-title { font: 700 11px/1.4 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
|
|
668
|
+
/* The task picker and the options share one line, the options centred in the room beside it. A select is as
|
|
669
|
+
wide as its longest option (a long task title), so it gets a set width instead and can never push them down. */
|
|
670
|
+
.run-controls { display: flex; flex-wrap: nowrap; gap: 12px 20px; align-items: center; }
|
|
671
|
+
.run-field { flex: 0 1 auto; display: flex; gap: 8px; align-items: center; min-width: 0; font-size: 13px; color: var(--text-muted); }
|
|
672
|
+
.run-field select { flex: 0 1 460px; width: 460px; min-width: 140px; max-width: 100%; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--bg-sunken); color: var(--text); font: 13px/1.3 var(--font-sans, inherit); text-overflow: ellipsis; }
|
|
673
|
+
.run-field input[type="text"] { flex: 0 1 460px; width: 460px; min-width: 140px; max-width: 100%; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-small); background: var(--bg-sunken); color: var(--text); font: 13px/1.3 var(--font-sans, inherit); }
|
|
674
|
+
.run-field input[type="text"]::placeholder { color: var(--text-faint); }
|
|
675
|
+
.run-flags { flex: none; margin: 0 auto; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 8px 16px; white-space: nowrap; }
|
|
676
|
+
.run-flag { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }
|
|
677
|
+
.run-flag input { accent-color: var(--accent); }
|
|
678
|
+
@media (max-width: 760px) {
|
|
679
|
+
.run-row { grid-template-columns: minmax(0, 1fr); }
|
|
680
|
+
.run-controls { flex-wrap: wrap; }
|
|
681
|
+
.run-field { flex-basis: 100%; }
|
|
682
|
+
.run-flags { flex: 1 1 100%; min-width: 0; margin: 0; flex-wrap: wrap; justify-content: flex-start; white-space: normal; }
|
|
683
|
+
}
|
|
684
|
+
|
|
654
685
|
/* ---------- Verbose task details and After Action Report sections ---------- */
|
|
655
686
|
.task-details { display: grid; gap: 16px; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
|
|
656
687
|
.detail-block h4, .aar-section h4 { margin: 0 0 8px; }
|
|
@@ -823,6 +854,22 @@
|
|
|
823
854
|
const VERDICT_BADGE_MAX_LENGTH = 16;
|
|
824
855
|
// The report's task-by-task testing table starts open for a short plan and folded for a long one.
|
|
825
856
|
const TESTING_TABLE_OPEN_ROWS = 12;
|
|
857
|
+
/** The bt-execute options the page offers, in the order the command line takes them. */
|
|
858
|
+
const RUN_OPTIONS = [
|
|
859
|
+
{ key: 'autoPilot', flag: '--auto-pilot', label: 'Auto-pilot', hint: 'Unattended: never stops to ask; retries, then defers a task that keeps failing' },
|
|
860
|
+
{ key: 'strict', flag: '--strict', label: 'Strict', hint: 'An adversarial verifier on every task' },
|
|
861
|
+
{ key: 'verbose', flag: '--verbose', label: 'Verbose', hint: 'Every task and the After Action Report written up in depth' },
|
|
862
|
+
{ key: 'noTimeLimit', flag: '--no-time-limit', label: 'No time limit', hint: 'Turns off the default TIME MATTERS mode' },
|
|
863
|
+
];
|
|
864
|
+
// "Build your own" keeps its choices when the page refreshes its data.
|
|
865
|
+
const runChoice = { tasks: 'ALL', autoPilot: true, strict: false, verbose: false, noTimeLimit: false };
|
|
866
|
+
/** The bt-plan options the page offers, in the order the command line takes them. */
|
|
867
|
+
const PLAN_OPTIONS = [
|
|
868
|
+
{ key: 'heavy', flag: '--heavy', label: 'Heavy', hint: 'Decision-complete: Decisions log, Design Reference, self-contained tasks — for long runs or a cheaper executing model' },
|
|
869
|
+
{ key: 'parity', flag: '--parity', label: 'Parity', hint: 'Numeric parity gates against the reference instead of functional proof (slow)' },
|
|
870
|
+
{ key: 'noTimeLimit', flag: '--no-time-limit', label: 'No time limit', hint: 'Turns off the default TIME MATTERS mode' },
|
|
871
|
+
];
|
|
872
|
+
const planChoice = { heavy: false, parity: false, noTimeLimit: false, brief: '' };
|
|
826
873
|
// A verifier result that names a live check: "live two-tab race in headless Chrome", "end-to-end on WebGPU".
|
|
827
874
|
const LIVE_CHECK_WORDS = /\blive\b|chrome|browser|webgl|webgpu|unity editor|play ?mode/i;
|
|
828
875
|
/** Where the Babylon Toolkit Desktop Agent, whose skills generate this dashboard, is published. */
|
|
@@ -832,6 +879,7 @@
|
|
|
832
879
|
/** How many of the current task's latest steps the Now banner lists. */
|
|
833
880
|
const NOW_STEP_COUNT = 6;
|
|
834
881
|
const STATUS_LABELS = {
|
|
882
|
+
specified: 'Specified — ready to plan',
|
|
835
883
|
planned: 'Planned',
|
|
836
884
|
'in-progress': 'In progress',
|
|
837
885
|
complete: 'Complete',
|
|
@@ -865,6 +913,7 @@
|
|
|
865
913
|
try {
|
|
866
914
|
render();
|
|
867
915
|
wireLightbox();
|
|
916
|
+
wireRunCommands();
|
|
868
917
|
} catch (error) {
|
|
869
918
|
// A malformed field must never leave a blank page: say what broke, and keep checking for a repaired file.
|
|
870
919
|
console.error('Dashboard render failed', error);
|
|
@@ -893,6 +942,8 @@
|
|
|
893
942
|
'<main class="page">',
|
|
894
943
|
renderStats(allTasks, doneCount),
|
|
895
944
|
view === 'running' ? renderCurrentActivity(allTasks) : '',
|
|
945
|
+
view === 'specified' ? renderPlanCommands() : '',
|
|
946
|
+
showsRunCommands(view) ? renderRunCommands(allTasks, view) : '',
|
|
896
947
|
view === 'finished' ? renderAfterAction(allTasks, doneCount) : '',
|
|
897
948
|
renderPhases(),
|
|
898
949
|
renderDecisions(),
|
|
@@ -946,6 +997,8 @@
|
|
|
946
997
|
function renderNav(updateCount, view) {
|
|
947
998
|
const links = [
|
|
948
999
|
view === 'running' ? ['current-activity', 'Current run'] : null,
|
|
1000
|
+
view === 'specified' ? ['plan-commands', 'Plan'] : null,
|
|
1001
|
+
showsRunCommands(view) ? ['run-commands', view === 'planned' ? 'Start' : 'Continue'] : null,
|
|
949
1002
|
view === 'finished' ? ['after-action', 'Summary'] : null,
|
|
950
1003
|
['phases', 'Phases'],
|
|
951
1004
|
['decisions', 'Decisions'],
|
|
@@ -969,6 +1022,19 @@
|
|
|
969
1022
|
const activeTime = shortDuration(report.activeTime);
|
|
970
1023
|
const estimate = shortEstimate(report.estimate);
|
|
971
1024
|
|
|
1025
|
+
if (!allTasks.length) {
|
|
1026
|
+
const before = 'written by bt-plan';
|
|
1027
|
+
const tilesBeforePlan = [
|
|
1028
|
+
statTile('Tasks', '—', before),
|
|
1029
|
+
statTile('Phases', '—', before),
|
|
1030
|
+
statTile('Tests', '—', 'none yet'),
|
|
1031
|
+
statTile('Active time', '—', report.estimate ? `of ${escapeHtml(report.estimate)} estimated` : 'estimated by bt-plan'),
|
|
1032
|
+
statTile('Deferred', '0', 'nothing deferred'),
|
|
1033
|
+
statTile('Runs', String(report.runs || 0), 'bt-execute runs so far'),
|
|
1034
|
+
].join('');
|
|
1035
|
+
return `<div class="stats">${tilesBeforePlan}</div>`;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
972
1038
|
const tiles = [
|
|
973
1039
|
statTile('Tasks', `${doneCount}<small> / ${allTasks.length}</small>`, 'verified and ticked'),
|
|
974
1040
|
statTile('Phases', `${donePhases}<small> / ${phases.length}</small>`, 'independently verified'),
|
|
@@ -1105,7 +1171,7 @@
|
|
|
1105
1171
|
const phases = report.phases || [];
|
|
1106
1172
|
const content = phases.length
|
|
1107
1173
|
? phases.map(renderPhase).join('')
|
|
1108
|
-
:
|
|
1174
|
+
: `<div class="empty">${pageView() === 'specified' ? 'bt-plan writes the phases and tasks here — plan this feature with a command above.' : 'No phases recorded yet.'}</div>`;
|
|
1109
1175
|
return `
|
|
1110
1176
|
<section id="phases">
|
|
1111
1177
|
<div class="section-head"><h2>Execution phases</h2><span class="section-note">Each phase is checked by an independent verifier</span></div>
|
|
@@ -1610,6 +1676,7 @@
|
|
|
1610
1676
|
const status = effectiveStatus();
|
|
1611
1677
|
if (status === 'in-progress') return 'running';
|
|
1612
1678
|
if (['paused', 'complete', 'incomplete'].includes(status)) return 'finished';
|
|
1679
|
+
if (status === 'specified') return 'specified';
|
|
1613
1680
|
return 'planned';
|
|
1614
1681
|
}
|
|
1615
1682
|
|
|
@@ -1735,6 +1802,205 @@
|
|
|
1735
1802
|
|
|
1736
1803
|
/* ===================== Data helpers ===================== */
|
|
1737
1804
|
|
|
1805
|
+
/* ===================== Run commands ===================== */
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
/** The spec as bt-plan takes it, from the project root: `@.agents/specs/<slug>/documents/<slug>_spec.md`. */
|
|
1809
|
+
function specReference() {
|
|
1810
|
+
const slug = (report.feature && report.feature.slug) || '';
|
|
1811
|
+
const spec = (report.documents || []).find((document) => /spec/i.test(document.label || '') && document.path);
|
|
1812
|
+
const relativePath = spec ? String(spec.path).replace(/^\.?\//, '') : `documents/${slug}_spec.md`;
|
|
1813
|
+
// A legacy flat spec is linked as `../<slug>_spec.md`; fold the `..` into the path.
|
|
1814
|
+
const parts = [];
|
|
1815
|
+
for (const part of `.agents/specs/${slug}/${relativePath}`.split('/')) {
|
|
1816
|
+
if (part === '..') parts.pop();
|
|
1817
|
+
else if (part && part !== '.') parts.push(part);
|
|
1818
|
+
}
|
|
1819
|
+
return `@${parts.join('/')}`;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
function planCommand(flags, brief = '') {
|
|
1823
|
+
const note = String(brief || '').trim().replace(/"/g, "'");
|
|
1824
|
+
return ['/bt-plan', ...flags, specReference(), note ? `"${note}"` : ''].filter(Boolean).join(' ');
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
function builtPlanCommand() {
|
|
1828
|
+
return planCommand(PLAN_OPTIONS.filter((option) => planChoice[option.key]).map((option) => option.flag), planChoice.brief);
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
/** Before a plan exists: the bt-plan commands that turn this spec into one. */
|
|
1832
|
+
function renderPlanCommands() {
|
|
1833
|
+
const parityByDefault = String((report.feature && report.feature.proof) || '').toLowerCase() === 'parity';
|
|
1834
|
+
const presets = [
|
|
1835
|
+
['A standard plan', 'Ordered tasks with named tests, phases and a time estimate — the usual choice', planCommand([])],
|
|
1836
|
+
['A heavy plan', 'Decision-complete: a Decisions log, a Design Reference and self-contained tasks — for a long run, fresh contexts or a cheaper model executing it', planCommand(['--heavy'])],
|
|
1837
|
+
parityByDefault
|
|
1838
|
+
? ['A heavy plan with parity gates', 'This spec sets `proof: parity`, so every plan gets numeric parity gates — this one is decision-complete as well', planCommand(['--heavy', '--parity'])]
|
|
1839
|
+
: ['With numeric parity gates', 'Pixel thresholds and repeats against the reference instead of the default functional proof — slow', planCommand(['--parity'])],
|
|
1840
|
+
['No time limit', 'Turns off TIME MATTERS, so the research can take as long as it needs', planCommand(['--no-time-limit'])],
|
|
1841
|
+
];
|
|
1842
|
+
const rows = presets.map(([what, detail, command]) => `
|
|
1843
|
+
<div class="run-row">
|
|
1844
|
+
<div class="run-what"><strong>${escapeHtml(what)}</strong><span>${formatInline(detail)}</span></div>
|
|
1845
|
+
${copyableCommand(command)}
|
|
1846
|
+
</div>`).join('');
|
|
1847
|
+
return `
|
|
1848
|
+
<section id="plan-commands">
|
|
1849
|
+
<div class="section-head"><h2>Plan this feature</h2><span class="section-note">Copy a command into your agent — bt-plan writes the plan and fills in this dashboard</span></div>
|
|
1850
|
+
<div class="card run-card">
|
|
1851
|
+
<div class="run-list">${rows}</div>
|
|
1852
|
+
<div class="run-builder">
|
|
1853
|
+
<div class="run-builder-title">Build your own</div>
|
|
1854
|
+
<div class="run-controls">
|
|
1855
|
+
<label class="run-field"><span>Brief</span>
|
|
1856
|
+
<input type="text" data-plan-choice="brief" value="${escapeAttribute(planChoice.brief)}" placeholder="Optional notes for the planner, e.g. mind the physics layer">
|
|
1857
|
+
</label>
|
|
1858
|
+
<div class="run-flags">${PLAN_OPTIONS.map((option) => `
|
|
1859
|
+
<label class="run-flag" title="${escapeAttribute(option.hint)}"><input type="checkbox" data-plan-choice="${option.key}"${planChoice[option.key] ? ' checked' : ''}> ${escapeHtml(option.label)}</label>`).join('')}
|
|
1860
|
+
</div>
|
|
1861
|
+
</div>
|
|
1862
|
+
<div class="run-built">${copyableCommand(builtPlanCommand(), 'built-plan-command')}</div>
|
|
1863
|
+
</div>
|
|
1864
|
+
</div>
|
|
1865
|
+
</section>`;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
/** The commands show while there is work to start: a plan not yet run, or one paused part way. */
|
|
1869
|
+
function showsRunCommands(view) {
|
|
1870
|
+
return view === 'planned' || effectiveStatus() === 'paused';
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
/** The plan as bt-execute takes it, from the project root: `@.agents/specs/<slug>/documents/<slug>_plan.md`. */
|
|
1874
|
+
function planReference() {
|
|
1875
|
+
const slug = (report.feature && report.feature.slug) || '';
|
|
1876
|
+
const plan = (report.documents || []).find((document) => /plan/i.test(document.label || '') && document.path);
|
|
1877
|
+
const relativePath = plan ? String(plan.path).replace(/^\.?\//, '') : `documents/${slug}_plan.md`;
|
|
1878
|
+
return `@.agents/specs/${slug}/${relativePath}`;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
function runCommand(flags, tasks) {
|
|
1882
|
+
return ['/bt-execute', ...flags, planReference(), tasks].filter(Boolean).join(' ');
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/** A phase as a task range in plan order (`T4-T7`, or `T4` alone); ticked tasks inside it are skipped by bt-execute. */
|
|
1886
|
+
function phaseRange(phase) {
|
|
1887
|
+
const ids = (phase.tasks || []).map((task) => task.id).filter(Boolean);
|
|
1888
|
+
if (!ids.length) return '';
|
|
1889
|
+
return ids.length === 1 ? ids[0] : `${ids[0]}-${ids[ids.length - 1]}`;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
function renderRunCommands(allTasks, view) {
|
|
1893
|
+
const starting = view === 'planned';
|
|
1894
|
+
const phases = (report.phases || []).filter((phase) => phaseRange(phase));
|
|
1895
|
+
const remaining = allTasks.filter((task) => task.status !== 'done' && task.status !== 'deferred');
|
|
1896
|
+
const nextTask = remaining[0];
|
|
1897
|
+
const nextPhase = phases.find((phase) => (phase.tasks || []).some((task) => task.status !== 'done' && task.status !== 'deferred'));
|
|
1898
|
+
const firstTask = allTasks[0];
|
|
1899
|
+
const phaseLabel = (phase) => `Phase ${phase.number} — ${phase.name || ''}`;
|
|
1900
|
+
|
|
1901
|
+
const presets = starting
|
|
1902
|
+
? [
|
|
1903
|
+
['Every task, unattended', 'Auto-pilot builds, verifies and commits each task in turn without stopping to ask', runCommand(['--auto-pilot'], 'ALL')],
|
|
1904
|
+
['Every task, with you on hand', 'Runs them all, and stops when it needs your decision', runCommand([], 'ALL')],
|
|
1905
|
+
nextPhase ? [`${phaseLabel(nextPhase)} only`, `Tasks ${phaseRange(nextPhase)}`, runCommand([], phaseRange(nextPhase))] : null,
|
|
1906
|
+
firstTask ? [`The first task only — ${firstTask.id}`, firstTask.title || '', runCommand([], firstTask.id)] : null,
|
|
1907
|
+
['Every task, fully written up', 'Auto-pilot with --verbose: every task and the After Action Report documented in depth', runCommand(['--auto-pilot', '--verbose'], 'ALL')],
|
|
1908
|
+
]
|
|
1909
|
+
: [
|
|
1910
|
+
['Every remaining task, unattended', `${remaining.length} task${remaining.length === 1 ? '' : 's'} left, finished without stopping to ask`, runCommand(['--auto-pilot'], 'ALL')],
|
|
1911
|
+
nextTask ? [`The next task only — ${nextTask.id}`, nextTask.title || '', runCommand([], 'NEXT')] : null,
|
|
1912
|
+
remaining.length > 2 ? ['The next three tasks', remaining.slice(0, 3).map((task) => task.id).join(', '), runCommand([], 'NEXT:3')] : null,
|
|
1913
|
+
nextPhase ? [`Finish ${phaseLabel(nextPhase)}`, `Tasks ${phaseRange(nextPhase)}; the ticked ones are skipped`, runCommand([], phaseRange(nextPhase))] : null,
|
|
1914
|
+
];
|
|
1915
|
+
|
|
1916
|
+
const taskChoices = [
|
|
1917
|
+
['ALL', 'All remaining tasks'],
|
|
1918
|
+
['NEXT', 'The next unchecked task'],
|
|
1919
|
+
['NEXT:3', 'The next three tasks'],
|
|
1920
|
+
...phases.map((phase) => [phaseRange(phase), `${phaseLabel(phase)} (${phaseRange(phase)})`]),
|
|
1921
|
+
...(starting ? allTasks : remaining).filter((task) => task.id).map((task) => [task.id, `${task.id} — ${task.title || ''}`]),
|
|
1922
|
+
];
|
|
1923
|
+
if (!taskChoices.some(([value]) => value === runChoice.tasks)) runChoice.tasks = 'ALL';
|
|
1924
|
+
|
|
1925
|
+
const rows = presets.filter(Boolean).map(([what, detail, command]) => `
|
|
1926
|
+
<div class="run-row">
|
|
1927
|
+
<div class="run-what"><strong>${escapeHtml(what)}</strong>${detail ? `<span>${formatInline(detail)}</span>` : ''}</div>
|
|
1928
|
+
${copyableCommand(command)}
|
|
1929
|
+
</div>`).join('');
|
|
1930
|
+
|
|
1931
|
+
return `
|
|
1932
|
+
<section id="run-commands">
|
|
1933
|
+
<div class="section-head"><h2>${starting ? 'Start this plan' : 'Continue this plan'}</h2><span class="section-note">Copy a command into your agent — ticked tasks are always skipped, so any of these is safe to run again</span></div>
|
|
1934
|
+
<div class="card run-card">
|
|
1935
|
+
<div class="run-list">${rows}</div>
|
|
1936
|
+
<div class="run-builder">
|
|
1937
|
+
<div class="run-builder-title">Build your own</div>
|
|
1938
|
+
<div class="run-controls">
|
|
1939
|
+
<label class="run-field"><span>Tasks</span>
|
|
1940
|
+
<select data-run-choice="tasks">${taskChoices.map(([value, label]) => `<option value="${escapeAttribute(value)}"${value === runChoice.tasks ? ' selected' : ''}>${escapeHtml(label)}</option>`).join('')}</select>
|
|
1941
|
+
</label>
|
|
1942
|
+
<div class="run-flags">${RUN_OPTIONS.map((option) => `
|
|
1943
|
+
<label class="run-flag" title="${escapeAttribute(option.hint)}"><input type="checkbox" data-run-choice="${option.key}"${runChoice[option.key] ? ' checked' : ''}> ${escapeHtml(option.label)}</label>`).join('')}
|
|
1944
|
+
</div>
|
|
1945
|
+
</div>
|
|
1946
|
+
<div class="run-built">${copyableCommand(builtCommand(), 'built-command')}</div>
|
|
1947
|
+
</div>
|
|
1948
|
+
</div>
|
|
1949
|
+
</section>`;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
function builtCommand() {
|
|
1953
|
+
return runCommand(RUN_OPTIONS.filter((option) => runChoice[option.key]).map((option) => option.flag), runChoice.tasks);
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
function copyableCommand(command, id = '') {
|
|
1957
|
+
return `<div class="run-copy"><code class="run-command"${id ? ` id="${id}"` : ''}>${escapeHtml(command)}</code><button type="button" class="copy-command" data-copy="${escapeAttribute(command)}">Copy</button></div>`;
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
/** Copy buttons and the command builder; delegated, so they keep working after the page redraws. */
|
|
1961
|
+
function wireRunCommands() {
|
|
1962
|
+
document.addEventListener('click', (event) => {
|
|
1963
|
+
const button = event.target.closest('.copy-command');
|
|
1964
|
+
if (!button) return;
|
|
1965
|
+
const text = button.getAttribute('data-copy') || '';
|
|
1966
|
+
const copied = () => {
|
|
1967
|
+
button.textContent = 'Copied';
|
|
1968
|
+
button.classList.add('is-copied');
|
|
1969
|
+
setTimeout(() => { button.textContent = 'Copy'; button.classList.remove('is-copied'); }, 1500);
|
|
1970
|
+
};
|
|
1971
|
+
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(text).then(copied, () => { copyWithSelection(text); copied(); });
|
|
1972
|
+
else { copyWithSelection(text); copied(); }
|
|
1973
|
+
});
|
|
1974
|
+
const updateBuilt = (event) => {
|
|
1975
|
+
const control = event.target.closest('[data-run-choice], [data-plan-choice]');
|
|
1976
|
+
if (!control) return;
|
|
1977
|
+
const forPlan = control.hasAttribute('data-plan-choice');
|
|
1978
|
+
const choice = forPlan ? planChoice : runChoice;
|
|
1979
|
+
choice[control.getAttribute(forPlan ? 'data-plan-choice' : 'data-run-choice')] = control.type === 'checkbox' ? control.checked : control.value;
|
|
1980
|
+
const command = forPlan ? builtPlanCommand() : builtCommand();
|
|
1981
|
+
const output = document.getElementById(forPlan ? 'built-plan-command' : 'built-command');
|
|
1982
|
+
if (output) {
|
|
1983
|
+
output.textContent = command;
|
|
1984
|
+
output.nextElementSibling.setAttribute('data-copy', command);
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
document.addEventListener('change', updateBuilt);
|
|
1988
|
+
document.addEventListener('input', updateBuilt);
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/** Where the clipboard API is unavailable, copy through a hidden selection; the command also stays visible to copy by hand. */
|
|
1992
|
+
function copyWithSelection(text) {
|
|
1993
|
+
const area = document.createElement('textarea');
|
|
1994
|
+
area.value = text;
|
|
1995
|
+
area.setAttribute('readonly', '');
|
|
1996
|
+
area.style.position = 'fixed';
|
|
1997
|
+
area.style.opacity = '0';
|
|
1998
|
+
document.body.appendChild(area);
|
|
1999
|
+
area.select();
|
|
2000
|
+
try { document.execCommand('copy'); } catch (error) { /* left for the user to copy by hand */ }
|
|
2001
|
+
area.remove();
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1738
2004
|
function collectTasks() {
|
|
1739
2005
|
return (report.phases || []).flatMap((phase) => phase.tasks || []);
|
|
1740
2006
|
}
|
|
@@ -1992,6 +2258,8 @@
|
|
|
1992
2258
|
*/
|
|
1993
2259
|
function effectiveStatus() {
|
|
1994
2260
|
const status = report.status || 'planned';
|
|
2261
|
+
// A dashboard still marked specified once a plan has filled in its tasks is planned.
|
|
2262
|
+
if (status === 'specified' && collectTasks().length) return 'planned';
|
|
1995
2263
|
if (status === 'complete' && unfinishedTasks().length) return 'paused';
|
|
1996
2264
|
return status;
|
|
1997
2265
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| File | Holds | Written |
|
|
6
6
|
|---|---|---|
|
|
7
|
-
| `<slug>_dashboard.js` | the feature's record — status, phases, tasks and their results, decisions, snapshots, the After Action Report |
|
|
7
|
+
| `<slug>_dashboard.js` | the feature's record — status, phases, tasks and their results, decisions, snapshots, the After Action Report | bt-spec creates it from `dashboard.template.js` (`specified`), bt-plan fills in the plan (`planned`), bt-execute writes it at every task boundary; a Quick Plan creates it at bt-plan |
|
|
8
8
|
| `<slug>_live.js` | what is happening this minute — the current task, one sentence, its step log | at every meaningful step of a run (from `live.template.js`) |
|
|
9
9
|
|
|
10
10
|
They are **data, not code.** Each file is exactly one line of prefix and one strict-JSON value:
|
|
@@ -68,7 +68,7 @@ instead of a blank page if something still cannot render — it keeps checking a
|
|
|
68
68
|
|
|
69
69
|
| Field | Values |
|
|
70
70
|
|---|---|
|
|
71
|
-
| `status` | `planned` · `in-progress` (a run is executing right now) · `paused` (a run ended, the plan is not finished) · `complete` · `incomplete` (finished with deferrals) |
|
|
71
|
+
| `status` | `specified` (bt-spec wrote the spec; no plan yet — no phases) · `planned` · `in-progress` (a run is executing right now) · `paused` (a run ended, the plan is not finished) · `complete` · `incomplete` (finished with deferrals) |
|
|
72
72
|
| phase `status` | `pending` · `in-progress` · `done` · `partial` · `deferred` |
|
|
73
73
|
| task `status` | `pending` · `in-progress` · `built` (awaiting the verifier) · `verifying` · `done` · `deferred` · `failed` |
|
|
74
74
|
|
|
@@ -76,9 +76,9 @@ instead of a blank page if something still cannot render — it keeps checking a
|
|
|
76
76
|
every task here is `done`; otherwise it shows the plan as paused with a warning.
|
|
77
77
|
- A task added to the plan after it was complete is added here as `pending`, in plan order, with an `updates`
|
|
78
78
|
note saying why — and `complete` becomes `paused`.
|
|
79
|
-
- The status picks the page's top slot: `in-progress` shows *Current run activity* (the live file and the
|
|
79
|
+
- The status picks the page's top slot: `specified` shows *Plan this feature* (the `bt-plan` commands to copy, and a builder for its options and a brief); `planned` shows *Start this plan* (the `bt-execute` commands, and a builder for any task range and its options); `in-progress` shows *Current run activity* (the live file and the
|
|
80
80
|
milestones); `paused`, `complete` and `incomplete` show *Final plan summary* (the After Action Report, marked
|
|
81
|
-
*Interim* while paused).
|
|
81
|
+
*Interim* while paused), with *Continue this plan* — the commands that pick up where it stopped — above it.
|
|
82
82
|
- **Cadence is per task.** A task's entry changes the moment it starts (`in-progress`), the moment it is built
|
|
83
83
|
(`built` — summary, files, tests and snapshots filled in right then), while the verifier checks it
|
|
84
84
|
(`verifying`) and when it passes (`done` — verifier, commit, done time).
|
package/skills/bt-hero/SKILL.md
CHANGED
|
@@ -66,7 +66,7 @@ Then resolve every unfilled slot by exactly one of two paths:
|
|
|
66
66
|
|
|
67
67
|
## Step 2 — Write the hero brief (the save file)
|
|
68
68
|
|
|
69
|
-
Write the resolved slots to `.agents/specs/<feature-name>/documents/<feature-name>_hero-brief.md` — the feature's folder (create it if needed; inside a bt-spec run it is the spec's own folder). The brief is the **record**, not a gate: the user never has to touch it, but `/bt-hero @<brief-file>` later must rebuild the same hero with zero questions — that is what makes a hero repeatable, shareable, and tweakable (edit a line, re-run). Record **only Tier 3 answers and explicit Tier 2 overrides** — never Tier 1 mechanics; the brief describes the film, not the engine.
|
|
69
|
+
Write the resolved slots to `.agents/specs/<feature-name>/documents/<feature-name>_hero-brief.md` — the feature's folder (create it if needed, after you make sure the default `.agents` folders exist — `.agents/archive/`, `.agents/profile/`, `.agents/recon/` and `.agents/specs/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds); inside a bt-spec run it is the spec's own folder). The brief is the **record**, not a gate: the user never has to touch it, but `/bt-hero @<brief-file>` later must rebuild the same hero with zero questions — that is what makes a hero repeatable, shareable, and tweakable (edit a line, re-run). Record **only Tier 3 answers and explicit Tier 2 overrides** — never Tier 1 mechanics; the brief describes the film, not the engine.
|
|
70
70
|
|
|
71
71
|
```markdown
|
|
72
72
|
---
|
package/skills/bt-plan/SKILL.md
CHANGED
|
@@ -35,7 +35,7 @@ Turn a feature spec into `.agents/specs/<slug>/documents/<slug>_plan.md`: an ord
|
|
|
35
35
|
4. Sibling-skill pattern (e.g. bt-design's 3D-Hero-Scroll): read that skill's reference **and templates** *(where skills load through a tool: `load_skill` + `read_skill_resource`, never a guessed path; where they are files: the skills directory this skill was loaded from, e.g. `~/.claude/skills/`, `~/.agents/skills/` or the project's equivalent)*. The plan **copies and configures the template engine — never re-implements it**; each behavioral option the spec records (e.g. `sweep: page`) becomes an Acceptance item stated in observable terms. Prefer copying and wiring the template as the first task, so later tasks only configure it.
|
|
36
36
|
5. Too ambiguous to plan responsibly → ask the user. **Already built?** If the research shows some or all of the feature already exists, say so first and plan only what is missing (often just tests and the live check).
|
|
37
37
|
|
|
38
|
-
**Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief — the `<slug>`: lowercase kebab-case, `a-z 0-9 -` only, max 40 chars, with `-02`, `-03` … appended if `.agents/specs/<slug>/` already holds another feature; `spec_impact` and `size` inferred from the analysis; `proof: functional` unless `--parity`. List the assumptions in Codebase Analysis. **A Quick Plan is a creation point:** it creates the feature folder `.agents/specs/<slug>/` (with `documents/`), exactly as bt-spec would, and the plan, report and tests live there.
|
|
38
|
+
**Quick Plan (no spec file):** after the analysis, ask a small round of high-leverage questions (scope, behavior, edge cases, which systems it touches); skip anything the brief or code already answers. Unanswered items fall back to: feature name from the brief — the `<slug>`: lowercase kebab-case, `a-z 0-9 -` only, max 40 chars, with `-02`, `-03` … appended if `.agents/specs/<slug>/` already holds another feature or a folder of that name exists anywhere under `.agents/archive/` (archived work); `spec_impact` and `size` inferred from the analysis; `proof: functional` unless `--parity`. List the assumptions in Codebase Analysis. **A Quick Plan is a creation point:** it first makes sure the default `.agents` folders exist — `.agents/archive/`, `.agents/profile/`, `.agents/recon/` and `.agents/specs/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds), then creates the feature folder `.agents/specs/<slug>/` (with `documents/`), exactly as bt-spec would, and the plan, report and tests live there.
|
|
39
39
|
|
|
40
40
|
**The feature folder.** Every feature has one: `.agents/specs/<slug>/` holding `dashboard.html` (the feature dashboard), `documents/` (`<slug>_spec.md`, `<slug>_plan.md`, bt-execute's `<slug>_autopilot.md`, the dashboard data `<slug>_dashboard.js` and live status `<slug>_live.js`), `snapshots/` and `tests/`. From a spec, `<slug>` is its folder name. A **legacy flat spec** (`.agents/specs/<slug>_spec.md`) is read where it is and left there; the plan and report still go into the new `.agents/specs/<slug>/` folder, and the report's Spec link points back to the flat file.
|
|
41
41
|
|
|
@@ -127,10 +127,10 @@ Each task above is a checkbox. To implement:
|
|
|
127
127
|
|
|
128
128
|
## Step 4. Write the dashboard (planned state)
|
|
129
129
|
|
|
130
|
-
Print `🗂️ [bt-plan] Writing the feature dashboard …`. From bt-execute's `templates/dashboard/` *(where skills load through a tool: `load_skill('bt-execute')` + `read_skill_resource`; where they are files: the sibling `bt-execute/` folder in the skills directory this skill was loaded from)*:
|
|
130
|
+
Print `🗂️ [bt-plan] Writing the feature dashboard …`. **A spec from bt-spec already has a dashboard, in its `specified` state** (showing the bt-plan commands): read its `<slug>_dashboard.js` first and keep its `feature`, `decisions` and `activity`; everything below then fills it in and moves it to `planned`. A Quick Plan, or a spec with no dashboard, creates it here. From bt-execute's `templates/dashboard/` *(where skills load through a tool: `load_skill('bt-execute')` + `read_skill_resource`; where they are files: the sibling `bt-execute/` folder in the skills directory this skill was loaded from)*:
|
|
131
131
|
|
|
132
|
-
- copy `dashboard.html` to `.agents/specs/<slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else;
|
|
133
|
-
- write `.agents/specs/<slug>/documents/<slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin` `spec` or `quick-plan`, size, proof, a plain-language summary), `documents` (Spec — omitted for a Quick Plan — and Plan), `status: "planned"`, `updatedAt` from the shell clock (`date '+%Y-%m-%d %H:%M'`; with no shell, the current local time), `estimate` (the Total line), every phase and task from the plan as `pending` (id, title, kind from the estimate table, verify level), an empty `afterAction` and no snapshots, the plan's Decisions as `decisions` (Heavy Plan; otherwise the spec's), and one `activity` line: `Plan written — <n> tasks in <k> phases, estimated <range
|
|
132
|
+
- copy `dashboard.html` to `.agents/specs/<slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else (always — over a copy bt-spec wrote too, so the page is the current template);
|
|
133
|
+
- write `.agents/specs/<slug>/documents/<slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin` `spec` or `quick-plan`, size, proof, a plain-language summary), `documents` (Spec — omitted for a Quick Plan — and Plan), `status: "planned"`, `updatedAt` from the shell clock (`date '+%Y-%m-%d %H:%M'`; with no shell, the current local time), `estimate` (the Total line), every phase and task from the plan as `pending` (id, title, kind from the estimate table, verify level), an empty `afterAction` and no snapshots, the plan's Decisions as `decisions` (Heavy Plan; otherwise the spec's), and one more `activity` line: `Plan written — <n> tasks in <k> phases, estimated <range>` (after bt-spec's `Spec written` line when there is one);
|
|
134
134
|
- write `.agents/specs/<slug>/documents/<slug>_live.js` from `live.template.js`, the same way (whole, strict JSON): no task, `role: "orchestrator"`, `title: "Plan written — waiting for bt-execute"`, no steps (bt-execute rewrites it at every step of a run).
|
|
135
135
|
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents/specs/*/documents/*_live.js` — append it once if missing. The live file is rewritten at every step of a run and is not history worth keeping; `<slug>_dashboard.js` is, and stays tracked. A live file git already tracks is left as it is.
|
|
136
136
|
|
|
@@ -140,7 +140,7 @@ Then **stop**. Final message: a short summary, the estimated time, and:
|
|
|
140
140
|
|
|
141
141
|
```
|
|
142
142
|
Plan written to .agents/specs/<slug>/documents/<slug>_plan.md — <n> tasks, estimated <total range> of agent time
|
|
143
|
-
Dashboard: .agents/specs/<slug>/dashboard.html (open it in a browser; bt-execute keeps it current)
|
|
143
|
+
Dashboard: .agents/specs/<slug>/dashboard.html (open it in a browser to copy a bt-execute command; bt-execute keeps it current)
|
|
144
144
|
Run a single task with `bt-execute .agents/specs/<slug>/documents/<slug>_plan.md T1`, or every task with `bt-execute .agents/specs/<slug>/documents/<slug>_plan.md ALL` (add `--strict` for an adversarial verifier on every task).
|
|
145
145
|
```
|
|
146
146
|
|
|
@@ -143,6 +143,7 @@ The project is just **the root folder of the web app**: where its source lives (
|
|
|
143
143
|
## Phase 0 — Preflight
|
|
144
144
|
|
|
145
145
|
```bash
|
|
146
|
+
for folder in archive profile recon specs; do mkdir -p "$PROJ/.agents/$folder"; [ -e "$PROJ/.agents/$folder/.gitkeep" ] || : > "$PROJ/.agents/$folder/.gitkeep"; done # the default .agents folders
|
|
146
147
|
mkdir -p "$TOOLS" "$DATA/runs" "$DATA/logs"
|
|
147
148
|
cp -R "$SKILL_DIR"/scripts/* "$TOOLS/" # refresh on every skill update
|
|
148
149
|
node "$TOOLS/progress.mjs" start "$S" --title "<Project> — <scenario> performance" --brief "<the user's words>" --project "$PROJ" --url "<url, or the dev server's / until known>" --open true
|
package/skills/bt-recon/SKILL.md
CHANGED
|
@@ -27,7 +27,7 @@ Run reconnaissance on existing code nobody has documented — one subsystem or t
|
|
|
27
27
|
## Ground rules
|
|
28
28
|
|
|
29
29
|
- **Thorough by default.** Unlike the other bt-* skills, recon has no TIME MATTERS default: the whole point is that nothing is missed. Print `🔬 [bt-recon] Deep recon` at the start (`--quick`: `⚡ [bt-recon] Quick recon`). Still do not re-read what you already have.
|
|
30
|
-
- **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `.agents/recon/<slug>_recon/` — nothing else. No source edits, no builds, no installs, no tests, no shell commands beyond the read-only `git` commands above.
|
|
30
|
+
- **Read-only on the project.** Research only. The files you write are the recon doc, the guide, and screenshots under `.agents/recon/<slug>_recon/` — nothing else, except that before the first of them you make sure the default `.agents` folders exist — `.agents/archive/`, `.agents/profile/`, `.agents/recon/` and `.agents/specs/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds) (unless `--out` points elsewhere). No source edits, no builds, no installs, no tests, no shell commands beyond the read-only `git` commands above.
|
|
31
31
|
- **Evidence or it is unknown.** Every factual claim cites `path:line` (or `path:start-end`) and carries one confidence tag: `[code]` read in the source · `[live]` seen in the running app · `[history]` from git history · `[inferred]` deduced, with the reason in the same line. Anything you cannot establish goes in `## Unknowns` with what would settle it. Never fill a gap with a plausible guess — an inherited system is exactly where a confident wrong guess does the most damage.
|
|
32
32
|
- **Write the system, not the review process.** The recon describes what the code does and why. It never records how the recon was carried out (subagent counts, tool lists, audit logs).
|
|
33
33
|
- **Babylon work:** if the scope uses BabylonJS or the Babylon Toolkit and you have not read the Babylon Toolkit Agent Reference in this session, read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — it is the authority for the API and conventions the code is built on, so it tells you what is toolkit behavior and what is project code. Read its sub-documents only when relevant. If it cannot be read, stop and tell the user.
|
package/skills/bt-spec/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bt-spec
|
|
3
|
-
description: "The Babylon Toolkit Spec Skill creates a feature spec file and branch from a short idea. Use when asked to spec out, plan, or scaffold a new feature."
|
|
3
|
+
description: "The Babylon Toolkit Spec Skill creates a feature spec file and branch from a short idea, plus the feature's dashboard (`.agents/specs/<slug>/dashboard.html`), which shows the bt-plan commands to copy until the feature is planned. Use when asked to spec, spec out, plan, or scaffold a new feature (\"spec out a mute toggle\", \"let's spec this\")."
|
|
4
4
|
allowed-tools: Read, Grep, Glob, Write, WebFetch(domain:raw.githubusercontent.com), Bash(git switch:*), AskUserQuestion, Agent, Task
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,14 +23,14 @@ Turn a short feature idea into a spec file that `bt-plan` can plan from. Follow
|
|
|
23
23
|
## Ground rules
|
|
24
24
|
|
|
25
25
|
- **TIME MATTERS** — on by default; `--no-time-limit` turns it off. Treat the arguments as ending with `TIME MATTERS`: the user is waiting on this run, so finish quickly — research only what the spec needs, keep subagents few and their questions narrow, and do not re-read what you already have. Begin every subagent prompt with `TIME MATTERS.` Print `⏱️ [bt-spec] TIME MATTERS` at the start (`--no-time-limit`: print `⏱️ [bt-spec] No time limit`, and do not add it). Speed never skips a required step or lowers the quality of the spec.
|
|
26
|
-
- **Planning only.** Research read-only and write only the spec file into the new feature folder (plus `SPEC.md` from the scaffold, if the user says yes below,
|
|
26
|
+
- **Planning only.** Research read-only and write only the spec file and the feature dashboard into the new feature folder (Step 6; plus `SPEC.md` from the scaffold, if the user says yes below, a builder skill's intake file in the same `documents/` folder — Step 3 — and the one `.gitignore` line Step 6 names). No source edits, no builds, no tests, no other shell commands.
|
|
27
27
|
- **Babylon work:** if you have not read the Babylon Toolkit Agent Reference in this session, read it once: https://raw.githubusercontent.com/babylontoolkit/agent/main/reference.md — it is the authority for conventions and API; read its sub-documents only when relevant, and again only if a context compaction made you forget it. If it cannot be read, stop and tell the user — do not guess at the API.
|
|
28
28
|
- **Say what you are doing.** Before any step that takes more than a few seconds (a fetch, a big read, subagents) print one short line — `🔎 [bt-spec] <what> …` — and one line when it returns. A silent run looks like a hang and gets cancelled.
|
|
29
29
|
- **Subagents:** running this skill is the user's request to use them where this skill says so. Use whatever subagent tool your host provides (its name varies by host — e.g. `Agent` or `Task`); if there is none, do the work inline and say so. Tell research subagents they need not read the Agent Reference.
|
|
30
30
|
|
|
31
31
|
## Step 1. Arguments, name, branch
|
|
32
32
|
|
|
33
|
-
From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If `.agents/specs/<feature_slug>/` already holds another feature, append `-02`, `-03` … to the slug. If you cannot infer a sensible title, ask. Make a first estimate of the feature's `size` (defined in Step 5) — it sizes the research in Step 2.
|
|
33
|
+
From the flag-stripped brief derive `feature_title` (Title Case), `feature_slug` (lowercase kebab-case, `a-z 0-9 -` only, max 40 chars) and `branch_name` = `project/feature/<feature_slug>`. If `.agents/specs/<feature_slug>/` already holds another feature, or a folder of that name exists anywhere under `.agents/archive/` (archived work), append `-02`, `-03` … to the slug. If you cannot infer a sensible title, ask. Make a first estimate of the feature's `size` (defined in Step 5) — it sizes the research in Step 2.
|
|
34
34
|
|
|
35
35
|
Git is optional. **Where git is available:** stop now if the working tree has uncommitted or untracked files (ask the user to commit or stash); switch to a new branch `branch_name` (if taken, append `-01`, `-02` …) just before writing the spec in Step 5, so a conflict stop leaves no empty branch behind. **Where it is not** (no binary, sandboxed host such as the Babylon Toolkit App Builder): skip this silently — the branch name recorded in the spec header is the deliverable. Do not mention git as missing.
|
|
36
36
|
|
|
@@ -71,13 +71,13 @@ Interview the user until the design is decided, after Steps 2–3 so questions a
|
|
|
71
71
|
|
|
72
72
|
```
|
|
73
73
|
.agents/specs/<feature_slug>/
|
|
74
|
-
dashboard.html the feature dashboard (bt-plan
|
|
74
|
+
dashboard.html the feature dashboard (this spec creates it; bt-plan fills in the plan; bt-execute keeps it current)
|
|
75
75
|
documents/ <feature_slug>_spec.md, _plan.md, _autopilot.md, _dashboard.js, _live.js, and any builder intake file
|
|
76
76
|
snapshots/ the meaningful snapshots of the build, shown by the dashboard
|
|
77
77
|
tests/ every test the plan's tasks write
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md …`, then write the spec to `.agents/specs/<feature_slug>/documents/<feature_slug>_spec.md` (creating the folders) using the project's `FEATURE.md` template if it exists (add any header field or section below that it lacks), otherwise this structure. No implementation detail or code examples.
|
|
80
|
+
Print `✍️ [bt-spec] Drafting .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md …`, then make sure the default `.agents` folders exist — `.agents/archive/`, `.agents/profile/`, `.agents/recon/` and `.agents/specs/`, each with an empty `.gitkeep` (write only the ones missing; never touch what a folder holds), and write the spec to `.agents/specs/<feature_slug>/documents/<feature_slug>_spec.md` (creating the folders) using the project's `FEATURE.md` template if it exists (add any header field or section below that it lacks), otherwise this structure. No implementation detail or code examples.
|
|
81
81
|
|
|
82
82
|
```markdown
|
|
83
83
|
# Spec for <feature-name>
|
|
@@ -126,12 +126,23 @@ Create test file(s) in .agents/specs/<feature-name>/tests/ for these named cases
|
|
|
126
126
|
- <case> → <expected outcome>
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
## Step 6.
|
|
129
|
+
## Step 6. Write the dashboard (specified state)
|
|
130
|
+
|
|
131
|
+
Print `🗂️ [bt-spec] Writing the feature dashboard …`. The feature's dashboard exists from the spec on: until a plan is written it shows the `bt-plan` commands that plan this spec — a standard plan, `--heavy`, `--parity`, `--no-time-limit` — each with a copy button, and a *Build your own* with those options and a brief. From bt-execute's `templates/dashboard/` *(where skills load through a tool: `load_skill('bt-execute')` + `read_skill_resource`; where they are files: the sibling `bt-execute/` folder in the skills directory this skill was loaded from)*:
|
|
132
|
+
|
|
133
|
+
- copy `dashboard.html` to `.agents/specs/<feature_slug>/dashboard.html`, replacing `{{slug}}` with the slug and changing nothing else;
|
|
134
|
+
- write `.agents/specs/<feature_slug>/documents/<feature_slug>_dashboard.js` from the starter `dashboard.template.js`, written whole as strict JSON behind its `window.FEATURE_DASHBOARD =` prefix — double-quoted keys, no comments, no trailing commas (`data-schema.md` documents every field): `feature` (title, slug, branch, `origin: "spec"`, size, proof, a plain-language summary from the spec's Summary), `documents` (the Spec alone), **`status: "specified"`**, `updatedAt` (the current local time, `YYYY-MM-DD HH:MM`), `estimate` empty, **no phases**, an empty `afterAction`, the spec's Decisions as `decisions` when it has any (`D1` …), no follow ups, and one `activity` line: `Spec written — <size>, <proof> proof`;
|
|
135
|
+
- write `.agents/specs/<feature_slug>/documents/<feature_slug>_live.js` from `live.template.js`, the same way: no task, `role: "orchestrator"`, `title: "Spec written — waiting for bt-plan"`, no steps;
|
|
136
|
+
- in a git repository, make sure `.gitignore` (at the repository root) contains the line `.agents/specs/*/documents/*_live.js` — append it once if missing.
|
|
137
|
+
|
|
138
|
+
If the template cannot be found, skip the dashboard and say so — bt-plan creates it with the plan.
|
|
139
|
+
|
|
140
|
+
## Step 7. Report
|
|
130
141
|
|
|
131
142
|
```
|
|
132
143
|
Branch: <branch_name>
|
|
133
144
|
Spec file: .agents/specs/<feature_slug>/documents/<feature_slug>_spec.md
|
|
134
|
-
|
|
145
|
+
Dashboard: .agents/specs/<feature_slug>/dashboard.html (open it in a browser to copy a bt-plan command)
|
|
135
146
|
Title: <feature_title>
|
|
136
147
|
```
|
|
137
148
|
|