@a5c-ai/babysitter-cursor 0.1.1-staging.04cc300a

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.
Files changed (43) hide show
  1. package/.cursor-plugin/plugin.json +22 -0
  2. package/.cursorrules +55 -0
  3. package/README.md +491 -0
  4. package/bin/cli.js +104 -0
  5. package/bin/install-shared.js +394 -0
  6. package/bin/install.js +46 -0
  7. package/bin/uninstall.js +40 -0
  8. package/commands/assimilate.md +37 -0
  9. package/commands/call.md +7 -0
  10. package/commands/cleanup.md +20 -0
  11. package/commands/contrib.md +33 -0
  12. package/commands/doctor.md +426 -0
  13. package/commands/forever.md +7 -0
  14. package/commands/help.md +244 -0
  15. package/commands/observe.md +12 -0
  16. package/commands/plan.md +7 -0
  17. package/commands/plugins.md +255 -0
  18. package/commands/project-install.md +17 -0
  19. package/commands/resume.md +8 -0
  20. package/commands/retrospect.md +55 -0
  21. package/commands/user-install.md +17 -0
  22. package/commands/yolo.md +7 -0
  23. package/hooks/hooks-cursor.json +21 -0
  24. package/hooks/session-start.ps1 +115 -0
  25. package/hooks/session-start.sh +105 -0
  26. package/hooks/stop-hook.ps1 +72 -0
  27. package/hooks/stop-hook.sh +64 -0
  28. package/hooks.json +21 -0
  29. package/package.json +49 -0
  30. package/plugin.json +24 -0
  31. package/scripts/sync-command-surfaces.js +62 -0
  32. package/scripts/team-install.js +81 -0
  33. package/skills/assimilate/SKILL.md +38 -0
  34. package/skills/babysit/SKILL.md +81 -0
  35. package/skills/call/SKILL.md +8 -0
  36. package/skills/doctor/SKILL.md +427 -0
  37. package/skills/help/SKILL.md +245 -0
  38. package/skills/observe/SKILL.md +13 -0
  39. package/skills/plan/SKILL.md +8 -0
  40. package/skills/resume/SKILL.md +9 -0
  41. package/skills/retrospect/SKILL.md +56 -0
  42. package/skills/user-install/SKILL.md +18 -0
  43. package/versions.json +3 -0
