
RepoContext
io.github.shmindmaster由 GitHub 帳號 shmindmaster 發布v0.3.1更新於 Nov 3, 2026
Read-only, commit-pinned repository context for coding agents.
概覽
唯讀的本機 MCP 伺服器,讓編碼代理在 Git 儲存庫中尋找、產生並驗證與提交綁定的證據行。
- 可以做什麼
- 探索與搜尋:列出已登錄的儲存庫目錄,並只在文件與程式碼中檢索候選行。
- 舉證:把候選行轉成證據包,包含路徑、行範圍、完整提交 SHA 與內容雜湊,可單筆或最多八筆引用的集合。
- 讀取:從指定提交取出某個文件或檔案片段。
- 驗證:以 git show 獨立複核引用,並回報是否與 HEAD 一致。
- 判斷與檢視:產生含已知事實、缺口與穩定證據集 ID 的證據簡報,並檢視或比較證據集。
- 適用情境
- 適合需要讓代理以精確的已提交程式碼行為其變更說明提供依據、且審閱者能用一般 git 複核的情境,也適合想要一個唯讀 PR 閘門、對未被任何聲明涵蓋的變更檔案報錯的團隊。它面向審閱代理提交的拉取請求,而非通用程式碼搜尋。
- 執行需求
- 以 npm 套件形式透過 stdio 在本機執行,需要 Node 20 或更新版本。透過 REPOCONTEXT_REGISTRY 環境變數指向 init 指令產生的登錄檔,預設使用使用者目錄下的登錄檔。必須在已提交的 Git 儲存庫內執行;未宣告需要帳號或 API 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 RepoContext,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[!IMPORTANT] Archived 2026-10-15. Superseded by Assay, a reference architecture for deterministic agent control. Why: the same agent writes both the change and its evidence manifest, so the gate proves coverage and hash pinning, not that a claim is true. Assay moves the decision into deterministic code instead. The last release, 0.6.4, stays on npm. The rest of this README is unchanged.
GitPin
Agent-authored pull requests must show exact evidence before they merge.
A read-only PR gate and local MCP server that ties every claim an AI agent makes about its change to an exact committed line that anyone can re-check with plain git.
[Validate] [npm] [MCP Registry] [License: MIT] [Node.js Version]
Quickstart · Watch the film · Use it in your repo · How it works · Guardrails · Status
Why it exists
Coding agents now open pull requests with confident descriptions: "added retry logging", "updated the protocol doc", "no other files touched". A reviewer who wants to trust one of those sentences has to open the file and hunt for the line, then do it again for the next sentence. Most reviewers stop checking, and an agent can change a file it never mentions.
GitPin turns the description into evidence. The agent commits a small manifest
in which every material claim names the paths it covers and points at an exact
line slice with a SHA-256 of its text. A required check compares that manifest
with the real diff. Any changed file that no claim covers fails the build, and
every claim that passes can be re-checked by a human with git show, without
GitPin, without the agent and without a hosted platform.
Quickstart: the gate in 30 seconds
demo:gate builds GitPin, creates a throwaway synthetic repository in a temp
folder, and runs the real gitpin gate twice. The agent's first commit changes
docs/protocol.md without claiming it, so the gate fails with exit 1. The
agent adds one evidence locator (line 5, hashed) and the same gate passes with
exit 0:
Nothing is written outside the temp folder, and the folder is removed afterward.
See it run
[GitPin demo: the gate fails an agent pull request that changed an unclaimed file, then passes after one hashed line locator is added.]Watch the 90-second film → · The 30-second cut →
Use it in your repo
1. Install the trusted policy on your default branch (a separate, reviewed change, so a pull request can never weaken its own gate):
2. Make it a required check:
3. Each agent PR commits .gitpin/change-evidence.json, starting from
templates/change-evidence.json. The full
setup, including rulesets, is in docs/pr-evidence-gate.md.
Give your agent the evidence tools. The local MCP server lets Claude Code, Codex, Cursor and other MCP clients find candidates and produce the evidence packs the gate checks:
init writes ~/.gitpin/repositories.yaml outside the repository, runs
doctor, prints a first evidence line with a full SHA, and prints paste-ready
MCP config. It never edits the repository it registers.
How it works
The gate reads policy only from the trusted base commit and the manifest only
from the head commit, through git show, never from a working tree. It compares
the merge-base diff, re-hashes every cited line slice, and emits a report whose
citations carry full SHAs.
The MCP side follows one loop. Search returns candidates, never answers. Proof
turns a candidate into an evidence pack. Verification re-checks it with
git show:
Resource gitpin://catalog; prompt prove-with-git-head. Cite formats are in
docs/cite-spec.md; an agent skill template is in
templates/gitpin-skill.md.
Guardrails and non-goals
- Read-only, always. GitPin never writes, commits or pushes to a repository it reads, and the gate never executes pull-request code.
- A PR cannot weaken its own gate. Policy comes from the base commit; evidence comes from the head commit; the dirty working tree is never read.
- Uncommitted work is never evidence. Dirty and untracked content is excluded from HEAD citations.
- Sensitive paths stay sensitive. Deny rules apply to evidence, and the manifest cannot cite itself.
- Candidates are not claims. Search output is labelled
evidence-candidatesand must go throughpin.prove. - No embeddings, no database, no reindex. Evidence comes from Git objects, so it works offline and on private repositories.
Not goals: semantic search, writing or committing code, replacing GitHub Issues or PR automation, or treating a non-Git folder as one repository.
Status and limits
This source tree and its packed documentation describe GitPin 0.6.4 without asserting publication status. Check each channel independently: npm, the MCP Registry (io.github.shmindmaster/gitpin) and GitHub Releases.
Node 20 or later. Site: shmindmaster.github.io/gitpin.
GitPin verifies coverage, location, revision and content hash. It proves what was committed, not that a claim is true: it does not establish semantic correctness, runtime behavior, authorship, authorization or compliance. That judgment stays with the reviewer, who now reads one cited line instead of hunting for it. Planned work is in the roadmap.
Configuration
Default registry: ~/.gitpin/repositories.yaml (legacy compatibility fallback: ~/.repocontext/... if present).
Formerly RepoContext 0.3.x. See migration.
Docs
Tools · PR evidence gate · Clients · Architecture · Compare · FAQ · Troubleshooting · Roadmap · Governance
Contributing, security and license
- Contributing: start with an issue for bugs and proposals, then follow
CONTRIBUTING.md. Good first issues are labelled
good first issue. Before a pull request:pnpm validate && pnpm build && pnpm verify:package. - Security: report vulnerabilities privately through a GitHub security advisory, as described in SECURITY.md. Please do not open a public issue.
- License: MIT.
Created and maintained by Sarosh Hussain. Related open source: Assay keeps an agent's decision out of its side effects; CrewScore checks whether an agent's prompt writes its safeguards down.
來源:README.md,提交 a3c7a79
工具
0版本歷史
1- v0.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
