@fitlab-ai/agent-infra 0.3.1 → 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 (93) hide show
  1. package/README.md +29 -39
  2. package/README.zh-CN.md +29 -39
  3. package/bin/cli.js +1 -1
  4. package/lib/defaults.json +3 -12
  5. package/lib/init.js +13 -24
  6. package/lib/paths.js +3 -42
  7. package/lib/update.js +98 -32
  8. package/lib/version.js +2 -1
  9. package/package.json +2 -1
  10. package/templates/.agents/QUICKSTART.md +7 -7
  11. package/templates/.agents/QUICKSTART.zh-CN.md +7 -7
  12. package/templates/.agents/README.md +16 -4
  13. package/templates/.agents/README.zh-CN.md +16 -4
  14. package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
  15. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
  16. package/templates/.agents/skills/block-task/SKILL.md +8 -8
  17. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -8
  18. package/templates/.agents/skills/check-task/SKILL.md +3 -3
  19. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +3 -3
  20. package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
  21. package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
  22. package/templates/.agents/skills/commit/SKILL.md +1 -1
  23. package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
  24. package/templates/.agents/skills/complete-task/SKILL.md +7 -7
  25. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +7 -7
  26. package/templates/.agents/skills/create-issue/SKILL.md +57 -12
  27. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +57 -12
  28. package/templates/.agents/skills/create-pr/SKILL.md +44 -7
  29. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +44 -7
  30. package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
  31. package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
  32. package/templates/.agents/skills/create-task/SKILL.md +80 -78
  33. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +11 -10
  34. package/templates/.agents/skills/implement-task/SKILL.md +15 -18
  35. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +15 -18
  36. package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
  37. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  38. package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
  39. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
  40. package/templates/.agents/skills/import-issue/SKILL.md +58 -58
  41. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
  42. package/templates/.agents/skills/init-labels/SKILL.md +8 -0
  43. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
  44. package/templates/.agents/skills/plan-task/SKILL.md +151 -149
  45. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +6 -6
  46. package/templates/.agents/skills/refine-task/SKILL.md +3 -3
  47. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +3 -3
  48. package/templates/.agents/skills/release/SKILL.md +55 -14
  49. package/templates/.agents/skills/release/SKILL.zh-CN.md +55 -14
  50. package/templates/.agents/skills/review-task/SKILL.md +9 -9
  51. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +9 -9
  52. package/templates/.agents/skills/sync-issue/SKILL.md +258 -279
  53. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -56
  54. package/templates/.agents/skills/sync-pr/SKILL.md +8 -28
  55. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +7 -27
  56. package/templates/.agents/skills/update-agent-infra/SKILL.md +6 -6
  57. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -6
  58. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +61 -116
  59. package/templates/.agents/templates/handoff.md +1 -1
  60. package/templates/.agents/templates/handoff.zh-CN.md +1 -1
  61. package/templates/.agents/workflows/bug-fix.yaml +71 -71
  62. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
  63. package/templates/.agents/workflows/feature-development.yaml +71 -71
  64. package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
  65. package/templates/.agents/workflows/refactoring.yaml +76 -76
  66. package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
  67. package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
  68. package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
  69. package/templates/.claude/CLAUDE.md +14 -1
  70. package/templates/.claude/CLAUDE.zh-CN.md +14 -1
  71. package/templates/.claude/hooks/check-version-format.sh +44 -0
  72. package/templates/.claude/settings.json +14 -0
  73. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
  74. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
  75. package/templates/AGENTS.md +14 -1
  76. package/templates/AGENTS.zh-CN.md +14 -1
  77. package/templates/.editorconfig +0 -15
  78. package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
  79. package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
  80. package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
  81. package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
  82. package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
  83. package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
  84. package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
  85. package/templates/.github/dependabot.yml +0 -17
  86. package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
  87. package/templates/.github/release.yml +0 -27
  88. package/templates/.github/workflows/pr-title-check.yml +0 -42
  89. package/templates/.mailmap +0 -4
  90. package/templates/CONTRIBUTING.md +0 -126
  91. package/templates/CONTRIBUTING.zh-CN.md +0 -124
  92. package/templates/SECURITY.md +0 -131
  93. package/templates/SECURITY.zh-CN.md +0 -131
