Align Pi revdiff workflow with Claude review loop#213
Merged
Conversation
- resolve detect-ref from the Pi plugin root - ship the script under plugins/pi/scripts - keep the package standalone without Claude plugin files
There was a problem hiding this comment.
Pull request overview
This PR updates the Pi integration to match revdiff’s Claude-style review loop: /revdiff [args] uses direct terminal handoff and immediately sends captured annotations to the agent (no pending inbox, no apply step), with reruns handled via the revdiff_review tool.
Changes:
- Simplifies the Pi extension to direct-only launch behavior and immediate annotation handoff; removes overlay mode, pending UI state, extra Pi commands, and post-edit reminders.
- Ships Pi’s own
detect-ref.shunderplugins/pi/scripts/and wires smart detection to honor staged-only cases via--staged. - Updates documentation, adds a Bun-backed executable regression test, and installs Bun in CI to run it.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| site/index.html | Updates Pi integration marketing blurb to describe direct handoff + agent loop. |
| site/docs.html | Rewrites Pi package docs to the direct-only, immediate-handoff workflow and updates examples/notes. |
| README.md | Aligns top-level Pi package section with the new loop (single command, no apply/rerun/results). |
| plugins/pi/skills/revdiff/SKILL.md | Updates Pi skill to document the Claude-style annotation handling loop and rerun guidance. |
| plugins/pi/scripts/detect-ref.sh | Adds standalone smart-ref detection script under Pi resources (no .claude-plugin coupling). |
| plugins/pi/README.md | Updates Pi integration README to match the new command surface and workflow. |
| plugins/pi/extensions/revdiff.ts | Removes overlay/pending UI workflow; sends annotations to agent immediately; adds use_staged parsing and path-like --only handling. |
| plugins/pi/extensions/revdiff-post-edit.ts | Deletes post-edit reminder extension. |
| package.json | Updates packaged files set (Pi-only) and bumps version to 0.3.0; removes pi-tui peer dependency. |
| docs/plans/completed/20260526-pi-revdiff-claude-workflow.md | Adds the completed implementation plan for this change. |
| CLAUDE.md | Documents the new Pi constraints: direct-only, standalone detect-ref.sh, no overlay/pending commands. |
| app/plugin_exit_code_test.go | Adds Bun-based executable regression coverage for the Pi extension behavior. |
| .github/workflows/ci.yml | Installs Bun so the new Pi extension regression test runs in CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| async function detectSmartLaunch(ctx: ExtensionContext): Promise<LaunchSpec | undefined> { | ||
| const detected = detectSmartRef(); | ||
| if (!detected) { | ||
| ctx.ui.notify("Not inside a git repo. Use /revdiff --only <file> to review a standalone file.", "warning"); |
Comment on lines
+451
to
+454
| if (arg.startsWith("/") || arg.startsWith("./")) { | ||
| return true; | ||
| } | ||
| return arg.includes("/") && path.extname(arg) !== "" && !isGitRef(arg); |
- route natural-language ref handling through /skill:revdiff - document that /revdiff stays a literal launcher
Deploying revdiff with
|
| Latest commit: |
5f30dbf
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e4e42b99.revdiff.pages.dev |
| Branch Preview URL: | https://pi-revdiff-claude-workflow.revdiff.pages.dev |
- stop after clean/no-annotation review results - keep explanations in chat and ask whether to continue - avoid rewriting ref-like path args to --only - use VCS-neutral smart detection warning
- make `/revdiff` forward requests to `/skill:revdiff` - include raw annotation text in `revdiff_review` tool output - keep history as explicit/fallback-only path - update docs and regression coverage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #207.
Changes the Pi integration to match the Claude-style revdiff loop.
/revdiffnow runs direct-terminal review and sends captured annotations to the agent immediately, so there is no pending inbox or/revdiff-applystep.origin/masterpackaged.claude-plugin/skills/revdiff/scripts/, and the Pi extension resolveddetect-ref.shandlaunch-revdiff.shfrom that tree. This PR removes that coupling by shipping the remainingdetect-ref.shdependency underplugins/pi/scripts.Changes
/revdiff-rerun,/revdiff-results,/revdiff-apply,/revdiff-clear/revdiff [args]as the only user command and keeprevdiff_reviewas the direct-only agent rerun tool--stagedand preserve path-like--onlyargument handling