yasinyaman/graphlore
Navigate a codebase through its knowledge graph, for questions that need the whole repository: an MCP server (semantic locate, impact analysis, token-budgeted subgraphs, exact source spans) plus an exploration skill. The graph is built by its own Rust engine, in 14 languages.
Changelog
All notable changes to this project are documented here. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
[0.8.0] - 2026-11-24
Added
- SCIP precision mode (
GRAPHLORE_SCIP,src/graphlore/scip.py). When the project has a SCIP index (index.scip, made byscip-python,scip-typescript,rust-analyzer scipand others), the edges the navigation tools walk are checked against it at read time: an edge the index agrees with is confirmed (confidence: EXTRACTED,scip: "confirmed"), a pair the graph lacks is added (callsorreferences,resolved_by: "scip"), and a call or reference it binds elsewhere is markedAMBIGUOUS(scip: "contradicted"), never removed. The index is decoded with the standard library (noprotobufpackage), cached on the file, and nothing is run or fetched; an index made in another directory is read by the project's own paths. Replies carryresolved_edges.precisionand a row'sscip. On httpx: 3,697 edges confirmed, 333 added, 15 contradicted (all 15 the indexer's own slips), under a second. A use whose source text is not its symbol's name (an indexer's slip, an alias) is left out and counted (mismatched), and a symbol is matched to its definition by its descriptors too, so the installed copy of a package (click 8.5.0, moduleclick.utils) finds the project's own (src/click).benchmarks/oracle_scip.pycompares a whole native graph with an index as the compiler oracles do. - Workspaces: several repositories as one graph (
docs/workspace.md). A project folder that is no git repository and holds repositories one or two levels down (or a.graphlore-workspace.jsonnaming them) is built as one graph by the native engine: each repository's own tracked files, its commit in the header (graph.repos), imports resolved to the importer's own repository first (Python, JVM, C# and Rust crates), route ids led by their repository, and a request to a host the workspace file gives a repository linked to that repository's routes.graphlore_freshness, the graph age, the changed-file notes, co-change and the watcher read each repository against its own commit;graphlore_difftakesrepo,graphlore reviewtakes--repo,graphlore_overviewcounts each repository and the edges between them, andgraphlore_search/graphlore_locatetake ascope(scope="api"). The post hook names the repository whose HEAD moved. A project that is one repository is built and read as before. - Claude Code and Codex hooks (
graphlore hook pre|post). Before aGreporGlob, or a shell search (rg,grep,git grep; Codex has no Grep tool), for one identifier the graph defines, a line of context names where it is defined and thatgraphlore_neighbors/graphlore_impactanswer the question such a search usually leads to; after a git command that moves HEAD past the graph's build commit, or an edit of a source file, a line says the graph is behind, once per state. The hook never blocks or changes a call, imports none of the server (about 50 ms a call), keeps an index of the graph's names underGRAPHLORE_CACHE_DIR, passes on only plain paths and is silent on any error. The plugin ships them inhooks/hooks.json, the default place of Claude Code and Codex alike;graphlore setup claude-code|codex --with-hooksmerges them into.claude/settings.jsonor.codex/hooks.json, keeping every other hook (Codex runs a hook once it is trusted in/hooks). Codex's file edits (apply_patch) are read for the files they name.GRAPHLORE_HOOKS=0turns them off. - A GitHub Action for
graphlore review(action.ymlat the root,uses: yasinyaman/graphlore@<tag>): it installs graphlore with the native engine from its own copy, reviews the pull request against its base commit, writes the report to the job summary and posts it as one comment it updates on each push (a fork's read-only token: the summary only);graphlore-versioninstalls a release from PyPI instead of its own copy.fail-onfails the step on a gate. graphlore's own pull requests run it (.github/workflows/review.yml).docs/review.mdcovers the command, the Action and a GitLab CI job. graphlore review: what a commit range changes, read off the code graph.graphlore review --base origin/main(or--base HEAD~1, the default) compares the checked-out commit with its merge base and reports the definitions the change touches (each changed line of a source file given to the innermost definition around it, a line no definition holds to the file's top level), what depends on any of them within--hops(one walk, nearest first, production before tests, cut at 60 rows with the rest counted), the tests that reach the changed definitions (direct or through one caller) and the ones no test reaches, the import cycles through changed files and the.graphlore-layers.jsonviolations in them, each markedintroducedwhen the import is written on a changed line. Cosmetic-only files and blank lines are left out; a heading that names the code and the file or class that holds it are not listed as dependents (the files that import it still are), and a changed variable, constant or field is never "untested". Definitions the change deletes or renames, and those of a removed file, are named under "Removed" from the two commits' sources. It builds the graph at the head commit with the native engine when it is missing or older (--no-buildrefuses instead), writes Markdown for a pull-request comment (repository names as code spans, at most 20,000 characters) or--format json, and exits 1 when a--fail-on cycle,layer,untestedgate fails, 2 when no review can be made (an unknown ref, a shallow clone, another commit checked out). No model and no network.- The agent evaluation has a baseline and repeats (
benchmarks/agents).--variants baselineruns each agent with no graphlore, in a copy of the repository withoutgraphify-out/;--repeat Nasks each task N times (no agent CLI takes a seed). Every arm keeps the agent's own read and search tools: the Claude Code adapter allowed onlymcp__graphlorebefore, so its-pruns had no Read or Grep. Rows record every tool called (calls), andscore.pyreports solved per repetition as mean ± standard deviation, tokens ± their deviation, and each graphlore arm's difference from the same agent's baseline. Still not run: it needs each agent's own login. - Stateless streamable HTTP (
GRAPHLORE_STATELESS_HTTP=1): each request is answered on its own, with noMcp-Session-Id, so replicas behind a load balancer can share the traffic;GRAPHLORE_JSON_RESPONSE=1answers with a JSON body instead of an SSE stream. Both are passed to the SDK's streamable-HTTP app on every HTTP path (plain, API key, OAuth) and ignored, with a warning, forsse. Over HTTP,GRAPHLORE_PROJECT_FROM_CLIENTnow stops the server at boot with exit code 2:graphlore_projectis refused there, so no project could ever be set. - The built-in search's kernel runs in the native engine (graphlore-engine
0.5.80, not yet published:
SearchKernel,KERNEL_ABI = 1). When the engine is installed, its port ofsearch.py's tokenizer and BM25F loop replaces the Python reference (GRAPHLORE_SEARCH_KERNEL=pythonforces the reference);tests/fixtures/search_golden.jsonholds both to the same terms and bit-identical scores, with new cases for non-ASCII capitals,İ,ß, final sigma and Unicode digits. On every file of the 45 audit repositories the two agree. Tokenizing is about 2.5× faster and scoring about 1.4×; a whole index build or query is not measurably faster, since reading the definitions dominates. graphlore_engine.definition_spans(engine 0.5.80):file_spanswithout the rest of the file's facts, the same spans on all 5,073 source files of the audit repositories in a fifth of the time. graphlore's span engine uses it where Python tree-sitter is missing. With Python tree-sitter installedspans.pykeeps its own reader, which is as fast or faster in most languages.publish.ymlcan be run by hand (workflow_dispatch): it uploads thepyproject.tomlversion to PyPI, then creates thev<version>tag and release. A published release still starts it as before.
Changed
graphlore_label_communitiesis marked read-only (read_only_hint): it returns names and saves none (graphlore_set_labelsdoes), and the server instructions no longer list it among the tools that write undergraphify-out/.- The README says what graphlore is for beside a language server and
built-in code search: the questions that need the whole repository at once
(what a change breaks, cycles, layers, routes, shared state), one budgeted
reply each. A new FAQ entry and
docs/comparison.mdplace it beside Claude Code's LSP tool, code search and other code-graph MCP servers, each claim from the project's own page, dated. Graphify is linked at its source repository (Graphify-Labs/graphify, which its PyPI page names as the official one) instead of graphify.net, in the README,pyproject.tomland the server's docstring; the plugin descriptions no longer say "instead of grepping". import graphloreno longer loads the server. The package's exports (main,mcp,__version__,api_uses_for_source,routes_for_source) load on first use, sographlore setup,clientsandagents-mdstart in about 25 ms instead of 0.6 s (the MCP SDK and the 34 tools were imported first).- Communities are named from the graph by default, with no model.
graphlore_label_communities(method="auto")now returns derived names (method="derived"): the build's owncommunity_nameon a native graph, else the engine's rule applied in Python (the member with the most edges, internal before external, after the directory more than 60% of the members share), whichtests/test_engine.pyholds to the engine's names.autoused to sample the client's model when it could and fall back to bareCommunity Notherwise; MCP's 2026-07-28 revision deprecates sampling (SEP-2577) and a stateless server has no session to sample through, somethod="sampling"is now only used when asked for.graphlore_sampling_statusreportspreferred_method: "derived". - Every
leantool's description says what it is for and what it is not for ("Use for: … Not for: … (use X)"). Claude Code defers MCP tools behind its tool search, where a tool is picked by its name and description alone; the guidance was only in the server instructions.graphlore_impact's andgraphlore_locate's descriptions are shorter to make room.docs/clients.mdsays how to load graphlore's tools up front ("alwaysLoad": true). - The built-in search index is the default, semble is opt-in.
GRAPHLORE_SEMANTIC_BACKENDunset (orauto) now means graphlore's own index whether or not semble is installed; semble answers only withGRAPHLORE_SEMANTIC_BACKEND=semble, and the plugins (Claude Code, Agent Plugins, Gemini CLI) no longer install thesembleextra ([semble]stays for those who set it). The built-in index joins every hit to its definition and needs no network for BM25; semble downloaded its model on the first call whenever it was installed, and a blocked download held every call that tried it. The cost is ranking: on semble's own query set the built-in index scores NDCG@10 0.814 (BM25) / 0.809 (with[embed]) against semble's 0.852. With[embed], which the plugins still install, the dense tier downloadsminishlab/potion-code-16M-v2on first use as before, and falls back to BM25 once when it cannot.
Fixed
-
Seven name-resolution rules read off the compilers' answers on whole repositories (engine 0.5.80,
benchmarks/oracle_rust.py,oracle_csharp.py; each a case inbenchmarks/conformance.pyand a golden inengine/tests/edges_golden.rs). Rust:- a name after
::or.in a macro's arguments is the end of a path or a member, never a bare name (assert!(f(Mode::Count))read a structCountof the module); - the bound of
impl<S: Sink> Core<S>boundsCore's parameter, and an impl's own parameters are its methods': a method called on a field typedS, andS::Errorin a signature, are the trait's, not a blanketimpl Sink for &mut S's; - an item of another module is in scope only through a
use:Resultin a file that imports none is the prelude's, not a module'stype Result; len/is_emptyafter a call that returns a slice ask the slice, not an element's method of the name;- a path that starts at a primitive type (
usize::from) is the language's, andas_str,parent,is_file,peekand the like are standard-library names no guess goes to.
C#: an argument that is the caller's parameter, declared with exactly the type an overload's parameter is written with, picks that overload (an identity conversion is the better one). Against rust-analyzer on ureq, ripgrep, axum-realworld and actix-realworld the wrong edges go from 169 to 98 (precision 98.6% to 99.2%), against Roslyn on restsharp, commandline, aspnetcore-realworld and todoapi from 224 to 213; no edge the compilers confirm is lost, and the neutrality check finds no new leak.
- a name after
-
Six Python name-resolution rules read off scip-python's answers on httpx, click and fastapi-template (engine 0.5.80,
benchmarks/oracle_scip.py; each a case inbenchmarks/conformance.pyand a golden inengine/tests/edges_golden.rs):- a bare name a module neither defines nor imports is a builtin or
nothing:
open(p)in one example script was a call of another script'sdef open,EXTRACTED(a qualname holds no module path, so the bare lookup matched every module's; Rust had the same filter already); - the class attributes of an
enum.Enum/IntEnum/StrEnum/Flagsubclass are its members, andState.CLOSEDis a reference to the enum; - a typed parameter's default value (
timeout: float | UseDefault = USE_CLIENT_DEFAULT) is read by the function: the node's kind (typed_default_parameter) was taken for a type position; - a module variable assigned a type (
TimeoutTypes = Union[…],Scope = MutableMapping[…],T = TypeVar("T"),X: TypeAlias = …) is a type alias, and an annotation that writes it references it; - a field assigned a parameter in
__init__(self.request = request,request: Request) has the parameter's type: the field and the parameter of one name were made one local and the parameter dropped; Optional[X]andX | Noneare X, no closed wrapper; a field assigned a union-typed parameter (stream: SyncByteStream | AsyncByteStream | None) answers a member with the one type of the union that has it,INFERRED(self.stream.close()insideResponse.closewas a guess ofResponse.closeitself).
Against scip-python, with the same oracle before and after: httpx 99.0% → 99.1% precision, 88.7% → 92.8% recall; click 97.3% → 97.7%, 90.5% → 91.3%; fastapi-template 100% → 100%, 87.6% → 92.4%. What remains wrong is mostly the indexer's own (a function defined under
try, two local classes of one name taken for one symbol). - a bare name a module neither defines nor imports is a builtin or
nothing:
-
spans.pyand the native engine read the same definitions on 44 more files of the audit repositories (engine 0.5.80). Compared on all 5,073 source files of the 45, they disagreed on 45; each case was read against the source and the wrong side fixed.spans.py: a Python file itsastcannot parse (3.14'sexcept A, B:in fastapi-template, which lost all three of its functions) takes the engine's spans;void *(CJSON_CDECL *f)(…)andvoid (Bench::*m)(…)fields keep their names (a declarator before anERRORin the parentheses, the engine's order);Env::~Env() = default;out of a class is a definition (its grammar reads an assignment). Both:std::function<R(T)> f{[…](T x) { … }};is a variable, not a function (cpr). The engine:std::thread t(Env::Entry, this);is a variable, not a function declaration, andEnv::Entryanindirect_call(leveldb); Kotlin is parsed withexternalamong a declaration's modifiers blanked, sointernal external interface RegExpMatch { … }is no longer lost (kotlinpoet); and a C# 14extension(RestRequest request) { … }block, which its grammar reads as a constructor namedextension, is a scope only: restsharp loses 31.extension()nodes, and the 194 members of the blocks are the class's (BodyExtensions.HasFiles, notBodyExtensions.extension.HasFiles) with every call, read and write they had, the block's parameter still typing their bodies. On the other 42 repositories the native graph is unchanged. One file still differs: a generic block (extension<T>(…), restsharp'sResponseThrowExtension.cs) the engine's grammar cannot read ends its class a line early. -
graphlore_package_apis(package=…)fits the 35,000-character reply budget. It cut each symbol's file list (down to three files) but not the number of symbols, so a package used for hundreds of names was still over: on native graphs (engine 0.5.79) zod's own name in its repository was 44,600 characters as JSON (29,700 as text, 211 symbols), gson'sjava.util36,500. The reply is now measured in both forms and cut further until it fits 30,000 characters at the defaultlimit(a largerlimitis a proportionally larger budget): the file lists first, then which symbols have one (the most used keep theirs;symbol_files_left_outcounts the rest, whose names stay insymbolsand in the text), then thefilesandqualified_pathslists, the symbol names last (symbols_left_out). zod is now 25,100 characters (52 of 211 symbols with their files), gson 29,600, andbenchmarks/polyglot.py --engine native --set 2no longer reportsREPLY-TOO-LARGEfor either. -
benchmarks/polyglot.pyno longer reports three artefacts of its own checks.BUILD-SMALL-GRAPHcompared every node of the graphgraphify updatebuilt, external names and the.json,.ymland.csprojfiles graphify counts as code included, with the native buildgraphlore_build(code_only=True)writes now thatGRAPHLORE_ENGINE=autopicks the engine (aspnetcore-realworld 1,652 against 598, symfony-demo 937 against 375); both counts now take only the nodes of source files of the 14 languages the audit reads, none external (637 against 598, 338 against 375).FETCH-SHADOW-SPANread a googletestTEST(Suite, Name)span namedSuite.Name(engine 0.5.76) as another symbol's on graphify'sTEST()node (cpr, 29 rows); a C / C++ test macro's span named so is the node's own, by the rulegraphlore_unreferencedskips such tests by.SKELETON-HEADER-NO-NAMElooked for a Rust macro's name with its!(engine 0.5.75'sdebug!) inmacro_rules! debug {(ripgrep); the!is stripped first.
[0.7.0] - 2026-11-23
Fixed
graphlore_unreferencedno longer lists googletest cases as dead code on native graphs. Since engine 0.5.76 aTEST(Suite, Name)/TEST_F(Fixture, Name)is the methodSuite.Name, not a function calledTEST, so the rule that skipped tests by name stopped matching: on cpr 112 of its 220 rows were tests. A C / C++ definition in a test file whose line is a test macro (a name in capitals given two bare names, the engine's own rule) is skipped.benchmarks/polyglot.pynow expects 34 tools, knows thedocumentsrelation and runsgraphlore_bridgesandgraphlore_god_nodes'rank=modes.benchmarks/polyglot.py --setup --engine nativeno longer needs graphify. Setup rangraphify update .whatever the engine and stopped at the first repository without the deprecated CLI; with--engine nativeit now only clones and the native engine builds the graphs.- A reply with default arguments stays under 35,000 characters (~10k
tokens), what Claude Code, Codex and Gemini CLI all keep; the result's
structuredContentcarries the same payload, so a large JSON payload was a large reply even for a text call. Measured on graphlore, httpx, nginx and Django, every read-only tool now fits in both forms (it was 522,600 characters forgraphlore_surpriseson nginx, 75,000 on Django, 47,000 forgraphlore_cycleson Django):- JSON replies are compact (no indentation: a third fewer characters);
graphlore_surpriseslists 10 writers, 10 readers and 5 pairs per shared state (writers_total,readers_total,pairs_left_outcount the rest) and itslimitdefaults to 10 instead of 20;graphlore_cycleslists at most 50 members per group (sizecounts them all;pathis still the whole loop);graphlore_skeletoncuts its first file by symbol pastmax(budget_tokens, 6000)tokens and says how many it left out (symbols_left_out), where a module of thousands of lines came whole.benchmarks/polyglot.py'sMAX_REPLY_CHARSgoes from 90,000 to 35,000, and a test holds the budget on the polyglot fixture.
- Every tool parameter has a description, and the tool definitions fit
every client. All 141 parameters had none: each tool's whole docstring,
Args:block included, went out as its description, and function-calling APIs (Codex, Kimi and other OpenAI-style clients) read a parameter's owndescription._toolnow moves theArgs:block onto the input schema (_doc_args,_describe_parameters). The 16 descriptions over 900 characters were cut to what a model needs to pick and call the tool (the detail is indocs/tools.md):graphlore_impact's was 4,151 characters, past the 4,096 at which Claude Code cuts one. What a client loads:full60,400 → 48,400 characters (~15k → ~12k tokens),lean20,400 → 16,200,locate6,900. The schemas take only plain types now:graphlore_layers'rulesandgraphlore_set_labels'namesare published as JSON strings (an object still works;_json_object),graphlore_duplication_scan'smin_scoredefaults to-1(the backend's floor) instead ofnull— noanyOf, free-key object ornullleft, which strict function-calling modes and Gemini's function declarations reject. Tests hold each limit (900 characters, a schema under Codex's 5,000 bytes, a tool name Gemini CLI keeps, instructions under 4,000 characters). - graph.html's Show filters left test code on screen. Unticking tests
(and likewise external packages, vendored files) filtered the node views
but not the overview, the page's first screen: its community bubbles were
sized and linked over every node, and communities of test code only stayed
drawn — 1,661 of Django's 3,444. The overview now counts, sizes and links
each community by what the filters leave (
visibleCommunities, the page'soverview:beginblock, checked under node againstpage_data), leaves out the empty ones and says how many (with tests off on Django: 1,893 of test, external or vendored code only). The panel's lists follow the filters too — a community's members, a node's edges, the impact rows and the findings — each with a line counting what it hid. Since external packages are off by default, the overview's sizes now leave them out from the start, as the community views always did. Search still finds a hidden node by name. - graph.html printed "null" under a node's name in its details panel, for
every node without a finding badge: the panel handed the missing badge row to
append(), which writesnullas text. Parts left out are dropped now. graphlore_unreferencedno longer grows faster than the graph. On Django's graph (70,195 nodes) it ran for over 15 minutes and did not finish; it now answers in 9 s (limit=200, spans parsed cold), and in 1.2 s instead of 4.3 s on graphlore's own graph (4,630 nodes). The hook check (_hook_base) re-read and re-tokenized a base class's whole body for every method of every subclass, and walked the base chain again for each class of the same name: Django'sSimpleTestCase(unittest.TestCase)leads back to its ownTestCase, so each helper of each test class scanned the test case bodies four times over. Its answers are now kept per call, and a file's spans (indexed by definition line), a span's identifiers, a class's members, a name's other definitions and a class's referencing files are each worked out once per call. The answers are unchanged (the same JSON on graphlore, httpx and nginx before and after). With that,graph.html's findings carry unreferenced code whatever the graph's size:VIZ_UNREFERENCED_MAX(20,000 nodes) is gone.- Native engine: a build no longer panics on a multibyte character
(engine 0.5.78).
state.rs'sholds_containerandresources.rs's data-model detection capped how much of a value they scanned by slicing it at a byte index (&t[..t.len().min(200)]), which panics when that index lands inside a UTF-8 character — a curly quote, an emoji. Found by building the graph of Django, where it killed the whole build (src/state.rs:269 ... is not a char boundary; it is inside '”'). A newgeneric::prefixcuts back to a char boundary; both sites use it. The engine release to publish is 0.5.79 (this fix and thedocumentsedges under Added), not 0.5.77.
Deprecated
- graphify as graphlore's extractor, going in the next release with what
only it does:
graphlore_add(a source by URL),graphlore_build'smode("deep"),GRAPHLORE_ENGINE=graphify,GRAPHLORE_BINand thegraphifyextra. A build graphify answers says so. What graphify does that the engine does not yet is listed indocs/native-engine.md("After graphify").
Fixed
- Java: a method called
selfon a typed receiver is that method. The rule forOuter.thistook anyx.selfwhosexhas a class for its type, sor.self()on aRepo rbecame a call ofRepoitself. It holds only where the path names the class. Found bybenchmarks/neutrality.py, which failed on it before this change too.
Changed
- The
engineextra needsgraphlore-engine0.5.79 (>=0.5.79,<0.6), the first engine release on PyPI: graph.json schema 7, withdocumentsedges. - The documentation describes the native engine as the default. The
agent instructions, the exploration skill,
docs/concepts.md,docs/native-engine.md(its introduction and the roadmap's release A, now done), the README and CONTRIBUTING no longer speak of a "Graphify-built" graph or of an experimental, opt-in engine; graphify is described as the deprecated fallback. The post-commit hook example runs the native engine (python -m graphlore_engine build . --incremental), whose update also drops the nodes of deleted files. - The native engine builds the graph by default.
GRAPHLORE_ENGINEdefaults toauto: graphlore's own extractor when it is installed, graphify only when it is not (and formode, and forupdate/cluster_onlyof a graph graphify built). The engine is the newengineextra (graphlore-engine, prebuilt wheels: no Rust toolchain), part ofall; the Claude Code plugin installs it, andserver.jsonruns the server with--with graphlore-engineinstead of--with graphifyy. With neither extractor installed, a build says how to install the engine; an unknownGRAPHLORE_ENGINEis now an error instead of a graphify build. Without Python tree-sitter, spans come from the engine's compiled-in grammars unlessGRAPHLORE_ENGINE=graphify. graphlore_query,graphlore_pathandgraphlore_explainno longer run graphify: they read graph.json like every other analysis tool, so they work on a native graph with nographifybinary, and takeas_json.graphlore_querysearches the question in the code (thelocateindex; without one, the nodes whose names share its words), takes up to 3 hits asseedsand walks the graph out from them untilbudget(2000 tokens) is spent: breadth-first 3 hops, ordfs=Truedepth-first 6 hops. It takesscope, and a cut says so (truncated,hint).graphlore_pathis the shortest path along the edges' direction (direction: forward), else from the second node to the first (backward), else either way (undirected); each step says which way its edge points, andcouples_withis not walked. It takesscope.graphlore_explainisgraphlore_node_detailsplus the node's connections, tallied by relation and direction (counts) and listed up tolimit(30).- The audit's
CLI-*checks are replaced byQUERY-NO-SEED,PATH-MISSEDandEXPLAIN-BARE-NAME.
- Communities are named by MCP sampling only.
graphlore_label_communities(method="cli")(graphify labelwith a backend API key) is refused (code: "removed"), andmethod="auto"goes from sampling straight to placeholders;graphlore_set_labelstakes names the assistant writes.graphlore_sampling_statusdropsbackend_key_detectedandgraphify_cli_available. graphlore://reportis made from graph.json (graphlore_overviewandgraphlore_surprises) when graphify wrote noGRAPH_REPORT.md, or the graph is native and that file is a leftover of an earlier build.- Shared state leaves out the test code the engine marks, not only test
files: a writer inside a Rust
#[cfg(test)]module of a source file no longer pairs with production code (teston a native node). ureq: 112 pairs to 68.
Added
- graphlore installs as a plugin in Codex, GitHub Copilot CLI and Gemini CLI,
as it does in Claude Code: the repository root is also an
Agent Plugins 1.0 plugin
(
plugin.json,mcp.json,skills/), which Codex and Copilot CLI read through the existing.claude-plugin/marketplace.json, and a Gemini CLI extension (gemini-extension.json, with.gemini-extension/GRAPHLORE.mdas its context file). Each starts the same server withuvxfrom its own copy and ships thegraphlore-exploreskill, which moved toskills/(the fixed place the standard reads; Claude Code's manifest points there too). Checked with Codex 0.171, Copilot CLI 1.0.114 and Gemini CLI 0.70. The rootmcp.json, an example config, is now the plugin's server. GRAPHLORE_PROJECT_FROM_CLIENT=1: the project comes from the client. An Agent Plugins client starts the server in the plugin's own directory and names no project. With this set (and noGRAPHLORE_PROJECT_DIR), graphlore asks the client for its workspace roots on the first tool call and reads the first directory; a client that gives none getscode: project_unknownfrom every tool butgraphlore_projectandgraphlore_sampling_status, with the call that names the project. The server instructions say so, thelocateandleansurfaces keepgraphlore_project, and the watcher does not start.- OAuth for the HTTP transport, for remote clients (claude.ai and ChatGPT
connectors, Claude Code or Codex over HTTP): graphlore as a resource server
(
oauth.py, the newremoteextra: pyjwt).GRAPHLORE_AUTH_ISSUERandGRAPHLORE_AUTH_RESOURCE_URL(andGRAPHLORE_AUTH_SCOPES) turn it on: tokens your OAuth / OpenID provider signs are checked against its keys (RFC 8414 / OpenID discovery, asymmetric algorithms only) and for their issuer, audience (the resource URL exactly) and expiry; the MCP SDK's middleware answers 401 withWWW-Authenticate: Bearer resource_metadata=…, 403 for a missing scope, and serves the RFC 9728 Protected Resource Metadata. graphlore issues no token. It excludesGRAPHLORE_API_KEY, andGRAPHLORE_OFFLINErefuses it (the keys come from the provider: a row in the network table). Tested end to end over the streamable-HTTP app with a locally generated key. - A cross-model evaluation (
benchmarks/agents/,docs/benchmark-agents.md): 16 questions about httpx at a pinned commit, each answer checked in its source, asked headless of Claude Code, Codex CLI, Gemini CLI, Kimi Code CLI and Cursor's agent with graphlore set up asgraphlore setupwrites it, with and without theagents-mdguide;score.pygives per agent the tasks solved, graphlore calls, runs that used none of the task's suited tools, tokens and time. Each agent needs its own login, so it is run by hand, not in CI; afakeclient replays a transcript of real tool calls over stdio, and the tests run the whole pipeline with it. Not run on the real agents yet. graphlore setup <client>,graphlore clientsandgraphlore agents-md. graphlore's setup docs were Claude's only.graphlore setupprints, or with--writemerges, the block that starts graphlore in Claude Code, Claude Desktop, OpenAI Codex CLI (TOML), Google Gemini CLI, Cursor, VS Code with GitHub Copilot (.mcp.json, the current format), Kimi Code CLI, Zed, Windsurf or Cline. A merge keeps the file's other servers, saves the old file as<name>.graphlore.bakand refuses a file it cannot parse (Zed's settings with comments). A project file names no absolute path where the client can say "here" (${workspaceFolder},${CLAUDE_PROJECT_DIR:-.}).graphlore agents-mdwrites the usage guide for agents that read a project file rather than MCP prompts or server instructions (Codex and Copilot show no prompts): between<!-- graphlore:begin -->markers inAGENTS.md,GEMINI.mdor Copilot's instructions, naming only the toolset's tools;setup --with-agents-mdwrites it into the file that client reads. The console script is nowgraphlore.cli:main: with no arguments it runs the server as before. New pagedocs/clients.md: each client's files, key, add command and limits (tool caps, output truncation, prompts, instructions), each read from the client's own documentation (Codex's from its source, its documentation site being unreachable here).- Graph algorithms beyond the breadth-first walk (
src/graphlore/algorithms.py, checked against networkx on 300 random graphs; on Django's 77,766 nodes each answers in seconds):graphlore_pathtakes the most certain path: the fewest edges inferred by name (INFERRED/AMBIGUOUS), then the fewest steps (Dijkstra on that pair of costs). Each such step carriesconfidence,inferred_stepscounts them, andshortestgives the length of a shorter but less certain path when one exists. On a graph with no inferred edge the answer is the breadth-first one it was. It no longer walks a document'sdocumentsedges unless one end is a document: of 150 random pairs of Django functions, 26 had been "joined" only by a page naming both.graphlore_god_nodes(rank="pagerank" | "betweenness"): PageRank over the dependency edges (a utility everything leans on outranks a big module few use: on Django,Model,gettext_lazy,SimpleTestCase,Field,AltersData), and Brandes' betweenness, estimated fromsamples(64) hash-picked sources and saying so, exact withsamples=0(on Django, app loading and connection setup:Apps.populate(),ensure_connection()).rank="degree"stays the default and its answer is unchanged. 2.5 s and 1.3 s on Django.graphlore_impactnames itschokepoints: from the dominator tree of the walked nodes (Cooper, Harvey and Kennedy), the nodes every path to the start runs through for many of the others, with how many eachshields.QuerySet's 2,024 dependents within 3 hops: 354 reach it only throughdjango/db/models/__init__.py, 116 only throughManager. 0.07 s.- New tool
graphlore_bridges(34 tools): the scope's dependency edges as an undirected graph of files, directories or nodes; the bridges (the only link between two parts) and cut points (what one side goes through), each with what it cuts off, by Tarjan's low-link in one pass. Import edges go through the import checks. In thereviewprompt after the layer rules.
- graph.html opens a node's lines on GitHub. A node's panel has an
On GitHub ↗ link (GitLab and Bitbucket alike) to its
start..endlines at the commit the graph was built from (HEAD when the graph names none), in a new tab: GitHub refuses to sit in a frame (X-Frame-Options: deny), and the page keeps making no request of its own. The repository comes from the folder'sgit remote(origin, elseupstream, else the first), read locally; only the host and the repository's path reach the page, never a user name, token or port, and a host it has no link form for gets no link. A Markdown or reST page opens with?plain=1, so its line anchors work. - Documents link to the code they name (native engine 0.5.79, schema 7).
A name of code a document writes — a Markdown code span, a reStructuredText
object role (
:class:,:meth:,:func:…), inline literal or object directive (.. class::,.. autofunction::; a method directive is named under its class, a name under.. currentmodule::is tried in that module first) — is adocumentsedge from the heading it is written under to the one definition the name means: its last segments end the definition's qualified name and the ones before them are a run of its module path. No edge when several definitions answer, for test code, for a module or package path, for a code span of one plain word, or from a bare code span to a variable or field. 12,278 edges on Django, 263 on httpx; a sample of 30 of Django's read right but for one, which the variable rule then removed. Before, a document's only edges were thecontainsbetween its headings.documentsis in the newgraph._DOCUMENT_RELATIONS, part of_NON_DEPENDENCY_RELATIONS: cycles, surprises, layers andgraphlore_unreferenced(same answers on httpx and Django) leave it out, and the engine's community detection skips it, so communities stay where they were.graphlore_impactwalks it: the pages that describe a definition are what a change to it may need to update.- The build reply says
documents: N headings, M links ….
- Sphinx documentation written in
.txtfiles is read. A.txtfile is reStructuredText under aconf.pywhosesource_suffixnames.txt(requirements*.txt,robots.txtaside). Django's graph went from 8 documents to 689, and 14 headings to 6,904. - graph.html: a
documentsrelation group, and document outlines always drawn. The group has its own colour and filter. A document's page and headings are joined bycontains, which is in the structure group that is off by default (it would draw a star around every source file): a community of headings read "42 nodes · 0 links". Containment between two document nodes (flag 8 in the page data,file_type: document) is now drawn whatever the structure filter says. graph.htmlshows what graphlore's tools find, not only the graph.- Findings (
G,#f=): the cyclesgraphlore_cyclesreports (runtime import cycles first), the shared state and surprising links ofgraphlore_surprises, files that change together, and the candidates ofgraphlore_unreferenced. Each row opens its nodes, with the cycle's path drawn, and each node carries badges for the findings it is in. - The server works them out for the active project's graph, from the tools' own JSON, so the page and the tools agree; once per graph.json (path, mtime). A tool that fails costs its finding, never the page.
- A page written for another path than the active project has no findings and says why.
- Impact (
I,#i=): what depends on a node, by hop (1–3), in columns, with test code counted apart, walked asgraphlore_impactwalks by default (the page'simpact:beginblock; a test checks the two on every node). - Details: a node's span, qualified name, language, route method and pattern, and a state node's coupling pairs (hidden ones first); each edge row says when an import runs, the edge's context and the line it is written at.
- On a graphify graph: the calls and imports graphlore resolves from the source are drawn dotted, and vendored or minified files are hidden behind a "vendored files" filter.
- A resource node (an environment variable, a table) is no longer drawn as an external package.
- Django's page grows from 14.3 to 19.3 MB, and its build from 0 to 15 s of analysis.
- Findings (
graph.html, graphlore's own view of the graph. Every build writes it beside graph.json, whichever engine built the graph (no_viz=Trueskips it; graphify is always run with--no-viznow), andcluster_only,graphlore_set_labelsandgraphlore_prunewrite it again. One file that needs no network (the drawing code is graphlore's, on a canvas, and a Content Security Policy forbids every request), made for large codebases: it opens on the communities, one bubble each with the strongest links between them, and goes down to one community or one node's 1- or 2-hop neighbourhood (400 nodes at most, production code first). Search by name or file, a details panel (kind,file:line, id, community, connections by relation and direction, each a link), filters for relation groups, tests and external packages, colouring by community or kind, a back button. Names, labels and paths from the repository are embedded escaped and shown as text only. A graph over 150,000 nodes is not drawn, and the build says so.- A graph viewer of its own, for any graph.json. The page
(
src/graphlore/viewer.html) opens a graph.json the reader picks or drops on it, graphlore's or graphify's, with its.graphify_labels.jsonfor the names, read in the browser: nothing is uploaded and the page still makes no request. Everygraph.htmlhas the "Open graph.json…" button, and the page with no graph in it is a standalone viewer, published to GitHub Pages by.github/workflows/pages.yml(viewer/, andviewer/demo.htmlwith the polyglot fixture). Itscompact()is the JavaScript twin ofviz.page_data; a test runs it under node on graphify's shapes and the native engine's and checks the two agree. - The viewer is easier to read and to use.
- A node's neighbourhood is drawn in columns instead of a star: what uses it on the left, what it uses on the right, the second hop a column further out, production code first and grouped by file under the file's name. It is never fitted too small to read; the columns that do not fit are panned to.
- Labels never overlap one another or a dot: they are placed by importance where they fit, so zooming in shows more.
- The address bar keeps the view (
#n=<id>&h=2,#c=<community>): a link opens it again, and the browser's Back and Forward move between views. - Keys:
/find (↑↓Enterto pick),Escback,Ffit,+/−zoom,1/2depth,?the list. Zoom and fit buttons too. - "Copy for the assistant": a node's panel copies
graphlore_explain,graphlore_fetchandgraphlore_impactcalls, its id andfile:line; a community's copiesgraphlore_skeleton(community=…). - On a phone: touch, pinch to zoom, long press for what a node is, and the panel as a sheet over the foot of the screen.
- Prebuilt
graphlore-enginewheels (.github/workflows/engine-wheels.yml): abi3 wheels for Linux (x86-64 and ARM on glibc, x86-64 on musl), macOS (universal2) and Windows x64, plus an sdist, each wheel installed and run on the polyglot fixture before anything is uploaded. Anengine-vX.Y.Ztag publishes them to PyPI by Trusted Publishing; a pull request touchingengine/builds them without uploading. This is the first step of replacing graphify: the plugin can take the engine only as a prebuilt wheel, never through a Rust toolchain. The release steps are under "Releasing" inCONTRIBUTING.md. - Implicit coupling is worked out by the native engine (engine 0.5.77,
schema_version6,engine/src/coupling.rs). The pairing of the definitions that share state, whichgraph._shared_statedid on every call, runs at build time by the same rules: for state that code in two files or more touches, each writer with each other definition touching it, and the call path that joins the two (calls, dispatch and HTTP, 6 hops) or none. A state node carries its pairs incoupling(pairs,hidden,listedas[writer, other, hops, forward], at most 200, the hidden ones first), and a hidden pair is acouples_withedge from the definition that sees the state to the one that writes it, naming the state invia(at most 10 per state node; the rest stay on the node and are counted in the build reply)._shared_statetakes the engine's answer where a node has one and looks for the path itself otherwise (graphify graphs, older schemas, a pair past the limit), sographlore_surprisesandgraphlore_node_detailssay the same either way.couples_withis no dependency of its own: not a reference forgraphlore_unreferenced, not an edge of a cycle or a surprise, not a step ofgraphlore_impactunlessshared_state=Trueorrelations="state";graphlore_neighborsandgraphlore_subgraphshow it. Community detection leaves it out. On ureq 68 pairs, 57 hidden; on this repository 1,232 and 1,081; on the 31 audit repositories 3,694 and 3,060, with 1,112 edges. Against engine 0.5.76 on those repositories every earlier edge and every community is unchanged, and the polyglot audit on native graphs has no finding new or gone. Co-change stays on graphlore's side: it is read from git, not from the source. - A base's method reaches the methods written for it, in every language
but Go (
dispatches_to,context: override,EXTRACTED; it was written for C / C++ function slots only). A method of a type whose name a method of its base, interface, trait or mixin has — the nearest base that declares it, constructors left out; where the language has overloads, by parameter count, by the types as written when either type has several such methods of the name, and in Swift by the labels, which are part of the name; in Rust the methods under eachimpl Trait for Type, whether or not the type is the project's.x.connect()on a trait object now has a path to eachconnectwritten for the trait: 136 edges on ureq (110 of the methods no call named before), 83 on this repository (all 83), 1,350 on the 31 audit repositories. Community detection leaves these edges out: the type'sinherits/implementsedge already weighs them, and weighing them moves half the nodes to a community of another id for a modularity of 0.586 against 0.585 (docs/native-engine.md). Go is left out: an interface is satisfied by shape and no type says which it implements. benchmarks/inference_gaps.py: the uses the compilers bind that the native graph lacks (every oracle's--jsonrows), sorted by what stands before the name: a closure's parameter, a call's result, an untyped name, an initializer's member, a type a member is reached through, a type, a bare name, an import. Phase 3 ofdocs/rule-sources.mdreads it: a closure parameter typed by its call is at most 1.3% of the uses, so that inference is not built.- The TypeScript compiler as the judge of the native engine's edges
(
benchmarks/oracle_typescript.py). The compiler's own test suite keeps, for 7,242 programs, a file the compiler wrote: every name of the program and the declaration it is bound to. The script builds the native graph of each program and compares: of the edges whose site the compiler has an answer for, 98.9% went where it says with engine 0.5.51 and 99.1% with 0.5.52; what was wrong is the list under Fixed. No rule in it was written from memory of the language. - The Scala compiler as a second judge (
benchmarks/oracle_scala.py): the Scala 3 compiler's SemanticDB expect files carry, after every name of 73 programs, the symbol the compiler bound it to. No Scala compiler runs here, so this is the first check of the Scala rules by Scala itself: 73.3% of the edges it has an answer for were right with engine 0.5.52, 96.7% with 0.5.53. - The Kotlin and Swift compilers as judges
(
benchmarks/oracle_kotlin.py,benchmarks/oracle_swift.py). Kotlin's Analysis API tests state, for every element of 186 programs, the symbol the compiler resolved it to; Swift's index tests state it for the lines their authors chose (16 programs with an answer). Neither compiler runs here. Of the edges each has an answer for, 99.7% (Kotlin, 612 edges) and 92.7% (Swift, 55) were right with engine 0.5.54: the resolver's rules for both held. What the lists showed was what the reader never read, below. - The Go type checker and rust-analyzer as judges, on whole repositories
(
benchmarks/oracle_go.py,benchmarks/oracle_rust.py). Not a test suite this time:go/typesandrust-analyzer lsifresolve every name of a real repository, and the scripts compare the native graph of the same repository with them. On cobra, chi, resty and gin-examples the type checker has an answer for 11,961 edges; 99.7% went where it says with engine 0.5.55 and all but 4 with 0.5.56. On ureq, ripgrep, axum-realworld and actix-realworld rust-analyzer has one for 11,924; 97.5% before, 98.5% now. benchmarks/positions.py: the places a type can be written, per grammar, and whether the reader reads them (phase 1 of that plan). It parses a corpus with each tree-sitter grammar, names every place a name of the repository's own types is written by the node that holds it, and asks the engine (file_facts) whether a use was read there. On the audit's repositories: 49,097 names in 13 languages, 88.9% read, and 55 places read less than nine times in ten, listed with an example each (benchmarks/results-positions.jsonis the baseline). Nothing is fixed by this change: it is the list.- Language versions, phase 0 of that plan (engine 0.5.61; no edge
changes):
- The native graph's header has
graph.language_versions: the version each file's project states, per language (engine/src/versions.rsreadsgo.mod,Cargo.toml,.csproj,Directory.Build.props,pyproject.toml,package.json,pom.xml, Gradle builds and version catalogs,Package.swift,build.sbt,composer.json, Gemfiles and gemspecs,CMakeLists.txt). No rule depends on it yet. benchmarks/versions.pyreads each compiler's own table of versions and features intobenchmarks/versions/<language>.json(C#, Java, Kotlin, Swift, Rust, Go, C/C++, Scala), with the places its name resolver asks for the version.benchmarks/verify_cases.py --min-versionasks each compiler for the oldest version that accepts each case of the checklist (benchmarks/results-case-versions.json); a case can statesince/untiland is then compiled in that version. Scala's cases are compiled too: 510 of 510 are accepted by their languages.- A case of
benchmarks/conformance.pyrecords how it was found and can cite where the rule was read (source);docs/resolution-rules.mdshows the versions and the counts.
- The native graph's header has
- The plan for reading the rules out of the languages' own tools
(
docs/rule-sources.md), andbenchmarks/rule_sources.py, which fetches what it names: per language the compiler's or interpreter's name binder, its member and overload lookup, its table of language versions and their features, and the specification, as sparse checkouts of 17 repositories (300 MB, under a minute) with the commits recorded. The plan covers language versions (the engine reads none today), asourceandsince/untilon each case of the checklist, languages with no open compiler, and the phases: positions from the grammars, binding rules from the binders, inference by the numbers. - graphify's edges are checked before they count, and the confirmed ones
are a floor (
benchmarks/verify_graphify.py). The comparison with graphify took each of its edges as a fact. For Go, Rust and C# repositories the compiler is now asked about each one first (confirmed, refuted, one implementation of a trait's method, no answer), and the share the native graph has is given per kind. On twelve repositories the native graph has 82% of graphify's Rust calls and 99% of the ones rust-analyzer confirms; 481 of graphify's are refuted.--baseline benchmarks/results-verify-graphify.jsonexits 1 when a build lacks more of the confirmed edges, per repository and kind, than the baseline: 45 of 14,400 with engine 0.5.60, 115 with 0.5.59, 346 with 0.5.58.compare_engines.compare_edges(..., pairs=True)returns every pair only graphify has;oracle_go.pyandoracle_csharp.pyexpose their bindings (uses_of,setup), and Roslyn also says which constructor anewchose. - Roslyn as the judge of the C# edges (
benchmarks/oracle_csharp.py): the C# compiler's semantic model, on one compilation of every source of a repository. On todoapi, RestSharp, commandline and aspnetcore-realworld it has an answer for 10,251 edges, and 96.2% go where it says with engine 0.5.57. The two clusters left are named indocs/native-engine.md: a type and its generic namesake (RestResponse,RestResponse<T>), and an extension overload chosen over an instance method. benchmarks/verify_cases.pychecks Kotlin, Swift and C# too (kotlinc, swiftc,dotnet build): every case of the checklist but Scala's has now been compiled by its own language, and all are accepted.benchmarks/verify_cases.pygives each case of the rule checklist to the language's own compiler or interpreter (10 of the 14 languages have one here): a case the language rejects says nothing about the rule.- The name-resolution rules of each language as a list
(
docs/resolution-rules.md,benchmarks/conformance.py): 406 rules in 14 languages, each a small project with the edge the rule says is there and the edge that must not be. The first 185 are scopes and shadowing, imports, member lookup through bases, mix-ins and extensions, and overloads by arity; the other 221 are the places a type is written outside a declaration (a cast, a pattern, a loop variable, an alias, a wrapper, a declared result) and what each language has of its own. Engine 0.5.45 followed 356 of them; 0.5.46 follows all 406 (see Fixed), and the list has 414 with the rules 0.5.47 found on repositories.--baseline benchmarks/results-conformance.jsonsays what a change fixed and exits 1 on what it broke. - A built-in code search index, so
graphlore_locateand the duplication scan's similarity tier work without the[semble]extra (search.py). Chunks are the span engine's definitions (a class holds only its own lines), so every hit joins to its graph node exactly; module code between definitions becomes low-weight chunks, and files the span engine cannot read are cut into windows and counted. Ranking is identifier-aware BM25F over the definition's name, its path and its body (getUserName,get_user_nameand their parts share terms), an overlay from the graph (a node's docstring and the names of its callers and callees), an exact-name boost for symbol queries, and a prior that ranks test code, examples and type stubs below the implementation and spreads a ranking over files. The index is built once per project and refreshed per call by file (mtime, size); hidden, dependency, vendored, minified, oversized and binary files are skipped and counted, and a cap says what it left out. - An optional dense tier for it, the
[embed]extra (model2vec, numpy): static code embeddings (minishlab/potion-code-16M-v2, orGRAPHLORE_EMBED_MODEL) fused with BM25 by weighted reciprocal rank. Vectors are cached by text hash underGRAPHLORE_CACHE_DIR(default~/.cache/graphlore, never in the project), so an edit re-embeds only the definitions it changed. Without the extra, or offline with no cached model, the index answers with BM25 and the reply says why. The plugin installs it. backendingraphlore_locateandgraphlore_duplication_scanreplies: which backend answered (builtin/semble/custom) and, for the built-in index,mode(hybrid/bm25), its tiers, what it indexed and skipped, anddense_unavailable. The text reply ends with aSearch:line.score_kindingraphlore_duplication_scan, and a default floor per backend: 0.7 on embedding scores (semble, built-in hybrid), 0.5 on the built-in BM25-only index's tf-idf cosine. On the built-in index each seed is anchored on its own definition's chunk instead of a search for its first lines.benchmarks/search.py: the built-in index (BM25 and hybrid) against semble on the query set semble publishes for its own benchmark, scored the way semble scores it (NDCG@10, recall@10, cold index time, warm query p50), plus the calibration behind the duplication floors. On that set (1,251 queries, 63 repositories, 19 languages) the built-in index scores NDCG@10 0.814 with BM25 alone and 0.809 hybrid, against semble's 0.852; on the 44 repositories not used to choose its constants, 0.799 and 0.797 against 0.842. The dense tier helps semantic queries and some languages and costs others, so on this set it does not raise the mean. Results indocs/benchmark.mdandbenchmarks/results-search.json.- A kernel seam for an accelerator: the tokenizer and the BM25F loop sit behind
_Kernel, agraphlore_accelmodule withKERNEL_ABI == 1replaces the Python reference when installed (GRAPHLORE_SEARCH_KERNEL=pythonforces the reference), andtests/fixtures/search_golden.jsonholds the terms and bit-exact scores it must reproduce. - What the native engine leaves without an edge, by reason.
python -m graphlore_engine build ROOT --unresolved PATH(engine 0.5.15) also writes every call that got no edge although its name is the one callable of that name in the project, with the reason the walk stopped (untyped local or parameter,closure parameter outside any definition,type: no such member, …); graph.json is the same with or without it.benchmarks/unresolved.pycounts them by reason and language for one repository or a directory of them, leaves vendored and minified files out, prints samples and compares with an earlier run. On the 31 audit repositories: 6,796 calls, more than a third of them in the file-level callbacks of JavaScript, TypeScript and Ruby test DSLs (native-engine.md). - Files that change together. graphlore reads the project's git history
(one local
git log: the last 1000 commits that are not merges, renames followed, commits of more than 30 files skipped) and measures, per pair of files, code-maat's degree of change coupling; cached onHEAD, for graphify and native graphs alike, nothing written tograph.json.graphlore_surpriseslists inco_changethe source files that change together with no edge of the graph between them (tests left out), andgraphlore_node_detailsthe files a node's file changes with most and whether the graph joins them (linked). Both say how much history was read (history), and a shallow clone or a history under 10 commits is named rather than shown as an empty list. On nine audit repositories deepened to their last 1000 commits, 239 such pairs, read by hand all real: a websocket client and its server, Rails routes and models withschema.rb, parallel implementations kept in step;git logtook at most 230 ms. - Shared state, pair by pair. Each
shared_staterow ofgraphlore_surpriseslists itspairs(a writer and another definition touching the state), whether a call path joins them (call_path, either way, over calls, dispatch and HTTP, within 6 hops) and whether their files change together (co_change). The score counts hidden pairs (no call path) instead of files that import neither the other, and a hidden pair whose files change together raises it again; a row whose pairs are all joined by calls says so (every pair is joined by a call path as well). - Routes and HTTP requests in the native engine (graph schema 5, engine
0.5.0), in Python, JS/TS, Java, Kotlin, C#, Go, Rust, Ruby and PHP: every
route is a
type: routenode with itsmethod, its fullpatternand a normalizedkey(GET /api/v1/users/{}), joined to its handler by ahandlesedge. The full path is composed across files, whichgraphlore_routescannot do: FastAPIAPIRouter(prefix=…)andinclude_router(…, prefix=settings.API_V1_STR)(a constant's value is read), Flask blueprints, Expressapp.use('/api', router)andapp.use('/x', require('./x')), Fastifyregister(…, { prefix }), NestJSsetGlobalPrefix; within a file, Spring and JAX-RS class prefixes, Ktor's nestedroute("p") { … }and ASP.NET[Route]controllers andMapGroupgroups (kept per method, so twovar group = …do not mix), chiRoutelambdas, actix scopes, the Railsroutes.drawDSL (resources,namespace,scope) and Laravelprefix()->group(); across files, gin / echo groups (v1 := router.Group("/v1")) and the router passed to a function (addUserRoutes(v1)), axum.nest("/api", users::router())/.merge(…)and actix.configure(routes), and Laravel's route-file prefix (Route::prefix('api')->group(base_path('routes/api.php')), Laravel 11'swithRouting(api: …)). A Rails"articles#index"or Laravel[UserController::class, 'store']handler is the controller's method (a singularresource :userisUsersController's). A handler written as a lambda that makes one call (post { users.register(ctx) },(req, res) => ctrl.show(req, res)) is the method it calls. A prefix whose value is unknown is written as a parameter (/{API_PREFIX}/users) and the node saysprefix_unresolved. Requests the code makes (fetch,axiosand clients made byaxios.create({ baseURL }), generated SDKs such asclient.get({ url: '/api/v1/items/' }), jQuery, AngularHttpClient,EventSource,requests,httpx,aiohttp, Feign@RequestLine, the mappings of a@FeignClient/@HttpExchange/@RegisterRestClientinterface and Retrofit's@GET(requests, not routes, unlikegraphlore_routes),RestTemplate,WebClient/RestClient, MockMvc, RestAssured, the Ktor client, C#HttpClientwith a relative URL such as$"todos/{id}", Gohttp.Get/http.NewRequest, reqwest / ureq, HTTParty / Faraday, Guzzle and LaravelHttp::, and in tests rack-test and Laravel's$this->getJson(…)) are linked to the route they reach byhttp_calls:EXTRACTEDwhen the method is known and every segment matches (a parameter or a template hole against a parameter),INFERREDfor a value against a parameter, an unknown method or base, or several candidates. A path several routes take goes to the nearest. Only production code is linked: requests in tests are counted (report.http.test_calls), as are those to another host and those whose URL the source does not spell out.graphlore_impactfollows both relations, so a handler's dependents reach the client code that requests it, andrelations="http"names them. In fastapi-template all 23 requests of the generated SDK reach their 23 handlers, in kotlin-spring-realworld the 6 Feign requests theirs, and in todoapi 7 of the 9HttpClientrequests (the other two go to routesMapIdentityApiadds at run time), and in gin-examples a browserEventSource('/stream/' + id)the Go handler ofGET /stream/:roomid. Across the 31 audit repositories, 2375 ofgraphlore_routes' 2376 rows are routes of the native graph (69 with a longer path; 60 with a closure kept in a variable for a handler, which the native graph names by the function around it). Builds take 7% longer (median of ten repositories against engine 0.4.0). - On a native graph (schema 5),
graphlore_routeslists the graph's route nodes (source: "graph"): the full path, the handler, andcalled_by/callers, the code whose requests reach the route; on a graphify graph it reads the source as before (source: "source").graphlore_node_detailshas anhttpsection: the routes a handler serves and who requests them, the routes a client definition requests, or a route's handlers and callers. - Shared state in the native engine: variables, constants and class-level
fields are nodes in all 14 languages (
kind: variable | constant | property), and the definitions that read or write them are linked byreads/writesedges: assignments,+=,x[k] = v,del,++, and a mutating method (append,set,clear, …) on a collection or a builder,INFERREDsince only its name says so. Locals, parameters and Python names assigned withoutglobalare left out; a constructor setting its own object's fields builds it and couples nothing. Two definitions touching one such node affect each other without either calling the other. Member reads of a property or constant that werereferencesarereadsnow. Fields of instances count too (self.x,this.x,@x, declared fields), and so do resources, by a literal key: environment variables (os.getenv,process.env.X,ENV[...], …), files (open(p, "w"),fs.writeFileSync, …), tables named in SQL strings or reached through an ORM model (User.objects.filter,Post.create,db.Items.Add; the model's table from__tablename__,Meta.db_table,@Table,$table,DbSet<T>, …), events a project both emits and listens for, and cache keys (localStorage, Redis-like stores). A resource is atype: resourcenode only when two definitions touch it. On the 31 audit repositories this adds 16% edges; builds take 15% longer (median). Schema 4, engine 0.4.0. graphlore_impact(shared_state=True)walks shared state: the dependents of a writer include the code that reads what it writes, the dependencies of a reader the code that writes what it reads (awritten_bystep). By default reads and writes are not walked and are counted instate_nodes_skipped;relations="state"names them.graphlore_surpriseslists shared state (shared_state): variables, fields and resources written in one file and read or written in another, scored by whether the files import each other, their top-level directories and their communities.graphlore_node_detailssays what a definition reads and writes, and which other definitions share that state with it, and how.- A native extraction engine,
engine/(experimental, opt-in): graphlore's own extractor, written in Rust and built with maturin + PyO3 into a separate package,graphlore-engine, with tree-sitter grammars for Python, JavaScript, TypeScript, TSX, Go, Java, Kotlin, Scala, C#, Rust, Swift, C, C++, Ruby and PHP compiled in — nothing is downloaded and nothing reaches the network. It writes a graphify-compatiblegraph.jsonwith a node per file, per definition and per Markdown / reStructuredText heading, and thecontains/method/case_ofedges between them. Each definition node carries its real span (region_start,end_line,source_locationasL13-L15),kind,qualnameandlanguage; Rust#[cfg(test)]and#[test]items are markedtest. Ids and labels follow graphify's scheme (25 of the 26 code definitions in the polyglot fixture get the same id and parent from both engines). The definition rule is a port ofspans.py's: on ~95,000 definitions in real Go, JS, TS, Rust, Ruby, Java, C#, PHP, Kotlin, Swift, Scala and C/C++ files it returns the same spans asspans.py, apart from 2.5% of C/C++ headers where the grammar versions differ, and on 30,000 Python definitions the same spans as the stdlibast. Per language, a module overrides only what its grammar does differently. No communities yet; every native build says so. - Imports, calls, bases and type references in the native engine, in all
14 languages. The engine reads import statements, calls and constructions,
base lists, types in signatures, fields, variables and type arguments,
decorators and attribute reads, and resolves them the way each language
does: module paths per language (Python's root rules, JS/TS relative paths
with
tsconfig.jsonpaths and workspace packages,go.mod, JVM / C# / PHP packages and namespaces, Cargo crates and the module tree, Rubyrequire_relative, SwiftPM targets, C/C++ includes), names through the enclosing scopes, the file, its imports and re-exports, its package or namespace, and receivers through typed parameters, fields, assigned constructions and declared return types (builder chains included). What that finds isEXTRACTED; a unique name across the project, with import evidence for a method, isINFERRED; anything else gets no edge and is counted in the build reply. Import edges carryruns(module-level, deferred, type-checking); external modules and bases aretype: externalnodes with anecosystem. Properties (C#, Swift, Kotlin, TS/JS class fields) and module-level constants are nodes. graph.json schema 2. Compared with graphify on the 31 audit repositories, the native graph has 77% of graphify's call edges, 75% of its file-level imports, 96% of its bases and 85% of its type references, while 15% of its calls are inferred against 47% of graphify's; most of the rest is graphify's name guesses and artefacts (docs/native-engine.mdhas the per-language table and samples). Builds stay 3–6 times faster than graphify's. - Communities in the native engine (
engine/src/community/): Leiden on the internal nodes, with edges weighted by what they say (containment and calls 1.0, bases 1.5, imports 0.7 / 0.4, type references 0.5), by confidence (INFERRED× 0.5) and by where their ends live (same directory × 1.25, other top-level directory × 0.6, test to production × 0.1), plus a weak tie between the files of a directory; external nodes join their neighbours' community. Then graphify's rules (isolated nodes alone, oversized and sparse communities split, ids by size) and names after the most connected member, prefixed with the directory most members share. Nodes are visited in the order of a hash of their id and a build starts from the previous graph's communities and settles, so after a one-file change 99.8–100% of nodes keep their community; ids are kept by overlap, and a name saved for a community stays while its members mostly do (stale ones are dropped from.graphify_labels.json, and the build says how many). On the 31 audit repositories there are as many communities as graphify finds (90.5 against 90.6 per repository), with 87% of a community's members in one directory (graphify: 83%) and 8% of test nodes in a production community (21%). graph.json schema 3:community/community_nameon every node andgraph.communitiesin the header.python -m graphlore_engine cluster GRAPHdetects them again. - Incremental native updates: every native build writes a facts cache
(
graphify-out/cache/graphlore-native.bin), andgraphlore_build(update=True)reuses the facts of the files whose size and modification time, or content, are unchanged, and parses the rest; resolution and communities run over the whole project, so an update writes the graph a full build writes. retrofit: 2.6 s for a full build, 1.0 s for an update after one file changed. The build reply says how many files were parsed and reused;verbose=Trueadds the time per phase. benchmarks/compare_engines.py --communitiescompares the two engines' communities: count, sizes, modularity, directory purity, test mixing and their agreement (NMI).graphlore_buildon a native graph trusts its edges:ImportCheckertakes an edge'srunsas when the import runs and rejects nothing, and the calls and importsresolve.pyadds to graphify's graphs are not added to a native schema-2 graph (graph._engine_resolved).benchmarks/compare_engines.pycompares edges (imports as file pairs; calls, bases and type references over the definitions both engines have), andbenchmarks/polyglot.py --engine nativeruns the whole audit on native graphs (built intographlore-native/). On the 31 repositories it raises no high finding (7 on graphify's graphs) and noFETCH-NO-SPAN(94), and every tool but the community ones answers as on graphify's graphs.GRAPHLORE_ENGINEpicks the extractorgraphlore_builduses:graphify(the default, unchanged),native(an error naming the install command when the engine is missing;modeandcluster_onlyrefused;updaterebuilds the whole graph) orauto(native when installed, graphify for what native cannot do and for updates of a graph graphify built). The native build runs in a child process bounded byGRAPHLORE_TIMEOUT, and recordsbuilt_at_commitfor freshness. With the native engine chosen, a file whose Python tree-sitter grammar is missing (no[treesitter]extra, or offline) gets its spans from the engine's compiled-in grammars.benchmarks/compare_engines.py: the native graph of a repository against graphify's, per language — exact, near and same-file matches, what only one engine has, and whether matched definitions share a parent and relation.
Changed
- The tree-sitter span walk is 3–5× faster, with the same spans. It caches
the per-type definition check, looks fields up by id (skipping fields the
grammar does not have), does not descend into leaves, and tries a bound
anonymous function only on a node with a
valueorleftfield. On abseil-cpp the walk went from 4.6 s to 1.0 s, and on guava from 14.7 s to 4.4 s. Parsing is unchanged. The spans are identical on all 5,511 files of the polyglot clones plus abseil-cpp and guava. GRAPHLORE_SEMANTIC_BACKENDunset (orauto) means semble when it is installed and builds its index, else the built-in index; when semble is installed but fails, the reply'sbackend.notesays so.builtinandsemblepin one; a custom spec that fails is still an error.graphlore_locatestays on theleansurface andGRAPHLORE_TOOLSET=locateno longer falls back toleanin a default install; both now happen only whenGRAPHLORE_SEMANTIC_BACKENDnames a backend that is not available.- The Hugging Face offline flags are set by
config.export_offline_env(), shared by semble and the built-in dense tier. - Three replies that could run past 90 KB are cut, and say what they left
out (the polyglot audit's
REPLY-TOO-LARGEon native graphs, five to none).graphlore_neighborstakeslimit(200): past it the result carriestotal,truncatedandcountsby relation and direction (retrofit'sCall, 752 neighbors: 99 KB to 25 KB as JSON).graphlore_fetchreturns one definition whole up to 8,000 tokens orbudget_tokens, whichever is larger; a longer one is cut at a line withcut(lines_shown,lines_total,tokens_total),lines_left_outand a hint naminggraphlore_skeletonand the budget that returns all of it (guzzle's 3,100-lineCurlFactory: 124 KB to 29 KB).graphlore_same_nameslists the first 25 definitions of a name and counts them all indefinitions_total(cpr's 647 definitions namedTEST: 134 KB to 6 KB). - With the native engine,
graphlore_build(cluster_only=True)detects the communities of the graph on disk again (it was refused), andupdate=Trueis incremental (it rebuilt everything); underGRAPHLORE_ENGINE=autoboth still go to graphify when the graph on disk is graphify's. - On a native graph built before the engine detected communities,
graphlore_communitiessays so and namesgraphlore_build(cluster_only=True). graphlore_fetchreturns the lines a native property or constant node carries (region_start..end_line) when the span engine has no span for it and the file is unchanged since the build, instead of a line window.- A call of an overloaded name that the arguments do not decide is an
INFERREDedge to each overload that fits (native engine 0.5.5; Java, Kotlin, Scala, C#, Swift, C++), where it was anEXTRACTEDedge to the first.baseUrl(server.url("/"))may bebaseUrl(String),baseUrl(URL)orbaseUrl(HttpUrl): all three are callers' targets now, sographlore_impacton any of them lists the call, andstrict=True(only extracted edges) leaves it out. 999 calls of the 31 audit repositories changed this way; the share ofINFERREDcalls goes from 20% to 29%.
Fixed
-
Macros that made up definitions, a gtest test's name and a C++ class before its constructor (
spans.pyand the native engine 0.5.76). A C++TEST(Suite, Name) { … }/TEST_F(Fixture, Name) { … }(a function with no return type, named in capitals, given two bare names) isSuite.Name, not a function calledTEST810 times over; aTEST_Ftest is a method of its fixture, so the fixture's fields type what it calls (leveldb: 333 more calls, 104 reads). C and C++ sources are parsed with a macro alone on an indented line before a call blanked (Unity'sEXPECT_ABORT_BEGIN/TEST_ASSERT(0);): the parser read the pair as a declaration and lost the functions after it (118 made-up definitions in one cJSON test file, none now). A TypeScriptconstor variable directly in anamespaceis a definition, as a module's is. In a member ofStatus,Status::OK()names the class before::, not the constructor of its name the member lookup found first ([class.qual]; conformance casecpp/class-before-its-constructor). -
Definitions graphify finds that the span rule missed, checked against the source (
spans.pyand the native engine 0.5.75, the same rule). Of the 2,020 definitions only graphify had on the 45 audit repositories, 1,619 are none (PHP closures, Rustimpland Swiftextensionblocks of a type defined elsewhere, names bound to an import, forward declarations); of the rest, these were missing and are now read: a C#delegate, a conversion or arithmeticoperator(operator string,operator+) and an indexer (this[]); a Rustmacro_rules!macro, namedname!so that it never answers a lookup of the functionname; a Swiftsubscript(itsnamefield is its result type, so a keyword-named definition now takes its keyword first) and every name of acase a, b, cline, not only the first; a Ctypedef void (Cb)(int);, whose name is in parentheses (alsoTEST_SETUP(Group) {, namedGroup). C and C++ sources are parsed with a capitals-only macro after a declarator or a parameter list blanked (int count GUARDED_BY(mu);,void f() REQUIRES(mu);, on its line or the next): the parser took the macro for the declarator, which lost the field and made up a methodGUARDED_BY(leveldb: 41 fields, their reads and writes, and calls ofMutex::Locknow going to the class that defines it). -
Native engine 0.5.74: Scala's rules, read from the Scala 3 typer (phase 2 of
docs/rule-sources.md, which every language of the plan has now been through; 292 rules inbenchmarks/rule_inventory.py, 245 held by a case): a wildcard import beats a member of the package another compilation unit defines, andexport p.mmakes m a member of the object that writes it. -
Native engine 0.5.73: Python's, PHP's and Ruby's rules, read from their references (phase 2 of
docs/rule-sources.md; 19 cases): Pythonglobal/nonlocalmake an assignment bind the outer name, and PEP 695 type parameters hide a class of their name; Ruby looks members up in the class, its modules from the last included, then the superclass, a local only exists from its first assignment, and a constant is looked up lexically before the ancestors; a PHP trait's methods come before the parent's, a class name does not fall back to the global namespace, and\Nameis the global one (128 of guzzle's\InvalidArgumentExceptionreferences no longer name its own class of that name).benchmarks/rule_inventory.pycovers Python (15 rules, 14 held), PHP (12, 10) and Ruby (10, 9). -
Native engine 0.5.71: Swift's, C's and C++'s rules, read from their compilers (phase 2 of
docs/rule-sources.md; 19 cases): overloads are of one scope (a local function's are its own;::fandns::fare not overloads of each other); a C struct tag is its own name space and a C++ function hides the class of its name;::f()is the global one; an inline namespace's members are the enclosing namespace's;a + bcalls a C++ memberoperator+; an integer literal prefers anintparameter and a string literal aconst char*; a non-template (C++) or non-generic (Swift) overload wins a tie when every argument is a literal;p + 1in C and C++ is of unknown kind.benchmarks/rule_inventory.pycovers Swift (16 rules, 13 held) and C / C++ (21 rules, 17 held). -
Native engine 0.5.69: Kotlin's rules, read from the Kotlin specification (phase 2 of
docs/rule-sources.md; 13 cases):a + b,a[i]anda foo bcall the operator or infix function of a's type;super<A>.f()is A's member; extensions are chosen in the specification's order (local, imported by name, same package, star-imported).benchmarks/rule_inventory.pycovers Kotlin (24 rules, 20 held). -
Native engine 0.5.68: Java's rules, read from the JLS and javac (phase 2 of
docs/rule-sources.md; 14 cases):Outer.this.m()is the outer class's method; a field an interface declares is a constant of it (read in implementing classes); a number literal picks a primitive overload before a boxed one, and an integer literal the narrowest primitive.benchmarks/rule_inventory.pycovers Java (30 rules, 26 held). -
Native engine 0.5.67: TypeScript's rules, read from the compiler's name resolver (phase 2 of
docs/rule-sources.md; 10 cases): where a type is written, a value of the name does not hide the type (const Repo = 1besideinterface Repo);typeof xkeeps its value meaning; interfaces of one name merge.benchmarks/rule_inventory.pycovers TypeScript and JavaScript (31 rules, 26 held), andverify_cases.pycompiles a case that writes its owntsconfig.jsonwithtsc -p. -
Native engine 0.5.66: Go's rules, read from the Go specification and go/types (phase 2 of
docs/rule-sources.md; 15 cases): a selector is the field or method at the shallowest depth of embedding, and each clause of aswitch/selectis a block of its own.benchmarks/rule_inventory.pycovers Go (29 rules, 23 held). -
Native engine 0.5.65: Rust's rules, read from the Rust Reference and rustc (phase 2 of
docs/rule-sources.md; 15 cases citing the Reference's rule identifiers):- a
matcharm's binding is a name of that arm only; Selfin a struct's own fields is the struct;- a module and a function of one name are told apart (
log::write(),log()); - a
usewritten in a block holds in the block and shadows the module's; - a glob import's names are kept for resolution, and an item of the module shadows them;
use m::f;in an inline module starts at that module'sm(2018), and an inline module's items are no names outside it;- a name in
#[derive(…)]is no value read.
- a
-
benchmarks/rule_inventory.pycovers Rust (38 rules, 31 held). -
Native engine 0.5.64: C#'s binding rules, read from the C# standard and Roslyn's binder (phase 2 of
docs/rule-sources.md). 18 cases written from the reading, each citing the section and the binder function:- an overload is chosen by a parameter written as a predefined type
(
Write(string)overWrite(object)forWrite("x")), where every overload was anINFERREDedge before; - a
params/varargcandidate that needs its expanded form ranks below one that does not (C#, Java, Kotlin); - of extensions in sight, those of the closest namespace around the use;
- a type of another namespace block of the same file is not in sight.
- an overload is chosen by a parameter written as a predefined type
(
-
benchmarks/rule_inventory.py: every rule a language's specification and binder state, with the case that holds it or why the engine does not follow it (C# first: 54 rules, 47 held). -
Native engine 0.5.63: places a value is written that were not recorded, listed by
benchmarks/positions.py --values(541 cases in the checklist, all hold). 97.7% of 162,839 names of the audit repositories' own values are read now:- Python, JavaScript, TypeScript, Rust: a member read or written through a
local or a parameter (
ctx.headers,request._noPipe = true). The state reader dropped any use whose head the file neither declares nor imports, a local included. About 1,900reads, 1,100referencesand 220writesmore on the audit repositories; many areINFERRED. - Swift
.casebeside a value whose type gives it (h.section == .header, an assignment,case .body:) is a reference to that type's case. - A Rust macro's arguments are read for member reads and writes as well as
calls (
assert_eq!(false, args.crlf)). opt[URI]("x")(Scala) andparse::<T>()(Rust) are calls.- A local assigned a bare name holds what the name does (
const request = first;); a member set in a C# initializer (new Article { Author = author }) declares no local.
- Python, JavaScript, TypeScript, Rust: a member read or written through a
local or a parameter (
-
benchmarks/positions.py --values: the places a name of the project's own functions and values is written, with the share the engine records (benchmarks/results-positions-values.json); the type measure leaves out documentation,distand minified files now. -
Native engine 0.5.62: places a type is written that were never read, listed from the grammars by
benchmarks/positions.py(536 cases in the checklist, all hold). The share of the repositories' own type names the reader records went from 88.9% to 99.6%; 4,300 reference edges and 950 calls more on the 45 audit repositories, with the compilers' agreement unchanged (Go 12,273 of 12,278).- Every language: a closure's own parameters and result.
- Go: what a defined type is defined as (
type Key Opt), a constant's type, the types of a slice or map literal, the type handed tomake; a package'sconst/varis the source of its own uses. - C, C++: the type of a declaration and what a
typedefnames. - Java:
throws,T.class, the types of a for-each variable, a varargs parameter and an interface's constant. - Swift:
throws(E), a protocol property's type,(any P).self;Box<T>(…)is a construction ofBox. - C#
new T[n]; Scala aval's declared type,new Outer.Inner(…)andnew p.T[A](…); Rust the struct a pattern takes apart. - C++:
T{…}is a construction ofT; the result type of a member function declared in its class, explicit template arguments of a call, a trailing result type and afriendare references. - TypeScript: a function type's parameters name their types; their names
were read as types (
(err: Err) => voidgave a reference to a valueerr).
-
Native engine 0.5.60: the rest of graphify's confirmed edges, in Rust and Go (510 cases in the checklist, all hold). Of the 115 confirmed edges the native graph lacked 45 are left, none in Go:
- Rust: the types of a tuple struct's and a tuple variant's fields
(
struct Override(Gitignore);,Loaded(Ignore)) are references; they were never read. - Rust: a
const/staticitem is the source of its own uses, its type and what its value names (they left from the file). - Rust:
crate::starts at the file a manifest names ([[bin]] path = "crates/core/main.rs"). A crate with nosrcdirectory resolved none of itscrate::…paths: 88 imports and 57 calls on ripgrep. - Rust: an
implis of the type its own file names. Where two modules of a crate each declare a private type of one name, a member of one was taken from the other'simpl(Config::default()instandard.rslinked tojson.rs,EXTRACTED). - Rust:
io::Error::error_message(m)is the method a trait of the project gives the library's type, and the types a trait is written with in animpl(impl From<Config> for Agent) are the implementing type's references. - Go: every result of a function names its type (
([]Completion, ShellCompDirective): only the first was read), and a method value handed to a call (time.AfterFunc(d, cb.onTimeout),r.Use(middleware.Logger)) is anindirect_call, as a bare function handed over already was (it was areferencesedge).
- Rust: the types of a tuple struct's and a tuple variant's fields
(
-
compare_engines.pygives the same numbers on every run. Of two native definitions with one name in a file, which one stood for both depended on the order of a set: the C/C++ header references of cpr came out as 88% or 91%. A C# partial type is compared as one type. -
Native engine 0.5.59: the confirmed edges of graphify's the native graph lacked (502 cases in the checklist, all hold). All C#, from
verify_graphify.py; 260 confirmed calls were missing, 28 are:- What a property's accessor calls is the property's call. The uses in
get { … },set => …and=> exprleft from the class around; they leave from the property now (Def::computed), as a method's do from the method. - A namespace written as a block sees the extensions of the namespaces
around it (
namespace N.Tests.Unit { … }and an extension class inN.Tests), as one written for the whole file did. - A brace an
#ifopens and a later#ifcloses (#if NET/if (…) {/#endif) no longer hides the members after it. The parser paired the brace inside the group and lost the rest of the class: every call ofRestClient.Dispose()had no target. The directive lines of such a group are blanked before parsing (parse::blank_expression_branches, andspans._blank_expression_branchesfor the span engine). - A local assigned a member read is what the member holds (
var sut = Parser.Default;): read in Go and Rust since 0.5.56, never in C#. new T { … }with no argument list calls the constructor that takes none, and a partial type's constructors are those of every file that declares it.using RestSharp.Serializers;beside a propertyRestClient.Serializersis the namespace again (the misparsed class had made the property a top-level name).
- What a property's accessor calls is the property's call. The uses in
-
Native engine 0.5.58: the gaps the compilers had left open (496 cases in the checklist, all hold):
- C#: a type is told from its generic namesake by the type arguments
written (
RefFact::arity):RestResponsebesideRestResponse<T>each get their own references and constructions, andList<string>is never a project classListthat takes none. A call written with more type arguments than any method of the type takes is the extension's (parser.ParseArguments<A, B>(args)). The type a local is declared with andtypeof(T)are references. With Roslyn as the judge, 98.1% of 10,344 edges go where it says (96.2% with 0.5.57). - Kotlin: a constructor parameter written
val/varis a property of the class, a node like any other: reads and writes of it had no edge at all (586readsand 551definesgained on the audit's Kotlin sources). The name of an argument given by name reads nothing. - Swift:
Self()constructs the type around. - A name read where a type is built (
new Foo { … }) or inside ageneric_nameis no value: C# properties named like their type (HttpClient HttpClient) were read by everynew HttpClient().
- C#: a type is told from its generic namesake by the type arguments
written (
-
The comparison with graphify is measured again on engine 0.5.58 (
docs/native-engine.md): the shares of graphify's edges the native graph has are what they were (calls 85% and 90% on the two sets), with 16,288 and 20,030 type references where 0.5.50 had 14,114 and 15,974. -
Native engine 0.5.57: a type named as a value through something is a reference only when that something is what declares it (or a module): C#
Maybe.Nothing<T>()beside a classNothing<T>was a reference to the class, 55 times in commandline. The name of a generic member or callee (generic_name) is no value read. -
Native engine 0.5.56: what the Go type checker and rust-analyzer showed on whole repositories (489 cases in the checklist, all hold):
- Every declaration is a local, whatever it is assigned.
endpoint := "/secure",let hostname = 3,var body, expected stringwere known only to the state reader: a call, a value passed on or a type namedendpointstill went to the package'sendpoint. A local assigned a member read (req := dl.Request) is typed by what the member holds. - A method on a receiver the source types as a library's is the
library's:
jar := newJar()withfunc newJar() *cookiejar.Jar,var buf bytes.Buffer,value.toUpperCase()on aString. The guess by a method's name linked them to a project method of that name (INFERRED). An extension, or a method a project trait gives a library type, still answers. - Go: a field of a struct was a package-level name (the fields of an anonymous struct a test table is made of, from any file of the package).
- Rust:
self.proxywith no call is the field beside a method of its name (300readson ripgrep that werereferencesto a method);-> Result<Self, E>gives the type the method is declared for; a name of another crate is in reach only through ause(every stdResult<…>of ripgrep went to atype Resultin another crate's tests). - JS / TS: every name a closure's parameter pattern binds is the
closure's (
([key, value]) => …); a block scope ended at the parameter list (formal_parameterswas read as afor).
- Every declaration is a local, whatever it is assigned.
-
Native engine 0.5.55: a type named to test, convert or catch a value is a use of it, in every language. The Kotlin compiler binds 1,771 names of its own tests to definitions the graph has; 62% had an edge, 88.5% now (Swift: 60% to 65.7%; TypeScript: 83.6% to 86.1%). 479 cases in the checklist, all hold. No edge came of:
x is T,x as T,(T) x,x instanceof T,x.(T), a type switch'scase T,catch (e: T)/catch (T e), a pattern's type (s is Qux q), in Kotlin, Java, C#, Swift, TypeScript, Go, PHP and Rust;- the type of a Kotlin property or local (
val engine: Engine): its grammar gives it no field name, so every Kotlin class lacked the references to the types of its properties; - what a type alias names (Kotlin, Swift, Rust, C++) and what a
whereclause bounds a type parameter by (Swift, Kotlin, Rust, C#); - a class or object named as a value (
take(Base.Nested),k = Foo,raise Faraday::Error), unless the same definition already calls, builds or extends it. Also: the type animplgives its trait (type Output = …) is no name of the file (in actix-realworld everyResult<T>beside animpl Handlerwent to another handler'stype Result); a C# LINQwhereis no bound. On the 45 audit repositories: about 4,000 newreferencesedges.
-
Native engine 0.5.54: the rest of the TypeScript compiler's list. 99.5% of the 9,283 edges the compiler has an answer for now go where it says (98.9% of 7,806 with 0.5.51), and 83.6% of the uses it binds to a definition of the graph have an edge (73.3%). 464 cases in the checklist, all hold.
- Block scopes hold for every kind of use, not only calls: the place
a use is written (
Project::site) decides which local of a name is meant for a read, a write, a type or a value passed too, andstate.rshides a variable only inside the block that declares a local of its name. Aletin a block at the top of a file is that block's. A local declared after an inner block no longer hides the field the code before it reads (C++, Java, Kotlin, Go: about 50reads/writesedges on the 45 repositories), and a redeclared parameter is the new value after its declaration (let timeout = timeout.for_write()). import x = require("./m"),export = E,import A = N.Mare read: the module under that name, the module's own value, a name for a path.- A function, class or enum merged with a
namespaceof its name has what the namespace declares (Cf.foo()). - A function named as a value is a
referencesedge where a bare function name is one (JS / TS, Python, Go):const q = helper,cb = helper,Run: emptyRun,key=sort_key. About 1,600 edges on the 45 repositories. - JS
for ([a, b] of rows)with noletassigns names declared elsewhere.
- Block scopes hold for every kind of use, not only calls: the place
a use is written (
-
Native engine 0.5.53: what the Scala compiler showed, and the rest of TypeScript's list (456 cases in the checklist, all hold):
- A name of another package is not in reach without an import (JVM
languages and PHP). A type or function that was the only one of its name
in the project was linked from any file, as
EXTRACTEDwhen it sat at the top of its file and as anINFERREDguess otherwise:List[Int]to aListnested in an unrelated class, PHP\DateTimeImmutableto a test's own class, Kotlinapply { }to a test rule'sapply. Now only one of the file's own package. C# keeps the guess: a project file can import a namespace for every source (<Using Include="…"/>), which the engine does not read. - An enum member named as a value is a use of its enum:
return Color.Red,Mode::Fast,Kind.A,Level::Debug. It was an edge only where the member was called. TypeScript's enum members were no definitions at all. - TypeScript: the types a type alias is written with, those of an
interface's property, call, construct and index signatures, and
typeof ns.Classare references; a type alias's own parameters and aninfername are not. - The types a type parameter is bound by are references in every
language (
[In <: Txn[In]],<T extends Foo>,<S: Sink>). - Scala:
Local(a = 1)is an argument given by name, not a write of a variablea;pkg.Typeis one type path;case Succ(p)andcase o: Objname their types; the type parameters of anextensionare its methods'. On the 45 audit repositories: about 4,200 newreferencesedges and about 460 wrong edges gone.
- A name of another package is not in reach without an import (JVM
languages and PHP). A type or function that was the only one of its name
in the project was linked from any file, as
-
Native engine 0.5.52: the rules the TypeScript compiler showed missing, each also where the other languages have it (440 cases in the checklist, all hold):
- Block scopes. A name declared in a block is a local of that block
(
Local::until):if (a) { const x = new A() } else { const x = new B() }is two variables, a use beside the block has the outer one, and inside the value a declaration is written with the name is still the outer one (let convertible = Wrap(convertible)). The engine had one local of a name per function, the first declared type winning. Not Python, Ruby, PHP or a JSvar, which have no such scope. - A type parameter hides a type of its name (
interface Box<T>beside atype T), and a member asked of it, or of a value typed by it, is a member of the type that bounds it:fn run<S: Sink>(s: S) { s.begin() },where T: Sink,<T extends Foo>,[B <: Base],[T Runner],where A: Parsable. A bound that is not one named type (FnMut(Match) -> bool,keyof T, a Scala context bound) says nothing. - A call of a typed parameter or local is no call of an outer function of
its name (
cb('hi')withcb: (x: string) => number), except in Java and Kotlin, where a variable and a function are names of two kinds. - TypeScript:
constructor(public greeting: string)declares the property (it was a node only where a method assigned it); what anamespacedeclares is no name beside one the file declares. - Scala: a generic method's parameters were not read at all (the
grammar gives its type parameters the same field name), so nothing in
def opt[B <: Base](b: B)knewb. - A wrapper holds its first type argument:
Option<Space<M>>was read as holdingM. On the 45 audit repositories: 501 edges gone (a type parameter or a callback parameter linked to an unrelated definition of its name), 675 new (calls through bounds, parameter properties, the right overload where a redeclared local decides it).
- Block scopes. A name declared in a block is a local of that block
(
-
Native engine 0.5.51: a C++ template's member is typed by the argument written. The type parameters of
template <typename T> class Pagesit on the declaration around the class, where the reader did not look, soPage<Item>& p; p.lead().size()stopped atlead. -
graphlore_package_apis(package=…)cut nothing: a package used in hundreds of files (zod's own name across its workspace) returned every file under every symbol, 136 KB. Each symbol's list is now cut atlimitand the file list at ten times that, withsymbol_file_counts,file_count,files_left_out,truncatedand ahint. -
Native engine 0.5.50: a file git tracks is read whatever an ignore rule says of its name. The engine honoured
.gitignorefor every file; git itself ignores only what is untracked. cJSON commitstests/unity/test/under a ruletest(581 definitions were not read), and zod commits each package'spackage.jsonunder**/package.json, so the engine never learned thatpackages/zodis the packagezodand every workspace import of it was an external module (2,042 calls). The engine now asks git (git ls-files; nothing changes without git or outside a repository) and reads the tracked files an ignore rule matched — not hidden paths,node_modules, or what.graphloreignore/.graphifyignorename. A repository that commits its build output gets it read as well; the analysis scope leaves it out as vendored. Also: C# / Java / JS / PHP / C++new Name(…)names the type, never a method of the class around calledName(commandline: 22 edges from a factory method to itself).compare_engines.pycounts a type reference as found when the native graph states it from the method (graphify writes it on the class) or as acallsedge to the class (graphify:uses): type references 91% → 94% on the first set, 85% → 90% on the second. -
Native engine 0.5.49: a language's names are read only where the language means them. The reader and the resolver are shared by the 14 languages, and two rules of one language had been found applied to the others by accident (
Boxa wrapper in Java,$a sigil in TypeScript).benchmarks/neutrality.pylooks for the rest by differential testing: for every name of every table inengine/src/(wrappers, collection methods, unwrappers, core methods, receiver words, built-ins) and a list of name shapes and other languages' keywords, in every language, it builds a small project that defines the name itself, beside the same project with a neutral name, and compares the edges. 39,657 projects; 199 differed: 161 were the wrapper tables — a project's own generic class namedOptional,Future,Lazy,Promise,Provider,Mutex,Ref,Result,Task, … (23 names, in TypeScript, Java, Kotlin, Scala, C#, Rust and Swift) was the library's wrapper, so its members named nothing. A file that sees a project type of such a name (it defines it, shares its directory, or imports it from where it is defined) is now read with the name as an ordinary type;java.util.Optionalimported beside a projectOptionalelsewhere stays the library's. About 20 wereself/supertaken for the receiver in languages that have no such word (a Java methodself(), a Go functionsuper()): a name like any other there when the scope has one. The rest were names the language reserves. No method table leaked: a typed project receiver's ownmap,get,unwraporfirstwas already the project's. One row is left (a Python function namedsuper, which shadows the built-in), inbenchmarks/results-neutrality.json. No edge of the 45 audit repositories changed. -
Native engine 0.5.47: the lowest cells of the comparison with graphify, read. 0.5.46's 50 rules did not move the share of graphify's calls the native graph has (84.7% on the first set, before and after): they were edges neither engine had. Reading the edges only graphify had on the second set did — calls 84.9% → 90.1%, bases 79.9% → 97.4%, type references 80.3% → 84.5% — and each was one rule:
class EXPORT_MACRO Name {is a function to the C++ grammar, so the members belonged to no class; the macro is blanked before parsing, in the engine and inspans.py(leveldb: 1,173 more calls, 1,128 more references). A test's untyped parameter is what the pytest fixture of its name returns (click: 306 calls,INFERRED). C#: base(…)/: this(…)and Javasuper(…)/this(…)are constructor calls (no edge before). C#Maybe.Nothing<T>()is a member of the static class beside the genericMaybe<T>, and ausing N;of a namespace written as a block brings its extension methods into sight from another directory (commandline: 82% of graphify's calls from 68%).$is a sigil only in PHP and Ruby (and Swift's$0): it was stripped from JS / TS names, so zod's$ZodTypefamily named something else (bases 44% → 97%); a TypeScript name that is an interface and a constant is the type where a type is written, the value elsewhere.benchmarks/compare_engines.pynow counts an edge of a C++ definition written out of its class as an edge of the declaration graphify hangs it on (C++ header calls on leveldb read 9% for that reason alone). Not all of what only graphify has is a gap: 265 of click's arerunner.invoke(cli)linked to theclinested in another test. -
Native engine 0.5.48: six more rules from the same reading. A Java import of
p.Cnamed nothing whenmodule-info.javadeclared a modulep(gson: its imports ofcom.google.gson.*had no edge at all). Pythonexcept E as e:/except (A, B):are references to the types caught. Swift: the types an enum case carries (case option(ParsedArgument)), a metatype (Command.Type), and a case built with what it carries (throw ParserError.noValue("x"): a reference to the enum, no edge before). Kotlinx.apply { … }/x.also { … }give the receiver back in a chain (CodeBlock.builder().apply(action).build()). -
Native engine 0.5.46: the 50 name-resolution rules the checklist found missing.
benchmarks/conformance.pyhad 356 of its 406 cases passing; all pass now, and each change was read on the 45 audit repositories (edges added and removed, at their source lines). By rule: a cast used where it is written is a value of its type (Java, C#, TypeScript, Kotlin, Swiftas!, Gox.(*T)); C#a?.band a Kotlin parameter typedT?keep the type;if let Some(r) = opt/ Swiftif let/guard leton a parameter, Scalacase r: T, a Java resource variable and theitof Kotlinr.let { … }are typed; a member asked of an enum's value is the enum's; a Kotlin / Swifttypealias, a Ruby constant assigned a class and C++namespace u = util;name what they alias; a Govar, a Kotlin top-levelvaland a Ruby@fieldare typed by their value, and a Scalavalin a method is a local; Javathis::m, Kotlin::fand PHP[$this, 'm']are anindirect_call, Kotlin and PHPFoo::classareferencesedge (Kotlin's two werecallsbefore); Rustself::fandsuper::fin an inline module, a C#global using, a TypeScript type throughimport * as m, optional parameter and getter, a JavaScript object literal's method,F.prototype.mandawait import()resolve; Rubysuper, bare or with arguments, calls the method further up; of several Rustlets of one name the last before a use is meant; a C variable hides a function of its name; a use above a local's declaration keeps the outer name; C++ range-for,Outer::Innerandns::Typeare read with their qualifier, the asking file's own definition first;Box,Arc,Rc,Cell,RefCell,Pin,Coware wrappers only in Rust. On the 45 repositories:calls121,235 → 121,691,references41,711 → 43,396,indirect_call4,137 → 4,229,reads32,219 → 32,475; unresolved rows left unmarked 314 → 305 on the first set, 1,041 → 953 on the second. Edges that went away were read too: Kotlin class literals that werecalls, a function linked through a parameter or a later local of its name, leveldb'sComparatorandlog::Writerlinked to a namesake in another file. A local's and a reference's position are now kept in the facts cache (update=Trueread them as 0). -
Native engine 0.5.44: fourteen more repositories, and what they found.
benchmarks/polyglot.pyhas a second set (--set 2): one more repository per language, none an HTTP client or a web application — click, commander.js, zod, cobra, gson, clikt, scopt, commandline, ripgrep, swift-argument-parser, cJSON, leveldb, thor, monolog. The first 31 had 314 unresolved rows left unmarked; these 14 had 1,387 on the same engine, and reading them found what the first set could not:file_spans(the span fallback when Python tree-sitter is missing) returned 0.5.40's block scopes as unnamed spans; they are no spans. The parity snippets had no closure at file level, so nothing compared them.- C#:
namespace Shop.Core { … }written as a block did not seeShop's names (only a file-scopednamespace Shop.Core;did), andusing Shop.Text;reached one of the files that open the namespace, not all of them. commandline: 1,295 edges added, 52 removed (guesses by name to a namesake in the tests, now the type the source names). - C#: one branch of an
#ifin the middle of an expression (() =>/#if X/a ? b :/#endif/c;) cost the class around; the two directive lines are blanked, in the engine and inspans.py. - Rust: a closure in a macro's arguments has its typed parameters and its
lets (rgtest!(name, |dir: Dir, mut cmd: TestCommand| { cmd.arg(…) })), and a macro outside any definition is a scope. ripgrep: 69 calls. - C++:
Random rnd(test::RandomSeed());is a variable, not the declaration of a functionrnd(a call where a parameter's type would be). leveldb: 71 edges added, 23 removed, the removed ones from the functions that were none. - Kotlin: the grammar drops some comments from the tree (a KDoc block before
a declaration with modifiers); a definition's region is read from the
source where the tree has no comment. clikt: 8 files' spans now equal
spans.py's. - Swift: the type of a stored property (
var fav: ColorOptions, with or without a property wrapper) was no reference at all: the annotation is a child with no field name. swift-argument-parser: 429references; alamofire, of the first set: 592. On the first 31 repositories nothing else changes but four redundantusingedges of todoapi. Unmarked rows on the second set: 1,387 → 1,041. The audit of every tool on the 14 (docs/benchmark-polyglot.md): no tool crashes; 38 findings on graphify's graphs and 17 on the native ones, 14 and 12 of them the orphan-node note.
-
A Rust function under
#[cfg(test)]is test code, as a module under it was (spans._test_regionsand the engine'stest_regions, engine 0.5.45): ripgrep's#[cfg(test)] pub(crate) fn get_limited(&self)in a source file was listed as production code bygraphlore_tests_for. -
graphlore_skeletonfinds a name under more attributes. It looked twelve lines below the first line of a definition for its name, and showed[Theory]as the header of a C# test under twenty[InlineData(…)]lines; it looks forty. -
Native engine 0.5.43: the comparison with graphify measured again, and attribute names marked on any receiver. The diagnostics mark a member of a name a type declares with no
defwhatever the receiver (0.5.41 did on an untyped one): a typed receiver that lacks thedefhas the attribute or nothing. Graph unchanged; unmarked unresolved rows 367 → 314 (Ruby 81 → 28).docs/native-engine.md's table against graphify 0.9.111 is measured on engine 0.5.42: 44,960 native calls for graphify's 27,842, 85% of them found as before (JavaScript 41% from 43%: the vendored bundles), and the polyglot audit on native graphs raises nothing but its orphan-node note. -
Native engine 0.5.42: module patterns, typed function declarations, RSpec shared examples. Three things 0.5.40's scopes left open. A JavaScript module written
var Dataset = (function () { function Dataset() {} return Dataset })()names, outside that function, the function written in it (Def::returned_out; the declaration is no local), and a function assigned to a function as its member (Dataset.extractData = function () {}) is found through it. A function declared with a type (const first: Lookup = () => {}) is no local that hides itself where it is passed as a value. A bare name in RSpecshared_examples 'x' do … endthat no block around it declares is theletof the block that saysit_behaves_like 'x', when every place that includes the examples gives the same one. On the 31 audit repositories' own code: 15 edges added, 7 removed (5 of them a call linked to the other copy of a file, 2 a guess by name on what is now alet); 423 added in vendored and minified bundles, members assigned to functions. Unmarked unresolved rows: 383 → 367. Tried and not kept: refusing the one extension in sight on a receiver of a project type it is not written for; on the audit repositories it removed 207 edges, the sampled ones all right (client.BuildUri(request),FunSpec.getterBuilder().strictfp()), because the walk's type for a receiver is not exact enough to refuse by. -
Native engine 0.5.41: what a reopened Ruby class extends, and attributes in the diagnostics. A member a Ruby class has through what another opening of it mixes in or extends is found from every opening (
Faraday::Response.register_middleware(…)in a file that opensclass Responseagain,extend MiddlewareRegistrywhere it is declared), and a class writtenRequest = Struct.new(…) do extend Registry … endmixes in what its block says: faraday's eightregister_middlewarecalls,EXTRACTED, and threemixes_inedges. The diagnostics mark a member an untyped receiver is asked when a type declares that name with nodef(aStructmember,attr_accessor,def_delegators:env.statusbesideEnv = Options.new(:status, …)): the onedefof the name is one of several things the receiver may be. Unmarked unresolved rows: 501 → 383 (Ruby 215 → 97). -
Native engine 0.5.40: a closure no definition holds is a scope. The callback of
test('…', () => { … }), an RSpecit '…' do … end, a module wrapped in a function: each is a definition with no node and no name (Def::block) whose locals are its own, as a function's are, and one inside another sees the outer one's. Until now a local declared there was no local at all:const request = …in one test was therequestfunction of another file (EXTRACTED), and the same name in the next test was the same thing. A definition written in such a closure is a name of it and of the closures inside, not of the file. On the 31 audit repositories, in the projects' own code: 210 edges added (got 96, faraday 59, express 41, most of them a test's call through its own local or to its own helper) and 140 removed, nearly all a local or a callback parameter linked to a definition of its name elsewhere (assert.strictEqual(body, 'ok')to another file'sbody,.expect(200, cb)to another test'scb). In vendored and minified bundles, which the analysis scope leaves out, 1,347 added and 2,587 removed (retrofit's generated Dokka bundle). Unmarked unresolved rows: TypeScript 87 → 39; Ruby 175 → 215, where a receiver that was no name at all is now an untyped local of its block and is reported as one. Known cost: an older JavaScript module writtenvar Dataset = (function () { function Dataset() {} return Dataset })()no longer answers tonew Dataset()outside that function (the variable holds what a call returns). -
Native engine 0.5.39: extensions for a library's type on a receiver the walk cannot type, and a C#
#ifinside an expression. A call the walk could not follow, whose name is the one extension in sight written for a type the project does not define, is that extension's (INFERRED):e.Name.LocalName.RemoveUnderscoresAndDashes()beside an extension forstring, Kotlinuser.email.isEmailValid()besidefun String.isEmailValid(), SwiftNotificationCenter.default.postNotification(…), Rustrequest.headers().has_content_type()besideimpl HeaderMapExt for HeaderMap. Never when the receiver is a local whose type the source names (that type was already asked), when the walk gives the receiver a project type, when the name is also a member of a type of the project, for a static call on a library's type (HttpUtility.UrlEncode(s)), or from the extension to itself. 79 calls on the 31 audit repositories, each read at its site (kotlinpoet 30, restsharp 23, alamofire 13, ureq 7). A C##if…#else…#endifthat opens in the middle of an expression or declaration is parsed with its first branch only (parse::blank_expression_branches, andspans._blank_expression_branchesfor the Python span engine): seeing both branches the parser lost the class around, so RestSharp'sHttpResponseExtensionshad no node and its extension methods were local functions. Unmarked unresolved rows: 576 → 509 (C# 75 → 40, Kotlin 42 → 22, Swift 61 → 49). -
Native engine 0.5.38: a field beside a method of its name, and more of the unresolved rows say why they are no gap. A member read without a call, with more after it, is the field when its type has a method of the same name (Rust
input: ConsumeBufbeside a trait'sfn input(),self.input.fill()): the walk took the method and stopped. ureq gets 42 calls, nothing else in the 31 audit graphs changes. The diagnostics (graph unchanged) mark four more kinds of row: a receiver whose path reaches a field, variable or function written with a library's type ($this->request->getBody()withRequestInterface $request, Rustself.builder.header()on anhttp::request::Builder) or a local constructed from a type the project does not define (new \ReflectionProperty(…)), unless the one definition is an extension; a bare call where a method is not in scope by its bare name (PHP\rewind($h)beside arewind()method, a Go closurehbeside a methodh); and a bare name whose one definition is an RSpecletof another block of the file. An RSpecletis no candidate for a member call (conn.sslbesidelet(:ssl)), a PHP$xis looked up as the local it is, and Ruby'sdup/cloneare core names. Unmarked rows on the 31 repositories: 801 → 576 (PHP 137 → 29, Ruby 239 → 175, Rust 96 → 64). -
Native engine 0.5.37: JavaScript's unresolved rows say why they are no gap. New marks: a call of the caller's own local or parameter (a callback it was handed), a candidate in vendored or minified code, a member that is a field assigned a value, a property defined at run time (
Object.defineProperty), a receiver holding a library's value (const app = express()), a property middleware attaches to a request, the request a framework hands a function. The document a Mongoose model's static hands its callback is typed (INFERRED). JavaScript's unmarked rows 18 → 0; all languages 926 → 801. -
Native engine 0.5.36: JavaScript receivers the source states.
thisin a function expression is what it is attached to (app[method] = function, a callback a Mongoose schema is handed); in an ES5 constructor, its prototype's functions; a Mongoose document has its schema'smethods; express's ownreq/resobjects (Object.create(http.IncomingMessage.prototype)) type a handler's untypedreq/res. express: 158 calls, the Mongoose demo 49 (INFERREDwhere a convention, not the source, says what the receiver is). JavaScript's unmarked unresolved rows 55 → 18. The facts cache is rebuilt once. -
Native engine 0.5.35: C function-pointer slots dispatch to the functions put in them. An initializer (
.close = redisNetClose, or by position) or an assignment (ac->ev.addRead = redisLibuvAddRead;) gives adispatches_toedge from the slot to the function, soimpactand call paths go fromr->fn->createString(…)on tocreateStringObject. A field of an anonymous struct type answers for its body's members. hiredis: 88dispatches_toedges, 81 reads and writes. The facts cache is rebuilt once (FileFacts::slots,Def::inline_body). -
Native engine 0.5.34: a C
typedef struct X { … } X;is its struct. A local typed by such an alias reaches the struct's members (the target 0.5.32 wrote for it was the first type in the body, now the struct's own name). A function returning a pointer types its parameters;extern T x;declares the variable defined elsewhere (no node); a file-level variable inside an#ifgroup orextern "C" { … }is a variable. hiredis: 34 calls through function-pointer fields (r->fn->createString(…)), 836 reads, 324 writes, 312 uses; C's unmarked unresolved rows 33 → 0. The facts cache is rebuilt once. -
Native engine 0.5.33 and
spans.py: a C/C++#ifwritten once per configuration is parsed once. When every branch of an#if … #else … #endifleaves the same number of braces open, the parser is given the first branch (the rest and the directives are blanked in place); it used to read the rest of the file into the function around (cpr'smultiperform.cpp: 25 methods nested inDoMultiPerform). C++using X = …;is a span ofspans.py's rule too (fetchon an alias returned the namespace around it). C++'s unmarked unresolved rows 6 → 0. 10 calls on a structured binding (for (auto& [session, method] : sessions_)) had an edge only by accident and are gone. -
Native engine 0.5.32: C++ type aliases and template specializations.
using X = T<…>;is a definition (graphify has these nodes too) and an alias ortypedefis followed to the type it names; its arguments pick a template's specialization (<Response, true>fits<T, true>). A bare template name with several specializations isINFERRED, and a member several of them declare gets no edge. Deduction guides declare no function.std::vector,std::mapand the other standard containers are collections. cpr: 50 calls, 23 reads, 98 references, 34 alias nodes; C++ definitions shared with graphify 97.8% → 98.7%; C++'s unmarked unresolved rows 12 → 6. The facts cache is rebuilt once (Def::alias_args). -
Native engine 0.5.31: a C++ namespace is every block that opens it.
cpr::File(…)is looked up in eachnamespace cpr { }of the project, not only in the block the caller's file opens; a method defined for a type inside such a block is the type's, not the namespace's; a name called is the function of that name and a name with::after it the class (cpr::async(…)besideclass async). cpr: 273EXTRACTEDcalls, none gone; C++'s unmarked unresolved rows 28 → 12. -
Native engine 0.5.30: C++ locals declared without a value, and the constructions the grammar reads as declarations.
Session session;is a local of its type, andcpr::ThreadPool pool(context);beside a localcontexta variable constructed from it (not a functionpool: it keeps its span, gets no node and answers no name). cpr: 538EXTRACTEDand 140INFERREDcalls (overloads the arguments do not decide), 13 nodes of misread declarations gone; hiredis: 10 reads and writes of struct fields. The unresolved rows mark calls onstd(std::async, a member of a field or local declared with astd::type), even where the project opensnamespace std. C++'s unmarked rows: 50 → 28. The facts cache is rebuilt once (Def::misread,Def::written_head,Local::written_head). -
Native engine 0.5.29: a library interface's one implementation is marked in the unresolved rows. A call left without an edge whose one candidate is a member of a type implementing a library type (
implements RequestInterface,extends Writable), on a receiver the source gives no type, islibrary_like("the one definition implements a library type's member"): the receiver may be any implementation. Marker bases (Sendable,JsonSerializable,Closeable, exception roots), Ruby and member extension functions are left out. 477 of the 31 repositories' 6,166 rows (got 191, guzzle 253); 1,009 are left unmarked, from 1,486 (PHP 393 → 137, TypeScript 315 → 124). graph.json is unchanged. -
Native engine 0.5.28: RSpec
letandsubjectare definitions.let(:conn) { … },let!,subject(:request) { … }and a namelesssubject { … }are methods of thedescribe/contextblock they are written in: the innermost of several of one name answers a use, and a use outside every such block names nothing. What the block's last expression gives is the method's result (conn.getreachesFaraday::Connection#getthroughlet(:conn) { Faraday::Connection.new }). A module thatRSpec.configure'sconfig.include Mputs in every example answers a bare name a spec calls that nothing else answers to. faraday: 374 new definitions, 484 calls (442EXTRACTED); 9INFERREDguesses on a block parameter inside aletare gone. Calls left without an edge: 6,206 → 6,166, Ruby's unmarked rows 298 → 239. The facts cache is rebuilt once (newDef::scope_lines,FileFacts::spec_includes). -
Native engine 0.5.27, the small cases the diagnostics left. On the 31 audit repositories: 264 calls (183
EXTRACTED) and 302 reads and writes gained, 252 calls gone (227 of them kotlinpoet's, moved to another overload).- Swift implicit members are typed by more places: a property's
initializing closure, a memberwise initializer's label, a library
type's static member a project extension adds, and the
headersextensions add toURLRequest(alamofire: 30 calls, the untyped ones from 39 to 7). - Lombok accessors read and write their fields (
filter.getTags()on a@Dataclass; quarkus-realworld: 301 reads and writes). - Laravel's
auth()->user()is the class that extendsAuthenticatable(INFERRED). - A Rust
Err(e)binds an untyped local, and a star-imported module passes on what itspub usenames (actix-realworld: 18 calls ofe.error_response(),INFERRED). - An enum case is a value of its enum: kotlinpoet's
addModifiers(KModifier.EXTERNAL)goes to thevarargoverload. - A project type named like a language one is the project's (
enum Type): retrofit'snew PhoneNumber(…, Type.MOBILE)keeps its constructor. - A guess by name never takes Rust's or C++'s own method names
(
lock,c_str): 22 wrongINFERREDcalls gone.
- Swift implicit members are typed by more places: a property's
initializing closure, a memberwise initializer's label, a library
type's static member a project extension adds, and the
-
Native engine 0.5.26, two more kinds of library names in the diagnostics (graph.json is unchanged): a capital head that names nothing of the project and no local (
Date.now(),Assert.NotNull(…)), and the methods of Rust's and C++'s standard types (lock,clone,c_str). Of 6,237 unresolved rows, 1,610 are left unmarked (2,066 before). -
Native engine 0.5.25, five readings the 0.5.24 diagnostics pointed to. On the 31 audit repositories: 83 calls (60
EXTRACTED) and 157 reads, writes, uses and references gained, 8 edges gone.- C# primary constructor parameters are typed names of the class
(
class QueryHandler(ConduitContext context), thencontext.SaveChangesAsync()): aspnetcore-realworld's handlers had no edge for what they use. - A cast types a local (C# / Java
(Box)o,o as Box, TypeScript<Cup>o, Kotlino as? Jar),EXTRACTED. - A name taken out of the object a function returns is the function it
names (
const { showSuccessToast } = useCustomToast()besidereturn { showSuccessToast, … }),INFERRED. - A Python
@propertywith more read after it is what it returns (self.cookies.extract_cookies(…)). - A C# top-level variable that names nothing in sight, called by an
extension's name, is its receiver (
builder.Services.AddJwt()inProgram.cs),INFERRED; never for a capital head, which is a library's static call.
- C# primary constructor parameters are typed names of the class
(
-
Native engine 0.5.24, the diagnostics tell a library's name from a missing edge (graph.json is unchanged). Each row of
build --unresolvedcarrieslibrary_like: why it is most likely a library's name the project happens to define once (a name the language's own types answer to, a library's receiver,selfin a type with a base the project does not define, a definition that is test code for a call that is not), or null.benchmarks/unresolved.pyprints both totals and takes--real: of 6,285 rows on the 31 audit repositories, 2,114 are not marked. -
Native engine 0.5.23, the type arguments a call writes say which overload it is of (C#, Java):
client.Get<User>(id)is the callable that declares one type parameter, and a call that writes none, between a callable and its generic twin of the same parameters, is the plain one. In restsharp 81 tied targets are gone and 27 calls left with one target areEXTRACTED; overloads that take different things stay tied. -
Native engine 0.5.22, declared types and three lookups. On the 31 audit repositories: 249 calls and 150 reads and writes gained, 513 calls
INFERRED→EXTRACTED, 9 calls gone; the share ofINFERREDcalls goes from 30% to 28%.- The type a declaration writes comes before what is assigned: Go
var rooms *Manager, Kotlinval kind: Kind = builder.kind(no type at all before), and C++static HttpServer* server = new HttpServer();, whose 509 calls in cpr's tests were a guess by its value. - Of several callables of one name in the middle of a chain, the one
whose result has what is asked next:
result.response().isSuccessful()beside a staticresponse(Response)(46 calls in retrofit). - A field before a function of its name when a member is asked of it
(Kotlin constructor parameters beside
fun builder(…), SwifteventMonitor?.request(…)). - C# names are looked up in every namespace around the file's; four
bases written
: Interceptors.Interceptorare the project's class, where they were an external name. - With more arguments typed, 9 calls that tied between overloads are one
(
producerOf(ANY.copy(…))).
- The type a declaration writes comes before what is assigned: Go
-
Native engine 0.5.21, names bound with a type the source states are locals: a loop variable written with its type (Java
for (Pet pet : pets), C#foreach (Pet pet in pets)), a type pattern (o instanceof Pet p,o is Pet p), and what a wrapper holds (Rustif let Some(p) = e,while let, amatcharm'sSome(p)/Ok(p)or the fields of an enum variant; Swiftif let p = e,guard let q = e). A local assigned a field or a variable is typed by what that holds. On the 31 audit repositories: 29 calls and 27 reads, uses and writes gained; 24 edges of alamofire gone that read such a name as the class's method or property of the same name (taskafterguard let task = …). -
Native engine 0.5.20, two wrong readings. On the 31 audit repositories: 21 edges gained, 38 calls gone.
parent,baseandclsare the object's base or class only in the language that says so. A Go variable namedparentwas read as a base class (parent.SetProxy(…)had no edge), and so were a Python parameterbaseand a Java parametercls.- C#
base.X()is the base class'sX, where it was read asthis.X(): 13EXTRACTEDcalls from an override to itself are gone (base.Dispose(disposing)), and a base the project defines is reached. - A guess by name alone never links a definition to itself:
inner.evaluate()insideevaluate()is a wrapper handing on to what it wraps. 25INFERREDself-calls are gone, 4 of them a real recursion on another object.
-
Native engine 0.5.19, C# extensions and partial types. On the 31 audit repositories: 618 calls gained (197
EXTRACTED), 51INFERREDones nowEXTRACTED, 7 gone; restsharp, whose extensions are C# 14 blocks, gets 570.- The members of an
extension(T x) { … }block are extensions written forT:client.BuildUri(request),request.AddHeader(…). They had no edge. - A receiver has the extensions of its bases (
RestClientthose written forIRestClient),EXTRACTED; several overloads written for the receiver's type are one extension, chosen by their arguments. - A C# partial type is all its declarations: a member, field or base one of them writes is found from any (restsharp: 121 more reads, uses and references).
- A field or property of a library type is answered by the extension
written for that type (
string Namethenrequest.Name.IsNotEmpty(),WireMockServer _server), a local by the type its value constructs, and a C# namespace sees the extensions of the namespaces around it. - A name .NET's own strings, lists and types answer to is no evidence
on a receiver that is no type of the project (
ForEach,Split,GetProperties): two wrong edges gone, three right ones with them. - A call that names nothing no longer leaves a
referencesedge to the type it started from when it now resolves (91 in restsharp and kotlinpoet).
- The members of an
-
Native engine 0.5.18, CommonJS modules and the receivers of a test file. On the 31 audit repositories: 329 calls gained, 12 gone; a test of express now reaches the method of
lib/it exercises (graphlore_tests_for).- A CommonJS module is what it assigns to
module.exports:const Foo = require('./foo'); new Foo(),make()andFoo.create()resolve to the class or functionfoo.jsassigns there (exports = module.exports = createApplicationtoo). They had no edge. module.exports = require('./lib/app')is that module (are_exportsedge), andexports.name = boundpasses a name on: in express-mongoose-demo the OAuth routes are handled byusers.login(exports.authCallback = login), not by the routes file's function.- A closure's parameter and a module variable at file level are unknown
receivers, as an untyped local is:
res.sendFile(…)in anit(…)callback andapp.listen()aftervar app = express()get anINFERREDedge by a distinctive method name. A function assigned to an object (res.sendFile = function sendFile() {}) counts as its method; never on a variable holding a library's value, and a name of three letters (app.use) is still no evidence. - In sight includes what an imported module passes on: a file that requires a package's entry has the files that entry re-exports.
- Names JavaScript's own types and Node's emitters and streams answer to
are no evidence (
once,pipe,concat,abort): 12INFERREDcalls of got's ownpipe/unpipe/aborton untyped receivers are gone.
- A CommonJS module is what it assigns to
-
Native engine 0.5.17, Swift's implicit members and the overloads an extension adds. In alamofire: 158 calls that had no edge, and 783 that go to another definition of the same name than before (none to nothing).
.status(301)is typed by its place: the parameter the argument is for, the type a declaration writes (let e: Endpoint = .made(1)), or the result of the function it is returned from. No type, no edge.- It says which overload a call is of: an argument
.status(…)fits a parameter whose type has a staticstatusand not one whose type has none. - A Swift method's overloads include the ones an extension of its type
adds:
session.request(.get)in alamofire's tests is therequest(_ endpoint: Endpoint)the test helpers add toSession, where it was the library'srequest(_: any URLConvertible). - The parameter's very type scores over one of its bases, and a trailing closure goes to the parameter that asks for no label (a function type, or a type alias) before a labelled one.
-
Native engine 0.5.16: the calls in a Rust macro's arguments are read. The grammar gives them as tokens, so
assert_eq!(handle_count(&pool), 2),assert!(pool.count() > 0),vec![make_pool()]andformat!("{}", c.name())named nothing; the arguments are parsed again as an expression and their calls placed where they stand, a macro inside a macro too. What is no expression (a{ … }body,a => barms, the pattern ofmatches!) is left out. 171 more edges on the 31 audit repositories, none gone, nearly all a test's assertions: the share of graphify's Rust calls the native graph has goes from 81% to 86%. -
Native engine 0.5.15: the import edges a Swift file gets from the files it uses were written in an order that differed from run to run (the same edges; a set's own order). They are in file order now.
-
Native engine 0.5.14, the rest of collections and tuples. On the 31 audit repositories one edge comes back (
copy(id)in fastapi-template, lost in 0.5.11); the rest does not occur there with project types:- A map's keys:
m.keys/keySet()is a collection of the key type, and the first of a pair taken apart is a key (for ((k, v) in m),m.forEach((k, v) -> …)); of a list's pair, the element. partitiontaken apart gives two collections of the elements,ziptaken apart one of each (for ((x, y) in xs.zip(ys)), Pythonzip(xs, ys)),fold(init)/Aggregate(seed, …)/inject(init)/ JSreduce(f, init)is whatinitis (the accumulator too), andassociateWithis a map whose values are what its lambda gives.- A part a callable returns as a literal of names (
return [copiedText, copy]) is the definition of that name inside it when its type names no class; a local holding it calls it (INFERRED).
- A map's keys:
-
Native engine 0.5.13, generics through values, nested arguments and generic bases. On the 31 audit repositories three undecided overload edges become the one overload that fits; the other patterns do not occur there with project types on both sides:
- A local typed by its value keeps the value's bindings:
val r = call.execute()on aCall<Contact>makesr.body()aContact. - A collection type argument binds its element:
Call<List<Contributor>>makescall.execute().body().get(0)aContributor. - A member a generic base declares takes the base's type arguments:
class People : Store<Person>makespeople.find()aPerson, through intermediate bases too (Java, Kotlin, C#, TypeScript, Swift). - A loop over a local assigned a call that returns a collection (
val xs = repo.all(); for (x in xs)) has the element; the element step did not look through the callable the local's path ends at.
- A local typed by its value keeps the value's bindings:
-
Native engine 0.5.12, numbered fields. On the 31 audit repositories 28 of ureq's calls change, none is lost: 14 guesses by name are
EXTRACTED, 13 move to the trait or type the field holds.- A Rust tuple struct's fields (
struct Script(Arc<Mutex<State>>),struct Tunnel(Box<dyn Transport>)) are its numbered parts:self.0.lock().unwrap().bump()callsState.bump,self.0.buffers()callsTransport::buffers.self.0.lock()named alockof another file by its name. - A part of the tuple a local holds:
let pair = setup(); pair.0.go(), Swiftboth.1, C#pair.Item2, Kotlinp.secondon aPair.
- A Rust tuple struct's fields (
-
Native engine 0.5.11, tuples taken apart. On the 31 audit repositories 38 more edges and 18 gone (14 of them in minified bootstrap bundles):
- A declaration that takes a tuple apart types each name by its part:
let (agent, clock) = setup(),var (client, probe) = Setup(),val (l, r) = two(),let (t, b) = split(),const [door, lock] = parts(),a, b = two(), Goa, b := both(), for results written as(A, B),[A, B],Pair<A, B>,Triple,tuple[A, B]or Go's result list. - The first name of such a declaration was the whole result, and a
tuple-returning function's result was one of its parts; a tuple now names
no one type (Go's
v, err := f()still takesf's first result). - Kotlin and Python declarations that take a value apart are locals: they hid nothing, and the names fell through to outer ones.
- A declaration that takes a tuple apart types each name by its part:
-
Native engine 0.5.10, what a mapping's function gives, and lists of lists. On the 31 audit repositories 5 more edges, none gone:
- A lambda of several statements gives its last expression (Kotlin,
Ruby, Rust, Swift) or what its
returns give when they agree, and a local it declares is what it is assigned (xs.map { x -> val o = x.owner; o }). - A function given by reference maps:
map(Item::owner),map(Item::getBoss),map(::Item),map(Item::new), Rustmap(Part::head), Swiftmap(\.pilot). - Lists of lists and groups:
chunked,windowed,chunks,each_slicegive lists of the elements,groupBya map of them,flatten/SelectManytakes one level off;associateBy/ToDictionarykey the elements,reduce/Aggregategive one. - A closure inside another names the outer closure's parameter as the outer closure's: the inner parameter's type, and a local assigned inside a closure from its parameter, were looked up under the bare name.
- A lambda of several statements gives its last expression (Kotlin,
Ruby, Rust, Swift) or what its
-
Native engine 0.5.9, what a declaration's type arguments bind. On the 31 audit repositories 19 more edges, none gone, and 12 of retrofit's calls that were guesses by name are
EXTRACTED:Response<Contact> rmakesResponse'sTaContact:r.body()withfun body(): T,r.valuewithT value, an element ofr.all()withList<T> all()and a constructor'sval item: TareContacts. A result written with the class's own parameter passes it on:call.execute().body().getName()on aCall<Contact>reachesContact.getNamethroughResponse<T> execute(). Locals, parameters, fields and declared results all carry their type arguments (targs).- A parameter's own declaration is read for what it holds, whether it
is a map and its type arguments (
Optional<User> u,Map<K, V> m): parameters missed what 0.5.7 and 0.5.8 read for other locals. - A method of a generic Rust impl or C++ template (
impl<T> Holder<T>,CurlContainer<T>::Add) finds its type; the owner was looked up with its type parameters in the name.
-
Native engine 0.5.8, maps and pairs. On the 31 audit repositories 10 edges change, most to the definition the call is of:
- A map's values.
Map<K, V>,HashMap,Dictionary,dict[K, V],Record, Gomap[K]Vand Swift[K: V]have their values' type as their element:m[k],m.get(k),getValue,getOrDefault,getOrPutgive a value,m.valuesis a collection of them. Kotlinpoet'sconstructorProperties[param.name].emit(…)callsPropertySpec.emit(a guess by name had linkedParameterSpec's). - Iterating a map gives entries, not values (Python: keys): one loop
variable over a map, a lambda's one parameter and
m.first()name nothing; a pair taken apart is its key and value (for ((k, v) in m),for k, v in d.items(),for (k, v) in &m,for (const [k, v] of m),foreach (var (k, v) in m),m.forEach { (k, v) -> … }), and beside an index it is the element (withIndex(),enumerate(),enumerated()). - A loop variable taken apart is a local (it was not recorded, and the name fell through to an outer one: two edges of got named a function of another loop).
- Rust
for x in &xsreadsxs(a reference was no path). - A local assigned an opened wrapper (
let pool = self.pool.lock().unwrap();) is typed by what it holds; the library's method at the end of the value stopped it.
- A map's values.
-
Native engine 0.5.7, what a wrapper holds. On the 31 audit repositories: 191 more edges, 2 gone (one a guess by name, one moved to the definition the call is of):
- A closed wrapper is opened before it is used.
Option,Optional,Mutex,RwLock,RefCell,Promise,Future,CompletableFuture,Deferred, RustResultand C#Task/ValueTaskare the wrapper untilawait,?, an unwrapper (unwrap(),get(),orElseThrow(),lock(),borrow(),.Result,.Value) or a lambda given to them (opt.ifPresent { it.run() }) opens them:self.pool.lock().unwrap() .get()on anArc<Mutex<Pool>>callsPool.get,open()?.stop()callsConn.stop,(await fetchDoc()).load()callsDoc.load. What is called on a closed wrapper (is_some(),isPresent(),then(),Wait()) is the wrapper's own method: no edge to the type it holds. - A declared result is read through a wrapper:
-> Option<Foo>,Promise<Foo>,Task<Foo>,Box<dyn Foo>return aFoo(they returned nothing the walk could use). - C#
var x = await f()is typed (a C# declarator names its value with no field, and only a plain call was looked for): 141 morereadsin restsharp's tests. - A generic class whose base is the plain class of its name
(
RestResponse<T> : RestResponse) has that class as its base; the base resolved to the class itself and was dropped, so no member of the hierarchy was found from it.
- A closed wrapper is opened before it is used.
-
Native engine 0.5.6, chains of calls on a collection. On the 31 audit repositories: 144 more calls, 479 more
readsand 46 morewrites, and 12 edges gone (ten of them a closure's parameter taken for a method or property of its name):- A chain keeps what it is a collection of. After a name declared as a
collection, a method that keeps it (
filter,sortedBy,toList,stream(),iter(),Where,ToList) leaves a collection of the same elements, one that takes an element (first(),get(i),find,FirstOrDefault(), Swiftxs.first) gives the element, and unwrapping an optional (unwrap(),orElseThrow(),.get()afterfindFirst()) changes nothing:xs.filter { it.ok }.first().a()callsFoo.a. - A mapping is the collection of what its function gives, when that is
one expression:
xs.map { it.owner },xs.map(x => x.owner),items.stream().map(i -> i.boss()),dishes.Select(d => d.Chef),planes.map { $0.pilot }, Rubyxs.map(&:owner), Python[j.chief for j in jobs];flatMap { it.kids() }the elements of what each gives. A local assigned such a chain is a collection to the loop over it. A mapping the walk cannot name is a collection of nothing known, never of the same elements. - Closure parameters in Swift and C# (
{ p in … },$0,d => …) are names of the closure, as in the other languages: they no longer resolve to an outer method or property of the same name, and an iteration method types them. The element is the second parameter of Kotlin'sforEachIndexed/mapIndexed. - Lambda parameters were read in reverse: with two or more,
tasks.forEach((t, i) => t.exec())typedias the element and lefttuntyped (since 0.5.5). - A property with more after it is typed where it is declared when its
class says nothing more (
chief: Chiefin a Python class body, a C++ member,appRule.http.createArticle()). - C#
List<Dish>and the like give their element type (the grammar'stype_argument_listwas not read). - The overloads of one extension function (
asAFError(or:)/asAFError(orFailWith:), KotlinCollection<CodeBlock>.joinToCode) are told apart by the arguments instead of resolving to nothing; a method of a Swiftextensionof a type the project does not define answers an untyped receiver as a Rustimpl Trait forone does. A Kotlin extension is never the target of a Javax.name()(latch.await()named retrofit'sCall<T>.await()while this was being written). xs.first()as the thing called is the library's method: no edge to the element's type.
The audit on graphs rebuilt by 0.5.6 raises nothing but its note on orphan nodes; the 31 builds take 16.8 to 17.8 s (16.1 to 16.6 s with 0.5.5). A first version read the callee of every call twice and took minutes on a long builder chain (ureq); the timing run caught it.
- A chain keeps what it is a collection of. After a name declared as a
collection, a method that keeps it (
-
Native engine 0.5.5, what 0.5.4 could not decide. 759 more edges on the 31 audit repositories and 32 gone (most of those a loop variable taken for a function of its name:
for (const hook of hooks) hook(x)):- Untyped receivers, by what is asked of them. A parameter or local
with no type is the one type of the project that answers every member
used on it in its definition, when two names or more that are not the
language's own are used: Ruby
def call(env)withenv.status,env.bodyandenv.parallel?is anEnv, whereenv.statusalone named a struct and a class. Python, JavaScript and PHP parameters, and locals the walk cannot type in any language, are typed the same way. - More arguments typed for the choice among overloads: a field,
property or constant by its declared type or its value's; a lambda
against a function-typed parameter; a class literal against
Class/KClass; a concatenation, a comparison,x.toString(), a cast. An overload that takes exactly the arguments passed comes before one that needs a default; overloads a base class adds compete. - Elements of typed collections. The variable of a loop over a
List<Foo>,Foo[],[]Fooorlist[Foo](or over a call that declares it returns one), the parameter of a lambda given toforEach/map/filter(Kotlin'sit),xs[0]andxs.first()areFoo. - Type parameters bound by an argument:
fun <T> pick(x: T): Tgives the argument's type,fun <T> head(xs: List<T>): Tits element's. - Go
resp, err := client.Get(url)takes the first of the function's results (it took the last,error): 235 calls in resty. Javavar x = …andfor (var x : xs)are typed by the value;varwas read as the name of a type. - A local that holds a value and is called (
handler(x),builder::add) is no longer a construction of its type. - A local assigned a call of its own name whose arguments name another
local (
let session = session(using: c)) no longer sends the resolver round in circles (a crash on four files of alamofire while this was being written, caught by the comparison run; a golden holds it).
The audit on graphs rebuilt by 0.5.5 raises nothing but its note on orphan nodes; the 31 builds take 16.1 to 16.6 s (14.6 to 15 s with 0.5.4).
- Untyped receivers, by what is asked of them. A parameter or local
with no type is the one type of the project that answers every member
used on it in its definition, when two names or more that are not the
language's own are used: Ruby
-
Native engine 0.5.4, the three things 0.5.3 still named as missing. 1,088 more edges on the 31 audit repositories and 71 gone, and 1,175 calls moved from one overload to another of the same name:
- Overloads (Java, Kotlin, Scala, C#, Swift, C++). A call was linked to
the first definition of a name; it is now the one that can take the call:
by the count of arguments (defaults and varargs counted), the name an
argument is passed under (
named(b = "x"),retries: 3, Swift's labels), and the type of each argument the site shows — a literal againstString/Int/Boolean, a typed local or a construction against a parameter typed by a class of the project.addParameter("value", String::class)no longer lands onaddParameter(parameterSpec). Constructors are chosen the same way: SwiftView(frame: f)andView(name: "x")are two constructors (462 calls in alamofire, where the site decided nothing before); a Kotlin primary constructor competes with the secondary ones; an overload marked@Deprecated/[Obsolete]gives way to one that is not. Kotlin annotations with arguments (@Deprecated("old")) are read as the decorators they are (303 references). - The receiver or the class around. Where a lambda's receiver and the
class around both have a method of the name, the arguments' types decide
(
buildCodeString { emit(this) }passes aCodeWriter, which only the outeremittakes); the guess remains for the calls they do not. - Results that are type parameters. A method returning the type
parameter its type binds to itself (
tag(x): TinTaggable<T : Taggable<T>>) returns the type it was called on. A local assigned a call handed a type (retrofit.create(Service::class.java),mock<Foo>(),sp.GetRequiredService<IFoo>()) is that type, when the function returns its own type parameter or is a library's and not named like a wrapper (listOf<Foo>()). - Kotlin
expect/actual: of the declarations of one extension, one per source set, the nearest to the caller, where several candidates used to mean none. - Untyped receivers in Ruby and Swift. A method named on a parameter or
untyped local is linked (
INFERRED) when no other type answers to the name: no property or field of it, noattr_reader/Struct.newmember / delegator, and not a name of the core library (shift,gsub,sorted).env.needs_body?is found;env.status, which a struct and a class both answer, is not guessed.
The audit on graphs rebuilt by 0.5.4 raises nothing but its note on orphan nodes; the 31 builds take 14.6 to 15 s (14.2 s with 0.5.3).
- Overloads (Java, Kotlin, Scala, C#, Swift, C++). A call was linked to
the first definition of a name; it is now the one that can take the call:
by the count of arguments (defaults and varargs counted), the name an
argument is passed under (
-
Native engine 0.5.3, what 0.5.2 still lacked. 1,859 more edges on the 31 audit repositories (calls 41,063 to 42,408), 121 gone, most of those a local taken for a function of its name:
- Kotlin locals were typed only when the declaration wrote a type. In
val c = Writer(out)the value sits beside the declaration, where the walk did not look:c.close()reached nothing, or a method of that name elsewhere. kotlinpoet gains 747 calls, such asspec.toString()to the right class'stoString. - A local keeps the chain it is assigned (
val b = builder(x).tag(y), Gores := c.R().SetBody(b)): it was dropped as untypeable, and is now typed by following what each call returns (528 calls in resty). Inside its own initializer a name is still the outer one (val builder = builder(x), Rustlet tls = tls::Config::builder()). - Results read from the body. A function that declares no result
returns what its
returns and expression body construct, when they agree (fun builder(n) = Builder(n), Pythonreturn Conn()besidereturn None,return self, the last expression of a Ruby method); a closure'sreturnis not the function's. Calls through such a result areINFERRED. In Ruby a name called without parentheses is followed the same way (stubs.match(env),s = stubs; s.match(env)), and a local, typed or not, is no longer read as a call of the type it holds. - Kotlin lambdas with a receiver. In
x.apply { … },x.run { … },with(x) { … }and a lambda passed to a parameter typedT.() -> R(buildCodeBlock { indent() }), a bare name is the receiver's member before it is the class's around.out.apply { emit("x") }inside anemitwas a call of itself. Where both have the name the receiver's is taken as a guess, unless it takes fewer parameters than the call passes or the call hands overthis(buildCodeString { emit(this) }). - Constructions typed by their declaration: C#
Box b = new(1, 2)and C++Buf b(3)/Buf b{3}call the type and its constructor (98 calls in cpr, 28 in the C# repositories). - A parameter or local of no known type is an unknown receiver: a method
only one type of the project has, near the caller, is
INFERRED(as it already was on the result of an unknown call). Not in Ruby and Swift, which have no import to say which type is meant. In Rust, a method of animpl Trait fora type of another crate is found on a local of that type (38 calls in ureq). - Routes in a framework's own repository. A file that takes the
framework by a relative path (
require('../../')in express's examples) imports it: the directory'spackage.jsonnames it. Bothgraphlore_routesand the native engine read such files now (express: no route to 53, and 139 route nodes with its tests' in the native graph).
- Kotlin locals were typed only when the declaration wrote a type. In
-
benchmarks/polyglot.py --engine nativeread whatever native graph was on disk: after an engine change it audited the previous engine's graphs, and the rerun reported for engine 0.5.2 had read 0.5.1's. It now rebuilds a graph built by another version of the engine and says so. It also no longer reports[Test],(an element of a list) or#[cfg(test)]on aletas a test the path rules miss, nor Ruby'sclass ActiveSupport::TestCaseas a span of another symbol. On graphs built by 0.5.3 the audit raises nothing but its note on orphan nodes. -
Native engine 0.5.2, the gaps the 0.5.1 comparison left (
callsrecall against graphify 82% to 84% on the 31 audit repositories; C# 80% to 93%, Ruby 60% to 66%, Kotlin 64% to 70%, Java 81% to 85%):- Extension functions and methods are members to their callers: Kotlin
property.toPropertySpec()(fun KmProperty.toPropertySpec()), C#realm.IsBlank()(static bool IsBlank(this string s), from a file that uses its namespace), andself.userinfo()in a Rustimpl Trait fora type of another crate.EXTRACTEDwhen the receiver's type is the one the extension is written for,INFERREDwhen one visible extension has the name. - A closure's parameters are scoped to the closure. They were locals of
the whole function: in Go,
roffunc(w http.ResponseWriter, r *http.Request)hid ther := chi.NewRouter()around it, and an untyped block parameter could name a function elsewhere (donein a test, linked to a library'sdone()). - Ruby. A bare name passed as an argument or as a pair's value
(
Article.new(article_params),status: status_code) and the receiver of a call (current_user.follow(@user)) are calls of the method, no longer anindirect_callor nothing;self.class.from(x)is the class's method. A module or class reopened in another file is one scope (Utils::Headers.new,Faraday::ParsingError.newandclass Far::Compactresolve). A method at the top level of a file the caller does not require is no longer in scope, and the name indef headers=(hash)is no call. - Anonymous classes.
new Callback<String>() { … }(Java) andobject : Listener<T> { … }(Kotlin): the method around constructs the type, the anonymous classimplements/inheritsit (also when the type is external), and no name lookup lands on the anonymous class itself. - Constructors. A construction is a call of the constructor the type
declares as well as of the type (
new RestRequest(url)→RestRequestand its.RestRequest(); Python__init__, JS/TSconstructor, Rubyinitialize, PHP__construct, Swiftinit), sographlore_impacton a constructor lists the code that builds the type. Of several overloads the one taking as many arguments as the site passes is named; when that picks none or several, only the type is.
- Extension functions and methods are members to their callers: Kotlin
-
Native engine 0.5.1, from comparing its graphs with graphify's edge by edge on the 31 audit repositories:
- A call in a field assignment inside a method (
self._uri = urlparse(url)in__init__,this.x = make()in a constructor) was recorded as the class's call, not the method's, sographlore_impacton the method missed it. Python'scallsrecall against graphify goes from 92% to 94%. - PHP variables were never typed:
$factory = new CurlFactory(); $factory->create()and a typed parameter's$given->release()now reach the class's method (PHP 81% to 90%;$xstays a variable and is never resolved as a function or class namedx). - A name bound to a required module or one of its members (
var parse = require('./utils').parse,const mongoose = require('mongoose')) is an import, not a variable or constant node:parse(v)is a call of the function again, and the binding is no longer listed as state. - A local whose value the walk cannot type hid nothing:
let mut pool = self.pool.lock().unwrap(); pool.get(…)was anEXTRACTEDcall of an unrelated top-levelget, and a parameter named like a function elsewhere (token_headers: dict, a minified bundle'st) was that function passed as a value. Such a local now hides the outer name (1,079indirect_calledges gone, nearly all in minified bundles); a bare call beside a typed local (baseUrl(…)besideString baseUrl), a local assigned from the function of its own name (let agent = agent();) and a field assigned in a method keep the outer meaning. - In Rust,
use super::*insidemod tests { … }was read as an import of the parent module's file, which put that file's names in scope and added an import edge to it. - In Swift, an
extension Session { … }in a module that only extends the type hid the type it imports:Session()and everything typed through it was unresolved in such a module (666 calls gained in alamofire's tests).
- A call in a field assignment inside a method (
-
benchmarks/compare_engines.pycompares an edge from a definition only the native graph has (a function nested in a method, the setter beside a getter) as an edge from the paired definition it belongs to; TypeScript'scallsrecall read 78% where 96% of graphify's calls were in the graph. -
graphlore_unreferencedandgraphlore_same_namesno longer take a native module-level constant for a class (it hangs off its file bycontains, as a class does); the nativekinddecides. -
graphlore_neighborslists both directions when two nodes link each other by the same relation (A references B and B references A); it dropped one. -
graphlore_pathandgraphlore_explainpass--graphto the CLI, asgraphlore_querydid, so withGRAPHLORE_OUT_DIRset they read the graph the other tools read instead of the CLI's defaultgraphify-out/. -
Ambiguous
.name()labels of functions bound to an object key ({ filter: () => … }in six test callbacks) are qualified byfile:linein member and neighbor lists; the barefilter()they got from their span told them apart no better than the label did. -
A Go function type written inside a map type (
map[string]func() hash.Hash) is no longer taken for a function namedstring, inspans.pyand in the native engine.
[0.6.0] - 2026-11-15
Every tool was run on 31 real repositories in 14 languages
(benchmarks/polyglot.py, docs/benchmark-polyglot.md). The changes below are
what that turned up: package APIs read in all fourteen languages, routes in
nine, a span engine checked on real code in each, and the conventions applied
everywhere. What is still missing is listed at the end of the report.
Added
- Package APIs for Kotlin, Scala, C#, Rust, Swift, C / C++, Ruby and PHP,
read from each file's imports (
import a.b.C,using A.B;,use a::b::{c},#include <curl/curl.h>,require 'faraday/utils',use A\B\C;). The project's own packages are left out per language: the packages and namespaces its JVM, .NET and PHP files declare (an exact match, so guzzle'sGuzzleHttp\Promisedependency is not mistaken for guzzle), its crates (Cargo.toml, pluscrate::/self::/super::and modules declared in the same file), gems, Swift targets and header directories. Java gained the same rule: retrofit's ownretrofit2.*packages were listed as external. - Routes for Kotlin, C#, Rust, Ruby and PHP, and JAX-RS for Java: Spring
and Ktor in Kotlin; ASP.NET Core controllers (
[Route("api/[controller]")],[HttpGet("{id}")]) and minimal APIs (app.MapGet, prefixes throughvar g = app.MapGroup("/api")); axum (.route("/x", get(h).post(h2)),.nest) and actix-web (#[get("/x")],web::scope/resource); Sinatra and the Railsroutes.drawDSL (resourceswithonly:/except:/param:and nesting,namespace,scope,root); LaravelRoute::chains (prefix,group,resource,apiResource) and Symfony#[Route]. Each is gated on its framework, and Java's JAX-RS on ajavax.ws.rs/jakarta.ws.rsimport so Retrofit's client@GETstays out. On eleven RealWorld-style sample applications every route of the spec is found (docs/benchmark-polyglot.md).config/routes.rbandroutes/*.phpare read even when the graph holds no symbol of them. scopeongraphlore_routes,graphlore_package_apis,graphlore_layersandgraphlore_tests_for, the four tools that read the whole graph without one. Their results carry thescopepayload and say what was left out.tests/fixtures/polyglot/: five languages and the graph graphify 0.9 built of them, so the suite runs onfile_type,community_name,case_of, closures, a Rust test module and a JS barrel — what the 5-node fixture cannot show.benchmarks/polyglot.py: runs all 33 tools, the resources and the prompts on pinned commits of real repositories in Python, JavaScript, TypeScript/TSX, Go, Java, Kotlin, Scala, C#, Rust, Swift, C, C++, Ruby and PHP, and reports what breaks an invariant (parseable JSON on every path, a cut that says what it left out, afile:linethat exists), what two tools disagree on, and where a language gets an empty answer its source contradicts.--baselinemarks findings new or gone against an earlier run. Results:benchmarks/results-polyglot.json; report:docs/benchmark-polyglot.md.- Every result that reports
truncatednow carries ahintnaming the argument to raise or the filter to add. Fifteen tools reported the cut and a count but not how to get the rest:god_nodes,surprises,search,subgraph,tests_for,locate,duplication_scan,freshness,diff,cycles,unreferenced,layers,same_names,package_apis,routes. graphlore_package_apisandgraphlore_routescount the source files they have no extractor for innot_read({".rs": 48}) and say so in the text. A Rust or Kotlin project used to get "no routes" in the same words as a project that has none.graphlore_communitiesshows each community'sname: the one set withgraphlore_set_labels/graphlore_label_communities, else the one graphify wrote on the nodes. A name written bygraphlore_set_labelswas visible in no tool. Members that share a label are qualified.graphlore_communities(limit=30, members=15): the largest communities, each with its most connected members first,sizeandmembers_left_out. It used to list every member of every community — a 280 KB reply on guzzle, in the second step of the onboarding flow.server.json, the manifest for the official MCP Registry (io.github.yasinyaman/graphlore, PyPI package, stdio, run asuvx --with graphifyy graphlore), and themcp-name:line in the README that the registry uses to verify PyPI ownership. Publishing there is a manual step after the first PyPI release;CONTRIBUTING.mdhas the commands.
Changed
graphlore_routesleaves test code out by default: got's tests register 1,354 routes on throwaway servers.scope="+tests"brings them back.- An Express-style row is labelled by the framework the file imports
(
fastify,koa,restify,polka), not alwaysexpress. graphlore_build()with no LLM key on a folder that holds docs: graphify 0.9 refuses it, so it runs again with--code-onlyand says the docs were skipped. A build withmode=asked for is not turned into another one.graphlore_explainandgraphlore_pathresolve a name before graphify sees it, and pass graphify the node id. graphify refuses a name several nodes share ("Ambiguous: matches 3 nodes"); the reply now says which node was used.- Dependencies upgraded.
uv.lockmoves to graphifyy 0.9.109 (from 0.8.39: what plugin users already got throughuvx), mcp 2.3, semble 0.7, tree-sitter-language-pack 1.25, ruff 0.17, mypy 2.4 and pytest 9.2. The floors inpyproject.tomlare now the oldest versions the suite passes with on Python 3.10:tree-sitter>=0.23andtree-sitter-language-pack>=1.11(1.9 and 1.10 return aLanguagethattree_sitter.Parserrejects, so the span engine had no grammar with them), andmypy>=1.12for development (1.11 crashes on mcp's sources). CI usesactions/checkout@v7,actions/setup-python@v7,actions/upload-artifact@v7andactions/download-artifact@v8(node 24). - The README is a short landing page: what graphlore is, quick start, the 12
leantools, the benchmark headline and an FAQ. The detail moved, unchanged, todocs/tools.md(all 33 tools, resources, prompts),docs/concepts.md,docs/configuration.md(toolsets, transports, the network table, environment variables) anddocs/benchmark.md. README links into the repository are absolute, so they work on PyPI. - Package and plugin metadata describe what the server is for and carry more
search keywords (
mcp-server,model-context-protocol,code-navigation,impact-analysis, ...);pyproject.tomlgains Documentation and Changelog URLs. - The server instructions, the docs and the shipped skill no longer name a
hidden_linkskey (removed in 0.5.1), and the docs describe the fields 0.5.0 added (not_fetched,did_you_mean,complete/beyond_hops,vendored_dirs). CONTRIBUTING.mdno longer recommendsruff format .(CI does not check formatting and most files are not ruff-formatted), and its project layout lists every module.
Fixed
- Express routes in a file that imports no framework. An Express app's
config/routes.js(module.exports = function (app) { app.get(...) }) imports nothing, so none of express-mongoose-demo's 26 routes were found; all are now. Without a framework import in the file, a call counts when its receiver is named like a router or is a parameter of the function around it, it has a handler argument, and some file of the project imports a server framework —axios.get('/x', {…})still does not.router.route('/x') .get(h).post(h2)chains are read too. - Rust tests inside a source file are tests.
#[cfg(test)] mod testsand#[test]functions (26 of ureq's 48 source files hold them) were production code totests_for, the production-before-tests order,-testsscopes andunreferenced'scount_test_references. A Rustmod { … }is a span, so a test's qualname readstests.it_works. - PHP imports are module-level instead of
unclassified(ausecannot be deferred). - Spans for a JS function wrapped in one call (
exports.create = async(function* …),const f = wrap(async () => …); 44 definitions in express-mongoose-demo), for anonymous Java and Kotlin classes (new Callback<Void>() { … },object : Callback<T> { … }) and RubyRequest = Struct.new(…) do … end. The skeleton of a Ctypedef struct { … } name;shows the closing line with the name. graphlore_unreferenceddoes not read a doc comment's@default/@exampleas a decorator, and counts a class as used when one of its members is called elsewhere: C# extension classes are never named at the call site (client.BuildUri(…)), so RestSharp's were all listed. The row saysused_through_members.- Kotlin had no spans at all. Its grammar names a declaration through an
identifier child, not a
namefield, so none of kotlinpoet's 2,009 definitions had a span:graphlore_fetchreturned one line,graphlore_skeletonnothing, and annotations were never read. Now 1,997 do. - A type written in a signature is no longer a definition. The span engine
took any node with a hint word in its type and a
namefield: TypeScriptReact.ComponentProps, Rustio::Resultand struct literals, Swift type annotations, Scala constructor parameters, a Cstruct config cfgparameter — and every PHP$parameter, becausesimple_parametercontains "impl". Such a one-line span sat on the definition's own line and won:graphlore_fetchreturned the first line of a function, and qualified names readFormMessage.ComponentProps. - A
.hfile that reads as C++ is parsed as C++ (the C grammar turned cpr's classes into errors: 146 of 558 definitions had a span, now 532). Function prototypes, methods declared in their class, typedefs, operators and functions behind a reference return type are spans. - C# and Java
records, Swiftprotocols,initanddeinit, and a JS function assigned to a member (res.send = function () {…},exports.x = …) are spans. graphlore_fetch,graphlore_skeleton(node=)and qualified labels take the span that starts on the node's line under the node's name, not the innermost one:enum Color { RED, GREEN }no longer answers a request forColorwith one of its cases.graphlore_skeletonheaders run on to the line that names the symbol. A Java, C# or Swift declaration starts at its first annotation, and GNU-style C puts the return type on a line of its own, so the header of 925 symbols was@Override,[Fact]orstatic intand nothing else.- Names scoped with
::(RubyFaraday::Utils::Headers, C++ and PHPSession::SetOption()) resolve by their last part and as a qualified key, instead of falling through to the substring match. - JS/TS imports through a barrel are no longer rejected. graphify links
import { X } from './dto'to the file that definesX; the import check compared the specifier with that file, founddto/index.tsinstead and dropped the edge as contradicted by the source — 113 of got's 797 import edges, sographlore_cycles,graphlore_layersandgraphlore_surprisesworked on a thinner graph. Re-exports (export … from,module.exports = require(…)) are followed through up to three files; a file the entry merely imports is still not accepted.require('../..')names the rootindex.js. - A C, C++ or Objective-C
#includeis module-level, like the imports of the other compiled languages; those edges wereunclassified. - Test files of more layouts are recognised: Gradle source sets (
jvmTest,androidTest), .NET test projects (Foo.Tests/),FooTests.java/FooTest.php/FooTestCase.swift, Rubyfoo_spec.rb,*_tests.cpp.graphlore_tests_forand the production-before-tests order depend on it. graphlore_unreferencedno longer lists collected tests as dead code: GoBenchmark…/Example…/Fuzz…functions, googletestTEST,…Tests/…TestCaseclasses andsetUp/tearDownfixtures are tests by name, and annotations that start the declaration itself (Java and Kotlin@Test, C#[Fact]) or use another syntax (Rust#[test]) are read as decorators. Compiler and lint attributes (#[must_use],#[derive],[Obsolete],@JvmStatic) do not count as a registration.graphlore_unreferencedno longer examines what no caller names: anonymous functions ({closure#3}— 866 of guzzle's roughly 900 rows), operators (C++operator[], Ruby[]=), constructors and destructors, and PHP magic methods (__invoke). Rubysuccess?/body=are looked up in the text assuccess/body, the way a caller writes them.- A node with no span of its own (a closure, a member declared without a body)
is qualified by where it lives:
sendDigest.{closure#3}(). Three closures in one method were all renderedAuthMiddleware.sendDigest(), the name of the method around them. - Relations graphify 0.9 writes are known:
defines(a class's field) andcase_of(an enum's case) are containment, so they form no cycle and are no reference;dispatches_to,references_constantanduses_static_propare code relations, sographlore_impact(relations="code")walks them. .mts/.ctsfiles count as source in every table;.swift,.ktsand.hxxhave a language family, sographlore_same_namesno longer compares a Swift class with every other language that had none.typeingraphlore_god_nodes,graphlore_searchandgraphlore_node_detailsfalls back to graphify 0.9'sfile_type; it was""on every row.graphlore_neighborslisted a self-loop twice.- A negative
limitlists nothing. It was used as a slice end, solimit=-1meant "all rows but the last": 471 KB fromgraphlore_searchon guzzle (search,surprises,validate,package_apis,routes,duplication_scan). graphlore_locate(top_k=0)raisedValueErrorfrom the semantic backend instead of answering.- When semble is installed but cannot build its index (the embedding model could not be downloaded), the error says so and quotes the reason, instead of "needs the optional 'semble' extra".
graphlore_buildaddscode_only=Trueto the error graphify 0.9 gives for a default build of a repository with docs and no LLM key, which names only the CLI flag.
[0.5.1] - 2026-11-14
Fifth round of feedback: 0.5.0 re-run on the same three repositories.
Changed
- Scoped results summarize the vendored/minified files they left out instead
of listing twenty paths on every call:
scope.left_outkeepsvendored_nodesandvendored_file_count, gives three example paths invendored_filesand the directories holding most of them invendored_dirs.graphlore_validatereturns the full list (vendored_files) and counts it in its text. graphlore_impact'scompleteis false only when the budget dropped rows within the hops asked for. A walk that listed everything withinhopsis complete even when nodes lie further out;beyond_hopsand the hint say separately whathops + 1would add.graphlore_locatelists each semantic cousin once, insemantic_cousinswithlinked: hidden links (linked: false) first, nearest first, then the connected ones. Thehidden_linkslist, which repeated the same entries, is replaced byhidden_link_count. Header chunks the answer skips are markedheader: trueinsemantic_hits.
Fixed
graphlore_surprisesranked a guessed edge from a file that imports nothing of the project at the top: anindirect_callfrom a module importing only the standard library, into an unrelated class in another layer. The graph records no import edge for such a file, and the name-guess rule only judged files it had import edges for. A file without recorded imports is now judged from its own import statements (ImportChecker.reaches: Python viaast, JS/TS via tree-sitter); when none can mean the target the edge is dropped and counted underinferred_unimported. A file whose source cannot be read is still not judged.
[0.5.0] - 2026-11-14
An agent's-eye review: results that say how they were reached, what they left out and whether their files changed; real MCP structured results; an offline switch; and a smaller default tool surface.
Added
-
Tool results carry MCP
structuredContentandisError. The payload a tool builds foras_json=Trueis now sent asstructuredContenton every call, text or JSON, and errors (node not found, missing graph, a failed CLI call,graphlore_fetchwith every name missing, a failedgit statusingraphlore_freshness) setisError: true. Tool functions still return a string;GRAPHLORE_STRUCTURED=0restores plain-text results. -
A name that matches nothing comes back with
did_you_mean: the closest node names (stdlibdifflib, pool bounded on large graphs), in the text and in JSON next tocode: "not_found".graphlore_fetchlists them per missing name. -
Every budget or limit cut says what it left out.
graphlore_fetchnames the requested nodes it did not fetch (not_fetched);graphlore_skeletonnames the files left out;graphlore_locatecounts the seed's direct neighbors left out of the structure and the callees past the five incalls_into;graphlore_search,graphlore_god_nodes,graphlore_surprisesandgraphlore_package_apisreporttotalandtruncated;graphlore_freshnessreports the real length of each capped list incounts; thegraphlore://community/{id}resource says when it shows 50 of more boundary edges. Each adds a one-linehint. -
graphlore_impactreportsbeyond_hops(nodes one hop pasthops) andcomplete, false whenever the budget or the hop limit cut the answer. -
Answers say which of their files changed since the graph was built.
graphlore_fetchentries carryfile_changed_since_build(true / false / null) andspan_mismatchwhen the graph's line in a changed file now lands in a different symbol — before, fetch silently returned that other symbol.graphlore_locate,graphlore_impactandgraphlore_subgraphcarrybuild_drift(known,since,changed_files) and a text line naming the changed files. It compares the recordedbuilt_at_commitwith the working tree in two git calls; without that commit or git it reportsknown: falseand why. -
graphlore_neighbors,graphlore_subgraphandgraphlore_locate's structure mark inferred / ambiguous edges (confidence) and edges graphlore resolved from the source (resolved_by), asgraphlore_impactalready did. -
GRAPHLORE_OFFLINE=1refuses what graphlore knows reaches the network:graphlore_add,graphlore_build(mode=...)andgraphlore_label_communities(method="cli")(whichautothen skips). A default build is forced to--code-only, the graphify subprocess loses the LLM backend keys from its environment,HF_HUB_OFFLINE/TRANSFORMERS_OFFLINEare set before semble loads, tiktoken is not loaded and only cached tree-sitter grammars are used. The boot banner printsegress=offlineoregress=on-demand, and the README has a table of every network path and what the switch does to it, including what it cannot constrain (the graphify binary itself, a custom semantic backend). -
Repository text in replies is framed as data.
graphlore_fetch,graphlore_skeleton,graphlore_node_detailsand thequery/path/explainpassthroughs put quoted code and text between=== repo text <nonce> ===markers whose nonce is random per call and redrawn if it occurs in the text, and JSON replies carrycontent_trust: "untrusted_repo_text"withuntrusted_fields.
Fixed
- The server instructions said only
graphlore_buildandgraphlore_addmodify state. They now list every writer (graphlore_prune(dry_run=False),graphlore_set_labels,graphlore_label_communities, the project switch), say when grep is the better tool, and that repository text is data.
Changed
- Breaking: the default tool surface is
lean. WithoutGRAPHLORE_TOOLSET, the server registers 12 tools (11 without a semantic backend) instead of 33.leangainsgraphlore_fetch,graphlore_impactandgraphlore_project, so it covers orient → find → traverse → blast radius → source. SetGRAPHLORE_TOOLSET=fullfor the review, naming, diff, routes, package-API and CLI passthrough tools. The Claude Code plugin pinsfull, so plugin users see no change. - An unknown
GRAPHLORE_TOOLSETvalue falls back toleanwith a stderr warning; it used to meanfullsilently. The boot banner prints the toolset and its tool count. - The server instructions and the
onboard/trace_bug/explain_flow/reviewprompts are rendered for the active surface and never name a tool that is switched off; a trimmed surface's instructions say how to get the rest. Replies that pointed at another tool (graphlore_surprises,graphlore_prune,graphlore_subgraph,graphlore_impact,graphlore_search) do so only when it is registered. - README: graphlore is not an agent memory and does not replace grep; the
benchmark states that it counts chars/4 (grep side: bytes) while the
server's budgets count chars/3.5. The shipped skill says when to use
rg. - No
outputSchemais advertised. Before, the SDK derived{"result": string}from each-> strsignature and sent the reply text inside it. - An empty answer is a result, not an error:
graphlore_searchwith no hits returns{"matches": [], "total": 0, ...},graphlore_locatewith no semantic hits returns{"query", "seed": null, "semantic_hits": [], "note"}, andgraphlore_communitieson a graph without communities returns{"communities": [], "note"}, in place of{"error": ...}. The text is unchanged. graphlore_node_details,graphlore_fetchandgraphlore_skeleton(node=)resolve names like the node-centric tools: a code definition before a doc heading of the same name, and amatchedblock naming the other candidates. They used to take the first exact or substring match silently, so the node they pick for an ambiguous name can change.- A substring fallback is reported everywhere (
matched.by: "substring"); before,'async'resolving toAsyncClientlooked like an exact hit.matchedgainsby(label,name,pathorsubstring).
[0.4.1] - 2026-11-14
Fourth round of feedback: 0.4.0 re-run on the three repositories of the earlier rounds.
Added
graphlore_projectandgraphlore_overviewprint the server version. A client keeps the tool schemas it loaded before a plugin update; a schema withoutscopenext to a current version number now reads as "start a new session", not as "the parameter does not exist".graphlore_locatereturnscalls_into: what the seed calls in other files, most specific callee first. The tool that exposes a behavior is often a thin wrapper over the module that implements it, and the graph knows that.
Changed
graphlore_locate'salso_matchedno longer lists hits on a file's header (its docstring and imports, before the first definition) — they are counted inheader_hits_skipped— and names the definition each hit falls in (qualname).graphlore_surprisesscores an inferred edge into a module the source file imports like an extracted one (the import resolves it; nobody guessed), and withholds the structural bonuses from a pair of directories that ten or more edges already join: an inbound adapter using the application layer is the architecture, not a finding.
Fixed
- Regression in 0.4.0:
graphlore_unreferencedlisted methods that a same-named caller calls. A route handlerremove_example()callingreview.remove_example(...)lives in a file that defines its ownremove_example, and 0.4.0 dropped every occurrence of a name in such a file. Only what can refer to the file's own symbol is dropped now — itsdefline and bare uses; an attribute access (obj.name,mod.name) still counts as a mention. - An import edge graphlore resolved from the source carried no line, so
graphlore_impactreported it at the importing file's line 1 as a definition. It now carries the line of the import statement and is reported as a reference site.
[0.4.0] - 2026-11-14
Second and third rounds of feedback: the 0.3.0 review recipe run on the same 774-file repository through the MCP tools, then a side-by-side run with the hosted Graphify connector on this repository.
Added
- Calls through an imported module are resolved from the source. graphify's
local extractor records
from pkg import f; f()but notfrom pkg import mod; mod.f(), nor often the import ofmod— so a tool that four tests call asserver.graphlore_unreferenced(...)had no caller and no test in the graph. Newresolve.pyadds those call edges (following re-exports) and the missing module imports at read time, markedresolved_by: "graphlore"; graph.json is never modified.graphlore_impact,graphlore_neighbors,graphlore_subgraph,graphlore_tests_for,graphlore_unreferenced,graphlore_cyclesandgraphlore_layersread them, andgraphlore_validatereports how many there are. Per language it adds what the extractor is seen to leave out: in Python every call through a module object; in JS/TS calls through a default import and through a dynamically imported module (namespace imports andrequireare already linked); in Go and Java nothing, graphify links those itself. One parse per Python and JS/TS file, once per process;GRAPHLORE_RESOLVE=0turns it off. graphlore_tests_for— the tests that exercise a symbol:direct(they call it, with the call line),through_one_caller(a production function or a test helper in between), andweakmatches kept apart (a test file that imports its module, a test named after it).graphlore_impact,graphlore_subgraphandgraphlore_neighborstake thescopeargument (-tests, a path prefix, ...). Unlike the audit tools they leave nothing out by default.graphlore_impact(strict=True)walks only edges the extractor resolved; every row carries its edge'sconfidence(andresolved_bywhen graphlore added the edge), and inferred rows are marked in the text.graphlore_locatelists the other top hits under the seed (also_matched, production code before tests).graphlore_cyclesclassifies import cycles by when their imports run. Each import edge is read back from the importing file (newimports.py):runtimecycles — a loop of module-level imports, the ones that can fail at start-up — come first, thendeferred(the loop needs an import inside a function) andtype-only(it needs one underif TYPE_CHECKING:). Each cycle carriesimport_kindandhops(the kind of every import on its loop), the payload addsruntime_/deferred_/type_only_import_cycle_count, and a repository without a runtime cycle says so in one line. Python is read withast; JS/TS with tree-sitter (import()orrequireinside a function is deferred,import typeis type-only); Go, Java, Kotlin, Scala, C#, Rust and Swift import at compile time and are always module-level. An import in any other language counts as module-level — unless the graph recorded it on a function, which makes it deferred — and the result says so when a reported runtime cycle rests on one.graphlore_duplication_scanhas an exact tier,identical_bodies. Every function and method body is hashed after normalizing whitespace, comments and the docstring (Python viaast, other languages via tree-sitter), and bodies that occur more than once are reported as groups withfile:linefor each copy. No model, and it covers the small helpers that the semantic tier's largest-first seeding never reaches. Without the[semble]extra the tool now returns this tier instead of an error.graphlore_same_namesreportsused_in_own_filefor each copy and takesacross_languages.graphlore_layersviolations carryimport(module-level / type-checking / deferred), and the result listsrejected_imports.graphlore_unreferencedrows carryalso_definedwhen another definition shares the name.- README: start a new session after updating the plugin — a client keeps the tool schemas it loaded before the update.
Changed
graphlore_impactandgraphlore_subgraphput production code before tests. Rows at one distance were alphabetical, so a hub function's budget went to test helpers named_buildand_graphand no production caller was shown. They are now ordered non-test first, then most connected, and a truncated result says how many rows (or direct neighbors) were dropped and how many of them were tests.graphlore_neighborsis ordered the same way.- An ambiguous name is no longer resolved silently in
graphlore_impact,graphlore_subgraph,graphlore_neighborsandgraphlore_tests_for. A name shared by several nodes — a function and a README heading, twoSettingsclasses — resolves to a source definition first, and the result says "Matched N nodes ...; using X" with the others' ids (matchedin JSON). A bare name matches its callable (graphlore_locatefindsgraphlore_locate()), a path names its file's node, andClient.sendprefers the method of that class. - An empty answer from those tools says that no edge was indexed — not that the code has none — and what kinds of call the index cannot see.
graphlore_duplication_scanleaves out semantic pairs scoring under 0.7 on the semble backend (min_score=0lists them) and says what the score is. On the reporting repository every pair between 0.49 and 0.64 was two classes with the same role, not copied code. A custom backend gets no default floor.graphlore_same_namescompares names within one language family, and reads nesting from the source: a closure that graphify hangs directly on its file is no longer compared with top-level functions.graphlore_surprises: a script nothing depends on counts as a consumer even when its directory is depended upon (docker/smoke/make_catalog.py), consumer detection ignores resolver guesses, and anything test code uses — shared test fakes in another test directory included — is routine coupling. Non-test code that depends on test code keeps its bonuses.graphlore_unreferencednames the base in its hook note ("method of a subclass of NodeVisitor") and gives it only when that base can call the method: a base outside the project, or a project base that defines or mentions a method of that name.
Fixed
- "Nothing depend on ..." now reads "Nothing depends on ...".
- A third-party import linked to a first-party module of the same name —
import yaml(PyYAML) recorded by graphify as an import ofpkg/.../export/yaml.py, orimport mcpas an import ofmcp.json— was reported as a layer violation and could close an import cycle. Import edges are now checked against the importing file's own statements before they are lifted to file level: an absolute import can only mean a module whose dotted path starts in a directory that is not itself a package, and a bare one-word import only one that starts at the project root, a source root, a distribution root or a directory above the importing file. The JS/TS equivalent: a relative specifier is resolved to its file, a bare one-word specifier is an npm package, and a path alias is kept. Rejected edges are counted and shown, ingraphlore_cycles,graphlore_layersandgraphlore_surprises. graphlore_unreferencedmissed a dead class when another class had its name. The text cross-check counted the other class and its uses as mentions. A file that defines its own symbol of that name is now left out of the count.graphlore_unreferencedmarked methods of a class whose only base isABCas possible hook overrides. Marker and data bases (ABC,Protocol,BaseModel, exceptions) no longer trigger the note.- A label that already carried its location was printed with it twice in
graphlore_duplication_scanandgraphlore_unreferencedrows (Settings (a.py:L35) (a.py:35)). - An ambiguous top-level function label lost its
()when qualified and was left ambiguous (runfor bothrun()); it is now shown asrun() (file:Lline).
[0.3.0] - 2026-11-14
Feedback from a review session on a 774-file Python + JS repository (graphify
0.9.108, 13,159 nodes): the analysis tools were dominated by code that was not
the project's own, a graph built by path could not be read, and reviewing a
codebase took hand-written scripts over graph.json.
Added
graphlore_project— shows the directory the server reads and switches it to another one. A second repository (or one just built withgraphlore_build("/abs/path")) no longer needs a second server. Changes no file; refused underGRAPHLORE_RESTRICT_PATHS, so never available over HTTP.- Analysis scope.
graphlore_god_nodes,graphlore_validate,graphlore_cycles,graphlore_surprisesandgraphlore_duplication_scantake onescopestring: path prefixes or globs to keep,!patternto drop,-tests,+external,+vendored,all. Every result carries ascopeobject and a closing line saying what was left out. graphlore_unreferenced— dead-code candidates: definitions with no incoming graph reference, not registered by a decorator (routes, click/typer commands, validators, fixtures — read from the graph's decorator edges and from the source lines above the definition, in any language the span engine reads), and not mentioned anywhere else in the repository's text. Each withfile:lineand a mention count; public methods of classes other files use are marked "may be API".graphlore_layers— checks import edges against layer rules ({"layer prefix": ["prefixes it may import"]}, inline or from a JSON file in the repository,.graphlore-layers.jsonby default) and returns the violations grouped by layer withfile:line.strict=Truealso objects to imports into files outside every declared layer.graphlore_same_names— classes and top-level functions that share a name across modules, with how many modules import and reference each copy. Exact, no embedding model.- A
reviewprompt and a "Reviewing a codebase" recipe in thegraphlore-exploreskill: validate → import cycles → layer rules → unreferenced code → same-named symbols → hotspots → surprises. graphlore_build(verbose=True)returns the full CLI log.graphlore_duplication_scangainsinclude_testsandmin_score.
Changed
- Vendored, minified and external code is left out of the analysis tools by
default. Files under
vendor//node_modules//third_party/, files named*.min.jsor carrying a build hash (decorate-BgofJUJ5.js), JS/CSS whose lines are too long to be hand-written, and nodes standing for external packages or unresolved names (typing,pytest,_) no longer rank as god nodes or show up as cycles and self-loops.graphlore_overviewranks its god nodes the same way.scope="all"restores the old behaviour. graphlore_cyclesreports by relation kind: import cycles between modules first (import edges lifted to file level; a module's import of its own package__init__is ignored), call cycles after, then cycles that only close through another relation.kind="imports" | "calls" | "other"asks for one. Each group now carries one concrete loop (path) and itskind; the payload addsimport_cycle_count/call_cycle_count/other_cycle_count. A repository with no import cycle says so in one line. Previously every relation was mixed into one list of node groups.graphlore_buildreturns the build's counts and warnings instead of the raw CLI log (progress ticks and stage banners are counted, not printed). It also reports when the graph was written somewhere this server does not read — graphify writesgraphify-out/inside the folder it is given, so a sibling repository or a subfolder leaves the read tools on the old graph or on none — and names thegraphlore_projectcall that switches to it. Two more notes appear when they apply: vendored/minified files found in the graph (with the.graphifyignorehint), and agraphify-out/that git neither ignores nor tracks. It writes no.gitignoreitself: graphify supports a committed graph, so whether to ignore the directory stays the repository's decision.graphlore_duplication_scancompares definition with definition. Seeds are functions, methods and classes (largest bodies first) instead of the most connected nodes, each anchored to the chunk holding its own source rather than to whatever chunk mentions its label. A neighbour is kept only if it is a definition of the same kind and a similar size and structurally distant. Pairs carry the similarityscoreanda_site/b_site(file:line), best score first; test ↔ source pairs are left out unlessinclude_tests=True.graphlore_surprisesscores a directory nothing depends on (bench/,demo/,examples/) using a package that several directories depend on as expected coupling, and drops an inferred edge whose source file imports neither the target's module nor its package (the resolver matched a name).graphlore_impactleaves docstring/rationale nodes (rationale_for) out of the blast radius and counts them inrationale_nodes_skipped; name the relation inrelationsto walk them.graphlore_validatecounts a function calling itself asrecursive_calls, not as aself_loopsissue.- The descriptions of
graphlore_locateandgraphlore_duplication_scan, the README and the semble-missing error now say that the first semantic call downloads semble's embedding model from the Hugging Face Hub, and give the command that fetches it ahead of time. The source no longer calls that path "offline".
Fixed
graphlore_buildannouncedgraph.json readyfor the project's own, older graph after building a different folder, and said nothing at all when the project had no graph.- A package entry file labelled with part of its path (
pkg/__init__.py, as graphify >= 0.9 writes it) was not recognized as a whole-file node, sographlore_surprisesscored edges it should have skipped. - README told users to
pip install graphlore, but the package has never been released on PyPI, so the command failed. Installation now shows the GitHub form that works today (pip install "graphlore @ git+https://github.com/yasinyaman/graphlore"). mypyfailed inside theuv.lockenvironment (uv run mypy): the pinnedtree-sitter-language-packtypesget_language's argument as aLiteralof grammar names whiledetect_language_from_pathreturnsstr. The one call site carries a targeted ignore. CI, which installs unlocked, stayed green.graphlore_surpriseswas effectively dead on every AST-built graph. It keyed on asurprise/is_surpriseflag no graphify writer emits, and its only fallback needed community info those graphs also lack — so it printed an empty list under a header that read as "this codebase has no surprising couplings". It now scores cross-file edges itself (confidence, file-type / directory / community crossing, peripheral→hub), suppressing resolver noise and routine test↔source coupling, and reports abasisofflagged/computed/none— the last naming exactly which signals are missing instead of implying a clean codebase.graphlore_overviewno longer asserts "0 surprise edges" when the graph simply carries no flags.graphlore_impactwalked every edge type and reported no reference site. It gainsrelations=(presetsall/code/calls/imports/types, or literal relation names, orthogonal todirection; an unmatched filter names the graph's actual vocabulary instead of returning nothing) and each row now carries the traversed edge's recorded position, markedsite_kind=referenceordefinitionso a definition line is never misread as a call site. When a filter excludes containment, the node's own members are seeded so a class's methods stay reachable.- Docs corrected against an audit of the wrapped CLI: token budgeting, HTTP auth, multi-project serving and general graph navigation exist in Graphify's own embedded MCP server and are no longer presented as things graphlore adds. The README now states the real differentiator (the span engine and what it makes possible) and the honest limits (no extractor, one project per process, no PR tooling).
graphlore_package_apis(JS/TS): clearly-internal import sources are no longer counted as npm packages — absolute paths (/lib/x, whose "package" was the empty string), package.json#subpath imports, and the common bundler aliases~/xand@/x. A scoped@app/utilsis still counted: without reading tsconfig it is indistinguishable from a real scoped npm package (documented over-approximation).benchmarks/multilang.pyno longer aborts the whole run (discarding every measured repo) when a REPOS entry's graph is missing — the row is skipped with a stderr note, since the documented setup only builds a subset. The freshness table also stops claiming "expect False" for the token-change fallback edit, which is a comment in the C-family (expectation unreliable) — the row is flagged instead.- The CLI-backed tools (
graphlore_query/path/explain) and_run_cli's plumbing (arg wiring incl.--graph, missing-binary message, timeout, exit-code formatting, exec-OSError) are now covered by tests — previously three registered tools had zero coverage. - Rename leftovers in the docs artifacts:
docs/benchmark.html,docs/benchmark.tr.htmlanddocs/benchmark.svgstill titled/labelled the projectgraphify-mcp; they now saygraphlore(matching the final rename — the intermediatecodegraph-mcptitle never shipped).
Changed
- README rewritten for the graphlore surface — restructured around the
locate-first workflow, tools/tables refreshed for all 28
graphlore_*names and the newer behaviors (junk-file-tolerant freshness, qualified ambiguous labels, pluggable semantic backend, watcher), project-layout/dev sections updated (mypy in CI), and the "Comparison — when to use which" section removed.docs/benchmark*.html/.svgretitled fromcodegraph-mcptographlore(measurement numbers untouched). - Internals: one confinement boundary, indexed lookups. The PROJECT_DIR
confinement check that five per-file analyzers hand-copied is now a single
spans._resolve_in_project(), and the span/API/route per-file caches share one_cached_file_analysis()pipeline (same mtime-keyed, bounded-FIFO semantics)._resolve_node's exact id/label pass and_node_for_location's same-file lookup are served from indexes cached on the nodes-list identity (the_ADJ_CACHEscheme) instead of rescanning all N nodes per call — the latter ran once per semantic hit / route row / duplication pair. - Ambiguous node labels are qualified at render time. graphify labels
methods bare (
.auth_flow()), so distinct nodes across classes/files used to render identically in subgraph arrows and node lists. Wherever a label is shared by more than one node, tools now show the span-recovered FQN (DigestAuth.auth_flow()), falling back tolabel (file:Lline)when no span is available; unique labels are untouched. Lazy + memoized (only ambiguous ids that actually render pay the parse cost) and cached per loaded graph — this also collapses the eleven per-tool{id: label}rebuilds into one shared_display_labels()helper. - Tool surface renamed:
graphify_*→graphlore_*(and the resourcesgraphify://…→graphlore://…), completing the package rename below so the commands an assistant sees carry the product's own name. All 28 tools are affected (graphlore_locate,graphlore_build, …); the bundled explore skill moved tographlore-exploreaccordingly. Thegraphify-out/output directory and.graphify_labels.jsonkeep their names — they are artifacts of the wrapped Graphify CLI (graphifyy), not this package. - Environment variables renamed to
GRAPHLORE_*, withGRAPHIFY_*as a legacy fallback. All settings (GRAPHLORE_PROJECT_DIR,GRAPHLORE_TOOLSET,GRAPHLORE_TRANSPORT, …) now read the new spelling first via oneconfig.env()accessor and fall back to the pre-renameGRAPHIFY_*names, so existing configs keep working; when both are set,GRAPHLORE_*wins. Server messages/docs lead with the new names; the bundledmcp.json/claude_desktop_config.jsontemplates are updated. - Project renamed:
graphify-mcp→graphlore(before any PyPI release, so no published users are affected). The Python module is nowgraphlore, the MCP server announces itself asgraphlore, and the console script is the baregraphlore— the collision with thegraphify-mcpscript thatgraphifyyships (which forced the oldgraphify-mcp-serverentry point) is gone. The repository moved togithub.com/yasinyaman/graphlore; old GitHub URLs redirect. (An intermediate rename tocodegraph-mcplived for a day and was dropped: "codegraph" is already crowded in the MCP niche — codegraph-ai/CodeGraph, two GitHub repos literally named codegraph-mcp, plus codegraph and codegraph-mcp-server on PyPI.) - Upgraded to MCP Python SDK v2 (
mcp>=2.1,<3.0, was>=1.26,<2.0). The server now builds onmcp.server.mcpserver.MCPServer(v1'sFastMCP); tool and prompt surfaces are unchanged. Notable internals:- Server version is passed as
MCPServer(..., version=...)instead of the old private_mcp_server.versionoverride. ToolAnnotationshints use the v2 snake_case field names (read_only_hint,destructive_hint).- HTTP transports take host/port per call (
mcp.run(transport=..., host=..., port=...),streamable_http_app(host=...)) — v2 removedsettings.host/port. Thehost=passed to the app factories also feeds the SDK's DNS-rebinding protection, which auto-enables on loopback hosts. - Host-LLM sampling (
graphlore_label_communities,graphlore_sampling_status) now names all communities in one batchedsampling/createMessagerequest (a JSON name map) instead of one request per community, and picks its transport per protocol: on 2026-07-28+ (no in-call back-channel) a v2Resolve/Sampleresolver carries the request as input-required rounds; on older protocols the tool body samples directly over the back-channel, preserving the pre-v2 graceful degradation — a failing host model yields placeholder names plus a note instead of erroring the call. (On the resolver path that degradation is impossible:Samplehas no error arm, so a host-model failure surfaces as a tool error there.) Unusable or partial replies degrade to placeholder names with an explanatory note, and an empty naming batch (limit=0) no longer sends a request at all. - The test suite drives tools through the v2 in-process
Client(the v1create_connected_server_and_client_sessionhelper is gone).
- Server version is passed as
Added
- Claude Code plugin + marketplace. The repository root is now a Claude
Code plugin (
.claude-plugin/plugin.json) listed by its own marketplace (.claude-plugin/marketplace.json), so/plugin install graphlore --marketplace yasinyaman/graphloreadds the MCP server and thegraphlore-exploreskill in one step. The server is launched withuvxfrom the plugin's own copy of the source (extrasgraphify,treesitter,semble;uvrequired), so the server always matches the installed plugin version, andGRAPHLORE_PROJECT_DIRis set to the opened project. A test keeps the manifest version equal toserver.__version__. - PyPI publish workflow (
.github/workflows/publish.yml): publishing a GitHub release builds the sdist and wheel and uploads them with PyPI Trusted Publishing (no stored token), refusing when the release tag and thepyproject.tomlversion differ. The one-time PyPI setup and the release steps are in CONTRIBUTING.md under "Releasing". code_onlyflag ongraphlore_build— appends the CLI's--code-only, so a repo containing doc/paper/image files can be indexed via local AST with no LLM API key (those files otherwise demand semantic extraction and the build errors without a key).- README "Comparison — when to use which" section: an honest side-by-side with colbymchenry/codegraph (same goal, different trade-offs: verbatim-code mega-tool vs token-budgeted map, structural-only vs semantic hidden_links, watcher vs git-aware freshness), plus one-liners on Graphify's embedded MCP server and semble's own MCP server as complements.
- Benchmark call/read metrics +
--json—benchmarks/multilang.pynow also measures the agent-efficiency axis: locate = 1 tool call / 0 file reads vs the naive baseline's 1 grep + N file-read calls (N = the files the same grep matches, so both metrics share one baseline), and--json PATHpersists the full result set. The 2026-08 re-run (semble 0.5.5) is committed asbenchmarks/results-multilang.json— the first persisted benchmark artifact — and the README /docs/benchmark*.htmlcross-language tables now carry a "Calls (locate vs naive)" column (89–95% fewer calls; span-join percentages follow the overload-family re-count above). graphlore_routes— framework route → handler table: which URL patterns hit which code, each row joined back to its graph node and qualified name (GET /items/{id} -> read_item (app.py:5)). Recognizes the common registration idioms per language — Python: Flask@app.route/ Flask-FastAPI verb decorators (labelled by the file's imports) / Djangopath()-family (gated on a django import, so a localpath()never registers); JS/TS: Express-style verb calls (plain-identifier receiver + leading-/literal, which keepsmap.get('key')out) and NestJS@Controller+@Get; Go: gin/echo/chi verb methods,Handle/HandleFuncwith Go 1.22"GET /x"patterns split into method + path, and chiRoute(...)closure nesting with prefix propagation; Java: Spring@GetMapping-family and@RequestMapping(class prefix joined). Scans the files the graph knows plus anyurls.pythe graph missed (capped, pruned walk). An honest lower bound: dynamic registration, chained builders (router.route().get(), gorilla.Methods()) and variable-bound group prefixes are invisible. Python via stdlibast; JS/TS, Go and Java via the optional[treesitter]extra. Newroutes.pyengine module with a bounded per-(path, mtime) cache and a publicroutes_for_source(src, rel)seam, mirroringapis.py.GRAPHIFY_TOOLSET=locate— a minimal, mega-tool-style surface of five tools:graphlore_locate(the one-call orient),graphlore_fetch(map → code), plusgraphlore_overview/graphlore_build/graphlore_freshnessto stay oriented and in sync. Inspired by single-tool code-graph servers where a smaller surface measurably improves tool selection. Needs a semantic backend (the[semble]extra orGRAPHIFY_SEMANTIC_BACKEND); without one the server falls back to the lean surface with a stderr warning instead of advertising a locate tool that can only return an install hint.graphlore_overviewnow suggestsgraphlore_locate(...)first whenever it is on the active surface, so the trimmed mode keeps a non-emptysuggested_next.GRAPHIFY_ALLOWED_HOSTS— Host-header allowlist for the HTTP transports' DNS-rebinding protection (comma-separated,:*port wildcards;*disables it). The MCP v2 SDK auto-enables that protection with a loopback-only allowlist when the server binds a loopback host, which rejects reverse-proxied requests whoseHostwasn't rewritten; this variable is the escape hatch (v1 enforced no Host check).graphlore_package_apis— symbol-level external API surface: which names each external package is actually used for ("usesDepends,APIRouterfrom fastapi", not just "imports fastapi"), the input a version-upgrade audit needs. Captures from-imports and attribute access through import aliases (np.array(...)→numpy: array) plus qualified paths (numpy.linalg.norm) from real use sites; an honest lower bound (dynamic import /getattr/import */ wrapper indirection are invisible). First-party packages are detected and excluded. Python via stdlibast; JS/TS, Go and Java via the optional[treesitter]extra. Newapis.pyengine module with a bounded per-(path, mtime) cache like the span index.api_uses_for_source(src, rel)— public, stable entry point for external consumers (importable from the package root): the same extraction on a source blob you already hold, with no file IO / caching / project-dir confinement. The underscore-prefixed extractors behind it remain internal.- Seven new analysis tools:
graphlore_impact(reverse-dependency blast radius, ordered by hop distance),graphlore_duplication_scan(repo-wide hidden-link audit — semantically similar but structurally distant pairs),graphlore_fetch(hydrate a node's source, token-capped),graphlore_skeleton(def/class signatures with bodies stripped),graphlore_diff(file-level structural changeset between two git refs, cosmetic-only changes separated),graphlore_prune(drop phantom nodes for deleted/renamed files — the surgical alternative to a rebuild,dry_runpreview), andgraphlore_cycles(Tarjan-SCC dependency cycles). - Pluggable semantic backend:
GRAPHIFY_SEMANTIC_BACKENDselectssemble(offline default) or anymodule.path:Factoryimplementing theSemanticIndexprotocol (search/find_related);graphlore_locateandgraphlore_duplication_scandispatch through it. - Opt-in filesystem watcher:
GRAPHIFY_WATCH=1re-syncs the graph on structural source changes (cosmetic edits ignored), debounced viaGRAPHIFY_WATCH_DEBOUNCE; ships as the optional[watch]extra (watchdog).
[0.2.0] - 2026-06-22
Added
graphify-mcp-serverconsole script andpython -m graphify_mcpentry point, both collision-free with thegraphify-mcpscript thatgraphifyyalso ships.- Boot banner on stderr at startup —
graphify-mcp vX.Y.Z | transport=… | toolset=… | project=…— so it's immediately clear which server (and project dir) a client connected to, even whengraphifyy's same-named script is around. - Lightweight
graph_agefield ongraphify_overviewandgraphify_subgraph(e.g. "built 3 commits ago" / "built at HEAD" / "built at an unreachable commit") so staleness is visible without a separategraphify_freshnesscall. Git-only and cheap;nullwhen there's no recorded build commit or no git repo. README now documents a first-class post-commit-hook auto-update flow to keep the graph fresh automatically. graphify_label_communities— names Leiden communities via host-LLM MCP sampling (no server API key), a backend key (method="cli"), or placeholders.graphify_sampling_status— capability test reporting whether the client supports sampling, whether a backend key is set, and the preferred method.
Removed
- The bare
graphify-mcpconsole script (shipped in 0.1.0).graphifyyships a script of the same name, so a baregraphify-mcpresolved to whichever package installed last and could silently launch the wrong server. Breaking: invoke the server viagraphify-mcp-serverorpython -m graphify_mcpinstead.
Fixed
graphify_node_detailsnow reads the source line from graphify's realsource_locationfield (e.g."L295"), not justline/lineno/start_line, sofile:linereferences resolve against actual graph output.- Server now reports its own version over MCP instead of the
mcplibrary's. graphify_subgraphno longer re-serializes the whole edge list on every edge during the budget check — a running counter replaces the O(n²)json.dumps.graphify_freshnessnow detects newly-added untracked files (viagit status --porcelain), compares against graphify'sbuilt_at_commit(robust across checkouts where mtime resets), and ignores its owngraphify-out/output.graphify_overviewandgraphify_surprisesnow share one surprise-edge definition (_is_surprise_edge); an INFERRED confidence is no longer miscounted as a surprise, and the two tools agree.- Span extraction no longer mistakes a call/invocation for a definition. A
Java
method_invocation(and C#invocation_expression, Rubymethod_call, PHPfunction_call_expression, …) exposes the callee under anamefield, so a call likeget(u)inside a method body used to leak in as a phantom symbol (Class.method.get) and pull chunk resolution to it. Caught by the new Java golden span test.
Changed
- Internal refactor (no behaviour change): the 2,000-line
server.pyis split into layered modules —config.py(sharedPROJECT_DIR),graph.py(graph.json load + node/edge/traversal helpers),spans.py(the tree-sitter/ast span + structural-diff engine) — leavingserver.pyas the MCP surface (tools/resources/prompts). Same 108 tests, same benchmark numbers. _load_graphcaches the parsed graph by path + mtime, so a multi-MBgraph.jsonisn't re-parsed on every tool call.- Community-naming sampling
max_tokensraised 16 → 24 to avoid clipped names. - Token budgeting is now conservative:
~3.5chars/token (vs the old4.0) plus a JSON-envelope allowance, soapprox_tokensandbudget_tokensreflect the whole returned payload and stop systematically under-reporting. Documented as an estimate (±~20%). Optional exact counting via the[tiktoken]extra +GRAPHIFY_TOKENIZER=tiktoken(the budget cap stays heuristic, so it's fast either way; the reportedapprox_tokensbecomes exact). - Tightened the
mcpdependency bound from>=1.2.0to>=1.26,<2.0. The server uses streamable-HTTP, tool annotations and host-LLM sampling, which the old floor didn't have (it installed but failed at runtime); the upper bound guards against a breaking 2.0 SDK. Tested against mcp 1.26–1.27. - Docs: the benchmark numbers now carry an explicit sample-bias note (every repo
measured is an HTTP-client library, so results may differ on other architectures),
and the HTTP hardening section documents the no-shell subprocess invocation and the
GRAPHIFY_TIMEOUTknob for shared deployments. - Pinned the optional tree-sitter extras:
tree-sitter>=0.22,<1.0(the stableParser(Language)core API) andtree-sitter-language-pack>=1.6,<2.0(the bundled grammars churn, so the 1.x cap keeps golden span tests from silently regressing on a grammar update). Added per-language golden span tests for Java and TypeScript (Python · JS · Go · Rust · C++ already covered). - CI now runs mypy (non-strict baseline over the package) and pytest with
coverage (term + XML report, floored at 80% via
--cov); push-CI also fixed to trigger onmaster, the actual default branch. Toolannotations=now use typedToolAnnotationsobjects instead of plain dicts, so the type checker validates the tool metadata FastMCP turns into each tool's schema. Added a corrupt-graph.jsontest alongside the existing missing-graph / unreachable-built_atones.
Added (transport & hardening)
- Optional HTTP transport:
GRAPHIFY_TRANSPORT=streamable-http|sseserves overGRAPHIFY_HOST:GRAPHIFY_PORT(stdio stays the default). - Opt-in build-path containment via
GRAPHIFY_RESTRICT_PATHS; auto-enabled whenever an HTTP transport is selected, so a network client can't drivegraphify_buildto extract arbitrary paths. graphify_overviewnow reportsid_collisionsand warns when distinct nodes collapse to one id (degrees/neighbors would otherwise be silently understated).graphify_validate— read-only graph linter: dangling edges (endpoint not in the node set), duplicate edges, self-loops, and orphan (degree-0) nodes.graphify_freshnessnow returns arecommended_action(fresh / update / rebuild) with areason: deletions, renames, or a large change set steer to a full rebuild, since incrementalupdatecan't drop nodes for removed code.graphify_freshnessnow verifies that the recordedbuilt_at_commitis actually reachable in the clone (git cat-file -e). When it isn't (shallow clone, gc, rebase or squash), it reportsbuilt_commit_reachable: falseand recommends a full rebuild — incremental update can't trust an unknown base — instead of mislabeling it "an older commit" and offering an update.- Fixed a latent bug in
graphify_freshness's changed-file list:_gitstripped the leading status column, mangling the first file name for unstaged modifications/deletions (M/D)._gitnowrstrips only. graphify_locate(optional[semble]extra) — joins semble semantic search to the graph: NL query → enclosing node → token-budgeted subgraph, plushidden_links(semantically similar but structurally disconnected code, with hop distance). Refactored the subgraph BFS into a shared_bfs_subgraphhelper. The chunk→node join prefersfile_type == "code"symbols over docstring (rationale) /documentnodes and uses the chunk's full line range, so a seed resolves to the enclosing function/class, not a docstring node.graphify_set_labels— assistant-driven community naming: the calling assistant pushes{id: name}(no key, no sampling — works in clients like Claude Code that lack sampling), persisted to.graphify_labels.jsonand patched intograph.html. Surfaced as the fallback ingraphify_label_communitiesandgraphify_sampling_statuswhen sampling/keys are unavailable.
Added (canonical span join)
graphify_locate's chunk→node join is now span-based, not single-point. Graph nodes carry only onesource_locationline (no end-line), so the old "greatest line ≤ chunk-start" heuristic could attribute a chunk to a function that had already ended, or fall back to the whole-file node._node_for_locationnow resolves a semble chunk to the def/class whose real line range encloses it — via a decorator-aware AST span pass (stdlibast, Python files; zero new deps) — then maps that symbol to its graph node, walking outward to the nearest enclosing symbol that has a node. The point heuristic remains the fallback for non-Python files or when no source is on disk. Measured on httpx: true containment rose from ~86/108 to 101/108 sampled chunks; the rest are module-level-start chunks resolved to the first symbol they introduce.graphify_locateseeds now include a span-recoveredqualname(FQN, e.g.AsyncClient._send_single_request), disambiguating same-named symbols.- The AST span pass is confined to
PROJECT_DIR(the only code path that reads a source file from a chunk-supplied path) and cached per file by mtime.
Added (multi-language span/structure backend)
- The span/structure extraction behind
graphify_locateandgraphify_freshnessis no longer Python-only. Python keeps the stdlibastfast path (zero deps, decorator-aware); every other language is handled by an optional tree-sitter backend ([treesitter]extra — also ships with graphify) with automatic language detection from the file path. So the chunk→symbol span join and the cosmetic-vs-structural freshness check now work for JS/TS, Go, Rust, Java, Ruby, C/C++, and the ~165 other languages the grammar pack covers. - Symbol detection is generic (a named def/class/method/struct/… node), so no
per-language table is maintained; qualnames chain enclosing symbols
(
Service.fetch). The tree-sitter parser is built from the stable coreParser(Language)API (not the pack's churningget_parserwrapper). - Cosmetic detection for non-Python compares a comment-stripped tree-sitter
skeleton over all tokens — operators and keywords included — so any semantic
edit (an operator flip
+→-,==→!=, async→asyncorlet→constchange, a rename or value change) is structural, while only comment/whitespace edits compare equal. When the backend or a language is unavailable, both features degrade to the prior behaviour (point heuristic / treat-as-structural) — never an error. - tree-sitter spans now absorb a symbol's leading doc-comment / decorator /
annotation lines into
region_start(mirroring the Python decorator path), so a chunk that starts on the doc comment above a Go/Java/JS method resolves to that method. Measured on real repos this lifted Go span-join precision from 48%→80%. - Broader tree-sitter symbol/qualname coverage: an anonymous function bound to a
name (
const f = () => …, object property{ foo: () => … }, class fieldhandler = (r) => …,var h = func(){}) takes the binding name; a method receiver is type-qualified (Gofunc (c *Client) Get()→Client.Get); C/C++ function names are read from the declarator chain (Session::Get→Session.Get) and template calls / sub-declarators no longer leak in as bogus symbols;region_startalso absorbs Rust#[attribute]lines. C++class_specifier/struct_specifierare recognized as definitions. - Multi-language validation benchmark (
benchmarks/multilang.py+ the "Across languages" section indocs/benchmark*.html): on real HTTP-client repos in five more languages (gotJS/TS,restyGo,retrofitJava,ureqRust,cprC++) span-join precision is 69–91% (vs 91% for Python/httpx), qualname recovery 50–100%, locate 200–748× cheaper than grep+read, and the cosmetic-vs-structural freshness check is correct in every language.
Added (Phase 3 hardening)
- Optional bearer auth for the HTTP transports: set
GRAPHIFY_API_KEYand every HTTP/WebSocket request must carryAuthorization: Bearer <key>(constant-time compared; 401 otherwise). Unset = prior behaviour (rely on loopback binding / a fronting proxy); a stderr warning now fires if an HTTP transport binds a non-loopback host without a key. graphify_freshnessnow separates cosmetic from structural changes: each changed.pyfile is AST-diffed against its HEAD version (ast.dumpequality), so a comment/whitespace/formatting-only edit no longer pushes the graph towardupdate/rebuild. Docstring edits still count as structural. The payload gainsstructural_changes/cosmetic_changes; the AST diff is skipped for change sets > 25 files (which already route to a full rebuild).- Optional lean tool surface:
GRAPHIFY_TOOLSET=leanexposes a coherent, mostly dependency-free core that still supports the whole flow — build, orient (graphify_overview), find (graphify_search), traverse (graphify_subgraph,graphify_neighbors), jump to source (graphify_node_details), plusgraphify_communitiesandgraphify_freshness.graphify_locateis included only when the[semble]extra is installed (otherwise it would just error), andgraphify_overviewfilters its suggested next steps to the active surface so it never points at a trimmed tool. Defaultfullis unchanged.
[0.1.0] - 2026-06-13
Added
- Initial release.
- CLI-backed tools:
graphify_build,graphify_query,graphify_path,graphify_explain,graphify_add. - graph.json analysis tools (no CLI required):
graphify_overview,graphify_god_nodes,graphify_communities,graphify_surprises,graphify_search,graphify_neighbors,graphify_subgraph,graphify_node_details,graphify_freshness. - Resources:
graphify://report,graphify://graph,graphify://community/{id}. - Prompts:
onboard,trace_bug,explain_flow. - LLM-friendliness: tool annotations, server instructions,
as_jsonstructured output, and token-budgeted subgraph extraction. - Packaging (
graphify-mcpconsole script), pytest suite, ruff config and CI.