@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
@@ -1,46 +1,46 @@
1
1
  ---
2
2
  name: import-issue
3
3
  description: >
4
- GitHub Issue 导入并创建任务文件。
5
- 当用户要求导入某个 Issue 时触发。参数:issue 编号。
4
+ Import from a GitHub Issue and create a task file.
5
+ Triggered when the user asks to import an Issue. Argument: issue number.
6
6
  ---
7
7
 
8
- # 导入 Issue
8
+ # Import Issue
9
9
 
10
- 导入指定的 GitHub Issue 并创建任务。参数:issue 编号。
10
+ Import the specified GitHub Issue and create a task. Argument: issue number.
11
11
 
12
- ## 行为边界 / 关键规则
12
+ ## Boundary / Critical Rules
13
13
 
14
- - 本技能的唯一产出是 `task.md`
15
- - 不要编写或修改业务代码。仅做导入
16
- - 执行本技能后,你**必须**立即更新任务状态
14
+ - The only output is `task.md`
15
+ - Do not write or modify business code; import only
16
+ - After executing this skill, you **must** immediately update task status
17
17
 
18
- ## 执行流程
18
+ ## Execution Flow
19
19
 
20
- ### 1. 获取 Issue 信息
20
+ ### 1. Retrieve Issue Information
21
21
 
22
22
  ```bash
23
23
  gh issue view <issue-number> --json number,title,body,labels
24
24
  ```
25
25
 
26
- 提取:issue 编号、标题、描述、标签。
26
+ Extract: issue number, title, description, and labels.
27
27
 
28
- ### 2. 检查已有任务
28
+ ### 2. Check for an Existing Task
29
29
 
30
- 搜索 `.agent-workspace/active/` 中是否已有链接到此 Issue 的任务。
31
- - 如果找到,询问用户是重新导入还是继续使用现有任务
32
- - 如果未找到,创建新任务
30
+ Search `.agents/workspace/active/` for an existing task linked to this Issue.
31
+ - If found, ask the user whether to re-import or continue with the existing task
32
+ - If not found, create a new task
33
33
 
34
- ### 3. 创建任务目录和文件
34
+ ### 3. Create the Task Directory and File
35
35
 
36
36
  ```bash
37
37
  date +%Y%m%d-%H%M%S
38
38
  ```
39
39
 
40
- - 创建目录:`.agent-workspace/active/TASK-{yyyyMMdd-HHmmss}/`
41
- - 使用 `.agents/templates/task.md` 模板创建 `task.md`
40
+ - Create the directory: `.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
41
+ - Use the `.agents/templates/task.md` template to create `task.md`
42
42
 
43
- 任务元数据:
43
+ Task metadata:
44
44
  ```yaml
45
45
  id: TASK-{yyyyMMdd-HHmmss}
46
46
  issue_number: <issue-number>
@@ -51,69 +51,69 @@ created_at: {yyyy-MM-dd HH:mm:ss}
51
51
  updated_at: {yyyy-MM-dd HH:mm:ss}
52
52
  created_by: human
53
53
  current_step: requirement-analysis
54
- assigned_to: {当前 AI 代理}
54
+ assigned_to: {current AI agent}
55
55
  ```
56
56
 
57
- ### 4. 更新任务状态
57
+ ### 4. Update Task Status
58
58
 
59
- 获取当前时间:
59
+ Get the current time:
60
60
 
61
61
  ```bash
62
62
  date "+%Y-%m-%d %H:%M:%S"
63
63
  ```
64
64
 
65
- 更新 `.agent-workspace/active/{task-id}/task.md`:
66
- - `current_step`:requirement-analysis
67
- - `assigned_to`:{当前 AI 代理}
68
- - `updated_at`:{当前时间}
69
- - **追加**到 `## Activity Log`(不要覆盖之前的记录):
65
+ Update `.agents/workspace/active/{task-id}/task.md`:
66
+ - `current_step`: requirement-analysis
67
+ - `assigned_to`: {current AI agent}
68
+ - `updated_at`: {current time}
69
+ - **Append** to `## Activity Log` (do NOT overwrite previous entries):
70
70
  ```
71
71
  - {yyyy-MM-dd HH:mm:ss} — **Import Issue** by {agent} — Issue #{number} imported
72
72
  ```
