@fitlab-ai/agent-infra 0.7.4 → 0.7.6
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/bin/cli.ts +13 -11
- package/dist/bin/cli.js +13 -11
- package/dist/lib/init.js +1 -1
- package/dist/lib/merge.js +1 -1
- package/dist/lib/sandbox/commands/create.js +26 -4
- package/dist/lib/sandbox/index.js +21 -21
- package/dist/lib/sandbox/tools.js +20 -1
- package/dist/lib/task/commands/log.js +56 -6
- package/dist/lib/task/index.js +13 -13
- package/dist/lib/update.js +1 -1
- package/lib/init.ts +1 -1
- package/lib/merge.ts +1 -1
- package/lib/sandbox/commands/create.ts +33 -4
- package/lib/sandbox/index.ts +21 -21
- package/lib/sandbox/tools.ts +28 -1
- package/lib/task/commands/log.ts +59 -6
- package/lib/task/index.ts +13 -13
- package/lib/update.ts +1 -1
- package/package.json +1 -1
- package/templates/.agents/rules/README.en.md +7 -3
- package/templates/.agents/rules/README.zh-CN.md +7 -3
- package/templates/.agents/rules/cli-help-format.en.md +49 -0
- package/templates/.agents/rules/cli-help-format.zh-CN.md +49 -0
- package/templates/.agents/rules/no-mid-flow-questions.en.md +25 -2
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +25 -2
- package/templates/.agents/rules/pr-sync.github.en.md +8 -6
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +8 -6
- package/templates/.agents/rules/review-handshake.en.md +97 -0
- package/templates/.agents/rules/review-handshake.zh-CN.md +97 -0
- package/templates/.agents/rules/task-management.en.md +25 -0
- package/templates/.agents/rules/task-management.zh-CN.md +29 -0
- package/templates/.agents/scripts/lib/post-review-commit.js +56 -0
- package/templates/.agents/scripts/lib/review-artifacts.js +117 -0
- package/templates/.agents/scripts/review-diff-fingerprint.js +99 -0
- package/templates/.agents/scripts/validate-artifact.js +251 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +63 -6
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +63 -6
- package/templates/.agents/skills/block-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/cancel-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +11 -1
- package/templates/.agents/skills/close-codescan/SKILL.en.md +10 -0
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +10 -0
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/code-task/SKILL.en.md +11 -0
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/code-task/config/verify.en.json +3 -0
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +3 -0
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +5 -3
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +5 -3
- package/templates/.agents/skills/code-task/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +4 -4
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +2 -107
- package/templates/.agents/skills/commit/SKILL.en.md +16 -0
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +16 -0
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +8 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +8 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +20 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +20 -0
- package/templates/.agents/skills/complete-task/config/verify.en.json +2 -0
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +2 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +20 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +20 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/comment-publish.zh-CN.md +1 -1
- package/templates/.agents/skills/create-release-note/SKILL.en.md +16 -1
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +16 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +11 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +14 -3
- package/templates/.agents/skills/import-codescan/SKILL.en.md +11 -0
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +11 -0
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/import-issue/SKILL.en.md +16 -0
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +16 -0
- package/templates/.agents/skills/plan-task/SKILL.en.md +13 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +13 -1
- package/templates/.agents/skills/plan-task/config/verify.en.json +3 -0
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +3 -0
- package/templates/.agents/skills/restore-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-analysis/SKILL.en.md +10 -0
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-analysis/config/verify.en.json +2 -1
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +4 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +14 -1
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +14 -1
- package/templates/.agents/skills/review-code/config/verify.en.json +5 -2
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +5 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-code/reference/report-template.en.md +6 -0
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +6 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +10 -0
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-plan/config/verify.en.json +2 -1
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -4
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -4
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +4 -0
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +4 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/watch-pr/SKILL.en.md +10 -0
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +10 -0
- package/templates/.agents/templates/task.en.md +12 -0
- package/templates/.agents/templates/task.zh-CN.md +12 -0
- package/templates/.github/workflows/metadata-sync.yml +1 -1
- package/templates/.github/workflows/pr-label.yml +1 -1
- package/templates/.github/workflows/status-label.yml +1 -1
|
@@ -160,7 +160,21 @@ git log v<prev-version>..v<version> \
|
|
|
160
160
|
|
|
161
161
|
### 9. 发布 Release notes(如确认)
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
9.1 把生成的 notes 写入**工作树之外**的临时文件,避免在仓库残留未提交产物(不要写入 `.agents/workspace/` 或任何受版本控制的目录):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
NOTES_FILE="$(mktemp "${TMPDIR:-/tmp}/agent-infra-release-notes.XXXXXX")"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
把 notes 内容写入 `$NOTES_FILE`。
|
|
170
|
+
|
|
171
|
+
9.2 按 `.agents/rules/release-commands.md` 的「发布 Release notes」命令执行(命令中的 `{notes-file}` 用 `$NOTES_FILE`;写入已由 release 工作流自动创建/发布的 Release,不存在时兜底创建)。
|
|
172
|
+
|
|
173
|
+
9.3 无论发布成功或失败,都删除临时文件:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
rm -f "$NOTES_FILE"
|
|
177
|
+
```
|
|
164
178
|
|
|
165
179
|
输出:
|
|
166
180
|
```
|
|
@@ -179,6 +193,7 @@ Release notes 已更新。
|
|
|
179
193
|
2. **标签必须存在**:先执行 release 技能创建标签
|
|
180
194
|
3. **Release 已自动发布**:`v{version}` 的 Release 由 release 工作流自动创建并发布(给 Homebrew bottle 提供上传落点);本技能往该 Release 写入/刷新 notes
|
|
181
195
|
4. **分类准确性**:自动分类基于标题/scope/文件;复杂的 PR 可能需要手动调整
|
|
196
|
+
5. **不留残留产物**:notes 一律写入工作树之外的临时文件(`mktemp`)并在发布后删除,禁止写入仓库目录
|
|
182
197
|
|
|
183
198
|
## 错误处理
|
|
184
199
|
|
|
@@ -26,6 +26,17 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
26
26
|
|
|
27
27
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
28
28
|
|
|
29
|
+
## Step Start: Capture the Start Time
|
|
30
|
+
|
|
31
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- {started_at} — **Create Task [started]** by {agent} — started
|
|
35
|
+
- {done_at} — **Create Task** by {agent} — {completion summary}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
39
|
+
|
|
29
40
|
## Steps
|
|
30
41
|
|
|
31
42
|
### 1. Parse the User Description
|
|
@@ -26,6 +26,17 @@ description: "根据自然语言描述创建任务"
|
|
|
26
26
|
|
|
27
27
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
28
28
|
|
|
29
|
+
## 步骤开始:记录开始时间
|
|
30
|
+
|
|
31
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- {started_at} — **Create Task [started]** by {agent} — started
|
|
35
|
+
- {done_at} — **Create Task** by {agent} — {完成说明}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
39
|
+
|
|
29
40
|
## 执行步骤
|
|
30
41
|
### 1. 解析用户描述
|
|
31
42
|
|
|
@@ -172,7 +183,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
172
183
|
|
|
173
184
|
下一步 - 执行需求分析:
|
|
174
185
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
175
|
-
- Gemini CLI:/
|
|
186
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
176
187
|
- Codex CLI:$analyze-task {task-ref}
|
|
177
188
|
```
|
|
178
189
|
|
|
@@ -191,7 +202,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
191
202
|
|
|
192
203
|
下一步 - 执行需求分析:
|
|
193
204
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
194
|
-
- Gemini CLI:/
|
|
205
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
195
206
|
- Codex CLI:$analyze-task {task-ref}
|
|
196
207
|
```
|
|
197
208
|
|
|
@@ -215,7 +226,7 @@ Issue 创建失败:
|
|
|
215
226
|
|
|
216
227
|
下一步 - 执行需求分析:
|
|
217
228
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
218
|
-
- Gemini CLI:/
|
|
229
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
219
230
|
- Codex CLI:$analyze-task {task-ref}
|
|
220
231
|
|
|
221
232
|
后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
|
|
@@ -17,6 +17,17 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Codescan** by {agent} — {completion summary}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
30
|
+
|
|
20
31
|
## Execution Flow
|
|
21
32
|
|
|
22
33
|
### 1. Retrieve Alert Information
|
|
@@ -17,6 +17,17 @@ description: "导入 Code Scanning 告警并创建修复任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Codescan** by {agent} — {完成说明}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
30
|
+
|
|
20
31
|
## 执行流程
|
|
21
32
|
|
|
22
33
|
### 1. 获取告警信息
|
|
@@ -17,6 +17,17 @@ Import the specified Dependabot security alert and create a remediation task.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Dependabot** by {agent} — {completion summary}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
30
|
+
|
|
20
31
|
## Execution Flow
|
|
21
32
|
|
|
22
33
|
### 1. Retrieve Alert Information
|
|
@@ -17,6 +17,17 @@ description: "导入 Dependabot 安全告警并创建修复任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Dependabot** by {agent} — {完成说明}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
30
|
+
|
|
20
31
|
## 执行流程
|
|
21
32
|
|
|
22
33
|
### 1. 获取告警信息
|
|
@@ -17,6 +17,22 @@ Import the specified Issue and create a task. Argument: issue number.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`). The base action must match the actual import scenario:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
# Scenario B: new Issue import
|
|
26
|
+
- {started_at} — **Import Issue [started]** by {agent} — started
|
|
27
|
+
- {done_at} — **Import Issue** by {agent} — {completion summary}
|
|
28
|
+
|
|
29
|
+
# Scenario C: recovery from historical Issue comments
|
|
30
|
+
- {started_at} — **Import Issue (Recovered) [started]** by {agent} — started
|
|
31
|
+
- {done_at} — **Import Issue (Recovered)** by {agent} — {completion summary}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
35
|
+
|
|
20
36
|
## Execution Flow
|
|
21
37
|
|
|
22
38
|
### 1. Retrieve Issue Information
|
|
@@ -17,6 +17,22 @@ description: "从 Issue 导入并创建任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`)。基名必须跟实际导入场景一致:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
# 场景 B:新 Issue 导入
|
|
26
|
+
- {started_at} — **Import Issue [started]** by {agent} — started
|
|
27
|
+
- {done_at} — **Import Issue** by {agent} — {完成说明}
|
|
28
|
+
|
|
29
|
+
# 场景 C:从历史 Issue 评论恢复
|
|
30
|
+
- {started_at} — **Import Issue (Recovered) [started]** by {agent} — started
|
|
31
|
+
- {done_at} — **Import Issue (Recovered)** by {agent} — {完成说明}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
35
|
+
|
|
20
36
|
## 执行流程
|
|
21
37
|
|
|
22
38
|
### 1. 获取 Issue 信息
|
|
@@ -31,6 +31,16 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
31
31
|
|
|
32
32
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
33
33
|
|
|
34
|
+
## Step Start: Write the started Marker
|
|
35
|
+
|
|
36
|
+
After prerequisites pass and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Task (Round {N}) [started]** by {agent} — started
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`ai task log` pairs it with the done entry written on completion (step 7) onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
43
|
+
|
|
34
44
|
## Steps
|
|
35
45
|
|
|
36
46
|
### 1. Verify Prerequisites
|
|
@@ -66,7 +76,7 @@ Use it to understand:
|
|
|
66
76
|
- identified technical risks
|
|
67
77
|
- effort and complexity assessment
|
|
68
78
|
|
|
69
|
-
**Round ≥ 2: respond to the prior review (only when a review artifact exists)**: if the task directory contains `review-plan.md` / `review-plan-r{N}.md`, read the highest-round review report; add a `## Response to Prior Review` section to this round's plan artifact, and for each finding verify it via Read/Grep
|
|
79
|
+
**Round ≥ 2: respond to the prior review (only when a review artifact exists)**: if the task directory contains `review-plan.md` / `review-plan-r{N}.md`, read the highest-round review report; add a `## Response to Prior Review` section to this round's plan artifact, and for each finding verify it via Read/Grep, then dispose of it with one of the four states in `.agents/rules/review-handshake.md` (`accepted` / `adjusted` / `refuted` / `cannot-judge`) — every state needs commensurate evidence, never defaulting to compliance; write the disposition back to the matching row in the task.md disagreement ledger (stage=plan, round +1). Record any open disagreement under `## Open Questions`. Round 1 has no review, so skip this section.
|
|
70
80
|
|
|
71
81
|
### 4. Understand the Problem
|
|
72
82
|
|
|
@@ -87,6 +97,8 @@ Follow the `technical-design` step in `.agents/workflows/feature-development.yam
|
|
|
87
97
|
- [ ] Define the verification strategy (tests, manual checks)
|
|
88
98
|
- [ ] Assess impact and risks
|
|
89
99
|
|
|
100
|
+
When this round introduces a new key design decision, record it under `## Open Questions` according to `.agents/rules/no-mid-flow-questions.md` and write the matching `HD-` ledger row.
|
|
101
|
+
|
|
90
102
|
**Design principles**:
|
|
91
103
|
1. **Architectural soundness**: choose the structurally correct approach; diff size is not the primary criterion. Do not pile changes onto an unsound structure just to keep the diff small
|
|
92
104
|
2. **Simplicity**: given a sound architecture, prefer the simplest approach and avoid over-engineering
|
|
@@ -31,6 +31,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
31
31
|
|
|
32
32
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
33
33
|
|
|
34
|
+
## 步骤开始:写入 started 标记
|
|
35
|
+
|
|
36
|
+
确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan Task (Round {N}) [started]** by {agent} — started
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`ai task log` 会把它与步骤完成时(步骤 7)写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
43
|
+
|
|
34
44
|
## 执行步骤
|
|
35
45
|
### 1. 验证前置条件
|
|
36
46
|
|
|
@@ -65,7 +75,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
65
75
|
- 已识别的技术风险
|
|
66
76
|
- 工作量和复杂度评估
|
|
67
77
|
|
|
68
|
-
**Round ≥ 2:响应上一轮审查(仅当存在审查产物时)**:若任务目录存在 `review-plan.md` / `review-plan-r{N}.md`,读取最高轮次的审查报告;在本轮方案产物中新增 `## 对上一轮审查的响应` 段,对每条发现先 Read/Grep
|
|
78
|
+
**Round ≥ 2:响应上一轮审查(仅当存在审查产物时)**:若任务目录存在 `review-plan.md` / `review-plan-r{N}.md`,读取最高轮次的审查报告;在本轮方案产物中新增 `## 对上一轮审查的响应` 段,对每条发现先 Read/Grep 核实,再按 `.agents/rules/review-handshake.md` 的四态(`accepted` / `adjusted` / `refuted` / `cannot-judge`)处置——每态都要附相称证据,不默认顺从;并把处置回写 task.md `## 审查分歧账本` 对应行(stage=plan,round +1)。未决分歧写入 `## 未决问题`。Round 1 无审查,跳过本段。
|
|
69
79
|
|
|
70
80
|
### 4. 理解问题
|
|
71
81
|
|
|
@@ -86,6 +96,8 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
86
96
|
- [ ] 定义验证策略(测试、手动检查)
|
|
87
97
|
- [ ] 评估方案的影响和风险
|
|
88
98
|
|
|
99
|
+
遇到本轮新增的关键设计决策时,按 `.agents/rules/no-mid-flow-questions.md` 判据写入 `## 未决问题`,并回写 `HD-` 账本行。
|
|
100
|
+
|
|
89
101
|
**设计原则**:
|
|
90
102
|
1. **架构合理性**:选择结构正确的方案,改动大小不是首要依据。不要为了减少 diff 而在不合理的结构上叠加
|
|
91
103
|
2. **简洁性**:在架构合理的前提下,优先选择最简方案,避免过度设计
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
"expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)",
|
|
37
37
|
"freshness_minutes": 30
|
|
38
38
|
},
|
|
39
|
+
"review-ledger": {
|
|
40
|
+
"stage_scope": ["analysis"]
|
|
41
|
+
},
|
|
39
42
|
"platform-sync": {
|
|
40
43
|
"when": "issue_number_exists",
|
|
41
44
|
"expected_status_label": "status: pending-design-work",
|
|
@@ -36,6 +36,9 @@
|
|
|
36
36
|
"expected_action_pattern": "(Plan Task|Technical Design) \\(Round \\d+\\)",
|
|
37
37
|
"freshness_minutes": 30
|
|
38
38
|
},
|
|
39
|
+
"review-ledger": {
|
|
40
|
+
"stage_scope": ["analysis"]
|
|
41
|
+
},
|
|
39
42
|
"platform-sync": {
|
|
40
43
|
"when": "issue_number_exists",
|
|
41
44
|
"expected_status_label": "status: pending-design-work",
|
|
@@ -20,6 +20,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
20
20
|
|
|
21
21
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
22
22
|
|
|
23
|
+
## Step Start: Write the started Marker
|
|
24
|
+
|
|
25
|
+
After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Restore Task [started]** by {agent} — started
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
32
|
+
|
|
23
33
|
## Steps
|
|
24
34
|
|
|
25
35
|
### 1. Verify Input and Environment
|
|
@@ -20,6 +20,16 @@ description: "从平台 Issue 评论还原本地任务文件"
|
|
|
20
20
|
|
|
21
21
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
22
22
|
|
|
23
|
+
## 步骤开始:写入 started 标记
|
|
24
|
+
|
|
25
|
+
确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Restore Task [started]** by {agent} — started
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
32
|
+
|
|
23
33
|
## 执行步骤
|
|
24
34
|
### 1. 验证输入与环境
|
|
25
35
|
|
|
@@ -30,6 +30,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
30
30
|
|
|
31
31
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
32
32
|
|
|
33
|
+
## Step Start: Write the started Marker
|
|
34
|
+
|
|
35
|
+
After prerequisites pass and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Analysis (Round {N}) [started]** by {agent} — started
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`ai task log` pairs it with the done entry written when the review completes onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
42
|
+
|
|
33
43
|
## Steps
|
|
34
44
|
|
|
35
45
|
### 1. Verify Prerequisites
|
|
@@ -32,6 +32,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
32
32
|
|
|
33
33
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
34
34
|
|
|
35
|
+
## 步骤开始:写入 started 标记
|
|
36
|
+
|
|
37
|
+
确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Analysis (Round {N}) [started]** by {agent} — started
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`ai task log` 会把它与审查完成时写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
44
|
+
|
|
35
45
|
## 执行步骤
|
|
36
46
|
### 1. 验证前置条件
|
|
37
47
|
|
|
@@ -16,12 +16,13 @@ Rules:
|
|
|
16
16
|
- If `Blocker > 0`, never use an approved template
|
|
17
17
|
- Never count env-blocked items as blocker / major / minor or use them to trigger Scenario B/C/D
|
|
18
18
|
- The selected scenario must include all TUI command formats
|
|
19
|
+
- The count line always shows 4 numbers: the first three (Blockers / Major / Minor) must be 0 to proceed; the fourth, `Human-decision` (`{h}`), is the number of rows in task.md `## 审查分歧账本` with `stage=analysis` and `status=needs-human-decision` — a "pending human ruling" item that need not be zero and does not participate in scenario selection
|
|
19
20
|
|
|
20
21
|
### Scenario A: Approved with no findings
|
|
21
22
|
|
|
22
23
|
```text
|
|
23
24
|
Task {task-id} requirement analysis review completed. Verdict: approved.
|
|
24
|
-
- Blockers: 0 | Major issues: 0 | Minor issues: 0
|
|
25
|
+
- Blockers: 0 | Major issues: 0 | Minor issues: 0 | Human-decision: {h}
|
|
25
26
|
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
27
|
|
|
27
28
|
Next step - write the technical plan:
|
|
@@ -37,7 +38,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
37
38
|
|
|
38
39
|
```text
|
|
39
40
|
Task {task-id} requirement analysis review completed. Verdict: approved.
|
|
40
|
-
- Blockers: 0 | Major issues: {n} | Minor issues: {n}
|
|
41
|
+
- Blockers: 0 | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
41
42
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
42
43
|
|
|
43
44
|
Next step - revise analysis before continuing (recommended):
|
|
@@ -58,7 +59,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
58
59
|
|
|
59
60
|
```text
|
|
60
61
|
Task {task-id} requirement analysis review completed. Verdict: changes requested.
|
|
61
|
-
- Blockers: {n} | Major issues: {n} | Minor issues: {n}
|
|
62
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
62
63
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
63
64
|
|
|
64
65
|
Next step - revise requirement analysis:
|
|
@@ -74,7 +75,7 @@ Reminder: env-blocked items belong in the PR description manual verification che
|
|
|
74
75
|
|
|
75
76
|
```text
|
|
76
77
|
Task {task-id} requirement analysis review completed. Verdict: rejected, fresh analysis or requirement clarification required.
|
|
77
|
-
- Blockers: {n} | Major issues: {n} | Minor issues: {n}
|
|
78
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n} | Human-decision: {h}
|
|
78
79
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
79
80
|
|
|
80
81
|
Next step - re-analyze:
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
- 只要 `Blocker > 0`,就绝对不能输出通过模板
|
|
17
17
|
- env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
|
|
18
18
|
- 所选场景中必须包含所有 TUI 命令格式
|
|
19
|
+
- 计数行固定显示 4 个数字:前三项(阻塞 / 主要 / 次要)必须为 0 才进下一步;第四项 `人工裁决`(`{h}`)= task.md `## 审查分歧账本` 中 `stage=analysis` 且 `status=needs-human-decision` 的行数,是「待人裁」项、不要求归零,也不参与场景判断
|
|
19
20
|
|
|
20
21
|
### 场景 A:通过且无问题
|
|
21
22
|
|
|
22
23
|
```text
|
|
23
24
|
任务 {task-id} 需求分析审查完成。结论:通过。
|
|
24
|
-
- 阻塞项:0 | 主要问题:0 | 次要问题:0
|
|
25
|
+
- 阻塞项:0 | 主要问题:0 | 次要问题:0 | 人工裁决:{h}
|
|
25
26
|
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
27
|
|
|
27
28
|
下一步 - 编写技术方案:
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
|
|
38
39
|
```text
|
|
39
40
|
任务 {task-id} 需求分析审查完成。结论:通过。
|
|
40
|
-
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}
|
|
41
|
+
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
41
42
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
42
43
|
|
|
43
44
|
下一步 - 修订分析后继续(推荐):
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
|
|
59
60
|
```text
|
|
60
61
|
任务 {task-id} 需求分析审查完成。结论:需要修改。
|
|
61
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
62
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
62
63
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
63
64
|
|
|
64
65
|
下一步 - 修订需求分析:
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
|
|
75
76
|
```text
|
|
76
77
|
任务 {task-id} 需求分析审查完成。结论:拒绝,需要重新分析或补充需求澄清。
|
|
77
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
78
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n} | 人工裁决:{h}
|
|
78
79
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
79
80
|
|
|
80
81
|
下一步 - 重新分析:
|
|
@@ -59,6 +59,10 @@ Use this template when writing `review-analysis.md` or `review-analysis-r{N}.md`
|
|
|
59
59
|
> If this round has no env-blocked findings, keep the section heading and write "None".
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
## Review Disagreement Ledger Writeback
|
|
63
|
+
|
|
64
|
+
> Upsert each finding this round into the task.md disagreement ledger: append an `open` row for new findings (id prefix `AN-`, stage=analysis); per the hand-back duty set the executor's prior-round responses to `confirmed` / back to `open` / `needs-human-decision`. State machine and evidence rules: `.agents/rules/review-handshake.md`.
|
|
65
|
+
|
|
62
66
|
## Evidence
|
|
63
67
|
|
|
64
68
|
> Pair each "I verified X" claim with the corresponding raw tool output; the gate only checks that this section exists and at least one `$ ` line is present. Every Blocker must be backed by a reproducible command (rg/grep/sed/nl) and its raw output; a judgment that cannot be reproduced must be downgraded or moved to Self-Doubt.
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
> 如本轮无 env-blocked 项,保留段落标题并写「(无)」。
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
## 审查分歧账本回写
|
|
64
|
+
|
|
65
|
+
> 把本轮每条 finding upsert 到 task.md `## 审查分歧账本`:新 finding 追加 `open` 行(id 前缀 `AN-`,stage=analysis),对执行方上一轮响应按回交义务改 `confirmed` / 置回 `open` / `needs-human-decision`。状态机与证据规则见 `.agents/rules/review-handshake.md`。
|
|
66
|
+
|
|
63
67
|
## 证据原文
|
|
64
68
|
|
|
65
69
|
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。每条 Blocker 必须配可复现命令(rg/grep/sed/nl)及其原文;无法复现的判断须降级或移入「自我质疑」。
|
|
@@ -13,6 +13,7 @@ Follow the `analysis-review` step in `.agents/workflows/feature-development.yaml
|
|
|
13
13
|
- [ ] Risks, edge cases, and open questions are recorded
|
|
14
14
|
- [ ] The design stage has enough input to proceed
|
|
15
15
|
- [ ] The analysis matches the original Issue or user request
|
|
16
|
+
- [ ] The reviewer checked whether the executor missed any key design decision that should be upgraded to `[needs-human-decision]`
|
|
16
17
|
- [ ] Every blocker is backed by reproducible grep/sed/nl evidence; conclusions not directly verified are declared under Self-Doubt
|
|
17
18
|
|
|
18
19
|
**Common anti-examples**:
|
|
@@ -41,6 +41,16 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
41
41
|
|
|
42
42
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
43
43
|
|
|
44
|
+
## Step Start: Write the started Marker
|
|
45
|
+
|
|
46
|
+
After prerequisites pass and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N}) [started]** by {agent} — started
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`ai task log` pairs it with the done entry written when the review completes onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
53
|
+
|
|
44
54
|
## Steps
|
|
45
55
|
|
|
46
56
|
### 1. Verify Prerequisites
|
|
@@ -61,7 +71,10 @@ Read the highest-round code artifact and, if present, the highest-round fix arti
|
|
|
61
71
|
|
|
62
72
|
### 4. Perform the Review
|
|
63
73
|
|
|
64
|
-
Follow `.agents/workflows/feature-development.yaml` and inspect
|
|
74
|
+
Follow `.agents/workflows/feature-development.yaml` and inspect the full change context:
|
|
75
|
+
- `git diff --binary HEAD -- <post-review-globs>` for tracked changes
|
|
76
|
+
- `git ls-files -o --exclude-standard -z -- <post-review-globs>` for untracked new files
|
|
77
|
+
- `node .agents/scripts/review-diff-fingerprint.js worktree HEAD` for the reviewed diff fingerprint; write it into the report
|
|
65
78
|
|
|
66
79
|
> Detailed review criteria, severity rules, and reviewer expectations live in `reference/review-criteria.md`. Read `reference/review-criteria.md` before reviewing.
|
|
67
80
|
> Test review gate: when `git diff` touches test files, read `.agents/rules/testing-discipline.md` first and check it item by item, especially "do not add negative assertions when a positive assertion already covers the behavior".
|
|
@@ -41,6 +41,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
41
41
|
|
|
42
42
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
43
43
|
|
|
44
|
+
## 步骤开始:写入 started 标记
|
|
45
|
+
|
|
46
|
+
确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N}) [started]** by {agent} — started
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`ai task log` 会把它与审查完成时写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
53
|
+
|
|
44
54
|
## 执行步骤
|
|
45
55
|
### 1. 验证前置条件
|
|
46
56
|
|
|
@@ -60,7 +70,10 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
60
70
|
|
|
61
71
|
### 4. 执行审查
|
|
62
72
|
|
|
63
|
-
遵循 `.agents/workflows/feature-development.yaml
|
|
73
|
+
遵循 `.agents/workflows/feature-development.yaml`,并同时检查完整变更上下文:
|
|
74
|
+
- `git diff --binary HEAD -- <post-review-globs>` 覆盖已跟踪变更
|
|
75
|
+
- `git ls-files -o --exclude-standard -z -- <post-review-globs>` 覆盖未跟踪新文件
|
|
76
|
+
- `node .agents/scripts/review-diff-fingerprint.js worktree HEAD` 生成审查差异指纹,并写入报告
|
|
64
77
|
|
|
65
78
|
> 详细审查标准、严重程度划分和 reviewer 关注点见 `reference/review-criteria.md`。执行此步骤前先读取 `reference/review-criteria.md`。
|
|
66
79
|
> 测试审查硬门禁:当 `git diff` 触及测试文件时,必须先读取 `.agents/rules/testing-discipline.md` 并逐条核对(尤其"正向已覆盖时不应再加反向断言")。
|
|
@@ -24,12 +24,15 @@
|
|
|
24
24
|
"Conclusion and Recommendations",
|
|
25
25
|
"State Check",
|
|
26
26
|
"Evidence",
|
|
27
|
-
"Self-Doubt"
|
|
27
|
+
"Self-Doubt",
|
|
28
|
+
"Review Disagreement Ledger Writeback"
|
|
28
29
|
],
|
|
29
30
|
"required_patterns": [
|
|
30
31
|
"^### Approval Decision$",
|
|
31
32
|
"^\\$ ",
|
|
32
|
-
"^- \\*\\*Overall Verdict\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$"
|
|
33
|
+
"^- \\*\\*Overall Verdict\\*\\*[::]\\s*(?:通过|需要修改|拒绝|Approved|Changes Requested|Rejected)\\s*$",
|
|
34
|
+
"^- \\*\\*Review Baseline Commit\\*\\*[::]\\s*\\S",
|
|
35
|
+
"^- \\*\\*Reviewed Diff Fingerprint\\*\\*[::]\\s*sha256:[0-9a-f]{64}\\s*$"
|
|
33
36
|
],
|
|
34
37
|
"freshness_minutes": 30
|
|
35
38
|
},
|