@a5c-ai/babysitter-github 0.1.1-staging.0a3fc67d → 0.1.1-staging.400de59e

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.
@@ -0,0 +1,25 @@
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/README.md CHANGED
@@ -19,6 +19,32 @@ directly.
19
19
 
20
20
  ## Installation
21
21
 
22
+ ### From marketplace (recommended)
23
+
24
+ Register the a5c.ai marketplace and install the plugin:
25
+
26
+ ```bash
27
+ # Register the marketplace
28
+ copilot plugin marketplace add a5c-ai/babysitter
29
+
30
+ # Install the plugin
31
+ copilot plugin install babysitter
32
+ ```
33
+
34
+ ### Direct GitHub install
35
+
36
+ Install directly from the Git repository using Copilot CLI. Copilot CLI
37
+ discovers the plugin via `.github/plugin/marketplace.json` at the repo root:
38
+
39
+ ```bash
40
+ copilot plugin install a5c-ai/babysitter
41
+ ```
42
+
43
+ ### Alternative Installation (npm / development)
44
+
45
+ For development or environments where the Copilot CLI plugin system is not
46
+ available, install via npm:
47
+
22
48
  Install the SDK CLI first:
23
49
 
24
50
  ```bash
@@ -54,6 +80,14 @@ babysitter process-library:active --json
54
80
 
55
81
  ## Uninstallation
56
82
 
83
+ Via Copilot CLI:
84
+
85
+ ```bash
86
+ copilot plugin uninstall babysitter
87
+ ```
88
+
89
+ Via npm:
90
+
57
91
  ```bash
58
92
  babysitter-github uninstall
59
93
  ```
@@ -64,8 +98,8 @@ The plugin provides:
64
98
 
65
99
  - `skills/babysit/SKILL.md` as the core orchestration entrypoint
66
100
  - Mode wrapper skills such as `$call`, `$plan`, and `$resume`
67
- - Plugin-level lifecycle hooks for `SessionStart`, `UserPromptSubmit`, and
68
- `Stop`
101
+ - Plugin-level lifecycle hooks for `sessionStart`, `sessionEnd`, and
102
+ `userPromptSubmitted`
69
103
 
70
104
  The process library is fetched and bound through the SDK CLI in
71
105
  `~/.a5c/active/process-library.json`.
@@ -113,10 +147,10 @@ Fires when a new Copilot CLI session begins. The hook:
113
147
  `versions.json`)
114
148
  3. Creates baseline session state in the `.a5c` state directory
115
149
 
116
- ### Stop
150
+ ### SessionEnd
117
151
 
118
- The orchestration loop driver. When Copilot CLI attempts to end its turn,
119
- this hook intercepts the exit and:
152
+ The orchestration loop driver. Registered as `sessionEnd` in `hooks.json`,
153
+ this hook fires when the Copilot CLI session ends and:
120
154
 
121
155
  1. Checks whether the active run has completed or emitted a completion proof
122
156
  2. If the run is still in progress, re-injects the next orchestration step
@@ -128,7 +162,7 @@ This is what keeps Babysitter iterating autonomously within the Copilot CLI
128
162
  session -- each turn performs one orchestration phase, and the Stop hook
129
163
  decides whether to loop or yield.
130
164
 
131
- ### UserPromptSubmit
165
+ ### UserPromptSubmitted
132
166
 
133
167
  Fires before a user prompt reaches the model. The hook applies
134
168
  density-filter compression to long user prompts to reduce token usage while
@@ -139,9 +173,8 @@ preserving semantic content.
139
173
  ### AGENTS.md
140
174
 
141
175
  The plugin uses `AGENTS.md` (the Copilot CLI equivalent of `CLAUDE.md`) for
142
- custom agent instructions. This file is set via the `contextFileName` field
143
- in `plugin.json` and is read by Copilot CLI to configure agent behavior
144
- within sessions.
176
+ custom agent instructions. This file is read by Copilot CLI to configure
177
+ agent behavior within sessions.
145
178
 
146
179
  ### Environment Variables
147
180
 
@@ -174,6 +207,10 @@ Copilot CLI looks for the plugin manifest in these paths, checked in order:
174
207
 
175
208
  The first match wins. This plugin uses `plugin.json` at the package root.
176
209
 
210
+ For marketplace discovery, Copilot CLI looks for `.github/plugin/marketplace.json`
211
+ at the repository root. This file lists all available plugins in the repo and is
212
+ used when installing via `copilot plugin install OWNER/REPO`.
213
+
177
214
  ### plugin.json Schema
178
215
 
179
216
  The manifest declares metadata, skills, hooks, and optional integrations:
@@ -187,7 +224,7 @@ The manifest declares metadata, skills, hooks, and optional integrations:
187
224
  | `license` | No | `string` | SPDX license identifier |
188
225
  | `keywords` | No | `string[]` | Searchable tags for marketplace discovery |
189
226
  | `agents` | No | `string` | Path to agents directory |
190
- | `skills` | No | `array` | Array of skill directory paths (see below) |
227
+ | `skills` | No | `string` | Path to skills directory (auto-discovers SKILL.md files in subdirectories) |
191
228
  | `hooks` | No | `string` | Path to `hooks.json` |
192
229
  | `mcpServers` | No | `string` | Path to `.mcp.json` for MCP server configuration |
193
230
 
@@ -200,15 +237,9 @@ Example from this plugin:
200
237
  "description": "Orchestrate complex, multi-step workflows ...",
201
238
  "author": "a5c.ai",
202
239
  "license": "MIT",
203
- "hooks": {
204
- "sessionStart": "hooks/session-start.sh",
205
- "sessionEnd": "hooks/session-end.sh",
206
- "userPromptSubmitted": "hooks/user-prompt-submitted.sh"
207
- },
208
- "skills": [
209
- { "name": "babysit", "file": "skills/babysit/SKILL.md" },
210
- { "name": "call", "file": "skills/call/SKILL.md" }
211
- ],
240
+ "skills": "skills/",
241
+ "hooks": "hooks.json",
242
+ "commands": [],
212
243
  "keywords": ["orchestration", "workflow", "automation"]
213
244
  }
214
245
  ```