@@ -18,7 +18,7 @@ description: >
18
18
  ### 1. 验证前置条件
19
19
 
20
20
  检查必要文件:
21
- - `.agent-workspace/active/{task-id}/task.md` - 任务文件
21
+ - `.agents/workspace/active/{task-id}/task.md` - 任务文件
22
22
  - 至少一个分析产物:`analysis.md` 或 `analysis-r{N}.md`
23
23
 
24
24
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
@@ -27,7 +27,7 @@ description: >
27
27
 
28
28
  ### 2. 确定方案轮次
29
29
 
30
- 扫描 `.agent-workspace/active/{task-id}/` 目录中的方案产物文件:
30
+ 扫描 `.agents/workspace/active/{task-id}/` 目录中的方案产物文件:
31
31
  - 如果不存在 `plan.md` 且不存在 `plan-r*.md` → 本轮为第 1 轮,产出 `plan.md`
32
32
  - 如果存在 `plan.md` 且不存在 `plan-r*.md` → 本轮为第 2 轮,产出 `plan-r2.md`
33
33
  - 如果存在 `plan-r{N}.md` → 本轮为第 N+1 轮,产出 `plan-r{N+1}.md`
@@ -75,7 +75,7 @@ description: >
75
75
 
76
76
  ### 6. 输出计划文档
77
77
 
78
- 创建 `.agent-workspace/active/{task-id}/{plan-artifact}`。
78
+ 创建 `.agents/workspace/active/{task-id}/{plan-artifact}`。
79
79
 
80
80
  ### 7. 更新任务状态
81
81
 
@@ -85,7 +85,7 @@ description: >
85
85
  date "+%Y-%m-%d %H:%M:%S"
86
86
  ```
87
87
 
88
- 更新 `.agent-workspace/active/{task-id}/task.md`:
88
+ 更新 `.agents/workspace/active/{task-id}/task.md`:
89
89
  - `current_step`:technical-design
90
90
  - `assigned_to`:{当前 AI 代理}
91
91
  - `updated_at`:{当前时间}
@@ -113,7 +113,7 @@ date "+%Y-%m-%d %H:%M:%S"
113
113
  - 预估复杂度:{评估}
114
114
 
115
115
  产出文件:
116
- - 技术方案:.agent-workspace/active/{task-id}/{plan-artifact}
116
+ - 技术方案:.agents/workspace/active/{task-id}/{plan-artifact}
117
117
 
118
118
  重要:人工审查检查点。
119
119
  请在继续实现之前审查技术方案。
@@ -198,7 +198,7 @@ date "+%Y-%m-%d %H:%M:%S"
198
198
 
199
199
  - [ ] 阅读并理解了需求分析
200
200
  - [ ] 考虑了备选方案
201
- - [ ] 创建了计划文档 `.agent-workspace/active/{task-id}/{plan-artifact}`
201
+ - [ ] 创建了计划文档 `.agents/workspace/active/{task-id}/{plan-artifact}`
202
202
  - [ ] 更新了 task.md 中的 `current_step` 为 technical-design
203
203
  - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
204
204
  - [ ] 在 task.md 中记录了 `{plan-artifact}` 为已完成产物
@@ -20,7 +20,7 @@ description: >
20
20
  ### 1. Verify Prerequisites
21
21
 
22
22
  Check required files:
23
- - `.agent-workspace/active/{task-id}/task.md` - Task file
23
+ - `.agents/workspace/active/{task-id}/task.md` - Task file
24
24
  - At least one review artifact: `review.md` or `review-r{N}.md`
25
25
 
26
26
  Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
@@ -86,7 +86,7 @@ Ensure all tests still pass after the fixes.
86
86
 
87
87
  ### 6. Create Refinement Report
88
88
 
89
- Create `.agent-workspace/active/{task-id}/{refinement-artifact}`.
89
+ Create `.agents/workspace/active/{task-id}/{refinement-artifact}`.
90
90
 
91
91
  ### 7. Update Task Status
92
92
 
@@ -96,7 +96,7 @@ Get the current time:
96
96
  date "+%Y-%m-%d %H:%M:%S"
97
97
  ```
