@a5c-ai/babysitter-codex 0.1.6 → 0.1.7-staging.0825aadb
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-plugin/plugin.json +1 -1
- package/README.md +7 -7
- package/bin/install-shared.js +3 -3
- package/bin/install.js +8 -8
- package/bin/uninstall.js +4 -4
- package/hooks/babysitter-session-start.sh +14 -7
- package/hooks/babysitter-stop-hook.sh +14 -7
- package/hooks/user-prompt-submit.sh +2 -8
- package/package.json +4 -2
- package/scripts/sync-command-skills.js +45 -0
- package/scripts/team-install.js +1 -1
- package/skills/assimilate/SKILL.md +30 -9
- package/skills/babysit/SKILL.md +14 -765
- package/skills/call/SKILL.md +2 -11
- package/skills/doctor/SKILL.md +419 -8
- package/skills/forever/SKILL.md +2 -9
- package/skills/help/SKILL.md +237 -7
- package/skills/observe/SKILL.md +6 -8
- package/skills/plan/SKILL.md +2 -10
- package/skills/project-install/SKILL.md +10 -7
- package/skills/resume/SKILL.md +3 -9
- package/skills/retrospect/SKILL.md +48 -7
- package/skills/user-install/SKILL.md +10 -7
- package/skills/yolo/SKILL.md +2 -13
package/README.md
CHANGED
|
@@ -50,9 +50,9 @@ The process library is fetched and bound through the SDK CLI in
|
|
|
50
50
|
|
|
51
51
|
After `install --workspace`, the important files are:
|
|
52
52
|
|
|
53
|
-
- `plugins/babysitter
|
|
54
|
-
- `plugins/babysitter
|
|
55
|
-
- `plugins/babysitter
|
|
53
|
+
- `plugins/babysitter/.codex-plugin/plugin.json`
|
|
54
|
+
- `plugins/babysitter/skills/babysit/SKILL.md`
|
|
55
|
+
- `plugins/babysitter/hooks.json`
|
|
56
56
|
- `.codex/skills/`
|
|
57
57
|
- `.codex/hooks/`
|
|
58
58
|
- `.codex/hooks.json`
|
|
@@ -67,10 +67,10 @@ Verify the installed plugin bundle:
|
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
69
|
npm ls -g @a5c-ai/babysitter-codex --depth=0
|
|
70
|
-
test -f ~/.codex/plugins/babysitter
|
|
71
|
-
test -f ~/.codex/plugins/babysitter
|
|
72
|
-
test -f ~/.codex/plugins/babysitter
|
|
73
|
-
test -f ~/.codex/plugins/babysitter
|
|
70
|
+
test -f ~/.codex/plugins/babysitter/.codex-plugin/plugin.json
|
|
71
|
+
test -f ~/.codex/plugins/babysitter/hooks.json
|
|
72
|
+
test -f ~/.codex/plugins/babysitter/hooks/babysitter-stop-hook.sh
|
|
73
|
+
test -f ~/.codex/plugins/babysitter/skills/babysit/SKILL.md
|
|
74
74
|
test -f ~/.codex/hooks.json
|
|
75
75
|
test -f ~/.codex/hooks/babysitter-stop-hook.sh
|
|
76
76
|
test -f ~/.codex/skills/babysit/SKILL.md
|
package/bin/install-shared.js
CHANGED
|
@@ -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
|
|
8
|
+
const PLUGIN_NAME = 'babysitter';
|
|
9
9
|
const PLUGIN_CATEGORY = 'Coding';
|
|
10
10
|
const LEGACY_SKILL_NAMES = [
|
|
11
11
|
'babysit',
|
|
@@ -489,8 +489,8 @@ function warnWindowsHooks() {
|
|
|
489
489
|
if (process.platform !== 'win32') {
|
|
490
490
|
return;
|
|
491
491
|
}
|
|
492
|
-
console.warn('[babysitter
|
|
493
|
-
console.warn('[babysitter
|
|
492
|
+
console.warn('[babysitter] Warning: Codex hooks are currently disabled on native Windows.');
|
|
493
|
+
console.warn('[babysitter] The plugin will install correctly, but SessionStart/UserPromptSubmit/Stop hooks will not fire until Codex enables Windows hook execution.');
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
module.exports = {
|
package/bin/install.js
CHANGED
|
@@ -21,7 +21,7 @@ function main() {
|
|
|
21
21
|
const pluginRoot = getHomePluginRoot();
|
|
22
22
|
const marketplacePath = getHomeMarketplacePath();
|
|
23
23
|
|
|
24
|
-
console.log(`[babysitter
|
|
24
|
+
console.log(`[babysitter] Installing plugin to ${pluginRoot}`);
|
|
25
25
|
|
|
26
26
|
try {
|
|
27
27
|
copyPluginBundle(PACKAGE_ROOT, pluginRoot);
|
|
@@ -30,17 +30,17 @@ function main() {
|
|
|
30
30
|
installCodexSurface(PACKAGE_ROOT, codexHome);
|
|
31
31
|
|
|
32
32
|
const active = ensureGlobalProcessLibrary(PACKAGE_ROOT);
|
|
33
|
-
console.log(`[babysitter
|
|
34
|
-
console.log(`[babysitter
|
|
33
|
+
console.log(`[babysitter] marketplace: ${marketplacePath}`);
|
|
34
|
+
console.log(`[babysitter] process library: ${active.binding?.dir}`);
|
|
35
35
|
if (active.defaultSpec?.cloneDir) {
|
|
36
|
-
console.log(`[babysitter
|
|
36
|
+
console.log(`[babysitter] process library clone: ${active.defaultSpec.cloneDir}`);
|
|
37
37
|
}
|
|
38
|
-
console.log(`[babysitter
|
|
38
|
+
console.log(`[babysitter] process library state: ${active.stateFile}`);
|
|
39
39
|
warnWindowsHooks();
|
|
40
|
-
console.log('[babysitter
|
|
41
|
-
console.log('[babysitter
|
|
40
|
+
console.log('[babysitter] Installation complete!');
|
|
41
|
+
console.log('[babysitter] Restart Codex to pick up the installed plugin and config changes.');
|
|
42
42
|
} catch (err) {
|
|
43
|
-
console.error(`[babysitter
|
|
43
|
+
console.error(`[babysitter] Failed to install plugin: ${err.message}`);
|
|
44
44
|
process.exitCode = 1;
|
|
45
45
|
}
|
|
46
46
|
}
|
package/bin/uninstall.js
CHANGED
|
@@ -19,10 +19,10 @@ function main() {
|
|
|
19
19
|
if (fs.existsSync(pluginRoot)) {
|
|
20
20
|
try {
|
|
21
21
|
fs.rmSync(pluginRoot, { recursive: true, force: true });
|
|
22
|
-
console.log(`[babysitter
|
|
22
|
+
console.log(`[babysitter] Removed ${pluginRoot}`);
|
|
23
23
|
removedPlugin = true;
|
|
24
24
|
} catch (err) {
|
|
25
|
-
console.warn(`[babysitter
|
|
25
|
+
console.warn(`[babysitter] Warning: Could not remove plugin directory ${pluginRoot}: ${err.message}`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -30,11 +30,11 @@ function main() {
|
|
|
30
30
|
removeLegacyCodexSurface(codexHome);
|
|
31
31
|
|
|
32
32
|
if (!removedPlugin) {
|
|
33
|
-
console.log('[babysitter
|
|
33
|
+
console.log('[babysitter] Plugin directory not found, legacy Codex surface cleaned if present.');
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
console.log('[babysitter
|
|
37
|
+
console.log('[babysitter] Restart Codex to complete uninstallation.');
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
main();
|
|
@@ -11,16 +11,23 @@ export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
|
|
|
11
11
|
export BABYSITTER_STATE_DIR="${STATE_DIR}"
|
|
12
12
|
|
|
13
13
|
mkdir -p "$LOG_DIR" 2>/dev/null
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
|
|
15
|
+
blog() {
|
|
16
|
+
local msg="$1"
|
|
17
|
+
local ts
|
|
18
|
+
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
19
|
+
echo "[INFO] $ts $msg" >> "$LOG_FILE" 2>/dev/null
|
|
20
|
+
babysitter log --type hook --label "hook:session-start" --message "$msg" --source shell-hook 2>/dev/null || true
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
blog "Hook script invoked"
|
|
24
|
+
blog "PLUGIN_ROOT=$PLUGIN_ROOT"
|
|
25
|
+
blog "STATE_DIR=$STATE_DIR"
|
|
19
26
|
|
|
20
27
|
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/codex-session-start-hook-$$.json")
|
|
21
28
|
cat > "$INPUT_FILE"
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
blog "Hook input received ($(wc -c < "$INPUT_FILE") bytes)"
|
|
24
31
|
|
|
25
32
|
RESULT=$(babysitter hook:run \
|
|
26
33
|
--hook-type session-start \
|
|
@@ -30,7 +37,7 @@ RESULT=$(babysitter hook:run \
|
|
|
30
37
|
< "$INPUT_FILE" 2>"$LOG_DIR/babysitter-session-start-hook-stderr.log")
|
|
31
38
|
EXIT_CODE=$?
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
blog "CLI exit code=$EXIT_CODE"
|
|
34
41
|
|
|
35
42
|
rm -f "$INPUT_FILE" 2>/dev/null
|
|
36
43
|
printf '%s\n' "$RESULT"
|
|
@@ -11,16 +11,23 @@ export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
|
|
|
11
11
|
export BABYSITTER_STATE_DIR="${STATE_DIR}"
|
|
12
12
|
|
|
13
13
|
mkdir -p "$LOG_DIR" 2>/dev/null
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
|
|
15
|
+
blog() {
|
|
16
|
+
local msg="$1"
|
|
17
|
+
local ts
|
|
18
|
+
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
19
|
+
echo "[INFO] $ts $msg" >> "$LOG_FILE" 2>/dev/null
|
|
20
|
+
babysitter log --type hook --label "hook:stop" --message "$msg" --source shell-hook 2>/dev/null || true
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
blog "Hook script invoked"
|
|
24
|
+
blog "PLUGIN_ROOT=$PLUGIN_ROOT"
|
|
25
|
+
blog "STATE_DIR=$STATE_DIR"
|
|
19
26
|
|
|
20
27
|
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/codex-stop-hook-$$.json")
|
|
21
28
|
cat > "$INPUT_FILE"
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
blog "Hook input received ($(wc -c < "$INPUT_FILE") bytes)"
|
|
24
31
|
|
|
25
32
|
RESULT=$(babysitter hook:run \
|
|
26
33
|
--hook-type stop \
|
|
@@ -30,7 +37,7 @@ RESULT=$(babysitter hook:run \
|
|
|
30
37
|
< "$INPUT_FILE" 2>"$LOG_DIR/babysitter-stop-hook-stderr.log")
|
|
31
38
|
EXIT_CODE=$?
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
blog "CLI exit code=$EXIT_CODE"
|
|
34
41
|
|
|
35
42
|
rm -f "$INPUT_FILE" 2>/dev/null
|
|
36
43
|
printf '%s\n' "$RESULT"
|
|
@@ -5,22 +5,16 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
5
5
|
PLUGIN_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
|
6
6
|
STATE_DIR="${BABYSITTER_STATE_DIR:-${PWD}/.a5c}"
|
|
7
7
|
LOG_DIR="${BABYSITTER_LOG_DIR:-$PLUGIN_ROOT/.a5c/logs}"
|
|
8
|
-
LOG_FILE="$LOG_DIR/babysitter-user-prompt-submit-hook.log"
|
|
9
8
|
|
|
10
9
|
export CODEX_PLUGIN_ROOT="${CODEX_PLUGIN_ROOT:-${PLUGIN_ROOT}}"
|
|
11
10
|
export BABYSITTER_STATE_DIR="${STATE_DIR}"
|
|
12
11
|
|
|
13
12
|
mkdir -p "$LOG_DIR" 2>/dev/null
|
|
14
|
-
{
|
|
15
|
-
echo "[INFO] $(date -u +%Y-%m-%dT%H:%M:%SZ) Hook script invoked"
|
|
16
|
-
echo "[INFO] $(date -u +%Y-%m-%dT%H:%M:%SZ) PLUGIN_ROOT=$PLUGIN_ROOT"
|
|
17
|
-
echo "[INFO] $(date -u +%Y-%m-%dT%H:%M:%SZ) STATE_DIR=$STATE_DIR"
|
|
18
|
-
} >> "$LOG_FILE" 2>/dev/null
|
|
19
13
|
|
|
20
14
|
INPUT_FILE=$(mktemp 2>/dev/null || echo "/tmp/codex-user-prompt-submit-hook-$$.json")
|
|
21
15
|
cat > "$INPUT_FILE"
|
|
22
16
|
|
|
23
|
-
|
|
17
|
+
babysitter log --type hook --label "hook:user-prompt-submit" --message "Hook invoked" --source shell-hook 2>/dev/null || true
|
|
24
18
|
|
|
25
19
|
RESULT=$(babysitter hook:run \
|
|
26
20
|
--hook-type user-prompt-submit \
|
|
@@ -30,7 +24,7 @@ RESULT=$(babysitter hook:run \
|
|
|
30
24
|
< "$INPUT_FILE" 2>"$LOG_DIR/babysitter-user-prompt-submit-hook-stderr.log")
|
|
31
25
|
EXIT_CODE=$?
|
|
32
26
|
|
|
33
|
-
|
|
27
|
+
babysitter log --type hook --label "hook:user-prompt-submit" --message "CLI exit code=$EXIT_CODE" --source shell-hook 2>/dev/null || true
|
|
34
28
|
|
|
35
29
|
rm -f "$INPUT_FILE" 2>/dev/null
|
|
36
30
|
if [ -n "$RESULT" ]; then
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a5c-ai/babysitter-codex",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7-staging.0825aadb",
|
|
4
4
|
"description": "Babysitter Codex skill bundle and integration package for OpenAI Codex CLI with SDK-managed process-library bootstrapping, 15 orchestration modes, and BOM-safe SKILL installation",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node test/integration.test.js && node test/packaged-install.test.js",
|
|
7
7
|
"test:integration": "node test/integration.test.js",
|
|
8
|
+
"sync:commands": "node scripts/sync-command-skills.js",
|
|
9
|
+
"sync:skills": "node scripts/sync-command-skills.js",
|
|
8
10
|
"team:install": "node scripts/team-install.js",
|
|
9
11
|
"lint": "node -e \"const fs=require('fs'); const path=require('path'); const cp=require('child_process'); const walk=(dir)=>{for(const entry of fs.readdirSync(dir)){const file=path.join(dir, entry); const stat=fs.statSync(file); if(stat.isDirectory()) walk(file); else if(file.endsWith('.js')) cp.execFileSync(process.execPath,['--check',file],{stdio:'inherit'});}}; ['skills','bin','scripts','test'].forEach((dir)=>{if(fs.existsSync(dir)) walk(dir);});\"",
|
|
10
12
|
"deploy": "npm publish --access public",
|
|
@@ -43,6 +45,6 @@
|
|
|
43
45
|
},
|
|
44
46
|
"homepage": "https://github.com/a5c-ai/babysitter/tree/main/plugins/babysitter-codex#readme",
|
|
45
47
|
"dependencies": {
|
|
46
|
-
"@a5c-ai/babysitter-sdk": "0.0.
|
|
48
|
+
"@a5c-ai/babysitter-sdk": "0.0.184-staging.0825aadb"
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const {
|
|
6
|
+
listDirectories,
|
|
7
|
+
reportCheckResult,
|
|
8
|
+
syncSkillsFromCommands,
|
|
9
|
+
} = require('../../../scripts/plugin-command-sync-lib.cjs');
|
|
10
|
+
|
|
11
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
const REPO_ROOT = path.resolve(PACKAGE_ROOT, '..', '..');
|
|
13
|
+
const COMMANDS_ROOT = path.join(REPO_ROOT, 'plugins', 'babysitter', 'commands');
|
|
14
|
+
const SKILLS_ROOT = path.join(PACKAGE_ROOT, 'skills');
|
|
15
|
+
const LABEL = 'babysitter-codex sync';
|
|
16
|
+
|
|
17
|
+
function getCommandBackedSkillNames() {
|
|
18
|
+
return listDirectories(SKILLS_ROOT)
|
|
19
|
+
.filter((name) => fs.existsSync(path.join(COMMANDS_ROOT, `${name}.md`)));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function main() {
|
|
23
|
+
const result = syncSkillsFromCommands({
|
|
24
|
+
label: LABEL,
|
|
25
|
+
sourceRoot: COMMANDS_ROOT,
|
|
26
|
+
skillsRoot: SKILLS_ROOT,
|
|
27
|
+
names: getCommandBackedSkillNames(),
|
|
28
|
+
check: process.argv.includes('--check'),
|
|
29
|
+
cwd: PACKAGE_ROOT,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (process.argv.includes('--check')) {
|
|
33
|
+
reportCheckResult(LABEL, result.stale);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
if (result.updated === 0) {
|
|
38
|
+
console.log(`[${LABEL}] no Codex skill changes were needed.`);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
console.log(`[${LABEL}] updated ${result.updated} Codex skill file(s).`);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
main();
|
package/scripts/team-install.js
CHANGED
|
@@ -32,7 +32,7 @@ function main() {
|
|
|
32
32
|
const args = parseArgs(process.argv);
|
|
33
33
|
const packageRoot = path.resolve(process.env.BABYSITTER_PACKAGE_ROOT || path.join(__dirname, '..'));
|
|
34
34
|
const workspaceRoot = args.workspace;
|
|
35
|
-
const workspacePluginRoot = path.join(workspaceRoot, 'plugins', 'babysitter
|
|
35
|
+
const workspacePluginRoot = path.join(workspaceRoot, 'plugins', 'babysitter');
|
|
36
36
|
const workspaceMarketplacePath = path.join(workspaceRoot, '.agents', 'plugins', 'marketplace.json');
|
|
37
37
|
const workspaceConfigPath = path.join(workspaceRoot, '.codex', 'config.toml');
|
|
38
38
|
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: assimilate
|
|
3
|
-
description: Assimilate an external methodology,
|
|
3
|
+
description: Assimilate an external methodology, harness, or specification into babysitter process definitions with skills and agents.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# assimilate
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Invoke the babysitter:babysit skill (using the Skill tool) and follow its instructions (SKILL.md).
|
|
9
9
|
|
|
10
|
-
|
|
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
11
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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.
|