@@ -309,8 +340,8 @@ repositories that contain a manifest listing available plugins.
309
340
 
310
341
  ### Creating a Marketplace
311
342
 
312
- A marketplace is a Git repository with a `marketplace.json` file in
313
- `.github/plugin/` or `.claude-plugin/`:
343
+ A marketplace is a Git repository with a `marketplace.json` file at the
344
+ repository root in `.github/plugin/marketplace.json`:
314
345
 
315
346
  ```json
316
347
  {
@@ -387,6 +418,7 @@ These registries are available without running `marketplace add`.
387
418
  ```
388
419
  plugins/babysitter-github/
389
420
  plugin.json # Plugin manifest (skills, hooks, metadata)
421
+ .github/plugin.json # Plugin manifest (alternate discovery path)
390
422
  hooks.json # Hook configuration (sessionStart, sessionEnd, userPromptSubmitted)
391
423
  hooks/
392
424
  session-start.sh # SessionStart lifecycle hook
@@ -416,6 +448,12 @@ plugins/babysitter-github/
416
448
 
417
449
  ## Verification
418
450
 
451
+ Verify marketplace registration:
452
+
453
+ ```bash
454
+ copilot plugin marketplace list
455
+ ```
456
+
419
457
  Verify the installed plugin:
420
458
 
