@a5c-ai/babysitter-github 5.0.1-staging.ff2c19f9 → 5.1.1-staging.0c6199708314
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 +32 -21
- package/bin/install.js +9 -0
- package/bin/uninstall.js +25 -4
- 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 +2 -3
- package/commands/forever.md +6 -6
- package/commands/help.md +11 -10
- package/commands/observe.md +6 -1
- 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 +13 -0
- package/hooks/babysitter-proxied-post-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-pre-compact.ps1 +13 -0
- package/hooks/babysitter-proxied-pre-compact.sh +3 -0
- package/hooks/babysitter-proxied-pre-tool-use.ps1 +13 -0
- package/hooks/babysitter-proxied-pre-tool-use.sh +3 -0
- package/hooks/babysitter-proxied-session-end.ps1 +1 -0
- package/hooks/babysitter-proxied-session-end.sh +0 -0
- package/hooks/babysitter-proxied-session-start.ps1 +1 -0
- package/hooks/babysitter-proxied-session-start.sh +1 -1
- package/hooks/babysitter-proxied-user-prompt-submitted.ps1 +1 -0
- package/hooks/babysitter-proxied-user-prompt-submitted.sh +0 -0
- package/hooks.json +24 -0
- package/package.json +12 -11
- 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 +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 +37 -9
- package/skills/contrib/SKILL.md +25 -25
- package/skills/doctor/SKILL.md +2 -3
- package/skills/help/SKILL.md +11 -10
- package/skills/observe/SKILL.md +6 -1
- package/skills/plan/SKILL.md +11 -1
- package/skills/plugins/SKILL.md +18 -251
- package/skills/project-install/SKILL.md +3 -3
- package/skills/resume/SKILL.md +1 -1
- package/skills/retrospect/SKILL.md +48 -48
- package/skills/user-install/SKILL.md +3 -3
- package/skills/yolo/SKILL.md +5 -1
- package/versions.json +2 -1
- package/scripts/sync-command-surfaces.js +0 -62
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$env:HOOK_TYPE = 'session-end'
|
|
3
3
|
$env:ADAPTER_NAME = 'copilot'
|
|
4
4
|
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
$env:CLAUDE_PLUGIN_ROOT = $env:PLUGIN_ROOT
|
|
5
6
|
|
|
6
7
|
$input_data = [Console]::In.ReadToEnd()
|
|
7
8
|
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
File without changes
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$env:HOOK_TYPE = 'session-start'
|
|
3
3
|
$env:ADAPTER_NAME = 'copilot'
|
|
4
4
|
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
$env:CLAUDE_PLUGIN_ROOT = $env:PLUGIN_ROOT
|
|
5
6
|
|
|
6
7
|
$input_data = [Console]::In.ReadToEnd()
|
|
7
8
|
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Session Start — installs SDK if needed, then runs hook handler.
|
|
3
3
|
set -euo pipefail
|
|
4
|
-
PLUGIN_ROOT="${PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
|
|
4
|
+
PLUGIN_ROOT="${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}}"
|
|
5
5
|
SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}" 2>/dev/null || echo "latest")
|
|
6
6
|
if ! command -v babysitter &>/dev/null; then
|
|
7
7
|
npm i -g "@a5c-ai/babysitter-sdk@${SDK_VERSION}" --loglevel=error 2>/dev/null || \
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$env:HOOK_TYPE = 'user-prompt-submit'
|
|
3
3
|
$env:ADAPTER_NAME = 'copilot'
|
|
4
4
|
$env:PLUGIN_ROOT = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
5
|
+
$env:CLAUDE_PLUGIN_ROOT = $env:PLUGIN_ROOT
|
|
5
6
|
|
|
6
7
|
$input_data = [Console]::In.ReadToEnd()
|
|
7
8
|
$result = $input_data | & bash "$PSScriptRoot/../$($MyInvocation.MyCommand.Name -replace '\.ps1$','.sh')" 2>$null
|
|
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,28 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-github",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1-staging.0c6199708314",
|
|
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",
|
|
7
7
|
"deploy:staging": "npm publish --access public --tag staging",
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"team:install": "node scripts/team-install.js"
|
|
11
|
-
"test": "node scripts/sync-command-surfaces.js --check",
|
|
12
|
-
"sync:commands": "node scripts/sync-command-surfaces.js"
|
|
8
|
+
"plugin:install": "node bin/install.js --global",
|
|
9
|
+
"plugin:uninstall": "node bin/uninstall.js --global",
|
|
10
|
+
"team:install": "node scripts/team-install.js"
|
|
13
11
|
},
|
|
14
12
|
"bin": {
|
|
15
|
-
"babysitter-github
|
|
13
|
+
"babysitter-github": "bin/cli.js"
|
|
16
14
|
},
|
|
17
15
|
"files": [
|
|
18
16
|
"bin/",
|
|
19
17
|
"hooks.json",
|
|
18
|
+
"AGENTS.md",
|
|
20
19
|
"hooks/",
|
|
21
20
|
"skills/",
|
|
22
21
|
"commands/",
|
|
23
22
|
"scripts/",
|
|
24
23
|
"plugin.json",
|
|
25
|
-
"AGENTS.md",
|
|
26
24
|
"README.md",
|
|
27
25
|
"versions.json",
|
|
28
26
|
"package.json"
|
|
@@ -38,11 +36,14 @@
|
|
|
38
36
|
"access": "public"
|
|
39
37
|
},
|
|
40
38
|
"dependencies": {
|
|
41
|
-
"@a5c-ai/babysitter-sdk": "5.
|
|
39
|
+
"@a5c-ai/babysitter-sdk": "5.1.1-staging.0c6199708314"
|
|
42
40
|
},
|
|
43
41
|
"repository": {
|
|
44
42
|
"type": "git",
|
|
45
|
-
"url": "https://github.com/a5c-ai/babysitter"
|
|
43
|
+
"url": "git+https://github.com/a5c-ai/babysitter-github-copilot.git"
|
|
46
44
|
},
|
|
47
|
-
"homepage": "https://github.com/a5c-ai/babysitter
|
|
45
|
+
"homepage": "https://github.com/a5c-ai/babysitter-github-copilot#readme",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/a5c-ai/babysitter-github-copilot/issues"
|
|
48
|
+
}
|
|
48
49
|
}
|
package/plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "babysitter",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.1-staging.0c6199708314",
|
|
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,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: babysit
|
|
3
|
-
description:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
babysitter, orchestrate, orchestrate a run, workflow, etc.)
|
|
3
|
+
description: 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.)
|
|
4
|
+
allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
|
|
5
|
+
version: 0.1.3
|
|
7
6
|
---
|
|
8
7
|
|
|
9
8
|
# babysit
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
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.
|
|
11
|
+
|
|
12
|
+
Subagents that need a scratch checkout or working directory must create it under
|
|
13
|
+
`/tmp/<descriptive-name>/`, not under `.a5c/runs/<runId>/work`. Before returning
|
|
14
|
+
deliverables, validate that no run-dir worktree was left behind, for example:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
find .a5c/runs -maxdepth 3 -name work -type d -print
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
That command should print nothing. If it prints a non-empty work directory, move
|
|
21
|
+
or remove only the scratch data you created before returning.
|
|
12
22
|
|
|
13
23
|
## Dependencies
|
|
14
24
|
|
|
@@ -17,13 +27,19 @@ Orchestrate `.a5c/runs/<runId>/` through iterative execution.
|
|
|
17
27
|
Read the SDK version from `versions.json` to ensure version compatibility:
|
|
18
28
|
|
|
19
29
|
```bash
|
|
20
|
-
SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${
|
|
21
|
-
npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${COPILOT_PLUGIN_DIR}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
|
|
31
|
+
npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION || npm i -g @a5c-ai/babysitter-sdk@latest
|
|
32
|
+
|
|
33
|
+
if command -v babysitter >/dev/null 2>&1 && babysitter --version >/dev/null 2>&1; then
|
|
34
|
+
CLI="babysitter"
|
|
35
|
+
else
|
|
36
|
+
CLI="npm exec --yes --package @a5c-ai/babysitter-sdk@$SDK_VERSION -- babysitter"
|
|
37
|
+
fi
|
|
24
38
|
```
|
|
25
39
|
|
|
26
|
-
If
|
|
40
|
+
If the pinned version fails to install (e.g. not yet published), the fallback installs `latest`.
|
|
41
|
+
|
|
42
|
+
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
43
|
|
|
28
44
|
### jq
|
|
29
45
|
|
|
@@ -31,46 +47,16 @@ Make sure `jq` is installed and available in the path. If not, install it.
|
|
|
31
47
|
|
|
32
48
|
## Instructions
|
|
33
49
|
|
|
34
|
-
Run the following command to get full
|
|
50
|
+
Run the following command to get full instructions:
|
|
35
51
|
|
|
36
52
|
```bash
|
|
37
|
-
$CLI instructions:babysit-skill --harness github-copilot --
|
|
53
|
+
$CLI instructions:babysit-skill --harness github-copilot --interactive
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## GitHub Copilot CLI -- In-Turn Loop Model
|
|
43
|
-
|
|
44
|
-
**IMPORTANT**: Unlike Claude Code, GitHub Copilot CLI does NOT have a Stop hook
|
|
45
|
-
that can drive the orchestration loop between turns. The `sessionEnd` hook output
|
|
46
|
-
is ignored and cannot block or restart the session.
|
|
47
|
-
|
|
48
|
-
Therefore, you MUST use **in-turn iteration**: run the full orchestration loop
|
|
49
|
-
within a single session turn. The pattern is:
|
|
50
|
-
|
|
51
|
-
1. `$CLI run:iterate --json` -- get pending actions
|
|
52
|
-
2. For each pending action: execute it (run tasks, post results via `task:post`)
|
|
53
|
-
3. `$CLI run:iterate --json` -- check for more pending actions
|
|
54
|
-
4. Repeat steps 2-3 until run completes or reaches a breakpoint requiring user input
|
|
55
|
-
5. If a breakpoint requires user input, ask the user and post the response, then continue iterating
|
|
56
|
-
|
|
57
|
-
All iteration happens within the same turn -- do NOT rely on hooks to re-enter
|
|
58
|
-
the orchestration loop. The agent drives the loop directly by calling
|
|
59
|
-
`run:iterate` repeatedly until completion.
|
|
60
|
-
|
|
61
|
-
### Loop Example
|
|
56
|
+
For non-interactive mode (running with `-p` flag or no AskUserQuestion tool):
|
|
62
57
|
|
|
63
58
|
```bash
|
|
64
|
-
|
|
65
|
-
RESULT=$($CLI run:iterate --run-id "$RUN_ID" --json)
|
|
66
|
-
STATUS=$(echo "$RESULT" | jq -r '.status')
|
|
67
|
-
|
|
68
|
-
while [ "$STATUS" != "completed" ] && [ "$STATUS" != "failed" ]; do
|
|
69
|
-
# Process pending actions from RESULT
|
|
70
|
-
# ... execute tasks, post results ...
|
|
71
|
-
|
|
72
|
-
# Iterate again
|
|
73
|
-
RESULT=$($CLI run:iterate --run-id "$RUN_ID" --json)
|
|
74
|
-
STATUS=$(echo "$RESULT" | jq -r '.status')
|
|
75
|
-
done
|
|
59
|
+
$CLI instructions:babysit-skill --harness github-copilot --no-interactive
|
|
76
60
|
```
|
|
61
|
+
|
|
62
|
+
Follow the instructions returned by the command above to orchestrate the run.
|
|
@@ -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 blueprints: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 blueprints:update-marketplace --marketplace-name <name> [--marketplace-branch <ref>] --global|--project [--json]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### List blueprints in a marketplace
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
babysitter blueprints: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 blueprints:install --plugin-name <name> [--marketplace-name <mp>] --global|--project [--json]
|
|
45
|
+
babysitter blueprints:update --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
46
|
+
babysitter blueprints:configure --plugin-name <name> --marketplace-name <mp> --global|--project [--json]
|
|
47
|
+
babysitter blueprints: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 blueprints:list-installed --global|--project [--json]
|
|
56
|
+
babysitter blueprints:update-registry --plugin-name <name> --plugin-version <ver> --marketplace-name <mp> --global|--project [--json]
|
|
57
|
+
babysitter blueprints: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-adapter, extensions-adapter, 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)
|
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/contrib/SKILL.md
CHANGED
|
@@ -5,30 +5,30 @@ description: Submit feedback or contribute to babysitter project
|
|
|
5
5
|
|
|
6
6
|
# contrib
|
|
7
7
|
|
|
8
|
-
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
-
|
|
10
|
-
## Process Routing
|
|
11
|
-
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
|
+
|
|
10
|
+
## Process Routing
|
|
11
|
+
|
|
12
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
|
|
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
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`.
|
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]
|
|
@@ -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
|