In serious production environments, AI Coding Agents face a fundamental challenge: they don't truly understand your codebase. They achieve understanding through CLAUDE.md + massive code file reading, which leads to:
- Endless tool calls before reaching sufficient context
- High token consumption with low information density
- Slow Time to Context Ready (TTCR)
We call the "minimum context richness required for an Agent to solve a task" the Context Floor.
| Approach | Tool Calls | Token Usage | Info Density | Effectiveness |
|---|---|---|---|---|
| LSP MCP | High | Medium | High | Good, but slow |
| ACE / RAG | Low | Low | Sparse | Poor correlation |
| Agentic RAG (Explorer) | Medium | Low | High | Good, but TTCR too slow |
Fast. High-density. Low main-agent token usage. Strongly correlated with tasks.
A documentation system designed from the ground up for AI to quickly acquire high-density information while remaining human-readable.
Based on Diataxis, optimized for LLM retrieval:
llmdoc/
├── index.md # Entry point - always read first
├── overview/ # "What is this project?" - MUST read all
├── guides/ # "How do I do X?" - step-by-step instructions
├── architecture/ # "How does it work?" - LLM retrieval map
└── reference/ # "What are the specifics?" - API specs, conventions
Key Design Principles:
- Leverages Agent's ability to batch-read files quickly
- Documents retain critical file paths + module descriptions
- Project overview + architecture + topic-linked guides + references
Example: TokenRoll/minicc/llmdoc
Two primary functions:
- Investigation: Based on llmdoc + existing code, investigate decomposed tasks as prerequisites
- Recording: After completing coding tasks, automatically maintain llmdoc
# Add TokenRoll plugin marketplace
/plugin marketplace add https://github.com/TokenRollAI/cc-plugin
# Install tr plugin
/plugin install tr@cc-pluginCopy the contents of CLAUDE.example.md into your ~/.claude/CLAUDE.md file.
That's it. Once configured, all behaviors activate automatically:
- Agent will always read llmdoc first before any action
- Investigation uses documentation-first approach
- After coding tasks, Agent will ask if you want to update docs
- All skills trigger automatically based on context
/plugin marketplace update https://github.com/TokenRollAI/cc-pluginOnce CLAUDE.example.md is configured, these behaviors are always active:
| Behavior | What Happens |
|---|---|
| Documentation First | Agent reads llmdoc/ before any action |
| Smart Investigation | Uses investigator agent instead of generic exploration |
| Option-Based Coding | Never jumps to conclusions; presents choices via questions |
| Doc Maintenance Prompt | After coding, asks if you want to update documentation |
These skills activate automatically based on your prompts:
| Skill | Triggers | Description |
|---|---|---|
/investigate |
"what is", "how does X work", "analyze" | Quick codebase investigation |
/commit |
"commit", "save changes" | Generate commit message |
/update-doc |
"update docs", "sync documentation" | Update llmdoc |
/read-doc |
"understand project", "read the docs" | Read llmdoc overview |
| Command | Description |
|---|---|
/tr:initDoc |
Initialize llmdoc for a new project |
/tr:withScout |
Complex tasks: deep investigation first, then execute |
/tr:what |
Clarify vague requests with structured questions |
# Initialize documentation system
/tr:initDocJust talk naturally. The system handles the rest:
"How does the auth system work?"
# -> Auto-triggers /investigate, reads llmdoc first
"Add a new API endpoint for user profiles"
# -> Reads llmdoc, investigates, implements, asks about doc update
"commit"
# -> Auto-triggers /commit with intelligent message
Honest assessment: This approach costs approximately 1.5x more to achieve a jump from 85 to 90 points in task completion quality.
- Simple projects: Marginal benefit
- Complex projects: Significant benefit
- Production codebases (100k+ lines): Excellent results
In our production backend (100k lines of code):
- Task completion cost: $1-5 per feature
- Human intervention: Significantly reduced
- Output quality: Ready for review and minor adjustments
| Agent | Purpose |
|---|---|
worker |
Execute well-defined plans with precision |
investigator |
Rapid, stateless codebase analysis |
recorder |
Create and maintain llmdoc documentation |
scout |
Deep investigation for initDoc |
Made with care by DJJ & Danniel for the TokenRoll team