You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ If you want reproducible installs instead of automatic plugin refreshes, pin an
37
37
38
38
```json
39
39
{
40
-
"plugin": ["opencode-planner@0.3.0"]
40
+
"plugin": ["opencode-planner@0.3.1"]
41
41
}
42
42
```
43
43
@@ -49,9 +49,11 @@ If you want reproducible installs instead of automatic plugin refreshes, pin an
49
49
- lets users replace the plugin's base `plan` prompt with their own `agent.plan.prompt`
50
50
- lets users override agent settings such as `agent.plan.model` and provider-specific options like `agent.plan.reasoningEffort`
51
51
- denies `submit_plan`, `edit_plan`, and `plan_exit` to the built-in `general` and `explore` subagents so review and implementation handoff stay on the primary `plan` agent
52
+
- exposes a `planner_config` tool so the `plan` agent can inspect planner-specific runtime and editor configuration
52
53
- exposes a `plan_prompt` tool so the `plan` agent can reveal the plugin's prompt basis for customization
53
54
- exposes an `edit_plan` tool so the `plan` agent can open the current plan in the configured external editor
54
55
- registers an `/edit-plan` command that routes to the `plan` agent and asks it to call `edit_plan`
56
+
- registers a `/planner-config` command that routes to the `plan` agent and asks it to call `planner_config`
55
57
- uses `submit_plan` for review when available, otherwise falls back to external-editor review
56
58
- keeps the agent in planner mode if the plan file changed after `submit_plan`; the revised plan must be resubmitted before `plan_exit`
57
59
- can leave planner mode with `plan_exit` after approval when experimental plan mode is enabled in the CLI runtime (because the plan_exit tool is only available with `EXPERIMENTAL_PLAN_MODE` enabled; se OpenCode docs for Experiments)
@@ -90,6 +92,30 @@ The tool returns:
90
92
- the injected planner reminder, which is plugin-controlled runtime guidance and is not customized via `agent.plan.prompt`
91
93
- a short note explaining that the final runtime prompt can still differ because of user config, other plugins, or runtime tool availability like `plan_exit`
92
94
95
+
## Diagnose planner configuration
96
+
97
+
The plugin also adds a read-only `planner_config` tool. Use it when you want to inspect planner-specific configuration, especially editor selection precedence across `PLAN_VISUAL`, `VISUAL`, and `EDITOR`.
98
+
99
+
In the TUI, `/planner-config` is the shortcut for this diagnostic flow.
100
+
101
+
Example:
102
+
103
+
```text
104
+
/planner-config
105
+
```
106
+
107
+
The output includes:
108
+
109
+
- the current session plan path
110
+
- planner tool availability from the plugin's perspective
111
+
- whether `submit_plan` is available for Plannotator review and `edit_plan` is available as the local-editor fallback
- relevant runtime flags that affect planner behavior, such as `OPENCODE_EXPERIMENTAL_PLAN_MODE` and `OPENCODE_CLIENT`
116
+
117
+
This is the quickest way to understand why `edit_plan` is using a specific editor command before you try `/edit-plan`.
118
+
93
119
## Review Without Plannotator
94
120
95
121
In the TUI, you can use `/edit-plan` as a shortcut to ask the `plan` agent to reopen the current plan in your configured external editor. This routes through the existing `edit_plan` tool behavior.
@@ -161,7 +187,7 @@ npm run debug:plan
161
187
npm run opencode:no-plannotator -- debug config
162
188
```
163
189
164
-
`npm run debug:plan` checks the active OpenCode runtime and reports whether the local repo plugin is loaded, whether `plan_prompt`, `edit_plan`, `submit_plan`, and `plan_exit` are allowed by the `plan` agent, and whether they are actually registered as runtime tools.
190
+
`npm run debug:plan` checks the active OpenCode runtime and reports whether the local repo plugin is loaded, whether `planner_config`, `plan_prompt`, `edit_plan`, `submit_plan`, and `plan_exit` are allowed by the `plan` agent, and whether they are actually registered as runtime tools.
165
191
166
192
This is the fastest way to distinguish:
167
193
@@ -181,7 +207,7 @@ It starts OpenCode with an isolated temporary home/config, keeps the local repo
181
207
1. Update `CHANGELOG.md`.
182
208
2. Bump the version in `package.json`.
183
209
3. Commit the release.
184
-
4. Create and push a git tag like `v0.3.0` for the release.
210
+
4. Create and push a git tag like `v0.3.1` for the release.
185
211
5. Let GitHub Actions publish to npm `latest`.
186
212
6. Publish matching GitHub release notes.
187
213
@@ -198,7 +224,7 @@ Configure npm Trusted Publishing for this package:
198
224
- Repository: `opencode-planner`
199
225
- Workflow filename: `release.yml`
200
226
201
-
The release workflow publishes stable tags like `v0.3.0` to npm `latest` and creates matching GitHub release notes automatically.
227
+
The release workflow publishes stable tags like `v0.3.1` to npm `latest` and creates matching GitHub release notes automatically.
202
228
203
229
Trusted Publishing uses GitHub OIDC and does not require an `NPM_TOKEN` secret for publishing.
Copy file name to clipboardExpand all lines: index.js
+73-1Lines changed: 73 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,12 @@ const editPlanCommand = {
13
13
template:
14
14
"Reopen the current markdown plan in the configured external editor by calling the edit_plan tool. If the tool reports that the user changed the plan externally, treat those edits as review feedback, summarize what changed, and continue planning from the updated plan.",
"Call the planner_config tool for the current session and return its output so the user can inspect planner tool availability, editor resolution, and relevant runtime flags.",
21
+
}
16
22
17
23
functiontruthy(key){
18
24
constvalue=process.env[key]?.toLowerCase()
@@ -136,14 +142,38 @@ function restrictPlannerSubagent(input = {}) {
@@ -284,6 +314,39 @@ async function editPlan(sessionID) {
284
314
].join("\n")
285
315
}
286
316
317
+
functionplannerConfig(sessionID){
318
+
consttarget=file(sessionID??"<session-id>")
319
+
constpermission=mode().permission
320
+
consteditor=editorConfig()
321
+
constplanExitEnabled=hasPlanExit()
322
+
323
+
return[
324
+
"# opencode-planner configuration",
325
+
"## Planner files",
326
+
`- Current session plan path: \`${target}\``,
327
+
`- Default plan path pattern: \`${defaultPlanTarget}\``,
328
+
"",
329
+
"## Planner tools",
330
+
`- plan_prompt: ${permission.plan_prompt==="allow" ? "allowed by the `plan` agent" : "not allowed by the `plan` agent"}`,
331
+
`- edit_plan: ${permission.edit_plan==="allow" ? "allowed by the `plan` agent as the fallback local-editor review tool" : "not allowed by the `plan` agent"}`,
332
+
`- planner_config: ${permission.planner_config==="allow" ? "allowed by the `plan` agent" : "not allowed by the `plan` agent"}`,
333
+
`- submit_plan: ${permission.submit_plan==="allow" ? "allowed by the `plan` agent and required for Plannotator review; availability still depends on the host runtime" : "not allowed by the `plan` agent"}`,
334
+
`- plan_exit: ${planExitEnabled ? "enabled by the current runtime flags when the host runtime provides it" : "not enabled by the current runtime flags"}`,
0 commit comments