CodeVetter
← All unpacks
CodeVetter · Repo Unpack evidence

Graphify-Labs/graphify

Scanned commit 20a20d30d8 dated 2026-09-20 — last upstream commit. Generated by codevetter 1.12.0 on 2026-09-22.

github.com/Graphify-Labs/graphify ↗ · 897 files · 11.1 MB

Read this in other languages 🇺🇸 English | 🇨🇳 简体中文 | 🇯🇵 日本語 | 🇰🇷 한국어 | 🇩🇪 Deutsch | 🇫🇷 Français | 🇪🇸 Español | 🇮🇳 हिन्दी | 🇧🇷 Português | 🇷🇺 Русский | 🇸🇦 العربية | 🇮🇷 فارسی | 🇮🇹 Italiano | 🇵🇱 Polski | 🇳🇱 Nederlands | 🇹🇷 Türkçe |

Deep analysis by swe-2 via the devin CLI on 2026-09-22 (runtime not recorded) — every claim below links to its cited source files.

Overview

graphify (PyPI package `graphifyy`, CLI `graphify`) is a Python 3.10+ CLI plus an installable AI-assistant skill that turns a folder of code, docs, papers, images, and video/audio into a persistent, queryable knowledge graph under graphify-out/ (graph.json, graph.html, GRAPH_REPORT.md). Code is mapped locally and deterministically with ~30 tree-sitter grammars and per-language resolvers, while docs/media go through an optional semantic LLM pass (host-agent subagents or configured API backends). Every edge carries an EXTRACTED/INFERRED/AMBIGUOUS confidence tag, and the finished graph is queried through CLI subcommands (query/path/explain/affected/god-nodes) or an MCP server (stdio or HTTP). It targets users of 20+ coding assistants (Claude Code, Codex, Cursor, Gemini CLI, etc.) via generated per-platform skill bundles.

System map

A single-package Python CLI (`graphifyy`) structured as a staged pipeline: detect -> extract -> build -> cluster -> analyze -> report -> export, with each stage in its own module communicating through plain dicts and NetworkX graphs. The same library is driven two ways: headless via `graphify extract` subcommands in cli.py, or by an AI assistant following the packaged skill.md runbook that shells out to the library. Persistence is entirely file-based under graphify-out/ (graph.json, manifest.json, cache/, sidecars). Deployment surfaces are the PyPI wheel, per-platform skill files, and a Docker image that runs the MCP HTTP server.

All 13 system map claims →

Feature catalog

User-facing surface = one CLI with ~30 subcommands, a generated `/graphify` skill for 20+ AI assistants, an MCP server exposing 10 graph tools, and a large set of export formats and corpus ingestors. Features span: corpus detection (code/docs/papers/images/video), AST extraction across ~40 language extensions, semantic (LLM) extraction with pluggable backends, community detection + report, multiple export sinks, git-hook auto-rebuild, cross-repo/global graphs, PR triage via `gh`, and work-memory reflection.

All 13 feature catalog claims →

Data flow

Input boundary is detect(), which walks the corpus, classifies files into code/document/paper/image/video, and filters sensitive paths. Code files flow through extract(): suffix/filename/shebang dispatch to per-language extractors emitting {nodes, edges} dicts, then cross-file resolution passes (LanguageResolver registry) turn imports/member calls into INFERRED edges. Docs/papers/images flow through the semantic pass — either host-agent subagents writing chunk JSONs (skill.md path) or llm.extract_corpus_parallel packing token-budgeted chunks against a configured backend. Merged extractions are validated, deduplicated, built into a NetworkX graph, clustered, and exported to graphify-out/graph.json plus reports; incremental updates re-extract only changed files via manifest.json hashing.

Behavior traces

Three traced flows: (1) `graphify install` copies the platform's generated skill bundle and registers hooks/always-on instruction blocks; (2) `graphify extract .` runs the full headless pipeline detect->extract->resolve->build->cluster->export with shrink guards; (3) `graphify query`/`graphify update` read and incrementally maintain graph.json. A fourth trace covers the git post-commit auto-rebuild. All flows converge on the same modules: detect/extract/build/cluster/report/export under graphify/.

Testing signals

Testing is pytest-based with ~400 test files under tests/, one file per module plus many regression tests named after GitHub issues (test_issue_3405_*, etc.). Fixtures cover cross-language corpora (crate_a/crate_b Cargo workspaces, cpp/objc dirs, SQL samples). conftest.py sandboxes HOME and strips backend env vars so installers and detect_backend never touch the developer's real config. CI runs the suite on Python 3.10-3.14 plus a skillgen drift-guard job and non-blocking bandit/pip-audit scans.

Risk map

The main risks are (a) SSRF/SSRF-adjacent fetching — mitigated by a purpose-built guarded-connection stack; (b) prompt injection from attacker-controlled corpus files into the semantic LLM pass — mitigated but explicitly 'table stakes'; (c) the 8,300-line extract.py monolith mid-migration where the shared _extract_generic core and cross-file resolvers concentrate most defect density; (d) shell-out paths (git hooks, detached rebuilds, gh/git subprocesses, claude CLI) with heavy escaping/Windows edge-case handling; and (e) graph.json integrity guards (size cap, shrink guard, path validation) that protect but can also mask silent data loss if misread.

All 13 risk map claims →

Extension points

The codebase has clear, documented seams for extension: a suffix/filename/shebang dispatch table for new language extractors, a LanguageResolver registry for cross-file resolution passes, a BACKENDS dict + custom-provider JSON for LLM backends, a _PLATFORM_CONFIG table + skillgen fragments for new assistant platforms, and one-function-per-format exporters. ARCHITECTURE.md carries an explicit 5-step checklist for adding a language.

Contributor handoff

Read ARCHITECTURE.md first — its module table is enforced by a test. Then skim __main__.py (dispatch + re-exports), cli.py::dispatch_command (command table), extract.py (_get_extractor/_DISPATCH + the resolver tail), and paths.py (output-dir constants, atomic writes, cross-platform path helpers). Run `uv sync --all-extras --frozen` then `pytest tests/ -q`. Conventions: issue-numbered comments, atomic writes via paths.write_*_atomic, never cache zero-node extractions, keep the __main__ re-export surface stable, and never edit generated skill*.md files — edit tools/skillgen/fragments and regen.

Languages

LanguageFilesShare of source
Python40287%
Markdown362docs/config
C92%
JSON8docs/config
TypeScript82%
YAML8docs/config
C#72%
SQL72%

Start reading here

Probable source entrypoint: pyproject.toml — inferred from the directory tree and manifest, not the upstream docs.

Source roots

graphify/ (223 files)

Repository structure

Top-level pathFiles
tests/405
graphify/223
tools/174
docs/37
worked/34
.github/8
scripts/1

Docs found: AGENTS.mdARCHITECTURE.mdREADME.mddocs/docker-mcp-sqlite.mddocs/how-it-works.mddocs/node-summaries-rfc.mddocs/translations/README.ar-SA.mddocs/translations/README.cs-CZ.mddocs/translations/README.da-DK.mddocs/translations/README.de-DE.md

Package

pyproject.toml — graphifyy v0.9.65, 56 declared dependencies.

#######mcpneo4jfalkordbpdfwatch

CI & config entrypoints

Structural health signals

Average score 6.7/10 across 96 analyzed source files; 40 hotspots surfaced.

These are deterministic review leads — size, churn, and structural signals — not proof of a bug in this project.

Recent history