ai-project-manage-cli 1.0.21 → 1.0.22
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/comment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/comment.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA6E9D"}
|
|
@@ -10,13 +10,22 @@ function registerCommentCommands(program) {
|
|
|
10
10
|
.command("update")
|
|
11
11
|
.description("提交评论正文:仅允许「已创建」状态,成功后变为「待处理」")
|
|
12
12
|
.requiredOption("--id <id>", "评论 id", (v) => Number.parseInt(v, 10))
|
|
13
|
-
.
|
|
13
|
+
.option("--content <text>", "评论正文(与 --content-file 二选一)")
|
|
14
|
+
.option("--content-file <path>", "从文件读取评论正文(UTF-8)")
|
|
14
15
|
.action(async (opts) => {
|
|
16
|
+
let content = opts.content?.trim();
|
|
17
|
+
if (opts.contentFile) {
|
|
18
|
+
content = (await (0, promises_1.readFile)(opts.contentFile, "utf8")).trimEnd();
|
|
19
|
+
}
|
|
20
|
+
if (!content) {
|
|
21
|
+
console.error("请提供 --content 或 --content-file");
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
15
24
|
const api = (0, credentials_1.apiClient)();
|
|
16
25
|
try {
|
|
17
26
|
const row = await api.requirement.commentsSubmitPending({
|
|
18
27
|
id: opts.id,
|
|
19
|
-
content
|
|
28
|
+
content,
|
|
20
29
|
});
|
|
21
30
|
console.log(JSON.stringify(row, null, 2));
|
|
22
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/cli/commands/comment.ts"],"names":[],"mappings":";;AAKA,
|
|
1
|
+
{"version":3,"file":"comment.js","sourceRoot":"","sources":["../../../src/cli/commands/comment.ts"],"names":[],"mappings":";;AAKA,0DA6EC;AAlFD,+CAA4C;AAE5C,gDAA2C;AAC3C,sDAAiD;AAEjD,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAEnE,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CACV,8BAA8B,CAC/B;SACA,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;SACnE,MAAM,CAAC,kBAAkB,EAAE,4BAA4B,CAAC;SACxD,MAAM,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;SACnD,MAAM,CAAC,KAAK,EAAE,IAA4D,EAAE,EAAE;QAC7E,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,GAAG,CAAC,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;QACjE,CAAC;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;YAChD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,GAAG,GAAG,IAAA,uBAAS,GAAE,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,GAAG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E,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC,gCAAgC,CAAC;gBACpE,aAAa,EAAE,IAAI,CAAC,aAAa;gBACjC,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,OAAO;aACR,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAA,6BAAY,EAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CACF,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bug-fix
|
|
3
|
-
description: 基于分支名和缺陷描述执行标准化的缺陷修复流程:先做工作区检查点提交,再切换分支、完成修复、生成发布检查清单、落盘 bugfix
|
|
3
|
+
description: 基于分支名和缺陷描述执行标准化的缺陷修复流程:先做工作区检查点提交,再切换分支、完成修复、生成发布检查清单、落盘 bugfix 留痕,并提交推送分支;主 Agent 须在最终回复用表格汇总各步骤执行情况。适用于用户明确要求按流程修 bug,或提到修复流程、分支修复、创建 bug-fix 任务等场景。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 缺陷修复流程
|
|
@@ -12,6 +12,8 @@ description: 基于分支名和缺陷描述执行标准化的缺陷修复流程
|
|
|
12
12
|
- `bugDescription`:清晰的缺陷描述与期望行为
|
|
13
13
|
- `defectId`:缺陷 ID(可选;用于调用 CLI 更新缺陷状态)
|
|
14
14
|
|
|
15
|
+
**主 Agent 收尾(必选)**:在协调子 Agent 完成步骤 1~8 后,**必须在面向用户的最终回复中附上一张 Markdown 表格**,逐行对应每个步骤,汇总**执行状态**(如:已完成 / 已跳过 / 失败)与**简要说明**(关键结果、commit、失败原因等),便于审阅者核对流程是否闭环。
|
|
16
|
+
|
|
15
17
|
## 输入
|
|
16
18
|
|
|
17
19
|
收集并确认:
|
|
@@ -136,8 +138,21 @@ apm requirement defect set-status --defect-id <defectId> --status RESOLVED
|
|
|
136
138
|
|
|
137
139
|
**完成判定**:`test-env-release` 执行成功,测试环境部署完成。
|
|
138
140
|
|
|
141
|
+
### 汇总表格式(主 Agent 最终输出)
|
|
142
|
+
|
|
143
|
+
主 Agent 在流程结束时的表格应至少包含以下列,行数覆盖步骤 1~8(步骤 7 未提供 `defectId` 时可为「已跳过」):
|
|
144
|
+
|
|
145
|
+
| 步骤 | 内容概要 | 状态 | 说明 |
|
|
146
|
+
|------|----------|------|------|
|
|
147
|
+
| 1 | 分支切换与未提交处理 | 已完成 | 例:当前分支 `feat/xxx`,已 checkpoint / stash |
|
|
148
|
+
| 2 | 按缺陷描述修改代码 | 已完成 | 例:验证通过(lint/test) |
|
|
149
|
+
| … | … | … | … |
|
|
150
|
+
|
|
151
|
+
状态列建议统一用语:`已完成`、`已跳过`(并写明跳过原因)、`失败`(并附报错或阻塞点)。
|
|
152
|
+
|
|
139
153
|
## 约束
|
|
140
154
|
|
|
155
|
+
- 主 Agent 交付本流程结果时,应以「步骤汇总表」为主、文字为辅;禁止仅用零散叙述代替逐步状态说明。
|
|
141
156
|
- 存在未提交变更时,禁止跳过步骤 1。
|
|
142
157
|
- 当前分支错误时,禁止继续后续步骤。
|
|
143
158
|
- 步骤 8 完成前,不得宣称完成。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirement-review
|
|
3
|
-
description: 结合本仓库上下文对需求做结构化评审,按 output-template.md 形成完整 Markdown 评审正文,并通过 CLI
|
|
3
|
+
description: 结合本仓库上下文对需求做结构化评审,按 output-template.md 形成完整 Markdown 评审正文,并通过 CLI 写入评论正文(短正文可直接 --content;过长时用临时文件 --content-file,成功后删除)。输入为需求正文及 `commentId`(首轮与正文一起给出)。仅在用户明确声明使用本技能时应用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 需求评审(仓库内)
|
|
@@ -21,7 +21,7 @@ description: 结合本仓库上下文对需求做结构化评审,按 output-te
|
|
|
21
21
|
|
|
22
22
|
## 输出
|
|
23
23
|
|
|
24
|
-
- **评审正文**:须先按模板在**逻辑上**成文(完整 Markdown 字符串),不得仅给零散要点。可在回复中展示、可选保存为 `.md`,**均非必须**;第 6
|
|
24
|
+
- **评审正文**:须先按模板在**逻辑上**成文(完整 Markdown 字符串),不得仅给零散要点。可在回复中展示、可选保存为 `.md`,**均非必须**;第 6 步将该字符串写入评论:**短正文**可直接 `--content` 或 heredoc;**过长**(易触 shell 参数长度/转义问题)时写入**临时文件**并用 `--content-file`,成功后**删除该临时文件**(不落盘到仓库)。
|
|
25
25
|
- 将需求拆成若干条「需求点」(若本就一条则一条),对每条按 [output-template.md](output-template.md) 的**字段规则与并存关系**输出结论。
|
|
26
26
|
- 语言面向产品/研发可读:少堆砌实现细节,**不**用具体文件路径、函数名当「证据」;仓库仅用于理解**能力边界、术语与业务上下文**。
|
|
27
27
|
|
|
@@ -47,8 +47,7 @@ description: 结合本仓库上下文对需求做结构化评审,按 output-te
|
|
|
47
47
|
6. **提交评审记录**:调用 **CLI 命令**,将第 4 步的**完整评审正文**(与若已保存的 `.md` 内容一致)写入指定评论正文。
|
|
48
48
|
|
|
49
49
|
- **CLI 命令**:使用 `apm comment update` 将评审正文写入指定评论
|
|
50
|
-
-
|
|
51
|
-
- **多行正文建议**:用这里文档拼接,避免手动转义:
|
|
50
|
+
- **短正文**(不易超长):`apm comment update --id <commentId> --content "<评审正文全文>"`,或多行用 heredoc 避免转义:
|
|
52
51
|
|
|
53
52
|
```bash
|
|
54
53
|
apm comment update --id 1 --content "$(cat <<'EOF'
|
|
@@ -57,7 +56,14 @@ EOF
|
|
|
57
56
|
)"
|
|
58
57
|
```
|
|
59
58
|
|
|
60
|
-
|
|
59
|
+
- **过长正文**:勿强行塞进一条 shell 参数;将第 4 步全文写入**临时文件**(如 `mktemp` 或系统临时目录下的唯一文件名,UTF-8),再:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
apm comment update --id <commentId> --content-file /path/to/tmp-review.md
|
|
63
|
+
rm -f /path/to/tmp-review.md
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`comment update` **成功后**再执行 `rm`;失败时保留文件便于排查。实际调用时把 `commentId` 换成首轮对话给出的值。失败时把命令的报错信息贴出;成功时可简要确认评论正文已更新。
|
|
61
67
|
|
|
62
68
|
## 附加资源
|
|
63
69
|
|