rtfm
CLAUDE.md25 starsChanged 3 months agoMITView on GitHub
The open retrieval layer for AI coding agents. Indexes entire projects (code, docs, legal, research, data) and serves surgical context via MCP. Key differentiator: extensible parser architecture. Anyone can add support for any file format in ~50 lines of Python — or, for JSON-based formats, ~30 lines of declarative YAML via the JSON schema mappings system (.rtfm/mappings/). Ships with 22 parsers, the community can add any format. Not a task manager — a knowledge layer that complements GSD, Taskmaster, Claude…
In this repository5 other files it gives its agents.
- expandSkill
- install-embeddingsSkill
- install-pdf-fullSkill
- install-pdfSkill
- searchSkill
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Not a task manager — a knowledge layer that complements GSD, Taskmaster, Claude Flow, and any workflow tool.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RTFM — Project Context
What is RTFM?
The open retrieval layer for AI coding agents. Indexes entire projects (code, docs, legal, research, data) and serves surgical context via MCP.
Key differentiator: extensible parser architecture. Anyone can add support for any file format in ~50 lines of Python — or, for JSON-based formats, ~30 lines of declarative YAML via the JSON schema mappings system (.rtfm/mappings/). Ships with 22 parsers, the community can add any format.
Not a task manager — a knowledge layer that complements GSD, Taskmaster, Claude Flow, and any workflow tool.
Positioning
- Augment Context Engine / Sourcegraph = closed, code-only, enterprise pricing
- RTFM = open source, multi-domain, extensible, free
- "Augment indexes your code. RTFM indexes everything."
- Works WITH workflow tools (GSD = GPS, RTFM = map)
Architecture
rtfm/
├── core/
│ ├── library.py # Main Library class (SQLite + FTS5)
│ ├── models.py # Chunk, SearchResult, SearchResults
│ ├── embeddings.py # Semantic search (MiniLM)
│ └── sync.py # Incremental file sync
├── parsers/
│ ├── base.py # BaseParser, ParserRegistry
│ ├── markdown.py # Markdown (header-based)
│ ├── python.py # Python (AST-based)
│ ├── latex.py # LaTeX (section-based)
│ ├── yaml_parser.py # YAML (top-level keys)
│ ├── json_parser.py # JSON (keys/arrays)
│ ├── toml_parser.py # TOML (top-level tables; depends_on edges)
│ ├── shell.py # Shell (function-aware)
│ ├── pdf.py # PDF (pdftext/marker)
│ ├── xml_legifrance.py # Legifrance XML
│ ├── html_bofip.py # BOFiP HTML
│ ├── sqlite_parser.py # SQLite DB (schema + ALL rows, streamed; FK edges)
│ ├── jupyter.py # Jupyter .ipynb (cells grouped by heading)
│ ├── csv_parser.py # CSV/TSV (full table indexed, streamed; type inference)
│ ├── xlsx.py # XLSX (per-sheet schema + ALL rows, streamed; openpyxl)
│ ├── epub.py # EPUB ebook (ebooklib + bs4)
│ ├── mobi_parser.py # MOBI/AZW/AZW3 ebook (mobi + bs4, DRM-free only)
│ ├── fb2.py # FictionBook (XML, stdlib only)
│ ├── djvu.py # DJVU (subprocess djvutxt, system binary)
│ ├── docx.py # DOCX (python-docx)
│ ├── odt.py # ODT OpenDocument (odfpy)
│ ├── rtf.py # RTF (striprtf)
│ ├── _chunking.py # Shared paragraph/sentence chunking helpers
│ ├── plaintext.py # Catch-all plain text
│ └── mappings/ # Generic JSON schema mappings (.rtfm/mappings/*.yaml)
├── plugin/
│ ├── claude_md.py # CLAUDE.md injection for target projects
│ ├── discover.py # Fast project structure scan
│ ├── install.py # Orchestration for `rtfm init`
│ └── hooks.py # Claude Code auto-sync hook
├── cli.py # CLI (search, sync, init, status, embed, ...)
├── mcp.py # MCP server (background embeddings)
└── schema.py # Field documentationKey Components
rtfm/core/library.py— Main Library class (SQLite + FTS5)rtfm/core/sync.py— Incremental file sync with hash trackingrtfm/core/embeddings.py— Semantic search (paraphrase-multilingual-MiniLM-L12-v2)rtfm/mcp.py— MCP server (search, context, discover, sync tools + background embeddings)rtfm/plugin/install.py—rtfm initorchestrationrtfm/plugin/discover.py— Fast project structure scan (~1s)rtfm/parsers/— 22 document parsers (markdown, python AST, latex, yaml, json, toml, shell, pdf, xml, html, sqlite, jupyter, csv/tsv, xlsx, epub, mobi/azw, fb2, djvu, docx, odt, rtf, plaintext)rtfm/cli.py— CLI interface
Common Dev Commands
# Run tests
.venv/bin/pytest rtfm/tests/ -v
# Search locally
rtfm search "query" --db db/library.db
# Stats
rtfm stats --db db/library.db
# Status (detailed)
rtfm status --db db/library.db
# Init in a project (for testing)
rtfm init --no-embeddingsEnvironment Variables
RTFM_DB— path to SQLite database (used by MCP server)
Design Principles
- Search-first — Agent should search RTFM before grepping the filesystem
- Progressive disclosure — Serve minimal relevant context, not everything
- Zero config —
rtfm initshould just work - Incremental — Only re-index what changed
- Complementary — Works WITH workflow tools, doesn't replace them
RTFM — Indexed Knowledge Base
This project has been indexed with RTFM.
For any exploratory search (finding which files/modules/classes are relevant
to a topic), use rtfm_search instead of Glob, find, ls, or broad Grep.
Then use rtfm_expand to read easily most relevant files/sections.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

