Repository navigation
v1.2.0
Added
-
Interactive Web Architecture Visualizer (
codive web): Completely revamped local browser architecture graph with 60 FPS$O(N)$ force-directed physics, directory clustering, smooth mouse-wheel zoom & pan, node dragging, live syntax-rendered code snippet inspector with line numbers, and token-optimized Markdown context prompt exporter. -
SQLite Concurrency & Batch Inserts: Added memory-mapped I/O (
mmap_size) and in-memory temporary storage pragmas, along with batching of symbol extraction inserts for faster cold repository indexing.
Security
- Local secrets and ignored files were indexed and could be sent to the AI model. The scanner ignored
.gitignore, so files such as.env, private keys, and gitignored build output were indexed, andsearch_codecould return their contents to the agent, and from there to its model provider. codive now follows.gitignore(nested files,.git/info/exclude, negation,**), checked against git's own output. It also never indexes credential-like files (.env,.env.*,*.pem,*.key,id_rsa,.npmrc,*.tfstate, …) even when they aren't gitignored..env.exampleand similar template files are still indexed. The file-reading tools refuse credential files too. Existing indexes drop these files on the next sync. codive setupcould wipe settings in AI client configs. It rewrote each client config and dropped anything it didn't recognise, including other MCP servers'envblocks (often API keys), remote server URLs and headers, and all of Continue's settings. A config containing comments was replaced entirely. setup now edits only codive's own entry and keeps a one-time*.codive-backupof the original. It leaves configs with comments untouched and prints the entry to add by hand.codive init-rulesoverwroteCLAUDE.md,AGENTS.md,GEMINI.md,.cursorrulesand.windsurfrules, andcodive install-hooksoverwrote existing git hooks. Both now edit only a marked codive block. Hooks followcore.hooksPath.codive upgradeinstalled downloads without checking them. It now verifies the SHA-256 checksum when the release publishes one, and test-runs the new binary before replacing the current one.
Added
read_symbolMCP tool returns exactly one definition (doc comment, signature and full body) instead of the whole file. It acceptsName,Type.Methodorpath:Name, and suggests close names when nothing matches exactly. On the Go standard library it returned the right definition with 11–86× fewer tokens than reading the file, typically in a few milliseconds.- Go: where a definition ends comes from Go's own parser, so it's exact.
- Python: the end is found by indentation.
- Brace languages (JS/TS, Java, C#, Rust, C/C++, …): a brace-matching scanner finds the end. It handles strings, raw strings, comments, character literals and Rust lifetimes, braces inside headers (React destructured props, generic constraints), bodyless declarations and Allman-style braces. It agrees with Go's parser on 99.99% of ~105k standard-library declarations, and a test keeps it checked against the parser.
read_symbolfinds code by what it does when the agent doesn't know the name. Passintent(for exampleretry backoff interval payment error), or asymbolcontaining spaces. Definitions are ranked by the words they share with the intent. The index covers each definition's name split into words (processPaymentError→ process payment error), its signature and doc comment, and the identifiers and comments in its body, weighted in that order. The best match is shown in full and the next five are listed, and definitions in test files rank below code. When a guessedsymbolname doesn't exist, anintentgiven in the same call is used instead. On codive's own source, 7 of 10 plain-English questions returned the right function first, in about 2 ms each. Matching is by words, not meaning, so the agent should include identifier words and synonyms it expects the code to use. Existing indexes are rebuilt automatically to add the new search data.- Intent ranking learns from use. When the agent goes on to use one of the results within 15 minutes, codive records that result as useful. Using a result means reading it by name, asking for its callers or tests, reading its lines, or editing its body. After 20 such queries, a small ranking model retrains on that feedback. It weighs the search score, where the query words matched, whether the result is in a test, and how often the definition was useful before. The new model is used only if it ranks held-out queries at least as well as the current one and the starting weights. The model only reorders results that the index found, so it can't invent code or line numbers. Everything stays in
.codive/index.dband survives index rebuilds.codive rankershows what has been learned,codive ranker resetforgets it, andCODIVE_LEARNING=offturns logging and learning off. - Indexes rebuild automatically when symbol extraction changes. Each index records which version of the symbol extractor built it. When codive's extractor changes,
serverebuilds the index once in the background (queries keep working meanwhile), andupdateandwatchrebuild before continuing. --dry-runand--undoforsetup,init-rulesandinstall-hooks.- The MCP server supports roots: it answers from the workspace the client actually has open, instead of the repository that
setupwas last run in. setupsupports Claude Code (.mcp.json), per-project Cursor configs, VS Code'sserversformat, Gemini CLI and Codex CLI, and only configures clients that are installed.doctorchecks that each detected client really has codive registered.
Fixed
- Go method signatures were stored without their receiver (
func Start(...)instead offunc (s *Server) Start(...)), so agents couldn't tell same-named methods on different types apart. Existing indexes are rebuilt automatically to pick up the fix. - A symbol used inside a minified file (one line of hundreds of kilobytes) made
find_referencesreturn the whole line. Reference snippets are now trimmed around the match, and every tool response is size-capped, with a visible marker wherever text was cut. find_references,find_callers, andblast_radiuscould return nothing at all for common identifiers on large repositories (e.g.Fprintfwith ~2,900 references in the Go standard library): the reference scan built an FTS snippet for every candidate file, ran one extra query per candidate, and re-fetched each file's content, so it ran past the tool-call deadline. References are now streamed straight from the full-text index and stop at the requested limit (find_referenceson a 10k-file repo: 1.3s → under 10ms). Measured againstgrep -won five common symbols: 0 missed, 0 extra.- Capped results no longer read as complete.
find_references/find_callerssay "MORE EXIST" when the limit was hit (previously an agent was told e.g. "Found: 30" for a symbol with thousands of references),blast_radiusreports "N+" with an explicit lower-bound note, andfind_symbolreturns at most 30 matches (configurable vialimit) with a "showing N of M" header — a broad query likeNewpreviously returned ~100,000 tokens in one response. find_referencesmatched substrings (ScanmatchedScanIncremental,rescan), andfind_callerscould miss real callers when a symbol was mostly mentioned in comments or imports. Both now match whole identifiers and filter during the scan.- Re-running
codive initkept symbols from deleted files and duplicated any symbol whose line number had moved.initnow replaces the index atomically. find_tests_forfound test files but never listed the tests inside them.- Reading a file through the MCP server (e.g.
read_file_contextonnode_modules/.env) could pull ignored files into the full-text index, and everyfind_symbolmatch triggered a full re-parse and four table rewrites even for unchanged files. Files are now only re-parsed when already indexed and actually changed. get_git_changesmishandled paths with spaces or non-ASCII characters (git C-quotes them), collapsed new untracked directories into one unreadable entry, and listed affected symbols in random order.- Commands that take a symbol name (e.g.
codive blast GenerateToken) created a stray./GenerateToken/.codive/log folder in the current directory. - A crash between a schema migration and its version bump left the database failing to open with "duplicate column" on every start. Migrations are now transactional.
- A crash mid-sync could leave a file marked as indexed at its new content hash while still holding the previous version's symbols. All index writes for a batch now happen in one transaction.
Changed
- Freshness is now guaranteed at query time: before answering, the MCP server syncs the index if its last sync is more than 2s old, and the background poll adapts to repository size. On a 10k-file repository this cut idle CPU from ~33% of a core to ~3% while new files still become visible within ~1–2s.
- No-op rescans no longer reopen files already known to be binary (0.9s → 0.25s per rescan on a 10k-file repository).
- Every MCP tool call now runs under a 60s deadline, and
get_git_changesruns a fixed number of git processes (one streamed diff for the whole repo instead of one per changed file), listing at most 500 files and analyzing at most 300 — with any skipped files disclosed in the output. read_file_contextreturns at most 1,000 lines per call and acceptsstart_line/end_line.- MCP auto-indexing of an agent-supplied
workspace_pathis limited to the configured workspace or a git repository root. - The MCP server negotiates the protocol version (
2025-06-18,2025-03-26,2024-11-05) and accepts JSON-RPC batches. find_references/find_callersoutput is grouped by file, using 10–25% fewer tokens than the equivalentgrep -rnoutput.- Indexing (
init,update,watch,serveauto-sync, MCP auto-index) now shares one implementation instead of four drifted copies.
What's Changed
- Accurate, fresh, and fast MCP context on large repos by @recscse in #1
- Find code by what it does, learning from what gets used (+ land #2 and #3 on main) by @recscse in #4
- perf(init): stream multi-step progress and batch SQLite inserts by @recscse in #5
- feat(web): revamped interactive architecture visualizer, SQLite optimizations & v1.2.0 release by @recscse in #6
Full Changelog: v1.1.1...v1.2.0