@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,150 +1,150 @@
1
- # 功能开发工作流
2
- # 实现新功能时使用此工作流。
1
+ # Feature Development Workflow
2
+ # Use this workflow when implementing a new feature.
3
3
 
4
4
  name: feature-development
5
- description: 开发新功能的端到端工作流。
5
+ description: End-to-end workflow for developing a new feature.
6
6
 
7
7
  steps:
8
8
  - name: analysis
9
- description: 分析功能需求,探索代码库,识别受影响的区域。
9
+ description: Analyze feature requirements, explore the codebase, and identify impacted areas.
10
10
  recommended_agents:
11
11
  - claude
12
12
  - gemini
13
13
  tasks:
14
- - 阅读并理解功能需求
15
- - 探索代码库以识别相关文件和模块
16
- - 识别依赖项和潜在影响区域
17
- - 将发现记录在任务文件中
14
+ - Read and understand the feature requirements
15
+ - Explore the codebase to identify relevant files and modules
16
+ - Identify dependencies and potentially impacted areas
17
+ - Record findings in the task file
18
18
  inputs:
19
- - 功能需求或 Issue 描述
20
- - 项目代码库
19
+ - Feature requirements or issue description
20
+ - Project codebase
21
21
  artifact_versioning:
22
22
  outputs:
23
23
  - name: analysis
24
24
  pattern: "analysis.md | analysis-r{N}.md"
25
- rule: "扫描现有分析产物;首轮创建 analysis.md,后续修订创建 analysis-r{N}.mdN = 当前最高轮次 + 1"
25
+ rule: "Scan existing analysis artifacts; create analysis.md for the first round, then analysis-r{N}.md for later revisions (N = current highest round + 1)"
26
26
  outputs:
27
- - 更新后的任务文件(分析部分)
28
- - 受影响文件列表
29
- - 识别的风险或约束
27
+ - Updated task file (analysis section)
28
+ - List of impacted files
29
+ - Identified risks or constraints
30
30
 
31
31
  - name: design
32
- description: 为功能实现创建技术设计方案。
32
+ description: Create the technical design for the feature implementation.
33
33
  recommended_agents:
34
34
  - claude
35
35
  - gemini
36
36
  tasks:
37
- - 定义接口和数据结构
38
- - 概述实现方案
39
- - 识别边界情况和错误处理策略
40
- - 在任务文件中记录设计方案
37
+ - Define interfaces and data structures
38
+ - Outline the implementation approach
39
+ - Identify edge cases and error-handling strategies
40
+ - Record the design in the task file
41
41
  inputs:
42
- - 上一步的分析结果
43
- - 项目架构和规范
42
+ - Analysis results from the previous step
43
+ - Project architecture and conventions
44
44
  artifact_versioning:
45
45
  inputs:
46
46
  - name: analysis
47
47
  pattern: "analysis.md | analysis-r{N}.md"
48
- rule: "读取最高轮次的分析产物作为设计输入"
48
+ rule: "Read the highest-round analysis artifact as design input"
49
49
  outputs:
50
50
  - name: plan
51
51
  pattern: "plan.md | plan-r{N}.md"
52
- rule: "扫描现有方案产物;首轮创建 plan.md,后续修订创建 plan-r{N}.mdN = 当前最高轮次 + 1"
52
+ rule: "Scan existing plan artifacts; create plan.md for the first round, then plan-r{N}.md for later revisions (N = current highest round + 1)"
53
53
  outputs:
54
- - 更新后的任务文件(设计部分)
55
- - 接口定义
56
- - 实现计划
54
+ - Updated task file (design section)
55
+ - Interface definitions
56
+ - Implementation plan
57
57
 
58
58
  - name: implementation
59
- description: 按照设计方案实现功能。
59
+ description: Implement the feature according to the design plan.
60
60
  recommended_agents:
61
61
  - codex
62
62
  - cursor
63
63
  tasks:
