@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
@@ -2,8 +2,8 @@
2
2
  /**
3
3
  * sync-templates.js — Deterministic template sync for managed & ejected files.
4
4
  *
5
- * Handles SKILL steps: 2 (git pull), 3.0 (registry sync), 4 (managed),
6
- * 6 (ejected), 7 (.airc.json update).
5
+ * Handles SKILL steps: 2 (detect template source version), 3.0 (registry sync), 4 (managed),
6
+ * 6 (ejected), 7 (.agents/.airc.json update).
7
7
  *
8
8
  * Merged files (step 5) are NOT handled — they require AI semantic merge.
9
9
  * The report includes `merged.pending` so the AI knows what to process.
@@ -16,39 +16,19 @@
16
16
 
17
17
  import childProcess from 'node:child_process';
18
18
  import fs from 'node:fs';
19
- import os from 'node:os';
20
19
  import path from 'node:path';
21
20
  import { fileURLToPath } from 'node:url';
22
21
 
23
- // Keep these helpers aligned with lib/paths.js for clone installs.
24
- function resolveInstallDir() {
25
- return path.join(os.homedir(), '.agent-infra');
26
- }
27
-
28
- function resolveTemplateDir() {
29
- const clonePath = path.join(resolveInstallDir(), 'templates');
30
- if (fs.existsSync(clonePath)) {
31
- return clonePath;
32
- }
33
-
34
- return null;
35
- }
36
-
37
22
  const DEFAULTS = {
38
23
  "files": {
39
24
  "managed": [
40
25
  ".agents/skills/",
41
26
  ".agents/templates/",
42
27
  ".agents/workflows/",
43
- ".agent-workspace/README.md",
28
+ ".agents/workspace/README.md",
44
29
  ".claude/commands/",
45
- ".editorconfig",
30
+ ".claude/hooks/",
46
31
  ".gemini/commands/",
47
- ".github/hooks/",
48
- ".github/ISSUE_TEMPLATE/",
49
- ".github/PULL_REQUEST_TEMPLATE.md",
50
- ".github/release.yml",
51
- ".github/workflows/pr-title-check.yml",
52
32
  ".opencode/commands/"
53
33
  ],
54
34
  "merged": [
@@ -67,20 +47,16 @@ const DEFAULTS = {
67
47
  ".claude/settings.json",
68
48
  ".codex/README.md",
69
49
  ".gemini/settings.json",
70
- ".github/dependabot.yml",
71
50
  ".gitignore",
72
- ".mailmap",
73
51
  ".opencode/COMMAND_STYLE_GUIDE.md",
74
52
  ".opencode/README.md",
75
- "AGENTS.md",
76
- "CONTRIBUTING.md",
77
- "SECURITY.md"
53
+ "AGENTS.md"
78
54
  ],
79
55
  "ejected": []
80
56
  }
81
57
  };
82
58
 
83
- const INSTALLER_VERSION = "0.3.1";
59
+ const INSTALLER_VERSION = "v0.4.0";
84
60
 
85
61
  function norm(p) { return p.replace(/\\/g, '/'); }
86
62
 
@@ -139,34 +115,17 @@ function renderPathname(p, project) {
139
115
  }
140
116
 
141
117
  function resolveProjectTemplateDir(projectRoot, templateSource) {
142
- const fallbackRoot = resolveTemplateDir();
118
+ if (!templateSource) return null;
143
119
 
144
- const candidates = [];
145
- if (templateSource) {
146
- if (path.isAbsolute(templateSource)) {
147
- candidates.push(templateSource);
148
- } else {
149
- if (fallbackRoot) {
150
- candidates.push(path.resolve(path.dirname(fallbackRoot), templateSource));
151
- }
152
- candidates.push(path.resolve(projectRoot, templateSource));
153
- }
154
- }
155
- if (fallbackRoot) {
156
- candidates.push(fallbackRoot);
157
- }
120
+ const candidate = path.isAbsolute(templateSource)
121
+ ? templateSource
122
+ : path.resolve(projectRoot, templateSource);
158
123
 
159
- for (const candidate of candidates) {
160
- try {
161
- if (fs.statSync(candidate).isDirectory()) {
162
- return candidate;
163
- }
164
- } catch {
165
- // Keep scanning until a valid directory is found.
166
- }
124
+ try {
125
+ return fs.statSync(candidate).isDirectory() ? candidate : null;
126
+ } catch {
127
+ return null;
167
128
  }
168
-
169
- return null;
170
129
  }
171
130
 
172
131
  function isBinary(fp) {
@@ -179,15 +138,6 @@ function isBinary(fp) {
179
138
  return false;
180
139
  }
181
140
 
182
- function fileModule(rel) {
183
- const p = norm(rel);
184
- if (p.startsWith('.github/')) return 'github';
185
- if (p.startsWith('.agents/') || p.startsWith('.claude/') ||
186
- p.startsWith('.gemini/') || p.startsWith('.opencode/') ||
187
- p.startsWith('.codex/') || p === 'AGENTS.md') return 'ai';
188
- return null;
189
- }
190
-
191
141
  function gitUrl(dir) {
192
142
  try {
193
143
  return childProcess.execSync('git remote get-url origin', {
@@ -196,9 +146,6 @@ function gitUrl(dir) {
196
146
  } catch { return null; }
197
147
  }
198
148
 
199
- // Public-facing docs should keep all available language variants in sync.
200
- const MULTI_LANG = new Set(['SECURITY.md']);
201
-
202
149
  function langSelect(rels, lang, allSet, project) {
203
150
  const sel = new Map();
204
151
 
@@ -227,44 +174,57 @@ function langSelect(rels, lang, allSet, project) {
227
174
  }
228
175
 
229
176
  function syncTemplates(projectRoot) {
230
- const cfgPath = path.join(projectRoot, '.airc.json');
177
+ const configDir = path.join(projectRoot, '.agents');
178
+ const cfgPath = path.join(configDir, '.airc.json');
179
+ const legacyCfgPaths = [
180
+ path.join(projectRoot, '.airc.json'),
181
+ path.join(projectRoot, '.agent-infra', 'config.json')
182
+ ];
183
+ const workspacePath = path.join(configDir, 'workspace');
184
+ const legacyWorkspacePaths = [
185
+ path.join(projectRoot, '.agent-workspace'),
186
+ path.join(projectRoot, '.agent-infra', 'workspace')
187
+ ];
188
+
231
189
  if (!fs.existsSync(cfgPath)) {
232
- return { error: 'No .airc.json in project root.' };
190
+ for (const legacyCfgPath of legacyCfgPaths) {
191
+ if (!fs.existsSync(legacyCfgPath)) continue;
192
+ fs.mkdirSync(configDir, { recursive: true });
193
+ fs.renameSync(legacyCfgPath, cfgPath);
194
+ break;
195
+ }
196
+ }
197
+ if (!fs.existsSync(workspacePath)) {
198
+ for (const legacyWorkspacePath of legacyWorkspacePaths) {
199
+ if (!fs.existsSync(legacyWorkspacePath)) continue;
200
+ fs.mkdirSync(configDir, { recursive: true });
201
+ fs.renameSync(legacyWorkspacePath, workspacePath);
202
+ break;
203
+ }
233
204
  }
234
205
 
235
- const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
236
- const templateRoot = resolveProjectTemplateDir(projectRoot, cfg.templateSource);
237
- if (!templateRoot) {
238
- return { error: 'Template source not found. Install: curl -fsSL https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/install.sh | sh' };
206
+ try {
207
+ const legacyConfigDir = path.join(projectRoot, '.agent-infra');
208
+ if (fs.existsSync(legacyConfigDir) && fs.readdirSync(legacyConfigDir).length === 0) {
209
+ fs.rmdirSync(legacyConfigDir);
210
+ }
211
+ } catch {
212
+ // Ignore cleanup failures for partially migrated directories.
239
213
  }
240
- const installDir = resolveInstallDir();
241
214
 
242
- const hasGit = fs.existsSync(path.join(installDir, '.git'));
243
- if (hasGit) {
244
- try { childProcess.execSync('git fetch --tags --quiet', { cwd: installDir, stdio: 'pipe' }); } catch { /* network */ }
215
+ if (!fs.existsSync(cfgPath)) {
216
+ return { error: 'No .agents/.airc.json in project root.' };
245
217
  }
