@chengzhao-dev/dsh-cpp-workflow 0.5.0 → 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.
package/README.en.md CHANGED
@@ -19,13 +19,13 @@ The exception material follows the C++ Core Guidelines' Error handling section a
19
19
  Pinned npm install:
20
20
 
21
21
  ```bash
22
- dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.5.0
22
+ dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.5.1
23
23
  ```
24
24
 
25
25
  The matching Git tag:
26
26
 
27
27
  ```bash
28
- dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.5.0
28
+ dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.5.1
29
29
  ```
30
30
 
31
31
  The desktop app owns the `desktop` profile. If the command-line `add` is rejected, add the plugin in the app settings and use the same pinned npm version. A Git tag install uses the prebuilt `lib/` committed in the repository and runs no build on the target machine; the package has no install script that needs approval.
package/README.md CHANGED
@@ -19,13 +19,13 @@
19
19
  npm 安装钉死版本:
20
20
 
21
21
  ```bash
22
- dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.5.0
22
+ dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.5.1
23
23
  ```
24
24
 
25
25
  同版本的 Git 标签:
26
26
 
27
27
  ```bash
28
- dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.5.0
28
+ dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.5.1
29
29
  ```
30
30
 
31
31
  桌面应用独占 `desktop` profile。命令行 `add` 被拒绝时,在应用设置里添加插件,地址填同一个 npm 版本。Git 标签安装使用仓库内已构建的 `lib/`,不在目标机器上重新构建;包内也不含需要授权执行的安装脚本。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chengzhao-dev/dsh-cpp-workflow",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "C++11–C++23 工程流程技能包:源码四步、CMake 三步与构建三步,按项目声明的环境组合校验 · C++11–C++23 workflow skills for DeepSeek Harness",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -38,6 +38,14 @@ metadata:
38
38
 
39
39
  每步只打开同号的一个步骤文件。判不准才打开 `examples/` 里与该步对应的案例;`references/` 保存完整条文,只在排错、整目录重构,或步骤里明确指向某一条文时按需打开。链接、rpath 与产物布局读 `references/linking.md`;CMake 的 target、标准和函数写法读 `../configuring-cmake/references/`,可复用片段在 `../configuring-cmake/assets/cmake/`。
40
40
 
41
+ 本轮激活按三条上限走:
42
+
43
+ - 只开当前步对应的一个步骤文件;本轮已经开了别的技能,就不再开第二个技能的步骤。
44
+ - 条文只开该步点名的一份;同号案例留到下一次激活。
45
+ - 标准档只打开项目技能声明的那一档,没有声明时用本技能已有的新工程默认,不把其余标准档读进来。
46
+
47
+ 项目技能列出了检查命令时只跑那一条,没有时跑本技能自己的 `scripts/checking-environment.mjs` 与 `scripts/checking-encoding.mjs`;退出码为 0 后在同一轮结束 goal,不再继续走没有失败的步骤。
48
+
41
49
  ### 四类改动
42
50
 
43
51
  先认这次改的是哪一类,再决定从哪一步进;一次改动混了两类时,按「写作 → 布局 → 排版 → 润色」的次序拆开做。
@@ -34,6 +34,14 @@ metadata:
34
34
 
35
35
  每步只打开同号的一个步骤文件。判不准才打开 `examples/cmake.md`;`references/cmake.md` 保存 target、链接、输出、RPATH、依赖与反模式的完整条文,`references/cxx-standard.md` 保存 C++11–C++23 的标准映射,`references/modules.md` 保存函数与模块契约。可复制的函数在 `assets/cmake/`:`CompileSettings.cmake` 放标准与警告,`LinkSettings.cmake` 放构建期 RPATH 与 GoogleTest 依赖;一个文件按性质收一组函数。
36
36
 
37
+ 本轮激活按三条上限走:
38
+
39
+ - 只开当前步对应的一个步骤文件;本轮已经开了别的技能,就不再开第二个技能的步骤。
40
+ - 条文只开该步点名的一份;同号案例留到下一次激活。
41
+ - 标准档只打开项目技能声明的那一档,没有声明时用本技能已有的新工程默认,不把其余标准档读进来。
42
+
43
+ 项目技能列出了检查命令时只跑那一条,没有时跑插件根目录的 `npm test`;退出码为 0 后在同一轮结束 goal,不再继续走没有失败的步骤。
44
+
37
45
  五档标准的语言设施、工具映射与降档仍由 `building-cpp/references/standards/` 维护;本技能只负责这些标准在 CMake 里怎么写。
38
46
 
39
47
  ### 四类改动
@@ -35,6 +35,14 @@ metadata:
35
35
 
36
36
  每步只打开同号的一个步骤文件。判不准才打开 `examples/` 里与该步对应的案例;`references/` 保存完整条文,只在排错、整目录重构,或步骤里明确指向某一条文时按需打开。性能问题读 `references/performance.md`,标准库设施选型读 `references/standard-library.md`,链接与产物的细节读 `building-cpp` 的 `references/linking.md`。
37
37
 
