@fitlab-ai/agent-infra 0.6.0 → 0.6.2-alpha.1

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 (93) hide show
  1. package/README.md +12 -12
  2. package/README.zh-CN.md +12 -12
  3. package/bin/cli.ts +5 -1
  4. package/dist/bin/cli.js +6 -1
  5. package/dist/lib/defaults.json +5 -4
  6. package/dist/lib/sandbox/config.js +25 -7
  7. package/dist/lib/sandbox/runtime-engines.js +27 -0
  8. package/dist/package.json +1 -1
  9. package/lib/defaults.json +5 -4
  10. package/lib/sandbox/config.ts +35 -7
  11. package/lib/sandbox/runtime-engines.ts +39 -0
  12. package/package.json +5 -3
  13. package/templates/.agents/README.en.md +8 -8
  14. package/templates/.agents/README.zh-CN.md +8 -8
  15. package/templates/{.claude → .agents}/hooks/check-version-format.sh +3 -3
  16. package/templates/.agents/rules/create-issue.github.en.md +6 -0
  17. package/templates/.agents/rules/create-issue.github.zh-CN.md +6 -0
  18. package/templates/.agents/rules/issue-fields.github.en.md +155 -0
  19. package/templates/.agents/rules/issue-fields.github.zh-CN.md +155 -0
  20. package/templates/.agents/rules/issue-pr-commands.github.en.md +1 -0
  21. package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +1 -0
  22. package/templates/.agents/rules/issue-sync.github.en.md +2 -1
  23. package/templates/.agents/rules/issue-sync.github.zh-CN.md +2 -1
  24. package/templates/.agents/rules/release-commands.github.en.md +9 -3
  25. package/templates/.agents/rules/release-commands.github.zh-CN.md +9 -3
  26. package/templates/.agents/rules/task-management.en.md +17 -9
  27. package/templates/.agents/rules/task-management.zh-CN.md +17 -9
  28. package/templates/.agents/rules/testing-discipline.en.md +40 -0
  29. package/templates/.agents/rules/testing-discipline.zh-CN.md +40 -0
  30. package/templates/.agents/rules/version-stamp.en.md +29 -0
  31. package/templates/.agents/rules/version-stamp.zh-CN.md +29 -0
  32. package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +143 -6
  33. package/templates/.agents/scripts/validate-artifact.js +32 -5
  34. package/templates/.agents/skills/analyze-task/SKILL.en.md +3 -0
  35. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +3 -0
  36. package/templates/.agents/skills/analyze-task/config/verify.json +2 -0
  37. package/templates/.agents/skills/block-task/SKILL.en.md +3 -0
  38. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +3 -0
  39. package/templates/.agents/skills/block-task/config/verify.json +1 -0
  40. package/templates/.agents/skills/cancel-task/SKILL.en.md +3 -0
  41. package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +3 -0
  42. package/templates/.agents/skills/cancel-task/config/verify.json +1 -0
  43. package/templates/.agents/skills/commit/SKILL.en.md +10 -0
  44. package/templates/.agents/skills/commit/SKILL.zh-CN.md +10 -0
  45. package/templates/.agents/skills/commit/config/verify.json +1 -0
  46. package/templates/.agents/skills/commit/reference/task-status-update.en.md +5 -0
  47. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +5 -0
  48. package/templates/.agents/skills/complete-task/SKILL.en.md +4 -0
  49. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +4 -0
  50. package/templates/.agents/skills/complete-task/config/verify.json +2 -0
  51. package/templates/.agents/skills/create-pr/SKILL.en.md +5 -1
  52. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +5 -1
  53. package/templates/.agents/skills/create-pr/config/verify.json +1 -0
  54. package/templates/.agents/skills/create-release-note/SKILL.en.md +8 -11
  55. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +8 -11
  56. package/templates/.agents/skills/create-task/SKILL.en.md +9 -0
  57. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +9 -0
  58. package/templates/.agents/skills/create-task/config/verify.json +1 -0
  59. package/templates/.agents/skills/implement-task/SKILL.en.md +16 -1
  60. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +16 -1
  61. package/templates/.agents/skills/implement-task/config/verify.json +2 -0
  62. package/templates/.agents/skills/import-codescan/config/verify.json +1 -0
  63. package/templates/.agents/skills/import-dependabot/config/verify.json +1 -0
  64. package/templates/.agents/skills/import-issue/SKILL.en.md +10 -0
  65. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +10 -0
  66. package/templates/.agents/skills/import-issue/config/verify.json +1 -0
  67. package/templates/.agents/skills/plan-task/SKILL.en.md +3 -0
  68. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -0
  69. package/templates/.agents/skills/plan-task/config/verify.json +2 -0
  70. package/templates/.agents/skills/refine-task/SKILL.en.md +15 -1
  71. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +15 -1
  72. package/templates/.agents/skills/refine-task/config/verify.json +2 -0
  73. package/templates/.agents/skills/refine-task/reference/fix-workflow.en.md +9 -0
  74. package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +9 -0
  75. package/templates/.agents/skills/refine-task/reference/report-template.en.md +11 -0
  76. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +11 -0
  77. package/templates/.agents/skills/restore-task/SKILL.en.md +3 -0
  78. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +3 -0
  79. package/templates/.agents/skills/restore-task/config/verify.json +1 -0
  80. package/templates/.agents/skills/review-task/SKILL.en.md +16 -1
  81. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +16 -1
  82. package/templates/.agents/skills/review-task/config/verify.json +3 -0
  83. package/templates/.agents/skills/review-task/reference/output-templates.en.md +20 -5
  84. package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +20 -5
  85. package/templates/.agents/skills/review-task/reference/report-template.en.md +13 -0
  86. package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +13 -0
  87. package/templates/.agents/skills/review-task/reference/review-criteria.en.md +18 -0
  88. package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +18 -0
  89. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +5 -4
  90. package/templates/.agents/templates/task.en.md +5 -0
  91. package/templates/.agents/templates/task.zh-CN.md +5 -0
  92. package/templates/.claude/settings.json +1 -1
  93. package/templates/.codex/hooks.json +17 -0
@@ -156,31 +156,28 @@ Show the generated release notes to the user.
156
156
 
157
157
  Ask:
158
158
  1. Need any adjustments?
159
- 2. Create a draft release?
159
+ 2. Write these notes onto the Release for this version?
160
160
 
161
- ### 9. Create Draft Release (If Confirmed)
161
+ ### 9. Publish the Release Notes (If Confirmed)
162
162
 
163
- Create the draft release by following `.agents/rules/release-commands.md`.
163
+ Write the notes by following the "Publish the Release Notes" command in `.agents/rules/release-commands.md` (it updates the Release already created and published by the release workflow, falling back to creating it if missing).
164
164
 
165
165
  Output:
166
166
  ```
167
- Draft Release created.
167
+ Release notes updated.
168
168
 
169
- - URL: {draft-release-url}
169
+ - URL: {release-url}
170
170
  - Version: v{version}
171
- - Status: Draft
171
+ - Status: Published
172
172
 
173
- Please review and publish on the platform:
174
- 1. Open the URL above
175
- 2. Review the release notes
176
- 3. Click "Publish release"
173
+ The notes have been written to the Release. Edit further at the URL above if needed.
177
174
  ```
178
175
 
179
176
  ## Notes
180
177
 
181
178
  1. **Requires the platform CLI**: Must have the platform CLI installed and authenticated
182
179
  2. **Tags must exist**: Run the release skill first to create tags
183
- 3. **Draft mode**: Creates a draft - won't auto-publish
180
+ 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
184
181
  4. **Classification accuracy**: Auto-classification is based on title/scope/files; complex PRs may need manual adjustment
185
182
 
186
183
  ## Error Handling
@@ -156,31 +156,28 @@ git log v<prev-version>..v<version> \
156
156
 
157
157
  询问:
158
158
  1. 需要调整吗?
159
- 2. 是否创建 draft release
159
+ 2. 是否把 notes 写入该版本的 Release
160
160
 
161
- ### 9. 创建 Draft Release(如确认)
161
+ ### 9. 发布 Release notes(如确认)
162
162
 
163
- 按 `.agents/rules/release-commands.md` Draft Release 创建命令执行。
163
+ 按 `.agents/rules/release-commands.md` 的「发布 Release notes」命令执行(写入已由 release 工作流自动创建/发布的 Release;不存在时兜底创建)。
164
164
 
165
165
  输出:
166
166
  ```
167
- Draft Release created.
167
+ Release notes 已更新。
168
168
 
169
- - URL: {draft-release-url}
169
+ - URL: {release-url}
170
170
  - Version: v{version}
171
- - Status: Draft
171
+ - Status: Published
172
172
 
173
- Please review and publish on the platform:
174
- 1. Open the URL above
175
- 2. Review the release notes
176
- 3. Click "Publish release"
173
+ 发布说明已写入该 Release。如需进一步调整,可在上面的 URL 直接编辑。
177
174
  ```
178
175
 
179
176
  ## 注意事项
180
177
 
181
178
  1. **需要 the platform CLI**:必须安装并认证 the platform CLI
182
179
  2. **标签必须存在**:先执行 release 技能创建标签
183
- 3. **草稿模式**:创建草稿 —— 不会自动发布
180
+ 3. **Release 已自动发布**:`v{version}` 的 Release 由 release 工作流自动创建并发布(给 Homebrew bottle 提供上传落点);本技能往该 Release 写入/刷新 notes
184
181
  4. **分类准确性**:自动分类基于标题/scope/文件;复杂的 PR 可能需要手动调整
185
182
 
186
183
  ## 错误处理
@@ -20,6 +20,8 @@ The user's description is a **work item**, not an **instruction to execute immed
20
20
 
21
21
  After executing this skill, you **must** immediately update task status in task.md.
22
22
 
23
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
24
+
23
25
  ## Steps
24
26
 
25
27
  ### 1. Parse the User Description
@@ -74,12 +76,18 @@ workflow: feature-development|bug-fix|refactoring
74
76
  status: active
75
77
  created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
76
78
  updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
79
+ agent_infra_version: {agent_infra_version}
77
80
  created_by: human
81
+ priority: # optional; Urgent | High | Medium | Low
82
+ effort: # optional; High | Medium | Low
83
+ start_date: # optional; YYYY-MM-DD
84
+ target_date: # optional; YYYY-MM-DD
78
85
  current_step: requirement-analysis
79
86
  assigned_to: {current AI agent}
80
87
  ```
81
88
 
82
89
  Note: `created_by` is `human` because the task comes from the user's description.
90
+ Optional Issue field metadata may be left empty at task creation; do not invent dates.
83
91
 
84
92
  ### 3. Update Task Status
85
93
 
@@ -93,6 +101,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
93
101
  - `current_step`: requirement-analysis
94
102
  - `assigned_to`: {current AI agent}
95
103
  - `updated_at`: {current time}
104
+ - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
96
105
  - `## Context` -> `- **Branch**:`: update it to the generated branch name
97
106
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
98
107
  ```
@@ -20,6 +20,8 @@ description: "根据自然语言描述创建任务"
20
20
 
21
21
  执行本技能后,你**必须**立即更新 task.md 中的任务状态。
22
22
 
23
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
24
+
23
25
  ## 执行步骤
24
26
 
25
27
  ### 1. 解析用户描述
@@ -74,12 +76,18 @@ workflow: feature-development|bug-fix|refactoring
74
76
  status: active
75
77
  created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
76
78
  updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
79
+ agent_infra_version: {agent_infra_version}
77
80
  created_by: human
81
+ priority: # 可选;Urgent | High | Medium | Low
82
+ effort: # 可选;High | Medium | Low
83
+ start_date: # 可选;YYYY-MM-DD
84
+ target_date: # 可选;YYYY-MM-DD
78
85
  current_step: requirement-analysis
79
86
  assigned_to: {当前 AI 代理}
80
87
  ```
81
88
 
82
89
  注意:`created_by` 为 `human`,因为任务来源于用户的描述。
90
+ 可选 Issue 字段元数据在创建任务时可留空;不要臆测日期。
83
91
 
84
92
  ### 3. 更新任务状态
85
93
 
@@ -93,6 +101,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
93
101
  - `current_step`:requirement-analysis
94
102
  - `assigned_to`:{当前 AI 代理}
95
103
  - `updated_at`:{当前时间}
104
+ - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
96
105
  - `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
97
106
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
98
107
  ```
@@ -10,6 +10,7 @@
10
10
  "status",
11
11
  "created_at",
12
12
  "updated_at",
13
+ "agent_infra_version",
13
14
  "current_step",
14
15
  "assigned_to"
15
16
  ],
@@ -14,6 +14,19 @@ Implement the approved task and produce `implementation.md` or `implementation-r
14
14
  - Create a new implementation artifact for each round and never overwrite an older one
15
15
  - After executing this skill, you **must** immediately update task.md
16
16
 
17
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
18
+
19
+ ## Common Rationalizations and Rebuttals
20
+
21
+ Before implementing, stop if any of these thoughts appear. They are violations:
22
+
23
+ | Rationalization | Rebuttal |
24
+ |------|------|
25
+ | "The code is too simple to need tests." | Simple code still regresses; without a failing-to-passing case there is no completion signal, so write a test that verifies business behavior first. |
26
+ | "Writing code first and adding tests later is faster." | Tests added after implementation often mirror the implementation; goal-driven work defines the verifiable case first and then makes it pass. |
27
+ | "This plan is flawed, so I will improve it as I go." | Deviations from `{plan-artifact}` must be recorded in the report; if the direction is questionable, stop and confirm instead of changing it silently. |
28
+ | "The tests passed, so I can commit this too." | This skill never runs `git add` or `git commit`; committing is a separate step explicitly requested by the user. |
29
+
17
30
  ## Steps
18
31
 
19
32
  ### 1. Verify Prerequisites
@@ -62,7 +75,8 @@ Read `{plan-artifact}` carefully and extract:
62
75
 
63
76
  Follow `.agents/workflows/feature-development.yaml` and the plan in order.
64
77
 
65
- > Detailed implementation rules, testing discipline, and deviation handling live in `reference/implementation-rules.md`. Read `reference/implementation-rules.md` before executing this step.
78
+ > Detailed implementation rules, the test execution loop, and deviation handling live in `reference/implementation-rules.md`. Read `reference/implementation-rules.md` before executing this step.
79
+ > Test-writing discipline (RED-GREEN-REFACTOR and anti-patterns) lives in `.agents/rules/testing-discipline.md`; read it before adding or changing tests.
66
80
 
67
81
  ### 7. Run Test Verification
68
82
 
@@ -88,6 +102,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
88
102
  - `current_step`: implementation
89
103
  - `assigned_to`: {current agent}
90
104
  - `updated_at`: {current time}
105
+ - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
91
106
  - 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
107
  - record `{implementation-artifact}` for Round `{implementation-round}`
93
108
  - append:
@@ -14,6 +14,19 @@ description: "根据技术方案实施任务并输出报告"
14
14
  - 每轮实现都创建新的实现产物,不覆盖旧文件
15
15
  - 执行本技能后,你**必须**立即更新 task.md
16
16
 
17
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
18
+
19
+ ## 常见违规借口与反驳
20
+
21
+ 动手实现前,若冒出以下念头,先停下——它们都是违规借口:
22
+
23
+ | 借口 | 反驳 |
24
+ |------|------|
25
+ | 「代码太简单,不需要测试」 | 简单代码也会回归;没有"失败→通过"的用例就没有完成标志,先写验证业务行为的测试。 |
26
+ | 「先写代码再补测试更高效」 | 后补测试常沦为对实现的镜像;目标驱动应先定义可验证用例再让它通过。 |
27
+ | 「方案这里不合理,顺手改更好」 | 偏离 `{plan-artifact}` 必须在报告中记录原因;有异议先停下确认,不擅自改方向。 |
28
+ | 「测试过了,顺便提交一下」 | 本技能绝不执行 `git add`/`git commit`,提交是用户显式发起的独立步骤。 |
29
+
17
30
  ## 执行步骤
18
31
 
19
32
  ### 1. 验证前置条件
@@ -62,7 +75,8 @@ description: "根据技术方案实施任务并输出报告"
62
75
 
63
76
  按照 `.agents/workflows/feature-development.yaml` 和方案顺序实施。
64
77
 
65
- > 详细实现规则、测试纪律和偏离处理见 `reference/implementation-rules.md`。执行此步骤前,先读取 `reference/implementation-rules.md`。
78
+ > 详细实现规则、测试执行循环和偏离处理见 `reference/implementation-rules.md`。执行此步骤前,先读取 `reference/implementation-rules.md`。
79
+ > 测试编写纪律(RED-GREEN-REFACTOR 与反模式)见 `.agents/rules/testing-discipline.md`;新增或调整测试前先读取该文件。
66
80
 
67
81
  ### 7. 运行测试验证
68
82
 
@@ -88,6 +102,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
88
102
  - `current_step`:implementation
89
103
  - `assigned_to`:{当前代理}
90
104
  - `updated_at`:{当前时间}
105
+ - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
91
106
  - 审查 `## 需求` 段落,仅把本轮已由代码实现且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
92
107
  - 记录 Round `{implementation-round}` 的 `{implementation-artifact}`
93
108
  - 追加:
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ],
@@ -36,6 +37,7 @@
36
37
  "verify_comment_content": true,
37
38
  "verify_task_comment_content": true,
38
39
  "verify_issue_type": true,
40
+ "verify_issue_fields": false,
39
41
  "verify_milestone": true,
40
42
  "expected_status_label_key": "inProgress",
41
43
  "expected_comment_marker_key": "artifact"
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ],
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ],
@@ -69,11 +69,18 @@ workflow: feature-development|bug-fix|refactoring
69
69
  status: active
70
70
  created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
71
71
  updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
72
+ agent_infra_version: {agent_infra_version}
72
73
  created_by: human
74
+ priority: # optional; preserve source/frontmatter value when available
75
+ effort: # optional; preserve source/frontmatter value when available
76
+ start_date: # optional; preserve explicit YYYY-MM-DD when available
77
+ target_date: # optional; preserve explicit YYYY-MM-DD when available
73
78
  current_step: requirement-analysis
74
79
  assigned_to: {current AI agent}
75
80
  ```
76
81
 
82
+ Optional Issue field metadata should preserve recovered or explicit source values. If absent, leave it empty; do not invent dates.
83
+
77
84
  3.3 Append Activity Log entries.
78
85
 
79
86
  - Scenario B: append `Import Issue`
@@ -91,6 +98,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
91
98
  - `current_step`: requirement-analysis
92
99
  - `assigned_to`: {current AI agent}
93
100
  - `updated_at`: {current time}
101
+ - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
94
102
  - `## Context` -> `- **Branch**:`: update it to the generated branch name
95
103
  - **Append** to `## Activity Log` (do NOT overwrite previous entries):
96
104
  ```
@@ -162,6 +170,8 @@ Next step - run requirements analysis:
162
170
 
163
171
  After completing the checklist, **stop immediately**. Do not continue to later steps.
164
172
 
173
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
174
+
165
175
  ## Notes
166
176
 
167
177
  1. **Issue validation**: verify that the Issue exists before continuing
@@ -69,11 +69,18 @@ workflow: feature-development|bug-fix|refactoring
69
69
  status: active
70
70
  created_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
71
71
  updated_at: {YYYY-MM-DD HH:mm:ss±HH:MM}
72
+ agent_infra_version: {agent_infra_version}
72
73
  created_by: human
74
+ priority: # 可选;有来源/frontmatter 值时保留
75
+ effort: # 可选;有来源/frontmatter 值时保留
76
+ start_date: # 可选;有明确 YYYY-MM-DD 时保留
77
+ target_date: # 可选;有明确 YYYY-MM-DD 时保留
73
78
  current_step: requirement-analysis
74
79
  assigned_to: {当前 AI 代理}
75
80
  ```
76
81
 
82
+ 可选 Issue 字段元数据应保留恢复得到或来源中明确给出的值。缺失时留空;不要臆测日期。
83
+
77
84
  3.3 追加 Activity Log。
78
85
 
79
86
  - 场景 B:追加 `Import Issue`
@@ -91,6 +98,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
91
98
  - `current_step`:requirement-analysis
92
99
  - `assigned_to`:{当前 AI 代理}
93
100
  - `updated_at`:{当前时间}
101
+ - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
94
102
  - `## 上下文` 中的 `- **分支**:`:更新为生成的分支名
95
103
  - **追加**到 `## Activity Log`(不要覆盖之前的记录):
96
104
  ```
@@ -162,6 +170,8 @@ Issue #{number} 已导入。
162
170
 
163
171
  完成检查清单后,**立即停止**。不要继续执行后续步骤。
164
172
 
173
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
174
+
165
175
  ## 注意事项
166
176
 
167
177
  1. **Issue 验证**:在继续之前检查 Issue 是否存在
@@ -10,6 +10,7 @@
10
10
  "status",
11
11
  "created_at",
12
12
  "updated_at",
13
+ "agent_infra_version",
13
14
  "current_step",
14
15
  "assigned_to"
15
16
  ],
@@ -11,6 +11,8 @@ description: "Design a technical plan for a task"
11
11
  - This is a **mandatory human review checkpoint**; do not automatically proceed to implementation
12
12
  - After executing this skill, you **must** immediately update task status in task.md
13
13
 
14
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
15
+
14
16
  ## Steps
15
17
 
16
18
  ### 1. Verify Prerequisites
@@ -88,6 +90,7 @@ Update `.agents/workspace/active/{task-id}/task.md`:
88
90
  - `current_step`: technical-design
89
91
  - `assigned_to`: {current AI agent}
90
92
  - `updated_at`: {current time}
93
+ - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
91
94
  - Record the plan artifact for this round: `{plan-artifact}` (Round `{plan-round}`)
92
95
  - If the task template contains a `## Design` section, update it to link to `{plan-artifact}`
93
96
  - Mark technical-design as complete in workflow progress and include the actual round when the task template supports it
@@ -11,6 +11,8 @@ description: "为任务设计技术方案和实施计划"
11
11
  - 这是一个**强制性的人工审查检查点** —— 不要自动进入实现阶段
12
12
  - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
13
13
 
14
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
15
+
14
16
  ## 执行步骤
15
17
 
16
18
  ### 1. 验证前置条件
@@ -88,6 +90,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
88
90
  - `current_step`:technical-design
89
91
  - `assigned_to`:{当前 AI 代理}
90
92
  - `updated_at`:{当前时间}
93
+ - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
91
94
  - 记录本轮方案产物:`{plan-artifact}`(Round `{plan-round}`)
92
95
  - 如任务模板包含 `## 设计` 段落,更新为指向 `{plan-artifact}` 的链接
93
96
  - 在工作流进度中标记 technical-design 为已完成,并注明实际轮次(如果任务模板支持)
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ],
@@ -38,6 +39,7 @@
38
39
  "verify_comment_content": true,
39
40
  "verify_task_comment_content": true,
40
41
  "verify_issue_type": true,
42
+ "verify_issue_fields": false,
41
43
  "verify_milestone": true,
42
44
  "expected_status_label_key": "pendingDesignWork",
43
45
  "expected_comment_marker_key": "artifact"
@@ -10,9 +10,20 @@ Fix review findings and produce `refinement.md` or `refinement-r{N}.md`.
10
10
  ## Boundary / Critical Rules
11
11
 
12
12
  - Fix only the issues documented in review artifacts
13
+ - env-blocked findings are outside the repair scope: the refinement report must preserve them and record "outside AI repair scope (environment-blocked)" instead of making no-op edits to clear the report
13
14
  - Never auto-run `git add` or `git commit`
14
15
  - After executing this skill, you **must** immediately update task.md
15
16
 
17
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
18
+
19
+ ## Common Rationalizations and Rebuttals
20
+
21
+ | Rationalization | Rebuttal |
22
+ |------|------|
23
+ | "This review comment is wrong, so I will ignore it." | If you disagree, record the reason under unresolved issues in the report; do not silently skip blocker or major findings. |
24
+ | "I can clean up nearby code while I am here." | Scope is limited to review findings; changes outside that scope are out of bounds. |
25
+ | "Clearing env-blocked items makes the report look better." | env-blocked findings are outside the repair scope; preserve and label them truthfully, and never use no-op edits to pad the fix count. |
26
+
16
27
  ## Steps
17
28
 
18
29
  ### 1. Verify Prerequisites
@@ -56,8 +67,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
56
67
 
57
68
  Update task.md:
58
69
  - review the `## Requirements` section and only change items from `- [ ]` to `- [x]` when they are newly satisfied by this round's fixes and passing tests
70
+ - preserve explicit optional Issue field metadata (`priority`, `effort`, `start_date`, `target_date`); only infer `priority` or `effort` from clear review context, and do not invent dates
59
71
  - append:
60
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}`
72
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} env-blocked] → {refinement-artifact}`
73
+
74
+ Append `, skipped {n} env-blocked` when env-blocked > 0; omit it when env-blocked = 0.
61
75
 
62
76
  If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
63
77
  - Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
@@ -10,9 +10,20 @@ description: "处理代码审查反馈并修复问题"
10
10
  ## 行为边界 / 关键规则
11
11
 
12
12
  - 只修复审查产物中记录的问题
13
+ - env-blocked 项不在修复范围内:refinement 报告必须如实保留这些项并记录“不在 AI 修复范围(环境性遗留)”,不能为了清空报告做 no-op 改动
13
14
  - 绝不自动执行 `git add` 或 `git commit`
14
15
  - 执行本技能后,你**必须**立即更新 task.md
15
16
 
17
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
18
+
19
+ ## 常见违规借口与反驳
20
+
21
+ | 借口 | 反驳 |
22
+ |------|------|
23
+ | 「这条审查意见不合理,直接忽略」 | 不同意要在报告的未解决问题中写明理由,不能静默跳过 blocker/major。 |
24
+ | 「顺手把旁边也优化了」 | 范围严格限定在审查项内,范围外改动属于越界。 |
25
+ | 「env-blocked 项清掉报告好看」 | env-blocked 不在修复范围,必须如实保留并标注,禁止 no-op 改动充数。 |
26
+
16
27
  ## 执行步骤
17
28
 
18
29
  ### 1. 验证前置条件
@@ -56,8 +67,11 @@ date "+%Y-%m-%d %H:%M:%S%:z"
56
67
 
57
68
  更新 task.md:
58
69
  - 审查 `## 需求` 段落,仅把因本轮修复而新满足且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
70
+ - 保留明确填写的可选 Issue 字段元数据(`priority`、`effort`、`start_date`、`target_date`);仅在审查上下文非常明确时推断 `priority` 或 `effort`,不要臆测日期
59
71
  - 追加:
60
- `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}`
72
+ `- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues[, skipped {n} env-blocked] → {refinement-artifact}`
73
+
74
+ env-blocked > 0 时附加 `, skipped {n} env-blocked`;env-blocked = 0 时省略。
61
75
 
62
76
  如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
63
77
  - 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ]
@@ -32,6 +33,7 @@
32
33
  "verify_comment_content": true,
33
34
  "verify_task_comment_content": true,
34
35
  "verify_issue_type": true,
36
+ "verify_issue_fields": false,
35
37
  "verify_milestone": true,
36
38
  "expected_status_label_key": "inProgress",
37
39
  "expected_comment_marker_key": "artifact"
@@ -20,6 +20,14 @@ Detailed priority rules:
20
20
  - Minor issues are optional only after Blockers and Majors are resolved
21
21
  - If you disagree with a finding, record that disagreement under unresolved issues instead of silently skipping it
22
22
 
23
+ ### Meta-category: env-blocked
24
+
25
+ env-blocked findings are outside the repair scope. Handling rules:
26
+ - do not write code changes for these findings
27
+ - list them unchanged in the refinement report's "Environment-Blocked Handling" section and mark them "outside AI repair scope"
28
+ - do not repeat them under unresolved issues, to avoid visually double-counting them
29
+ - their destination is the PR description, where maintainers carry them as a "manual verification required" checklist
30
+
23
31
  ## Execute the Fixes
24
32
 
25
33
  For each fix:
@@ -51,6 +59,7 @@ Refinement status:
51
59
  - Blockers fixed: {fixed-blockers}/{total-blockers}
52
60
  - Major issues fixed: {fixed-majors}/{total-majors}
53
61
  - Minor issues fixed: {fixed-minors}/{total-minors}
62
+ - [If env-blocked > 0] env-blocked skipped: {count}
54
63
  - All tests passing: {yes/no}
55
64
  - Review input: {review-artifact}
56
65
  - Refinement artifact: {refinement-artifact}
@@ -20,6 +20,14 @@
20
20
  - 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
21
21
  - 如果你不同意某条审查意见,不要静默跳过,而是把分歧记录到 unresolved issues
22
22
 
23
+ ### 元类目:env-blocked
24
+
25
+ env-blocked 项不在修复范围。处理规则:
26
+ - 不要为这些项编写代码改动
27
+ - 在 refinement 报告的「环境性遗留处理」段落原样列出,标注「不在 AI 修复范围」
28
+ - 不要在 unresolved 段落里重复列出(避免视觉计数翻倍)
29
+ - 这些项的去向:维护者在 PR description 中以「待人工验证」清单承接
30
+
23
31
  ## 执行修复
24
32
 
25
33
  对每一项修复:
@@ -51,6 +59,7 @@
51
59
  - 阻塞项修复:{数量}/{总数}
52
60
  - 主要问题修复:{数量}/{总数}
53
61
  - 次要问题修复:{数量}/{总数}
62
+ - [如 env-blocked > 0] 环境性遗留跳过:{数量}
54
63
  - 所有测试通过:{是/否}
55
64
  - 审查输入:{review-artifact}
56
65
  - 修复产物:{refinement-artifact}
@@ -29,6 +29,17 @@ Use this structure when writing `refinement.md` or `refinement-r{N}.md`.
29
29
  1. **{issue-title}**
30
30
  - **Fix**: {what changed}
31
31
 
32
+ #### Environment-Blocked Handling
33
+
34
+ > These findings are outside AI repair scope and do not count toward repair totals. Preserve them unchanged and identify the maintainer verification path.
35
+
36
+ 1. **{issue-title}**
37
+ - **Status**: skipped (outside AI repair scope)
38
+ - **Required Environment**: {e.g. Docker sandbox / macOS host / third-party account}
39
+ - **Maintainer Verification Steps**: {steps}
40
+
41
+ > If this round has no env-blocked findings, keep the subsection heading and write "None".
42
+
32
43
  #### Unresolved Issues
33
44
  - {issue}: {reason}
34
45
 
@@ -29,6 +29,17 @@
29
29
  1. **{issue-title}**
30
30
  - **修复**: {what changed}
31
31
 
32
+ #### 环境性遗留处理
33
+
34
+ > 这些项不在 AI 修复范围;不计入修复总数。仅原样保留并指明维护者后续验证路径。
35
+
36
+ 1. **{issue-title}**
37
+ - **状态**:跳过(不在 AI 修复范围)
38
+ - **所需环境**:{e.g. Docker 沙箱 / macOS host / 第三方账号}
39
+ - **维护者验证步骤**:{steps}
40
+
41
+ > 如本轮无 env-blocked 项,保留小节标题并写「(无)」。
42
+
32
43
  #### 未解决问题
33
44
  - {issue}: {reason}
34
45
 
@@ -14,6 +14,8 @@ Restore local task workspace files from platform Issue comments that contain syn
14
14
  - Stop immediately if the target directory already exists and ask the user to resolve the conflict first
15
15
  - After executing this skill, you **must** immediately update the restored `task.md`
16
16
 
17
+ Version stamp rule: when creating or updating `task.md` frontmatter, read `.agents/rules/version-stamp.md` first and write or refresh `agent_infra_version`.
18
+
17
19
  ## Steps
18
20
 
19
21
  ### 1. Verify Input and Environment
@@ -83,6 +85,7 @@ Update the restored `task.md`:
83
85
  - `status`: `active`
84
86
  - `assigned_to`: {current AI agent}
85
87
  - `updated_at`: {current time}
88
+ - `agent_infra_version`: value from `.agents/rules/version-stamp.md`
86
89
 
87
90
  Append an Activity Log entry indicating the task was restored from the platform Issue.
88
91
 
@@ -14,6 +14,8 @@ description: "从平台 Issue 评论还原本地任务文件"
14
14
  - 如果目标目录已存在,立即停止并提示用户先处理目录冲突
15
15
  - 执行本技能后,你**必须**立即更新恢复出的 `task.md`
16
16
 
17
+ 版本戳规则:创建或更新 `task.md` frontmatter 时,先读取 `.agents/rules/version-stamp.md`,并写入或刷新 `agent_infra_version`。
18
+
17
19
  ## 执行步骤
18
20
 
19
21
  ### 1. 验证输入与环境
@@ -83,6 +85,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
83
85
  - `status`:`active`
84
86
  - `assigned_to`:{当前 AI 代理}
85
87
  - `updated_at`:{当前时间}
88
+ - `agent_infra_version`:按 `.agents/rules/version-stamp.md` 取值
86
89
 
87
90
  追加 Activity Log,说明任务已从平台 Issue 还原。
88
91
 
@@ -9,6 +9,7 @@
9
9
  "status",
10
10
  "created_at",
11
11
  "updated_at",
12
+ "agent_infra_version",
12
13
  "current_step",
13
14
  "assigned_to"
14
15
  ],