Skip to content

Commit 33f409a

Browse files
authored
docs: clarify OpenCode plugin configuration
Clarify how to attach Plannotator options when OpenCode has multiple plugins, and link the landing page OpenCode tab to setup and migration docs.
1 parent ef3172e commit 33f409a

5 files changed

Lines changed: 134 additions & 12 deletions

File tree

apps/marketing/src/components/landing/HeroSection.astro

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,17 @@ import AnnoReplace from './AnnoReplace.astro';
213213
'"plugin": ["@plannotator/opencode@latest"]',
214214
'Restart OpenCode to load the plugin'
215215
],
216-
detail: 'Then add to opencode.json:'
216+
detail: 'Then add to opencode.json:',
217+
links: [
218+
{
219+
text: 'OpenCode setup and custom agents',
220+
url: '/docs/guides/opencode/#custom-planning-agents'
221+
},
222+
{
223+
text: '0.19.1 migration guide',
224+
url: '/docs/guides/opencode-migration-0-19-1/'
225+
}
226+
]
217227
},
218228
copilot: {
219229
steps: [
@@ -283,18 +293,26 @@ import AnnoReplace from './AnnoReplace.astro';
283293
stepsEl.classList.add('hidden');
284294
}
285295

286-
// Handle marketplace link
296+
// Handle documentation and marketplace links
287297
if (linkEl) { linkEl.remove(); linkEl = null; }
288-
if (config.link) {
289-
var a = document.createElement('a');
290-
a.id = 'install-link';
291-
a.href = config.link.url;
292-
a.target = '_blank';
293-
a.rel = 'noopener noreferrer';
294-
a.className = 'mt-3 text-sm hidden sm:inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors';
295-
a.innerHTML = config.link.text + ' <svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg>';
296-
installBlock.parentNode.insertBefore(a, installBlock.nextSibling);
297-
linkEl = a;
298+
var links = config.links || (config.link ? [config.link] : []);
299+
if (links.length) {
300+
var linkWrap = document.createElement('div');
301+
linkWrap.id = 'install-link';
302+
linkWrap.className = 'mt-3 hidden sm:flex flex-wrap items-center gap-x-4 gap-y-1';
303+
304+
links.forEach(function(link) {
305+
var a = document.createElement('a');
306+
a.href = link.url;
307+
a.target = link.url.charAt(0) === '/' ? '_self' : '_blank';
308+
if (a.target === '_blank') a.rel = 'noopener noreferrer';
309+
a.className = 'text-sm inline-flex items-center gap-1.5 text-muted-foreground hover:text-foreground transition-colors';
310+
a.innerHTML = link.text + ' <svg class="w-3.5 h-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"/></svg>';
311+
linkWrap.appendChild(a);
312+
});
313+
314+
installBlock.parentNode.insertBefore(linkWrap, installBlock.nextSibling);
315+
linkEl = linkWrap;
298316
}
299317
}
300318

apps/marketing/src/content/docs/getting-started/configuration.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,22 @@ To configure the workflow explicitly:
7373
}
7474
```
7575

76+
When Plannotator is used with other OpenCode plugins, the options object must stay attached to the Plannotator plugin entry:
77+
78+
```json
79+
{
80+
"$schema": "https://opencode.ai/config.json",
81+
"plugin": [
82+
["@plannotator/opencode@latest", {
83+
"workflow": "plan-agent",
84+
"planningAgents": ["plan", "sisyphus"]
85+
}],
86+
"oh-my-opencode-slim",
87+
"openviking-opencode"
88+
]
89+
}
90+
```
91+
7692
Use `workflow: "manual"` for commands-only mode, or `workflow: "all-agents"` to restore the legacy behavior where primary agents can call `submit_plan`. In `plan-agent` mode, any names listed in `planningAgents` are added alongside OpenCode's built-in `plan` agent. Slash commands (`/plannotator-review`, `/plannotator-annotate`, `/plannotator-last`) require the CLI to be installed separately via the install script.
7793

7894
If you are upgrading from an older OpenCode install, see the [OpenCode 0.19.1 migration guide](/docs/guides/opencode-migration-0-19-1/).

apps/marketing/src/content/docs/guides/opencode-migration-0-19-1.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ Add it explicitly. OpenCode's built-in `plan` agent stays enabled in `plan-agent
136136
}
137137
```
138138

139+
If you also use other OpenCode plugins, keep Plannotator as the two-item array entry and put the other plugins beside it:
140+
141+
```json
142+
{
143+
"$schema": "https://opencode.ai/config.json",
144+
"plugin": [
145+
["@plannotator/opencode@latest", {
146+
"workflow": "plan-agent",
147+
"planningAgents": ["planner", "sisyphus"]
148+
}],
149+
"oh-my-opencode-slim",
150+
"openviking-opencode"
151+
]
152+
}
153+
```
154+
155+
Do not put `{ "workflow": "plan-agent" }` as a separate item in the `plugin` array. OpenCode expects each plugin entry to be either a string or `[pluginName, options]`.
156+
139157
### I upgraded but OpenCode still looks stale
140158

141159
Restart OpenCode after upgrading. If a cached plugin version is still being used, rerun the install script or clear the OpenCode cache and restart.

apps/marketing/src/content/docs/guides/opencode.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,25 @@ Default config:
4242
}
4343
```
4444

