ashlr

/ashlr-genome-init

Initialize a .ashlrcode/genome/ in the current project so ashlr__grep routes through it.

When to use

Once per project, after installing ashlr. Without a genome, ashlr__grep falls back to ripgrep + truncation (still saves tokens, but not as much).

What it does

The command runs bun run ${CLAUDE_PLUGIN_ROOT}/scripts/genome-init.ts --dir "$(pwd)" and relays its output verbatim. The script:

  1. Creates .ashlrcode/genome/ with section files under vision/, strategies/, knowledge/ and milestones/, plus manifest.json
  2. Writes a decision-record stub to knowledge/decisions.md
  3. Auto-populates knowledge/architecture.md from a baseline scan of the project and knowledge/conventions.md from its config files
  4. Scans child directories for related projects and, when it finds any, writes knowledge/workspace.md
  5. In a git repo, adds a post-commit hook that runs the genome commit watcher in the background. An existing hook is appended to, never overwritten

Flags

FlagEffect
--forceDelete and recreate an existing genome. Without it, init refuses to overwrite
--minimalSkip the scan and write stub architecture.md and conventions.md files instead
--summarizeSummarize discovered projects' CLAUDE.md files with a local Ollama model instead of truncating them. Falls back to truncation when Ollama is not running or has no models; /ashlr-ollama-setup gets a model ready

Output

From a run in a small git repo named demo-app:

✓ Initialized genome at /work/demo-app/.ashlrcode/genome/
  sections created: 15 (vision, strategies, knowledge, milestones, meta)
  auto-populated:   architecture.md (from baseline scan), conventions.md (from config files), workspace.md (0 repos, 0 with context)

Next:
  → edit /work/demo-app/.ashlrcode/genome/vision/north-star.md with your project's north star
  → review /work/demo-app/.ashlrcode/genome/knowledge/workspace.md for discovered projects
  → use ashlr__grep — routes through genome RAG for ~-84% savings

With --minimal, the auto-populated: line reads (minimal — stubs only). When --summarize used a model, a summaries: line names it.

If a genome already exists, the script exits 1 with:

ashlr genome-init: Genome already exists at /work/demo-app/.ashlrcode/genome. Re-run with --force to overwrite.

After init

The genome loop updates the genome automatically as you work; /ashlr-genome-loop shows its status and turns it on or off. You don't need to re-run init.

On this page