Skip to main content

OSS Maintainer Toolkit — automated triage for PRs, issues, contributors, and review queues

Project description

OSS Maintainer Toolkit

Automated triage for PRs, issues, contributors, and review queues. A free GitHub Action and CLI built on a three-tier pipeline: embedding-based dedup, heuristic scoring, and optional LLM vision alignment.

Every PR gets a verdict: FAST_TRACK, REVIEW_REQUIRED, or RECOMMEND_CLOSE.

Tested on OpenClaw (3,368 open PRs): cut the maintainer review queue by 36% and found 6% duplicate PRs in 30 seconds. See the full report.


Installation

# Core toolkit
pip install oss-maintainer-toolkit

# With PR triage / gatekeeper pipeline
pip install "oss-maintainer-toolkit[gatekeeper]"

# For development
pip install -e ".[dev,gatekeeper]"

CLI usage

maintainer assess --owner openclaw --repo openclaw --pr 18675  # PR triage

MCP server

python -m oss_maintainer_toolkit.mcp  # start the MCP server

Quick Start (GitHub Action)

Copy this workflow into .github/workflows/pr-triage.yml in your repo:

name: PR Triage

on:
  pull_request:
    types: [opened, synchronize, reopened]

permissions:
  pull-requests: write
  contents: read

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: pranayom/oss-maintainer-toolkit@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

That's it. Every new PR gets a scorecard comment with a verdict and flags.


How It Works

PR opened
    |
    v
[Tier 1: Embedding Dedup]     — sentence-transformers, cosine similarity
    |                            Duplicates -> RECOMMEND_CLOSE (stop)
    v
[Tier 2: Heuristic Scoring]   — 7 deterministic rules, weighted scoring
    |                            Flagged -> REVIEW_REQUIRED (stop)
    v
[Tier 3: Vision Alignment]    — LLM compares PR against Vision Document (optional)
    |
    v
FAST_TRACK

Tiers run strictly in sequence. Each tier is a gate — failures don't proceed to the next tier. This reserves LLM time for the minority of PRs where semantic judgment is actually useful.

Tier 1 — Embedding Dedup (free, local)

Computes semantic embeddings for PR title + description + diff using all-MiniLM-L6-v2. Flags duplicates above a cosine similarity threshold (default: 0.90).

Tier 2 — Heuristic Scoring (free, deterministic)

Seven rules scored against PR metadata:

Rule What it catches
new_account GitHub account < 90 days old
first_contribution No previously merged PRs on this repo
sensitive_paths Changes to auth, credentials, CI/CD, extensions
low_test_ratio Code added without proportional tests
unjustified_deps Dependency changes without explanation
large_diff_hiding Large PR with small sensitive changes buried in bulk
temporal_clustering Multiple new-account PRs within a short window

Tier 3 — Vision Alignment (optional, $0 via OpenRouter)

Compares the PR diff against your project's Vision Document (a YAML file defining principles, anti-patterns, and focus areas). Uses OpenRouter free models. Requires an OPENROUTER_API_KEY (free at openrouter.ai/keys).


Inputs

Input Required Default Description
github_token Yes GitHub token for API access (usually secrets.GITHUB_TOKEN)
vision_document No "" Path to YAML vision document (relative to repo root)
openrouter_api_key No "" OpenRouter API key for Tier 3 ($0 cost). Tier 3 skipped if not provided.
openrouter_model No openai/gpt-oss-120b:free OpenRouter model for Tier 3
duplicate_threshold No 0.9 Cosine similarity threshold for duplicate detection
suspicion_threshold No 0.6 Suspicion score threshold for flagging
enforce_vision No false Enable Tier 3 vision alignment (set to true after reviewing your vision doc)
post_comment No true Post scorecard as a PR comment

Outputs

Output Description
verdict FAST_TRACK, REVIEW_REQUIRED, or RECOMMEND_CLOSE
scorecard_json Full scorecard as JSON for downstream CI steps

Vision Documents

