pi-annotated-review
v0.1.0
Published
Pi extension that creates annotated HTML code-review pages for git changes.
Maintainers
Readme
Annotated Review Pi Extension
Global Pi extension that provides /annotated-review in every project.
What it does
- Registers
/annotated-reviewas a global extension command. - Sends the agent a compact review prompt that points at reusable renderer assets.
- Keeps CSS in
assets/review.css. - Keeps browser enhancements in
assets/review-components.js. - Keeps HTML rendering helpers in
lib/review-page.mjsand git collection inlib/git-context.mjs. - Writes self-contained HTML reviews with inline CSS and inline JS.
Usage
/annotated-review
/annotated-review main
/annotated-review main /tmp/review.htmlThe command resolves output paths to absolute paths before sending the prompt, so the final response should be terminal-clickable.
Security note: tracked diffs are collected from git automatically. Untracked file contents are only rendered when the review JSON explicitly lists the path, and the renderer rejects symlinks, likely secrets, large files, generated output, dependencies, and binaries.
After editing extension files, run /reload in Pi.
Package metadata
This repository is prepared as a public npm Pi package:
- npm package name:
pi-annotated-review - Pi package manifest:
package.json→pi.extensions: ["./index.ts"] - package discovery keyword:
pi-package - license: MIT
- publish readiness:
privatehas been removed; run the checks below before publishing:
npm test
npm run pack:dry-runAfter publishing, users should be able to install it with:
pi install npm:pi-annotated-review