64
- - 创建功能分支
65
- - 实现功能代码
66
- - 编写单元测试
67
- - 编写集成测试(如适用)
68
- - 确保代码遵循项目规范
64
+ - Create a feature branch
65
+ - Implement the feature code
66
+ - Write unit tests
67
+ - Write integration tests when applicable
68
+ - Ensure the code follows project conventions
69
69
  inputs:
70
- - 上一步的技术设计
71
- - 项目编码标准
70
+ - Technical design from the previous step
71
+ - Project coding standards
72
72
  artifact_versioning:
73
73
  outputs:
74
74
  - name: implementation
75
75
  pattern: "implementation.md | implementation-r{N}.md"
76
- rule: "扫描现有实现产物;首轮创建 implementation.md,后续重实现创建 implementation-r{N}.mdN = 当前最高轮次 + 1"
76
+ rule: "Scan existing implementation artifacts; create implementation.md for the first round, then implementation-r{N}.md for later re-implementations (N = current highest round + 1)"
77
77
  outputs:
78
- - 包含实现的功能分支
79
- - 测试文件
80
- - 更新后的任务文件(实现备注)
78
+ - Feature branch with the implementation
79
+ - Test files
80
+ - Updated task file (implementation notes)
81
81
 
82
82
  - name: review
83
- description: 审查实现的正确性、代码风格和最佳实践。
83
+ description: Review correctness, code style, and best practices in the implementation.
84
84
  recommended_agents:
85
85
  - claude
86
86
  tasks:
87
- - 审查代码变更的正确性
88
- - 检查是否遵循项目规范
89
- - 验证测试覆盖率和质量
90
- - 检查安全和性能问题
91
- - 创建审查报告
87
+ - Review the correctness of the code changes
88
+ - Check adherence to project conventions
89
+ - Verify test coverage and quality
90
+ - Check for security and performance issues
91
+ - Create a review report
92
92
  inputs:
93
- - 实现分支
94
- - 项目规范
93
+ - Implementation branch
94
+ - Project conventions
95
95
  artifact_versioning:
96
96
  inputs:
97
97
  - name: implementation
98
98
  pattern: "implementation.md | implementation-r{N}.md"
99
- rule: "读取最高轮次的实现产物作为审查输入"
99
+ rule: "Read the highest-round implementation artifact as review input"
100
100
  outputs:
101
101
  - name: review
102
102
  pattern: "review.md | review-r{N}.md"
103
- rule: "扫描现有审查产物;首轮创建 review.md,后续轮次创建 review-r{N}.mdN = 当前最高轮次 + 1"
103
+ rule: "Scan existing review artifacts; create review.md for the first round, then review-r{N}.md for later rounds (N = current highest round + 1)"
104
104
  outputs:
105
- - 审查报告
106
- - 待修复问题列表
105
+ - Review report
106
+ - List of issues to fix
107
107
 
108
108
  - name: fix
109
- description: 处理审查阶段发现的问题。
109
+ description: Address issues found during the review step.
110
110
  recommended_agents:
111
111
  - codex
112
112
  - cursor
113
113
  tasks:
114
- - 修复审查中的所有严重和重要问题
115
- - 酌情处理次要问题和建议
116
- - 根据需要更新测试
117
- - 验证所有测试通过
114
+ - Fix all critical and major review findings
115
+ - Address minor issues and suggestions when appropriate
116
+ - Update tests as needed
117
+ - Verify that all tests pass
118
118
  inputs:
119
- - 审查报告
120
- - 实现分支
119
+ - Review report
120
+ - Implementation branch
121
121
  artifact_versioning:
122
122
  inputs:
123
123
  - name: review
124
124
  pattern: "review.md | review-r{N}.md"
125
- rule: "读取最高轮次的审查产物,并校验其与 task.md Activity Log 中最近一条 Code Review 记录一致"
125
+ rule: "Read the highest-round review artifact and verify that it matches the latest Code Review entry in the task.md Activity Log"
126
126
  outputs:
127
127
  - name: refinement
128
128
  pattern: "refinement.md | refinement-r{N}.md"
129
- rule: "扫描现有修复产物;首轮创建 refinement.md,后续轮次创建 refinement-r{N}.mdN = 当前最高轮次 + 1"
129
+ rule: "Scan existing refinement artifacts; create refinement.md for the first round, then refinement-r{N}.md for later rounds (N = current highest round + 1)"
130
130
  outputs:
131
- - 包含修复的更新分支
132
- - 更新后的任务文件
131
+ - Updated branch with fixes
132
+ - Updated task file
133
133
 
134
134
  - name: commit
135
- description: 最终确认变更并创建拉取请求。
135
+ description: Finalize the changes and create a pull request.
136
136
  recommended_agents:
137
137
  - claude
138
138
  - human
139
139
  tasks:
140
- - 确保所有测试通过
141
- - 按规范编写清晰的提交信息
142
- - 创建包含适当描述的拉取请求
143
- - PR 关联到相关 Issue
144
- - 将任务移至已完成
140
+ - Ensure all tests pass
141
+ - Write a clear commit message that follows project conventions
142
+ - Create a pull request with an appropriate description
143
+ - Link the PR to the relevant issue
144
+ - Move the task to completed
145
145
  inputs:
146
- - 最终实现分支
147
- - 任务文件
146
+ - Final implementation branch
147
+ - Task file
148
148
  outputs:
149
- - 拉取请求
150
- - 已完成的任务文件(位于 .agent-workspace/completed/)
149
+ - Pull request
150
+ - Completed task file (stored in .agents/workspace/completed/)
@@ -147,4 +147,4 @@ steps:
147
147
  - 任务文件
148
148
  outputs:
149
149
  - 拉取请求
150
- - 已完成的任务文件(位于 .agent-workspace/completed/)
150
+ - 已完成的任务文件(位于 .agents/workspace/completed/)
@@ -1,154 +1,154 @@
1
- # 重构工作流
2
- # 代码重构任务时使用此工作流。
1
+ # Refactoring Workflow
2
+ # Use this workflow for code refactoring tasks.
3
3
 
4
4
  name: refactoring
5
- description: 安全且结构化的代码重构工作流。
5
+ description: Safe and structured workflow for code refactoring.
6
6
 
7
7
  steps:
8
8
  - name: analysis
9
- description: 分析当前代码并确定重构范围。
9
+ description: Analyze the current code and determine the refactoring scope.
10
10
  recommended_agents:
11
11
  - claude
12
12
  - gemini
13
13
  tasks:
14
- - 识别待重构的代码及重构原因
15
- - 映射受影响代码的所有依赖项和使用者
16
- - 评估重构的风险和复杂度
17
- - 识别受影响区域的现有测试覆盖
18
- - 将发现记录在任务文件中
14
+ - Identify the code to refactor and why it needs refactoring
15
+ - Map all dependencies and consumers of the impacted code
16
+ - Assess refactoring risk and complexity
17
+ - Identify existing test coverage for impacted areas
18
+ - Record findings in the task file
19
19
  inputs:
20
- - 重构请求或 Issue 描述
21
- - 项目代码库
20
+ - Refactoring request or issue description
21
+ - Project codebase
22
22
  artifact_versioning:
23
23
  outputs:
24
24
  - name: analysis
25
25
  pattern: "analysis.md | analysis-r{N}.md"
26
- rule: "扫描现有分析产物;首轮创建 analysis.md,后续修订创建 analysis-r{N}.mdN = 当前最高轮次 + 1"
26
+ rule: "Scan existing analysis artifacts; create analysis.md for the first round, then analysis-r{N}.md for later revisions (N = current highest round + 1)"
27
27
  outputs:
28
- - 包含依赖关系图的范围分析
29
- - 风险评估
30
- - 更新后的任务文件(分析部分)
28
+ - Scope analysis with dependency mapping
29
+ - Risk assessment
30
+ - Updated task file (analysis section)
31
31
 
