Problem
The graphify PreToolUse hook installed in .claude/settings.json outputs a plain text string:
[ -f graphify-out/graph.json ] && echo 'graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files.' || true
Plain echo output goes to stdout/transcript but is not injected into the model's context. Claude Code requires hooks to return structured JSON with hookSpecificOutput.additionalContext for the message to appear as a <system-reminder> that the model actually sees.
Expected behavior
The hook should output JSON so Claude receives the graphify reminder before every Glob/Grep call:
[ -f graphify-out/graph.json ] && echo '{"hookSpecificOutput":{"hookEventName":"PreToolUse","additionalContext":"graphify: Knowledge graph exists. Read graphify-out/GRAPH_REPORT.md for god nodes and community structure before searching raw files."}}' || true
Impact
Without the JSON wrapper, the hook fires silently — Claude never sees the reminder and searches raw files instead of consulting the knowledge graph first. The feature described in the README/docs doesn't actually work as intended.
Environment
- Claude Code on Windows 11
- graphify knowledge graph present (
graphify-out/graph.json exists)
- Hook matcher:
Glob|Grep
Problem
The graphify PreToolUse hook installed in
.claude/settings.jsonoutputs a plain text string:Plain
echooutput goes to stdout/transcript but is not injected into the model's context. Claude Code requires hooks to return structured JSON withhookSpecificOutput.additionalContextfor the message to appear as a<system-reminder>that the model actually sees.Expected behavior
The hook should output JSON so Claude receives the graphify reminder before every Glob/Grep call:
Impact
Without the JSON wrapper, the hook fires silently — Claude never sees the reminder and searches raw files instead of consulting the knowledge graph first. The feature described in the README/docs doesn't actually work as intended.
Environment
graphify-out/graph.jsonexists)Glob|Grep