@runecraft/pr-review

Parallel AI code review for GitHub pull requests in the Pi coding agent, with model-agnostic tiered subagents, structured findings, optional verification, and safe COMMENT-only publishing.

Packages

Package details

extensionprompt

Install @runecraft/pr-review from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@runecraft/pr-review
Package
@runecraft/pr-review
Version
0.2.1
Published
Sep 4, 2026
Downloads
186/mo · 11/wk
Author
rehem
License
MIT
Types
extension, prompt
Size
402.8 KB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions/index.ts"
  ],
  "prompts": [
    "./prompts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

Parallel, tiered code review for GitHub pull requests, built for the Pi coding agent. You run /pr-review <n> and five focused passes go to work at once, on models you choose: an overview plus heavy lenses for correctness, contracts, security and performance, and resources. Every finding is validated before it is reported, and the result comes back as a structured review with severities (P0 to P3) and a verdict.

  • Parallel by default - five passes run concurrently, with automatic sharding for very large diffs.
  • Validated findings - candidates are checked against the diff before anything is reported, so speculation and non-issues stay out.
  • Safe publishing - reviews post COMMENT-only and never merge or approve. One review POST at most, with the first 50 eligible findings inline.

Install

Installed automatically as part of the harness. Standalone:

pi install npm:@runecraft/pr-review

How it works

/pr-review 42
     │
     ▼
 fetch PR, capture the diff
     │
     ▼  five passes run in parallel
 overview (light)
 correctness (heavy)
 contracts (heavy)
 security + performance (heavy)
 resources (heavy)
     │
     ▼  findings validated, classified P0-P3
 structured review + verdict

The default balanced mode keeps the four heavy lenses on P0 to P2 defects and lets the light overview surface at most three P3 or nit candidates. --full adds a conventions and maintainability pass and lets every pass report all severities; --major-only keeps the heavy lenses and skips minor discovery. The verdict depends only on blocking P0 and P1 findings.

--comment and --no-comment control whether the completed, validated review is posted back to the PR thread.

Features

Live focus viewer

/pr-review-focus opens a read-only live focus viewer on the review in progress (Ctrl+Alt+R). Return to the main thread without cancelling the review. The viewer never stores the pass objective, input context, or captured diff, and cannot send prompts, steering, or follow-ups.

Publication

/pr-review-publish publishes a completed review's findings and handles that request directly; publishing never starts or reruns a review. When the review was cancelled, it reports that state instead of publishing. With allowStalePublish: true the command runs the configured light subagent once to reformat the completed output and posts it as a stale review (/pr-review-publish 123 --allow-stale). Inline comments are always disabled for stale reviews.

The package caches one validated completed review; autoPostReviews and --comment publish that cached review after completion. It builds one GitHub review payload and sends at most one review POST: the first 50 eligible P0-P3 findings with valid, unique diff anchors are inline, and all other findings that pass content validation stay in the top-level review body.

Docs