32
32
  - name: design
33
- description: 规划重构方案以最小化风险。
33
+ description: Plan the refactoring approach to minimize risk.
34
34
  recommended_agents:
35
35
  - claude
36
36
  tasks:
37
- - 定义目标架构或代码结构
38
- - 规划增量重构步骤(避免一次性大改动)
39
- - 识别应保持功能正常的中间状态
40
- - 规划重构前需要的额外测试
41
- - 在任务文件中记录重构计划
37
+ - Define the target architecture or code structure
38
+ - Plan incremental refactoring steps to avoid a single large change
39
+ - Identify intermediate states that must remain functional
40
+ - Plan any additional tests needed before refactoring
41
+ - Record the refactoring plan in the task file
42
42
  inputs:
43
- - 上一步的范围分析
44
- - 项目架构
43
+ - Scope analysis from the previous step
44
+ - Project architecture
45
45
  artifact_versioning:
46
46
  inputs:
47
47
  - name: analysis
48
48
  pattern: "analysis.md | analysis-r{N}.md"
49
- rule: "读取最高轮次的分析产物作为设计输入"
49
+ rule: "Read the highest-round analysis artifact as design input"
50
50
  outputs:
51
51
  - name: plan
52
52
  pattern: "plan.md | plan-r{N}.md"
53
- rule: "扫描现有方案产物;首轮创建 plan.md,后续修订创建 plan-r{N}.mdN = 当前最高轮次 + 1"
53
+ rule: "Scan existing plan artifacts; create plan.md for the first round, then plan-r{N}.md for later revisions (N = current highest round + 1)"
54
54
  outputs:
55
- - 包含增量步骤的重构计划
56
- - 前置测试列表
57
- - 更新后的任务文件(设计部分)
55
+ - Refactoring plan with incremental steps
56
+ - List of prerequisite tests
57
+ - Updated task file (design section)
58
58
 
59
59
  - name: implementation
60
- description: 按计划执行重构。
60
+ description: Execute the refactoring according to the plan.
61
61
  recommended_agents:
62
62
  - codex
63
63
  - cursor
64
64
  tasks:
65
- - 创建重构分支
66
- - 添加前置测试(如尚未存在)
67
- - 增量执行重构步骤
68
- - 每步后验证测试通过
69
- - 更新受影响的文档或注释
70
- - 确保代码遵循项目规范
65
+ - Create a refactoring branch
66
+ - Add prerequisite tests if they do not already exist
67
+ - Execute the refactoring incrementally
68
+ - Verify tests pass after each step
69
+ - Update impacted documentation or comments
70
+ - Ensure the code follows project conventions
71
71
  inputs:
72
- - 上一步的重构计划
73
- - 项目编码标准
72
+ - Refactoring plan from the previous step
73
+ - Project coding standards
74
74
  artifact_versioning:
75
75
  outputs:
76
76
  - name: implementation
77
77
  pattern: "implementation.md | implementation-r{N}.md"
78
- rule: "扫描现有实现产物;首轮创建 implementation.md,后续重实现创建 implementation-r{N}.mdN = 当前最高轮次 + 1"
78
+ rule: "Scan existing implementation artifacts; create implementation.md for the first round, then implementation-r{N}.md for later re-implementations (N = current highest round + 1)"
79
79
  outputs:
80
- - 包含变更的重构分支
81
- - 更新或新增的测试文件
82
- - 更新后的任务文件(实现备注)
80
+ - Refactoring branch with the changes
81
+ - Updated or new test files
82
+ - Updated task file (implementation notes)
83
83
 
84
84
  - name: review
85
- description: 验证重构是否保持了行为并提升了代码质量。
85
+ description: Verify that the refactoring preserves behavior and improves code quality.
86
86
  recommended_agents:
87
87
  - claude
88
88
  tasks:
