clj-xref 0.1.0 — LLM-friendly cross-reference database for Clojure code
https://t.co/8EEBXJvJjR
Instead of feeding your entire source tree to an AI coding assistant, clj-xref lets it query the dependency neighborhood of the function it's working on — just the relevant code, in far fewer tokens. Built on clj-kondo static analysis, it generates a queryable xref database with **lein xref ** or clj -T:xref generate, then answers questions from the REPL:
(xref/who-calls db 'myapp.orders/process-payment)
(xref/calls-who db 'myapp.web/handler)
(xref/who-implements db 'myapp.protocols/Billable)
(xref/unused-vars db)
(xref/call-graph db 'myapp.core/main {:depth 3})
Returns plain maps and vectors — compose with filter, map, group-by, or anything else.
How much context does it save? Well, that is still an experiment, but Measured on clj-xref's own source:
│ Target │ Whole-tree │ Xref-guided │ Reduction │
│ core/index │ 8 files, 32K chars │ 1 file, 6K chars │ 80% │
│ analyze/transform-analysis │ 8 files, 32K chars │ 1 file, 7K chars │ 78% │
│ leiningen.xref/xref │ 8 files, 32K chars │ 3 files, 11K chars │ 66% │
│ analyze/classify-kind │ 8 files, 32K chars │ 1 file, 7K chars │ 78% │
Also useful for: dead code detection, codebase visualization (DOT/Graphviz output), impact analysis in CI, and REPL-driven exploration of unfamiliar code.
Query API: who-calls, calls-who, who-references, who-macroexpands, who-implements, who-dispatches, unused-vars, call-graph, apropos, ns-deps, ns-dependents. Inspired by SBCL's sb-introspect and Smalltalk's senders/implementors.
Built entirely on clj-kondo — please consider sponsoring @borkdude: https://t.co/qI5yDu4mWn
This whole React and Typescript situation for building web apps blows my mind.
I see view components that are not bloated. Yet they are the same lines of code that it takes to build the entire app - inclusive of backend and database persistence in Clojure.
not impressed with the AI in @tana_inc
could not answer a basic question of where a node referencing a piece of a curriculum I am studying is.
The most basic of questions
The AI integration seems to be not useful at all to me
Expectation: "Study x" is in week 2