feat: add interactive plan review to --plan mode#114
Merged
Conversation
Add "Interactive review" option to the plan draft review menu. When selected, opens $EDITOR with the plan content in a temp file. On save, computes a unified diff and feeds it back as revision feedback with interpretation instructions for Claude. Includes editorFunc field on TerminalCollector for testability, computeDiff using difflib, and updated make_plan.txt prompt to document the new option.
Deploying ralphex with
|
| Latest commit: |
b3c0d54
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b050f926.ralphex.pages.dev |
| Branch Preview URL: | https://interactive-plan-review.ralphex.pages.dev |
There was a problem hiding this comment.
Pull request overview
This PR adds an "Interactive review" option to the plan draft review menu in ralphex --plan mode, enabling users to edit plan drafts directly in their $EDITOR. When changes are saved, a unified diff is computed and fed back as revision feedback through the existing revise mechanism.
Changes:
- Added interactive plan review via
$EDITORwith automatic diff computation - Fixed bufio.Reader reuse bug in AskDraftReview to prevent data loss in loops
- Refactored agents.go logging to only warn when frontmatter options are dropped
- Updated prompts and documentation to describe the new interactive review workflow
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/input/input.go | Core implementation: added openEditor and computeDiff methods, refactored AskDraftReview to support 4th option with looping, fixed bufio.Reader threading |
| pkg/input/input_test.go | Comprehensive test coverage for new functionality including edge cases, error handling, and cleanup verification |
| pkg/config/defaults/prompts/make_plan.txt | Updated prompt to document the new "Interactive review" option and diff-format feedback |
| pkg/config/agents.go | Minor refactor to only warn when frontmatter options are actually dropped |
| cmd/ralphex/main.go | Output formatting improvements with new toRelPath helper function |
| go.mod | Promoted go-difflib from indirect to direct dependency |
| docs/plans/completed/2026-02-15-interactive-plan-review.md | Comprehensive implementation plan document |
| README.md, CLAUDE.md, llms.txt | Documentation updates describing the new interactive review feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Add "Interactive review" option to the plan draft review menu in
ralphex --plan. When selected, opens$EDITORwith the plan draft in a temp file. On save and close, computes a unified diff and feeds it back as revision feedback through the existing revise mechanism.Related to #113
editorFuncfield onTerminalCollectorfor testability$VISUAL→$EDITOR→vidifflib.GetUnifiedDiffString(already vendored via testify)make_plan.txtprompt updated to document the new option and diff-format feedback