fix(doc-guardian): Hook blocks workflow and fires excessively #287
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The doc-guardian PostToolUse hook has several usability issues that disrupt normal workflow.
Issues
1. Hook Blocks Workflow Instead of Running in Background
Current behavior: When documentation drift is detected, the hook outputs a message and stops continuation, requiring user to say "move forward" to proceed.
Expected behavior: Non-blocking notification + spawn background agent (
doc-guardian:doc-analyzer) to address drift in parallel.2. Hook Fires Multiple Times for Related Edits
Current behavior: During a single task involving sequential edits (e.g., updating 4 files in a migration), the hook fires 4+ times, each time blocking for user input.
Expected behavior: Batch related changes within a session/task, or remember user intent ("continue without checking") for the duration of the task.
3. Hook Over-Restricts Internal URLs
Current behavior: Tried to add Gitea Wiki URL to CLAUDE.md, hook blocked it claiming "infrastructure/network information exposure".
Expected behavior: Should be context-aware - internal documentation URLs (especially to the same Gitea instance) should not be flagged. The CLAUDE.md already contains the Gitea host elsewhere.
Observed In
personal-projects/personal-portfoliopersonal-projects/leo-claude-mktplaceProposed Solutions
notify.shpattern (like the current command hook) but don't stop workflowdoc-guardian:doc-analyzeragent to handle it.envAcceptance Criteria
.doc-guardian-queue)Related
Fix proposed in PR #291
Changes:
/doc-synccommandNote: The URL restriction issue (#3 in this report) was not found in the current codebase. It may have been caused by a different component or already fixed separately.
Next Steps: