knowledge-graph-preview / assets /hooks /spec-management.json
mr4's picture
Upload 136 files
fd8cdf5 verified
{
"hooks": {
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"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"
}
]
}
],
"UserTriggered": [
{
"name": "Baseline Spec Status",
"description": "Create a baseline snapshot of all spec files. Saves timestamped copy to baselines/ folder.",
"command": "python {{SCRIPTS_DIR}}/understand-baseline/baseline.py"
},
{
"name": "Export Spec to PDF",
"description": "Export all spec markdown files to PDF in the pdf/ folder.",
"command": "python {{SCRIPTS_DIR}}/understand-export/md_to_pdf.py"
},
{
"name": "Spec Progress Report",
"description": "Generate a progress report comparing current spec files against the most recent baseline.",
"command": "python {{SCRIPTS_DIR}}/understand-report/report.py"
}
],
"FileEdited": [
{
"name": "Render Mermaid Diagrams",
"description": "When diagrams.mermaid.md is edited, render all Mermaid diagrams to PNG.",
"patterns": ["**/diagrams.mermaid.md"],
"command": "python {{SCRIPTS_DIR}}/understand-mermaid/render_mermaid.py"
}
]
}
}