@@ -0,0 +1,72 @@
1
+ # Babysitter Stop Hook for Cursor IDE/CLI (PowerShell)
2
+ # Drives the orchestration loop by checking run state on session stop.
3
+ #
4
+ # Protocol:
5
+ # Input: JSON via stdin (session context)
6
+ # Output: JSON via stdout (with optional continue/stop signal)
7
+ # Stderr: debug/log output only
8
+ # Exit 0: success
9
+
10
+ $ErrorActionPreference = "Stop"
11
+
12
+ $PluginRoot = if ($env:CURSOR_PLUGIN_ROOT) { $env:CURSOR_PLUGIN_ROOT } else { Split-Path -Parent $PSScriptRoot }
13
+ $StateDir = if ($env:BABYSITTER_STATE_DIR) { $env:BABYSITTER_STATE_DIR } else { Join-Path $PWD ".a5c" }
14
+
15
+ $env:CURSOR_PLUGIN_ROOT = $PluginRoot
16
+ $env:BABYSITTER_STATE_DIR = $StateDir
17
+
18
+ $LogDir = if ($env:BABYSITTER_LOG_DIR) { $env:BABYSITTER_LOG_DIR } else { Join-Path $PluginRoot ".a5c\logs" }
19
+ $LogFile = Join-Path $LogDir "babysitter-stop-hook.log"
20
+ New-Item -ItemType Directory -Path $LogDir -Force -ErrorAction SilentlyContinue | Out-Null
21
+
22
+ function Write-Blog {
23
+ param([string]$Message)
24
+ $ts = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
25
+ Add-Content -Path $LogFile -Value "[INFO] $ts $Message" -ErrorAction SilentlyContinue
26
+ if (Get-Command babysitter -ErrorAction SilentlyContinue) {
27
+ & babysitter log --type hook --label "hook:stop" --message $Message --source shell-hook 2>$null
28
+ }
29
+ }
30
+
31
+ Write-Blog "Hook script invoked"
32
+ Write-Blog "PLUGIN_ROOT=$PluginRoot"
33
+ Write-Blog "STATE_DIR=$StateDir"
34
+
35
+ # Resolve babysitter CLI
36
+ $useFallback = $false
37
+ if (-not (Get-Command babysitter -ErrorAction SilentlyContinue)) {
38
+ $localBin = Join-Path $env:USERPROFILE ".local\bin\babysitter.cmd"
39
+ if (Test-Path $localBin) {
40
+ $env:PATH = "$(Split-Path $localBin);$env:PATH"
41
+ } else {
42
+ $versionsFile = Join-Path $PluginRoot "versions.json"
43
+ try {
44
+ $script:SdkVersion = (Get-Content $versionsFile -Raw | ConvertFrom-Json).sdkVersion
45
+ if (-not $script:SdkVersion) { $script:SdkVersion = "latest" }
46
+ } catch {
47
+ $script:SdkVersion = "latest"
48
+ }
49
+ $useFallback = $true
50
+ }
51
+ }
52
+
53
+ # Capture stdin
54
+ $InputFile = [System.IO.Path]::GetTempFileName()
55
+ $input | Out-File -FilePath $InputFile -Encoding utf8
56
+
57
+ Write-Blog "Hook input received"
58
+
59
+ $stderrLog = Join-Path $LogDir "babysitter-stop-hook-stderr.log"
60
+
61
+ if ($useFallback) {
62
+ $Result = Get-Content $InputFile | & npx -y "@a5c-ai/babysitter-sdk@$script:SdkVersion" hook:run --hook-type stop --harness cursor --plugin-root $PluginRoot --state-dir $StateDir --json 2>$stderrLog
63
+ } else {
64
+ $Result = Get-Content $InputFile | & babysitter hook:run --hook-type stop --harness cursor --plugin-root $PluginRoot --state-dir $StateDir --json 2>$stderrLog
65
+ }
66
+ $ExitCode = $LASTEXITCODE
67
+
68
+ Write-Blog "CLI exit code=$ExitCode"
69
+
70
+ Remove-Item $InputFile -Force -ErrorAction SilentlyContinue
71
+ Write-Output $Result
72
+ exit $ExitCode
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env bash
2
+ # Babysitter Stop Hook for Cursor IDE/CLI
3
+ # Drives the orchestration loop by checking run state on session stop.
4
+ #
5
+ # Protocol:
6
+ # Input: JSON via stdin (session context)
7
+ # Output: JSON via stdout (with optional continue/stop signal)
8
+ # Stderr: debug/log output only
9
+ # Exit 0: success
10
+
11
+ set -euo pipefail
12
+
13
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
14
+ PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
15
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
16
+ LOG_DIR="${BABYSITTER_LOG_DIR:-$PLUGIN_ROOT/.a5c/logs}"
17
+ LOG_FILE="$LOG_DIR/babysitter-stop-hook.log"
18
+
19
+ export CURSOR_PLUGIN_ROOT="${CURSOR_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
20
+ export BABYSITTER_STATE_DIR="${STATE_DIR}"
21
+
22
+ mkdir -p "$LOG_DIR" 2>/dev/null
23
+
24
+ blog() {
25
+ local msg="$1"
26
+ local ts
27
+ ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
28
+ echo "[INFO] $ts $msg" >> "$LOG_FILE" 2>/dev/null
29
+ babysitter log --type hook --label "hook:stop" --message "$msg" --source shell-hook 2>/dev/null || true
30
+ }
31
+
32
+ blog "Hook script invoked"
33
+ blog "PLUGIN_ROOT=$PLUGIN_ROOT"
34
+ blog "STATE_DIR=$STATE_DIR"
35
+
36
+ # Resolve babysitter CLI if not on PATH
37
+ if ! command -v babysitter &>/dev/null; then
38
+ if [ -x "$HOME/.local/bin/babysitter" ]; then
39
+ export PATH="$HOME/.local/bin:$PATH"
40
+ else
41
+ 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")
42
+ babysitter() { npx -y "@a5c-ai/babysitter-sdk@${SDK_VERSION}" "$@"; }
43
+ export -f babysitter
44
+ fi
45
+ fi
46
+
47
+ INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/cursor-stop-hook-$$.json")
48
+ cat > "$INPUT_FILE"
49
+
50
+ blog "Hook input received ($(wc -c < "$INPUT_FILE") bytes)"
51
+
52
+ RESULT=$(babysitter hook:run \
53
+ --hook-type stop \
54
+ --harness cursor \
55
+ --plugin-root "$PLUGIN_ROOT" \
56
+ --state-dir "${BABYSITTER_STATE_DIR}" \
57
+ --json < "$INPUT_FILE" 2>"$LOG_DIR/babysitter-stop-hook-stderr.log")
58
+ EXIT_CODE=$?
59
+
60
+ blog "CLI exit code=$EXIT_CODE"
61
+
62
+ rm -f "$INPUT_FILE" 2>/dev/null
63
+ printf '%s\n' "$RESULT"
64
+ exit $EXIT_CODE
package/hooks.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": 1,
3
+ "hooks": {
4
+ "sessionStart": [
5
+ {
6
+ "type": "command",
7
+ "bash": "bash \"./hooks/session-start.sh\"",
8
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/session-start.ps1\"",
9
+ "timeoutSec": 30
10
+ }
11
+ ],
12
+ "stop": [
13
+ {
14
+ "type": "command",
15
+ "bash": "bash \"./hooks/stop-hook.sh\"",
16
+ "powershell": "powershell -NoProfile -ExecutionPolicy Bypass -File \"./hooks/stop-hook.ps1\"",
17
+ "loop_limit": null
18
+ }
19
+ ]
20
+ }
21
+ }
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "@a5c-ai/babysitter-cursor",
3
+ "version": "0.1.1-staging.04cc300a",
4
+ "description": "Babysitter orchestration plugin for Cursor IDE with SDK-managed process-library bootstrapping and in-turn iteration model",
5
+ "scripts": {
6
+ "test": "node scripts/sync-command-surfaces.js --check",
7
+ "sync:commands": "node scripts/sync-command-surfaces.js",
8
+ "postinstall": "node bin/install.js",
9
+ "preuninstall": "node bin/uninstall.js",
10
+ "team:install": "node scripts/team-install.js",
11
+ "deploy": "npm publish --access public",
12
+ "deploy:staging": "npm publish --access public --tag staging"
13
+ },
14
+ "bin": {
15
+ "babysitter-cursor": "bin/cli.js"
16
+ },
17
+ "files": [
18
+ ".cursor-plugin/",
19
+ ".cursorrules",
20
+ "bin/",
21
+ "commands/",
22
+ "hooks/",
23
+ "hooks.json",
24
+ "plugin.json",
25
+ "scripts/",
26
+ "skills/",
27
+ "versions.json"
28
+ ],
29
+ "keywords": [
30
+ "babysitter",
31
+ "cursor",
32
+ "orchestration",
33
+ "ai-agent",
34
+ "sdk-integration"
35
+ ],
36
+ "author": "a5c.ai",
37
+ "license": "MIT",
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "https://github.com/a5c-ai/babysitter"
44
+ },
45
+ "homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-cursor#readme",
46
+ "dependencies": {
47
+ "@a5c-ai/babysitter-sdk": "0.0.184-staging.04cc300a"
48
+ }
49
+ }
package/plugin.json ADDED
@@ -0,0 +1,24 @@
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": "a5c.ai",
6
+ "license": "MIT",
7
+ "hooks": "hooks/hooks-cursor.json",
8
+ "commands": "commands/",
9
+ "skills": "skills/",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/a5c-ai/babysitter"
13
+ },
14
+ "keywords": [
15
+ "orchestration",
16
+ "workflow",
17
+ "automation",
18
+ "event-sourced",
19
+ "hooks",
20
+ "cursor",
21
+ "agent",
22
+ "LLM"
23
+ ]
24
+ }
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ const path = require('path');
4
+ const {
5
+ listDirectories,
6
+ listMarkdownBasenames,
7
+ reportCheckResult,
8
+ syncCommandMirrors,
9
+ syncSkillsFromCommands,
10
+ } = require('../../../scripts/plugin-command-sync-lib.cjs');
11
+
12
+ const PACKAGE_ROOT = path.resolve(__dirname, '..');
13
+ const REPO_ROOT = path.resolve(PACKAGE_ROOT, '..', '..');
14
+ const ROOT_COMMANDS = path.join(REPO_ROOT, 'plugins', 'babysitter', 'commands');
15
+ const PLUGIN_COMMANDS = path.join(PACKAGE_ROOT, 'commands');
16
+ const PLUGIN_SKILLS = path.join(PACKAGE_ROOT, 'skills');
17
+ const LABEL = 'babysitter-cursor sync';
18
+
19
+ function getMirroredCommandNames() {
20
+ const local = new Set(listMarkdownBasenames(PLUGIN_COMMANDS));
21
+ return listMarkdownBasenames(ROOT_COMMANDS).filter((name) => local.has(name));
22
+ }
23
+
24
+ function getDerivedSkillNames() {
25
+ const local = new Set(listDirectories(PLUGIN_SKILLS));
26
+ return listMarkdownBasenames(PLUGIN_COMMANDS).filter((name) => local.has(name));
27
+ }
28
+
29
+ function main() {
30
+ const check = process.argv.includes('--check');
31
+ const mirrorResult = syncCommandMirrors({
32
+ label: LABEL,
33
+ sourceRoot: ROOT_COMMANDS,
34
+ targetRoot: PLUGIN_COMMANDS,
35
+ names: getMirroredCommandNames(),
36
+ check,
37
+ cwd: PACKAGE_ROOT,
38
+ });
39
+ const skillsResult = syncSkillsFromCommands({
40
+ label: LABEL,
41
+ sourceRoot: PLUGIN_COMMANDS,
42
+ skillsRoot: PLUGIN_SKILLS,
43
+ names: getDerivedSkillNames(),
44
+ check,
45
+ cwd: PACKAGE_ROOT,
46
+ });
47
+
48
+ if (check) {
49
+ reportCheckResult(LABEL, [...mirrorResult.stale, ...skillsResult.stale]);
50
+ return;
51
+ }
52
+
53
+ const updated = mirrorResult.updated + skillsResult.updated;
54
+ if (updated === 0) {
55
+ console.log(`[${LABEL}] no Cursor plugin command changes were needed.`);
56
+ return;
57
+ }
58
+
59
+ console.log(`[${LABEL}] updated ${updated} Cursor plugin file(s).`);
60
+ }
61
+
62
+ main();
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+ const {
7
+ copyPluginBundle,
8
+ ensureGlobalProcessLibrary,
9
+ ensureMarketplaceEntry,
10
+ installCursorSurface,
11
+ warnWindowsHooks,
12
+ writeJson,
13
+ } = require('../bin/install-shared');
14
+
15
+ function parseArgs(argv) {
16
+ const args = {
17
+ workspace: process.cwd(),
18
+ dryRun: false,
19
+ };
20
+ for (let i = 2; i < argv.length; i += 1) {
21
+ if (argv[i] === '--workspace' && argv[i + 1]) {
22
+ args.workspace = path.resolve(argv[++i]);
23
+ } else if (argv[i] === '--dry-run') {
24
+ args.dryRun = true;
25
+ }
26
+ }
27
+ return args;
28
+ }
29
+
30
+ function main() {
31
+ const args = parseArgs(process.argv);
32
+ const packageRoot = path.resolve(process.env.BABYSITTER_PACKAGE_ROOT || path.join(__dirname, '..'));
33
+ const workspaceRoot = args.workspace;
34
+ const workspacePluginRoot = path.join(workspaceRoot, 'plugins', 'babysitter');
35
+ const workspaceMarketplacePath = path.join(workspaceRoot, '.agents', 'plugins', 'marketplace.json');
36
+
37
+ const installInfo = {
38
+ installedAt: new Date().toISOString(),
39
+ packageRoot,
40
+ workspaceRoot,
41
+ pluginRoot: workspacePluginRoot,
42
+ marketplacePath: workspaceMarketplacePath,
43
+ };
44
+
45
+ if (args.dryRun) {
46
+ console.log(JSON.stringify({
47
+ ok: true,
48
+ dryRun: true,
49
+ installInfo,
50
+ }, null, 2));
51
+ return;
52
+ }
53
+
54
+ copyPluginBundle(packageRoot, workspacePluginRoot);
55
+ ensureMarketplaceEntry(workspaceMarketplacePath, workspacePluginRoot);
56
+ installCursorSurface(packageRoot, path.join(workspaceRoot, '.cursor'));
57
+
58
+ const active = ensureGlobalProcessLibrary(packageRoot);
59
+ installInfo.processLibraryStateFile = active.stateFile;
60
+ installInfo.processLibraryRoot = active.binding?.dir || '';
61
+ installInfo.processLibraryCloneDir = active.defaultSpec?.cloneDir || '';
62
+
63
+ const outDir = path.join(workspaceRoot, '.a5c', 'team');
64
+ fs.mkdirSync(outDir, { recursive: true });
65
+ writeJson(path.join(outDir, 'install.json'), installInfo);
66
+
67
+ const profilePath = path.join(outDir, 'profile.json');
68
+ if (!fs.existsSync(profilePath)) {
69
+ writeJson(profilePath, {
70
+ teamName: 'default',
71
+ pluginRoot: workspacePluginRoot,
72
+ marketplacePath: workspaceMarketplacePath,
73
+ processLibraryLookupCommand: 'babysitter process-library:active --json',
74
+ });
75
+ }
76
+
77
+ warnWindowsHooks();
78
+ console.log('[team-install] complete');
79
+ }
80
+
81
+ main();
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: assimilate
3
+ description: Assimilate an external methodology, harness, or specification into babysitter process definitions with skills and agents.
4
+ ---
5
+
6
+ # assimilate
7
+
8
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
9
+
10
+ Use the assimilation domain processes from the active process library to convert external sources into well-defined babysitter process definitions with accompanying skills/ and agents/ directories.
11
+
12
+ If the workspace does not already have an active process-library binding, initialize it first through the shared global SDK binding:
13
+
14
+ ```bash
15
+ babysitter process-library:active --json
16
+ ```
17
+
18
+ Run the process after formalizing it.
19
+
20
+ Available assimilation workflows:
21
+ - **methodology-assimilation** (`specializations/domains/assimilation/workflows/methodology-assimilation`) - Learns an external methodology from its repo and converts procedural instructions, commands, and manual flows into babysitter processes with refactored skills and agents. Supports output as methodology or specialization.
22
+ - **harness integration** (`specializations/domains/assimilation/harness/*`) - Integrates babysitter SDK with a specific AI coding harness (generic, codex, opencode, gemini-cli, openclaw, antigravity).
23
+
24
+ During the interview phase, determine which assimilation workflow to use based on the user's target:
25
+ - If the target is a **repo URL or methodology name** then use the methodology-assimilation workflow.
26
+ - If the target is a **harness name** (e.g. codex, opencode, antigravity) then use the matching harness process.
27
+ - If the target is a **specification or other source** then adapt the methodology-assimilation workflow for the spec format.
28
+ - If unclear, ask the user to clarify the assimilation target and type.
29
+
30
+ ## After Assimilation: Contribute Back
31
+
32
+ After successfully assimilating a methodology or harness integration, prompt the user to share it with the community. The assimilated process definitions, skills, and agents could benefit other babysitter users:
33
+
34
+ - **Completed a methodology assimilation**: `/babysitter:contrib library contribution: assimilated [methodology-name] into babysitter process definitions`
35
+ - **Completed a harness integration**: `/babysitter:contrib library contribution: [harness-name] harness integration`
36
+ - **Hit issues during assimilation** (e.g. unsupported patterns, missing SDK features): `/babysitter:contrib bug report: assimilation of [target] failed because [description]` or `/babysitter:contrib feature request: [what the SDK needs to support]`
37
+
38
+ Even just reporting that an assimilation didn't work well helps improve babysitter for everyone.
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: babysit
3
+ description: >-
4
+ Orchestrate via @babysitter. Use this skill when asked to babysit a run,
5
+ orchestrate a process or whenever it is called explicitly. (babysit,
6
+ babysitter, orchestrate, orchestrate a run, workflow, etc.)
7
+ ---
8
+
9
+ # babysit
10
+
11
+ Orchestrate `.a5c/runs/<runId>/` through iterative execution.
12
+
13
+ ## Dependencies
14
+
15
+ ### Babysitter SDK and CLI
16
+
17
+ Read the SDK version from `versions.json` to ensure version compatibility:
18
+
19
+ ```bash
20
+ SDK_VERSION=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync('${PLUGIN_ROOT}/versions.json','utf8')).sdkVersion||'latest')}catch{console.log('latest')}")
21
+ ```
22
+
23
+ Then ensure the CLI is installed:
24
+
25
+ ```bash
26
+ sudo npm i -g @a5c-ai/babysitter-sdk@$SDK_VERSION
27
+ ```
28
+
29
+ Use the CLI alias: `CLI="babysitter"`
30
+
31
+ **Alternatively:** `CLI="npx -y @a5c-ai/babysitter-sdk@$SDK_VERSION"`
32
+
33
+ ### jq
34
+
35
+ make sure you have jq installed and available in the path. if not, install it.
36
+
37
+ ## Instructions
38
+
39
+ Run the following command to get full orchestration instructions:
40
+
41
+ ```bash
42
+ babysitter instructions:babysit-skill --harness cursor --json
43
+ ```
44
+
45
+ Follow the instructions returned by the command above to orchestrate the run.
46
+
47
+ ## Cursor -- In-Turn Loop Model
48
+
49
+ **IMPORTANT**: Cursor does NOT have a Stop hook that can drive the orchestration
50
+ loop between turns. Unlike Claude Code, there is no hook mechanism to
51
+ automatically re-enter the orchestration loop.
52
+
53
+ Therefore, you MUST use **in-turn iteration**: run the full orchestration loop
54
+ within a single session turn. The pattern is:
55
+
56
+ 1. `babysitter run:iterate --json` -- get pending actions
57
+ 2. For each pending action: execute it (run tasks, post results via `task:post`)
58
+ 3. `babysitter run:iterate --json` -- check for more pending actions
59
+ 4. Repeat steps 2-3 until run completes or reaches a breakpoint requiring user input
60
+ 5. If a breakpoint requires user input, ask the user and post the response, then continue iterating
61
+
62
+ All iteration happens within the same turn -- do NOT rely on hooks to re-enter
63
+ the orchestration loop. The agent drives the loop directly by calling
64
+ `run:iterate` repeatedly until completion.
65
+
66
+ ### Loop Example
67
+
68
+ ```bash
69
+ # Initial iterate
70
+ RESULT=$(babysitter run:iterate --run-id "$RUN_ID" --json)
71
+ STATUS=$(echo "$RESULT" | jq -r '.status')
72
+
73
+ while [ "$STATUS" != "completed" ] && [ "$STATUS" != "failed" ]; do
74
+ # Process pending actions from RESULT
75
+ # ... execute tasks, post results ...
76
+
77
+ # Iterate again
78
+ RESULT=$(babysitter run:iterate --run-id "$RUN_ID" --json)
79
+ STATUS=$(echo "$RESULT" | jq -r '.status')
80
+ done
81
+ ```
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: call
3
+ description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow.
4
+ ---
5
+
6
+ # call
7
+
8
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).