feat(plan): plan review
What does this PR do?
~~This PR adds two one new feature:~~
-
~~Iterative Planning, something which for example Claude Code and I believe Cursor as well which will keep iterating on one and the same plan document instead of writing it to the conversation history, losing context between iteration, etc...~~
-
~~Plan Review / Summary, after iterating on the plan, it will request to exit planning mode. When it does this it'll let you approve/reject the plan, give an optional reason, or dismiss it entirely and interrupt the flow. Gives you an easy way of looking through the entire plan before executing on it.~~
* Iterative Planning was added by Dax shortly after this PR, so for that reason I'm adopting those features but with some additional improvements
This PR includes an improved plan reviewing flow where when exit plan mode is called it'll show you the full plan file in the chat and gives you some quick key binds to approve/reject it with an optional comment.
This PR initially included an iterative planning mode but I adopted the new planning tools by @thdxr. Due to this, the PR has a lot of commits adding / removing those features.
How did you verify your code works?
Basic tests in plan mode via TUI and Web interface by planning new features, smaller changes and more in real projects
Thanks for your contribution!
This PR doesn't have a linked issue. All PRs must reference an existing issue.
Please:
- Open an issue describing the bug/feature (if one doesn't exist)
- Add
Fixes #<number>orCloses #<number>to this PR description
See CONTRIBUTING.md for details.
The following comment was made by an LLM, it may be inaccurate:
Based on my search, I found one potentially related PR:
Related PR:
-
#6315 - "feat: implement exitplanmode tool for plan mode workflow"
- URL: https://github.com/anomalyco/opencode/pull/6315
- This PR appears to be related as it implements the
exitplanmodetool which is central to the plan review/approval flow mentioned in PR #8105
This existing PR implements a foundational piece of the functionality (exiting plan mode), while the current PR (#8105) adds the broader iterative planning and plan review features that build upon or extend that capability.
All other search results are unrelated to the planning/plan review features.
I'm publishing this now as a draft PR to get visibility and garner some feedback around the topic. It's a big PR with multiple different additions so I wanna make sure to get it right. Will be working further on it after I get to do some testing in the coming days