Commit 1b2cb53
Fix duplicate stop hooks display in Claude (#38)
* Fix stop hooks to properly return blocking JSON
The policy_stop_hook.sh was passing --changed-files argument to the
Python evaluate_policies module, but the module doesn't accept this
argument. This caused argparse to fail, which was suppressed by
`2>/dev/null || echo '{}'`, resulting in the hook always outputting
empty JSON instead of blocking JSON when policies fire.
Changes:
- Sync installed hooks (.deepwork/jobs/) with source (src/deepwork/standard_jobs/)
- Remove obsolete get_changed_files.sh and capture_work_tree.sh
- Add capture_prompt_work_tree.sh for compare_to: prompt mode
- Add shell script tests in tests/shell_script_tests/ to verify
the hook correctly outputs blocking JSON when policies fire
* Sync installed jobs with source after deepwork install
Running `deepwork install` synced several updates from source:
- Added browser automation capability guidance to job definition steps
- Added supplemental_file_references.md documentation
- Updated generated commands in .claude/ and .gemini/
* Add instructions for running deepwork CLI in web environment
* Apply suggestion from @nhorton
* Update documentation for hook changes
- Update architecture.md to reflect current hook files:
- capture_work_tree.sh → capture_prompt_work_tree.sh
- Removed get_changed_files.sh (logic in Python evaluator)
- Add Fixed section to CHANGELOG for stop hook blocking bug
* Fix ruff formatting in shell script tests
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent aefb17c commit 1b2cb53
13 files changed
Lines changed: 511 additions & 75 deletions
File tree
- .claude/commands
- .deepwork/jobs/deepwork_policy
- hooks
- steps
- .gemini/commands
- deepwork_jobs
- deepwork_policy
- doc
- tests/shell_script_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| |||
118 | 134 | | |
119 | 135 | | |
120 | 136 | | |
| 137 | + | |
121 | 138 | | |
122 | 139 | | |
123 | 140 | | |
| |||
127 | 144 | | |
128 | 145 | | |
129 | 146 | | |
| 147 | + | |
130 | 148 | | |
131 | 149 | | |
132 | 150 | | |
| |||
198 | 216 | | |
199 | 217 | | |
200 | 218 | | |
201 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
202 | 223 | | |
203 | 224 | | |
204 | 225 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
Lines changed: 0 additions & 30 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
31 | 28 | | |
32 | 29 | | |
33 | 30 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 31 | | |
45 | 32 | | |
46 | 33 | | |
| |||
57 | 44 | | |
58 | 45 | | |
59 | 46 | | |
| 47 | + | |
60 | 48 | | |
61 | 49 | | |
62 | 50 | | |
63 | 51 | | |
64 | 52 | | |
65 | | - | |
66 | 53 | | |
67 | 54 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 55 | | |
72 | 56 | | |
Lines changed: 5 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
| |||
86 | 102 | | |
87 | 103 | | |
88 | 104 | | |
| 105 | + | |
89 | 106 | | |
90 | 107 | | |
91 | 108 | | |
| |||
95 | 112 | | |
96 | 113 | | |
97 | 114 | | |
| 115 | + | |
98 | 116 | | |
99 | 117 | | |
100 | 118 | | |
| |||
166 | 184 | | |
167 | 185 | | |
168 | 186 | | |
169 | | - | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
170 | 191 | | |
171 | 192 | | |
172 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
178 | 213 | | |
179 | 214 | | |
180 | 215 | | |
| |||
196 | 231 | | |
197 | 232 | | |
198 | 233 | | |
199 | | - | |
| 234 | + | |
200 | 235 | | |
201 | 236 | | |
202 | 237 | | |
203 | 238 | | |
204 | 239 | | |
205 | 240 | | |
206 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
207 | 264 | | |
208 | 265 | | |
209 | 266 | | |
| |||
234 | 291 | | |
235 | 292 | | |
236 | 293 | | |
| 294 | + | |
237 | 295 | | |
238 | 296 | | |
239 | 297 | | |
| |||
293 | 351 | | |
294 | 352 | | |
295 | 353 | | |
296 | | - | |
| 354 | + | |
297 | 355 | | |
298 | 356 | | |
299 | 357 | | |
| |||
345 | 403 | | |
346 | 404 | | |
347 | 405 | | |
348 | | - | |
| 406 | + | |
349 | 407 | | |
350 | 408 | | |
351 | 409 | | |
| |||
359 | 417 | | |
360 | 418 | | |
361 | 419 | | |
362 | | - | |
| 420 | + | |
363 | 421 | | |
364 | 422 | | |
365 | 423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
96 | 112 | | |
97 | 113 | | |
98 | 114 | | |
| |||
123 | 139 | | |
124 | 140 | | |
125 | 141 | | |
| 142 | + | |
126 | 143 | | |
127 | 144 | | |
128 | 145 | | |
| |||
132 | 149 | | |
133 | 150 | | |
134 | 151 | | |
| 152 | + | |
135 | 153 | | |
136 | 154 | | |
137 | 155 | | |
| |||
203 | 221 | | |
204 | 222 | | |
205 | 223 | | |
206 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
207 | 228 | | |
208 | 229 | | |
209 | 230 | | |
| |||
0 commit comments