@fitlab-ai/agent-infra 0.8.2 → 0.8.4
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/README.zh-CN.md +10 -0
- package/bin/cli.ts +1 -1
- package/dist/bin/cli.js +2 -2
- package/dist/lib/cp.js +57 -16
- package/dist/lib/decide.js +2 -2
- package/dist/lib/defaults.json +2 -0
- package/dist/lib/init.js +7 -7
- package/dist/lib/merge.js +1 -1
- package/dist/lib/prompt.js +1 -1
- package/dist/lib/run/index.js +7 -7
- package/dist/lib/run/prompt.js +1 -1
- package/dist/lib/sandbox/capture.js +10 -8
- package/dist/lib/sandbox/clipboard/bridge.js +59 -21
- package/dist/lib/sandbox/clipboard/inbox.js +82 -0
- package/dist/lib/sandbox/clipboard/index.js +5 -6
- package/dist/lib/sandbox/clipboard/linux.js +91 -0
- package/dist/lib/sandbox/clipboard/paths.js +1 -1
- package/dist/lib/sandbox/clipboard/win32.js +144 -0
- package/dist/lib/sandbox/commands/create.js +106 -88
- package/dist/lib/sandbox/commands/enter.js +9 -9
- package/dist/lib/sandbox/commands/list-running.js +2 -2
- package/dist/lib/sandbox/commands/ls.js +7 -7
- package/dist/lib/sandbox/commands/prune.js +8 -8
- package/dist/lib/sandbox/commands/rebuild.js +38 -50
- package/dist/lib/sandbox/commands/refresh.js +2 -2
- package/dist/lib/sandbox/commands/rm.js +11 -11
- package/dist/lib/sandbox/commands/show.js +4 -4
- package/dist/lib/sandbox/commands/start.js +4 -4
- package/dist/lib/sandbox/commands/vm.js +4 -4
- package/dist/lib/sandbox/config.js +10 -4
- package/dist/lib/sandbox/constants.js +4 -1
- package/dist/lib/sandbox/credentials.js +1 -1
- package/dist/lib/sandbox/dotfiles.js +1 -1
- package/dist/lib/sandbox/engine.js +3 -3
- package/dist/lib/sandbox/engines/index.js +5 -5
- package/dist/lib/sandbox/engines/wsl2-paths.js +1 -1
- package/dist/lib/sandbox/image-build.js +80 -0
- package/dist/lib/sandbox/image-prune.js +2 -2
- package/dist/lib/sandbox/index.js +10 -10
- package/dist/lib/sandbox/managed-fs.js +1 -1
- package/dist/lib/sandbox/readme-scaffold.js +1 -1
- package/dist/lib/sandbox/runtimes/base.dockerfile +3 -0
- package/dist/lib/sandbox/shell.js +9 -1
- package/dist/lib/sandbox/tools.js +4 -4
- package/dist/lib/server/adapters/feishu/index.js +10 -3
- package/dist/lib/server/adapters/feishu/renderer.js +88 -0
- package/dist/lib/server/adapters/feishu/transport.js +2 -13
- package/dist/lib/server/daemon.js +64 -43
- package/dist/lib/server/display.js +83 -0
- package/dist/lib/server/index.js +2 -2
- package/dist/lib/server/process-control.js +2 -2
- package/dist/lib/server/protocol.js +2 -2
- package/dist/lib/server/streamer.js +5 -4
- package/dist/lib/task/commands/cat.js +2 -2
- package/dist/lib/task/commands/decisions.js +4 -4
- package/dist/lib/task/commands/files.js +3 -3
- package/dist/lib/task/commands/grep.js +3 -3
- package/dist/lib/task/commands/issue-body.js +4 -4
- package/dist/lib/task/commands/log.js +5 -5
- package/dist/lib/task/commands/ls.js +3 -3
- package/dist/lib/task/commands/show.js +1 -1
- package/dist/lib/task/commands/status.js +71 -25
- package/dist/lib/task/index.js +9 -9
- package/dist/lib/task/resolve-ref.js +1 -1
- package/dist/lib/task/workflow-warnings.js +94 -0
- package/dist/lib/update.js +4 -4
- package/lib/cp.ts +56 -15
- package/lib/defaults.json +2 -0
- package/lib/sandbox/capture.ts +5 -3
- package/lib/sandbox/clipboard/bridge.ts +62 -18
- package/lib/sandbox/clipboard/inbox.ts +83 -0
- package/lib/sandbox/clipboard/index.ts +5 -6
- package/lib/sandbox/clipboard/linux.ts +124 -0
- package/lib/sandbox/clipboard/win32.ts +173 -0
- package/lib/sandbox/commands/create.ts +132 -88
- package/lib/sandbox/commands/rebuild.ts +42 -54
- package/lib/sandbox/config.ts +13 -1
- package/lib/sandbox/constants.ts +4 -0
- package/lib/sandbox/image-build.ts +134 -0
- package/lib/sandbox/runtimes/base.dockerfile +3 -0
- package/lib/sandbox/shell.ts +11 -2
- package/lib/sandbox/tools.ts +5 -5
- package/lib/server/adapters/_contract.ts +3 -0
- package/lib/server/adapters/feishu/index.ts +11 -3
- package/lib/server/adapters/feishu/renderer.ts +99 -0
- package/lib/server/adapters/feishu/transport.ts +5 -18
- package/lib/server/daemon.ts +74 -38
- package/lib/server/display.ts +136 -0
- package/lib/server/streamer.ts +5 -4
- package/lib/task/commands/log.ts +3 -3
- package/lib/task/commands/status.ts +102 -21
- package/lib/task/workflow-warnings.ts +121 -0
- package/package.json +2 -2
- package/templates/.agents/README.en.md +3 -0
- package/templates/.agents/README.zh-CN.md +3 -0
- package/templates/.agents/rules/create-issue.github.en.md +4 -4
- package/templates/.agents/rules/create-issue.github.zh-CN.md +4 -4
- package/templates/.agents/rules/issue-pr-commands.github.en.md +7 -2
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +7 -2
- package/templates/.agents/rules/issue-sync.github.en.md +13 -0
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +13 -0
- package/templates/.agents/rules/next-step-output.en.md +15 -1
- package/templates/.agents/rules/next-step-output.zh-CN.md +15 -1
- package/templates/.agents/rules/pr-sync.github.en.md +17 -2
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +17 -2
- package/templates/.agents/rules/review-handshake.en.md +2 -2
- package/templates/.agents/rules/review-handshake.zh-CN.md +2 -2
- package/templates/.agents/rules/task-management.en.md +1 -1
- package/templates/.agents/rules/task-management.zh-CN.md +1 -1
- package/templates/.agents/rules/testing-discipline.en.md +3 -41
- package/templates/.agents/rules/testing-discipline.zh-CN.md +3 -41
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +57 -0
- package/templates/.agents/scripts/validate-artifact.js +213 -0
- package/templates/.agents/scripts/workflow-warnings.js +290 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +1 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/cancel-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +9 -9
- package/templates/.agents/skills/close-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/code-task/reference/branch-management.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/fix-mode.en.md +2 -2
- package/templates/.agents/skills/code-task/reference/fix-mode.zh-CN.md +2 -2
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/SKILL.en.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +6 -6
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +6 -6
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +142 -0
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +142 -0
- package/templates/.agents/skills/complete-manual-validation/config/verify.en.json +49 -0
- package/templates/.agents/skills/complete-manual-validation/config/verify.zh-CN.json +49 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.en.md +48 -0
- package/templates/.agents/skills/complete-manual-validation/reference/report-template.zh-CN.md +48 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.en.md +60 -0
- package/templates/.agents/skills/complete-manual-validation/reference/summary-update.zh-CN.md +87 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/create-pr/SKILL.en.md +6 -4
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +1 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +1 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +6 -3
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +9 -6
- package/templates/.agents/skills/import-codescan/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/init-milestones/SKILL.en.md +3 -2
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +165 -41
- package/templates/.agents/skills/plan-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +2 -2
- 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 +1 -1
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/SKILL.en.md +8 -4
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +6 -3
- package/templates/.agents/skills/review-code/config/verify.en.json +1 -0
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/review-code/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-code/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/review-code/reference/report-template.en.md +2 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +2 -2
- package/templates/.agents/skills/review-plan/SKILL.en.md +1 -1
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +5 -5
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +5 -5
- package/templates/.agents/skills/test/SKILL.zh-CN.md +26 -8
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +36 -6
- package/templates/.agents/skills/watch-pr/SKILL.en.md +2 -2
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.en.md +8 -1
- package/templates/.agents/skills/watch-pr/reference/monitor-and-heal.zh-CN.md +8 -1
- package/templates/.agents/templates/task.en.md +7 -0
- package/templates/.agents/templates/task.zh-CN.md +7 -0
- package/templates/.claude/commands/complete-manual-validation.en.md +9 -0
- package/templates/.claude/commands/complete-manual-validation.zh-CN.md +9 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.en.toml +8 -0
- package/templates/.gemini/commands/_project_/complete-manual-validation.zh-CN.toml +8 -0
- package/templates/.github/workflows/metadata-sync.yml +5 -0
- package/templates/.opencode/commands/complete-manual-validation.en.md +11 -0
- package/templates/.opencode/commands/complete-manual-validation.zh-CN.md +11 -0
|
@@ -57,7 +57,7 @@ description: >
|
|
|
57
57
|
获取当前时间:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
60
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -140,7 +140,7 @@ ai sandbox rm {branch}
|
|
|
140
140
|
|
|
141
141
|
下一步 - 检查任务状态(解除阻塞后):
|
|
142
142
|
- Claude Code / OpenCode:/check-task {task-ref}
|
|
143
|
-
- Gemini CLI:/
|
|
143
|
+
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
144
144
|
- Codex CLI:$check-task {task-ref}
|
|
145
145
|
```
|
|
146
146
|
|
|
@@ -58,7 +58,7 @@ When syncing to the Issue, replace any existing `status:` labels with the inferr
|
|
|
58
58
|
Get the current time:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
61
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
Update `task.md` in the task directory:
|
|
@@ -57,7 +57,7 @@ description: >
|
|
|
57
57
|
获取当前时间:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
60
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
更新任务目录中的 `task.md`:
|
|
@@ -149,7 +149,7 @@ ai sandbox rm {branch}
|
|
|
149
149
|
|
|
150
150
|
下一步 - 查看已转移任务:
|
|
151
151
|
- Claude Code / OpenCode:/check-task {task-ref}
|
|
152
|
-
- Gemini CLI:/
|
|
152
|
+
- Gemini CLI:/{{project}}:check-task {task-ref}
|
|
153
153
|
- Codex CLI:$check-task {task-ref}
|
|
154
154
|
```
|
|
155
155
|
|
|
@@ -78,15 +78,15 @@ ai task status {task-id}
|
|
|
78
78
|
|
|
79
79
|
| 当前状态 | Claude Code / OpenCode | Gemini CLI | Codex CLI |
|
|
80
80
|
|--------------------|------------------------------|------------------------------------------|------------------------------|
|
|
81
|
-
| 分析完成 | `/review-analysis {task-ref}` | `/
|
|
82
|
-
| 需求分析审查通过 | `/plan-task {task-ref}` | `/
|
|
83
|
-
| 需求分析审查有问题 | `/analyze-task {task-ref}` | `/
|
|
84
|
-
| 计划完成 | `/review-plan {task-ref}` | `/
|
|
85
|
-
| 技术方案审查通过 | `/code-task {task-ref}` | `/
|
|
86
|
-
| 技术方案审查有问题 | `/plan-task {task-ref}` | `/
|
|
87
|
-
| 实现完成 | `/review-code {task-ref}` | `/
|
|
88
|
-
| 代码审查通过 | `/commit` | `/
|
|
89
|
-
| 代码审查有问题 | `/code-task {task-ref}` | `/
|
|
81
|
+
| 分析完成 | `/review-analysis {task-ref}` | `/{{project}}:review-analysis {task-ref}` | `$review-analysis {task-ref}` |
|
|
82
|
+
| 需求分析审查通过 | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
83
|
+
| 需求分析审查有问题 | `/analyze-task {task-ref}` | `/{{project}}:analyze-task {task-ref}` | `$analyze-task {task-ref}` |
|
|
84
|
+
| 计划完成 | `/review-plan {task-ref}` | `/{{project}}:review-plan {task-ref}` | `$review-plan {task-ref}` |
|
|
85
|
+
| 技术方案审查通过 | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
86
|
+
| 技术方案审查有问题 | `/plan-task {task-ref}` | `/{{project}}:plan-task {task-ref}` | `$plan-task {task-ref}` |
|
|
87
|
+
| 实现完成 | `/review-code {task-ref}` | `/{{project}}:review-code {task-ref}` | `$review-code {task-ref}` |
|
|
88
|
+
| 代码审查通过 | `/commit` | `/{{project}}:commit` | `$commit` |
|
|
89
|
+
| 代码审查有问题 | `/code-task {task-ref}` | `/{{project}}:code-task {task-ref}` | `$code-task {task-ref}` |
|
|
90
90
|
| 任务被阻塞 | 解除阻塞或提供所需信息 | — | 解除阻塞或提供所需信息 |
|
|
91
91
|
| 任务已完成 | 无需操作 | — | 无需操作 |
|
|
92
92
|
|
|
@@ -88,7 +88,7 @@ If a related task exists (search for `codescan_alert_number: <alert-number>`):
|
|
|
88
88
|
Get the current time:
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
91
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
- Add the dismissal record to task.md
|
|
@@ -88,7 +88,7 @@ Code Scanning 告警 #{alert-number}
|
|
|
88
88
|
获取当前时间:
|
|
89
89
|
|
|
90
90
|
```bash
|
|
91
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
91
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
- 添加关闭记录到 task.md
|
|
@@ -128,7 +128,7 @@ ai sandbox rm {branch}
|
|
|
128
128
|
|
|
129
129
|
下一步 - 完成并归档任务(如有关联任务):
|
|
130
130
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
131
|
-
- Gemini CLI:/
|
|
131
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
132
132
|
- Codex CLI:$complete-task {task-ref}
|
|
133
133
|
```
|
|
134
134
|
|
|
@@ -96,7 +96,7 @@ If a related task exists (search for `security_alert_number: <alert-number>`):
|
|
|
96
96
|
Get the current time:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
99
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
- Add the dismissal record to task.md
|
|
@@ -96,7 +96,7 @@ CVE:{cve-id}
|
|
|
96
96
|
获取当前时间:
|
|
97
97
|
|
|
98
98
|
```bash
|
|
99
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
99
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
100
100
|
```
|
|
101
101
|
|
|
102
102
|
- 添加关闭记录到 task.md
|
|
@@ -136,7 +136,7 @@ ai sandbox rm {branch}
|
|
|
136
136
|
|
|
137
137
|
下一步 - 完成并归档任务(如有关联任务):
|
|
138
138
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
139
|
-
- Gemini CLI:/
|
|
139
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
140
140
|
- Codex CLI:$complete-task {task-ref}
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -114,7 +114,7 @@ Create `.agents/workspace/active/{task-id}/{code-artifact}`.
|
|
|
114
114
|
Get the current time:
|
|
115
115
|
|
|
116
116
|
```bash
|
|
117
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
117
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
118
118
|
```
|
|
119
119
|
|
|
120
120
|
Set `current_step` to `code`, refresh task metadata, and append one Activity Log entry:
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 分支名规则
|
|
6
6
|
|
|
7
|
-
- 格式:`
|
|
7
|
+
- 格式:`{{project}}-{type}-{slug}`
|
|
8
8
|
- 项目前缀:读取 `.agents/.airc.json` 中的 `project`
|
|
9
9
|
- `{type}`:读取 `task.md` frontmatter 中的 `type`
|
|
10
10
|
- `{slug}`:根据任务标题提取 3-6 个英文关键词,转为 kebab-case
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
- 当前分支不一致:按下方”创建与切换命令”章节切换到已记录分支
|
|
24
24
|
|
|
25
25
|
场景 B:`task.md` 未记录任务分支
|
|
26
|
-
- 判断当前分支是否符合项目分支命名规范(`
|
|
26
|
+
- 判断当前分支是否符合项目分支命名规范(`{{project}}-{type}-{slug}`)且语义上属于当前任务
|
|
27
27
|
- 符合:将当前分支名回写到 `task.md`,继续
|
|
28
28
|
- 不符合:生成新的任务分支名,按下方”创建与切换命令”章节创建并切换,回写到 `task.md`
|
|
29
29
|
|
|
@@ -74,11 +74,11 @@ Fix status:
|
|
|
74
74
|
Next step - re-review or commit:
|
|
75
75
|
- Re-review (always recommended):
|
|
76
76
|
- Claude Code / OpenCode: /review-code {task-ref}
|
|
77
|
-
- Gemini CLI: /
|
|
77
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
78
78
|
- Codex CLI: $review-code {task-ref}
|
|
79
79
|
- Commit directly (optional; only when all issues are resolved and changes are low risk):
|
|
80
80
|
- Claude Code / OpenCode: /commit
|
|
81
|
-
- Gemini CLI: /
|
|
81
|
+
- Gemini CLI: /{{project}}:commit
|
|
82
82
|
- Codex CLI: $commit
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -74,11 +74,11 @@ manual-validation 项不在修复范围。处理规则:
|
|
|
74
74
|
下一步 - 重新审查或提交:
|
|
75
75
|
- 重新审查(始终推荐):
|
|
76
76
|
- Claude Code / OpenCode:/review-code {task-ref}
|
|
77
|
-
- Gemini CLI:/
|
|
77
|
+
- Gemini CLI:/{{project}}:review-code {task-ref}
|
|
78
78
|
- Codex CLI:$review-code {task-ref}
|
|
79
79
|
- 直接提交(可选;仅在所有问题已解决且风险可控时):
|
|
80
80
|
- Claude Code / OpenCode:/commit
|
|
81
|
-
- Gemini CLI:/
|
|
81
|
+
- Gemini CLI:/{{project}}:commit
|
|
82
82
|
- Codex CLI:$commit
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -91,7 +91,7 @@ Fold the push outcome (pushed / skipped(no PR) / failed) into the next step's "U
|
|
|
91
91
|
Get the current time:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
94
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
> The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
|
|
@@ -91,7 +91,7 @@ c. 安全降级(不阻塞已完成的 `git commit`,仅提示用户):
|
|
|
91
91
|
获取当前时间:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
94
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
> 完整的 4 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
|
|
@@ -9,7 +9,7 @@ Before updating task metadata, read `.agents/rules/version-stamp.md` and refresh
|
|
|
9
9
|
Get the current time first:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
12
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
For every task-related commit, append this Activity Log entry in `task.md`:
|
|
@@ -60,7 +60,7 @@ Required next-step commands (rendered by `prFlow`):
|
|
|
60
60
|
```text
|
|
61
61
|
Next step - complete and archive the task:
|
|
62
62
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
63
|
-
- Gemini CLI: /
|
|
63
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
64
64
|
- Codex CLI: $complete-task {task-ref}
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -69,7 +69,7 @@ Next step - complete and archive the task:
|
|
|
69
69
|
```text
|
|
70
70
|
Next step - create Pull Request:
|
|
71
71
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
72
|
-
- Gemini CLI: /
|
|
72
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
73
73
|
- Codex CLI: $create-pr {task-ref}
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -79,11 +79,11 @@ field absent -> two options:
|
|
|
79
79
|
Next step - choose one:
|
|
80
80
|
- Go through the PR flow:
|
|
81
81
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
82
|
-
- Gemini CLI: /
|
|
82
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
83
83
|
- Codex CLI: $create-pr {task-ref}
|
|
84
84
|
- Complete directly (no PR):
|
|
85
85
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
86
|
-
- Gemini CLI: /
|
|
86
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
87
87
|
- Codex CLI: $complete-task {task-ref}
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -108,7 +108,7 @@ Required next-step commands:
|
|
|
108
108
|
```text
|
|
109
109
|
Next step - code review:
|
|
110
110
|
- Claude Code / OpenCode: /review-code {task-ref}
|
|
111
|
-
- Gemini CLI: /
|
|
111
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
112
112
|
- Codex CLI: $review-code {task-ref}
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
先获取当前时间:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
12
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
对于每一次与任务相关的提交,都要在 `task.md` 中追加以下 Activity Log:
|
|
@@ -60,7 +60,7 @@ last_reviewed_commit: {new_head}
|
|
|
60
60
|
```text
|
|
61
61
|
下一步 - 完成并归档任务:
|
|
62
62
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
63
|
-
- Gemini CLI: /
|
|
63
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
64
64
|
- Codex CLI: $complete-task {task-ref}
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -69,7 +69,7 @@ last_reviewed_commit: {new_head}
|
|
|
69
69
|
```text
|
|
70
70
|
下一步 - 创建 Pull Request:
|
|
71
71
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
72
|
-
- Gemini CLI: /
|
|
72
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
73
73
|
- Codex CLI: $create-pr {task-ref}
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -79,11 +79,11 @@ last_reviewed_commit: {new_head}
|
|
|
79
79
|
下一步 - 二选一:
|
|
80
80
|
- 走 PR 流程:
|
|
81
81
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
82
|
-
- Gemini CLI: /
|
|
82
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
83
83
|
- Codex CLI: $create-pr {task-ref}
|
|
84
84
|
- 直接完成(无 PR):
|
|
85
85
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
86
|
-
- Gemini CLI: /
|
|
86
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
87
87
|
- Codex CLI: $complete-task {task-ref}
|
|
88
88
|
```
|
|
89
89
|
|
|
@@ -108,7 +108,7 @@ last_reviewed_commit: {new_head}
|
|
|
108
108
|
```text
|
|
109
109
|
下一步 - 代码审查:
|
|
110
110
|
- Claude Code / OpenCode: /review-code {task-ref}
|
|
111
|
-
- Gemini CLI: /
|
|
111
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
112
112
|
- Codex CLI: $review-code {task-ref}
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: complete-manual-validation
|
|
3
|
+
description: >
|
|
4
|
+
Mark PR manual validation as completed and update the manual-validation section
|
|
5
|
+
in the existing PR summary comment in place.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Complete Manual Validation
|
|
9
|
+
|
|
10
|
+
## Boundary / Critical Rules
|
|
11
|
+
|
|
12
|
+
- This skill closes the manual-validation status in an existing PR summary comment; it does not create a parallel ordinary validation comment.
|
|
13
|
+
- It must write `manual-validation.md` or `manual-validation-r{N}.md` so later PR summary refreshes can reuse the validation result.
|
|
14
|
+
- If the `sync-pr` summary comment is missing, fail instead of creating a partial fallback summary.
|
|
15
|
+
- After this skill runs, update `task.md` immediately.
|
|
16
|
+
|
|
17
|
+
Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
|
|
18
|
+
|
|
19
|
+
## Step 0: State Check (pre-execution hard gate)
|
|
20
|
+
|
|
21
|
+
After loading workflow / skill / rules instructions, and before any task-state judgment or user-visible conclusion, run the state check first. Reading instruction files does not count as an external-state action or conclusion.
|
|
22
|
+
|
|
23
|
+
Run these commands and paste the raw output into both the user-facing reply and this round's `## State Check` section:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git status -s
|
|
27
|
+
ls -la .agents/workspace/active/{task-id}/
|
|
28
|
+
tail .agents/workspace/active/{task-id}/task.md
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Task id short ref
|
|
32
|
+
|
|
33
|
+
> 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.
|
|
34
|
+
|
|
35
|
+
## Step Start: Write the started Marker
|
|
36
|
+
|
|
37
|
+
After confirming prerequisites and the artifact round, and before this round's first artifact action, append a started marker to task.md `## Activity Log`:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Manual Validation [started]** by {agent} — started
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
44
|
+
|
|
45
|
+
## Steps
|
|
46
|
+
|
|
47
|
+
### 1. Parse Arguments
|
|
48
|
+
|
|
49
|
+
Input:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
complete-manual-validation {task-ref} [{pr-ref}] {verification-summary}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `{task-ref}` is required.
|
|
56
|
+
- `{pr-ref}` is optional and accepts `#NN`, `NN`, or a full PR URL.
|
|
57
|
+
- `{verification-summary}` is required. If it is missing, stop and ask for a validation summary; do not write an artifact or update the PR.
|
|
58
|
+
|
|
59
|
+
### 2. Verify Prerequisites
|
|
60
|
+
|
|
61
|
+
Check:
|
|
62
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
63
|
+
- a valid PR: prefer explicit `{pr-ref}`, otherwise read `pr_number` from task.md frontmatter
|
|
64
|
+
|
|
65
|
+
Stop if the task is missing, the validation summary is missing, or no valid PR can be resolved.
|
|
66
|
+
|
|
67
|
+
### 3. Determine Artifact Round
|
|
68
|
+
|
|
69
|
+
Scan the task directory:
|
|
70
|
+
- no `manual-validation.md` and no `manual-validation-r*.md` -> write `manual-validation.md`
|
|
71
|
+
- `manual-validation.md` exists and no `manual-validation-r*.md` -> write `manual-validation-r2.md`
|
|
72
|
+
- `manual-validation-r{N}.md` exists -> write `manual-validation-r{N+1}.md`
|
|
73
|
+
|
|
74
|
+
### 4. Update the PR Summary
|
|
75
|
+
|
|
76
|
+
Before this step, read:
|
|
77
|
+
- `.agents/rules/issue-sync.md`
|
|
78
|
+
- `.agents/rules/pr-sync.md`
|
|
79
|
+
- `reference/summary-update.md`
|
|
80
|
+
|
|
81
|
+
Follow `reference/summary-update.md` to resolve the PR number, find the `sync-pr` summary comment, extract the manual-validation scope, and update the section to `### ✅ Manual Validation Passed`.
|
|
82
|
+
|
|
83
|
+
### 5. Create the Manual Validation Artifact
|
|
84
|
+
|
|
85
|
+
Before this step, read `reference/report-template.md`. Create `{manual-validation-artifact}` and record:
|
|
86
|
+
- State check
|
|
87
|
+
- Validation verdict
|
|
88
|
+
- Validation scope
|
|
89
|
+
- Validation details
|
|
90
|
+
- PR summary sync result
|
|
91
|
+
|
|
92
|
+
### 6. Update task.md
|
|
93
|
+
|
|
94
|
+
Get the current time:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
101
|
+
- `updated_at`: current time
|
|
102
|
+
- `assigned_to`: current agent
|
|
103
|
+
- `agent_infra_version`: value from `.agents/rules/version-stamp.md`
|
|
104
|
+
- keep `current_step` unchanged
|
|
105
|
+
- append the `{manual-validation-artifact}` link and PR summary sync result to `## Implementation Notes`
|
|
106
|
+
- append Activity Log:
|
|
107
|
+
```
|
|
108
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Manual Validation** by {agent} — Manual validation passed → {manual-validation-artifact}; {summary-result}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If the task has a valid `issue_number`, follow `.agents/rules/issue-sync.md` to update the task comment and publish the `{manual-validation-artifact}` comment.
|
|
112
|
+
|
|
113
|
+
### 7. Verification Gate
|
|
114
|
+
|
|
115
|
+
Run:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
node .agents/scripts/validate-artifact.js gate complete-manual-validation .agents/workspace/active/{task-id} {manual-validation-artifact} --format text
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Handle the result:
|
|
122
|
+
- Exit code 0 -> tell the user
|
|
123
|
+
- Exit code 1 -> fix the reported problem and rerun
|
|
124
|
+
- Exit code 2 -> stop and report that manual intervention is required
|
|
125
|
+
|
|
126
|
+
### 8. Tell the User
|
|
127
|
+
|
|
128
|
+
Report:
|
|
129
|
+
- Artifact path
|
|
130
|
+
- PR summary sync result
|
|
131
|
+
- Current verification output
|
|
132
|
+
- Suggested next step: continue with `commit` / `create-pr`, or enter the final review flow
|
|
133
|
+
|
|
134
|
+
Before rendering the final output, read `.agents/rules/next-step-output.md` and append `Completed at: YYYY-MM-DD HH:mm:ss` as the absolute last line.
|
|
135
|
+
|
|
136
|
+
## Completion Checklist
|
|
137
|
+
|
|
138
|
+
- [ ] Read `reference/summary-update.md`
|
|
139
|
+
- [ ] Created the manual validation artifact
|
|
140
|
+
- [ ] Updated the same PR summary comment, or stopped according to failure semantics
|
|
141
|
+
- [ ] Updated task.md and appended the Activity Log
|
|
142
|
+
- [ ] Ran the verification gate
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: complete-manual-validation
|
|
3
|
+
description: >
|
|
4
|
+
标记 PR 人工验证已完成,并原地更新 PR 摘要评论中的人工校验段落。
|
|
5
|
+
当维护者已完成真实环境或权限相关人工验证、需要统一收尾 PR 摘要时使用。
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# 完成人工验证
|
|
9
|
+
|
|
10
|
+
## 行为边界 / 关键规则
|
|
11
|
+
|
|
12
|
+
- 本技能用于收尾已有 PR 摘要评论中的人工校验状态,不创建并行的普通验证留言。
|
|
13
|
+
- 必须写入 `manual-validation.md` 或 `manual-validation-r{N}.md`,让后续 PR 摘要刷新可复用人工验证结果。
|
|
14
|
+
- 找不到 `sync-pr` 摘要评论时失败,不创建部分摘要兜底。
|
|
15
|
+
- 执行本技能后必须立即更新 `task.md`。
|
|
16
|
+
|
|
17
|
+
版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
|
|
18
|
+
|
|
19
|
+
## 第 0 步:状态核对(执行前硬约束)
|
|
20
|
+
|
|
21
|
+
在加载 workflow / skill / rules 指令之后、做任何任务状态判断或用户可见结论之前,必须先执行状态核对。指令类文件读取不算对外动作或结论。
|
|
22
|
+
|
|
23
|
+
运行以下命令,并把原文粘贴到回复正文和本轮产物的 `## 状态核对` 段:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git status -s
|
|
27
|
+
ls -la .agents/workspace/active/{task-id}/
|
|
28
|
+
tail .agents/workspace/active/{task-id}/task.md
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 任务入参短号别名
|
|
32
|
+
|
|
33
|
+
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
34
|
+
|
|
35
|
+
## 步骤开始:写入 started 标记
|
|
36
|
+
|
|
37
|
+
确认前置条件和产物轮次后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Manual Validation [started]** by {agent} — started
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
44
|
+
|
|
45
|
+
## 执行步骤
|
|
46
|
+
|
|
47
|
+
### 1. 解析入参
|
|
48
|
+
|
|
49
|
+
输入格式:
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
complete-manual-validation {task-ref} [{pr-ref}] {verification-summary}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `{task-ref}` 必填。
|
|
56
|
+
- `{pr-ref}` 可选,支持 `#NN`、`NN` 或完整 PR URL。
|
|
57
|
+
- `{verification-summary}` 必填。若缺失,立即停止并提示补充验证说明;不写产物、不更新 PR。
|
|
58
|
+
|
|
59
|
+
### 2. 验证前置条件
|
|
60
|
+
|
|
61
|
+
检查:
|
|
62
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
63
|
+
- 有效 PR:优先使用显式 `{pr-ref}`,否则读取 task.md frontmatter 的 `pr_number`
|
|
64
|
+
|
|
65
|
+
如果任务不存在、验证说明缺失,或无法解析有效 PR,立即停止。
|
|
66
|
+
|
|
67
|
+
### 3. 确定产物轮次
|
|
68
|
+
|
|
69
|
+
扫描任务目录:
|
|
70
|
+
- 不存在 `manual-validation.md` 且不存在 `manual-validation-r*.md` -> 本轮产物为 `manual-validation.md`
|
|
71
|
+
- 已存在 `manual-validation.md` 且不存在 `manual-validation-r*.md` -> 本轮产物为 `manual-validation-r2.md`
|
|
72
|
+
- 已存在 `manual-validation-r{N}.md` -> 本轮产物为 `manual-validation-r{N+1}.md`
|
|
73
|
+
|
|
74
|
+
### 4. 更新 PR 摘要
|
|
75
|
+
|
|
76
|
+
执行此步骤前,先读取:
|
|
77
|
+
- `.agents/rules/issue-sync.md`
|
|
78
|
+
- `.agents/rules/pr-sync.md`
|
|
79
|
+
- `reference/summary-update.md`
|
|
80
|
+
|
|
81
|
+
按 `reference/summary-update.md` 解析 PR 号、查找 `sync-pr` 摘要评论、提取待人工校验范围,并把人工校验段落更新为 `### ✅ 人工验证已通过`。
|
|
82
|
+
|
|
83
|
+
### 5. 创建人工验证产物
|
|
84
|
+
|
|
85
|
+
执行此步骤前,先读取 `reference/report-template.md`。创建 `{manual-validation-artifact}`,记录:
|
|
86
|
+
- 状态核对
|
|
87
|
+
- 验证结论
|
|
88
|
+
- 验证范围
|
|
89
|
+
- 验证详情
|
|
90
|
+
- PR 摘要同步结果
|
|
91
|
+
|
|
92
|
+
### 6. 更新 task.md
|
|
93
|
+
|
|
94
|
+
获取当前时间:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
101
|
+
- `updated_at`:{当前时间}
|
|
102
|
+
- `assigned_to`:{当前代理}
|
|
103
|
+
- `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
|
|
104
|
+
- 保持 `current_step` 不变
|
|
105
|
+
- 在 `## 实现备注` 中追加 `{manual-validation-artifact}` 链接和 PR 摘要同步结果
|
|
106
|
+
- 追加 Activity Log:
|
|
107
|
+
```
|
|
108
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Manual Validation** by {agent} — Manual validation passed → {manual-validation-artifact}; {summary-result}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
如任务存在有效 `issue_number`,按 `.agents/rules/issue-sync.md` 更新 task 评论并发布 `{manual-validation-artifact}` 评论。
|
|
112
|
+
|
|
113
|
+
### 7. 完成校验
|
|
114
|
+
|
|
115
|
+
运行完成校验:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
node .agents/scripts/validate-artifact.js gate complete-manual-validation .agents/workspace/active/{task-id} {manual-validation-artifact} --format text
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
处理结果:
|
|
122
|
+
- 退出码 0 -> 告知用户
|
|
123
|
+
- 退出码 1 -> 修复问题后重新运行
|
|
124
|
+
- 退出码 2 -> 停止并告知需要人工介入
|
|
125
|
+
|
|
126
|
+
### 8. 告知用户
|
|
127
|
+
|
|
128
|
+
输出:
|
|
129
|
+
- 产物路径
|
|
130
|
+
- PR 摘要同步结果
|
|
131
|
+
- 当次完成校验输出
|
|
132
|
+
- 下一步建议:继续 `commit` / `create-pr` 或进入最终审查流程
|
|
133
|
+
|
|
134
|
+
渲染最终输出前,先读取 `.agents/rules/next-step-output.md`,并在绝对最后一行追加 `Completed at: YYYY-MM-DD HH:mm:ss`。
|
|
135
|
+
|
|
136
|
+
## 完成检查清单
|
|
137
|
+
|
|
138
|
+
- [ ] 已读取 `reference/summary-update.md`
|
|
139
|
+
- [ ] 已创建人工验证产物
|
|
140
|
+
- [ ] 已更新同一条 PR 摘要评论,或按失败语义停止
|
|
141
|
+
- [ ] 已更新 task.md 并追加 Activity Log
|
|
142
|
+
- [ ] 已运行完成校验
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "complete-manual-validation",
|
|
3
|
+
"checks": {
|
|
4
|
+
"task-meta": {
|
|
5
|
+
"required_fields": [
|
|
6
|
+
"id",
|
|
7
|
+
"type",
|
|
8
|
+
"workflow",
|
|
9
|
+
"status",
|
|
10
|
+
"created_at",
|
|
11
|
+
"updated_at",
|
|
12
|
+
"agent_infra_version",
|
|
13
|
+
"current_step",
|
|
14
|
+
"assigned_to"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"artifact": {
|
|
18
|
+
"file_pattern": "manual-validation.md|manual-validation-r{N}.md",
|
|
19
|
+
"required_sections": [
|
|
20
|
+
"State Check",
|
|
21
|
+
"Validation Verdict",
|
|
22
|
+
"Validation Scope",
|
|
23
|
+
"Validation Details",
|
|
24
|
+
"PR Summary Sync"
|
|
25
|
+
],
|
|
26
|
+
"freshness_minutes": 30,
|
|
27
|
+
"required_patterns": [
|
|
28
|
+
"^\\$ "
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"activity-log": {
|
|
32
|
+
"expected_action_pattern": "Complete Manual Validation",
|
|
33
|
+
"freshness_minutes": 30
|
|
34
|
+
},
|
|
35
|
+
"review-ledger": {
|
|
36
|
+
"stage_scope": ["analysis", "plan", "code"]
|
|
37
|
+
},
|
|
38
|
+
"platform-sync": {
|
|
39
|
+
"when": "pr_number_exists",
|
|
40
|
+
"expected_pr_comment_marker_key": "prSummary",
|
|
41
|
+
"expected_pr_comment_required_patterns": [
|
|
42
|
+
"^### ✅ Manual Validation Passed$"
|
|
43
|
+
],
|
|
44
|
+
"verify_task_comment_content": true,
|
|
45
|
+
"verify_issue_type": true,
|
|
46
|
+
"verify_issue_fields": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|