@a5c-ai/babysitter-github 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 +33 -25
- package/bin/cli.js +14 -26
- package/bin/install-shared.js +398 -215
- package/bin/install.js +49 -89
- package/bin/uninstall.js +30 -60
- 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-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.ps1 +10 -114
- package/hooks/babysitter-proxied-session-end.sh +2 -111
- package/hooks/babysitter-proxied-session-start.ps1 +10 -187
- package/hooks/babysitter-proxied-session-start.sh +6 -168
- package/hooks/babysitter-proxied-user-prompt-submitted.ps1 +10 -90
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +2 -86
- package/hooks.json +33 -9
- package/package.json +20 -21
- package/plugin.json +7 -6
- package/scripts/create-release-tag.mjs +18 -0
- package/scripts/publish-from-tag.mjs +41 -0
- package/scripts/team-install.js +14 -84
- package/skills/babysit/SKILL.md +32 -46
- 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 +49 -0
- package/skills/contrib/SKILL.md +34 -0
- package/skills/doctor/SKILL.md +7 -8
- package/skills/forever/SKILL.md +8 -0
- 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 +24 -0
- package/skills/project-install/SKILL.md +18 -0
- package/skills/yolo/SKILL.md +12 -0
- package/versions.json +2 -1
- package/.github/plugin.json +0 -25
- package/hooks/proxied-hooks.json +0 -29
- package/hooks/session-end.ps1 +0 -69
- package/hooks/session-end.sh +0 -54
- package/hooks/session-start.ps1 +0 -111
- package/hooks/session-start.sh +0 -101
- package/hooks/user-prompt-submitted.ps1 +0 -52
- package/hooks/user-prompt-submitted.sh +0 -31
- package/scripts/sync-command-surfaces.js +0 -62
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: blueprints
|
|
3
|
+
description: manage Babysitter blueprints. Use this command to list installed blueprints, browse marketplaces, install, update, uninstall, configure, or create a new blueprint.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# blueprints
|
|
7
|
+
|
|
8
|
+
This command installs and manages Babysitter blueprints. A blueprint is a version-managed package of contextual instructions or deterministic Babysitter processes, not a conventional software plugin.
|
|
9
|
+
|
|
10
|
+
If the command is run without arguments, list installed blueprints with their name, version, marketplace, installation date, and last update date. Also list configured marketplaces and show how to add the default marketplace when none exist.
|
|
11
|
+
|
|
12
|
+
Blueprints can be installed at two scopes:
|
|
13
|
+
|
|
14
|
+
- **global** (`--global`): stored under `~/.a5c/`, available for all projects
|
|
15
|
+
- **project** (`--project`): stored under `<projectDir>/.a5c/`, project-specific
|
|
16
|
+
|
|
17
|
+
## Marketplace Management
|
|
18
|
+
|
|
19
|
+
Marketplaces are git repositories containing a `marketplace.json` manifest and blueprint package directories. The SDK clones new marketplaces to `.a5c/blueprints/marketplaces/` for the selected scope and reads legacy `.a5c/marketplaces/` clones for compatibility.
|
|
20
|
+
|
|
21
|
+
### Add a marketplace
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
babysitter blueprint:add-marketplace --marketplace-url <url> [--marketplace-path <relative-path>] [--marketplace-branch <ref>] [--force] --global|--project [--json]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Update a marketplace
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
babysitter blueprint:update-marketplace --marketplace-name <name> [--marketplace-branch <ref>] --global|--project [--json]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### List blueprints in a marketplace
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
babysitter blueprint:list-plugins --marketplace-name <name> --global|--project [--json]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Blueprint Lifecycle
|
|
40
|
+
|
|
41
|
+
For `blueprint:install`, `blueprint:update`, `blueprint:configure`, and `blueprint:list-plugins`, the `--marketplace-name` flag is auto-detected when only one marketplace is cloned for the selected scope.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
babysitter blueprint:install --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
45
|
+
babysitter blueprint:update --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
46
|
+
babysitter blueprint:configure --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
47
|
+
babysitter blueprint:uninstall --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The `--plugin-name` flag is preserved for CLI compatibility with existing marketplace manifests. User-facing docs should call the installable a blueprint.
|
|
51
|
+
|
|
52
|
+
## Registry Management
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
babysitter blueprint:list-installed --global|--project [--json]
|
|
56
|
+
babysitter blueprint:update-registry --plugin-name <name> --plugin-version <ver> --marketplace-name <mp> --global|--project [--json]
|
|
57
|
+
babysitter blueprint:remove-from-registry --plugin-name <name> --global|--project [--json]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Deprecated Aliases
|
|
61
|
+
|
|
62
|
+
The old `plugin:*` commands remain available as deprecated aliases for one release. Prefer `blueprint:*` in new docs, skills, and process instructions.
|
|
63
|
+
|
|
64
|
+
## Agent Plugins Are Separate
|
|
65
|
+
|
|
66
|
+
Do not rename or reinterpret agent harness plugins while handling blueprints. `CLAUDE_PLUGIN_ROOT`, `PI_PLUGIN_ROOT`, `.claude/plugins/`, hooks-mux, extension-mux, and agent plugin manifests stay plugin-specific.
|
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)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cleanup
|
|
3
|
+
description: Clean up .a5c/runs and .a5c/processes directories. Aggregates insights from completed/failed runs into docs/run-history-insights.md, then removes old run data and orphaned process files.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# cleanup
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
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.
|
|
17
|
+
|
|
18
|
+
Implementation notes (for the process):
|
|
19
|
+
- Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
|
|
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
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: contrib
|
|
3
|
+
description: Submit feedback or contribute to babysitter project
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# contrib
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
10
|
+
## Process Routing
|
|
11
|
+
|
|
12
|
+
Contribution processes live under the active process library's `cradle/` directory. Resolve the active library root with `babysitter process-library:active --json` and route based on arguments:
|
|
13
|
+
|
|
14
|
+
### Issue-based (opens a GitHub issue in a5c-ai/babysitter)
|
|
15
|
+
* **Bug report** → `cradle/bug-report.js#process` — Report a bug in the SDK, CLI, process library, etc.
|
|
16
|
+
* **Feature request** → `cradle/feature-request.js#process` — Request a new feature or enhancement
|
|
17
|
+
* **Documentation question** → `cradle/documentation-question.js#process` — Ask about undocumented behavior or missing docs
|
|
18
|
+
|
|
19
|
+
### PR-based (forks repo, creates branch, submits PR to a5c-ai/babysitter)
|
|
20
|
+
* **Bugfix** → `cradle/bugfix.js#process` — User already has the fix for a bug
|
|
21
|
+
* **Feature implementation** → `cradle/feature-implementation-contribute.js#process` — User already has a feature implementation
|
|
22
|
+
* **Harness integration** → `cradle/feature-harness-integration-contribute.js#process` — User has a harness (CI/CD, IDE, editor) integration
|
|
23
|
+
* **Library contribution** → `cradle/library-contribution.js#process` — New or improved process/skill/subagent for the library
|
|
24
|
+
* **Documentation answer** → `cradle/documentation-contribute-answer.js#process` — User has an answer for an unanswered docs question
|
|
25
|
+
|
|
26
|
+
### Router (when arguments are empty or general)
|
|
27
|
+
* **Contribute** → `cradle/contribute.js#process` — Explains contribution types and routes to the specific process
|
|
28
|
+
|
|
29
|
+
## Contribution Rules
|
|
30
|
+
|
|
31
|
+
* PR-based contributions: fork the babysitter repo (a5c-ai/babysitter) for the user, ask to star if not already starred, perform changes, submit PR
|
|
32
|
+
* Issue-based contributions: gather details, search for duplicates, review, then open an issue in a5c-ai/babysitter
|
|
33
|
+
* Add breakpoints (permissions) before ALL gh actions (fork, star, submit PR/issue) to allow user review and cancellation
|
|
34
|
+
* If arguments are empty: use the `contribute.js` router process to show options and route accordingly
|
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
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forever
|
|
3
|
+
description: Use this command to start babysitting a never-ending babysitter run.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# forever
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md). but create a process that uses an infinte loop and a ctx.sleep to create a never-ending babysitter loop. an example of such process is a daily process that reads new support ticket every day and tries to resolve them, then sleeps for 4 hours and repeats the process.
|
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.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plugins
|
|
3
|
+
description: deprecated alias for the Babysitter blueprints command. Use /babysitter:blueprints for marketplace installables.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# plugins
|
|
7
|
+
|
|
8
|
+
This command is a deprecated alias for `/babysitter:blueprints`.
|
|
9
|
+
|
|
10
|
+
For Babysitter marketplace installables, use blueprints terminology and the `babysitter blueprint:*` CLI command family:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
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]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The `--plugin-name` flag remains for CLI compatibility with existing marketplace manifests. Describe the installable as a blueprint in user-facing text.
|
|
23
|
+
|
|
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.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-install
|
|
3
|
+
description: Set up a project for babysitting. Guides you through onboarding a new or existing project — researches the codebase, interviews you about goals and workflows, builds the project profile, installs the best tools, and optionally configures CI/CD integration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# project-install
|
|
7
|
+
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
10
|
+
Before using the process library, resolve the active library root through the SDK CLI. If no binding exists yet, initialize the shared global SDK binding with:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
babysitter process-library:active --json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then use the `cradle/project-install` process from the active process library.
|
|
17
|
+
|
|
18
|
+
When the run completes, end with a friendly message that includes a polite and humorous ask to star the repo on GitHub: https://github.com/a5c-ai/babysitter
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yolo
|
|
3
|
+
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# yolo
|
|
7
|
+
|
|
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 github-copilot --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
package/.github/plugin.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "babysitter",
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"description": "Orchestrate complex, multi-step workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop approval -- powered by the Babysitter SDK",
|
|
5
|
-
"author": { "name": "a5c.ai", "email": "support@a5c.ai" },
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"skills": "skills/",
|
|
8
|
-
"hooks": "hooks.json",
|
|
9
|
-
"commands": "commands/",
|
|
10
|
-
"agents": "AGENTS.md",
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/a5c-ai/babysitter"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"orchestration",
|
|
17
|
-
"workflow",
|
|
18
|
-
"automation",
|
|
19
|
-
"event-sourced",
|
|
20
|
-
"hooks",
|
|
21
|
-
"github-copilot",
|
|
22
|
-
"agent",
|
|
23
|
-
"LLM"
|
|
24
|
-
]
|
|
25
|
-
}
|
package/hooks/proxied-hooks.json
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_comment": "NOT ACTIVE — Alternative hook registration using per-hook unified scripts with hooks-proxy support. To activate, update the harness plugin configuration to reference these scripts.",
|
|
3
|
-
"hooks": {
|
|
4
|
-
"sessionStart": [
|
|
5
|
-
{
|
|
6
|
-
"type": "command",
|
|
7
|
-
"bash": "bash \"./hooks/babysitter-proxied-session-start.sh\"",
|
|
8
|
-
"powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-session-start.ps1\"",
|
|
9
|
-
"timeoutSec": 30
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"sessionEnd": [
|
|
13
|
-
{
|
|
14
|
-
"type": "command",
|
|
15
|
-
"bash": "bash \"./hooks/babysitter-proxied-session-end.sh\"",
|
|
16
|
-
"powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-session-end.ps1\"",
|
|
17
|
-
"timeoutSec": 30
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"userPromptSubmitted": [
|
|
21
|
-
{
|
|
22
|
-
"type": "command",
|
|
23
|
-
"bash": "bash \"./hooks/babysitter-proxied-user-prompt-submitted.sh\"",
|
|
24
|
-
"powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/babysitter-proxied-user-prompt-submitted.ps1\"",
|
|
25
|
-
"timeoutSec": 15
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
}
|
package/hooks/session-end.ps1
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# Babysitter Session End Hook for GitHub Copilot CLI (PowerShell)
|
|
2
|
-
# Cleanup and logging on session exit.
|
|
3
|
-
#
|
|
4
|
-
# NOTE: Unlike Claude Code's Stop hook, sessionEnd output is IGNORED by
|
|
5
|
-
# Copilot CLI. This hook cannot block session exit or drive an orchestration
|
|
6
|
-
# loop. It is purely for cleanup and logging.
|
|
7
|
-
|
|
8
|
-
$ErrorActionPreference = "Continue"
|
|
9
|
-
|
|
10
|
-
$PluginRoot = if ($env:COPILOT_PLUGIN_DIR) { $env:COPILOT_PLUGIN_DIR } else { Split-Path -Parent $PSScriptRoot }
|
|
11
|
-
|
|
12
|
-
# Resolve babysitter CLI
|
|
13
|
-
$hasBabysitter = [bool](Get-Command babysitter -ErrorAction SilentlyContinue)
|
|
14
|
-
$useFallback = $false
|
|
15
|
-
|
|
16
|
-
if (-not $hasBabysitter) {
|
|
17
|
-
$localBin = Join-Path $env:USERPROFILE ".local\bin\babysitter.cmd"
|
|
18
|
-
if (Test-Path $localBin) {
|
|
19
|
-
$env:PATH = "$(Split-Path $localBin);$env:PATH"
|
|
20
|
-
$hasBabysitter = $true
|
|
21
|
-
} else {
|
|
22
|
-
$versionsFile = Join-Path $PluginRoot "versions.json"
|
|
23
|
-
try {
|
|
24
|
-
$SdkVersion = (Get-Content $versionsFile -Raw | ConvertFrom-Json).sdkVersion
|
|
25
|
-
if (-not $SdkVersion) { $SdkVersion = "latest" }
|
|
26
|
-
} catch {
|
|
27
|
-
$SdkVersion = "latest"
|
|
28
|
-
}
|
|
29
|
-
$useFallback = $true
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
$GlobalRoot = if ($env:BABYSITTER_GLOBAL_STATE_DIR) { $env:BABYSITTER_GLOBAL_STATE_DIR } else { Join-Path $HOME ".a5c" }
|
|
34
|
-
$LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $GlobalRoot "logs" }
|
|
35
|
-
$LogFile = Join-Path $LogDir "babysitter-session-end-hook.log"
|
|
36
|
-
New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
|
|
37
|
-
|
|
38
|
-
function Write-Blog {
|
|
39
|
-
param([string]$Message)
|
|
40
|
-
$ts = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
|
|
41
|
-
Add-Content -Path $LogFile -Value "[INFO] $ts $Message" -ErrorAction SilentlyContinue
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
Write-Blog "Hook script invoked"
|
|
45
|
-
Write-Blog "PLUGIN_ROOT=$PluginRoot"
|
|
46
|
-
|
|
47
|
-
# Capture stdin
|
|
48
|
-
$InputFile = [System.IO.Path]::GetTempFileName()
|
|
49
|
-
$input | Out-File -FilePath $InputFile -Encoding utf8
|
|
50
|
-
|
|
51
|
-
Write-Blog "Hook input received"
|
|
52
|
-
|
|
53
|
-
$stderrLog = Join-Path $LogDir "babysitter-session-end-hook-stderr.log"
|
|
54
|
-
|
|
55
|
-
try {
|
|
56
|
-
if ($useFallback) {
|
|
57
|
-
Get-Content $InputFile | & npx -y "@a5c-ai/babysitter-sdk@$SdkVersion" hook:run --hook-type session-end --harness github-copilot --plugin-root $PluginRoot --json 2>$stderrLog | Out-Null
|
|
58
|
-
} elseif ($hasBabysitter) {
|
|
59
|
-
Get-Content $InputFile | & babysitter hook:run --hook-type session-end --harness github-copilot --plugin-root $PluginRoot --json 2>$stderrLog | Out-Null
|
|
60
|
-
}
|
|
61
|
-
} catch {
|
|
62
|
-
Write-Blog "Hook error: $_"
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
Write-Blog "Session end hook complete"
|
|
66
|
-
|
|
67
|
-
Remove-Item $InputFile -Force -ErrorAction SilentlyContinue
|
|
68
|
-
|
|
69
|
-
exit 0
|
package/hooks/session-end.sh
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Babysitter Session End Hook for GitHub Copilot CLI
|
|
3
|
-
# Cleanup and logging on session exit.
|
|
4
|
-
#
|
|
5
|
-
# NOTE: Unlike Claude Code's Stop hook, sessionEnd output is IGNORED by
|
|
6
|
-
# Copilot CLI. This hook cannot block session exit or drive an orchestration
|
|
7
|
-
# loop. It is purely for cleanup and logging.
|
|
8
|
-
#
|
|
9
|
-
# Protocol:
|
|
10
|
-
# Input: JSON via stdin (session context)
|
|
11
|
-
# Output: IGNORED by Copilot CLI
|
|
12
|
-
# Exit 0: success (exit code also ignored)
|
|
13
|
-
|
|
14
|
-
set -uo pipefail
|
|
15
|
-
|
|
16
|
-
PLUGIN_ROOT="${COPILOT_PLUGIN_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
|
|
17
|
-
|
|
18
|
-
if ! command -v babysitter &>/dev/null; then
|
|
19
|
-
# No CLI available — exit 0 (no-op, proceed with original command)
|
|
20
|
-
exit 0
|
|
21
|
-
fi
|
|
22
|
-
|
|
23
|
-
GLOBAL_ROOT="${BABYSITTER_GLOBAL_STATE_DIR:-$HOME/.a5c}"
|
|
24
|
-
LOG_DIR="${BABYSITTER_LOG_DIR:-${GLOBAL_ROOT}/logs}"
|
|
25
|
-
LOG_FILE="$LOG_DIR/babysitter-session-end-hook.log"
|
|
26
|
-
|
|
27
|
-
mkdir -p "$LOG_DIR" 2>/dev/null
|
|
28
|
-
|
|
29
|
-
# Structured logging helper
|
|
30
|
-
blog() {
|
|
31
|
-
local msg="$1"
|
|
32
|
-
local ts
|
|
33
|
-
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
34
|
-
echo "[INFO] $ts $msg" >> "$LOG_FILE" 2>/dev/null
|
|
35
|
-
babysitter log --type hook --label "hook:session-end" --message "$msg" --source shell-hook 2>/dev/null || true
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
blog "Hook script invoked"
|
|
39
|
-
blog "PLUGIN_ROOT=$PLUGIN_ROOT"
|
|
40
|
-
|
|
41
|
-
# Capture stdin so we can log size and pass to CLI
|
|
42
|
-
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/hook-session-end-$$.json")
|
|
43
|
-
cat > "$INPUT_FILE"
|
|
44
|
-
|
|
45
|
-
blog "Hook input received ($(wc -c < "$INPUT_FILE") bytes)"
|
|
46
|
-
|
|
47
|
-
# Run cleanup/logging via CLI; output is ignored by Copilot CLI
|
|
48
|
-
babysitter hook:run --hook-type session-end --harness github-copilot --plugin-root "$PLUGIN_ROOT" --json < "$INPUT_FILE" 2>"$LOG_DIR/babysitter-session-end-hook-stderr.log" || true
|
|
49
|
-
|
|
50
|
-
blog "Session end hook complete"
|
|
51
|
-
|
|
52
|
-
rm -f "$INPUT_FILE" 2>/dev/null
|
|
53
|
-
|
|
54
|
-
exit 0
|