@fitlab-ai/agent-infra 0.8.3 → 0.8.5
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 +1 -1
- package/dist/lib/cp.js +56 -15
- package/dist/lib/defaults.json +9 -0
- package/dist/lib/init.js +5 -0
- package/dist/lib/sandbox/capture.js +5 -3
- package/dist/lib/sandbox/clipboard/bridge.js +12 -9
- package/dist/lib/sandbox/clipboard/inbox.js +82 -0
- package/dist/lib/sandbox/commands/create.js +68 -26
- package/dist/lib/sandbox/engine.js +33 -3
- package/dist/lib/sandbox/engines/colima.js +2 -2
- package/dist/lib/sandbox/runtimes/base.dockerfile +7 -0
- package/dist/lib/sandbox/shell.js +9 -1
- package/dist/lib/sandbox/tools.js +2 -2
- package/dist/lib/server/daemon.js +9 -0
- package/dist/lib/server/process-control.js +66 -73
- package/dist/lib/server/process-state.js +168 -0
- package/dist/lib/update.js +2 -0
- package/lib/cp.ts +56 -15
- package/lib/defaults.json +9 -0
- package/lib/init.ts +9 -0
- package/lib/sandbox/capture.ts +5 -3
- package/lib/sandbox/clipboard/bridge.ts +14 -12
- package/lib/sandbox/clipboard/inbox.ts +83 -0
- package/lib/sandbox/commands/create.ts +80 -27
- package/lib/sandbox/engine.ts +37 -3
- package/lib/sandbox/engines/colima.ts +2 -2
- package/lib/sandbox/runtimes/base.dockerfile +7 -0
- package/lib/sandbox/shell.ts +11 -2
- package/lib/sandbox/tools.ts +5 -5
- package/lib/server/daemon.ts +9 -0
- package/lib/server/process-control.ts +70 -71
- package/lib/server/process-state.ts +183 -0
- package/lib/update.ts +6 -0
- package/package.json +2 -1
- package/runtime/platform-adapters/platform-sync.github.js +1501 -0
- package/templates/.agents/README.en.md +5 -0
- package/templates/.agents/README.zh-CN.md +5 -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/review-handshake.en.md +5 -4
- package/templates/.agents/rules/review-handshake.zh-CN.md +5 -4
- 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/lib/agent-infra-package.js +149 -0
- package/templates/.agents/scripts/lib/post-review-commit.js +5 -0
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +25 -1459
- package/templates/.agents/scripts/review-diff-fingerprint.js +95 -24
- package/templates/.agents/scripts/validate-artifact.js +144 -38
- 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 +6 -4
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +6 -4
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +35 -8
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +35 -8
- package/templates/.agents/skills/complete-manual-validation/SKILL.en.md +27 -3
- package/templates/.agents/skills/complete-manual-validation/SKILL.zh-CN.md +27 -3
- package/templates/.agents/skills/complete-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/complete-task/config/verify.en.json +1 -0
- package/templates/.agents/skills/complete-task/config/verify.zh-CN.json +1 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +4 -4
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +4 -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 +2 -2
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -5
- 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 +5 -4
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +6 -5
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.github.sh +170 -45
- 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 +3 -1
- package/templates/.agents/skills/review-code/config/verify.zh-CN.json +3 -1
- 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 +3 -2
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +3 -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.en.md +5 -1
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +203 -142
- 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
|
@@ -61,9 +61,11 @@ Review status, diff, and recent history, then prepare a Conventional Commit with
|
|
|
61
61
|
Stage specific files only and run `git commit` with the prepared message.
|
|
62
62
|
|
|
63
63
|
If this commit is associated with a task and a `review-code` artifact exists, read the highest-round `review-code` artifact before committing:
|
|
64
|
-
- If that artifact's `Overall Verdict` / `总体结论` is Approved, parse `
|
|
65
|
-
- After staging the explicit files,
|
|
66
|
-
-
|
|
64
|
+
- If that artifact's `Overall Verdict` / `总体结论` is Approved, parse `R`, `F`, and `Reviewed Snapshot Tree` / `审查快照树` (`T`)
|
|
65
|
+
- After staging the explicit files, record `pre_head=$(git rev-parse HEAD)` and use the helper's JSON mode to generate the complete worktree tree `W` and normalized staged tree `S`
|
|
66
|
+
- Before `git commit`, require `pre_head == R && W == T && S == T`; use the helper's `compare` mode to produce added, missing, and different diagnostics for both worktree and staged snapshots
|
|
67
|
+
- If any condition fails, enter Scenario 4 in `reference/task-status-update.md`; do not run `git commit`, push, successful state updates, PR summary sync, or the completion gate
|
|
68
|
+
- After all comparisons match and the commit succeeds, write `last_reviewed_commit: <new_head>` to task.md frontmatter
|
|
67
69
|
- Do not scan backward to earlier Approved artifacts; the highest-round `review-code` artifact is the only authoritative source
|
|
68
70
|
|
|
69
71
|
## 5. Push to the Existing PR When Applicable
|
|
@@ -91,7 +93,7 @@ Fold the push outcome (pushed / skipped(no PR) / failed) into the next step's "U
|
|
|
91
93
|
Get the current time:
|
|
92
94
|
|
|
93
95
|
```bash
|
|
94
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
96
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
> 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.
|
|
@@ -61,9 +61,11 @@ git diff
|
|
|
61
61
|
只暂存明确列出的文件,然后执行 `git commit`。
|
|
62
62
|
|
|
63
63
|
如果本次提交关联任务且存在 `review-code` 产物,在提交前读取最高轮 `review-code` 产物:
|
|
64
|
-
- 若该产物 `总体结论` / `Overall Verdict` 为 Approved,解析
|
|
65
|
-
-
|
|
66
|
-
-
|
|
64
|
+
- 若该产物 `总体结论` / `Overall Verdict` 为 Approved,解析 `R`、`F` 与 `审查快照树` / `Reviewed Snapshot Tree`(`T`)
|
|
65
|
+
- 暂存明确文件后记录 `pre_head=$(git rev-parse HEAD)`,并以 helper 的 JSON 模式生成当前完整工作区树 `W` 与规范化暂存树 `S`
|
|
66
|
+
- 在 `git commit` 前要求 `pre_head == R && W == T && S == T`;分别运行 helper 的 `compare` 模式生成 worktree/staged 的 added、missing、different 路径诊断
|
|
67
|
+
- 任一条件不满足时进入 `reference/task-status-update.md` 的“场景 4:提交前快照阻断”,不得执行 `git commit`、push、成功状态更新、PR 摘要同步或完成 gate
|
|
68
|
+
- 全部相等并成功提交后,在 task.md frontmatter 写入 `last_reviewed_commit: <new_head>`
|
|
67
69
|
- 不向后扫描更早的 Approved 产物;最高轮 `review-code` 产物是唯一权威来源
|
|
68
70
|
|
|
69
71
|
## 5. 推送到已有 PR(按需)
|
|
@@ -91,7 +93,7 @@ c. 安全降级(不阻塞已完成的 `git commit`,仅提示用户):
|
|
|
91
93
|
获取当前时间:
|
|
92
94
|
|
|
93
95
|
```bash
|
|
94
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
96
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
95
97
|
```
|
|
96
98
|
|
|
97
99
|
> 完整的 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`:
|
|
@@ -18,13 +18,40 @@ For every task-related commit, append this Activity Log entry in `task.md`:
|
|
|
18
18
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Commit** by {agent} — {commit hash short} {commit subject}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
If the commit stage confirmed that the highest-round `review-code` artifact is Approved, `pre_head
|
|
21
|
+
If the commit stage confirmed that the highest-round `review-code` artifact is Approved, `pre_head == R`, complete worktree tree `W == T`, and normalized staged tree `S == T`, also write or refresh after a successful commit:
|
|
22
22
|
|
|
23
23
|
```yaml
|
|
24
24
|
last_reviewed_commit: {new_head}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
This field is the
|
|
27
|
+
This field is the only baseline for the `complete-task` `post-review-commit` gate. When any condition is not met, do not write or advance it.
|
|
28
|
+
|
|
29
|
+
### Scenario 4: pre-commit snapshot block
|
|
30
|
+
|
|
31
|
+
This scenario ends the run before `git commit` and does not enter the successful post-commit scenario selection below. When any of `pre_head != R`, `W != T`, or `S != T` applies:
|
|
32
|
+
|
|
33
|
+
- Do not run `git commit`, push, successful state updates, Issue/PR success sync, or the commit completion gate; preserve the current worktree and index.
|
|
34
|
+
- Refresh task `updated_at`, `assigned_to`, and `agent_infra_version`, then append a done log with action `Commit`: `Blocked before git commit: reviewed snapshot mismatch (worktree added={a}, missing={m}, different={d}; staged added={a}, missing={m}, different={d})`.
|
|
35
|
+
- User output must include `No commit was created.` and show Added/Missing/Different under both `Current worktree vs reviewed snapshot` and `Staged snapshot vs reviewed snapshot`; render an empty set as `- (none)` and list paths only in user output.
|
|
36
|
+
- When `pre_head != R` or `W != T`, the only next step is a fresh `review-code`; when only `W == T && S != T`, tell the user to fix staging and rerun `commit` without re-review.
|
|
37
|
+
|
|
38
|
+
Full re-review commands:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
Next step - re-run code review:
|
|
42
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
43
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
44
|
+
- Codex CLI: $review-code {task-ref}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Full staging-only retry commands:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
Next step - fix staging and retry commit:
|
|
51
|
+
- Claude Code / OpenCode: /commit {task-ref}
|
|
52
|
+
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
53
|
+
- Codex CLI: $commit {task-ref}
|
|
54
|
+
```
|
|
28
55
|
|
|
29
56
|
Before selecting the next step, verify:
|
|
30
57
|
- `current_step` and the latest workflow progress in `task.md`
|
|
@@ -60,7 +87,7 @@ Required next-step commands (rendered by `prFlow`):
|
|
|
60
87
|
```text
|
|
61
88
|
Next step - complete and archive the task:
|
|
62
89
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
63
|
-
- Gemini CLI: /
|
|
90
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
64
91
|
- Codex CLI: $complete-task {task-ref}
|
|
65
92
|
```
|
|
66
93
|
|
|
@@ -69,7 +96,7 @@ Next step - complete and archive the task:
|
|
|
69
96
|
```text
|
|
70
97
|
Next step - create Pull Request:
|
|
71
98
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
72
|
-
- Gemini CLI: /
|
|
99
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
73
100
|
- Codex CLI: $create-pr {task-ref}
|
|
74
101
|
```
|
|
75
102
|
|
|
@@ -79,11 +106,11 @@ field absent -> two options:
|
|
|
79
106
|
Next step - choose one:
|
|
80
107
|
- Go through the PR flow:
|
|
81
108
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
82
|
-
- Gemini CLI: /
|
|
109
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
83
110
|
- Codex CLI: $create-pr {task-ref}
|
|
84
111
|
- Complete directly (no PR):
|
|
85
112
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
86
|
-
- Gemini CLI: /
|
|
113
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
87
114
|
- Codex CLI: $complete-task {task-ref}
|
|
88
115
|
```
|
|
89
116
|
|
|
@@ -108,7 +135,7 @@ Required next-step commands:
|
|
|
108
135
|
```text
|
|
109
136
|
Next step - code review:
|
|
110
137
|
- Claude Code / OpenCode: /review-code {task-ref}
|
|
111
|
-
- Gemini CLI: /
|
|
138
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
112
139
|
- Codex CLI: $review-code {task-ref}
|
|
113
140
|
```
|
|
114
141
|
|
|
@@ -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:
|
|
@@ -18,13 +18,40 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
18
18
|
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Commit** by {agent} — {commit hash short} {commit subject}
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
如果提交阶段已确认最高轮 `review-code` 产物 Approved、`pre_head
|
|
21
|
+
如果提交阶段已确认最高轮 `review-code` 产物 Approved、`pre_head == R`、完整工作区树 `W == T` 且规范化暂存树 `S == T`,成功提交后同时写入或刷新:
|
|
22
22
|
|
|
23
23
|
```yaml
|
|
24
24
|
last_reviewed_commit: {new_head}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
该字段是 `complete-task` 的 `post-review-commit` gate
|
|
27
|
+
该字段是 `complete-task` 的 `post-review-commit` gate 唯一 baseline。条件不满足时不要写入或推进该字段。
|
|
28
|
+
|
|
29
|
+
### 场景 4:提交前快照阻断
|
|
30
|
+
|
|
31
|
+
此场景在 `git commit` 前终止本轮,不进入下方提交成功后的场景选择。任一 `pre_head != R`、`W != T` 或 `S != T` 命中时:
|
|
32
|
+
|
|
33
|
+
- 不执行 `git commit`、push、成功状态更新、Issue/PR 成功同步或 commit 完成 gate;保留当前工作区与暂存区。
|
|
34
|
+
- 刷新任务的 `updated_at`、`assigned_to`、`agent_infra_version`,并以 action `Commit` 追加 done 日志:`Blocked before git commit: reviewed snapshot mismatch (worktree added={a}, missing={m}, different={d}; staged added={a}, missing={m}, different={d})`。
|
|
35
|
+
- 用户输出必须包含 `No commit was created.`,并分别按 `Current worktree vs reviewed snapshot`、`Staged snapshot vs reviewed snapshot` 展示 Added/Missing/Different;空集合显示 `- (none)`,路径只在用户输出中逐行展示。
|
|
36
|
+
- `pre_head != R` 或 `W != T` 时,下一步只指向重新 `review-code`;仅 `W == T && S != T` 时,提示修正暂存后重跑 `commit`,无需重审。
|
|
37
|
+
|
|
38
|
+
重新审查的完整命令:
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
下一步 - 重新代码审查:
|
|
42
|
+
- Claude Code / OpenCode: /review-code {task-ref}
|
|
43
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
44
|
+
- Codex CLI: $review-code {task-ref}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
仅修正暂存的完整命令:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
下一步 - 修正暂存后重新提交:
|
|
51
|
+
- Claude Code / OpenCode: /commit {task-ref}
|
|
52
|
+
- Gemini CLI: /{{project}}:commit {task-ref}
|
|
53
|
+
- Codex CLI: $commit {task-ref}
|
|
54
|
+
```
|
|
28
55
|
|
|
29
56
|
在决定下一步之前,先确认:
|
|
30
57
|
- `task.md` 中的 `current_step` 和最新工作流进度
|
|
@@ -60,7 +87,7 @@ last_reviewed_commit: {new_head}
|
|
|
60
87
|
```text
|
|
61
88
|
下一步 - 完成并归档任务:
|
|
62
89
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
63
|
-
- Gemini CLI: /
|
|
90
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
64
91
|
- Codex CLI: $complete-task {task-ref}
|
|
65
92
|
```
|
|
66
93
|
|
|
@@ -69,7 +96,7 @@ last_reviewed_commit: {new_head}
|
|
|
69
96
|
```text
|
|
70
97
|
下一步 - 创建 Pull Request:
|
|
71
98
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
72
|
-
- Gemini CLI: /
|
|
99
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
73
100
|
- Codex CLI: $create-pr {task-ref}
|
|
74
101
|
```
|
|
75
102
|
|
|
@@ -79,11 +106,11 @@ last_reviewed_commit: {new_head}
|
|
|
79
106
|
下一步 - 二选一:
|
|
80
107
|
- 走 PR 流程:
|
|
81
108
|
- Claude Code / OpenCode: /create-pr {task-ref}
|
|
82
|
-
- Gemini CLI: /
|
|
109
|
+
- Gemini CLI: /{{project}}:create-pr {task-ref}
|
|
83
110
|
- Codex CLI: $create-pr {task-ref}
|
|
84
111
|
- 直接完成(无 PR):
|
|
85
112
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
86
|
-
- Gemini CLI: /
|
|
113
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
87
114
|
- Codex CLI: $complete-task {task-ref}
|
|
88
115
|
```
|
|
89
116
|
|
|
@@ -108,7 +135,7 @@ last_reviewed_commit: {new_head}
|
|
|
108
135
|
```text
|
|
109
136
|
下一步 - 代码审查:
|
|
110
137
|
- Claude Code / OpenCode: /review-code {task-ref}
|
|
111
|
-
- Gemini CLI: /
|
|
138
|
+
- Gemini CLI: /{{project}}:review-code {task-ref}
|
|
112
139
|
- Codex CLI: $review-code {task-ref}
|
|
113
140
|
```
|
|
114
141
|
|
|
@@ -82,14 +82,19 @@ Follow `reference/summary-update.md` to resolve the PR number, find the `sync-pr
|
|
|
82
82
|
|
|
83
83
|
### 5. Create the Manual Validation Artifact
|
|
84
84
|
|
|
85
|
-
Before this step, read `reference/report-template.md`. Create `{manual-validation-artifact}`
|
|
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
|
|
86
91
|
|
|
87
92
|
### 6. Update task.md
|
|
88
93
|
|
|
89
94
|
Get the current time:
|
|
90
95
|
|
|
91
96
|
```bash
|
|
92
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
97
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
93
98
|
```
|
|
94
99
|
|
|
95
100
|
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -113,6 +118,25 @@ Run:
|
|
|
113
118
|
node .agents/scripts/validate-artifact.js gate complete-manual-validation .agents/workspace/active/{task-id} {manual-validation-artifact} --format text
|
|
114
119
|
```
|
|
115
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
|
+
|
|
116
126
|
### 8. Tell the User
|
|
117
127
|
|
|
118
|
-
Report
|
|
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
|
|
@@ -82,14 +82,19 @@ complete-manual-validation {task-ref} [{pr-ref}] {verification-summary}
|
|
|
82
82
|
|
|
83
83
|
### 5. 创建人工验证产物
|
|
84
84
|
|
|
85
|
-
执行此步骤前,先读取 `reference/report-template.md`。创建 `{manual-validation-artifact}
|
|
85
|
+
执行此步骤前,先读取 `reference/report-template.md`。创建 `{manual-validation-artifact}`,记录:
|
|
86
|
+
- 状态核对
|
|
87
|
+
- 验证结论
|
|
88
|
+
- 验证范围
|
|
89
|
+
- 验证详情
|
|
90
|
+
- PR 摘要同步结果
|
|
86
91
|
|
|
87
92
|
### 6. 更新 task.md
|
|
88
93
|
|
|
89
94
|
获取当前时间:
|
|
90
95
|
|
|
91
96
|
```bash
|
|
92
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
97
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
93
98
|
```
|
|
94
99
|
|
|
95
100
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -113,6 +118,25 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
113
118
|
node .agents/scripts/validate-artifact.js gate complete-manual-validation .agents/workspace/active/{task-id} {manual-validation-artifact} --format text
|
|
114
119
|
```
|
|
115
120
|
|
|
121
|
+
处理结果:
|
|
122
|
+
- 退出码 0 -> 告知用户
|
|
123
|
+
- 退出码 1 -> 修复问题后重新运行
|
|
124
|
+
- 退出码 2 -> 停止并告知需要人工介入
|
|
125
|
+
|
|
116
126
|
### 8. 告知用户
|
|
117
127
|
|
|
118
|
-
|
|
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
|
+
- [ ] 已运行完成校验
|
|
@@ -98,7 +98,7 @@ node .agents/scripts/validate-artifact.js check review-ledger .agents/workspace/
|
|
|
98
98
|
node .agents/scripts/validate-artifact.js check post-review-commit .agents/workspace/active/{task-id} --skill complete-task --format text
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
A non-zero exit from either (fail/blocked) -> treat as an unmet prerequisite and **stop**, do not run Steps 3-7. `--force` does **NOT** lift this hard gate: unclosed disagreements must first be closed in the ledger (`confirmed`/`closed`/`human-decided`), and un-re-reviewed
|
|
101
|
+
A non-zero exit from either (fail/blocked) -> treat as an unmet prerequisite and **stop**, do not run Steps 3-7. If the output contains `reviewed snapshot was not anchored`, rerun `commit` or `review-code`; never fall back to the review baseline. `--force` does **NOT** lift this hard gate: unclosed disagreements must first be closed in the ledger (`confirmed`/`closed`/`human-decided`), and un-re-reviewed commits after an anchor must be re-reviewed via `review-code` or covered by a `post-review-commit` / `human-decided` exemption row in the ledger.
|
|
102
102
|
|
|
103
103
|
> **⚠️ Prerequisite Branch Check — you must decide whether to continue or stop before proceeding:**
|
|
104
104
|
>
|
|
@@ -123,7 +123,7 @@ If prerequisites are not met and the user did not explicitly provide `--force`,
|
|
|
123
123
|
Get the current time:
|
|
124
124
|
|
|
125
125
|
```bash
|
|
126
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
126
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
127
127
|
```
|
|
128
128
|
|
|
129
129
|
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -166,7 +166,7 @@ Check whether `task.md` includes a valid `issue_number`. If not, skip this step
|
|
|
166
166
|
If a valid `issue_number` exists:
|
|
167
167
|
- First scan and backfill unpublished `task.md`, `analysis*.md`, `review-analysis*.md`, `plan*.md`, `review-plan*.md`, `code*.md`, and `review-code*.md` comments using the backfill rules in `.agents/rules/issue-sync.md` (`task.md` uses the idempotent update path)
|
|
168
168
|
- Backfill checked `## Requirements` items to the Issue body by following the requirements-checkbox sync steps in issue-sync.md
|
|
169
|
-
- Do not set any `status:` label — status labels
|
|
169
|
+
- Do not set any `status:` label — platform automation should clear status labels after the Issue closes; the pre-completion platform-sync gate verifies that a CLOSED Issue has no `status:` labels and fails until the workflow finishes or is repaired
|
|
170
170
|
- Finally create or update the summary comment marked with the summary marker defined in `.agents/rules/issue-sync.md`
|
|
171
171
|
- Read `.agents/rules/issue-fields.md` and follow Flow A to sync every non-empty Issue field (`priority`/`effort`/`start_date`/`target_date`) from `task.md` to the Issue (idempotent; skip without blocking when `has_push=false` or the fetch/write fails)
|
|
172
172
|
|
|
@@ -97,7 +97,7 @@ node .agents/scripts/validate-artifact.js check review-ledger .agents/workspace/
|
|
|
97
97
|
node .agents/scripts/validate-artifact.js check post-review-commit .agents/workspace/active/{task-id} --skill complete-task --format text
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
任一退出码非 0(fail/blocked)→ 按前置条件未满足处理,**停止**,不执行步骤 3-7
|
|
100
|
+
任一退出码非 0(fail/blocked)→ 按前置条件未满足处理,**停止**,不执行步骤 3-7。若输出包含 `reviewed snapshot was not anchored`,必须先重新 `commit` 或 `review-code`;不得回退审查基线。`--force` **不解除**本硬门禁:未关闭分歧必须先在账本闭合(`confirmed`/`closed`/`human-decided`),已锚点后的未复审提交必须重新 `review-code` 或在账本追加 `post-review-commit` / `human-decided` 豁免行。
|
|
101
101
|
|
|
102
102
|
> **⚠️ 前置条件分支判断 — 你必须先判断“继续”还是“停止”:**
|
|
103
103
|
>
|
|
@@ -122,7 +122,7 @@ Please complete the missing steps first, or use --force to override.
|
|
|
122
122
|
获取当前时间:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
125
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -165,7 +165,7 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
165
165
|
如果存在有效的 `issue_number`:
|
|
166
166
|
- 先按 `.agents/rules/issue-sync.md` 的补发规则扫描并补发未发布的 `task.md`、`analysis*.md`、`review-analysis*.md`、`plan*.md`、`review-plan*.md`、`code*.md`、`review-code*.md` 评论(`task.md` 走幂等更新路径)
|
|
167
167
|
- 按 issue-sync.md 的需求复选框同步步骤,兜底同步 `## 需求` 中已勾选的条目到 Issue body
|
|
168
|
-
- 不要设置 `status:` label — Issue
|
|
168
|
+
- 不要设置 `status:` label — 平台自动化应在 Issue 关闭后清理状态标签;预完成 platform-sync gate 会验证 CLOSED Issue 不含任何 `status:` 标签,残留时失败并要求等待或修复 workflow 后重跑
|
|
169
169
|
- 最后创建或更新 `.agents/rules/issue-sync.md` 中定义的 summary 评论标记对应的 summary 评论
|
|
170
170
|
- 读取 `.agents/rules/issue-fields.md`,按流程 A 把 `task.md` 中所有非空的 Issue 字段(`priority`/`effort`/`start_date`/`target_date`)同步到 Issue(幂等;`has_push=false` 或取数/写入失败时跳过,不阻断)
|
|
171
171
|
|
|
@@ -41,7 +41,7 @@ Branch on the result:
|
|
|
41
41
|
This project does not enable the PR flow (`.agents/.airc.json` sets `prFlow: "disabled"`).
|
|
42
42
|
No Pull Request is required; run instead:
|
|
43
43
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
44
|
-
- Gemini CLI: /
|
|
44
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
45
45
|
- Codex CLI: $complete-task {task-ref}
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -105,7 +105,7 @@ Aggregate a reviewer-facing summary from those artifacts and maintain a single i
|
|
|
105
105
|
Get the current time:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
108
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
If `{task-id}` is available, update task.md with `pr_number`, `pr_status` (set to `created`), `updated_at`, `agent_infra_version`, and append the Create PR Activity Log entry including metadata-sync and summary results.
|
|
@@ -136,7 +136,7 @@ Explain the created PR URL, summarize metadata sync and summary-comment results,
|
|
|
136
136
|
```
|
|
137
137
|
Next step - Watch PR checks (auto self-heal until required checks are green):
|
|
138
138
|
- Claude Code / OpenCode: /watch-pr {task-ref}
|
|
139
|
-
- Gemini CLI: /
|
|
139
|
+
- Gemini CLI: /{{project}}:watch-pr {task-ref}
|
|
140
140
|
- Codex CLI: $watch-pr {task-ref}
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -145,7 +145,7 @@ Alternatively, to skip CI monitoring and archive the task right away, use `compl
|
|
|
145
145
|
```
|
|
146
146
|
Next step (alternative) - Skip monitoring and archive the task directly:
|
|
147
147
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
148
|
-
- Gemini CLI: /
|
|
148
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
149
149
|
- Codex CLI: $complete-task {task-ref}
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -41,7 +41,7 @@ description: >
|
|
|
41
41
|
当前项目未启用 PR 流程(`.agents/.airc.json` 中 `prFlow: "disabled"`)。
|
|
42
42
|
无需创建 Pull Request,请直接运行:
|
|
43
43
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
44
|
-
- Gemini CLI:/
|
|
44
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
45
45
|
- Codex CLI:$complete-task {task-ref}
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -105,7 +105,7 @@ description: >
|
|
|
105
105
|
获取当前时间:
|
|
106
106
|
|
|
107
107
|
```bash
|
|
108
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
108
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
109
109
|
```
|
|
110
110
|
|
|
111
111
|
如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`pr_status`(设为 `created`)、`updated_at`、`agent_infra_version`,并追加 Create PR 的 Activity Log,记录元数据同步和摘要发布结果。
|
|
@@ -136,7 +136,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
136
136
|
```
|
|
137
137
|
下一步 - 监控 PR 检查(required checks 全绿前自动自愈):
|
|
138
138
|
- Claude Code / OpenCode:/watch-pr {task-ref}
|
|
139
|
-
- Gemini CLI:/
|
|
139
|
+
- Gemini CLI:/{{project}}:watch-pr {task-ref}
|
|
140
140
|
- Codex CLI:$watch-pr {task-ref}
|
|
141
141
|
```
|
|
142
142
|
|
|
@@ -145,7 +145,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
145
145
|
```
|
|
146
146
|
下一步(备选)- 跳过监控、直接归档任务:
|
|
147
147
|
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
148
|
-
- Gemini CLI:/
|
|
148
|
+
- Gemini CLI:/{{project}}:complete-task {task-ref}
|
|
149
149
|
- Codex CLI:$complete-task {task-ref}
|
|
150
150
|
```
|
|
151
151
|
|
|
@@ -70,6 +70,6 @@ Final user output should include this follow-up path:
|
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
72
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
-
- Gemini CLI: /
|
|
73
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
74
|
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -70,6 +70,6 @@ Milestone 规则:
|
|
|
70
70
|
Next steps:
|
|
71
71
|
- complete the task after the workflow truly finishes:
|
|
72
72
|
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
73
|
-
- Gemini CLI: /
|
|
73
|
+
- Gemini CLI: /{{project}}:complete-task {task-ref}
|
|
74
74
|
- Codex CLI: $complete-task {task-ref}
|
|
75
75
|
```
|
|
@@ -30,7 +30,7 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
30
30
|
|
|
31
31
|
## Step Start: Capture the Start Time
|
|
32
32
|
|
|
33
|
-
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
|
|
33
|
+
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" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); 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`):
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
- {started_at} — **Create Task [started]** by {agent} — started
|
|
@@ -109,7 +109,7 @@ priority / effort are required: the AI infers them from the task title and descr
|
|
|
109
109
|
Get the current time:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
112
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -30,7 +30,7 @@ description: >
|
|
|
30
30
|
|
|
31
31
|
## 步骤开始:记录开始时间
|
|
32
32
|
|
|
33
|
-
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S
|
|
33
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
- {started_at} — **Create Task [started]** by {agent} — started
|
|
@@ -108,7 +108,7 @@ priority / effort 必填:由 AI 从任务标题与描述推断后填入(候
|
|
|
108
108
|
获取当前时间:
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
111
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
@@ -183,7 +183,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
183
183
|
|
|
184
184
|
下一步 - 执行需求分析:
|
|
185
185
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
186
|
-
- Gemini CLI:/
|
|
186
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
187
187
|
- Codex CLI:$analyze-task {task-ref}
|
|
188
188
|
```
|
|
189
189
|
|
|
@@ -202,7 +202,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
202
202
|
|
|
203
203
|
下一步 - 执行需求分析:
|
|
204
204
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
205
|
-
- Gemini CLI:/
|
|
205
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
206
206
|
- Codex CLI:$analyze-task {task-ref}
|
|
207
207
|
```
|
|
208
208
|
|
|
@@ -226,7 +226,7 @@ Issue 创建失败:
|
|
|
226
226
|
|
|
227
227
|
下一步 - 执行需求分析:
|
|
228
228
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
229
|
-
- Gemini CLI:/
|
|
229
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
230
230
|
- Codex CLI:$analyze-task {task-ref}
|
|
231
231
|
|
|
232
232
|
后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
|
|
@@ -21,7 +21,7 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
|
|
|
21
21
|
|
|
22
22
|
## Step Start: Capture the Start Time
|
|
23
23
|
|
|
24
|
-
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
|
|
24
|
+
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" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); 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`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
@@ -61,7 +61,7 @@ codescan_alert_number: <alert-number>
|
|
|
61
61
|
Get the current time:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
64
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Update task.md: `current_step` -> `requirement-analysis`.
|
|
@@ -21,7 +21,7 @@ description: >
|
|
|
21
21
|
|
|
22
22
|
## 步骤开始:记录开始时间
|
|
23
23
|
|
|
24
|
-
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S
|
|
24
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
@@ -61,7 +61,7 @@ codescan_alert_number: <alert-number>
|
|
|
61
61
|
获取当前时间:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
64
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
更新 task.md:`current_step` -> `requirement-analysis`。
|
|
@@ -112,7 +112,7 @@ Code Scanning 告警 #{alert-number} 已导入。
|
|
|
112
112
|
|
|
113
113
|
下一步:
|
|
114
114
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
115
|
-
- Gemini CLI:/
|
|
115
|
+
- Gemini CLI:/{{project}}:analyze-task {task-ref}
|
|
116
116
|
- Codex CLI:$analyze-task {task-ref}
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -21,7 +21,7 @@ Import the specified Dependabot security alert and create a remediation task.
|
|
|
21
21
|
|
|
22
22
|
## Step Start: Capture the Start Time
|
|
23
23
|
|
|
24
|
-
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
|
|
24
|
+
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" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'`); 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`):
|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
@@ -64,7 +64,7 @@ ghsa_id: <GHSA-ID>
|
|
|
64
64
|
Get the current time:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
date "+%Y-%m-%d %H:%M:%S
|
|
67
|
+
date "+%Y-%m-%d %H:%M:%S%z" | sed 's/\([+-][0-9][0-9]\)\([0-9][0-9]\)$/\1:\2/'
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Update task.md: `current_step` -> `requirement-analysis`.
|