RAG + Call Graph: Automatic Issue-Tracker Context for Claude Code
Context, not model quality, is the main problem when working with LLMs on real projects. A developer on Habr describes a solution: a RAG index of the repository combining vectors and a call graph, plus a plugin for Claude Code. The system determines on its own which files and functions relate to a task from the issue tracker, assembles the context automatically and trims it to a reasonable token limit.
AI-processed from Habr AI; edited by Hamidun News
Context is the main problem when using LLMs in real-world development. It is not model quality or window size, but what ends up in the prompt and how. A developer shared a practical solution on Habr: a RAG index of the repository with vectors and a call graph, plus a Claude Code plugin that automatically assembles context for a task from the issue tracker, with no manual selection and no wasted tokens.
Why context matters more than model quality
When a developer picks up a task from the tracker and opens an AI assistant, the hardest step is not the conversation with the model but the preparation for it. You need to work out which files belong to the task, which functions get called, and which modules are interrelated. In large projects this takes 10–20 minutes of manual code reading before the first prompt is written.
If you throw everything into the context, tokens burn quickly, the request gets more expensive, and the LLM gets lost in the noise of unrelated code. If you include too little, the model cannot see dependencies, misses important functions and gives superficial answers. The balance is hard to find by hand.
Classic embedding-based RAG solves part of the problem: semantic search finds fragments that are similar in meaning. But it does not understand code structure: function A may be semantically far from B and yet call it directly, and both are needed in the context.
How the solution works
The author built the system on two indexing layers:
- Vector layer — code embeddings for semantic search: similar fragments, comments, names
- Call graph — structural dependencies: function A calls B, module C imports D, E inherits from F
- Claude Code plugin — reads the task description from the issue tracker and runs a search across both layers
- Ranking and trimming — results are weighted by relevance and trimmed to the token limit
- Incremental updates — the index is not rebuilt from scratch on every commit
The system is built on top of a code parser (AST) and static analysis tools. The call graph gets around the limits of semantic search: even if function names are unconventional or comments are sparse, structural links in the code can still be traced through the AST. The index is stored separately from the codebase and requires no changes to the repository itself. The Claude Code plugin installs as a standard extension and talks to the index through a local API.
Token savings
This is where the approach delivers a measurable result. Without smart context, developers often paste entire files or directories into the prompt "just in case." With RAG plus a graph, the system decides what is relevant and returns only that.
"The main problem of working with LLMs in a real project is not model
quality but context," — the article's author.
For large monorepos the effect is especially noticeable: instead of 50,000 tokens of "everything that might be related," you get 3,000–5,000 tokens of precise context. That means both faster responses and direct savings on the API.
In practice, well-assembled context reduces the number of iterations with the model. When the AI sees all dependencies the first time, it is less likely to ask for additional fragments or give incomplete answers.
What this means
The approach points to a real direction for engineering teams adopting AI assistants: automate not the conversation with the model itself, but the gathering of context before it. Integration with the issue tracker is a logical step: the task is already described, and it only needs to be linked correctly to the code. For large teams handling hundreds of tickets a day, this could become a standard part of the engineering process.
- Nov 1, 2026Local models lose to Opus and Codex: 0.21 on a MacBook versus 1.00 for Codex
- Nov 1, 2026Kimi scores 96.2% on a 1C database analytics test and emerges as a fallback if Claude access is blocked
- Nov 1, 2026OpenAI Rewrites GPT Behavior Rules: Five Values and a Chain of Command
- Nov 1, 2026Google admits AI Mode cuts search revenue, shares fall 15%
Key Questions Answered
Why context matters more than model quality?
When a developer picks up a task from the tracker and opens an AI assistant, the hardest step is not the conversation with the model but the preparation for it. You need to work out which files belong to the task, which functions get called, and which modules are interrelated. In large projects this takes 10–20 minutes of manual code reading before the first prompt is written. If you throw everything into the context, tokens burn quickly, the request gets more expensive, and the LLM gets lost in the noise of unrelated code. If you include too little, the model cannot see de
How the solution works?
The author built the system on two indexing layers: Vector layer — code embeddings for semantic search: similar fragments, comments, names Call graph — structural dependencies: function A calls B, module C imports D, E inherits from F Claude Code plugin — reads the task description from the issue tracker and runs a search across both layers Ranking and trimming — results are weighted by relevance and trimmed to the token limit Incremental updates — the index is not rebuilt from scratch on every commit The system is built on top of a code parser (AST) and static analysis too
What are the key details on Token savings?
This is where the approach delivers a measurable result. Without smart context, developers often paste entire files or directories into the prompt "just in case." With RAG plus a graph, the system decides what is relevant and returns only that. "The main problem of working with LLMs in a real project is not model quality but context," — the article's author. For large monorepos the effect is especially noticeable: instead of 50,000 tokens of "everything that might be related," you get 3,000–5,000 tokens of precise context. That means both faster responses and direct savings
Build & Ship Production AI Agents Without Boilerplate Code
Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.