open-plan-annotator 1.5.2 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,14 +5,14 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Interactive plan annotation plugin for Claude Code",
8
- "version": "1.5.2"
8
+ "version": "1.5.4"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "open-plan-annotator",
13
13
  "source": "./",
14
14
  "description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
15
- "version": "1.5.2",
15
+ "version": "1.5.4",
16
16
  "author": {
17
17
  "name": "ndom91"
18
18
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "open-plan-annotator",
3
3
  "description": "Interactive plan annotation UI: review, strikethrough, and comment on Claude's plans before approving. Fully local, no external services.",
4
- "version": "1.5.2",
4
+ "version": "1.5.4",
5
5
  "author": {
6
6
  "name": "ndom91"
7
7
  },
package/README.md CHANGED
@@ -23,25 +23,28 @@ Everything runs locally. Nothing leaves your machine.
23
23
 
24
24
  ## Install
25
25
 
26
- > [!NOTE]
27
- > `open-plan-annotator` now ships as one package-managed install. The npm package
28
- > contains the plugin glue and resolves a platform runtime package locally. There
29
- > is no first-run binary download and no in-app self-update path.
26
+ `open-plan-annotator` is package-managed: the plugin package installs the local platform runtime it needs. There is no first-run binary download and no in-app updater.
30
27
 
31
28
  ### Claude Code
32
29
 
33
- From within Claude Code, add the marketplace and install the plugin:
30
+ Install from inside Claude Code:
34
31
 
35
32
  ```
36
33
  /plugin marketplace add ndom91/open-plan-annotator
37
34
  /plugin install open-plan-annotator@ndom91-open-plan-annotator
38
35
  ```
39
36
 
40
- This installs the npm-backed plugin and registers the `ExitPlanMode` hook that launches the annotation UI. In Claude Code, third-party marketplaces have auto-update disabled by default, so also enable auto-update for the `ndom91-open-plan-annotator` marketplace in the Marketplace UI.
37
+ What you get:
38
+
39
+ - `ExitPlanMode` hook: opens the annotation UI whenever Claude submits a plan
40
+ - `/open-plan-annotator [task description]`: asks Claude to draft a plan and send it to the UI
41
+ - `open-plan-annotator`: runtime command invoked by the hook
42
+
43
+ Third-party marketplace auto-update is disabled by default in Claude Code. Enable auto-update for the `ndom91-open-plan-annotator` marketplace in the Marketplace UI if you want updates automatically.
41
44
 
42
45
  ### OpenCode
43
46
 
44
- Add `open-plan-annotator` to the `plugin` array in your OpenCode config (`opencode.json` or `.opencode/config.json`):
47
+ Add the plugin to your OpenCode config (`opencode.json` or `.opencode/config.json`):
45
48
 
46
49
  ```json
47
50
  {
@@ -49,95 +52,56 @@ Add `open-plan-annotator` to the `plugin` array in your OpenCode config (`openco
49
52
  }
50
53
  ```
51
54
 
52
- OpenCode will install the package and load it automatically. The plugin:
53
- - Injects plan-mode instructions into the agent's system prompt
54
- - Registers a `submit_plan` tool that the agent calls after creating a plan
55
- - Spawns the annotation UI in your browser for review
56
- - Returns structured feedback to the agent on approval or rejection
57
- - Optionally hands off to an implementation agent after approval
55
+ What you get:
58
56
 
59
- To update, refresh the plugin through OpenCode and restart the app so it reloads the latest package-managed runtime.
57
+ - `submit_plan`: tool the agent calls after drafting a markdown plan
58
+ - `open-plan-annotator`: runtime command spawned by the plugin
59
+ - optional implementation-agent handoff after approval
60
60
 
61
- > [!NOTE]
62
- > The update mechanism changed significantly in `1.0.20+`: OpenCode now loads the npm package plus a platform runtime package instead of using the old in-place binary updater. If OpenCode appears to be stuck on an older plugin build, clear the cached `open-plan-annotator` entries under `~/.cache/opencode/node_modules/` and restart OpenCode.
61
+ Restart OpenCode after installing or updating so it reloads the package-managed runtime.
63
62
 
64
63
  ### Pi
65
64
 
66
- Install the dedicated Pi package:
65
+ Install the Pi extension:
67
66
 
68
67
  ```sh
