Vault Indexing & Knowledge Graph Verification
This repository maintains the extraction contracts, scripts, and verification gates for building a comprehensive knowledge graph of the local Obsidian vault and archived conversations without cloud extraction costs:
- Structural Layer (
vault-index-structural.mjs): Local deterministic extraction of document nodes, ATX headings (containsedges), and[[wikilinks]](referencesedges). - Semantic Layer (
vault-index/semantic/): Subagents extract high-signalconceptnodes and decision attributes into isolated chunk files usingtemplates/vault-index-subagent-contract.md, strictly adhering toscripts/lib/chunk-schema.mjs. - Manifest (
vault-index/manifest.json): Records tracked roots, sha256 content hashes, byte sizes, and node counts across 9,600+ lines. - Community Clustering (
vault-index-cluster.mjs/.py): Runs graphify's native Leiden community detection algorithm locally on the assembled graph.
Verification Gate (scripts/vault-index-verify.mjs)
Task T12 verification proves that the hand-authored graph satisfies all structural, privacy, and query contracts:
bun scripts/vault-index-verify.mjs # full gate: coverage + privacy + live graphify read paths
bun scripts/vault-index-verify.mjs --no-graphify # fast gate: coverage and privacy rules only (~2s, CI-safe)
| Assertion | Contract |
|---|---|
| Coverage | Every path in the worklist is verified as a source_file in the graph or recorded in the manifest skip list. |
| Privacy Boundary | Verifies that no node source_file falls under excluded sensitive directories (e.g. Satset/). Boundary violations fail loudly. |
| Read Path Integrity | Verifies that graphify query, graphify explain, and graphify path execute with exit 0 and non-empty output against the assembled graph. |