
Knowing
io.github.blackwell-systems由 GitHub 帳號 blackwell-systems 發布v0.16.0更新於 Oct 24, 2026
Content-addressed code graph with 22 MCP tools for AI agents.
概覽
一個本機 MCP 伺服器,將程式碼儲存庫索引為內容定址圖,為助理提供排序後的程式碼脈絡、影響範圍、測試範圍與可離線驗證的證明。
- 可以做什麼
- 建立與檢視程式碼圖:索引儲存庫、查詢圖、檢視儲存庫結構與跨儲存庫呼叫者,並追蹤資料流與符號間路徑。理解影響:計算變更的爆炸半徑,為任務、檔案或拉取請求產生排序脈絡,並解釋符號排名原因。比較與審查:比對快照與語意變更、評估 PR 影響、列出過期邊。執行期與歸屬:檢視執行期流量、死路由與追蹤統計,查詢程式碼擁有者、社群與測試範圍。證明與維護:產生 Merkle 證明與不存在證明、驗證圖完整性,並清除某個儲存庫的資料。
- 適用情境
- 適合助理在程式碼庫中工作時使用,以圖排序的脈絡取代反覆的 grep 與讀取;也適合需要影響分析、測試選擇、PR 審查支援,或為稽核提供可離線驗證的程式碼關係證明的場景。
- 執行需求
- 以本機程序透過 stdio 執行,可透過 npm 安裝(README 也列出 Homebrew、pip 與 Go)。需要一個 git 儲存庫進行索引;首次啟動會自動索引,約需 10 到 30 秒。無需 API 金鑰或模型下載。執行期追蹤工具需要匯入 OpenTelemetry 追蹤資料。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Knowing,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
English · 简体中文 · Русский · हिन्दी · العربية
[Blackwell Systems] [DOI] [MCP Tools] [Languages and Formats] [License]
Self-adapting code intelligence engine. Observes its own graph density and adjusts retrieval strategy automatically. 38 edge types, 28 MCP tools, 263 equivalence classes, cryptographic proofs. Gets smarter with scale, not dumber.
[!NOTE] Built on published research: Content-Addressing as a Computation Primitive for Software Relationship Intelligence (DOI: 10.5281/zenodo.20342255)
Your architecture diagram says service A calls service B. Can you prove it?
knowing can. It builds a content-addressed graph of extracted code relationships, snapshots it as a Merkle tree tied to a git commit, and generates cryptographic proofs that verify offline. Agents use it for ranked context. Security teams use it for audit. Platform teams use it to compare code against production traces.
It gets better every time you use it. When code changes, stale knowledge expires automatically.
That's it. The MCP server auto-indexes your repo on first launch. No model downloads, no API keys. Your agent now has ranked context, blast radius, test scope, and implicit noise demotion that improves results during active sessions.
Verify it works: Ask your agent: "Use the context_for_task tool to find symbols related to [something you know exists in your code]." You should see ranked symbols with scores and file paths from your codebase. If results are empty, the repo is still indexing (10-30 seconds on first launch). If results seem unrelated, see Troubleshooting.
Not using an AI agent? Skip to CLI usage below.
Three Things, One Architecture
knowing is three products built on one foundation (content-addressed graph with hierarchical Merkle trees):
1. Context engine for AI agents One call returns the most relevant symbols for a task, ranked by graph centrality, recency, and learned usefulness, packed to fit your token budget. 263 framework equivalence classes bridge vocabulary gaps when keywords fail. 47% fewer tool calls. 84% fewer tokens. Results improve with feedback.
2. Audit primitive for compliance
Every graph state is a Merkle root tied to a git commit. knowing prove generates a cryptographic proof that a relationship existed. knowing verify checks it offline. knowing fsck verifies the entire graph in 98ms. Supply chain detection extracts credential access, process spawning, and network exfiltration edges to flag structurally suspicious code.
3. Noise demotion that learns Symbols returned but never used by the agent get demoted on future queries. When code changes, feedback expires automatically (verified via package Merkle roots). The system gets more precise during active sessions. That is the property knowing is built around.
These aren't separate features. They're structural consequences of content-addressing: the same hash that makes context cacheable also makes it provable, and the same Merkle root that detects staleness also expires stale feedback.
What It Answers
For your agent:
- "I'm changing this function. What breaks?" (blast radius across callers, tests, routes, repos)
- "Give me 50,000 tokens of context for this task." (graph-ranked, not grep-searched)
- "Which tests should run?" (call-graph traversal, 98% precision)
For your platform team:
- "Is this route used in production?" (static analysis + OTel runtime traces)
- "What did the service graph look like at a specific snapshot?" (snapshot chain, each root tied to a git commit)
For your security team:
- "Prove service A calls service B at this commit." (Merkle proof, verifiable offline)
- "Prove this dependency does NOT exist." (absence proof via sorted leaves)
- "Generate a compliance report." (
knowing audit -proofs, one command) - "Does this package read credentials and spawn processes?" (
knowing audit-supply-chain --scan-all)
Numbers
All benchmarks are reproducible. The cross-system benchmark (P@10=0.330) uses 17 repos pinned to exact commits with a corpus manifest and setup script for full from-scratch reproduction. See METHODOLOGY.md for protocol details.
Quick Start
Path A: MCP server (recommended for AI agents)
Path B: CLI usage (explore the graph yourself)
Verify your setup
After indexing, run these commands to confirm everything is working:
If knowing stats shows zero nodes or very few edges, see
Troubleshooting below.
More CLI commands
For the full command reference, see CLI Reference.
MCP Integration
Add the MCP server to your agent. The config is the same everywhere; only the file path differs.
The --watch flag re-indexes on file changes. Your agent always queries fresh data. No manual knowing index or database path needed: the MCP server auto-indexes the git repository on first launch and registers it in the roster for future sessions.
Embeddings are off by default (confirmed neutral on cold-start benchmarks). Use --embeddings to enable if experimenting. The graph structure and equivalence classes carry retrieval quality.
What your agent gets: The key tool is context_for_task. When your agent calls it with a task description, knowing returns ranked, relevant code symbols packed into a token budget. This replaces grep-read loops. Other useful tools: blast_radius (what breaks if I change this?), test_scope (which tests to run?), explain_symbol (why did this rank here?). See MCP Tools Reference for all 28 tools.
Verify it works:
- Start a session with your agent
- Ask: "Use the context_for_task tool to find symbols related to [something specific in your code]"
- You should see ranked symbols with scores and file paths from your codebase
If results are empty: the repo may still be indexing (10-30 seconds on first launch). If results seem unrelated: use specific symbol names in your task description (e.g., "find the AuthMiddleware handler" not "find auth code"). You can also verify from the CLI:
For HTTP transport (multi-agent, daemon mode):
Why This Works
Git versions files. knowing versions the understanding of code.
The entire system is built on one idea: content-addressed identity. Every symbol, relationship, and snapshot is SHA-256 hashed. This single choice gives you:
- Staleness detection for free. Changed file = new hash = stale edges are known without scanning.
- Caching for free. Same package root = same results. 93x speedup on unchanged queries.
- Integrity for free. Verify all stored hashes and snapshot chain continuity. 98ms.
- History for free. Each snapshot is a Merkle root tied to a git commit. Walk the chain.
- Feedback expiration for free. Feedback stores the package Merkle root. Code changes = root changes = old feedback is invisible.
- Proofs for free. Merkle path from leaf to root is a self-contained cryptographic proof.
How It Works
Two planes:
- Execution: indexes repos, extracts symbols and relationships, ingests traces, stores snapshots.
- Intelligence: computes blast radius, context packs, test scope, feedback, communities from the stored graph.
The boundary matters: intelligence features read the graph and produce derived results. They cannot corrupt graph facts. A bad ranking produces a bad recommendation; it cannot invalidate a proof.
Capabilities
Languages And Formats
All extractors fire per file via multi-dispatch; results are merged. Tree-sitter produces edges at confidence 0.7 (ast_inferred); go/packages and SCIP at 0.95-1.0 (ast_resolved, scip_resolved).
MCP Tools
MCP prompts: refactor_safely, review_pr, investigate_dead_code.
MCP Resources
8 read-only resources for agent orientation without a tool call:
Wire Formats
GCF uses |-separated fields and local IDs ($1 -> $3) instead of repeated qualified names. Parseable by LLMs while fitting 5x more graph context into the same token budget. Session-stateful deduplication reduces repeated symbols by 47%.
Current Boundaries
- Static blast radius follows
callsedges; other edge types provide context, not traversal. - Runtime tools require OpenTelemetry trace ingestion; without traces they have no observations.
- LSP enrichment: Go, TypeScript, Python, Rust, Java, C#. Auto-detected from project markers. Others fall back to tree-sitter.
- Embeddings are off by default (confirmed neutral on cold-start benchmarks, session 23). Use
--embeddingsto opt in.
Documentation
License
Apache-2.0 (c) 2026 Dayna Blackwell / Blackwell Systems. See LICENSE and NOTICE.
來源:README.md,提交 988a9e7
工具
0版本歷史
2- v0.16.0最新Sep 23, 2026
- v0.15.1Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分