@reneturcios/greenlight 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/dist/index.js +1 -1
- package/integrations/README.md +59 -0
- package/integrations/claude-code/.mcp.json +1 -0
- package/integrations/claude-code/CLAUDE.snippet.md +39 -0
- package/integrations/cline/README.md +14 -0
- package/integrations/cline/cline_mcp_settings.json +1 -0
- package/integrations/copilot/.vscode/mcp.json +1 -0
- package/integrations/copilot/copilot-instructions.snippet.md +27 -0
- package/integrations/cursor/.cursor/mcp.json +1 -0
- package/integrations/cursor/greenlight.mdc +27 -0
- package/integrations/mcp.json +1 -0
- package/integrations/windsurf/README.md +14 -0
- package/integrations/windsurf/mcp_config.json +1 -0
- package/package.json +3 -2
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Greenlight checks a GitHub issue before you spend hours on it, and tells you in plain words whether your pull request is likely to land.
|
|
4
4
|
|
|
5
|
+
**New:** [The Contribution Friction Index](https://cloudcorprecords.github.io/greenlight/) ranks 43 well known projects by how hard it really is to get a pull request merged, from live GitHub data.
|
|
6
|
+
|
|
7
|
+
## Use Greenlight inside your AI coding tool
|
|
8
|
+
|
|
9
|
+
Greenlight ships an agent drop-in pack in [`integrations/`](integrations/README.md): ready-to-copy MCP configs for Claude Code, Cursor, VS Code / Copilot, Windsurf, and Cline, plus instruction snippets that teach your agent the one behavior rule: **check Greenlight before it opens a PR.** Verify with a "list your MCP tools" prompt; the greenlight server carries 8 tools (check_issue, scan_repo, repo_friction, claim_issue, prep_issue, open_pr, ci_triage, review_triage).
|
|
10
|
+
|
|
5
11
|
## The problem
|
|
6
12
|
|
|
7
13
|
You find an issue that looks perfect. You code all evening. Then one of these happens:
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { fetchMergeVelocity } from "./merge-velocity.js";
|
|
|
14
14
|
import { createRestClient, claimIssue, prepIssue, openPr, AutomationRefusal, } from "./automate.js";
|
|
15
15
|
import { triagePr } from "./ci-triage.js";
|
|
16
16
|
import { triageReview } from "./review-triage.js";
|
|
17
|
-
const server = new McpServer({ name: "greenlight", version: "0.3.
|
|
17
|
+
const server = new McpServer({ name: "greenlight", version: "0.3.8" });
|
|
18
18
|
const text = (obj) => ({
|
|
19
19
|
content: [{ type: "text", text: JSON.stringify(obj, null, 2) }],
|
|
20
20
|
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Greenlight agent drop-in pack
|
|
2
|
+
|
|
3
|
+
One behavior rule, everywhere: **your agent checks Greenlight before it
|
|
4
|
+
opens a pull request.** The configs below register Greenlight's MCP server
|
|
5
|
+
and teach the agent the workflow: check the issue first, stop on TAKEN or
|
|
6
|
+
GATED, triage red CI before touching code, triage reviews before fixing,
|
|
7
|
+
and never post anything to GitHub without the human's go-ahead.
|
|
8
|
+
|
|
9
|
+
## Install per tool
|
|
10
|
+
|
|
11
|
+
| Tool | Copy this file | To this destination |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Claude Code | `claude-code/.mcp.json` | your project root as `.mcp.json` |
|
|
14
|
+
| Claude Code | `claude-code/CLAUDE.snippet.md` | paste into your project's `CLAUDE.md` |
|
|
15
|
+
| Cursor | `cursor/.cursor/mcp.json` | your project as `.cursor/mcp.json` |
|
|
16
|
+
| Cursor | `cursor/greenlight.mdc` | your project as `.cursor/rules/greenlight.mdc` |
|
|
17
|
+
| VS Code / Copilot | `copilot/.vscode/mcp.json` | your project as `.vscode/mcp.json` |
|
|
18
|
+
| VS Code / Copilot | `copilot/copilot-instructions.snippet.md` | paste into `.github/copilot-instructions.md` |
|
|
19
|
+
| Windsurf | `windsurf/mcp_config.json` | `~/.codeium/windsurf/mcp_config.json` (merge with existing) |
|
|
20
|
+
| Cline | `cline/cline_mcp_settings.json` | your project as `.cline/mcp_settings.json` |
|
|
21
|
+
| Anything else | `mcp.json` | wherever your client reads MCP configs |
|
|
22
|
+
|
|
23
|
+
Restart the tool after installing. Every config launches the server as
|
|
24
|
+
`npx -y @reneturcios/greenlight mcp`, so nothing is installed globally;
|
|
25
|
+
the package downloads on first use. Set the `GITHUB_TOKEN` environment
|
|
26
|
+
variable for the higher GitHub API rate limit (60 to 5000 requests/hour);
|
|
27
|
+
without it the tools still work but share the small anonymous budget.
|
|
28
|
+
|
|
29
|
+
## Verify it worked
|
|
30
|
+
|
|
31
|
+
Ask the agent: "list your MCP tools." You should see the `greenlight`
|
|
32
|
+
server with all 8 tools:
|
|
33
|
+
|
|
34
|
+
- `check_issue` — verdict on whether an issue is landable (GO / RISKY / TAKEN / GATED / STALE)
|
|
35
|
+
- `scan_repo` — find starter issues worth working in a repo
|
|
36
|
+
- `repo_friction` — how hard it is to land an outside PR (0 to 100)
|
|
37
|
+
- `claim_issue` — draft a claim comment shaped by the repo's gates (dry run by default)
|
|
38
|
+
- `prep_issue` — fork/branch checklist, CLA path, house rules (dry run by default)
|
|
39
|
+
- `open_pr` — compose the PR with the verdict and gates recorded (dry run by default)
|
|
40
|
+
- `ci_triage` — is each red check pre-existing, yours, or an external blocker
|
|
41
|
+
- `review_triage` — classify review findings and draft replies (never posts)
|
|
42
|
+
|
|
43
|
+
## Format notes
|
|
44
|
+
|
|
45
|
+
- Claude Code, Cursor, Windsurf, and Cline all use the `mcpServers` top
|
|
46
|
+
level key in their MCP config files.
|
|
47
|
+
- VS Code's `.vscode/mcp.json` uses `servers` instead of `mcpServers`,
|
|
48
|
+
and stdio entries carry `"type": "stdio"`.
|
|
49
|
+
- Windsurf's remote transports use `serverUrl` and `transport` instead of
|
|
50
|
+
`url` and `type`; this pack only needs stdio, so it uses the plain
|
|
51
|
+
command/args shape.
|
|
52
|
+
|
|
53
|
+
Doc sources checked while building this pack: Claude Code `.mcp.json`
|
|
54
|
+
shape (project root, `mcpServers`, stdio command/args) per Anthropic-adjacent
|
|
55
|
+
project references; VS Code `.vscode/mcp.json` `servers` key per the VS Code
|
|
56
|
+
MCP servers docs and multiple community configs; Cursor `.cursor/mcp.json`
|
|
57
|
+
`mcpServers` and `.mdc` rules with `description`/`alwaysApply` frontmatter;
|
|
58
|
+
Windsurf `~/.codeium/windsurf/mcp_config.json` per its command-palette
|
|
59
|
+
"MCP Servers" docs; Cline `.cline/mcp_settings.json` with `mcpServers`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mcpServers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx"}}}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Greenlight rules for Claude Code
|
|
2
|
+
|
|
3
|
+
Paste this file's contents into your project's CLAUDE.md (or keep the file
|
|
4
|
+
and reference it from CLAUDE.md). It teaches the agent the Greenlight
|
|
5
|
+
workflow through the greenlight MCP tools.
|
|
6
|
+
|
|
7
|
+
## Greenlight: check before you open a PR
|
|
8
|
+
|
|
9
|
+
You have the Greenlight MCP server connected (server name: greenlight,
|
|
10
|
+
8 tools: check_issue, scan_repo, repo_friction, claim_issue, prep_issue,
|
|
11
|
+
open_pr, ci_triage, review_triage). It answers one question at every step:
|
|
12
|
+
is this contribution worth doing, and is the problem mine?
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
|
|
16
|
+
1. BEFORE writing any code for a GitHub issue, call `check_issue` with the
|
|
17
|
+
issue URL.
|
|
18
|
+
- If the verdict is TAKEN (someone already has an open PR) or GATED
|
|
19
|
+
(the repo will not accept this PR, e.g. external PRs are paused or
|
|
20
|
+
auto-closed): STOP. Tell the human why, quoting the reasons. Do not
|
|
21
|
+
start coding.
|
|
22
|
+
- If the verdict is RISKY: explain the risk and ask before continuing.
|
|
23
|
+
- If the verdict is GO: continue.
|
|
24
|
+
2. Before claiming an issue or setting up to work it, call `prep_issue`
|
|
25
|
+
(dry run) to learn the repo's exact CLA path, house rules, changeset
|
|
26
|
+
convention, and whether the fix even lives in this repo. Report the
|
|
27
|
+
plan; do not create forks or branches without being asked.
|
|
28
|
+
3. If the PR's CI goes red: call `ci_triage` BEFORE changing any code, and
|
|
29
|
+
tell the human whether each failure is pre-existing, likely yours,
|
|
30
|
+
indeterminate, or an external blocker.
|
|
31
|
+
4. After review comments arrive: call `review_triage`. Fix likely-real
|
|
32
|
+
findings first, present needs-decision items to the human, and push
|
|
33
|
+
back on likely-noise only with the evidence the tool gives you. The
|
|
34
|
+
drafts are yours to adapt; the tool never posts them.
|
|
35
|
+
5. NEVER post claim comments, open PRs, or write anything to GitHub without
|
|
36
|
+
the human's explicit go-ahead. Drafts are output only.
|
|
37
|
+
|
|
38
|
+
Tip: set GITHUB_TOKEN in your environment for the higher GitHub API rate
|
|
39
|
+
limit (60 to 5000 requests per hour).
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Cline install
|
|
2
|
+
|
|
3
|
+
Cline reads MCP servers from `mcpSettings` in its settings. The portable
|
|
4
|
+
file form is:
|
|
5
|
+
|
|
6
|
+
.cline/mcp_settings.json
|
|
7
|
+
|
|
8
|
+
Copy the `cline_mcp_settings.json` file in this folder there (merging with
|
|
9
|
+
any servers you already have), then check the Cline "MCP Servers" panel:
|
|
10
|
+
the `greenlight` server should list 8 tools. The `disabled: false` field is
|
|
11
|
+
Cline's way of keeping the server enabled without deleting it.
|
|
12
|
+
|
|
13
|
+
Workflow: see the integrations README — your agent checks Greenlight
|
|
14
|
+
before it opens a PR.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mcpServers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx","disabled":false}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"servers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx","type":"stdio"}}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Greenlight instructions for GitHub Copilot / VS Code
|
|
2
|
+
|
|
3
|
+
Paste this file's contents into your project's
|
|
4
|
+
`.github/copilot-instructions.md` (create the folder if it does not exist).
|
|
5
|
+
|
|
6
|
+
## Greenlight: check before you open a PR
|
|
7
|
+
|
|
8
|
+
You have the Greenlight MCP server connected (server `greenlight`, tools:
|
|
9
|
+
check_issue, scan_repo, repo_friction, claim_issue, prep_issue, open_pr,
|
|
10
|
+
ci_triage, review_triage). Apply these instructions whenever working on a
|
|
11
|
+
pull request to an open source project:
|
|
12
|
+
|
|
13
|
+
1. Before writing any code for a GitHub issue, call `check_issue` with the
|
|
14
|
+
issue URL. If the verdict is TAKEN or GATED, stop and tell the user why,
|
|
15
|
+
quoting the reasons. Never start work on a TAKEN or GATED issue without
|
|
16
|
+
being told to.
|
|
17
|
+
2. Before claiming or setting up work, call `prep_issue` (dry run) to learn
|
|
18
|
+
the repo's exact CLA path, house rules, and changeset convention. Report
|
|
19
|
+
the plan; do not create forks or branches unasked.
|
|
20
|
+
3. If the PR's CI goes red, call `ci_triage` before changing code, and tell
|
|
21
|
+
the user whether each failure is pre-existing, likely theirs,
|
|
22
|
+
indeterminate, or an external blocker.
|
|
23
|
+
4. After review comments arrive, call `review_triage`. Fix likely-real
|
|
24
|
+
findings first; bring needs-decision items to the user; push back on
|
|
25
|
+
likely-noise only with the tool's evidence. Drafts are output only.
|
|
26
|
+
5. Never post claim comments, open PRs, or write anything to GitHub without
|
|
27
|
+
the user's explicit go-ahead.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mcpServers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx"}}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Greenlight contribution workflow — check issues before coding, triage CI and reviews
|
|
3
|
+
alwaysApply: false
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Greenlight rules (drop-in for Cursor)
|
|
7
|
+
|
|
8
|
+
You have the Greenlight MCP server connected (server `greenlight`, tools:
|
|
9
|
+
check_issue, scan_repo, repo_friction, claim_issue, prep_issue, open_pr,
|
|
10
|
+
ci_triage, review_triage). Apply these rules whenever the user is working on
|
|
11
|
+
a pull request to an open source project:
|
|
12
|
+
|
|
13
|
+
1. Before writing any code for a GitHub issue, call `check_issue` with the
|
|
14
|
+
issue URL. If the verdict is TAKEN or GATED, stop and tell the user why,
|
|
15
|
+
quoting the reasons. Never start work on a TAKEN or GATED issue without
|
|
16
|
+
being told to.
|
|
17
|
+
2. Before claiming or setting up work, call `prep_issue` (dry run) to learn
|
|
18
|
+
the repo's exact CLA path, house rules, and changeset convention. Report
|
|
19
|
+
the plan; do not create forks or branches unasked.
|
|
20
|
+
3. If the PR's CI goes red, call `ci_triage` before changing code, and tell
|
|
21
|
+
the user whether each failure is pre-existing, likely theirs,
|
|
22
|
+
indeterminate, or an external blocker.
|
|
23
|
+
4. After review comments arrive, call `review_triage`. Fix likely-real
|
|
24
|
+
findings first; bring needs-decision items to the user; push back on
|
|
25
|
+
likely-noise only with the tool's evidence. Drafts are output only.
|
|
26
|
+
5. Never post claim comments, open PRs, or write anything to GitHub without
|
|
27
|
+
the user's explicit go-ahead.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mcpServers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx"}}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Windsurf install
|
|
2
|
+
|
|
3
|
+
Windsurf's global MCP config lives at:
|
|
4
|
+
|
|
5
|
+
~/.codeium/windsurf/mcp_config.json
|
|
6
|
+
|
|
7
|
+
Copy the `mcp_config.json` file in this folder there (merging with any
|
|
8
|
+
servers you already have), then restart Windsurf and check its MCP panel:
|
|
9
|
+
the `greenlight` server should list 8 tools. Newer Windsurf versions also
|
|
10
|
+
accept a project-level `.windsurf/mcp.json` file using the same
|
|
11
|
+
`mcpServers` format.
|
|
12
|
+
|
|
13
|
+
Workflow: see the integrations README — your agent checks Greenlight
|
|
14
|
+
before it opens a PR.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mcpServers":{"greenlight":{"args":["-y","@reneturcios/greenlight","mcp"],"command":"npx"}}}
|
package/package.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"test": "tsx --test test/*.test.ts"
|
|
26
26
|
},
|
|
27
27
|
"type": "module",
|
|
28
|
-
"version": "0.3.
|
|
28
|
+
"version": "0.3.8",
|
|
29
29
|
"mcpName": "io.github.CloudCorpRecords/greenlight",
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"homepage": "https://github.com/CloudCorpRecords/greenlight#readme",
|
|
38
38
|
"files": [
|
|
39
39
|
"dist",
|
|
40
|
-
"server.json"
|
|
40
|
+
"server.json",
|
|
41
|
+
"integrations"
|
|
41
42
|
]
|
|
42
43
|
}
|
package/server.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"url": "https://github.com/CloudCorpRecords/greenlight",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.3.
|
|
9
|
+
"version": "0.3.8",
|
|
10
10
|
"packages": [
|
|
11
11
|
{
|
|
12
12
|
"registryType": "npm",
|
|
13
13
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
14
14
|
"identifier": "@reneturcios/greenlight",
|
|
15
|
-
"version": "0.3.
|
|
15
|
+
"version": "0.3.8",
|
|
16
16
|
"runtimeHint": "npx",
|
|
17
17
|
"packageArguments": [
|
|
18
18
|
{
|