greenlight

v0.27.3
io.github.CloudCorpRecords/greenlight Checked 9 hours ago Published 9 days ago

Pre-flight checks for open-source contributions: is this GitHub issue actually landable?

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_issue

Verdict on whether a GitHub issue is actually landable for an outside contributor. Returns GO, RISKY, TAKEN, GATED, or STALE with reasons, claim signals, and detected repo gates. Call this before writing code for an issue.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123

scan_repo

Rank a repo's open issues by verdict, GO first. Starts with label-tagged good-first-issue / help-wanted issues; when the repo does not use those labels, falls back to the most recent open unassigned issues (flagged as fallback). Use this to pick a winnable issue instead of a taken one.

ParameterTypeDescription
repo *stringowner/repo, e.g. PrefectHQ/fastmcp
deepbooleanTimeline X-Ray the ranked candidates: demotes issues with hidden in-flight PRs (reporter-owned fix PRs, timeline cross-references) before returning.

xray_issues

Timeline X-Ray: deep-verify candidate issues against their GitHub timelines before writing code. Fetches each issue's timeline, classifies every cross-referenced PR with link-strength scoring, and flags reporter-owned fix PRs and comment claims. Returns GO / RISKY / TAKEN per issue with PR evidence (number, state, link strength, URL). List views hide in-flight PRs; run this on scan results first.

ParameterTypeDescription
repo *stringowner/repo, e.g. usebruno/bruno
from_scanbooleanX-ray the scan's top candidates instead of listing issue numbers.
issuesstringComma-separated issue numbers, e.g. "8149,9319". Omit with from_scan.
limitnumberMax issues to x-ray (default 10).

racecheck_issue

Keyword race check for one issue: find open PRs that fix the same problem WITHOUT ever linking the issue, which link-based checks (claims, timelines, X-Ray) cannot see. Extracts the issue's significant problem keywords (filenames like $types.d.ts, identifiers, distinctive terms, quoted phrases), searches and scans the repo's open PRs for overlap, and returns RACE / SUSPECT / CLEAR with per-PR evidence (number, title, author, created date, matched keywords). Field case: sveltejs/kit issue #17465 was raced by PR #17453, which never mentioned the issue. Call this before writing code for an issue…

ParameterTypeDescription
issue *numberIssue number, e.g. 17465
repo *stringowner/repo, e.g. sveltejs/kit

repo_friction

Friction score 0-100 for a repo (100 = easiest to land an outside PR). Based on detected contribution gates and computed outcome signals.

ParameterTypeDescription
repo *stringowner/repo, e.g. PrefectHQ/fastmcp

wave_queue

Build queue in one call: filters the Agent Policy Index for winnable open repos, timeline x-rays starter issues with the existing xray engine (CLEAR / RISKY / TAKEN with competing PRs named), excludes repos with behavioral gates (maintainers who reject AI-built PRs in practice), and skips repos where you already have an open PR. Stops with partial results under the API budget floor. Use this to pick what to build today instead of hand-vetting repos.

ParameterTypeDescription
index_urlstringPolicy index URL or local file path. Defaults to the live index.
issues_per_reponumberStarter issues x-rayed per repo (default 3).
max_reposnumberCandidate repos to process (default 10).
max_starsnumberStar band ceiling (default 150000).
min_budgetnumberCore API floor; the run stops with partial results under it (default 800).
min_sharenumberMinimum outsider merge share 0-100 (default 40).
min_starsnumberStar band floor (default 1000).
sortstringCandidate ranking: winnability (outsider merge share, then friction, then stars) or stars (default winnability).

verify

Honest base-vs-head verification for a checked-out repo: runs the detected test suite at the base ref and at HEAD and reports the red-first delta (newly failing, newly passing), never raw counts. Refuses a dirty working tree unless asked. Agent-callable surface of `greenlight verify`; run it before and after a fix to prove the fix did the work.

ParameterTypeDescription
allow_dirtybooleanRun even when the working tree has uncommitted changes.
basestringBase ref for the comparison (default: merge-base with upstream, or origin/main).
cmdstringOverride the detected test command.
dirstringRepo checkout to verify. Defaults to the server's working directory.
parserstringOverride the result parser (e.g. node:test, pytest).
timeout_secsnumberPer-run timeout in seconds.

shipcheck

Release-readiness check for a shipped release: confirms the GitHub release exists, the npm package version is live, the MCP Registry record is active, and the GHCR image tag is published, returning a GO / NO-GO verdict per surface. Agent-callable surface of `greenlight shipcheck`.