421
459
  ```bash
@@ -5,7 +5,7 @@ const os = require('os');
5
5
  const path = require('path');
6
6
  const { spawnSync } = require('child_process');
7
7
 
8
- const PLUGIN_NAME = 'babysitter-github';
8
+ const PLUGIN_NAME = 'babysitter';
9
9
  const PLUGIN_CATEGORY = 'Coding';
10
10
  const LEGACY_HOOK_SCRIPT_NAMES = [
11
11
  'session-start.sh',
package/bin/install.js CHANGED
@@ -28,16 +28,16 @@ function registerViaCopilotCli(pluginRoot) {
28
28
  });
29
29
 
30
30
  if (result.status === 0) {
31
- console.log(`[babysitter-github] Registered plugin via 'copilot plugin install'`);
31
+ console.log(`[babysitter] Registered plugin via 'copilot plugin install'`);
32
32
  return true;
33
33
  }
34
34
 
35
35
  // CLI not available or failed -- fall back to manual registration
36
36
  const stderr = (result.stderr || '').trim();
37
37
  if (result.error || stderr.includes('not found') || stderr.includes('not recognized')) {
38
- console.log(`[babysitter-github] Copilot CLI not found, using manual registration`);
38
+ console.log(`[babysitter] Copilot CLI not found, using manual registration`);
39
39
  } else {
40
- console.warn(`[babysitter-github] 'copilot plugin install' failed: ${stderr || 'unknown error'}, using manual registration`);
40
+ console.warn(`[babysitter] 'copilot plugin install' failed: ${stderr || 'unknown error'}, using manual registration`);
41
41
  }
42
42
  return false;
43
43
  }
@@ -47,7 +47,7 @@ function main() {
47
47
  const pluginRoot = getHomePluginRoot();
48
48
  const marketplacePath = getHomeMarketplacePath();
49
49
 
50
- console.log(`[babysitter-github] Installing plugin to ${pluginRoot}`);
50
+ console.log(`[babysitter] Installing plugin to ${pluginRoot}`);
51
51
 
52
52
  try {
53
53
  copyPluginBundle(PACKAGE_ROOT, pluginRoot);
@@ -62,18 +62,18 @@ function main() {
62
62
  installCopilotSurface(PACKAGE_ROOT, copilotHome);
63
63
 
64
64
  const active = ensureGlobalProcessLibrary(PACKAGE_ROOT);
65
- console.log(`[babysitter-github] marketplace: ${marketplacePath}`);
66
- console.log(`[babysitter-github] copilot config: ${path.join(copilotHome, 'config.json')}`);
67
- console.log(`[babysitter-github] process library: ${active.binding?.dir}`);
65
+ console.log(`[babysitter] marketplace: ${marketplacePath}`);
66
+ console.log(`[babysitter] copilot config: ${path.join(copilotHome, 'config.json')}`);
67
+ console.log(`[babysitter] process library: ${active.binding?.dir}`);
68
68
  if (active.defaultSpec?.cloneDir) {
69
- console.log(`[babysitter-github] process library clone: ${active.defaultSpec.cloneDir}`);
69
+ console.log(`[babysitter] process library clone: ${active.defaultSpec.cloneDir}`);
70
70
  }
71
- console.log(`[babysitter-github] process library state: ${active.stateFile}`);
71
+ console.log(`[babysitter] process library state: ${active.stateFile}`);
72
72
  warnWindowsHooks();
73
- console.log('[babysitter-github] Installation complete!');
74
- console.log('[babysitter-github] Restart GitHub Copilot CLI to pick up the installed plugin and config changes.');
73
+ console.log('[babysitter] Installation complete!');
74
+ console.log('[babysitter] Restart GitHub Copilot CLI to pick up the installed plugin and config changes.');
75
75
  } catch (err) {
76
- console.error(`[babysitter-github] Failed to install plugin: ${err.message}`);
76
+ console.error(`[babysitter] Failed to install plugin: ${err.message}`);
77
77
  process.exitCode = 1;
78
78
  }
79
79
  }
package/bin/uninstall.js CHANGED
@@ -12,7 +12,7 @@ const {
12
12
  removeMarketplaceEntry,
13
13
  } = require('./install-shared');
14
14
 
15
- const PLUGIN_NAME = 'babysitter-github';
15
+ const PLUGIN_NAME = 'babysitter';
16
16
 
17
17
  /**
18
18
  * Attempt to unregister the plugin via `copilot plugin uninstall`.
@@ -0,0 +1,37 @@
1
+ ---
2
+ description: Assimilate an external methodology, harness, or specification into babysitter process definitions with skills and agents.
3
+ argument-hint: Target to assimilate (e.g. repo URL, harness name, or spec path)
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
+
9
+ 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.
10
+
11
+ If the workspace does not already have an active process-library binding, initialize it first through the shared global SDK binding:
12
+
13
+ ```bash
14
+ babysitter process-library:active --json
15
+ ```
16
+
17
+ Run the process after formalizing it.
18
+
19
+ Available assimilation workflows:
20
+ - **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.
21
+ - **harness integration** (`specializations/domains/assimilation/harness/*`) - Integrates babysitter SDK with a specific AI coding harness (generic, codex, opencode, gemini-cli, openclaw, antigravity).
22
+
23
+ During the interview phase, determine which assimilation workflow to use based on the user's target:
24
+ - If the target is a **repo URL or methodology name** then use the methodology-assimilation workflow.
25
+ - If the target is a **harness name** (e.g. codex, opencode, antigravity) then use the matching harness process.
26
+ - If the target is a **specification or other source** then adapt the methodology-assimilation workflow for the spec format.
27
+ - If unclear, ask the user to clarify the assimilation target and type.
28
+
29
+ ## After Assimilation: Contribute Back
30
+
31
+ 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:
32
+
33
+ - **Completed a methodology assimilation**: `/babysitter:contrib library contribution: assimilated [methodology-name] into babysitter process definitions`
34
+ - **Completed a harness integration**: `/babysitter:contrib library contribution: [harness-name] harness integration`
35
+ - **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]`
36
+
37
+ Even just reporting that an assimilation didn't work well helps improve babysitter for everyone.
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Orchestrate a babysitter run. use this command to start babysitting a complex workflow.
3
+ argument-hint: Specific instructions for the run.
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
@@ -0,0 +1,20 @@
1
+ ---
2
+ 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.
3
+ argument-hint: "[--dry-run] [--keep-days N] Optional flags. --dry-run shows what would be removed without deleting. --keep-days N keeps runs newer than N days (default 7)."
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
+
9
+ Create and run a cleanup process using the process at `skills\babysit\process\cradle\cleanup-runs.js/processes/cleanup-runs.js`.
10
+
11
+ Implementation notes (for the process):
12
+ - Parse arguments for `--dry-run` flag (if present, set dryRun: true in inputs) and `--keep-days N` (default: 7)
13
+ - The process scans .a5c/runs/ for completed/failed runs, aggregates insights, writes summaries, then removes old data
14
+ - Always show the user what will be removed before removing (in interactive mode via breakpoints)
15
+ - In non-interactive mode (yolo), proceed with cleanup using defaults
16
+ - The insights file goes to docs/run-history-insights.md
17
+ - Only remove terminal runs (completed/failed) older than the keep-days threshold
18
+ - Never remove active/in-progress runs
19
+ - Remove orphaned process files not referenced by remaining runs
20
+ - After cleanup, show remaining run count and disk usage
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: Submit feedback or contribute to babysitter project
3
+ argument-hint: Specific instructions for the run.
4
+ allowed-tools: Read, Grep, Write, Task, Bash, Edit, Grep, Glob, WebFetch, WebSearch, Search, AskUserQuestion, TodoWrite, TodoRead, Skill, BashOutput, KillShell, MultiEdit, LS
5
+ ---
6
+
7
+ Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
8
+
9
+ ## Process Routing
10
+
11
+ 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:
12
+
13
+ ### Issue-based (opens a GitHub issue in a5c-ai/babysitter)
14
+ * **Bug report** → `cradle/bug-report.js#process` — Report a bug in the SDK, CLI, process library, etc.
15
+ * **Feature request** → `cradle/feature-request.js#process` — Request a new feature or enhancement
16
+ * **Documentation question** → `cradle/documentation-question.js#process` — Ask about undocumented behavior or missing docs
17
+
18
+ ### PR-based (forks repo, creates branch, submits PR to a5c-ai/babysitter)
19
+ * **Bugfix** → `cradle/bugfix.js#process` — User already has the fix for a bug
20
+ * **Feature implementation** → `cradle/feature-implementation-contribute.js#process` — User already has a feature implementation
21
+ * **Harness integration** → `cradle/feature-harness-integration-contribute.js#process` — User has a harness (CI/CD, IDE, editor) integration
22
+ * **Library contribution** → `cradle/library-contribution.js#process` — New or improved process/skill/subagent for the library
23
+ * **Documentation answer** → `cradle/documentation-contribute-answer.js#process` — User has an answer for an unanswered docs question
24
+
25
+ ### Router (when arguments are empty or general)
26
+ * **Contribute** → `cradle/contribute.js#process` — Explains contribution types and routes to the specific process
27
+
28
+ ## Contribution Rules
29
+
30
+ * PR-based contributions: fork the babysitter repo (a5c-ai/babysitter) for the user, ask to star if not already starred, perform changes, submit PR
31
+ * Issue-based contributions: gather details, search for duplicates, review, then open an issue in a5c-ai/babysitter
32
+ * Add breakpoints (permissions) before ALL gh actions (fork, star, submit PR/issue) to allow user review and cancellation
33
+ * If arguments are empty: use the `contribute.js` router process to show options and route accordingly