73
73
 
74
- ### 5. 告知用户
74
+ ### 5. Inform User
75
75
 
76
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
76
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
77
77
 
78
78
  ```
79
- Issue #{number} 已导入。
79
+ Issue #{number} imported.
80
80
 
81
- 任务信息:
82
- - 任务 ID{task-id}
83
- - 标题:{title}
84
- - 工作流:{workflow}
81
+ Task information:
82
+ - Task ID: {task-id}
83
+ - Title: {title}
84
+ - Workflow: {workflow}
85
85
 
86
- 产出文件:
87
- - 任务文件:.agent-workspace/active/{task-id}/task.md
86
+ Output file:
87
+ - Task file: .agents/workspace/active/{task-id}/task.md
88
88
 
89
- 下一步 - 执行需求分析:
90
- - Claude Code / OpenCode:/analyze-task {task-id}
91
- - Gemini CLI:/agent-infra:analyze-task {task-id}
92
- - Codex CLI:$analyze-task {task-id}
89
+ Next step - run requirements analysis:
90
+ - Claude Code / OpenCode: /analyze-task {task-id}
91
+ - Gemini CLI: /{{project}}:analyze-task {task-id}
92
+ - Codex CLI: $analyze-task {task-id}
93
93
  ```
94
94
 
95
- ## 完成检查清单
95
+ ## Completion Checklist
96
96
 
97
- - [ ] 创建了任务文件 `.agent-workspace/active/{task-id}/task.md`
98
- - [ ] task.md 中记录了 issue_number
99
- - [ ] 更新了 `current_step` requirement-analysis
100
- - [ ] 更新了 `updated_at` 为当前时间
101
- - [ ] 追加了 Activity Log 条目到 task.md
102
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
103
- - [ ] **没有修改任何业务代码**
97
+ - [ ] Created the task file `.agents/workspace/active/{task-id}/task.md`
98
+ - [ ] Recorded `issue_number` in task.md
99
+ - [ ] Updated `current_step` to requirement-analysis
100
+ - [ ] Updated `updated_at` to the current time
101
+ - [ ] Appended an Activity Log entry to task.md
102
+ - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
103
+ - [ ] **Did not modify any business code**
104
104
 
105
- ## 停止
105
+ ## STOP
106
106
 
107
- 完成检查清单后,**立即停止**。不要继续执行后续步骤。
107
+ After completing the checklist, **stop immediately**. Do not continue to later steps.
108
108
 
109
- ## 注意事项
109
+ ## Notes
110
110
 
111
- 1. **Issue 验证**:在继续之前检查 Issue 是否存在
112
- 2. **重复任务**:如果此 Issue 已有关联任务,在创建新任务前询问用户
113
- 3. **下一步**:导入完成后,先执行 `analyze-task`,再进入 `plan-task`
111
+ 1. **Issue validation**: verify that the Issue exists before continuing
112
+ 2. **Duplicate task**: if this Issue already has a linked task, ask the user before creating a new one
113
+ 3. **Next step**: after import, run `analyze-task` before `plan-task`
114
114
 
115
- ## 错误处理
115
+ ## Error Handling
116
116
 
117
- - Issue 未找到:提示 "Issue #{number} not found, please check the issue number"
118
- - 网络错误:提示 "Cannot connect to GitHub, please check network"
119
- - 权限错误:提示 "No access to this repository"
117
+ - Issue not found: output "Issue #{number} not found, please check the issue number"
118
+ - Network error: output "Cannot connect to GitHub, please check network"
119
+ - Permission error: output "No access to this repository"
@@ -27,7 +27,7 @@ gh issue view <issue-number> --json number,title,body,labels
27
27
 
28
28
  ### 2. 检查已有任务
29
29
 
30
- 搜索 `.agent-workspace/active/` 中是否已有链接到此 Issue 的任务。
30
+ 搜索 `.agents/workspace/active/` 中是否已有链接到此 Issue 的任务。
31
31
  - 如果找到,询问用户是重新导入还是继续使用现有任务
32
32
  - 如果未找到,创建新任务
33
33
 
@@ -37,7 +37,7 @@ gh issue view <issue-number> --json number,title,body,labels
37
37
  date +%Y%m%d-%H%M%S