89
- - 验证功能等价性(除非有意改变,否则行为不变)
90
- - 检查所有测试通过
91
- - 验证代码质量提升
92
- - 检查是否有遗漏的依赖项或使用者
93
- - 评估性能影响(如适用)
94
- - 创建审查报告
89
+ - Verify functional equivalence unless behavior changes are intentional
90
+ - Check that all tests pass
91
+ - Confirm that code quality has improved
92
+ - Check for missed dependencies or consumers
93
+ - Assess performance impact when applicable
94
+ - Create a review report
95
95
  inputs:
96
- - 重构分支
97
- - 原始代码用于对比
98
- - 测试结果
96
+ - Refactoring branch
97
+ - Original code for comparison
98
+ - Test results
99
99
  artifact_versioning:
100
100
  inputs:
101
101
  - name: implementation
102
102
  pattern: "implementation.md | implementation-r{N}.md"
103
- rule: "读取最高轮次的实现产物作为审查输入"
103
+ rule: "Read the highest-round implementation artifact as review input"
104
104
  outputs:
105
105
  - name: review
106
106
  pattern: "review.md | review-r{N}.md"
107
- rule: "扫描现有审查产物;首轮创建 review.md,后续轮次创建 review-r{N}.mdN = 当前最高轮次 + 1"
107
+ rule: "Scan existing review artifacts; create review.md for the first round, then review-r{N}.md for later rounds (N = current highest round + 1)"
108
108
  outputs:
109
- - 审查报告
110
- - 问题列表(如有)
109
+ - Review report
110
+ - List of issues if any
111
111
 
112
112
  - name: fix
113
- description: 处理审查中发现的问题。
113
+ description: Address issues found during review.
114
114
  recommended_agents:
115
115
  - codex
116
116
  - cursor
117
117
  tasks:
118
- - 修复审查中识别的问题
119
- - 根据需要更新测试
120
- - 验证所有测试通过
121
- - 确保无回归问题
118
+ - Fix issues identified in the review
119
+ - Update tests as needed
120
+ - Verify that all tests pass
121
+ - Ensure there are no regressions
122
122
  inputs:
123
- - 审查报告
124
- - 重构分支
123
+ - Review report
124
+ - Refactoring branch
125
125
  artifact_versioning:
126
126
  inputs:
127
127
  - name: review
128
128
  pattern: "review.md | review-r{N}.md"
129
- rule: "读取最高轮次的审查产物,并校验其与 task.md Activity Log 中最近一条 Code Review 记录一致"
129
+ rule: "Read the highest-round review artifact and verify that it matches the latest Code Review entry in the task.md Activity Log"
130
130
  outputs:
131
131
  - name: refinement
132
132
  pattern: "refinement.md | refinement-r{N}.md"
133
- rule: "扫描现有修复产物;首轮创建 refinement.md,后续轮次创建 refinement-r{N}.mdN = 当前最高轮次 + 1"
133
+ rule: "Scan existing refinement artifacts; create refinement.md for the first round, then refinement-r{N}.md for later rounds (N = current highest round + 1)"
134
134
  outputs:
135
- - 包含修复的更新分支
136
- - 更新后的任务文件
135
+ - Updated branch with fixes
136
+ - Updated task file
137
137
 
138
138
  - name: commit
139
- description: 最终确认重构并创建拉取请求。
139
+ description: Finalize the refactoring and create a pull request.
140
140
  recommended_agents:
141
141
  - claude
142
142
  - human
143
143
  tasks:
144
- - 确保所有测试通过
145
- - 编写清晰的提交信息说明重构内容
146
- - 创建包含详细变更描述的拉取请求
147
- - PR 关联到相关 Issue
148
- - 将任务移至已完成
144
+ - Ensure all tests pass
145
+ - Write a clear commit message that explains the refactoring
146
+ - Create a pull request with a detailed change summary
147
+ - Link the PR to the relevant issue
148
+ - Move the task to completed
149
149
  inputs:
