@a5c-ai/babysitter-codex 0.1.6-staging.2dca8387

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 (51) hide show
  1. package/.codex/AGENTS.md +53 -0
  2. package/.codex/command-catalog.json +130 -0
  3. package/.codex/config.toml +24 -0
  4. package/.codex/hooks/babysitter-session-start.sh +15 -0
  5. package/.codex/hooks/babysitter-stop-hook.sh +15 -0
  6. package/.codex/hooks/user-prompt-submit.sh +15 -0
  7. package/.codex/hooks.json +37 -0
  8. package/.codex/plugin.json +132 -0
  9. package/.codex/skills/babysitter/assimilate/SKILL.md +58 -0
  10. package/.codex/skills/babysitter/call/SKILL.md +590 -0
  11. package/.codex/skills/babysitter/doctor/SKILL.md +89 -0
  12. package/.codex/skills/babysitter/forever/SKILL.md +45 -0
  13. package/.codex/skills/babysitter/help/SKILL.md +49 -0
  14. package/.codex/skills/babysitter/issue/SKILL.md +36 -0
  15. package/.codex/skills/babysitter/model/SKILL.md +31 -0
  16. package/.codex/skills/babysitter/observe/SKILL.md +38 -0
  17. package/.codex/skills/babysitter/plan/SKILL.md +44 -0
  18. package/.codex/skills/babysitter/project-install/SKILL.md +65 -0
  19. package/.codex/skills/babysitter/resume/SKILL.md +30 -0
  20. package/.codex/skills/babysitter/retrospect/SKILL.md +43 -0
  21. package/.codex/skills/babysitter/team-install/SKILL.md +31 -0
  22. package/.codex/skills/babysitter/user-install/SKILL.md +53 -0
  23. package/.codex/skills/babysitter/yolo/SKILL.md +48 -0
  24. package/AGENTS.md +91 -0
  25. package/CHANGELOG.md +162 -0
  26. package/README.md +146 -0
  27. package/SKILL.md +89 -0
  28. package/agents/openai.yaml +4 -0
  29. package/babysitter.lock.json +18 -0
  30. package/bin/postinstall.js +225 -0
  31. package/bin/uninstall.js +37 -0
  32. package/commands/README.md +23 -0
  33. package/commands/assimilate.md +27 -0
  34. package/commands/call.md +30 -0
  35. package/commands/doctor.md +27 -0
  36. package/commands/forever.md +27 -0
  37. package/commands/help.md +28 -0
  38. package/commands/issue.md +27 -0
  39. package/commands/model.md +27 -0
  40. package/commands/observe.md +27 -0
  41. package/commands/plan.md +27 -0
  42. package/commands/project-install.md +31 -0
  43. package/commands/resume.md +29 -0
  44. package/commands/retrospect.md +27 -0
  45. package/commands/team-install.md +29 -0
  46. package/commands/user-install.md +27 -0
  47. package/commands/yolo.md +28 -0
  48. package/package.json +50 -0
  49. package/scripts/team-install.js +257 -0
  50. package/test/integration.test.js +69 -0
  51. package/test/packaged-install.test.js +191 -0
