Codebase Mapping
The autowiki and sync commands turn any folder into structured wiki documentation — codebases, company docs, personal notes, or research papers.
Initial mapping
Section titled “Initial mapping”axiom-wiki autowikiAutowiki works in three phases:
1. Scan
Section titled “1. Scan”Walks the filesystem without any LLM calls. Respects .gitignore and standard ignores (node_modules, dist, build, etc.). Builds a directory tree and collects file stats.
2. Confirm
Section titled “2. Confirm”Shows project stats and a cost estimate before any LLM work begins:
Project scanned
234 files · 1.2MB · ~250,000 words .ts (89), .tsx (42), .md (15), .json (8)
The agent will explore this codebase and build a wiki autonomously.It will survey the project structure, read key files, and createwiki pages in batches (up to 10 batches, max $5.00).
Press Enter to proceed · Ctrl+C to cancel3. Explore & Write
Section titled “3. Explore & Write”The agent autonomously explores the project using tools:
get_project_overview— see the directory tree, key files, language statsread_project_file— read any file on demandlist_project_dir— list directory contentssearch_project— grep across the project
It reads files, decides what pages to create, writes them using wiki tools, and signals when it’s done. Large projects are processed in multiple batches — each batch starts fresh, but the wiki carries state between them.
The agent adapts to the content:
- Code folders — documents architecture, modules, patterns, design decisions
- Document folders — extracts entities, concepts, themes; creates synthesis pages
Keeping pages current
Section titled “Keeping pages current”After the initial autowiki, use sync to update what changed:
axiom-wiki syncSync detects changed files via git diff and lets the agent decide which wiki pages need updating:
Changes detected since last sync:
14 files changed: src/core/ 5 files src/cli/ 6 files
The agent will read existing wiki pages and the changed code,then update stale pages and create new ones as needed.
Press Enter to proceed · Ctrl+C to cancelThe agent reads existing pages, checks the changed files, and only rewrites what’s actually stale.
Re-running autowiki
Section titled “Re-running autowiki”Running autowiki again creates fresh pages from scratch. Use this when the project structure has changed significantly.
How it works under the hood
Section titled “How it works under the hood”Autowiki saves its state to .axiom/map-state.json — this tracks which pages were created and the git commit hash at the time of the last sync. This is what lets sync know what changed.
The agent runs in batches. Each batch is a fresh LLM call with a clean context window. Between batches, the wiki itself serves as the agent’s memory — it reads wiki/index.md to see what it’s already documented, then focuses on uncovered areas. This means:
- A crash mid-batch doesn’t lose work from previous batches
- Cost is tracked per batch with a safety ceiling
- Context doesn’t degrade on large projects