omp packages

@tduyng/pi-review0.0.4

Review only the delta. /review snapshots the worktree, so the next run pays for what moved since.

tienduy-nguyen Published 4 hours ago Apache-2.0 ~388 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

@tduyng/pi-review

/review reviews from git ground truth. It resolves the target from the repository, sends one prompt with the diff attached, and advances a checkpoint so the next run covers only what moved.

A review from memory covers code the model remembers writing, and re-reviews the parts already fixed.

How it works

A bare /review asks git what changed since the last checkpoint. With nothing there it takes what is uncommitted, and with nothing there either, this branch against its merge base.

The command writes its snapshot through a throwaway GIT_INDEX_FILE. That produces a dangling tree with no ref and no commit, so repository history stays untouched. The checkpoint is that same tree, and a review moves it.

A --staged review, or one with a described target, leaves the checkpoint where it was, so unstaged work is not skipped next time.

Commands

/review                      what moved since the last review, else uncommitted, else the branch base
/review src/session.ts       a target you describe, passed to the prompt as written
/review --staged             the index only
/review --lean               the review prompt without the rubric
/review --model provider/id  run the review on another model
/review --extra "check error paths"   add an instruction
/review --base main          compare against another base

The command caps the reply at 15 lines and eight tool calls in total, including the calls that resolve the target. A review that needs more than eight calls has started refactoring.

Install

pi install npm:@tduyng/pi-review

Local checkout: pi install /path/to/dotfiles/pi/agent/extensions/pi-review

It needs git on PATH and a git repository. Outside one, the command says so and stops. --model uses the subagent tool when it is installed, and runs inline on the current model when it is not.

Limits

  • The diff is capped at 12,000 characters. A larger change needs two reviews or a narrower target.
  • A review is one pass. A model asked to re-review its own findings mostly finds its earlier findings.
  • The checkpoint lives as a session entry, so a new session starts from the last one in the same repository. A fresh clone starts from nothing.
  • Snapshot trees are unreferenced by design, so git's pruning collects them after about two weeks. A checkpoint older than that resolves to a full review.