pr-review-lessons
v0.0.0
Published
Collect GitHub PR reviews/comments and generate actionable coding lessons for agents.
Downloads
100
Maintainers
Readme
pr-review-lessons
Collect PR review history from GitHub and turn recurring feedback into practical lessons for agents.
What it does
- collect — sync PR metadata + issue comments + reviews + review threads for a repo
- learn — extract recurring actionable lessons from all reviewer feedback
- guide — generate a markdown guide (default
REVIEW-LESSONS.md) agents can follow
The data store is incremental-safe and keyed by PR id (pr-52 style):
{
"repo": "owner/name",
"prs": {
"pr-52": {
"number": 52,
"title": "...",
"state": "OPEN",
"updatedAt": "...",
"syncedAt": "...",
"comments": [],
"reviews": [],
"threads": []
}
}
}Requirements
- Bun
- GitHub CLI (
gh) authenticated (gh auth status)
Install
bun installCLI usage
bun run build
bun run dist/cli.mjs --helpCollect
bun run src/cli.ts collect --repo openclaw/openclawOptions:
--output <path>(default:data/pr-review-data.json)--force-all--force-pr <number>(repeatable)
Sync behavior:
- Default: skip already-synced PRs when
updatedAtdid not change - Re-sync all with
--force-all - Re-sync selected PRs with repeated
--force-pr
Learn
bun run src/cli.ts learn \
--repo openclaw/openclaw \
--input data/pr-review-data.json \
--output data/pr-review-lessons.jsonOptions:
--top <n>number of top recurring lessons (default:20)
Guide
bun run src/cli.ts guide \
--repo openclaw/openclaw \
--input data/pr-review-data.json \
--output REVIEW-LESSONS.mdOptions:
--top <n>number of lessons to include (default:20)
Example workflow (openclaw)
# 1) Collect PR feedback incrementally
bun run src/cli.ts collect --repo openclaw/openclaw
# 2) Generate structured learned lessons
bun run src/cli.ts learn --repo openclaw/openclaw
# 3) Generate practical markdown guide for agents
bun run src/cli.ts guide --repo openclaw/openclaw --output REVIEW-LESSONS.mdScripts
bun run buildbun run lint:fixbun run check-typesbun test