98
98
 
99
- Update `.agent-workspace/active/{task-id}/task.md`:
99
+ Update `.agents/workspace/active/{task-id}/task.md`:
100
100
  - `current_step`: refinement
101
101
  - `assigned_to`: {current AI agent}
102
102
  - `updated_at`: {current time}
@@ -18,7 +18,7 @@ description: >
18
18
  ### 1. 验证前置条件
19
19
 
20
20
  检查必要文件:
21
- - `.agent-workspace/active/{task-id}/task.md` - 任务文件
21
+ - `.agents/workspace/active/{task-id}/task.md` - 任务文件
22
22
  - 至少一个审查产物:`review.md` 或 `review-r{N}.md`
23
23
 
24
24
  注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
@@ -84,7 +84,7 @@ description: >
84
84
 
85
85
  ### 6. 创建修复报告
86
86
 
87
- 创建 `.agent-workspace/active/{task-id}/{refinement-artifact}`。
87
+ 创建 `.agents/workspace/active/{task-id}/{refinement-artifact}`。
88
88
 
89
89
  ### 7. 更新任务状态
90
90
 
@@ -94,7 +94,7 @@ description: >
94
94
  date "+%Y-%m-%d %H:%M:%S"
95
95
  ```
96
96
 
97
- 更新 `.agent-workspace/active/{task-id}/task.md`:
97
+ 更新 `.agents/workspace/active/{task-id}/task.md`:
98
98
  - `current_step`:refinement
99
99
  - `assigned_to`:{当前 AI 代理}
100
100
  - `updated_at`:{当前时间}
@@ -31,7 +31,26 @@ git status --short
31
31
 
32
32
  If there are uncommitted changes, error: "Workspace has uncommitted changes. Please commit or stash first."
33
33
 
34
- ### Step 3: Update Version References
34
+ ### Step 3: Pre-release Verification
35
+
36
+ <!-- TODO: Replace with your project's pre-release verification steps -->
37
+
38
+ Run any checks that must pass before preparing a release:
39
+
40
+ ```bash
41
+ git branch --show-current
42
+ # TODO: Replace with your project's test/build verification commands
43
+ ```
44
+
45
+ Verification guidance:
46
+ - Confirm the release is being prepared from the correct branch for your project
47
+ - Run the full validation commands required by your release process
48
+
49
+ Handling rules:
50
+ - If the current branch is unexpected, print a warning or exit based on your policy
51
+ - If any verification command fails, stop the release process and fix the issue first
52
+
53
+ ### Step 4: Update Version References
35
54
 
36
55
  <!-- TODO: Replace with your project's version update steps -->
37
56
 
@@ -45,6 +64,7 @@ Search for version references in project files and update them:
45
64
 
46
65
  **Common files to update**:
47
66
  - `package.json` (Node.js)
67
+ - `package-lock.json` (Node.js; run `npm install --package-lock-only` after updating `package.json`)
48
68
  - `pom.xml` (Maven)
49
69
  - `setup.py` / `pyproject.toml` (Python)
50
70
  - `version.go` (Go)
@@ -52,22 +72,39 @@ Search for version references in project files and update them:
52
72
  - `SECURITY.md` / `SECURITY.zh-CN.md` (supported version table)
53
73
 
54
74
  **Exclude from version replacement**:
55
- - `.agents/`, `.agent-workspace/`, `.claude/`, `.codex/`, `.gemini/`, `.opencode/` (AI tool configs)
75
+ - `.agents/`, `.agents/workspace/`, `.claude/`, `.codex/`, `.gemini/`, `.opencode/` (AI tool configs)
76
+
77
+ If the project uses `package-lock.json`, run `npm install --package-lock-only` after updating `package.json` so the lockfile version stays in sync.
78
+
79
+ ### Step 5: Rebuild Artifacts
56
80
 
57
- ### Step 4: Create Release Commit
81
+ <!-- TODO: Replace with your project's artifact rebuild steps -->
82
+
83
+ If version updates affect generated files, embedded metadata, or bundled assets, rebuild them now:
84
+
85
+ ```bash
86
+ # TODO: Replace with your project's rebuild command(s)
87
+ ```
88
+
89
+ Execution guidance:
90
+ - Run this after updating version references so generated artifacts pick up the new version
91
+ - If your project has no generated artifacts, document that explicitly in the project-specific skill
92
+ - If the rebuild fails, stop the release process and fix the build first
93
+
94
+ ### Step 6: Create Release Commit
58
95
 
59
96
  ```bash
