Skip to content

feat: add pi-code-review automated code review extension#96

Merged
MattDevy merged 1 commit intomainfrom
feat/pi-code-review
Apr 10, 2026
Merged

feat: add pi-code-review automated code review extension#96
MattDevy merged 1 commit intomainfrom
feat/pi-code-review

Conversation

@MattDevy
Copy link
Copy Markdown
Owner

Summary

  • Adds pi-code-review, a new Pi extension implementing automated, language-aware code review (closes feat: pi-code-review — automated language-aware code review after edits #80)
  • Automatic mode (zero cost): hooks into tool_execution_end to track edited files per turn, injects language-specific review checklist into system prompt at before_agent_start so the agent self-reviews
  • On-demand /review: detects changed files via git diff, makes a direct Haiku LLM call for structured findings (CRITICAL/HIGH/MEDIUM/INFO) with line references and suggestions, falls back to prompt-based review if no API key
  • Supports TypeScript, Python, Go, Rust, Java, PHP with per-language review checklists
  • 8 source modules, 7 test files, 70 tests passing, typecheck/lint/build clean

Test plan

  • npm run check passes (tests + lint + typecheck)
  • npm run build -w packages/pi-code-review compiles successfully
  • Install in Pi session via pi install npm:pi-code-review
  • Edit a file and verify review checklist appears in next turn's system prompt
  • Run /review and verify structured findings output
  • Run /review --staged and /review src/foo.ts with specific files
  • Verify fallback prompt mode works when no Anthropic API key is configured

Adds pi-code-review, a Pi extension that provides automated, language-aware
code review. Two modes: automatic system prompt injection after edits
(zero cost), and on-demand /review command with direct Haiku LLM call
for structured severity-leveled findings.

Supports TypeScript, Python, Go, Rust, Java, PHP with per-language
review checklists. 70 tests, all passing.
@MattDevy MattDevy merged commit de20807 into main Apr 10, 2026
3 checks passed
@MattDevy MattDevy deleted the feat/pi-code-review branch April 10, 2026 23:53
@MattDevy MattDevy mentioned this pull request Apr 10, 2026
MattDevy added a commit that referenced this pull request Apr 10, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>pi-code-review: 0.2.0</summary>

##
[0.2.0](pi-code-review-v0.1.0...pi-code-review-v0.2.0)
(2026-04-10)


### Features

* Add pi-code-review automated code review extension
([#96](#96))
([de20807](de20807))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: pi-code-review — automated language-aware code review after edits

1 participant