38
38
  ```
39
39
 
40
- - 创建目录:`.agent-workspace/active/TASK-{yyyyMMdd-HHmmss}/`
40
+ - 创建目录:`.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
41
41
  - 使用 `.agents/templates/task.md` 模板创建 `task.md`
42
42
 
43
43
  任务元数据:
@@ -62,7 +62,7 @@ assigned_to: {当前 AI 代理}
62
62
  date "+%Y-%m-%d %H:%M:%S"
63
63
  ```
64
64
 
65
- 更新 `.agent-workspace/active/{task-id}/task.md`:
65
+ 更新 `.agents/workspace/active/{task-id}/task.md`:
66
66
  - `current_step`:requirement-analysis
67
67
  - `assigned_to`:{当前 AI 代理}
68
68
  - `updated_at`:{当前时间}
@@ -84,7 +84,7 @@ Issue #{number} 已导入。
84
84
  - 工作流:{workflow}
85
85
 
86
86
  产出文件:
87
- - 任务文件:.agent-workspace/active/{task-id}/task.md
87
+ - 任务文件:.agents/workspace/active/{task-id}/task.md
88
88
 
89
89
  下一步 - 执行需求分析:
90
90
  - Claude Code / OpenCode:/analyze-task {task-id}
@@ -94,7 +94,7 @@ Issue #{number} 已导入。
94
94
 
95
95
  ## 完成检查清单
96
96
 
97
- - [ ] 创建了任务文件 `.agent-workspace/active/{task-id}/task.md`
97
+ - [ ] 创建了任务文件 `.agents/workspace/active/{task-id}/task.md`
98
98
  - [ ] 在 task.md 中记录了 issue_number
99
99
  - [ ] 更新了 `current_step` 为 requirement-analysis
100
100
  - [ ] 更新了 `updated_at` 为当前时间
@@ -45,6 +45,14 @@ The script manages these common label families:
45
45
  - GitHub-default-name labels intentionally overwritten in place: `good first issue` and `help wanted`
46
46
  - Additional shared labels such as `dependencies`
47
47
 
48
+ #### Scope
49
+
50
+ | Label prefix | Issue | PR | Notes |
51
+ |---|---|---|---|
52
+ | `type:` | — | Yes | Issues use the native GitHub Type field; PRs need `type:` labels to drive changelog grouping |
53
+ | `status:` | Yes | — | PRs already have their own state flow (Open/Draft/Merged/Closed); Issues use `status:` labels for project tracking |
54
+ | `in:` | Yes | Yes | Both Issues and PRs need module-based filtering |
55
+
48
56
  ### 4. Scope discovery rules
49
57
 
50
58
  Directory-derived labels follow these rules:
@@ -45,6 +45,14 @@ bash .agents/skills/init-labels/scripts/init-labels.sh
45
45
  - 明确覆盖的 GitHub 默认同名 labels:`good first issue` 和 `help wanted`
46
46
  - 额外通用 labels,例如 `dependencies`
47
47
 
48
+ #### 适用范围
49
+
50
+ | Label 前缀 | Issue | PR | 说明 |
51
+ |---|---|---|---|
52
+ | `type:` | — | Yes | Issue 使用 GitHub 原生 Type 字段;PR 无原生类型字段,需 `type:` label 驱动 changelog |
53
+ | `status:` | Yes | — | PR 有自身状态流转(Open/Draft/Merged/Closed);Issue 使用 `status:` label 标记项目管理状态 |
54
+ | `in:` | Yes | Yes | Issue 和 PR 均需按模块筛选 |
55
+
48
56
  ### 4. 范围探测规则
49
57
 
50
58
  目录派生 label 遵循以下规则:
@@ -1,225 +1,227 @@
1
1
  ---
2
2
  name: plan-task
3
3
  description: >
4
- 为任务设计技术方案并输出详细的实施计划。当用户要求为已完成需求分析的任务设计方案或技术计划时触发。
5
- 这是一个强制性的人工审查检查点。参数:task-id。
4
+ Design a technical plan for a task and output a detailed implementation
5
+ plan. Triggered when the user asks for a design or technical plan after
6
+ requirements analysis is complete. This is a mandatory human review
7
+ checkpoint. Argument: task-id.
6
8
  ---
7
9
 
8
- # 设计技术方案
10
+ # Design Technical Plan
9
11
 
10
- ## 行为边界 / 关键规则
12
+ ## Boundary / Critical Rules
11
13
 
12
- - 本技能仅产出技术方案文档(`plan.md` `plan-r{N}.md`)—— 不修改任何业务代码
13
- - 这是一个**强制性的人工审查检查点** —— 不要自动进入实现阶段
14
- - 执行本技能后,你**必须**立即更新 task.md 中的任务状态
14
+ - This skill only outputs a technical plan document (`plan.md` or `plan-r{N}.md`) and does not modify any business code
15
+ - This is a **mandatory human review checkpoint**; do not automatically proceed to implementation
16
+ - After executing this skill, you **must** immediately update task status in task.md
15
17
 
16
- ## 执行步骤
18
+ ## Steps
17
19
 
18
- ### 1. 验证前置条件
20
+ ### 1. Verify Prerequisites
19
21
 
20
- 检查必要文件:
21
- - `.agent-workspace/active/{task-id}/task.md` - 任务文件
22
- - 至少一个分析产物:`analysis.md` `analysis-r{N}.md`
22
+ Check required files:
23
+ - `.agents/workspace/active/{task-id}/task.md` - Task file
24
+ - At least one analysis artifact: `analysis.md` or `analysis-r{N}.md`
23
25
 
24
- 注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
26
+ Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
25
27
 
26
- 如果任一文件缺失,提示用户先完成前置步骤。
28
+ If any required file is missing, prompt the user to complete the prerequisite step first.
27
29
 
28
- ### 2. 确定方案轮次
30
+ ### 2. Determine the Plan Round
29
31
 
30
- 扫描 `.agent-workspace/active/{task-id}/` 目录中的方案产物文件:
31
- - 如果不存在 `plan.md` 且不存在 `plan-r*.md` 本轮为第 1 轮,产出 `plan.md`
32
- - 如果存在 `plan.md` 且不存在 `plan-r*.md` 本轮为第 2 轮,产出 `plan-r2.md`
33
- - 如果存在 `plan-r{N}.md` 本轮为第 N+1 轮,产出 `plan-r{N+1}.md`
32
+ Scan `.agents/workspace/active/{task-id}/` for plan artifact files:
33
+ - If neither `plan.md` nor `plan-r*.md` exists -> this is Round 1 and must create `plan.md`
34
+ - If `plan.md` exists and no `plan-r*.md` exists -> this is Round 2 and must create `plan-r2.md`
35
+ - If `plan-r{N}.md` exists -> this is Round N+1 and must create `plan-r{N+1}.md`
34
36
 
35
- 记录:
36
- - `{plan-round}`:本轮方案轮次
37
- - `{plan-artifact}`:本轮方案产物文件名
37
+ Record:
38
+ - `{plan-round}`: the current plan round
39
+ - `{plan-artifact}`: the artifact filename for this round
38
40
 
39
- ### 3. 阅读需求分析
41
+ ### 3. Read Requirements Analysis
40
42
 
41
- 扫描任务目录中的分析产物文件(`analysis.md`、`analysis-r{N}.md`):
42
- - 如果存在 `analysis-r{N}.md`,读取最高 N 的文件
43
- - 否则读取 `analysis.md`
44
- 以理解:
45
- - 需求及其背景
46
- - 相关文件和代码结构
47
- - 影响范围和依赖关系
48
- - 已识别的技术风险
49
- - 工作量和复杂度评估
43
+ Scan the task directory for analysis artifact files (`analysis.md`, `analysis-r{N}.md`):
44
+ - If any `analysis-r{N}.md` exists, read the highest N file
45
+ - otherwise read `analysis.md`
46
+ Use it to understand:
47
+ - the requirements and background
48
+ - related files and code structure
49
+ - impact scope and dependencies
50
+ - identified technical risks
51
+ - effort and complexity assessment
50
52
 
51
- ### 4. 理解问题
53
+ ### 4. Understand the Problem
52
54
 
53
- - 阅读分析中识别的相关源码文件
54
- - 理解当前架构和模式
55
- - 识别约束条件(向后兼容性、性能等)
56
- - 考虑边界情况和错误场景
55
+ - Read the relevant source files identified in the analysis
56
+ - Understand the current architecture and patterns
57
+ - Identify constraints (backward compatibility, performance, etc.)
58
+ - Consider edge cases and failure scenarios
57
59
 
58
- ### 5. 设计技术方案
60
+ ### 5. Design the Technical Plan
59
61
 
60
- 遵循 `.agents/workflows/feature-development.yaml` 中的 `technical-design` 步骤:
62
+ Follow the `technical-design` step in `.agents/workflows/feature-development.yaml`:
61
63
 
62
- **必要任务**:
63
- - [ ] 定义技术方法和理由
64
- - [ ] 考虑备选方案并说明权衡
65
- - [ ] 按顺序详细列出实施步骤
66
- - [ ] 列出所有需要创建/修改的文件
67
- - [ ] 定义验证策略(测试、手动检查)
68
- - [ ] 评估方案的影响和风险
64
+ **Required tasks**:
65
+ - [ ] Define the technical approach and rationale
66
+ - [ ] Consider alternatives and explain the tradeoffs
67
+ - [ ] List implementation steps in detailed order
68
+ - [ ] List all files that need to be created or modified
69
+ - [ ] Define the verification strategy (tests, manual checks)
70
+ - [ ] Assess impact and risks
69
71
 
70
- **设计原则**:
71
- 1. **简洁性**:优先选择满足需求的最简方案
72
- 2. **一致性**:遵循现有代码模式和规范
73
- 3. **可测试性**:设计易于测试的方案
74
- 4. **可逆性**:优先选择易于回退的变更
72
+ **Design principles**:
73
+ 1. **Simplicity**: prefer the simplest approach that satisfies the requirement
74
+ 2. **Consistency**: follow existing code patterns and conventions
75
+ 3. **Testability**: design for straightforward testing
76
+ 4. **Reversibility**: prefer changes that are easy to roll back
75
77
 
76
- ### 6. 输出计划文档
78
+ ### 6. Output Plan Document
77
79
 
78
- 创建 `.agent-workspace/active/{task-id}/{plan-artifact}`。
80
+ Create `.agents/workspace/active/{task-id}/{plan-artifact}`.
79
81
 
80
- ### 7. 更新任务状态
82
+ ### 7. Update Task Status
81
83
 
82
- 获取当前时间:
84
+ Get the current time:
83
85
 
84
86
  ```bash
