dsh-plugin-strict-spec 0.0.0-stage → 0.5.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.
Files changed (33) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +236 -2
  3. package/README.zh.md +191 -0
  4. package/cordis.patch.yml +5 -0
  5. package/dist/cli/strict-spec-cli.js +38892 -0
  6. package/dist/client.js +50 -0
  7. package/dist/host.js +154 -0
  8. package/dist/skills/strict-roadmap-plan/SKILL.md +176 -0
  9. package/dist/skills/strict-roadmap-recommend/SKILL.md +321 -0
  10. package/dist/skills/strict-roadmap-reorder/SKILL.md +194 -0
  11. package/dist/skills/strict-roadmap-review/SKILL.md +180 -0
  12. package/dist/skills/strict-roadmap-transition/SKILL.md +323 -0
  13. package/dist/skills/strict-scene-edit/SKILL.md +156 -0
  14. package/dist/skills/strict-spec-apply/SKILL.md +212 -0
  15. package/dist/skills/strict-spec-architecture/SKILL.md +143 -0
  16. package/dist/skills/strict-spec-archive/SKILL.md +165 -0
  17. package/dist/skills/strict-spec-auto/SKILL.md +334 -0
  18. package/dist/skills/strict-spec-brainstorm/SKILL.md +228 -0
  19. package/dist/skills/strict-spec-bugfix/SKILL.md +285 -0
  20. package/dist/skills/strict-spec-design/SKILL.md +168 -0
  21. package/dist/skills/strict-spec-design-sync/SKILL.md +165 -0
  22. package/dist/skills/strict-spec-init/SKILL.md +123 -0
  23. package/dist/skills/strict-spec-maintenance/SKILL.md +130 -0
  24. package/dist/skills/strict-spec-modify/SKILL.md +148 -0
  25. package/dist/skills/strict-spec-propose/SKILL.md +553 -0
  26. package/dist/skills/strict-spec-review/SKILL.md +315 -0
  27. package/dist/skills/strict-spec-ship/SKILL.md +94 -0
  28. package/dist/skills/strict-spec-spec-edit/SKILL.md +117 -0
  29. package/dist/skills/strict-spec-sync-specs/SKILL.md +128 -0
  30. package/dist/skills/strict-spec-verify/SKILL.md +79 -0
  31. package/dist/skills/strict-tech-edit/SKILL.md +161 -0
  32. package/dist/skills/strict-tech-sync/SKILL.md +202 -0
  33. package/package.json +109 -4
