
WhyKit
io.github.CometWeb-io由 GitHub 帳號 CometWeb-io 發布v0.5.1更新於 Nov 14, 2026
Read-only decisions and evidence from a Git vault, and which decisions a code change touches.
概覽
以唯讀方式透過 MCP 存取存放在 Git 中的決策與來源庫,讓助理在改動程式碼前先查清背後的理由。
- 可以做什麼
- 查詢並讀取決策、來源及其關聯關係
- 取得指定區域或任務的脈絡與打包後的理由說明
- 追蹤決策引用的來源並列出反向連結
- 查看狀態、審閱日期以及依敏感度過濾後的紀錄
- 把預計或已改動的檔案對應到管轄它們的決策,並標出證據過期的項目
- 適用情境
- 適用於把架構決策及其證據以 Markdown 存放在 Git 儲存庫的專案,希望編碼助理在修改受管轄的程式碼前先查閱這些決策。也適合想讓助理了解某個修補會觸及哪些決策的團隊。
- 執行需求
- 本機需 Python 3.11+ 與 uv(0.13.4+),以 uv tool install 安裝並加上 MCP 附加元件。需要儲存庫中已有 WhyKit 資料庫或現成的 ADR 資料夾,以及由 connect 指令產生的主機設定。不需帳號、API 金鑰或網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 WhyKit,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
WhyKit
Know which decisions a change touches, and which of them need another look.
Your coding agent sees the code, not the reasons behind it, so it "fixes" things that were deliberate. WhyKit keeps decisions and their sources as plain Markdown in Git, maps every change to the decisions that govern it, and flags the ones whose evidence or review has gone out of date: in the pull request, before merge, and for Claude Code, Cursor or Codex before they edit.
[CI] [PyPI] [Python] [License] [OpenSSF Scorecard] [Website]
No runtime dependencies · Offline by design · Your data stays Markdown
Live demo · Tutorial · Connect agents · Docs · Roadmap
What it does
Each decision cites its sources (E-001) and declares the code it governs
(applies_to: ["src/payments/**"]). Before a change lands, one command answers
which decisions does this touch, and has anything they rest on changed?
That is real output from the synthetic payments example; a test keeps this block in step with the code. The ledger decision rests on an audit checklist that has since been replaced, so its reasoning needs a look before this change merges. WhyKit says what it checked and what it did not: uncovered files and unscoped decisions are listed, and it never claims a change is safe.
[A source, a decision and a review, kept together in WhyKit.]
- Sources get stable IDs and can be retired or replaced; captured sources are pinned by their bytes.
- Decisions cite sources, declare their scope, carry an owner and a review date, and are append-only: you supersede, you don't rewrite.
- Changes are mapped to decisions by
whykit affected, locally, in CI and by agents, with review signals for retired, missing, stale or changed sources (including source files the change itself modifies) and overdue or failed reviews. Scopes can be suggested from Git history. - Agents read the same files through a read-only MCP server, and
whykit connecttells them to ask before they edit.
Try it
Install uv (0.13.4+) and use Python 3.11+. This creates a vault, a folder of Markdown files, with one source and one draft decision that cites it:
The trace shows the decision and the source it cites:
The lint check reports five expected warnings: one for the unfinished draft
and four for unanswered questions in the vault's AGENTS.md. Fill in the
draft's context, options and consequences, then
approve it. If whykit is not found, run
uv tool update-shell and open a new terminal.
Catch decision drift
Declare what each decision governs, then ask about any change, planned or committed:
Don't want to write scopes by hand? Let Git suggest them from the commits that changed each decision or name it in their message, then confirm:
A source kept in the repository (a benchmark, a spec) counts too: when a pull request modifies it, every decision citing it is flagged.
Decisions about a library or a convention can watch for words instead of
paths: with watch_terms: ["moment"], a change that adds import moment
surfaces the "Use Luxon" decision. An agent can send its planned patch before
applying it. We replayed real ADR repositories to
tune this, and publish what did not work too.
Already have ADRs? Skip the vault and point it at the folder; scopes are inferred from the paths each ADR mentions, and moved code is flagged:
The ten-minute tutorial goes from an empty repository to a flagged decision and its successor; every command in it runs in the test suite. Affected decisions covers scope patterns, every signal and a pull-request workflow.
Connect your agents
One command prints the MCP configuration for your host and adds a short,
marked block to your code repository's CLAUDE.md or AGENTS.md telling the
agent to look up decisions before it changes what they cover:
Hosts: claude-code, cursor, vscode, codex, claude-desktop and
generic. The server is read-only with eight tools (query, context,
impact, status, pack, trace, backlinks, affected); records above your chosen
sensitivity ceiling are never returned. The instruction block also tells the
agent to call affected on the files it plans to change. whykit connect,
whykit affected and the affected tool are new in 0.5.0;
the MCP server itself is in 0.4.0.
Read the agent guide.
Gate pull requests
Instructions ask; CI enforces. On a pull request, the GitHub Action fails when an accepted decision's reasoning is rewritten, a cited source is missing or a credential slips into the vault:
See gate pull requests for the full workflow and a good and a bad example, and CI integration for PR comments, SARIF and other CI systems.
What would you like to do?
- See it on a real-looking vault: live Explorer demo of the payments example.
- Record a decision and change your mind later: record, check and supersede.
- Bring existing notes or ADRs: adopt existing Markdown.
- Browse the vault in a web UI: run the Explorer.
- Edit in Obsidian or your editor: Obsidian · language server.
- Review a changed source and share a filtered export: import, review and export.
Why WhyKit
Already happy with ADRs? Keep them; here is when they are the better fit.
When you outgrow them, whykit adopt --profile adr-only brings them in.
Built to be trusted
- Plain files are canonical. Every view (queries, graphs, MCP, the Explorer) is derived from Markdown you can read and diff.
- Nothing phones home. No telemetry, accounts or network calls; a test breaks the socket layer and runs every vault command.
- A stable machine contract. Every
--jsonoutput has a published JSON Schema; error codes and exit codes are documented in the automation contract. - Tested hard. About 1,800 tests, property and fuzz tests for the parsers, reproducible builds, an SBOM and OpenSSF Scorecard on every release.
Limits, stated plainly
WhyKit checks that reasoning is cited, dated and not rewritten. It does
not decide whether a source is true or a decision is right, and it does
not re-check external sources on its own. Sensitivity labels filter what the
MCP server and exports return; they are not access control, so keep real
vaults in private repositories. whykit affected matches files by path, not
by meaning, and sees only changes recorded in the vault. Agent instructions are
a request: pair them with the CI gate. The project is a public alpha; see the
feature status and the
0.4 upgrade guide.
Documentation
- Start here · Concepts · How-to guides · Connect agents · Affected decisions
- Command reference · Configuration · Lint rules
- CI integration · MCP server · Troubleshooting
- Example vaults: payments, tiny and Northline
Contributing
Issues and pull requests are welcome. Start with CONTRIBUTING.md; the whole suite runs offline with the standard library. If WhyKit is useful to you, a ⭐ helps other people find it.
Contributing · Code of Conduct · Security policy · Release checklist · Changelog · Roadmap
Copyright 2026 Maciej Zmitrukiewicz ([email protected]), licensed under Apache-2.0. CometWeb is the product name, not the copyright holder.
來源:README.md,提交 721afc2
工具
0版本歷史
1- v0.5.1最新Nov 14, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分