opencode-enhance-plan 1.5.0 → 1.6.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 CHANGED
@@ -4,46 +4,29 @@
4
4
 
5
5
  `opencode-enhance-plan` is an enhanced planning workflow plugin for OpenCode.
6
6
 
7
- It does not replace the built-in `plan` mode. Instead, it adds a stronger planning mode for feature work that needs:
8
- - persistent feature artifacts
9
- - explicit review before execution
10
- - structured todo state
11
- - feature switching and resume support
12
- - minimal build handoff
13
- - restricted write access for planning artifacts and project-level planning files
7
+ It keeps the built-in `plan` mode for lightweight analysis and adds a stronger planning workflow for feature work.
14
8
 
15
- ### Why not just use the built-in `plan` mode?
9
+ The plugin is installed globally through OpenCode, but it writes planning artifacts into each project that uses `/init-plan` and `/plan-feature`.
16
10
 
17
- The built-in `plan` mode is still useful for lightweight read-only analysis.
11
+ ### What it does
18
12
 
19
- `enhance-plan` is intended for heavier feature planning where the default planning experience is often too weak in practice.
13
+ - keeps one active feature at a time
14
+ - stores plan artifacts under `plan/active/<feature>/`
15
+ - allows restricted writes to planning files during planning
16
+ - requires explicit approval before final handoff
17
+ - restores plan state when switching features
20
18
 
21
- ### Built-in `plan` vs `enhance-plan`
19
+ ### Planning boundary
22
20
 
23
- | Area | Built-in `plan` | `enhance-plan` |
24
- | --- | --- | --- |
25
- | Primary use | quick analysis | feature planning workflow |
26
- | Todo persistence | limited | explicit, structured, feature-scoped |
27
- | Plan state model | implicit | `prepare -> ready -> approved -> building -> ...` |
28
- | Feature switching | not a core workflow | built in via `/feature-switch` |
29
- | Execution handoff | loose | focused `handoff.md` |
30
- | Plan artifacts | optional | required per feature |
31
- | Review gate | informal | explicit approval before handoff |
21
+ `enhance-plan` may update planning files only:
32
22
 
33
- ### What this repository includes
23
+ - `AGENTS.md`
24
+ - `.opencode/README.md`
25
+ - `plan/**`
34
26
 
35
- - `agents/` - custom agent definitions
36
- - `commands/` - custom slash commands
37
- - `templates/` - project templates used by `/init-plan`
38
- - `src/` - TypeScript plugin source (auto-deploys agents/commands/templates)
39
- - `docs/` - installation, usage, upgrade, and maintainer workflow notes
40
- - `scripts/` - shared repository maintenance helper for commit/release flows
41
- - `.codebuddy/skills/` - project-level CodeBuddy skill entrypoint for repository maintenance
42
- - `.opencode/skills/` - project-level OpenCode skill entrypoint for repository maintenance
43
- - `legacy/` - archived docs superseded by agent definitions
27
+ It must not modify implementation files such as source code, dependency manifests, CI config, build config, or release scripts.
44
28
 
45
-
46
- ### Install as OpenCode Plugin (recommended)
29
+ ### Install
47
30
 
48
31
  Add `opencode-enhance-plan` to your `opencode.json`:
49
32
 
@@ -53,95 +36,56 @@ Add `opencode-enhance-plan` to your `opencode.json`:
53
36
  }
