extract_gates
Extract hidden contribution gates from a repo's docs into a contribution-gates.json object
repo必填localPath
io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.4更新於 Oct 26, 2026
Extract a repo's contribution gates into machine-readable contribution-gates.json.
把儲存庫文件中隱藏的貢獻規則擷取成機器可讀的 contribution-gates.json,並驗證該檔案是否漂移、產生 README 徽章片段。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
Hidden contribution gates, extracted into a file machines can read.
Every repo hides its real rules for outside contributors: comment before you start, wait to be assigned, sign off your commits, get vouched, sign a CLA. Today you discover those rules by getting your PR auto-closed. gatefile extracts them from the repo's own docs into contribution-gates.json, a machine-readable format that tools (like Greenlight) and CI can consume.
A contributor picks an issue, writes the code, opens the PR, and a bot closes it: "you were not assigned", "unvouched authors are auto-closed", "missing Signed-off-by". The rules were always in CONTRIBUTING.md, buried in prose, different on every repo. Maintainers repeat the same corrections; contributors waste the same evenings.
.github repository, exactly the fallback GitHub itself applies; inherited files are labelled owner/.github:<path> in generatedFrom and as the gate source, and a repo file always wins over the org default for its group.contribution-gates.json against a fresh extraction and reports drift (STALE, MISSING, SEVERITY_CHANGED). Exit code 1 on drift, so CI can enforce it.Severity: blocker gates can get a PR closed or rejected before review. warn gates can be fixed after the PR opens. Evidence is always a real quote from the source file, trimmed to about 140 characters, never invented.
gatefile also ships as a container image on GHCR: ghcr.io/cloudcorprecords/gatefile.
Use it as a stdio MCP server:
Any CLI command can be passed after the image name instead of the default mcp argument:
Add to your MCP client config:
Tools:
Keep the gates file honest in a GitHub Actions workflow:
TypeScript ESM, Node 20+, zod for schemas, native fetch for the GitHub API. Tests use real-world fixtures in test/fixtures/ modeled on documented cases (comment-before-starting plus DCO plus issue-first; assignment-first; vouch-only; permissive).
MIT, Rene Turcios 2026.
This tool is one of four in a lifecycle for open-source contribution work, all published under the @reneturcios npm scope and each available as a CLI and an MCP server (<tool> mcp):
npx @reneturcios/gatefile) extracts a repo's contribution gates into a committed contribution-gates.json.npx @reneturcios/greenlight) pre-flights issues (GO / RISKY / TAKEN / GATED / STALE), consumes gatefile's output in check and scan, then claims, preps, and opens PRs.npx @reneturcios/claimcheck) watches for stale claims and fixes parked on forks.npx @reneturcios/prwatch) triages your open PRs by what needs you right now.來源:README.md,提交 f4c5f94
Extract hidden contribution gates from a repo's docs into a contribution-gates.json object
repo必填localPathCompare a recorded contribution-gates.json object against a fresh extraction and report drift
repo必填recorded必填localPathRender a README markdown snippet summarizing a repo's contribution gates
repo必填localPath已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
{ "version": 1, "repo": "shadcn-labs/pdfcn", "generatedFrom": ["CONTRIBUTING.md"], "gates": [ { "id": "claim_first", "kind": "claim_first", "severity": "blocker", "evidence": "Comment before starting work, and check the thread first in case someone else is already working on it.", "source": "CONTRIBUTING.md" } ], "conventions": { "branchNaming": "Name your branch feat/block-name", "prTitleFormat": "PR titles should follow Conventional Commits", "requiredChecks": [] }}docker run -i ghcr.io/cloudcorprecords/gatefiledocker run ghcr.io/cloudcorprecords/gatefile <command> [args]# Extract gates from a repo (GitHub API, GITHUB_TOKEN optional)gatefile extract shadcn-labs/pdfcn
# Extract from a local clone instead (fully offline)gatefile extract local --local ./pdfcn --out contribution-gates.json
# Validate the committed file against fresh docs, exit 1 on driftgatefile validate shadcn-labs/pdfcn --file contribution-gates.json
# Print a README snippet for humansgatefile badge shadcn-labs/pdfcn{ "mcpServers": { "gatefile": { "command": "node", "args": ["/path/to/gatefile/dist/mcp.js"] } }}name: gateson: pull_request: paths: ["CONTRIBUTING.md", ".github/**", "contribution-gates.json"]jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: 20 } - run: npx -y gatefile extract ${{ github.repository }} --out /tmp/fresh.json - run: npx -y gatefile validate ${{ github.repository }} --file contribution-gates.jsonnpm installnpm test # tsx --test, offline, 35 testsnpm run build # tsc to dist/npm run dev -- extract owner/repo --json