Skip to content
Internals — research note: investigation or findings, not a description of shipped behaviour.
Unverified: This page has not yet been anchored to automated code tests.

Graphify Integration Research (2026-06-16)

Graphify Integration Research (2026-06-16)

Section titled “Graphify Integration Research (2026-06-16)”

Vox uses two different things under the name “graphify”:

  1. External Graphify (graphifyy on PyPI, safishamsi/graphify) — a Python pipeline that builds queryable knowledge graphs from code, docs, and media.
  2. Local graphify-out/ directory convention — a gitignored sink for both Graphify graphs and unrelated Vox CI/analysis artifacts (crate_audit.json, DEP_CYCLES.md, build-bench/, semantic-coverage markdown).

Rust-native port: Feasible for the structural pipeline (detect → AST extract → petgraph build → Leiden cluster → analyze → MCP query). Not a full replacement for LLM semantic extraction, multimodal ingest, or skill-level subagent orchestration — those belong in Vox’s orchestrator layer.

Agent handoff (implementation state): docs/superpowers/plans/2026-06-16-graphify-integration-HANDOFF-STATE.md — start here for a fresh agent; lists what landed vs remaining P1–P3 work.


.gitignore lists graphify-out/, but 108 files under that tree remain tracked in git (mostly COVERAGE_BEHAVIORS_*.md). New artifacts are ignored; committed behavior summaries are not.

