opencode-plan-manager 0.2.1 → 0.3.0
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.
- package/README.md +86 -32
- package/dist/index.js +96 -94
- package/package.json +57 -39
package/README.md
CHANGED
|
@@ -11,6 +11,44 @@ OpenCode Plan Manager is a high-performance, minimalist plugin designed to bridg
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
+
<details>
|
|
15
|
+
<summary><strong>⚠️ v0.3.0 Breaking Changes – Read Before Upgrading!</strong></summary>
|
|
16
|
+
|
|
17
|
+
#### **This release introduces breaking changes that affect file structure, field names, and plan format.**
|
|
18
|
+
|
|
19
|
+
If you are upgrading from v0.2.x, you MUST migrate all existing plans and metadata for compatibility.
|
|
20
|
+
|
|
21
|
+
> Tip: AI Agents can still access old plans by reading their files directly (using Bash/list/read tools), then recreate plans in the new format using the latest plugin's API.
|
|
22
|
+
|
|
23
|
+
**What Changed?**
|
|
24
|
+
|
|
25
|
+
- **File naming:**
|
|
26
|
+
- `spec.md` → `specifications.md`
|
|
27
|
+
- `plan.md` → `implementation.md`
|
|
28
|
+
- **Metadata key:**
|
|
29
|
+
- `"plan_id"` → `"id"` in `metadata.json`
|
|
30
|
+
- **Markdown structure:**
|
|
31
|
+
- All `.md` files now require H1 headers:
|
|
32
|
+
- `# Specifications` at the top of `specifications.md`
|
|
33
|
+
- `# Implementation Plan` at the top of `implementation.md`
|
|
34
|
+
- Phases are now indicated using H2 (`##`) headers, not H3.
|
|
35
|
+
- No more `## Overview/Description` headers—put the summary right after the H1.
|
|
36
|
+
- **Tool arguments:**
|
|
37
|
+
- All APIs expect updated argument keys (e.g., `id` instead of `plan_id`)
|
|
38
|
+
|
|
39
|
+
**How to Migrate?**
|
|
40
|
+
|
|
41
|
+
1. Rename all `spec.md` to `specifications.md` & `plan.md` to `implementation.md` in each plan folder.
|
|
42
|
+
2. Open each `metadata.json` file and rename `plan_id` → `id`.
|
|
43
|
+
3. Update the content of each markdown file to add the correct H1 headers and phase header levels as described above.
|
|
44
|
+
4. Validate your plans by running `plan_list` and `plan_read`.
|
|
45
|
+
|
|
46
|
+
**Older plans will not load or load with errors until they are migrated to the new format.**
|
|
47
|
+
|
|
48
|
+
</details>
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
14
52
|
## 🧠 Why Plan Manager?
|
|
15
53
|
|
|
16
54
|
In agentic workflows, **Implementation Plans** are the source of truth. However, most implementations suffer from "Token Soup"—where agents are forced to parse massive, unstructured files, leading to hallucinations and lost context.
|
|
@@ -30,8 +68,8 @@ Add the plugin to your OpenCode configuration file (~/.config/opencode/opencode.
|
|
|
30
68
|
|
|
31
69
|
```json
|
|
32
70
|
{
|
|
33
|
-
|
|
34
|
-
|
|
71
|
+
"$schema": "https://opencode.ai/config.json",
|
|
72
|
+
"plugin": ["opencode-plan-manager@0.2.0"]
|
|
35
73
|
}
|
|
36
74
|
```
|
|
37
75
|
|
|
@@ -39,6 +77,22 @@ Add the plugin to your OpenCode configuration file (~/.config/opencode/opencode.
|
|
|
39
77
|
|
|
40
78
|
---
|
|
41
79
|
|
|
80
|
+
## ⚙️ Configuration
|
|
81
|
+
|
|
82
|
+
Configuration files are loaded with the following precedence (highest to lowest):
|
|
83
|
+
|
|
84
|
+
1. **Local Config:** `<project-root>/.opencode/plan-manager.json` (project-specific settings)
|
|
85
|
+
2. **User Config:** `~/.config/opencode/plan-manager.json` (global user settings)
|
|
86
|
+
3. **Default Config:** Built-in defaults (used when no config files exist)
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"outputFormat": "markdown" // "markdown" (default), "json" or "toon" (see https://github.com/toon-format/toon)
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
42
96
|
## 🤖 The Agentic Workflow
|
|
43
97
|
|
|
44
98
|
This plugin is optimized for a dual-agent hierarchy, utilizing specialized prompts found in `src/prompts/`:
|
|
@@ -76,8 +130,8 @@ Plan Manager organizes work into a structured directory tree that both humans an
|
|
|
76
130
|
├── pending/ # New ideas and upcoming features
|
|
77
131
|
│ └── feature_auth/ # Each plan is a dedicated folder
|
|
78
132
|
│ ├── metadata.json
|
|
79
|
-
│ ├──
|
|
80
|
-
│ └──
|
|
133
|
+
│ ├── specifications.md
|
|
134
|
+
│ └── implementation.md
|
|
81
135
|
├── in_progress/ # Currently active development
|
|
82
136
|
└── done/ # Immutable history of completed work
|
|
83
137
|
```
|
|
@@ -92,25 +146,25 @@ Instead of loose markdown, agents use structured objects to ensure every plan ha
|
|
|
92
146
|
|
|
93
147
|
```typescript
|
|
94
148
|
plan_create({
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
149
|
+
title: "JWT Authentication",
|
|
150
|
+
type: "feature",
|
|
151
|
+
description: "Secure auth flow with refresh tokens",
|
|
152
|
+
spec: {
|
|
153
|
+
overview: "Implement secure JWT-based authentication",
|
|
154
|
+
functionals: ["User login", "Token refresh"],
|
|
155
|
+
nonFunctionals: ["Passwords hashed with bcrypt"],
|
|
156
|
+
acceptanceCriterias: ["Successful login returns valid JWT"],
|
|
157
|
+
outOfScope: ["Social OAuth"],
|
|
158
|
+
},
|
|
159
|
+
implementation: {
|
|
160
|
+
description: "Phased rollout",
|
|
161
|
+
phases: [
|
|
162
|
+
{
|
|
163
|
+
phase: "Phase 1: Database",
|
|
164
|
+
tasks: ["Create users table", "Create sessions table"],
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
},
|
|
114
168
|
});
|
|
115
169
|
```
|
|
116
170
|
|
|
@@ -120,13 +174,13 @@ Agents can request only the information they need, significantly reducing token
|
|
|
120
174
|
|
|
121
175
|
```typescript
|
|
122
176
|
// Summary View: Just the metadata and progress stats
|
|
123
|
-
plan_read({
|
|
177
|
+
plan_read({ id: "feature_auth", view: "summary" });
|
|
124
178
|
|
|
125
179
|
// Spec View: Just the requirements (useful for the Planner)
|
|
126
|
-
plan_read({
|
|
180
|
+
plan_read({ id: "feature_auth", view: "spec" });
|
|
127
181
|
|
|
128
182
|
// Plan View: Just the task list (useful for the Builder)
|
|
129
|
-
plan_read({
|
|
183
|
+
plan_read({ id: "feature_auth", view: "plan" });
|
|
130
184
|
```
|
|
131
185
|
|
|
132
186
|
### 3. Batch Task Updates (`plan_update`)
|
|
@@ -135,12 +189,12 @@ Update multiple tasks or move a plan through the lifecycle with validation.
|
|
|
135
189
|
|
|
136
190
|
```typescript
|
|
137
191
|
plan_update({
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
192
|
+
id: "feature_auth",
|
|
193
|
+
status: "in_progress",
|
|
194
|
+
taskUpdates: [
|
|
195
|
+
{ content: "Create users table", status: "done" },
|
|
196
|
+
{ content: "Create sessions table", status: "in_progress" },
|
|
197
|
+
],
|
|
144
198
|
});
|
|
145
199
|
```
|
|
146
200
|
|