69
68
  pi install npm:@open-plan-annotator/pi-extension
70
69
  ```
71
70
 
72
- The extension package registers:
73
-
74
- - a `submit_plan` tool, exposed to the model with prompt guidance to call it after drafting a concrete markdown plan and before implementation
75
- - an `/annotate-plan` command for manual review of the latest assistant message or supplied plan text
71
+ What you get:
76
72
 
77
- Typical flow:
73
+ - `submit_plan`: tool the agent calls after drafting a markdown plan
74
+ - `/annotate-plan [plan markdown]`: command for manually reviewing supplied text or the latest assistant message
75
+ - `open-plan-annotator`: runtime command used by the extension
78
76
 
79
- 1. Ask Pi to make a plan before coding.
80
- 2. Pi drafts the plan and calls `submit_plan`.
81
- 3. The browser review UI opens locally.
82
- 4. Approval returns “Plan approved. Continue with implementation.”; requested changes return the serialized annotations as feedback.
83
-
84
- You can also trigger review manually:
77
+ Manual review examples:
85
78
 
86
79
  ```sh
87
80
  /annotate-plan
88
81
  /annotate-plan # Plan\n\n1. Do the thing
89
82
  ```
90
83
 
91
- #### Implementation Handoff
92
-
93
- By default, after a plan is approved the plugin sends "Proceed with implementation." to a `build` agent. To customize or disable this, create `open-plan-annotator.json` in your project's `.opencode/` directory or globally in `~/.config/opencode/`:
94
-
95
- ```json
96
- {
97
- "implementationHandoff": {
98
- "enabled": true,
99
- "agent": "build"
100
- }
101
- }
102
- ```
103
-
104
- Set `enabled` to `false` to disable auto-handoff. Project config overrides global config.
105
-
106
- ### Manual Install
84
+ ### Manual / CLI
107
85
 
108
- If you want to run the CLI standalone or install the package globally:
86
+ Install globally if you want to run the CLI directly:
109
87
 
110
88
  ```sh
111
- pnpm add -g open-plan-annotator
89
+ bun add -g open-plan-annotator
112
90
  npm install -g open-plan-annotator
113
91
  ```
114
92
 
115
- #### From Source
93
+ This adds the `open-plan-annotator` command. To verify the resolved runtime:
116
94
 
117
95
  ```sh
