# Spec: vault-graph-build ## Purpose Build the initial knowledge graph over the `~/Documents/SecondBrain` vault using the selected Ollama model via Graphify; verify god-node plausibility; treat graph artifacts as disposable/rebuildable, not source-of-truth (ADR-008). ## Requirements ### Requirement: Initial vault graph is built with the selected model The initial knowledge graph SHALL be built over the `~/Documents/SecondBrain` vault using the model selected by the `local-model-selection` capability, via Graphify's Ollama document-extraction backend, and SHALL NOT begin until a model has been selected. #### Scenario: Build uses the selected model - **WHEN** the initial vault graph is built - **THEN** Graphify extracts over `~/Documents/SecondBrain` using the selected Ollama model - **AND** the build does not run before model selection is complete #### Scenario: Build scope is the vault only - **WHEN** the initial graph is built - **THEN** the extraction target is the vault, not any project code repository - **AND** per-project code graphs are not built as part of this change ### Requirement: Graph sanity is verified via god-nodes After the build, `GRAPH_REPORT.md` SHALL be reviewed to confirm the most-connected nodes (god-nodes) are the tools, clients, and domain concepts that the vault's content would predict, so an obviously wrong extraction is caught before downstream steps depend on it. #### Scenario: God-nodes match vault content - **WHEN** `GRAPH_REPORT.md` is reviewed after the build - **THEN** the top god-nodes are recognizable high-traffic tools, clients, or domains from the vault - **AND** an implausible god-node distribution is flagged rather than accepted ### Requirement: Graph artifacts are treated as disposable The produced graph artifacts (`graphify-out/`, `GRAPH_REPORT.md`, any index caches) SHALL be treated as rebuildable from the markdown vault and SHALL NOT be synced as source of truth, consistent with the markdown-as-truth decision (ADR-008). #### Scenario: Graph output is not the source of truth - **WHEN** the graph artifacts are produced - **THEN** they are rebuildable from the vault markdown - **AND** they are excluded from vault sync rather than treated as authoritative