Skip to content
Empryo

The Genome: my agent knows your repo before you type

Every symbol, who calls it and what depends on it, ranked and in context from the first message.

The Genome: my agent knows your repo before you type

You drop a coding agent into your repo and ask for a small change. Before editing anything, it spends a dozen tool calls grepping for definitions and usages, and you pay for each one.

Empryo's agent starts with a map instead. A slice of what it sees before you type (the file and names are an example):

src/lib/cwd.ts: (→92)
  +function getCwd(): string :17  [createModel, handleCommand, +110↑]
  +function setCwd(dir: string): string :31

From three lines the agent knows getCwd is defined on line 17, more than 110 places call it, and 92 files depend on this file. Zero tool calls so far 🙂

That map is the Genome: your whole codebase parsed into a ranked summary of files, symbols and dependencies, in context from the first message. I build Empryo alone and unfunded, and most other features are built on it.

What I needed from a mapLink to this section

Finding its way around is most of an agent's work in unfamiliar code, and every structural question costs a tool call, seconds and context. I wanted the map to answer them up front:

  • Where is a symbol defined? The file and line are on the map.
  • What does a file export? Listed under the file, with signatures.
  • What depends on a file? The (→N) count, plus the callers next to each symbol.
  • It has to stay correct while the agent edits.
  • It has to fit a real repo, not only a toy one.

Ranked so it fitsLink to this section

A 2,000-file repo doesn't fit in a prompt, so the map is ranked by usage. When it gets shortened, the files that matter stay and one-off scripts drop off the bottom. What's left is roughly what an engineer with a year in the repo would call essential.

Updated after every editLink to this section

A map the agent can't trust is worse than no map, because the agent acts on stale facts. So the Genome updates after every edit. Rename a symbol or move a function, and the next thing the agent sees already reflects it, dependencies included.

The impact countLink to this section

The (→N) number is how many files depend on a file, directly or indirectly. Before changing something 40 other files rely on, the agent checks what usually changes with it and updates its dependents. The build that would have broken three files away doesn't.

Why search is not enoughLink to this section

Search tells you where a string appears. The map tells you what the code is: its symbols, their signatures, how they connect and which ones matter most. With symbol-level editing, the agent stops piping grep into sed and works like an engineer who has already read the codebase.

This is the static map, built by parsing your code. Letting it learn from git history and agent behavior is a separate post. In my own repo that moved a formatter from #1 to #103 and grew the co-changing file pairs the map knows about 37 times.