@ranger1/dx 0.1.34 → 0.1.35

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.
@@ -14,20 +14,21 @@ tools:
14
14
 
15
15
  - `PR #<number>`
16
16
  - `round: <number>`
17
+ - `runId: <string>`(必须透传,禁止自行生成)
17
18
  - `contextFile: <filename>`
18
19
 
19
20
  ## 输出(强制)
20
21
 
21
22
  只输出一行:
22
23
 
23
- `reviewFile: <filename>`
24
+ `reviewFile: ./.cache/<file>.md`
24
25
 
25
26
 
26
27
  ## 规则
27
28
 
28
29
  - 默认已在 PR head 分支(可直接读工作区代码)
29
30
  - 可用 `git`/`gh` 只读命令获取 diff/上下文
30
- - 写入 reviewFile:`review-CLD-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
31
+ - 写入 reviewFile:`./.cache/review-CLD-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
31
32
  - findings id 必须以 `CLD-` 开头
32
33
 
33
34
  ## Cache 约定(强制)
@@ -15,20 +15,21 @@ tools:
15
15
 
16
16
  - `PR #<number>`
17
17
  - `round: <number>`
18
+ - `runId: <string>`(必须透传,禁止自行生成)
18
19
  - `contextFile: <filename>`
19
20
 
20
21
  ## 输出(强制)
21
22
 
22
23
  只输出一行:
23
24
 
24
- `reviewFile: <filename>`
25
+ `reviewFile: ./.cache/<file>.md`
25
26
 
26
27
 
27
28
  ## 规则
28
29
 
29
30
  - 默认已在 PR head 分支(可直接读工作区代码)
30
31
  - 可用 `git`/`gh` 只读命令获取 diff/上下文
31
- - 写入 reviewFile:`review-CDX-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
32
+ - 写入 reviewFile:`./.cache/review-CDX-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
32
33
  - findings id 必须以 `CDX-` 开头
33
34
 
34
35
  ## Cache 约定(强制)
@@ -14,20 +14,21 @@ tools:
14
14
 
15
15
  - `PR #<number>`
16
16
  - `round: <number>`
17
+ - `runId: <string>`(必须透传,禁止自行生成)
17
18
  - `contextFile: <filename>`
18
19
 
19
20
  ## 输出(强制)
20
21
 
21
22
  只输出一行:
22
23
 
23
- `reviewFile: <filename>`
24
+ `reviewFile: ./.cache/<file>.md`
24
25
 
25
26
 
26
27
  ## 规则
27
28
 
28
29
  - 默认已在 PR head 分支(可直接读工作区代码)
29
30
  - 可用 `git`/`gh` 只读命令获取 diff/上下文
30
- - 写入 reviewFile:`review-GMN-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
31
+ - 写入 reviewFile:`./.cache/review-GMN-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
31
32
  - findings id 必须以 `GMN-` 开头
32
33
 
33
34
  ## Cache 约定(强制)
@@ -32,6 +32,7 @@ tools:
32
32
  ### 必需输入
33
33
 
34
34
  - **PR 编号**:调用者必须在 prompt 中明确提供(如:`请修复 PR #123`)
35
+ - **runId**:调用者必须在 prompt 中提供(必须透传,禁止自行生成)
35
36
  - **fixFile**:调用者必须在 prompt 中提供问题清单文件路径(repo 相对路径,例:`./.cache/fix-...md`)(Structured Handoff)
36
37
 
37
38
  ### 失败快速退出
@@ -126,11 +127,11 @@ Round: 2
126
127
 
127
128
  ## 输出(强制)
128
129
 
129
- 写入:`fix-report-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
130
+ 写入:`./.cache/fix-report-pr<PR_NUMBER>-r<ROUND>-<RUN_ID>.md`
130
131
 
131
132
  最终只输出一行:
132
133
 
133
- `fixReportFile: <filename>`
134
+ `fixReportFile: ./.cache/<file>.md`
134
135
 
135
136
 
136
137
  ## fixReportFile 内容格式(强制)
@@ -172,4 +173,4 @@ Rejected: <n>
172
173
  ## 输出有效性保证
173
174
 
174
175
  - fixReportFile 必须成功写入
175
- - stdout 只能输出一行 `fixReportFile: <filename>`
176
+ - stdout 只能输出一行 `fixReportFile: ./.cache/<file>.md`
@@ -20,15 +20,15 @@ tools:
20
20
  - `PR #<number>`
21
21
  - `round: <number>`
22
22
  - `runId: <string>`
