@chengzhao-dev/dsh-cpp-workflow 0.6.12 → 0.6.13
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.6.
|
|
22
|
+
dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.6.13
|
|
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.6.
|
|
28
|
+
dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.6.13
|
|
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.6.
|
|
22
|
+
dsh plugin --profile web add npm:@chengzhao-dev/dsh-cpp-workflow@0.6.13
|
|
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.6.
|
|
28
|
+
dsh plugin --profile web add github:chengzhao-dev/dsh-cpp-workflow#v0.6.13
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
桌面应用独占 `desktop` profile。命令行 `add` 被拒绝时,在应用设置里添加插件,地址填同一个 npm 版本。Git 标签安装使用仓库内已构建的 `lib/`,不在目标机器上重新构建;包内也不含需要授权执行的安装脚本。
|
package/package.json
CHANGED
|
@@ -19,14 +19,17 @@ metadata:
|
|
|
19
19
|
|
|
20
20
|
源码和构建文件用 UTF-8 无 BOM、检出 LF;`.bat` / `.cmd` 用 CRLF;`.clang-format` 写 `LineEnding: LF`。MSVC 原生构建优先加 `/utf-8`,不要靠 BOM 过关。完整规则见 `references/encoding.md`,检查脚本是 `scripts/checking-encoding.mjs`,机器规则以仓库根 `.gitattributes` 与 `.editorconfig` 为准。
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## 三种操作
|
|
23
23
|
|
|
24
|
-
|
|
|
24
|
+
| 操作 | 什么时候用 | 从哪步进 |
|
|
25
25
|
| --- | --- | --- |
|
|
26
|
-
|
|
|
27
|
-
|
|
|
26
|
+
| 写作(起稿) | 改环境轴、入口脚本或构建流程 | 第 1 步;新工程走到第 3 步 |
|
|
27
|
+
| 改写 | 环境轴与 target 契约不变,工具配置位置或流程顺序不对 | 从第 2 步重走,可到第 3 步 |
|
|
28
|
+
| 润色 | 只改诊断措辞或失败分流说明 | 第 3 步 |
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
范围随任务定:单点修正只改一条配置或诊断;整段重构先确认 target 与标准已由 configuring-cmake 写好,再改工具文件,最后跑完整检查。
|
|
31
|
+
|
|
32
|
+
三种操作共用这些约束:不发明项目没有声明的环境轴、命令和 target;只改格式或配置时不改可观察行为;不覆盖已有源码、`CMakeLists.txt` 和 `.clang-*`;不安装工具链;代理侧不写 `wsl` 或 `bash -lc`。后一步发现前一步没做完,退回那一步。拿不准先用单点修正;发现环境轴、编译器、构建目录或 target 契约需要改,退回整段,并转 `configuring-cmake`。
|
|
30
33
|
|
|
31
34
|
## 步骤
|
|
32
35
|
|
|
@@ -48,7 +51,7 @@ metadata:
|
|
|
48
51
|
|
|
49
52
|
### 四类改动
|
|
50
53
|
|
|
51
|
-
|
|
54
|
+
四类改动是操作内部的域,不是独立的操作:写作域定环境与流程,布局与排版改配置与形态,润色只改措辞。一次改动混了两类时,按「写作 → 布局 → 排版 → 润色」的次序拆开做。
|
|
52
55
|
|
|
53
56
|
| 类型 | 典型请求 | 从哪进 | 先读哪份条文 |
|
|
54
57
|
| --- | --- | --- | --- |
|
|
@@ -11,18 +11,21 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
本技能处理 CMake 文件与 target 契约:`CMakeLists.txt`、`cmake/` 模块、`target_*` 命令、目标属性、include 与链接边界、输出目录、共享库运行时路径、`FetchContent`、preset 与安装导出。函数体、类型、命名、异常和源码注释只开 `developing-cpp`;配置完成后要跑构建、格式化、静态检查或入口脚本时开 `building-cpp`。
|
|
13
13
|
|
|
14
|
-
一次改动同时碰到源码和 CMake 时先开 `developing-cpp` 定行为与边界,再用本技能把源文件、库和程序写进 target,最后到 `building-cpp` 跑检查。只改一个 target 的 include
|
|
14
|
+
一次改动同时碰到源码和 CMake 时先开 `developing-cpp` 定行为与边界,再用本技能把源文件、库和程序写进 target,最后到 `building-cpp` 跑检查。只改一个 target 的 include、链接或标准时走单点修正;新工程、新组件、换语言标准或抽公共函数时走整段重构。
|
|
15
15
|
|
|
16
16
|
存在项目技能 `cpp-workflow-project` 时先读它的 `SKILL.md`、`environment.json` 和 `stages/stage-table.md`。`environment.json` 的 `standard` 是 target 标准的唯一来源;缺失、非法或与现有 target 不一致时停在定 target,不猜标准。构建目录、编译器和工具版本由 `building-cpp` 的定构建负责,本技能只写 target 契约。
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 三种操作
|
|
19
19
|
|
|
20
|
-
|
|
|
20
|
+
| 操作 | 什么时候用 | 从哪步进 |
|
|
21
21
|
| --- | --- | --- |
|
|
22
|
-
|
|
|
23
|
-
|
|
|
22
|
+
| 写作(起稿) | 新增 target、改公共 include 或链接边界、换语言标准 | 第 1 步;新工程走到第 3 步 |
|
|
23
|
+
| 改写 | target 图与标准不变,模块、函数或目录结构不对 | 从第 2 步重走,可到第 3 步 |
|
|
24
|
+
| 润色 | 只改函数名、注释措辞或错误消息 | 第 2 步 |
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
范围随任务定:单点修正只改一个 target 的一处;整段重构先定 target 图与标准,再定模块与函数,最后跑完整检查。
|
|
27
|
+
|
|
28
|
+
三种操作共用这些约束:不发明项目没有声明的 target、标准、编译器或目录;不覆盖已有 `CMakeLists.txt`;不用全局 `include_directories()`、`add_definitions()`、`CMAKE_CXX_FLAGS` 给所有 target 加料;不写 `file(GLOB ...)`;不把 `main()` 编进库;库与程序不下载依赖,只有测试需要时调用 `LinkSettings_FetchGoogleTest`。后一步发现前一步没做完,退回那一步。
|
|
26
29
|
|
|
27
30
|
## 步骤
|
|
28
31
|
|
|
@@ -46,14 +49,14 @@ metadata:
|
|
|
46
49
|
|
|
47
50
|
### 四类改动
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
四类改动是操作内部的域,不是独立的操作:写作域定 target 与边界,布局与排版改模块与形态,润色只改措辞。一次改动混了两类时,按「写作 → 布局 → 排版 → 润色」的次序拆开做。
|
|
50
53
|
|
|
51
54
|
| 类型 | 典型请求 | 从哪进 | 先读哪份条文 |
|
|
52
55
|
| --- | --- | --- | --- |
|
|
53
56
|
| 写作 | 新增 target、改公共 include 或链接边界、换语言标准 | 第 1 步 | `steps/01-targets.md`、`references/cxx-standard.md` |
|
|
54
57
|
| 布局 | 抽函数、拆模块、调导入位置 | 第 2 步 | `steps/02-modules.md`、`references/modules.md` |
|
|
55
|
-
| 排版 | 只改 2 空格、行宽或注释形态 | 第 2 步的契约写法 | `references/cmake.md`、`references/modules.md` |
|
|
56
|
-
| 润色 | 只改函数名、注释措辞或错误消息 | 第 2 步 | `references/modules.md` |
|
|
58
|
+
| 排版 | 只改 2 空格、行宽或注释形态 | 第 2 步的契约写法 | `steps/02-modules.md`、`references/cmake.md`、`references/modules.md` |
|
|
59
|
+
| 润色 | 只改函数名、注释措辞或错误消息 | 第 2 步 | `steps/02-modules.md`、`references/modules.md` |
|
|
57
60
|
|
|
58
61
|
## 完成判据
|
|
59
62
|
|
|
@@ -15,14 +15,17 @@ metadata:
|
|
|
15
15
|
|
|
16
16
|
源码和构建文件的编码以 `building-cpp` 的 `references/encoding.md` 为准;行尾与 `.clang-format` 的 `LineEnding` 跟仓库根 `.gitattributes` 和 `.editorconfig`。
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 三种操作
|
|
19
19
|
|
|
20
|
-
|
|
|
20
|
+
| 操作 | 什么时候用 | 从哪步进 |
|
|
21
21
|
| --- | --- | --- |
|
|
22
|
-
|
|
|
23
|
-
|
|
|
22
|
+
| 写作(起稿) | 新增类型、函数或文件;改可观察行为;改库与程序的边界;补构造后置条件与成员事实 | 第 1 步;新工程走到第 4 步 |
|
|
23
|
+
| 改写 | 行为与契约不变,文件位置、声明顺序或函数体组织不对 | 从被打破的步重走,可到第 4 步 |
|
|
24
|
+
| 润色 | 只改命名或注释措辞 | 第 3 步 |
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
范围随任务定:单点修正只改判为不合格的一处,其余保持原样;整段重构第 1、2 步先定删留,不动函数体,第 3、4 步才改代码。
|
|
27
|
+
|
|
28
|
+
三种操作共用这些约束:不发明阶段表和用户请求里没有的行为、类型和命令;选类型与写法时以项目声明的语言标准为上限;只改注释或格式时不改可观察行为;不覆盖已有源码;不安装工具链;代理侧不写 `wsl` 或 `bash -lc`。计划、命名方案或注释措辞与条文、项目技能或用户明确要求冲突时,先列冲突位置、原文与出处,由用户选一条;不自行取舍,也不默认采用计划。后一步发现前一步没做完,退回那一步,不在当前步补结构。拿不准先用单点修正;做到一半发现边界被打破,退回整段重构,从被打破的那一步重走。
|
|
26
29
|
|
|
27
30
|
## 步骤
|
|
28
31
|
|
|
@@ -45,7 +48,7 @@ metadata:
|
|
|
45
48
|
|
|
46
49
|
### 四类改动
|
|
47
50
|
|
|
48
|
-
|
|
51
|
+
四类改动是操作内部的域,不是独立的操作:写作域定行为与边界,布局与排版只改形状,润色只改措辞。一次改动混了两类时,按「写作 → 布局 → 排版 → 润色」的次序拆开做,前一类落定并经检查再进下一类。
|
|
49
52
|
|
|
50
53
|
| 类型 | 典型请求 | 入口步骤 |
|
|
51
54
|
| --- | --- | --- |
|