Skip to content

Commit 9e1c804

Browse files
docs: point agent_persona.py at its live-reachable sibling port
check_agent_persona() has had no live invocation path since ADR-006 (Hook-Free Execution Model, executed 2026-08-04) deregistered PreToolUse from ~/.claude/settings.json. Its logic was ported to a new, explicitly- invoked validate_agent_dispatch MCP tool in mcp-pre-tool-gate/server.py. Add a sibling-implementation pointer so a future edit to either copy prompts a check of the other, instead of the two silently diverging. Fixes #318. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lhhw6mrg8Co2rU4vSS6z9N
1 parent 68c9c5f commit 9e1c804

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎hooks/pre_tool_enforcer/policies/agent_persona.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ def check_agent_persona(tool_name, tool_input):
193193
"""PreToolUse policy: block general-purpose subagent spawns lacking a
194194
real, skill-carrying persona.
195195
196+
SIBLING IMPLEMENTATION NOTICE: this function is not reachable from any
197+
live hook (ADR-006, Hook-Free Execution Model -- PreToolUse was
198+
deregistered 2026-08-04) and is kept only for its own equivalence tests.
199+
The reachable backstop is the ported `validate_agent_dispatch` MCP tool
200+
in mcp-pre-tool-gate/server.py (github.com/techdeveloper-org/mcp-pre-tool-gate).
201+
If you change the semantics here, check whether that port needs the same
202+
change (and vice versa), or the two copies will silently diverge.
203+
196204
A general-purpose (or unset) subagent_type must carry a library agent
197205
persona injected as a '---persona---' YAML block at the top of its
198206
prompt, per the Subagent Dispatch Contract -- and that block must

0 commit comments

Comments
 (0)