- mcp: rework multi-project routing so one MCP server can serve multiple projects instead of one hardcoded server entry per repo
- mcp: keep explicit
projectas the fallback when the client does not provide enough project context - mcp: accept repo paths, subproject paths, and file paths as
projectselectors when routing is ambiguous
- search: auto-heal on corrupted index now triggers a background rebuild instead of blocking the search response
- simplify the setup story around three cases: default rootless setup, single-project fallback, and explicit
projectretries - clarify that issue #63 fixed the architecture and workspace-aware workflow, but issue #2 is not fully solved when the client does not provide enough project context
- remove the repo-local
init/ marker-file story from the public setup guidance
1.9.0 (2026-03-19)
- make exclude patterns recursive to prevent index pollution (#76) (a814b24)
- prevent orphaned processes via stdin/ppid/onclose lifecycle guards (#77) (0b49d7a)
- route MCP requests per project root (#65) (b0c2d04)
1.8.2 (2026-03-05)
- restore npx installs for published package (107bc14)
1.8.1 (2026-03-05)
- get-team-patterns: filter out legacy testing framework categories from patterns (ed5c858)
- git: run tests only on pre-push (785d28b)
- git: tighten pre-push formatting enforcement (a6d95fc)
1.8.0 (2026-03-05)
- CLI formatters + response types + debug gating (#48) (7a6cd7b)
- cli: status formatter + CLI gallery docs (#56) (b7bc5cc)
- impact: persist import edge details + 2-hop impact candidates (f296e30)
- impact: persist import edge details and 2-hop candidates (5bd84a1)
- indexing: OpenAI embeddings + broader language coverage (#57) (3c1c53b)
- refs: tree-sitter identifier-aware symbol references (2aa0831)
- refs: Tree-sitter identifier-aware symbol references (c23ffec)
- watcher: chokidar auto-refresh with debounced incremental reindex (59e3686)
- watcher: chokidar auto-refresh with debounced incremental reindex (f300961)
- cli: formatter audit — render missing metadata fields, README callers qualifier (d273729)
- cli: remove unused MetadataDependency import (3f08f0e)
- close v1.8 post-merge integration gaps (#44) (d28460c)
- refs: prevent out-of-root file reads from index (1735e3c)
- watcher-tests: await ready + harden Windows cleanup (#55) (9929bb0)
- watcher: allow debounce 0 and harden test (070433c)
- watcher: queue refresh during indexing (2d78110)
- impact: avoid per-candidate array alloc (faf6e73)
- impact: avoid per-candidate array allocation (04e68eb)
1.7.0 (2026-02-21)
- 02-03: implement keyword-index symbol reference lookup (ccfc564)
- 02-03: register get_symbol_references MCP tool (6f6bc3a)
- 03-01: add frozen controlled eval fixture and local codebase (46736ed)
- 03-03: add multi-codebase eval runner command (b065042)
- 03-03: centralize eval harness scoring logic (5c5319b)
- 04-01: add curated grammar manifest, sync script, and publish inclusion (908f39a)
- 04-01: update tree-sitter loader to resolve packaged grammars and fail closed (458520f)
- 04-02: add manifest-driven grammar CI test with fail-closed fallback (2559405)
- 05-01: create AST-aligned chunking engine with symbol tree builder (f865abc)
- 05-01: wire AST-aligned chunker into GenericAnalyzer with 21 unit tests (68a2d6d)
- 05-02: add scope-aware prefix generation to AST chunks (3dbd43e)
- 06-01: add index format metadata and headers (a216c6d)
- 06-01: gate index consumers on IndexMeta validation (6a52c0d)
- 06-02: implement staging directory build and atomic swap for full rebuild (d719801)
- AST indexing: Implement relationship index (#38) (5b05092)
- expose all 10 MCP tools via CLI + document them (#42) (7581fba)
- references confidence, remove get_component_usage, ranked search hints (#39) (33616aa)
- rework decision-card to make it based on AST parsing (#41) (ac4389d)
- symbol ranking, smart snippets, and edit decision card (#40) (03964b3)
- use tree-sitter symbols in generic analyzer (b470709)
- 02-01: fall back when tree-sitter parse has errors (8a7cd92)
- 02-tree-sitter-02: prevent symbol-aware chunk merging (fd02625)
- 03-02: add regression guardrails for extraction and large-file safety (a1c71de)
- 03-02: harden tree-sitter extraction against byte-offset and parser failures (375a48f)
- restore
npx/npm execinstalls by removing the published pnpm-onlypreinstallguard - harden multi-project MCP routing so configured roots are pre-warmed in the background,
codebase://contextfalls back to a workspace overview before selection, and ambiguous sessions now recover through an explicit path-basedprojectselector instead of an opaque session ref
- Definition-first ranking: Exact-name searches now show the file that defines a symbol before files that use it. For example, searching
parseConfigshows the function definition first, then callers. - Path-based multi-project routing: multi-project and monorepo sessions can route explicitly with
projectusing an absolute repo path,file://URI, or a relative subproject path such asapps/dashboard. - Project-scoped context resources:
codebase://context/project/<encoded-project-path>serves proactive context for a specific configured project and also makes later tool calls deterministic.
- Eliminated all
anytypes: 68 occurrences across 15 files now use proper TypeScript types. Replaced unsafeRecord<string, any>withRecord<string, unknown>and narrowed types using proper type guards. Promoted@typescript-eslint/no-explicit-anyfromwarntoerrorto enforce strict typing. - Consolidated duplicate type definitions: Single source of truth for shared types:
PatternTrendcanonical location intypes/index.ts(imported byusage-tracker.ts)- New
PatternCandidateBasefor shared pattern fields;PatternCandidate extends PatternCandidateBase; runtime adds optional internal fields - New
UsageLocationbase for bothImportUsageandSymbolUsage(extends withpreviewfield) GoldenFile extends IntelligenceGoldenFileto eliminate field duplication (file,score)- Introduced
RuntimePatternPrimaryandDecisionCardtypes for tool-specific outputs
- Scope headers in code snippets: When requesting snippets (
includeSnippets: true), each code block now starts with a comment like// UserService.login()so agents know where the code lives without extra file reads. - Edit decision card: When searching with
intent="edit",intent="refactor", orintent="migrate", results now include a decision card telling you whether there's enough evidence to proceed safely. The card shows: whether you're ready (ready: true/false), what to do next if not (nextAction), relevant team patterns to follow, a top example file, how many callers appear in results (impact.coverage), and what searches would help close gaps (whatWouldHelp). - Caller coverage tracking: The decision card shows how many of a symbol's callers are in your search results. Low coverage (less than 40% when there are lots of callers) triggers an alert so you know to search more before editing.
- Index versioning: Index artifacts are versioned via
index-meta.json. Mixed-version indexes are never served; version mismatches or corruption trigger automatic rebuild. - Crash-safe rebuilds: Full rebuilds write to
.staging/and swap atomically only on success. Failed rebuilds don't corrupt the active index. - Relationship sidecar: New
relationships.jsonartifact containing file import graph, reverse imports, and symbol export index. Updated incrementally alongside the main index. - References confidence + hints:
get_symbol_referencesnow includesconfidence: "syntactic"andisComplete: booleanto help agents assess result completeness.search_codebaseresults now include a structuredhintsobject (capped callers/consumers/tests ranked by frequency) drawn from the relationships sidecar.get_component_usageremoved from MCP surface (11→10 tools). If you previously usedget_component_usage, useget_symbol_referencesfor symbol usage evidence (usageCount, top snippets, callers/consumers). - Tree-sitter-backed symbol extraction is now used by the Generic analyzer when available (with safe fallbacks).
- Expanded language/extension detection to improve indexing coverage (e.g.
.pyi,.php,.kt/.kts,.cc/.cxx,.cs,.swift,.scala,.toml,.xml). - New tool:
get_symbol_referencesfor concrete symbol usage evidence (usageCount + top snippets). - Multi-codebase eval runner:
npm run eval -- <codebaseA> <codebaseB>with per-codebase reports and combined summary. - Shared eval scoring/reporting module (
src/eval/*) used by both the CLI runner and the test suite. - Second frozen eval fixture plus an in-repo controlled TypeScript codebase for fully-offline eval runs.
- Regression tests covering Tree-sitter Unicode slicing, parser cleanup/reset behavior, and large/generated file skipping.
- Tree-sitter symbol references (PR #49): identifier scan excludes comment/string nodes;
confidence: "syntactic"returned;usageCountreflects real AST occurrences, not regex matches. - Import edge details (PR #50):
importDetailsper edge (line number + imported symbols) persisted inrelationships.json. Backward-compatible with existingimportsfield. - 2-hop transitive impact (PR #50):
search --intent editimpact now shows direct importers (hop 1) and their importers (hop 2), each labeled with distance. Capped at 20. - Chokidar file watcher (PR #52): index auto-refreshes in MCP server mode on file save (2 s debounce). No manual
reindexneeded during active editing sessions. - CLI human formatters (PR #48): all 9 commands now render as structured human-readable output.
--jsonflag on every command for agent/pipe consumption. - Multi-project MCP routing: automatic routing still handles the single-project and already-active-project cases, while ambiguous multi-project sessions now require an explicit path-based
projectselector instead of forcing a selector-first flow. status+reindexformatters (PR #56): status box with index health, progress, and last-built time. ASCII fallback viaCODEBASE_CONTEXT_ASCII=1.docs/cli.mdgallery (PR #56): command reference with output previews for all 9 CLI commands.
- Preflight response shape: Renamed
reasontonextActionfor clarity. Removed internal fields (evidenceLock,riskLevel,confidence) so the output is stable and doesn't change shape unexpectedly.
- Null-pointer crash in GenericAnalyzer when chunk content is undefined.
- Tree-sitter symbol extraction now treats node offsets as UTF-8 byte ranges and evicts cached parsers on failures/timeouts.
- Post-merge integration gaps (v1.8 audit): Removed orphaned
get_component_usagesource file, deleted phantom allowlist entry, removed dead guidance strings referencing the deleted tool. Added fallback decision card whenintelligence.jsonis absent during edit-intent searches, now returnsready: falsewith actionable guidance instead of silently skipping. - Watcher initialization race:
onReadyhook ensures tests wait for chokidar readiness before asserting (PR #55). - Windows temp dir cleanup hardened with retry/backoff to fix
ENOTEMPTY/EPERMtest flakes (PR #55). --jsonoutput now always pure JSON on stdout; status lines go to stderr (PR #48).
Stripped it down for token efficiency, moved CLI code out of the protocol layer, and cleared structural debt.
- Search output:
trend: "Stable"is no longer emitted (only Rising/Declining carry signal). Added a compacttypefield (service:data) merging componentType and layer into 2 tokens. RemovedlastModifiedconsidered noise. - searchQuality: now includes
hint(for next-step suggestion) when status islow_confidence, so agents get actionable guidance without a second tool call. - Tool description: shortened to 2 actionable sentences, removed reference to
editPreflight(which didn't exist in output).intentparameter is now discoverable on first scan. - CLI extraction:
handleMemoryClimoved fromsrc/index.tstosrc/cli.ts. Protocol file is routing only. - Angular self-registration:
registerComplementaryPatterns('reactivity', ...)moved fromsrc/index.tsintoAngularAnalyzerconstructor. Framework patterns belong in their analyzer.
AGENTS.mdLessons Learned section - captures behavioral findings from the 0216 eval: AI fluff loop, self-eval bias, static data as noise, agents don't read past first line.- Release Checklist in
AGENTS.md: CHANGELOG + README + capabilities.md + tests before any version bump.
1.6.1 (2026-02-15)
Fixed the quality assessment on the search tool bug, stripped search output from 15 fields to 6 reducing token usage by 50%, added CLI memory access, removed Angular patterns from core.
- Confident Idiot fix: evidence lock now checks search quality - if retrieval is
low_confidence,readyToEditis forcedfalseregardless of evidence counts. - Search output overhaul: stripped from ~15 fields per result down to 6 (
file,summary,score,trend,patternWarning,relationships). Snippets opt-in only. - Preflight flattened: from nested
evidenceLock/epistemicStressto{ ready, reason }. - Angular framework leakage: removed hardcoded Angular patterns from
src/core/indexer.tsandsrc/patterns/semantics.ts. Core is framework-agnostic again. - Angular analyzer: fixed
providedIn: unknownbug — metadata extraction path was wrong. - CLI memory access:
codebase-context memory list|add|removeworks without any AI agent. - guard null chunk.content crash (6b89778)
1.6.0 (2026-02-11)
1.6.0 (2026-02-10)
- Search Quality Improvements — Weighted hybrid search with intent-aware classification
- Intent-aware query classification (EXACT_NAME, CONCEPTUAL, FLOW, CONFIG, WIRING)
- Reciprocal Rank Fusion (RRF, k=60) for robust rank-based score combination
- Hard test-file filtering (eliminates spec contamination in non-test queries)
- Import-graph proximity reranking (structural centrality boosting)
- File-level deduplication (one best chunk per file)
- Evaluation Harness — Frozen fixture set with reproducible methodology
- Embedding Upgrade — Granite model support (47M params, 8192 context)
- Chunk Optimization — 100→50 lines, overlap 10→0, merge small chunks
- Dependencies:
@xenova/transformersv2 →@huggingface/transformersv3 - Indexing: Tighter chunks (50 lines) with zero overlap
- Search: RRF fusion immune to score distribution differences
- Intent-blind search (conceptual queries now classified and routed correctly)
- Spec file contamination (test files hard-filtered from non-test query results)
- Embedding truncation (granite's 8192 context eliminates previous 512 token limit)
Re-indexing recommended for best results due to chunking changes.
Existing indices remain readable — search still works without re-indexing.
To re-index: refresh_index(incrementalOnly: false) or delete .codebase-context/ folder.
1.5.1 (2026-02-08)
- use cosine distance for vector search scoring (b41edb7)
1.5.0 (2026-02-08)
- Preflight evidence lock:
search_codebaseedit/refactor/migrate intents now return risk-aware preflight guidance with evidence lock scoring, impact candidates, preferred/avoid patterns, and related memories. (#21) - Trust-aware memory handling: Git-aware memory pattern support and confidence decay so stale or malformed evidence is surfaced as lower-confidence context instead of trusted guidance. (#21)
- Search ranking: Removed framework-specific anchor/query promotion heuristics from core ranking flow to keep retrieval behavior generic across codebases. (#22)
- Search transparency:
search_codebasenow returnssearchQualitywith confidence and diagnostic signals when retrieval looks ambiguous. (#22) - Incremental indexing state: Persist indexing counters to
indexing-stats.jsonand restore them on no-op incremental runs to keep status reporting accurate on large codebases. (#22) - Docs: Updated README performance section to reflect shipped incremental refresh mode (
incrementalOnly).
- No-op incremental stats drift: Fixed under-reported
indexedFilesandtotalChunksafter no-change incremental refreshes by preferring persisted stats over capped index snapshots. (#22) - Memory date validation: Invalid memory timestamps now degrade to stale evidence rather than being surfaced as semi-trusted data. (#21)
1.4.1 (2026-01-29)
- lint: disable no-explicit-any rule for AST manipulation code (41547da)
- Memory System: New
rememberandget_memorytools capture team conventions, decisions, and gotchas- Types:
convention|decision|gotcha - Categories:
tooling,architecture,testing,dependencies,conventions - Storage:
.codebase-context/memory.jsonwith content-based hash IDs (commit this) - Safety:
get_memorytruncates unfiltered results to 20 most recent
- Types:
- Integration with
get_team_patterns: Appends relevant memories when category overlaps - Integration with
search_codebase: SurfacesrelatedMemoriesvia keyword match in search results
- File Structure: All MCP files now organized in
.codebase-context/folder for cleaner project root- Vector DB:
.codebase-index/→.codebase-context/index/ - Intelligence:
.codebase-intelligence.json→.codebase-context/intelligence.json - Keyword index:
.codebase-index.json→.codebase-context/index.json - Migration: Automatic on server startup (legacy JSON preserved; vector DB directory moved)
- Vector DB:
- Startup safety: Validates
ROOT_PATHbefore running migration to avoid creating directories on typo paths
Patterns show "what" (97% use inject) but not "why" (standalone compatibility). AGENTS.md can't capture every hard-won lesson. Decision memory gives AI agents access to the team's battle-tested rationale.
Design principle: Tool must be self-evident without AGENTS.md rules. "Is this about HOW (record) vs WHAT (don't record)"
Inspired by: v1.1 Pattern Momentum (temporal dimension) + memory systems research (Copilot Memory, Gemini Memory)
- Security: Resolve
pnpm auditadvisories by updatinghonoto 4.11.4 and removing the vulnerabledifftransitive dependency (replacedts-nodewithtsxforpnpm dev).
- Docs: Clarify private
internal-docs/submodule setup, addnpx --yestip, documentCODEBASE_ROOT, and listget_indexing_statustool. - Submodule: Disable automatic updates for
internal-docs(update = none).
- Dev: Remove local-only
test-context.cjshelper script.
- Embeddings: Batch embedding now uses a single Transformers.js pipeline call per batch for higher throughput.
- Dependencies: Bump
@modelcontextprotocol/sdkto 1.25.2.
- Auto-Heal Semantic Search: Detects LanceDB schema corruption (missing
vectorcolumn), triggers re-indexing, and retries search instead of silently falling back to keyword-only results.
- Workspace Detection: Monorepo support for Nx, Turborepo, Lerna, and pnpm workspaces
- New utility:
src/utils/workspace-detection.ts - Functions:
scanWorkspacePackageJsons(),detectWorkspaceType(),aggregateWorkspaceDependencies()
- New utility:
- Testing Infrastructure: Vitest smoke tests for core utilities
- Tests for workspace detection, analyzer registry, and indexer metadata
- CI/CD workflow via GitHub Actions
- Dependency Detection: Added
@nx/and@nrwl/prefix matching for build tools
- detectMetadata() bug: All registered analyzers now contribute to codebase metadata (previously only the first analyzer was called)
- Added
mergeMetadata()helper with proper array deduplication and layer merging
- Added
- Updated roadmap: v1.3 is now "Extensible Architecture Foundation"
Thanks to @aolin480 for accelerating the workspace detection roadmap and identifying the detectMetadata() limitation in their fork.
- Critical Startup Crash: Fixed immediate "Exit Code 1" silent crash on Windows by handling unhandled rejections during startup
- MCPJam Compatibility: Removed
loggingcapability (which was unimplemented) to support strict MCP clients like MCPJam - Silent Failure: Added global exception handlers to stderr to prevent silent failures in the future
- MCP Protocol Compatibility: Fixed stderr output during MCP STDIO handshake for strict clients
- All startup
console.errorcalls now guarded withCODEBASE_CONTEXT_DEBUGenv var - Zero stderr output during JSON-RPC handshake (required by Warp, OpenCode, MCPJam)
- Debug logs available via
CODEBASE_CONTEXT_DEBUG=1environment variable - Minimal implementation: 2 files changed, 46 insertions, 25 deletions
- Reported by @aolin480 in #2
- All startup
- Actionable Guidance:
get_team_patternsnow returns aguidancefield with pre-computed decisions:"USE: inject() – 97% adoption, stable""AVOID: constructor DI – 3%, declining (legacy)"
- Pattern-Aware Search:
search_codebaseresults now include:trend:Rising|Stable|Decliningfor each resultpatternWarning: Warning message for results using declining patterns
- Search Boosting: Results are re-ranked based on pattern modernity:
- +15% score boost for Rising patterns
- -10% score penalty for Declining patterns
This release addresses Search Contamination — the proven problem where AI agents copy legacy code from search results. By adding trend awareness and actionable guidance, AI agents can now prioritize modern patterns over legacy code.
- Pattern Momentum: Detect migration direction via git history. Each pattern in
get_team_patternsnow includes:newestFileDate: ISO timestamp of the most recent file using this patterntrend:Rising(≤60 days),Stable, orDeclining(≥180 days)
- This solves the "3% Problem" — AI can now distinguish between legacy patterns being phased out vs. new patterns being adopted
- New
src/utils/git-dates.ts: Extracts file commit dates via singlegit logcommand - Updated
PatternDetectorto track temporal data per pattern - Graceful fallback for non-git repositories
- Added
typescriptas runtime dependency (required by@typescript-eslint/typescript-estree)
Initial release.
- Semantic search: Hybrid search combining semantic similarity with keyword matching
- Pattern detection: Detects team patterns (DI, signals, standalone) with usage frequencies
- Golden Files: Surfaces files that demonstrate all team patterns together
- Internal library discovery: Tracks usage counts per library, detects wrappers
- Testing framework detection: Detects Jest, Jasmine, Vitest, Cypress, Playwright from actual code
- Angular analyzer: Components, services, guards, interceptors, pipes, directives
- Generic analyzer: Fallback for non-Angular files (32 file extensions supported)
- Local embeddings: Transformers.js + BGE model, no API keys required
- LanceDB vector storage: Fast, local vector database
- Framework-agnostic core with pluggable analyzers
- Angular as first specialized analyzer (React/Vue extensible)
- tsconfig paths extraction for internal vs external import detection