# 1. Find: index, callers, artery

Source: https://usecns.dev/your-repo-find/

[On your repository](https://usecns.dev/your-repo/) · **1. Find** → [2. Before you push](https://usecns.dev/your-repo-before-push/) → [3. A rule that comes back](https://usecns.dev/your-repo-rules/) → [4. Memory that earns trust](https://usecns.dev/your-repo-memory/) → [5. Two weeks later](https://usecns.dev/your-repo-later/)

**You want to:** test Axon against code you already know well enough to be surprised by.

**You leave with:** a local index, the real caller list for one function you had an opinion about, and one end-to-end path through the code. Axon is the only organ involved.

## Before you start

Have `axon` installed; see [installation](https://usecns.dev/install/). Work from the root of a Git repository you know, on a branch. The index lives under `.axon/`; add it to `.gitignore` if it is not already there.

## Index it

```
axon index --full --json
axon status --json
```

**What you should notice:** how little you had to configure. Module boundaries, languages and symbol counts come from the scan. `status` tells you what was indexed and what was skipped, which is worth a glance on a large or unusual repository.

**Does not prove:** completeness. A count is not a claim that every symbol or relationship was found. If the detected modules do not match your layout, the [Axon command reference](https://usecns.dev/commands-axon/) covers how to adjust them.

## Ask who calls the function you dread

Pick the function or method you would least like to change. Write down, in a sentence, who you think calls it. Then ask:

```
axon search <name> --json
axon trace <name-or-node-id> --direction incoming --depth 3 --json
```

If several symbols share the name, use the node ID that `search` returns. `--depth 3` shows callers of callers without flooding the output; the result says if it was truncated.

**What you should notice:** the difference between your sentence and the result. A caller in a module you had not connected to this one, a test that exercises it indirectly, or a path through a job or event you had forgotten are the usual surprises. Open the files it names. This is where `grep` tends to fail you: common names, same-named methods in other namespaces, and callers in a part of the repository you do not usually open.

**Does not prove:** that every runtime caller was found. Dynamic dispatch and reflection leave gaps, and a missing caller is not evidence that none exists. Treat the list as a reading plan, not a census.

## Follow one artery

Pick a route, command or entry point you support in production, then ask for the path from it:

```
axon feature-path <route-or-entry-symbol>
```

If the result says the entry point was not resolved, try a more specific name. The path is a sketch of the route, not an exhaustive call graph.

**What you should notice:** how many layers sit between the entry point and the data it changes, and whether that matches the number you would have drawn on a whiteboard. For a monolith with controllers, services, jobs and listeners, this is usually the first result worth showing a teammate.

**Does not prove:** runtime behaviour. The path is indexed structure. Middleware, configuration-driven dispatch and anything resolved at runtime can be missing.

## Give an agent the same question

If you use a coding agent with shell access in this repository, try the trace step through it:

```
Use `axon search` and `axon trace --direction incoming` to find who
calls <name>. Open the implementation and each caller it reports and
confirm the relationship in source. List the callers with file paths.
Say which ones Axon could not resolve or truncated. Do not use
repository-wide grep for this step, and do not change code.
```

Compare the transcript with what the agent does on the same question without the instruction. [Step 2](https://usecns.dev/your-repo-before-push/) makes this routine with a hook.

## What you have

A local index and two results you can check against your own knowledge. If both matched what you expected, Axon has given you a fast way to confirm it. If either did not, you have already found the first thing worth reading before your next change.

**Next:** [see what an edit reached before you push, and let an agent refresh the index for you →](https://usecns.dev/your-repo-before-push/)