54
37
  ```
55
38
 
56
- OpenCode will automatically install and load the plugin on next startup. The plugin deploys agents, commands, and templates to your OpenCode config directory (`~/.config/opencode/`).
39
+ Restart OpenCode. The plugin deploys its agents, commands, and templates to `~/.config/opencode/` and refreshes those managed runtime files by default when the packaged versions change.
57
40
 
58
- The plugin is installed globally through OpenCode, but `enhance-plan` writes planning artifacts into each project that uses `/init-plan` and `/plan-feature`.
41
+ ### Main commands
59
42
 
60
- ### Core idea
43
+ - `/init-plan` - initialize project planning files
44
+ - `/plan-feature <feature-name>` - create or resume a feature plan
45
+ - `/feature-switch` - switch the active feature context
46
+ - `/plan-handoff` - generate the build-facing handoff
61
47
 
62
- Use the built-in `plan` mode when you want lightweight investigation.
48
+ ### What it does not do
63
49
 
64
- Use `enhance-plan` when you want a full planning loop with:
65
- - one active feature at a time
66
- - persistent plan artifacts under `plan/active/<feature>/`
67
- - explicit option comparison
68
- - explicit user confirmation before build
69
- - a small execution context through `handoff.md`
70
- - project-local planning files that can be updated during planning without editing implementation code
50
+ - it does not replace build mode
51
+ - it does not implement application code while planning
52
+ - it does not run build, install, release, deploy, or migration steps from `enhance-plan`
53
+ - it does not preserve manual edits to the plugin's own managed runtime files during refresh
71
54
 
72
- ### Start here
55
+ ### Docs
73
56
 
74
57
  - Installation: [`docs/installation.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/installation.md)
75
58
  - Usage: [`docs/usage.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/usage.md)
59
+ - Upgrade guide: [`docs/upgrade-compatibility.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/upgrade-compatibility.md)
76
60
  - Maintainer release workflow: [`docs/repo-release-workflow.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/repo-release-workflow.md)
77
- - Upgrade checklist: [`docs/upgrade-compatibility.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/upgrade-compatibility.md)
78
-
79
-
80
- ### Quick path
81
-
82
- 1. Install this workflow into your OpenCode config.
83
- 2. Restart OpenCode.
84
- 3. Switch to `enhance-plan`.
85
- 4. Run `/init-plan` inside a project.
86
- 5. Run `/plan-feature <feature-name>`.
87
- 6. Review and approve the plan.
88
- 7. Run `/plan-handoff` before switching to build mode.
89
-
90
- ### Maintainer repo skill
91
-
92
- This repository also tracks a cross-tool maintainer skill named `repo-release-workflow`.
93
-
94
- - **CodeBuddy entrypoint**: `.codebuddy/skills/repo-release-workflow/`
95
- - **OpenCode entrypoint**: `.opencode/skills/repo-release-workflow/`
96
- - **Standard triggers**: `提交` and `发版`
97
- - **`提交` behavior**: `git add -A` + `git commit`
98
- - **`发版` behavior**: version bump + `npm run build` + release commit + `git tag` + `git push` + GitHub Actions npm publish and GitHub Release latest update triggered by the pushed tag
99
-
100
-
101
-
102
- Implementation details live in `docs/repo-release-workflow.md` and `scripts/release-workflow.mjs`.
103
61
 
104
62
  ## 中文
105
63
 
106
-
107
64
  `opencode-enhance-plan` 是一个构建在 OpenCode 之上的增强规划工作流插件。
108
65
 
109
- 它不是用来替代内置 `plan` 模式,而是新增一个更强的规划模式,专门处理这类 feature 任务:
110
- - 需要持久化 feature 工件
111
- - 需要执行前明确审阅
112
- - 需要结构化 todo 状态
113
- - 需要 feature 切换与恢复
114
- - 需要最小化 build handoff
66
+ 它保留内置 `plan` 处理轻量分析,并为 feature 级任务提供更强的规划工作流。
115
67
 
116
- ### 为什么不直接用内置 `plan`?
68
+ 插件通过 OpenCode 全局安装,但实际的 planning artifacts 会落到执行 `/init-plan` 与 `/plan-feature` 的项目中。
117
69
 
118
- 内置 `plan` 仍然适合做轻量级只读分析。
70
+ ### 它能做什么
119
71
 
120
- `enhance-plan` 的目标是解决更重的 feature planning 场景:默认 planning 体验在这些场景里通常不够强,尤其是在 todo 持久化、状态管理、feature 切换、handoff 收敛这几个方面。
72
+ - 同一时间只维护一个 active feature
73
+ - 将规划工件持久化到 `plan/active/<feature>/`
74
+ - 在规划阶段允许对 planning 文件做受限写入
75
+ - 最终 handoff 前必须显式批准
76
+ - 切换 feature 时可以恢复 plan state
121
77
 
