@fitlab-ai/agent-infra 0.7.1 → 0.7.2
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 +11 -0
- package/dist/bin/cli.js +12 -0
- package/dist/lib/sandbox/commands/create.js +10 -2
- package/dist/lib/sandbox/commands/enter.js +8 -7
- package/dist/lib/sandbox/commands/list-running.js +21 -32
- package/dist/lib/sandbox/commands/ls.js +20 -22
- package/dist/lib/sandbox/index.js +7 -3
- package/dist/lib/sandbox/task-resolver.js +1 -1
- package/dist/lib/sandbox/tools.js +1 -1
- package/dist/lib/table.js +29 -0
- package/dist/lib/task/commands/ls.js +122 -0
- package/dist/lib/task/commands/show.js +135 -0
- package/dist/lib/task/frontmatter.js +32 -0
- package/dist/lib/task/index.js +41 -0
- package/dist/lib/task/short-id.js +80 -0
- package/lib/sandbox/commands/create.ts +11 -2
- package/lib/sandbox/commands/enter.ts +8 -7
- package/lib/sandbox/commands/list-running.ts +23 -37
- package/lib/sandbox/commands/ls.ts +25 -25
- package/lib/sandbox/index.ts +7 -3
- package/lib/sandbox/task-resolver.ts +1 -1
- package/lib/sandbox/tools.ts +1 -1
- package/lib/table.ts +32 -0
- package/lib/task/commands/ls.ts +138 -0
- package/lib/task/commands/show.ts +139 -0
- package/lib/task/frontmatter.ts +30 -0
- package/lib/task/index.ts +44 -0
- package/lib/task/short-id.ts +97 -0
- package/package.json +1 -1
- package/templates/.agents/hooks/auto-resume.sh +87 -0
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.en.md +4 -1
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +4 -1
- package/templates/.agents/rules/next-step-output.en.md +59 -0
- package/templates/.agents/rules/next-step-output.zh-CN.md +59 -0
- package/templates/.agents/rules/task-short-id.en.md +54 -62
- package/templates/.agents/rules/task-short-id.zh-CN.md +35 -54
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +17 -0
- package/templates/.agents/scripts/task-short-id.js +32 -189
- package/templates/.agents/skills/analyze-task/SKILL.en.md +10 -12
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/analyze-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/analyze-task/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +6 -6
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/block-task/config/verify.json +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +6 -6
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/cancel-task/config/verify.json +1 -1
- package/templates/.agents/skills/check-task/SKILL.en.md +12 -10
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +12 -10
- package/templates/.agents/skills/close-codescan/SKILL.en.md +6 -6
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +6 -6
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/code-task/SKILL.en.md +10 -6
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +11 -6
- package/templates/.agents/skills/code-task/config/verify.en.json +2 -1
- package/templates/.agents/skills/code-task/config/verify.zh-CN.json +2 -1
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +10 -5
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +10 -5
- package/templates/.agents/skills/code-task/reference/output-template.en.md +3 -3
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/reference/report-template.en.md +8 -0
- package/templates/.agents/skills/code-task/reference/report-template.zh-CN.md +8 -0
- package/templates/.agents/skills/commit/SKILL.en.md +2 -2
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +9 -9
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +9 -9
- package/templates/.agents/skills/complete-task/SKILL.en.md +6 -2
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +6 -2
- package/templates/.agents/skills/complete-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +6 -6
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/create-pr/config/verify.json +2 -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-pr/reference/pr-body-template.en.md +3 -3
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +3 -3
- package/templates/.agents/skills/create-task/SKILL.en.md +17 -17
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +17 -17
- package/templates/.agents/skills/create-task/config/verify.json +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +8 -8
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/import-codescan/config/verify.json +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +8 -8
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/import-dependabot/config/verify.json +1 -1
- package/templates/.agents/skills/import-issue/SKILL.en.md +7 -7
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/plan-task/SKILL.en.md +10 -12
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/plan-task/config/verify.en.json +1 -1
- package/templates/.agents/skills/plan-task/config/verify.zh-CN.json +1 -1
- package/templates/.agents/skills/restore-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.en.md +4 -2
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +4 -2
- package/templates/.agents/skills/review-analysis/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +15 -15
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +15 -15
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +5 -2
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +5 -2
- package/templates/.agents/skills/review-code/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +9 -9
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +9 -9
- package/templates/.agents/skills/review-code/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +4 -2
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +4 -2
- package/templates/.agents/skills/review-plan/config/verify.en.json +3 -2
- package/templates/.agents/skills/review-plan/config/verify.zh-CN.json +3 -2
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +15 -15
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +15 -15
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +7 -1
- package/templates/.agents/skills/review-plan/reference/report-template.zh-CN.md +7 -1
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +2 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +2 -0
- package/templates/.agents/templates/task.en.md +0 -1
- package/templates/.agents/templates/task.zh-CN.md +0 -1
- package/templates/.agents/workflows/bug-fix.en.yaml +1 -1
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.en.yaml +1 -1
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/refactoring.en.yaml +1 -1
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
- package/templates/.claude/settings.json +11 -0
|
@@ -30,7 +30,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
30
30
|
|
|
31
31
|
## 任务入参短号别名
|
|
32
32
|
|
|
33
|
-
> 如果 `{task-id}`
|
|
33
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
34
34
|
|
|
35
35
|
## 执行步骤
|
|
36
36
|
### 1. 验证前置条件
|
|
@@ -76,7 +76,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
76
76
|
- `updated_at`:{当前时间}
|
|
77
77
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
78
78
|
- 追加:
|
|
79
|
-
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analysis
|
|
79
|
+
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Analysis (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
|
|
80
80
|
|
|
81
81
|
如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测,然后同步 task 评论并发布 `{review-artifact}` 评论。
|
|
82
82
|
|
|
@@ -92,6 +92,8 @@ node .agents/scripts/validate-artifact.js gate review-analysis .agents/workspace
|
|
|
92
92
|
|
|
93
93
|
按 `reference/output-templates.md` 的结论分支输出,并展示所有 TUI 的下一步命令。
|
|
94
94
|
|
|
95
|
+
> 渲染「下一步」命令时,`{task-ref}` 为当前任务短号 `#NN`(取值与回退见 `.agents/rules/next-step-output.md`,渲染前先读取)。其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式。
|
|
96
|
+
|
|
95
97
|
## 完成检查清单
|
|
96
98
|
|
|
97
99
|
- [ ] 已审查最新分析上下文
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"Environment-Blocked Findings",
|
|
24
24
|
"Conclusion and Recommendations",
|
|
25
25
|
"State Check",
|
|
26
|
-
"Evidence"
|
|
26
|
+
"Evidence",
|
|
27
|
+
"Self-Doubt"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### Approval Decision$",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"freshness_minutes": 30
|
|
33
34
|
},
|
|
34
35
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Analysis Review \\(Round \\d+\\)",
|
|
36
|
+
"expected_action_pattern": "(Review Analysis|Analysis Review) \\(Round \\d+\\)",
|
|
36
37
|
"freshness_minutes": 30
|
|
37
38
|
},
|
|
38
39
|
"platform-sync": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"环境性遗留",
|
|
24
24
|
"结论与建议",
|
|
25
25
|
"状态核对",
|
|
26
|
-
"证据原文"
|
|
26
|
+
"证据原文",
|
|
27
|
+
"自我质疑"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### 审查决定$",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"freshness_minutes": 30
|
|
33
34
|
},
|
|
34
35
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Analysis Review \\(Round \\d+\\)",
|
|
36
|
+
"expected_action_pattern": "(Review Analysis|Analysis Review) \\(Round \\d+\\)",
|
|
36
37
|
"freshness_minutes": 30
|
|
37
38
|
},
|
|
38
39
|
"platform-sync": {
|
|
@@ -25,9 +25,9 @@ Task {task-id} requirement analysis review completed. Verdict: approved.
|
|
|
25
25
|
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
26
|
|
|
27
27
|
Next step - write the technical plan:
|
|
28
|
-
- Claude Code / OpenCode: /plan-task {task-
|
|
29
|
-
- Gemini CLI: /agent-infra:plan-task {task-
|
|
30
|
-
- Codex CLI: $plan-task {task-
|
|
28
|
+
- Claude Code / OpenCode: /plan-task {task-ref}
|
|
29
|
+
- Gemini CLI: /agent-infra:plan-task {task-ref}
|
|
30
|
+
- Codex CLI: $plan-task {task-ref}
|
|
31
31
|
|
|
32
32
|
[When env-blocked > 0, append:]
|
|
33
33
|
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /analyze-task.
|
|
@@ -41,14 +41,14 @@ Task {task-id} requirement analysis review completed. Verdict: approved.
|
|
|
41
41
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
42
42
|
|
|
43
43
|
Next step - revise analysis before continuing (recommended):
|
|
44
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
45
|
-
- Gemini CLI: /agent-infra:analyze-task {task-
|
|
46
|
-
- Codex CLI: $analyze-task {task-
|
|
44
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
45
|
+
- Gemini CLI: /agent-infra:analyze-task {task-ref}
|
|
46
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
47
47
|
|
|
48
48
|
Or proceed directly to planning:
|
|
49
|
-
- Claude Code / OpenCode: /plan-task {task-
|
|
50
|
-
- Gemini CLI: /agent-infra:plan-task {task-
|
|
51
|
-
- Codex CLI: $plan-task {task-
|
|
49
|
+
- Claude Code / OpenCode: /plan-task {task-ref}
|
|
50
|
+
- Gemini CLI: /agent-infra:plan-task {task-ref}
|
|
51
|
+
- Codex CLI: $plan-task {task-ref}
|
|
52
52
|
|
|
53
53
|
[When env-blocked > 0, append:]
|
|
54
54
|
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /analyze-task.
|
|
@@ -62,9 +62,9 @@ Task {task-id} requirement analysis review completed. Verdict: changes requested
|
|
|
62
62
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
63
63
|
|
|
64
64
|
Next step - revise requirement analysis:
|
|
65
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
66
|
-
- Gemini CLI: /agent-infra:analyze-task {task-
|
|
67
|
-
- Codex CLI: $analyze-task {task-
|
|
65
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
66
|
+
- Gemini CLI: /agent-infra:analyze-task {task-ref}
|
|
67
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
68
68
|
|
|
69
69
|
[When env-blocked > 0, append:]
|
|
70
70
|
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /analyze-task.
|
|
@@ -78,9 +78,9 @@ Task {task-id} requirement analysis review completed. Verdict: rejected, fresh a
|
|
|
78
78
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
79
79
|
|
|
80
80
|
Next step - re-analyze:
|
|
81
|
-
- Claude Code / OpenCode: /analyze-task {task-
|
|
82
|
-
- Gemini CLI: /agent-infra:analyze-task {task-
|
|
83
|
-
- Codex CLI: $analyze-task {task-
|
|
81
|
+
- Claude Code / OpenCode: /analyze-task {task-ref}
|
|
82
|
+
- Gemini CLI: /agent-infra:analyze-task {task-ref}
|
|
83
|
+
- Codex CLI: $analyze-task {task-ref}
|
|
84
84
|
|
|
85
85
|
[When env-blocked > 0, append:]
|
|
86
86
|
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /analyze-task.
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
26
|
|
|
27
27
|
下一步 - 编写技术方案:
|
|
28
|
-
- Claude Code / OpenCode:/plan-task {task-
|
|
29
|
-
- Gemini CLI:/agent-infra:plan-task {task-
|
|
30
|
-
- Codex CLI:$plan-task {task-
|
|
28
|
+
- Claude Code / OpenCode:/plan-task {task-ref}
|
|
29
|
+
- Gemini CLI:/agent-infra:plan-task {task-ref}
|
|
30
|
+
- Codex CLI:$plan-task {task-ref}
|
|
31
31
|
|
|
32
32
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
33
33
|
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
42
42
|
|
|
43
43
|
下一步 - 修订分析后继续(推荐):
|
|
44
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
45
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
46
|
-
- Codex CLI:$analyze-task {task-
|
|
44
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
45
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
46
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
47
47
|
|
|
48
48
|
或直接进入方案设计:
|
|
49
|
-
- Claude Code / OpenCode:/plan-task {task-
|
|
50
|
-
- Gemini CLI:/agent-infra:plan-task {task-
|
|
51
|
-
- Codex CLI:$plan-task {task-
|
|
49
|
+
- Claude Code / OpenCode:/plan-task {task-ref}
|
|
50
|
+
- Gemini CLI:/agent-infra:plan-task {task-ref}
|
|
51
|
+
- Codex CLI:$plan-task {task-ref}
|
|
52
52
|
|
|
53
53
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
54
54
|
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
63
63
|
|
|
64
64
|
下一步 - 修订需求分析:
|
|
65
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
66
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
67
|
-
- Codex CLI:$analyze-task {task-
|
|
65
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
66
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
67
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
68
68
|
|
|
69
69
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
70
70
|
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
79
79
|
|
|
80
80
|
下一步 - 重新分析:
|
|
81
|
-
- Claude Code / OpenCode:/analyze-task {task-
|
|
82
|
-
- Gemini CLI:/agent-infra:analyze-task {task-
|
|
83
|
-
- Codex CLI:$analyze-task {task-
|
|
81
|
+
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
82
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
83
|
+
- Codex CLI:$analyze-task {task-ref}
|
|
84
84
|
|
|
85
85
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
86
86
|
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /analyze-task。
|
|
@@ -61,7 +61,7 @@ Use this template when writing `review-analysis.md` or `review-analysis-r{N}.md`
|
|
|
61
61
|
|
|
62
62
|
## Evidence
|
|
63
63
|
|
|
64
|
-
> 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.
|
|
64
|
+
> 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.
|
|
65
65
|
|
|
66
66
|
- Claim: {verified claim}
|
|
67
67
|
```text
|
|
@@ -69,6 +69,12 @@ $ {command}
|
|
|
69
69
|
{raw output}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
## Self-Doubt
|
|
73
|
+
|
|
74
|
+
> Explicitly declare conclusions, inferences, and assumptions in this review that were **not directly verified**; downstream can rebut them on this basis. Write "None" if there are none.
|
|
75
|
+
|
|
76
|
+
- {an unverified conclusion or inference; note why it was not verified and the impact if it is overturned}
|
|
77
|
+
|
|
72
78
|
## Highlights
|
|
73
79
|
|
|
74
80
|
- {what went well}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
## 证据原文
|
|
64
64
|
|
|
65
|
-
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$
|
|
65
|
+
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。每条 Blocker 必须配可复现命令(rg/grep/sed/nl)及其原文;无法复现的判断须降级或移入「自我质疑」。
|
|
66
66
|
|
|
67
67
|
- 断言:{verified claim}
|
|
68
68
|
```text
|
|
@@ -70,6 +70,12 @@ $ {command}
|
|
|
70
70
|
{raw output}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
## 自我质疑
|
|
74
|
+
|
|
75
|
+
> 显式声明本轮审查中**未直接验证**的结论、推断项与所作假设;下游据此可反驳。无则写「(无)」。
|
|
76
|
+
|
|
77
|
+
- {未直接验证的结论或推断;说明为何未验证、若被推翻的影响}
|
|
78
|
+
|
|
73
79
|
## 亮点
|
|
74
80
|
|
|
75
81
|
- {what went well}
|
|
@@ -13,11 +13,13 @@ 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
|
+
- [ ] Every blocker is backed by reproducible grep/sed/nl evidence; conclusions not directly verified are declared under Self-Doubt
|
|
16
17
|
|
|
17
18
|
**Common anti-examples**:
|
|
18
19
|
- Treating implementation design as requirement analysis and locking in technical details too early
|
|
19
20
|
- Restating the Issue without adding impact scope, risks, or acceptance criteria
|
|
20
21
|
- Presenting uncertain information as fact without marking assumptions or open questions
|
|
22
|
+
- Asserting a `file:line` or behavior from memory or impression without verifying via rg/nl
|
|
21
23
|
|
|
22
24
|
## Common Review Principles
|
|
23
25
|
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
- [ ] 风险、边界情况和开放问题是否记录
|
|
14
14
|
- [ ] 后续设计阶段是否有足够输入
|
|
15
15
|
- [ ] 与原始 Issue / 用户需求是否一致
|
|
16
|
+
- [ ] 每条 blocker 都配可复现的 grep/sed/nl 证据,未直接验证的结论已在「自我质疑」声明
|
|
16
17
|
|
|
17
18
|
**常见反例**:
|
|
18
19
|
- 把实现方案当作需求分析,提前锁定技术细节
|
|
19
20
|
- 只复述 Issue 文案,没有补充影响范围、风险和验收标准
|
|
20
21
|
- 对无法确认的信息直接下结论,没有标记假设或开放问题
|
|
22
|
+
- 凭印象或记忆断言 `file:line`/行为,没有用 rg/nl 复核就下结论
|
|
21
23
|
|
|
22
24
|
## 通用审查原则
|
|
23
25
|
|
|
@@ -21,6 +21,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
21
21
|
| "It was only one line, so it cannot affect behavior." | Line count is not impact; read the full `git diff` and trace the downstream effect of each change. |
|
|
22
22
|
| "It looks mostly fine, so approve it." | The verdict must be backed by blocker/major/minor counts, and every finding must cite file:line; do not approve from impression. |
|
|
23
23
|
| "The test change looks reasonable, so I can skim it." | Before reviewing test changes, check `.agents/rules/testing-discipline.md` item by item (see the step 4 gate). |
|
|
24
|
+
| "I'm sure it's that line, no need to check." | Line numbers drift; verify `file:line` via rg/nl before concluding, and do not file a blocker you cannot reproduce. |
|
|
24
25
|
|
|
25
26
|
## Step 0: State Check (pre-execution hard gate)
|
|
26
27
|
|
|
@@ -38,7 +39,7 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
38
39
|
|
|
39
40
|
## Task id short ref
|
|
40
41
|
|
|
41
|
-
> If `{task-id}`
|
|
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.
|
|
42
43
|
|
|
43
44
|
## Steps
|
|
44
45
|
|
|
@@ -80,7 +81,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
80
81
|
```
|
|
81
82
|
|
|
82
83
|
Update task.md and append:
|
|
83
|
-
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code
|
|
84
|
+
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {artifact-filename}`
|
|
84
85
|
|
|
85
86
|
Omit the bracketed segment when env-blocked = 0; append ` (+ {n} env-blocked)` when env-blocked > 0.
|
|
86
87
|
|
|
@@ -121,6 +122,8 @@ env-blocked counts do not influence branch selection; they are appended to the s
|
|
|
121
122
|
|
|
122
123
|
> The full four-branch output templates, selection rules, and prohibition clauses live in `reference/output-templates.md`. Read `reference/output-templates.md` before reporting the review result.
|
|
123
124
|
|
|
125
|
+
> When rendering "Next steps" commands, `{task-ref}` is the current task's short id `#NN` (see `.agents/rules/next-step-output.md` for lookup and fallback; read it before rendering). Other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form.
|
|
126
|
+
|
|
124
127
|
Include all TUI command formats in the next-step output. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
125
128
|
|
|
126
129
|
## Completion Checklist
|
|
@@ -21,6 +21,7 @@ description: "审查代码实现并输出代码审查报告"
|
|
|
21
21
|
| 「只改了一行,不影响功能」 | 行数不等于影响面;必须读完整 `git diff` 并定位每处改动的下游效果。 |
|
|
22
22
|
| 「大体没问题,给个 Approved」 | 结论必须由 blocker/major/minor 计数支撑,每个问题引用文件:行号,不能凭印象放行。 |
|
|
23
23
|
| 「测试改动看着合理,跳过细看」 | 审查测试变更前必须逐条核对 `.agents/rules/testing-discipline.md`(见步骤 4 门禁)。 |
|
|
24
|
+
| 「记得就是这一行,不用查」 | 行号会漂移;下结论前必须用 rg/nl 复核 `file:line`,不能复现的判断不要写成 blocker。 |
|
|
24
25
|
|
|
25
26
|
## 第 0 步:状态核对(执行前硬约束)
|
|
26
27
|
|
|
@@ -38,7 +39,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
38
39
|
|
|
39
40
|
## 任务入参短号别名
|
|
40
41
|
|
|
41
|
-
> 如果 `{task-id}`
|
|
42
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
42
43
|
|
|
43
44
|
## 执行步骤
|
|
44
45
|
### 1. 验证前置条件
|
|
@@ -83,7 +84,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
83
84
|
- `updated_at`:{当前时间}
|
|
84
85
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
85
86
|
- 追加:
|
|
86
|
-
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code
|
|
87
|
+
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Code (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {artifact-filename}`
|
|
87
88
|
|
|
88
89
|
env-blocked = 0 时省略括号部分;env-blocked > 0 时附加 ` (+ {n} env-blocked)`。
|
|
89
90
|
|
|
@@ -124,6 +125,8 @@ env-blocked 的数量不参与分支选择,仅在数字摘要末尾附带显
|
|
|
124
125
|
|
|
125
126
|
> 完整的 4 分支输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
|
|
126
127
|
|
|
128
|
+
> 渲染「下一步」命令时,`{task-ref}` 为当前任务短号 `#NN`(取值与回退见 `.agents/rules/next-step-output.md`,渲染前先读取)。其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式。
|
|
129
|
+
|
|
127
130
|
向用户展示下一步时,必须包含所有 TUI 命令格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
128
131
|
|
|
129
132
|
## 完成检查清单
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"Environment-Blocked Findings",
|
|
24
24
|
"Conclusion and Recommendations",
|
|
25
25
|
"State Check",
|
|
26
|
-
"Evidence"
|
|
26
|
+
"Evidence",
|
|
27
|
+
"Self-Doubt"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### Approval Decision$",
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
"freshness_minutes": 30
|
|
34
35
|
},
|
|
35
36
|
"activity-log": {
|
|
36
|
-
"expected_action_pattern": "Code Review \\(Round \\d+\\)",
|
|
37
|
+
"expected_action_pattern": "(Review Code|Code Review) \\(Round \\d+\\)",
|
|
37
38
|
"freshness_minutes": 30
|
|
38
39
|
},
|
|
39
40
|
"platform-sync": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"环境性遗留",
|
|
24
24
|
"结论与建议",
|
|
25
25
|
"状态核对",
|
|
26
|
-
"证据原文"
|
|
26
|
+
"证据原文",
|
|
27
|
+
"自我质疑"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### 审查决定$",
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
"freshness_minutes": 30
|
|
34
35
|
},
|
|
35
36
|
"activity-log": {
|
|
36
|
-
"expected_action_pattern": "Code Review \\(Round \\d+\\)",
|
|
37
|
+
"expected_action_pattern": "(Review Code|Code Review) \\(Round \\d+\\)",
|
|
37
38
|
"freshness_minutes": 30
|
|
38
39
|
},
|
|
39
40
|
"platform-sync": {
|
|
@@ -43,9 +43,9 @@ Task {task-id} review completed. Verdict: approved.
|
|
|
43
43
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
44
44
|
|
|
45
45
|
Next step - fix before commit (recommended):
|
|
46
|
-
- Claude Code / OpenCode: /code-task {task-
|
|
47
|
-
- Gemini CLI: /agent-infra:code-task {task-
|
|
48
|
-
- Codex CLI: $code-task {task-
|
|
46
|
+
- Claude Code / OpenCode: /code-task {task-ref}
|
|
47
|
+
- Gemini CLI: /agent-infra:code-task {task-ref}
|
|
48
|
+
- Codex CLI: $code-task {task-ref}
|
|
49
49
|
|
|
50
50
|
Or commit directly (skip fix):
|
|
51
51
|
- Claude Code / OpenCode: /commit
|
|
@@ -64,9 +64,9 @@ Task {task-id} review completed. Verdict: changes requested.
|
|
|
64
64
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
65
65
|
|
|
66
66
|
Next step - fix the findings:
|
|
67
|
-
- Claude Code / OpenCode: /code-task {task-
|
|
68
|
-
- Gemini CLI: /agent-infra:code-task {task-
|
|
69
|
-
- Codex CLI: $code-task {task-
|
|
67
|
+
- Claude Code / OpenCode: /code-task {task-ref}
|
|
68
|
+
- Gemini CLI: /agent-infra:code-task {task-ref}
|
|
69
|
+
- Codex CLI: $code-task {task-ref}
|
|
70
70
|
|
|
71
71
|
[When env-blocked > 0, append this final line:]
|
|
72
72
|
Reminder: env-blocked findings must be carried in the PR description as a "manual verification required" checklist and should not trigger /code-task.
|
|
@@ -80,9 +80,9 @@ Task {task-id} review completed. Verdict: rejected, re-design the technical plan
|
|
|
80
80
|
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
81
81
|
|
|
82
82
|
Next step - re-design the technical plan:
|
|
83
|
-
- Claude Code / OpenCode: /plan-task {task-
|
|
84
|
-
- Gemini CLI: /agent-infra:plan-task {task-
|
|
85
|
-
- Codex CLI: $plan-task {task-
|
|
83
|
+
- Claude Code / OpenCode: /plan-task {task-ref}
|
|
84
|
+
- Gemini CLI: /agent-infra:plan-task {task-ref}
|
|
85
|
+
- Codex CLI: $plan-task {task-ref}
|
|
86
86
|
|
|
87
87
|
> Note: Rejected means the implementation direction needs to be reworked end-to-end, not patched locally. `code-task/scripts/detect-mode.js` branch #7 refuses a direct `/code-task` and requires a fresh plan first.
|
|
88
88
|
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
44
44
|
|
|
45
45
|
下一步 - 修复问题后提交(推荐):
|
|
46
|
-
- Claude Code / OpenCode:/code-task {task-
|
|
47
|
-
- Gemini CLI:/agent-infra:code-task {task-
|
|
48
|
-
- Codex CLI:$code-task {task-
|
|
46
|
+
- Claude Code / OpenCode:/code-task {task-ref}
|
|
47
|
+
- Gemini CLI:/agent-infra:code-task {task-ref}
|
|
48
|
+
- Codex CLI:$code-task {task-ref}
|
|
49
49
|
|
|
50
50
|
或直接提交(跳过修复):
|
|
51
51
|
- Claude Code / OpenCode:/commit
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
65
65
|
|
|
66
66
|
下一步 - 修复问题:
|
|
67
|
-
- Claude Code / OpenCode:/code-task {task-
|
|
68
|
-
- Gemini CLI:/agent-infra:code-task {task-
|
|
69
|
-
- Codex CLI:$code-task {task-
|
|
67
|
+
- Claude Code / OpenCode:/code-task {task-ref}
|
|
68
|
+
- Gemini CLI:/agent-infra:code-task {task-ref}
|
|
69
|
+
- Codex CLI:$code-task {task-ref}
|
|
70
70
|
|
|
71
71
|
[当 env-blocked > 0 时,在最后附加一行:]
|
|
72
72
|
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /code-task。
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
81
81
|
|
|
82
82
|
下一步 - 重新设计技术方案:
|
|
83
|
-
- Claude Code / OpenCode:/plan-task {task-
|
|
84
|
-
- Gemini CLI:/agent-infra:plan-task {task-
|
|
85
|
-
- Codex CLI:$plan-task {task-
|
|
83
|
+
- Claude Code / OpenCode:/plan-task {task-ref}
|
|
84
|
+
- Gemini CLI:/agent-infra:plan-task {task-ref}
|
|
85
|
+
- Codex CLI:$plan-task {task-ref}
|
|
86
86
|
|
|
87
87
|
> 注意:Rejected 表示实现方向需要整体重做,不是局部修复。`code-task/scripts/detect-mode.js` 分支 #7 会拒绝直接 `/code-task`,要求先重新方案设计。
|
|
88
88
|
|
|
@@ -61,7 +61,7 @@ Use this template when writing `review-code.md` or `review-code-r{N}.md`.
|
|
|
61
61
|
|
|
62
62
|
## Evidence
|
|
63
63
|
|
|
64
|
-
> 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.
|
|
64
|
+
> 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.
|
|
65
65
|
|
|
66
66
|
- Claim: {verified claim}
|
|
67
67
|
```text
|
|
@@ -69,6 +69,12 @@ $ {command}
|
|
|
69
69
|
{raw output}
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
+
## Self-Doubt
|
|
73
|
+
|
|
74
|
+
> Explicitly declare conclusions, inferences, and assumptions in this review that were **not directly verified**; downstream can rebut them on this basis. Write "None" if there are none.
|
|
75
|
+
|
|
76
|
+
- {an unverified conclusion or inference; note why it was not verified and the impact if it is overturned}
|
|
77
|
+
|
|
72
78
|
## Highlights
|
|
73
79
|
|
|
74
80
|
- {what went well}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
|
|
63
63
|
## 证据原文
|
|
64
64
|
|
|
65
|
-
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$
|
|
65
|
+
> 每条“我验证了 X”断言都要配对对应 tool output 原文;gate 仅校验本段存在和至少一行 `$ `。每条 Blocker 必须配可复现命令(rg/grep/sed/nl)及其原文;无法复现的判断须降级或移入「自我质疑」。
|
|
66
66
|
|
|
67
67
|
- 断言:{verified claim}
|
|
68
68
|
```text
|
|
@@ -70,6 +70,12 @@ $ {command}
|
|
|
70
70
|
{raw output}
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
## 自我质疑
|
|
74
|
+
|
|
75
|
+
> 显式声明本轮审查中**未直接验证**的结论、推断项与所作假设;下游据此可反驳。无则写「(无)」。
|
|
76
|
+
|
|
77
|
+
- {未直接验证的结论或推断;说明为何未验证、若被推翻的影响}
|
|
78
|
+
|
|
73
79
|
## 亮点
|
|
74
80
|
|
|
75
81
|
- {what went well}
|
|
@@ -14,11 +14,13 @@ Follow the `code-review` step in `.agents/workflows/feature-development.yaml`.
|
|
|
14
14
|
- [ ] Performance and security risks
|
|
15
15
|
- [ ] Comments and documentation
|
|
16
16
|
- [ ] Consistency with the approved technical plan
|
|
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**:
|
|
19
20
|
- Checking only whether tests pass without reading the actual diff
|
|
20
21
|
- Treating wording preferences as reproducible code problems
|
|
21
22
|
- Misclassifying environment-limited verification gaps as blockers
|
|
23
|
+
- Asserting a `file:line` or behavior from memory or impression without verifying via rg/nl
|
|
22
24
|
|
|
23
25
|
## Common Review Principles
|
|
24
26
|
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
- [ ] 性能与安全风险
|
|
15
15
|
- [ ] 代码注释和文档
|
|
16
16
|
- [ ] 与已批准技术方案的一致性
|
|
17
|
+
- [ ] 每条 blocker 都配可复现的 grep/sed/nl 证据,未直接验证的结论已在「自我质疑」声明
|
|
17
18
|
|
|
18
19
|
**常见反例**:
|
|
19
20
|
- 只检查测试是否通过,没有阅读实际 diff
|
|
20
21
|
- 用自然语言措辞偏好替代可复现的代码问题
|
|
21
22
|
- 把环境缺失导致无法验证的事项误归类为 blocker
|
|
23
|
+
- 凭印象或记忆断言 `file:line`/行为,没有用 rg/nl 复核就下结论
|
|
22
24
|
|
|
23
25
|
## 通用审查原则
|
|
24
26
|
|
|
@@ -28,7 +28,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
28
28
|
|
|
29
29
|
## Task id short ref
|
|
30
30
|
|
|
31
|
-
> If `{task-id}`
|
|
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
33
|
## Steps
|
|
34
34
|
|
|
@@ -65,7 +65,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Set `current_step` to `technical-design-review`, refresh task metadata, and append:
|
|
68
|
-
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan
|
|
68
|
+
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
|
|
69
69
|
|
|
70
70
|
If task.md has a valid `issue_number`, read `.agents/rules/issue-sync.md`, sync the task comment, and publish the `{review-artifact}` comment.
|
|
71
71
|
|
|
@@ -78,3 +78,5 @@ node .agents/scripts/validate-artifact.js gate review-plan .agents/workspace/act
|
|
|
78
78
|
### 8. Tell the User
|
|
79
79
|
|
|
80
80
|
Use the conclusion branch in `reference/output-templates.md` and show all TUI command formats.
|
|
81
|
+
|
|
82
|
+
> When rendering "Next steps" commands, `{task-ref}` is the current task's short id `#NN` (see `.agents/rules/next-step-output.md` for lookup and fallback; read it before rendering). Other `{task-id}` placeholders (report titles, paths) keep the full TASK-id form.
|
|
@@ -30,7 +30,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
30
30
|
|
|
31
31
|
## 任务入参短号别名
|
|
32
32
|
|
|
33
|
-
> 如果 `{task-id}`
|
|
33
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
34
34
|
|
|
35
35
|
## 执行步骤
|
|
36
36
|
### 1. 验证前置条件
|
|
@@ -76,7 +76,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
76
76
|
- `updated_at`:{当前时间}
|
|
77
77
|
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
78
78
|
- 追加:
|
|
79
|
-
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Plan
|
|
79
|
+
`- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Review Plan (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n}[ (+ {n} env-blocked)] → {review-artifact}`
|
|
80
80
|
|
|
81
81
|
如果 task.md 中存在有效的 `issue_number`,执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测,然后同步 task 评论并发布 `{review-artifact}` 评论。
|
|
82
82
|
|
|
@@ -92,6 +92,8 @@ node .agents/scripts/validate-artifact.js gate review-plan .agents/workspace/act
|
|
|
92
92
|
|
|
93
93
|
按 `reference/output-templates.md` 的结论分支输出,并展示所有 TUI 的下一步命令。
|
|
94
94
|
|
|
95
|
+
> 渲染「下一步」命令时,`{task-ref}` 为当前任务短号 `#NN`(取值与回退见 `.agents/rules/next-step-output.md`,渲染前先读取)。其他 `{task-id}` 占位(报告标题、路径)保持完整 TASK-id 形式。
|
|
96
|
+
|
|
95
97
|
## 完成检查清单
|
|
96
98
|
|
|
97
99
|
- [ ] 已审查最新方案上下文
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"Environment-Blocked Findings",
|
|
24
24
|
"Conclusion and Recommendations",
|
|
25
25
|
"State Check",
|
|
26
|
-
"Evidence"
|
|
26
|
+
"Evidence",
|
|
27
|
+
"Self-Doubt"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### Approval Decision$",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"freshness_minutes": 30
|
|
33
34
|
},
|
|
34
35
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Plan Review \\(Round \\d+\\)",
|
|
36
|
+
"expected_action_pattern": "(Review Plan|Plan Review) \\(Round \\d+\\)",
|
|
36
37
|
"freshness_minutes": 30
|
|
37
38
|
},
|
|
38
39
|
"platform-sync": {
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
"环境性遗留",
|
|
24
24
|
"结论与建议",
|
|
25
25
|
"状态核对",
|
|
26
|
-
"证据原文"
|
|
26
|
+
"证据原文",
|
|
27
|
+
"自我质疑"
|
|
27
28
|
],
|
|
28
29
|
"required_patterns": [
|
|
29
30
|
"^### 审查决定$",
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"freshness_minutes": 30
|
|
33
34
|
},
|
|
34
35
|
"activity-log": {
|
|
35
|
-
"expected_action_pattern": "Plan Review \\(Round \\d+\\)",
|
|
36
|
+
"expected_action_pattern": "(Review Plan|Plan Review) \\(Round \\d+\\)",
|
|
36
37
|
"freshness_minutes": 30
|
|
37
38
|
},
|
|
38
39
|
"platform-sync": {
|