ai-project-manage-cli 4.0.12 → 4.0.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/dist/index.js
CHANGED
|
@@ -247,11 +247,9 @@ var KIND_MAP = {
|
|
|
247
247
|
clarify: "CLARIFY",
|
|
248
248
|
difficulty: "DIFFICULTY",
|
|
249
249
|
business: "BUSINESS",
|
|
250
|
-
coordination: "COORDINATION",
|
|
251
250
|
CLARIFY: "CLARIFY",
|
|
252
251
|
DIFFICULTY: "DIFFICULTY",
|
|
253
|
-
BUSINESS: "BUSINESS"
|
|
254
|
-
COORDINATION: "COORDINATION"
|
|
252
|
+
BUSINESS: "BUSINESS"
|
|
255
253
|
};
|
|
256
254
|
var STANCE_VALUES = /* @__PURE__ */ new Set(["frontend", "backend", "fullstack"]);
|
|
257
255
|
function asRecord(value) {
|
|
@@ -273,8 +271,13 @@ function parseKind(raw, index) {
|
|
|
273
271
|
const key = String(raw ?? "").trim();
|
|
274
272
|
const kind = KIND_MAP[key] ?? KIND_MAP[key.toLowerCase()];
|
|
275
273
|
if (!kind) {
|
|
274
|
+
if (key.toLowerCase() === "coordination" || key === "COORDINATION") {
|
|
275
|
+
throw new Error(
|
|
276
|
+
`items[${index}].kind \u4E0D\u518D\u652F\u6301 coordination\uFF08\u8054\u8C03\u4F9D\u8D56\uFF09\uFF1B\u8BF7\u52FF\u8F93\u51FA\u63A5\u53E3/\u8054\u8C03\u7C7B\u8BC4\u5BA1\u6761\u76EE`
|
|
277
|
+
);
|
|
278
|
+
}
|
|
276
279
|
throw new Error(
|
|
277
|
-
`items[${index}].kind \u65E0\u6548\uFF0C\u5E94\u4E3A clarify | difficulty | business
|
|
280
|
+
`items[${index}].kind \u65E0\u6548\uFF0C\u5E94\u4E3A clarify | difficulty | business`
|
|
278
281
|
);
|
|
279
282
|
}
|
|
280
283
|
return kind;
|
|
@@ -307,9 +310,6 @@ function parseStructuredReviewYaml(raw, cliModel) {
|
|
|
307
310
|
if (!body) {
|
|
308
311
|
throw new Error(`items[${index}].body \u4E0D\u80FD\u4E3A\u7A7A`);
|
|
309
312
|
}
|
|
310
|
-
if (kind === "COORDINATION" && item.reply != null && String(item.reply).trim()) {
|
|
311
|
-
throw new Error(`items[${index}] \u8054\u8C03\u4F9D\u8D56\uFF08coordination\uFF09\u4E0D\u5141\u8BB8 reply`);
|
|
312
|
-
}
|
|
313
313
|
return {
|
|
314
314
|
startLine: anchor.start,
|
|
315
315
|
endLine: anchor.end,
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ description: 根据需求 ID 读取 prd.md 与 reviews.xml,润色为简短、
|
|
|
39
39
|
| 属性 / 节点 | 含义 |
|
|
40
40
|
| --------------- | --------------------------------------------------------------------------------------- |
|
|
41
41
|
| `start` / `end` | 锚定 `prd.md` 行号(1-based,闭区间),合并时优先据此定位段落 |
|
|
42
|
-
| `kind` | `clarify` / `difficulty` / `business`
|
|
42
|
+
| `kind` | `clarify` / `difficulty` / `business`;**仅处理含非空 `reply` 的条目**(历史 `coordination` 无 reply,忽略) |
|
|
43
43
|
| `body` | 评审意见(辅助理解,不作为正文来源) |
|
|
44
44
|
| `reply` | 产品回复,**并入正文**的权威补充 |
|
|
45
45
|
|
|
@@ -47,7 +47,7 @@ description: 根据需求 ID 读取 prd.md 与 reviews.xml,润色为简短、
|
|
|
47
47
|
|
|
48
48
|
1. **正文 = 需求原文 + 已拍板补充**:将各 `<item>` 中非空 `reply` 并入 `prd.md` 对应行区间(或该行所在需求点);未回复的评审本次不处理。
|
|
49
49
|
2. **定位**:优先按 `start`–`end` 行号找到段落;行号区间与章节标题不一致时,以**业务语义**归入最近的需求点,**不要**机械插入到错误章节。
|
|
50
|
-
3. **冲突**:`reply` 与原文冲突时以 `reply`
|
|
50
|
+
3. **冲突**:`reply` 与原文冲突时以 `reply` 为准;无 `reply` 的条目(含历史联调类)润色时忽略。
|
|
51
51
|
4. **同一议题只写一处**;合并后篇幅短于或接近原文。
|
|
52
52
|
5. **图片**:原文图片语法原样保留;理解图片后把规则写入对应需求点的文字描述。
|
|
53
53
|
|
|
@@ -31,7 +31,7 @@ description: 结合本仓库上下文对需求做结构化评审,只有当用
|
|
|
31
31
|
|
|
32
32
|
**去重规则**(按立场选用):
|
|
33
33
|
|
|
34
|
-
- **前端立场**:只写界面与交互侧待澄清,不写落库/API
|
|
34
|
+
- **前端立场**:只写界面与交互侧待澄清,不写落库/API 契约类问题。
|
|
35
35
|
- **后端立场**:只写流程、规则与数据侧待澄清,不写控件选型、Tab 布局等纯 UI 问题。
|
|
36
36
|
- **全栈立场**:同一业务点合并为一条 `clarify`,**不要**拆成两句意思重复的问题。
|
|
37
37
|
|
|
@@ -42,15 +42,25 @@ description: 结合本仓库上下文对需求做结构化评审,只有当用
|
|
|
42
42
|
3. **锚定 PRD**:每条 `items[]` 必须写 **`anchor: { start, end }`**,与 Read 读到的 `prd.md` 行号一致;**不**在 `body` 里复述该段需求原文。
|
|
43
43
|
4. **问题 = 文档缺口**:只写 PRD **未写清**且**影响本端理解边界**的点。已写清楚的规则不要重复质疑。
|
|
44
44
|
|
|
45
|
-
##
|
|
45
|
+
## 禁止输出的内容(不要写入 items)
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
以下内容**一律跳过**,不得创建任何评审条目(**禁止**使用已废弃的 `coordination` 类型):
|
|
48
48
|
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
49
|
+
- 接口字段名、请求体结构、子表编码、API 路径
|
|
50
|
+
- 前后端谁传哪个参数、与现网实现对齐的改造方案
|
|
51
|
+
- 「联调依赖」「需与后端/前端对齐接口」类事项
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
上述问题属于**技术评审**范畴,由研发在技术评审阶段处理,本产品评审只面向产品经理可回答的业务澄清。
|
|
54
|
+
|
|
55
|
+
## 允许的 kind
|
|
56
|
+
|
|
57
|
+
仅可使用以下三种(YAML 小写):
|
|
58
|
+
|
|
59
|
+
| `kind` | 含义 | 何时使用 |
|
|
60
|
+
| ------------ | ---------- | -------------------------------- |
|
|
61
|
+
| `clarify` | 待澄清 | 文档未写清、影响本端理解边界 |
|
|
62
|
+
| `difficulty` | 实现难度高 | 仅改造面大或业务逻辑影响大时 |
|
|
63
|
+
| `business` | 业务合理性 | 仅方案与业务目标明显冲突或非较优 |
|
|
54
64
|
|
|
55
65
|
## 评审原则
|
|
56
66
|
|
|
@@ -75,14 +85,14 @@ description: 结合本仓库上下文对需求做结构化评审,只有当用
|
|
|
75
85
|
### 步骤 3:评审与提交
|
|
76
86
|
|
|
77
87
|
1. **锁定立场**,填入 YAML `reviewer.stance`(`frontend` / `backend` / `fullstack`)。
|
|
78
|
-
2. **拆条**:每条对应 `prd.md` 连续行号;按需设置 `kind`(`clarify` / `difficulty` / `business
|
|
88
|
+
2. **拆条**:每条对应 `prd.md` 连续行号;按需设置 `kind`(`clarify` / `difficulty` / `business`)与 `body`。
|
|
79
89
|
3. **成文**:按 **[output-template.md](./output-template.md)** 写 YAML。
|
|
80
90
|
4. 使用 **Write** 写入临时文件(建议 `/tmp/apm-review-<需求ID>.yaml`)。
|
|
81
91
|
5. **自检**:
|
|
82
92
|
- 每条均有 `anchor`,且无全篇评审;
|
|
83
93
|
- `stance` 与立场一致;
|
|
84
94
|
- `clarify` 均为产品可回答的业务问题;
|
|
85
|
-
- `coordination`
|
|
95
|
+
- **未**出现 `coordination` 或联调/API 契约类条目;
|
|
86
96
|
- 无重复语义的条目。
|
|
87
97
|
6. 在项目根目录执行:
|
|
88
98
|
|
|
@@ -29,11 +29,6 @@ items:
|
|
|
29
29
|
kind: difficulty
|
|
30
30
|
body: |
|
|
31
31
|
- 用产品语言说明改造面:涉及哪些页面/流程/规则,为何面大
|
|
32
|
-
|
|
33
|
-
- anchor: { start: 44, end: 55 }
|
|
34
|
-
kind: coordination
|
|
35
|
-
body: |
|
|
36
|
-
- 需与后端对齐的接口/字段诉求(不用产品回复)
|
|
37
32
|
```
|
|
38
33
|
|
|
39
34
|
## kind 与技能表述
|
|
@@ -43,17 +38,18 @@ items:
|
|
|
43
38
|
| `clarify` | 待澄清 | 文档未写清、影响本端理解边界 |
|
|
44
39
|
| `difficulty` | 实现难度高 | 仅改造面大或业务逻辑影响大时 |
|
|
45
40
|
| `business` | 业务合理性 | 仅方案明显不合理时 |
|
|
46
|
-
|
|
41
|
+
|
|
42
|
+
**禁止**使用 `coordination`(联调依赖已废弃):接口/联调类事项不要写入评审。
|
|
47
43
|
|
|
48
44
|
## 字段规则
|
|
49
45
|
|
|
50
|
-
| 字段 | 规则
|
|
51
|
-
| ----------------- |
|
|
52
|
-
| `reviewer.stance` | 必填:`frontend` / `backend` / `fullstack`
|
|
53
|
-
| `reviewer.model` | 建议填写;可被 CLI `--model` 覆盖
|
|
46
|
+
| 字段 | 规则 |
|
|
47
|
+
| ----------------- | ---------------------------------------------------------- |
|
|
48
|
+
| `reviewer.stance` | 必填:`frontend` / `backend` / `fullstack` |
|
|
49
|
+
| `reviewer.model` | 建议填写;可被 CLI `--model` 覆盖 |
|
|
54
50
|
| `anchor` | 必填 `{ start, end }`,1-based 闭区间,与 Read `prd.md` 行号一致 |
|
|
55
|
-
| `body` | 必填;产品语言;**禁止**全篇评审(必须有行号)
|
|
56
|
-
| 同区间多类型 |
|
|
51
|
+
| `body` | 必填;产品语言;**禁止**全篇评审(必须有行号) |
|
|
52
|
+
| 同区间多类型 | 可拆成多条 `items`(例如同时 `clarify` 与 `difficulty`) |
|
|
57
53
|
|
|
58
54
|
## 提交命令
|
|
59
55
|
|