122
- ### 内置 `plan` 与 `enhance-plan` 的区别
78
+ ### Planning 边界
123
79
 
124
- | 维度 | 内置 `plan` | `enhance-plan` |
125
- | --- | --- | --- |
126
- | 主要用途 | 快速分析 | feature 级 planning workflow |
127
- | todo 持久化 | 较弱 | 明确、结构化、按 feature 隔离 |
128
- | plan 状态模型 | 隐式 | `prepare -> ready -> approved -> building -> ...` |
129
- | feature 切换 | 不是核心能力 | 通过 `/feature-switch` 内建支持 |
130
- | 执行交接 | 较松散 | 使用聚焦的 `handoff.md` |
131
- | plan 工件 | 可选 | 每个 feature 都要求具备 |
132
- | 审阅门槛 | 偏口头化 | handoff 前必须显式批准 |
80
+ `enhance-plan` 只允许更新 planning 文件:
133
81
 
134
- ### 仓库包含什么
82
+ - `AGENTS.md`
83
+ - `.opencode/README.md`
84
+ - `plan/**`
135
85
 
136
- - `agents/` - 自定义 agent 定义
137
- - `commands/` - 自定义斜杠命令
138
- - `templates/` - `/init-plan` 使用的项目模板
139
- - `src/` - TypeScript 插件源码(自动部署 agents/commands/templates)
140
- - `docs/` - 安装、使用、升级兼容说明
141
- - `scripts/` - Windows(PowerShell)和 Linux/macOS(bash)安装脚本
142
- - `legacy/` - 已被 agent 定义取代的归档文档
86
+ 它不得修改源码、依赖清单、CI 配置、构建配置或发版脚本等实现相关文件。
143
87
 
144
- ### 作为 OpenCode Plugin 安装(推荐)
88
+ ### 安装
145
89
 
146
90
  在 `opencode.json` 中添加:
147
91
 
@@ -151,56 +95,31 @@ Implementation details live in `docs/repo-release-workflow.md` and `scripts/rele
151
95
  }
152
96
  ```
153
97
 
154
- OpenCode 下次启动时会自动安装并加载插件,自动将 agents、commands、templates 部署到 OpenCode 配置目录(`~/.config/opencode/`)。
98
+ 重启 OpenCode。插件会将 agents、commands、templates 部署到 `~/.config/opencode/`,并在打包内容变化时默认刷新这些受管理运行时文件。
155
99
 
156
- 插件是通过 OpenCode 全局安装的,但 `enhance-plan` 写入的 planning artifacts 会落到每个实际执行 `/init-plan` 与 `/plan-feature` 的项目中。
100
+ ### 主要命令
157
101
 
158
- ### 核心思路
102
+ - `/init-plan` - 初始化项目 planning 文件
103
+ - `/plan-feature <feature-name>` - 创建或恢复 feature 计划
104
+ - `/feature-switch` - 切换 active feature context
105
+ - `/plan-handoff` - 生成面向 build 的 handoff
159
106
 
160
- 如果你只是想做轻量调研,就继续用内置 `plan`。
107
+ ### 它不会做什么
161
108
 
162
- 如果你想要完整的 planning loop,就用 `enhance-plan`,它强调:
163
- - 同一时间只维护一个 active feature
164
- - feature 工件持久化到 `plan/active/<feature>/`
165
- - 明确的方案比较
166
- - build 前必须有显式确认
167
- - 通过 `handoff.md` 压缩执行上下文
168
- - 在规划阶段可受限写入项目级 planning 文件,但不修改实现代码
109
+ - 不会替代 build mode
110
+ - 不会在 planning 阶段实现业务代码
111
+ - 不会在 `enhance-plan` 中执行 build、install、release、deploy、migration
112
+ - 不会保留你对插件自管理运行时文件的手工修改
169
113
 
