- Embedding güvenliği: repo içindeki
.envartıkEMBEDDING_HOST/API anahtarını değiştiremez; yalnızca~/.ccm/.envyüklenir. Embedding hedefleri varsayılan olarak loopback ile sınırlıdır; güvenilir bir dış sağlayıcıCCM_ALLOW_REMOTE_EMBEDDING=1açık onayı ister. - Path güvenliği:
data→ dış dizin symlink'i artık CLI'da da kök dışına artifact yazamaz; lexical fallback kaldırıldı, hata doğrudan yükseltilir ve Unix entegrasyon testi senaryoyu kapatır. - Sahte çağrı kenarları: doc-comment/string/yorum içindeki fonksiyon adları
başka dosyadaki aynı isimli sembolle sahte ters
Callskenarı üretmez; gövdedeki gerçek call-like çağrılar korunur. - Stabil node ID güvenilirliği: aynı dosya+türde birden çok aday varken çözülemeyen hash'li ID'ler "ilk node" yanlış eşleşmesi yerine reddedilir.
- Policy dosyaları (
policies.json) artık0600ile yazılır; ikincil corpus eval'i process-global env'i serialize ederek paralel race'i önler.
- Swift sembol isimleri attribute'lar tarafından çalınmaz:
@MainActor/@objcgibi deklarasyon öncesi attribute'lar artık gerçek sınıf/struct/enum ve fonksiyon adını gizlemiyor;find_nodes,get_contextveimpact_of_changeSwift projelerinde doğru sembolleri döndürür. - Gerçek çağrı kenarları kurulur: aynı dosyadaki öz-referans artık farklı
dosyadaki hedefi engellemiyor ve belirsiz çağrı kenarları
find_usages/trace_call_chaintarafından da izleniyor. - Tam yeniden indeksleme dosya ayrıştırmasını paralel yürütür (rayon); büyük repolarda index süresi çekirdek sayısıyla ölçeklenir.
- Embedding batch'leri
CCM_EMBED_CONCURRENCYile eşzamanlı gönderilir; vektör sırası korunur. - OpenAI-uyumlu embedding sağlayıcıları genişletildi: HuggingFace TEI, Voyage, Jina, LM Studio, LocalAI, llama.cpp server ve Azure OpenAI tek kod yolundan çalışır.
- Allowlist güvenliği: proje içindeki symlink'li
datadizini index artifact'lerini allowlist dışına yazamaz; çözümlenen tüm yollar canonical proje kökü içinde doğrulanır. - Index, manifest, trajectory ve policy dosyaları Unix'te
0600izniyle yazılır. - MCP:
tools/callnotification'ı ana JSON-RPC loop'unu bloklamaz; istemci girdi hataları-32602(Invalid params) olarak sınıflandırılır. - Dokümantasyon düzeltmeleri: README eval sonucu (53/56), CONTRIBUTING gate komutları CI ile aynı, OPERATIONS hata yönetimi iddiası gerçekle uyumlu.
- Tam indeks yeniden oluşturma staging neslinde tamamlanmadan canlı graf, manifest ve vektör tablosu değiştirilmez; başarısız işlem son sağlıklı indeksi korur.
- Eksik, bozuk veya güncellenmekte olan indeks retrieval çağrısında gizlice
oluşturulmaz;
index_projectiçin açık ve hızlı hata döner. - Büyük repo indeksleri istemci çağrısını açık tutmadan arka planda çalışır, ayrı worker process için hard deadline uygular, tekrar çağrıyla sorgulanır ve tamamlanan iş/lock kayıtları süre sonunda temizlenir.
- JSON-RPC parse ve protokol hataları doğru kodlarla yanıtlanır; bozuk çerçeve, notification ve discovery akışları sunucuyu veya yanıt sırasını bozmaz.
- npm wrapper cache binary'sini checksum sidecar ile doğrular, eşzamanlı soğuk indirmeleri ayırır, yabancı npm sürüm ortamını yok sayar ve child sinyallerini başarısız çıkış olarak iletir.
- Doctor bozuk graf ve vektör tablosunu yalnız dosya varlığıyla sağlıklı saymaz; indeks taraması içerik hash'i ve dinamik artifact hariç tutma kullanır.
resources/listartık Codex keşif akışı için geçerli boşresourceslistesi döndürüyor.resources/templates/listgeçerli boşresourceTemplateslistesi döndürüyor.initializeyanıtı resources capability sözleşmesini açıkça ilan ediyor.- Hermetic MCP testi gerçek subprocess üzerinde Codex'in initialize, resources, templates ve tools keşif sırasını doğruluyor.
- npm
installkomutu MCP yapılandırmasıyla birlikte canonicalSKILL.mddosyasını~/.agents/skills/context-manager/altına atomik olarak yüklüyor. - Büyük repo
index_projectçağrıları istemci zaman aşımından önce yanıt verip sunucuda arka planda devam ediyor; tekrar çağrı durum veya nihai sonucu dönüyor.
- Rust crates, npm package, GitHub tag and binary download paths now use the same version; release CI rejects any future skew before building.
- npm tarballs now include the canonical
SKILL.mdgenerated from the repo root duringprepack. SKILL.mdnow documents stable symbol node IDs, lazy indexing, allowlist fallback, correct tool defaults and metadata-first body controls.read_graphnow honorsinclude_bodyandmax_chars; metadata-only output is the real default across retrieval tools.- Missing LanceDB vector tables trigger a full index rebuild and semantic search reports corrupt/missing tables explicitly instead of returning an unexplained empty result.
- Release CI verifies tag/package consistency and live CLI/MCP assets, then attaches a reviewed npm tarball to the GitHub release for manual publication.
- The default evaluator (
evaluate_with_mode) now scorespredict_contextqueries instead of skipping them as "Unsupported query type". The synthetic cross-repo fixture (180 tasks, 4 query types) now gates with zero skips;predict_contextpasses 30/30 and the overall pass rate is 92.2%. - Shared
predict_context_suggestionshelper deduplicates the engine-call logic betweenevaluate_with_mode(baseline) andevaluate_policy(learned policy) paths. - Rust workspace version bumped 0.3.3 → 0.3.4.
- MCP tools are now metadata-first:
include_body/max_charsopt-in body snippets, server-side limit cap (50), default metadata-only output — stops agent context blowup onimpact_of_change/trace_call_chain/search_code. - Promoted retrieval policy is now wired into runtime: MCP engines load
PolicyStore::active()(new_with_active_policy); the learned policy actually affects searches instead of being a report artifact. - Eval hybrid ranking aligned with production (lexical fallback, spatial score, min_score filter); per-repo graph cache makes learning runs faster.
search_codechunk dedup;trace_call_chainparent-pointer BFS (no path cloning); OpenAI embedder retry-with-warning; fuzzy stable-id drift resolution.- Trajectory logger now records real latency, tool name and request id; MCP sets trajectory context per tool call (Phase 3 feedback collection ready).
- MCP index writes serialized per project (concurrent
index_project/lazy indexing safe); JSON-RPC errors preserve request id and use -32602/-32603. - SKILL.md manual MCP config fixed for strict allowlist; CodeQL now analyzes Rust; CI protoc install hardened; self-improve enforces fixture determinism.
- Added versioned
RetrievalPolicy+PolicyStore+ append-only history (data/ccm_learn/policies.json,history.jsonl); baseline equals the previous production defaults exactly. - Added deterministic train/holdout splitter (sha256, 75% threshold, search_code floor) and promotion gate: per-query-type regression guard, recall/token improvement with sign test, token guard (<= 1.05x), overfit warning. Evaluator is immutable during optimization; only the policy is mutable.
- Added seeded optimizer: 52 grid candidates + top-3 hill-climb (cap 60), train-only evaluation, single holdout measurement of the winner.
- Added offline hybrid evaluation:
CCM_EMBEDDING_FIXTURE+ deterministic token-hash embeddings;predict_contextquery type for context-budget measurement; per-task Recall@K, precision@K, coverage, tokens, latency metrics. - Added
ccm-cli learn {fixtures,optimize,report}andeval --policy; newself-improve.ymlCI job (offline, no secrets; Rejected is a scientific result, not a CI failure). - Added observable-only trajectory logger (
CCM_TRAJECTORY_LOG, off by default). - Added deterministic synthetic corpus (repo_a train / repo_b holdout, 180 tasks) as Phase 1 proof-of-mechanism benchmark; real-repo structural secondary table included in the report.
- Fixed the UTF-8 chunk boundary panic triggered by multibyte Turkish, Finnish, punctuation, and emoji characters.
- Rebuilt cross-file reference edges deterministically after full and incremental indexing, including imports, constructors, and type annotations.
- Corrected stable node ID file-path extraction and ranked code symbols above generic data-file path matches.
- Made
get_contextreturn the enclosing function, method, or class before leaf assignments. - Included staged, unstaged, and untracked worktree files in
diff_context. - Fixed
ccm doctorallowlist health reporting and added missing Go, Java, Kotlin, and C# watch extensions. - Replaced Codex CLI-dependent setup with an atomic
~/.codex/config.tomlupdate that repairs stale or disabled entries. - Added compressed release downloads with resume, retry, timeout, checksum verification, and Linux ARM64 selection.
- Added a release-time quality gate covering formatting, lint, workspace tests, npm tests, indexing, and golden tasks v3.
- Replaced line-based semantic node IDs with stable symbol-path identities while retaining legacy fuzzy lookup.
- Added index schema version 2 with automatic safe rebuild and filesystem-based incremental change detection.
- Added
ccm-cli doctorfor root permissions, index compatibility, graph, vector store, provider, and binary checks. - Added enforceable evaluation thresholds, skipped-task rejection, and baseline regression comparison using golden tasks v3.
- Added semantic-boundary chunking for large AST nodes.
- Added full AST support for C, C++, Ruby, PHP, and Swift.
- Upgraded LanceDB from 0.23.1 to 0.31.0 and removed vulnerable legacy AWS/RSA/rustls dependency chains.
- Hardened MCP installation with pinned npm versions, strict project roots, atomic config writes, and malformed-config preservation.
- Excluded common secret files from indexing and made graph/manifest writes atomic and error-visible.
- Added npm installer tests, MCP protocol release smoke tests, Linux ARM64/macOS Intel artifacts, SBOM generation, provenance attestation, dependency audit, and CodeQL workflow analysis.
-
Idempotent
index_project: A second call toindex_projecton an already-indexed project now correctly reports "No changes detected" instead of reporting a spurious refresh. Two root causes were fixed:- CCM's own data files (
data/ccm_graph.json,data/ccm_manifest.json,data/ccm_db/) are now filtered out of the git untracked-file list before the incremental indexer runs. nodes_createdinIndexStatsnow tracks the delta of new nodes added during a pass, not the total node count of the graph — preventing the "refreshed" response even when zero files changed.
- CCM's own data files (
-
search_codewith embedder disabled: WhenCCM_DISABLE_EMBEDDER=1is set (or no embedding provider is configured),search_codeand the hybrid search path no longer return an "Internal error". They now gracefully fall through to graph-based keyword search. -
diff_contextabsolute path:diff_contextno longer misreports file paths when the project root and CWD differ. Relative paths are now resolved against the project root, not the process CWD.
- Added a real-world end-to-end integration test (
guardian_e2e_test) that exercises all 9 MCP tools against a complex Tauri + TypeScript project. Marked#[ignore]so it runs locally on demand and does not block CI.
search_codenow supports a configurable result limit and returns node IDs plus location metadata.- Added
find_nodesso agents can discover graph node IDs before callingread_graph. get_contextnow includes the same metadata surface, making graph follow-ups more natural.
index_projectnow bypasses lazy engine bootstrapping so an explicit refresh no longer pre-indexes behind the scenes.- Clear "already up to date" messaging is now returned when no changes are detected.
- Internal index artifacts are excluded from manifest diffing so incremental refreshes do not re-index CCM's own generated files.
- Updated the npm publish workflow to match npm trusted publishing requirements with modern GitHub Actions and Node 24.
- Added a registry check so release jobs skip npm publish when the version is already live instead of failing the whole release.
- Added explicit repository metadata to the npm package manifest for trusted publisher validation.
- Hardened binary downloads for concurrent first-run installs by creating unique temporary files per process.
- Ensured wrapper download paths create parent directories before writing binary payloads.
- Switched npm publishing to GitHub Actions trusted publishing with OIDC.
- Removed the release workflow dependency on a manually managed
NPM_TOKEN.
- Added first-run verification steps to the main README and npm README.
- Documented supported MCP hosts and release reliability expectations more clearly.
- Replaced GitHub API-backed
setup-protocwith native package manager installation on Linux, macOS, and Windows runners. - Updated checkout and Node setup actions to current major versions for better long-term runner compatibility.
- Added a JSON-RPC request size limit to protect the stdio transport from oversized payloads.
- Redacted sensitive values from MCP debug logs instead of echoing raw request and response payloads.
- Hardened MCP path normalization to reject parent-directory traversal in
get_contextandread_graph.
- Restricted npm binary download redirects to approved GitHub release hosts only.
- Removed unused core dependencies to reduce build surface and cleanup legacy protobuf-era wiring.
npm installflow now configures Codex throughcodex mcp addwhen the CLI is available.- Cursor config support now writes
~/.cursor/mcp.json.
initializenow negotiates protocol versions instead of always returning2025-06-18.- Latest supported protocol is now
2025-11-25, with compatibility for older clients.
- Evaluation bootstraps missing indexes before scoring instead of silently skipping the entire suite.
- Golden tasks were refreshed to remove references to deleted files in the current repository layout.
- GitHub Release artifacts now include
checksums.txtfor binary verification. - MCP allowlist support with
CCM_ALLOWED_ROOTSand optional enforcement viaCCM_REQUIRE_ALLOWED_ROOTS.
- MCP and CLI now honor
RUST_LOGvia structured logging setup. - Data files (
.md,.json,.yaml) can be embedded whenCCM_EMBED_DATA_FILES=1.
- New CLI integration test (index + file:line query).
- New MCP integration tests (index flow + allowlist rejection).
CCM (Cognitive Codebase Matrix) is now available as a fully functional MCP server for AI-powered code understanding.
-
MCP Server (
ccm-mcp)- Full JSON-RPC 2.0 implementation
- Protocol version
2025-06-18support - Compatible with Antigravity, Claude Desktop, and other MCP clients
- Three built-in tools:
get_context- File/line context retrievalsearch_code- Semantic vector searchread_graph- Code graph node inspection
-
Core Engine (
ccm-core)- LanceDB vector store integration
- Tree-sitter multi-language parsing (Rust, Python, TypeScript, JavaScript)
- Petgraph-based code graph representation
- Hybrid retrieval (structural + semantic)
-
Embedding Support
- Local: Ollama (
mxbai-embed-large,nomic-embed-text) - Cloud: OpenAI (
text-embedding-3-small)
- Local: Ollama (
- Protocol: MCP 2025-06-18
- Transport: stdio (JSON-RPC over stdin/stdout)
- Language: Rust 1.70+
- Vector DB: LanceDB
- Parser: Tree-sitter
- Explicit Indexing Required: A project must be indexed first via CLI
(
ccm-cli index --path .) or MCP (index_project) before retrieval works. - Explicit Multi-Workspace Setup: Multiple roots are supported via
CCM_ALLOWED_ROOTS(falling back toCCM_PROJECT_ROOT), but every root must be allowlisted; strict mode is on by default. - Embedding Dependency: Semantic search requires an embedding provider; local Ollama is the default, and OpenAI-compatible endpoints (OpenAI, Azure OpenAI, HuggingFace TEI, Voyage, Jina, LM Studio, LocalAI, llama.cpp) can be configured.
- Clone and build:
cargo build --release - Configure
.envwith your embedding provider - Add wrapper script to your MCP config
- Restart your AI editor
See README.md for detailed instructions.
Multi-root access (CCM_ALLOWED_ROOTS) and CLI incremental index --watch
are already shipped. Remaining near-term work:
- SCIP index import for precise cross-file symbol resolution
- LSP integration for real-time updates
- MCP-side auto-refresh when watched files change
- Multi-arch Docker CI (
linux/amd64,linux/arm64) - Animated demo/GIF for
GETTING_STARTED.md
This release significantly expands CCM's capabilities to include non-code files and improves the reliability of the installation process.
- Full File Indexing: Added support for
.md,.json,.yaml,.yml, and.toml. - Intelligent Data Parsing: These formats bypass AST extraction and are indexed as whole-file nodes, making them semantically searchable.
- Project Context: AI agents now have full visibility into configuration and documentation files.
- Atomic Downloads: The
npmwrapper now uses.tmpfiles for binary downloads to prevent corrupted installations. - Guaranteed Permissions: Explicit
chmodcalls ensure binaries always have execute permissions on Unix-like systems. - Simultaneous Binary Install: Running
installnow proactively downloads bothccm-cliandccm-mcpto ensure local availability. - Watch Mode: Updated the CLI watch filter to include new supported extensions.
- Run
npx @senoldogann/context-manager installto update. - Re-index your project to pick up new file types:
npx @senoldogann/context-manager index --path .