@fitlab-ai/agent-infra 0.4.1 → 0.4.3

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 (142) hide show
  1. package/README.md +44 -44
  2. package/README.zh-CN.md +44 -44
  3. package/lib/defaults.json +7 -9
  4. package/lib/init.js +1 -0
  5. package/lib/update.js +13 -1
  6. package/package.json +3 -3
  7. package/templates/.agents/QUICKSTART.md +7 -7
  8. package/templates/.agents/QUICKSTART.zh-CN.md +13 -13
  9. package/templates/.agents/README.md +31 -18
  10. package/templates/.agents/README.zh-CN.md +33 -20
  11. package/templates/.agents/rules/issue-sync.md +185 -0
  12. package/templates/.agents/rules/issue-sync.zh-CN.md +185 -0
  13. package/templates/.agents/scripts/validate-artifact.js +1280 -0
  14. package/templates/.agents/skills/analyze-task/SKILL.md +24 -1
  15. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +24 -1
  16. package/templates/.agents/skills/analyze-task/config/verify.json +41 -0
  17. package/templates/.agents/skills/archive-tasks/SKILL.md +40 -0
  18. package/templates/.agents/skills/archive-tasks/SKILL.zh-CN.md +40 -0
  19. package/templates/.agents/skills/archive-tasks/scripts/archive-tasks.sh +403 -0
  20. package/templates/.agents/skills/block-task/SKILL.md +25 -37
  21. package/templates/.agents/skills/block-task/SKILL.zh-CN.md +25 -37
  22. package/templates/.agents/skills/block-task/config/verify.json +28 -0
  23. package/templates/.agents/skills/close-codescan/SKILL.md +7 -0
  24. package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +7 -0
  25. package/templates/.agents/skills/close-dependabot/SKILL.md +7 -0
  26. package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +7 -0
  27. package/templates/.agents/skills/commit/SKILL.md +17 -0
  28. package/templates/.agents/skills/commit/SKILL.zh-CN.md +17 -0
  29. package/templates/.agents/skills/commit/config/verify.json +22 -0
  30. package/templates/.agents/skills/commit/reference/task-status-update.md +3 -3
  31. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +3 -3
  32. package/templates/.agents/skills/complete-task/SKILL.md +24 -10
  33. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +24 -10
  34. package/templates/.agents/skills/complete-task/config/verify.json +30 -0
  35. package/templates/.agents/skills/create-issue/SKILL.md +41 -5
  36. package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +41 -5
  37. package/templates/.agents/skills/create-issue/config/verify.json +27 -0
  38. package/templates/.agents/skills/create-issue/reference/label-and-type.md +10 -11
  39. package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +10 -11
  40. package/templates/.agents/skills/create-pr/SKILL.md +59 -16
  41. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +59 -16
  42. package/templates/.agents/skills/create-pr/config/verify.json +26 -0
  43. package/templates/.agents/skills/create-pr/reference/branch-strategy.md +3 -3
  44. package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +3 -3
  45. package/templates/.agents/skills/{sync-pr → create-pr}/reference/comment-publish.md +6 -6
  46. package/templates/.agents/skills/{sync-pr → create-pr}/reference/comment-publish.zh-CN.md +10 -10
  47. package/templates/.agents/skills/create-pr/reference/pr-body-template.md +15 -6
  48. package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +15 -6
  49. package/templates/.agents/skills/create-task/SKILL.md +25 -3
  50. package/templates/.agents/skills/create-task/SKILL.zh-CN.md +25 -3
  51. package/templates/.agents/skills/create-task/config/verify.json +24 -0
  52. package/templates/.agents/skills/implement-task/SKILL.md +44 -8
  53. package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +44 -8
  54. package/templates/.agents/skills/implement-task/config/verify.json +41 -0
  55. package/templates/.agents/skills/implement-task/reference/branch-management.md +48 -0
  56. package/templates/.agents/skills/implement-task/reference/branch-management.zh-CN.md +49 -0
  57. package/templates/.agents/skills/implement-task/reference/output-template.md +20 -0
  58. package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +20 -0
  59. package/templates/.agents/skills/import-codescan/SKILL.md +18 -7
  60. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +18 -7
  61. package/templates/.agents/skills/import-codescan/config/verify.json +24 -0
  62. package/templates/.agents/skills/import-dependabot/SKILL.md +18 -7
  63. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +18 -7
  64. package/templates/.agents/skills/import-dependabot/config/verify.json +24 -0
  65. package/templates/.agents/skills/import-issue/SKILL.md +19 -1
  66. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +19 -1
  67. package/templates/.agents/skills/import-issue/config/verify.json +27 -0
  68. package/templates/.agents/skills/init-labels/SKILL.md +40 -10
  69. package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +40 -10
  70. package/templates/.agents/skills/init-labels/scripts/init-labels.sh +1 -22
  71. package/templates/.agents/skills/init-milestones/SKILL.md +13 -0
  72. package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +13 -0
  73. package/templates/.agents/skills/plan-task/SKILL.md +29 -75
  74. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +29 -75
  75. package/templates/.agents/skills/plan-task/config/verify.json +42 -0
  76. package/templates/.agents/skills/refine-task/SKILL.md +51 -4
  77. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +51 -4
  78. package/templates/.agents/skills/refine-task/config/verify.json +37 -0
  79. package/templates/.agents/skills/refine-title/SKILL.md +10 -2
  80. package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +10 -2
  81. package/templates/.agents/skills/restore-task/SKILL.md +159 -0
  82. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +159 -0
  83. package/templates/.agents/skills/restore-task/config/verify.json +24 -0
  84. package/templates/.agents/skills/review-task/SKILL.md +25 -1
  85. package/templates/.agents/skills/review-task/SKILL.zh-CN.md +25 -1
  86. package/templates/.agents/skills/review-task/config/verify.json +40 -0
  87. package/templates/.agents/skills/update-agent-infra/SKILL.md +11 -0
  88. package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +11 -0
  89. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +8 -10
  90. package/templates/.claude/commands/archive-tasks.md +9 -0
  91. package/templates/.claude/commands/archive-tasks.zh-CN.md +9 -0
  92. package/templates/.claude/commands/create-pr.md +1 -1
  93. package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
  94. package/templates/.claude/commands/restore-task.md +9 -0
  95. package/templates/.claude/commands/restore-task.zh-CN.md +9 -0
  96. package/templates/.gemini/commands/_project_/archive-tasks.toml +10 -0
  97. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +10 -0
  98. package/templates/.gemini/commands/_project_/restore-task.toml +8 -0
  99. package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +8 -0
  100. package/templates/.github/workflows/status-label.yml +82 -0
  101. package/templates/.opencode/commands/archive-tasks.md +11 -0
  102. package/templates/.opencode/commands/archive-tasks.zh-CN.md +11 -0
  103. package/templates/.opencode/commands/restore-task.md +11 -0
  104. package/templates/.opencode/commands/restore-task.zh-CN.md +11 -0
  105. package/templates/.agents/skills/sync-issue/SKILL.md +0 -91
  106. package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +0 -91
  107. package/templates/.agents/skills/sync-issue/reference/comment-publish.md +0 -88
  108. package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +0 -88
  109. package/templates/.agents/skills/sync-issue/reference/delivery-detection.md +0 -42
  110. package/templates/.agents/skills/sync-issue/reference/delivery-detection.zh-CN.md +0 -42
  111. package/templates/.agents/skills/sync-issue/reference/label-sync.md +0 -63
  112. package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +0 -63
  113. package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +0 -37
  114. package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +0 -37
  115. package/templates/.agents/skills/sync-pr/SKILL.md +0 -72
  116. package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +0 -72
  117. package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +0 -54
  118. package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +0 -54
  119. package/templates/.claude/CLAUDE.md +0 -138
  120. package/templates/.claude/CLAUDE.zh-CN.md +0 -138
  121. package/templates/.claude/commands/sync-issue.md +0 -8
  122. package/templates/.claude/commands/sync-issue.zh-CN.md +0 -8
  123. package/templates/.claude/commands/sync-pr.md +0 -8
  124. package/templates/.claude/commands/sync-pr.zh-CN.md +0 -8
  125. package/templates/.claude/project-rules.md +0 -65
  126. package/templates/.claude/project-rules.zh-CN.md +0 -65
  127. package/templates/.codex/README.md +0 -38
  128. package/templates/.codex/README.zh-CN.md +0 -37
  129. package/templates/.gemini/commands/_project_/sync-issue.toml +0 -8
  130. package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +0 -8
  131. package/templates/.gemini/commands/_project_/sync-pr.toml +0 -8
  132. package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +0 -8
  133. package/templates/.opencode/COMMAND_STYLE_GUIDE.md +0 -232
  134. package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +0 -232
  135. package/templates/.opencode/README.md +0 -76
  136. package/templates/.opencode/README.zh-CN.md +0 -77
  137. package/templates/.opencode/commands/sync-issue.md +0 -11
  138. package/templates/.opencode/commands/sync-issue.zh-CN.md +0 -11
  139. package/templates/.opencode/commands/sync-pr.md +0 -11
  140. package/templates/.opencode/commands/sync-pr.zh-CN.md +0 -11
  141. package/templates/AGENTS.md +0 -112
  142. package/templates/AGENTS.zh-CN.md +0 -112
