2025-12-30 21:25:46 -08:00
# @plannotator/opencode
**Annotate plans. Not in the terminal. **
Interactive Plan Review for OpenCode. Select the exact parts of the plan you want to change—mark for deletion, add a comment, or suggest a replacement. Feedback flows back to your agent automatically.
2026-01-02 11:08:19 -08:00
Obsidian users can auto-save approved plans to Obsidian as well. [See details ](#obsidian-integration )
2025-12-30 21:25:46 -08:00
<table>
<tr>
<td align="center">
<strong>Watch Demo</strong><br><br>
<a href="https://youtu.be/_N7uo0EFI-U">
<img src="https://img.youtube.com/vi/_N7uo0EFI-U/maxresdefault.jpg" alt="Watch Demo" width="600" />
</a>
</td>
</tr>
</table>
## Install
Add to your `opencode.json` :
``` json
{
"$schema" : "https://opencode.ai/config.json" ,
2026-01-03 13:16:02 -08:00
"plugin" : [ "@plannotator/opencode@latest" ]
2025-12-30 21:25:46 -08:00
}
```
2026-04-23 07:46:50 -07:00
Restart OpenCode. By default, the `submit_plan` tool is available to OpenCode's `plan` agent, not to `build` or other primary agents.
2025-12-30 21:25:46 -08:00
2026-03-18 05:32:40 -07:00
> **Slash commands:** Run the install script to get `/plannotator-review`, `/plannotator-annotate`, and `/plannotator-last`:
2026-01-03 13:34:17 -08:00
> ```bash
2026-01-13 04:45:51 -08:00
> curl -fsSL https://plannotator.ai/install.sh | bash
2026-01-03 13:34:17 -08:00
> ```
2026-01-13 04:45:51 -08:00
> This also clears any cached plugin versions.
2026-01-03 13:16:02 -08:00
2026-04-23 07:46:50 -07:00
## Workflow Modes
Plannotator supports three OpenCode workflows:
- **`plan-agent` ** (default): `submit_plan` is available to OpenCode's built-in `plan` agent plus any extra agents listed in `planningAgents` . This keeps Plannotator integrated with OpenCode plan mode without nudging `build` to call it.
- **`manual` **: `submit_plan` is not registered. Use `/plannotator-last` , `/plannotator-annotate` , `/plannotator-review` , and `/plannotator-archive` when you want Plannotator.
- **`all-agents` **: legacy broad behavior. Primary agents can see and call `submit_plan` .
Default config:
``` json
{
"$schema" : "https://opencode.ai/config.json" ,
"plugin" : [
[ "@plannotator/opencode@latest" , {
"workflow" : "plan-agent" ,
"planningAgents" : [ "plan" ]
} ]
]
}
```
2026-04-27 10:33:49 -07:00
If you use other OpenCode plugins, keep everything in one `plugin` array and attach Plannotator's options directly to the Plannotator entry:
``` json
{
"$schema" : "https://opencode.ai/config.json" ,
"plugin" : [
[ "@plannotator/opencode@latest" , {
"workflow" : "plan-agent" ,
"planningAgents" : [ "plan" , "sisyphus" ]
} ] ,
"@tarquinen/opencode-dcp@latest" ,
"octto" ,
"oh-my-opencode-slim"
]
}
```
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]` .
2026-04-23 07:46:50 -07:00
Restore the old broad behavior:
``` json
{
"$schema" : "https://opencode.ai/config.json" ,
"plugin" : [
[ "@plannotator/opencode@latest" , {
"workflow" : "all-agents"
} ]
]
}
```
Use commands only:
``` json
{
"$schema" : "https://opencode.ai/config.json" ,
"plugin" : [
[ "@plannotator/opencode@latest" , {
"workflow" : "manual"
} ]
]
}
```
2025-12-30 21:25:46 -08:00
## How It Works
2026-04-23 07:46:50 -07:00
1. The configured planning agent calls `submit_plan` → Plannotator opens in your browser
2025-12-30 21:25:46 -08:00
2. Select text → annotate (delete, replace, comment)
3. **Approve ** → Agent proceeds with implementation
4. **Request changes ** → Annotations sent back as structured feedback
## Features
- **Visual annotations**: Select text, choose an action, see feedback in the sidebar
- **Runs locally**: No network requests. Plans never leave your machine.
- **Private sharing**: Plans and annotations compress into the URL itself—share a link, no accounts or backend required
2026-02-23 00:24:25 -08:00
- **Plan Diff**: See what changed when the agent revises a plan after feedback
2026-03-18 05:32:40 -07:00
- **Annotate last message**: Run `/plannotator-last` to annotate the agent's most recent response
2026-04-23 07:46:50 -07:00
- **Annotate files, folders, and URLs**: Run `/plannotator-annotate` when you want manual review of an artifact
2026-01-02 11:08:19 -08:00
- **Obsidian integration**: Auto-save approved plans to your vault with frontmatter and tags
2026-01-09 10:18:54 -08:00
## Environment Variables
| Variable | Description |
|----------|-------------|
2026-04-05 05:17:16 +09:00
| `PLANNOTATOR_REMOTE` | Set to `1` / `true` for remote mode, `0` / `false` for local mode, or leave unset for SSH auto-detection. Uses a fixed port in remote mode; browser-opening behavior depends on the environment. |
2026-01-09 10:18:54 -08:00
| `PLANNOTATOR_PORT` | Fixed port to use. Default: random locally, `19432` for remote sessions. |
| `PLANNOTATOR_BROWSER` | Custom browser to open plans in. macOS: app name or path. Linux/Windows: executable path. |
2026-02-12 15:07:43 -08:00
| `PLANNOTATOR_SHARE_URL` | Custom share portal URL for self-hosting. Default: `https://share.plannotator.ai` . |
2026-04-17 22:21:49 -07:00
| `PLANNOTATOR_PASTE_URL` | Custom paste service URL for self-hosting. Default: `https://plannotator-paste.plannotator.workers.dev` . |
2026-03-04 15:16:14 -08:00
| `PLANNOTATOR_PLAN_TIMEOUT_SECONDS` | Timeout for `submit_plan` review wait. Default: `345600` (96h). Set `0` to disable timeout. |
2026-01-09 10:18:54 -08:00
2026-01-06 14:25:19 -08:00
## Devcontainer / Docker
2026-01-09 10:18:54 -08:00
Works in containerized environments. Set the env vars and forward the port:
2026-01-06 14:25:19 -08:00
``` json
{
"containerEnv" : {
"PLANNOTATOR_REMOTE" : "1" ,
"PLANNOTATOR_PORT" : "9999"
} ,
"forwardPorts" : [ 9999 ]
}
```
2026-04-05 05:17:16 +09:00
If nothing opens automatically, open `http://localhost:9999` when `submit_plan` is called.
2026-01-06 14:25:19 -08:00
See [devcontainer.md ](./devcontainer.md ) for full setup details.
2026-01-02 11:08:19 -08:00
## Obsidian Integration
Save approved plans directly to your Obsidian vault.
1. Open Settings in Plannotator UI
2. Enable "Obsidian Integration" and select your vault
3. Approved plans save automatically with:
- Human-readable filenames: `Title - Jan 2, 2026 2-30pm.md`
- YAML frontmatter (`created` , `source` , `tags` )
- Auto-extracted tags from plan title and code languages
- Backlink to `[[Plannotator Plans]]` for graph view
<img width="1190" height="730" alt="image" src="https://github.com/user-attachments/assets/5036a3ea-e5e8-426c-882d-0a1d991c1625" />
2025-12-30 21:25:46 -08:00
## Links
- [Website ](https://plannotator.ai )
- [GitHub ](https://github.com/backnotprop/plannotator )
- [Claude Code Plugin ](https://github.com/backnotprop/plannotator/tree/main/apps/hook )
## License
2026-02-12 09:55:14 -08:00
Copyright 2025 backnotprop Licensed under [MIT ](../../LICENSE-MIT ) or [Apache-2.0 ](../../LICENSE-APACHE ).