-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhooks.json
More file actions
30 lines (30 loc) · 1.19 KB
/
Copy pathhooks.json
File metadata and controls
30 lines (30 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"description": "AIDLC lifecycle hooks. Requires `hooks = true` under [features] in .codex/config.toml.",
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "bash -c 'command -v jq >/dev/null 2>&1 || { echo \"Blocked: command guard unavailable (jq not installed)\" >&2; exit 2; }; R=\"${CODEX_PROJECT_DIR:-$(git rev-parse --show-toplevel 2>/dev/null)}\"; G=\"$R/scripts/guard-command.sh\"; [ -f \"$G\" ] || { echo \"Blocked: command guard not found at $G\" >&2; exit 2; }; cmd=$(jq -r \".tool_input.command // empty\"); exec bash \"$G\" \"$cmd\"'",
"timeout": 5,
"statusMessage": "Checking command against scripts/guard-command.sh"
}
]
}
],
"SessionStart": [
{
"matcher": "startup|resume|clear|compact",
"hooks": [
{
"type": "command",
"command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"SessionStart\",\"additionalContext\":\"AIDLC session start: follow aidlc/common/session-lifecycle.md (get bearings + handoff).\"}}'",
"timeout": 5
}
]
}
]
}
}