@fitlab-ai/agent-infra 0.6.5 → 0.7.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 (181) hide show
  1. package/README.md +51 -25
  2. package/README.zh-CN.md +49 -23
  3. package/dist/lib/defaults.json +1 -0
  4. package/dist/lib/init.js +3 -0
  5. package/dist/lib/sandbox/commands/create.js +4 -2
  6. package/dist/lib/sandbox/commands/enter.js +15 -4
  7. package/dist/lib/sandbox/commands/list-running.js +108 -0
  8. package/dist/lib/sandbox/commands/ls.js +24 -45
  9. package/dist/lib/sandbox/commands/rebuild.js +4 -2
  10. package/dist/lib/sandbox/config.js +3 -0
  11. package/dist/lib/sandbox/index.js +2 -1
  12. package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
  13. package/dist/lib/sandbox/tools.js +213 -8
  14. package/dist/lib/update.js +12 -1
  15. package/lib/defaults.json +1 -0
  16. package/lib/init.ts +10 -0
  17. package/lib/sandbox/commands/create.ts +10 -2
  18. package/lib/sandbox/commands/enter.ts +14 -4
  19. package/lib/sandbox/commands/list-running.ts +135 -0
  20. package/lib/sandbox/commands/ls.ts +28 -49
  21. package/lib/sandbox/commands/rebuild.ts +9 -2
  22. package/lib/sandbox/config.ts +7 -0
  23. package/lib/sandbox/index.ts +2 -1
  24. package/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
  25. package/lib/sandbox/tools.ts +248 -9
  26. package/lib/update.ts +15 -1
  27. package/package.json +1 -1
  28. package/templates/.agents/QUICKSTART.en.md +1 -1
  29. package/templates/.agents/QUICKSTART.zh-CN.md +1 -1
  30. package/templates/.agents/README.en.md +79 -2
  31. package/templates/.agents/README.zh-CN.md +79 -2
  32. package/templates/.agents/rules/create-issue.en.md +1 -1
  33. package/templates/.agents/rules/create-issue.github.en.md +1 -1
  34. package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
  35. package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
  36. package/templates/.agents/rules/issue-sync.github.en.md +6 -5
  37. package/templates/.agents/rules/issue-sync.github.zh-CN.md +6 -5
  38. package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
  39. package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
  40. package/templates/.agents/rules/no-mid-flow-questions.en.md +57 -0
  41. package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +57 -0
  42. package/templates/.agents/rules/pr-sync.github.en.md +4 -5
  43. package/templates/.agents/rules/pr-sync.github.zh-CN.md +4 -5
  44. package/templates/.agents/rules/task-management.en.md +9 -6
  45. package/templates/.agents/rules/task-management.zh-CN.md +9 -6
  46. package/templates/.agents/rules/testing-discipline.en.md +2 -2
  47. package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
  48. package/templates/.agents/scripts/validate-artifact.js +1 -1
  49. package/templates/.agents/skills/analyze-task/SKILL.en.md +16 -4
  50. package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +16 -4
  51. package/templates/.agents/skills/check-task/SKILL.en.md +43 -32
  52. package/templates/.agents/skills/check-task/SKILL.zh-CN.md +42 -31
  53. package/templates/.agents/skills/code-task/SKILL.en.md +117 -0
  54. package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +51 -24
  55. package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
  56. package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
  57. package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
  58. package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
  59. package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
  60. package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
  61. package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
  62. package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
  63. package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
  64. package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
  65. package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
  66. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
  67. package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
  68. package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
  69. package/templates/.agents/skills/commit/SKILL.en.md +2 -2
  70. package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
  71. package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
  72. package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
  73. package/templates/.agents/skills/complete-task/SKILL.en.md +5 -3
  74. package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +5 -3
  75. package/templates/.agents/skills/create-pr/SKILL.en.md +17 -1
  76. package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +17 -1
  77. package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
  78. package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
  79. package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
  80. package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
  81. package/templates/.agents/skills/import-issue/SKILL.en.md +3 -3
  82. package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
  83. package/templates/.agents/skills/plan-task/SKILL.en.md +4 -4
  84. package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +4 -4
  85. package/templates/.agents/skills/restore-task/SKILL.en.md +4 -3
  86. package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -3
  87. package/templates/.agents/skills/review-analysis/SKILL.en.md +76 -0
  88. package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +102 -0
  89. package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
  90. package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
  91. package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
  92. package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
  93. package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
  94. package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
  95. package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
  96. package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
  97. package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +11 -9
  98. package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +15 -9
  99. package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
  100. package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
  101. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
  102. package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
  103. package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
  104. package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
  105. package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
  106. package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
  107. package/templates/.agents/skills/review-plan/SKILL.en.md +76 -0
  108. package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +102 -0
  109. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
  110. package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
  111. package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
  112. package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
  113. package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
  114. package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
  115. package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
  116. package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
  117. package/templates/.agents/skills/test/SKILL.en.md +2 -2
  118. package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
  119. package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -0
  120. package/templates/.agents/templates/task.en.md +3 -3
  121. package/templates/.agents/templates/task.zh-CN.md +2 -2
  122. package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
  123. package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
  124. package/templates/.agents/workflows/feature-development.en.yaml +115 -70
  125. package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
  126. package/templates/.agents/workflows/refactoring.en.yaml +123 -78
  127. package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
  128. package/templates/.claude/commands/code-task.en.md +8 -0
  129. package/templates/.claude/commands/code-task.zh-CN.md +8 -0
  130. package/templates/.claude/commands/review-analysis.en.md +8 -0
  131. package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
  132. package/templates/.claude/commands/review-code.en.md +8 -0
  133. package/templates/.claude/commands/review-code.zh-CN.md +8 -0
  134. package/templates/.claude/commands/review-plan.en.md +8 -0
  135. package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
  136. package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
  137. package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
  138. package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
  139. package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
  140. package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
  141. package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
  142. package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
  143. package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
  144. package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
  145. package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
  146. package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
  147. package/templates/.opencode/commands/code-task.en.md +11 -0
  148. package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
  149. package/templates/.opencode/commands/review-analysis.en.md +11 -0
  150. package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
  151. package/templates/.opencode/commands/review-code.en.md +11 -0
  152. package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
  153. package/templates/.opencode/commands/review-plan.en.md +11 -0
  154. package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
  155. package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
  156. package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
  157. package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
  158. package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
  159. package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
  160. package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
  161. package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
  162. package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
  163. package/templates/.claude/commands/implement-task.en.md +0 -8
  164. package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
  165. package/templates/.claude/commands/refine-task.en.md +0 -8
  166. package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
  167. package/templates/.claude/commands/review-task.en.md +0 -8
  168. package/templates/.claude/commands/review-task.zh-CN.md +0 -8
  169. package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
  170. package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
  171. package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
  172. package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
  173. package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
  174. package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
  175. package/templates/.opencode/commands/implement-task.en.md +0 -11
  176. package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
  177. package/templates/.opencode/commands/refine-task.en.md +0 -11
  178. package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
  179. package/templates/.opencode/commands/review-task.en.md +0 -11
  180. package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
  181. /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