85
87
  date "+%Y-%m-%d %H:%M:%S"
86
88
  ```
87
89
 
88
- 更新 `.agent-workspace/active/{task-id}/task.md`:
89
- - `current_step`:technical-design
90
- - `assigned_to`:{当前 AI 代理}
91
- - `updated_at`:{当前时间}
92
- - 记录本轮方案产物:`{plan-artifact}`(Round `{plan-round}`)
93
- - 如任务模板包含 `## 设计` 段落,更新为指向 `{plan-artifact}` 的链接
94
- - 在工作流进度中标记 technical-design 为已完成,并注明实际轮次(如果任务模板支持)
95
- - **追加**到 `## Activity Log`(不要覆盖之前的记录):
90
+ Update `.agents/workspace/active/{task-id}/task.md`:
91
+ - `current_step`: technical-design
92
+ - `assigned_to`: {current AI agent}
93
+ - `updated_at`: {current time}
94
+ - Record the plan artifact for this round: `{plan-artifact}` (Round `{plan-round}`)
95
+ - If the task template contains a `## Design` section, update it to link to `{plan-artifact}`
96
+ - Mark technical-design as complete in workflow progress and include the actual round when the task template supports it
97
+ - **Append** to `## Activity Log` (do NOT overwrite previous entries):
96
98
  ```
97
99
  - {yyyy-MM-dd HH:mm:ss} — **Technical Design (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
98
100
  ```
