@a5c-ai/babysitter-opencode 5.0.1-staging.d73033a7 → 5.0.1-staging.daf8e165bc4a
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 +19 -21
- package/bin/cli.cjs +1 -191
- package/bin/cli.js +90 -49
- package/bin/install-shared.cjs +1 -478
- package/bin/install-shared.js +615 -0
- package/bin/install.cjs +1 -143
- package/bin/install.js +18 -98
- package/bin/uninstall.cjs +1 -87
- package/bin/uninstall.js +12 -34
- package/commands/blueprints.md +64 -0
- package/commands/call.md +11 -7
- package/commands/check-forbidden-markers.md +68 -0
- package/commands/cleanup.md +37 -9
- package/commands/contrib.md +31 -31
- package/commands/doctor.md +7 -8
- package/commands/forever.md +6 -6
- package/commands/help.md +246 -244
- package/commands/observe.md +17 -12
- package/commands/plan.md +17 -7
- package/commands/plugins.md +22 -255
- package/commands/project-install.md +10 -10
- package/commands/resume.md +8 -8
- package/commands/retrospect.md +55 -55
- package/commands/user-install.md +10 -10
- package/commands/yolo.md +11 -7
- package/hooks/babysitter-proxied-session-created.js +20 -212
- package/hooks/babysitter-proxied-session-created.sh +11 -0
- package/hooks/babysitter-proxied-shell-env.js +23 -145
- package/hooks/babysitter-proxied-shell-env.sh +3 -0
- package/hooks/babysitter-proxied-stop-hook.sh +3 -0
- package/hooks/babysitter-proxied-tool-execute-after.js +22 -160
- package/hooks/babysitter-proxied-tool-execute-after.sh +3 -0
- package/hooks/babysitter-proxied-tool-execute-before.js +22 -162
- package/hooks/babysitter-proxied-tool-execute-before.sh +3 -0
- package/hooks/hooks.json +14 -22
- package/package.json +21 -19
- package/plugin.json +6 -4
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/scripts/team-install.js +23 -0
- package/skills/accomplish-status/SKILL.md +8 -2
- package/skills/babysit/SKILL.md +35 -10
- package/skills/blueprints/SKILL.md +66 -0
- 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 +7 -8
- package/skills/help/SKILL.md +13 -11
- package/skills/observe/SKILL.md +7 -2
- package/skills/plan/SKILL.md +11 -1
- package/skills/plugins/SKILL.md +12 -245
- package/skills/yolo/SKILL.md +5 -1
- package/versions.json +2 -2
- package/hooks/babysitter-proxied-session-idle.js +0 -173
- package/hooks/hooks.json.legacy +0 -46
- package/hooks/proxied-hooks.json +0 -47
- package/hooks/session-created.js +0 -182
- package/hooks/session-idle.js +0 -124
- package/hooks/shell-env.js +0 -88
- package/hooks/tool-execute-after.js +0 -107
- package/hooks/tool-execute-before.js +0 -109
- package/scripts/sync-command-docs.cjs +0 -107
- package/scripts/sync-command-surfaces.js +0 -52
|
@@ -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`.
|
|
@@ -363,13 +362,13 @@ Mark as FAIL if:
|
|
|
363
362
|
- Parse the output and inspect the `resolvedFrom` field. Classify as follows:
|
|
364
363
|
- `resolvedFrom: "pid-marker"` → mark as PASS ("Session ID derives from the live Claude Code ancestor process -- authoritative").
|
|
365
364
|
- `resolvedFrom: "env-file"` → mark as PASS with a note ("CLAUDE_ENV_FILE was used; typically healthy").
|
|
366
|
-
- `resolvedFrom: "env-var"` → mark as WARN ("`
|
|
367
|
-
- Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset
|
|
365
|
+
- `resolvedFrom: "env-var"` → mark as WARN ("`AGENT_SESSION_ID` is set without a corroborating PID marker. Likely stale from a prior Claude Code session -- see GitHub issue #130").
|
|
366
|
+
- Remediation: run `babysitter session:cleanup` and start a fresh Claude Code session, or `unset AGENT_SESSION_ID` before invoking babysitter.
|
|
368
367
|
- `resolvedFrom: "none"` → mark as ERROR ("No session ID resolvable. Either no session-start hook fired, or the ancestor walk failed").
|
|
369
368
|
|
|
370
369
|
**Env-var shadow check:**
|
|
371
370
|
- Independently inspect `envVarPresent` and `envVarMatches` in the output.
|
|
372
|
-
- If `envVarPresent && !envVarMatches`, mark as WARN ("`
|
|
371
|
+
- If `envVarPresent && !envVarMatches`, mark as WARN ("`AGENT_SESSION_ID` in env does not match the resolved session ID; a stale value is shadowing the authoritative one. Unset the env var").
|
|
373
372
|
|
|
374
373
|
---
|
|
375
374
|
|
|
@@ -391,7 +390,7 @@ Mark as FAIL if:
|
|
|
391
390
|
|
|
392
391
|
- Enumerate files in `~/.a5c/` matching the pattern `current-session-*-pid-*`.
|
|
393
392
|
- Count markers per harness (derived from the filename).
|
|
394
|
-
- If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `
|
|
393
|
+
- If more than one live marker exists for the same harness, mark as INFO ("Multiple live Claude Code / harness sessions detected; ensure each shell scopes `AGENT_SESSION_ID` appropriately -- the PID marker handles this automatically").
|
|
395
394
|
- Otherwise mark as PASS.
|
|
396
395
|
|
|
397
396
|
---
|
|
@@ -502,7 +501,7 @@ babysitter session:cleanup --dry-run # preview
|
|
|
502
501
|
babysitter session:cleanup # apply
|
|
503
502
|
|
|
504
503
|
# 2. Unset a stale env var
|
|
505
|
-
unset
|
|
504
|
+
unset AGENT_SESSION_ID
|
|
506
505
|
|
|
507
506
|
# 3. Re-bind a run explicitly if needed
|
|
508
507
|
babysitter session:resume --session-id <fresh-id> --state-dir ~/.a5c --run-id <runId> --runs-dir .a5c/runs
|
package/skills/help/SKILL.md
CHANGED
|
@@ -180,13 +180,13 @@ SECONDARY COMMANDS
|
|
|
180
180
|
a fuzzy comparison step before strict assertion. Implement this fix?")
|
|
181
181
|
|
|
182
182
|
|
|
183
|
-
/babysitter:
|
|
184
|
-
Manage
|
|
185
|
-
update, configure, uninstall, or create new
|
|
186
|
-
instruction packages
|
|
187
|
-
configure, and uninstall steps
|
|
183
|
+
/babysitter:blueprints [action]
|
|
184
|
+
Manage Babysitter blueprints: list installed blueprints, browse marketplaces,
|
|
185
|
+
install, update, configure, uninstall, or create new blueprints. Blueprints are
|
|
186
|
+
version-managed instruction packages or process bundles that guide the agent
|
|
187
|
+
through install, configure, and uninstall steps.
|
|
188
188
|
|
|
189
|
-
Without arguments: shows installed
|
|
189
|
+
Without arguments: shows installed blueprints (name, version, marketplace, dates) and
|
|
190
190
|
available marketplaces. With arguments: routes to the specific action.
|
|
191
191
|
|
|
192
192
|
Key actions:
|
|
@@ -194,11 +194,11 @@ SECONDARY COMMANDS
|
|
|
194
194
|
- configure <name> --global|--project: fetch configure.md and walk through options
|
|
195
195
|
- update <name> --global|--project: resolve migration chain via BFS and apply steps
|
|
196
196
|
- uninstall <name> --global|--project: fetch uninstall.md and execute removal
|
|
197
|
-
- create: scaffold a new
|
|
197
|
+
- create: scaffold a new blueprint package
|
|
198
198
|
|
|
199
|
-
Example: /babysitter:
|
|
199
|
+
Example: /babysitter:blueprints install sound-hooks --project
|
|
200
200
|
(fetches sound-hooks from marketplace, reads install.md, walks you through player
|
|
201
|
-
detection, sound selection, hook configuration, and registers
|
|
201
|
+
detection, sound selection, hook configuration, and registers the blueprint)
|
|
202
202
|
|
|
203
203
|
|
|
204
204
|
/babysitter:contrib [feedback]
|
|
@@ -231,9 +231,11 @@ SECONDARY COMMANDS
|
|
|
231
231
|
effect status in your browser. Useful when running /yolo or /forever to watch
|
|
232
232
|
progress without interrupting the run.
|
|
233
233
|
|
|
234
|
-
How it works: Runs npx @
|
|
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
|
-
serves a live dashboard. The process is blocking -- it runs until you stop it
|
|
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. Do not use `babysitter observe`
|
|
238
|
+
as a fallback; the core Babysitter CLI does not expose that subcommand.
|
|
237
239
|
|
|
238
240
|
Example: /babysitter:observe
|
|
239
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
|
-
4.
|
|
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/plugins/SKILL.md
CHANGED
|
@@ -1,257 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plugins
|
|
3
|
-
description:
|
|
3
|
+
description: deprecated alias for the Babysitter blueprints command. Use /babysitter:blueprints for marketplace installables.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# plugins
|
|
7
7
|
|
|
8
|
-
This command
|
|
8
|
+
This command is a deprecated alias for `/babysitter:blueprints`.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
if there are no marketplaces added, add the default marketplace:
|
|
12
|
-
```bash
|
|
13
|
-
babysitter plugin:add-marketplace --marketplace-url https://github.com/a5c-ai/babysitter --marketplace-path plugins/a5c/marketplace/marketplace.json --global --json
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Plugins can be installed at two scopes:
|
|
17
|
-
- **global** (`--global`): stored under `~/.a5c/`, available for all projects
|
|
18
|
-
- **project** (`--project`): stored under `<projectDir>/.a5c/`, project-specific
|
|
19
|
-
|
|
20
|
-
## Marketplace Management
|
|
21
|
-
|
|
22
|
-
Marketplaces are git repositories containing a `marketplace.json` manifest and plugin package directories. The SDK clones them locally with `--depth 1`.
|
|
23
|
-
|
|
24
|
-
**Storage locations:**
|
|
25
|
-
- Global: `~/.a5c/marketplaces/<name>/`
|
|
26
|
-
- Project: `<projectDir>/.a5c/marketplaces/<name>/`
|
|
27
|
-
|
|
28
|
-
The marketplace name is derived from the git URL's last path segment (stripping `.git` suffix and trailing slashes).
|
|
29
|
-
|
|
30
|
-
### Adding a marketplace
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
babysitter plugin:add-marketplace --marketplace-url <url> [--marketplace-path <relative-path>] [--marketplace-branch <ref>] [--force] --global|--project [--json]
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Clones the marketplace repository to the local marketplaces directory. Use `--marketplace-path` to specify the relative path to `marketplace.json` within the repo (for monorepos or repos where the manifest is not at the root). Use `--marketplace-branch` to clone a specific branch, tag, or ref (defaults to the repo's default branch). Use `--force` to replace an existing marketplace clone (deletes and re-clones).
|
|
37
|
-
|
|
38
|
-
### Updating a marketplace
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
babysitter plugin:update-marketplace --marketplace-name <name> [--marketplace-branch <ref>] --global|--project [--json]
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Runs `git pull` on the local marketplace clone to fetch latest changes. Use `--marketplace-branch` to switch to a different branch before pulling (works even with shallow clones).
|
|
45
|
-
|
|
46
|
-
### Listing plugins in a marketplace
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
babysitter plugin:list-plugins --marketplace-name <name> --global|--project [--json]
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Reads the `marketplace.json` manifest and returns all available plugins sorted alphabetically by name. Each entry includes: name, description, latestVersion, versions array, packagePath, tags, and author.
|
|
53
|
-
|
|
54
|
-
## Plugin Installation
|
|
55
|
-
|
|
56
|
-
**Note:** For `plugin:install`, `plugin:update`, `plugin:configure`, and `plugin:list-plugins`, the `--marketplace-name` flag is auto-detected when only one marketplace is cloned for the given scope. You can omit it if there's only one marketplace.
|
|
57
|
-
|
|
58
|
-
### Flow
|
|
59
|
-
|
|
60
|
-
1. Update the marketplace: `babysitter plugin:update-marketplace --marketplace-name <name> --global|--project`
|
|
61
|
-
2. Check current state: `babysitter plugin:list-installed --global|--project` to see installed plugins and versions
|
|
62
|
-
3. Install the plugin:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
babysitter plugin:install --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
This command resolves the plugin package path from the marketplace manifest, reads `install.md` from the plugin package directory, and returns the installation instructions. If an `install-process.js` file exists, the instructions may reference it as an automated install process.
|
|
69
|
-
|
|
70
|
-
4. The agent performs the installation steps as defined in `install.md`
|
|
71
|
-
5. The agent updates the registry:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
babysitter plugin:update-registry --plugin-name <name> --plugin-version <ver> --marketplace-name <mp> --global|--project [--json]
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Plugin Update (with migrations)
|
|
10
|
+
For Babysitter marketplace installables, use blueprints terminology and the `babysitter blueprint:*` CLI command family:
|
|
78
11
|
|
|
79
12
|
```bash
|
|
80
|
-
babysitter
|
|
13
|
+
babysitter blueprint:list-installed --global|--project [--json]
|
|
14
|
+
babysitter blueprint:add-marketplace --marketplace-url <url> [--marketplace-path <relative-path>] --global|--project [--json]
|
|
15
|
+
babysitter blueprint:list-plugins --marketplace-name <name> --global|--project [--json]
|
|
16
|
+
babysitter blueprint:install --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
17
|
+
babysitter blueprint:update --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
18
|
+
babysitter blueprint:configure --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
19
|
+
babysitter blueprint:uninstall --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
81
20
|
```
|
|
82
21
|
|
|
83
|
-
|
|
84
|
-
1. Reads the currently installed version from the registry
|
|
85
|
-
2. Resolves the latest version from the marketplace manifest
|
|
86
|
-
3. Looks in the plugin package's `migrations/` directory for migration files
|
|
87
|
-
4. Uses BFS over the migration graph to find the shortest path from the installed version to the target version
|
|
88
|
-
5. Returns the ordered migration instructions (content of each migration file in sequence)
|
|
89
|
-
|
|
90
|
-
**Migration filename format:** `<fromVersion>_to_<toVersion>.<ext>` where:
|
|
91
|
-
- Versions may contain alphanumerics, dots, dashes (e.g. `1.0.0`, `2.0.0-beta`)
|
|
92
|
-
- Extensions: `.md` for markdown instructions, `.js` for executable process files
|
|
93
|
-
- Examples: `1.0.0_to_1.1.0.md`, `2.0.0-beta_to_2.0.0.js`
|
|
94
|
-
|
|
95
|
-
After performing the migration steps, update the registry:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
babysitter plugin:update-registry --plugin-name <name> --plugin-version <new-ver> --marketplace-name <mp> --global|--project [--json]
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Plugin Uninstallation
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
babysitter plugin:uninstall --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
Reads `uninstall.md` from the plugin package directory and returns the uninstall instructions. After performing the uninstall steps, remove from registry:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
babysitter plugin:remove-from-registry --plugin-name <name> --global|--project [--json]
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Plugin Configuration
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
babysitter plugin:configure --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Reads `configure.md` from the plugin package directory and returns configuration instructions.
|
|
120
|
-
|
|
121
|
-
## Registry Management
|
|
122
|
-
|
|
123
|
-
The plugin registry (`plugin-registry.json`) tracks installed plugins with schema version `2026.01.plugin-registry-v1`. Writes use atomic file operations (temp + rename) for crash safety.
|
|
124
|
-
|
|
125
|
-
**Storage locations:**
|
|
126
|
-
- Global: `~/.a5c/plugin-registry.json`
|
|
127
|
-
- Project: `<projectDir>/.a5c/plugin-registry.json`
|
|
128
|
-
|
|
129
|
-
### List installed plugins
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
babysitter plugin:list-installed --global|--project [--json]
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Returns all installed plugins sorted alphabetically. In `--json` mode, returns an array of registry entries. In human mode, displays a formatted table with name, version, marketplace, and timestamps.
|
|
136
|
-
|
|
137
|
-
### Remove from registry
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
babysitter plugin:remove-from-registry --plugin-name <name> --global|--project [--json]
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Removes a plugin entry from the registry. Returns error if the plugin is not present.
|
|
144
|
-
|
|
145
|
-
## Plugin Creation
|
|
146
|
-
|
|
147
|
-
To create a new plugin package from scratch, use the `meta/plugin-creation` babysitter process. This process guides you through requirements analysis, structure design, instruction authoring, optional process file generation, validation, and marketplace integration.
|
|
148
|
-
|
|
149
|
-
### Using the plugin creation process
|
|
150
|
-
|
|
151
|
-
Orchestrate a babysitter run with the plugin creation process:
|
|
152
|
-
|
|
153
|
-
```bash
|
|
154
|
-
# Create inputs file
|
|
155
|
-
cat > /tmp/plugin-inputs.json << 'EOF'
|
|
156
|
-
{
|
|
157
|
-
"pluginName": "my-plugin",
|
|
158
|
-
"description": "What the plugin does — be specific about install/configure/uninstall behavior",
|
|
159
|
-
"scope": "project",
|
|
160
|
-
"outputDir": "./plugins",
|
|
161
|
-
"components": {
|
|
162
|
-
"installProcess": false,
|
|
163
|
-
"configureProcess": false,
|
|
164
|
-
"uninstallProcess": false,
|
|
165
|
-
"migrations": false,
|
|
166
|
-
"processFiles": false
|
|
167
|
-
},
|
|
168
|
-
"marketplace": {
|
|
169
|
-
"name": "my-marketplace",
|
|
170
|
-
"author": "my-org",
|
|
171
|
-
"tags": ["category1", "category2"]
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
EOF
|
|
175
|
-
|
|
176
|
-
# Create and run
|
|
177
|
-
babysitter run:create \
|
|
178
|
-
--process-id meta/plugin-creation \
|
|
179
|
-
--entry library/specializations/meta/plugin-creation.js#process \
|
|
180
|
-
--inputs /tmp/plugin-inputs.json \
|
|
181
|
-
--prompt "Create a new babysitter plugin package" \
|
|
182
|
-
--json
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### What the process generates
|
|
186
|
-
|
|
187
|
-
The process creates a complete plugin package directory:
|
|
188
|
-
|
|
189
|
-
| File | Description |
|
|
190
|
-
|------|-------------|
|
|
191
|
-
| `install.md` | Agent-readable installation instructions with numbered steps |
|
|
192
|
-
| `uninstall.md` | Reversal instructions for clean removal |
|
|
193
|
-
| `configure.md` | Configuration options table and adjustment instructions |
|
|
194
|
-
| `install-process.js` | *(optional)* Automated babysitter process for complex install steps |
|
|
195
|
-
| `configure-process.js` | *(optional)* Automated configuration process |
|
|
196
|
-
| `process/main.js` | *(optional)* Main process the plugin contributes |
|
|
197
|
-
| `marketplace-entry.json` | Ready-to-use marketplace.json entry for publishing |
|
|
198
|
-
|
|
199
|
-
### Process phases
|
|
200
|
-
|
|
201
|
-
1. **Requirements Analysis** — Analyzes plugin purpose, prerequisites, config options, file structure
|
|
202
|
-
2. **Structure Design** — Plans directory layout and file inventory (with review breakpoint)
|
|
203
|
-
3. **Instruction Authoring** — Writes install.md, uninstall.md, configure.md
|
|
204
|
-
4. **Process Files** — Creates optional babysitter process files (install-process.js, configure-process.js, process/main.js)
|
|
205
|
-
5. **Validation** — Verifies package completeness, instruction quality, path correctness
|
|
206
|
-
6. **Marketplace Integration** — Generates marketplace.json entry for publishing
|
|
207
|
-
|
|
208
|
-
### Quick creation (without orchestration)
|
|
209
|
-
|
|
210
|
-
For simple plugins that only need instruction files, you can create the package manually following the structure below and the [Plugin Author Guide](docs/plugins/plugin-author-guide.md).
|
|
211
|
-
|
|
212
|
-
## Plugin Package Structure
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
my-plugin/
|
|
216
|
-
package.json # Optional (name field used as plugin ID, falls back to directory name)
|
|
217
|
-
install.md # Markdown instructions for installation
|
|
218
|
-
uninstall.md # Markdown instructions for removal
|
|
219
|
-
configure.md # Markdown instructions for configuration
|
|
220
|
-
install-process.js # Optional automated install process
|
|
221
|
-
uninstall-process.js # Optional automated uninstall process
|
|
222
|
-
configure-process.js # Optional automated configure process
|
|
223
|
-
migrations/ # Version migration files
|
|
224
|
-
1.0.0_to_1.1.0.md
|
|
225
|
-
1.1.0_to_2.0.0.js
|
|
226
|
-
process/ # Process definition files (collected recursively)
|
|
227
|
-
main.js
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## All CLI Commands Summary
|
|
231
|
-
|
|
232
|
-
All commands accept `--json` for machine-readable output and `--global|--project`.
|
|
233
|
-
|
|
234
|
-
| Command | Required Flags | Description |
|
|
235
|
-
|---------|---------------|-------------|
|
|
236
|
-
| `plugin:add-marketplace` | `--marketplace-url`, `--global\|--project` [`--marketplace-path`, `--marketplace-branch`, `--force`] | Clone a marketplace repository |
|
|
237
|
-
| `plugin:update-marketplace` | `--marketplace-name`, `--global\|--project` [`--marketplace-branch`] | Pull latest marketplace changes (optionally switch branch) |
|
|
238
|
-
| `plugin:list-plugins` | `--marketplace-name`, `--global\|--project` | List available plugins in a marketplace |
|
|
239
|
-
| `plugin:install` | `--plugin-name`, `--marketplace-name`, `--global\|--project` | Get install instructions for a plugin |
|
|
240
|
-
| `plugin:uninstall` | `--plugin-name`, `--marketplace-name`, `--global\|--project` | Get uninstall instructions for a plugin |
|
|
241
|
-
| `plugin:update` | `--plugin-name`, `--marketplace-name`, `--global\|--project` | Resolve migration chain and get update instructions |
|
|
242
|
-
| `plugin:configure` | `--plugin-name`, `--marketplace-name`, `--global\|--project` | Get configuration instructions for a plugin |
|
|
243
|
-
| `plugin:list-installed` | `--global\|--project` | List all installed plugins |
|
|
244
|
-
| `plugin:update-registry` | `--plugin-name`, `--plugin-version`, `--marketplace-name`, `--global\|--project` | Register or update a plugin entry |
|
|
245
|
-
| `plugin:remove-from-registry` | `--plugin-name`, `--global\|--project` | Remove a plugin entry from the registry |
|
|
246
|
-
|
|
247
|
-
## After Plugin Work: Contribute Back
|
|
248
|
-
|
|
249
|
-
After working with plugins, prompt the user to share improvements or report issues:
|
|
250
|
-
|
|
251
|
-
- **Improved a plugin's install/configure/uninstall instructions**: `/babysitter:contrib library contribution: improved [plugin-name] [install|configure|uninstall] instructions`
|
|
252
|
-
- **Created a new plugin**: `/babysitter:contrib library contribution: new plugin [plugin-name] -- [description]`
|
|
253
|
-
- **Found a bug in a plugin or the plugin system**: `/babysitter:contrib bug report: [description, e.g. "plugin:update-registry fails when marketplace hasn't been cloned"]`
|
|
254
|
-
- **Plugin install/configure instructions were confusing or wrong**: `/babysitter:contrib bug report: [plugin-name] install instructions [description of what was wrong]`
|
|
255
|
-
- **Have an idea for a new plugin**: `/babysitter:contrib feature request: plugin idea -- [description]`
|
|
22
|
+
The `--plugin-name` flag remains for CLI compatibility with existing marketplace manifests. Describe the installable as a blueprint in user-facing text.
|
|
256
23
|
|
|
257
|
-
|
|
24
|
+
Agent harness plugins are not renamed. `CLAUDE_PLUGIN_ROOT`, `PI_PLUGIN_ROOT`, `.claude/plugins/`, hooks-mux, extension-mux, and agent plugin manifests remain plugin concepts.
|
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. Use Bash to run `babysitter instructions:babysit-skill --harness opencode --no-interactive`, 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