@a5c-ai/babysitter-codex 0.1.6-staging.060a3463
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/.codex/config.toml +24 -0
- package/.codex/hooks/babysitter-session-start.sh +15 -0
- package/.codex/hooks/babysitter-stop-hook.sh +15 -0
- package/.codex/hooks/user-prompt-submit.sh +15 -0
- package/.codex/hooks.json +37 -0
- package/.codex/skills/babysit/SKILL.md +110 -0
- package/README.md +156 -0
- package/SKILL.md +111 -0
- package/agents/openai.yaml +4 -0
- package/babysitter.lock.json +18 -0
- package/bin/postinstall.js +415 -0
- package/bin/uninstall.js +80 -0
- package/package.json +46 -0
- package/prompts/README.md +28 -0
- package/prompts/assimilate.md +9 -0
- package/prompts/call.md +12 -0
- package/prompts/doctor.md +9 -0
- package/prompts/forever.md +8 -0
- package/prompts/help.md +8 -0
- package/prompts/issue.md +9 -0
- package/prompts/model.md +8 -0
- package/prompts/observe.md +8 -0
- package/prompts/plan.md +11 -0
- package/prompts/project-install.md +8 -0
- package/prompts/resume.md +8 -0
- package/prompts/retrospect.md +8 -0
- package/prompts/team-install.md +8 -0
- package/prompts/user-install.md +8 -0
- package/prompts/yolo.md +8 -0
- package/scripts/team-install.js +439 -0
|
@@ -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,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: babysit
|
|
3
|
+
description: >-
|
|
4
|
+
Run babysitter workflows from Codex using the installed babysit skill bundle,
|
|
5
|
+
workspace Codex hooks, workspace Codex config, and the Babysitter SDK runtime
|
|
6
|
+
loop.
|
|
7
|
+
Use when the user wants to babysit a task, resume a run, diagnose run health,
|
|
8
|
+
install the Codex skill, or assimilate a methodology for Codex.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Babysitter for Codex CLI
|
|
12
|
+
|
|
13
|
+
Babysitter on Codex is implemented as:
|
|
14
|
+
|
|
15
|
+
- the installed skill bundle under `~/.codex/skills/babysit` or `.codex/skills/babysit`
|
|
16
|
+
- optional prompt aliases under `~/.codex/prompts/*.md` or `.codex/prompts/*.md`
|
|
17
|
+
- workspace `.codex/hooks.json`
|
|
18
|
+
- workspace `.codex/config.toml`
|
|
19
|
+
- workspace `.a5c/`
|
|
20
|
+
- the Babysitter SDK CLI for `run:create`, `run:iterate`, `run:status`,
|
|
21
|
+
`task:list`, `task:post`, and process-library binding
|
|
22
|
+
|
|
23
|
+
This package supports only the hooks model for the Codex plugin path. Do not
|
|
24
|
+
introduce an app-server loop, an external orchestrator, or fake plugin-manifest
|
|
25
|
+
machinery for the Codex integration.
|
|
26
|
+
|
|
27
|
+
## Choosing a Mode
|
|
28
|
+
|
|
29
|
+
Use this single skill for all Babysitter Codex flows.
|
|
30
|
+
|
|
31
|
+
Choose the mode from either:
|
|
32
|
+
|
|
33
|
+
1. the direct user intent when the skill is invoked as `$babysit`
|
|
34
|
+
2. the installed prompt alias name when the user invoked `/call`, `/plan`,
|
|
35
|
+
`/resume`, `/yolo`, and the rest
|
|
36
|
+
|
|
37
|
+
| User intent | Mode |
|
|
38
|
+
|-------------|------|
|
|
39
|
+
| Start an orchestration run | `call` |
|
|
40
|
+
| Run autonomously | `yolo` |
|
|
41
|
+
| Resume an existing run | `resume` |
|
|
42
|
+
| Plan without executing | `plan` |
|
|
43
|
+
| Diagnose run health | `doctor` |
|
|
44
|
+
| Help and documentation | `help` |
|
|
45
|
+
| Install into a project | `project-install` |
|
|
46
|
+
| Install user profile/setup | `user-install` |
|
|
47
|
+
| Install team-pinned setup | `team-install` |
|
|
48
|
+
| Assimilate external methodology | `assimilate` |
|
|
49
|
+
|
|
50
|
+
## Runtime Contract
|
|
51
|
+
|
|
52
|
+
Use the Babysitter SDK CLI for orchestration:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
babysitter run:create --process-id <id> --entry <path>#<export> ...
|
|
56
|
+
babysitter run:iterate <runDir> --json --iteration <n>
|
|
57
|
+
babysitter run:status <runDir> --json
|
|
58
|
+
babysitter task:list <runDir> --pending --json
|
|
59
|
+
babysitter task:post <runDir> <effectId> --status ok --value <file> --json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
When a Codex session ID is available, bind it honestly:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
babysitter run:create ... --harness codex --session-id <id> --state-dir .a5c --json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Result Posting Protocol
|
|
69
|
+
|
|
70
|
+
1. Write the result value to `tasks/<effectId>/output.json`
|
|
71
|
+
2. Post it with `babysitter task:post`
|
|
72
|
+
3. Never write `result.json` directly
|
|
73
|
+
|
|
74
|
+
## Hook Loop
|
|
75
|
+
|
|
76
|
+
Workspace onboarding must install `.codex/hooks.json` and `.codex/config.toml`
|
|
77
|
+
so:
|
|
78
|
+
|
|
79
|
+
1. `SessionStart` seeds `.a5c` session state
|
|
80
|
+
2. `UserPromptSubmit` performs prompt-time transformations when needed
|
|
81
|
+
3. `Stop` decides whether the run is complete or Codex should receive the next
|
|
82
|
+
Babysitter iteration context
|
|
83
|
+
|
|
84
|
+
## Process Library Model
|
|
85
|
+
|
|
86
|
+
The Codex package does not bundle the process library.
|
|
87
|
+
|
|
88
|
+
Workspace onboarding must:
|
|
89
|
+
|
|
90
|
+
1. clone or update the upstream Babysitter repo into
|
|
91
|
+
`.a5c/process-library/babysitter-repo`
|
|
92
|
+
2. bind `.a5c/process-library/babysitter-repo/library` with
|
|
93
|
+
`babysitter process-library:use`
|
|
94
|
+
3. resolve the active binding later with
|
|
95
|
+
`babysitter process-library:active --state-dir .a5c --json`
|
|
96
|
+
|
|
97
|
+
Preferred discovery order:
|
|
98
|
+
|
|
99
|
+
1. project-local `.a5c/processes`
|
|
100
|
+
2. the active SDK-managed process-library binding
|
|
101
|
+
|
|
102
|
+
## Codex-Specific Rules
|
|
103
|
+
|
|
104
|
+
- Prefer invoking the skill directly with `$babysit`
|
|
105
|
+
- Optional prompt aliases such as `/call`, `/plan`, `/resume`, and `/yolo` may
|
|
106
|
+
exist, but they should only forward into the `babysit` skill for the matching
|
|
107
|
+
mode; they are not the primary integration surface
|
|
108
|
+
- Never fabricate a session ID when none is available from Codex or the caller
|
|
109
|
+
- Use `notify` only for monitoring and telemetry, never as the orchestration
|
|
110
|
+
control loop
|
package/README.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# @a5c-ai/babysitter-codex
|
|
2
|
+
|
|
3
|
+
Babysitter integration package for OpenAI Codex CLI.
|
|
4
|
+
|
|
5
|
+
This package is a Codex skill bundle plus installer assets. It is not a native
|
|
6
|
+
Codex plugin manifest and it does not run an external orchestrator. The Codex
|
|
7
|
+
plugin path is:
|
|
8
|
+
|
|
9
|
+
- installed skill bundle under `~/.codex/skills/babysit`
|
|
10
|
+
- optional user-local prompt aliases under `~/.codex/prompts/call.md`,
|
|
11
|
+
`plan.md`, `resume.md`, `yolo.md`, and the rest of the Babysitter modes
|
|
12
|
+
- repo-local skill bundle under `.codex/skills/babysit`
|
|
13
|
+
- repo-local prompt aliases under `.codex/prompts/*.md`
|
|
14
|
+
- workspace `.codex/hooks.json`
|
|
15
|
+
- workspace `.codex/config.toml`
|
|
16
|
+
- workspace `.a5c/` state
|
|
17
|
+
- Babysitter SDK CLI for run creation, iteration, result posting, and
|
|
18
|
+
process-library binding
|
|
19
|
+
|
|
20
|
+
## What This Package Installs
|
|
21
|
+
|
|
22
|
+
Global install copies the Codex-facing bundle into `CODEX_HOME`:
|
|
23
|
+
|
|
24
|
+
- `SKILL.md`
|
|
25
|
+
- `.codex/`
|
|
26
|
+
- `agents/`
|
|
27
|
+
- `prompts/` as the source for user-local prompt aliases
|
|
28
|
+
- `scripts/`
|
|
29
|
+
- `babysitter.lock.json`
|
|
30
|
+
|
|
31
|
+
It does not bundle the process library.
|
|
32
|
+
|
|
33
|
+
## Integration Model
|
|
34
|
+
|
|
35
|
+
Babysitter for Codex uses only the hooks model:
|
|
36
|
+
|
|
37
|
+
- `SessionStart` seeds Babysitter session state
|
|
38
|
+
- `UserPromptSubmit` handles prompt-time transformations
|
|
39
|
+
- `Stop` yields continuation back into the Babysitter orchestration loop
|
|
40
|
+
|
|
41
|
+
The process library is fetched at workspace-install time through the SDK CLI and
|
|
42
|
+
bound for active use in `.a5c/active/process-library.json`.
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
Install the SDK CLI first:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install -g @a5c-ai/babysitter-sdk
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Install the Codex package:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm install -g @a5c-ai/babysitter-codex
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
This global install now also clones or updates the process library into
|
|
59
|
+
`~/.a5c/process-library/babysitter-repo` and binds it as the default active
|
|
60
|
+
process library in `~/.a5c/active/process-library.json` through the SDK CLI.
|
|
61
|
+
|
|
62
|
+
Then install the Codex plugin payload into the target workspace:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
babysitter harness:install-plugin codex --workspace /path/to/repo
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
If `npm install -g @a5c-ai/babysitter-codex` is run from inside the target
|
|
69
|
+
workspace, `postinstall` will also auto-run the packaged `team-install.js`
|
|
70
|
+
against that workspace.
|
|
71
|
+
|
|
72
|
+
## What `team-install.js` Does
|
|
73
|
+
|
|
74
|
+
`scripts/team-install.js` is the workspace installer used by the package and by
|
|
75
|
+
`babysitter harness:install-plugin codex`.
|
|
76
|
+
|
|
77
|
+
It:
|
|
78
|
+
|
|
79
|
+
1. Resolves the installed package root.
|
|
80
|
+
2. Reads `babysitter.lock.json`.
|
|
81
|
+
3. Installs the single repo-local Codex skill into `.codex/skills/babysit`.
|
|
82
|
+
4. Installs the prompt aliases into `.codex/prompts`.
|
|
83
|
+
5. Copies hook scripts into `.codex/hooks`.
|
|
84
|
+
6. Clones or updates the upstream Babysitter repo into
|
|
85
|
+
`<workspace>/.a5c/process-library/babysitter-repo`.
|
|
86
|
+
7. Binds `<workspace>/.a5c/process-library/babysitter-repo/library` with
|
|
87
|
+
`babysitter process-library:use`.
|
|
88
|
+
8. Writes `<workspace>/.a5c/active/process-library.json`.
|
|
89
|
+
9. Writes or refreshes `<workspace>/.codex/hooks.json`.
|
|
90
|
+
10. Creates or merges `<workspace>/.codex/config.toml` so the workspace has the
|
|
91
|
+
required Codex settings.
|
|
92
|
+
11. Writes `<workspace>/.a5c/team/install.json`.
|
|
93
|
+
12. Creates `<workspace>/.a5c/team/profile.json` if it does not already exist.
|
|
94
|
+
|
|
95
|
+
It does not create an external orchestrator, bundle the process library, or
|
|
96
|
+
turn the workspace into a fake Codex plugin manifest.
|
|
97
|
+
|
|
98
|
+
## Resulting Workspace Files
|
|
99
|
+
|
|
100
|
+
After a successful workspace install, the important files are:
|
|
101
|
+
|
|
102
|
+
- `.codex/skills/babysit/SKILL.md`
|
|
103
|
+
- `.codex/prompts/call.md`
|
|
104
|
+
- `.codex/prompts/plan.md`
|
|
105
|
+
- `.codex/prompts/resume.md`
|
|
106
|
+
- `.codex/hooks/`
|
|
107
|
+
- `.codex/hooks.json`
|
|
108
|
+
- `.codex/config.toml`
|
|
109
|
+
- `.a5c/team/install.json`
|
|
110
|
+
- `.a5c/team/profile.json`
|
|
111
|
+
- `.a5c/active/process-library.json`
|
|
112
|
+
- `.a5c/process-library/babysitter-repo/library`
|
|
113
|
+
|
|
114
|
+
## Using It In Codex
|
|
115
|
+
|
|
116
|
+
Use the skill directly:
|
|
117
|
+
|
|
118
|
+
```text
|
|
119
|
+
$babysit implement authentication with tests
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
The optional prompt aliases are the mode shortcuts:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
/call implement authentication with tests
|
|
126
|
+
/plan migration from monolith to services
|
|
127
|
+
/resume latest
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Each prompt alias should only forward into the `babysit` skill for the
|
|
131
|
+
matching mode. Low-level SDK commands remain runtime mechanics, not the
|
|
132
|
+
user-facing interface.
|
|
133
|
+
|
|
134
|
+
## Verification
|
|
135
|
+
|
|
136
|
+
Verify the installed skill bundle:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm ls -g @a5c-ai/babysitter-codex --depth=0
|
|
140
|
+
ls -1 ~/.codex/skills/babysit
|
|
141
|
+
test -f ~/.codex/skills/babysit/scripts/team-install.js
|
|
142
|
+
test -f ~/.codex/skills/babysit/.codex/hooks/babysitter-stop-hook.sh
|
|
143
|
+
test -f ~/.codex/prompts/call.md
|
|
144
|
+
test -f ~/.codex/prompts/plan.md
|
|
145
|
+
test -f ~/.codex/prompts/resume.md
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Verify the active process-library binding for a workspace:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
babysitter process-library:active --state-dir /path/to/repo/.a5c --json
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: babysit
|
|
3
|
+
description: >-
|
|
4
|
+
Run babysitter workflows from Codex using the installed babysit skill bundle,
|
|
5
|
+
workspace Codex hooks, workspace Codex config, and the Babysitter SDK runtime
|
|
6
|
+
loop.
|
|
7
|
+
Use when the user wants to babysit a task, resume a run, diagnose run health,
|
|
8
|
+
install the Codex skill, or assimilate a methodology for Codex.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Babysitter for Codex CLI
|
|
12
|
+
|
|
13
|
+
Babysitter on Codex is implemented as:
|
|
14
|
+
|
|
15
|
+
- the installed skill bundle under `~/.codex/skills/babysit` or `.codex/skills/babysit`
|
|
16
|
+
- workspace `.codex/hooks.json`
|
|
17
|
+
- workspace `.codex/config.toml`
|
|
18
|
+
- workspace `.a5c/`
|
|
19
|
+
- the Babysitter SDK CLI for `run:create`, `run:iterate`, `run:status`,
|
|
20
|
+
`task:list`, `task:post`, and process-library binding
|
|
21
|
+
|
|
22
|
+
This package supports only the hooks model for the Codex plugin path. Do not
|
|
23
|
+
introduce an app-server loop, an external orchestrator, or fake plugin-manifest
|
|
24
|
+
machinery for the Codex integration.
|
|
25
|
+
|
|
26
|
+
## Choosing a Mode
|
|
27
|
+
|
|
28
|
+
Use this single skill for all Babysitter Codex flows.
|
|
29
|
+
|
|
30
|
+
Choose the mode from either:
|
|
31
|
+
|
|
32
|
+
1. the direct user intent when the skill is invoked as `$babysit`
|
|
33
|
+
2. the installed prompt alias name when the user invoked `/call`, `/plan`,
|
|
34
|
+
`/resume`, `/yolo`, and the rest
|
|
35
|
+
|
|
36
|
+
| User intent | Mode |
|
|
37
|
+
|-------------|------|
|
|
38
|
+
| Start an orchestration run | `call` |
|
|
39
|
+
| Run autonomously | `yolo` |
|
|
40
|
+
| Resume an existing run | `resume` |
|
|
41
|
+
| Plan without executing | `plan` |
|
|
42
|
+
| Diagnose run health | `doctor` |
|
|
43
|
+
| Help and documentation | `help` |
|
|
44
|
+
| Install into a project | `project-install` |
|
|
45
|
+
| Install user profile/setup | `user-install` |
|
|
46
|
+
| Install team-pinned setup | `team-install` |
|
|
47
|
+
| Assimilate external methodology | `assimilate` |
|
|
48
|
+
|
|
49
|
+
## Runtime Contract
|
|
50
|
+
|
|
51
|
+
Use the Babysitter SDK CLI for orchestration:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
babysitter run:create --process-id <id> --entry <path>#<export> ...
|
|
55
|
+
babysitter run:iterate <runDir> --json --iteration <n>
|
|
56
|
+
babysitter run:status <runDir> --json
|
|
57
|
+
babysitter task:list <runDir> --pending --json
|
|
58
|
+
babysitter task:post <runDir> <effectId> --status ok --value <file> --json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
When a Codex session ID is available, bind it honestly:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
babysitter run:create ... --harness codex --session-id <id> --state-dir .a5c --json
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Result Posting Protocol
|
|
68
|
+
|
|
69
|
+
1. Write the result value to `tasks/<effectId>/output.json`
|
|
70
|
+
2. Post it with `babysitter task:post`
|
|
71
|
+
3. Never write `result.json` directly
|
|
72
|
+
|
|
73
|
+
## Hook Loop
|
|
74
|
+
|
|
75
|
+
Workspace onboarding must install `.codex/hooks.json` and `.codex/config.toml`
|
|
76
|
+
so:
|
|
77
|
+
|
|
78
|
+
1. `SessionStart` seeds `.a5c` session state
|
|
79
|
+
2. `UserPromptSubmit` performs prompt-time transformations when needed
|
|
80
|
+
3. `Stop` decides whether the run is complete or Codex should receive the next
|
|
81
|
+
Babysitter iteration context
|
|
82
|
+
|
|
83
|
+
## Process Library Model
|
|
84
|
+
|
|
85
|
+
The Codex package does not bundle the process library.
|
|
86
|
+
|
|
87
|
+
Workspace onboarding must:
|
|
88
|
+
|
|
89
|
+
1. clone or update the upstream Babysitter repo into
|
|
90
|
+
`.a5c/process-library/babysitter-repo`
|
|
91
|
+
2. bind `.a5c/process-library/babysitter-repo/library` with
|
|
92
|
+
`babysitter process-library:use`
|
|
93
|
+
3. resolve the active binding later with
|
|
94
|
+
`babysitter process-library:active --state-dir .a5c --json`
|
|
95
|
+
|
|
96
|
+
Preferred discovery order:
|
|
97
|
+
|
|
98
|
+
1. project-local `.a5c/processes`
|
|
99
|
+
2. the active SDK-managed process-library binding
|
|
100
|
+
|
|
101
|
+
## Codex-Specific Rules
|
|
102
|
+
|
|
103
|
+
- Prefer invoking the skill directly with `$babysit`
|
|
104
|
+
- Optional user-local prompt aliases such as `/call`, `/plan`, `/resume`, and
|
|
105
|
+
`/yolo` may exist, but they should only forward into the `babysit` skill for
|
|
106
|
+
the matching mode; they are not the primary integration surface
|
|
107
|
+
- Do not depend on nested mode skills under `.codex/skills/babysit/*`; the
|
|
108
|
+
installed Codex skill is the single `babysit` skill
|
|
109
|
+
- Never fabricate a session ID when none is available from Codex or the caller
|
|
110
|
+
- Use `notify` only for monitoring and telemetry, never as the orchestration
|
|
111
|
+
control loop
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"generatedAt": "2026-03-11T00:00:00.000Z",
|
|
4
|
+
"runtime": {
|
|
5
|
+
"name": "@a5c/babysitter-codex-runtime",
|
|
6
|
+
"version": "0.1.4"
|
|
7
|
+
},
|
|
8
|
+
"content": {
|
|
9
|
+
"name": "@a5c/babysitter-codex-content",
|
|
10
|
+
"version": "0.1.4",
|
|
11
|
+
"processLibrary": {
|
|
12
|
+
"repo": "https://github.com/a5c-ai/babysitter.git",
|
|
13
|
+
"processSubpath": "library",
|
|
14
|
+
"referenceSubpath": "library/reference",
|
|
15
|
+
"snapshotCommit": "unknown"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|