@fitlab-ai/agent-infra 0.5.1 → 0.5.3

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.
Files changed (205) hide show
  1. package/README.md +17 -3
  2. package/README.zh-CN.md +17 -3
  3. package/lib/defaults.json +3 -0
  4. package/lib/init.js +15 -5
  5. package/lib/merge.js +22 -7
  6. package/lib/render.js +77 -15
  7. package/lib/sandbox/commands/enter.js +22 -7
  8. package/lib/sandbox/commands/rm.js +1 -1
  9. package/lib/sandbox/runtimes/base.dockerfile +27 -1
  10. package/lib/update.js +19 -5
  11. package/package.json +2 -1
  12. package/templates/.agents/{README.md → README.en.md} +13 -3
  13. package/templates/.agents/README.zh-CN.md +13 -3
  14. package/templates/.agents/rules/issue-pr-commands.github.en.md +111 -0
  15. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +111 -0
  16. package/templates/.agents/rules/label-milestone-setup.github.en.md +50 -0
  17. package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +50 -0
  18. package/templates/.agents/rules/release-commands.github.en.md +30 -0
  19. package/templates/.agents/rules/release-commands.github.zh-CN.md +30 -0
  20. package/templates/.agents/rules/security-alerts.github.en.md +43 -0
  21. package/templates/.agents/rules/security-alerts.github.zh-CN.md +43 -0
  22. package/templates/.agents/scripts/validate-artifact.js +3 -5
  23. package/templates/.agents/skills/analyze-task/{SKILL.md → SKILL.en.md} +2 -2
  24. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +2 -2
  25. package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +1 -1
  26. package/templates/.agents/skills/block-task/{SKILL.md → SKILL.en.md} +2 -2
  27. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +2 -2
  28. package/templates/.agents/skills/cancel-task/{SKILL.md → SKILL.en.md} +18 -17
  29. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +18 -17
  30. package/templates/.agents/skills/close-codescan/{SKILL.md → SKILL.en.md} +5 -13
  31. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +5 -13
  32. package/templates/.agents/skills/close-dependabot/{SKILL.md → SKILL.en.md} +7 -15
  33. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +7 -15
  34. package/templates/.agents/skills/commit/{SKILL.md → SKILL.en.md} +1 -1
  35. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  36. package/templates/.agents/skills/commit/reference/{task-status-update.md → task-status-update.en.md} +2 -2
  37. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +2 -2
  38. package/templates/.agents/skills/complete-task/{SKILL.md → SKILL.en.md} +11 -11
  39. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +11 -11
  40. package/templates/.agents/skills/create-issue/{SKILL.md → SKILL.en.md} +3 -6
  41. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +3 -6
  42. package/templates/.agents/skills/create-issue/reference/{label-and-type.md → label-and-type.en.md} +4 -16
  43. package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +4 -16
  44. package/templates/.agents/skills/create-pr/{SKILL.md → SKILL.en.md} +4 -5
  45. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +4 -5
  46. package/templates/.agents/skills/create-pr/reference/{pr-body-template.md → pr-body-template.en.md} +8 -13
  47. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +8 -13
  48. package/templates/.agents/skills/create-release-note/{SKILL.md → SKILL.en.md} +6 -18
  49. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +6 -18
  50. package/templates/.agents/skills/create-task/{SKILL.md → SKILL.en.md} +4 -4
  51. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -4
  52. package/templates/.agents/skills/implement-task/{SKILL.md → SKILL.en.md} +2 -2
  53. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +2 -2
  54. package/templates/.agents/skills/import-codescan/{SKILL.md → SKILL.en.md} +3 -5
  55. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +3 -5
  56. package/templates/.agents/skills/import-dependabot/{SKILL.md → SKILL.en.md} +3 -5
  57. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -5
  58. package/templates/.agents/skills/import-issue/{SKILL.md → SKILL.en.md} +6 -14
  59. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +6 -14
  60. package/templates/.agents/skills/init-labels/{SKILL.md → SKILL.en.md} +9 -13
  61. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +9 -13
  62. package/templates/.agents/skills/init-milestones/{SKILL.md → SKILL.en.md} +5 -6
  63. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +5 -6
  64. package/templates/.agents/skills/plan-task/{SKILL.md → SKILL.en.md} +2 -2
  65. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +2 -2
  66. package/templates/.agents/skills/refine-task/{SKILL.md → SKILL.en.md} +2 -2
  67. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +2 -2
  68. package/templates/.agents/skills/refine-title/{SKILL.md → SKILL.en.md} +7 -17
  69. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +6 -16
  70. package/templates/.agents/skills/release/{SKILL.md → SKILL.en.md} +2 -1
  71. package/templates/.agents/skills/release/SKILL.zh-CN.md +2 -1
  72. package/templates/.agents/skills/restore-task/{SKILL.md → SKILL.en.md} +7 -13
  73. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +7 -13
  74. package/templates/.agents/skills/review-task/{SKILL.md → SKILL.en.md} +2 -2
  75. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +2 -2
  76. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +219 -59
  77. package/templates/.agents/templates/{task.md → task.en.md} +3 -3
  78. package/templates/.agents/templates/task.zh-CN.md +3 -3
  79. /package/templates/.agents/{QUICKSTART.md → QUICKSTART.en.md} +0 -0
  80. /package/templates/.agents/rules/{commit-and-pr.md → commit-and-pr.en.md} +0 -0
  81. /package/templates/.agents/rules/{issue-sync.md → issue-sync.github.en.md} +0 -0
  82. /package/templates/.agents/rules/{issue-sync.zh-CN.md → issue-sync.github.zh-CN.md} +0 -0
  83. /package/templates/.agents/rules/{milestone-inference.md → milestone-inference.github.en.md} +0 -0
  84. /package/templates/.agents/rules/{milestone-inference.zh-CN.md → milestone-inference.github.zh-CN.md} +0 -0
  85. /package/templates/.agents/rules/{pr-sync.md → pr-sync.github.en.md} +0 -0
  86. /package/templates/.agents/rules/{pr-sync.zh-CN.md → pr-sync.github.zh-CN.md} +0 -0
  87. /package/templates/.agents/rules/{task-management.md → task-management.en.md} +0 -0
  88. /package/templates/.agents/skills/archive-tasks/{SKILL.md → SKILL.en.md} +0 -0
  89. /package/templates/.agents/skills/check-task/{SKILL.md → SKILL.en.md} +0 -0
  90. /package/templates/.agents/skills/commit/reference/{commit-message.md → commit-message.en.md} +0 -0
  91. /package/templates/.agents/skills/commit/reference/{copyright-check.md → copyright-check.en.md} +0 -0
  92. /package/templates/.agents/skills/commit/reference/{pr-summary-sync.md → pr-summary-sync.en.md} +0 -0
  93. /package/templates/.agents/skills/create-issue/reference/{template-matching.md → template-matching.en.md} +0 -0
  94. /package/templates/.agents/skills/create-pr/reference/{branch-strategy.md → branch-strategy.en.md} +0 -0
  95. /package/templates/.agents/skills/create-pr/reference/{comment-publish.md → comment-publish.en.md} +0 -0
  96. /package/templates/.agents/skills/implement-task/reference/{branch-management.md → branch-management.en.md} +0 -0
  97. /package/templates/.agents/skills/implement-task/reference/{implementation-rules.md → implementation-rules.en.md} +0 -0
  98. /package/templates/.agents/skills/implement-task/reference/{output-template.md → output-template.en.md} +0 -0
  99. /package/templates/.agents/skills/implement-task/reference/{report-template.md → report-template.en.md} +0 -0
  100. /package/templates/.agents/skills/init-labels/scripts/{init-labels.sh → init-labels.github.sh} +0 -0
  101. /package/templates/.agents/skills/init-milestones/scripts/{init-milestones.sh → init-milestones.github.sh} +0 -0
  102. /package/templates/.agents/skills/refine-task/reference/{fix-workflow.md → fix-workflow.en.md} +0 -0
  103. /package/templates/.agents/skills/refine-task/reference/{report-template.md → report-template.en.md} +0 -0
  104. /package/templates/.agents/skills/release/scripts/{manage-milestones.sh → manage-milestones.github.sh} +0 -0
  105. /package/templates/.agents/skills/review-task/reference/{output-templates.md → output-templates.en.md} +0 -0
  106. /package/templates/.agents/skills/review-task/reference/{report-template.md → report-template.en.md} +0 -0
  107. /package/templates/.agents/skills/review-task/reference/{review-criteria.md → review-criteria.en.md} +0 -0
  108. /package/templates/.agents/skills/test/{SKILL.md → SKILL.en.md} +0 -0
  109. /package/templates/.agents/skills/test-integration/{SKILL.md → SKILL.en.md} +0 -0
  110. /package/templates/.agents/skills/update-agent-infra/{SKILL.md → SKILL.en.md} +0 -0
  111. /package/templates/.agents/skills/upgrade-dependency/{SKILL.md → SKILL.en.md} +0 -0
  112. /package/templates/.agents/templates/{handoff.md → handoff.en.md} +0 -0
  113. /package/templates/.agents/templates/{review-report.md → review-report.en.md} +0 -0
  114. /package/templates/.agents/workflows/{bug-fix.yaml → bug-fix.en.yaml} +0 -0
  115. /package/templates/.agents/workflows/{code-review.yaml → code-review.en.yaml} +0 -0
  116. /package/templates/.agents/workflows/{feature-development.yaml → feature-development.en.yaml} +0 -0
  117. /package/templates/.agents/workflows/{refactoring.yaml → refactoring.en.yaml} +0 -0
  118. /package/templates/.agents/workspace/{README.md → README.en.md} +0 -0
  119. /package/templates/.claude/commands/{analyze-task.md → analyze-task.en.md} +0 -0
  120. /package/templates/.claude/commands/{archive-tasks.md → archive-tasks.en.md} +0 -0
  121. /package/templates/.claude/commands/{block-task.md → block-task.en.md} +0 -0
  122. /package/templates/.claude/commands/{cancel-task.md → cancel-task.en.md} +0 -0
  123. /package/templates/.claude/commands/{check-task.md → check-task.en.md} +0 -0
  124. /package/templates/.claude/commands/{close-codescan.md → close-codescan.en.md} +0 -0
  125. /package/templates/.claude/commands/{close-dependabot.md → close-dependabot.en.md} +0 -0
  126. /package/templates/.claude/commands/{commit.md → commit.en.md} +0 -0
  127. /package/templates/.claude/commands/{complete-task.md → complete-task.en.md} +0 -0
  128. /package/templates/.claude/commands/{create-issue.md → create-issue.en.md} +0 -0
  129. /package/templates/.claude/commands/{create-pr.md → create-pr.en.md} +0 -0
  130. /package/templates/.claude/commands/{create-release-note.md → create-release-note.en.md} +0 -0
  131. /package/templates/.claude/commands/{create-task.md → create-task.en.md} +0 -0
  132. /package/templates/.claude/commands/{implement-task.md → implement-task.en.md} +0 -0
  133. /package/templates/.claude/commands/{import-codescan.md → import-codescan.en.md} +0 -0
  134. /package/templates/.claude/commands/{import-dependabot.md → import-dependabot.en.md} +0 -0
  135. /package/templates/.claude/commands/{import-issue.md → import-issue.en.md} +0 -0
  136. /package/templates/.claude/commands/{init-labels.md → init-labels.en.md} +0 -0
  137. /package/templates/.claude/commands/{init-milestones.md → init-milestones.en.md} +0 -0
  138. /package/templates/.claude/commands/{plan-task.md → plan-task.en.md} +0 -0
  139. /package/templates/.claude/commands/{refine-task.md → refine-task.en.md} +0 -0
  140. /package/templates/.claude/commands/{refine-title.md → refine-title.en.md} +0 -0
  141. /package/templates/.claude/commands/{release.md → release.en.md} +0 -0
  142. /package/templates/.claude/commands/{restore-task.md → restore-task.en.md} +0 -0
  143. /package/templates/.claude/commands/{review-task.md → review-task.en.md} +0 -0
  144. /package/templates/.claude/commands/{test-integration.md → test-integration.en.md} +0 -0
  145. /package/templates/.claude/commands/{test.md → test.en.md} +0 -0
  146. /package/templates/.claude/commands/{update-agent-infra.md → update-agent-infra.en.md} +0 -0
  147. /package/templates/.claude/commands/{upgrade-dependency.md → upgrade-dependency.en.md} +0 -0
  148. /package/templates/.gemini/commands/_project_/{analyze-task.toml → analyze-task.en.toml} +0 -0
  149. /package/templates/.gemini/commands/_project_/{archive-tasks.toml → archive-tasks.en.toml} +0 -0
  150. /package/templates/.gemini/commands/_project_/{block-task.toml → block-task.en.toml} +0 -0
  151. /package/templates/.gemini/commands/_project_/{cancel-task.toml → cancel-task.en.toml} +0 -0
  152. /package/templates/.gemini/commands/_project_/{check-task.toml → check-task.en.toml} +0 -0
  153. /package/templates/.gemini/commands/_project_/{close-codescan.toml → close-codescan.en.toml} +0 -0
  154. /package/templates/.gemini/commands/_project_/{close-dependabot.toml → close-dependabot.en.toml} +0 -0
  155. /package/templates/.gemini/commands/_project_/{commit.toml → commit.en.toml} +0 -0
  156. /package/templates/.gemini/commands/_project_/{complete-task.toml → complete-task.en.toml} +0 -0
  157. /package/templates/.gemini/commands/_project_/{create-issue.toml → create-issue.en.toml} +0 -0
  158. /package/templates/.gemini/commands/_project_/{create-pr.toml → create-pr.en.toml} +0 -0
  159. /package/templates/.gemini/commands/_project_/{create-release-note.toml → create-release-note.en.toml} +0 -0
  160. /package/templates/.gemini/commands/_project_/{create-task.toml → create-task.en.toml} +0 -0
  161. /package/templates/.gemini/commands/_project_/{implement-task.toml → implement-task.en.toml} +0 -0
  162. /package/templates/.gemini/commands/_project_/{import-codescan.toml → import-codescan.en.toml} +0 -0
  163. /package/templates/.gemini/commands/_project_/{import-dependabot.toml → import-dependabot.en.toml} +0 -0
  164. /package/templates/.gemini/commands/_project_/{import-issue.toml → import-issue.en.toml} +0 -0
  165. /package/templates/.gemini/commands/_project_/{init-labels.toml → init-labels.en.toml} +0 -0
  166. /package/templates/.gemini/commands/_project_/{init-milestones.toml → init-milestones.en.toml} +0 -0
  167. /package/templates/.gemini/commands/_project_/{plan-task.toml → plan-task.en.toml} +0 -0
  168. /package/templates/.gemini/commands/_project_/{refine-task.toml → refine-task.en.toml} +0 -0
  169. /package/templates/.gemini/commands/_project_/{refine-title.toml → refine-title.en.toml} +0 -0
  170. /package/templates/.gemini/commands/_project_/{release.toml → release.en.toml} +0 -0
  171. /package/templates/.gemini/commands/_project_/{restore-task.toml → restore-task.en.toml} +0 -0
  172. /package/templates/.gemini/commands/_project_/{review-task.toml → review-task.en.toml} +0 -0
  173. /package/templates/.gemini/commands/_project_/{test-integration.toml → test-integration.en.toml} +0 -0
  174. /package/templates/.gemini/commands/_project_/{test.toml → test.en.toml} +0 -0
  175. /package/templates/.gemini/commands/_project_/{update-agent-infra.toml → update-agent-infra.en.toml} +0 -0
  176. /package/templates/.gemini/commands/_project_/{upgrade-dependency.toml → upgrade-dependency.en.toml} +0 -0
  177. /package/templates/.opencode/commands/{analyze-task.md → analyze-task.en.md} +0 -0
  178. /package/templates/.opencode/commands/{archive-tasks.md → archive-tasks.en.md} +0 -0
  179. /package/templates/.opencode/commands/{block-task.md → block-task.en.md} +0 -0
  180. /package/templates/.opencode/commands/{cancel-task.md → cancel-task.en.md} +0 -0
  181. /package/templates/.opencode/commands/{check-task.md → check-task.en.md} +0 -0
  182. /package/templates/.opencode/commands/{close-codescan.md → close-codescan.en.md} +0 -0
  183. /package/templates/.opencode/commands/{close-dependabot.md → close-dependabot.en.md} +0 -0
  184. /package/templates/.opencode/commands/{commit.md → commit.en.md} +0 -0
  185. /package/templates/.opencode/commands/{complete-task.md → complete-task.en.md} +0 -0
  186. /package/templates/.opencode/commands/{create-issue.md → create-issue.en.md} +0 -0
  187. /package/templates/.opencode/commands/{create-pr.md → create-pr.en.md} +0 -0
  188. /package/templates/.opencode/commands/{create-release-note.md → create-release-note.en.md} +0 -0
  189. /package/templates/.opencode/commands/{create-task.md → create-task.en.md} +0 -0
  190. /package/templates/.opencode/commands/{implement-task.md → implement-task.en.md} +0 -0
  191. /package/templates/.opencode/commands/{import-codescan.md → import-codescan.en.md} +0 -0
  192. /package/templates/.opencode/commands/{import-dependabot.md → import-dependabot.en.md} +0 -0
  193. /package/templates/.opencode/commands/{import-issue.md → import-issue.en.md} +0 -0
  194. /package/templates/.opencode/commands/{init-labels.md → init-labels.en.md} +0 -0
  195. /package/templates/.opencode/commands/{init-milestones.md → init-milestones.en.md} +0 -0
  196. /package/templates/.opencode/commands/{plan-task.md → plan-task.en.md} +0 -0
  197. /package/templates/.opencode/commands/{refine-task.md → refine-task.en.md} +0 -0
  198. /package/templates/.opencode/commands/{refine-title.md → refine-title.en.md} +0 -0
  199. /package/templates/.opencode/commands/{release.md → release.en.md} +0 -0
  200. /package/templates/.opencode/commands/{restore-task.md → restore-task.en.md} +0 -0
  201. /package/templates/.opencode/commands/{review-task.md → review-task.en.md} +0 -0
  202. /package/templates/.opencode/commands/{test-integration.md → test-integration.en.md} +0 -0
  203. /package/templates/.opencode/commands/{test.md → test.en.md} +0 -0
  204. /package/templates/.opencode/commands/{update-agent-infra.md → update-agent-infra.en.md} +0 -0
  205. /package/templates/.opencode/commands/{upgrade-dependency.md → upgrade-dependency.en.md} +0 -0
@@ -8,7 +8,7 @@ description: "标记任务完成并归档"
8
8
  ## 行为边界 / 关键规则
9
9
 
10
10
  - 本命令更新任务元数据并物理移动任务目录
11
- - 除非强制执行,不要归档有未完成工作流步骤的任务
11
+ - 除非强制执行,不要转移有未完成工作流步骤的任务
12
12
 
13
13
  ## 执行步骤
14
14
 
@@ -36,7 +36,7 @@ description: "标记任务完成并归档"
36
36
  > - 如果任意一个条件不满足 → **默认停止**,输出前置条件未满足的警告
37
37
  > - 只有用户明确要求 `--force` 时,才可以在前置条件未满足时继续
38
38
  >
39
- > **禁止在前置条件未满足时继续执行步骤 3-7,也不要输出「任务 {task-id} 已完成并归档。」**
39
+ > **禁止在前置条件未满足时继续执行步骤 3-7,也不要输出「任务 {task-id} 已完成,任务目录已转移到 completed/。」**
40
40
 
41
41
  如果任何前置条件未满足,警告用户:
42
42
  ```
@@ -53,7 +53,7 @@ Please complete the missing steps first, or use --force to override.
53
53
  获取当前时间:
54
54
 
55
55
  ```bash
56
- date "+%Y-%m-%d %H:%M:%S"
56
+ date "+%Y-%m-%d %H:%M:%S%:z"
57
57
  ```
58
58
 
59
59
  更新 `.agents/workspace/active/{task-id}/task.md`:
@@ -64,10 +64,10 @@ date "+%Y-%m-%d %H:%M:%S"
64
64
  - 逐项验证并勾选 `## 完成检查清单` 中的所有条目(将 `- [ ]` 改为 `- [x]`)
65
65
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
66
66
  ```
67
- - {yyyy-MM-dd HH:mm:ss} — **Completed** by {agent} — Task archived to completed/
67
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Completed** by {agent} — Task moved to completed/
68
68
  ```
69
69
 
70
- ### 4. 归档任务
70
+ ### 4. 转移任务
71
71
 
72
72
  将任务目录从 active 移动到 completed:
73
73
 
@@ -75,7 +75,7 @@ date "+%Y-%m-%d %H:%M:%S"
75
75
  mv .agents/workspace/active/{task-id} .agents/workspace/completed/{task-id}
76
76
  ```
77
77
 
78
- ### 5. 验证归档
78
+ ### 5. 验证转移
79
79
 
80
80
  ```bash
81
81
  ls .agents/workspace/completed/{task-id}/task.md
@@ -116,12 +116,12 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
116
116
 
117
117
  输出格式:
118
118
  ```
119
- 任务 {task-id} 已完成并归档。
119
+ 任务 {task-id} 已完成,任务目录已转移到 completed/。
120
120
 
121
121
  任务信息:
122
122
  - 标题:{title}
123
123
  - 完成时间:{timestamp}
124
- - 归档路径:.agents/workspace/completed/{task-id}/
124
+ - 目标路径:.agents/workspace/completed/{task-id}/
125
125
 
126
126
  交付物:
127
127
  - {关键产出列表:修改的文件、添加的测试等}
@@ -132,18 +132,18 @@ node .agents/scripts/validate-artifact.js gate complete-task .agents/workspace/c
132
132
  - [ ] 验证了所有工作流步骤已完成
133
133
  - [ ] 更新了 task.md 的完成状态和时间戳
134
134
  - [ ] 将任务目录移动到 `.agents/workspace/completed/`
135
- - [ ] 验证了归档成功
135
+ - [ ] 验证了转移成功
136
136
  - [ ] 告知了用户完成情况
137
137
 
138
138
  ## 注意事项
139
139
 
140
- 1. **过早完成**:不要归档有未完成步骤的任务。未完成的情况示例:
140
+ 1. **过早完成**:不要转移有未完成步骤的任务。未完成的情况示例:
141
141
  - 代码已编写但未提交
142
142
  - 代码已提交但未审查
143
143
  - 审查发现阻塞项但未修复
144
144
  - PR 已创建但未合并
145
145
 
146
- 2. **回滚**:如果任务被错误归档:
146
+ 2. **回滚**:如果任务被错误转移:
147
147
  ```bash
148
148
  mv .agents/workspace/completed/{task-id} .agents/workspace/active/{task-id}
149
149
  ```
@@ -21,7 +21,7 @@ Create the base GitHub Issue from `task.md` and write `issue_number` back to the
21
21
 
22
22
  Check:
23
23
  - `.agents/workspace/active/{task-id}/task.md`
24
- - GitHub CLI authentication with `gh auth status`
24
+ - read `.agents/rules/issue-pr-commands.md` first, then use its authentication commands to verify platform access
25
25
 
26
26
  If `issue_number` already exists and is not empty or `N/A`, confirm with the user before creating a replacement Issue.
27
27
 
@@ -39,17 +39,14 @@ Detect `.github/ISSUE_TEMPLATE` files and decide whether to use a matched templa
39
39
 
40
40
  ### 4. Create the Issue
41
41
 
42
- Create the Issue with `gh issue create --title "{title}" --body "{body}" --assignee @me ...` and omit `--label` when nothing valid remains.
43
-
44
- If an Issue Type was selected, set it with:
45
- `gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent`
42
+ Create and enrich the Issue by following the "Create Issue" and "Set the Issue Type" sections in `.agents/rules/issue-pr-commands.md`. Omit label arguments when nothing valid remains.
46
43
 
47
44
  ### 5. Update Task Status
48
45
 
49
46
  Get the current time:
50
47
 
51
48
  ```bash
52
- date "+%Y-%m-%d %H:%M:%S"
49
+ date "+%Y-%m-%d %H:%M:%S%:z"
53
50
  ```
54
51
 
55
52
  Write back `issue_number`, update `updated_at`, and append the Create Issue Activity Log entry.
@@ -21,7 +21,7 @@ description: "从任务文件创建 GitHub Issue"
21
21
 
22
22
  检查:
23
23
  - `.agents/workspace/active/{task-id}/task.md`
24
- - 使用 `gh auth status` 验证 GitHub CLI 认证状态
24
+ - 执行前先读取 `.agents/rules/issue-pr-commands.md`,并按其中的认证命令验证当前平台访问能力
25
25
 
26
26
  如果 `issue_number` 已存在且既不为空也不为 `N/A`,创建前必须先与用户确认。
27
27
 
@@ -39,17 +39,14 @@ description: "从任务文件创建 GitHub Issue"
39
39
 
40
40
  ### 4. 创建 Issue
41
41
 
42
- 使用 `gh issue create --title "{title}" --body "{body}" --assignee @me ...` 创建 Issue;如果没有有效 label,就省略 `--label`。
43
-
44
- 如果已经确定了 Issue Type,则执行:
45
- `gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent`
42
+ `.agents/rules/issue-pr-commands.md` 中的 “创建 Issue” “Issue Type 设置” 规则创建并补充 Issue;如果没有有效 label,就省略 label 参数。
46
43
 
47
44
  ### 5. 更新任务状态
48
45
 
49
46
  获取当前时间:
50
47
 
51
48
  ```bash
52
- date "+%Y-%m-%d %H:%M:%S"
49
+ date "+%Y-%m-%d %H:%M:%S%:z"
53
50
  ```
54
51
 
55
52
  回写 `issue_number`,更新 `updated_at`,并追加 Create Issue 的 Activity Log。
@@ -42,29 +42,17 @@ Issue Type fallback mapping:
42
42
 
43
43
  ## Create the Issue
44
44
 
45
- Use:
45
+ Before creating the Issue, read `.agents/rules/issue-pr-commands.md` and use its "Create an Issue" command template.
46
46
 
47
- ```bash
48
- gh issue create --title "{title}" --body "{body}" --label "{label-1}" --label "{label-2}" --milestone "{milestone}"
49
- ```
50
-
51
- If no valid labels remain, omit `--label`.
47
+ If no valid labels remain, omit label arguments.
52
48
 
53
49
  For milestone inference, read `.agents/rules/milestone-inference.md` and follow "Phase 1: `create-issue`" before creating the Issue.
54
50
 
55
- Issue Type setup:
56
-
57
- ```bash
58
- gh api "orgs/$owner/issue-types" --jq '.[].name'
59
- gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent
60
- ```
51
+ Issue Type setup follows the matching commands in `.agents/rules/issue-pr-commands.md`.
61
52
 
62
53
  `in:` labels (coarse selection):
63
54
 
64
- ```bash
65
- gh label list --search "in:" --limit 50 --json name --jq '.[].name'
66
- gh issue edit {issue-number} --add-label "in: {module}"
67
- ```
55
+ Prepare label edit arguments by following the Issue update command in `.agents/rules/issue-pr-commands.md`.
68
56
 
69
57
  Use the returned labels to do semantic matching against the task.md title and description:
70
58
  - add a label when the task **explicitly mentions** a module (for example, "fix CLI argument parsing" -> `in: cli`)
@@ -42,29 +42,17 @@ Issue Type fallback 映射:
42
42
 
43
43
  ## 创建 Issue
44
44
 
45
- 使用:
45
+ 创建 Issue 时,执行前先读取 `.agents/rules/issue-pr-commands.md`,并使用其中的 “创建 Issue” 命令模板。
46
46
 
47
- ```bash
48
- gh issue create --title "{title}" --body "{body}" --label "{label-1}" --label "{label-2}" --milestone "{milestone}"
49
- ```
50
-
51
- 如果最终没有有效 label,就省略 `--label`。
47
+ 如果最终没有有效 label,就省略 label 参数。
52
48
 
53
49
  Milestone 推断规则见 `.agents/rules/milestone-inference.md` 的「阶段 1:`create-issue`」。推断前先读取该文件。
54
50
 
55
- Issue Type 设置:
56
-
57
- ```bash
58
- gh api "orgs/$owner/issue-types" --jq '.[].name'
59
- gh api "repos/$repo/issues/{issue-number}" -X PATCH -f type="{issue-type}" --silent
60
- ```
51
+ Issue Type 设置同样遵循 `.agents/rules/issue-pr-commands.md` 中的对应命令。
61
52
 
62
53
  `in:` label(粗选):
63
54
 
64
- ```bash
65
- gh label list --search "in:" --limit 50 --json name --jq '.[].name'
66
- gh issue edit {issue-number} --add-label "in: {module}"
67
- ```
55
+ 执行前先按 `.agents/rules/issue-pr-commands.md` 的 Issue 更新命令准备 label 编辑参数。
68
56
 
69
57
  从查询结果中,根据 task.md 的标题和描述进行语义匹配:
70
58
  - 任务描述**明确提及**某个模块(如"修复 CLI 参数解析"→ `in: cli`)→ 添加
@@ -38,16 +38,15 @@ Confirm whether the current branch already has an upstream. Push with `git push
38
38
 
39
39
  Check whether the current branch already has a PR first; if one exists, show the PR URL and stop without repeating metadata sync or summary publication.
40
40
 
41
- Create the PR with `gh pr create --base <target-branch> --title "<title>" --assignee @me --body ...`.
41
+ Read `.agents/rules/issue-pr-commands.md` before this step, then create the PR with its "Create a PR" command template.
42
42
 
43
43
  If `{task-id}` is available and the related task provides `issue_number`, keep `Closes #{issue-number}` in the PR body.
44
44
 
45
45
  ### 6. Sync PR Metadata
46
46
 
47
47
  For PRs where `{task-id}` is available, sync the core metadata immediately:
48
- - run `gh label list --search "type:" --limit 1 --json name --jq 'length'`
49
- - add the mapped type label with `gh pr edit {pr-number} --add-label "{type-label}"`
50
- - add relevant `in: {module}` labels with `gh pr edit {pr-number} --add-label "in: {module}"`
48
+ - query standard labels, Issue metadata, and PR metadata via `.agents/rules/issue-pr-commands.md`
49
+ - add the mapped type label and relevant `in:` labels with the PR update command from `.agents/rules/issue-pr-commands.md`
51
50
  - sync the linked Issue `in:` labels to match by following the `in:` label sync rule in `.agents/rules/issue-sync.md`
52
51
  - reuse the Issue milestone by following "Phase 3: `create-pr`" in `.agents/rules/milestone-inference.md`
53
52
  - keep Development linking in the PR body with `Closes #{issue-number}` when applicable
@@ -70,7 +69,7 @@ Aggregate a reviewer-facing summary from those artifacts and maintain a single i
70
69
  Get the current time:
71
70
 
72
71
  ```bash
73
- date "+%Y-%m-%d %H:%M:%S"
72
+ date "+%Y-%m-%d %H:%M:%S%:z"
74
73
  ```
75
74
 
76
75
  If `{task-id}` is available, update task.md with `pr_number`, `updated_at`, and append the PR Created Activity Log entry including metadata-sync and summary results.
@@ -38,16 +38,15 @@ description: "创建 Pull Request 到目标分支"
38
38
 
39
39
  先检查当前分支是否已经存在 PR;如果已存在,直接告知用户 PR URL 并结束,不要重复执行元数据同步或摘要发布。
40
40
 
41
- 使用 `gh pr create --base <target-branch> --title "<title>" --assignee @me --body ...` 创建 PR。
41
+ 执行前先读取 `.agents/rules/issue-pr-commands.md`,并按其中的 “创建 PR” 命令创建 PR。
42
42
 
43
43
  如果获取到 `{task-id}` 且对应任务提供了 `issue_number`,必须在 PR 正文中保留 `Closes #{issue-number}`。
44
44
 
45
45
  ### 6. 同步 PR 元数据
46
46
 
47
47
  对获取到 `{task-id}` 的 PR,立即同步这些核心元数据:
48
- - 执行 `gh label list --search "type:" --limit 1 --json name --jq 'length'`
49
- - 使用 `gh pr edit {pr-number} --add-label "{type-label}"` 添加 type label
50
- - 使用 `gh pr edit {pr-number} --add-label "in: {module}"` 添加相关 `in:` labels
48
+ - `.agents/rules/issue-pr-commands.md` 查询标准 label / Issue / PR 元数据
49
+ - `.agents/rules/issue-pr-commands.md` PR 更新命令添加 type label 与相关 `in:` labels
51
50
  - 按 `.agents/rules/issue-sync.md` 的 `in:` label 同步规则,同步更新关联 Issue 的 `in:` label 保持一致
52
51
  - 按 `.agents/rules/milestone-inference.md` 的「阶段 3:`create-pr`」复用 Issue milestone
53
52
  - 通过 `Closes #{issue-number}` 保持 Development 关联
@@ -70,7 +69,7 @@ description: "创建 Pull Request 到目标分支"
70
69
  获取当前时间:
71
70
 
72
71
  ```bash
73
- date "+%Y-%m-%d %H:%M:%S"
72
+ date "+%Y-%m-%d %H:%M:%S%:z"
74
73
  ```
75
74
 
76
75
  如果获取到了 `{task-id}`,更新 task.md 的 `pr_number`、`updated_at`,并追加 PR Created 的 Activity Log,记录元数据同步和摘要发布结果。
@@ -25,6 +25,8 @@ git diff <target-branch>...HEAD
25
25
 
26
26
  ## Sync PR Metadata
27
27
 
28
+ Read `.agents/rules/issue-pr-commands.md` before this step.
29
+
28
30
  Before syncing labels, verify the standard label system:
29
31
 
30
32
  ```bash
@@ -47,9 +49,9 @@ Type label mapping:
47
49
  | other values | skip |
48
50
 
49
51
  Metadata sync order:
50
- 1. query Issue labels and milestone best-effort with `gh issue view {issue-number} --json labels,milestone`
51
- 2. add the mapped type label with `gh pr edit {pr-number} --add-label "{type-label}"`
52
- 3. inherit non-`type:` and non-`status:` Issue labels with repeated `gh pr edit ... --add-label`
52
+ 1. query Issue labels and milestone via the Issue read command in `.agents/rules/issue-pr-commands.md`
53
+ 2. add the mapped type label via the PR update command in `.agents/rules/issue-pr-commands.md`
54
+ 3. inherit non-`type:` and non-`status:` Issue labels via repeated PR update commands from the same rule
53
55
  4. refine the PR `in:` labels by following `.agents/rules/issue-sync.md`, and keep the linked Issue `in:` labels in sync with the same result
54
56
  5. handle the milestone by following "Phase 3: `create-pr`" in `.agents/rules/milestone-inference.md`, reusing the Issue milestone directly
55
57
  6. ensure the PR body contains `Closes #{issue-number}` or an equivalent closing keyword
@@ -61,20 +63,13 @@ Milestone rule:
61
63
  ## Create the PR
62
64
 
63
65
  - Extract `issue_number` from task.md when this work belongs to an active task
64
- - If `issue_number` exists, query the Issue best-effort with `gh issue view {issue-number} --json number,title --jq '.number'`
65
- - Before calling `gh pr create`, check whether the current branch already has a PR. If it does, report the PR URL and state, then stop without repeating metadata sync or summary publication
66
+ - If `issue_number` exists, query the Issue via `.agents/rules/issue-pr-commands.md`
67
+ - Before calling the PR creation command, check whether the current branch already has a PR. If it does, report the PR URL and state, then stop without repeating metadata sync or summary publication
66
68
  - Use HEREDOC to pass the PR body
67
69
  - Replace `{$IssueNumber}` in the template when present
68
70
  - End the PR body with `Generated with AI assistance`
69
71
 
70
- ```bash
71
- gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
72
- <Complete PR description following template>
73
-
74
- Generated with AI assistance
75
- EOF
76
- )"
77
- ```
72
+ Create the PR with the "Create a PR" command template in `.agents/rules/issue-pr-commands.md`.
78
73
 
79
74
  Final user output should include this follow-up path:
80
75
 
@@ -25,6 +25,8 @@ git diff <target-branch>...HEAD
25
25
 
26
26
  ## 同步 PR 元数据
27
27
 
28
+ 执行前先读取 `.agents/rules/issue-pr-commands.md`。
29
+
28
30
  在同步 label 之前,先确认标准 label 体系已经存在:
29
31
 
30
32
  ```bash
@@ -47,9 +49,9 @@ Type label 映射:
47
49
  | 其他值 | 跳过 |
48
50
 
49
51
  元数据同步顺序:
50
- 1. `gh issue view {issue-number} --json labels,milestone` 尽力查询 Issue 的 labels 和 milestone
51
- 2. `gh pr edit {pr-number} --add-label "{type-label}"` 添加映射后的 type label
52
- 3. 用重复的 `gh pr edit ... --add-label` 继承非 `type:`、非 `status:` 的 Issue labels
52
+ 1. `.agents/rules/issue-pr-commands.md` Issue 读取命令查询关联 Issue 的 labels 和 milestone
53
+ 2. `.agents/rules/issue-pr-commands.md` PR 更新命令添加映射后的 type label
54
+ 3. 按同一规则的 PR 更新命令继承非 `type:`、非 `status:` 的 Issue labels
53
55
  4. 按 `.agents/rules/issue-sync.md` 的 `in:` label 同步规则精修 PR 的 `in:` label,同时同步更新关联 Issue 的 `in:` label 保持一致
54
56
  5. 按 `.agents/rules/milestone-inference.md` 的「阶段 3:`create-pr`」处理 milestone,直接复用 Issue milestone
55
57
  6. 确保 PR 正文包含 `Closes #{issue-number}` 或等价的 closing keyword
@@ -61,20 +63,13 @@ Milestone 规则:
61
63
  ## 创建 PR
62
64
 
63
65
  - 当当前工作属于活动任务时,从 task.md 中提取 `issue_number`
64
- - 如果存在 `issue_number`,用 `gh issue view {issue-number} --json number,title --jq '.number'` 尽力查询对应 Issue
65
- - 在调用 `gh pr create` 前,先检查当前分支是否已经存在 PR;如果已存在,直接告知用户 PR URL 和状态并结束,不要重复同步元数据或摘要
66
+ - 如果存在 `issue_number`,按 `.agents/rules/issue-pr-commands.md` Issue 读取命令查询对应 Issue
67
+ - 在调用 PR 创建命令前,先检查当前分支是否已经存在 PR;如果已存在,直接告知用户 PR URL 和状态并结束,不要重复同步元数据或摘要
66
68
  - 使用 HEREDOC 传递 PR 正文
67
69
  - 如果模板中存在 `{$IssueNumber}`,替换它
68
70
  - PR 正文结尾必须带上 `Generated with AI assistance`
69
71
 
70
- ```bash
71
- gh pr create --base <target-branch> --title "<title>" --assignee @me --body "$(cat <<'EOF'
72
- <Complete PR description following template>
73
-
74
- Generated with AI assistance
75
- EOF
76
- )"
77
- ```
72
+ 创建 PR 时,使用 `.agents/rules/issue-pr-commands.md` 中的 “创建 PR” 命令模板。
78
73
 
79
74
  最终用户输出必须按顺序包含以下后续动作:
80
75
 
@@ -35,12 +35,10 @@ git rev-parse v<prev-version>
35
35
 
36
36
  Fetch multiple published release notes as format references, then use a predefined complete category list:
37
37
 
38
+ Read `.agents/rules/release-commands.md` before this step.
39
+
38
40
  ```bash
39
- # Part A: Fetch the body for each of the 3 releases
40
- for tag in $(gh release list --limit 10 --json tagName,isDraft,isPrerelease \
41
- --jq '[.[] | select(.isDraft == false and .isPrerelease == false)] | .[0:3] | .[].tagName'); do
42
- gh release view "$tag" --json body -q '.body'
43
- done
41
+ # Part A: fetch the latest 3 published release bodies by following the release query commands in `.agents/rules/release-commands.md`
44
42
  ```
45
43
 
46
44
  **Part B: Complete Category List**
@@ -65,10 +63,7 @@ Get the date range between tags, then query merged PRs:
65
63
  git log v<prev-version> --format=%aI -1
66
64
  git log v<version> --format=%aI -1
67
65
 
68
- # Get merged PRs in range
69
- gh pr list --state merged --base <branch> \
70
- --json number,title,body,author,labels,mergedAt,url \
71
- --limit 200 --search "merged:YYYY-MM-DD..YYYY-MM-DD"
66
+ # Get merged PRs in range by following the merged-PR query command in `.agents/rules/release-commands.md`
72
67
  ```
73
68
 
74
69
  Also collect direct commits without PRs:
@@ -81,9 +76,7 @@ git log v<prev-version>..v<version> --format="%H %s" --no-merges
81
76
  From each PR body, extract linked Issues:
82
77
  - Match patterns: `Closes #N`, `Fixes #N`, `Resolves #N` (case-insensitive)
83
78
 
84
- ```bash
85
- gh issue view <N> --json number,title,labels,url
86
- ```
79
+ Read linked Issues by following `.agents/rules/release-commands.md`.
87
80
 
88
81
  ### 6. Classify Changes
89
82
 
@@ -135,12 +128,7 @@ Ask:
135
128
 
136
129
  ### 9. Create Draft Release (If Confirmed)
137
130
 
138
- ```bash
139
- gh release create v<version> \
140
- --title "v<version>" \
141
- --notes-file /tmp/release-notes-v<version>.md \
142
- --draft
143
- ```
131
+ Create the draft release by following `.agents/rules/release-commands.md`.
144
132
 
145
133
  Output:
146
134
  ```
@@ -35,12 +35,10 @@ git rev-parse v<prev-version>
35
35
 
36
36
  获取最近多条已发布的 Release Note 作为格式参考,并参考预定义的完整分类清单:
37
37
 
38
+ 执行前先读取 `.agents/rules/release-commands.md`。
39
+
38
40
  ```bash
39
- # Part A: 逐条获取这 3 条 Release 的 body
40
- for tag in $(gh release list --limit 10 --json tagName,isDraft,isPrerelease \
41
- --jq '[.[] | select(.isDraft == false and .isPrerelease == false)] | .[0:3] | .[].tagName'); do
42
- gh release view "$tag" --json body -q '.body'
43
- done
41
+ # Part A:按 `.agents/rules/release-commands.md` 的 release 查询命令逐条获取最近 3 条 Release 的 body
44
42
  ```
45
43
 
46
44
  **Part B:完整分类清单**
@@ -65,10 +63,7 @@ done
65
63
  git log v<prev-version> --format=%aI -1
66
64
  git log v<version> --format=%aI -1
67
65
 
68
- # 获取范围内已合并的 PR
69
- gh pr list --state merged --base <branch> \
70
- --json number,title,body,author,labels,mergedAt,url \
71
- --limit 200 --search "merged:YYYY-MM-DD..YYYY-MM-DD"
66
+ # 获取范围内已合并的 PR(按 `.agents/rules/release-commands.md` 的 merged PR 查询命令执行)
72
67
  ```
73
68
 
74
69
  同时收集没有 PR 的直接提交:
@@ -81,9 +76,7 @@ git log v<prev-version>..v<version> --format="%H %s" --no-merges
81
76
  从每个 PR body 中提取关联的 Issue:
82
77
  - 匹配模式:`Closes #N`、`Fixes #N`、`Resolves #N`(不区分大小写)
83
78
 
84
- ```bash
85
- gh issue view <N> --json number,title,labels,url
86
- ```
79
+ 按 `.agents/rules/release-commands.md` 的关联 Issue 查询命令读取。
87
80
 
88
81
  ### 6. 分类变更
89
82
 
@@ -135,12 +128,7 @@ gh issue view <N> --json number,title,labels,url
135
128
 
136
129
  ### 9. 创建 Draft Release(如确认)
137
130
 
138
- ```bash
139
- gh release create v<version> \
140
- --title "v<version>" \
141
- --notes-file /tmp/release-notes-v<version>.md \
142
- --draft
143
- ```
131
+ 按 `.agents/rules/release-commands.md` 的 Draft Release 创建命令执行。
144
132
 
145
133
  输出:
146
134
  ```
@@ -71,8 +71,8 @@ type: feature|bugfix|refactor|docs|chore
71
71
  branch: <project>-<type>-<slug>
72
72
  workflow: feature-development|bug-fix|refactoring
73
73
  status: active
74
- created_at: {yyyy-MM-dd HH:mm:ss}
75
- updated_at: {yyyy-MM-dd HH:mm:ss}
74
+ created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
75
+ updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
76
76
  created_by: human
77
77
  current_step: requirement-analysis
78
78
  assigned_to: {current AI agent}
@@ -85,7 +85,7 @@ Note: `created_by` is `human` because the task comes from the user's description
85
85
  Get the current time:
86
86
 
87
87
  ```bash
88
- date "+%Y-%m-%d %H:%M:%S"
88
+ date "+%Y-%m-%d %H:%M:%S%:z"
89
89
  ```
90
90
 
91
91
  Update `.agents/workspace/active/{task-id}/task.md`:
@@ -95,7 +95,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
95
95
  - `## Context` -> `- **Branch**:`: update it to the generated branch name
96
96
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
97
97
  ```
98
- - {yyyy-MM-dd HH:mm:ss} — **Task Created** by {agent} — Task created from description
98
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task Created** by {agent} — Task created from description
99
99
  ```
100
100
 
101
101
  ### 4. Verification Gate
@@ -71,8 +71,8 @@ type: feature|bugfix|refactor|docs|chore
71
71
  branch: <project>-<type>-<slug>
72
72
  workflow: feature-development|bug-fix|refactoring
73
73
  status: active
74
- created_at: {yyyy-MM-dd HH:mm:ss}
75
- updated_at: {yyyy-MM-dd HH:mm:ss}
74
+ created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
75
+ updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
76
76
  created_by: human
77
77
  current_step: requirement-analysis
78
78
  assigned_to: {当前 AI 代理}
@@ -85,7 +85,7 @@ assigned_to: {当前 AI 代理}
85
85
  获取当前时间:
86
86
 
87
87
  ```bash
88
- date "+%Y-%m-%d %H:%M:%S"
88
+ date "+%Y-%m-%d %H:%M:%S%:z"
89
89
  ```
90
90
 
91
91
  更新 `.agents/workspace/active/{task-id}/task.md`:
@@ -95,7 +95,7 @@ date "+%Y-%m-%d %H:%M:%S"
95
95
  - `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
96
96
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
97
97
  ```
98
- - {yyyy-MM-dd HH:mm:ss} — **Task Created** by {agent} — Task created from description
98
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Task Created** by {agent} — Task created from description
99
99
  ```
100
100
 
101
101
  ### 4. 完成校验
@@ -81,7 +81,7 @@ Create `.agents/workspace/active/{task-id}/{implementation-artifact}`.
81
81
  Get the current time:
82
82
 
83
83
  ```bash
84
- date "+%Y-%m-%d %H:%M:%S"
84
+ date "+%Y-%m-%d %H:%M:%S%:z"
85
85
  ```
86
86
 
87
87
  Update `.agents/workspace/active/{task-id}/task.md`:
@@ -91,7 +91,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
91
91
  - review the `## Requirements` section and only change items from `- [ ]` to `- [x]` when they are clearly satisfied by this round's implemented code and passing tests
92
92
  - record `{implementation-artifact}` for Round `{implementation-round}`
93
93
  - append:
94
- `- {yyyy-MM-dd HH:mm:ss} — **Implementation (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {implementation-artifact}`
94
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Implementation (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {implementation-artifact}`
95
95
 
96
96
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure; read `.agents/rules/issue-sync.md` first):
97
97
  - Set `status: in-progress` and refine `in:` labels from the branch diff by following `.agents/rules/issue-sync.md` (add/remove when a mapping exists, add-only when it does not)
@@ -81,7 +81,7 @@ description: "根据技术方案实施任务并输出报告"
81
81
  获取当前时间:
82
82
 
83
83
  ```bash
84
- date "+%Y-%m-%d %H:%M:%S"
84
+ date "+%Y-%m-%d %H:%M:%S%:z"
85
85
  ```
86
86
 
87
87
  更新 `.agents/workspace/active/{task-id}/task.md`:
@@ -91,7 +91,7 @@ date "+%Y-%m-%d %H:%M:%S"
91
91
  - 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
92
92
  - 记录 Round `{implementation-round}` 的 `{implementation-artifact}`
93
93
  - 追加:
94
- `- {yyyy-MM-dd HH:mm:ss} — **Implementation (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {implementation-artifact}`
94
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Implementation (Round {N})** by {agent} — Code implemented, {n} files modified, {n} tests passed → {implementation-artifact}`
95
95
 
96
96
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续;执行前先读取 `.agents/rules/issue-sync.md`):
97
97
  - 设置 `status: in-progress`,并按 `.agents/rules/issue-sync.md` 的 `in:` label 同步规则,基于分支改动精修 `in:` label(有映射时可增可删,无映射时仅补充)
@@ -17,9 +17,7 @@ Import the specified Code Scanning (CodeQL) alert and create a remediation task.
17
17
 
18
18
  ### 1. Retrieve Alert Information
19
19
 
20
- ```bash
21
- gh api repos/{owner}/{repo}/code-scanning/alerts/<alert-number>
22
- ```
20
+ Read `.agents/rules/security-alerts.md` before this step, then use its Code Scanning alert read command to fetch the alert details.
23
21
 
24
22
  Extract key information:
25
23
  - `number`: alert number
@@ -49,13 +47,13 @@ tool: <tool-name>
49
47
  Get the current time:
50
48
 
51
49
  ```bash
52
- date "+%Y-%m-%d %H:%M:%S"
50
+ date "+%Y-%m-%d %H:%M:%S%:z"
53
51
  ```
54
52
 
55
53
  Update task.md: `current_step` -> `requirement-analysis`.
56
54
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
57
55
  ```
58
- - {yyyy-MM-dd HH:mm:ss} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
56
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
59
57
  ```
60
58
 
61
59
  ### 4. Verification Gate
@@ -17,9 +17,7 @@ description: "导入 Code Scanning 告警并创建修复任务"
17
17
 
18
18
  ### 1. 获取告警信息
19
19
 
20
- ```bash
21
- gh api repos/{owner}/{repo}/code-scanning/alerts/<alert-number>
22
- ```
20
+ 执行前先读取 `.agents/rules/security-alerts.md`,并按其中的 Code Scanning 告警读取命令获取告警详情。
23
21
 
24
22
  提取关键信息:
25
23
  - `number`:告警编号
@@ -49,13 +47,13 @@ tool: <tool-name>
49
47
  获取当前时间:
50
48
 
51
49
  ```bash
52
- date "+%Y-%m-%d %H:%M:%S"
50
+ date "+%Y-%m-%d %H:%M:%S%:z"
53
51
  ```
54
52
 
55
53
  更新 task.md:`current_step` -> `requirement-analysis`。
56
54
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
57
55
  ```
58
- - {yyyy-MM-dd HH:mm:ss} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
56
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Code Scanning Alert** by {agent} — Code Scanning alert #{alert-number} imported
59
57
  ```
60
58
 
61
59
  ### 4. 完成校验
@@ -17,9 +17,7 @@ Import the specified Dependabot security alert and create a remediation task.
17
17
 
18
18
  ### 1. Retrieve Alert Information
19
19
 
20
- ```bash
21
- gh api repos/{owner}/{repo}/dependabot/alerts/<alert-number>
22
- ```
20
+ Read `.agents/rules/security-alerts.md` before this step, then use its Dependabot alert read command to fetch the alert details.
23
21
 
24
22
  Extract key information:
25
23
  - `number`: alert number
@@ -50,13 +48,13 @@ ghsa_id: <GHSA-ID>
50
48
  Get the current time:
51
49
 
52
50
  ```bash
53
- date "+%Y-%m-%d %H:%M:%S"
51
+ date "+%Y-%m-%d %H:%M:%S%:z"
54
52
  ```
55
53
 
56
54
  Update task.md: `current_step` -> `requirement-analysis`.
57
55
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
58
56
  ```
59
- - {yyyy-MM-dd HH:mm:ss} — **Import Dependabot Alert** by {agent} — Dependabot alert #{alert-number} imported
57
+ - {YYYY-MM-DD HH:mm:ss±HH:MM} — **Import Dependabot Alert** by {agent} — Dependabot alert #{alert-number} imported
60
58
  ```
61
59
 
62
60
  ### 4. Verification Gate