A Vision Document is an optional YAML file that defines what your project is trying to be. It enables Tier 3, where an LLM evaluates whether a PR aligns with your project's direction.

Example structure:

project: my-project
principles:
  - name: "Security First"
    description: "All changes touching auth or credentials require security review"
  - name: "Test Everything"
    description: "Every feature PR must include tests"

anti_patterns:
  - "Adding dependencies without justification"
  - "Modifying CI/CD without maintainer approval"

focus_areas:
  - "src/auth/"
  - "src/credentials/"
  - ".github/"

Place it at .github/vision.yaml and set vision_document: ".github/vision.yaml" in the action inputs.


Example Scorecard Comment

When the action runs on a PR, it posts a comment like:

⚠ PR Triage: REVIEW REQUIRED

First-time contributor modifying sensitive paths without tests.

Dimension Score Summary
Hygiene & Dedup ++++++++-- 0.80 No duplicates found
Contributor Risk ++++------ 0.40 New account + sensitive paths

Flags

  • [HIGH] Sensitive Paths: PR modifies src/auth/oauth.ts, src/credentials/store.ts
  • [MEDIUM] First Contribution: No previously merged PRs from this author
  • [MEDIUM] Low Test Ratio: 245 lines added, 0 test lines

Roadmap

  • PR Triage — Shipped (v0.3.0)
  • Issue Triage — Dedup and classify issues
  • Issue-to-PR Linking — Suggest which PRs address which issues
  • Label Automation — Auto-classify PRs/issues into project label taxonomies
  • Contributor Profiles — Track contribution patterns and reliability
  • Review Routing — Suggest reviewers based on file ownership
  • Smart Stale Detection — Semantic staleness (superseded, merged elsewhere, blocked)
  • Cross-PR Conflict Detection — Surface PRs with overlapping file changes

Evidence: OpenClaw Triage

We ran this tool against 100 of OpenClaw's 3,368 open PRs:

Verdict Count Meaning
FAST_TRACK 64 (64%) Safe for quick review
REVIEW_REQUIRED 30 (30%) Flagged — needs human attention
RECOMMEND_CLOSE 6 (6%) Likely duplicate
  • Found 3 duplicate clusters (6 PRs) at 0.90 threshold
  • 89% of PRs from first-time contributors
  • 40% touch security-sensitive paths
  • Extrapolated: ~200 closable duplicates in the full backlog

Cost

$0. All tiers run for free:

  • Tier 1: sentence-transformers on CPU (GitHub Actions runner)
  • Tier 2: Pure Python rules
  • Tier 3: OpenRouter free models (optional, free API key)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oss_maintainer_toolkit-0.4.0.tar.gz (126.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oss_maintainer_toolkit-0.4.0-py3-none-any.whl (78.8 kB view details)

Uploaded Python 3

File details

Details for the file oss_maintainer_toolkit-0.4.0.tar.gz.

File metadata

  • Download URL: oss_maintainer_toolkit-0.4.0.tar.gz
  • Upload date:
  • Size: 126.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for oss_maintainer_toolkit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f4178cb98b883f19c40bad77a06547201a68c5b19592301861001edc3f0ddca6
MD5 018ed520e0d15566f12416fc4e9b89c8
BLAKE2b-256 6ea10402082dcf6f76a6c1709687fc25b71f0677f5ef921487fdf5b7c5f19f85

See more details on using hashes here.

Provenance

The following attestation bundles were made for oss_maintainer_toolkit-0.4.0.tar.gz:

Publisher: publish.yml on pranayom/oss-maintainer-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file oss_maintainer_toolkit-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for oss_maintainer_toolkit-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 680ab637e8cdd8e7ce118e783cbd7b1d1168061bf50e6c484b7671b903d2114e
MD5 510f461b78f9da92896c11cd58c32b91
BLAKE2b-256 7d80e85ae7ad40f9b76567147dcb12a75d86f1ce5bce12499bf59046254521c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for oss_maintainer_toolkit-0.4.0-py3-none-any.whl:

Publisher: publish.yml on pranayom/oss-maintainer-toolkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page