@siddr/pi-review
Interactive review mode extension for pi
Package details
Install @siddr/pi-review from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@siddr/pi-review- Package
@siddr/pi-review- Version
0.1.9- Published
- Apr 27, 2026
- Downloads
- 877/mo · 204/wk
- Author
- siddr
- License
- MIT
- Types
- extension
- Size
- 170.1 KB
- Dependencies
- 0 dependencies · 5 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Review extension
Interactive code-review mode for pi.
Install
pi install npm:@siddr/pi-review
What it does
/reviewtoggles review mode:- when inactive, it starts review mode
- when active, it ends review mode
- Supports review targets:
- uncommitted changes
- base branch diff
- specific commit
- pull request (with
gh pr view+gh pr checkout) - folder/file snapshot review
- custom review instructions
- Loads project-specific
REVIEW_GUIDELINES.mdfrom the directory containing.pi(if present) and applies it as hidden review instructions while review mode is active. - Shows a banner above the editor while active:
Review mode active; /review to exit.
Commands
/review(interactive target selection)/review uncommitted/review branch <name>/review commit <sha> [title...]/review folder <paths...>/review custom [instructions...]/review pr <number-or-url>
Direct command arguments support single and double quotes, so paths and instructions can contain spaces:
/review commit abc123 "Fix URL handling"
/review folder src "test fixtures"
/review custom 'focus on auth and error handling'
Pull-request reviews require the GitHub CLI (gh) to be installed and authenticated. If gh --version or gh auth status fails, the extension shows setup guidance before attempting to fetch PR details.
Start and end flow
When review mode starts, the extension asks where to start (Empty branch or Current branch) only when the session has branchable history. It then resolves the target, enables review mode, and prefills the editor with the selected review focus before you send the first review prompt.
For Empty branch reviews of uncommitted changes, the extension also posts a visible AI-generated summary after the review instructions message. The summary is generated from the source branch's session history, focuses on goal/motivation, and is shown as a short preview that can be expanded with the standard expand keybinding.
When review mode starts and ends, summaries and triage context use target-specific labels such as current changes, changes against 'main', commit abc1234: title, PR #42: title, or folders: src, docs.
When review mode ends, the extension opens triage for recorded comments (keep/discard, priority, optional note). If triage is confirmed, it exits review mode, restores model/thinking values captured at start, and posts a summary containing kept comments only. If no comments are kept, it exits cleanly without posting a summary.
Review-mode tool
While review mode is active, the extension enables one tool:
add_review_comment
When review mode exits, the tool is removed from active tools.
add_review_comment schema
{
"priority": "P0 | P1 | P2 | P3",
"comment": "string",
"references": [
{
"filePath": "string",
"startLine": 1,
"endLine": 2
}
]
}
Validation:
commentmust be non-empty after trim.startLine >= 1.endLine >= startLinewhen provided.filePathis trimmed + normalized.
Acknowledgements
This extension is based on the original implementation from mitsuhiko/agent-stuff.