118
- git clone https://github.com/ndom91/open-plan-annotator.git
119
- cd open-plan-annotator
120
- bun install
121
- bun run build
122
- ```
123
-
124
- Then load it directly in Claude Code:
125
-
126
- ```sh
127
- claude --plugin-dir ./open-plan-annotator
96
+ open-plan-annotator doctor
128
97
  ```
129
98
 
130
99
  ## Updates
131
100
 
132
- - OpenCode: update the installed npm plugin through OpenCode, then restart OpenCode.
133
101
  - Claude Code: update the marketplace/plugin install, then restart Claude Code.
134
- - Standalone/global install: update the npm package (`npm`, `pnpm`, or `bun`), then rerun `open-plan-annotator`.
135
-
136
- The built-in `doctor` command reports the resolved runtime package and runtime path:
137
-
138
- ```sh
139
- open-plan-annotator doctor
140
- ```
102
+ - OpenCode: update the installed npm plugin through OpenCode, then restart OpenCode.
103
+ - Pi: update the Pi extension, then restart Pi.
104
+ - Manual/global install: update the npm package, then rerun `open-plan-annotator`.
141
105
 
142
106
  ## Keyboard Shortcuts
143
107
 
@@ -145,7 +109,7 @@ open-plan-annotator doctor
145
109
  |--------|----------|-------------|
146
110
  | Delete | `d` | Strikethrough selected text |
147
111
  | Replace | `r` | Replace selected text with new content |
148
- | Insert | `i` | Insert text after the selection |
112
+ | Insert | `s` | Insert text after the selection |
149
113
  | Comment | `c` | Attach a comment to selected text |
150
114
  | Approve | `Cmd+Enter` | Approve the plan and proceed |
151
115
  | Request Changes | `Cmd+Shift+Enter` | Send annotations back to the agent |
package/opencode/index.js CHANGED
@@ -2,7 +2,35 @@ import { tool } from "@opencode-ai/plugin";
2
2
  import { runPlanReview } from "./bridge.js";
3
3
  import { resolveImplementationHandoff } from "./config.js";
4
4
 
5
- const PLAN_REVIEW_INSTRUCTIONS = `## Plan Review Workflow
5
+ const PLAN_REVIEW_INSTRUCTIONS = `## Plan Review Tool
6
+
7
+ The "open-plan-annotator plan annotation tool" refers to the \`submit_plan\` tool.
8
+
9
+ When the user asks for a plan, proposal, implementation strategy, migration path, rollout plan, or asks "what would it look like," you MUST use the \`submit_plan\` tool instead of replying with a normal Markdown plan.
10
+
11
+ Use \`submit_plan\` when:
12
+ - The user explicitly says "make a plan", "write a plan", "give me a plan", "proposal", or "implementation plan".
13
+ - The user asks to evaluate an approach before code changes.
14
+ - The response contains ordered implementation steps.
15
+ - The plan would benefit from user approval before execution.
16
+
17
+ Do not use \`submit_plan\` for:
18
+ - Tiny one-step tasks.
19
+ - Pure explanations with no proposed action.
20
+ - Final summaries after work is complete.
21
+
22
+ If there is any ambiguity about whether a response is a plan, prefer using \`submit_plan\`.
23
+
24
+ The \`submit_plan\` call should include:
25
+ - \`summary\`: one sentence describing the plan.
26
+ - \`plan\`: the full Markdown plan.
27
+
28
+ After calling \`submit_plan\`, follow the returned instruction exactly:
29
+ - If approved, proceed.
30
+ - If revisions are requested, revise the plan and call \`submit_plan\` again.
31
+ - If the user asks questions, answer them before proceeding.
32
+
33
+ ## Plan Review Workflow
6
34
 
7
35
  Track planning/execution using this state enum:
8
36
  - \`DISCOVERY\`, \`PLAN_DRAFT\`, \`AWAITING_PLAN_DECISION\`, \`EXECUTION\`, \`DONE\`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-plan-annotator",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "type": "module",
5
5
  "description": "Fully local plugin for interactive plan annotation from your Agentic assistants",
6
6
  "author": "ndom91",
@@ -82,10 +82,10 @@
82
82
  }
83
83
  },
84
84
  "optionalDependencies": {
85
- "@open-plan-annotator/runtime-darwin-arm64": "1.5.2",
86
- "@open-plan-annotator/runtime-darwin-x64": "1.5.2",
87
- "@open-plan-annotator/runtime-linux-arm64": "1.5.2",
88
- "@open-plan-annotator/runtime-linux-x64": "1.5.2"
85
+ "@open-plan-annotator/runtime-darwin-arm64": "1.5.4",
86
+ "@open-plan-annotator/runtime-darwin-x64": "1.5.4",
87
+ "@open-plan-annotator/runtime-linux-arm64": "1.5.4",
88
+ "@open-plan-annotator/runtime-linux-x64": "1.5.4"
89
89
  },
90
90
  "overrides": {
91
91
  "uuid": "^14.0.0"