Genome
How the project genome index works — propose, consolidate, team sharing, and the scribe loop.
The genome is a per-project index of architectural knowledge stored under .ashlrcode/genome/. ashlr__grep can retrieve relevant genome sections, then fall back to ripgrep when retrieval does not produce a result.
What is in the genome
The genome is organized into Markdown section files under .ashlrcode/genome/. /ashlr-genome-init writes these to start:
| Section | Contents |
|---|---|
knowledge/architecture.md | System shape from a baseline scan of the project |
knowledge/conventions.md | Conventions detected from config files |
knowledge/decisions.md | An architecture decision record stub to fill in |
knowledge/workspace.md | Discovered projects, written only for multi-project workspaces |
The automatic loop adds observations to knowledge/discoveries.md. Section files are plain Markdown, so you can edit them or add your own.
The propose/consolidate loop
Propose: A PostToolUse hook watches results from Read, Grep, Edit, Write, Bash and their ashlr__* equivalents. When a result looks architecturally interesting, it appends at most one proposal to .ashlrcode/genome/proposals.jsonl.
Consolidate: At SessionEnd, and when a subagent stops, pending proposals are merged into their section files once at least 3 are waiting. /ashlr-genome-loop run runs a pass now, with the same 3-proposal minimum. The merge is:
- LLM-assisted when an LLM endpoint is reachable (
ASHLR_LLM_URL, thenANTHROPIC_API_KEY, thenOPENAI_API_KEY): proposals are condensed into a few curated bullets, or dropped when nothing is new.ASHLR_GENOME_LLM_SYNTHESIS=0turns this off. - Deterministic otherwise, or when the LLM call fails: proposals are de-duplicated and appended as bullets.
Each run is logged to ~/.ashlr/genome-consolidation.log. The ashlr__genome_propose and ashlr__genome_consolidate MCP tools let an agent queue and merge updates directly.
Scribe loop settings
/ashlr-genome-loop controls the loop:
| Command | Effect |
|---|---|
/ashlr-genome-loop status | Pending proposal count, last consolidation, and whether the loop is on |
/ashlr-genome-loop run | Run a consolidation pass for the current project now (needs at least 3 pending proposals) |
/ashlr-genome-loop off | Write "genomeAuto": false to ~/.ashlr/config.json |
/ashlr-genome-loop on | Turn the loop back on |
ASHLR_GENOME_AUTO=0 also turns it off for one shell. Turning the loop off keeps the genome; it only stops new proposals and consolidation.
Team sharing
The genome directory is plain text and git-friendly. Commit .ashlrcode/genome/ to share the index with your team. Teammates get a warm genome on first checkout — no re-init required.
For automated genome updates on PRs (diff-based genome refresh), see Pro tier — backend.
Genome vs ripgrep
| Genome (warm) | Ripgrep fallback | |
|---|---|---|
| Output | Relevant indexed sections | Matching file text |
| Freshness | As of last consolidation | Always current |
| Scope | Architectural knowledge extracted from tool calls | Raw file text |
| Setup | Requires /ashlr-genome-init once | Always available |
Related
/ashlr-genome-init— initialize the index/ashlr-genome-loop— inspect and control the scribe loop- Genome tools —
ashlr__genome_propose,_consolidate,_status