45+
If you use other OpenCode plugins, keep everything in the same `plugin` array and attach Plannotator's options directly to the Plannotator entry:
46+
47+
```json
48+
{
49+
"$schema": "https://opencode.ai/config.json",
50+
"plugin": [
51+
["@plannotator/opencode@latest", {
52+
"workflow": "plan-agent",
53+
"planningAgents": ["plan", "sisyphus"]
54+
}],
55+
"@tarquinen/opencode-dcp@latest",
56+
"octto",
57+
"oh-my-opencode-slim"
58+
]
59+
}
60+
```
61+
62+
Do not put `{ "workflow": "plan-agent" }` as its own item in the `plugin` array. OpenCode plugin entries must be either a plugin string or a two-item array like `[pluginName, options]`.
63+
4564
If you want the old broad behavior:
4665

4766
```json
@@ -68,6 +87,38 @@ If you want commands only:
6887
}
6988
```
7089

90+
## Custom planning agents
91+
92+
OpenCode's built-in `plan` agent is always included in `plan-agent` mode. If you use another planning agent, add its OpenCode agent name to `planningAgents`:
93+
94+
```json
95+
{
96+
"$schema": "https://opencode.ai/config.json",
97+
"plugin": [
98+
["@plannotator/opencode@latest", {
99+
"workflow": "plan-agent",
100+
"planningAgents": ["planner", "sisyphus"]
101+
}]
102+
]
103+
}
104+
```
105+
106+
With other plugins, the same rule applies. Only the Plannotator entry becomes a tuple with options:
107+
108+
```json
109+
{
110+
"$schema": "https://opencode.ai/config.json",
111+
"plugin": [
112+
["@plannotator/opencode@latest", {
113+
"workflow": "plan-agent",
114+
"planningAgents": ["planner", "sisyphus"]
115+
}],
116+
"oh-my-opencode-slim",
117+
"openviking-opencode"
118+
]
119+
}
120+
```
121+
71122
## Approve with annotations
72123

73124
Unlike Claude Code, OpenCode supports feedback on approval. This means:

apps/opencode-plugin/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,25 @@ Default config:
5858
}
5959
```
6060
61+
If you use other OpenCode plugins, keep everything in one `plugin` array and attach Plannotator's options directly to the Plannotator entry:
62+
63+
```json
64+
{
65+
"$schema": "https://opencode.ai/config.json",
66+
"plugin": [
67+
["@plannotator/opencode@latest", {
68+
"workflow": "plan-agent",
69+
"planningAgents": ["plan", "sisyphus"]
70+
}],
71+
"@tarquinen/opencode-dcp@latest",
72+
"octto",
73+
"oh-my-opencode-slim"
74+
]
75+
}
76+
```
77+
78+
Do not put `{ "workflow": "plan-agent" }` as its own item in the `plugin` array. OpenCode plugin entries must be either a plugin string or a two-item array like `[pluginName, options]`.
79+
6180
Restore the old broad behavior:
6281

6382
```json

0 commit comments

Comments
 (0)