Skip to content

Commit ab5efaa

Browse files
nhortonclaude
andauthored
Improve command hooks promise message text (#16)
* Improve promise tag format to show policy name with checkmark Change the promise tag body from generic "addressed" text to a more compelling "✓ Policy Name" format that clearly shows which policy was addressed. This provides better visibility for end users when viewing the LLM's response. * Simplify promise tag format and improve QUALITY_COMPLETE display Changes: - Remove redundant policy= attribute from promise tags - New format: <promise>✓ Policy Name</promise> - Extract policy name from tag body after checkmark - Update QUALITY_COMPLETE to <promise>✓ Quality Criteria Met</promise> - Update all documentation and tests This makes the promise format less redundant and more user-friendly when displayed in LLM responses. * Format: use double quotes for consistency --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 35e4f06 commit ab5efaa

33 files changed

Lines changed: 88 additions & 99 deletions

.claude/commands/add_platform.add_capabilities.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ hooks:
1818
5. adapters.py remains consistent - all adapters have the same hook fields
1919
6. If no new hooks are needed, document why in a comment
2020
21-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
21+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2222
2323
2424
## Instructions
2525
2626
Review the conversation and determine if ALL quality criteria above have been satisfied.
2727
Look for evidence that each criterion has been addressed.
2828
29-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
29+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3030
all criteria appear to be met, respond with: {"ok": true}
3131
3232
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -178,7 +178,7 @@ Or if no changes are needed, add a documentation comment:
178178
- `job_schema.py` has no syntax errors (verified with py_compile)
179179
- `adapters.py` has no syntax errors (verified with py_compile)
180180
- All adapters have consistent hook fields (same fields across all adapters)
181-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
181+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
182182

183183
## Context
184184

@@ -251,15 +251,15 @@ Verify the capability additions meet ALL criteria:
251251
5. adapters.py remains consistent - all adapters have the same hook fields
252252
6. If no new hooks are needed, document why in a comment
253253

254-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
254+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
255255

256256

257257
### Completion Promise
258258

259259
To signal that all quality criteria have been met, include this tag in your final response:
260260

261261
```
262-
<promise>QUALITY_COMPLETE</promise>
262+
<promise>✓ Quality Criteria Met</promise>
263263
```
264264

265265
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/add_platform.implement.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ hooks:
2222
- Installation instructions for the platform
2323
- Any platform-specific notes
2424
25-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
25+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2626
2727
2828
## Instructions
2929
3030
Review the conversation and determine if ALL quality criteria above have been satisfied.
3131
Look for evidence that each criterion has been addressed.
3232
33-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
33+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3434
all criteria appear to be met, respond with: {"ok": true}
3535
3636
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -281,7 +281,7 @@ deepwork install --platform <platform_name>
281281
- Platform listed in supported platforms
282282
- Installation command documented
283283
- Any platform-specific notes included
284-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
284+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
285285
286286
## Context
287287
@@ -354,15 +354,15 @@ Verify the implementation meets ALL criteria:
354354
- Installation instructions for the platform
355355
- Any platform-specific notes
356356
357-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
357+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
358358
359359
360360
### Completion Promise
361361
362362
To signal that all quality criteria have been met, include this tag in your final response:
363363
364364
```
365-
<promise>QUALITY_COMPLETE</promise>
365+
<promise>✓ Quality Criteria Met</promise>
366366
```
367367
368368
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/add_platform.research.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ hooks:
1919
5. No extraneous documentation (only these two specific topics)
2020
6. Documentation is comprehensive enough to implement the platform
2121
22-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
22+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2323
2424
2525
## Instructions
2626
2727
Review the conversation and determine if ALL quality criteria above have been satisfied.
2828
Look for evidence that each criterion has been addressed.
2929
30-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
30+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3131
all criteria appear to be met, respond with: {"ok": true}
3232
3333
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -234,7 +234,7 @@ Source: [URL where this documentation was obtained]
234234
- NOT general CLI hooks (only command-level hooks)
235235
- Documentation is detailed enough to implement the platform adapter
236236
- No extraneous topics (only CLI config and command hooks)
237-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
237+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
238238

239239
## Context
240240

@@ -298,15 +298,15 @@ Verify the research output meets ALL criteria:
298298
5. No extraneous documentation (only these two specific topics)
299299
6. Documentation is comprehensive enough to implement the platform
300300

301-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
301+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
302302

303303

304304
### Completion Promise
305305

306306
To signal that all quality criteria have been met, include this tag in your final response:
307307

308308
```
309-
<promise>QUALITY_COMPLETE</promise>
309+
<promise>✓ Quality Criteria Met</promise>
310310
```
311311

312312
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/add_platform.verify.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ hooks:
1717
5. Established DeepWork jobs (deepwork_jobs, deepwork_policy) are installed correctly
1818
6. The platform can be used alongside existing platforms without conflicts
1919
20-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
20+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
2121
2222
2323
## Instructions
2424
2525
Review the conversation and determine if ALL quality criteria above have been satisfied.
2626
Look for evidence that each criterion has been addressed.
2727
28-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
28+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
2929
all criteria appear to be met, respond with: {"ok": true}
3030
3131
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -159,7 +159,7 @@ Ensure the implementation step is complete:
159159
- No template errors or missing content
160160
- Existing platforms still work (if applicable)
161161
- No conflicts between platforms
162-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
162+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
163163

164164
## Context
165165

@@ -221,15 +221,15 @@ Verify the installation meets ALL criteria:
221221
5. Established DeepWork jobs (deepwork_jobs, deepwork_policy) are installed correctly
222222
6. The platform can be used alongside existing platforms without conflicts
223223

224-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
224+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
225225

226226

227227
### Completion Promise
228228

229229
To signal that all quality criteria have been met, include this tag in your final response:
230230

231231
```
232-
<promise>QUALITY_COMPLETE</promise>
232+
<promise>✓ Quality Criteria Met</promise>
233233
```
234234

235235
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/deepwork_jobs.define.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ hooks:
2020
7. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
2121
2222
If ANY criterion is not met, continue working to address it.
23-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
23+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
2424
2525
2626
## Instructions
2727
2828
Review the conversation and determine if ALL quality criteria above have been satisfied.
2929
Look for evidence that each criterion has been addressed.
3030
31-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
31+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3232
all criteria appear to be met, respond with: {"ok": true}
3333
3434
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -235,7 +235,7 @@ steps:
235235
Verify this step's output meets quality criteria:
236236
1. [Criterion 1]
237237
2. [Criterion 2]
238-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
238+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
239239

240240
- id: [another_step]
241241
name: "[Another Step]"
@@ -464,15 +464,15 @@ Verify the job.yml output meets ALL quality criteria before completing:
464464
7. **File Created**: Has the job.yml file been created in `.deepwork/jobs/[job_name]/job.yml`?
465465

466466
If ANY criterion is not met, continue working to address it.
467-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
467+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
468468

469469

470470
### Completion Promise
471471

472472
To signal that all quality criteria have been met, include this tag in your final response:
473473

474474
```
475-
<promise>QUALITY_COMPLETE</promise>
475+
<promise>✓ Quality Criteria Met</promise>
476476
```
477477

478478
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/deepwork_jobs.implement.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ hooks:
2424
- Not every job needs policies - only suggest when genuinely helpful.
2525
2626
If ANY criterion is not met, continue working to address it.
27-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
27+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
2828
2929
3030
## Instructions
3131
3232
Review the conversation and determine if ALL quality criteria above have been satisfied.
3333
Look for evidence that each criterion has been addressed.
3434
35-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
35+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3636
all criteria appear to be met, respond with: {"ok": true}
3737
3838
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -187,7 +187,7 @@ If a step in the job.yml has `stop_hooks` defined, the generated instruction fil
187187

188188
1. **Mirror the quality criteria** - The "Quality Criteria" section should match what the stop hooks will validate
189189
2. **Be explicit about success** - Help the agent understand when the step is truly complete
190-
3. **Include the promise pattern** - Mention that `<promise>QUALITY_COMPLETE</promise>` should be included when criteria are met
190+
3. **Include the promise pattern** - Mention that `<promise>✓ Quality Criteria Met</promise>` should be included when criteria are met
191191

192192
**Example: If the job.yml has:**
193193
```yaml
@@ -208,7 +208,7 @@ If a step in the job.yml has `stop_hooks` defined, the generated instruction fil
208208
- Each competitor has at least 3 distinct data points
209209
- All information is sourced with citations
210210
- Data is current (from within the last year)
211-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
211+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
212212
```
213213
214214
This alignment ensures the AI agent knows exactly what will be validated and can self-check before completing.
@@ -556,15 +556,15 @@ Verify the implementation meets ALL quality criteria before completing:
556556
- Not every job needs policies - only suggest when genuinely helpful.
557557

558558
If ANY criterion is not met, continue working to address it.
559-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
559+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
560560

561561

562562
### Completion Promise
563563

564564
To signal that all quality criteria have been met, include this tag in your final response:
565565

566566
```
567-
<promise>QUALITY_COMPLETE</promise>
567+
<promise>✓ Quality Criteria Met</promise>
568568
```
569569

570570
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/deepwork_jobs.refine.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ hooks:
2121
8. **Sync Complete**: Has `deepwork sync` been run to regenerate commands?
2222
2323
If ANY criterion is not met, continue working to address it.
24-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
24+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
2525
2626
2727
## Instructions
2828
2929
Review the conversation and determine if ALL quality criteria above have been satisfied.
3030
Look for evidence that each criterion has been addressed.
3131
32-
If the agent has included `<promise>QUALITY_COMPLETE</promise>` in their response AND
32+
If the agent has included `<promise>✓ Quality Criteria Met</promise>` in their response AND
3333
all criteria appear to be met, respond with: {"ok": true}
3434
3535
If criteria are NOT met AND the promise tag is missing, respond with:
@@ -554,15 +554,15 @@ Verify the refinement meets ALL quality criteria before completing:
554554
8. **Sync Complete**: Has `deepwork sync` been run to regenerate commands?
555555

556556
If ANY criterion is not met, continue working to address it.
557-
If ALL criteria are satisfied, include `<promise>QUALITY_COMPLETE</promise>` in your response.
557+
If ALL criteria are satisfied, include `<promise>✓ Quality Criteria Met</promise>` in your response.
558558

559559

560560
### Completion Promise
561561

562562
To signal that all quality criteria have been met, include this tag in your final response:
563563

564564
```
565-
<promise>QUALITY_COMPLETE</promise>
565+
<promise>✓ Quality Criteria Met</promise>
566566
```
567567

568568
**Important**: Only include this promise tag when you have verified that ALL quality criteria above are satisfied. The validation loop will continue until this promise is detected.

.claude/commands/deepwork_policy.define.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Policies are evaluated automatically when you finish working on a task. The syst
203203
3. Skips policies where safety patterns also matched
204204
4. Prompts you with instructions for any triggered policies
205205
206-
You can mark a policy as addressed by including `<promise policy="Policy Name">considered</promise>` in your response. This tells the system you've already handled that policy's requirements.
206+
You can mark a policy as addressed by including `<promise>✓ Policy Name</promise>` in your response (replace Policy Name with the actual policy name). This tells the system you've already handled that policy's requirements.
207207

208208

209209
## Inputs

.deepwork/jobs/add_platform/job.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ steps:
4949
5. No extraneous documentation (only these two specific topics)
5050
6. Documentation is comprehensive enough to implement the platform
5151
52-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
52+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
5353
5454
- id: add_capabilities
5555
name: "Add Hook Capabilities"
@@ -75,7 +75,7 @@ steps:
7575
5. adapters.py remains consistent - all adapters have the same hook fields
7676
6. If no new hooks are needed, document why in a comment
7777
78-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
78+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
7979
8080
- id: implement
8181
name: "Implement Platform Support"
@@ -110,7 +110,7 @@ steps:
110110
- Installation instructions for the platform
111111
- Any platform-specific notes
112112
113-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
113+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.
114114
115115
- id: verify
116116
name: "Verify Installation"
@@ -133,4 +133,4 @@ steps:
133133
5. Established DeepWork jobs (deepwork_jobs, deepwork_policy) are installed correctly
134134
6. The platform can be used alongside existing platforms without conflicts
135135
136-
If ALL criteria are met, include `<promise>QUALITY_COMPLETE</promise>`.
136+
If ALL criteria are met, include `<promise>✓ Quality Criteria Met</promise>`.

.deepwork/jobs/add_platform/steps/add_capabilities.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Or if no changes are needed, add a documentation comment:
108108
- `job_schema.py` has no syntax errors (verified with py_compile)
109109
- `adapters.py` has no syntax errors (verified with py_compile)
110110
- All adapters have consistent hook fields (same fields across all adapters)
111-
- When all criteria are met, include `<promise>QUALITY_COMPLETE</promise>` in your response
111+
- When all criteria are met, include `<promise>✓ Quality Criteria Met</promise>` in your response
112112

113113
## Context
114114

0 commit comments

Comments
 (0)