How vivacity5x/rubberduck.ai works
RubberDuck.ai indexes Python repositories and answers code questions, drafts changes, or writes documentation with file-and-line citations. Users enter through the web UI, REST API, or CLI; requests retrieve relevant indexed chunks and send them to an LLM for a cited result. The ingestion workflow syncs GitHub files, parses them into semantic chunks, and updates vector, keyword, and call-graph indexes. The graph reflects documented capabilities and shown call relationships; unsampled CLI and UI details are limited to README-level links.
Main entry points: index.py Repository index · sync_api.py GitHub sync · server.py REST API · retrieve.py Hybrid retrieval
Components 19
User interfaces
Repository ingestion
- Settings
rubberduck/config.py - GitHub sync
rubberduck/sync_api.py - AST parser
rubberduck/ast_parser.py
Code indexing
- Code chunks
rubberduck/models.py - Repository index
rubberduck/index.py - Vector embeddings
rubberduck/index.py - BM25 search
rubberduck/index.py - Code tokenizer
rubberduck/text.py - Call graph
rubberduck/graph.py
Retrieval and answers
- Cited result
rubberduck/generate.py - Hybrid retrieval
rubberduck/retrieve.py - Answer generation
rubberduck/generate.py
Other components
- Developer
- GitHub API
- OpenAI-compatible LLM
- GitHub push
Connections 25
- Developer → Web UI: submits query
README.md - Developer → REST API: calls API
README.md - Developer → CLI: runs command
README.md - Web UI → REST API: sends requests
README.md - REST API → GitHub sync: indexes repo
rubberduck/server.py - CLI → GitHub sync: syncs repo
rubberduck/__main__.py - GitHub push → REST API: notifies push
README.md - REST API → GitHub sync: resyncs push
rubberduck/server.py - GitHub sync → GitHub API: fetches files
rubberduck/sync_api.py - GitHub sync → AST parser: parses changes
rubberduck/sync_api.py - AST parser → Code chunks: creates chunks
rubberduck/ast_parser.py - GitHub sync → Repository index: updates chunks
rubberduck/sync_api.py - Repository index → Vector embeddings: stores embeddings
rubberduck/index.py - Repository index → BM25 search: builds rankings
rubberduck/index.py - Repository index → Code tokenizer: tokenizes chunks
rubberduck/index.py - Repository index → Call graph: builds graph
rubberduck/index.py - REST API → Hybrid retrieval: retrieves context
rubberduck/server.py - Hybrid retrieval → Repository index: searches index
rubberduck/retrieve.py - Hybrid retrieval → Call graph: expands neighbors
rubberduck/retrieve.py - Hybrid retrieval → Answer generation: passes chunks
rubberduck/server.py - Answer generation → OpenAI-compatible LLM: requests completion
rubberduck/generate.py - Answer generation → Cited result: returns cited answer
rubberduck/generate.py - Settings → GitHub sync: configures sync
rubberduck/sync_api.py - Settings → Repository index: configures index
rubberduck/index.py - Settings → Answer generation: configures model
rubberduck/generate.py