ParameterTypeDescription
repo *stringowner/repo of the release.
version *stringRelease version without the v prefix, e.g. 0.21.4.
mcp_namestringMCP registry server name; defaults from server.json, then the API.
npm_packagestringnpm package name; defaults from package.json, then the API.

passport

Contributor passport for a GitHub login: the claim-ledger account profile, merged PR count, honor ratio, and open claims, returned as markdown plus structured JSON. Agent-callable surface of `greenlight passport`.

ParameterTypeDescription
login *stringGitHub login (a leading @ is fine).

bounty_check

Bounty-liveness check for one issue: is the advertised bounty backed by a live platform, an unverifiable claim with no named payer, or a dead platform (algora has been dead since 2025 while thousands of issues still wear its labels)? Returns the classification with its evidence. Context for the contributor, never a verdict. Agent-callable surface of `greenlight bounty`.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123

claim_issue

Post a claim comment on a GitHub issue, shaped by the repo's contribution gates. Runs the verdict pipeline first and refuses on TAKEN/STALE verdicts or vouch-gated repos. DRY RUN BY DEFAULT: returns the comment plan without posting unless execute is true, and posting requires GITHUB_TOKEN.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
eta_daysnumberETA in days recorded in the protocol claim comment (eta-days: line).
executebooleanPost the comment for real. Defaults to false: dry run returns the plan only.
forcebooleanClaim even on a TAKEN or STALE verdict.
planstringPlan recorded in the protocol claim comment (plan: line).

prep_issue

Prepare to work an issue: check/create your fork and a branch named from the issue title (learning the repo's branch convention from recent PRs when detectable), and write a local PREP.md checklist (verdict, gates, DCO reminders, next commands). Never clones. DRY RUN BY DEFAULT: no fork or branch is created unless execute is true; creating them requires GITHUB_TOKEN.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
dirstringDirectory for PREP.md. Defaults to ./greenlight-prep/<repo>-<number>/
executebooleanActually create the fork/branch. Defaults to false: dry run returns the plan only.

open_pr

Open a pull request for an issue from your fork branch. Verifies the branch exists, is ahead of upstream, and (on DCO repos) that every commit carries a Signed-off-by line. Composes the PR title and body (Closes #N plus verdict and gates at open time). DRY RUN BY DEFAULT: returns the composed PR without opening it unless execute is true; opening requires GITHUB_TOKEN.

ParameterTypeDescription
branch *stringFork branch to open the PR from, e.g. feat/resume-61
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
executebooleanOpen the PR for real. Defaults to false: dry run returns the plan only.
titlestringPR title override. Defaults to the branch's latest commit subject or the issue title.

ci_triage

Answer the red-PR question: is this failure mine or pre-existing? Fetches the failing check runs on the PR head, compares them against the base branch's recent check history, and classifies each failing check as pre-existing, likely-yours, indeterminate (with a stated lean), or external-blocker (deploy/auth failures like Vercel). Call this on any PR with failing CI before spending time debugging.

ParameterTypeDescription
pr_url *stringFull GitHub PR URL, e.g. https://github.com/owner/repo/pull/123

review_triage

Triage the review feedback on your PR: which comments actually need you? Gathers bot (CodeRabbit, cubic, Greptile, Copilot) and human review comments, classifies each finding as likely-real, likely-noise, or needs-decision with the reason stated, and drafts a reply for each. Human reviewer comments are never called noise. Drafts only; nothing is posted. Call this after pushing and getting review feedback.

ParameterTypeDescription
pr_url *stringFull GitHub PR URL, e.g. https://github.com/owner/repo/pull/123

guard_pr

Maintainer-side analysis of an incoming pull request: competing fix (other open PRs already fixing the same issue), prior claims by someone other than the PR author, missing required artifacts (changeset file, DCO sign-off, CLA status), and whether the author is a first-time contributor. Returns markdown ready to post as one PR comment plus structured findings. Reads a .greenlight-guard.json in the working directory for per-repo check toggles. Never posts anything. Call this from a GitHub Action or before reviewing an incoming PR.

ParameterTypeDescription
pr_url *stringFull GitHub PR URL, e.g. https://github.com/owner/repo/pull/123

repo_digest

Repo-level maintainer report: what needs attention across the whole repo? Reports PR races (two or more open PRs fixing the same issue, with first-claim arbitration), claimed-by-other conflicts (an open PR whose linked issue was claimed by someone else first), stale claims (issues claimed 14+ days ago with no open PR), and assignment-gate conflicts (repos that require assignment before a PR). Pass a --limit to bound the API budget on large repos; sections that cannot be computed say so instead of showing empty. Call this when triaging a repo, not just one PR.

ParameterTypeDescription
repo *stringowner/repo, e.g. ComposioHQ/composio
limitnumberMax open PRs and open issues to inspect. The summary always states the cap and the true totals.

claim_status

The Claim Protocol pre-flight answer for one issue: who holds it, until when, who is queued, which PRs compete, which gates bite, and whether the repo honors the protocol at all. Returns the SPEC 5.1 status payload with competing PRs and gates merged from the check machinery. The verdict vocabulary matches check_issue (GO / RISKY / TAKEN / GATED / STALE); a null verdict means no protocol claims and the check_issue verdict stands.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123

preflight

The one-call answer to 'can I work on this issue right now': the Claim Protocol issue status (claim holder, expiry, queue, competing PRs, gates) plus the repo friction summary (how hard this repo is to land a PR in, 0-100). Call this before committing to any issue; it combines claim_status and repo_friction.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123

verify_comment

Draft the verified-finding comment for a maintainer-only repo (modelcontextprotocol/inspector, modelcontextprotocol/servers): outside PRs are closed on sight there, so the contribution that lands is a detailed, verified issue comment. Assembles the comment from your notes: claim, environment, reproduction steps, observed vs expected, root cause, fix sketch, and a verification footer. Sections you leave empty render as explicit gaps, never plausible filler. DRAFT ONLY: nothing is posted, ever. Copy the markdown into the issue thread yourself.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/modelcontextprotocol/inspector/issues/2723
claimstringOne-line claim of the problem.
environmentstringEnvironment: repo, ref/commit, date, platform.
expectedstringWhat should have happened instead.
fixstringProposed fix sketch, not a code dump.
observedstringWhat was observed when the repro ran.
ranstringWhat was actually run (commands, counts).
reproductionstringReproduction steps, one per line, exact commands.
root_causestringRoot cause with file paths and line refs when known; empty renders 'not yet isolated'.
verified_bystringWho ran the verification.

babysit_prs

Watch your open PRs and get the one prioritized action list: needs you now (new review findings, CI failing on your code, merge conflicts, new guard flags, stuck checks), waiting on them (checks running, green with no feedback yet), quiet. Compares against stored watermarks so reruns report only what changed since the last check. Cron-friendly: always succeeds unless the input is wrong.

ParameterTypeDescription
authorstringAuthor whose open PRs to discover with mine.
minebooleanDiscover the author's open PRs across the repos list via the GitHub search API.
pr_urlsarrayFull GitHub PR URLs to watch, e.g. ["https://github.com/owner/repo/pull/123"]. Empty when using mine.
reposarrayowner/repo list for mine discovery, e.g. ["acme/widgets"].
state_pathstringWatermark file. Defaults to ~/.greenlight/babysit.json.

evidence_pack

The Verified PR evidence pack for one pull request: the guard verdict, CI triage, review triage, and Claim Protocol status of the linked issues, in one markdown document where every claim cites its source (check run, review anchor, claim comment URL). Call this when a maintainer, a recruiter, or your future self needs proof, not a summary.

ParameterTypeDescription
pr_url *stringFull GitHub PR URL, e.g. https://github.com/owner/repo/pull/123
verify_jsonstringPath to a prior `greenlight verify --json` report to include the honest red-green test delta. The pack never runs suites itself.

scout_campaign

Campaign mode: scan repos for winnable issues, rank survivors by friction, merge history, freshness, and verdict strength, and append them to a campaign file as SCOUTED. The campaign file dedupes against everything already claimed or PR'd. Budget-aware: stops with a resume cursor when the API budget is hit.

ParameterTypeDescription
campaign_path *stringPath to the campaign JSON file ({ entries: [{repo, issue, status, pr}], cursor })
repos *arrayowner/repo list, e.g. ["acme/widgets"]
budgetnumberMax GitHub API calls; a resume cursor is saved on budget hit
keepnumberSurvivors kept per repo (default 5)
scan_limitnumberIssues scanned per repo (default 10)
writebooleanAppend survivors to the campaign file; false prints only

my_claims

The claims babysitter's claim half: bucket every claim in your my-claims registry (~/.greenlight/my-claims.json) by its live Claim Protocol status — linked, linked-dead, healthy-active, heartbeat-due, expiring, unlinked-stale, queue-lost — and retire claims that completed or released. Pair with babysit_prs for the full portfolio picture.

ParameterTypeDescription
claims_registry_pathstringOverride path for the my-claims registry. Defaults to ~/.greenlight/my-claims.json.

sync_campaign

Reconcile local tracking with the API census: PRs the registry does not know (another agent opened them), state mismatches vs API truth, and stale claims with no PR. Reads only. For multi-agent campaigns where several agents open PRs in parallel.

ParameterTypeDescription
authorstringGitHub login; default GREENLIGHT_GITHUB_USER or CloudCorpRecords
stale_daysnumberClaims without a PR older than this are stale
writebooleanUpsert the registry's known-PRs section from the census

campaign_portfolio

One-screen campaign summary: census counts (open/merged/closed), claims by state, the pending posting queue, and the sync drift count. Reads only. For multi-agent campaigns.

ParameterTypeDescription
authorstringGitHub login; default GREENLIGHT_GITHUB_USER or CloudCorpRecords
stale_daysnumberClaims without a PR older than this are stale

autopilot_report

Autopilot in report mode: collects reviews, comments, and check results across your open PRs, verifies bot findings against the code at head, triages CI (introduced vs pre-existing), and returns per-PR items, fix plans, and queued reply drafts. Reads only; never applies fixes or posts comments.

ParameterTypeDescription
authorstringGitHub login; default GREENLIGHT_GITHUB_USER or CloudCorpRecords
max_prsnumberCap discovered PRs

api_status

The hosted Claim Protocol status payload for one issue, read live from the claim API: who holds it, until when, who is queued, and whether the repo honors the protocol. For agents that want the 60-second-fresh answer instead of the 15-minute static one. Read only; no token needed.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
api_basestringOverride the hosted claim API base URL.

claim_via_api

Claim one issue through the hosted claim API. App-aware: when the Greenlight Claims app is installed on the repo the claim goes through the app backend; otherwise it posts as a plain protocol comment and says so. REPORT-MODE SAFE: dry run unless execute is true; executing needs a stored token (greenlight auth login) or the token argument.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
api_basestringOverride the hosted claim API base URL.
eta_daysnumberETA in days recorded in the protocol claim comment (eta-days: line).
executebooleanPost the claim for real. Defaults to false: dry run returns the plan only.
planstringPlan recorded in the protocol claim comment (plan: line).
queue_okbooleanJoin the public queue when someone else holds the active claim.
tokenstringAPI token passthrough; prefer the stored token from greenlight auth login.

heartbeat_via_api

Renew one active claim through the hosted claim API (extends the lease). App-aware like claim_via_api. REPORT-MODE SAFE: dry run unless execute is true; executing needs a stored token or the token argument.

ParameterTypeDescription
issue_url *stringFull GitHub issue URL, e.g. https://github.com/owner/repo/issues/123
api_basestringOverride the hosted claim API base URL.
executebooleanPost the heartbeat for real. Defaults to false: dry run returns the plan only.
modestringRenew with a comment or a reaction, where supported.
tokenstringAPI token passthrough; prefer the stored token from greenlight auth login.

ci_prep

Run a target repo's own pull_request workflows locally BEFORE opening a PR: discovers .github/workflows triggered on pull_request, executes the mappable run steps (tests, lint, typecheck, build) with per-step timeouts, checks repo conventions (changesets, conventional-commit subjects, DCO sign-off), and reports PASS/FAIL/SKIPPED per check with a GO/NO-GO verdict. Steps that cannot run locally (deploys, secrets, publishes) are SKIPPED with the reason named, never passed. Use after building a fix, before pushing. Local execution only; never touches GitHub.

ParameterTypeDescription
path *stringLocal path to the target repo checkout, e.g. /home/user/work/bruno
basestringBase git ref for convention checks (default: auto-detect).
timeout_secsnumberPer-step execution timeout in seconds.
use_actbooleanRun workflows via act+docker when available; falls back to native mode when not.

pr_radar

Maintainer-side duplicate/competing PR radar for a repo: clusters open PRs working the same issue (closing-strength links) or touching the same files (Jaccard file overlap with title-prefiltered budget). Each cluster reports PR numbers, authors, evidence, and a heuristic suggested-keep pick; unclustered PRs are counted so the picture stays honest. API budget is measured and reported.

ParameterTypeDescription
repo *stringowner/repo, e.g. usebruno/bruno
limitnumberCap open PRs scanned (default 25, max 100).

pr_brief

Verified review brief for ANY pull request (not just your own): what changed grouped by area/risk, CI triage with the base-vs-head classifier, review findings classified real vs false-positive with evidence, test evidence present or explicitly absent, merge-readiness blockers (conflicts, unresolved change requests, missing changesets), ending with a one-line look-at-this-first. Deterministic classifiers only; unverified items are marked as such.

ParameterTypeDescription
target *stringPR URL or owner/repo#N, e.g. https://github.com/usebruno/bruno/pull/9569 or usebruno/bruno#9569