Scripts become thin CLIs over kb_framework (graph, query, query_tools, vault, instructions) so the hosted read-only connector shares one implementation with the stdio server. The MCP server builds the graph from Markdown on demand and invalidates it on writes; refresh_graph rebuilds in memory and reports validation problems. Pre-commit hook validates only; index/graph.json is no longer read, written or staged (generate-graph.py --write remains for operators). Golden fixtures pin graph and tool payloads to the previous output. Agent and skill docs updated to match. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
10 lines
477 B
Bash
Executable File
10 lines
477 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Validate the selected vault graph before accepting a commit.
|
|
# The graph is derived in memory; nothing is written and nothing must be staged.
|
|
set -euo pipefail
|
|
|
|
framework_root="$(cd -- "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")/.." && pwd)"
|
|
vault_root="${1:-${KNOWLEDGE_BASE_ROOT:-$framework_root}}"
|
|
echo "[pre-commit] Validating graph..."
|
|
"${PYTHON:-python3}" "$framework_root/scripts/generate-graph.py" --vault-root "$vault_root" --validate
|