<!-- Markdown mirror. Canonical: https://empryo.com/docs/concepts/genome -->

# The Genome

> How Empryo scans your repo into a ranked dependency graph (PageRank, git co-change, 37 languages) and injects the map into every prompt.

On startup, the Genome engine scans your codebase and builds a graph - every file, symbol, and import edge - then ranks it. The rendered result, injected at the top of every prompt, is the **Genome**: what the agent actually sees.

The agent never wastes a turn grepping for "where does auth live" - it already sees the map.

## What you see

The Genome appears in every prompt, looking like this:

```
src/services/auth/session.ts (→12)
  +SessionManager  Tracks active sessions, refresh tokens, expiry
  +SessionStore
```

- `+` - exported symbol
- `(→12)` - 12 files depend on this one
- `[NEW]` - file changed recently
- One-line summary after the name (when semantic summaries are on)

## What makes it useful

- **Ranked by PageRank** - files imported by lots of others rank higher.
- **Personalized per turn** - files you just edited or read get boosted.
- **Git-aware** - files that always change together get pulled in too.
- **Real-time** - edits re-index immediately.
- **37 languages** - TypeScript, Python, Rust, Go, Java, Ruby, C, C++, Swift, Kotlin, and more.

## Config

Everything runs out of the box. If you want to tune it:

```json
{
  "genome": true,
  "semanticSummaries": "synthetic"
}
```

| Field | Values |
|-------|--------|
| `genome` | `true` (default) or `false` to disable |
| `semanticSummaries` | `"synthetic"` (fast, code-derived, default), `"ast"`, `"llm"` (one-line LLM descriptions), `"off"` |

`/Genome` opens the settings panel (the `genome` config keys below tune the engine that builds the map).

## What gets indexed

The scan sees what git sees: tracked and untracked files, minus anything `.gitignore` hides. Dot-directories (`.github`, `.claude`, `.repro-*`) and build output (`node_modules`, `dist`, `build`, `target`, `coverage`, …) are pruned even when tracked. Outside a git repository the same rules run over a plain directory walk.

To keep something out of the map that git should still track (fixture repos, benchmark inputs, a brand kit of SVGs), add a **`.empryoignore`** at the project root. Same syntax as `.gitignore`, including negations and `**`:

```gitignore
# Indexer-only excludes — git keeps these, the Genome never sees them
testenvs/
bench/
assets/
apps/webapp/public/
```

What it changes:

- The file drops out of the map, the symbol graph, PageRank, and the explore/`code_script` file listing (`api.files`, `api.grep`).
- `read` and `grep` on an explicit path still work. It is hidden from discovery, not from the agent.
- It takes effect on an already-indexed repo: saving `.empryoignore` (or `.gitignore`) triggers a rescan, and the newly excluded rows are pruned. Everything else is skipped on the mtime/size gate, so the rescan costs seconds, not a fresh index. If more than 80% of the index would vanish in one go the prune is refused as a listing error, `/genome` → clear forces it.

Large repositories are capped at 10 000 indexed files, ranked by git recency. The cap is announced in `/genome`. Trimming noise with `.empryoignore` is how you make sure the cap lands on fixtures, not source.

## Skip the scan

For quick one-shot questions, skip the startup scan:

```bash
empryo --headless --no-genome "what's the version?"
```

Or set `EMPRYO_NO_GENOME=1`.
