Find before you build
The single most common failure mode of an AI coding assistant is duplicating something that already exists. A helper called format_currency gets reborn as formatMoney. A useUserProfile hook gets reinvented as useCurrentUser. A MemberCard component gets re-implemented as UserCard two folders away.
Each duplicate is a tiny problem. Their accumulation is a large one — your codebase ends up carrying parallel implementations of the same idea, and a year later nobody remembers which is canonical.
cix solves this by making it cheap and reliable for the assistant to ask "does this already exist?" before writing anything new.
What it does
A single query, run by the assistant before generating a new function or component, returns every existing symbol in your codebase that could be a match — with locations, signatures, and just enough source to judge relevance.
The search:
- Respects word boundaries. A query for
datereturnsformat_dateandparseDate, notupdateorvalidate. Hyphenated, snake-cased, and camel-cased identifiers are all matched correctly. - Distinguishes definitions from mentions. It tells the difference between
function formatDate(), a variable nameddate, and the worddateappearing in a comment. - Returns structured data. The assistant gets a list of candidates with file paths, line numbers, and signatures — not a wall of grep output to re-parse.
This is the difference between a junior engineer who joins the project, types formatDate into their editor's search, and finds the existing one — versus an assistant that doesn't know there is anything to look for and confidently produces a duplicate.
Why this matters
The duplication tax compounds. Each duplicate costs almost nothing to introduce. The cost shows up later — when someone tries to fix a bug in formatCurrency and discovers the bug also lives in formatMoney and displayDollars. By that point the team has lost track of which is the source of truth.
The fix is cheap. Asking the index "does this exist?" takes a few milliseconds and returns a precise answer. The cost of not asking is paid forever.
Convention enforcement isn't enough. Even if your conventions say "reuse before creating," a written rule cannot tell you whether the helper you need already exists. Only an index can.
What the workflow looks like
When the assistant is asked to add a feature that involves a helper:
- It reads the request.
- Before writing anything, it queries the index for existing helpers in the relevant area.
- If something close already exists, it uses it (or surfaces it to you for review).
- If nothing exists, it creates one — and the convention enforcement layer ensures the new file lands in the right place with the right name.
You do not have to remind the assistant to do this. The behavior is part of the integration — the system instructions encourage it, and the convention layer reinforces it.
What it does not do
It does not judge whether two helpers should be unified. If formatDate and formatTimestamp exist in your codebase, cix will surface both for an assistant searching for date formatting — but the decision about which one is canonical, or whether they should be merged, remains with you.
It also does not solve "this exists in a different name space." If your project has both frontend/utils/date.ts and backend/lib/dateutils.py, cix will surface both. Whether the assistant should reuse the backend one or write a new frontend one is a domain question, not an index question.
The point is to make sure the assistant knows about both before it makes that choice. Today, without an index, it doesn't.
Real impact
In a measured side-by-side run on a Laravel + Vue project (see the cleanup case study), the assistant with cix found existing helpers and patterns in roughly half the tool calls of an indexer-free baseline, and identified three structural issues the baseline missed entirely — including a forgotten Python file with hardcoded credentials sitting in a Laravel public/ directory.
The cost difference was striking. Token consumption dropped from 80–100k to 30–40k for the same task with cix in the loop. The savings come from not having to read ten files to answer questions a single index query can answer.
Related
- Convention enforcement — pairs naturally with this; the two together prevent both duplication and misplacement.
- Project orientation — the broader "what is in this project" answer.
- Workflow: feature add — the end-to-end flow this feature sits inside.