FamilyProducerKey outputs
Graphify toolgraphify CLI / skill, rebuild_full_graph.pygraph.json, GRAPH_REPORT.md, graph.full.json, graph.coverage.json, graph.semantic.json, cache/
Config audit graph_config_audit_graph.pyconfig-audit-graph/graph.json, FINDINGS_INDEX.md
Semantic coveragescripts/coverage-graph/*.pyCOVERAGE_MAP.md, REACHED_VS_PROVEN.md, COVERAGE_BEHAVIORS_*.md
Vox CI (no Graphify)vox ci dep-cycles, vox ci build-bench, crate-build-audit.voxDEP_CYCLES.md, build-bench/, crate_audit.json
Scoped GUI graphGraphify on crates/vox-guicrates/vox-gui/graphify-out/graph.json (2,176 nodes)

No subdirectory convention separates CI maps from knowledge graphs.

1.2 Measured graph artifacts (local workspace, 2026-06-16)

Section titled “1.2 Measured graph artifacts (local workspace, 2026-06-16)”
PathNodes (approx.)Scope / notes
graphify-out/graph.json5,541Partial; .graphify_root = crates/vox-compiler
graphify-out/graph.full.jsonlarge AST graphDeterministic rebuild_full_graph.py
contracts/reports/semantic-coverage-graph.snapshot.json.gz65,981Committed CI ratchet input
crates/vox-gui/graphify-out/graph.json2,176GUI surface map
graphify-out/config-audit-graph/graph.jsonconfig audit2026-06-15

Doc drift: semantic-test-coverage-graph-strategy-2026-06-07.md cites “15,333 AST nodes” on graphify-out/graph.json. That described a scoped historical build, not the current canonical file.

StepWrites to graphify-outBlocking?
vox ci dep-cyclesDEP_CYCLES.mdYes (normal cycles)
vox ci build-benchbuild-bench/No
scripts/crate-build-audit.voxcrate_audit.jsonNo
ingest_reaches.py + ratchetUses contract snapshot, not live graph.jsonNo (advisory)

CI never rebuilds graphify-out/graph.json.

  • Graphify MCP serve (python -m graphify.serve) — documented in external skill only; zero vox-orchestrator-mcp tools.
  • vox-search — no graphify corpus; search-retrieval-ssot-2026.md corpus matrix has no graphify row.
  • Freshness — no staleness contract vs git HEAD or manifest.
  • Python pipeline — 12 allowlisted scripts/coverage-graph/*.py files; VoxScript rewrite deferred per README.

Source: ARCHITECTURE.md, graphify.net, PyPI graphifyy.

detect() → extract() → build_graph() → cluster() → analyze() → report() → export()
StageModuleMechanism
Detectdetect.pyFile walk, type classification, corpus warnings, mtime manifest for --update
Extract (code)extract.pytree-sitter AST + call-graph second pass; EXTRACTED / INFERRED edges
Extract (docs/media)skill orchestrationParallel LLM subagents (20–25 files/chunk); vision for images
Cachecache.pySHA256 of file contents → graphify-out/cache/{hash}.json
Buildbuild.pyMerge extractions → NetworkX undirected graph
Clustercluster.pyLeiden (graspologic); split oversized communities
Analyzeanalyze.pyGod nodes, surprising connections, suggested questions
Exportexport.pygraph.json, graph.html, Obsidian, Neo4j, GraphML
Serveserve.pyMCP stdio over graph.json
LabelMeaning
EXTRACTEDExplicit in source (import, call, doc statement)
INFERREDReasonable deduction (call-graph pass, co-occurrence)
AMBIGUOUSUncertain; surfaced in GRAPH_REPORT.md

Transport: stdio (python -m graphify.serve graphify-out/graph.json).

ToolBehavior
query_graphKeyword seeds → BFS/DFS subgraph, token budget
get_nodeLookup by label/ID
get_neighborsAdjacency + relation/confidence
get_communityMembers of community ID
god_nodesHigh-centrality hubs
graph_statsCounts + confidence breakdown
shortest_pathPath between keyword-matched endpoints
MechanismPathInvalidation
Semantic cachecache/{sha256}.jsonFile content hash
Update manifestmanifest.json{path: mtime} diff
Cost trackercost.jsonCumulative LLM tokens per run
Watch modeflag fileCode → AST-only rebuild; docs → needs_update

Graphify stageRust stackVox precedent
Detect + manifestwalkdir, serde_jsonvox-config::paths
Rust AST extractsyn (richer than tree-sitter for Rust)vox-codegen, vox-code-audit
Graph buildpetgraphNew dependency
Leiden clusterleiden-rs or graphopsNew dependency
Analyze / queryPort analyze.py + BFS/pathvox-orchestrator-mcp patterns
MCP surfacermcpExisting MCP crate
Cacheblake3 / sha2 + Tier D cache dirdata-storage SSOT §4.4

scripts/coverage-graph/rebuild_full_graph.py already calls graphify.extract deterministically — a credible seed for a Rust port of structural extraction only.

  • Multi-language tree-sitter extractors (19 languages in upstream extract.py)
  • PDF / image / video semantic extraction
  • Parallel LLM subagent dispatch (skill.md workflow)
  • HTML/Obsidian/Neo4j exporters (agent-facing surface is graph.json + MCP)
LayerOwner
Monorepo code graph (Rust/Vox crates)New vox-graph-* crates or vox-search/src/graphify/
Multimodal / doc semantic passgraphifyy subprocess or Vox agent workflow via vox_actor_runtime::llm
Agent APIvox-orchestrator-mcp tools → vox-search execution (no forked retrieval)

Full Rust rewrite of Graphify is not cost-effective. Rust-owning structural + query + freshness for the Vox workspace is high ROI.


Aligns with search-retrieval-ssot-2026.md: all retrieval through vox-search + RetrievalEvidenceEnvelope.

Add contracts/retrieval/graphify-corpora.v1.yaml:

corpora:
- id: repo-code-graph
scope_path: "."
graph_path: ".vox/cache/graphify/repo-code-graph/graph.json"
default_for_intents: [code_navigation, repo_structure]
- id: vox-gui-surface
scope_path: "crates/vox-gui"
graph_path: ".vox/cache/graphify/vox-gui-surface/graph.json"
- id: config-audit
graph_path: ".vox/cache/graphify/config-audit/graph.json"

Each map gets .graphify_manifest.v1.json: built_at, git_sha, node_count, graph_json_sha256, input_manifest_sha256, extraction_mode, semantic_pass_crates.

Lexical: Project node labels/behaviors into Turso knowledge_nodes with IDs graphify:{corpus_id}:node:{id} and metadata filters (proof_strength, honesty, corpus_id). Extend planner / vox_graphify_search MCP tool.

Structural: vox-graphify-reader — mmap graph.json, implement BFS/path/explain compatible with upstream MCP semantics. Tools: vox_graphify_query, vox_graphify_path, vox_graphify_compare.

Diff two manifest-bound snapshots:

  • Community drift (Jaccard on member sets)
  • God-node rank delta
  • Edge confidence promotions/drops
  • Semantic coverage overlay drift (reached vs proven)

Output: Tier D full diff JSON; optional Tier A summary row for “what changed since last week.”

TriggerDetectionAction
Git driftgit diff manifest.git_sha..HEAD ∩ scanned filesstale_reason: git_drift
Input manifestRe-hash detect file listStale
TTLVOX_GRAPHIFY_TTL_DAYS (default 30)Advisory stale
Semantic incompleteOverlay older than graph or missing cratesstale_reason: semantic_incomplete
Lexical lagTurso metadata.graph_sha256 ≠ manifestRe-ingest

CLI: vox graphify status [--strict]; MCP: vox_graphify_status.

Gap detection: files in detect manifest without graph nodes; crates without Phase-2 semantic pass; registry corpus with missing graph.json.

DataTierLocation
Full graph.json, overlaysD.vox/cache/graphify/<corpus_id>/ via vox_config::paths
ManifestsDBeside graph
Lexical projectionAknowledge_nodes / knowledge_edges
Refresh/diff eventsBvox-spool channel graphify.lifecycle
Large diff blobsCvox-checksum-manifest digest; Tier A holds pointer

Do not store 100MB+ graphs in Turso.

PhaseOutcomeKey crates
P0Registry + manifest + vox graphify statusvox-config, vox-cli, vox-orchestrator-mcp — landed
P1Lexical ingest + vox_graphify_search in retrieval bundlevox-search, vox-db — landed (lexical lib, MCP search, CLI ingest, search log virtual corpus)
P2Structural query + cross-map diff MCP toolsvox-graphify-reader, MCP — landed (BFS, path, compare, god-nodes ranking)
P3Auto-refresh hooks, semantic coverage gate, CI --strict freshnessvox-cli-ci, VoxScript migration — open

To integrate Graphify search into the broader workspace telemetry and context mapping, every lexical search performed via the vox_graphify_search MCP tool persists its query signature to the Turso database under the virtual corpus graphify-search-log.

  • Virtual Corpus (graphify-search-log): Registered as a virtual corpus that is always fresh. Lexical staleness checks bypass it.
  • Node Type: Persisted hits are recorded as graphify_search_hit nodes in the database.
  • Query Slug & Collisions: To prevent ID collisions, a query_slug is generated using a combination of the cleaned query text and an FNV-64 hash suffix of the full query parameters.
  • Bypass Flag: The vox_graphify_search tool accepts a persist: Option<bool> parameter (defaults to true). Setting this to false allows calling the search tool in transient contexts without writing to the database.
  • Telemetry Timestamp: Each returned search hit includes a searched_at timestamp.

5. Code review findings (integration readiness)

Section titled “5. Code review findings (integration readiness)”
  1. Untrack graphify-out/COVERAGE_BEHAVIORS_* — violates Tier D intent; promote summaries to contracts/reports/ if needed.
  2. Namespace split — move CI outputs (dep-cycles, build-bench, crate_audit) out of graphify-named tree; reserve graphify cache under .vox/cache/graphify/.
  3. Doc drift — correct node-count claims in semantic-coverage strategy doc; cite corpus id + sha + path everywhere.
  • Hardcoded graphify-out in dep_cycles.rs, build_bench.rs, crate-build-audit.vox → vox_config::paths.
  • Three graph artifacts with no registry — agents cannot pick authoritative map.
  • Pick one structural path: embedded Rust reader (preferred) vs subprocess graphifyy --mcp.

Proceed with P0 design and this research doc. Block MCP/reader implementation until C1–C3 hygiene lands.


Installed on this machine via uv tool install tavily-cli → C:\Users\Owner\.local\bin\tvly.exe (v0.1.4). Not available via winget (winget search tavily returned no package). Add C:\Users\Owner\.local\bin to user PATH or run uv tool update-shell.