From a commit to a cited answer.
Cortex watches git, keeps a vector index of the markdown current, and answers questions from the passages it retrieves. It runs on one machine for one person.
Four steps, every 30 seconds.
Discover
Cortex walks its scan roots and treats each folder with a .git directory as a repository. Repositories on an exclusion list are never entered.
Compare
For each repository it asks git for HEAD. If it matches the commit it indexed last time, the repository is skipped.
Diff
A changed repository gets one git diff, limited to markdown. A new repository gets a full listing of its markdown files.
Embed
Added and modified files are chunked, embedded, and written to Milvus. Deleted and renamed files lose their old chunks.


Split by heading, stored by meaning.
These are the defaults. Each one is a setting.
| Setting | Default | What it does |
|---|---|---|
| Files indexed | .md, .markdown, .mdx | Markdown only. Source code is not indexed today. |
| Poll interval | 30 seconds | How often each repository's HEAD is checked. |
| Loose-file scan | At most every 10 minutes | Markdown that lives outside any repository is found by walking the folder, which costs more than a HEAD check. |
| Chunk size | 500 tokens, 50 overlap | Headings split first. A section that is still too long is split again. Code fences are never cut. |
| Smallest chunk | 100 tokens | Anything shorter merges into the previous chunk. |
| Embeddings | voyage-context-4, 1,024 dimensions | Chunks of one file are embedded together, so each carries some of its document's context. |
| Index | Milvus HNSW, cosine | The collection holds each chunk's text, repository, path, heading trail, and commit. |
Search finds passages. Ask writes from them.
Search returns the closest chunks as they are. Ask hands those chunks to Claude with one rule: answer only from this text, and cite it.
| Mode | Model | Chunks | Length |
|---|---|---|---|
| Sonnet (depth) | Claude Sonnet 5.5 | 12 | Up to 1,024 tokens |
| Fast | Claude Haiku 4.5 | 6 | At most three sentences |
The system prompt is cached between questions. Every claim in an answer carries a [repo:path#section] citation, and the page turns those into chips. If the retrieved text does not contain the answer, the reply is "Not in the index."




What stays, what leaves, what is kept out.
| Where | What it receives |
|---|---|
| Local Milvus | Every chunk and its vector. This is the index, and it stays on the machine. |
| Voyage | Chunk text, to be embedded, and each question. |
| Anthropic | A question and the chunks retrieved for it, to be answered. |
| Chronicle | The service's logs. |
The backend listens on 127.0.0.1 only and has no authentication layer, so nothing on the network can reach it.
Sensitive material is kept out three ways. Repositories on an exclusion list are never discovered. Files whose paths contain sensitive words are never listed. And on every tick Cortex sweeps the index and deletes any chunk that matches, in case something got in before a rule existed.