150
- - 最终重构分支
151
- - 任务文件
150
+ - Final refactoring branch
151
+ - Task file
152
152
  outputs:
153
- - 拉取请求
154
- - 已完成的任务文件(位于 .agent-workspace/completed/)
153
+ - Pull request
154
+ - Completed task file (stored in .agents/workspace/completed/)
@@ -151,4 +151,4 @@ steps:
151
151
  - 任务文件
152
152
  outputs:
153
153
  - 拉取请求
154
- - 已完成的任务文件(位于 .agent-workspace/completed/)
154
+ - 已完成的任务文件(位于 .agents/workspace/completed/)
@@ -5,7 +5,7 @@ This directory is the runtime workspace for multi-AI collaboration. All contents
5
5
  ## Directory Structure
6
6
 
7
7
  ```
8
- .agent-workspace/
8
+ .agents/workspace/
9
9
  active/ # Currently active tasks and handoff documents
10
10
  blocked/ # Tasks that are blocked and waiting for resolution
11
11
  completed/ # Completed tasks (kept for reference)
@@ -5,7 +5,7 @@
5
5
  ## 目录结构
6
6
 
7
7
  ```
8
- .agent-workspace/
8
+ .agents/workspace/
9
9
  active/ # 当前活跃的任务和交接文档
10
10
  blocked/ # 被阻塞的任务,等待解决
11
11
  completed/ # 已完成的任务(保留供参考)
@@ -153,10 +153,23 @@ Co-Authored-By: Claude <noreply@anthropic.com>
153
153
  This project supports Claude Code, Codex, Gemini CLI, OpenCode.
154
154
 
155
155
  - `.agents/` - Shared collaboration config
156
- - `.agent-workspace/` - Task workspace (git-ignored)
156
+ - `.agents/workspace/` - Task workspace (git-ignored)
157
157
 
158
158
  **Collaboration guide**: `.agents/README.md`
159
159
 
160
+ ## Skill Authoring Conventions
161
+
162
+ When writing or updating `.agents/skills/*/SKILL.md` files, keep step numbering consistent:
163
+
164
+ 1. Use consecutive integers for top-level steps: `1.`, `2.`, `3.`.
165
+ 2. Use nested numbering only for child actions that belong to a parent step: `1.1`, `1.2`, `2.1`.
166
+ 3. Use `a`, `b`, and `c` markers for branches, conditions, or alternative paths within the same step.
167
+ 4. Do not use intermediate numbers such as `1.5` or `2.5`; if a new standalone step is needed, renumber the following top-level steps.
168
+ 5. When renumbering, update every in-document step reference so the instructions remain accurate.
169
+ 6. Extract long bash scripts into a sibling `scripts/` directory; the SKILL.md should contain only a single-line invocation (e.g., `bash .agents/skills/<skill>/scripts/<script>.sh`) and a brief summary of the script's responsibilities.
170
+
171
+ <!-- Canonical source: .agents/README.md - keep in sync -->
172
+
160
173
  ## Security
161
174
 
162
175
  - Do not commit: `.env`, credentials, keys
@@ -153,10 +153,23 @@ Co-Authored-By: Claude <noreply@anthropic.com>
153
153
  本项目支持 Claude Code、Codex、Gemini CLI、OpenCode。
154
154
 
155
155
  - `.agents/` - 共享协作配置
156
- - `.agent-workspace/` - 任务工作区(已被 git ignore)
156
+ - `.agents/workspace/` - 任务工作区(已被 git ignore)
157
157
 
158
158
  **协作指南**:`.agents/README.md`
159
159
 
