已合并
【PR】: 迁移ErrorMessage整改相关的SKILL #4171
【PR】: 迁移ErrorMessage整改相关的SKILL #4171
已合并
guo-yanjun创建于 19 天前
25 个文件变更+75-68
R.claude/skills/errmsg-codegen/SKILL.md.agents/skills/errmsg-codegen/SKILL.md+13-6
@@ -1,8 +1,13 @@
1+---
2+name: errmsg-codegen
3+description: "根据 Runtime error_code.json 中已有的错误码定义生成或更新错误码代码,包括 error_code_meta.h 中的 X-Macro 表行和 rt_error_code_test.cc 中的 UT 参数数据。当用户要求新增 EE/EH/W 类错误码、自动生成错误码代码、同步错误码元数据或补齐错误码 UT 数据时使用。"
4+---
5+ 
1# 错误码自动生成 Skill6# 错误码自动生成 Skill
2 7 
3## 触发场景8## 触发场景
4 9 
5-用户说「新增错误码 EE1021」「自动生成错误码代码」→ 自动生成 X-Macro 表行 + UT 测试数据。10+用户说「新增错误码」「自动生成错误码代码」→ 自动生成 X-Macro 表行 + UT 测试数据。
6 11 
7## 输入12## 输入
8 13 
@@ -10,12 +15,12 @@
10 15 
11### Step 1: 查找 JSON16### Step 1: 查找 JSON
12 17 
13-```bash18+使用 JSON 解析工具在 `src/dfx/error_manager/error_code.json` 中按 `ErrCode` 精确查找条目。仅当主配置不存在时,再检查 `src/conf/error_manager/error_code.json`。
14-grep -A10 "\"ErrCode\": \"EE1021\"" src/dfx/error_manager/error_code.json src/conf/error_manager/error_code.json 2>/dev/null
15-```
16 19 
17如果找不到 → 提示用户先在 `error_code.json` 中补充该错误码定义,然后重试。20如果找不到 → 提示用户先在 `error_code.json` 中补充该错误码定义,然后重试。
18 21 
22+写入前检查目标错误码是否已存在于 X-Macro 表和 UT 数据中,避免生成重复条目。
23+ 
19### Step 2: 解析 JSON 条目24### Step 2: 解析 JSON 条目
20 25 
21从 JSON 提取:26从 JSON 提取:
@@ -45,16 +50,18 @@ X(EEXXXX, "EEXXXX", \
45 50 
46**规则**51**规则**
47- `Arglist` 中逗号分隔的参数名,每个用 `"param"` 包裹,整体用 `()` 包裹52- `Arglist` 中逗号分隔的参数名,每个用 `"param"` 包裹,整体用 `()` 包裹
53+- `Arglist` 为空时生成零参数形式,UT 参数个数使用 `0`
48- `ErrMessage` 末尾追加 `. ErrorCode=EEXXXX.\n`54- `ErrMessage` 末尾追加 `. ErrorCode=EEXXXX.\n`
49- 如果 `ErrMessage` 末尾已有句号,不加额外句号55- 如果 `ErrMessage` 末尾已有句号,不加额外句号
56+- `ErrMessage` 中格式化占位符数量必须与 `Arglist` 参数数量一致
50 57 
51### Step 5: 插入表58### Step 5: 插入表
52 59 
53-在 `src/runtime/core/inc/common/error_code_meta.h` 的 `RUNTIME_ERROR_CODE_TABLE` 宏中,按错误码编号顺序插入到合适位置。60+在 `src/runtime/core/inc/common/error_code_meta.h` 的 `RUNTIME_ERROR_CODE_TABLE` 宏中,按仓库现有错误码规则插入到合适位置。目标错误码已存在时更新现有条目,不得重复插入。
54 61 
55### Step 6: 更新 UT 数据62### Step 6: 更新 UT 数据
56 63 
57-在 `tests/ut/runtime/runtime/test/rt_error_code_test.cc` 的 `ErrorCodeTableParamCountMatchesMessageFormat` 测试的 `allCodes` 数组中追加一行:64+在 `tests/ut/runtime/runtime/test/rt_error_code_test.cc` 的 `ErrorCodeTableParamCountMatchesMessageFormat` 测试的 `allCodes` 数组中按现有顺序插入或更新一行:
58 65 
59```cpp66```cpp
60{ErrorCode::EEXXXX, N}, // N = Arglist 中的参数个数67{ErrorCode::EEXXXX, N}, // N = Arglist 中的参数个数
R.claude/skills/errmsg-ut-setup/SKILL.md.agents/skills/errmsg-ut-setup/SKILL.md+15-8
@@ -1,3 +1,8 @@
1+---
2+name: errmsg-ut-setup
3+description: "为 Runtime 搭建 ErrMsg 真实上报 UT 验证框架,使 ErrorManager::ATCReportErrMessage 使用真实实现并输出格式化错误信息。当用户要求验证 ErrMsg 整改效果、编写真实 ErrorManager UT、测试 ErrMsg 格式化输出或运行 ErrMsg UT 验证时使用。"
4+---
5+ 
1# ErrMsg UT 验证框架快速搭建 Skill6# ErrMsg UT 验证框架快速搭建 Skill
2 7 
3## 触发场景8## 触发场景
@@ -30,13 +35,13 @@
30- 排除 `error_manager_stub.cc`35- 排除 `error_manager_stub.cc`
31- 使用 `target_compile_options(... -UCFG_DEV_PLATFORM_PC)` 取消定义36- 使用 `target_compile_options(... -UCFG_DEV_PLATFORM_PC)` 取消定义
32 37 
33-详见附录 A。38+详见[附录 A](appendix_a_cmake.txt)
34 39 
35### Step 2: 修改 stub 头文件40### Step 2: 修改 stub 头文件
36 41 
37修改 `tests/ut/runtime/runtime/stub/rt_utest_stub.h`,将 stub `ErrorManager` 类用条件编译包裹。42修改 `tests/ut/runtime/runtime/stub/rt_utest_stub.h`,将 stub `ErrorManager` 类用条件编译包裹。
38 43 
39-详见附录 B。44+详见[附录 B](appendix_b_stub.txt)
40 45 
41### Step 3: 创建测试文件46### Step 3: 创建测试文件
42 47 
@@ -46,7 +51,7 @@
46- 使用 lambda 包装宏调用(解决 void 函数 return value 问题)51- 使用 lambda 包装宏调用(解决 void 函数 return value 问题)
47- 调用实际代码中的宏(如 `COND_RETURN_AND_MSG_OUTER`52- 调用实际代码中的宏(如 `COND_RETURN_AND_MSG_OUTER`
48 53 
49-详见附录 C。54+详见[附录 C](appendix_c_test.txt)
50 55 
51### Step 4: 准备 error_code.json56### Step 4: 准备 error_code.json
52 57 
@@ -96,12 +101,14 @@ Failed to allocate 1024 bytes host memory for Runtime.
96 101 
97## 附录文件102## 附录文件
98 103 
99-- **附录 A**:`appendix_a_cmake.txt` - CMakeLists.txt 追加内容104+- **附录 A**:[appendix_a_cmake.txt](appendix_a_cmake.txt) - CMakeLists.txt 追加内容
100-- **附录 B**:`appendix_b_stub.txt` - stub 头文件条件编译修改105+- **附录 B**:[appendix_b_stub.txt](appendix_b_stub.txt) - stub 头文件条件编译修改
101-- **附录 C**:`appendix_c_test.txt` - 测试文件完整模板106+- **附录 C**:[appendix_c_test.txt](appendix_c_test.txt) - 测试文件完整模板
107+- **附录 D**:[appendix_d_commands.txt](appendix_d_commands.txt) - 完整编译、运行命令与常见问题
102 108 
103## 注意事项109## 注意事项
104 110 
1051. 此测试目标仅用于本地验证,不提交到仓库1111. 此测试目标仅用于本地验证,不提交到仓库
106-2. 测试完成后可恢复 stub 文件原始状态112+2. 修改前记录 worktree 中已有改动,不覆盖用户已修改的 CMake、stub 或测试文件
107-3. 如需新增错误码测试参考附录 C 中已有测试用例格式113+3. 验证结束后只清理本次创建的临时内容;未经用户授权不使用可能丢失已有改动的恢复命令
114+4. 如需新增错误码测试,参考[附录 C](appendix_c_test.txt)中已有测试用例格式
R.claude/skills/errmsg-ut-setup/appendix_a_cmake.txt.agents/skills/errmsg-ut-setup/appendix_a_cmake.txt+0-0
文件重命名但无更改。
R.claude/skills/errmsg-ut-setup/appendix_b_stub.txt.agents/skills/errmsg-ut-setup/appendix_b_stub.txt+0-0
文件重命名但无更改。
R.claude/skills/errmsg-ut-setup/appendix_c_test.txt.agents/skills/errmsg-ut-setup/appendix_c_test.txt+0-0
文件重命名但无更改。
R.claude/skills/errmsg-ut-setup/appendix_d_commands.txt.agents/skills/errmsg-ut-setup/appendix_d_commands.txt+1-1
@@ -71,7 +71,7 @@ cp src/dfx/error_manager/error_code.json src/conf/error_manager/
71 71 
72**原因**:未修改 `stub/rt_utest_stub.h`,stub ErrorManager 与真实 ErrorManager 冲突。72**原因**:未修改 `stub/rt_utest_stub.h`,stub ErrorManager 与真实 ErrorManager 冲突。
73 73 
74-**解决**:按附录 B 修改 stub 头文件,添加条件编译。74+**解决**:按[附录 B](appendix_b_stub.txt)修改 stub 头文件,添加条件编译。
75 75 
76### 问题 2:ErrMsg 输出为空76### 问题 2:ErrMsg 输出为空
77 77 
R.claude/skills/runtime-code-review/SKILL.md.agents/skills/runtime-code-review/SKILL.md+6-6
@@ -14,9 +14,9 @@ description: |
14 14 
15## 共享规则15## 共享规则
16 16 
17-无论进入哪种模式,都必须读取共享规则文件:17+无论进入哪种模式,都必须读取相对于本 `SKILL.md` 所在目录的共享规则文件:
18 18 
19-- `.claude/skills/runtime-code-review/review-rules.md`19+- [review-rules.md](review-rules.md)
20 20 
21该规则文件定义:21该规则文件定义:
22 22 
@@ -30,14 +30,14 @@ description: |
30 30 
31### 进入 `local-review`31### 进入 `local-review`
32 32 
33-满足以下任一情况时,使用 `local-review.md`33+满足以下任一情况时,使用 [local-review.md](local-review.md)
34 34 
35- 用户要求审查当前分支、本地改动、最近提交、指定文件35- 用户要求审查当前分支、本地改动、最近提交、指定文件
36- 用户运行 `runtime-code-review`,但未提供 PR 链接或 PR 编号36- 用户运行 `runtime-code-review`,但未提供 PR 链接或 PR 编号
37 37 
38### 进入 `pr-review`38### 进入 `pr-review`
39 39 
40-满足以下任一情况时,使用 `pr-review.md`40+满足以下任一情况时,使用 [pr-review.md](pr-review.md)
41 41 
42- 用户提供 GitCode PR / MR 链接42- 用户提供 GitCode PR / MR 链接
43- 用户给出 PR 编号并要求审查43- 用户给出 PR 编号并要求审查
@@ -54,8 +54,8 @@ description: |
54- ❌ 向 GitCode PR 发布 summary comment54- ❌ 向 GitCode PR 发布 summary comment
55- ❌ 向 GitCode PR 发布行内评论(inline comments)55- ❌ 向 GitCode PR 发布行内评论(inline comments)
56- ❌ 使用任何 GitCode API 进行 POST/DELETE 评论操作56- ❌ 使用任何 GitCode API 进行 POST/DELETE 评论操作
57-- ❌ 调用 `post_pr_summary_comment.py`57+- ❌ 调用 [scripts/post_pr_summary_comment.py](scripts/post_pr_summary_comment.py)
58-- ❌ 调用 `post_pr_inline_comment.py`58+- ❌ 调用 [scripts/post_pr_inline_comment.py](scripts/post_pr_inline_comment.py)
59- ❌ 使用 `--comment``--post-inline-comments` 参数运行脚本59- ❌ 使用 `--comment``--post-inline-comments` 参数运行脚本
60 60 
61### 触发条件61### 触发条件
R.claude/skills/runtime-code-review/local-review.md.agents/skills/runtime-code-review/local-review.md+2-2
@@ -21,7 +21,7 @@ git diff origin/master...HEAD
21## 执行流程21## 执行流程
22 22 
231. 获取本地审查范围和变更文件列表231. 获取本地审查范围和变更文件列表
24-2. 读取共享规则文件:`.claude/skills/runtime-code-review/review-rules.md`24+2. 读取共享规则文件:[review-rules.md](review-rules.md)
253. 按文件分类加载规范文档:253. 按文件分类加载规范文档:
26 - 源码文件:`docs/zh/guidelines/coding-guidelines.md`26 - 源码文件:`docs/zh/guidelines/coding-guidelines.md`
27 - 涉及 Error Message 相关变更:在上面的基础上,额外读取27 - 涉及 Error Message 相关变更:在上面的基础上,额外读取
@@ -36,4 +36,4 @@ git diff origin/master...HEAD
36## 注意事项36## 注意事项
37 37 
38- 本模式只负责本地 diff 的获取与审查,不处理 GitCode PR API。38- 本模式只负责本地 diff 的获取与审查,不处理 GitCode PR API。
39-- 如果用户要求对 GitCode PR 进行审查,应切换到 `pr-review.md`39+- 如果用户要求对 GitCode PR 进行审查,应切换到 [pr-review.md](pr-review.md)
R.claude/skills/runtime-code-review/pr-review.md.agents/skills/runtime-code-review/pr-review.md+32-32
@@ -6,7 +6,7 @@
6 6 
7**禁止主动发布评论**:在用户没有明确要求时,绝对不能向 GitCode 发布任何评论。7**禁止主动发布评论**:在用户没有明确要求时,绝对不能向 GitCode 发布任何评论。
8 8 
9-详见 `SKILL.md` 中的"关键约束:禁止主动发布评论"章节。9+详见 [SKILL.md](SKILL.md) 中的"关键约束:禁止主动发布评论"章节。
10 10 
11## 输入参数11## 输入参数
12 12 
@@ -33,17 +33,17 @@
33 33 
34可配合以下脚本使用:34可配合以下脚本使用:
35 35 
36-- `.claude/skills/runtime-code-review/scripts/fetch_pr_meta.py`36+- [scripts/fetch_pr_meta.py](scripts/fetch_pr_meta.py)
37-- `.claude/skills/runtime-code-review/scripts/fetch_pr_files.py`37+- [scripts/fetch_pr_files.py](scripts/fetch_pr_files.py)
38-- `.claude/skills/runtime-code-review/scripts/fetch_pr_raw_file.py`38+- [scripts/fetch_pr_raw_file.py](scripts/fetch_pr_raw_file.py)
39-- `.claude/skills/runtime-code-review/scripts/classify_review_files.py`39+- [scripts/classify_review_files.py](scripts/classify_review_files.py)
40-- `.claude/skills/runtime-code-review/scripts/should_skip_pr_review.py`40+- [scripts/should_skip_pr_review.py](scripts/should_skip_pr_review.py)
41-- `.claude/skills/runtime-code-review/scripts/prepare_pr_review_context.py`41+- [scripts/prepare_pr_review_context.py](scripts/prepare_pr_review_context.py)
42-- `.claude/skills/runtime-code-review/scripts/render_pr_review_summary.py`42+- [scripts/render_pr_review_summary.py](scripts/render_pr_review_summary.py)
43-- `.claude/skills/runtime-code-review/scripts/post_pr_summary_comment.py`43+- [scripts/post_pr_summary_comment.py](scripts/post_pr_summary_comment.py)
44-- `.claude/skills/runtime-code-review/scripts/post_pr_inline_comment.py`44+- [scripts/post_pr_inline_comment.py](scripts/post_pr_inline_comment.py)
45-- `.claude/skills/runtime-code-review/scripts/run_pr_review.py`45+- [scripts/run_pr_review.py](scripts/run_pr_review.py)
46-- `.claude/skills/runtime-code-review/review-result-schema.md`46+- [review-result-schema.md](review-result-schema.md)
47 47 
48## 环境准备48## 环境准备
49 49 
@@ -66,7 +66,7 @@ echo $GITCODE_API_TOKEN
66优先使用总控脚本:66优先使用总控脚本:
67 67 
68```bash68```bash
69-python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \69+python3 .agents/skills/runtime-code-review/scripts/run_pr_review.py \
70 --owner <owner> \70 --owner <owner> \
71 --repo <repo> \71 --repo <repo> \
72 --pr <number>72 --pr <number>
@@ -75,7 +75,7 @@ python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \
75如果已经有结构化审查结果,并希望自动渲染 summary 或发布 summary comment,可使用:75如果已经有结构化审查结果,并希望自动渲染 summary 或发布 summary comment,可使用:
76 76 
77```bash77```bash
78-python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \78+python3 .agents/skills/runtime-code-review/scripts/run_pr_review.py \
79 --owner <owner> \79 --owner <owner> \
80 --repo <repo> \80 --repo <repo> \
81 --pr <number> \81 --pr <number> \
@@ -86,7 +86,7 @@ python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \
86如果还希望自动发布行内评论,可使用:86如果还希望自动发布行内评论,可使用:
87 87 
88```bash88```bash
89-python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \89+python3 .agents/skills/runtime-code-review/scripts/run_pr_review.py \
90 --owner <owner> \90 --owner <owner> \
91 --repo <repo> \91 --repo <repo> \
92 --pr <number> \92 --pr <number> \
@@ -97,21 +97,21 @@ python3 .claude/skills/runtime-code-review/scripts/run_pr_review.py \
97 97 
98`review-result.json` 的结构要求见:98`review-result.json` 的结构要求见:
99 99 
100-- `.claude/skills/runtime-code-review/review-result-schema.md`100+- [review-result-schema.md](review-result-schema.md)
101 101 
102### 分步方式102### 分步方式
103 103 
1041. 获取 `GITCODE_API_TOKEN`1041. 获取 `GITCODE_API_TOKEN`
1052. 解析 PR 链接或 PR 编号1052. 解析 PR 链接或 PR 编号
1063. 获取 PR 元信息、文件列表和 diff1063. 获取 PR 元信息、文件列表和 diff
107- - 推荐先调用 `fetch_pr_meta.py` 获取 PR 标题、描述、状态、base/head sha107+ - 推荐先调用 [scripts/fetch_pr_meta.py](scripts/fetch_pr_meta.py) 获取 PR 标题、描述、状态、base/head sha
108- - 再调用 `fetch_pr_files.py` 获取文件列表和 diff refs108+ - 再调用 [scripts/fetch_pr_files.py](scripts/fetch_pr_files.py) 获取文件列表和 diff refs
109- - 必要时使用 `fetch_pr_raw_file.py` 获取 raw 文件校验具体行号109+ - 必要时使用 [scripts/fetch_pr_raw_file.py](scripts/fetch_pr_raw_file.py) 获取 raw 文件校验具体行号
110 - 推荐命令:110 - 推荐命令:
111 111 
112```bash112```bash
113-python3 .claude/skills/runtime-code-review/scripts/fetch_pr_meta.py --owner <owner> --repo <repo> --pr <number>113+python3 .agents/skills/runtime-code-review/scripts/fetch_pr_meta.py --owner <owner> --repo <repo> --pr <number>
114-python3 .claude/skills/runtime-code-review/scripts/fetch_pr_files.py --owner <owner> --repo <repo> --pr <number>114+python3 .agents/skills/runtime-code-review/scripts/fetch_pr_files.py --owner <owner> --repo <repo> --pr <number>
115```115```
1164. 进行前置检查:1164. 进行前置检查:
117 - PR 是否已关闭117 - PR 是否已关闭
@@ -121,19 +121,19 @@ python3 .claude/skills/runtime-code-review/scripts/fetch_pr_files.py --owner <ow
121 - 推荐命令:121 - 推荐命令:
122 122 
123```bash123```bash
124-python3 .claude/skills/runtime-code-review/scripts/should_skip_pr_review.py --meta pr-meta.json124+python3 .agents/skills/runtime-code-review/scripts/should_skip_pr_review.py --meta pr-meta.json
125```125```
126-5. 读取共享规则文件:`.claude/skills/runtime-code-review/review-rules.md`126+5. 读取共享规则文件:[review-rules.md](review-rules.md)
127-6. 提取变更文件路径,并调用 `classify_review_files.py` 做文件分类:127+6. 提取变更文件路径,并调用 [scripts/classify_review_files.py](scripts/classify_review_files.py) 做文件分类:
128 128 
129```bash129```bash
130-jq -r '.file_paths[]' <pr-files.json> | python3 .claude/skills/runtime-code-review/scripts/classify_review_files.py130+jq -r '.file_paths[]' <pr-files.json> | python3 .agents/skills/runtime-code-review/scripts/classify_review_files.py
131```131```
132 132 
1337. 聚合审查上下文:1337. 聚合审查上下文:
134 134 
135```bash135```bash
136-python3 .claude/skills/runtime-code-review/scripts/prepare_pr_review_context.py \136+python3 .agents/skills/runtime-code-review/scripts/prepare_pr_review_context.py \
137 --meta pr-meta.json \137 --meta pr-meta.json \
138 --files pr-files.json \138 --files pr-files.json \
139 --classified pr-classified.json139 --classified pr-classified.json
@@ -197,13 +197,13 @@ python3 .claude/skills/runtime-code-review/scripts/prepare_pr_review_context.py
197推荐先渲染 summary,再发布 summary comment:197推荐先渲染 summary,再发布 summary comment:
198 198 
199```bash199```bash
200-python3 .claude/skills/runtime-code-review/scripts/render_pr_review_summary.py \200+python3 .agents/skills/runtime-code-review/scripts/render_pr_review_summary.py \
201 --input review-result.json \201 --input review-result.json \
202 --output summary.md202 --output summary.md
203```203```
204 204 
205```bash205```bash
206-python3 .claude/skills/runtime-code-review/scripts/post_pr_summary_comment.py \206+python3 .agents/skills/runtime-code-review/scripts/post_pr_summary_comment.py \
207 --owner <owner> \207 --owner <owner> \
208 --repo <repo> \208 --repo <repo> \
209 --pr <number> \209 --pr <number> \
@@ -213,7 +213,7 @@ python3 .claude/skills/runtime-code-review/scripts/post_pr_summary_comment.py \
213如果需要发布行内评论,可使用:213如果需要发布行内评论,可使用:
214 214 
215```bash215```bash
216-python3 .claude/skills/runtime-code-review/scripts/post_pr_inline_comment.py \216+python3 .agents/skills/runtime-code-review/scripts/post_pr_inline_comment.py \
Z

[必须修改] 这里仍引导使用 post_pr_inline_comment.py 发布行内意见,但该脚本只提交 pathposition,没有携带当前 patchset 的 base、start、head diff refs,也没有回读校验是否创建为有效 DiffNote。按行内意见硬约束,这类简化发布方式可能把意见降级成普通评论或挂到错误行,用户授权发布后会产生不可解决或过期的讨论。建议移除该入口,改为接入具备 diff refs、目标行预检和回读验证的行内发布流程;至少禁止 runtime-code-review 自动调用该脚本发布行内评论。

likedislike
guo-yanjun
6 天前 评论:
217 --owner <owner> \217 --owner <owner> \
218 --repo <repo> \218 --repo <repo> \
219 --pr <number> \219 --pr <number> \
@@ -229,13 +229,13 @@ python3 .claude/skills/runtime-code-review/scripts/post_pr_inline_comment.py \
229推荐顺序:229推荐顺序:
230 230 
2311. 先通过 PR diff 定位大致 hunk2311. 先通过 PR diff 定位大致 hunk
232-2. 再使用 `fetch_pr_raw_file.py` 获取 raw 文件内容232+2. 再使用 [scripts/fetch_pr_raw_file.py](scripts/fetch_pr_raw_file.py) 获取 raw 文件内容
2333. 必要时用 `grep -n` 或等价方式确认目标代码的精确行号2333. 必要时用 `grep -n` 或等价方式确认目标代码的精确行号
234 234 
235示例:235示例:
236 236 
237```bash237```bash
238-python3 .claude/skills/runtime-code-review/scripts/fetch_pr_raw_file.py \238+python3 .agents/skills/runtime-code-review/scripts/fetch_pr_raw_file.py \
239 --owner <owner> \239 --owner <owner> \
240 --repo <repo> \240 --repo <repo> \
241 --sha <head_sha> \241 --sha <head_sha> \
@@ -246,6 +246,6 @@ python3 .claude/skills/runtime-code-review/scripts/fetch_pr_raw_file.py \
246 246 
247- 本模式只负责 PR 审查范围获取和 GitCode 交互。247- 本模式只负责 PR 审查范围获取和 GitCode 交互。
248- 审查维度、严重程度定义和输出格式必须完全复用共享规则文件。248- 审查维度、严重程度定义和输出格式必须完全复用共享规则文件。
249-- 如果用户只想看本地未提交改动,应切换到 `local-review.md`249+- 如果用户只想看本地未提交改动,应切换到 [local-review.md](local-review.md)
250- 如果后续需要发布行内评论,建议使用 raw 文件内容确认问题行号,而不要只依赖 patch hunk 的起始位置。250- 如果后续需要发布行内评论,建议使用 raw 文件内容确认问题行号,而不要只依赖 patch hunk 的起始位置。
251- 不要在没有足够把握时发布低信号或猜测性评论。251- 不要在没有足够把握时发布低信号或猜测性评论。
R.claude/skills/runtime-code-review/review-result-schema.md.agents/skills/runtime-code-review/review-result-schema.md+1-1
@@ -1,6 +1,6 @@
1# Review Result Schema1# Review Result Schema
2 2 
3-`run_pr_review.py` 接收的 `--review-result` 应满足以下 JSON 结构。3+[scripts/run_pr_review.py](scripts/run_pr_review.py) 接收的 `--review-result` 应满足以下 JSON 结构。
4 4 
5## 顶层结构5## 顶层结构
6 6 
R.claude/skills/runtime-code-review/review-rules.md.agents/skills/runtime-code-review/review-rules.md+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/classify_review_files.py.agents/skills/runtime-code-review/scripts/classify_review_files.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/fetch_pr_files.py.agents/skills/runtime-code-review/scripts/fetch_pr_files.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/fetch_pr_meta.py.agents/skills/runtime-code-review/scripts/fetch_pr_meta.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/fetch_pr_raw_file.py.agents/skills/runtime-code-review/scripts/fetch_pr_raw_file.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/post_pr_inline_comment.py.agents/skills/runtime-code-review/scripts/post_pr_inline_comment.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/post_pr_summary_comment.py.agents/skills/runtime-code-review/scripts/post_pr_summary_comment.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/prepare_pr_review_context.py.agents/skills/runtime-code-review/scripts/prepare_pr_review_context.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/render_pr_review_summary.py.agents/skills/runtime-code-review/scripts/render_pr_review_summary.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/run_pr_review.py.agents/skills/runtime-code-review/scripts/run_pr_review.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-code-review/scripts/should_skip_pr_review.py.agents/skills/runtime-code-review/scripts/should_skip_pr_review.py+0-0
文件重命名但无更改。
R.claude/skills/runtime-errmsg-rectification/SKILL.md.agents/skills/runtime-errmsg-rectification/SKILL.md+2-11
@@ -1,22 +1,13 @@
1---1---
2name: runtime-errmsg-rectification2name: runtime-errmsg-rectification
3-description: "用于 Runtime 错误信息整改、整改建议生成、EE/EH 错误码选择、ErrMsg 宏审查、错误文案优化上报边界判断。当用户要求进行 Error Message 整改、输出整改建议、生成 rectification_suggestions.md、检视 Error Message 上报正确性新增接口新需求要求进行错误上报设计触发。"3+description: "用于 Runtime 错误信息整改、整改建议生成、EE/EH 错误码选择、ErrMsg 宏审查、错误文案优化上报边界判断。当用户要求进行 Error Message 整改、输出整改建议、生成 rectification_suggestions.md、检视 Error Message 上报正确性,或为新增接口新需求设计错误上报时使用。"
4-argument-hint: "[整改范围或文件路径] [执行模式: 需要确认|无需确认]"
5-allowed-tools:
6- - Read
7- - Write
8- - Edit
9- - MultiEdit
10- - Bash
11- - Glob
12- - Grep
13---4---
14 5 
15# Runtime ErrMsg Rectification6# Runtime ErrMsg Rectification
16 7 
17本 skill 是 Runtime Error Message 专项整改入口,负责完整审视和整改 Runtime 错误码、宏、文案和上报边界。正式规范维护在 docs/zh/guidelines/error_message_guide/目录下,本文件只保留工作流和按需读取规则。8本 skill 是 Runtime Error Message 专项整改入口,负责完整审视和整改 Runtime 错误码、宏、文案和上报边界。正式规范维护在 docs/zh/guidelines/error_message_guide/目录下,本文件只保留工作流和按需读取规则。
18 9 
19-用户可通过参数指定整改范围和执行模式:**$ARGUMENTS**10+用户请求中提取整改范围和执行模式。用户未明确指定执行模式时,按“需要确认模式”处理。
20 11 
21## 必读入口12## 必读入口
22 13 
R.claude/skills/runtime-errmsg-rectification/references/rectification_suggestions.md.agents/skills/runtime-errmsg-rectification/references/rectification_suggestions.md+0-0
文件重命名但无更改。
@@ -9,6 +9,7 @@
9- [ ] **superpowers** — 需求开发(生成软件设计文档、编码、生成测试用例),触发指令`开发需求,要求……`9- [ ] **superpowers** — 需求开发(生成软件设计文档、编码、生成测试用例),触发指令`开发需求,要求……`
10- [x] **runtime-code-review** — 遵循各种编码规范、模块软件设计约束检视本地代码与 GitCode PR10- [x] **runtime-code-review** — 遵循各种编码规范、模块软件设计约束检视本地代码与 GitCode PR
11- [x] **runtime-errmsg-rectification** — Runtime Error Message 整改,审视错误码、上报宏、错误文案和上报边界,触发指令`进行Error Message整改``检视 Error Message 上报正确性`11- [x] **runtime-errmsg-rectification** — Runtime Error Message 整改,审视错误码、上报宏、错误文案和上报边界,触发指令`进行Error Message整改``检视 Error Message 上报正确性`
12+- [x] **errmsg-codegen** — 根据 `error_code.json` 生成或更新错误码 X-Macro 表和 UT 参数数据,触发指令`新增错误码``自动生成错误码代码`
12- [x] **errmsg-ut-setup** — 搭建 ErrMsg 真实上报 UT 验证框架,让 `ErrorManager::ATCReportErrMessage` 调用真实实现并打印格式化 ErrMsg,触发指令`验证ErrMsg上报整改效果``运行ErrMsg UT验证`13- [x] **errmsg-ut-setup** — 搭建 ErrMsg 真实上报 UT 验证框架,让 `ErrorManager::ATCReportErrMessage` 调用真实实现并打印格式化 ErrMsg,触发指令`验证ErrMsg上报整改效果``运行ErrMsg UT验证`
13- [ ] **gitcode-pipeline** — 触发流水线任务、查询流水线状态、获取失败任务日志14- [ ] **gitcode-pipeline** — 触发流水线任务、查询流水线状态、获取失败任务日志
14- [ ] **runtime-dt-runner** — 编译和执行 UT/ST 用例15- [ ] **runtime-dt-runner** — 编译和执行 UT/ST 用例
@@ -9,6 +9,7 @@
9- [ ] **superpowers** — Requirement development (generate software design documents, coding, generate test cases). Trigger command: `Develop requirement, requirements...`9- [ ] **superpowers** — Requirement development (generate software design documents, coding, generate test cases). Trigger command: `Develop requirement, requirements...`
10- [x] **runtime-code-review** — Review local code and GitCode PR following various coding standards and module software design constraints10- [x] **runtime-code-review** — Review local code and GitCode PR following various coding standards and module software design constraints
11- [x] **runtime-errmsg-rectification** — Runtime Error Message rectification: review error codes, reporting macros, error messages, and reporting boundaries. Trigger command: `Perform Error Message rectification` or `Review Error Message reporting correctness`11- [x] **runtime-errmsg-rectification** — Runtime Error Message rectification: review error codes, reporting macros, error messages, and reporting boundaries. Trigger command: `Perform Error Message rectification` or `Review Error Message reporting correctness`
12+- [x] **errmsg-codegen** — Generate or update the error-code X-Macro table and UT parameter data from `error_code.json`. Trigger command: `Add error code` or `Automatically generate error-code code`
12- [x] **errmsg-ut-setup** — Set up an ErrMsg real-reporting UT verification framework, allowing `ErrorManager::ATCReportErrMessage` to call the real implementation and print formatted ErrMsg. Trigger command: `Verify ErrMsg reporting rectification result` or `Run ErrMsg UT verification`13- [x] **errmsg-ut-setup** — Set up an ErrMsg real-reporting UT verification framework, allowing `ErrorManager::ATCReportErrMessage` to call the real implementation and print formatted ErrMsg. Trigger command: `Verify ErrMsg reporting rectification result` or `Run ErrMsg UT verification`
13- [ ] **gitcode-pipeline** — Trigger pipeline tasks, query pipeline status, get failed task logs14- [ ] **gitcode-pipeline** — Trigger pipeline tasks, query pipeline status, get failed task logs
14- [ ] **runtime-dt-runner** — Compile and execute UT/ST test cases15- [ ] **runtime-dt-runner** — Compile and execute UT/ST test cases
@@ -110,4 +111,4 @@ flowchart TB
110 F3 --> I1111 F3 --> I1
111 I1 --> E3112 I1 --> E3
112 113 
113-```114+```