@fitlab-ai/agent-infra 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/sandbox/commands/create.js +26 -4
- package/dist/lib/sandbox/tools.js +20 -1
- package/dist/lib/task/commands/log.js +56 -6
- package/lib/sandbox/commands/create.ts +33 -4
- package/lib/sandbox/tools.ts +28 -1
- package/lib/task/commands/log.ts +59 -6
- package/package.json +1 -1
- package/templates/.agents/rules/no-mid-flow-questions.en.md +11 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +11 -0
- package/templates/.agents/rules/review-handshake.en.md +15 -1
- package/templates/.agents/rules/review-handshake.zh-CN.md +15 -1
- package/templates/.agents/rules/task-management.en.md +25 -0
- package/templates/.agents/rules/task-management.zh-CN.md +29 -0
- package/templates/.agents/scripts/validate-artifact.js +11 -2
- package/templates/.agents/skills/analyze-task/SKILL.en.md +11 -0
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/block-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/cancel-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +11 -1
- package/templates/.agents/skills/close-codescan/SKILL.en.md +10 -0
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +10 -0
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/code-task/SKILL.en.md +11 -0
- package/templates/.agents/skills/code-task/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/commit/SKILL.en.md +10 -0
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/complete-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/create-pr/SKILL.en.md +20 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +20 -1
- package/templates/.agents/skills/create-release-note/SKILL.en.md +16 -1
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +16 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +11 -0
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +14 -3
- package/templates/.agents/skills/import-codescan/SKILL.en.md +11 -0
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +11 -0
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +11 -0
- package/templates/.agents/skills/import-issue/SKILL.en.md +16 -0
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +16 -0
- package/templates/.agents/skills/plan-task/SKILL.en.md +12 -0
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +12 -0
- package/templates/.agents/skills/restore-task/SKILL.en.md +10 -0
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-analysis/SKILL.en.md +10 -0
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-code/SKILL.en.md +10 -0
- package/templates/.agents/skills/review-code/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/review-plan/SKILL.en.md +10 -0
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +10 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +1 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +1 -0
- package/templates/.agents/skills/watch-pr/SKILL.en.md +10 -0
- package/templates/.agents/skills/watch-pr/SKILL.zh-CN.md +10 -0
- package/templates/.agents/templates/task.en.md +5 -0
- package/templates/.agents/templates/task.zh-CN.md +5 -0
|
@@ -31,6 +31,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
31
31
|
|
|
32
32
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
33
33
|
|
|
34
|
+
## 步骤开始:写入 started 标记
|
|
35
|
+
|
|
36
|
+
确认前置条件后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Analyze Task (Round {N}) [started]** by {agent} — started
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`ai task log` 会把它与步骤完成时(步骤 7)写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
43
|
+
|
|
34
44
|
## 执行步骤
|
|
35
45
|
### 1. 验证前置条件
|
|
36
46
|
|
|
@@ -171,6 +181,7 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
171
181
|
## 未决问题
|
|
172
182
|
|
|
173
183
|
> 如有需要人工裁定的未决问题,列在此处;没有则可省略本段。
|
|
184
|
+
> 关键设计决策按 `.agents/rules/no-mid-flow-questions.md` 的判据标记 `[needs-human-decision]` 并回写 `HD-` 账本行。
|
|
174
185
|
|
|
175
186
|
- {未决问题}
|
|
176
187
|
|
|
@@ -23,6 +23,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
23
23
|
|
|
24
24
|
> 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.
|
|
25
25
|
|
|
26
|
+
## Step Start: Write the started Marker
|
|
27
|
+
|
|
28
|
+
After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task [started]** by {agent} — started
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
35
|
+
|
|
26
36
|
## Steps
|
|
27
37
|
|
|
28
38
|
### 1. Verify Task Exists
|
|
@@ -23,6 +23,16 @@ description: "标记任务为阻塞状态并记录原因"
|
|
|
23
23
|
|
|
24
24
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
25
25
|
|
|
26
|
+
## 步骤开始:写入 started 标记
|
|
27
|
+
|
|
28
|
+
确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Block Task [started]** by {agent} — started
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
35
|
+
|
|
26
36
|
## 执行步骤
|
|
27
37
|
### 1. 验证任务存在
|
|
28
38
|
|
|
@@ -17,6 +17,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Write the started Marker
|
|
21
|
+
|
|
22
|
+
After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
29
|
+
|
|
20
30
|
## Steps
|
|
21
31
|
|
|
22
32
|
### 1. Verify Task Exists
|
|
@@ -17,6 +17,16 @@ description: "取消不再需要的任务并转移"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:写入 started 标记
|
|
21
|
+
|
|
22
|
+
确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Cancel Task [started]** by {agent} — started
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
29
|
+
|
|
20
30
|
## 执行步骤
|
|
21
31
|
### 1. 验证任务存在
|
|
22
32
|
|
|
@@ -137,7 +147,7 @@ ai sandbox rm {branch}
|
|
|
137
147
|
|
|
138
148
|
下一步 - 查看已转移任务:
|
|
139
149
|
- Claude Code / OpenCode:/check-task {task-ref}
|
|
140
|
-
- Gemini CLI:/
|
|
150
|
+
- Gemini CLI:/agent-infra:check-task {task-ref}
|
|
141
151
|
- Codex CLI:$check-task {task-ref}
|
|
142
152
|
```
|
|
143
153
|
|
|
@@ -11,6 +11,16 @@ Dismiss the specified Code Scanning (CodeQL) alert and record a justified reason
|
|
|
11
11
|
|
|
12
12
|
> 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.
|
|
13
13
|
|
|
14
|
+
## Step Start: Write the started Marker
|
|
15
|
+
|
|
16
|
+
After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan [started]** by {agent} — started
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
23
|
+
|
|
14
24
|
## Execution Flow
|
|
15
25
|
|
|
16
26
|
### 1. Retrieve Alert Information
|
|
@@ -11,6 +11,16 @@ description: "关闭 Code Scanning 告警并记录理由"
|
|
|
11
11
|
|
|
12
12
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
13
13
|
|
|
14
|
+
## 步骤开始:写入 started 标记
|
|
15
|
+
|
|
16
|
+
确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Codescan [started]** by {agent} — started
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
23
|
+
|
|
14
24
|
## 执行流程
|
|
15
25
|
|
|
16
26
|
### 1. 获取告警信息
|
|
@@ -11,6 +11,16 @@ Dismiss the specified Dependabot security alert and record a justified reason.
|
|
|
11
11
|
|
|
12
12
|
> 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.
|
|
13
13
|
|
|
14
|
+
## Step Start: Write the started Marker
|
|
15
|
+
|
|
16
|
+
After prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot [started]** by {agent} — started
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
23
|
+
|
|
14
24
|
## Execution Flow
|
|
15
25
|
|
|
16
26
|
### 1. Retrieve Alert Information
|
|
@@ -11,6 +11,16 @@ description: "关闭 Dependabot 安全告警并记录理由"
|
|
|
11
11
|
|
|
12
12
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
13
13
|
|
|
14
|
+
## 步骤开始:写入 started 标记
|
|
15
|
+
|
|
16
|
+
确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Close Dependabot [started]** by {agent} — started
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
23
|
+
|
|
14
24
|
## 执行流程
|
|
15
25
|
|
|
16
26
|
### 1. 获取告警信息
|
|
@@ -11,6 +11,7 @@ Implement the approved plan and produce `code.md` or `code-r{N}.md`. This skill
|
|
|
11
11
|
|
|
12
12
|
- Follow the latest plan artifact: `plan.md` or `plan-r{N}.md`
|
|
13
13
|
- Fix mode verifies each finding of the latest `review-code` one by one: fix it if it holds, or rebut it and record it under unresolved if it is unfounded/hallucinated; do not expand to issues the review did not list; env-blocked items are out of scope
|
|
14
|
+
- If implementation encounters a key design decision not covered by the plan, record `[needs-human-decision]` / `HD-` rows according to `.agents/rules/no-mid-flow-questions.md` instead of asking mid-flow or expanding scope silently
|
|
14
15
|
- Never auto-run `git add` or `git commit`
|
|
15
16
|
- Create a new code artifact for each round and never overwrite an older one
|
|
16
17
|
- After executing this skill, you **must** immediately update task.md
|
|
@@ -33,6 +34,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
33
34
|
|
|
34
35
|
> 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.
|
|
35
36
|
|
|
37
|
+
## Step Start: Write the started Marker
|
|
38
|
+
|
|
39
|
+
After prerequisites (step 1) and mode/round (step 4) are confirmed and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N}) [started]** by {agent} — started
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
In fix mode the base must match this round's done entry, i.e. `Code Task (Round {N}, fix for {review-artifact}) [started]`. `ai task log` pairs it with the done entry written on completion (step 10) onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
46
|
+
|
|
36
47
|
## Steps
|
|
37
48
|
|
|
38
49
|
### 1. Verify Prerequisites
|
|
@@ -11,6 +11,7 @@ description: "根据技术方案编码任务并输出报告"
|
|
|
11
11
|
|
|
12
12
|
- 严格遵循最新方案产物:`plan.md` 或 `plan-r{N}.md`
|
|
13
13
|
- 修复模式逐条核实最新 `review-code` 的发现:成立则修复,判定为不成立/幻觉则在报告中反驳并记入 unresolved;不擅自扩大到审查未列出的问题;env-blocked 项不在修复范围
|
|
14
|
+
- 实现中遇到方案未覆盖的关键设计决策时,按 `.agents/rules/no-mid-flow-questions.md` 判据记录 `[needs-human-decision]` / `HD-` 行,不中途提问或擅自扩范围
|
|
14
15
|
- 绝不自动执行 `git add` 或 `git commit`
|
|
15
16
|
- 每轮实现都创建新的实现产物,不覆盖旧文件
|
|
16
17
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
@@ -47,6 +48,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
47
48
|
|
|
48
49
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
49
50
|
|
|
51
|
+
## 步骤开始:写入 started 标记
|
|
52
|
+
|
|
53
|
+
确认前置条件(步骤 1)与模式/轮次(步骤 4)后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Code Task (Round {N}) [started]** by {agent} — started
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
修复模式的基名须与本轮 done 一致,即 `Code Task (Round {N}, fix for {review-artifact}) [started]`。`ai task log` 会把它与步骤完成时(步骤 10)写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
60
|
+
|
|
50
61
|
## 执行步骤
|
|
51
62
|
### 1. 验证前置条件
|
|
52
63
|
|
|
@@ -21,6 +21,16 @@ When updating related `task.md` frontmatter, read `.agents/rules/version-stamp.m
|
|
|
21
21
|
|
|
22
22
|
> 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.
|
|
23
23
|
|
|
24
|
+
## Step Start: Write the started Marker
|
|
25
|
+
|
|
26
|
+
Before checking local modifications, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Commit [started]** by {agent} — started
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`ai task log` pairs it with the done entry written when the commit completes onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`. Only write it when this task has a task.md (a bare commit with no task context may skip it).
|
|
33
|
+
|
|
24
34
|
## 1. Check Local Modifications (CRITICAL)
|
|
25
35
|
|
|
26
36
|
Before any edit, inspect:
|
|
@@ -21,6 +21,16 @@ description: "提交当前变更到 Git"
|
|
|
21
21
|
|
|
22
22
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
23
23
|
|
|
24
|
+
## 步骤开始:写入 started 标记
|
|
25
|
+
|
|
26
|
+
开始检查本地修改之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Commit [started]** by {agent} — started
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`ai task log` 会把它与提交完成时写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。仅当本任务存在 task.md 时写入(无任务上下文的纯提交可跳过)。
|
|
33
|
+
|
|
24
34
|
## 1. 检查本地修改(关键)
|
|
25
35
|
|
|
26
36
|
在任何编辑前先检查:
|
|
@@ -30,6 +30,16 @@ Before the state check is complete, do not make external-state assertions such a
|
|
|
30
30
|
|
|
31
31
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
32
32
|
|
|
33
|
+
## Step Start: Write the started Marker
|
|
34
|
+
|
|
35
|
+
After confirming the task exists and before this round's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this round's done entry plus a ` [started]` suffix, note `started`):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task [started]** by {agent} — started
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). Format and pairing rules: see the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
42
|
+
|
|
33
43
|
## Steps
|
|
34
44
|
|
|
35
45
|
### 1. Verify Task Exists
|
|
@@ -30,6 +30,16 @@ tail .agents/workspace/active/{task-id}/task.md
|
|
|
30
30
|
|
|
31
31
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
32
32
|
|
|
33
|
+
## 步骤开始:写入 started 标记
|
|
34
|
+
|
|
35
|
+
确认任务存在后、本轮第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本轮 done 条目同基名 + ` [started]` 后缀,note 用 `started`):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Complete Task [started]** by {agent} — started
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。格式与配对规则见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
42
|
+
|
|
33
43
|
## 执行步骤
|
|
34
44
|
### 1. 验证任务存在
|
|
35
45
|
|
|
@@ -15,6 +15,16 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
15
15
|
|
|
16
16
|
> 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.
|
|
17
17
|
|
|
18
|
+
## Step Start: Write the started Marker
|
|
19
|
+
|
|
20
|
+
After the pre-flight gate and prerequisites pass and before this step's first artifact action, append a started marker to task.md `## Activity Log` (same base action as this step's done entry plus a ` [started]` suffix, note `started`). Only write it when an associated `{task-id}` / task.md exists:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create PR [started]** by {agent} — started
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`ai task log` pairs it with the done entry written on completion onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
27
|
+
|
|
18
28
|
## Execution Flow
|
|
19
29
|
|
|
20
30
|
### Pre-gate: Project-level PR Flow Check
|
|
@@ -128,7 +138,16 @@ Next step - Watch PR checks (auto self-heal until required checks are green):
|
|
|
128
138
|
- Codex CLI: $watch-pr {task-ref}
|
|
129
139
|
```
|
|
130
140
|
|
|
131
|
-
|
|
141
|
+
Alternatively, to skip CI monitoring and archive the task right away, use `complete-task` instead:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Next step (alternative) - Skip monitoring and archive the task directly:
|
|
145
|
+
- Claude Code / OpenCode: /complete-task {task-ref}
|
|
146
|
+
- Gemini CLI: /agent-infra:complete-task {task-ref}
|
|
147
|
+
- Codex CLI: $complete-task {task-ref}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`watch-pr` is the primary path; once checks are green it guides you toward `complete-task {task-ref}`. Run the `complete-task` block above directly only when you intend to skip monitoring — the two are not equivalent.
|
|
132
151
|
|
|
133
152
|
## Notes
|
|
134
153
|
|
|
@@ -15,6 +15,16 @@ description: "创建 Pull Request 到目标分支"
|
|
|
15
15
|
|
|
16
16
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
17
17
|
|
|
18
|
+
## 步骤开始:写入 started 标记
|
|
19
|
+
|
|
20
|
+
通过前置门控、确认前置条件后、本步骤第一个产出动作之前,向 task.md `## 活动日志` 追加一条 started 标记(与本步骤 done 条目同基名 + ` [started]` 后缀,note 用 `started`)。仅当存在关联 `{task-id}` / task.md 时写入:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Create PR [started]** by {agent} — started
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`ai task log` 会把它与完成时写入的 done 条目配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
27
|
+
|
|
18
28
|
## 执行流程
|
|
19
29
|
|
|
20
30
|
### 前置门控:项目级 PR 流程检查
|
|
@@ -128,7 +138,16 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
128
138
|
- Codex CLI:$watch-pr {task-ref}
|
|
129
139
|
```
|
|
130
140
|
|
|
131
|
-
|
|
141
|
+
或者,若想跳过 CI 监控、直接归档任务,改用 `complete-task`:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
下一步(备选)- 跳过监控、直接归档任务:
|
|
145
|
+
- Claude Code / OpenCode:/complete-task {task-ref}
|
|
146
|
+
- Gemini CLI:/agent-infra:complete-task {task-ref}
|
|
147
|
+
- Codex CLI:$complete-task {task-ref}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
`watch-pr` 为主路径,全绿后会再引导 `complete-task {task-ref}`;上面的 `complete-task` 备选块仅用于跳过 CI 监控、直接归档——两者并不等价。
|
|
132
151
|
|
|
133
152
|
## 注意事项
|
|
134
153
|
|
|
@@ -160,7 +160,21 @@ Ask:
|
|
|
160
160
|
|
|
161
161
|
### 9. Publish the Release Notes (If Confirmed)
|
|
162
162
|
|
|
163
|
-
Write the notes
|
|
163
|
+
9.1 Write the generated notes to a temp file **outside the working tree** so no uncommitted artifact is left behind in the repo (do not write into `.agents/workspace/` or any version-controlled directory):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
NOTES_FILE="$(mktemp "${TMPDIR:-/tmp}/agent-infra-release-notes.XXXXXX")"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Write the notes content to `$NOTES_FILE`.
|
|
170
|
+
|
|
171
|
+
9.2 Publish by following the "Publish the Release Notes" command in `.agents/rules/release-commands.md` (use `$NOTES_FILE` for `{notes-file}`; it updates the Release already created and published by the release workflow, falling back to creating it if missing).
|
|
172
|
+
|
|
173
|
+
9.3 Remove the temp file whether publishing succeeds or fails:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
rm -f "$NOTES_FILE"
|
|
177
|
+
```
|
|
164
178
|
|
|
165
179
|
Output:
|
|
166
180
|
```
|
|
@@ -179,6 +193,7 @@ The notes have been written to the Release. Edit further at the URL above if nee
|
|
|
179
193
|
2. **Tags must exist**: Run the release skill first to create tags
|
|
180
194
|
3. **Release auto-published**: the `v{version}` Release is created and published by the release workflow (the upload target for Homebrew bottles); this skill writes/refreshes the notes on that Release
|
|
181
195
|
4. **Classification accuracy**: Auto-classification is based on title/scope/files; complex PRs may need manual adjustment
|
|
196
|
+
5. **No leftover artifacts**: Always write notes to a temp file outside the working tree (`mktemp`) and delete it after publishing; never write into the repo directory
|
|
182
197
|
|
|
183
198
|
## Error Handling
|
|
184
199
|
|
|
@@ -160,7 +160,21 @@ git log v<prev-version>..v<version> \
|
|
|
160
160
|
|
|
161
161
|
### 9. 发布 Release notes(如确认)
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
9.1 把生成的 notes 写入**工作树之外**的临时文件,避免在仓库残留未提交产物(不要写入 `.agents/workspace/` 或任何受版本控制的目录):
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
NOTES_FILE="$(mktemp "${TMPDIR:-/tmp}/agent-infra-release-notes.XXXXXX")"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
把 notes 内容写入 `$NOTES_FILE`。
|
|
170
|
+
|
|
171
|
+
9.2 按 `.agents/rules/release-commands.md` 的「发布 Release notes」命令执行(命令中的 `{notes-file}` 用 `$NOTES_FILE`;写入已由 release 工作流自动创建/发布的 Release,不存在时兜底创建)。
|
|
172
|
+
|
|
173
|
+
9.3 无论发布成功或失败,都删除临时文件:
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
rm -f "$NOTES_FILE"
|
|
177
|
+
```
|
|
164
178
|
|
|
165
179
|
输出:
|
|
166
180
|
```
|
|
@@ -179,6 +193,7 @@ Release notes 已更新。
|
|
|
179
193
|
2. **标签必须存在**:先执行 release 技能创建标签
|
|
180
194
|
3. **Release 已自动发布**:`v{version}` 的 Release 由 release 工作流自动创建并发布(给 Homebrew bottle 提供上传落点);本技能往该 Release 写入/刷新 notes
|
|
181
195
|
4. **分类准确性**:自动分类基于标题/scope/文件;复杂的 PR 可能需要手动调整
|
|
196
|
+
5. **不留残留产物**:notes 一律写入工作树之外的临时文件(`mktemp`)并在发布后删除,禁止写入仓库目录
|
|
182
197
|
|
|
183
198
|
## 错误处理
|
|
184
199
|
|
|
@@ -26,6 +26,17 @@ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agen
|
|
|
26
26
|
|
|
27
27
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
28
28
|
|
|
29
|
+
## Step Start: Capture the Start Time
|
|
30
|
+
|
|
31
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- {started_at} — **Create Task [started]** by {agent} — started
|
|
35
|
+
- {done_at} — **Create Task** by {agent} — {completion summary}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
39
|
+
|
|
29
40
|
## Steps
|
|
30
41
|
|
|
31
42
|
### 1. Parse the User Description
|
|
@@ -26,6 +26,17 @@ description: "根据自然语言描述创建任务"
|
|
|
26
26
|
|
|
27
27
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
28
28
|
|
|
29
|
+
## 步骤开始:记录开始时间
|
|
30
|
+
|
|
31
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
- {started_at} — **Create Task [started]** by {agent} — started
|
|
35
|
+
- {done_at} — **Create Task** by {agent} — {完成说明}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
39
|
+
|
|
29
40
|
## 执行步骤
|
|
30
41
|
### 1. 解析用户描述
|
|
31
42
|
|
|
@@ -172,7 +183,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
172
183
|
|
|
173
184
|
下一步 - 执行需求分析:
|
|
174
185
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
175
|
-
- Gemini CLI:/
|
|
186
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
176
187
|
- Codex CLI:$analyze-task {task-ref}
|
|
177
188
|
```
|
|
178
189
|
|
|
@@ -191,7 +202,7 @@ node .agents/scripts/validate-artifact.js gate create-task .agents/workspace/act
|
|
|
191
202
|
|
|
192
203
|
下一步 - 执行需求分析:
|
|
193
204
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
194
|
-
- Gemini CLI:/
|
|
205
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
195
206
|
- Codex CLI:$analyze-task {task-ref}
|
|
196
207
|
```
|
|
197
208
|
|
|
@@ -215,7 +226,7 @@ Issue 创建失败:
|
|
|
215
226
|
|
|
216
227
|
下一步 - 执行需求分析:
|
|
217
228
|
- Claude Code / OpenCode:/analyze-task {task-ref}
|
|
218
|
-
- Gemini CLI:/
|
|
229
|
+
- Gemini CLI:/agent-infra:analyze-task {task-ref}
|
|
219
230
|
- Codex CLI:$analyze-task {task-ref}
|
|
220
231
|
|
|
221
232
|
后续如需平台同步:修复认证/网络/模板问题后,可按 `.agents/rules/create-issue.md` 对当前任务手动执行一次 Issue 创建;或手动创建/查找 Issue,并把 `issue_number` 写入 task.md,后续技能会接管级联同步。
|
|
@@ -17,6 +17,17 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Codescan** by {agent} — {completion summary}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
30
|
+
|
|
20
31
|
## Execution Flow
|
|
21
32
|
|
|
22
33
|
### 1. Retrieve Alert Information
|
|
@@ -17,6 +17,17 @@ description: "导入 Code Scanning 告警并创建修复任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Codescan [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Codescan** by {agent} — {完成说明}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
30
|
+
|
|
20
31
|
## 执行流程
|
|
21
32
|
|
|
22
33
|
### 1. 获取告警信息
|
|
@@ -17,6 +17,17 @@ Import the specified Dependabot security alert and create a remediation task.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Dependabot** by {agent} — {completion summary}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
30
|
+
|
|
20
31
|
## Execution Flow
|
|
21
32
|
|
|
22
33
|
### 1. Retrieve Alert Information
|
|
@@ -17,6 +17,17 @@ description: "导入 Dependabot 安全告警并创建修复任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
- {started_at} — **Import Dependabot [started]** by {agent} — started
|
|
26
|
+
- {done_at} — **Import Dependabot** by {agent} — {完成说明}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
30
|
+
|
|
20
31
|
## 执行流程
|
|
21
32
|
|
|
22
33
|
### 1. 获取告警信息
|
|
@@ -17,6 +17,22 @@ Import the specified Issue and create a task. Argument: issue number.
|
|
|
17
17
|
|
|
18
18
|
> If `{task-id}` matches `^[#]?[0-9]+$` (bare numeric or `#`-prefixed), follow the "SKILL parameter resolver" section of `.agents/rules/task-short-id.md`; treat `{task-id}` as the resolved full `TASK-YYYYMMDD-HHMMSS` form for every downstream command.
|
|
19
19
|
|
|
20
|
+
## Step Start: Capture the Start Time
|
|
21
|
+
|
|
22
|
+
This skill **creates** task.md, so there is no file to write at the start. Capture `started_at` in memory before running (`date "+%Y-%m-%d %H:%M:%S%:z"`); when writing the Activity Log at the end, **append both lines at once** — the started line uses `started_at`, the done line uses the completion time, both sharing the base action (started line action gets a ` [started]` suffix, note `started`). The base action must match the actual import scenario:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
# Scenario B: new Issue import
|
|
26
|
+
- {started_at} — **Import Issue [started]** by {agent} — started
|
|
27
|
+
- {done_at} — **Import Issue** by {agent} — {completion summary}
|
|
28
|
+
|
|
29
|
+
# Scenario C: recovery from historical Issue comments
|
|
30
|
+
- {started_at} — **Import Issue (Recovered) [started]** by {agent} — started
|
|
31
|
+
- {done_at} — **Import Issue (Recovered)** by {agent} — {completion summary}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` pairs the two by base action onto one row (in progress → done). See the "Activity Log started / done dual-marker convention" in `.agents/rules/task-management.md`.
|
|
35
|
+
|
|
20
36
|
## Execution Flow
|
|
21
37
|
|
|
22
38
|
### 1. Retrieve Issue Information
|
|
@@ -17,6 +17,22 @@ description: "从 Issue 导入并创建任务"
|
|
|
17
17
|
|
|
18
18
|
> 如果 `{task-id}` 入参匹配 `^[#]?[0-9]+$`(裸数字或带 `#` 前缀),先读取 `.agents/rules/task-short-id.md` 的「SKILL 入参解析」段执行解析;后续命令视 `{task-id}` 为解析后的全长 `TASK-YYYYMMDD-HHMMSS` 形式。
|
|
19
19
|
|
|
20
|
+
## 步骤开始:记录开始时间
|
|
21
|
+
|
|
22
|
+
本技能会**创建** task.md,开始时尚无文件可写。先在内存记录开始时间 `started_at`(`date "+%Y-%m-%d %H:%M:%S%:z"`);在最后写活动日志时**一次性补两条**——started 行用 `started_at`、done 行用完成时间,二者同基名(started 行 action 加 ` [started]` 后缀、note 用 `started`)。基名必须跟实际导入场景一致:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
# 场景 B:新 Issue 导入
|
|
26
|
+
- {started_at} — **Import Issue [started]** by {agent} — started
|
|
27
|
+
- {done_at} — **Import Issue** by {agent} — {完成说明}
|
|
28
|
+
|
|
29
|
+
# 场景 C:从历史 Issue 评论恢复
|
|
30
|
+
- {started_at} — **Import Issue (Recovered) [started]** by {agent} — started
|
|
31
|
+
- {done_at} — **Import Issue (Recovered)** by {agent} — {完成说明}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`ai task log` 会按基名把两条配对成一行(进行中 → 已完成)。约定见 `.agents/rules/task-management.md` 的「Activity Log started / done 双标记约定」。
|
|
35
|
+
|
|
20
36
|
## 执行流程
|
|
21
37
|
|
|
22
38
|
### 1. 获取 Issue 信息
|