|
1 | 1 | # opencode-planner |
2 | 2 |
|
3 | | -`opencode-planner` is an OpenCode plugin that adds a dedicated `plan` agent for read-only planning before implementation. Its functionality is an emulation of the experimental plan agent (it has no hard dependency on `EXPERIMENTAL_PLAN_MODE=1`, although that setting enables a tool called plan_exit which this plugin will use if available). That is, it likes to use sub-agents and a structured approach to planning, asks clarifying questions, and finally it produces a markdown file. |
| 3 | +`opencode-planner` is an OpenCode plugin that |
| 4 | +* emulates Experimental Plan Mode |
| 5 | +* integrates external review and feedback editing of the plan via your choice of editor, or Plannotator |
4 | 6 |
|
| 7 | +It adds a dedicated `plan` agent for read-only planning before implementation. |
| 8 | +Its functionality is an emulation of the experimental plan agent (it has no hard dependency on `EXPERIMENTAL_PLAN_MODE=1`, although that setting enables a tool called plan_exit which this plugin will use if available). That is, it likes to use sub-agents and a structured approach to planning, asks clarifying questions, and finally it produces a markdown file. |
5 | 9 |
|
6 | 10 | When Plannotator is installed, it can submit the finished plan for richer review. |
7 | 11 |
|
8 | 12 | Without Plannotator, it can open the plan in your configured external editor for review. A new command `/edit-plan` will open the plan in the editor if needed. |
9 | 13 |
|
10 | 14 | In either case, changes made while editing will trigger a revision of the plan. |
11 | 15 |
|
| 16 | +You can easily tweak the prompt, in fact /plan_prompt gives you the plugin's prompt as a starting point for customisation. |
| 17 | + |
12 | 18 |
|
13 | 19 | After review, the agent can hand back to implementation mode by calling `plan_exit` only when the host runtime exposes that tool. In current OpenCode builds, that means experimental plan mode must be enabled and the client must be `cli`. If it's not enabled, you need to prompt the build agent to start work. |
14 | 20 |
|
15 | 21 | Repository: <https://github.com/timrichardson/opencode-planner> |
16 | 22 |
|
| 23 | +## Commands added |
| 24 | +/edit-plan: open plan in editor as configured (this also happens automatically when opencode calls submit_plan tool) |
| 25 | +/plan-prompt: shows the plugin's prompt, as a starting point for customisation |
| 26 | +/planner-config: shows how it determines which editor is used because there are three possible env vars. |
| 27 | + |
17 | 28 |
|
18 | 29 | ### Rationale |
19 | 30 | Experimental plan mode is not a focus for the core devs, who point out that a plugin can do it, which I set out to prove, at least as a concept. This plugin means, at least for me, a development path for a stronger Plan agent independent of core OpenCode priorities. |
|
0 commit comments