> ## Documentation Index
> Fetch the complete documentation index at: https://docs.entire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use entire-graph with Your Coding Agent

> Ask your coding agent to use entire-graph to find code, trace relationships, and understand what a change could affect.

After you [install and enable entire-graph](https://docs.entire.com/guides/graph/set-up-graph.md), ask your coding agent questions about the repository in your own words. You do not need to run entire-graph commands yourself or mention entire-graph in every prompt.

## What You Can Ask

Your agent chooses the entire-graph command that matches your question.

| Goal | Example prompt | entire-graph operation |
| - | - | - |
| Find an implementation | Where is request routing implemented? | `query` |
| Understand a definition | Show and explain the definition of `ResolveRoute`. | `def` |
| Trace callers or callees | What calls `ResolveRoute`? | `neighbors` |
| Assess change impact | What could be affected if I change `ResolveRoute`? | `impact` |
| Review a branch | Summarize the semantic changes from `main` to `HEAD`. | `diff` |
| Export the graph | Export the repository graph as NDJSON. | `snapshot` |

## What Happens After You Ask

For a task that requires finding code, your agent starts with an entire-graph query to narrow its investigation. It then reads the source around the most relevant results and uses follow-up entire-graph queries when it needs to trace relationships or assess impact.

entire-graph returns evidence for your agent to check, not a final conclusion. Your agent should verify the results against the source and run a focused test before completing a change. The agent guide directs agents to query the committed-tree cache (`--head`) for speed and to drop `--head` only when the answer depends on uncommitted edits; when you run the interactive commands yourself, they read the working tree by default.

## Example

In the [`gorilla/mux`](https://github.com/gorilla/mux) repository, you could ask:

```text theme={null}
Find where route matching is implemented, trace what calls it,
and explain what could be affected if its behavior changes.
```

### Example result

**Where route matching happens**

* `Router.Match` (`mux.go:151-182`) checks each registered route, builds the middleware chain, and handles not-found and method-not-allowed results.
* `Route.Match` (`route.go:47-114`) evaluates the matchers for an individual route and collects route variables.
* `routeRegexp.Match` (`regexp.go:189-209`) checks host, path, and query patterns.

**What calls it**

* `Router.ServeHTTP` calls `Router.Match` for incoming requests (`mux.go:203`).
* `Router.Match` calls `Route.Match` for each registered route (`mux.go:153`).
* The CORS middleware calls `Route.Match` when collecting allowed methods (`middleware.go:79`).

**What could be affected**

* Handler selection and middleware execution
* 404 and 405 responses
* Route variables used by handlers
* The `Access-Control-Allow-Methods` header produced by the CORS middleware

entire-graph helps your agent identify where to investigate, but the agent should still inspect the cited source before drawing a conclusion.

## When entire-graph Is Not Needed

entire-graph is for finding code and tracing relationships. For literal text — config keys, environment-variable names, log strings, file names — the agent guide directs agents to use plain text search instead. A task that names the exact file still gets a graph query, because a named file answers where code is, not what else depends on it.

## Run entire-graph Directly

You can also run entire-graph commands yourself for manual inspection, debugging, or automation. See the [entire-graph CLI reference](https://docs.entire.com/cli-reference/graph.md) for commands and options.

## Continue With

> [card] [Install and Enable entire-graph](https://docs.entire.com/guides/graph/set-up-graph.md)
>
> Install entire-graph and add its instructions to a repository.

> [card] [How entire-graph Works](https://docs.entire.com/guides/graph/how-graph-works.md)
>
> Learn what entire-graph analyzes and where its results have limits.

> [card] [entire-graph CLI Reference](https://docs.entire.com/cli-reference/graph.md)
>
> Review entire-graph commands and options.

> [card] [entire-graph Troubleshooting](https://docs.entire.com/guides/graph/troubleshooting.md)
>
> Fix installation, adoption, cache, and coverage problems.
