chore: remove graphify

Measured on this repo, graphify cost more than it returned. `graphify query`
answers with a keyword-seeded BFS neighbourhood, not a location: asking where
CORS origin reflection lives returned 73 nodes, mostly api_test.go helpers
plus an unrelated golang-performance doc section matched on the word
"reflection", and never named httpmw/middleware.go:135 or main.go:121 — which
grep gives in 40ms. `graphify explain` on a known symbol is sound but
duplicates what the LSP already answers against live files.

Against that, the PreToolUse hooks injected a "run graphify query first"
paragraph on every grep and every source read, the map cost 685k input tokens
across five builds, and graph.json plus graph.html carried 3.4MB through 11
commits of churn. AGENTS.md is the better orientation artifact: it holds the
CDP and clock findings, the adapter list, and the security invariants, none of
which an AST graph can derive.

Removes the committed map, the AGENTS.md rules block, the .gitignore entries,
both hooks, and the stale `graphify query` instruction in the
implement-tickets skill. The CLI, its skill directory, and the post-commit /
post-checkout git hooks were uninstalled outside the tree.
This commit is contained in:
2026-08-17 11:17:51 +07:00
parent f568fb5e8c
commit d168cf1ad0
10 changed files with 2 additions and 58285 deletions
+1 -20
View File
@@ -1,24 +1,5 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "CMD=$(python3 -c \"import json,sys; d=json.load(sys.stdin); print(d.get('tool_input',d).get('command',''))\" 2>/dev/null || true); case \"$CMD\" in *grep*|*rg\\ *|*ripgrep*|*find\\ *|*fd\\ *|*ack\\ *|*ag\\ *) [ -f graphify-out/graph.json ] && echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"MANDATORY: graphify-out/graph.json exists. You MUST run `graphify query \\\"<question>\\\"` before grepping raw files. Only grep after graphify has oriented you, or to modify/debug specific lines.\"}}' || true ;; esac"
}
]
},
{
"matcher": "Read|Glob",
"hooks": [
{
"type": "command",
"command": "HIT=$(python3 -c \"import json,sys;d=json.load(sys.stdin);t=d.get('tool_input',d);exts=('.py','.js','.ts','.tsx','.jsx','.astro','.vue','.svelte','.go','.rs','.java','.rb','.c','.h','.cpp','.hpp','.cc','.cs','.kt','.swift','.php','.scala','.lua','.sh','.md','.rst','.txt','.mdx');vals=[str(t.get('file_path') or ''),str(t.get('pattern') or ''),str(t.get('path') or '')];j=' '.join(vals).lower().replace(chr(92),'/');tails=[('.'+x.rsplit('.',1)[-1]) for v in vals if v for x in [v.lower().replace(chr(92),'/').rsplit('/',1)[-1]] if '.' in x];sys.stdout.write('1' if 'graphify-out/' not in j and any(tl in exts for tl in tails) else '')\" 2>/dev/null || true); if [ \"$HIT\" = 1 ] && [ -f graphify-out/graph.json ]; then echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"additionalContext\":\"MANDATORY: graphify-out/graph.json exists. You MUST run graphify before reading source files. Use: `graphify query \\\"<question>\\\"` (scoped subgraph), `graphify explain \\\"<concept>\\\"`, or `graphify path \\\"<A>\\\" \\\"<B>\\\"`. Only read raw files after graphify has oriented you, or to modify/debug specific lines. This rule applies to subagents too \u2014 include it in every subagent prompt involving code exploration.\"}}'; fi || true"
}
]
}
]
"PreToolUse": []
}
}