99
101
 
100
- ### 8. 告知用户
102
+ ### 8. Inform User
101
103
 
102
- > **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
104
+ > **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
103
105
 
104
- 输出格式:
106
+ Output format:
105
107
  ```
106
- 任务 {task-id} 技术方案完成。
108
+ Technical plan complete for task {task-id}.
107
109
 
108
- 方案概要:
109
- - 轮次:Round {plan-round}
110
- - 方法:{简要描述}
111
- - 需修改文件:{数量}
112
- - 需新建文件:{数量}
113
- - 预估复杂度:{评估}
110
+ Plan summary:
111
+ - Round: Round {plan-round}
112
+ - Approach: {brief description}
113
+ - Files to modify: {count}
114
+ - Files to create: {count}
115
+ - Estimated complexity: {assessment}
114
116
 
115
- 产出文件:
116
- - 技术方案:.agent-workspace/active/{task-id}/{plan-artifact}
117
+ Output file:
118
+ - Technical plan: .agents/workspace/active/{task-id}/{plan-artifact}
117
119
 
118
- 重要:人工审查检查点。
119
- 请在继续实现之前审查技术方案。
120
+ Important: human review checkpoint.
121
+ Please review the technical plan before continuing to implementation.
120
122
 
121
- 下一步 - 实施任务:
122
- - Claude Code / OpenCode:/implement-task {task-id}
123
- - Gemini CLI:/agent-infra:implement-task {task-id}
124
- - Codex CLI:$implement-task {task-id}
123
+ Next step - implement the task:
124
+ - Claude Code / OpenCode: /implement-task {task-id}
125
+ - Gemini CLI: /{{project}}:implement-task {task-id}
126
+ - Codex CLI: $implement-task {task-id}
125
127
  ```
