wishos-plan-book 0.0.0-stage → 0.2.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.
- package/LICENSE +230 -0
- package/README.md +164 -2
- package/SPLIT.md +101 -0
- package/cordis.patch.yml +11 -0
- package/icon.svg +8 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +50 -4
- package/plugin.js +605 -0
- package/schemas/plan-book.schema.json +23 -0
- package/skills/plan-book/SKILL.md +87 -0
- package/skills/plan-book/references/doc-plan-protocol.md +393 -0
- package/skills/plan-book/references/four-elements.md +39 -0
- package/skills.manifest.json +14 -0
- package/tools/dev/gate.mjs +425 -0
- package/tools/dev/verify-install.mjs +97 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of
|
|
21
|
+
the outstanding shares, or (iii) beneficial ownership of such
|
|
22
|
+
entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or
|
|
42
|
+
Object form, that is based on (or derived from) the Work and
|
|
43
|
+
for which the editorial revisions, annotations, elaborations,
|
|
44
|
+
or other modifications represent, as a whole, an original work of
|
|
45
|
+
authorship. For the purposes of this License, Derivative Works
|
|
46
|
+
shall not include works that remain separable from, or merely
|
|
47
|
+
link (or bind by name) to the interfaces of, the Work and
|
|
48
|
+
Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or
|
|
52
|
+
additions to that Work or Derivative Works thereof, that is
|
|
53
|
+
intentionally submitted to Licensor for inclusion in the Work
|
|
54
|
+
by the copyright owner or by an individual or Legal Entity
|
|
55
|
+
authorized to submit on behalf of the copyright owner. For the
|
|
56
|
+
purposes of this definition, "submitted" means any form of
|
|
57
|
+
electronic, verbal, or written communication sent to the Licensor
|
|
58
|
+
or its representatives, including but not limited to communication
|
|
59
|
+
on electronic mailing lists, source code control systems, and
|
|
60
|
+
issue tracking systems that are managed by, or on behalf of, the
|
|
61
|
+
Licensor for the purpose of discussing and improving the Work,
|
|
62
|
+
but excluding communication that is conspicuously marked or
|
|
63
|
+
otherwise designated in writing by the copyright owner as "Not a
|
|
64
|
+
Contribution."
|
|
65
|
+
|
|
66
|
+
"Contributor" shall mean Licensor and any individual or Legal
|
|
67
|
+
Entity on behalf of whom a Contribution has been received by
|
|
68
|
+
Licensor and subsequently incorporated within the Work.
|
|
69
|
+
|
|
70
|
+
2. Grant of Copyright License.
|
|
71
|
+
|
|
72
|
+
Subject to the terms and conditions of this License, each
|
|
73
|
+
Contributor hereby grants to You a perpetual, worldwide,
|
|
74
|
+
non-exclusive, no-charge, royalty-free, irrevocable copyright
|
|
75
|
+
license to reproduce, prepare Derivative Works of, publicly
|
|
76
|
+
display, publicly perform, sublicense, and distribute the Work
|
|
77
|
+
and such Derivative Works in Source or Object form.
|
|
78
|
+
|
|
79
|
+
3. Grant of Patent License.
|
|
80
|
+
|
|
81
|
+
Subject to the terms and conditions of this License, each
|
|
82
|
+
Contributor hereby grants to You a perpetual, worldwide,
|
|
83
|
+
non-exclusive, no-charge, royalty-free, irrevocable (except as
|
|
84
|
+
stated in this section) patent license to make, have made, use,
|
|
85
|
+
offer to sell, sell, import, and otherwise transfer the Work,
|
|
86
|
+
where such license applies only to those patent claims licensable
|
|
87
|
+
by such Contributor that are necessarily infringed by their
|
|
88
|
+
Contribution(s) alone or by combination of their
|
|
89
|
+
Contribution(s) with the Work to which such Contribution(s) was
|
|
90
|
+
submitted. If You institute patent litigation against any entity
|
|
91
|
+
(including a cross-claim or counterclaim in a lawsuit)
|
|
92
|
+
alleging that the Work or a Contribution incorporated within the
|
|
93
|
+
Work constitutes direct or contributory patent infringement,
|
|
94
|
+
then any patent licenses granted to You under this License for
|
|
95
|
+
that Work shall terminate as of the date such litigation is
|
|
96
|
+
filed.
|
|
97
|
+
|
|
98
|
+
4. Redistribution.
|
|
99
|
+
|
|
100
|
+
You may reproduce and distribute copies of the Work or
|
|
101
|
+
Derivative Works thereof in any medium, with or without
|
|
102
|
+
modifications, and in Source or Object form, provided that You
|
|
103
|
+
meet the following conditions:
|
|
104
|
+
|
|
105
|
+
(a) You must give any other recipients of the Work or
|
|
106
|
+
Derivative Works a copy of this License; and
|
|
107
|
+
|
|
108
|
+
(b) You must cause any modified files to carry prominent
|
|
109
|
+
notices stating that You changed the files; and
|
|
110
|
+
|
|
111
|
+
(c) You must retain, in the Source form of any Derivative
|
|
112
|
+
Works that You distribute, all copyright, patent,
|
|
113
|
+
trademark, and attribution notices from the Source form
|
|
114
|
+
of the Work, excluding those notices that do not
|
|
115
|
+
pertain to any part of the Derivative Works; and
|
|
116
|
+
|
|
117
|
+
(d) If the Work includes a "NOTICE" text file as part of
|
|
118
|
+
its distribution, then any Derivative Works that You
|
|
119
|
+
distribute must include a readable copy of the
|
|
120
|
+
attribution notices contained within such NOTICE file,
|
|
121
|
+
excluding those notices that do not pertain to any part
|
|
122
|
+
of the Derivative Works, in at least one of the
|
|
123
|
+
following places: within a NOTICE text file distributed
|
|
124
|
+
as part of the Derivative Works; within the Source form
|
|
125
|
+
or documentation, if provided along with the Derivative
|
|
126
|
+
Works; or, within a display generated by the
|
|
127
|
+
Derivative Works, if and wherever such third-party
|
|
128
|
+
notices normally appear. The contents of the NOTICE file
|
|
129
|
+
are for informational purposes only and do not modify
|
|
130
|
+
the License. You may add Your own attribution notices
|
|
131
|
+
within the Derivative Works that You distribute,
|
|
132
|
+
alongside or as an addendum to the NOTICE text from
|
|
133
|
+
the Work, provided that such additional attribution
|
|
134
|
+
notices cannot be construed as modifying the License.
|
|
135
|
+
|
|
136
|
+
You may add Your own copyright statement to Your
|
|
137
|
+
modifications and may provide additional or different
|
|
138
|
+
license terms and conditions for use, reproduction, or
|
|
139
|
+
distribution of Your modifications, or for any such
|
|
140
|
+
Derivative Works as a whole, provided Your use,
|
|
141
|
+
reproduction, and distribution of the Work otherwise
|
|
142
|
+
complies with the conditions stated in this License.
|
|
143
|
+
|
|
144
|
+
5. Submission of Contributions.
|
|
145
|
+
|
|
146
|
+
Unless You explicitly state otherwise, any Contribution
|
|
147
|
+
intentionally submitted for inclusion in the Work by You to
|
|
148
|
+
the Licensor shall be under the terms and conditions of this
|
|
149
|
+
License, without any additional terms or conditions.
|
|
150
|
+
Notwithstanding the above, nothing herein shall supersede or
|
|
151
|
+
modify the terms of any separate license agreement you may
|
|
152
|
+
have executed with Licensor regarding such Contributions.
|
|
153
|
+
|
|
154
|
+
6. Trademarks.
|
|
155
|
+
|
|
156
|
+
This License does not grant permission to use the trade
|
|
157
|
+
names, trademarks, service marks, or product names of the
|
|
158
|
+
Licensor, except as required for reasonable and customary use
|
|
159
|
+
in describing the origin of the Work and reproducing the
|
|
160
|
+
content of the NOTICE file.
|
|
161
|
+
|
|
162
|
+
7. Disclaimer of Warranty.
|
|
163
|
+
|
|
164
|
+
Unless required by applicable law or agreed to in writing,
|
|
165
|
+
Licensor provides the Work (and each Contributor provides its
|
|
166
|
+
Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
|
167
|
+
CONDITIONS OF ANY KIND, either express or implied, including,
|
|
168
|
+
without limitation, any warranties or conditions of TITLE,
|
|
169
|
+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
170
|
+
PARTICULAR PURPOSE. You are solely responsible for
|
|
171
|
+
determining the appropriateness of using or redistributing
|
|
172
|
+
the Work and assume any risks associated with Your exercise of
|
|
173
|
+
permissions under this License.
|
|
174
|
+
|
|
175
|
+
8. Limitation of Liability.
|
|
176
|
+
|
|
177
|
+
In no event and under no legal theory, whether in tort
|
|
178
|
+
(including negligence), contract, or otherwise, unless required
|
|
179
|
+
by applicable law (such as deliberate and grossly negligent
|
|
180
|
+
acts) or agreed to in writing, shall any Contributor be
|
|
181
|
+
liable to You for damages, including any direct, indirect,
|
|
182
|
+
special, incidental, or consequential damages of any
|
|
183
|
+
character arising as a result of this License or out of the
|
|
184
|
+
use or inability to use the Work (including but not limited
|
|
185
|
+
to damages for loss of goodwill, work stoppage, computer
|
|
186
|
+
failure or malfunction, or any and all other commercial
|
|
187
|
+
damages or losses), even if such Contributor has been advised
|
|
188
|
+
of the possibility of such damages.
|
|
189
|
+
|
|
190
|
+
9. Accepting Warranty or Additional Liability.
|
|
191
|
+
|
|
192
|
+
While redistributing the Work or Derivative Works thereof, You
|
|
193
|
+
may choose to offer, and charge a fee for, acceptance of
|
|
194
|
+
support, warranty, indemnity, or other liability obligations
|
|
195
|
+
and/or rights consistent with this License. However, in
|
|
196
|
+
accepting such obligations, You may act only on Your own
|
|
197
|
+
behalf and on Your sole responsibility, not on behalf of any
|
|
198
|
+
other Contributor, and only if You agree to indemnify,
|
|
199
|
+
defend, and hold each Contributor harmless for any liability
|
|
200
|
+
incurred by, or claims asserted against, such Contributor by
|
|
201
|
+
reason of your accepting any such warranty or additional
|
|
202
|
+
liability.
|
|
203
|
+
|
|
204
|
+
END OF TERMS AND CONDITIONS
|
|
205
|
+
|
|
206
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
207
|
+
|
|
208
|
+
To apply the Apache License to your work, attach the following
|
|
209
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
210
|
+
replaced with your own identifying information. (Don't include
|
|
211
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
212
|
+
comment syntax for the file format. We also recommend that a
|
|
213
|
+
file or class name and description of purpose be included on the
|
|
214
|
+
same "printed page" as the copyright notice for easier
|
|
215
|
+
identification within third-party archives.
|
|
216
|
+
|
|
217
|
+
Copyright 2026 ZiMing-X
|
|
218
|
+
|
|
219
|
+
Licensed under the Apache License, Version 2.0 (the
|
|
220
|
+
"License"); you may not use this file except in compliance
|
|
221
|
+
with the License. You may obtain a copy of the License at
|
|
222
|
+
|
|
223
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
224
|
+
|
|
225
|
+
Unless required by applicable law or agreed to in writing,
|
|
226
|
+
software distributed under the License is distributed on an
|
|
227
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
228
|
+
KIND, either express or implied. See the License for the
|
|
229
|
+
specific language governing permissions and limitations under
|
|
230
|
+
the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,165 @@
|
|
|
1
|
-
#
|
|
1
|
+
# wishos-plan-book · 计划任务书(文档态计划)独立插件
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **创作者 / Creator**:**ZiMing-X**(GitHub: <https://github.com/ZiMing-X>)· **许可证 / License**:**Apache-2.0**(见 `LICENSE`)
|
|
4
|
+
>
|
|
5
|
+
> **一句话**:把「计划任务书」从 V12 技能束里**拆出来单独装** —— 1 个入口技能 + 3 个工具 + 规程全文,**即插即用**、自带门禁、可一行回滚。
|
|
6
|
+
>
|
|
7
|
+
> 这是 **0.2.0 公开版**:`references/` 已做「署名归一 + 内部项目代号脱敏」(md5 见 `gate.mjs` A9 与 `SPLIT.md`),原私有版归档在内部 dist。
|
|
8
|
+
|
|
9
|
+
## 30 秒上手(装完之后)
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
① 自检 plan_book_health() → ok=true(技能已注册 · 7/7 夹具)
|
|
13
|
+
② 生成骨架 plan_book_new path=docs/某任务-任务书-v1.0.md title="某任务" batches=5
|
|
14
|
+
③ 填实质内容(人/agent 逐批填四要素)
|
|
15
|
+
④ 校验 plan_book_check path=docs/某任务-任务书-v1.0.md
|
|
16
|
+
→ extractable 且 placeholders=0 = 真过;
|
|
17
|
+
extractable_with_placeholders = 结构过但还没填完;
|
|
18
|
+
not_extractable = 缺表 / 表里缺键 / 没总门禁
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
对话里直接说下面这些词,技能会自动触发:
|
|
22
|
+
**计划任务书 / 任务书 / 文档态计划 / 分批执行计划 / 四要素 / 推进门禁 / 总门禁 / 计划冻结 / 执行记录 / 复盘回流**。
|
|
23
|
+
|
|
24
|
+
| 你想干什么 | 怎么说 / 怎么调 |
|
|
25
|
+
|:--|:--|
|
|
26
|
+
| 判断这事该不该写任务书 | 「这任务要不要写任务书?」→ 技能按门槛表判(单步/即问即答 ⇒ 豁免) |
|
|
27
|
+
| 写一份新任务书 | 「帮我写个任务书」或 `plan_book_new` |
|
|
28
|
+
| 审一份已有任务书 | 「按四要素校验这份计划」或 `plan_book_check` |
|
|
29
|
+
| 查插件是否正常 | `plan_book_health` |
|
|
30
|
+
| 看四要素怎么写 / 正反样例 | 让技能读 `references/four-elements.md`(按需,不常驻上下文) |
|
|
31
|
+
|
|
32
|
+
## 它是不是独立 / 即插即用
|
|
33
|
+
|
|
34
|
+
- **零第三方依赖**:`plugin.js` 只 import `node:fs` / `node:path` / `node:url`(门禁 A10 每次复跑)。
|
|
35
|
+
- **只依赖 DSH 核心服务**:`inject = ['skills', 'tools']`,两者都是宿主自带能力,不需要其它插件。
|
|
36
|
+
- **资源全在包内**:技能正文读 `skills/plan-book/SKILL.md`,`references/`、`schema`、`manifest` 都按包内路径解析(`resourceBase` 指向包内目录);**不读宿主其它目录、不改预设技能根**。
|
|
37
|
+
- **一条命令安装**:`dsh plugin add "file:<tgz>"` —— 同时写 `dependencies` 与 `dsh.profile.bundles`,本机实测**热加载**、无需重启。
|
|
38
|
+
- **与其它 wishos 包无关**:`wishos-v12-core-skills`(不依赖)、`wishos-core` / `wishos-ops`(无关)。
|
|
39
|
+
- **兼容面**:Node `>=22.19.0`;dsh `>=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0-0`(`engines` 声明,门禁 A6 校验)。
|
|
40
|
+
|
|
41
|
+
已知边界(诚实登记):
|
|
42
|
+
|
|
43
|
+
| # | 边界 | 处置 |
|
|
44
|
+
|:-:|:--|:--|
|
|
45
|
+
| 1 | `install.cmd` / `install.ps1` 仅 Windows | Linux/macOS(如 NAS 容器)直接用 tgz:`dsh plugin add "file:/path/x.tgz"` |
|
|
46
|
+
| 2 | `dsh plugin remove` 是否自动清 `dsh.profile.bundles` 那一行**未验证** | 卸载后用 `uninstall.ps1` 报告残留,或人工核对 profile 的 `package.json` 两处 |
|
|
47
|
+
| 3 | 宿主若不支持热加载 | 重启 dsh(会中断当前会话)后再调 `plan_book_health` |
|
|
48
|
+
| 4 | 本包是文档态计划 | 机器态计划(JSON / MetaSkill)走 `plan-template → plan-executor`,不归本包 |
|
|
49
|
+
|
|
50
|
+
## 包布局
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
wishos-plan-book/
|
|
54
|
+
├── package.json # dsh.bundle.patch + exports/files + engines.dsh
|
|
55
|
+
├── cordis.patch.yml # 一行 insert(id = wishos-plan-book)
|
|
56
|
+
├── plugin.js # 技能注册 + 3 工具 + 结构判据内核(零依赖)
|
|
57
|
+
├── skills.manifest.json # 技能清单(name/description/whenToUse)
|
|
58
|
+
├── skills/plan-book/
|
|
59
|
+
│ ├── SKILL.md # 入口技能:判档 → 六步 → 四要素 → 三条硬规则 → 反模式
|
|
60
|
+
│ └── references/
|
|
61
|
+
│ ├── doc-plan-protocol.md # 规程全文(字节一致复制 · md5 见 SPLIT.md)
|
|
62
|
+
│ └── four-elements.md # 四要素写法 + 正反样例
|
|
63
|
+
├── schemas/plan-book.schema.json # 任务书 frontmatter 约束
|
|
64
|
+
├── locale/{zh,en}.json · icon.svg
|
|
65
|
+
├── tools/dev/gate.mjs # 包内门禁(结构 10 + mock 冒烟 + 夹具 + 能红 + parity)
|
|
66
|
+
├── SPLIT.md # 拆解清单:边界 / 逐件 md5 / 退场 / 未验证
|
|
67
|
+
├── LICENSE # Apache-2.0
|
|
68
|
+
└── README.md
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 工具
|
|
72
|
+
|
|
73
|
+
| 工具 | 参数 | 判据(缺一不可) |
|
|
74
|
+
|:--|:--|:--|
|
|
75
|
+
| `plan_book_check` | `path` | `status=extractable` **且** `placeholders=0` 才算真过;`extractable_with_placeholders` 表示结构过关但实质未填 |
|
|
76
|
+
| `plan_book_new` | `path` `title` `[plan_id] [batches=3] [date] [execution_log] [scope] [redlines] [force=false]` | 生成件自身须过 `plan_book_check`;已存在文件默认拒绝覆盖 |
|
|
77
|
+
| `plan_book_health` | — | `ok=true`:1 技能已注册 + references 在盘 + 7 项结构夹具全过 |
|
|
78
|
+
|
|
79
|
+
结构判据与 Python 参考实现 `_plan4-check.py` **同源不同实现**(互为探针):
|
|
80
|
+
表头四键须落在 **4 个不同列** · 每行四列非空(`—` 表示“无”,不等于留空)· 全文须有 `total_gate`/「总门禁」声明。
|
|
81
|
+
|
|
82
|
+
## 安装
|
|
83
|
+
|
|
84
|
+
### 方式 A(推荐 · 即插即用):tgz 一条命令
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
# 1) 找 dsh CLI(不在 PATH 时用本机 checkout 路径,按实际安装位置改)
|
|
88
|
+
$dsh = (Get-Command dsh -ErrorAction SilentlyContinue).Source
|
|
89
|
+
if (-not $dsh) { $dsh = "$env:USERPROFILE\dsh-0.2.1\node_modules\.bin\dsh.cmd" }
|
|
90
|
+
|
|
91
|
+
# 2) 备份 profile 配置(保险)
|
|
92
|
+
$pkg = "$env:USERPROFILE\.dsh\profiles\web\package.json"
|
|
93
|
+
Copy-Item $pkg "$pkg.bak-$(Get-Date -Format yyyyMMdd-HHmmss)"
|
|
94
|
+
|
|
95
|
+
# 3) 安装(file: + 正斜杠;包在哪个目录就 Resolve-Path 哪个)
|
|
96
|
+
& $dsh plugin --profile web add "file:$((Resolve-Path .\wishos-plan-book-0.2.0.tgz).Path -replace '\\','/')"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Linux / macOS:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
dsh plugin --profile web add "file:/path/to/wishos-plan-book-0.2.0.tgz"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
> 实测 2026-11-07:dsh CLI `0.2.1-rc.2` · pnpm `11.28.7` · 8.7 s。`dsh plugin add` 会**同时**写
|
|
106
|
+
> `dependencies` 与 `dsh.profile.bundles`,宿主热加载后 `plan-book` 技能与 3 个工具即可用。
|
|
107
|
+
|
|
108
|
+
### 方式 B(开发态):link 源码目录
|
|
109
|
+
|
|
110
|
+
```powershell
|
|
111
|
+
& $dsh plugin --profile web add "link:<包源码目录绝对路径>"
|
|
112
|
+
node <包源码目录>\tools\dev\gate.mjs --parity "<元项目>\docs"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
`link:` 指向源码,改完即生效;挪走/改名包目录会断链。`file:`(tgz)是安装副本,不受源码改动影响。
|
|
116
|
+
|
|
117
|
+
**装完就地验证(三步,均已实测通过)**
|
|
118
|
+
|
|
119
|
+
```powershell
|
|
120
|
+
node "$env:USERPROFILE\.dsh\profiles\web\node_modules\wishos-plan-book\tools\dev\verify-install.mjs" "$env:USERPROFILE\.dsh\profiles\web"
|
|
121
|
+
# V0–V4 全绿:包可解析 / 入口可 import / 导出形态对 / 版本一致
|
|
122
|
+
# 然后在会话里调用:
|
|
123
|
+
# plan_book_health → ok=true(3/3 文件 · 已注册 · 7/7 夹具)
|
|
124
|
+
# plan_book_check path=<任一任务书.md> → 真任务书应 extractable
|
|
125
|
+
# plan_book_new path=<新路径> title=<标题> batches=3 → extractable_with_placeholders + 拒覆盖
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
宿主侧门槛(包内自证):`dsh.bundle.patch` 已声明 · `engines.dsh` 覆盖 `0.2.1-rc.2` · 零第三方依赖 · 包内零盘符绝对路径 · 入口同时声明 `main` 与 `exports["."]`。
|
|
129
|
+
|
|
130
|
+
## 验证(不需要装宿主)
|
|
131
|
+
|
|
132
|
+
```powershell
|
|
133
|
+
cd <包源码目录>
|
|
134
|
+
node tools/dev/gate.mjs # 结构 + mock 宿主冒烟 + 夹具 + 能红 → 期望退码 0(18 项)
|
|
135
|
+
node tools/dev/gate.mjs --parity "<元项目>\docs" # 追加 JS↔Python parity(127 份真实文档:22 PASS / 105 FAIL,mismatch 0)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`--parity` 需要 Python 在 PATH(参考实现路径写在 `gate.mjs` 顶部 `PY_REF`,只读;便携包里可用环境变量 `PLAN4_CHECK` 指定)。
|
|
139
|
+
已知好/坏样本对照也已实测:`医保 v1.1`(12 行四键)→ `extractable`;`v1.0` → `not_extractable`(理由「缺表」)。
|
|
140
|
+
|
|
141
|
+
## 卸载 / 回滚
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
& $dsh plugin --profile web remove wishos-plan-book
|
|
145
|
+
# 删后人工核对 profile\package.json 两处(dependencies + dsh.profile.bundles)是否都已清掉
|
|
146
|
+
# —— remove 是否自动清 bundles 行未验证;然后重启宿主
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
包目录保留不删即可(未激活=零副作用)。一键卸载(Windows):`uninstall.ps1 -Profile web`,它会报告 bundles 残留。
|
|
150
|
+
|
|
151
|
+
退场(移走预设里同名的 `doc-plan-protocol`,避免双副本)见 `SPLIT.md` §四 —— **装成并通过验证后才做**。
|
|
152
|
+
|
|
153
|
+
## 与其它包的关系
|
|
154
|
+
|
|
155
|
+
| 包 | 关系 |
|
|
156
|
+
|:--|:--|
|
|
157
|
+
| `wishos-v12-core-skills` | **不依赖**。它若装过,本包的 `plan-book` 与它的 `doc-plan-protocol` 是**两套并存**;退场步骤负责收掉重复 |
|
|
158
|
+
| `wishos-core` | 无关(persona/工具面 vs 计划文档形态) |
|
|
159
|
+
| `wishos-ops` | 无关 |
|
|
160
|
+
|
|
161
|
+
## 许可证 / License
|
|
162
|
+
|
|
163
|
+
**Apache-2.0**(全文见 `LICENSE`):可自由使用、修改、再分发;请保留 `LICENSE` 与版权声明。
|
|
164
|
+
技能正文与规程全文改写自项目内部协议(公开版已做「署名归一 + 内部项目代号脱敏」,不改变条款含义)。
|
|
165
|
+
Copyright 2026 **ZiMing-X**(GitHub: <https://github.com/ZiMing-X>)。
|
package/SPLIT.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# SPLIT · 「计划任务书」独立拆解清单(**0.2.0 公开版**)
|
|
2
|
+
|
|
3
|
+
> 拆解日期 2026-11-07 · 公开版整理 2026-11-08 · 拆解人 **ZiMing-X**(GitHub: <https://github.com/ZiMing-X>)· 宿主 dsh 0.2.1-rc.2 / profile `web`
|
|
4
|
+
> 许可证 **Apache-2.0**(见 `LICENSE`)。本文件回答三件事:**拆了哪些**、**为什么边界划在这里**、**怎么退场**。
|
|
5
|
+
> 判据:`tools/dev/gate.mjs` 退码 0(结构 10 条 + mock 冒烟 + 7 项夹具 + 3 项能红测试 + parity)。
|
|
6
|
+
|
|
7
|
+
## 一 · 边界(为什么只拆这一段)
|
|
8
|
+
|
|
9
|
+
「计划任务书」=**文档态计划**这一形态。V12 的计划线是两条,只有一条归本包:
|
|
10
|
+
|
|
11
|
+
| 资产 | 判定 | 处置 | 理由 |
|
|
12
|
+
|:--|:--|:--|:--|
|
|
13
|
+
| `doc-plan-protocol`(v1.2.4 · 40,867 B) | **归入** | 全文复制为 `skills/plan-book/references/doc-plan-protocol.md` | 它就是"任务书怎么写/怎么冻结/怎么验收"的规程本体,不拆就没内容 |
|
|
14
|
+
| `plan-template` §三点六「文档态四要素」(v1.5) | **只取判据,不搬全文** | 四要素写法进入 `references/four-elements.md` | `plan-template` 主体是 JSON/MetaSkill 机器态模板引擎(18,924 B),搬过来会把机器态混进文档态包 |
|
|
15
|
+
| `_plan4-check.py`(v1.0 · 9,431 B) | **判据同源重实现** | `plugin.js` 内 `analyzeText/checkFile`(JS,零依赖);Python 原件留在 `某元项目\tools\` 不动 | 插件不能依赖外部 Python 进程;双实现做 parity,**互为探针**(不共用同一份代码即不共谋) |
|
|
16
|
+
| `plan`(入口 · 3,023 B) | **留在原处** | — | 它是"计划线"总路由,横跨机器态/文档态两条线;拆进本包会制造半截路由 |
|
|
17
|
+
| `plan-executor` / `plan-auditor` / `introspect-guard` / `execution-log` | **留在原处** | — | 机器态执行与逐步校验,与"任务书"这一文档形态是两件事 |
|
|
18
|
+
| `criteria-design-standard` | **只引用,不复制** | 技能正文点名调用 | 判据怎么设计是通用内核,复制即制造第二份口径 |
|
|
19
|
+
|
|
20
|
+
**一句话边界**:本包只负责「**一份任务书**从判档到复盘的全生命周期」,不负责「机器能直接跑的步骤定义」。
|
|
21
|
+
|
|
22
|
+
## 二 · 逐件登记(可复核)
|
|
23
|
+
|
|
24
|
+
| # | 源 | 字节 | md5 | 目标 | 处理 |
|
|
25
|
+
|:-:|:--|--:|:--|:--|:--|
|
|
26
|
+
| 1 | `<DSH_HOME>\.agent-presets\wishos\v12-core\skills\doc-plan-protocol\SKILL.md` | 40,867 | `9922A5314C1806F18CC9529B609F4F1D`(内部原稿) | `skills\plan-book\references\doc-plan-protocol.md` | **公开版改写**:署名归一(作者/批红人 → ZiMing-X)+ 内部项目代号脱敏 ⇒ 新 **41,117 B · md5 `F67B35E2B6C599047F227607F6BC3867`**(gate A9 登记) |
|
|
27
|
+
| 2 | `<DSH_HOME>\.agent-presets\wishos\v12-core\skills\plan-template\SKILL.md` | 18,924 | `B13DBE3F6401E41DD15E4AA790C633A9` | 不复制 | 仅引用其 §三点六 判据(见 `references/four-elements.md`) |
|
|
28
|
+
| 3 | `<元项目>\tools\_plan4-check.py` | 9,431 | `1060C68CDFBFF94F8B67C87BBC5FEBAA` | `plugin.js`(JS 重实现) | 判据对齐:四键分列 + 行内非空 + 总门禁在册;parity 见 §五 |
|
|
29
|
+
| 4 | `<DSH_HOME>\.agent-presets\wishos\v12-core\skills\plan\SKILL.md` | 3,023 | `32F00982C99D810B4C84B665591F74DC` | 不复制 | 判档规则在本包 SKILL.md §零 重述(只重述判据,不复述子技能清单) |
|
|
30
|
+
|
|
31
|
+
新增件(非搬迁):`skills\plan-book\SKILL.md`、`plugin.js`、`tools\dev\gate.mjs`、`schemas\plan-book.schema.json`、`locale\{en,zh}.json`、`icon.svg`。
|
|
32
|
+
|
|
33
|
+
## 三 · 红线(本包不做什么)
|
|
34
|
+
|
|
35
|
+
1. **不改预设技能根**(`.agent-presets\wishos\v12-core\skills` 原字节不动;拆解不删原件)。
|
|
36
|
+
2. **不改 profile 配置** —— 安装时才在 `profiles\web\package.json` 加两处(dependency + `dsh.profile.bundles`),改前留 `.bak`,回滚=删两行。
|
|
37
|
+
3. **零第三方依赖** —— 只 import `node:` 内建(gate A10)。
|
|
38
|
+
4. **只写盘一处** —— 只有 `plan_book_new` 写文件,且默认拒绝覆盖已存在文件;`check` / `health` 全程只读。
|
|
39
|
+
5. **不自造第二份口径** —— 版本号、四要素键名、判据阈值只在 `references/` 与 `plugin.js` 各声明一次;`SKILL.md` 不复述数字。
|
|
40
|
+
6. **公开版条款** —— Apache-2.0(`LICENSE`);公开版 reference 已脱敏,原内部 md5 与改写记录保留在本文件 §二/§八,**不伪造历史**。
|
|
41
|
+
|
|
42
|
+
## 四 · 退场(**opt-in,装成并通过验证后才执行**)
|
|
43
|
+
|
|
44
|
+
> 仅适用于「本机同时装过内部 `doc-plan-protocol`」的内部部署场景;**公开版不随包分发该预设件**,通常无需退场。
|
|
45
|
+
|
|
46
|
+
目标:让 `doc-plan-protocol` 只有**一个**活副本(本包),避免同名技能双注册。
|
|
47
|
+
|
|
48
|
+
| 步 | 动作 | 门禁(不满足即停) |
|
|
49
|
+
|:-:|:--|:--|
|
|
50
|
+
| 1 | 安装本包并重启 host(见 `README.md` §安装) | `plan_book_health` 返回 `ok=true` |
|
|
51
|
+
| 2 | 确认新技能已可见(技能目录出现 `plan-book`) | 目录内可见,且 `plan_book_check` 可调用 |
|
|
52
|
+
| 3 | 从预设技能根**移出** `doc-plan-protocol`(移到 `_trash\` 或 `.retired\`,不硬删) | 移动后 `plan_book_health` 仍 `ok=true` |
|
|
53
|
+
| 4 | 复跑 `node tools/dev/gate.mjs --parity docs` | 退码 0 |
|
|
54
|
+
|
|
55
|
+
**回滚**:删 `profiles\web\package.json` 的两行 + 重启;`doc-plan-protocol` 从 `_trash\` 移回原目录。全程无需重建本包。
|
|
56
|
+
|
|
57
|
+
## 五 · 判据(可证伪)
|
|
58
|
+
|
|
59
|
+
| # | 判据 | 现测(2026-11-07T20:4x) |
|
|
60
|
+
|:-:|:--|:--|
|
|
61
|
+
| 1 | 包内门禁 18 项全过(含 3 项能红测试) | ✅ `node tools/dev/gate.mjs` 退码 0(加 `--parity` 则 19 项) |
|
|
62
|
+
| 2 | JS 校验器与 Python 参考实现在 `<元项目>\docs` 全量 **127 份** .md 上同判 | ✅ `--parity docs`:22 份 PASS 桶 / 105 份 FAIL 桶,mismatch **0** |
|
|
63
|
+
| 2b | 已知好/坏样本对照 | ✅ 医保 v1.1 → `extractable`(12 行);v1.0 → `not_extractable`(理由「缺表」),与 2026-09-24 历史结论一致 |
|
|
64
|
+
| 3 | 生成件自洽:`plan_book_new` 骨架自身结构可提取 | ✅ C2 项;宿主机实测 2,368 B / 3 行 / 19 占位符 |
|
|
65
|
+
| 4 | 占位符诚实位:骨架 `placeholders>0` ⇒ 不得宣称"任务书完成" | ✅ 工具返回 `extractable_with_placeholders` |
|
|
66
|
+
| 5 | **安装后真激活**(技能注册 + 工具在面 + 自检 ok) | ✅ **已实测**:`plan_book_health` → `ok=true`(3/3 文件 · 已注册 · 7/7 夹具);`plan_book_check` / `plan_book_new` 均可调用 |
|
|
67
|
+
| 6 | 退场后 `doc-plan-protocol` 单副本 | ⬜ **未执行**(§四 步 3,等裁) |
|
|
68
|
+
|
|
69
|
+
## 六 · 安装与激活记录(实测)
|
|
70
|
+
|
|
71
|
+
| 项 | 值 |
|
|
72
|
+
|:--|:--|
|
|
73
|
+
| 命令 | `dsh plugin --profile web add "link:<包源码目录>"`(dsh CLI 0.2.1-rc.2 · pnpm 11.28.7 · 8.7 s) |
|
|
74
|
+
| profile 变更 | `profiles\web\package.json` **自动加两处**:`dependencies["wishos-plan-book"]="link:<包源码目录>"` + `dsh.profile.bundles` 末尾 `"wishos-plan-book"` —— **`dsh plugin add` 会同时写入 bundles**,不是只加依赖 |
|
|
75
|
+
| 备份 | `package.json.bak-wishos-plan-book-20261107-204216`(before md5 `A948A9D4…` / 1,001 B → after `BDEF34EB…` / 1,096 B) |
|
|
76
|
+
| 链接 | `profiles\web\node_modules\wishos-plan-book` → 符号链接到包目录 |
|
|
77
|
+
| 激活方式 | **宿主热加载,未重启**:安装后本次会话的技能目录立即出现 `plan-book`,且 `plan_book_health` 可直接调用 |
|
|
78
|
+
| 回滚 | `dsh plugin --profile web remove wishos-plan-book`;**实测(2026-11-08 · dsh 0.2.1-rc.2 · 临时 profile)会同时清掉 `dependencies` 与 `dsh.profile.bundles` 两处**,并移除 `node_modules\wishos-plan-book` |
|
|
79
|
+
|
|
80
|
+
## 七 · 仍未验证(诚实登记)
|
|
81
|
+
|
|
82
|
+
1. **GUI 面板可见性**:未在设置/插件面板肉眼确认条目与图标(技能目录与工具面已实测可见)。
|
|
83
|
+
2. **`dsh plugin remove` 是否自动清 bundles 行**:✅ **已实测(2026-11-08)会清两处**(`dependencies` + `dsh.profile.bundles`)并移除 node_modules;`uninstall.ps1` 仍作双保险核对。
|
|
84
|
+
3. **退场未做**:内部机器上预设里的 `doc-plan-protocol` 仍在役,当前是"两份并存"(新 `plan-book` + 旧 `doc-plan-protocol`),内容不冲突但属重复引导;公开版不涉及。
|
|
85
|
+
4. **JS 校验器与 Python 的 parity 只覆盖结构判据**:Python 的 stdout 文案与 `--selftest` 行为未逐字对齐(不需要)。
|
|
86
|
+
5. **gate 的 SemVer 判定是极简实现**:只覆盖 `>=`/`>`/`<=`/`<`/`=`/`||`;遇 `^`/`~`/`*` 判 false(本包区间不含这些记号)。
|
|
87
|
+
|
|
88
|
+
## 八 · 公开版差异(0.2.0 · 2026-11-08)
|
|
89
|
+
|
|
90
|
+
> 目的:可用于 GitHub 公开发布。原则:**只归一归属与内部代号,不改条款含义、不伪造历史**(原内部 md5 保留于 §二)。
|
|
91
|
+
|
|
92
|
+
| # | 变更 | 明细 |
|
|
93
|
+
|:-:|:--|:--|
|
|
94
|
+
| 1 | 创作者归属归一 | `package.json author` + README/安装说明/本文件 → **ZiMing-X**;reference 内**作者署名 ×6、批红人署名 ×1** 统一为 **ZiMing-X** |
|
|
95
|
+
| 2 | 内部项目代号脱敏 | 内部项目代号 ×23 → `某内部项目`;元项目代号 ×15 → `某元项目`;业务域词 ×11 → `某业务场景`;临时目录路径 ×1 → `.agent/tmp/`(**原始→脱敏映射明细保留在内部发布记录,不写入公开包**) |
|
|
96
|
+
| 3 | reference md5 换登记 | 内部原稿 `9922A531…`(40,867 B)→ 公开版 **`F67B35E2B6C599047F227607F6BC3867`(41,117 B)**;`gate.mjs` A9 改为比对该登记值 |
|
|
97
|
+
| 4 | 许可 | `private: true` → 开源 **Apache-2.0**;新增 `LICENSE`(Copyright 2026 ZiMing-X);README §许可证同步 |
|
|
98
|
+
| 5 | 元数据 | 版本 0.1.2 → **0.2.0**;manifest `private:false`、`source` 标注公开版改写 |
|
|
99
|
+
|
|
100
|
+
**未改**:四要素判据、3 个工具行为、技能正文(SKILL.md)、schema、locale、宿主门禁其余 17 项。
|
|
101
|
+
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# wishos-plan-book bundle patch (public release 0.2.0, 2026-11-08)
|
|
2
|
+
#
|
|
3
|
+
# 一行 Host row:运行时注册 1 个技能(plan-book)与 3 个工具
|
|
4
|
+
# (plan_book_check / plan_book_new / plan_book_health)。
|
|
5
|
+
# 不写预设、不改 profile 配置、不注册客户端 UI;卸载后宿主回到原状。
|
|
6
|
+
#
|
|
7
|
+
# 回滚:删除本行即回到安装前状态。
|
|
8
|
+
- insert:
|
|
9
|
+
- id: wishos-plan-book
|
|
10
|
+
name: 'wishos-plan-book'
|
|
11
|
+
config: {}
|
package/icon.svg
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
|
|
2
|
+
<rect x="4" y="4" width="56" height="56" rx="12" fill="#1f4e79"/>
|
|
3
|
+
<rect x="16" y="13" width="32" height="38" rx="4" fill="#fff"/>
|
|
4
|
+
<rect x="21" y="20" width="16" height="3" rx="1.5" fill="#1f4e79"/>
|
|
5
|
+
<rect x="21" y="27" width="22" height="3" rx="1.5" fill="#9db8cf"/>
|
|
6
|
+
<rect x="21" y="34" width="22" height="3" rx="1.5" fill="#9db8cf"/>
|
|
7
|
+
<path d="M25 43.5l3.2 3.2 6.6-7" fill="none" stroke="#2e9e4f" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
</svg>
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wishos-plan-book",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./plugin.js",
|
|
6
|
+
"description": "计划任务书(文档态计划)独立插件:把 V12 计划线里「任务书」这一段从技能束中拆出为独立 DSH bundle —— 1 个入口技能 + 3 个工具(四要素校验 / 任务书生成 / 自检)+ 规程全文 reference。Plan-task-book bundle: one entry skill, three tools, protocol reference in-package.",
|
|
7
|
+
"author": "ZiMing-X",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/ZiMing-X/wishos-plan-book.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/ZiMing-X/wishos-plan-book#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/ZiMing-X/wishos-plan-book/issues"
|
|
16
|
+
},
|
|
17
|
+
"icon": "icon.svg",
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.19.0",
|
|
20
|
+
"dsh": ">=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0-0"
|
|
21
|
+
},
|
|
22
|
+
"exports": {
|
|
23
|
+
".": "./plugin.js",
|
|
24
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
25
|
+
"./skills.manifest.json": "./skills.manifest.json",
|
|
26
|
+
"./schemas/*.json": "./schemas/*.json",
|
|
27
|
+
"./locale/*.json": "./locale/*.json",
|
|
28
|
+
"./icon": "./icon.svg",
|
|
29
|
+
"./SPLIT.md": "./SPLIT.md",
|
|
30
|
+
"./README.md": "./README.md",
|
|
31
|
+
"./LICENSE": "./LICENSE",
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"files": [
|
|
35
|
+
"plugin.js",
|
|
36
|
+
"cordis.patch.yml",
|
|
37
|
+
"skills.manifest.json",
|
|
38
|
+
"skills",
|
|
39
|
+
"tools",
|
|
40
|
+
"schemas",
|
|
41
|
+
"locale",
|
|
42
|
+
"icon.svg",
|
|
43
|
+
"SPLIT.md",
|
|
44
|
+
"README.md",
|
|
45
|
+
"LICENSE"
|
|
46
|
+
],
|
|
47
|
+
"dsh": {
|
|
48
|
+
"bundle": {
|
|
49
|
+
"patch": "./cordis.patch.yml"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|