DocsReference

The Router

repo root

The single file your AI reads first — the living index of your contextbase.

What it is

The Router is the entry point for every AI session. It doesn't hold your context — it points to it, so the agent loads only the slice the work needs (lazy-loading is the compression). Maintained over time, it becomes your project's living wiki. The concept name is router.md; on disk you name it for your agent — AGENTS.md (the cross-agent default), CLAUDE.md for Claude Code, GEMINI.md for Gemini — so it's read automatically.

When to write it

First — before any code. Then keep it current at the end of every session. Ship it under your agent's filename from day one; don't rely on a rename you'll forget.

What goes in it

  • Project name and a one-line description
  • Links to the active PRDs
  • The most recent session brief
  • The knowledge index (03-knowledge/)
  • The tech stack and the pilot rules

How it fits

The Router sits above everything — it's how the agent finds the contextbase. The rule: if the Router doesn't link to it, the AI won't find it.

Get the templatestarter/AGENTS.md