Skip to content

Commit 0790cce

Browse files
committed
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.
1 parent 333b7f0 commit 0790cce

8 files changed

Lines changed: 9 additions & 9 deletions

File tree

.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="Policy Name">✓ 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/deepwork_policy/steps/define.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,4 @@ Policies are evaluated automatically when you finish working on a task. The syst
171171
3. Skips policies where safety patterns also matched
172172
4. Prompts you with instructions for any triggered policies
173173
174-
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.
174+
You can mark a policy as addressed by including `<promise policy="Policy Name">✓ 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.

.gemini/commands/deepwork_policy/define.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Policies are evaluated automatically when you finish working on a task. The syst
208208
3. Skips policies where safety patterns also matched
209209
4. Prompts you with instructions for any triggered policies
210210
211-
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.
211+
You can mark a policy as addressed by including `<promise policy="Policy Name">✓ 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.
212212
213213
214214
## Inputs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Policies automatically enforce team guidelines when files change:
297297
1. When you start a Claude Code session, the baseline git state is captured
298298
2. When the agent finishes, changed files are compared against policy triggers
299299
3. If policies fire (trigger matches, no safety match), Claude is prompted to address them
300-
4. Use `<promise policy="Policy Name">addressed</promise>` to mark policies as handled
300+
4. Use `<promise policy="Policy Name">✓ Policy Name</promise>` to mark policies as handled
301301

302302
**Use cases**:
303303
- Keep documentation in sync with code changes

doc/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ Policies are defined in `.deepwork.policy.yml` at the project root:
10331033
- The agent hasn't marked it with a `<promise>` tag
10341034
- → The policy fires
10351035
- If policies fire, Claude is prompted to address them
1036-
4. **Promise Tags**: Agents can mark policies as addressed by including `<promise policy="Policy Name">addressed</promise>` in their response
1036+
4. **Promise Tags**: Agents can mark policies as addressed by including `<promise policy="Policy Name">✓ Policy Name</promise>` in their response
10371037

10381038
### Hook Integration
10391039

src/deepwork/hooks/evaluate_policies.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def format_policy_message(policies: list) -> str:
6363
lines = ["## DeepWork Policies Triggered", ""]
6464
lines.append(
6565
"Comply with the following policies. "
66-
'To mark a policy as addressed, include `<promise policy="Policy Name">addressed</promise>` '
67-
"in your response."
66+
'To mark a policy as addressed, include `<promise policy="Policy Name">✓ Policy Name</promise>` '
67+
"in your response (replace Policy Name with the actual policy name)."
6868
)
6969
lines.append("")
7070

src/deepwork/standard_jobs/deepwork_policy/steps/define.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,4 @@ Policies are evaluated automatically when you finish working on a task. The syst
171171
3. Skips policies where safety patterns also matched
172172
4. Prompts you with instructions for any triggered policies
173173
174-
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.
174+
You can mark a policy as addressed by including `<promise policy="Policy Name">✓ 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.

tests/unit/test_evaluate_policies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class TestExtractPromiseTags:
99

1010
def test_extracts_double_quote_promise(self) -> None:
1111
"""Test extracting promise with double quotes."""
12-
text = '<promise policy="Update Docs">addressed</promise>'
12+
text = '<promise policy="Update Docs">✓ Update Docs</promise>'
1313
result = extract_promise_tags(text)
1414
assert result == {"Update Docs"}
1515

0 commit comments

Comments
 (0)