126
128
 
127
- ## 输出模板
129
+ ## Output Template
128
130
 
129
131
  ```markdown
130
- # 技术方案
132
+ # Technical Plan
131
133
 
132
- - **方案轮次**:Round {plan-round}
133
- - **产物文件**:`{plan-artifact}`
134
+ - **Plan round**: Round {plan-round}
135
+ - **Artifact file**: `{plan-artifact}`
134
136
 
135
- ## 问题理解
136
- {总结需要解决的问题和关键约束}
137
+ ## Problem Understanding
138
+ {Summarize the problem to solve and the key constraints}
137
139
 
138
- ## 约束条件
139
- - {约束 1}
140
- - {约束 2}
140
+ ## Constraints
141
+ - {Constraint 1}
142
+ - {Constraint 2}
141
143
 
142
- ## 方案对比
144
+ ## Option Comparison
143
145
 
144
- ### 方案 A{名称}
145
- - **方法**:{描述}
146
- - **优点**:{优势}
147
- - **缺点**:{劣势}
146
+ ### Option A: {Name}
147
+ - **Approach**: {Description}
148
+ - **Pros**: {Advantages}
149
+ - **Cons**: {Drawbacks}
148
150
 
149
- ### 方案 B{名称}
150
- - **方法**:{描述}
151
- - **优点**:{优势}
152
- - **缺点**:{劣势}
151
+ ### Option B: {Name}
152
+ - **Approach**: {Description}
153
+ - **Pros**: {Advantages}
154
+ - **Cons**: {Drawbacks}
153
155
 
154
- ### 决策
155
- {选择哪个方案以及原因}
156
+ ### Decision
157
+ {Which option was chosen and why}
156
158
 
157
- ## 技术方法
158
- {所选方案的详细描述}
159
+ ## Technical Approach
160
+ {Detailed description of the selected approach}
159
161
 
160
- ## 实施步骤
162
+ ## Implementation Steps
161
163
 
162
- ### 步骤 1{标题}
163
- - **文件**:`{file-path}`
164
- - **操作**:{要做什么}
165
- - **详情**:{具体细节}
164
+ ### Step 1: {Title}
165
+ - **File**: `{file-path}`
166
+ - **Action**: {What to do}
167
+ - **Details**: {Specific details}
166
168
 
167
- ### 步骤 2{标题}
169
+ ### Step 2: {Title}
168
170
  ...
169
171
 
170
- ## 文件清单
172
+ ## File List
171
173
 
172
- ### 新建文件
173
- - `{file-path}` - {用途}
174
+ ### New Files
175
+ - `{file-path}` - {Purpose}
174
176
 
175
- ### 修改文件
176
- - `{file-path}` - {修改内容}
177
+ ### Modified Files
178
+ - `{file-path}` - {Planned changes}
177
179
 
178
- ## 验证策略
180
+ ## Verification Strategy
179
181
 
180
- ### 单元测试
181
- - {测试用例 1}
182
- - {测试用例 2}
182
+ ### Unit Tests
183
+ - {Test case 1}
184
+ - {Test case 2}
183
185
 
184
- ### 手动验证
185
- - {验证步骤}
186
+ ### Manual Validation
187
+ - {Validation step}
186
188
 
187
- ## 影响评估
188
- - 破坏性变更:{是/否 - 详情}
189
- - 性能影响:{评估}
190
- - 安全考量:{评估}
189
+ ## Impact Assessment
190
+ - Breaking change: {Yes/No - details}
191
+ - Performance impact: {Assessment}
192
+ - Security considerations: {Assessment}
191
193
 
192
- ## 风险控制
193
- - {风险 1}{缓解措施}
194
- - {风险 2}{缓解措施}
194
+ ## Risk Control
195
+ - {Risk 1}: {Mitigation}
196
+ - {Risk 2}: {Mitigation}
195
197
  ```
