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

# Atlas

> The symbol-level knowledge graph of your branch — search it, ask it questions, trace call paths, and see the blast radius of a change.

Atlas maps your workspace into a queryable knowledge graph: functions, types,
classes, and files, connected by **calls**, **imports**, and **inherits**
edges, and clustered into subsystems. Instead of grepping, you (and the AI
agents on your branch node) can ask the graph directly: *how does auth work*,
*what breaks if I change this*, *what's the shortest path from the HTTP
handler to the database layer*.

The graph is built entirely locally from the code — no network access, no
LLM, and no API key required. It is derived state of one branch's working
tree: every branch node builds and serves its own graph, so switching
branches means looking at that branch's graph.

## Building the graph

```bash theme={null}
rbs atlas build
```

The build is incremental — files are re-extracted only when their content
changes — so after the first build, rebuilds are fast. Once a workspace has
built its graph, the branch node keeps it fresh automatically: file changes
you make in the editor trigger a debounced incremental rebuild in the
background.

Optional enrichment flags:

```bash theme={null}
rbs atlas build --html       # also write an interactive graph visualization
rbs atlas build --lsp        # sharpen symbols using the running language servers
rbs atlas build --semantic   # extract concepts from documents (needs an AI provider key)
rbs atlas build --force      # ignore the extraction cache and rebuild from scratch
```

## Asking questions

```bash theme={null}
# Plain-language question, answered with a scoped subgraph
rbs atlas query "how does authentication work"

# Ranked symbol search with exact file:line locations
rbs atlas search "session token"

# One symbol's identity and connections, grouped by file
rbs atlas explain LSPManager

# A symbol's immediate connections
rbs atlas neighbors StartServer

# Shortest path between two symbols
rbs atlas path ServerStart Terminal
```

`query` accepts `--depth`, `--budget`, and repeatable `--context` filters to
restrict traversal to particular edge kinds (calls only, imports only, and so
on); when you don't pass a filter, one is inferred from the question itself.

## Impact analysis

Two commands answer "what does this change touch":

```bash theme={null}
# Blast radius of changing one symbol
rbs atlas affected StartServer

# Symbol-level impact of this branch's changes vs a base ref
rbs atlas impact --base main
```

`affected` walks the reverse edges from a symbol and reports everything that
depends on it — with the call sites, not just the definitions. `impact` diffs
your branch against a base ref, maps the changed lines to symbols, and reports
the blast radius and the subsystems it touches: a review map for the branch.

## Understanding the shape of the codebase

```bash theme={null}
rbs atlas stats          # graph size and confidence split
rbs atlas report         # the full graph report
rbs atlas god-nodes      # the most-connected symbols — what everything flows through
rbs atlas community 3    # one subsystem: label, cohesion, members
rbs atlas export html    # interactive visualization
rbs atlas export wiki    # one markdown article per subsystem
```

## The Atlas view in the editor

The editor renders the same graph as an interactive view alongside your code.
Large graphs open as a **subsystem overview** — one node per community —
rather than a hairball; double-click a subsystem to drill into it, and running
a query shows exactly the answer's subgraph. Smaller graphs render in full.

* **Click** a symbol to see its explanation — identity and connections.
* **Double-click** a symbol to open its file at the defining line.
* **Search** for a symbol to jump to it across views.

Nodes are colored by subsystem and sized by how connected they are, and edge
styling reflects the extractor's confidence in each relationship.

The generated wiki is also readable inside the editor — an **Atlas Wiki** tab
in the semantic search panel renders one article per subsystem, with links
that navigate within the view. If a branch node hasn't built its graph yet,
the Atlas view says so and offers to build it.

## Work-memory: the graph learns your branch

Query outcomes can be recorded into the branch's committed history:

```bash theme={null}
# Record that a query's answer was useful (or a dead end, or needed correction)
rbs atlas save-result "how does auth work" --outcome useful --file internal/auth/session.go

# Aggregate recorded outcomes into lessons that boost future ranking
rbs atlas reflect
```

Saved outcomes live in the committed `.reasonos/` tree, so they travel with
the branch through git — the sources that answered questions well rank higher
in future queries, and dead ends rank lower, for everyone on the branch and
for the agents working on it.

## Querying other repositories

Every read command accepts `--workspace` to query a graph you haven't cloned:

```bash theme={null}
rbs atlas query "how are jobs scheduled" --workspace @acme/scheduler@main
```

The reference can be an `@org/project[@branch]` slug resolved through the
control plane, a local workspace path, or a node URL.
