open-plan-annotator 1.8.0 → 1.8.1
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.8.
|
|
8
|
+
"version": "1.8.1"
|
|
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.8.
|
|
15
|
+
"version": "1.8.1",
|
|
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.8.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "ndom91"
|
|
7
7
|
},
|
package/hooks/hooks.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-plan-annotator",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Fully local plugin for interactive plan annotation from your Agentic assistants",
|
|
6
6
|
"author": "ndom91",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"files": [
|
|
29
29
|
"bin/open-plan-annotator.mjs",
|
|
30
30
|
"scripts/install-runtime.mjs",
|
|
31
|
+
"scripts/session-context.mjs",
|
|
31
32
|
"shared/cliHelp.mjs",
|
|
32
33
|
"shared/cliMode.mjs",
|
|
33
34
|
"shared/packageManager.mjs",
|
|
@@ -44,7 +45,6 @@
|
|
|
44
45
|
"hooks/",
|
|
45
46
|
"commands/",
|
|
46
47
|
"skills/",
|
|
47
|
-
"CLAUDE.md",
|
|
48
48
|
"README.md"
|
|
49
49
|
],
|
|
50
50
|
"scripts": {
|
|
@@ -61,19 +61,17 @@
|
|
|
61
61
|
"lint": "biome check .",
|
|
62
62
|
"lint:fix": "biome check --write .",
|
|
63
63
|
"format": "biome format --write .",
|
|
64
|
-
"do-release": "./scripts/release.sh"
|
|
65
|
-
"prepack": "bun scripts/claude-pack-docs.mjs prepack",
|
|
66
|
-
"postpack": "bun scripts/claude-pack-docs.mjs postpack"
|
|
64
|
+
"do-release": "./scripts/release.sh"
|
|
67
65
|
},
|
|
68
66
|
"devDependencies": {
|
|
69
|
-
"@biomejs/biome": "^2.4.
|
|
70
|
-
"@types/node": "^25.6.
|
|
67
|
+
"@biomejs/biome": "^2.4.15",
|
|
68
|
+
"@types/node": "^25.6.2",
|
|
71
69
|
"@types/bun": "^1.3.13",
|
|
72
|
-
"@typescript/native-preview": "^7.0.0-dev.
|
|
73
|
-
"typebox": "^1.1.
|
|
70
|
+
"@typescript/native-preview": "^7.0.0-dev.20260511.1",
|
|
71
|
+
"typebox": "^1.1.38"
|
|
74
72
|
},
|
|
75
73
|
"dependencies": {
|
|
76
|
-
"@opencode-ai/plugin": "^1.14.
|
|
74
|
+
"@opencode-ai/plugin": "^1.14.48"
|
|
77
75
|
},
|
|
78
76
|
"peerDependencies": {
|
|
79
77
|
"typebox": "*"
|
|
@@ -84,12 +82,13 @@
|
|
|
84
82
|
}
|
|
85
83
|
},
|
|
86
84
|
"optionalDependencies": {
|
|
87
|
-
"@open-plan-annotator/runtime-darwin-arm64": "1.8.
|
|
88
|
-
"@open-plan-annotator/runtime-darwin-x64": "1.8.
|
|
89
|
-
"@open-plan-annotator/runtime-linux-arm64": "1.8.
|
|
90
|
-
"@open-plan-annotator/runtime-linux-x64": "1.8.
|
|
85
|
+
"@open-plan-annotator/runtime-darwin-arm64": "1.8.1",
|
|
86
|
+
"@open-plan-annotator/runtime-darwin-x64": "1.8.1",
|
|
87
|
+
"@open-plan-annotator/runtime-linux-arm64": "1.8.1",
|
|
88
|
+
"@open-plan-annotator/runtime-linux-x64": "1.8.1"
|
|
91
89
|
},
|
|
92
90
|
"overrides": {
|
|
93
91
|
"uuid": "^14.0.0"
|
|
94
|
-
}
|
|
92
|
+
},
|
|
93
|
+
"packageManager": "bun@1.3.9"
|
|
95
94
|
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SessionStart hook: inject non-negotiable plan-routing instructions into
|
|
3
|
+
// Claude's session context. Returns a JSON `hookSpecificOutput.additionalContext`
|
|
4
|
+
// payload that Claude Code reads and injects into the session prompt.
|
|
5
|
+
//
|
|
6
|
+
// Why this is a hook and not a skill: skills are advisory and load lazily —
|
|
7
|
+
// Claude judges relevance from frontmatter and can rationalize past it,
|
|
8
|
+
// resulting in inline plans that bypass the annotator. Hook-injected context
|
|
9
|
+
// is unconditional and always present, matching the binary nature of the
|
|
10
|
+
// "always route plans through annotator" requirement.
|
|
11
|
+
|
|
12
|
+
const additionalContext = `[open-plan-annotator] This session has the open-plan-annotator plugin installed.
|
|
13
|
+
|
|
14
|
+
HARD RULE — any response that would contain ANY of the following MUST be routed through EnterPlanMode → ExitPlanMode (which fires the annotator UI):
|
|
15
|
+
• a multi-step proposal
|
|
16
|
+
• 3 or more file paths to create or modify
|
|
17
|
+
• 2 or more option/tradeoff comparisons for the user to choose between
|
|
18
|
+
• a section header like "Plan:" / "Steps:" / "Approach:" / "Implementation:" / "Concrete changes:"
|
|
19
|
+
• a numbered or bulleted list of action items the user is expected to react to
|
|
20
|
+
• a closing question like "OK to proceed?" / "sound good?" / "shall I…?"
|
|
21
|
+
|
|
22
|
+
Never paste plans inline. The annotator IS the discussion surface — tradeoffs, options, and open questions belong inside the plan body where the user can comment on each one. Mixed-signal user messages (a directive plus "what do you think?") still route through the annotator; the exploratory clause means "include alternatives in the plan", not "skip the plan".
|
|
23
|
+
|
|
24
|
+
Workflow:
|
|
25
|
+
• Assistant-initiated (you decided a plan is needed): call EnterPlanMode → draft → ExitPlanMode.
|
|
26
|
+
• User-initiated ("draft a plan", "/plan", etc.): invoke /annotate-plan <task>.
|
|
27
|
+
|
|
28
|
+
Full trigger list and self-check rules in skill plan-review-triggers.`;
|
|
29
|
+
|
|
30
|
+
process.stdout.write(
|
|
31
|
+
JSON.stringify({
|
|
32
|
+
hookSpecificOutput: {
|
|
33
|
+
hookEventName: "SessionStart",
|
|
34
|
+
additionalContext,
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
@@ -6,10 +6,10 @@ description: Required reading whenever drafting any multi-step proposal, impleme
|
|
|
6
6
|
# Plan Review Triggers
|
|
7
7
|
|
|
8
8
|
<!--
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
This skill is the long-form trigger reference for end users who have the
|
|
10
|
+
open-plan-annotator plugin installed. The terse always-on reminder lives in
|
|
11
|
+
`scripts/session-context.mjs` (injected via the `SessionStart` hook); keep
|
|
12
|
+
the two in rough sync when editing trigger rules.
|
|
13
13
|
-->
|
|
14
14
|
|
|
15
15
|
This plugin (open-plan-annotator) installs a hook on `ExitPlanMode` that opens a browser UI where the user marks up plans directly — deletions, replacements, insertions, comments — and returns structured feedback. Inline markdown plans bypass that workflow.
|
package/CLAUDE.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# open-plan-annotator: Plan Review Instructions
|
|
2
|
-
|
|
3
|
-
<!--
|
|
4
|
-
Maintainer note: this file's content is mirrored in
|
|
5
|
-
`skills/plan-review-triggers/SKILL.md` because Claude Code plugin installs do
|
|
6
|
-
not load repo-root markdown — only skills/, commands/, hooks/. Keep both files
|
|
7
|
-
in sync when editing trigger rules. Sections that diverge intentionally
|
|
8
|
-
(audience, framing) are still close enough that a side-by-side diff catches
|
|
9
|
-
drift quickly.
|
|
10
|
-
-->
|
|
11
|
-
|
|
12
|
-
## Why This Plugin Exists
|
|
13
|
-
|
|
14
|
-
Markdown plans rendered in chat are read-only for the user. To give feedback they have to retype sections inline, which is awkward in a terminal. open-plan-annotator opens a browser UI where the user can mark up your plan directly — delete lines, replace text, insert steps, leave comments. Their annotations come back to you as structured feedback.
|
|
15
|
-
|
|
16
|
-
**This is the user's required review surface for any multi-section proposal.** Inline plans bypass the tool the user installed and silently lose their preferred feedback workflow.
|
|
17
|
-
|
|
18
|
-
This is distinct from `plannotator-review` (post-implementation code review). open-plan-annotator runs *before* code is written.
|
|
19
|
-
|
|
20
|
-
## Hard Rule: Annotator Required When Triggers Match
|
|
21
|
-
|
|
22
|
-
When any trigger below fires, you MUST route through the annotator. "Prefer" / "consider" do not apply. Inline plans are a bug.
|
|
23
|
-
|
|
24
|
-
- Assistant-initiated (you decided a plan is needed): call `EnterPlanMode`, draft, then `ExitPlanMode` — this fires the annotator hook.
|
|
25
|
-
- User-initiated ("draft a plan", "/plan", etc.): invoke the `/annotate-plan <task>` slash command. It runs the same plan-mode flow.
|
|
26
|
-
|
|
27
|
-
## Trigger: Mechanical Heuristic
|
|
28
|
-
|
|
29
|
-
Annotator REQUIRED when the response would contain ANY of:
|
|
30
|
-
|
|
31
|
-
- 3 or more file paths to be created or modified
|
|
32
|
-
- 2 or more option/tradeoff comparisons the user is asked to choose between
|
|
33
|
-
- A `Plan:`, `Steps:`, `Concrete changes:`, `Implementation:`, `Approach:`, or similar section header
|
|
34
|
-
- A numbered or bulleted list of action items the user is expected to react to
|
|
35
|
-
- A multi-section proposal with decision points
|
|
36
|
-
|
|
37
|
-
This is a hard gate. Count file paths. Count options. If the count crosses the line, you do not get to write the inline response.
|
|
38
|
-
|
|
39
|
-
## Trigger: Task Shape
|
|
40
|
-
|
|
41
|
-
Enter plan mode (or invoke the slash command) before any of:
|
|
42
|
-
|
|
43
|
-
- Creating or modifying more than 2 files
|
|
44
|
-
- Architectural or structural changes
|
|
45
|
-
- Refactoring, migration, or feature additions
|
|
46
|
-
- Bug fixes that require investigation
|
|
47
|
-
- Anything the user has not explicitly described step-by-step
|
|
48
|
-
|
|
49
|
-
## Trigger: Phrase Match
|
|
50
|
-
|
|
51
|
-
Treat these as plan triggers regardless of length:
|
|
52
|
-
|
|
53
|
-
- User says "draft a plan", "let's plan X", "what's the approach", "give me options", "how should we tackle this", "what would it look like"
|
|
54
|
-
- Your response would contain "recommended approach", "implementation plan", "proposed fix", "rollout plan", "here's what I'd do", or "concrete file changes"
|
|
55
|
-
- Any moment you would otherwise ask "want me to proceed?" / "shall I draft this?" / "OK to proceed?" / "sound good?"
|
|
56
|
-
|
|
57
|
-
## Mixed Signals: Still Trigger
|
|
58
|
-
|
|
59
|
-
When a user message combines directives ("let's add X", "can we Y") with an exploratory question ("what do you think?"), the annotator still applies. Do NOT collapse into a 2-3 sentence inline response just because one clause was exploratory.
|
|
60
|
-
|
|
61
|
-
The annotator IS the discussion surface. Tradeoffs, options, and open questions belong inside the plan body where the user can comment on each one — not in flat chat where they would have to retype your bullets to push back. Treat exploratory clauses as "include alternatives in the plan", not "skip the plan".
|
|
62
|
-
|
|
63
|
-
## Self-Check Before Sending
|
|
64
|
-
|
|
65
|
-
Before emitting any response, scan it for these strings:
|
|
66
|
-
|
|
67
|
-
- "Concrete file changes", "Concrete changes", "Plan:", "Steps:", "Implementation:", "Approach:"
|
|
68
|
-
- "OK to proceed?", "Want me to proceed?", "Shall I…?", "Sound good?", "Confirm…?"
|
|
69
|
-
- 3+ lines that look like file paths (`foo/bar.tsx`, `path/to/file.ts`)
|
|
70
|
-
- Numbered list of more than 2 items each describing a code change
|
|
71
|
-
- "**N.**" / "**Fix N —**" headers introducing proposed changes
|
|
72
|
-
|
|
73
|
-
If ANY match: stop, discard the inline response, route through the annotator instead.
|
|
74
|
-
|
|
75
|
-
## Do NOT Trigger For
|
|
76
|
-
|
|
77
|
-
- Single-line fixes, typos, renames
|
|
78
|
-
- Direct factual answers
|
|
79
|
-
- Status updates or progress reports
|
|
80
|
-
- Plans the user has already approved (do not re-prompt)
|
|
81
|
-
- Pure research or exploration with no proposed actions
|
|
82
|
-
- Trivial questions where a plan would be overhead
|
|
83
|
-
- Replies to the user's questions ABOUT an already-submitted plan (answer the question, do not re-submit)
|
|
84
|
-
|
|
85
|
-
## Plan Quality Standards
|
|
86
|
-
|
|
87
|
-
When writing a plan, include:
|
|
88
|
-
|
|
89
|
-
- Brief summary of what you understood the task to require
|
|
90
|
-
- Specific files you intend to create or modify and why
|
|
91
|
-
- Any assumptions you are making
|
|
92
|
-
- Explicit question if anything is ambiguous
|
|
93
|
-
- Tradeoffs / option comparisons inline in the plan (since mixed-signal user messages route here)
|
|
94
|
-
|
|
95
|
-
## Workflow
|
|
96
|
-
|
|
97
|
-
**Assistant-initiated (you decided a plan is needed):**
|
|
98
|
-
draft mentally → call `EnterPlanMode` → draft plan → call `ExitPlanMode` → annotator opens → user annotates → revise based on feedback → re-exit when aligned.
|
|
99
|
-
|
|
100
|
-
**User-initiated (user asked for a plan):**
|
|
101
|
-
invoke `/annotate-plan <task>`. The command enters plan mode, drafts a plan, and exits to fire the annotator. Do not paste a multi-section plan inline and ask "sound good?" — that bypasses the annotator.
|
|
102
|
-
|
|
103
|
-
## Slash Command
|
|
104
|
-
|
|
105
|
-
`/annotate-plan <task>` is the canonical user-invoked entry point. When the user invokes it, follow the command body exactly. When you (the assistant) decide a plan is needed without the user invoking the command, prefer `EnterPlanMode` directly — the slash command is for user invocation, the tool is for assistant initiation. Both paths fire the same annotator hook.
|