-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.example.json
More file actions
73 lines (71 loc) · 2.98 KB
/
Copy pathsettings.example.json
File metadata and controls
73 lines (71 loc) · 2.98 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"$comment": [
"Example Claude Code settings.json wiring for the harness hooks. Copy the `hooks` block into your",
"project's .claude/settings.json (or merge it with an existing one), and copy hooks/ into the path",
"you reference below.",
"",
"ORDER MATTERS on the Edit|Write|MultiEdit matcher: pre-write-discipline runs first (it only ever",
"adds context and never blocks), then autonomous-blast-radius (which can DENY). Putting the deny-",
"capable hook second means the guidance is attached even on the turn the cap fires.",
"",
"ENV VARS the hooks read:",
" HARNESS_AUTONOMOUS set truthy in unattended runs ONLY. Both autonomous-* hooks exit 0",
" immediately when it is unset, and destructive-bash-guard downgrades",
" from deny to ask. Attended sessions are deliberately untouched.",
" HARNESS_BLAST_LIMIT default 300. Uncommitted changed lines before Edit/Write is denied.",
" HARNESS_IMAGE_BUDGET default 30. Image reads before a hard deny.",
" HARNESS_FRAMES_BUDGET default 6. Extractor invocations before a standing warning.",
" HARNESS_EXTRACTOR_PATTERN regex matching your frame/asset extraction command.",
" HARNESS_VALUE_SURFACE regex for paths holding values that feed the model under test.",
" HARNESS_ID_LINT shell command implementing your canonical-identifier lint. It reads the",
" changed text on stdin and prints ONLY when it finds an ambiguous id.",
" Unset (the default) skips the lint and the guard never fires.",
" HARNESS_PIPELINE_AGENTS comma-separated subagent_type names that always trip the premise gate.",
"",
"All four hooks FAIL OPEN on any parse error. A broken guard must never block legitimate work."
],
"env": {
"HARNESS_VALUE_SURFACE": "src/model/|src/engine/|fixtures/|(^|/)data/",
"HARNESS_PIPELINE_AGENTS": "premise-verifier,preop-judge,postop-judge,implementation-reviewer"
},
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write|MultiEdit|Agent|Task",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/pre-write-discipline.py\""
}
]
},
{
"matcher": "Edit|Write|MultiEdit",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/autonomous-blast-radius.py\""
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/destructive-bash-guard.py\""
}
]
},
{
"matcher": "Read|Bash",
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/hooks/autonomous-image-budget.py\""
}
]
}
]
}
}