@a5c-ai/babysitter-github 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 (44) hide show
  1. package/.github/plugin.json +25 -0
  2. package/AGENTS.md +41 -0
  3. package/README.md +606 -0
  4. package/bin/cli.js +116 -0
  5. package/bin/install-shared.js +701 -0
  6. package/bin/install.js +129 -0
  7. package/bin/uninstall.js +76 -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/session-end.ps1 +68 -0
  24. package/hooks/session-end.sh +65 -0
  25. package/hooks/session-start.ps1 +110 -0
  26. package/hooks/session-start.sh +100 -0
  27. package/hooks/user-prompt-submitted.ps1 +51 -0
  28. package/hooks/user-prompt-submitted.sh +41 -0
  29. package/hooks.json +29 -0
  30. package/package.json +50 -0
  31. package/plugin.json +25 -0
  32. package/scripts/sync-command-surfaces.js +62 -0
  33. package/scripts/team-install.js +93 -0
  34. package/skills/assimilate/SKILL.md +38 -0
  35. package/skills/babysit/SKILL.md +77 -0
  36. package/skills/call/SKILL.md +8 -0
  37. package/skills/doctor/SKILL.md +427 -0
  38. package/skills/help/SKILL.md +245 -0
  39. package/skills/observe/SKILL.md +13 -0
  40. package/skills/plan/SKILL.md +8 -0
  41. package/skills/resume/SKILL.md +9 -0
  42. package/skills/retrospect/SKILL.md +56 -0
  43. package/skills/user-install/SKILL.md +18 -0
  44. package/versions.json +3 -0
