All notable changes to this project will be documented in this file. This change log follows the conventions of keepachangelog.com.
The 0.1.1 release makes clj-xref a first-class tool for AI coding
assistants. A new CLI, a /xref slash command for Claude Code, and
a CLAUDE.md project guidance snippet together let Claude query the
cross-reference database during normal coding work — before changing
signatures, tracing flow, or estimating blast radius — instead of
falling back to grep. Also ships derived queries (unused, call-graph,
apropos), Graphviz output, incremental analysis, and an LLM token
savings benchmark.
/xref slash command (doc/claude-slash-command.md):
a drop-in markdown file for .claude/commands/xref.md that exposes
xref queries as user-invocable slash commands — /xref init,
/xref who-calls ns/fn, /xref unused, /xref graph ns/fn, etc.
Wraps the CLI so Claude runs the query in the user's terminal.CLAUDE.md project guidance (doc/claude-md-template.md):
a drop-in snippet that teaches Claude Code to invoke xref proactively
during coding work — before signature changes, renames, or deletions;
when estimating blast radius; when looking for dead code; when
onboarding to unfamiliar code. Shifts the initiative from user-typed
slash commands to Claude recognizing xref-worthy moments from context.
Both artifacts work with any AI assistant that can run shell commands.clj -M:xref <command>): init,
who-calls, calls-who, who-references, who-implements,
who-dispatches, who-macroexpands, unused, ns-deps,
ns-dependents, apropos, graph. Auto-generates the database on
first query. Output is human-readable text, parseable by downstream
tools.unused-vars, call-graph
(transitive, depth-limited, bidirectional), apropos (regex search
over var names).clj-xref.graph namespace: DOT/Graphviz output for namespace
dependency graphs (ns-dep-dot) and call graphs (call-graph-dot).:only flag in both the lein plugin and
deps.edn tool for re-analyzing specific files without a full rebuild.lein measure-improvement): compares
whole-tree vs xref-guided context selection using the Claude API.:xref deps.edn alias docs to a single dual-mode
form that serves both clj -M:xref <cmd> (CLI) and
clj -T:xref generate (tool) invocations.xref-dev, bench) so they no longer
shadow the real leiningen.xref and leiningen.measure-improvement
plugin tasks or drop their arguments.@ (npm scoped packages like
@tanstack/react-pacer) are normalized before serialization (#1).TokenNode values that clj-kondo emits in :var-definitions :name
for macros expanding to def are coerced to proper symbols across
all transform paths, restoring EDN round-tripping (#3).-T:xref generate tool mode in the deps.edn :xref alias
alongside the new -M:xref CLI mode.lein xref) and deps.edn tool (clj -T:xref generate) for generating EDN xref databases.who-calls, calls-who, who-references, who-macroexpands, who-implements, who-dispatches, ns-vars, ns-deps, ns-dependents.:call, :reference, :macroexpand, :dispatch, :implement.defrecord/deftype.from-kondo-analysis throws on missing analysis data instead of producing empty databases.:analysis kondo config so caller additions don't clobber built-in defaults.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |