Gatefile

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.4Updated Oct 26, 2026

Extract a repo's contribution gates into machine-readable contribution-gates.json.

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

Extracts a repository's hidden contribution rules from its docs into a machine-readable contribution-gates.json, validates that file for drift, and renders a…

What you can do
  • Extract contribution gates from a repo's CONTRIBUTING file, PR and issue templates, DCO/CLA workflows and hooks, each with a quoted evidence line
  • Compare a recorded contribution-gates.json against a fresh extraction and report drift such as stale, missing or severity-changed gates
  • Render a README markdown snippet that explains the gates to human contributors in plain language
  • Work from the GitHub API or from a local clone for fully offline extraction
When to use it
Useful when you contribute to open-source repos and want to know the real rules (assignment, sign-off, CLA, vouching) before opening a pull request, or when you maintain a gates file and want CI or an assistant to catch when the docs change.
Requirements
Runs as a local stdio process via npx or the Docker image; Node.js 20 or later for the npm package. A GITHUB_TOKEN is optional for API mode; local-directory mode works offline. No environment variables or headers are declared.
Before you install
API mode reads repository docs through the GitHub API, so a supplied GITHUB_TOKEN is sent to GitHub; local mode avoids that. The tools only read and generate files, but validate_gates reports drift and the CLI exits with code 1 on drift, which can fail CI jobs.

Installation

In SourceWeft

  1. Open Gatefile in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

gatefile

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.

The problem

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.

What gatefile does

  1. extract: reads CONTRIBUTING.md, PR and issue templates, DCO/CLA workflow files, lefthook hooks, and CLA files (from the GitHub API or a local directory) and emits the gates it finds, each with a real quoted line as evidence. In API mode, a repo with no CONTRIBUTING file or no PR template of its own also inherits the organization level default from the org's .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.
  2. validate: compares a committed contribution-gates.json against a fresh extraction and reports drift (STALE, MISSING, SEVERITY_CHANGED). Exit code 1 on drift, so CI can enforce it.
  3. badge: renders a README snippet that tells humans the gates in plain language.

The contribution-gates.json format

json
{  "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": []  }}

Gate kinds

kindseveritymeaning
claim_firstblockerComment on the issue before starting work
assignment_requiredblockerWait to be assigned before opening a PR
discuss_firstblockerOpen a discussion or issue before coding
issue_firstblockerEvery PR must be tied to an issue
vouch_requiredblockerAn existing member must vouch for you
collaborators_onlyblockerOnly repo collaborators may open PRs
no_direct_prsblockerDirect PRs are not accepted
dco_requiredwarnCommits need a Signed-off-by trailer (DCO)
cla_requiredwarnA Contributor License Agreement must be signed

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.

Run it with Docker

gatefile also ships as a container image on GHCR: ghcr.io/cloudcorprecords/gatefile.

Use it as a stdio MCP server:

bash
docker run -i ghcr.io/cloudcorprecords/gatefile

Any CLI command can be passed after the image name instead of the default mcp argument:

bash
docker run ghcr.io/cloudcorprecords/gatefile <command> [args]

Usage

CLI

bash
# 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

MCP server

Add to your MCP client config:

json
{  "mcpServers": {    "gatefile": {      "command": "node",      "args": ["/path/to/gatefile/dist/mcp.js"]    }  }}

Tools:

toolinputswhat it returns
extract_gatesrepo or localPaththe full contribution-gates.json object
validate_gatesrecorded, repo or localPath{ ok, drift[] }
gates_badgerepo or localPathREADME markdown snippet

CI example

Keep the gates file honest in a GitHub Actions workflow:

yaml
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.json

Development

bash
npm installnpm test        # tsx --test, offline, 35 testsnpm run build   # tsc to dist/npm run dev -- extract owner/repo --json

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).

License

MIT, Rene Turcios 2026.

The toolkit

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):

  1. gatefile (npx @reneturcios/gatefile) extracts a repo's contribution gates into a committed contribution-gates.json.
  2. greenlight (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.
  3. claimcheck (npx @reneturcios/claimcheck) watches for stale claims and fixes parked on forks.
  4. prwatch (npx @reneturcios/prwatch) triages your open PRs by what needs you right now.

Source: README.md at commit f4c5f94

Tools

3

extract_gates

Extract hidden contribution gates from a repo's docs into a contribution-gates.json object

ParametersreporequiredlocalPath

validate_gates

Compare a recorded contribution-gates.json object against a fresh extraction and report drift

ParametersreporequiredrecordedrequiredlocalPath

gates_badge

Render a README markdown snippet summarizing a repo's contribution gates

ParametersreporequiredlocalPath

Version history

4
  1. v0.1.4LatestOct 26, 2026
  2. v0.1.3Oct 23, 2026
  3. v0.1.2Oct 18, 2026
  4. v0.1.1Oct 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts