Name, classify and search graphify communities with TypeSafe Jev, without a generative LLM.
graphify splits a codebase into communities (Leiden clusters) and names them with an LLM backend, or falls back to naming each one after its most-connected symbol. This tool names them by selection instead of generation. Code builds candidate names from the graph itself: the hub symbol, classes, functions, file and folder stems, frequent identifier words, and an optional project vocabulary. Jev picks one and says how confident it is. A selection can't be empty, truncated or in the wrong language, and a low-confidence pick is flagged for review instead of guessed.
The names go into graphify's own .graphify_labels.json, so GRAPH_REPORT.md, graph.json,
graph.html and graphify query all show them.
It also settles duplicate nodes. graphify leaves pairs with a fuzzy similarity of 75–92 unmerged
unless you pass --dedup-llm, and then the LLM only sees the two labels. jev-graphify dedup
takes the same pairs and has Jev judge them from the source: the actual #include or import
line, the whole docstring instead of its 80-character label, and what each node connects to.
$ jev-graphify route "how does the localizer handle a new initial pose from RViz?"
shortlist (fits = does it implement this?):
-> fits 0.85 p 0.71 go2_localization: lidar localization component [localization]: ...
fits 0.52 p 0.28 go2_localization: localization pcl [localization]: ...
fits 0.08 p 0.01 go2_mapping: capture initial pose [localization]: ...
start reading (answered here 0.90):
1.00 PCLLocalization::initialPoseReceived() (function) go2_localization/src/lidar_localization_component.cpp:938
next: graphify explain "PCLLocalization::initialPoseReceived()"
[3 requests, 0 cached, 16,656 tokens, $0.00070, 1.58s]
Needs Python 3.11+, uv, a graph built by graphify 0.9.x, and
TYPESAFE_API_KEY (get one). No other model
key is used.
uv tool install git+https://github.com/190ibrahim/jev-graphifyRun these from a directory that contains graphify-out/, or pass --graph.
jev-graphify show 12 # one community's evidence and candidate names; no API call
jev-graphify label # name + classify every community, write graphify's labels file
jev-graphify label --apply # ...and run `graphify cluster-only` to rebuild the report
jev-graphify route "where are MPPI rollout costs computed?"
jev-graphify dedup # judge the pairs graphify couldn't settle; writes a report only
jev-graphify dedup --apply # ...merge the "merge" pairs into graph.json and re-clusterlabel writes three files into graphify-out/:
| File | What it holds |
|---|---|
.graphify_labels.json + .sig |
the names, plus graphify's membership signatures, so cluster-only reuses them |
jev_communities.json |
every raw judgment: name, runner-up, per-candidate fit, subsystem, cohesion, vendored, review flag |
JEV_COMMUNITIES.md |
communities grouped by subsystem, plus project communities Jev scored as loosely coupled |
Subsystems and the concept vocabulary come from a TOML file. The default is generic;
examples/go2_ros2.toml is a project-specific one for a ROS 2 robot
stack. Pass yours with jev-graphify --taxonomy my.toml label.
label makes one request per community (communities under 3 nodes keep their hub name). The
state is evidence that code gathers: package, files, the 40 most-connected classes and functions,
internal relations, code comments, and external dependencies. It is sent as ordered lists rather
than counts, because Jev reads numbers poorly. Every question in the request is independent, so
they are answered in parallel:
- a Choice over the candidate names, plus "none of these names";
- one yes/no fit check per candidate, so a split between two synonyms can still be accepted;
- a Choice over subsystems, a 0–3 cohesion Score, and a "vendored library?" check.
The policy lives in code (policy.py). A name is accepted when the Choice confidence is at least
0.5 or the winner's fit check is at least 0.6; otherwise it is flagged for review. When two
communities would share a name, the smaller one takes its own next-best candidate that also fits.
route has three stages. First, a Choice ranks every community by a one-line description
(split into chunks of 250 when there are more, then merged). Next, the top three are re-read with
their full evidence, with a fit check each that is allowed to reject all of them. Finally, a
Choice over the winning community's symbols picks where to start reading. This follows the shape
of TypeSafe's skill-suggestion and
line-by-line search cookbooks.
dedup picks pairs with graphify's own filters. It calls them rather than copying them, and a
test checks that the pair list is identical to what --dedup-llm would send. Each pair is one
request, shaped like TypeSafe's
entity alignment cookbook: a three-level
Score (different / possibly the same, check it / certainly the same) decides, and three yes/no
checks (same target? same origin? one part of the other?) end up in the report so you can see why.
The nearest level wins, so there is no threshold to tune. Results go to jev_dedup.json and
JEV_DEDUP.md. With --apply, the merge pairs are collapsed using graphify's own survivor rule,
edges and hyperedges are rewired, the original is kept as graph.json.before-jev-dedup, and
graphify cluster-only runs. Note that the next graphify update rebuilds the graph and undoes
the merges.
Every response is cached on disk under graphify-out/jev_cache/, keyed by model, state and
questions. Re-runs and policy changes cost nothing, and the evidence is deterministic across runs.
The model is pinned to jev-1.13.0 so the cached answers and thresholds keep meaning the same
thing. Override it with --model.
Everything in a request goes to TypeSafe's API: package names, file paths, symbol names, internal
relations, external dependency names, and up to six code comments of up to 160 characters each,
which graphify has already extracted as rationale nodes. Function bodies and source files are
never sent by label or route. route also sends your question. dedup sends small
excerpts for the nodes it compares: the import line, the docstring or comment block (up to 500
characters), a heading plus the few lines under it, and up to six neighbour names. TypeSafe's data handling is described in its
legal docs.
A ROS 2 robot stack (C++/Python, 5,025 nodes, 247 communities), one run with jev-1.13.0:
label: 237 communities judged in 8.6 s for $0.021 (493k input tokens). 209 names were accepted and 28 flagged. All labels were reused bygraphify cluster-only.route: 5 of 6 hand-written questions landed on the implementing function. The sixth found a different, valid filter than the one intended. A question about code the graph does not contain was correctly rejected: every fit check was under 0.05. About $0.0007 and 1.5 s each.dedup: two graphs from the same project gave 91 ambiguous pairs, none of them a real duplicate (mostly sibling modules likelaunch.actions/launch.conditions, or a header and its subclass likeODEMultiRayShape.hh/livox_ode_multiray_shape.h). Jev merged none of them and flagged 2 for review. To check that it does say yes, I added 80 twins: real nodes copied under a second name graphify scores as ambiguous (json_sax/input/json_sax, a docstring and a concept holding its first sentence). Jev merged 73, sent 7 to review, and kept none apart. The same questions with labels only made 1 wrong merge and caught just 20 of the twins. Both graphs together: about $0.003 and 2 s each.
- Names were judged by eye on a single codebase, not scored against a labeled set, and not compared with graphify's LLM labeler on the same graph.
- Label quality is bounded by the candidates. Jev cannot invent a better name than one that code offers.
- Loading
.graphify_labels.json.sigrelies on graphify's internalcommunity_member_sigs, reproduced here byte-for-byte and pinned by a test. If graphify changes it,cluster-onlysilently replaces these names with hub names. - The dedup twins are made by copying a real node and its edges, so they are easier than duplicates found in the wild. On a code-only graph there are few real duplicates to find; graphs with LLM-extracted concepts from docs should have more.
dedupimports graphify's internal dedup helpers, so it needs graphify installed alongside (graphifyyis a dependency) and may break when those helpers change.- TypeSafe is a hosted commercial API.
A sourced ROS 2 environment puts its own Python packages on PYTHONPATH ahead of this tool's
venv, and pytest then auto-loads ROS's launch_testing plugin. Run with env -u PYTHONPATH.
uv sync
uv run pytestMIT licensed. Not affiliated with TypeSafe AI or Graphify Labs.