package/LICENSE ADDED
@@ -0,0 +1,201 @@
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 the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 the strict-spec-driven authors
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md CHANGED
@@ -1,3 +1,237 @@
1
- # Temporary Holding Version
1
+ # dsh-plugin-strict-spec
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [中文](README.zh.md)
4
+
5
+ A read-only viewer for strict workflow documents inside DeepSeek Harness (dsh).
6
+ It shows the `.strict-spec-driven/` directory of a Session's workspace as a
7
+ document tree and renders each strict YAML artifact in a view made for it.
8
+
9
+ The package is distributed as a GitHub Release tarball (Apache-2.0), so a
10
+ consumer machine needs nothing but the dsh CLI and the release URL; an npm
11
+ registry path is optional and activates only when one is published.
12
+
13
+ ## What It Shows
14
+
15
+ - **Two entry points.** A *Strict documents* row in the left sidebar opens a
16
+ full page with a Session picker that groups Sessions by workspace and
17
+ remembers the last choice. A *Strict documents* entry in the right sidebar's
18
+ guide opens a tab bound to the active Session, beside the conversation.
19
+ - **A document tree.** Artifact families appear in a fixed order — config,
20
+ architecture, roadmap, changes, scenes, specs, tech, lessons, SOPs, and design
21
+ system — and families absent from the workspace are omitted. Archived groups
22
+ start collapsed and are read only when expanded. Milestones and planned
23
+ changes carry their declared status, active changes carry their task
24
+ completion, and a directory cut short by the host's listing limit shows a
25
+ truncation marker. The tree is keyboard navigable.
26
+ - **Dedicated views** for change artifacts (proposal, design, tasks, questions,
27
+ and delta specs, scenes, and tech), roadmap artifacts (index, milestones,
28
+ planned changes), specs and scenes (with requirement keyword emphasis and scene
29
+ step coverage links that open the covering requirement), and project context
30
+ (config, architecture, technical standards, lessons, SOPs, design system).
31
+ Fields a view does not lay out are appended under an additional-fields
32
+ section, and any other artifact type opens in a generic structured view, so
33
+ no content is hidden.
34
+ - **Live refresh.** Loaded directories and the open document update when their
35
+ files change on disk.
36
+ - **An empty state** for a workspace without `.strict-spec-driven/`, and a
37
+ parse-error view with the raw text for YAML that cannot be parsed.
38
+
39
+ ## Read-Only Guarantee
40
+
41
+ The viewer offers no control that writes, edits, or deletes strict workflow
42
+ files, and viewing never changes a file. Views show declared field values
43
+ exactly as written; they never compute roadmap status or validation results.
44
+ Change strict artifacts through `strict-spec-cli` as usual.
45
+
46
+ The one control that hands work to a Session is the milestone goal launcher
47
+ described below. It writes no file itself; any file change afterwards comes
48
+ from the Session's agent running the submitted goal.
49
+
50
+ ## Complete the Next Milestone With One Goal
51
+
52
+ When the roadmap index document is open in a surface bound to a Session — the
53
+ right-sidebar tab's active Session, or the Session chosen in the left page's
54
+ picker — the index view offers a **Complete next milestone** button. It shows
55
+ an inline confirmation with the target Session and the exact objective, and
56
+ nothing is sent until you confirm. Confirming submits one `/goal` command to
57
+ that Session, exactly as if you had typed it, so the host creates and arms the
58
+ goal and its own goal strip shows progress, pause, and resume.
59
+
60
+ The objective is fixed English text. It tells the agent to repeatedly run the
61
+ `strict-roadmap-recommend` skill; the milestone owning the first recommended
62
+ planned change becomes the target, and later rounds pass it as the milestone
63
+ hint while each change runs through `strict-spec-auto` to archive. The goal
64
+ completes once `strict-spec-cli roadmap-status` reports every planned change of
65
+ that milestone complete, and blocks with a reason on `roadmap-error`,
66
+ `refine-milestone`, `no-candidate` before completion, or open questions that
67
+ need a human answer.
68
+
69
+ If the Session refuses — for example because it already holds an unfinished
70
+ goal, or it offers no `/goal` command — the view shows the reason inline,
71
+ leaves the existing goal untouched, and the button is usable again. The view
72
+ derives no next milestone itself; the scripted recommendation chooses it.
73
+
74
+ ## Built-in Strict Tooling
75
+
76
+ The plugin carries the strict workflow's own tooling, so installing the plugin
77
+ is enough — no separate `install.sh` run, global `strict-spec-cli`, or skills
78
+ registration is required:
79
+
80
+ - While the built-in tooling switch is **enabled (the default)**, the plugin
81
+ registers every strict skill package onto the host's skill registry from the
82
+ skill bodies bundled inside the plugin, and the commands those skills serve
83
+ run the `strict-spec-cli` bundled inside the plugin, invoked through the
84
+ dsh host's own node runtime. Nothing is written to any `bin` directory and
85
+ no `PATH` lookup happens: the built-in CLI is reachable inside agent
86
+ sessions, not from your terminal.
87
+ - While the switch is enabled, **external copies win**: a same-name strict
88
+ skill installed under a project or user skill root (for example by an
89
+ earlier `install.sh` run) takes precedence over the plugin's built-in copy,
90
+ and the session runs the external copy's body and the CLI it states. This
91
+ is the dsh skill registry's designed layering — a preset's local discovery
92
+ registers nearer than this plugin's deployment-level registration, and
93
+ within one layer every filesystem root rank beats the bundled band — so no
94
+ preset override or other deployment trick is involved.
95
+ - The built-in copies are the **zero-install fallback**: a skill name no
96
+ external root offers falls through to the plugin's built-in copy, so a
97
+ machine with nothing installed still lists and runs every strict skill from
98
+ the plugin alone. To make the built-in copy win for a name on a machine
99
+ that also carries an external copy, remove the external copy
100
+ (`bash install.sh --uninstall` clears the global registration).
101
+ - You can tell the copies apart **in the catalog before loading anything**:
102
+ every built-in entry's description ends with a provenance marker such as
103
+ `— built-in (dsh plugin 0.2.1)`, naming the plugin and the version actually
104
+ serving; external entries carry no marker.
105
+ - The whole provision is **one switch**, because the skills and the CLI are one
106
+ thing: the served skill bodies are the bundled CLI's only session entry
107
+ point. Turn it off and the built-in skills disappear, any external
108
+ installation becomes the effective one again, and the viewer keeps working
109
+ unchanged. `install.sh` and the global install path keep working either way.
110
+
111
+ Flip the switch through the plugin row's config in the profile's
112
+ `cordis.patch.yml` — no reinstall is needed:
113
+
114
+ ```yaml
115
+ - id: ui-strict-spec
116
+ name: dsh-plugin-strict-spec
117
+ config:
118
+ builtinTooling: false
119
+ ```
120
+
121
+ Omitting the `config` block (or the whole entry) keeps the switch at its
122
+ default, enabled.
123
+
124
+ ## Supported dsh Releases
125
+
126
+ The plugin declares `engines.dsh` as `>=0.2.1-rc.2 <0.2.2` and was tested with
127
+ dsh `0.2.1-rc.2`. In a dsh release outside that range it registers no document
128
+ UI at all rather than showing a partially working viewer.
129
+
130
+ ## Install Into the Web Client
131
+
132
+ Install the published release tarball by URL — no checkout, no build step, no
133
+ npm account. Pick the latest `plugin-v*` tag from the repository's [Releases
134
+ page](https://github.com/kw12121212/strict-spec-driven/releases) and install
135
+ its tarball (0.3.0 shown):
136
+
137
+ ```sh
138
+ dsh plugin --profile web add https://github.com/kw12121212/strict-spec-driven/releases/download/plugin-v0.5.1/dsh-plugin-strict-spec-0.5.1.tgz
139
+ ```
140
+
141
+ When a registry release exists, the name form works too:
142
+
143
+ ```sh
144
+ dsh plugin --profile web add dsh-plugin-strict-spec
145
+ ```
146
+
147
+ Then restart the dsh host (for a systemd user service:
148
+ `systemctl --user restart dsh-web.service`) and boot the web client from the
149
+ workspace you want to read:
150
+
151
+ ```sh
152
+ cd /path/to/your/project
153
+ dsh web
154
+ ```
155
+
156
+ Upgrades install the newer release's URL the same way and restart the host.
157
+
158
+ ### Development installs
159
+
160
+ The built bundle is not committed, so a fresh clone builds it and installs it
161
+ in one block — run this from the repository root:
162
+
163
+ ```sh
164
+ cd plugins/dsh-strict-spec
165
+ bun install
166
+ bun run build
167
+ dsh plugin --profile web add "link:$(pwd)"
168
+ ```
169
+
170
+ This writes `dist/client.js` and `dist/host.js`, then adds the plugin with the
171
+ npm-installed `dsh` command. Alternatively, install from a tarball packed from
172
+ the built checkout:
173
+
174
+ ```sh
175
+ dsh plugin --profile web add "$(pwd)/$(npm pack --silent)"
176
+ ```
177
+
178
+ A `link:` install follows later rebuilds of the checkout — after pulling
179
+ changes, run `bun run build` inside `plugins/dsh-strict-spec` again; a tarball
180
+ install is a fixed copy that you replace by packing and adding again. Then boot
181
+ the web client from the workspace you want to read:
182
+
183
+ ```sh
184
+ cd /path/to/your/project
185
+ dsh web
186
+ ```
187
+
188
+ Remove the plugin with `dsh plugin --profile web remove dsh-plugin-strict-spec`.
189
+
190
+ ## Upgrading the dsh Host
191
+
192
+ The plugin is pinned to the dsh release it was built against (see
193
+ `engines.dsh` above), and widening that pin is its own planned change under
194
+ this repository's narrow-engines-dsh-pin technical standard — never bump the
195
+ pin as a side effect of another change. After upgrading the dsh host:
196
+
197
+ 1. Check the running release with `dsh --version` against the pinned range.
198
+ 2. Missing *Strict documents* panel? That is the pin, not a broken install:
199
+ outside the pinned range the plugin deliberately registers no document UI.
200
+ 3. Plan a change that bumps `engines.dsh` in
201
+ `plugins/dsh-strict-spec/package.json` to the new patch line, retests the
202
+ viewer against that release, and lands any adapter fixes it needs.
203
+ 4. In that change's checkout, rebuild (`bun install && bun run build` inside
204
+ `plugins/dsh-strict-spec`) and, for a tarball install, pack and add again;
205
+ a `link:` install keeps pointing at the checkout and only needs the
206
+ rebuild.
207
+ 5. Restart `dsh web` (fully quit Desktop first) so the profile recomposes, and
208
+ refresh the page.
209
+
210
+ The commands in this SOP that run today — build, `link:` install into an
211
+ isolated profile, host boot, and browser load of both entry points — were
212
+ verified against dsh 0.2.1-rc.2. The future-release leg (steps 3–4 against a
213
+ host outside the pinned range) cannot be run until such a release exists.
214
+
215
+ ## Install Into the Desktop Profile
216
+
217
+ The `desktop` profile belongs to the DeepSeek Harness Desktop application, and
218
+ the npm-installed `dsh` refuses to manage it. Use the `dsh` command bundled with
219
+ the Desktop installation instead:
220
+
221
+ 1. Open DeepSeek Harness Desktop once so it initializes its profile, then quit
222
+ it completely.
223
+ 2. With the Desktop-bundled `dsh`, run the same `add` command against the
224
+ desktop profile, using either spec:
225
+
226
+ ```sh
227
+ dsh plugin --profile desktop add "link:/path/to/strict-spec-driven/plugins/dsh-strict-spec"
228
+ ```
229
+
230
+ 3. Start Desktop again.
231
+
232
+ Keep Desktop closed while it is being installed into, and remove the plugin the
233
+ same way with `remove dsh-plugin-strict-spec`.
234
+
235
+ These desktop steps follow the dsh 0.2.1-rc.2 documentation for the
236
+ Desktop-owned profile but have not yet been run end to end; the web client
237
+ install is the verified path.
package/README.zh.md ADDED
@@ -0,0 +1,191 @@
1
+ # dsh-plugin-strict-spec
2
+
3
+ [English](README.md)
4
+
5
+ 在 DeepSeek Harness(dsh)中只读查看严格工作流文档的插件。它把 Session
6
+ 所在 workspace 的 `.strict-spec-driven/` 目录展示为文档树,并为每种严格 YAML
7
+ 制品提供专属视图。
8
+
9
+ 本包以 GitHub Release tarball 形式分发(Apache-2.0),消费端机器只需 dsh CLI
10
+ 与 Release URL;npm registry 路径为可选,仅在实际发布后可用。
11
+
12
+ ## 展示内容
13
+
14
+ - **两个入口。** 左侧边栏的 *Strict 文档* 行打开整页视图,页面提供 Session
15
+ 选择器,按 workspace 分组列出 Session 并记住上次的选择。右侧边栏引导中的
16
+ *Strict 文档* 条目在对话旁打开一个绑定当前 Session 的标签页。
17
+ - **文档树。** 制品族按固定顺序出现——config、architecture、roadmap、changes、
18
+ scenes、specs、tech、lessons、SOPs、design system——workspace 中不存在的族会被
19
+ 省略。归档分组默认折叠,展开时才读取。里程碑与计划变更显示其声明的状态,活跃
20
+ 变更显示任务完成度,被宿主目录列举上限截断的目录显示截断标记。文档树支持键盘
21
+ 导航。
22
+ - **专属视图**:变更制品(proposal、design、tasks、questions,以及 delta spec、
23
+ delta scene、delta tech)、路线图制品(索引、里程碑、计划变更)、规范与场景
24
+ (强调需求关键字,场景步骤的覆盖链接可打开对应需求)、项目上下文(config、
25
+ architecture、技术标准、lessons、SOP、design system)。视图未布局的字段会追加
26
+ 在附加字段区,其他制品类型以通用结构化视图打开,因此不会隐藏任何内容。
27
+ - **实时刷新。** 已加载的目录和当前打开的文档会随磁盘文件变化自动更新。
28
+ - 对没有 `.strict-spec-driven/` 的 workspace 显示**空状态**;无法解析的 YAML
29
+ 显示带原始文本的解析错误视图。
30
+
31
+ ## 只读保证
32
+
33
+ 查看器不提供任何写入、编辑或删除严格工作流文件的控件,查看操作也不会改变任何
34
+ 文件。视图按原样展示声明的字段值,从不计算路线图状态或校验结果。修改严格制品
35
+ 仍照常通过 `strict-spec-cli` 进行。
36
+
37
+ 唯一会把工作交给 Session 的控件是下文的里程碑目标启动按钮。它本身不写任何文件;
38
+ 之后的文件变化都来自 Session 的 agent 执行所提交的目标。
39
+
40
+ ## 一键完成下一个里程碑
41
+
42
+ 当路线图索引文档在已绑定 Session 的界面中打开时——右侧栏标签页绑定当前活跃
43
+ Session,左侧页面绑定选择器中选中的 Session——索引视图会提供 **一键完成下一个
44
+ 里程碑** 按钮。点击后会在视图内显示确认条,列出目标 Session 和完整的目标文本,
45
+ 确认前不会发送任何内容。确认后向该 Session 提交一条 `/goal` 命令,与手动输入完全
46
+ 相同,由宿主创建并启用目标,进度、暂停与恢复都在宿主自带的目标条中查看。
47
+
48
+ 目标文本是固定的英文。它让 agent 反复运行 `strict-roadmap-recommend` 技能:第一
49
+ 次推荐出的计划变更所属的里程碑成为目标里程碑,之后每轮都把它作为里程碑提示,
50
+ 每个变更都经由 `strict-spec-auto` 一路完成到归档。当 `strict-spec-cli
51
+ roadmap-status` 报告该里程碑的所有计划变更都已完成时目标完成;遇到
52
+ `roadmap-error`、`refine-milestone`、完成前出现 `no-candidate`,或有需要人回答的
53
+ 开放问题时,目标会带着原因进入 blocked。
54
+
55
+ 如果 Session 拒绝——例如已有未完成的目标,或不提供 `/goal` 命令——视图会在行内
56
+ 显示原因,不改动已有目标,按钮恢复可用。视图自身不推算下一个里程碑,由脚本化的
57
+ 推荐决定。
58
+
59
+ ## 内置严格工具链
60
+
61
+ 插件自带严格工作流的工具链,因此装好插件即可使用 —— 不需要单独运行
62
+ `install.sh`,也不需要全局安装 `strict-spec-cli` 或注册技能包:
63
+
64
+ - 内置工具链开关**默认开启**。开启期间,插件把随插件打包的严格技能包注册
65
+ 到宿主的技能注册表,并且这些技能所给出的命令直接运行插件内置的
66
+ `strict-spec-cli`(通过 dsh 宿主自身的 node 运行时调用)。插件不会向任何
67
+ `bin` 目录写入内容,也不做任何 `PATH` 查找:内置 CLI 只在 Agent 会话内可用,
68
+ 终端中不可用。
69
+ - 开启期间,**外部副本优先**:项目或用户技能根目录下的同名严格技能(例如之前
70
+ `install.sh` 安装的)优先于插件的内置副本,会话运行外部副本的正文与其声明的
71
+ CLI。这是 dsh 技能注册表的设计分层——预设的本地发现注册在比本插件(部署级
72
+ 注册)更近的层,同层之内文件系统各根的 rank 也都高于 bundled 档——因此不需要
73
+ 任何预设覆盖或其他部署技巧。
74
+ - 内置副本是**零安装兜底**:没有外部副本的技能名自然落到插件的内置副本,什么
75
+ 都没装的机器仍能仅凭插件列出并运行全部严格技能。若在某台同时装有外部副本的
76
+ 机器上想让内置副本获胜,请移除外部副本(`bash install.sh --uninstall`
77
+ 可清除全局注册)。
78
+ - **无需加载即可在目录中区分内外副本**:内置条目的描述末尾带有来源标记,如
79
+ `— built-in (dsh plugin 0.2.1)`,标明插件名与实际服务的版本;外部条目无标记。
80
+ - 整套工具链是**一个开关**,因为技能与 CLI 本是一体:被服务的技能正文是内置
81
+ CLI 在会话中的唯一入口。关闭开关后内置技能消失,外部安装(如有)重新生效,
82
+ 查看器不受影响照常工作。`install.sh` 与全局安装路径在任何情况下都保持可用。
83
+
84
+ 通过 profile 的 `cordis.patch.yml` 中插件行的 config 翻转开关 —— 无需重新安装:
85
+
86
+ ```yaml
87
+ - id: ui-strict-spec
88
+ name: dsh-plugin-strict-spec
89
+ config:
90
+ builtinTooling: false
91
+ ```
92
+
93
+ 省略 `config` 块(或整条记录)时开关保持默认值,即开启。
94
+
95
+ ## 支持的 dsh 版本
96
+
97
+ 插件声明的 `engines.dsh` 为 `>=0.2.1-rc.2 <0.2.2`,并在 dsh `0.2.1-rc.2` 上
98
+ 测试。在该范围之外的 dsh 版本中,插件不注册任何文档界面,而不是显示部分可用的
99
+ 查看器。
100
+
101
+ ## 安装到 Web 客户端
102
+
103
+ 按 URL 安装已发布的 Release tarball —— 无需检出仓库、无需构建、无需 npm 账号。
104
+ 从仓库的 [Releases 页面](https://github.com/kw12121212/strict-spec-driven/releases)
105
+ 选最新的 `plugin-v*` 标签安装其 tarball(以 0.3.0 为例):
106
+
107
+ ```sh
108
+ dsh plugin --profile web add https://github.com/kw12121212/strict-spec-driven/releases/download/plugin-v0.5.1/dsh-plugin-strict-spec-0.5.1.tgz
109
+ ```
110
+
111
+ 若存在 registry 发布,按名称安装亦可:
112
+
113
+ ```sh
114
+ dsh plugin --profile web add dsh-plugin-strict-spec
115
+ ```
116
+
117
+ 随后重启 dsh 宿主(systemd 用户服务:`systemctl --user restart dsh-web.service`),
118
+ 再从想阅读的工作区启动 web 客户端。升级时按同法安装新版本的 Release URL 并重启宿主。
119
+
120
+ ### 开发安装
121
+
122
+ 构建产物不提交到仓库,从本仓库的全新 clone 开始,复制下面这一块即可一次完成
123
+ 构建与安装(在仓库根目录执行):
124
+
125
+ ```sh
126
+ cd plugins/dsh-strict-spec
127
+ bun install
128
+ bun run build
129
+ dsh plugin --profile web add "link:$(pwd)"
130
+ ```
131
+
132
+ 这会生成 `dist/client.js` 和 `dist/host.js`,并通过 npm 安装的 `dsh` 命令添加
133
+ 插件。也可以从构建好的 checkout 打包 tarball 安装:
134
+
135
+ ```sh
136
+ dsh plugin --profile web add "$(pwd)/$(npm pack --silent)"
137
+ ```
138
+
139
+ `link:` 安装会跟随 checkout 之后的重新构建——拉取更新后在
140
+ `plugins/dsh-strict-spec` 中再次执行 `bun run build` 即可;tarball 安装是固定
141
+ 副本,需要重新打包并再次 add 才能替换。然后在要查看的 workspace 中启动 Web
142
+ 客户端:
143
+
144
+ ```sh
145
+ cd /path/to/your/project
146
+ dsh web
147
+ ```
148
+
149
+ 使用 `dsh plugin --profile web remove dsh-plugin-strict-spec` 卸载插件。
150
+
151
+ ## 升级 dsh 宿主
152
+
153
+ 插件固定在其构建时所针对的 dsh 版本上(见上文 `engines.dsh`),按照本仓库
154
+ narrow-engines-dsh-pin 技术标准,放宽该范围本身就是一次独立的 planned
155
+ change——绝不在其他变更里顺手改动。升级 dsh 宿主之后:
156
+
157
+ 1. 用 `dsh --version` 核对当前版本是否仍在固定范围内。
158
+ 2. 找不到 *Strict 文档* 面板?这是版本范围在起作用,不是安装坏了:超出范围时
159
+ 插件刻意不注册任何文档界面。
160
+ 3. 规划一次独立变更,把 `plugins/dsh-strict-spec/package.json` 的
161
+ `engines.dsh` 提升到新的补丁线,针对该版本重新测试查看器,并随变更落地
162
+ 所需的适配修正。
163
+ 4. 在该变更的 checkout 中重新构建(在 `plugins/dsh-strict-spec` 内执行
164
+ `bun install && bun run build`);tarball 安装需要重新打包并再次 add,
165
+ `link:` 安装持续指向 checkout,只需重新构建。
166
+ 5. 重启 `dsh web`(Desktop 需先完全退出)让 profile 重新组合,然后刷新页面。
167
+
168
+ 本 SOP 中今天可执行的命令——构建、`link:` 安装到隔离 profile、启动宿主、在
169
+ 浏览器中加载两个入口——均已对 dsh 0.2.1-rc.2 实测验证;面向未来版本的步骤
170
+ (第 3–4 步针对超出范围的宿主)在该版本发布之前无法实际运行。
171
+
172
+ ## 安装到 Desktop profile
173
+
174
+ `desktop` profile 归 DeepSeek Harness Desktop 应用所有,通过 npm 安装的 `dsh`
175
+ 会拒绝管理它。请改用 Desktop 安装包自带的 `dsh` 命令:
176
+
177
+ 1. 先打开一次 DeepSeek Harness Desktop,让它初始化自己的 profile,然后完全
178
+ 退出。
179
+ 2. 使用 Desktop 自带的 `dsh`,针对 desktop profile 执行同样的 `add` 命令,
180
+ 可使用任一种安装来源:
181
+
182
+ ```sh
183
+ dsh plugin --profile desktop add "link:/path/to/strict-spec-driven/plugins/dsh-strict-spec"
184
+ ```
185
+
186
+ 3. 重新启动 Desktop。
187
+
188
+ 安装期间请保持 Desktop 关闭;卸载时同样使用 `remove dsh-plugin-strict-spec`。
189
+
190
+ 以上 Desktop 步骤依据 dsh 0.2.1-rc.2 关于 Desktop 专属 profile 的文档编写,尚未
191
+ 端到端实际运行验证;Web 客户端安装是已验证的路径。
@@ -0,0 +1,5 @@
1
+ # dsh-plugin-strict-spec bundle layer: inserts this package's host entry into
2
+ # the profile's plugin tree so the client bundle is served under /plugins.
3
+ - insert:
4
+ - id: ui-strict-spec
5
+ name: dsh-plugin-strict-spec