mr4/knowledge-graph-preview
0
1{
2 "hooks": {
3 "PostToolUse": [
4 {
5 "matcher": "Bash",
6 "hooks": [
7 {
8 "type": "command",
9 "command": "printf '%s' \"$TOOL_INPUT\" | grep -qE 'git\\s+(commit|merge|cherry-pick|rebase)' && [ -f .understand-anything/config.json ] && grep -q '\"autoUpdate\".*true' .understand-anything/config.json && [ -f .understand-anything/knowledge-graph.json ] && echo \"[understand-anything] Commit detected with auto-update enabled. Read .understand-anything/hooks/auto-update-prompt.md and execute its instructions to incrementally update the knowledge graph.\" || true"
10 }
11 ]
12 }
13 ],
14 "UserTriggered": [
15 {
16 "name": "Baseline Spec Status",
17 "description": "Create a baseline snapshot of all spec files. Saves timestamped copy to baselines/ folder.",
18 "command": "python {{SCRIPTS_DIR}}/understand-baseline/baseline.py"
19 },
20 {
21 "name": "Export Spec to PDF",
22 "description": "Export all spec markdown files to PDF in the pdf/ folder.",
23 "command": "python {{SCRIPTS_DIR}}/understand-export/md_to_pdf.py"
24 },
25 {
26 "name": "Spec Progress Report",
27 "description": "Generate a progress report comparing current spec files against the most recent baseline.",
28 "command": "python {{SCRIPTS_DIR}}/understand-report/report.py"
29 }
30 ],
31 "FileEdited": [
32 {
33 "name": "Render Mermaid Diagrams",
34 "description": "When diagrams.mermaid.md is edited, render all Mermaid diagrams to PNG.",
35 "patterns": ["**/diagrams.mermaid.md"],
36 "command": "python {{SCRIPTS_DIR}}/understand-mermaid/render_mermaid.py"
37 }
38 ]
39 }
40}
41 