246
218
 
247
- let version = 'unknown';
248
- if (hasGit) {
249
- let tagOutput;
250
- try {
251
- tagOutput = childProcess.execSync('git tag --sort=-v:refname', {
252
- cwd: installDir, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe']
253
- }).trim();
254
- } catch {
255
- return { error: 'Failed to list tags in agent-infra repository. Please check git installation.' };
256
- }
257
- const latestTag = tagOutput.split('\n')[0];
258
- if (!latestTag) {
259
- return { error: 'No tags found in agent-infra repository. This is unexpected — please reinstall.' };
260
- }
261
- try { childProcess.execFileSync('git', ['checkout', latestTag, '--quiet'], { cwd: installDir, stdio: 'pipe' }); } catch { /* ignore */ }
262
- version = latestTag;
263
- } else {
264
- version = INSTALLER_VERSION || version;
219
+ const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
220
+ const configPathRel = norm(path.relative(projectRoot, cfgPath));
221
+ const templateRoot = resolveProjectTemplateDir(projectRoot, cfg.templateSource);
222
+ if (!templateRoot) {
223
+ return { error: 'Template source not found. Install via npm: npm install -g @fitlab-ai/agent-infra' };
265
224
  }
225
+ const version = INSTALLER_VERSION;
266
226
 
267
- const { project, org, language: lang = 'en', modules = [] } = cfg;
227
+ const { project, org, language: lang = 'en' } = cfg;
268
228
  const vars = { project, org };
269
229
 
270
230
  const managed = [...(cfg.files.managed || [])];
@@ -275,7 +235,7 @@ function syncTemplates(projectRoot) {
275
235
  templateVersion: version,
276
236
  templateRoot: norm(templateRoot),
277
237
  registryAdded: [],
278
- managed: { written: [], created: [], unchanged: [], skippedMerged: [], skippedModule: [], removed: [] },
238
+ managed: { written: [], created: [], unchanged: [], skippedMerged: [], removed: [] },
279
239
  ejected: { created: [], skipped: [] },
280
240
  merged: { pending: [] },
281
241
  configUpdated: false,
@@ -292,8 +252,6 @@ function syncTemplates(projectRoot) {
292
252
 
293
253
  const allRels = walkDir(templateRoot).map(f => norm(path.relative(templateRoot, f)));
294
254
  const allSet = new Set(allRels);
295
- const modSet = new Set(modules);
296
-
297
255
  for (const entry of managed) {
298
256
  const isDir = entry.endsWith('/');
299
257
  let entryRels;
@@ -313,19 +271,11 @@ function syncTemplates(projectRoot) {
313
271
  if (!entryRels.length) continue;
314
272
  }
315
273
 
316
- const selected = MULTI_LANG.has(norm(entry))
317
- ? entryRels.map(r => [norm(renderPathname(r, project)), r])
318
- : langSelect(entryRels, lang, allSet, project);
274
+ const selected = langSelect(entryRels, lang, allSet, project);
319
275
 
320
276
  for (const [tgt, src] of selected) {
321
277
  if (expectedTargets) expectedTargets.add(tgt);
322
278
 
323
- const mod = fileModule(tgt);
324
- if (mod !== null && !modSet.has(mod)) {
325
- report.managed.skippedModule.push(tgt);
326
- continue;
327
- }
328
-
329
279
  if (matchesAny(tgt, merged) || matchesAny(tgt, ejected)) {
330
280
  report.managed.skippedMerged.push(tgt);
331
281
  continue;
@@ -364,11 +314,9 @@ function syncTemplates(projectRoot) {
364
314
  const projFiles = walkDir(projDir).map(f => norm(path.relative(projectRoot, f)));
365
315
  for (const projFile of projFiles) {
366
316
  if (expectedTargets.has(projFile)) continue;
317
+ if (projFile === configPathRel) continue;
367
318
  if (matchesAny(projFile, merged) || matchesAny(projFile, ejected)) continue;
368
319
 
369
- const mod = fileModule(projFile);
370
- if (mod !== null && !modSet.has(mod)) continue;
371
-
372
320
  fs.unlinkSync(path.join(projectRoot, projFile));
373
321
  report.managed.removed.push(projFile);
374
322
  }
@@ -420,9 +368,7 @@ function syncTemplates(projectRoot) {
420
368
  const ext = path.extname(entry), base = entry.slice(0, -ext.length);
421
369
  const zh = norm(base + '.zh-CN' + ext);
422
370
  if (allSet.has(zh)) rels.push(zh);
423
- const selected = MULTI_LANG.has(n)
424
- ? rels.map(r => [norm(renderPathname(r, project)), r])
425
- : langSelect(rels, lang, allSet, project);
371
+ const selected = langSelect(rels, lang, allSet, project);
426
372
  for (const [t, s] of selected) {
427
373
  if (!mergedMap.has(t)) mergedMap.set(t, s);
428
374
  }
@@ -433,8 +379,7 @@ function syncTemplates(projectRoot) {
433
379
  );
434
380
 
435
381
  const projUrl = gitUrl(projectRoot);
436
- const instUrl = gitUrl(installDir);
437
- report.selfUpdate = !!(projUrl && instUrl && projUrl === instUrl);
382
+ report.selfUpdate = !!(projUrl && /fitlab-ai\/agent-infra/.test(projUrl));
438
383
 
439
384
  const hasChanges = (
440
385
  report.managed.written.length +
@@ -55,6 +55,6 @@
55
55
 
56
56
  ## References
57
57
 
58
- - Task file: `.agent-workspace/active/task-XXX.md`
58
+ - Task file: `.agents/workspace/active/task-XXX.md`
59
59
  - Related docs: [links or file paths]
60
60
  - Related issues: #XXX
@@ -55,6 +55,6 @@
55
55
 
56
56
  ## 参考资料
57
57
 
58
- - 任务文件:`.agent-workspace/active/task-XXX.md`
58
+ - 任务文件:`.agents/workspace/active/task-XXX.md`
59
59
  - 相关文档:[链接或文件路径]
60
60
  - 相关 Issue:#XXX
@@ -1,149 +1,149 @@
1
- # 缺陷修复工作流
2
- # 修复缺陷时使用此工作流。
1
+ # Bug Fix Workflow
2
+ # Use this workflow when fixing a bug.
3
3
 
4
4
  name: bug-fix
5
- description: 诊断和修复缺陷的工作流。
5
+ description: Workflow for diagnosing and fixing a bug.
6
6
 
7
7
  steps:
8
8
  - name: analysis
9
- description: 复现缺陷,识别根本原因,确定修复范围。
9
+ description: Reproduce the bug, identify the root cause, and determine the scope of the fix.
10
10
  recommended_agents:
11
11
  - claude
12
12
  - gemini
13
13
  tasks:
14
- - 理解缺陷报告和预期行为
15
- - 复现缺陷(如果可能)
16
- - 追踪代码路径以识别根本原因
17
- - 确定受影响的文件和组件
18
- - 将发现记录在任务文件中
14
+ - Understand the bug report and expected behavior
15
+ - Reproduce the bug when possible
16
+ - Trace the code path to identify the root cause
17
+ - Determine impacted files and components
18
+ - Record findings in the task file
19
19
  inputs:
20
- - 缺陷报告或 Issue 描述
21
- - 复现步骤
22
- - 项目代码库
20
+ - Bug report or issue description
21
+ - Reproduction steps
22
+ - Project codebase
23
23
  artifact_versioning:
24
24
  outputs:
25
25
  - name: analysis
26
26
  pattern: "analysis.md | analysis-r{N}.md"
27
- rule: "扫描现有分析产物;首轮创建 analysis.md,后续修订创建 analysis-r{N}.mdN = 当前最高轮次 + 1"
27
+ 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)"
28
28
  outputs:
29
- - 根因分析
30
- - 受影响文件列表
31
- - 更新后的任务文件(分析部分)
29
+ - Root cause analysis
30
+ - List of impacted files
31
+ - Updated task file (analysis section)
32
32
 
33
33
  - name: design
34
- description: 规划修复方案并考虑边界情况。
34
+ description: Plan the fix and consider edge cases.
35
35
  recommended_agents:
36
36
  - claude
37
37
  tasks:
38
- - 确定修复缺陷的最佳方案
39
- - 识别修复的潜在副作用
40
- - 规划验证修复的测试用例
41
- - 在任务文件中记录修复方案
38
+ - Determine the best approach for fixing the bug
39
+ - Identify potential side effects of the fix
40
+ - Plan test cases to validate the fix
41
+ - Record the fix plan in the task file
42
42
  inputs:
43
- - 上一步的根因分析
44
- - 项目架构
43
+ - Root cause 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
- - 待添加的测试用例列表
55
+ - Fix plan recorded in the task file
56
+ - List of test cases to add
57
57
 
58
58
  - name: implementation
59
- description: 实现缺陷修复并添加回归测试。
59
+ description: Implement the bug fix and add regression tests.
60
60
  recommended_agents:
61
61
  - codex
62
62
  - cursor
63
63
  tasks:
64
- - 创建缺陷修复分支
65
- - 实现修复
66
- - 添加在没有修复时会失败的回归测试
67
- - 验证现有测试仍然通过
68
- - 确保代码遵循项目规范
64
+ - Create a bug-fix branch
65
+ - Implement the fix
66
+ - Add regression tests that would fail without the fix
67
+ - Verify that existing tests still pass
68
+ - Ensure the code follows project conventions
69
69
  inputs:
70
- - 上一步的修复方案
71
- - 项目编码标准
70
+ - Fix plan 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
+ - Bug-fix branch with the implementation
79
+ - Regression test files
80
+ - Updated task file (implementation notes)
81
81
 
82
82
  - name: review
83
- description: 验证修复是否正确和完整。
83
+ description: Verify that the fix is correct and complete.
84
84
  recommended_agents:
85
85
  - claude
86
86
  tasks:
87
- - 验证修复是否解决了根本原因
88
- - 检查回归测试是否充分
89
- - 确保未引入新问题
90
- - 验证修复不会破坏现有功能
91
- - 创建审查报告
87
+ - Verify that the fix addresses the root cause
88
+ - Check whether regression tests are sufficient
89
+ - Ensure no new issues were introduced
90
+ - Verify that the fix does not break existing functionality
91
+ - Create a review report
92
92
  inputs:
93
- - 缺陷修复分支
94
- - 根因分析
93
+ - Bug-fix branch
94
+ - Root cause analysis
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 if any
107
107
 
108
108
  - name: fix
109
- description: 处理审查中发现的问题。
109
+ description: Address issues found during review.
110
110
  recommended_agents:
111
111
  - codex
112
112
  - cursor
113
113
  tasks:
114
- - 修复审查中识别的问题
115
- - 根据需要更新测试
116
- - 验证所有测试通过
114
+ - Fix issues identified in the review
115
+ - Update tests as needed
116
+ - Verify that all tests pass
117
117
  inputs:
118
- - 审查报告
119
- - 缺陷修复分支
118
+ - Review report
119
+ - Bug-fix branch
120
120
  artifact_versioning:
121
121
  inputs:
122
122
  - name: review
123
123
  pattern: "review.md | review-r{N}.md"
124
- rule: "读取最高轮次的审查产物,并校验其与 task.md Activity Log 中最近一条 Code Review 记录一致"
124
+ rule: "Read the highest-round review artifact and verify that it matches the latest Code Review entry in the task.md Activity Log"
125
125
  outputs:
126
126
  - name: refinement
127
127
  pattern: "refinement.md | refinement-r{N}.md"
128
- rule: "扫描现有修复产物;首轮创建 refinement.md,后续轮次创建 refinement-r{N}.mdN = 当前最高轮次 + 1"
128
+ 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)"
129
129
  outputs:
130
- - 包含修复的更新分支
131
- - 更新后的任务文件
130
+ - Updated branch with fixes
131
+ - Updated task file
132
132
 
133
133
  - name: commit
134
- description: 最终确认缺陷修复并创建拉取请求。
134
+ description: Finalize the bug fix and create a pull request.
135
135
  recommended_agents:
136
136
  - claude
137
137
  - human
138
138
  tasks:
139
- - 确保所有测试通过
140
- - 编写引用缺陷/Issue 的提交信息
141
- - 创建包含缺陷修复描述的拉取请求
142
- - PR 关联到缺陷报告 Issue
143
- - 将任务移至已完成
139
+ - Ensure all tests pass
140
+ - Write a commit message that references the bug or issue
141
+ - Create a pull request with a bug-fix summary
142
+ - Link the PR to the bug report issue
143
+ - Move the task to completed
144
144
  inputs:
145
- - 最终缺陷修复分支
146
- - 任务文件
145
+ - Final bug-fix branch
146
+ - Task file
147
147
  outputs:
148
- - 拉取请求
149
- - 已完成的任务文件(位于 .agent-workspace/completed/)
148
+ - Pull request
149
+ - Completed task file (stored in .agents/workspace/completed/)
@@ -146,4 +146,4 @@ steps:
146
146
  - 任务文件
147
147
  outputs:
148
148
  - 拉取请求
149
- - 已完成的任务文件(位于 .agent-workspace/completed/)
149
+ - 已完成的任务文件(位于 .agents/workspace/completed/)