@@ -1,42 +0,0 @@
1
- # Review Criteria
2
-
3
- Read this file before reviewing code or classifying findings.
4
-
5
- ## Perform Code Review
6
-
7
- Follow the `code-review` step in `.agents/workflows/feature-development.yaml`.
8
-
9
- **Required review areas**:
10
- - [ ] code quality and coding standards
11
- - [ ] bug and risk detection
12
- - [ ] test coverage and test quality
13
- - [ ] error handling and edge cases
14
- - [ ] performance and security concerns
15
- - [ ] code comments and documentation
16
- - [ ] alignment with the technical plan
17
-
18
- **Review principles**:
19
- 1. **Strict but fair**: point out problems and also acknowledge good work
20
- 2. **Specific**: cite exact file paths and line numbers
21
- 3. **Actionable**: suggest a concrete fix
22
- 4. **Severity-based**: distinguish blockers, major issues, and minor improvements
23
-
24
- ## Environment-Blocked Classification
25
-
26
- Some findings cannot be closed by the AI agent in the current execution environment, for example:
27
-
28
- - missing Docker / sandbox access for end-to-end verification
29
- - missing a specific OS (macOS-only behavior)
30
- - missing a third-party account / OAuth access
31
- - missing privileged operations (root, sudo, special network access)
32
-
33
- **Classification decision tree**: "Can the AI agent close this without changing the environment?"
34
- - yes -> one of blocker / major / minor (based on risk)
35
- - no -> **env-blocked** (a meta-category, not part of severity ordering)
36
-
37
- Where env-blocked findings go:
38
- - record them in the independent review report section "Environment-Blocked Findings"
39
- - append them to the end of numeric summaries (for example, `(+ 1 env-blocked)`)
40
- - do **not** send them into the refine loop; maintainers carry them in the PR description as a "manual verification required" checklist
41
-
42
- Also inspect `git diff` so the report reflects the full change context.
@@ -1,8 +0,0 @@
1
- ---
2
- description: "Implement a task from its technical plan and output a report"
3
- usage: "/implement-task <task-id>"
4
- ---
5
-
6
- Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
7
-
8
- Follow all steps defined in the skill exactly.
@@ -1,8 +0,0 @@
1
- ---
2
- description: "根据技术方案实施任务并输出报告"
3
- usage: "/implement-task <task-id>"
4
- ---
5
-
6
- 读取并执行 `.agents/skills/implement-task/SKILL.md` 中的 implement-task 技能。
7
-
8
- 严格按照技能中定义的所有步骤执行。
@@ -1,8 +0,0 @@
1
- ---
2
- description: "Handle code review feedback and fix issues"
3
- usage: "/refine-task <task-id>"
4
- ---
5
-
6
- Read and execute the refine-task skill from `.agents/skills/refine-task/SKILL.md`.
7
-
8
- Follow all steps defined in the skill exactly.
@@ -1,8 +0,0 @@
1
- ---
2
- description: "处理代码审查反馈并修复问题"
3
- usage: "/refine-task <task-id>"
4
- ---
5
-
6
- 读取并执行 `.agents/skills/refine-task/SKILL.md` 中的 refine-task 技能。
7
-
8
- 严格按照技能中定义的所有步骤执行。
@@ -1,8 +0,0 @@
1
- ---
2
- description: "Review a task implementation and output a code review report"
3
- usage: "/review-task <task-id>"
4
- ---
5
-
6
- Read and execute the review-task skill from `.agents/skills/review-task/SKILL.md`.
7
-
8
- Follow all steps defined in the skill exactly.
@@ -1,8 +0,0 @@
1
- ---
2
- description: "审查任务实现并输出代码审查报告"
3
- usage: "/review-task <task-id>"
4
- ---
5
-
6
- 读取并执行 `.agents/skills/review-task/SKILL.md` 中的 review-task 技能。
7
-
8
- 严格按照技能中定义的所有步骤执行。
@@ -1,8 +0,0 @@
1
- description = "Implement a task from its technical plan and output a report"
2
- prompt = """
3
- Implement task {{args}}.
4
-
5
- Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
6
-
7
- Follow all steps defined in the skill exactly.
8
- """
@@ -1,8 +0,0 @@
1
- description = "根据技术方案实施任务并输出报告"
2
- prompt = """
3
- 实施任务 {{args}}。
4
-
5
- 读取并执行 `.agents/skills/implement-task/SKILL.md` 中的 implement-task 技能。
6
-
7
- 严格按照技能中定义的所有步骤执行。
8
- """
@@ -1,8 +0,0 @@
1
- description = "Handle code review feedback and fix issues"
2
- prompt = """
3
- Refine task {{args}}.
4
-
5
- Read and execute the refine-task skill from `.agents/skills/refine-task/SKILL.md`.
6
-
7
- Follow all steps defined in the skill exactly.
8
- """
@@ -1,8 +0,0 @@
1
- description = "处理代码审查反馈并修复问题"
2
- prompt = """
3
- 修复任务 {{args}} 的审查问题。
4
-
5
- 读取并执行 `.agents/skills/refine-task/SKILL.md` 中的 refine-task 技能。
6
-
7
- 严格按照技能中定义的所有步骤执行。
8
- """
@@ -1,8 +0,0 @@
1
- description = "Review a task implementation and output a code review report"
2
- prompt = """
3
- Review task {{args}}.
4
-
5
- Read and execute the review-task skill from `.agents/skills/review-task/SKILL.md`.
6
-
7
- Follow all steps defined in the skill exactly.
8
- """
@@ -1,8 +0,0 @@
1
- description = "审查任务实现并输出代码审查报告"
2
- prompt = """
3
- 审查任务 {{args}}。
4
-
5
- 读取并执行 `.agents/skills/review-task/SKILL.md` 中的 review-task 技能。
6
-
7
- 严格按照技能中定义的所有步骤执行。
8
- """
@@ -1,11 +0,0 @@
1
- ---
2
- description: "Implement a task from its technical plan and output a report"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- Implement task $1.
8
-
9
- Read and execute the implement-task skill from `.agents/skills/implement-task/SKILL.md`.
10
-
11
- Follow all steps defined in the skill exactly.
@@ -1,11 +0,0 @@
1
- ---
2
- description: "根据技术方案实施任务并输出报告"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- 实施任务 $1。
8
-
9
- 读取并执行 `.agents/skills/implement-task/SKILL.md` 中的 implement-task 技能。
10
-
11
- 严格按照技能中定义的所有步骤执行。
@@ -1,11 +0,0 @@
1
- ---
2
- description: "Handle code review feedback and fix issues"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- Refine task $1.
8
-
9
- Read and execute the refine-task skill from `.agents/skills/refine-task/SKILL.md`.
10
-
11
- Follow all steps defined in the skill exactly.
@@ -1,11 +0,0 @@
1
- ---
2
- description: "处理代码审查反馈并修复问题"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- 修复任务 $1 的审查问题。
8
-
9
- 读取并执行 `.agents/skills/refine-task/SKILL.md` 中的 refine-task 技能。
10
-
11
- 严格按照技能中定义的所有步骤执行。
@@ -1,11 +0,0 @@
1
- ---
2
- description: "Review a task implementation and output a code review report"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- Review task $1.
8
-
9
- Read and execute the review-task skill from `.agents/skills/review-task/SKILL.md`.
10
-
11
- Follow all steps defined in the skill exactly.
@@ -1,11 +0,0 @@
1
- ---
2
- description: "审查任务实现并输出代码审查报告"
3
- agent: general
4
- subtask: false
5
- ---
6
-
7
- 审查任务 $1。
8
-
9
- 读取并执行 `.agents/skills/review-task/SKILL.md` 中的 review-task 技能。
10
-
11
- 严格按照技能中定义的所有步骤执行。