196
198
 
197
- ## 完成检查清单
199
+ ## Completion Checklist
198
200
 
199
- - [ ] 阅读并理解了需求分析
200
- - [ ] 考虑了备选方案
201
- - [ ] 创建了计划文档 `.agent-workspace/active/{task-id}/{plan-artifact}`
202
- - [ ] 更新了 task.md 中的 `current_step` technical-design
203
- - [ ] 更新了 task.md 中的 `updated_at` 为当前时间
204
- - [ ] task.md 中记录了 `{plan-artifact}` 为已完成产物
205
- - [ ] 在工作流进度中标记了 technical-design 为已完成
206
- - [ ] 追加了 Activity Log 条目到 task.md
207
- - [ ] 告知了用户这是人工审查检查点
208
- - [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
201
+ - [ ] Read and understood the requirements analysis
202
+ - [ ] Considered alternative options
203
+ - [ ] Created the plan document `.agents/workspace/active/{task-id}/{plan-artifact}`
204
+ - [ ] Updated `current_step` to technical-design in task.md
205
+ - [ ] Updated `updated_at` to the current time in task.md
206
+ - [ ] Recorded `{plan-artifact}` as a completed artifact in task.md
207
+ - [ ] Marked technical-design as complete in workflow progress
208
+ - [ ] Appended an Activity Log entry to task.md
209
+ - [ ] Informed the user that this is a human review checkpoint
210
+ - [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
209
211
 
210
- ## 停止
212
+ ## STOP
211
213
 
212
- 完成检查清单后,**立即停止**。
213
- 这是一个**强制性的人工审查检查点** —— 用户必须审查并批准计划后才能继续实现。
214
+ After completing the checklist, **stop immediately**.
215
+ This is a **mandatory human review checkpoint**; the user must review and approve the plan before implementation can continue.
214
216
 
215
- ## 注意事项
217
+ ## Notes
216
218
 
217
- 1. **前置条件**:必须已完成至少一轮需求分析(`analysis.md` `analysis-r{N}.md` 存在)
218
- 2. **人工审查**:这是强制性检查点 —— 不要自动进入实现阶段
219
- 3. **计划质量**:计划应足够具体,使另一个 AI 代理无需额外上下文即可实现
220
- 4. **版本化规则**:首轮方案使用 `plan.md`;后续修订使用 `plan-r{N}.md`
219
+ 1. **Prerequisite**: at least one round of requirements analysis must already be complete (`analysis.md` or `analysis-r{N}.md` exists)
220
+ 2. **Human review**: this is a mandatory checkpoint; do not automatically proceed to implementation
221
+ 3. **Plan quality**: the plan should be detailed enough that another AI agent can implement it without extra context
222
+ 4. **Versioning rule**: the first plan uses `plan.md`; later revisions use `plan-r{N}.md`
221
223
 
222
- ## 错误处理
224
+ ## Error Handling
223
225
 
224
- - 任务未找到:提示 "Task {task-id} not found, please check the task ID"
225
- - 缺少分析:提示 "Analysis not found, please run the analyze-task skill first"
226
+ - Task not found: output "Task {task-id} not found, please check the task ID"
227
+ - Analysis missing: output "Analysis not found, please run the analyze-task skill first"