How a7ex-turcan/rtfm works
RTFM is a local documentation retrieval system. A developer indexes files or connected Jira/Confluence sources; documents are converted, chunked, and stored in OpenSearch. An MCP server exposes search and related tools to an LLM client, with hybrid retrieval and optional local embeddings/reranking. The repository also supports notes, contradiction detection, live database queries, status/catalog tools, and watching folders. Some subsystem links are based on README descriptions because their implementations were not sampled.
Main entry points: DocumentIngestor.cs Ingestion coordinator · DocumentSearch.cs Document search · WatchCommand.cs Folder watch · ConfluenceCommand.cs Confluence commands
Components 23
CLI workflows
- RTFM CLI
src/Rtfm.Cli/Program.cs - File indexing
src/Rtfm.Cli/Commands/IndexCommand.cs - Folder watch
src/Rtfm.Cli/Commands/WatchCommand.cs - Confluence commands
src/Rtfm.Cli/Commands/ConfluenceCommand.cs - Jira commands
src/Rtfm.Cli/Commands/JiraCommand.cs
Ingestion and sources
- Document conversion
src/Rtfm.Core/Conversion/DocumentConverter.cs - Markdown chunking
src/Rtfm.Core/Chunking/MarkdownChunker.cs - Ingestion coordinator
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Confluence crawler
src/Rtfm.Core/Confluence/ConfluenceCrawler.cs - Jira crawler
src/Rtfm.Core/Jira/JiraCrawler.cs - Filesystem watcher
src/Rtfm.Core/Watch/FolderWatcher.cs
Search and analysis
- Document search
src/Rtfm.Core/Search/DocumentSearch.cs - Local embeddings
src/Rtfm.Core/Embeddings/LocalEmbedder.cs - Contradiction detection
src/Rtfm.Core/Contradictions/ContradictionDetector.cs - Notes
src/Rtfm.Core/Notes/NotesStore.cs - Database queries
src/Rtfm.Core/Database/DatabaseQueryService.cs
Index and state
- OpenSearch
- Document indexer
src/Rtfm.Core/Indexing/DocumentIndexer.cs
MCP interface
- MCP server
src/Rtfm.Mcp/Program.cs - Search tool
src/Rtfm.Mcp/SearchDocsTool.cs - Database tools
src/Rtfm.Mcp/DatabaseTools.cs
Other components
- Developer
- LLM client
Connections 29
- Developer → RTFM CLI: runs commands
- RTFM CLI → File indexing: dispatches
src/Rtfm.Cli/Program.cs - Developer → File indexing: indexes documents
- File indexing → Ingestion coordinator: ingests files
- Ingestion coordinator → Document conversion: converts
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Ingestion coordinator → Markdown chunking: chunks markdown
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Ingestion coordinator → Local embeddings: embeds chunks
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Ingestion coordinator → Document indexer: indexes chunks
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Document indexer → OpenSearch: writes documents
src/Rtfm.Core/Indexing/DocumentIndexer.cs - Developer → Confluence commands: imports content
- Confluence commands → Confluence crawler: crawls pages
src/Rtfm.Cli/Commands/ConfluenceCommand.cs - Confluence commands → Ingestion coordinator: ingests pages
src/Rtfm.Cli/Commands/ConfluenceCommand.cs - Developer → Jira commands: imports content
- Jira commands → Jira crawler: crawls issues
src/Rtfm.Cli/Commands/JiraCommand.cs - Jira commands → Ingestion coordinator: ingests issues
src/Rtfm.Cli/Commands/JiraCommand.cs - Developer → Folder watch: monitors folder
- Folder watch → Filesystem watcher: watches changes
src/Rtfm.Cli/Commands/WatchCommand.cs - Folder watch → Ingestion coordinator: reindexes changes
src/Rtfm.Cli/Commands/WatchCommand.cs - LLM client → MCP server: sends MCP requests
- MCP server → Search tool: registers tools
- Search tool → Document search: runs search
src/Rtfm.Mcp/SearchDocsTool.cs - Document search → OpenSearch: queries index
src/Rtfm.Core/Search/DocumentSearch.cs - Document search → Local embeddings: embeds query
src/Rtfm.Core/Search/DocumentSearch.cs - Document search → Notes: annotates results
src/Rtfm.Core/Search/DocumentSearch.cs - MCP server → Database tools: registers tools
- Database tools → Database queries: executes queries
src/Rtfm.Mcp/DatabaseTools.cs - Database queries → Developer: queries live database
- Ingestion coordinator → Contradiction detection: checks new chunks
src/Rtfm.Core/Indexing/DocumentIngestor.cs - Contradiction detection → OpenSearch: stores pairs
src/Rtfm.Core/Contradictions/ContradictionDetector.cs