@@ -0,0 +1,53 @@
1
+ # Project-Scoped Agent Instructions
2
+
3
+ These instructions supplement the root `AGENTS.md` with Codex-specific rules for
4
+ the bundled `babysitter-codex` runtime.
5
+
6
+ ## Real Codex Surfaces
7
+
8
+ - Installed skills under `~/.codex/skills/babysitter-codex`
9
+ - `AGENTS.md`
10
+ - project `.codex/config.toml`
11
+ - optional `notify`
12
+
13
+ Codex does not provide native blocking `SessionStart` or `Stop` hooks for this
14
+ package. The shell files in `.codex/hooks/*.sh` are compatibility stubs only.
15
+
16
+ ## Session Binding
17
+
18
+ - Use a session ID only when it is explicitly available from:
19
+ - `BABYSITTER_SESSION_ID`
20
+ - `CODEX_THREAD_ID`
21
+ - `CODEX_SESSION_ID`
22
+ - Never fabricate a session ID just to call `session:init`.
23
+ - If no real session ID exists, continue in compat-core mode without session
24
+ binding.
25
+
26
+ ## Installed Skill Layout
27
+
28
+ The installed skill must be self-contained. Required payload at
29
+ `~/.codex/skills/babysitter-codex/`:
30
+
31
+ - `SKILL.md`
32
+ - `AGENTS.md`
33
+ - `.codex/`
34
+ - `agents/`
35
+ - `bin/`
36
+ - `commands/`
37
+ - `scripts/`
38
+ - `babysitter.lock.json`
39
+
40
+ ## Team Install Contract
41
+
42
+ - `scripts/team-install.js` resolves the package root from its own installed
43
+ location, not from repo `cwd`.
44
+ - They write workspace state only under `<workspace>/.a5c/team/`.
45
+ - Generated profile paths may point back to the installed skill root for hook
46
+ assets and skill metadata.
47
+
48
+ ## Result Posting
49
+
50
+ - Write successful task payloads to `tasks/<effectId>/output.json`.
51
+ - Post results with `babysitter task:post <runDir> <effectId> --status ok --value tasks/<effectId>/output.json --json`.
52
+ - Post errors with `--status error --error tasks/<effectId>/error.json --json`.
53
+ - Never write `result.json` directly.
@@ -0,0 +1,130 @@
1
+ {
2
+ "name": "babysitter",
3
+ "version": "0.1.5",
4
+ "description": "Packaged metadata for the Babysitter Codex skill bundle and hook-enabled project install templates.",
5
+ "author": "a5c.ai",
6
+ "license": "MIT",
7
+ "runtimeCapabilities": {
8
+ "codexNativeSurfaces": [
9
+ "AGENTS.md",
10
+ "skills",
11
+ "config.toml",
12
+ "hooks.json"
13
+ ],
14
+ "babysitterRuntimeOwnsRunLoop": false,
15
+ "supportsBlockingHooks": true,
16
+ "supportsCustomSlashCommands": false,
17
+ "sessionBinding": "hook-first",
18
+ "hookModel": "codex-hooks",
19
+ "primaryTurnControl": "stop-hook"
20
+ },
21
+ "commands": [
22
+ {
23
+ "name": "babysitter:call",
24
+ "file": "skills/babysitter/call/SKILL.md",
25
+ "aliases": [
26
+ "babysitter:babysit",
27
+ "babysitter"
28
+ ],
29
+ "description": "Start a babysitter orchestration run",
30
+ "argumentHint": "Specific instructions for the run"
31
+ },
32
+ {
33
+ "name": "babysitter:yolo",
34
+ "file": "skills/babysitter/yolo/SKILL.md",
35
+ "description": "Non-interactive autonomous orchestration (no breakpoints)",
36
+ "argumentHint": "Specific instructions for the run"
37
+ },
38
+ {
39
+ "name": "babysitter:resume",
40
+ "file": "skills/babysitter/resume/SKILL.md",
41
+ "description": "Resume an existing orchestration run",
42
+ "argumentHint": "[run-id] Optional run ID to resume"
43
+ },
44
+ {
45
+ "name": "babysitter:plan",
46
+ "file": "skills/babysitter/plan/SKILL.md",
47
+ "description": "Plan a workflow without executing it",
48
+ "argumentHint": "Specific instructions for the plan"
49
+ },
50
+ {
51
+ "name": "babysitter:forever",
52
+ "file": "skills/babysitter/forever/SKILL.md",
53
+ "description": "Start a never-ending periodic orchestration run",
54
+ "argumentHint": "Specific instructions for the run"
55
+ },
56
+ {
57
+ "name": "babysitter:doctor",
58
+ "file": "skills/babysitter/doctor/SKILL.md",
59
+ "description": "Diagnose babysitter run health",
60
+ "argumentHint": "[run-id] Optional run ID to diagnose"
61
+ },
62
+ {
63
+ "name": "babysitter:observe",
64
+ "file": "skills/babysitter/observe/SKILL.md",
65
+ "description": "Launch the observer dashboard",
66
+ "argumentHint": "[--watch-dir <dir>] or 'stop'"
67
+ },
68
+ {
69
+ "name": "babysitter:retrospect",
70
+ "file": "skills/babysitter/retrospect/SKILL.md",
71
+ "description": "Analyze completed runs and propose process improvements",
72
+ "argumentHint": "[run-id] Optional run ID to analyze"
73
+ },
74
+ {
75
+ "name": "babysitter:model",
76
+ "file": "skills/babysitter/model/SKILL.md",
77
+ "description": "Set or view model routing policy",
78
+ "argumentHint": "[show|set <phase>=<model> ...]"
79
+ },
80
+ {
81
+ "name": "babysitter:issue",
82
+ "file": "skills/babysitter/issue/SKILL.md",
83
+ "description": "Work directly from a GitHub issue",
84
+ "argumentHint": "<issue-number|url> [--repo owner/name]"
85
+ },
86
+ {
87
+ "name": "babysitter:help",
88
+ "file": "skills/babysitter/help/SKILL.md",
89
+ "description": "Help and documentation",
90
+ "argumentHint": "[command|process|skill|agent] topic to get help on"
91
+ },
92
+ {
93
+ "name": "babysitter:project-install",
94
+ "file": "skills/babysitter/project-install/SKILL.md",
95
+ "description": "Set up a project for babysitting",
96
+ "argumentHint": "Specific instructions"
97
+ },
98
+ {
99
+ "name": "babysitter:user-install",
100
+ "file": "skills/babysitter/user-install/SKILL.md",
101
+ "description": "Set up babysitter for a user",
102
+ "argumentHint": "Specific instructions"
103
+ },
104
+ {
105
+ "name": "babysitter:assimilate",
106
+ "file": "skills/babysitter/assimilate/SKILL.md",
107
+ "description": "Assimilate external methodology into babysitter processes",
108
+ "argumentHint": "Target (repo URL, harness name, or spec path)"
109
+ },
110
+ {
111
+ "name": "babysitter:team-install",
112
+ "file": "skills/babysitter/team-install/SKILL.md",
113
+ "description": "Install team-pinned babysitter runtime/content from lockfile",
114
+ "argumentHint": "[--dry-run]"
115
+ }
116
+ ],
117
+ "skills": [],
118
+ "repository": {
119
+ "type": "git",
120
+ "url": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex"
121
+ },
122
+ "keywords": [
123
+ "orchestration",
124
+ "workflow",
125
+ "codex",
126
+ "babysitter",
127
+ "command-phrases",
128
+ "command-catalog"
129
+ ]
130
+ }
@@ -0,0 +1,24 @@
1
+ # Project-scoped Codex configuration template for babysitter-codex.
2
+ #
3
+ # This package now assumes the real Codex lifecycle hook engine:
4
+ # - `.codex/hooks.json` registers SessionStart, UserPromptSubmit, and Stop
5
+ # - `features.codex_hooks = true` enables that engine on supported platforms
6
+ # - `.a5c` stores babysitter session and run state
7
+ #
8
+ # `team-install` / `project-install` should materialize a workspace-local
9
+ # `.codex/hooks.json` that points at the installed hook scripts.
10
+
11
+ approval_policy = "on-request"
12
+ sandbox_mode = "workspace-write"
13
+ project_doc_max_bytes = 65536
14
+
15
+ [sandbox_workspace_write]
16
+ writable_roots = [".a5c", ".codex"]
17
+
18
+ [features]
19
+ codex_hooks = true
20
+ multi_agent = true
21
+
22
+ [agents]
23
+ max_depth = 3
24
+ max_threads = 4
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
6
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
7
+
8
+ export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
9
+ export BABYSITTER_STATE_DIR="${STATE_DIR}"
10
+
11
+ exec babysitter hook:run \
12
+ --hook-type session-start \
13
+ --harness codex \
14
+ --plugin-root "${CODEX_PLUGIN_ROOT}" \
15
+ --state-dir "${BABYSITTER_STATE_DIR}"
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
6
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
7
+
8
+ export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
9
+ export BABYSITTER_STATE_DIR="${STATE_DIR}"
10
+
11
+ exec babysitter hook:run \
12
+ --hook-type stop \
13
+ --harness codex \
14
+ --plugin-root "${CODEX_PLUGIN_ROOT}" \
15
+ --state-dir "${BABYSITTER_STATE_DIR}"
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5
+ PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
6
+ STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
7
+
8
+ export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
9
+ export BABYSITTER_STATE_DIR="${STATE_DIR}"
10
+
11
+ exec babysitter hook:run \
12
+ --hook-type user-prompt-submit \
13
+ --harness codex \
14
+ --plugin-root "${CODEX_PLUGIN_ROOT}" \
15
+ --state-dir "${BABYSITTER_STATE_DIR}"
@@ -0,0 +1,37 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "*",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": ".codex/hooks/babysitter-session-start.sh"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "matcher": "*",
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": ".codex/hooks/user-prompt-submit.sh"
21
+ }
22
+ ]
23
+ }
24
+ ],
25
+ "Stop": [
26
+ {
27
+ "matcher": "*",
28
+ "hooks": [
29
+ {
30
+ "type": "command",
31
+ "command": ".codex/hooks/babysitter-stop-hook.sh"
32
+ }
33
+ ]
34
+ }
35
+ ]
36
+ }
37
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "name": "babysitter",
3
+ "version": "0.1.5",
4
+ "description": "Packaged metadata for the Babysitter Codex skill bundle and hook-enabled project install templates.",
5
+ "author": "a5c.ai",
6
+ "license": "MIT",
7
+ "runtimeCapabilities": {
8
+ "codexNativeSurfaces": [
9
+ "AGENTS.md",
10
+ "skills",
11
+ "config.toml",
12
+ "hooks.json"
13
+ ],
14
+ "babysitterRuntimeOwnsRunLoop": false,
15
+ "supportsBlockingHooks": true,
16
+ "supportsCustomSlashCommands": false,
17
+ "sessionBinding": "hook-first",
18
+ "hookModel": "codex-hooks",
19
+ "primaryTurnControl": "stop-hook"
20
+ },
21
+ "commands": [
22
+ {
23
+ "name": "babysitter:call",
24
+ "file": "skills/babysitter/call/SKILL.md",
25
+ "aliases": [
26
+ "babysitter:babysit",
27
+ "babysitter"
28
+ ],
29
+ "description": "Start a babysitter orchestration run",
30
+ "argumentHint": "Specific instructions for the run"
31
+ },
32
+ {
33
+ "name": "babysitter:yolo",
34
+ "file": "skills/babysitter/yolo/SKILL.md",
35
+ "description": "Non-interactive autonomous orchestration (no breakpoints)",
36
+ "argumentHint": "Specific instructions for the run"
37
+ },
38
+ {
39
+ "name": "babysitter:resume",
40
+ "file": "skills/babysitter/resume/SKILL.md",
41
+ "description": "Resume an existing orchestration run",
42
+ "argumentHint": "[run-id] Optional run ID to resume"
43
+ },
44
+ {
45
+ "name": "babysitter:plan",
46
+ "file": "skills/babysitter/plan/SKILL.md",
47
+ "description": "Plan a workflow without executing it",
48
+ "argumentHint": "Specific instructions for the plan"
49
+ },
50
+ {
51
+ "name": "babysitter:forever",
52
+ "file": "skills/babysitter/forever/SKILL.md",
53
+ "description": "Start a never-ending periodic orchestration run",
54
+ "argumentHint": "Specific instructions for the run"
55
+ },
56
+ {
57
+ "name": "babysitter:doctor",
58
+ "file": "skills/babysitter/doctor/SKILL.md",
59
+ "description": "Diagnose babysitter run health",
60
+ "argumentHint": "[run-id] Optional run ID to diagnose"
61
+ },
62
+ {
63
+ "name": "babysitter:observe",
64
+ "file": "skills/babysitter/observe/SKILL.md",
65
+ "description": "Launch the observer dashboard",
66
+ "argumentHint": "[--watch-dir \u003cdir\u003e] or \u0027stop\u0027"
67
+ },
68
+ {
69
+ "name": "babysitter:retrospect",
70
+ "file": "skills/babysitter/retrospect/SKILL.md",
71
+ "description": "Analyze completed runs and propose process improvements",
72
+ "argumentHint": "[run-id] Optional run ID to analyze"
73
+ },
74
+ {
75
+ "name": "babysitter:model",
76
+ "file": "skills/babysitter/model/SKILL.md",
77
+ "description": "Set or view model routing policy",
78
+ "argumentHint": "[show|set \u003cphase\u003e=\u003cmodel\u003e ...]"
79
+ },
80
+ {
81
+ "name": "babysitter:issue",
82
+ "file": "skills/babysitter/issue/SKILL.md",
83
+ "description": "Work directly from a GitHub issue",
84
+ "argumentHint": "\u003cissue-number|url\u003e [--repo owner/name]"
85
+ },
86
+ {
87
+ "name": "babysitter:help",
88
+ "file": "skills/babysitter/help/SKILL.md",
89
+ "description": "Help and documentation",
90
+ "argumentHint": "[command|process|skill|agent] topic to get help on"
91
+ },
92
+ {
93
+ "name": "babysitter:project-install",
94
+ "file": "skills/babysitter/project-install/SKILL.md",
95
+ "description": "Set up a project for babysitting",
96
+ "argumentHint": "Specific instructions"
97
+ },
98
+ {
99
+ "name": "babysitter:user-install",
100
+ "file": "skills/babysitter/user-install/SKILL.md",
101
+ "description": "Set up babysitter for a user",
102
+ "argumentHint": "Specific instructions"
103
+ },
104
+ {
105
+ "name": "babysitter:assimilate",
106
+ "file": "skills/babysitter/assimilate/SKILL.md",
107
+ "description": "Assimilate external methodology into babysitter processes",
108
+ "argumentHint": "Target (repo URL, harness name, or spec path)"
109
+ },
110
+ {
111
+ "name": "babysitter:team-install",
112
+ "file": "skills/babysitter/team-install/SKILL.md",
113
+ "description": "Install team-pinned babysitter runtime/content from lockfile",
114
+ "argumentHint": "[--dry-run]"
115
+ }
116
+ ],
117
+ "skills": [
118
+
119
+ ],
120
+ "repository": {
121
+ "type": "git",
122
+ "url": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex"
123
+ },
124
+ "keywords": [
125
+ "orchestration",
126
+ "workflow",
127
+ "codex",
128
+ "babysitter",
129
+ "command-phrases",
130
+ "command-catalog"
131
+ ]
132
+ }
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: babysitter:assimilate
3
+ description: Assimilate an external methodology, harness, or specification into babysitter process definitions.
4
+ argument-hint: "Target to assimilate (repo URL, harness name, or spec path)"
5
+ ---
6
+
7
+ # babysitter:assimilate
8
+
9
+ Convert external sources into well-defined babysitter process definitions with accompanying `skills/` and `agents/` directories.
10
+
11
+ ## Assimilation Workflows
12
+
13
+ Determine which workflow to use based on the target:
14
+
15
+ ### Methodology Assimilation (repo URL or methodology name)
16
+
17
+ Learns an external methodology from its repo and converts procedural instructions, commands, and manual flows into babysitter processes with refactored skills and agents.
18
+
19
+ 1. Clone or fetch the target repo
20
+ 2. Analyze the methodology's structure, commands, and workflows
21
+ 3. Map manual steps to babysitter task definitions
22
+ 4. Generate process .js files, SKILL.md files, and AGENT.md files
23
+ 5. Store output in `.a5c/processes/`
24
+
25
+ ### Harness Integration (harness name)
26
+
27
+ Integrates babysitter SDK with a specific AI coding harness. Available targets:
28
+ - `codex` — OpenAI Codex CLI
29
+ - `opencode` — OpenCode (Bun-based)
30
+ - `gemini-cli` — Google Gemini CLI
31
+ - `openclaw` — OpenClaw daemon
32
+ - `antigravity` — Google Antigravity
33
+ - `generic` — Generic AI harness
34
+
35
+ ### Specification Assimilation (spec path)
36
+
37
+ Adapts the methodology-assimilation workflow for specification documents (RFC, API spec, design doc).
38
+
39
+ ## Output
40
+
41
+ For each assimilation, generate:
42
+ ```
43
+ .a5c/processes/
44
+ ├── <name>.js # Process definition
45
+ ├── <name>-inputs.json # Default inputs
46
+ ├── skills/ # Extracted skills
47
+ │ └── <skill>/SKILL.md
48
+ └── agents/ # Extracted agents
49
+ └── <agent>/AGENT.md
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ ```
55
+ babysitter assimilate https://github.com/org/methodology-repo
56
+ babysitter assimilate harness codex
57
+ babysitter assimilate ./specs/api-design.md
58
+ ```