Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2420dae
docs: the README's CLI section lists context, report and graph
Ayingxizhao Nov 2, 2026
2a8eed3
docs: document context in README command reference
Nov 9, 2026
48de19d
Merge pull request #2018 from wengthree1cm/docs/readme-context-command
swapnilpaliwal-sd Nov 9, 2026
36bf11b
Merge branch 'dev' into docs/readme-cli-commands
swapnilpaliwal-sd Nov 9, 2026
45ee8b1
Merge pull request #2009 from Ayingxizhao/docs/readme-cli-commands
swapnilpaliwal-sd Nov 9, 2026
9c82af5
python: a closure cell rebound through nonlocal from a nested scope i…
swapnilpaliwal-sd Nov 18, 2026
991080f
plugin: test-impact --files names the files that follow it, and is no…
swapnilpaliwal-sd Nov 18, 2026
47fb429
csharp: new T() on a staged library type is not an external construct…
swapnilpaliwal-sd Nov 18, 2026
57e30c1
release 0.2.4: every package and plugin manifest at 0.2.4 (the parser…
swapnilpaliwal-sd Nov 18, 2026
272f1af
typescript: a call to a function-literal const no longer also names i…
swapnilpaliwal-sd Nov 18, 2026
ffda9d6
fill: list every unresolved call site the project may own, settle the…
swapnilpaliwal-sd Nov 18, 2026
414d364
links: a process launcher is not a call that runs a value; fill: a JS…
swapnilpaliwal-sd Nov 18, 2026
fe3c6df
fill: TypeScript and C# value calls, multi-line imports, runtime glob…
swapnilpaliwal-sd Nov 18, 2026
1417351
Merge remote-tracking branch 'origin/chore/version-0.2.4' into fix/py…
swapnilpaliwal-sd Nov 19, 2026
5f84bba
Merge remote-tracking branch 'origin/chore/version-0.2.4' into fix/te…
swapnilpaliwal-sd Nov 19, 2026
fdcdbe2
fill: the build still ends with `graph at`, and AGENTS.md names unres…
swapnilpaliwal-sd Nov 19, 2026
e3a815a
Merge remote-tracking branch 'origin/chore/version-0.2.4' into fix/ts…
swapnilpaliwal-sd Nov 19, 2026
6a2810d
Merge remote-tracking branch 'origin/chore/version-0.2.4' into feat/f…
swapnilpaliwal-sd Nov 19, 2026
3e108bd
Merge remote-tracking branch 'origin/chore/version-0.2.4' into fix/cs…
swapnilpaliwal-sd Nov 19, 2026
c079bfa
Merge pull request #2028 from AxiomCodeAI/feat/fill-unresolved
swapnilpaliwal-sd Nov 19, 2026
2a5373e
Merge pull request #2027 from AxiomCodeAI/fix/ts-annotated-function-c…
swapnilpaliwal-sd Nov 19, 2026
e7bcb65
Merge pull request #2025 from AxiomCodeAI/fix/csharp-staged-ctor-not-…
swapnilpaliwal-sd Nov 19, 2026
851bdc7
Merge pull request #2024 from AxiomCodeAI/fix/test-impact-files-flag
swapnilpaliwal-sd Nov 19, 2026
f5868f8
Merge pull request #2023 from AxiomCodeAI/fix/python-nonlocal-rebind
swapnilpaliwal-sd Nov 19, 2026
348d1fe
Merge pull request #2029 from AxiomCodeAI/0.2.4
swapnilpaliwal-sd Nov 19, 2026
873a107
ci: fetch Vineflower by the plugin's coordinates, and try a failed fe…
swapnilpaliwal-sd Nov 19, 2026
f52944b
Merge pull request #2030 from AxiomCodeAI/ci/java-decompiler-fetch
swapnilpaliwal-sd Nov 19, 2026
390549c
fill: the build's summary line and the notice read the graphs, never …
swapnilpaliwal-sd Nov 21, 2026
d77f0fd
Merge pull request #2032 from AxiomCodeAI/fix/link-changed-windows
swapnilpaliwal-sd Nov 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,20 @@ jobs:
run: dotnet build -c Release graph/test/csharp/ground-truth/AxiomCsOracle

# `--library auto` decompiles a dependency that ships no sources jar; the Java query case for it needs Vineflower
# The plugin is named by its coordinates, not by the `dependency:` prefix: the prefix is
# looked up in Maven Central's plugin-group metadata, and when that read fails Maven says
# "No plugin found for prefix 'dependency'" though nothing is wrong with the build.
# A failed download is tried twice more before the job gives up.
- name: fetch the decompiler `--library auto` uses for Java class jars
if: matrix.lang == 'java'
run: mvn -q dependency:get -Dartifact=org.vineflower:vineflower:1.10.1
run: |
for attempt in 1 2 3; do
mvn -q org.apache.maven.plugins:maven-dependency-plugin:3.11.0:get \
-Dartifact=org.vineflower:vineflower:1.10.1 && exit 0
echo "::warning::fetching Vineflower failed (attempt $attempt of 3)"
[ "$attempt" -lt 3 ] && sleep $((attempt * 15))
done
exit 1

# `--library auto` compiles a NuGet package by decompiling it; the query case for it needs the decompiler
- name: install the decompiler `--library auto` uses for NuGet packages
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,13 @@ about one change had to read 95 of 43,793 methods, and every true direct caller

## CLI commands

Three questions, `impact`, `path` and `tests`, each answered as numbered places with the code of the function each
one sits in. The MCP server offers the same three as tools: `impact(name)`, `path(start, end)` and `tests()`, with
`context(task)` and `link(site, target)` beside them. Finding where code lives is left to your own search: bring
the name you found to these commands.
Three questions, each answered as numbered places with the code of the function each one sits in. The MCP server
offers the same three as tools: `impact(name)`, `path(start, end)` and `tests()`. Finding where code lives is
offers the same three as tools: `impact(name)`, `path(start, end)` and `tests()`, plus `context(task, source=False)`
for a narrative of the files, callables and call flow relevant to a task. Finding where code lives is
left to your own search: bring the name you found to these commands.

| command | what it answers |
Expand All @@ -321,8 +326,12 @@ left to your own search: bring the name you found to these commands.
| `axiomcode impact` | the same for the declarations your uncommitted edits changed; the answer starts with `your edits:` |
| `axiomcode path <A> <B>` | how A reaches B: every hop of the call chain, with the code at each call |
| `axiomcode tests` | the tests your uncommitted edits reach, and a last `run:` line with the command that runs them |
| `axiomcode context "<task>"` | how something works, as a narrative: the files and callables the task touches and, for a how-does-X-work question, the call flow step by step; `--source` carries each step's code |
| `axiomcode context "<task>" [--source]` | explain the files and callables a task touches and, for a how-does-it-work question, the call flow; `--source` includes each step's code |
| `axiomcode link <file:line> <target>` | record where a call the graph could not resolve lands (kept in `axiomcode-links.tsv`); impact, path and tests then walk it, labelled `[asserted]`. Alone, lists the links and whether each was applied |
| `axiomcode index` | build the graph explicitly (the first query builds it too); `--lang`, `--src` and `--library` narrow it |
| `axiomcode report` | where an answer verifiably helped: every Redirected / Helped / Useful chain the end-of-turn receipts recorded, as one HTML page (`.axiomcode/assists.html`) |
| `axiomcode graph` | the codebase as one interactive page: directories, files, types and methods, and the call edges between them. Prints the page's path, `.axiomcode/graph/graph.html` |

A name is written the way it appears in the code: `Owner.method`, `method`, `Type`, `Owner.field`, or
`file.py:123`. It is resolved exactly; a miss lists the nearest names. `axiomcode help <command>` prints one
Expand Down
2 changes: 1 addition & 1 deletion gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "axiomcode",
"version": "0.2.3",
"version": "0.2.4",
"description": "Ask your repository how its code connects: who calls this, what breaks if I change it, which tests an edit reaches, how A reaches B. Answers come from a resolved call graph and are verified against it; nothing is guessed.",
"contextFileName": "plugins/axiomcode/AGENTS.md",
"mcpServers": {
Expand Down
4 changes: 2 additions & 2 deletions graph/bundle/SCHEMA.md
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ Every callable the graph refers to: all client methods/functions from the IR, pl
| `client` | all | Declared in the analysed project. |
| `lib` | all | Declared in a staged library IR; listed because an edge reaches it. |
| `generated` | java | Declared by a compile-time annotation processor: present in the compiled artefact and in every caller's source, and in no IR, so the bundle synthesises it to give the edge a target. id `generated:<owner qualified name>#<name>/<arity>`, no file and no line numbers. |
| `generated` | csharp | The Invoke of the delegate held in one field or property: id `generated:<owner qualified name>#<member>.Invoke`, no file and no line numbers. Every call through that member is an edge to it (tier boundary_lib, which is also where the compiler binds the call), and what the member holds is in dispatch_candidates with basis `value`. |
| `generated` | csharp | The Invoke of the delegate held in one field or property: id `generated:<owner qualified name>#<member>.Invoke`, no file and no line numbers. Every call through that member is an edge to it (tier boundary_lib, which is also where the compiler binds the call), and what the member holds is in dispatch_candidates with basis `value`. And the parameterless constructor of a staged library type whose IR carries no constructor: id `generated:<type qualified name>#<constructor>/0`. `new T()` compiles only if T has one, so the target exists, but a library IR is a signature subset and cannot say whether T declares it or the compiler supplies it. The `new` site is an edge to it with callee_provenance `lib` and tier boundary_lib, not an `external:` label, because the library WAS staged. |

**Notes**

Expand Down Expand Up @@ -578,7 +578,7 @@ THE GRAPH. One row per (site, resolved target). A site with N possible targets h
|---|---|---|
| `external` | all | The target is outside every staged IR. callee_method_id is NULL and callee_label names it, as `external:<Type>.<Member>`. A client-only run of a C# project reaches the BCL this way for most of its calls. |
| `client` | all | Target is a client method (callee_method_id set). |
| `lib` | all | Target is a method of a staged library IR (callee_method_id set, methods.provenance = lib). |
| `lib` | all | Target is a method of a staged library IR (callee_method_id set, methods.provenance = lib). C# only: or the parameterless constructor of a staged type its IR does not carry, a methods row with provenance `generated`. |
| `generated` | csharp | The target is a member the compiler generated and no source declares (a `boundary_generated` row); callee_label names it. |
| `builtin` | python | Target is a CPython builtin with no Python source (callee_label = `builtin:NAME`). |
| `external` | python, java | Target is outside every staged IR and has no methods row. Python: an import path (callee_label = the written path). Java: a method of an unstaged ancestor type (callee_label = `external:<type>.<name>`), reached through a receiver declared as that type or inherited by a client subclass; see types.provenance external. |
Expand Down
4 changes: 2 additions & 2 deletions graph/bundle/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export const VOCAB: readonly VocabSpec[] = [
{ table: 'methods', column: 'provenance', value: 'client', languages: 'all', meaning: 'Declared in the analysed project.' },
{ table: 'methods', column: 'provenance', value: 'lib', languages: 'all', meaning: 'Declared in a staged library IR; listed because an edge reaches it.' },
{ table: 'methods', column: 'provenance', value: 'generated', languages: J, meaning: 'Declared by a compile-time annotation processor: present in the compiled artefact and in every caller\'s source, and in no IR, so the bundle synthesises it to give the edge a target. id `generated:<owner qualified name>#<name>/<arity>`, no file and no line numbers.' },
{ table: 'methods', column: 'provenance', value: 'generated', languages: C, meaning: 'The Invoke of the delegate held in one field or property: id `generated:<owner qualified name>#<member>.Invoke`, no file and no line numbers. Every call through that member is an edge to it (tier boundary_lib, which is also where the compiler binds the call), and what the member holds is in dispatch_candidates with basis `value`.' },
{ table: 'methods', column: 'provenance', value: 'generated', languages: C, meaning: 'The Invoke of the delegate held in one field or property: id `generated:<owner qualified name>#<member>.Invoke`, no file and no line numbers. Every call through that member is an edge to it (tier boundary_lib, which is also where the compiler binds the call), and what the member holds is in dispatch_candidates with basis `value`. And the parameterless constructor of a staged library type whose IR carries no constructor: id `generated:<type qualified name>#<constructor>/0`. `new T()` compiles only if T has one, so the target exists, but a library IR is a signature subset and cannot say whether T declares it or the compiler supplies it. The `new` site is an edge to it with callee_provenance `lib` and tier boundary_lib, not an `external:` label, because the library WAS staged.' },
{ table: 'types', column: 'provenance', value: 'client', languages: 'all', meaning: 'Declared in the analysed project.' },
{ table: 'types', column: 'provenance', value: 'lib', languages: 'all', meaning: 'Declared in a staged library IR.' },
{ table: 'types', column: 'provenance', value: 'external', languages: J, meaning: 'Named by the client as an ancestor (`extends`/`implements`) but declared in no staged IR: id `external:<qualified name>`, category EXTERNAL_TYPE, no file, no members. Kept so the subtype edge survives; stage the library to replace it with the real declaration.' },
Expand Down Expand Up @@ -617,7 +617,7 @@ export const VOCAB: readonly VocabSpec[] = [

// call_edges.callee_provenance
{ table: 'call_edges', column: 'callee_provenance', value: 'client', languages: 'all', meaning: 'Target is a client method (callee_method_id set).' },
{ table: 'call_edges', column: 'callee_provenance', value: 'lib', languages: 'all', meaning: 'Target is a method of a staged library IR (callee_method_id set, methods.provenance = lib).' },
{ table: 'call_edges', column: 'callee_provenance', value: 'lib', languages: 'all', meaning: 'Target is a method of a staged library IR (callee_method_id set, methods.provenance = lib). C# only: or the parameterless constructor of a staged type its IR does not carry, a methods row with provenance `generated`.' },
{ table: 'call_edges', column: 'callee_provenance', value: 'generated', languages: C, meaning: 'The target is a member the compiler generated and no source declares (a `boundary_generated` row); callee_label names it.' },
{ table: 'call_edges', column: 'callee_provenance', value: 'builtin', languages: P, meaning: 'Target is a CPython builtin with no Python source (callee_label = `builtin:NAME`).' },
{ table: 'call_edges', column: 'callee_provenance', value: 'external', languages: ['python', 'java'], meaning: 'Target is outside every staged IR and has no methods row. Python: an import path (callee_label = the written path). Java: a method of an unstaged ancestor type (callee_label = `external:<type>.<name>`), reached through a receiver declared as that type or inherited by a client subclass; see types.provenance external.' },
Expand Down
11 changes: 11 additions & 0 deletions graph/csharp/engine/call-edge-generation/call_chain.dl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ site_leaves_client(prov, e) :- client_calls_lib(prov, e, _, _).
// a real project that is most of the unresolved sites -- which makes the number that
// matters unreadable.
site_leaves_client(prov, e) :- external_target(prov, e, _).
// And one into a staged type whose parameterless constructor its IR does not carry.
site_leaves_client(prov, e) :- staged_parameterless_ctor(prov, e, _).
// A call through a field or property holding a delegate lands on the delegate's
// Invoke, which the runtime supplies (resolution/delegates.dl). The site gets an edge
// to that member's Invoke node and the stored functions are in the envelope.
Expand Down Expand Up @@ -235,6 +237,14 @@ call_chain_edge(e, caller, "-", label, "external", "boundary_lib", kind) :-
call_from("client", e, caller),
invocation_site("client", e, kind).

// client -> A STAGED TYPE'S PARAMETERLESS CONSTRUCTOR, NOT CARRIED BY ITS IR. The
// target belongs to a staged type, so the provenance is `lib`; it is the `generated:`
// node resolution/external-types.dl names, which the bundle gives a methods row.
call_chain_edge(e, caller, "-", node, "lib", "boundary_lib", kind) :-
staged_parameterless_ctor("client", e, node),
call_from("client", e, caller),
invocation_site("client", e, kind).

// client -> A DELEGATE MEMBER'S INVOKE (#1206). `getPath(url)` on a field holding a
// delegate calls Invoke -- Roslyn's answer too -- and which stored function then runs
// is value flow, recorded in method_dispatch_candidate with basis `value` rather than
Expand Down Expand Up @@ -400,6 +410,7 @@ call_has_edge(prov, e) :- client_calls_lib(prov, e, _, _).
call_has_edge("client", e) :- client_calls_external(e, _).
call_has_edge("client", e) :- delegate_member_call("client", e, _).
call_has_edge("client", e) :- delegate_param_call(e, _).
call_has_edge("client", e) :- staged_parameterless_ctor("client", e, _).

call_chain_edge(e, caller, "-", "-", "-", cls, kind) :-
invocation_site("client", e, kind),
Expand Down
34 changes: 33 additions & 1 deletion graph/csharp/engine/resolution/external-types.dl
Original file line number Diff line number Diff line change
Expand Up @@ -435,20 +435,52 @@ external_target(prov, e, label) :-
// constructor clause above needs the type to be UNSTAGED, so once a library
// declares the type the site had neither a constructor to resolve nor a name to
// carry. Refusing the implicit-constructor claim alone leaves it a blind spot.
//
// NOT FOR `new T()` ON A STAGED TYPE THAT CARRIES NO CONSTRUCTOR AT ALL. That site
// runs T's parameterless constructor, which exists whether the library declares it
// or the compiler supplies it, and T is staged: `external` would say the
// dependency was not supplied, and it was (#1339). staged_parameterless_ctor names
// it inside the library instead. What is left here is a site whose argument count
// no carried constructor accepts although the IR carries some: a member the subset
// IR was not told about, named like an uncarried method.
external_target(prov, e, label) :-
call_needs_ctor_lookup(prov, e),
expr_new_type(prov, e, gk),
type_group("lib", _, gk),
call_argc(prov, e, ac),
!call_ctor_target_accepts(prov, e, ac),
!staged_parameterless_ctor(prov, e, _),
type_decl("lib", n, _, _, _, t), type_group("lib", t, gk),
label = cat("external:", cat(n, ".<constructor>")).

// Whether any constructor of the created type accepts this site's argument
// count. Named rather than inlined because the rule above needs its NEGATION,
// and a negated conjunction over three relations is where a cross-product hides.
//
// call_ctor_target already admits a constructor only where it accepts the site's
// argument count, under the provenance the constructor is DECLARED in. Re-checking
// it here under the SITE's provenance missed every staged constructor -- a client
// `new` reaching a library constructor -- so a resolved site was also labelled an
// unstaged one and had two rows (#1339).
call_ctor_target_accepts(prov, e, ac) :-
call_ctor_target(prov, e, ctor), ctor_accepts_argc(prov, ctor, ac).
call_ctor_target(prov, e, _), call_argc(prov, e, ac).

// staged_parameterless_ctor(Prov, Site, Node) -- `new T()` with no argument, on a
// staged type whose IR carries no constructor. Not known_implicit_ctor: a library IR
// is a signature subset, so it cannot show that T declares none. But `new T()`
// compiles only if T has a parameterless constructor, declared or supplied, so the
// target is known to exist and to be T's. The node is the `generated:` member id the
// bundle gives a methods row (provenance generated, owner T), so the edge points at
// T inside the library rather than at a label for an unsupplied dependency.
staged_parameterless_ctor(prov, e, node) :-
call_needs_ctor_lookup(prov, e),
expr_new_type(prov, e, gk),
type_group("lib", _, gk),
!type_ctor("lib", gk, _),
!type_ctor(prov, gk, _),
call_argc(prov, e, "0"),
type_decl("lib", _, qn, _, _, t), type_group("lib", t, gk),
node = cat("generated:", cat(qn, "#<constructor>/0")).

// ── A PROPERTY READ ON AN EXTERNAL RECEIVER ─────────────────────────────────
// `someString.Length`, `dict.Count`, `ex.Message`. Reading a property IS a call, and
Expand Down
1 change: 1 addition & 0 deletions graph/csharp/souffle/decls_all.dl
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@
.decl site_unresolved_named(c0:symbol,c1:symbol,c2:symbol)
.decl site_unresolved_real(c0:symbol)
.decl sseg(c0:symbol,c1:number,c2:symbol)
.decl staged_parameterless_ctor(c0:symbol,c1:symbol,c2:symbol)
.decl starts_slash(c0:symbol)
.decl static_edge_exists(c0:symbol,c1:symbol)
.decl static_fan_member(c0:symbol,c1:symbol,c2:symbol)
Expand Down
17 changes: 14 additions & 3 deletions graph/python/engine/projections/bindings.dl
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,20 @@ binding_is_namespace("lib", h) :- lib_py_binding(_, _, _, _, _, _, _, _, _, _, _
// bindingCount is the number of DISTINCT binding sites for this name in this scope.
// == 1 is the precondition for treating a name as single-valued (the alias case
// `_Aliased = Base`); > 1 means the name is rebound and a single-value inference is
// unsound. Consumed by resolution/name-resolution.dl.
binding_rebinding("client", n, first, last, h) :- py_binding(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, n, first, last, _, _, _, _, _, _, _, _, _, _, h).
binding_rebinding("lib", n, first, last, h) :- lib_py_binding(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, n, first, last, _, _, _, _, _, _, _, _, _, _, h).
// unsound.
// This is the RAW per-row count. It cannot see a write made from a NESTED scope through
// `nonlocal`: that write is a separate NONLOCAL row with its own count, so the enclosing
// cell's row still says 1. resolution/name-resolution.dl derives binding_rebinding from
// this and adds those writes; every single-write guard reads binding_rebinding. Only the
// LEGB walk reads the raw count, because it is what binding_rebinding is derived from.
binding_rebinding_raw("client", n, first, last, h) :- py_binding(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, n, first, last, _, _, _, _, _, _, _, _, _, _, h).
binding_rebinding_raw("lib", n, first, last, h) :- lib_py_binding(_, _, _, _, _, _, _, _, _, _, _, _, _, _, _, n, first, last, _, _, _, _, _, _, _, _, _, _, h).

// ── binding_is_assigned(Prov, BindingHash) ───────────────────────────────────
// Symbol.is_assigned(): the name is a store target in this scope. Separates a
// `nonlocal fn` that rebinds the enclosing cell from one that only reads it.
binding_is_assigned("client", h) :- py_binding(_, _, _, _, _, _, _, _, _, _, "true", _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, h).
binding_is_assigned("lib", h) :- lib_py_binding(_, _, _, _, _, _, _, _, _, _, "true", _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, h).

// ── binding_annotation(Prov, DeclaredTypeName, DeclaredBaseType, PotentialQName, BindingHash) ──
// "" on 68.2% of parameters, which is exactly why declared-type receiver typing —
Expand Down
Loading
Loading