160
+ ## Skill 编写规范
161
+
162
+ 编写或维护 `.agents/skills/*/SKILL.md` 时,步骤编号遵循以下规则:
163
+
164
+ 1. 顶级步骤使用连续整数:`1.`、`2.`、`3.`。
165
+ 2. 只有父步骤下的从属动作才使用子步骤:`1.1`、`1.2`、`2.1`。
166
+ 3. 同一步中的分支、条件或多种可能性使用 `a`、`b`、`c` 标记。
167
+ 4. 不要使用 `1.5`、`2.5` 这类中间编号;如新增独立步骤,应整体顺延后续编号。
168
+ 5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
169
+ 6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
170
+
171
+ <!-- Canonical source: .agents/README.zh-CN.md - keep in sync -->
172
+
160
173
  ## 安全注意事项
161
174
 
162
175
  - 不要提交:`.env`、credentials、密钥
@@ -0,0 +1,44 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ input=$(cat)
5
+ hook_command=$(
6
+ printf '%s' "$input" | node -e '
7
+ const chunks = [];
8
+ process.stdin.on("data", (chunk) => chunks.push(chunk));
9
+ process.stdin.on("end", () => {
10
+ try {
11
+ const payload = JSON.parse(Buffer.concat(chunks).toString());
12
+ process.stdout.write(payload.tool_input && payload.tool_input.command || "");
13
+ } catch (error) {
14
+ process.stdout.write("");
15
+ }
16
+ });
17
+ ' 2>/dev/null
18
+ ) || true
19
+
20
+ case "$hook_command" in
21
+ git\ commit | git\ commit\ *) ;;
22
+ *) exit 0 ;;
23
+ esac
24
+
25
+ script_dir=$(
26
+ CDPATH= cd -- "$(dirname -- "$0")" && pwd
27
+ )
28
+ repo_root=$(
29
+ CDPATH= cd -- "$script_dir/../.." && pwd
30
+ )
31
+
32
+ if sh "$repo_root/.github/hooks/check-version-format.sh"; then
33
+ echo "Claude hook: version check passed."
34
+ exit 0
35
+ else
36
+ status=$?
37
+ fi
38
+
39
+ if [ "$status" -eq 1 ]; then
40
+ echo "Claude hook: blocking git commit (version format error)."
41
+ exit 2
42
+ fi
43
+
44
+ exit "$status"
@@ -16,5 +16,19 @@
16
16
  "Bash(sudo rm:*)",
17
17
  "Bash(rm -rf /:*)"
18
18
  ]
19
+ },
20
+ "hooks": {
21
+ "PreToolUse": [
22
+ {
23
+ "matcher": "Bash",
24
+ "hooks": [
25
+ {
26
+ "type": "command",
27
+ "command": "sh .claude/hooks/check-version-format.sh",
28
+ "timeout": 5
29
+ }
30
+ ]
31
+ }
32
+ ]
19
33
  }
20
34
  }
@@ -131,9 +131,9 @@ Each step should do one thing. If a step is too complex, break it into sub-steps
131
131
  1. **Verify task exists**
132
132
 
133
133
  Search for the task file:
134
- - `.agent-workspace/active/{task-id}/task.md`
135
- - `.agent-workspace/blocked/{task-id}/task.md`
136
- - `.agent-workspace/completed/{task-id}/task.md`
134
+ - `.agents/workspace/active/{task-id}/task.md`
135
+ - `.agents/workspace/blocked/{task-id}/task.md`
136
+ - `.agents/workspace/completed/{task-id}/task.md`
137
137
 
138
138
  If not found, respond:
139
139
  "Task {task-id} not found. Please check the task ID."
@@ -157,9 +157,9 @@ Do NOT silently continue.
157
157
 
158
158
  ```markdown
159
159
  Search for the task in this order:
160
- 1. `.agent-workspace/active/{task-id}/task.md`
161
- 2. `.agent-workspace/blocked/{task-id}/task.md`
162
- 3. `.agent-workspace/completed/{task-id}/task.md`
160
+ 1. `.agents/workspace/active/{task-id}/task.md`
161
+ 2. `.agents/workspace/blocked/{task-id}/task.md`
162
+ 3. `.agents/workspace/completed/{task-id}/task.md`
163
163
  ```
164
164
 
165
165
  ### Status update pattern