@@ -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/AGENTS.md ADDED
@@ -0,0 +1,41 @@
1
+ # Babysitter Orchestration Agent
2
+
3
+ You are operating under Babysitter orchestration. Babysitter manages complex, multi-step
4
+ workflows with event-sourced state management, hook-based extensibility, and human-in-the-loop
5
+ approval gates.
6
+
7
+ ## Key Behaviors
8
+
9
+ 1. **Follow the process definition exactly.** Each task in the workflow has been defined with
10
+ specific inputs, outputs, and quality criteria. Do not skip steps or improvise alternatives
11
+ unless explicitly told to by the orchestrator.
12
+
13
+ 2. **Report completion accurately.** When you finish a task, your output must match the expected
14
+ result schema. Do not fabricate results or claim success without evidence.
15
+
16
+ 3. **Respect breakpoints.** When you encounter a breakpoint (human approval gate), stop and wait.
17
+ Do not attempt to bypass or auto-approve breakpoints.
18
+
19
+ 4. **Use structured output.** When the orchestrator requests JSON output, respond with valid JSON
20
+ only. Do not wrap it in markdown code fences or add commentary outside the JSON.
21
+
22
+ 5. **Completion proof.** When you have completed all assigned work, output the completion proof
23
+ token provided by the orchestrator: `<promise>COMPLETION_PROOF</promise>`. This signals the
24
+ Stop hook to allow the session to end.
25
+
26
+ ## Environment
27
+
28
+ - **Harness**: GitHub Copilot CLI (`copilot`)
29
+ - **SDK CLI**: `babysitter` (installed globally or via npx)
30
+ - **State directory**: `.a5c/` in the project root
31
+ - **Run directory**: `.a5c/runs/<runId>/`
32
+
33
+ ## Commands
34
+
35
+ You can invoke babysitter CLI commands directly:
36
+
37
+ ```bash
38
+ babysitter run:status --run-id <id> --json # Check run status
39
+ babysitter task:list --run-id <id> --json # List pending tasks
40
+ babysitter task:post --run-id <id> --effect-id <eid> --json # Post task result
41
+ ```
package/README.md ADDED
@@ -0,0 +1,606 @@
1
+ # @a5c-ai/babysitter-github
2
+
3
+ Babysitter orchestration plugin for GitHub Copilot. It supports both:
4
+
5
+ - **GitHub Copilot CLI** via the local plugin and hook model
6
+ - **GitHub Copilot coding agent / cloud agent** via repository-installed skills and instructions
7
+
8
+ This package ships a complete Copilot CLI plugin bundle -- skills, lifecycle
9
+ hooks, and SDK integration -- that lets you run Babysitter's event-sourced,
10
+ multi-step orchestration engine directly inside GitHub Copilot CLI sessions.
11
+ It uses the Babysitter SDK CLI and the shared `~/.a5c` process-library state.
12
+ The installer registers the plugin bundle and materializes the active skills
13
+ and hooks so Copilot CLI can execute Babysitter commands and hook scripts
14
+ directly.
15
+
16
+ ## Prerequisites
17
+
18
+ - **Node.js 22+**
19
+ - **GitHub Copilot CLI** (`copilot`) -- requires an active GitHub Copilot
20
+ subscription
21
+ - **Babysitter SDK CLI** (`@a5c-ai/babysitter-sdk`) -- installed globally
22
+
23
+ ## Installation
24
+
25
+ ### From marketplace (recommended)
26
+
27
+ Register the a5c.ai marketplace and install the plugin:
28
+
29
+ ```bash
30
+ # Register the marketplace
31
+ copilot plugin marketplace add a5c-ai/babysitter
32
+
33
+ # Install the plugin
34
+ copilot plugin install babysitter
35
+ ```
36
+
37
+ ### Direct GitHub install
38
+
39
+ Install directly from the Git repository using Copilot CLI. Copilot CLI
40
+ discovers the plugin via `.github/plugin/marketplace.json` at the repo root:
41
+
42
+ ```bash
43
+ copilot plugin install a5c-ai/babysitter
44
+ ```
45
+
46
+ ### Alternative Installation (npm / development)
47
+
48
+ For development or environments where the Copilot CLI plugin system is not
49
+ available, install via npm:
50
+
51
+ Install the SDK CLI first:
52
+
53
+ ```bash
54
+ npm install -g @a5c-ai/babysitter-sdk
55
+ ```
56
+
57
+ Then install the GitHub Copilot plugin globally:
58
+
59
+ ```bash
60
+ npm install -g @a5c-ai/babysitter-github
61
+ babysitter-github install
62
+ ```
63
+
64
+ Or install from source:
65
+
66
+ ```bash
67
+ cd plugins/babysitter-github
68
+ node bin/install.js
69
+ ```
70
+
71
+ Install into a specific workspace:
72
+
73
+ ```bash
74
+ babysitter-github install --workspace /path/to/repo
75
+ ```
76
+
77
+ ### GitHub Copilot cloud agent installation
78
+
79
+ For GitHub Copilot's cloud-hosted coding agent, install repository-scoped
80
+ Babysitter support instead of the local `~/.copilot` CLI plugin surface:
81
+
82
+ ```bash
83
+ babysitter-github install --cloud-agent --workspace /path/to/repo
84
+ ```
85
+
86
+ This installs:
87
+
88
+ - a mirrored Babysitter GitHub plugin bundle under `.github/babysitter/github-plugin/`
89
+ - Babysitter skills under `.github/skills/`
90
+ - a managed Babysitter block in `AGENTS.md`
91
+ - a managed Babysitter block in `.github/copilot-instructions.md`
92
+ - a `copilot-setup-steps` workflow, or a generated merge candidate if the repo already has one
93
+
94
+ If the repository already has a custom `copilot-setup-steps.yml`, the
95
+ installer preserves it and writes a merge candidate to:
96
+
97
+ ```text
98
+ .github/workflows/copilot-setup-steps.babysitter.generated.yml
99
+ ```
100
+
101
+ If the workspace does not already have an active process-library binding, the
102
+ installer bootstraps the shared global SDK process library automatically:
103
+
104
+ ```bash
105
+ babysitter process-library:active --json
106
+ ```
107
+
108
+ ## Uninstallation
109
+
110
+ Via Copilot CLI:
111
+
112
+ ```bash
113
+ copilot plugin uninstall babysitter
114
+ ```
115
+
116
+ Via npm:
117
+
118
+ ```bash
119
+ babysitter-github uninstall
120
+ ```
121
+
122
+ ## Integration Model
123
+
124
+ The plugin provides:
125
+
126
+ - `skills/babysit/SKILL.md` as the core orchestration entrypoint
127
+ - Mode wrapper skills such as `$call`, `$plan`, and `$resume`
128
+ - Plugin-level lifecycle hooks for `sessionStart`, `sessionEnd`, and
129
+ `userPromptSubmitted`
130
+
131
+ For Copilot cloud agent, the hook scripts are mirrored into the repository as
132
+ part of the installed plugin bundle for reference and parity, but the hosted
133
+ agent path is driven by repository instructions, skills, and setup workflow
134
+ instead of local `~/.copilot/hooks.json`.
135
+
136
+ The process library is fetched and bound through the SDK CLI in
137
+ `~/.a5c/active/process-library.json`.
138
+
139
+ ### Active Process-Library Model
140
+
141
+ Process discovery prefers active roots in this order:
142
+
143
+ 1. `.a5c/processes` in the current workspace
144
+ 2. The SDK-managed active process-library binding returned by
145
+ `babysitter process-library:active --json`
146
+ 3. The cloned process-library repo root from `defaultSpec.cloneDir` when
147
+ adjacent reference material is needed
148
+ 4. Installed extension content only as a compatibility fallback
149
+
150
+ ## Available Skills
151
+
152
+ The plugin registers ten skills that surface as slash commands within Copilot
153
+ CLI:
154
+
155
+ | Skill | Description |
156
+ |-------|-------------|
157
+ | `babysit` | Core entrypoint. Orchestrate `.a5c/runs/<runId>/` through iterative execution. Invoke when asked to babysit, orchestrate, or run a workflow. |
158
+ | `call` | Start a new orchestration run. Everything after `$call` becomes the initial Babysitter request. Always creates an interactive run. |
159
+ | `plan` | Design a process definition without executing it. Useful for reviewing or refining a workflow before committing to a run. |
160
+ | `resume` | Resume an incomplete or paused orchestration run from where it left off. |
161
+ | `doctor` | Diagnose run health -- journal integrity, state cache, effects, locks, sessions, logs, and disk usage. |
162
+ | `retrospect` | Analyze a completed run: results, process quality, and suggestions for process improvements and optimizations. |
163
+ | `observe` | Launch the real-time observer dashboard to watch active runs. |
164
+ | `assimilate` | Assimilate an external methodology, harness, or specification into Babysitter process definitions. |
165
+ | `help` | Show documentation for Babysitter command usage, processes, skills, agents, and methodologies. |
166
+ | `user-install` | Set up Babysitter for yourself -- installs dependencies, interviews you about preferences, and configures user-level defaults. |
167
+
168
+ ## How the Hook-Driven Orchestration Loop Works
169
+
170
+ GitHub Copilot CLI supports plugin lifecycle hooks. This plugin registers
171
+ three hooks that drive the orchestration loop:
172
+
173
+ ### SessionStart
174
+
175
+ Fires when a new Copilot CLI session begins. The hook:
176
+
177
+ 1. Initializes a Babysitter session for the active Copilot session
178
+ 2. Ensures the SDK CLI is installed at the correct version (pinned in
179
+ `versions.json`)
180
+ 3. Creates baseline session state in the `.a5c` state directory
181
+
182
+ ### SessionEnd
183
+
184
+ The orchestration loop driver. Registered as `sessionEnd` in `hooks.json`,
185
+ this hook fires when the Copilot CLI session ends and:
186
+
187
+ 1. Checks whether the active run has completed or emitted a completion proof
188
+ 2. If the run is still in progress, re-injects the next orchestration step
189
+ to continue iteration
190
+ 3. Only allows the session to exit when the run finishes or reaches a
191
+ breakpoint requiring human input
192
+
193
+ This is what keeps Babysitter iterating autonomously within the Copilot CLI
194
+ session -- each turn performs one orchestration phase, and the Stop hook
195
+ decides whether to loop or yield.
196
+
197
+ ### UserPromptSubmitted
198
+
199
+ Fires before a user prompt reaches the model. The hook applies
200
+ density-filter compression to long user prompts to reduce token usage while
201
+ preserving semantic content.
202
+
203
+ ## Configuration
204
+
205
+ ### AGENTS.md
206
+
207
+ The plugin uses `AGENTS.md` (the Copilot CLI equivalent of `CLAUDE.md`) for
208
+ custom agent instructions. The cloud-agent installer appends a managed
209
+ Babysitter section to the repository root `AGENTS.md` so the hosted agent can
210
+ see the same orchestration guidance.
211
+
212
+ ### .github/copilot-instructions.md
213
+
214
+ The cloud-agent installer also appends a managed Babysitter block to
215
+ `.github/copilot-instructions.md`. This gives GitHub-hosted Copilot sessions a
216
+ repository-wide entrypoint for the Babysitter skills and setup workflow.
217
+
218
+ ### copilot-setup-steps workflow
219
+
220
+ The cloud-agent path seeds `.github/workflows/copilot-setup-steps.yml` with a
221
+ `copilot-setup-steps` job that installs the Babysitter SDK and initializes the
222
+ active process library before the cloud agent starts working.
223
+
224
+ ### Environment Variables
225
+
226
+ | Variable | Default | Description |
227
+ |----------|---------|-------------|
228
+ | `CLAUDE_PROJECT_DIR` | CWD | Project root directory (set by Copilot CLI) |
229
+ | `BABYSITTER_LOG_DIR` | `<plugin>/.a5c/logs` | Log output directory |
230
+ | `BABYSITTER_STATE_DIR` | `<cwd>/.a5c` | State directory for session data |
231
+
232
+ ### SDK Version Pinning
233
+
234
+ The plugin pins its required SDK version in `versions.json`. The
235
+ SessionStart hook reads this file and ensures the correct version of
236
+ `@a5c-ai/babysitter-sdk` is installed globally before proceeding.
237
+
238
+ ## Copilot CLI Plugin Structure
239
+
240
+ This section documents the Copilot CLI plugin format that this package
241
+ conforms to. Understanding this structure is useful when extending the plugin
242
+ or building new ones.
243
+
244
+ ### Plugin Manifest Location
245
+
246
+ Copilot CLI looks for the plugin manifest in these paths, checked in order:
247
+
248
+ 1. `.plugin/plugin.json`
249
+ 2. `.github/plugin/plugin.json`
250
+ 3. `.claude-plugin/plugin.json`
251
+ 4. `plugin.json` (repository root)
252
+
253
+ The first match wins. This plugin uses `plugin.json` at the package root.
254
+
255
+ For marketplace discovery, Copilot CLI looks for `.github/plugin/marketplace.json`
256
+ at the repository root. This file lists all available plugins in the repo and is
257
+ used when installing via `copilot plugin install OWNER/REPO`.
258
+
259
+ ### plugin.json Schema
260
+
261
+ The manifest declares metadata, skills, hooks, and optional integrations:
262
+
263
+ | Field | Required | Type | Description |
264
+ |-------|----------|------|-------------|
265
+ | `name` | Yes | `string` | Plugin identifier (e.g., `"babysitter"`) |
266
+ | `description` | No | `string` | Human-readable summary |
267
+ | `version` | No | `string` | Semver version string |
268
+ | `author` | No | `object` | Author info: `{ "name": "...", "email": "..." }` |
269
+ | `license` | No | `string` | SPDX license identifier |
270
+ | `keywords` | No | `string[]` | Searchable tags for marketplace discovery |
271
+ | `agents` | No | `string` | Path to agents directory |
272
+ | `skills` | No | `string` | Path to skills directory (auto-discovers SKILL.md files in subdirectories) |
273
+ | `hooks` | No | `string` | Path to `hooks.json` |
274
+ | `mcpServers` | No | `string` | Path to `.mcp.json` for MCP server configuration |
275
+
276
+ Example from this plugin:
277
+
278
+ ```json
279
+ {
280
+ "name": "babysitter",
281
+ "version": "0.1.0",
282
+ "description": "Orchestrate complex, multi-step workflows ...",
283
+ "author": "a5c.ai",
284
+ "license": "MIT",
285
+ "skills": "skills/",
286
+ "hooks": "hooks.json",
287
+ "commands": [],
288
+ "keywords": ["orchestration", "workflow", "automation"]
289
+ }
290
+ ```
291
+
292
+ ### Skills Format
293
+
294
+ Each skill lives in its own directory under `skills/` and is defined by a
295
+ Markdown file with YAML frontmatter:
296
+
297
+ ```
298
+ skills/
299
+ babysit/
300
+ SKILL.md
301
+ call/
302
+ SKILL.md
303
+ plan/
304
+ SKILL.md
305
+ ```
306
+
307
+ The `SKILL.md` file uses frontmatter to declare metadata:
308
+
309
+ ```markdown
310
+ ---
311
+ name: babysit
312
+ description: Orchestrate a multi-step workflow using the Babysitter SDK
313
+ ---
314
+
315
+ Skill body with instructions for the agent...
316
+ ```
317
+
318
+ The `name` and `description` fields in the frontmatter are required. The
319
+ body of the Markdown file contains the instructions the agent follows when
320
+ the skill is invoked.
321
+
322
+ ### hooks.json Format
323
+
324
+ The `hooks.json` file declares lifecycle hook handlers as an array of
325
+ command descriptors per event type:
326
+
327
+ ```json
328
+ {
329
+ "version": 1,
330
+ "hooks": {
331
+ "sessionStart": [
332
+ {
333
+ "type": "command",
334
+ "bash": "./hooks/session-start.sh",
335
+ "powershell": "./hooks/session-start.ps1",
336
+ "timeoutSec": 30
337
+ }
338
+ ],
339
+ "sessionEnd": [
340
+ {
341
+ "type": "command",
342
+ "bash": "./hooks/session-end.sh",
343
+ "powershell": "./hooks/session-end.ps1",
344
+ "timeoutSec": 30
345
+ }
346
+ ],
347
+ "userPromptSubmitted": [
348
+ {
349
+ "type": "command",
350
+ "bash": "./hooks/user-prompt-submitted.sh",
351
+ "powershell": "./hooks/user-prompt-submitted.ps1",
352
+ "timeoutSec": 30
353
+ }
354
+ ],
355
+ "preToolUse": [...],
356
+ "postToolUse": [...],
357
+ "errorOccurred": [...]
358
+ }
359
+ }
360
+ ```
361
+
362
+ Each hook entry specifies a `bash` and/or `powershell` command, a `type`
363
+ (currently always `"command"`), and an optional `timeoutSec`.
364
+
365
+ **Supported hook event types:**
366
+
367
+ | Event | Description |
368
+ |-------|-------------|
369
+ | `sessionStart` | Fires when a new CLI session begins |
370
+ | `sessionEnd` | Fires when a CLI session ends |
371
+ | `userPromptSubmitted` | Fires before a user prompt reaches the model |
372
+ | `preToolUse` | Fires before a tool is executed |
373
+ | `postToolUse` | Fires after a tool has executed |
374
+ | `errorOccurred` | Fires when an error is encountered |
375
+
376
+ **Flow-control decisions:** Only `preToolUse` hooks can return flow-control
377
+ decisions via the `permissionDecision` field in stdout JSON. Valid values
378
+ are `"deny"`, `"allow"`, and `"ask"`. All other hook event outputs are
379
+ ignored by the runtime.
380
+
381
+ ## Marketplace Distribution
382
+
383
+ Copilot CLI plugins can be distributed through marketplaces -- Git
384
+ repositories that contain a manifest listing available plugins.
385
+
386
+ ### Creating a Marketplace
387
+
388
+ A marketplace is a Git repository with a `marketplace.json` file at the
389
+ repository root in `.github/plugin/marketplace.json`:
390
+
391
+ ```json
392
+ {
393
+ "name": "a5c.ai",
394
+ "owner": {
395
+ "name": "a5c.ai",
396
+ "email": "support@a5c.ai"
397
+ },
398
+ "metadata": {
399
+ "description": "Babysitter orchestration plugins",
400
+ "version": "1.0.0"
401
+ },
402
+ "plugins": [
403
+ {
404
+ "name": "babysitter",
405
+ "description": "Multi-step workflow orchestration with event-sourced state",
406
+ "version": "0.1.0",
407
+ "source": "./plugins/babysitter-github"
408
+ }
409
+ ]
410
+ }
411
+ ```
412
+
413
+ The `source` field points to the plugin directory relative to the
414
+ marketplace repository root.
415
+
416
+ ### User Commands
417
+
418
+ Copilot CLI provides built-in commands for plugin and marketplace
419
+ management:
420
+
421
+ **Marketplace commands:**
422
+
423
+ ```bash
424
+ copilot plugin marketplace add OWNER/REPO # Register a marketplace
425
+ copilot plugin marketplace list # List registered marketplaces
426
+ copilot plugin marketplace browse NAME # Browse plugins in a marketplace
427
+ ```
428
+
429
+ **Plugin installation:**
430
+
431
+ ```bash
432
+ copilot plugin install PLUGIN@MARKETPLACE # Install from a marketplace
433
+ copilot plugin install OWNER/REPO # Install directly from a GitHub repo
434
+ copilot plugin install ./PATH # Install from a local path
435
+ ```
436
+
437
+ **Plugin management:**
438
+
439
+ ```bash
440
+ copilot plugin list # List installed plugins
441
+ copilot plugin update PLUGIN # Update a plugin
442
+ copilot plugin uninstall PLUGIN # Remove a plugin
443
+ ```
444
+
445
+ ### Plugin Storage
446
+
447
+ Installed plugins are stored under `~/.copilot/installed-plugins/`:
448
+
449
+ - **Marketplace installs:** `~/.copilot/installed-plugins/MARKETPLACE/PLUGIN-NAME/`
450
+ - **Direct installs:** `~/.copilot/installed-plugins/_direct/SOURCE-ID/`
451
+
452
+ ### Default Registries
453
+
454
+ Copilot CLI ships with two built-in registries:
455
+
456
+ - `copilot-plugins` -- official first-party plugins
457
+ - `awesome-copilot` -- community-curated plugin collection
458
+
459
+ These registries are available without running `marketplace add`.
460
+
461
+ ## Plugin Structure (Directory Layout)
462
+
463
+ ```
464
+ plugins/babysitter-github/
465
+ plugin.json # Plugin manifest (skills, hooks, metadata)
466
+ .github/plugin.json # Plugin manifest (alternate discovery path)
467
+ hooks.json # Hook configuration (sessionStart, sessionEnd, userPromptSubmitted)
468
+ hooks/
469
+ session-start.sh # SessionStart lifecycle hook
470
+ session-end.sh # SessionEnd lifecycle hook
471
+ user-prompt-submitted.sh # UserPromptSubmitted hook (prompt compression)
472
+ skills/
473
+ babysit/SKILL.md # Core orchestration skill
474
+ call/SKILL.md # Start a new run
475
+ plan/SKILL.md # Plan without executing
476
+ resume/SKILL.md # Resume an incomplete run
477
+ doctor/SKILL.md # Diagnose run health
478
+ retrospect/SKILL.md # Analyze completed runs
479
+ observe/SKILL.md # Observer dashboard
480
+ assimilate/SKILL.md # Assimilate external methodologies
481
+ help/SKILL.md # Help and documentation
482
+ user-install/SKILL.md # User setup
483
+ bin/
484
+ cli.js # CLI entry point (babysitter-github command)
485
+ install.js # Installation script
486
+ uninstall.js # Uninstallation script
487
+ scripts/
488
+ team-install.js # Team-level installation
489
+ versions.json # SDK version pinning
490
+ package.json # npm package metadata
491
+ AGENTS.md # Custom instructions for Copilot CLI
492
+ ```
493
+
494
+ Cloud-agent installation additionally writes into the target repository:
495
+
496
+ ```
497
+ .github/
498
+ babysitter/github-plugin/ # Mirrored plugin bundle for repo-local visibility
499
+ skills/
500
+ babysitter-babysit/SKILL.md # Installed Babysitter cloud skills
501
+ babysitter-call/SKILL.md
502
+ ...
503
+ copilot-instructions.md # Managed Babysitter block appended
504
+ workflows/
505
+ copilot-setup-steps.yml # Managed workflow when no custom file exists
506
+ copilot-setup-steps.babysitter.generated.yml # Merge candidate when a custom file already exists
507
+ AGENTS.md # Managed Babysitter block appended
508
+ ```
509
+
510
+ ## Verification
511
+
512
+ Verify marketplace registration:
513
+
514
+ ```bash
515
+ copilot plugin marketplace list
516
+ ```
517
+
518
+ Verify the installed plugin:
519
+
520
+ ```bash
521
+ npm ls -g @a5c-ai/babysitter-github --depth=0
522
+ ```
523
+
524
+ Verify the active shared process-library binding:
525
+
526
+ ```bash
527
+ babysitter process-library:active --json
528
+ ```
529
+
530
+ ## Troubleshooting
531
+
532
+ ### Hook not firing
533
+
534
+ Run the doctor skill from within a Copilot CLI session to diagnose hook and
535
+ session health:
536
+
537
+ ```text
538
+ $doctor
539
+ ```
540
+
541
+ ### Run stuck or not progressing
542
+
543
+ Check the run status and diagnose:
544
+
545
+ ```text
546
+ $doctor [run-id]
547
+ ```
548
+
549
+ You can also inspect the run directory directly:
550
+
551
+ ```bash
552
+ babysitter run:status --run-id <runId> --json
553
+ babysitter run:events --run-id <runId> --json
554
+ ```
555
+
556
+ ### SDK version mismatch
557
+
558
+ If the plugin reports version incompatibility, ensure the pinned SDK version
559
+ is installed:
560
+
561
+ ```bash
562
+ SDK_VERSION=$(node -e "console.log(JSON.parse(require('fs').readFileSync('versions.json','utf8')).sdkVersion)")
563
+ npm install -g @a5c-ai/babysitter-sdk@$SDK_VERSION
564
+ ```
565
+
566
+ ### Windows limitations
567
+
568
+ On native Windows, Copilot CLI may not execute hook scripts depending on
569
+ shell configuration. The plugin still installs correctly, but lifecycle hooks
570
+ may not fire. Using WSL or Git Bash is recommended. The `hooks.json` file
571
+ includes `powershell` entries alongside `bash` entries to improve Windows
572
+ compatibility where PowerShell execution is available.
573
+
574
+ ## Development / Contributing
575
+
576
+ ### Local development
577
+
578
+ ```bash
579
+ git clone https://github.com/a5c-ai/babysitter.git
580
+ cd babysitter
581
+ npm install
582
+ cd plugins/babysitter-github
583
+ node bin/install.js
584
+ ```
585
+
586
+ ### Publishing
587
+
588
+ ```bash
589
+ cd plugins/babysitter-github
590
+ npm run deploy # Publish to npm (public)
591
+ npm run deploy:staging # Publish to npm with staging tag
592
+ ```
593
+
594
+ ### Team installation
595
+
596
+ ```bash
597
+ cd plugins/babysitter-github
598
+ npm run team:install
599
+ ```
600
+
601
+ This sets up the plugin for all team members in a shared workspace,
602
+ writing team-level configuration to `.a5c/team/`.
603
+
604
+ ## License
605
+
606
+ MIT