Docs / code-index

The code index

Poleved parses your project and keeps a map of how the files connect, so the AI does not have to open them one by one to work that out.

It records structure only. The contents of your files are never part of it.

What the index records

RecordedExample
File pathsapp/suppliers/page.tsx
Exported namesSupplierTable, formatIdr
Which file imports whichpage.tsx imports lib/db.ts
The URL route a page file serves/suppliers
The mobile screen a file serves/orders in your Expo app
The database models a file reads or writesSupplier, Order

That is the whole list. No file contents are stored, and the map the AI receives is built from these fields alone.

A file whose contents match a secret pattern is handled differently: its exported names are withheld, while its import edges are kept. Removing the file outright would make everything that imports it read as "nothing imports this" — a wrong answer is worse than a missing one.

Where to see it

  1. Open your project and go to Settings.
  2. Choose Code index.

The page shows four counts — Files, Imports, Routes and Screens — plus the commit the index was built from and a line confirming that no file contents are stored.

Any collaborator can read the page. Rebuild now appears for the project owner only.

Before the first index exists the page reads Nothing indexed yet. It is built after the next run that changes a file.

When it updates

The index rebuilds itself after any run that changed a file. A run that only answered a question left the code untouched, so nothing is rebuilt.

Only the files whose contents actually moved are parsed again. A rebuild that finds nothing new is close to free, which is why every qualifying run can ask for one without slowing your work down.

The owner can also force one with Rebuild now, which is useful when the counts look behind. It is capped at 10 rebuilds an hour per project.

How the AI uses it

On an ordinary prompt, the AI receives a short Code map section naming two things:

  • The files that many other files import, and how many — so a change to a widely used file is made knowing what depends on it, and a type nine files already import gets reused instead of defined a second time.
  • Which files already reach the database, and for which models — so a new query lands beside the existing ones instead of opening a second data layer.

Inside a plan, the same dependency information travels with the inventory each step already receives.

None of this replaces reading code. The AI still opens files when it needs the detail; the map exists so it opens fewer of them.

Limits & notes

  • This is being measured. Whether your project gets the map is decided by the platform, not by you, so runs with and without it can be compared. Some periods run it for every project, others for only a share of them. There is nothing to configure either way.
  • There is no on/off switch, and that is deliberate. The index holds no file contents — only structure derived from code Poleved already stores and already sends to the AI. A switch would suggest a privacy boundary that is not really being crossed.
  • A very large repository is skipped rather than half-indexed, and the page keeps reporting nothing. The ceiling is about 8 MB of source. A half-built index would answer "nothing imports this file" when the truth is that we did not look.
  • Not indexed: anything under node_modules, build output, .md and .json files, type declaration files, and any single file over 200 KB.
  • The counts describe the last successful build. If a run is still in flight, the commit line is the one before it.
  • Limits may change during alpha.