
Cortex
io.github.DanielBlomma由 GitHub 帳號 DanielBlomma 發布v0.4.2更新於 Oct 24, 2026
Local repo context for coding assistants with semantic search and graph relationships.
概覽
Cortex 在本機為程式碼儲存庫建立程式碼、符號與規則的索引,讓編碼助理取得附引用的脈絡,而不必讀完整個儲存庫。
- 可以做什麼
- 對程式碼、規則與架構決策做語意搜尋,並從結果追蹤符號、呼叫端與相依關係。在重構前評估變更影響範圍,讀取生效的儲存庫規則與棄用標記。檢視某個檔案或實體的慣例設定與鄰近實作模式。為特定任務取得附引用的編碼前指引,並對照事實來源規則與本機模式審查目前的 Git 差異。重新整理索引,並查看索引狀態、背景同步狀態與安裝診斷。
- 適用情境
- 適合編碼助理在較大儲存庫中工作、容易靠猜測或讀取大量無關檔案的情況。用於回答前先檢索、重構前先評估影響,以及在完成變更前審查差異。
- 執行需求
- 以本機程序執行,透過 npm 全域安裝。需要 Node.js 20.9 以上版本與 Git。初始化指令會索引儲存庫、修改 AGENTS.md、安裝 Git 鉤子並啟動背景監看程序。未宣告帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cortex,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Cortex
Give AI coding agents the right context from your repository.
Cortex builds a local map of your code, symbols, relationships, and project rules. Coding agents query that map through the CLI instead of guessing or reading the whole repository.
Your code stays on your machine. MCP is not required.
Start
Requires Node.js 20.9+ and Git.
This indexes the repository, adds Cortex instructions to AGENTS.md, installs
Git hooks, and starts the background watcher.
Check the setup:
Use
Agents can run these commands directly. cortex init adds instructions that
tell them to search before answering and check impact before refactoring. They
do not need an MCP connection.
What Cortex adds
Without Cortex, an agent often searches by filename and reads many unrelated files. Cortex gives it structured repository context:
- semantic search across code, rules, and architecture decisions;
- symbol definitions and file relationships;
- caller and dependency traversal;
- impact analysis before refactoring;
- active rules, deprecations, and source-of-truth signals;
- deterministic, subsystem-scoped convention profiles with cited reusable symbols;
- incremental updates after Git and filesystem changes.
The pipeline is local and straightforward:
Commands you will use
Run cortex help for the complete command list.
cortex conventions uses only the local index. It returns bounded, live-backed
version-1 profiles and does not call a model, planner, provider, or network
service. See Repository convention profiles
for the exact eligibility, limit, hashing, persistence, and safety contract.
Before implementing a code task, use cortex guidance as cited additive
context—not policy authority. Continue to use normal search, related, and
impact when needed, and never skip explicit active rules or conflicts. The
command is local-only and inspection-only; see the exact versioned contract in
Pre-coding guidance.
After coding and before finalization, use cortex review --diff. It separates
exact source-of-truth violations from heuristic local-pattern warnings and is
inspection-only. See Deterministic diff review.
Keep the index fresh
Git hooks and the watcher normally update Cortex automatically.
Run cortex update manually after a large change or when results look stale.
Large repositories
Make lexical and graph search available first while semantic indexing continues in the background:
This mode supports macOS, Linux, and WSL. Native Windows should use normal foreground bootstrap.
Upgrade
Project configuration and rules are preserved. See CHANGELOG.md for version-specific notes.
Optional MCP compatibility
The normal Cortex workflow uses the CLI. If a client explicitly requires MCP,
run cortex connect.
DeepSeek Harness integration
Cortex supports DeepSeek Harness through the V1 explicit tools and skills
integration. Cortex 2.6.0 contains and validates the integration source against
the pinned Harness 0.1.1-rc.2 release. Separate npm bundle distribution is
deferred and currently unavailable.
The bundle provides four agent-scoped tools (cortex_search,
cortex_related, cortex_impact, and cortex_rules) and five Cortex behavior
skills (change-impact, context-review, pattern-review, repo-research,
and using-cortex). Retrieval is local, repository-scoped, explicit, and
user-controlled. The integration does not automatically initialize, update,
or watch a repository.
V2 proactive/assistive retrieval remains planned and experimental; it is not included in Cortex 2.6.0. See the V1-to-V2 integration plan for details.
Links
License
MIT
來源:README.md,提交 0e4ff52
工具
0版本歷史
1- v0.4.2最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。