A local-first AI workspace for discovering OSS issues, drafting contribution plans, and preparing PR-ready artifacts.
English · 简体中文 · 日本語 · 한국어 · Русский
Python 3.9+
Local-first
Markdown workflow
Web UI
OSS PR Agent is a local-first project for building a safer open source contribution workflow around AI.
Instead of blindly mass-opening pull requests, it helps you:
- inspect GitHub repositories before acting
- prioritize issues using issue text and comment signals
- draft scoped implementation plans
- prepare PR and maintainer-reply drafts in Markdown
- keep session and run logs for review
- walk through a four-step confirmation UI before any branch submission step
This repository is intentionally conservative. It does not auto-push code or auto-open pull requests yet. The current focus is reviewability, traceability, and human confirmation.
Autonomous bulk PR systems are technically possible, but they often fail for social and operational reasons:
- solving the wrong problem
- opening low-quality or unwanted PRs
- ignoring project contribution norms
- overwhelming maintainers
- triggering platform abuse controls
This project takes the opposite approach: inspect first, confirm scope, then draft.
- GitHub repository discovery through the public API
- repository scoring with conservative heuristics
- issue harvesting with fallback search strategies
- comment-aware prioritization for bugs and feature requests
- local bundle generation:
summary.jsonanalysis.mdtask.mdpr_draft.mdreply_draft.md
- Markdown run logs and web session logs
- local web UI with a guided 4-step flow
- Markdown editing and preview for PRs and review replies
- multilingual interface support:
- English
- Simplified Chinese
- Japanese
- Korean
- day/night theme switching in the web UI
The web workspace follows a clear review path:
- Enter a GitHub repository URL and inspect stars plus major bug/feature discussions.
- Confirm or edit the proposed solution outline.
- Edit the PR body and maintainer reply in Markdown, then preview both.
- Prepare a submission-branch artifact and leave it in a waiting-for-confirmation state.
python3 -m venv .venv
source .venv/bin/activate
pip install -e .cp examples/config.example.json config.jsonOptional, but strongly recommended for rate limits:
export GITHUB_TOKEN=ghp_your_token_hereDiscover repositories:
oss-pr-agent discover --config config.jsonGenerate local bundles:
oss-pr-agent draft --config config.jsonoss-pr-agent web --config config.json --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000.
Inspect a narrow search slice:
oss-pr-agent discover --config config.json --limit 5Generate bundles for accepted repositories:
oss-pr-agent draft --config config.json --limit 3Use a one-off query:
oss-pr-agent discover --config config.json --query "topic:cli language:python stars:>150 pushed:>2025-01-01 archived:false"Launch the local review console:
oss-pr-agent web --config config.json --host 127.0.0.1 --port 8000Example config.json:
{
"query": "topic:python language:python stars:>200 archived:false",
"limit": 10,
"output_dir": "out",
"log_dir": "out/logs",
"min_score": 45,
"issue_labels": ["good first issue", "help wanted"],
"max_open_issues_per_repo": 5,
"max_comments_per_issue": 10,
"allow_missing_contributing": false,
"require_recent_activity_days": 120
}Bundle output includes:
summary.jsonanalysis.mdtask.mdpr_draft.mdreply_draft.md
Run and session logging includes:
- Markdown run logs under
out/logs/ - Markdown session logs under
out/logs/ - branch-preparation artifacts under
out/submissions/
.
|-- README.md
|-- README.zh-CN.md
|-- README.ja.md
|-- README.ko.md
|-- README.ru.md
|-- docs/
| |-- ARCHITECTURE.md
| `-- OPERATIONS.md
|-- examples/
| `-- config.example.json
|-- pyproject.toml
`-- src/
`-- oss_pr_agent/
- [Architecture](/Users/wangboyu/Documents/New project/docs/ARCHITECTURE.md)
- [Operations](/Users/wangboyu/Documents/New project/docs/OPERATIONS.md)
Not implemented yet:
- automatic code changes inside target repositories
- automatic branch push to GitHub
- automatic pull request creation
- webhook-driven maintainer reply automation
- sandboxed repository execution for code changes
This local workspace started without a GitHub remote. Once your remote is ready, you can publish with:
git remote add origin <your-github-repo-url>
git push -u origin main
git push -u origin codex/github-pr-agent-mvp