swarmvault graph tools

SwarmVault ships a local graph-navigation surface that works directly from state/graph.json, including semantic-similarity edges and group-pattern hyperedges. These commands do not save pages.

graph query

swarmvault graph query "<question>" [--dfs] [--budget <n>]

Use this to seed a graph traversal from semantic matches, local search hits, aliases, node labels, and matching group patterns.

  • default traversal is breadth-first
  • --dfs biases toward a path-like explanation
  • --budget limits how many graph nodes and edges are summarized
  • if an embedding-capable provider is available, semantic graph matches are tried first and cached under state/embeddings.json
  • if no embedding provider is configured, SwarmVault falls back to lexical graph matching automatically

graph path

swarmvault graph path <from> <to>

Return the shortest high-confidence path between two graph targets.

Targets can be page ids, graph node ids, or labels that resolve to graph nodes.

graph explain

swarmvault graph explain <target>

Inspect graph metadata for one target:

  • community membership
  • neighbors
  • group-pattern membership
  • linked pages
  • provenance-backed edges
  • evidence class and confidence

graph god-nodes

swarmvault graph god-nodes [--limit <n>]

List the most connected bridge-heavy nodes in the current graph.

graph blast

swarmvault graph blast <target> [--depth <n>]

Show the blast radius of changing one module by tracing reverse imports edges.

  • accepts a file path, module label, or module id
  • uses breadth-first traversal over reverse imports, so changing dependency B surfaces modules that depend on B
  • --depth limits the reverse-import traversal depth and defaults to 3
  • useful for local impact checks before large refactors or approval-bundled code updates

Notes

  • These commands are local and deterministic.
  • They are useful when you want graph structure without a provider-backed synthesis step.
  • The same read-only graph surfaces are also available over MCP through query_graph, graph_report, get_node, get_neighbors, get_hyperedges, shortest_path, god_nodes, and blast_radius.