What is Rubi?
Rubi is a knowledge graph and context manager for AI coding agents, designed to help assistants work with project knowledge without repeatedly reading long conversation histories or rediscovering how a codebase fits together. It combines session compaction with a searchable project graph of files, decisions, bugs, gotchas and concepts. Rubi is built for Claude Code and also works through MCP with Codex, Gemini CLI, Cursor, GitHub Copilot and other agents, including setups using local models.
Rubi Features:
Early Compaction: Rubi compacts a session before it grows too large, then restores the relevant project context so the coding agent can continue.
Session Handoffs: Before compaction, Rubi saves a handoff with the current thread and brings it back into context afterward.
Code Map: A code map records imports and uses PageRank to identify central files, giving the agent an overview of project structure.
Temporal Knowledge Graph: The graph stores project decisions, bugs, gotchas and concepts, with links to related files and records of when knowledge changes.
Hybrid Search: Search combines text matching, exact file and function names, and graph connections, then ranks results within a token budget.
Stale Knowledge Flags: When a file has changed since a related note was recorded, Rubi flags the result so the agent can double-check it.
Token X-Ray: The X-ray reads local Claude Code transcripts to show how token use and context costs accumulate across sessions.
Rubi Benefits:
Less Re-Reading: Shorter sessions can reduce the repeated context an agent processes, helping keep long coding work from accumulating unnecessary token use.
Faster Orientation: A project map and connected knowledge help an agent find relevant code and background without repeatedly exploring the same files.
Preserved Progress: Restoring a handoff after compaction lets work continue with its thread intact rather than requiring a fresh explanation.
Fewer Stale Rules: Superseded decisions remain traceable while changed files are flagged, making it easier to distinguish current guidance from old context.
Cost Visibility: Transcript analysis helps developers see where context is driving usage and identify sessions that may benefit from a different workflow.
Use Cases:
Long Coding Sessions: Use Rubi when a coding conversation grows over time and you want the agent to compact context while retaining the current task.
Unfamiliar Codebases: Give an agent a project map and linked knowledge when it needs to locate central modules and understand how files relate.
Changing Decisions: Track a project rule that has been replaced, so an agent can find the current decision and inspect why the earlier one changed.
Recurring Bugs: Search connected bug notes, gotchas and code references when investigating a problem that has appeared in the project before.
Usage Reviews: Review Claude Code transcripts with the token X-ray to understand how context use builds across recent coding work.

