An open API service indexing awesome lists of open source software.

https://github.com/jjrio-bee/ex_code_graph

Code knowledge engine for Elixir/Ash projects: extracts the compiled + Ash-semantic + docs structure of a target Elixir codebase into a graph.json document, loadable into Neo4j/Memgraph/Kùzu/etc.
https://github.com/jjrio-bee/ex_code_graph

ash-framework code-intelligence developer-tools elixir graph-database knowledge-graph static-analysis

Last synced: 18 days ago
JSON representation

Code knowledge engine for Elixir/Ash projects: extracts the compiled + Ash-semantic + docs structure of a target Elixir codebase into a graph.json document, loadable into Neo4j/Memgraph/Kùzu/etc.

Awesome Lists containing this project

README

          

# ExCodeGraph

> Code knowledge engine for Elixir/Ash projects. Turns a compiled
> codebase into a queryable graph of its *real* structure (resolved
> through the compiler + Ash runtime reflection, not text) and loads
> it into a graph database.

**Status:** v0.1.0 — initial scaffold. No working extractor yet. See
[`CODE_GRAPH_DESIGN.md`](./CODE_GRAPH_DESIGN.md) for the design.

---

## Why

AI agents navigating large Elixir/Ash codebases rely on grep + file
reads + exploratory search. This produces *navigation thrash*: the
agent writes a hypothesis about the code, finds the real path, reports
the contradiction, re-dispatches. The root cause is that Ash's
attributes, relationships, actions, policies, calculations, and
`code_interface` functions exist as **DSL data, not as `def`s** —
grep literally cannot find the callers of generated `code_interface` functions.

ExCodeGraph extracts the *real* structure (compiled artifacts + Ash
runtime reflection) into a graph, exposes it as a memory engine, and
measures where it beats grep — producing a **decision boundary**, not
a marketing claim.

## Install

```elixir
def deps do
[
{:ex_code_graph, "~> 0.1.0"}
]
end
```

Or install as a Mix archive:

```bash
mix archive.install hex ex_code_graph
```

## Quick start (5 minutes)

```bash
# Inside your Elixir/Ash project:
mix code_graph.export # writes graph.json
mix code_graph.load # loads to default backend (export to disk)
mix code_graph.verify # validates the document

# Or all at once:
mix code_graph.export && mix code_graph.load && mix code_graph.verify
```

## Documentation

- [Getting started](guides/getting-started.md)
- [Architecture](guides/architecture.md)
- [Ontology reference](guides/ontology.md)
- [Writing a backend adapter](guides/writing-an-adapter.md)
- [Evaluation methodology](guides/eval-methodology.md)
- [Cypher query skill pack](skills/code-graph-query/SKILL.md) — for agents

Full API reference: see `mix docs` (or [hexdocs.pm/ex_code_graph](https://hexdocs.pm/ex_code_graph))

## Backends

| Backend | Server? | Cypher | v1? |
|---|---|---|---|
| Export (Cypher + GraphML) | no | writes to disk | ✅ |
| Neo4j / Memgraph (Bolt) | yes | ✅ | ✅ |
| KùzuDB (embedded) | no | partial | ✅ |
| Apache AGE (Postgres) | reuses PG | ✅ | fast-follow |
| libgraph (in-proc) | no | no | fast-follow |

The design is backend-agnostic. Recipes in the skill pack are
lowest-common-denominator openCypher; capability-gating degrades
gracefully on adapters that lack full-text or GDS.

## Development

```bash
git clone https://github.com/jjrio-bee/ex_code_graph
cd ex_code_graph
mix deps.get
mix test # unit + doctests
mix credo --strict # style
mix dialyzer # type checks
mix deps.audit # CVE scan
mix quality # format + credo + dialyzer + audit
mix ci # full CI gate
```

`mise` or `asdf` recommended. Pinned versions in `.tool-versions`.

## Contributing

See [CONTRIBUTING.md](./CONTRIBUTING.md). Bug reports and feature
requests: [GitHub Issues](https://github.com/jjrio-bee/ex_code_graph/issues).

Security: see [SECURITY.md](./SECURITY.md).

## License

Apache-2.0 — see [LICENSE](./LICENSE).

## Acknowledgements

ExCodeGraph stands on the shoulders of:

* The Elixir / Ash / Spark communities
* `neo4j-contrib/mcp-neo4j-cypher` and `neo4j-cypher-skill` (skill-pack pattern)
* The contributors listed in [the git log](https://github.com/jjrio-bee/ex_code_graph/graphs/contributors)