# AI use cases for Compass (crabbuild/compass)

Repo: [crabbuild/compass](https://github.com/crabbuild/compass) | Use cases: 4 | Page: https://dedupedai.com/use-cases/crabbuild-compass/

Compass is a local-first Rust tool that turns source code and project artifacts into a queryable knowledge graph of symbols, files, relationships, and evidence.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Map an unfamiliar repository before reading code: https://dedupedai.com/use-cases/crabbuild-compass/map-unfamiliar-repository/
- Check what a planned change could affect: https://dedupedai.com/use-cases/crabbuild-compass/estimate-change-impact/
- Give Claude Code or Codex focused repo context: https://dedupedai.com/use-cases/crabbuild-compass/focused-context-for-coding-assistants/
- Share an interactive architecture view with a team: https://dedupedai.com/use-cases/crabbuild-compass/share-architecture-view-with-team/

## How to map an unfamiliar repository before reading code with Compass

Repo: [crabbuild/compass](https://github.com/crabbuild/compass) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Build a local graph and read a generated architecture summary of communities and key nodes.

**Who it is for:** A developer who has just joined a project or inherited a large codebase and needs orientation before making changes.

**The problem:** Reading files one by one is slow, and it is hard to see subsystem boundaries and the most connected parts of the code.

**The outcome:** A compass-out folder with a graph, an architecture report, and an interactive HTML view that shows how the repository is organized.

### Steps

1. Install the CLI with the installer for your system, for example `curl --proto '=https' --tlsv1.2 -LsSf https://github.com/crabbuild/compass/releases/latest/download/install.sh | sh` on macOS or Linux. (inferred, check the README)
2. `cd your-project`
3. `compass init`
4. Open `compass-out/GRAPH_REPORT.md` to read the architecture and community summary.
5. `compass export html`

### Prompt to paste into your agent

```text
In the project at <project path>, run `compass init` using the crabbuild/compass CLI, then read compass-out/GRAPH_REPORT.md and list the main communities and the most connected (god) nodes. Expected output: a short architecture summary with community names and their key symbols. Verify that compass-out/graph.json exists before reporting.
```

### Caveat

Compass writes its output to compass-out/ inside the project, so check that folder before committing or sharing the project.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/crabbuild-compass/map-unfamiliar-repository/

## How to check what a planned change could affect with Compass

Repo: [crabbuild/compass](https://github.com/crabbuild/compass) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Trace reverse dependencies and directed paths for a symbol before editing it.

**Who it is for:** An engineer about to modify a function or type who needs to know which callers and dependents may break.

**The problem:** Manual searches miss indirect dependents, so a change can break code several hops away.

**The outcome:** A bounded list of affected nodes, a path between two symbols, and an explanation of the symbol, all tied to graph evidence.

### Steps

1. Install the CLI and run `cd your-project` followed by `compass init`.
2. `compass explain <symbol name>` (inferred, check the README)
3. `compass affected <symbol name> --depth 3` (inferred, check the README)
4. `compass path <caller symbol> <symbol name>` (inferred, check the README)
5. `compass export html --impact-graph "$symbol_id"` to view the impact neighborhood visually, where symbol_id is the id of your symbol. (inferred, check the README)

### Prompt to paste into your agent

```text
In the repository at <project path>, use the crabbuild/compass CLI to run `compass affected <symbol name> --depth 3` and `compass path <caller symbol> <symbol name>`. Expected output: the list of affected nodes and the directed path between the two symbols. Verify that each reported node includes a source location before you treat it as a real dependent.
```

### Caveat

Compass reports evidence limits and ambiguous matches, so treat the affected list as a guide to review rather than a complete proof of impact.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/crabbuild-compass/estimate-change-impact/

## How to give Claude Code or Codex focused repo context with Compass

Repo: [crabbuild/compass](https://github.com/crabbuild/compass) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install Compass into an assistant and let it run compact graph queries instead of broad searches.

**Who it is for:** A developer using Claude Code or Codex on a large repository who wants the assistant to find relevant code with less searching and smaller context.

**The problem:** Assistants that search broadly consume large context and can miss the implementation path for a question.

**The outcome:** An assistant that starts from the bounded Agent Orientation and runs focused queries that return graph-backed locations.

### Steps

1. `cd your-project`
2. `compass init`
3. `compass install --platform codex` or `compass install --platform claude` (inferred, check the README)
4. `compass watch` in a second terminal to keep the graph current while you work.
5. `compass query "where is authentication enforced?"` to test a focused question before giving it to the assistant.

### Prompt to paste into your agent

```text
In the repository at <project path>, confirm that compass-out/ exists, then run `compass query "<your question>"` with the crabbuild/compass CLI. Expected output: a concise map of seed nodes, edges, and source locations for the question. Verify that the returned source locations exist in the repository before you edit any file.
```

### Caveat

Keep `compass watch` running while the assistant works, or the graph can lag behind your latest edits.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/crabbuild-compass/focused-context-for-coding-assistants/

## How to share an interactive architecture view with a team with Compass

Repo: [crabbuild/compass](https://github.com/crabbuild/compass) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Export a self-contained HTML workbench and open the same graph in VS Code.

**Who it is for:** A tech lead who wants reviewers and new teammates to explore the architecture without installing a server or sharing the repository with a remote service.

**The problem:** Architecture diagrams drift out of date, and static images cannot show call direction or evidence.

**The outcome:** A self-contained HTML page that teammates can open in a browser to search symbols, follow relationships, and jump to source.

### Steps

1. `cd your-project` and run `compass init`.
2. `compass export html --architecture-graph` (inferred, check the README)
3. Open the HTML file that the export wrote and send it to teammates along with a note about the snapshot. (inferred, check the README)
4. `code --install-extension crabbuild.crabbuild-compass-vscode` for teammates who want the same workbench inside VS Code.

### Prompt to paste into your agent

```text
In the repository at <project path>, run `compass export html --architecture-graph` with the crabbuild/compass CLI. Expected output: a self-contained HTML workbench file. Verify that the file opens in a browser without network access and that the architecture view shows the repository's communities.
```

### Caveat

The exported page reflects the snapshot at export time, so re-export after major changes before sharing it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/crabbuild-compass/share-architecture-view-with-team/
