@a5c-ai/babysitter-github 5.0.1-staging.ddee3ed9 → 5.0.1-staging.e195a4980892
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 +33 -25
- package/bin/install-shared.js +4 -4
- package/commands/call.md +5 -1
- package/commands/check-forbidden-markers.md +68 -0
- package/commands/cleanup.md +37 -9
- package/commands/doctor.md +2 -3
- package/commands/help.md +2 -1
- package/commands/observe.md +6 -1
- package/commands/plan.md +11 -1
- package/commands/yolo.md +11 -7
- package/hooks/babysitter-proxied-post-tool-use.ps1 +12 -0
- package/hooks/babysitter-proxied-post-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-pre-compact.ps1 +12 -0
- package/hooks/babysitter-proxied-pre-compact.sh +3 -0
- package/hooks/babysitter-proxied-pre-tool-use.ps1 +12 -0
- package/hooks/babysitter-proxied-pre-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-session-end.sh +0 -0
- package/hooks/babysitter-proxied-session-start.sh +0 -0
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +0 -0
- package/hooks.json +24 -0
- package/package.json +5 -6
- package/plugin.json +1 -1
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/skills/babysit/SKILL.md +8 -6
- package/skills/call/SKILL.md +5 -1
- package/skills/check-forbidden-markers/SKILL.md +69 -0
- package/skills/cleanup/SKILL.md +37 -9
- package/skills/doctor/SKILL.md +2 -3
- package/skills/help/SKILL.md +2 -1
- package/skills/observe/SKILL.md +6 -1
- package/skills/plan/SKILL.md +11 -1
- package/skills/yolo/SKILL.md +5 -1
- package/versions.json +2 -2
- package/scripts/sync-command-surfaces.js +0 -20
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@ directly.
|
|
|
18
18
|
- **Node.js 22+**
|
|
19
19
|
- **GitHub Copilot CLI** (`copilot`) -- requires an active GitHub Copilot
|
|
20
20
|
subscription
|
|
21
|
-
- **Babysitter
|
|
21
|
+
- **Babysitter CLI** (`@a5c-ai/babysitter`) -- installed globally when using
|
|
22
|
+
the SDK helper
|
|
22
23
|
|
|
23
24
|
## Installation
|
|
24
25
|
|
|
@@ -28,7 +29,7 @@ Register the a5c.ai marketplace and install the plugin:
|
|
|
28
29
|
|
|
29
30
|
```bash
|
|
30
31
|
# Register the marketplace
|
|
31
|
-
copilot plugin marketplace add a5c-ai/babysitter
|
|
32
|
+
copilot plugin marketplace add a5c-ai/babysitter-claude
|
|
32
33
|
|
|
33
34
|
# Install the plugin
|
|
34
35
|
copilot plugin install babysitter
|
|
@@ -36,42 +37,50 @@ copilot plugin install babysitter
|
|
|
36
37
|
|
|
37
38
|
### Direct GitHub install
|
|
38
39
|
|
|
39
|
-
Install directly from the
|
|
40
|
-
discovers the plugin via `.github/plugin/marketplace.json` at the repo root:
|
|
40
|
+
Install directly from the generated external plugin repository:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
copilot plugin install a5c-ai/babysitter
|
|
43
|
+
copilot plugin install a5c-ai/babysitter-github-copilot
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
### Alternative Installation (
|
|
46
|
+
### Alternative Installation (SDK helper / development)
|
|
47
47
|
|
|
48
|
-
For development or environments where the Copilot CLI plugin system is not
|
|
49
|
-
available, install via npm:
|
|
48
|
+
For development, automation, or environments where the Copilot CLI plugin system is not available, install through the Babysitter SDK helper. This is the canonical scriptable path used by the installer tests and resolves to `npx --yes @a5c-ai/babysitter-github install ...` under the hood:
|
|
50
49
|
|
|
51
|
-
Install the
|
|
50
|
+
Install the Babysitter CLI first:
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
|
-
npm install -g @a5c-ai/babysitter
|
|
53
|
+
npm install -g @a5c-ai/babysitter
|
|
55
54
|
```
|
|
56
55
|
|
|
57
|
-
Then install the GitHub Copilot plugin globally:
|
|
56
|
+
Then install the GitHub Copilot plugin globally or into a workspace:
|
|
58
57
|
|
|
59
58
|
```bash
|
|
60
|
-
|
|
61
|
-
babysitter-github
|
|
59
|
+
# Global install
|
|
60
|
+
babysitter harness:install-plugin github-copilot
|
|
61
|
+
|
|
62
|
+
# Workspace install
|
|
63
|
+
babysitter harness:install-plugin github-copilot --workspace /path/to/repo
|
|
62
64
|
```
|
|
63
65
|
|
|
64
|
-
|
|
66
|
+
You can also run the published package installer directly:
|
|
65
67
|
|
|
66
68
|
```bash
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
npx --yes @a5c-ai/babysitter-github install --global
|
|
70
|
+
npx --yes @a5c-ai/babysitter-github install --workspace /path/to/repo
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Or install from generated source:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm run generate:plugins
|
|
77
|
+
node artifacts/generated-plugins/github-copilot/bin/install.js
|
|
69
78
|
```
|
|
70
79
|
|
|
71
|
-
Install into a specific workspace:
|
|
80
|
+
Install into a specific workspace from generated source:
|
|
72
81
|
|
|
73
82
|
```bash
|
|
74
|
-
|
|
83
|
+
node artifacts/generated-plugins/github-copilot/bin/install.js --workspace /path/to/repo
|
|
75
84
|
```
|
|
76
85
|
|
|
77
86
|
### GitHub Copilot cloud agent installation
|
|
@@ -253,8 +262,7 @@ Copilot CLI looks for the plugin manifest in these paths, checked in order:
|
|
|
253
262
|
The first match wins. This plugin uses `plugin.json` at the package root.
|
|
254
263
|
|
|
255
264
|
For marketplace discovery, Copilot CLI looks for `.github/plugin/marketplace.json`
|
|
256
|
-
at the repository root
|
|
257
|
-
used when installing via `copilot plugin install OWNER/REPO`.
|
|
265
|
+
at the repository root of the generated plugin repository.
|
|
258
266
|
|
|
259
267
|
### plugin.json Schema
|
|
260
268
|
|
|
@@ -404,7 +412,7 @@ repository root in `.github/plugin/marketplace.json`:
|
|
|
404
412
|
"name": "babysitter",
|
|
405
413
|
"description": "Multi-step workflow orchestration with event-sourced state",
|
|
406
414
|
"version": "0.1.0",
|
|
407
|
-
"source": "./
|
|
415
|
+
"source": "./"
|
|
408
416
|
}
|
|
409
417
|
]
|
|
410
418
|
}
|
|
@@ -461,7 +469,7 @@ These registries are available without running `marketplace add`.
|
|
|
461
469
|
## Plugin Structure (Directory Layout)
|
|
462
470
|
|
|
463
471
|
```
|
|
464
|
-
plugins/
|
|
472
|
+
artifacts/generated-plugins/github-copilot/
|
|
465
473
|
plugin.json # Plugin manifest (skills, hooks, metadata)
|
|
466
474
|
.github/plugin.json # Plugin manifest (alternate discovery path)
|
|
467
475
|
hooks.json # Hook configuration (sessionStart, sessionEnd, userPromptSubmitted)
|
|
@@ -579,14 +587,14 @@ compatibility where PowerShell execution is available.
|
|
|
579
587
|
git clone https://github.com/a5c-ai/babysitter.git
|
|
580
588
|
cd babysitter
|
|
581
589
|
npm install
|
|
582
|
-
|
|
590
|
+
npm run generate:plugins
|
|
583
591
|
node bin/install.js
|
|
584
592
|
```
|
|
585
593
|
|
|
586
594
|
### Publishing
|
|
587
595
|
|
|
588
596
|
```bash
|
|
589
|
-
cd plugins/
|
|
597
|
+
cd artifacts/generated-plugins/github-copilot
|
|
590
598
|
npm run deploy # Publish to npm (public)
|
|
591
599
|
npm run deploy:staging # Publish to npm with staging tag
|
|
592
600
|
```
|
|
@@ -594,7 +602,7 @@ npm run deploy:staging # Publish to npm with staging tag
|
|
|
594
602
|
### Team installation
|
|
595
603
|
|
|
596
604
|
```bash
|
|
597
|
-
cd plugins/
|
|
605
|
+
cd artifacts/generated-plugins/github-copilot
|
|
598
606
|
npm run team:install
|
|
599
607
|
```
|
|
600
608
|
|
package/bin/install-shared.js
CHANGED
|
@@ -29,7 +29,7 @@ function writeFileIfChanged(filePath, contents) {
|
|
|
29
29
|
try {
|
|
30
30
|
const existing = fs.readFileSync(filePath, 'utf8');
|
|
31
31
|
if (existing === contents) return false;
|
|
32
|
-
} catch {}
|
|
32
|
+
} catch (e) { process.stderr.write('[extension-mux] file read failed for ' + filePath + ', overwriting: ' + (e instanceof Error ? e.message : String(e)) + '\n'); }
|
|
33
33
|
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
34
34
|
fs.writeFileSync(filePath, contents);
|
|
35
35
|
return true;
|
|
@@ -82,7 +82,7 @@ function writeJson(filePath, value) {
|
|
|
82
82
|
function ensureExecutable(filePath) {
|
|
83
83
|
try {
|
|
84
84
|
fs.chmodSync(filePath, 0o755);
|
|
85
|
-
} catch {}
|
|
85
|
+
} catch (e) { process.stderr.write('[extension-mux] chmod failed for ' + filePath + ': ' + (e instanceof Error ? e.message : String(e)) + '\n'); }
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
function normalizeMarketplaceSourcePath(source, marketplacePath) {
|
|
@@ -104,7 +104,7 @@ function ensureMarketplaceEntry(marketplacePath, pluginRoot) {
|
|
|
104
104
|
name: PLUGIN_NAME,
|
|
105
105
|
source: relSource,
|
|
106
106
|
description: "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
107
|
-
version: "5.0.
|
|
107
|
+
version: "5.0.1-staging.e195a4980892",
|
|
108
108
|
author: { name: "a5c.ai" },
|
|
109
109
|
};
|
|
110
110
|
if (idx >= 0) marketplace.plugins[idx] = entry;
|
|
@@ -147,7 +147,7 @@ function resolveCliCommand(packageRoot) {
|
|
|
147
147
|
const versionsPath = path.join(packageRoot, 'versions.json');
|
|
148
148
|
const versions = readJson(versionsPath) || {};
|
|
149
149
|
const ver = versions.sdkVersion || 'latest';
|
|
150
|
-
return `
|
|
150
|
+
return `npm exec --yes --package @a5c-ai/babysitter-sdk@${ver} -- babysitter`;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
function runCli(packageRoot, cliArgs, options = {}) {
|
package/commands/call.md
CHANGED
|
@@ -4,4 +4,8 @@ argument-hint: Specific instructions for the run.
|
|
|
4
4
|
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Then continue executing the returned instructions in this same turn. Do not stop after the Skill tool returns; carry the requested run through to completion proof.
|
|
8
|
+
|
|
9
|
+
User arguments for this command:
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Pre-deploy gate that scans built JS chunks for forbidden substring markers (saga-era / obsolete code paths) listed in a project-local forbidden-markers.txt
|
|
3
|
+
argument-hint: "[--markers-file <path>] [--chunks-dir <path>] [--json] Optional overrides; defaults are project-relative."
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Compose the gate from the shared helper at `library/processes/shared/forbidden-markers-scanner.js` (issue #477).
|
|
8
|
+
|
|
9
|
+
## What this gate does
|
|
10
|
+
|
|
11
|
+
Reads a list of literal substring markers from `scripts/forbidden-markers.txt` (blank lines and `#`-prefixed comments stripped) and greps every `.js` chunk under `.vercel/output/static/_next/static/chunks/` (Next.js / Vercel default; configurable) for any occurrence. Reports structured hits per `(marker, chunk)` pair with occurrence counts. Designed to chain between `vercel build --prod` and `vercel deploy --prod`.
|
|
12
|
+
|
|
13
|
+
Use this gate when a refactor or restart-from-baseline replaced load-bearing code paths and you need a structural guarantee the obsolete symbols never re-ship. Burned-in evidence: cookbook VI-9 / VI-12 near-miss revivals during the 2026-05 iOS-Safari saga; the prototype lives at `cookbook/scripts/check-no-forbidden.mjs` and shipped two upstream contributions before being generalized as this gate.
|
|
14
|
+
|
|
15
|
+
## When to use
|
|
16
|
+
|
|
17
|
+
- **Pre-deploy.** Insert after build, before deploy. Block the deploy when `ok: false`.
|
|
18
|
+
- **Post-restart.** After a baseline rollback + step-by-step re-add, snapshot the saga-era markers in `forbidden-markers.txt` and let CI hold the line.
|
|
19
|
+
- **Post-refactor.** When old helper / handler / module names must not coexist with the new ones in the same bundle.
|
|
20
|
+
|
|
21
|
+
## Expected config locations
|
|
22
|
+
|
|
23
|
+
- `scripts/forbidden-markers.txt` — one marker per line, `#` for comments. The list is the contract; the gate is mechanical. Commit this file to source control.
|
|
24
|
+
- `.vercel/output/static/_next/static/chunks/` — default scan target. Override for non-Vercel frameworks via the `--chunks-dir` flag or the `chunksDir` task input.
|
|
25
|
+
|
|
26
|
+
A missing markers file is a no-op (`ok: true`, `reason: 'missing-markers-file'`) — misconfiguration is never a deploy block. A missing chunks directory is likewise a no-op (`reason: 'missing-chunks-dir'`) so the gate is safe to chain into `check:all` before the build runs.
|
|
27
|
+
|
|
28
|
+
## Exit semantics
|
|
29
|
+
|
|
30
|
+
| Reason | `ok` | Deploy decision |
|
|
31
|
+
|-------------------------|--------|--------------------------------|
|
|
32
|
+
| `missing-markers-file` | true | Pass (no gate active) |
|
|
33
|
+
| `missing-chunks-dir` | true | Pass (run before build) |
|
|
34
|
+
| `empty-markers` | true | Pass (list is empty) |
|
|
35
|
+
| `no-chunks` | true | Pass (nothing to scan) |
|
|
36
|
+
| `clean` | true | Pass — proceed to deploy |
|
|
37
|
+
| `hits` | false | **BLOCK** — surface hits, ask for triage |
|
|
38
|
+
|
|
39
|
+
For each hit, the gate emits `{ marker, chunk, count }` so the operator sees the exact marker string, the absolute chunk path, and the number of occurrences in that chunk. Multiple hits across chunks for the same marker are reported separately.
|
|
40
|
+
|
|
41
|
+
## Programmatic surface
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
import { scanForbiddenMarkers, checkForbiddenMarkersTask } from '@a5c-ai/babysitter-library/processes/shared';
|
|
45
|
+
|
|
46
|
+
// Direct call:
|
|
47
|
+
const result = await scanForbiddenMarkers({
|
|
48
|
+
markersFile: 'scripts/forbidden-markers.txt',
|
|
49
|
+
chunksDir: '.vercel/output/static/_next/static/chunks',
|
|
50
|
+
});
|
|
51
|
+
if (!result.ok) {
|
|
52
|
+
// result.hits: Array<{ marker, chunk, count }>
|
|
53
|
+
// result.reason === 'hits'
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Or dispatched as a babysitter task:
|
|
58
|
+
const gate = await ctx.task(checkForbiddenMarkersTask, {
|
|
59
|
+
projectDir: '.',
|
|
60
|
+
// markersFile / chunksDir are inferred from projectDir if omitted
|
|
61
|
+
});
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Reference
|
|
65
|
+
|
|
66
|
+
- Issue: https://github.com/a5c-ai/babysitter/issues/477
|
|
67
|
+
- Helper module: `library/processes/shared/forbidden-markers-scanner.js`
|
|
68
|
+
- Origin (cookbook prototype): `cookbook/scripts/check-no-forbidden.mjs` (81 lines)
|
package/commands/cleanup.md
CHANGED
|
@@ -6,15 +6,43 @@ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSea
|
|
|
6
6
|
|
|
7
7
|
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Resolve the active process library with:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
babysitter process-library:active --json
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Read `binding.dir` from that JSON and create/run the cleanup process from `cradle/cleanup-runs.js#process` relative to that active library root. Do not use plugin-cache-relative cradle paths.
|
|
10
16
|
|
|
11
17
|
Implementation notes (for the process):
|
|
12
18
|
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
19
|
+
|
|
20
|
+
CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
|
|
21
|
+
|
|
22
|
+
Phase 1 — Scan:
|
|
23
|
+
- Scan .a5c/runs/ for all runs
|
|
24
|
+
- Classify each as terminal (completed/failed) or active (in-progress/created)
|
|
25
|
+
- Identify terminal runs older than the keep-days threshold as removal candidates
|
|
26
|
+
- Never mark active/in-progress runs for removal
|
|
27
|
+
- Count and report: total runs, terminal, active, removal candidates, disk usage
|
|
28
|
+
|
|
29
|
+
Phase 2 — Aggregate insights (BEFORE any deletion):
|
|
30
|
+
- For EVERY removal candidate, read its run.json and journal/ events
|
|
31
|
+
- Extract: processId, prompt, status, event count, created date, task summaries
|
|
32
|
+
- Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
|
|
33
|
+
- Append a new dated section to docs/run-history-insights.md with:
|
|
34
|
+
- Summary statistics (runs removed, disk freed, runs retained)
|
|
35
|
+
- Run categories with counts and descriptions
|
|
36
|
+
- Key patterns observed (multi-batch convergence, retry behavior, etc.)
|
|
37
|
+
- What worked well / what didn't from the run data
|
|
38
|
+
- This file MUST be written and verified before proceeding to Phase 3
|
|
39
|
+
|
|
40
|
+
Phase 3 — Confirm removal:
|
|
41
|
+
- In interactive mode, show the user what will be removed via a breakpoint
|
|
42
|
+
- In non-interactive mode (yolo), proceed with defaults
|
|
43
|
+
- In dry-run mode, stop here and show what would be removed
|
|
44
|
+
|
|
45
|
+
Phase 4 — Remove:
|
|
46
|
+
- Delete the terminal runs older than keep-days threshold
|
|
47
|
+
- Identify and remove orphaned process files not referenced by remaining runs
|
|
48
|
+
- Show remaining run count and disk usage after cleanup
|
package/commands/doctor.md
CHANGED
|
@@ -156,7 +156,6 @@ If it exists:
|
|
|
156
156
|
**Goal:** Inspect babysitter session files for health and detect runaway loops.
|
|
157
157
|
|
|
158
158
|
- Search for session state files using Glob:
|
|
159
|
-
- `plugins/babysitter/skills/babysit/state/*.md`
|
|
160
159
|
- `.a5c/state/*.md`
|
|
161
160
|
- `.a5c/state/*.json`
|
|
162
161
|
- For each session state file found:
|
|
@@ -260,7 +259,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
|
|
|
260
259
|
|
|
261
260
|
### 10a. Hook Registration
|
|
262
261
|
|
|
263
|
-
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `
|
|
262
|
+
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
|
|
264
263
|
- If found, read `hooks.json` and verify:
|
|
265
264
|
- A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
|
|
266
265
|
- A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
|
|
@@ -315,7 +314,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
|
|
|
315
314
|
|
|
316
315
|
Perform these diagnostic steps in order and report the first failure found:
|
|
317
316
|
|
|
318
|
-
1. **Plugin not installed**: Check if `
|
|
317
|
+
1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
|
|
319
318
|
|
|
320
319
|
2. **Plugin not enabled**: Check for Claude settings files:
|
|
321
320
|
- `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
|
package/commands/help.md
CHANGED
|
@@ -233,7 +233,8 @@ SECONDARY COMMANDS
|
|
|
233
233
|
How it works: Runs npx @a5c-ai/babysitter-observer-dashboard@latest which watches
|
|
234
234
|
the .a5c/runs/ directory (or a parent directory containing multiple projects) and
|
|
235
235
|
serves a live dashboard. The process is blocking -- it runs until you stop it, and
|
|
236
|
-
it prints the local URL to share with the user.
|
|
236
|
+
it prints the local URL to share with the user. Do not use `babysitter observe`
|
|
237
|
+
as a fallback; the core Babysitter CLI does not expose that subcommand.
|
|
237
238
|
|
|
238
239
|
Example: /babysitter:observe
|
|
239
240
|
(opens browser showing all runs with live-updating task
|
package/commands/observe.md
CHANGED
|
@@ -7,6 +7,11 @@ allowed-tools: Read, Grep, Write, Task, Bash
|
|
|
7
7
|
Run the babysitter observer dashboard:
|
|
8
8
|
|
|
9
9
|
1. Determine the watch directory — this is usually the project's container directory (the parent of the project dir), or the current working directory if not specified.
|
|
10
|
-
2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir
|
|
10
|
+
2. Launch the standalone dashboard package: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir>`.
|
|
11
11
|
3. This is a blocking process — it will keep running until stopped.
|
|
12
12
|
4. Report the URL printed by the dashboard to the user, then open it in the browser.
|
|
13
|
+
|
|
14
|
+
Do not fall back to `babysitter observe`; the core Babysitter CLI does not expose
|
|
15
|
+
that subcommand. Some harness runtimes may provide a separate
|
|
16
|
+
`agent-platform observe` surface, but this skill uses the verified standalone
|
|
17
|
+
dashboard package.
|
package/commands/plan.md
CHANGED
|
@@ -4,4 +4,14 @@ argument-hint: Specific instructions for the run.
|
|
|
4
4
|
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
7
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Focus on creating the best process possible, but without creating and running the actual run.
|
|
8
|
+
|
|
9
|
+
Before drafting the process, run Phase 0 -- REUSE-AUDIT: extract keyword nouns and verbs from the request, scan for matching existing migrations, API routes, environment variables, SDK dependencies, and imports, honor `.a5c/reuse-audit.json` when present, and put a `Reuse-audit findings (REVIEW BEFORE PROCEEDING)` block before Phase 1 of the plan.
|
|
10
|
+
|
|
11
|
+
## Process Shape Selection
|
|
12
|
+
|
|
13
|
+
Choose the process shape before authoring `process.js`:
|
|
14
|
+
|
|
15
|
+
- Use a flat phase list when the spec is well-defined, the work is wiring or composition, the bug class is already known if this is a fix, and execution should proceed sequentially through clear phases.
|
|
16
|
+
- Use a HYPOTHESES tree when the bug class is unknown, forensics are required, multiple causal models compete, and each hypothesis needs its own observations, falsifying observations, and follow-up phases.
|
|
17
|
+
- Rule of thumb: if the first phase is "investigate", use HYPOTHESES-tree mode. If the first phase is "implement X", use flat-phase-list mode.
|
package/commands/yolo.md
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the run.
|
|
3
|
-
argument-hint: Specific instructions for the run.
|
|
4
|
-
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
---
|
|
2
|
+
description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow in a non-interactive mode, without any user interaction or breakpoints in the run.
|
|
3
|
+
argument-hint: Specific instructions for the run.
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Run the Babysitter orchestration instructions directly through the CLI, without any user interaction or breakpoints. In Claude Code, use Bash to run `babysitter instructions:babysit-skill --harness claude-code --no-interactive`; in Codex, run `babysitter instructions:babysit-skill --harness codex --no-interactive`; in other harnesses, use the same command with that harness id. Then follow the returned instructions in this same turn until completion proof is produced. Do not stop after reading the instructions, do not invoke the Skill tool first, and use the non-interactive/no-breakpoints path when the instructions offer a mode choice.
|
|
8
|
+
|
|
9
|
+
User arguments for this command:
|
|
10
|
+
|
|
11
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'post-tool-use'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
4
|
+
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
|
|
6
|
+
$input_data = [Console]::In.ReadToEnd()
|
|
7
|
+
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
8
|
+
if ($LASTEXITCODE -eq 0 -and $result) {
|
|
9
|
+
Write-Output $result
|
|
10
|
+
} else {
|
|
11
|
+
Write-Output '{}'
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'pre-compact'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
4
|
+
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
|
|
6
|
+
$input_data = [Console]::In.ReadToEnd()
|
|
7
|
+
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
8
|
+
if ($LASTEXITCODE -eq 0 -and $result) {
|
|
9
|
+
Write-Output $result
|
|
10
|
+
} else {
|
|
11
|
+
Write-Output '{}'
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# PowerShell hook wrapper — sets env vars and delegates to bash
|
|
2
|
+
$env:HOOK_TYPE = 'pre-tool-use'
|
|
3
|
+
$env:ADAPTER_NAME = 'copilot'
|
|
4
|
+
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
|
|
6
|
+
$input_data = [Console]::In.ReadToEnd()
|
|
7
|
+
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
8
|
+
if ($LASTEXITCODE -eq 0 -and $result) {
|
|
9
|
+
Write-Output $result
|
|
10
|
+
} else {
|
|
11
|
+
Write-Output '{}'
|
|
12
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/hooks.json
CHANGED
|
@@ -17,6 +17,30 @@
|
|
|
17
17
|
"timeoutSec": 15
|
|
18
18
|
}
|
|
19
19
|
],
|
|
20
|
+
"preToolUse": [
|
|
21
|
+
{
|
|
22
|
+
"type": "command",
|
|
23
|
+
"bash": "./hooks/babysitter-proxied-pre-tool-use.sh",
|
|
24
|
+
"powershell": "./hooks/babysitter-proxied-pre-tool-use.ps1",
|
|
25
|
+
"timeoutSec": 30
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"postToolUse": [
|
|
29
|
+
{
|
|
30
|
+
"type": "command",
|
|
31
|
+
"bash": "./hooks/babysitter-proxied-post-tool-use.sh",
|
|
32
|
+
"powershell": "./hooks/babysitter-proxied-post-tool-use.ps1",
|
|
33
|
+
"timeoutSec": 30
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"PreCompact": [
|
|
37
|
+
{
|
|
38
|
+
"type": "command",
|
|
39
|
+
"bash": "./hooks/babysitter-proxied-pre-compact.sh",
|
|
40
|
+
"powershell": "./hooks/babysitter-proxied-pre-compact.ps1",
|
|
41
|
+
"timeoutSec": 30
|
|
42
|
+
}
|
|
43
|
+
],
|
|
20
44
|
"sessionEnd": [
|
|
21
45
|
{
|
|
22
46
|
"type": "command",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.e195a4980892",
|
|
4
4
|
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"deploy": "npm publish --access public",
|
|
@@ -36,15 +36,14 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@a5c-ai/babysitter-sdk": "5.0.1-staging.
|
|
39
|
+
"@a5c-ai/babysitter-sdk": "5.0.1-staging.e195a4980892"
|
|
40
40
|
},
|
|
41
41
|
"repository": {
|
|
42
42
|
"type": "git",
|
|
43
|
-
"url": "git+https://github.com/a5c-ai/babysitter.git"
|
|
44
|
-
"directory": "plugins/babysitter-github"
|
|
43
|
+
"url": "git+https://github.com/a5c-ai/babysitter-github-copilot.git"
|
|
45
44
|
},
|
|
46
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
45
|
+
"homepage": "https://github.com/a5c-ai/babysitter-github-copilot#readme",
|
|
47
46
|
"bugs": {
|
|
48
|
-
"url": "https://github.com/a5c-ai/babysitter/issues"
|
|
47
|
+
"url": "https://github.com/a5c-ai/babysitter-github-copilot/issues"
|
|
49
48
|
}
|
|
50
49
|
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.0.1-staging.
|
|
3
|
+
"version": "5.0.1-staging.e195a4980892",
|
|
4
4
|
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "a5c.ai"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
|
|
5
|
+
function run(command, args) {
|
|
6
|
+
const result = spawnSync(command, args, { encoding: 'utf8', stdio: 'inherit' });
|
|
7
|
+
if (result.status !== 0) process.exit(result.status || 1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const branch = process.env.GITHUB_REF_NAME || 'develop';
|
|
11
|
+
const sha = (process.env.GITHUB_SHA || '').slice(0, 12);
|
|
12
|
+
const version = existsSync('package.json') ? JSON.parse(readFileSync('package.json', 'utf8')).version : JSON.parse(readFileSync('versions.json', 'utf8')).sdkVersion;
|
|
13
|
+
const normalized = String(version).replace(/[^0-9A-Za-z._-]/g, '-');
|
|
14
|
+
const tag = 'release/' + branch + '/v' + normalized + '-' + sha;
|
|
15
|
+
run('git', ['config', 'user.name', 'github-actions[bot]']);
|
|
16
|
+
run('git', ['config', 'user.email', 'github-actions[bot]@users.noreply.github.com']);
|
|
17
|
+
run('git', ['tag', tag]);
|
|
18
|
+
run('git', ['push', 'origin', tag]);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { readFileSync } from 'node:fs';
|
|
4
|
+
|
|
5
|
+
function run(command, args, options = {}) {
|
|
6
|
+
const result = spawnSync(command, args, { stdio: options.stdio || 'inherit', encoding: options.encoding });
|
|
7
|
+
if (result.status !== 0 && !options.allowFailure) process.exit(result.status || 1);
|
|
8
|
+
return result;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function npmView(packageSpec) {
|
|
12
|
+
return run('npm', ['view', packageSpec, 'version'], { allowFailure: true, stdio: 'pipe', encoding: 'utf8' }).status === 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
|
|
16
|
+
const ref = process.env.GITHUB_REF_NAME || '';
|
|
17
|
+
const branch = ref.split('/')[1] || 'develop';
|
|
18
|
+
const tag = branch === 'main' ? 'latest' : branch;
|
|
19
|
+
|
|
20
|
+
if (!process.env.NODE_AUTH_TOKEN) {
|
|
21
|
+
console.log('NODE_AUTH_TOKEN is not configured; skipping npm publish.');
|
|
22
|
+
process.exit(0);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
if (npmView(pkg.name + '@' + pkg.version)) {
|
|
26
|
+
console.log(pkg.name + '@' + pkg.version + ' already exists; ensuring dist-tag ' + tag + '.');
|
|
27
|
+
run('npm', ['dist-tag', 'add', pkg.name + '@' + pkg.version, tag], { allowFailure: true });
|
|
28
|
+
process.exit(0);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
for (const field of ['dependencies', 'peerDependencies', 'optionalDependencies']) {
|
|
32
|
+
for (const [name, version] of Object.entries(pkg[field] || {})) {
|
|
33
|
+
if (!name.startsWith('@a5c-ai/') || version.startsWith('^') || version.startsWith('~') || version === '*' || version.startsWith('workspace:')) continue;
|
|
34
|
+
if (!npmView(name + '@' + version)) {
|
|
35
|
+
console.log('Required internal dependency ' + name + '@' + version + ' is not published yet; skipping npm publish.');
|
|
36
|
+
process.exit(0);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
run('npm', ['publish', '--access', 'public', '--tag', tag]);
|
package/skills/babysit/SKILL.md
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: babysit
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
orchestrate a process or whenever it is called explicitly. (babysit,
|
|
6
|
-
babysitter, orchestrate, orchestrate a run, workflow, etc.)
|
|
4
|
+
Execute via @babysitter. Use this skill when asked to babysit a task, do anything that is structured process-driven (even a loop) or whenever it is called explicitly. (babysit, babysitter, with a process, orchestrate, orchestrate a run, workflow, loop until, etc.)
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
# babysit
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
Follow the commands below exactly. but apply judgement and creativity to get the job done. no matter how small or simple the task may seem, you must use the babysitter SDK and run lifecycle to execute it. This is non-negotiable. If you are asked to do something that seems like it could be done with a simple tool call, you must still use the babysitter SDK to create a run, define tasks, execute them, and complete the run. This is how you will learn and demonstrate mastery of the babysitter system. Always follow the full process, even for trivial tasks.
|
|
12
10
|
|
|
13
11
|
## Dependencies
|
|
14
12
|
|
|
@@ -20,10 +18,14 @@ Read the SDK version from `versions.json` to ensure version compatibility:
|
|
|
20
18
|
SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
|
|
21
19
|
npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
if command -v babysitter >/dev/null 2>&1 && babysitter --version >/dev/null 2>&1; then
|
|
22
|
+
CLI="babysitter"
|
|
23
|
+
else
|
|
24
|
+
CLI="npm exec --yes --package @a5c-ai/babysitter-sdk@$SDK_VERSION -- babysitter"
|
|
25
|
+
fi
|
|
24
26
|
```
|
|
25
27
|
|
|
26
|
-
If `
|
|
28
|
+
If a stale or broken global shim fails with `MODULE_NOT_FOUND`, repair it with `npm rm -g @a5c-ai/babysitter @a5c-ai/babysitter-sdk && npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION`, then re-run `babysitter --version`.
|
|
27
29
|
|
|
28
30
|
### jq
|
|
29
31
|
|
package/skills/call/SKILL.md
CHANGED
|
@@ -5,4 +5,8 @@ description: Orchestrate a babysitter run. use this command to start babysitting
|
|
|
5
5
|
|
|
6
6
|
# call
|
|
7
7
|
|
|
8
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Then continue executing the returned instructions in this same turn. Do not stop after the Skill tool returns; carry the requested run through to completion proof.
|
|
9
|
+
|
|
10
|
+
User arguments for this command:
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: check-forbidden-markers
|
|
3
|
+
description: Pre-deploy gate that scans built JS chunks for forbidden substring markers (saga-era / obsolete code paths) listed in a project-local forbidden-markers.txt
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# check-forbidden-markers
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Compose the gate from the shared helper at `library/processes/shared/forbidden-markers-scanner.js` (issue #477).
|
|
9
|
+
|
|
10
|
+
## What this gate does
|
|
11
|
+
|
|
12
|
+
Reads a list of literal substring markers from `scripts/forbidden-markers.txt` (blank lines and `#`-prefixed comments stripped) and greps every `.js` chunk under `.vercel/output/static/_next/static/chunks/` (Next.js / Vercel default; configurable) for any occurrence. Reports structured hits per `(marker, chunk)` pair with occurrence counts. Designed to chain between `vercel build --prod` and `vercel deploy --prod`.
|
|
13
|
+
|
|
14
|
+
Use this gate when a refactor or restart-from-baseline replaced load-bearing code paths and you need a structural guarantee the obsolete symbols never re-ship. Burned-in evidence: cookbook VI-9 / VI-12 near-miss revivals during the 2026-05 iOS-Safari saga; the prototype lives at `cookbook/scripts/check-no-forbidden.mjs` and shipped two upstream contributions before being generalized as this gate.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
- **Pre-deploy.** Insert after build, before deploy. Block the deploy when `ok: false`.
|
|
19
|
+
- **Post-restart.** After a baseline rollback + step-by-step re-add, snapshot the saga-era markers in `forbidden-markers.txt` and let CI hold the line.
|
|
20
|
+
- **Post-refactor.** When old helper / handler / module names must not coexist with the new ones in the same bundle.
|
|
21
|
+
|
|
22
|
+
## Expected config locations
|
|
23
|
+
|
|
24
|
+
- `scripts/forbidden-markers.txt` — one marker per line, `#` for comments. The list is the contract; the gate is mechanical. Commit this file to source control.
|
|
25
|
+
- `.vercel/output/static/_next/static/chunks/` — default scan target. Override for non-Vercel frameworks via the `--chunks-dir` flag or the `chunksDir` task input.
|
|
26
|
+
|
|
27
|
+
A missing markers file is a no-op (`ok: true`, `reason: 'missing-markers-file'`) — misconfiguration is never a deploy block. A missing chunks directory is likewise a no-op (`reason: 'missing-chunks-dir'`) so the gate is safe to chain into `check:all` before the build runs.
|
|
28
|
+
|
|
29
|
+
## Exit semantics
|
|
30
|
+
|
|
31
|
+
| Reason | `ok` | Deploy decision |
|
|
32
|
+
|-------------------------|--------|--------------------------------|
|
|
33
|
+
| `missing-markers-file` | true | Pass (no gate active) |
|
|
34
|
+
| `missing-chunks-dir` | true | Pass (run before build) |
|
|
35
|
+
| `empty-markers` | true | Pass (list is empty) |
|
|
36
|
+
| `no-chunks` | true | Pass (nothing to scan) |
|
|
37
|
+
| `clean` | true | Pass — proceed to deploy |
|
|
38
|
+
| `hits` | false | **BLOCK** — surface hits, ask for triage |
|
|
39
|
+
|
|
40
|
+
For each hit, the gate emits `{ marker, chunk, count }` so the operator sees the exact marker string, the absolute chunk path, and the number of occurrences in that chunk. Multiple hits across chunks for the same marker are reported separately.
|
|
41
|
+
|
|
42
|
+
## Programmatic surface
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
import { scanForbiddenMarkers, checkForbiddenMarkersTask } from '@a5c-ai/babysitter-library/processes/shared';
|
|
46
|
+
|
|
47
|
+
// Direct call:
|
|
48
|
+
const result = await scanForbiddenMarkers({
|
|
49
|
+
markersFile: 'scripts/forbidden-markers.txt',
|
|
50
|
+
chunksDir: '.vercel/output/static/_next/static/chunks',
|
|
51
|
+
});
|
|
52
|
+
if (!result.ok) {
|
|
53
|
+
// result.hits: Array<{ marker, chunk, count }>
|
|
54
|
+
// result.reason === 'hits'
|
|
55
|
+
process.exit(1);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Or dispatched as a babysitter task:
|
|
59
|
+
const gate = await ctx.task(checkForbiddenMarkersTask, {
|
|
60
|
+
projectDir: '.',
|
|
61
|
+
// markersFile / chunksDir are inferred from projectDir if omitted
|
|
62
|
+
});
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Reference
|
|
66
|
+
|
|
67
|
+
- Issue: https://github.com/a5c-ai/babysitter/issues/477
|
|
68
|
+
- Helper module: `library/processes/shared/forbidden-markers-scanner.js`
|
|
69
|
+
- Origin (cookbook prototype): `cookbook/scripts/check-no-forbidden.mjs` (81 lines)
|
package/skills/cleanup/SKILL.md
CHANGED
|
@@ -7,15 +7,43 @@ description: Clean up .a5c/runs and .a5c/processes directories. Aggregates insig
|
|
|
7
7
|
|
|
8
8
|
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Resolve the active process library with:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
babysitter process-library:active --json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Read `binding.dir` from that JSON and create/run the cleanup process from `cradle/cleanup-runs.js#process` relative to that active library root. Do not use plugin-cache-relative cradle paths.
|
|
11
17
|
|
|
12
18
|
Implementation notes (for the process):
|
|
13
19
|
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
20
|
+
|
|
21
|
+
CRITICAL: The cleanup MUST follow this exact phase order. Do NOT delete any run before Phase 2 completes.
|
|
22
|
+
|
|
23
|
+
Phase 1 — Scan:
|
|
24
|
+
- Scan .a5c/runs/ for all runs
|
|
25
|
+
- Classify each as terminal (completed/failed) or active (in-progress/created)
|
|
26
|
+
- Identify terminal runs older than the keep-days threshold as removal candidates
|
|
27
|
+
- Never mark active/in-progress runs for removal
|
|
28
|
+
- Count and report: total runs, terminal, active, removal candidates, disk usage
|
|
29
|
+
|
|
30
|
+
Phase 2 — Aggregate insights (BEFORE any deletion):
|
|
31
|
+
- For EVERY removal candidate, read its run.json and journal/ events
|
|
32
|
+
- Extract: processId, prompt, status, event count, created date, task summaries
|
|
33
|
+
- Group by process type and extract patterns (retry counts, convergence behavior, failure modes)
|
|
34
|
+
- Append a new dated section to docs/run-history-insights.md with:
|
|
35
|
+
- Summary statistics (runs removed, disk freed, runs retained)
|
|
36
|
+
- Run categories with counts and descriptions
|
|
37
|
+
- Key patterns observed (multi-batch convergence, retry behavior, etc.)
|
|
38
|
+
- What worked well / what didn't from the run data
|
|
39
|
+
- This file MUST be written and verified before proceeding to Phase 3
|
|
40
|
+
|
|
41
|
+
Phase 3 — Confirm removal:
|
|
42
|
+
- In interactive mode, show the user what will be removed via a breakpoint
|
|
43
|
+
- In non-interactive mode (yolo), proceed with defaults
|
|
44
|
+
- In dry-run mode, stop here and show what would be removed
|
|
45
|
+
|
|
46
|
+
Phase 4 — Remove:
|
|
47
|
+
- Delete the terminal runs older than keep-days threshold
|
|
48
|
+
- Identify and remove orphaned process files not referenced by remaining runs
|
|
49
|
+
- Show remaining run count and disk usage after cleanup
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -157,7 +157,6 @@ If it exists:
|
|
|
157
157
|
**Goal:** Inspect babysitter session files for health and detect runaway loops.
|
|
158
158
|
|
|
159
159
|
- Search for session state files using Glob:
|
|
160
|
-
- `plugins/babysitter/skills/babysit/state/*.md`
|
|
161
160
|
- `.a5c/state/*.md`
|
|
162
161
|
- `.a5c/state/*.json`
|
|
163
162
|
- For each session state file found:
|
|
@@ -261,7 +260,7 @@ Mark as PASS if total size < 500MB and no files > 10MB. Mark as WARN if total si
|
|
|
261
260
|
|
|
262
261
|
### 10a. Hook Registration
|
|
263
262
|
|
|
264
|
-
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var, or search for `
|
|
263
|
+
- Locate the plugin root. Check for `CLAUDE_PLUGIN_ROOT` env var first, or search for a babysitter `hooks.json` by walking up from the current directory.
|
|
265
264
|
- If found, read `hooks.json` and verify:
|
|
266
265
|
- A `Stop` hook entry exists with a command referencing `babysitter-stop-hook.sh`.
|
|
267
266
|
- A `SessionStart` hook entry exists with a command referencing `babysitter-session-start-hook.sh`.
|
|
@@ -316,7 +315,7 @@ If the stop hook shows NO evidence of execution (no log entries, no journal even
|
|
|
316
315
|
|
|
317
316
|
Perform these diagnostic steps in order and report the first failure found:
|
|
318
317
|
|
|
319
|
-
1. **Plugin not installed**: Check if `
|
|
318
|
+
1. **Plugin not installed**: Check if `CLAUDE_PLUGIN_ROOT` is set or if a babysitter plugin directory exists relative to the project root. If neither exists, report: "Plugin not installed — the babysitter plugin directory is missing."
|
|
320
319
|
|
|
321
320
|
2. **Plugin not enabled**: Check for Claude settings files:
|
|
322
321
|
- `~/.claude/settings.json` — look for `babysitter` in `enabledPlugins`.
|
package/skills/help/SKILL.md
CHANGED
|
@@ -234,7 +234,8 @@ SECONDARY COMMANDS
|
|
|
234
234
|
How it works: Runs npx @a5c-ai/babysitter-observer-dashboard@latest which watches
|
|
235
235
|
the .a5c/runs/ directory (or a parent directory containing multiple projects) and
|
|
236
236
|
serves a live dashboard. The process is blocking -- it runs until you stop it, and
|
|
237
|
-
it prints the local URL to share with the user.
|
|
237
|
+
it prints the local URL to share with the user. Do not use `babysitter observe`
|
|
238
|
+
as a fallback; the core Babysitter CLI does not expose that subcommand.
|
|
238
239
|
|
|
239
240
|
Example: /babysitter:observe
|
|
240
241
|
(opens browser showing all runs with live-updating task
|
package/skills/observe/SKILL.md
CHANGED
|
@@ -8,6 +8,11 @@ description: Launch the babysitter observer dashboard. Installs and runs the rea
|
|
|
8
8
|
Run the babysitter observer dashboard:
|
|
9
9
|
|
|
10
10
|
1. Determine the watch directory — this is usually the project's container directory (the parent of the project dir), or the current working directory if not specified.
|
|
11
|
-
2. Launch the dashboard: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir
|
|
11
|
+
2. Launch the standalone dashboard package: `npx -y @a5c-ai/babysitter-observer-dashboard@latest --watch-dir <dir>`.
|
|
12
12
|
3. This is a blocking process — it will keep running until stopped.
|
|
13
13
|
4. Report the URL printed by the dashboard to the user, then open it in the browser.
|
|
14
|
+
|
|
15
|
+
Do not fall back to `babysitter observe`; the core Babysitter CLI does not expose
|
|
16
|
+
that subcommand. Some harness runtimes may provide a separate
|
|
17
|
+
`agent-platform observe` surface, but this skill uses the verified standalone
|
|
18
|
+
dashboard package.
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -5,4 +5,14 @@ description: Plan a babysitter run. use this command to plan a complex workflow,
|
|
|
5
5
|
|
|
6
6
|
# plan
|
|
7
7
|
|
|
8
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). Focus on creating the best process possible, but without creating and running the actual run.
|
|
9
|
+
|
|
10
|
+
Before drafting the process, run Phase 0 -- REUSE-AUDIT: extract keyword nouns and verbs from the request, scan for matching existing migrations, API routes, environment variables, SDK dependencies, and imports, honor `.a5c/reuse-audit.json` when present, and put a `Reuse-audit findings (REVIEW BEFORE PROCEEDING)` block before Phase 1 of the plan.
|
|
11
|
+
|
|
12
|
+
## Process Shape Selection
|
|
13
|
+
|
|
14
|
+
Choose the process shape before authoring `process.js`:
|
|
15
|
+
|
|
16
|
+
- Use a flat phase list when the spec is well-defined, the work is wiring or composition, the bug class is already known if this is a fix, and execution should proceed sequentially through clear phases.
|
|
17
|
+
- Use a HYPOTHESES tree when the bug class is unknown, forensics are required, multiple causal models compete, and each hypothesis needs its own observations, falsifying observations, and follow-up phases.
|
|
18
|
+
- Rule of thumb: if the first phase is "investigate", use HYPOTHESES-tree mode. If the first phase is "implement X", use flat-phase-list mode.
|
package/skills/yolo/SKILL.md
CHANGED
|
@@ -5,4 +5,8 @@ description: Orchestrate a babysitter run. use this command to start babysitting
|
|
|
5
5
|
|
|
6
6
|
# yolo
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Run the Babysitter orchestration instructions directly through the CLI, without any user interaction or breakpoints. In Claude Code, use Bash to run `babysitter instructions:babysit-skill --harness claude-code --no-interactive`; in Codex, run `babysitter instructions:babysit-skill --harness codex --no-interactive`; in other harnesses, use the same command with that harness id. Then follow the returned instructions in this same turn until completion proof is produced. Do not stop after reading the instructions, do not invoke the Skill tool first, and use the non-interactive/no-breakpoints path when the instructions offer a mode choice.
|
|
9
|
+
|
|
10
|
+
User arguments for this command:
|
|
11
|
+
|
|
12
|
+
$ARGUMENTS
|
package/versions.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const { spawnSync } = require('child_process');
|
|
6
|
-
|
|
7
|
-
const REPO_ROOT = path.resolve(__dirname, '..', '..');
|
|
8
|
-
const syncScript = path.join(REPO_ROOT, 'scripts', 'sync-plugin-commands.cjs');
|
|
9
|
-
const args = [syncScript, '--target', 'github-copilot'];
|
|
10
|
-
|
|
11
|
-
if (process.argv.includes('--check')) {
|
|
12
|
-
args.push('--check');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const result = spawnSync(process.execPath, args, {
|
|
16
|
-
cwd: REPO_ROOT,
|
|
17
|
-
stdio: 'inherit',
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
process.exit(result.status ?? 1);
|