You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(evolution): add policy evolution instructions to init templates and shorten denial message
- Add mandatory "Policy Evolution" section to all three governance
templates (Cursor, OpenClaw, Claude Code) so agents present
suggestion IDs to the user and call policy_evolution_approve with
the user's decision; explicitly require agents not to ignore
suggestion IDs.
- Shorten McpEvolutionHandler denial message to a single actionable
line to reduce verbosity in tool responses.
- Bump version to 0.4.2 and document in RELEASE_NOTES.md.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
5
5
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
+
## [0.4.2] - 2026-02-12
9
+
10
+
### Fixed
11
+
12
+
-**Policy evolution agent instructions** — Init governance templates (Cursor, OpenClaw, Claude Code) now include mandatory "Policy Evolution" instructions so agents present suggestion IDs to the user and call `policy_evolution_approve` with the user's decision; the MCP denial message was shortened to a single actionable line to avoid verbosity in tool responses.
Copy file name to clipboardExpand all lines: src/cli/templates.ts
+39-3Lines changed: 39 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -114,9 +114,21 @@ Instead of your built-in tools, you MUST use these governed equivalents:
114
114
4. **ALWAYS** route file edits through \`governed-filesystem\` → \`edit_file\`.
115
115
5. **ALWAYS** route directory listings through \`governed-filesystem\` → \`list_directory\`.
116
116
6. **ALWAYS** route file searches through \`governed-filesystem\` → \`search_files\`.
117
-
7. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback. Report the denial to the user instead.
117
+
7. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback.
118
118
8. If you need a tool that is not available through the governed MCP server, ask the user for permission before proceeding.
119
119
120
+
## Policy Evolution — MANDATORY
121
+
122
+
When a governed tool call is **denied** and the response contains a \`Suggestion ID\`, you **MUST** follow this workflow:
123
+
124
+
1. **STOP** what you are doing. Do NOT skip the suggestion or continue with other tasks.
125
+
2. **PRESENT** the suggested policy change to the user clearly, e.g.: *"The tool \`directory_tree\` was denied because it has no policy. Would you like to add it? Options: add to policy permanently, allow once for this session, or deny."*
126
+
3. **WAIT** for the user to respond with their choice.
127
+
4. **CALL** \`governed-filesystem\` → \`policy_evolution_approve\` with the \`suggestion_id\` from the denial and the user's \`decision\` (\`"add-to-policy"\`, \`"allow-once"\`, or \`"deny"\`).
128
+
5. If the user chose "add-to-policy" or "allow-once", **RETRY** the original tool call that was denied.
129
+
130
+
**You MUST NOT ignore a Suggestion ID. You MUST NOT continue without asking the user.**
131
+
120
132
## Why
121
133
122
134
All file and system operations must go through the Deterministic Agent Control Protocol governance layer for policy enforcement and audit logging. Using built-in tools would bypass security policies, forbidden path protections, and the tamper-evident evidence ledger.
@@ -153,9 +165,21 @@ Instead of your built-in file tools, you MUST use these governed equivalents:
153
165
4. **ALWAYS** route file edits through \`governed-filesystem\` → \`edit_file\`.
154
166
5. **ALWAYS** route directory listings through \`governed-filesystem\` → \`list_directory\`.
155
167
6. **ALWAYS** route file searches through \`governed-filesystem\` → \`search_files\`.
156
-
7. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback. Report the denial to the user instead.
168
+
7. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback.
157
169
8. If you need a tool that is not available through the governed MCP server, ask the user for permission before proceeding.
158
170
171
+
## Policy Evolution — MANDATORY
172
+
173
+
When a governed tool call is **denied** and the response contains a \`Suggestion ID\`, you **MUST** follow this workflow:
174
+
175
+
1. **STOP** what you are doing. Do NOT skip the suggestion or continue with other tasks.
176
+
2. **PRESENT** the suggested policy change to the user clearly, e.g.: *"The tool \`directory_tree\` was denied because it has no policy. Would you like to add it? Options: add to policy permanently, allow once for this session, or deny."*
177
+
3. **WAIT** for the user to respond with their choice.
178
+
4. **CALL** \`governed-filesystem\` → \`policy_evolution_approve\` with the \`suggestion_id\` from the denial and the user's \`decision\` (\`"add-to-policy"\`, \`"allow-once"\`, or \`"deny"\`).
179
+
5. If the user chose "add-to-policy" or "allow-once", **RETRY** the original tool call that was denied.
180
+
181
+
**You MUST NOT ignore a Suggestion ID. You MUST NOT continue without asking the user.**
182
+
159
183
## Why
160
184
161
185
All file and system operations must go through the Deterministic Agent Control Protocol governance layer for policy enforcement and audit logging. Using built-in tools would bypass security policies, forbidden path protections, and the tamper-evident evidence ledger.
@@ -188,9 +212,21 @@ Instead of your built-in file tools, you MUST use these governed equivalents:
188
212
189
213
1. **NEVER** use built-in file read/write/edit tools for any file operation when the governed MCP tools are available.
190
214
2. **ALWAYS** route file operations through the \`governed-filesystem\` MCP server.
191
-
3. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback. Report the denial to the user instead.
215
+
3. If a governed tool call is **denied by policy**, you MUST respect the denial. Do NOT attempt to use a built-in tool as a fallback.
192
216
4. If you need a tool that is not available through the governed MCP server, ask the user for permission before proceeding.
193
217
218
+
## Policy Evolution — MANDATORY
219
+
220
+
When a governed tool call is **denied** and the response contains a \`Suggestion ID\`, you **MUST** follow this workflow:
221
+
222
+
1. **STOP** what you are doing. Do NOT skip the suggestion or continue with other tasks.
223
+
2. **PRESENT** the suggested policy change to the user clearly, e.g.: *"The tool \`directory_tree\` was denied because it has no policy. Would you like to add it? Options: add to policy permanently, allow once for this session, or deny."*
224
+
3. **WAIT** for the user to respond with their choice.
225
+
4. **CALL** \`governed-filesystem\` → \`policy_evolution_approve\` with the \`suggestion_id\` from the denial and the user's \`decision\` (\`"add-to-policy"\`, \`"allow-once"\`, or \`"deny"\`).
226
+
5. If the user chose "add-to-policy" or "allow-once", **RETRY** the original tool call that was denied.
227
+
228
+
**You MUST NOT ignore a Suggestion ID. You MUST NOT continue without asking the user.**
229
+
194
230
## Why
195
231
196
232
All file and system operations must go through the Deterministic Agent Control Protocol governance layer for policy enforcement and audit logging. Using built-in tools would bypass security policies, forbidden path protections, and the tamper-evident evidence ledger.
'Present this suggestion to the user and ask for their decision:',
128
-
' - "add-to-policy" — permanently add to the policy file',
129
-
' - "allow-once" — allow for this session only',
130
-
' - "deny" — keep the restriction',
131
-
'',
132
-
`Then call the "${TOOL_NAME}" tool with the suggestion_id and their decision.`,
127
+
'ACTION REQUIRED: Ask the user whether to "add-to-policy", "allow-once", or "deny", then call policy_evolution_approve with the suggestion_id and their decision. If approved, retry the original tool call.',
0 commit comments