38
+ 本轮激活按三条上限走:
39
+
40
+ - 只开当前步对应的一个步骤文件;本轮已经开了别的技能,就不再开第二个技能的步骤。
41
+ - 条文只开该步点名的一份;同号案例留到下一次激活。
42
+ - 标准档只打开项目技能声明的那一档,没有声明时用本技能已有的新工程默认,不把其余标准档读进来。
43
+
44
+ 项目技能列出了检查命令时只跑那一条,没有时跑本技能自己的 `scripts/checking-comments.mjs`;退出码为 0 后在同一轮结束 goal,不再继续走没有失败的步骤。
45
+
38
46
  ### 四类改动
39
47
 
40
48
  先认这次改的是哪一类,再决定从哪一步进;一次改动混了两类时,按「写作 → 布局 → 排版 → 润色」的次序拆开做,前一类落定并经检查再进下一类。
@@ -1,4 +1,4 @@
1
- # 正反例:注释
1
+ # 正反例:声明注释与文件头
2
2
 
3
3
  ## 文件头
4
4
 
@@ -204,56 +204,6 @@ GameResult result_ = GameResult::kInProgress; // 对局结果;落子被拒时
204
204
 
205
205
  行尾写「存什么 + 初值含义 + 什么时候变」,同类成员对齐。
206
206
 
207
- ## 实现注释
208
-
209
- **差**:
210
-
211
- ```cpp
212
- // 遍历所有空格
213
- for (const auto& position : empty_cells) {
214
- // 尝试落子
215
- const bool wins = game.Board().CompletesLine(position, cell_type);
216
- // 如果能赢
217
- if (wins) {
218
- // 返回这一手
219
- return position;
220
- }
221
- }
222
- ```
223
-
224
- 每行都在复述代码。
225
-
226
- **好**:
227
-
228
- ```cpp
229
- // 先找能立刻赢的格子:启发式只在「马上赢」和「马上挡」之间做选择,
230
- // 不在这里做更深的前瞻,深搜留给 MinimaxAi。
231
- for (const auto& position : empty_cells) {
232
- if (game.CompletesLine(position, CellType::kX)) {
233
- return position;
234
- }
235
- }
236
- ```
237
-
238
- 解释「为什么停在这一层」,不翻译语句。
239
-
240
- ## TODO
241
-
242
- **差**:
243
-
244
- ```cpp
245
- // TODO: 参考 xxx
246
- // FIXME: 这里可能有问题
247
- ```
248
-
249
- **好**:
250
-
251
- ```cpp
252
- // TODO: 阶段 5 - 给 MinimaxAi 加置换表,减少重复局面的搜索。
253
- ```
254
-
255
- 有定位、有动作、能搜索。
256
-
257
207
  ## 配置注释
258
208
 
259
209
  **差**:
@@ -0,0 +1,53 @@
1
+ # 正反例:实现注释
2
+
3
+ 实现注释只写本层为什么停在这里;声明注释、文件头与配置注释见 `comments-declaration.md`。
4
+
5
+ ## 实现注释
6
+
7
+ **差**:
8
+
9
+ ```cpp
10
+ // 遍历所有空格
11
+ for (const auto& position : empty_cells) {
12
+ // 尝试落子
13
+ const bool wins = game.Board().CompletesLine(position, cell_type);
14
+ // 如果能赢
15
+ if (wins) {
16
+ // 返回这一手
17
+ return position;
18
+ }
19
+ }
20
+ ```
21
+
22
+ 每行都在复述代码。
23
+
24
+ **好**:
25
+
26
+ ```cpp
27
+ // 先找能立刻赢的格子:启发式只在「马上赢」和「马上挡」之间做选择,
28
+ // 不在这里做更深的前瞻,深搜留给 MinimaxAi。
29
+ for (const auto& position : empty_cells) {
30
+ if (game.CompletesLine(position, CellType::kX)) {
31
+ return position;
32
+ }
33
+ }
34
+ ```
35
+
36
+ 解释「为什么停在这一层」,不翻译语句。
37
+
38
+ ## TODO
39
+
40
+ **差**:
41
+
42
+ ```cpp
43
+ // TODO: 参考 xxx
44
+ // FIXME: 这里可能有问题
45
+ ```
46
+
47
+ **好**:
48
+
49
+ ```cpp
50
+ // TODO: 阶段 5 - 给 MinimaxAi 加置换表,减少重复局面的搜索。
51
+ ```
52
+
53
+ 有定位、有动作、能搜索。
@@ -30,4 +30,4 @@
30
30
 
31
31
  - 命名、访问器、语义角色:`examples/naming.md`。
32
32
  - 异常声明与返回值选择:`examples/exceptions.md`。
33
- - 声明注释写成了实现说明:`examples/comments.md`「声明注释」。
33
+ - 声明注释写成了实现说明:`examples/comments-declaration.md`。
@@ -33,6 +33,6 @@
33
33
 
34
34
  ## 正反例指针
35
35
 
36
- - 实现注释复述代码、分组混乱:`examples/comments.md`「实现注释」。
36
+ - 实现注释复述代码、分组混乱:`examples/comments-implementation.md`「实现注释」。
37
37
  - 异常类型与结果类型混用:`examples/exceptions.md`「什么时候抛」。
38
38
  - `std::format` 与流输出混用得当:`examples/exceptions.md`「异常类型与消息」。