Readfirst

io.github.jeonghun917由 GitHub 帳號 jeonghun917 發布v0.22.3更新於 Nov 7, 2026

What to read and check before changing a file: project rules, risks, checks and tests per file.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,在編碼助理修改某個檔案之前,提供與該檔案相關的專案規則、風險、檢查項目和測試。

可以做什麼
  • 在改動前讀取單一檔案的脈絡:規則、風險、檢查項目、測試和呼叫端
  • 掃描程式碼庫中固定的缺陷型態,例如被丟棄的結果或未 await 的 promise 斷言
  • 在收尾前驗證檢查是否通過、與改動相關的對應內容是否遺漏
  • 初始化第一份對應檔,並把各類助理和 PR 動作接入其中
適用情境
適合 AI 編碼助理修改既有程式碼儲存庫時使用,需要補足單靠 import 無法得知的團隊知識,例如金額單位慣例、需保留的舊欄位,或改動後應執行的測試。
執行需求
以本機程序方式透過 npm(npx readfirst)執行,需要 Node 20 或更新版本,支援任何語言。它會讀取本機 git 工作目錄和儲存庫中提交的 .readfirst/map.json 檔案。不需要伺服器、帳號或模型呼叫。
安裝前請注意
對應檔會提交到儲存庫,寫入其中的內容對有權存取儲存庫的人都可見。免費的命令列工具、hook、MCP 伺服器和 Action 聲稱不會把程式碼傳送到任何地方,但選用的託管 GitHub App 會產生並維護對應檔、在拉取請求上留言,Pro 為付費方案。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Readfirst,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

readfirst

What to read and check before you — or your AI agent — change a file.

Bugs it found that are now fixed upstream: Saleor, Wagtail, n8n, django-allauth. 120 real findings across 44 open-source repositories, reported to 17 projects.

Coding agents can follow imports. What they don't know is what your team knows: "amounts here are in cents", "this table is read by the mobile app, keep old columns", "run the payment e2e after touching this". readfirst keeps that knowledge in one file next to the code and hands it out, file by file, at the moment someone is about to change something.

[npx readfirst read src/imports.mjs prints the rules, risks, checks, tests and callers for that file]

No server, no account, no model calls. MIT. It reads your git checkout and .readfirst/map.json.

What it caught

sh
npx readfirst scan   # no map needed: QuerySet/string results thrown away, expect(...).resolves nobody awaitsnpx readfirst audit  # no map needed: the files that broke most in the last 12 months, from git history

On the free side, readfirst shows where your code broke before, from git history, on the first run, no map needed.

The hosted version scans for fixed bug shapes taken from real bugs: a result computed and thrown away, a range check with no type check, a secret compared with !==, and more. Run over 44 open-source repositories, 616 hits, each one judged and recorded (real, caveat, false positive, dead code):

  • 84 bugs in app code, 21 of them low-severity secret comparisons
  • 36 tests that can never fail, every one the same shape: expect(promise).resolves... with no await or return, so the test ends before the assertion runs
  • the false positives are kept on record too; the counts come after tuning on the same repositories, so read them as "what is there", not as precision

Fixed upstream:

  • saleor: an "only recalculate what changed" option recalculated every discounted price (saleor/saleor#19984).
  • wagtail: a superuser who submits a page for moderation got the moderation email about their own submission (wagtail/wagtail#14790).
  • n8n: the RabbitMQ node handed back its channel before the queue bindings were made, and a failed bind escaped as an unhandled rejection; the n8n team fixed it after our issue (n8n-io/n8n#43033).
  • django-allauth: a provider callback returned a 500 instead of a clean failure on a non-ASCII value; fixed the day it was reported (f1e06cc).
  • mealie: a household safety filter that never applied (mealie#8964) is gone on main since a maintainer's scope fix (mealie#8965).

Still with their maintainers: a Tandoor filter that never applied (TandoorRecipes/recipes#4917), and findings sent privately to other projects, which stay unnamed until they are fixed.

Start

Any language; needs Node 20+.

sh
npx readfirst init --agent --ci   # a first map, your agents wired to it (Claude Code, Cursor, Codex, Gemini, ...), the PR Actionnpx readfirst read <file>         # before changing a file: its rules, risks, checks, tests and callersnpx readfirst verify              # before you finish: the checks pass and nothing the map ties to the change was left out

Commit .readfirst/map.json. Filled maps for real repositories (vercel/ai, cal.com, excalidraw and two more): examples/.

Everything else (Claude Code plugin and hook, MCP for any agent, Cursor rules, the GitHub Action, the map format, audit, find, monorepos, pinning a version): the guide.

Hosted

The CLI, hook, MCP server and Action are free and never send your code anywhere. The readfirst-app GitHub App can write the first map for you (free once per account) and, on Pro, keep it in step after merges and comment on pull requests. Details in the guide.

License

MIT

來源:README.md,提交 73c0962

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

9
  1. v0.22.3最新Nov 7, 2026
  2. v0.17.1Nov 6, 2026
  3. v0.16.0Nov 5, 2026
  4. v0.15.1Nov 5, 2026
  5. v0.15.0Nov 4, 2026
  6. v0.14.0Nov 4, 2026
  7. v0.13.0Nov 3, 2026
  8. v0.7.0Nov 1, 2026
  9. v0.6.2Nov 1, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分