@@ -1,232 +0,0 @@
1
- # 命令编写风格指南
2
-
3
- 本指南定义了 `.opencode/commands/` 目录中 OpenCode 命令文件的编写规范。
4
-
5
- ## 文件格式
6
-
7
- 每个命令文件使用带 YAML 前置元数据的 Markdown 格式:
8
-
9
- ```markdown
10
- ---
11
- description: 简要描述
12
- agent: general
13
- subtask: false
14
- ---
15
-
16
- 命令指令内容。
17
- ```
18
-
19
- ### 前置元数据字段
20
-
21
- | 字段 | 必需 | 说明 |
22
- |------|------|------|
23
- | `description` | 是 | 一行摘要(80 字符以内) |
24
- | `agent` | 是 | 除非有专门代理,否则为 `general` |
25
- | `subtask` | 是 | 顶层命令为 `false` |
26
-
27
- ## 可执行命令 vs 代码块
28
-
29
- ### 使用 `!` 前缀标记必须执行的命令
30
-
31
- ```markdown
32
- !date -u +"%Y-%m-%dT%H:%M:%SZ"
33
- !git status --short
34
- !gh issue view 123 --json number,title,body
35
- ```
36
-
37
- `!` 前缀告诉 OpenCode 直接运行该命令。适用于:
38
- - 获取动态信息(时间戳、git 状态)
39
- - 执行操作(创建文件、调用 API)
40
- - 运行构建/测试命令
41
-
42
- ### 使用 markdown 代码块展示说明性示例
43
-
44
- ````markdown
45
- 预期输出格式:
46
- ```
47
- Task ID: TASK-20260101-120000
48
- Status: active
49
- ```
50
- ````
51
-
52
- 代码块不会被执行。适用于:
53
- - 展示预期输出格式
54
- - 记录模板
55
- - 说明 AI 应遵循的模式
56
-
57
- ## 参数处理
58
-
59
- ### 位置参数
60
-
61
- 通过 `$ARGUMENTS` 引用:
62
-
63
- ```markdown
64
- 从 `$ARGUMENTS` 中解析任务 ID。
65
- ```
66
-
67
- ### 验证
68
-
69
- 始终在早期验证必需参数:
70
-
71
- ```markdown
72
- 如果 `$ARGUMENTS` 为空,回复:
73
- "请提供任务 ID。示例:/check-task TASK-20260101-120000"
74
- 然后 STOP。
75
- ```
76
-
77
- ## 时间戳处理
78
-
79
- **绝对不要**硬编码日期或年份。
80
-
81
- 正确做法:
82
- ```markdown
83
- !date -u +"%Y-%m-%dT%H:%M:%SZ"
84
- ```
85
-
86
- 错误做法:
87
- ```markdown
88
- 将日期设为 2026-03-06。
89
- ```
90
-
91
- ## GitHub API 路径
92
-
93
- **始终**使用 `{owner}/{repo}` 占位符。动态解析:
94
-
95
- ```markdown
96
- !gh api repos/{owner}/{repo}/dependabot/alerts/$ARGUMENTS
97
- ```
98
-
99
- 获取 owner/repo:
100
- ```markdown
101
- !gh repo view --json owner,name -q '.owner.login + "/" + .name'
102
- ```
103
-
104
- ## 步骤编号和可读性
105
-
106
- ### 使用编号标记顺序操作
107
-
108
- ```markdown
109
- ## 步骤
110
-
111
- 1. **验证输入** - 检查是否提供了任务 ID。
112
-
113
- 2. **读取任务文件** - 查找并读取 task.md 文件。
114
-
115
- 3. **更新状态** - 修改任务元数据。
116
- ```
117
-
118
- ### 使用粗体标记步骤标题
119
-
120
- 每个步骤应有清晰的粗体标题,后跟描述。
121
-
122
- ### 保持步骤原子化
123
-
124
- 每个步骤只做一件事。如果步骤太复杂,拆分为子步骤。
125
-
126
- ## 错误处理模式
127
-
128
- ### 在操作前检查前置条件
129
-
130
- ```markdown
131
- 1. **验证任务存在**
132
-
133
- 按以下顺序搜索任务文件:
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
-
138
- 如果未找到,回复:
139
- "任务 {task-id} 不存在,请检查任务 ID。"
140
- 然后 STOP。
141
- ```
142
-
143
- ### 清晰地报告错误
144
-
145
- ```markdown
146
- 如果命令失败,报告:
147
- - 出了什么问题
148
- - 可能的原因
149
- - 建议的后续步骤
150
-
151
- 不要静默继续。
152
- ```
153
-
154
- ## 常见模式
155
-
156
- ### 任务文件查找模式
157
-
158
- ```markdown
159
- 按以下顺序搜索任务:
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
- ```
164
-
165
- ### 状态更新模式
166
-
167
- ```markdown
168
- 更新 `task.md` YAML 前置元数据:
169
- - `current_step`: {步骤名}
170
- - `assigned_to`: opencode
171
- - `updated_at`: {通过 date 命令获取的当前时间戳}
172
- ```
173
-
174
- ### 下一步建议模式
175
-
176
- ```markdown
177
- **下一步:**
178
- 使用 `/plan-task {task-id}` 设计技术方案。
179
- ```
180
-
181
- ## 反模式
182
-
183
- ### 不要
184
-
185
- - 硬编码日期、年份或时间戳
186
- - 在 API 路径中硬编码仓库 owner/name
187
- - 跳过参数验证
188
- - 未经用户确认就自动提交
189
- - 使用特定工具语法(如 Claude 的 Read/Edit/Write 工具名)
190
- - 引用特定技术栈的命令但不加 TODO 标记
191
- - 在命令文件中使用 emoji(保持专业)
192
- - 写过长的步骤——应该拆分
193
-
194
- ### 要
195
-
196
- - 对所有可执行命令使用 `!` 前缀
197
- - 在继续之前验证参数
198
- - 提供清晰的错误消息
199
- - 在错误条件后包含 "STOP"
200
- - 保持命令简洁且易于浏览
201
- - 对项目特定的值使用占位符
202
- - 对技术栈特定的部分添加 TODO 标记
203
-
204
- ## 技术栈无关的命令
205
-
206
- 对于依赖项目技术栈的命令(构建工具、测试运行器、包管理器),使用 TODO 标记:
207
-
208
- ```markdown
209
- 3. **运行测试**
210
-
211
- <!-- TODO: Replace with your project's test command -->
212
- !npm test
213
- ```
214
-
215
- 这告诉用户需要根据自己的项目定制该命令。
216
-
217
- ## 命令审查清单
218
-
219
- 提交新命令前,请验证:
220
-
221
- - [ ] 前置元数据包含 `description`、`agent` 和 `subtask`
222
- - [ ] 所有可执行命令使用 `!` 前缀
223
- - [ ] 所有说明性示例使用代码块(无 `!`)
224
- - [ ] 参数已验证,有清晰的错误消息
225
- - [ ] 时间戳动态生成
226
- - [ ] GitHub API 路径使用 `{owner}/{repo}` 占位符
227
- - [ ] 步骤已编号且有粗体标题
228
- - [ ] 错误情况使用 "STOP" 指令处理
229
- - [ ] 无硬编码的日期、仓库名或工具特定引用
230
- - [ ] 技术栈特定的部分有 TODO 标记
231
- - [ ] 已创建英文和中文两个版本
232
- - [ ] 命令简洁——无多余的描述
@@ -1,76 +0,0 @@
1
- # OpenCode Commands
2
-
3
- This directory contains command files for [OpenCode](https://opencode.ai), an AI-powered coding assistant.
4
-
5
- ## Structure
6
-
7
- ```
8
- .opencode/
9
- README.md # This file
10
- COMMAND_STYLE_GUIDE.md # Guide for writing commands
11
- commands/
12
- {command}.md # English command files
13
- {command}.zh-CN.md # Chinese command files
14
- ```
15
-
16
- ## Command Format
17
-
18
- Each command file uses Markdown with YAML frontmatter:
19
-
20
- ```markdown
21
- ---
22
- description: Brief description of what the command does
23
- agent: general
24
- subtask: false
25
- ---
26
-
27
- Step-by-step instructions for the AI agent.
28
- Use `!` prefix for shell commands that should be executed directly.
29
- Use markdown code blocks for illustrative examples that should NOT be auto-executed.
30
- ```
31
-
32
- ## Available Commands
33
-
34
- ### Project Setup
35
- - `update-agent-infra` - Update project configuration
36
-
37
- ### Development
38
- - `commit` - Commit current changes to Git
39
- - `test` - Run unit tests (TODO: tech-stack specific)
40
- - `test-integration` - Run integration tests (TODO: tech-stack specific)
41
-
42
- ### Task Management
43
- - `create-task` - Create a task from natural language description
44
- - `import-issue` - Import a GitHub Issue as a task
45
- - `analyze-task` - Analyze task requirements
46
- - `plan-task` - Design a technical plan for a task
47
- - `implement-task` - Implement a task based on the plan
48
- - `review-task` - Review task implementation
49
- - `refine-task` - Address review feedback
50
- - `complete-task` - Mark task as completed and archive
51
- - `check-task` - Check task status
52
- - `block-task` - Mark task as blocked
53
-
54
- ### Pull Requests and Sync
55
- - `create-pr` - Create a Pull Request
56
- - `sync-pr` - Sync task progress to PR comments
57
- - `sync-issue` - Sync task progress to Issue comments
58
-
59
- ### Security
60
- - `import-dependabot` - Import Dependabot alerts
61
- - `close-dependabot` - Close Dependabot alerts
62
- - `import-codescan` - Import Code Scanning alerts
63
- - `close-codescan` - Close Code Scanning alerts
64
-
65
- ### Release and Maintenance
66
- - `release` - Create a release (TODO: tech-stack specific)
67
- - `create-release-note` - Generate release notes
68
- - `refine-title` - Refine Issue/PR titles
69
- - `upgrade-dependency` - Upgrade a dependency (TODO: tech-stack specific)
70
-
71
- ## Conventions
72
-
73
- - Commands are **tool-agnostic** and **tech-stack agnostic**
74
- - Commands with `TODO` markers require project-specific customization
75
- - All timestamps are generated dynamically (never hardcoded)
76
- - GitHub API paths use `{owner}/{repo}` placeholders
@@ -1,77 +0,0 @@
1
- # OpenCode 命令
2
-
3
- 本目录包含 [OpenCode](https://opencode.ai) AI 编码助手的命令文件。
4
-
5
- ## 目录结构
6
-
7
- ```
8
- .opencode/
9
- README.md # 英文说明
10
- README.zh-CN.md # 本文件
11
- COMMAND_STYLE_GUIDE.md # 命令编写指南
12
- commands/
13
- {command}.md # 英文命令文件
14
- {command}.zh-CN.md # 中文命令文件
15
- ```
16
-
17
- ## 命令格式
18
-
19
- 每个命令文件使用带 YAML 前置元数据的 Markdown 格式:
20
-
21
- ```markdown
22
- ---
23
- description: 命令功能的简要描述
24
- agent: general
25
- subtask: false
26
- ---
27
-
28
- AI 代理的分步指令。
29
- 使用 `!` 前缀标记需要直接执行的 shell 命令。
30
- 使用 markdown 代码块展示不需要自动执行的示例。
31
- ```
32
-
33
- ## 可用命令
34
-
35
- ### 项目设置
36
- - `update-agent-infra` - 更新项目配置
37
-
38
- ### 开发
39
- - `commit` - 提交当前变更到 Git
40
- - `test` - 运行单元测试(TODO: 需适配技术栈)
41
- - `test-integration` - 运行集成测试(TODO: 需适配技术栈)
42
-
43
- ### 任务管理
44
- - `create-task` - 从自然语言描述创建任务
45
- - `import-issue` - 导入 GitHub Issue 为任务
46
- - `analyze-task` - 分析任务需求
47
- - `plan-task` - 为任务设计技术方案
48
- - `implement-task` - 根据方案实施任务
49
- - `review-task` - 审查任务实现
50
- - `refine-task` - 处理审查反馈
51
- - `complete-task` - 标记任务完成并归档
52
- - `check-task` - 查看任务状态
53
- - `block-task` - 标记任务为阻塞
54
-
55
- ### PR 和同步
56
- - `create-pr` - 创建 Pull Request
57
- - `sync-pr` - 同步任务进度到 PR 评论
58
- - `sync-issue` - 同步任务进度到 Issue 评论
59
-
60
- ### 安全
61
- - `import-dependabot` - 导入 Dependabot 告警
62
- - `close-dependabot` - 关闭 Dependabot 告警
63
- - `import-codescan` - 导入 Code Scanning 告警
64
- - `close-codescan` - 关闭 Code Scanning 告警
65
-
66
- ### 发布和维护
67
- - `release` - 创建发布版本(TODO: 需适配技术栈)
68
- - `create-release-note` - 生成发布说明
69
- - `refine-title` - 优化 Issue/PR 标题
70
- - `upgrade-dependency` - 升级依赖(TODO: 需适配技术栈)
71
-
72
- ## 约定
73
-
74
- - 命令是**工具无关**和**技术栈无关**的
75
- - 带 `TODO` 标记的命令需要根据项目具体技术栈进行定制
76
- - 所有时间戳动态生成(禁止硬编码)
77
- - GitHub API 路径使用 `{owner}/{repo}` 占位符
@@ -1,11 +0,0 @@
1
- ---
2
- description: "Sync task progress to a GitHub Issue"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- Sync task $1 to Issue.
8
-
9
- Read and execute the sync-issue skill from `.agents/skills/sync-issue/SKILL.md`.
10
-
11
- Follow all steps defined in the skill exactly.
@@ -1,11 +0,0 @@
1
- ---
2
- description: "将任务进度同步到 GitHub Issue"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- 同步任务 $1 到 Issue。
8
-
9
- 读取并执行 `.agents/skills/sync-issue/SKILL.md` 中的 sync-issue 技能。
10
-
11
- 严格按照技能中定义的所有步骤执行。
@@ -1,11 +0,0 @@
1
- ---
2
- description: "Sync task progress to a Pull Request"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- Sync task $1 to PR.
8
-
9
- Read and execute the sync-pr skill from `.agents/skills/sync-pr/SKILL.md`.
10
-
11
- Follow all steps defined in the skill exactly.
@@ -1,11 +0,0 @@
1
- ---
2
- description: "将任务进度同步到 Pull Request"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- 同步任务 $1 到 PR。
8
-
9
- 读取并执行 `.agents/skills/sync-pr/SKILL.md` 中的 sync-pr 技能。
10
-
11
- 严格按照技能中定义的所有步骤执行。
@@ -1,112 +0,0 @@
1
- # agent-infra - AI Development Guide
2
-
3
- This repository contains the agent-infra template and skill repository for multi-AI collaboration infrastructure.
4
-
5
- ## Quick Start Commands
6
-
7
- <!-- TODO: Add your project's build commands here -->
8
- ```bash
9
- # Example (replace with your project's commands):
10
- # npm install / mvn clean install / pip install -r requirements.txt
11
- # npm run build / mvn package / make build
12
- # npm test / mvn test / pytest
13
- # npm run lint / mvn checkstyle:check / flake8
14
- ```
15
-
16
- ## Coding Standards (Required)
17
-
18
- <!-- TODO: Add your project's coding standards here -->
19
-
20
- ### Copyright Header Update Rules
21
- When modifying any file with a copyright header, you must update the copyright year:
22
- 1. Run `date +%Y` to get the current year (never hardcode)
23
- 2. Update format example (assuming current year is 2026):
24
- - `2024-2025` -> `2024-2026`
25
- - `2024` -> `2024-2026`
26
-
27
- ### Branch Naming
28
- Use project prefix: `{{project}}-feature-xxx`, `{{project}}-bugfix-yyy`
29
-
30
- ## Project Structure
31
-
32
- <!-- TODO: Add your project's directory structure here -->
33
-
34
- ## Testing Requirements
35
-
36
- <!-- TODO: Add your project's test framework and commands here -->
37
-
38
- ## Commit and PR Conventions
39
-
40
- ### Commit Message Format (Conventional Commits)
41
- ```
42
- <type>(<scope>): <subject>
43
-
44
- Examples:
45
- feat(module): add new feature
46
- fix(module): fix critical bug
47
- docs(module): update documentation
48
- refactor(module): refactor internal logic
49
- ```
50
-
51
- - **type**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
52
- - **scope**: module name (optional)
53
- - **subject**: English, imperative mood, max 50 characters
54
-
55
- ### PR Checklist
56
- Before submitting a PR, ensure:
57
- - [ ] All tests pass
58
- - [ ] Lint checks pass
59
- - [ ] Build succeeds
60
- - [ ] Public APIs have documentation
61
- - [ ] Copyright headers updated (if applicable)
62
-
63
- ## Security Notes
64
-
65
- - Do not commit sensitive files: `.env`, `credentials.json`, keys, etc.
66
- - Handle security issues privately according to your project's disclosure policy (do not open public Issues)
67
-
68
- ## Multi-AI Collaboration Support
69
-
70
- This project supports Claude Code, Codex, Gemini CLI, OpenCode and other AI tools working together.
71
-
72
- **Collaboration config directory**:
73
- - `.agents/` - AI configuration and workflow definitions (version controlled)
74
-
75
- **Language conventions**:
76
-
77
- All code-level content uses **English**. Documentation provides **multilingual versions** (English as primary).
78
-
79
- | Context | Language | Notes |
80
- |---------|----------|-------|
81
- | Code identifiers, JSDoc/TSDoc | English | Code is documentation |
82
- | CLI help text, error messages | English | For all users |
83
- | Git commit messages | English | Conventional Commits imperative mood |
84
- | Project documentation | English (primary) + Chinese translation | e.g. `README.md` + `README.zh-CN.md` |
85
- | AI responses | Follow user's input language | Chinese question -> Chinese answer |
86
-
87
- <!-- TODO: Add your project's tech stack here -->
88
-
89
- ## Skill Authoring Conventions
90
-
91
- When writing or updating `.agents/skills/*/SKILL.md` files and their templates, keep step numbering consistent:
92
-
93
- 1. Use consecutive integers for top-level steps: `1.`, `2.`, `3.`.
94
- 2. Use nested numbering only for child actions that belong to a parent step: `1.1`, `1.2`, `2.1`.
95
- 3. Use `a`, `b`, and `c` markers for subordinate options, conditional branches, or parallel possibilities within the same step; use them only for in-step expansion, not for naming standalone decision paths or output templates.
96
- 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.
97
- 5. When renumbering, update every in-document step reference so the instructions remain accurate.
98
- 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.
99
- 7. In SKILL.md files and their `reference/` templates, when a standalone conditional flow, decision path, or output template needs a label, use "Scenario" naming (for example, use "Scenario A").
100
-
101
- ### SKILL.md Size Control
102
-
103
- - Keep the SKILL.md body within about 500 tokens (roughly 80 lines / 2KB).
104
- - Move content beyond that threshold into a sibling `reference/` directory.
105
- - Use explicit navigation in the skeleton, such as: `Read reference/xxx.md before executing this step.`
106
- - Keep scripts in `scripts/` and execute them instead of inlining long bash blocks.
107
-
108
- <!-- Canonical source: .agents/README.md - keep in sync -->
109
-
110
- ---
111
-
112
- **Based on standard**: [AGENTS.md](https://agents.md) (Linux Foundation AAIF)
@@ -1,112 +0,0 @@
1
- # agent-infra - AI 开发指南
2
-
3
- 本仓库包含 agent-infra 模板和技能仓库,用于多 AI 协作基础设施。
4
-
5
- ## 快速开始命令
6
-
7
- <!-- TODO: 在此添加你的项目构建命令 -->
8
- ```bash
9
- # 示例(替换为你的项目命令):
10
- # npm install / mvn clean install / pip install -r requirements.txt
11
- # npm run build / mvn package / make build
12
- # npm test / mvn test / pytest
13
- # npm run lint / mvn checkstyle:check / flake8
14
- ```
15
-
16
- ## 编码规范(必须遵守)
17
-
18
- <!-- TODO: 在此添加你的项目编码规范 -->
19
-
20
- ### 版权头更新规则
21
- 修改任意带版权头的文件时,必须更新版权年份:
22
- 1. 先运行 `date +%Y` 获取当前年份(不要硬编码)
23
- 2. 更新格式示例(假设当前年份为 2026):
24
- - `2024-2025` -> `2024-2026`
25
- - `2024` -> `2024-2026`
26
-
27
- ### 分支命名
28
- 使用项目前缀:`{{project}}-feature-xxx`、`{{project}}-bugfix-yyy`
29
-
30
- ## 项目结构
31
-
32
- <!-- TODO: 在此添加你的项目目录结构 -->
33
-
34
- ## 测试要求
35
-
36
- <!-- TODO: 在此添加你的项目测试框架和命令 -->
37
-
38
- ## 提交与 PR 规范
39
-
40
- ### 提交信息格式(Conventional Commits)
41
- ```
42
- <type>(<scope>): <subject>
43
-
44
- 示例:
45
- feat(module): add new feature
46
- fix(module): fix critical bug
47
- docs(module): update documentation
48
- refactor(module): refactor internal logic
49
- ```
50
-
51
- - **type**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
52
- - **scope**: 模块名(可省略)
53
- - **subject**: 英文,简洁祈使语气,不超过 50 字符
54
-
55
- ### PR 检查清单
56
- 提交 PR 前必须确保:
57
- - [ ] 所有测试通过
58
- - [ ] 代码检查通过
59
- - [ ] 构建成功
60
- - [ ] 公共 API 有文档
61
- - [ ] 版权头年份已更新(如适用)
62
-
63
- ## 安全注意事项
64
-
65
- - 不要提交敏感文件:`.env`, `credentials.json`, 密钥等
66
- - 安全问题请按项目自己的披露流程私下处理(不要公开 Issue)
67
-
68
- ## 多 AI 协作支持
69
-
70
- 本项目支持 Claude Code、Codex、Gemini CLI、OpenCode 等多个 AI 工具协同工作。
71
-
72
- **协作配置目录**:
73
- - `.agents/` - AI 配置和工作流定义(版本控制)
74
-
75
- **语言规范**:
76
-
77
- 项目代码层面统一使用**英文**,文档提供**多语言版本**(英文为主版本)。
78
-
79
- | 场景 | 语言 | 说明 |
80
- |------|------|------|
81
- | 代码标识符、JSDoc/TSDoc | 英文 | 代码即文档 |
82
- | CLI 帮助文本、错误信息 | 英文 | 面向所有用户 |
83
- | Git commit message | 英文 | Conventional Commits 祈使语气 |
84
- | 项目文档 | 英文(主) + 中文翻译 | 如 `README.md` + `README.zh-CN.md` |
85
- | AI 回复 | 跟随用户输入语言 | 中文问→中文答 |
86
-
87
- <!-- TODO: 在此添加你的项目技术栈 -->
88
-
89
- ## Skill 编写规范
90
-
91
- 编写或维护 `.agents/skills/*/SKILL.md` 及其模板时,步骤编号遵循以下规则:
92
-
93
- 1. 顶级步骤使用连续整数:`1.`、`2.`、`3.`。
94
- 2. 只有父步骤下的从属动作才使用子步骤:`1.1`、`1.2`、`2.1`。
95
- 3. 同一步中的从属选项、条件分支或并列可能性使用 `a`、`b`、`c` 标记;仅用于步骤内部的子项展开,不用于命名独立的决策路径或输出模板。
96
- 4. 不要使用 `1.5`、`2.5` 这类中间编号;如新增独立步骤,应整体顺延后续编号。
97
- 5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
98
- 6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
99
- 7. 在 SKILL.md 及其 `reference/` 模板中,如需为独立的条件分流、决策路径或输出模板命名,统一使用“场景”命名(例如使用“场景 A”)。
100
-
101
- ### SKILL.md 体积控制
102
-
103
- - SKILL.md 正文控制在约 500 tokens(约 80 行 / 2KB)以内。
104
- - 超过阈值的内容拆分到同级 `reference/` 目录。
105
- - 骨架中使用明确导航,例如:`执行此步骤前,先读取 reference/xxx.md。`
106
- - 长脚本继续放在 `scripts/` 目录,优先执行脚本而不是内联大段 bash。
107
-
108
- <!-- Canonical source: .agents/README.zh-CN.md - keep in sync -->
109
-
110
- ---
111
-
112
- **基于标准**: [AGENTS.md](https://agents.md) (Linux Foundation AAIF)