[Bug] doc-guardian hooks block workflow and lack session awareness #113
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?
Diagnostic Report
Generated: 2026-01-23T11:45:00Z
Command Tested: Lesson migration from local files to Gitea Wiki
Reporter: Claude Code via /debug-report
Project Context
personal-projects/personal-portfoliossh://git@hotserv.tailc9b278.ts.net:2222/personal-projects/personal-portfolio.git/home/lmiranda/Repositories/personal/personal-portfoliodevelopmentMCP Diagnostic Results
All 5 MCP diagnostic tests PASSED:
The issues encountered are NOT MCP-related. They are doc-guardian hook behavior issues.
Hook Issues Encountered
Issue 1: Hook stops workflow instead of continuing
Symptom: After every Edit to documentation files (CLAUDE.md, README.md, INDEX.md), the hook emitted:
Impact: Blocked Claude's ability to continue working. User had to say "move forward" after every edit.
Expected Behavior: Hook should emit a notification but NOT stop continuation.
Issue 2: Hook should spawn agent, not block
Current Behavior: When documentation drift is detected, hook blocks execution with a system-reminder message.
Expected Behavior:
doc-guardian:doc-analyzer) to track/address the driftIssue 3: Hook lacks session/task awareness
Symptom: During a single task (removing references to a deleted folder), the hook fired 4+ times for sequential related edits:
Impact: User had to say "move forward" 4 times for what was clearly one logical operation.
Expected Behavior:
Issue 4: Overly restrictive URL blocking
Symptom: Tried to add Gitea Wiki URL to CLAUDE.md, hook blocked with:
Context:
gitea.hotserv.cloud)Expected Behavior: Should be configurable or context-aware. Internal documentation URLs should be allowed, especially when the host is already documented in the same file.
Summary
Suggested Investigation
doc-guardian/hooks/- PostToolUse:Edit hook logicdoc-guardian/hooks/- PreToolUse:Edit URL validation logicReproduction Steps
Generated by /debug-report - Labels: Type: Bug, Priority: Medium, Component: doc-guardian