60
97
  git add -A
61
98
  git commit -m "chore: release v{version}"
62
99
  ```
63
100
 
64
- ### Step 5: Create Git Tag
101
+ ### Step 7: Create Git Tag
65
102
 
66
103
  ```bash
67
104
  git tag v{version}
68
105
  ```
69
106
 
70
- ### Step 6: Manage Milestones
107
+ ### Step 8: Manage Milestones
71
108
 
72
109
  Close the milestone for the released version when it exists, and create the missing planning milestones for the next cycle.
73
110
 
@@ -84,7 +121,7 @@ The script is responsible for:
84
121
  - When `PATCH=0`, also ensuring `{MAJOR}.{MINOR+1}.0` and `{MAJOR}.{MINOR+1}.x`
85
122
  - Printing a milestone summary with the released milestone action and new milestone count
86
123
 
87
- ### Step 7: Output Summary
124
+ ### Step 9: Output Summary
88
125
 
89
126
  > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
90
127
 
@@ -100,12 +137,12 @@ Files updated: {count}
100
137
 
101
138
  Next steps (manual):
102
139
 
103
- 1. Push tag:
104
- git push origin v{version}
105
-
106
- 2. Push branch:
140
+ 1. Push branch:
107
141
  git push origin {current-branch}
108
142
 
143
+ 2. Push tag:
144
+ git push origin v{version}
145
+
109
146
  3. (Optional) Generate release notes:
110
147
  - Claude Code / OpenCode: /create-release-note {version}
111
148
  - Gemini CLI: /{{project}}:create-release-note {version}
@@ -130,13 +167,17 @@ git checkout -- .
130
167
 
131
168
  1. **Clean workspace required**: Must have no uncommitted changes
132
169
  2. **No auto-push**: All operations are local only; user pushes manually
133
- 3. **No build verification**: Run the test skill before releasing to verify
134
- 4. **Version replacement scope**: Search determines which files to update; exclude AI tool directories
135
- 5. **Adapt to your project**: The version update steps above are generic; customize for your project's versioning scheme
136
- 6. **Milestone coordination**: Releases should create the next planning milestones automatically; initialize the taxonomy first with `init-milestones` when needed
170
+ 3. **Pre-release verification**: Replace the Step 3 TODOs with the branch, test, and validation commands your release process requires
171
+ 4. **Generated artifacts**: Replace the Step 5 TODOs when version changes affect generated files, bundled assets, or embedded metadata
172
+ 5. **Release automation**: If pushing a tag triggers CI/CD or package publishing, confirm the required credentials and pipeline settings first
173
+ 6. **Version replacement scope**: Search determines which files to update; exclude AI tool directories
174
+ 7. **Adapt to your project**: The version update and rebuild steps above are generic; customize them for your project's versioning scheme
175
+ 8. **Milestone coordination**: Releases should create the next planning milestones automatically; initialize the taxonomy first with `init-milestones` when needed
137
176
 
138
177
  ## Error Handling
139
178
 
140
179
  - Invalid version format: Prompt correct format and exit
141
180
  - Dirty workspace: Prompt to commit or stash
181
+ - Verification failure: Display the failing check and stop the release
182
+ - Artifact rebuild failure: Display the build error and stop the release
142
183
  - Git operation failure: Display error and provide rollback instructions
@@ -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` 为审查者名称