170
- ### 从这里开始读
114
+ ### 文档
171
115
 
172
116
  - 安装说明:[`docs/installation.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/installation.md)
173
117
  - 使用说明:[`docs/usage.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/usage.md)
118
+ - 升级指南:[`docs/upgrade-compatibility.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/upgrade-compatibility.md)
174
119
  - 仓库维护流程:[`docs/repo-release-workflow.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/repo-release-workflow.md)
175
- - 升级检查清单:[`docs/upgrade-compatibility.md`](https://github.com/spartawhy117/opencode-enhance-plan/blob/main/docs/upgrade-compatibility.md)
176
-
177
-
178
- ### 最短使用路径
179
-
180
- 1. 把这套 workflow 安装到你的 OpenCode 配置目录。
181
- 2. 重启 OpenCode。
182
- 3. 切换到 `enhance-plan`。
183
- 4. 在项目里运行 `/init-plan`。
184
- 5. 运行 `/plan-feature <feature-name>`。
185
- 6. 审阅并批准计划。
186
- 7. 在切到 build 前运行 `/plan-handoff`。
187
-
188
- ### 仓库维护 skill
189
-
190
- 这个仓库还额外跟踪了一套跨工具维护 skill:`repo-release-workflow`。
191
-
192
- - **CodeBuddy 入口**:`.codebuddy/skills/repo-release-workflow/`
193
- - **OpenCode 入口**:`.opencode/skills/repo-release-workflow/`
194
- - **标准触发词**:`提交` 与 `发版`
195
- - **`提交` 行为**:`git add -A` + `git commit`
196
- - **`发版` 行为**:版本号更新 + `npm run build` + release commit + `git tag` + `git push` + 由推送的 tag 触发 GitHub Actions 发布到 npm
197
-
198
-
199
- 具体执行细节记录在 `docs/repo-release-workflow.md` 与 `scripts/release-workflow.mjs`。
200
120
 
201
121
  ## Scope note / 范围说明
202
122
 
203
-
204
123
  This repository is not a fork of OpenCode. It is a public workflow layer built on top of OpenCode's documented extension points.
205
124
 
206
125
  本仓库不是 OpenCode 的源码 fork,而是建立在 OpenCode 官方扩展点之上的公开工作流层。
package/dist/deploy.d.ts CHANGED
@@ -3,7 +3,7 @@ export interface DeployOptions {
3
3
  sourceDir: string;
4
4
  /** Target OpenCode config directory. Defaults to ~/.config/opencode/ */
5
5
  targetDir: string;
6
- /** Force overwrite even if target files exist and differ */
6
+ /** Optional compatibility flag. Managed plugin assets are overwritten by default. */
7
7
  force?: boolean;
8
8
  }
9
9
  export interface DeployResult {
@@ -21,7 +21,7 @@ export interface DeployResult {
21
21
  * Behavior:
22
22
  * - If target file does not exist: copy it
23
23
  * - If target file exists and content matches: skip
24
- * - If target file exists and content differs: skip (unless force=true)
24
+ * - If target file exists and content differs: overwrite it to refresh managed plugin assets
25
25
  */
26
26
  export declare function deployAssets(options: DeployOptions): Promise<DeployResult>;
27
27
  //# sourceMappingURL=deploy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAA;IACjB,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAA;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AA+CD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAiDhF"}
1
+ {"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,SAAS,EAAE,MAAM,CAAA;IACjB,qFAAqF;IACrF,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAA;IAChB,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB;AA+CD;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CA2ChF"}
package/dist/deploy.js CHANGED
@@ -51,7 +51,7 @@ function filesMatch(pathA, pathB) {
51
51
  * Behavior:
52
52
  * - If target file does not exist: copy it
53
53
  * - If target file exists and content matches: skip
54
- * - If target file exists and content differs: skip (unless force=true)
54
+ * - If target file exists and content differs: overwrite it to refresh managed plugin assets
55
55
  */
56
56
  export async function deployAssets(options) {
57
57
  const targetRoot = options.targetDir || getDefaultConfigDir();
@@ -72,16 +72,10 @@ export async function deployAssets(options) {
72
72
  for (const relativePath of files) {
73
73
  const sourcePath = join(sourceAssetDir, relativePath);
74
74
  const targetPath = join(targetAssetDir, relativePath);
75
- if (existsSync(targetPath)) {
76
- if (filesMatch(sourcePath, targetPath)) {
77
- result.skipped++;
78
- continue;
79
- }
80
- if (!options.force) {
81
- result.skipped++;
82
- result.details.push(`[skip] ${assetDir}/${relativePath} (modified by user, use force to overwrite)`);
83
- continue;
84
- }
75
+ const targetExists = existsSync(targetPath);
76
+ if (targetExists && filesMatch(sourcePath, targetPath)) {
77
+ result.skipped++;
78
+ continue;
85
79
  }
86
80
  // Ensure parent directory exists
87
81
  const targetParent = resolve(targetPath, "..");
@@ -90,7 +84,7 @@ export async function deployAssets(options) {
90
84
  const content = readFileSync(sourcePath);
91
85
  writeFileSync(targetPath, content);
92
86
  result.deployed++;
93
- result.details.push(`[deploy] ${assetDir}/${relativePath}`);
87
+ result.details.push(`[${targetExists ? "refresh" : "deploy"}] ${assetDir}/${relativePath}`);
94
88
  }
95
89
  }
96
90
  return result;
@@ -1 +1 @@
1
- {"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SA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AAC,SAAS,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,IAAI,YAAY,EAAE,CAAC,CAAA;QAC7F,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAGjD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAgD/B,CAAA;AAGD,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAGjD;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,MA+C/B,CAAA;AAGD,eAAe,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -12,14 +12,13 @@ export const EnhancePlanPlugin = async ({ client }) => {
12
12
  const deployResult = await deployAssets({
13
13
  sourceDir: pkgRoot,
14
14
  targetDir: "", // will resolve to ~/.config/opencode/ automatically
15
- force: false,
16
15
  });
17
16
  if (deployResult.deployed > 0) {
18
17
  await client.app.log({
19
18
  body: {
20
19
  service: "opencode-enhance-plan",
21
20
  level: "info",
22
- message: `Deployed ${deployResult.deployed} asset(s) to OpenCode config`,
21
+ message: `Deployed or refreshed ${deployResult.deployed} managed asset(s) in OpenCode config`,
23
22
  extra: {
24
23
  skipped: deployResult.skipped,
25
24
  deployed: deployResult.deployed,
@@ -33,7 +32,7 @@ export const EnhancePlanPlugin = async ({ client }) => {
33
32
  body: {
34
33
  service: "opencode-enhance-plan",
35
34
  level: "info",
36
- message: `All assets up-to-date (${deployResult.skipped} skipped)`,
35
+ message: `All managed assets up-to-date (${deployResult.skipped} skipped)`,
37
36
  },
38
37
  });
39
38
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1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,OAAO,EAAE,YAAY,CAAC,OAAO;iBAC9B;aACF;SACF,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;YACnB,IAAI,EAAE;gBACJ,OAAO,EAAE,uBAAuB;gBAChC,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,kCAAkC,YAAY,CAAC,OAAO,WAAW;aAC3E;SACF,CAAC,CAAA;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;YACvB,4CAA4C;YAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAgC,CAAA;YACpD,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;gBAC3C,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC;oBACnB,IAAI,EAAE;wBACJ,OAAO,EAAE,uBAAuB;wBAChC,KAAK,EAAE,MAAM;wBACb,OAAO,EAAE,oBAAoB;wBAC7B,KAAK,EAAE,EAAE,KAAK,EAAE;qBACjB;iBACF,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC,CAAA;AAED,4CAA4C;AAC5C,eAAe,iBAAiB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-enhance-plan",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "An enhanced planning workflow plugin for OpenCode — persistent plan artifacts, explicit review gates, structured todo state, and multi-feature switching",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",