Skip to content

Align Pi revdiff workflow with Claude review loop#213

Merged
umputun merged 15 commits into
masterfrom
pi-revdiff-claude-workflow
May 27, 2026
Merged

Align Pi revdiff workflow with Claude review loop#213
umputun merged 15 commits into
masterfrom
pi-revdiff-claude-workflow

Conversation

@umputun
Copy link
Copy Markdown
Owner

@umputun umputun commented May 26, 2026

Related to #207.

Changes the Pi integration to match the Claude-style revdiff loop. /revdiff now runs direct-terminal review and sends captured annotations to the agent immediately, so there is no pending inbox or /revdiff-apply step.

origin/master packaged .claude-plugin/skills/revdiff/scripts/, and the Pi extension resolved detect-ref.sh and launch-revdiff.sh from that tree. This PR removes that coupling by shipping the remaining detect-ref.sh dependency under plugins/pi/scripts.

Changes

  • remove Pi pending annotation state, side panel/status UI, overlay launch path, post-edit reminder extension, and /revdiff-rerun, /revdiff-results, /revdiff-apply, /revdiff-clear
  • keep /revdiff [args] as the only user command and keep revdiff_review as the direct-only agent rerun tool
  • honor staged-only smart detection with --staged and preserve path-like --only argument handling
  • update README, site docs, Pi skill docs, and Pi package contents

Copilot AI review requested due to automatic review settings May 26, 2026 22:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.sh under plugins/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.

Comment thread plugins/pi/extensions/revdiff.ts Outdated
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 thread plugins/pi/extensions/revdiff.ts Outdated
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
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 26, 2026

Deploying revdiff with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5f30dbf
Status: ✅  Deploy successful!
Preview URL: https://e4e42b99.revdiff.pages.dev
Branch Preview URL: https://pi-revdiff-claude-workflow.revdiff.pages.dev

View logs

umputun added 3 commits May 26, 2026 18:22
- 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
@umputun umputun merged commit e085170 into master May 27, 2026
5 checks passed
@umputun umputun deleted the pi-revdiff-claude-workflow branch May 27, 2026 04:49
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.

2 participants