23
- - `contextFile: <filename>`
24
- - `reviewFile: <filename>`(三行,分别对应 CDX/CLD/GMN
23
+ - `contextFile: <path>`(例如:`./.cache/pr-context-...md`)
24
+ - `reviewFile: <path>`(三行,分别对应 CDX/CLD/GMN,例如:`./.cache/review-...md`)
25
25
 
26
26
  ### 模式 B:发布修复评论(基于 fixReportFile)
27
27
 
28
28
  - `PR #<number>`
29
29
  - `round: <number>`
30
30
  - `runId: <string>`
31
- - `fixReportFile: <filename>`
31
+ - `fixReportFile: <path>`(例如:`./.cache/fix-report-...md`)
32
32
 
33
33
  示例:
34
34
 
@@ -36,10 +36,10 @@ tools:
36
36
  PR #123
37
37
  round: 1
38
38
  runId: abcdef123456
39
- contextFile: pr-context-pr123-r1-abcdef123456.md
40
- reviewFile: review-CDX-pr123-r1-abcdef123456.md
41
- reviewFile: review-CLD-pr123-r1-abcdef123456.md
42
- reviewFile: review-GMN-pr123-r1-abcdef123456.md
39
+ contextFile: ./.cache/pr-context-pr123-r1-abcdef123456.md
40
+ reviewFile: ./.cache/review-CDX-pr123-r1-abcdef123456.md
41
+ reviewFile: ./.cache/review-CLD-pr123-r1-abcdef123456.md
42
+ reviewFile: ./.cache/review-GMN-pr123-r1-abcdef123456.md
43
43
  ```
44
44
 
45
45
  ## 执行方式(强制)
@@ -56,17 +56,18 @@ agent: sisyphus
56
56
  - 每个 reviewer prompt 必须包含:
57
57
  - `PR #{{PR_NUMBER}}`
58
58
  - `round: <ROUND>`
59
- - `contextFile: <filename>`(来自 Step 1 的输出)
59
+ - `runId: <RUN_ID>`(来自 Step 1 的输出,必须透传,禁止自行生成)
60
+ - `contextFile: ./.cache/<file>.md`(来自 Step 1 的输出)
60
61
  - reviewer 默认读 `contextFile`;必要时允许用 `git/gh` 只读命令拿 diff
61
62
  - 忽略问题:1.格式化代码引起的噪音 2.已经lint检查以外的格式问题
62
63
  - 特别关注: 逻辑、安全、性能、可维护性
63
64
  - 同时要注意 pr 前面轮次的 修复和讨论,对于已经拒绝、已修复的问题不要反复的提出
64
65
  - 同时也要注意fix的过程中有没有引入新的问题。
65
- - 每个 reviewer 输出:`reviewFile: <filename>`(Markdown)
66
+ - 每个 reviewer 输出:`reviewFile: ./.cache/<file>.md`(Markdown)
66
67
 
67
68
  3. Task: `pr-review-aggregate`
68
69
 
69
- - prompt 必须包含:`PR #{{PR_NUMBER}}`、`round: <ROUND>`、`runId: <RUN_ID>`、`contextFile: <filename>`、三条 `reviewFile: <filename>`
70
+ - prompt 必须包含:`PR #{{PR_NUMBER}}`、`round: <ROUND>`、`runId: <RUN_ID>`、`contextFile: ./.cache/<file>.md`、三条 `reviewFile: ./.cache/<file>.md`
70
71
  - 输出:`{"stop":true}` 或 `{"stop":false,"fixFile":"..."}`
71
72
  - 若 `stop=true`:本轮结束并退出循环
72
73
 
@@ -75,14 +76,15 @@ agent: sisyphus
75
76
  - prompt 必须包含:
76
77
  - `PR #{{PR_NUMBER}}`
77
78
  - `round: <ROUND>`
78
- - `fixFile: <filename>`
79
+ - `runId: <RUN_ID>`(来自 Step 1 的输出,必须透传,禁止自行生成)
80
+ - `fixFile: ./.cache/<file>.md`
79
81
  - 约定:`pr-fix` 对每个 findingId 单独 commit + push(一个 findingId 一个 commit),结束后再 `git push` 兜底
80
82
 
81
- - pr-fix 输出:`fixReportFile: <filename>`(Markdown)
83
+ - pr-fix 输出:`fixReportFile: ./.cache/<file>.md`(Markdown)
82
84
 
83
85
  5. Task: `pr-review-aggregate`(发布修复评论)
84
86
 
85
- - prompt 必须包含:`PR #{{PR_NUMBER}}`、`round: <ROUND>`、`runId: <RUN_ID>`、`fixReportFile: <filename>`
87
+ - prompt 必须包含:`PR #{{PR_NUMBER}}`、`round: <ROUND>`、`runId: <RUN_ID>`、`fixReportFile: ./.cache/<file>.md`
86
88
  - 输出:`{"ok":true}`
87
89
 
88
90
  6. 下一轮
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranger1/dx",
3
- "version": "0.1.34",
3
+ "version": "0.1.35",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {