@fitlab-ai/agent-infra 0.3.2 → 0.4.0

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 (85) hide show
  1. package/README.md +18 -33
  2. package/README.zh-CN.md +18 -33
  3. package/lib/defaults.json +3 -12
  4. package/lib/init.js +13 -24
  5. package/lib/paths.js +3 -42
  6. package/lib/update.js +98 -32
  7. package/package.json +2 -1
  8. package/templates/.agents/QUICKSTART.md +7 -7
  9. package/templates/.agents/QUICKSTART.zh-CN.md +7 -7
  10. package/templates/.agents/README.md +4 -4
  11. package/templates/.agents/README.zh-CN.md +4 -4
  12. package/templates/.agents/skills/analyze-task/SKILL.md +6 -6
  13. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
  14. package/templates/.agents/skills/block-task/SKILL.md +8 -8
  15. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -8
  16. package/templates/.agents/skills/check-task/SKILL.md +3 -3
  17. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +3 -3
  18. package/templates/.agents/skills/commit/SKILL.md +1 -1
  19. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  20. package/templates/.agents/skills/complete-task/SKILL.md +7 -7
  21. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +7 -7
  22. package/templates/.agents/skills/create-issue/SKILL.md +2 -2
  23. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +2 -2
  24. package/templates/.agents/skills/create-pr/SKILL.md +1 -1
  25. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +1 -1
  26. package/templates/.agents/skills/create-task/SKILL.md +4 -4
  27. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +4 -4
  28. package/templates/.agents/skills/implement-task/SKILL.md +8 -8
  29. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +8 -8
  30. package/templates/.agents/skills/import-codescan/SKILL.md +1 -1
  31. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  32. package/templates/.agents/skills/import-dependabot/SKILL.md +3 -3
  33. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
  34. package/templates/.agents/skills/import-issue/SKILL.md +5 -5
  35. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
  36. package/templates/.agents/skills/plan-task/SKILL.md +6 -6
  37. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +6 -6
  38. package/templates/.agents/skills/refine-task/SKILL.md +3 -3
  39. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +3 -3
  40. package/templates/.agents/skills/release/SKILL.md +55 -14
  41. package/templates/.agents/skills/release/SKILL.zh-CN.md +55 -14
  42. package/templates/.agents/skills/review-task/SKILL.md +9 -9
  43. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +9 -9
  44. package/templates/.agents/skills/sync-issue/SKILL.md +8 -8
  45. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +8 -8
  46. package/templates/.agents/skills/sync-pr/SKILL.md +3 -3
  47. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +3 -3
  48. package/templates/.agents/skills/update-agent-infra/SKILL.md +6 -6
  49. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -6
  50. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +61 -116
  51. package/templates/.agents/templates/handoff.md +1 -1
  52. package/templates/.agents/templates/handoff.zh-CN.md +1 -1
  53. package/templates/.agents/workflows/bug-fix.yaml +71 -71
  54. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  55. package/templates/.agents/workflows/feature-development.yaml +71 -71
  56. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  57. package/templates/.agents/workflows/refactoring.yaml +76 -76
  58. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  59. package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
  60. package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
  61. package/templates/.claude/CLAUDE.md +1 -1
  62. package/templates/.claude/CLAUDE.zh-CN.md +1 -1
  63. package/templates/.claude/hooks/check-version-format.sh +44 -0
  64. package/templates/.claude/settings.json +14 -0
  65. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
  66. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
  67. package/templates/AGENTS.md +1 -1
  68. package/templates/AGENTS.zh-CN.md +1 -1
  69. package/templates/.editorconfig +0 -15
  70. package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
  71. package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
  72. package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
  73. package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
  74. package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
  75. package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
  76. package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
  77. package/templates/.github/dependabot.yml +0 -17
  78. package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
  79. package/templates/.github/release.yml +0 -27
  80. package/templates/.github/workflows/pr-title-check.yml +0 -42
  81. package/templates/.mailmap +0 -4
  82. package/templates/CONTRIBUTING.md +0 -126
  83. package/templates/CONTRIBUTING.zh-CN.md +0 -124
  84. package/templates/SECURITY.md +0 -131
  85. package/templates/SECURITY.zh-CN.md +0 -131
@@ -30,7 +30,26 @@ git status --short
30
30
 
31
31
  如果有未提交的变更,报错:"Workspace has uncommitted changes. Please commit or stash first."
32
32
 
33
- ### 步骤 3:更新版本引用
33
+ ### 步骤 3:发布前验证
34
+
35
+ <!-- TODO: 替换为你的项目发布前验证步骤 -->
36
+
37
+ 运行所有在准备发布前必须通过的检查:
38
+
39
+ ```bash
40
+ git branch --show-current
41
+ # TODO: 替换为你的项目测试/构建验证命令
42
+ ```
43
+
44
+ 验证要求:
45
+ - 确认发布使用的是项目规定的分支
46
+ - 运行你的发布流程要求的完整校验命令
47
+
48
+ 处理规则:
49
+ - 如果当前分支不符合预期,按项目策略输出警告或直接退出
50
+ - 如果任何验证命令失败,停止发布流程并先修复问题
51
+
52
+ ### 步骤 4:更新版本引用
34
53
 
35
54
  <!-- TODO: 替换为你的项目版本更新步骤 -->
36
55
 
@@ -44,6 +63,7 @@ git status --short
44
63
 
45
64
  **常见需要更新的文件**:
46
65
  - `package.json`(Node.js)
66
+ - `package-lock.json`(Node.js;更新 `package.json` 后运行 `npm install --package-lock-only` 同步锁文件)
47
67
  - `pom.xml`(Maven)
48
68
  - `setup.py` / `pyproject.toml`(Python)
49
69
  - `version.go`(Go)
@@ -51,22 +71,39 @@ git status --short
51
71
  - `SECURITY.md` / `SECURITY.zh-CN.md`(支持版本表格)
52
72
 
53
73
  **排除以下目录的版本替换**:
54
- - `.agents/`、`.agent-workspace/`、`.claude/`、`.codex/`、`.gemini/`、`.opencode/`(AI 工具配置)
74
+ - `.agents/`、`.agents/workspace/`、`.claude/`、`.codex/`、`.gemini/`、`.opencode/`(AI 工具配置)
75
+
76
+ 如果项目使用 `package-lock.json`,在更新 `package.json` 后运行 `npm install --package-lock-only`,确保锁文件中的版本号保持同步。
77
+
78
+ ### 步骤 5:重新生成构建产物
55
79
 
56
- ### 步骤 4:创建发布提交
80
+ <!-- TODO: 替换为你的项目产物重建步骤 -->
81
+
82
+ 如果版本更新会影响生成文件、内嵌元数据或打包产物,现在重新生成它们:
83
+
84
+ ```bash
85
+ # TODO: 替换为你的项目构建/重建命令
86
+ ```
87
+
88
+ 执行要求:
89
+ - 在更新版本引用后运行,确保生成产物使用最新版本号
90
+ - 如果项目没有生成产物,请在项目特化版本中明确说明
91
+ - 如果重建失败,停止发布流程并先修复构建问题
92
+
93
+ ### 步骤 6:创建发布提交
57
94
 
58
95
  ```bash
59
96
  git add -A
60
97
  git commit -m "chore: release v{version}"
61
98
  ```
62
99
 
63
- ### 步骤 5:创建 Git 标签
100
+ ### 步骤 7:创建 Git 标签
64
101
 
65
102
  ```bash
66
103
  git tag v{version}
67
104
  ```
68
105
 
69
- ### 步骤 6:管理里程碑
106
+ ### 步骤 8:管理里程碑
70
107
 
71
108
  为已发布版本关闭对应版本里程碑,并为下一轮创建缺失的规划里程碑。
72
109
 
@@ -83,7 +120,7 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
83
120
  - 当 `PATCH=0` 时,同时确保 `{MAJOR}.{MINOR+1}.0` 与 `{MAJOR}.{MINOR+1}.x`
84
121
  - 输出包含已发布里程碑动作和新建数量的汇总
85
122
 
86
- ### 步骤 7:输出摘要
123
+ ### 步骤 9:输出摘要
87
124
 
88
125
  > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
89
126
 
@@ -99,12 +136,12 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
99
136
 
100
137
  下一步(手动执行):
101
138
 
102
- 1. 推送标签:
103
- git push origin v{version}
104
-
105
- 2. 推送分支:
139
+ 1. 推送分支:
106
140
  git push origin {current-branch}
107
141
 
142
+ 2. 推送标签:
143
+ git push origin v{version}
144
+
108
145
  3.(可选)生成发布说明:
109
146
  - Claude Code / OpenCode:/create-release-note {version}
110
147
  - Gemini CLI:/{{project}}:create-release-note {version}
@@ -129,13 +166,17 @@ git checkout -- .
129
166
 
130
167
  1. **需要干净的工作区**:必须没有未提交的变更
131
168
  2. **不自动推送**:所有操作仅在本地执行;用户手动推送
132
- 3. **不验证构建**:发布前执行 test 技能进行验证
133
- 4. **版本替换范围**:通过搜索确定需要更新哪些文件;排除 AI 工具目录
134
- 5. **适配你的项目**:以上版本更新步骤是通用的;请根据你的项目版本方案进行定制
135
- 6. **里程碑联动**:发布时自动创建下一轮里程碑;如果里程碑体系未初始化,建议先运行 `init-milestones`
169
+ 3. **发布前验证**:将步骤 3 的 TODO 替换为你的项目所需的分支、测试和验证命令
170
+ 4. **生成产物**:如果版本变化会影响生成文件、打包产物或内嵌元数据,需要将步骤 5 的 TODO 替换为实际命令
171
+ 5. **发布自动化**:如果推送标签会触发 CI/CD 或包发布,请先确认所需凭据和流水线配置
172
+ 6. **版本替换范围**:通过搜索确定需要更新哪些文件;排除 AI 工具目录
173
+ 7. **适配你的项目**:以上版本更新和产物重建步骤是通用的;请根据你的项目版本方案进行定制
174
+ 8. **里程碑联动**:发布时自动创建下一轮里程碑;如果里程碑体系未初始化,建议先运行 `init-milestones`
136
175
 
137
176
  ## 错误处理
138
177
 
139
178
  - 版本格式无效:提示正确格式并退出
140
179
  - 工作区不干净:提示提交或暂存
180
+ - 验证失败:显示失败的检查并停止发布流程
181
+ - 产物重建失败:显示构建错误并停止发布流程
141
182
  - Git 操作失败:显示错误并提供回滚说明
@@ -18,7 +18,7 @@ description: >
18
18
  ### 1. Verify Prerequisites
19
19
 
20
20
  Check required files:
21
- - `.agent-workspace/active/{task-id}/task.md` - Task file
21
+ - `.agents/workspace/active/{task-id}/task.md` - Task file
22
22
  - At least one implementation report: `implementation.md` or `implementation-r{N}.md`
23
23
 
24
24
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
@@ -27,7 +27,7 @@ If either file is missing, prompt the user to complete the prerequisite step fir
27
27
 
28
28
  ### 2. Determine Review Round
29
29
 
30
- Scan review artifacts in `.agent-workspace/active/{task-id}/`:
30
+ Scan review artifacts in `.agents/workspace/active/{task-id}/`:
31
31
  - If neither `review.md` nor `review-r*.md` exists -> this is Round 1 and must create `review.md`
32
32
  - If `review.md` exists and no `review-r*.md` exists -> this is Round 2 and must create `review-r2.md`
33
33
  - If `review-r{N}.md` exists -> this is Round N+1 and must create `review-r{N+1}.md`
@@ -56,7 +56,7 @@ Follow the `code-review` step in `.agents/workflows/feature-development.yaml`:
56
56
  **Required review areas**:
57
57
  - [ ] Code quality and coding standards (per project instructions)
58
58
  - [ ] Bug and risk detection
59
- - [ ] Test coverage and test quality
59
+ - [ ] Test coverage and test quality (when a feature is removed, verify that test fixtures and assertions for that feature are also removed — not mechanically flipped; assertions that only confirm data passes through unchanged are not valid tests)
60
60
  - [ ] Error handling and edge cases
61
61
  - [ ] Performance and security concerns
62
62
  - [ ] Code comments and documentation
@@ -72,7 +72,7 @@ Also review `git diff` to inspect the full context of all changes.
72
72
 
73
73
  ### 5. Output Review Report
74
74
 
75
- Create `.agent-workspace/active/{task-id}/{review-artifact}`.
75
+ Create `.agents/workspace/active/{task-id}/{review-artifact}`.
76
76
 
77
77
  ### 6. Update Task Status
78
78
 
@@ -82,7 +82,7 @@ Get the current time:
82
82
  date "+%Y-%m-%d %H:%M:%S"
83
83
  ```
84
84
 
85
- Update `.agent-workspace/active/{task-id}/task.md`:
85
+ Update `.agents/workspace/active/{task-id}/task.md`:
86
86
  - `current_step`: code-review
87
87
  - `assigned_to`: {reviewer}
88
88
  - `updated_at`: {current time}
@@ -123,7 +123,7 @@ Next step - commit changes:
123
123
  ```
124
124
  Code review complete for task {task-id}. Verdict: Approved.
125
125
  - Blockers: 0 | Major issues: {n} | Minor issues: {n}
126
- - Review report: .agent-workspace/active/{task-id}/{review-artifact}
126
+ - Review report: .agents/workspace/active/{task-id}/{review-artifact}
127
127
 
128
128
  Next step - fix issues before commit (recommended):
129
129
  - Claude Code / OpenCode: /refine-task {task-id}
@@ -140,7 +140,7 @@ Or commit directly (skip fixes):
140
140
  ```
141
141
  Code review complete for task {task-id}. Verdict: Changes Requested.
142
142
  - Blockers: {n} | Major issues: {n} | Minor issues: {n}
143
- - Review report: .agent-workspace/active/{task-id}/{review-artifact}
143
+ - Review report: .agents/workspace/active/{task-id}/{review-artifact}
144
144
 
145
145
  Next step - refine the issues:
146
146
  - Claude Code / OpenCode: /refine-task {task-id}
@@ -151,7 +151,7 @@ Next step - refine the issues:
151
151
  **📋 Output Branch D - Rejected** (Condition: major rework, redesign, or re-implementation is required):
152
152
  ```
153
153
  Code review complete for task {task-id}. Verdict: Rejected, major rework required.
154
- - Review report: .agent-workspace/active/{task-id}/{review-artifact}
154
+ - Review report: .agents/workspace/active/{task-id}/{review-artifact}
155
155
 
156
156
  Next step - re-implement:
157
157
  - Claude Code / OpenCode: /implement-task {task-id}
@@ -264,7 +264,7 @@ Next step - re-implement:
264
264
  ## Completion Checklist
265
265
 
266
266
  - [ ] Completed code review for all modified files
267
- - [ ] Created review report `.agent-workspace/active/{task-id}/{review-artifact}`
267
+ - [ ] Created review report `.agents/workspace/active/{task-id}/{review-artifact}`
268
268
  - [ ] Updated `current_step` to code-review in task.md
269
269
  - [ ] Updated `updated_at` to the current time in task.md
270
270
  - [ ] Updated `assigned_to` to the reviewer name in task.md
@@ -17,7 +17,7 @@ description: >
17
17
  ### 1. 验证前置条件
18
18
 
19
19
  检查必要文件:
20
- - `.agent-workspace/active/{task-id}/task.md` - 任务文件
20
+ - `.agents/workspace/active/{task-id}/task.md` - 任务文件
21
21
  - 至少一个实现报告:`implementation.md` 或 `implementation-r{N}.md`
22
22
 
23
23
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
@@ -26,7 +26,7 @@ description: >
26
26
 
27
27
  ### 2. 确定审查轮次
28
28
 
29
- 扫描 `.agent-workspace/active/{task-id}/` 目录中的审查产物文件:
29
+ 扫描 `.agents/workspace/active/{task-id}/` 目录中的审查产物文件:
30
30
  - 如果不存在 `review.md` 且不存在 `review-r*.md` → 本轮为第 1 轮,产出 `review.md`
31
31
  - 如果存在 `review.md` 且不存在 `review-r*.md` → 本轮为第 2 轮,产出 `review-r2.md`
32
32
  - 如果存在 `review-r{N}.md` → 本轮为第 N+1 轮,产出 `review-r{N+1}.md`
@@ -55,7 +55,7 @@ description: >
55
55
  **必要审查领域**:
56
56
  - [ ] 代码质量和编码规范(按项目指南)
57
57
  - [ ] Bug 和潜在问题检测
58
- - [ ] 测试覆盖率和测试质量
58
+ - [ ] 测试覆盖率和测试质量(删除功能时,确认为该功能而存在的测试 fixture 和断言已一并删除,而非机械翻转断言方向;仅确认数据原样通过的断言不构成有效测试)
59
59
  - [ ] 错误处理和边界情况
60
60
  - [ ] 性能和安全问题
61
61
  - [ ] 代码注释和文档
@@ -71,7 +71,7 @@ description: >
71
71
 
72
72
  ### 5. 输出审查报告
73
73
 
74
- 创建 `.agent-workspace/active/{task-id}/{review-artifact}`。
74
+ 创建 `.agents/workspace/active/{task-id}/{review-artifact}`。
75
75
 
76
76
  ### 6. 更新任务状态
77
77
 
@@ -81,7 +81,7 @@ description: >
81
81
  date "+%Y-%m-%d %H:%M:%S"
82
82
  ```
83
83
 
84
- 更新 `.agent-workspace/active/{task-id}/task.md`:
84
+ 更新 `.agents/workspace/active/{task-id}/task.md`:
85
85
  - `current_step`:code-review
86
86
  - `assigned_to`:{审查者}
87
87
  - `updated_at`:{当前时间}
@@ -122,7 +122,7 @@ date "+%Y-%m-%d %H:%M:%S"
122
122
  ```
123
123
  任务 {task-id} 代码审查完成。结论:通过。
124
124
  - 阻塞项:0 | 主要问题:{n} | 次要问题:{n}
125
- - 审查报告:.agent-workspace/active/{task-id}/{review-artifact}
125
+ - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
126
126
 
127
127
  下一步 - 修复问题后提交(推荐):
128
128
  - Claude Code / OpenCode:/refine-task {task-id}
@@ -139,7 +139,7 @@ date "+%Y-%m-%d %H:%M:%S"
139
139
  ```
140
140
  任务 {task-id} 代码审查完成。结论:需要修改。
141
141
  - 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
142
- - 审查报告:.agent-workspace/active/{task-id}/{review-artifact}
142
+ - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
143
143
 
144
144
  下一步 - 修复问题:
145
145
  - Claude Code / OpenCode:/refine-task {task-id}
@@ -150,7 +150,7 @@ date "+%Y-%m-%d %H:%M:%S"
150
150
  **📋 输出分支 D — 拒绝**(条件:需要重大返工、重新设计或重新实现):
151
151
  ```
152
152
  任务 {task-id} 代码审查完成。结论:拒绝,需要重大返工。
153
- - 审查报告:.agent-workspace/active/{task-id}/{review-artifact}
153
+ - 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
154
154
 
155
155
  下一步 - 重新实现:
156
156
  - Claude Code / OpenCode:/implement-task {task-id}
@@ -263,7 +263,7 @@ date "+%Y-%m-%d %H:%M:%S"
263
263
  ## 完成检查清单
264
264
 
265
265
  - [ ] 完成了所有修改文件的代码审查
266
- - [ ] 创建了审查报告 `.agent-workspace/active/{task-id}/{review-artifact}`
266
+ - [ ] 创建了审查报告 `.agents/workspace/active/{task-id}/{review-artifact}`
267
267
  - [ ] 更新了 task.md 中的 `current_step` 为 code-review
268
268
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
269
269
  - [ ] 更新了 task.md 中的 `assigned_to` 为审查者名称
@@ -18,17 +18,17 @@ Identify the argument provided by the user:
18
18
  - plain number (`123`) or `#` + number (`#123`) -> treat as an issue number
19
19
  - Starts with `TASK-` -> treat as a task-id (current format)
20
20
 
21
- If the argument is an issue number, use Bash to search for the related task (note: `.agent-workspace` is a hidden directory, so Grep/Glob tools may skip it; you must use Bash):
21
+ If the argument is an issue number, use Bash to search for the related task (note: `.agents/workspace` is a hidden directory, so Grep/Glob tools may skip it; you must use Bash):
22
22
 
23
23
  ```bash
24
24
  grep -rl "^issue_number: {issue-number}$" \
25
- .agent-workspace/active/ \
26
- .agent-workspace/blocked/ \
27
- .agent-workspace/completed/ \
25
+ .agents/workspace/active/ \
26
+ .agents/workspace/blocked/ \
27
+ .agents/workspace/completed/ \
28
28
  2>/dev/null | head -1
29
29
  ```
30
30
 
31
- - If a file path is returned (for example `.agent-workspace/completed/TASK-xxx/task.md`), extract `{task-id}` and the task directory from the path, then continue to Step 2
31
+ - If a file path is returned (for example `.agents/workspace/completed/TASK-xxx/task.md`), extract `{task-id}` and the task directory from the path, then continue to Step 2
32
32
  - If nothing is returned, output `No task found associated with Issue #{issue-number}`
33
33
 
34
34
  If the argument is a task-id, continue with the normal Step 2 flow.
@@ -36,9 +36,9 @@ If the argument is a task-id, continue with the normal Step 2 flow.
36
36
  ### 2. Verify the Task Exists
37
37
 
38
38
  For a `task-id`, search for the task in this order:
39
- - `.agent-workspace/active/{task-id}/task.md`
40
- - `.agent-workspace/blocked/{task-id}/task.md`
41
- - `.agent-workspace/completed/{task-id}/task.md`
39
+ - `.agents/workspace/active/{task-id}/task.md`
40
+ - `.agents/workspace/blocked/{task-id}/task.md`
41
+ - `.agents/workspace/completed/{task-id}/task.md`
42
42
 
43
43
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
44
44
 
@@ -17,17 +17,17 @@ description: >
17
17
  - 纯数字(如 `123`)或 `#` + 数字(如 `#123`)-> 视为 issue number
18
18
  - `TASK-` 开头 -> 视为 task-id(现有格式)
19
19
 
20
- 如果参数是 issue number,使用 Bash 搜索关联任务(注意:`.agent-workspace` 是隐藏目录,Grep/Glob 工具会跳过,必须使用 Bash):
20
+ 如果参数是 issue number,使用 Bash 搜索关联任务(注意:`.agents/workspace` 是隐藏目录,Grep/Glob 工具会跳过,必须使用 Bash):
21
21
 
22
22
  ```bash
23
23
  grep -rl "^issue_number: {issue-number}$" \
24
- .agent-workspace/active/ \
25
- .agent-workspace/blocked/ \
26
- .agent-workspace/completed/ \
24
+ .agents/workspace/active/ \
25
+ .agents/workspace/blocked/ \
26
+ .agents/workspace/completed/ \
27
27
  2>/dev/null | head -1
28
28
  ```
29
29
 
30
- - 如果返回文件路径(如 `.agent-workspace/completed/TASK-xxx/task.md`),从路径中提取 `{task-id}` 和任务目录,继续执行步骤 2
30
+ - 如果返回文件路径(如 `.agents/workspace/completed/TASK-xxx/task.md`),从路径中提取 `{task-id}` 和任务目录,继续执行步骤 2
31
31
  - 如果无返回,提示 `No task found associated with Issue #{issue-number}`
32
32
 
33
33
  如果参数是 task-id,继续执行步骤 2 的现有逻辑。
@@ -35,9 +35,9 @@ grep -rl "^issue_number: {issue-number}$" \
35
35
  ### 2. 验证任务存在
36
36
 
37
37
  对于 `task-id` 路径,按优先顺序搜索任务:
38
- - `.agent-workspace/active/{task-id}/task.md`
39
- - `.agent-workspace/blocked/{task-id}/task.md`
40
- - `.agent-workspace/completed/{task-id}/task.md`
38
+ - `.agents/workspace/active/{task-id}/task.md`
39
+ - `.agents/workspace/blocked/{task-id}/task.md`
40
+ - `.agents/workspace/completed/{task-id}/task.md`
41
41
 
42
42
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
43
43
 
@@ -14,9 +14,9 @@ Sync task progress to the related Pull Request. Argument: task-id.
14
14
  ### 1. Verify the Task Exists
15
15
 
16
16
  Search for the task in this order:
17
- - `.agent-workspace/active/{task-id}/task.md`
18
- - `.agent-workspace/completed/{task-id}/task.md`
19
- - `.agent-workspace/blocked/{task-id}/task.md`
17
+ - `.agents/workspace/active/{task-id}/task.md`
18
+ - `.agents/workspace/completed/{task-id}/task.md`
19
+ - `.agents/workspace/blocked/{task-id}/task.md`
20
20
 
21
21
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
22
22
 
@@ -14,9 +14,9 @@ description: >
14
14
  ### 1. 验证任务存在
15
15
 
16
16
  按优先顺序搜索任务:
17
- - `.agent-workspace/active/{task-id}/task.md`
18
- - `.agent-workspace/completed/{task-id}/task.md`
19
- - `.agent-workspace/blocked/{task-id}/task.md`
17
+ - `.agents/workspace/active/{task-id}/task.md`
18
+ - `.agents/workspace/completed/{task-id}/task.md`
19
+ - `.agents/workspace/blocked/{task-id}/task.md`
20
20
 
21
21
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
22
22
 
@@ -28,12 +28,12 @@ Execute the following command to handle all deterministic steps at once:
28
28
  node .agents/skills/update-agent-infra/scripts/sync-templates.js
29
29
  ```
30
30
 
31
- The script reads `.airc.json` (including `templateSource`, default `templates/`) and automatically performs:
32
- - git pull to fetch latest templates
33
- - File registry sync (`defaults.json` → `.airc.json`)
31
+ The script reads `.agents/.airc.json` (including `templateSource`, default `templates/`) and automatically performs:
32
+ - detect the template source version
33
+ - File registry sync (`defaults.json` → `.agents/.airc.json`)
34
34
  - All managed files (language selection → exclude merged/ejected → placeholder rendering → overwrite)
35
35
  - Ejected files (create only on first install)
36
- - `.airc.json` update (`templateVersion`, file lists)
36
+ - `.agents/.airc.json` update (`templateVersion`, file lists)
37
37
 
38
38
  The script outputs JSON to stdout. Parse and record the report.
39
39
 
@@ -46,14 +46,14 @@ The script outputs JSON to stdout. Parse and record the report.
46
46
  - Each item has `target` (project-relative path) and `template` (template-root-relative path)
47
47
  - `registryAdded`: newly added file registry entries
48
48
  - `selfUpdate`: whether this is a self-update scenario
49
- - `configUpdated`: whether `.airc.json` was updated
49
+ - `configUpdated`: whether `.agents/.airc.json` was updated
50
50
 
51
51
  ## Phase B: Process merged files (AI intelligent merge)
52
52
 
53
53
  Process each item in the report's `merged.pending` list:
54
54
 
55
55
  1. Read the template file from `<templateRoot>/<template>`
56
- 2. Render placeholders: replace double-brace `project` and `org` placeholders with actual values from .airc.json
56
+ 2. Render placeholders: replace double-brace `project` and `org` placeholders with actual values from .agents/.airc.json
57
57
  3. Read the current local file (`<project-root>/<target>`)
58
58
 
59
59
  **If the local file does not exist** (first-time setup), write the rendered
@@ -24,12 +24,12 @@ description: >
24
24
  node .agents/skills/update-agent-infra/scripts/sync-templates.js
25
25
  ```
26
26
 
27
- 脚本读取 `.airc.json`(含 `templateSource`,默认 `templates/`),自动完成:
28
- - git pull 拉取最新模板
29
- - 同步文件注册表(`defaults.json` → `.airc.json`)
27
+ 脚本读取 `.agents/.airc.json`(含 `templateSource`,默认 `templates/`),自动完成:
28
+ - 检测模板源版本
29
+ - 同步文件注册表(`defaults.json` → `.agents/.airc.json`)
30
30
  - 处理所有 managed 文件(语言选择 → 排除 merged/ejected → 占位符渲染 → 覆盖写入)
31
31
  - 处理 ejected 文件(仅首次安装时创建)
32
- - 更新 `.airc.json`(`templateVersion`、文件列表)
32
+ - 更新 `.agents/.airc.json`(`templateVersion`、文件列表)
33
33
 
34
34
  脚本输出 JSON 到 stdout,解析并记录报告内容。
35
35
 
@@ -42,14 +42,14 @@ node .agents/skills/update-agent-infra/scripts/sync-templates.js
42
42
  - 每项包含 `target`(项目中的目标路径)和 `template`(模板根目录下的相对路径)
43
43
  - `registryAdded`:新增的文件注册条目
44
44
  - `selfUpdate`:是否为自更新模式
45
- - `configUpdated`:`.airc.json` 是否已更新
45
+ - `configUpdated`:`.agents/.airc.json` 是否已更新
46
46
 
47
47
  ## 阶段 B:处理 merged 文件(AI 智能合并)
48
48
 
49
49
  根据报告中 `merged.pending` 列表,逐个文件处理。对于每个条目:
50
50
 
51
51
  1. 从 `<templateRoot>/<template>` 读取模板文件
52
- 2. 渲染占位符:将双花括号包裹的 `project` 和 `org` 占位符替换为 .airc.json 中的实际值
52
+ 2. 渲染占位符:将双花括号包裹的 `project` 和 `org` 占位符替换为 .agents/.airc.json 中的实际值
53
53
  3. 读取本地当前文件(`<项目根>/<target>`)
54
54
 
55
55
  **如果本地文件不存在**(首次安装),直接写入渲染后的模板,跳过合并。