@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.
- package/README.md +51 -25
- package/README.zh-CN.md +49 -23
- package/dist/lib/defaults.json +1 -0
- package/dist/lib/init.js +3 -0
- package/dist/lib/sandbox/commands/create.js +4 -2
- package/dist/lib/sandbox/commands/enter.js +15 -4
- package/dist/lib/sandbox/commands/list-running.js +108 -0
- package/dist/lib/sandbox/commands/ls.js +24 -45
- package/dist/lib/sandbox/commands/rebuild.js +4 -2
- package/dist/lib/sandbox/config.js +3 -0
- package/dist/lib/sandbox/index.js +2 -1
- package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/dist/lib/sandbox/tools.js +213 -8
- package/dist/lib/update.js +12 -1
- package/lib/defaults.json +1 -0
- package/lib/init.ts +10 -0
- package/lib/sandbox/commands/create.ts +10 -2
- package/lib/sandbox/commands/enter.ts +14 -4
- package/lib/sandbox/commands/list-running.ts +135 -0
- package/lib/sandbox/commands/ls.ts +28 -49
- package/lib/sandbox/commands/rebuild.ts +9 -2
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/index.ts +2 -1
- package/lib/sandbox/runtimes/ai-tools.dockerfile +10 -6
- package/lib/sandbox/tools.ts +248 -9
- package/lib/update.ts +15 -1
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.en.md +1 -1
- package/templates/.agents/QUICKSTART.zh-CN.md +1 -1
- package/templates/.agents/README.en.md +79 -2
- package/templates/.agents/README.zh-CN.md +79 -2
- package/templates/.agents/rules/create-issue.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.en.md +1 -1
- package/templates/.agents/rules/create-issue.github.zh-CN.md +1 -1
- package/templates/.agents/rules/create-issue.zh-CN.md +1 -1
- package/templates/.agents/rules/issue-sync.github.en.md +6 -5
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +6 -5
- package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
- package/templates/.agents/rules/no-mid-flow-questions.en.md +57 -0
- package/templates/.agents/rules/no-mid-flow-questions.zh-CN.md +57 -0
- package/templates/.agents/rules/pr-sync.github.en.md +4 -5
- package/templates/.agents/rules/pr-sync.github.zh-CN.md +4 -5
- package/templates/.agents/rules/task-management.en.md +9 -6
- package/templates/.agents/rules/task-management.zh-CN.md +9 -6
- package/templates/.agents/rules/testing-discipline.en.md +2 -2
- package/templates/.agents/rules/testing-discipline.zh-CN.md +2 -2
- package/templates/.agents/scripts/validate-artifact.js +1 -1
- package/templates/.agents/skills/analyze-task/SKILL.en.md +16 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +16 -4
- package/templates/.agents/skills/check-task/SKILL.en.md +43 -32
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +42 -31
- package/templates/.agents/skills/code-task/SKILL.en.md +117 -0
- package/templates/.agents/skills/{implement-task → code-task}/SKILL.zh-CN.md +51 -24
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.en.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/config/verify.zh-CN.json +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.zh-CN.md +2 -2
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.en.md → code-task/reference/code-rules.en.md} +6 -6
- package/templates/.agents/skills/{implement-task/reference/implementation-rules.zh-CN.md → code-task/reference/code-rules.zh-CN.md} +3 -3
- package/templates/.agents/skills/code-task/reference/dual-mode.en.md +69 -0
- package/templates/.agents/skills/code-task/reference/dual-mode.zh-CN.md +69 -0
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.en.md → code-task/reference/fix-mode.en.md} +12 -12
- package/templates/.agents/skills/{refine-task/reference/fix-workflow.zh-CN.md → code-task/reference/fix-mode.zh-CN.md} +8 -8
- package/templates/.agents/skills/code-task/reference/output-template.en.md +20 -0
- package/templates/.agents/skills/code-task/reference/output-template.zh-CN.md +20 -0
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.en.md +4 -4
- package/templates/.agents/skills/{implement-task → code-task}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/code-task/scripts/detect-mode.js +370 -0
- package/templates/.agents/skills/commit/SKILL.en.md +2 -2
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/reference/task-status-update.en.md +10 -6
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +10 -6
- package/templates/.agents/skills/complete-task/SKILL.en.md +5 -3
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +5 -3
- package/templates/.agents/skills/create-pr/SKILL.en.md +17 -1
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +17 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/import-issue/SKILL.en.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.en.md +4 -4
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/restore-task/SKILL.en.md +4 -3
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +4 -3
- package/templates/.agents/skills/review-analysis/SKILL.en.md +76 -0
- package/templates/.agents/skills/review-analysis/SKILL.zh-CN.md +102 -0
- package/templates/.agents/skills/review-analysis/config/verify.en.json +51 -0
- package/templates/.agents/skills/review-analysis/config/verify.zh-CN.json +51 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/review-analysis/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-analysis/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/{review-task → review-code}/SKILL.en.md +11 -9
- package/templates/.agents/skills/{review-task → review-code}/SKILL.zh-CN.md +15 -9
- package/templates/.agents/skills/{review-task → review-code}/config/verify.en.json +7 -5
- package/templates/.agents/skills/{review-task → review-code}/config/verify.zh-CN.json +6 -4
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.en.md +21 -17
- package/templates/.agents/skills/{review-task → review-code}/reference/output-templates.zh-CN.md +19 -15
- package/templates/.agents/skills/{review-task → review-code}/reference/report-template.en.md +5 -6
- package/templates/.agents/skills/review-code/reference/report-template.zh-CN.md +91 -0
- package/templates/.agents/skills/review-code/reference/review-criteria.en.md +48 -0
- package/templates/.agents/skills/{review-task → review-code}/reference/review-criteria.zh-CN.md +10 -4
- package/templates/.agents/skills/review-plan/SKILL.en.md +76 -0
- package/templates/.agents/skills/review-plan/SKILL.zh-CN.md +102 -0
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.en.json +14 -10
- package/templates/.agents/skills/{refine-task → review-plan}/config/verify.zh-CN.json +14 -10
- package/templates/.agents/skills/review-plan/reference/output-templates.en.md +87 -0
- package/templates/.agents/skills/review-plan/reference/output-templates.zh-CN.md +87 -0
- package/templates/.agents/skills/review-plan/reference/report-template.en.md +90 -0
- package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md +3 -3
- package/templates/.agents/skills/review-plan/reference/review-criteria.en.md +47 -0
- package/templates/.agents/skills/review-plan/reference/review-criteria.zh-CN.md +47 -0
- package/templates/.agents/skills/test/SKILL.en.md +2 -2
- package/templates/.agents/skills/test/SKILL.zh-CN.md +13 -31
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -0
- package/templates/.agents/templates/task.en.md +3 -3
- package/templates/.agents/templates/task.zh-CN.md +2 -2
- package/templates/.agents/workflows/bug-fix.en.yaml +126 -80
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +90 -44
- package/templates/.agents/workflows/feature-development.en.yaml +115 -70
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +92 -47
- package/templates/.agents/workflows/refactoring.en.yaml +123 -78
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +89 -44
- package/templates/.claude/commands/code-task.en.md +8 -0
- package/templates/.claude/commands/code-task.zh-CN.md +8 -0
- package/templates/.claude/commands/review-analysis.en.md +8 -0
- package/templates/.claude/commands/review-analysis.zh-CN.md +8 -0
- package/templates/.claude/commands/review-code.en.md +8 -0
- package/templates/.claude/commands/review-code.zh-CN.md +8 -0
- package/templates/.claude/commands/review-plan.en.md +8 -0
- package/templates/.claude/commands/review-plan.zh-CN.md +8 -0
- package/templates/.gemini/commands/_project_/archive-tasks.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/code-task.en.toml +8 -0
- package/templates/.gemini/commands/_project_/code-task.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-analysis.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-analysis.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-code.zh-CN.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.en.toml +8 -0
- package/templates/.gemini/commands/_project_/review-plan.zh-CN.toml +8 -0
- package/templates/.opencode/commands/code-task.en.md +11 -0
- package/templates/.opencode/commands/code-task.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-analysis.en.md +11 -0
- package/templates/.opencode/commands/review-analysis.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-code.en.md +11 -0
- package/templates/.opencode/commands/review-code.zh-CN.md +11 -0
- package/templates/.opencode/commands/review-plan.en.md +11 -0
- package/templates/.opencode/commands/review-plan.zh-CN.md +11 -0
- package/templates/.agents/skills/implement-task/SKILL.en.md +0 -173
- package/templates/.agents/skills/implement-task/reference/output-template.en.md +0 -20
- package/templates/.agents/skills/implement-task/reference/output-template.zh-CN.md +0 -20
- package/templates/.agents/skills/refine-task/SKILL.en.md +0 -153
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +0 -153
- package/templates/.agents/skills/refine-task/reference/report-template.en.md +0 -64
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +0 -64
- package/templates/.agents/skills/review-task/reference/review-criteria.en.md +0 -42
- package/templates/.claude/commands/implement-task.en.md +0 -8
- package/templates/.claude/commands/implement-task.zh-CN.md +0 -8
- package/templates/.claude/commands/refine-task.en.md +0 -8
- package/templates/.claude/commands/refine-task.zh-CN.md +0 -8
- package/templates/.claude/commands/review-task.en.md +0 -8
- package/templates/.claude/commands/review-task.zh-CN.md +0 -8
- package/templates/.gemini/commands/_project_/implement-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.en.toml +0 -8
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +0 -8
- package/templates/.opencode/commands/implement-task.en.md +0 -11
- package/templates/.opencode/commands/implement-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/refine-task.en.md +0 -11
- package/templates/.opencode/commands/refine-task.zh-CN.md +0 -11
- package/templates/.opencode/commands/review-task.en.md +0 -11
- package/templates/.opencode/commands/review-task.zh-CN.md +0 -11
- /package/templates/.agents/skills/{implement-task → code-task}/reference/branch-management.en.md +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Review Report Template
|
|
2
|
+
|
|
3
|
+
Use this template when writing `review-plan.md` or `review-plan-r{N}.md`.
|
|
4
|
+
|
|
5
|
+
## Output Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Technical Plan Review Report
|
|
9
|
+
|
|
10
|
+
- **Review Round**: Round {review-round}
|
|
11
|
+
- **Artifact File**: `{review-artifact}`
|
|
12
|
+
- **Review Input**:
|
|
13
|
+
- `{plan-artifact}`
|
|
14
|
+
|
|
15
|
+
## State Check
|
|
16
|
+
|
|
17
|
+
> Paste the raw state-check command output; each command starts with `$ `.
|
|
18
|
+
|
|
19
|
+
## Review Summary
|
|
20
|
+
|
|
21
|
+
- **Reviewer**: {reviewer-name}
|
|
22
|
+
- **Review Time**: {timestamp}
|
|
23
|
+
- **Scope**: {file-count and major modules}
|
|
24
|
+
- **Overall Verdict**: {Approved / Changes Requested / Rejected}
|
|
25
|
+
- **Findings (AI-actionable)**: 0 blockers, 0 majors, 0 minors / **env-blocked**: 0
|
|
26
|
+
|
|
27
|
+
## Findings
|
|
28
|
+
|
|
29
|
+
### Blockers (must fix)
|
|
30
|
+
|
|
31
|
+
#### 1. {Issue title}
|
|
32
|
+
**File**: `{file-path}:{line-number}`
|
|
33
|
+
**Description**: {details}
|
|
34
|
+
**Suggested Fix**: {fix suggestion}
|
|
35
|
+
|
|
36
|
+
### Major Issues (should fix)
|
|
37
|
+
|
|
38
|
+
#### 1. {Issue title}
|
|
39
|
+
**File**: `{file-path}:{line-number}`
|
|
40
|
+
**Description**: {details}
|
|
41
|
+
**Suggested Fix**: {fix suggestion}
|
|
42
|
+
|
|
43
|
+
### Minor Issues (optional improvements)
|
|
44
|
+
|
|
45
|
+
#### 1. {Improvement point}
|
|
46
|
+
**File**: `{file-path}:{line-number}`
|
|
47
|
+
**Suggestion**: {improvement suggestion}
|
|
48
|
+
|
|
49
|
+
## Environment-Blocked Findings
|
|
50
|
+
|
|
51
|
+
> Items the AI agent cannot close in the current execution environment; they do not participate in the next plan round. Maintainers carry them in the PR description as a "manual verification required" checklist.
|
|
52
|
+
|
|
53
|
+
#### 1. {environment-blocked finding title}
|
|
54
|
+
**File**: `{file-path}:{line-number}` (if applicable)
|
|
55
|
+
**Description**: {details}
|
|
56
|
+
**Required Environment**: {e.g. Docker sandbox / macOS host / privileged root / third-party account}
|
|
57
|
+
**Manual Verification Steps**: {steps for the human verifier}
|
|
58
|
+
|
|
59
|
+
> If this round has no env-blocked findings, keep the section heading and write "None".
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Evidence
|
|
63
|
+
|
|
64
|
+
> Pair each "I verified X" claim with the corresponding raw tool output; the gate only checks that this section exists and at least one `$ ` line is present.
|
|
65
|
+
|
|
66
|
+
- Claim: {verified claim}
|
|
67
|
+
```text
|
|
68
|
+
$ {command}
|
|
69
|
+
{raw output}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Highlights
|
|
73
|
+
|
|
74
|
+
- {what went well}
|
|
75
|
+
|
|
76
|
+
## Alignment with Plan
|
|
77
|
+
|
|
78
|
+
- [ ] Implementation matches the technical plan
|
|
79
|
+
- [ ] No unintended scope expansion
|
|
80
|
+
|
|
81
|
+
## Conclusion and Recommendation
|
|
82
|
+
|
|
83
|
+
### Approval Decision
|
|
84
|
+
- [ ] Approved
|
|
85
|
+
- [ ] Changes Requested
|
|
86
|
+
- [ ] Rejected
|
|
87
|
+
|
|
88
|
+
### Next Steps
|
|
89
|
+
{recommended next step}
|
|
90
|
+
```
|
package/templates/.agents/skills/{review-task → review-plan}/reference/report-template.zh-CN.md
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 审查报告模板
|
|
2
2
|
|
|
3
|
-
编写 `review.md` 或 `review-r{N}.md` 时使用本模板。
|
|
3
|
+
编写 `review-plan.md` 或 `review-plan-r{N}.md` 时使用本模板。
|
|
4
4
|
|
|
5
5
|
## 输出模板
|
|
6
6
|
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
- **审查轮次**:第 {review-round} 轮
|
|
11
11
|
- **产物文件**:`{review-artifact}`
|
|
12
12
|
- **审查输入**:
|
|
13
|
-
- `{
|
|
14
|
-
- `{
|
|
13
|
+
- `{code-artifact}`
|
|
14
|
+
- `{code-artifact}`(如存在)
|
|
15
15
|
|
|
16
16
|
## 状态核对
|
|
17
17
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Review Criteria
|
|
2
|
+
|
|
3
|
+
Read this file before reviewing technical plan artifacts or classifying finding severity.
|
|
4
|
+
|
|
5
|
+
## Technical Plan Review
|
|
6
|
+
|
|
7
|
+
Follow the `design-review` step in `.agents/workflows/feature-development.yaml`.
|
|
8
|
+
|
|
9
|
+
**Required review areas**:
|
|
10
|
+
- [ ] The plan covers the approved requirement analysis
|
|
11
|
+
- [ ] Implementation steps are concrete, ordered, and verifiable
|
|
12
|
+
- [ ] Architecture boundaries, data flow, and interface changes are clear
|
|
13
|
+
- [ ] Test strategy covers critical paths, regression risks, and edge cases
|
|
14
|
+
- [ ] Risks, migration, rollback, or compatibility handling are sufficient
|
|
15
|
+
- [ ] The plan avoids over-design and unrelated scope expansion
|
|
16
|
+
|
|
17
|
+
**Common anti-examples**:
|
|
18
|
+
- Saying "modify related code" without executable steps and verification points
|
|
19
|
+
- Ignoring risks or constraints listed in the analysis
|
|
20
|
+
- Introducing unnecessary abstractions, configuration, or frameworks for a single-use requirement
|
|
21
|
+
|
|
22
|
+
## Common Review Principles
|
|
23
|
+
|
|
24
|
+
1. **Strict but fair**: identify issues and acknowledge solid work
|
|
25
|
+
2. **Specific**: cite exact file paths and line numbers
|
|
26
|
+
3. **Actionable**: suggest a concrete fix
|
|
27
|
+
4. **Severity-based**: clearly distinguish blockers, major issues, and minor issues
|
|
28
|
+
|
|
29
|
+
## Environment-Blocked Classification
|
|
30
|
+
|
|
31
|
+
Some findings cannot be closed by an AI agent in the current execution environment, for example:
|
|
32
|
+
|
|
33
|
+
- Missing Docker / sandbox access for end-to-end validation
|
|
34
|
+
- Missing a specific OS for macOS-only behavior
|
|
35
|
+
- Missing third-party accounts / OAuth
|
|
36
|
+
- Missing privileged operations such as root, sudo, or special network access
|
|
37
|
+
|
|
38
|
+
**Decision tree**: "Can the AI agent close this item independently without changing the environment?"
|
|
39
|
+
- Yes -> blocker / major / minor, based on risk
|
|
40
|
+
- No -> **env-blocked** (a meta-category, not part of severity ordering)
|
|
41
|
+
|
|
42
|
+
Where env-blocked items go:
|
|
43
|
+
- Record them in an independent review report section named "Environment-Blocked Findings"
|
|
44
|
+
- Include them at the end of the numeric summary, for example `(+ 1 env-blocked)`
|
|
45
|
+
- Do **not** include them in the code-task fix loop; maintainers carry them in the PR description under manual verification
|
|
46
|
+
|
|
47
|
+
Also inspect the latest technical plan artifact, latest requirement-analysis review artifact, and `task.md` Activity Log so the report reflects the full design context.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# 审查标准
|
|
2
|
+
|
|
3
|
+
在审查技术方案或划分问题严重程度之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 执行技术方案审查
|
|
6
|
+
|
|
7
|
+
遵循 `.agents/workflows/feature-development.yaml` 中的 `design-review` 步骤。
|
|
8
|
+
|
|
9
|
+
**必查范围**:
|
|
10
|
+
- [ ] 方案是否覆盖已批准的需求分析
|
|
11
|
+
- [ ] 实现步骤是否具体、顺序合理且可验证
|
|
12
|
+
- [ ] 架构边界、数据流和接口变化是否清晰
|
|
13
|
+
- [ ] 测试策略是否覆盖关键路径、回归风险和边界情况
|
|
14
|
+
- [ ] 风险、迁移、回滚或兼容性处理是否充分
|
|
15
|
+
- [ ] 方案是否避免过度设计和无关扩张
|
|
16
|
+
|
|
17
|
+
**常见反例**:
|
|
18
|
+
- 方案只写“修改相关代码”,没有可执行步骤和验证点
|
|
19
|
+
- 设计没有回应分析中列出的风险或约束
|
|
20
|
+
- 为单次需求引入不必要的新抽象、配置或框架
|
|
21
|
+
|
|
22
|
+
## 通用审查原则
|
|
23
|
+
|
|
24
|
+
1. **严格但公正**:既要指出问题,也要承认做得好的部分
|
|
25
|
+
2. **具体**:引用准确的文件路径和行号
|
|
26
|
+
3. **可执行**:给出明确可落地的修复建议
|
|
27
|
+
4. **按严重程度分类**:明确区分 blocker、major 和 minor
|
|
28
|
+
|
|
29
|
+
## 环境性遗留分类
|
|
30
|
+
|
|
31
|
+
某些发现项是 AI agent 在本执行环境**无法闭环**的,例如:
|
|
32
|
+
|
|
33
|
+
- 缺 Docker / 沙箱而无法跑端到端验证
|
|
34
|
+
- 缺特定 OS(macOS-only 行为)
|
|
35
|
+
- 缺第三方账号 / OAuth
|
|
36
|
+
- 缺特权操作(root、sudo、特殊网络)
|
|
37
|
+
|
|
38
|
+
**分类决策树**:「AI agent 能否在不改环境的前提下独立闭环这一项?」
|
|
39
|
+
- 是 -> blocker / major / minor 之一(按风险定档)
|
|
40
|
+
- 否 -> **env-blocked**(元类目,不参与严重程度排序)
|
|
41
|
+
|
|
42
|
+
env-blocked 项的去向:
|
|
43
|
+
- 写入 review 报告独立段落「环境性遗留」
|
|
44
|
+
- 在数字摘要末尾附带显示(如 `(+ 1 env-blocked)`)
|
|
45
|
+
- **不**进入 code-task 修复循环;维护者在 PR description 中以「待人工验证」清单形式承接
|
|
46
|
+
|
|
47
|
+
同时检查最新技术方案产物、最新需求分析审查产物和 `task.md` Activity Log,确保报告反映完整的设计上下文。
|
|
@@ -35,7 +35,7 @@ This project uses three test layers as an optional optimization; if the test sui
|
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Use for:
|
|
38
|
-
-
|
|
38
|
+
- code-task inner loops
|
|
39
39
|
- save-and-run / frequent feedback
|
|
40
40
|
- project structure, configuration, and template contract checks
|
|
41
41
|
|
|
@@ -50,7 +50,7 @@ Use for:
|
|
|
50
50
|
|
|
51
51
|
Use for:
|
|
52
52
|
- pre-commit hook (automatic)
|
|
53
|
-
- final verification before writing
|
|
53
|
+
- final verification before writing code.md / code-r{N}.md
|
|
54
54
|
- local gate before pushing a PR
|
|
55
55
|
|
|
56
56
|
### full (complete test suite)
|
|
@@ -1,74 +1,56 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test
|
|
3
|
-
description:
|
|
3
|
+
description: >
|
|
4
|
+
执行项目完整测试流程(编译检查 + 单元测试)。
|
|
5
|
+
当用户要求运行测试或验证代码质量时触发。
|
|
4
6
|
---
|
|
5
7
|
|
|
6
8
|
# 执行测试
|
|
7
9
|
|
|
8
10
|
执行项目的完整测试流程,包括编译检查和单元测试。
|
|
9
11
|
|
|
10
|
-
<!-- TODO: 将以下命令替换为你的项目实际命令 -->
|
|
11
|
-
|
|
12
12
|
## 1. 编译 / 类型检查
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
# TODO: 替换为你的项目编译命令
|
|
16
|
-
# npx tsc --noEmit (TypeScript)
|
|
17
|
-
# mvn compile (Maven)
|
|
18
|
-
# go build ./... (Go)
|
|
19
|
-
# make build (通用)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
确认无编译错误。
|
|
14
|
+
本项目由 Node.js CLI 和模板文件组成,无需编译。跳过此步骤。
|
|
23
15
|
|
|
24
16
|
## 2. 运行单元测试(按层级选择)
|
|
25
17
|
|
|
26
|
-
|
|
18
|
+
本项目把测试分为三层,按场景选择运行命令;新增测试文件默认归入 **full**,确认足够快且足够核心后,再上调到 core 或 smoke。
|
|
27
19
|
|
|
28
20
|
### smoke(目标 <5s)
|
|
29
21
|
|
|
30
22
|
```bash
|
|
31
|
-
|
|
32
|
-
# npm run test:smoke (Node.js)
|
|
33
|
-
# pytest -m "not slow" (Python)
|
|
34
|
-
# go test -short ./... (Go)
|
|
23
|
+
npm run test:smoke
|
|
35
24
|
```
|
|
36
25
|
|
|
37
26
|
适用场景:
|
|
38
|
-
-
|
|
27
|
+
- code-task 内循环
|
|
39
28
|
- 保存即跑 / 频繁反馈
|
|
40
29
|
- 仅断言项目结构、配置、模板契约
|
|
41
30
|
|
|
42
31
|
### core(目标 <15s)
|
|
43
32
|
|
|
44
33
|
```bash
|
|
45
|
-
|
|
46
|
-
# npm run test:core (Node.js)
|
|
47
|
-
# pytest -m "not contract" (Python)
|
|
48
|
-
# go test ./... (Go)
|
|
34
|
+
npm run test:core
|
|
49
35
|
```
|
|
50
36
|
|
|
51
37
|
适用场景:
|
|
52
38
|
- pre-commit hook(自动调用)
|
|
53
|
-
- 写
|
|
39
|
+
- 写 code.md / code-r{N}.md 报告前的最终验证
|
|
54
40
|
- 推送 PR 前的本地把关
|
|
55
41
|
|
|
56
|
-
### full
|
|
42
|
+
### full(目标 <60s)
|
|
57
43
|
|
|
58
44
|
```bash
|
|
59
|
-
|
|
60
|
-
# npm test (Node.js)
|
|
61
|
-
# mvn test (Maven)
|
|
62
|
-
# pytest (Python)
|
|
63
|
-
# go test ./... (Go)
|
|
45
|
+
npm test
|
|
64
46
|
```
|
|
65
47
|
|
|
66
48
|
适用场景:
|
|
67
49
|
- release / tag 前
|
|
68
|
-
- CI
|
|
50
|
+
- CI(unit-tests.yml)
|
|
69
51
|
- main 合并前的最终把关
|
|
70
52
|
|
|
71
|
-
|
|
53
|
+
full 层运行全部项目测试。`npm test` 使用通配匹配项目测试文件,**新增的测试文件会自动归入 full**,这是安全网。
|
|
72
54
|
|
|
73
55
|
## 3. 输出结果
|
|
74
56
|
|
|
@@ -11,7 +11,7 @@ priority: # Optional Issue field: Urgent | High | Medium |
|
|
|
11
11
|
effort: # Optional Issue field: High | Medium | Low
|
|
12
12
|
start_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
13
13
|
target_date: # Optional Issue field for Feature: YYYY-MM-DD
|
|
14
|
-
current_step: analysis
|
|
14
|
+
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
15
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -46,11 +46,11 @@ assigned_to: # claude | codex | gemini | opencode | human
|
|
|
46
46
|
|
|
47
47
|
## Implementation Notes
|
|
48
48
|
|
|
49
|
-
[Notes from the
|
|
49
|
+
[Notes from the code phase. Decisions made, trade-offs, deviations from design.]
|
|
50
50
|
|
|
51
51
|
## Review Feedback
|
|
52
52
|
|
|
53
|
-
<!-- Populated by review
|
|
53
|
+
<!-- Populated by review-* -->
|
|
54
54
|
|
|
55
55
|
## Activity Log
|
|
56
56
|
|
|
@@ -11,7 +11,7 @@ priority: # 可选 Issue 字段:Urgent | High | Medium |
|
|
|
11
11
|
effort: # 可选 Issue 字段:High | Medium | Low
|
|
12
12
|
start_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
13
13
|
target_date: # Feature 可选 Issue 字段:YYYY-MM-DD
|
|
14
|
-
current_step: analysis
|
|
14
|
+
current_step: requirement-analysis # requirement-analysis | requirement-analysis-review | technical-design | technical-design-review | code | code-review | completed
|
|
15
15
|
assigned_to: # claude | codex | gemini | opencode | human
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -50,7 +50,7 @@ assigned_to: # claude | codex | gemini | opencode | human
|
|
|
50
50
|
|
|
51
51
|
## 审查反馈
|
|
52
52
|
|
|
53
|
-
<!-- 由 review
|
|
53
|
+
<!-- 由 review-* 填写 -->
|
|
54
54
|
|
|
55
55
|
## 活动日志
|
|
56
56
|
|
|
@@ -1,149 +1,195 @@
|
|
|
1
|
-
# Bug
|
|
2
|
-
# Use this workflow when fixing a
|
|
1
|
+
# Bug-fix workflow
|
|
2
|
+
# Use this workflow when fixing a defect.
|
|
3
|
+
#
|
|
4
|
+
# Note: a step's `pr_tasks` list is counted toward workflow progress only when
|
|
5
|
+
# `.agents/.airc.json:requiresPullRequest !== false` (see .agents/skills/complete-task/SKILL.md).
|
|
3
6
|
|
|
4
7
|
name: bug-fix
|
|
5
|
-
description: Workflow for diagnosing and fixing a
|
|
8
|
+
description: Workflow for diagnosing and fixing a defect.
|
|
6
9
|
|
|
7
10
|
steps:
|
|
8
11
|
- name: analysis
|
|
9
|
-
description: Reproduce the
|
|
12
|
+
description: Reproduce the defect, identify the root cause, and define the fix scope.
|
|
10
13
|
recommended_agents:
|
|
11
14
|
- claude
|
|
12
15
|
- gemini
|
|
13
16
|
tasks:
|
|
14
|
-
- Understand the
|
|
15
|
-
- Reproduce the
|
|
17
|
+
- Understand the defect report and expected behavior
|
|
18
|
+
- Reproduce the defect when possible
|
|
16
19
|
- Trace the code path to identify the root cause
|
|
17
|
-
- Determine
|
|
18
|
-
- Record findings in the task
|
|
20
|
+
- Determine affected files and components
|
|
21
|
+
- Record findings in the task workspace
|
|
19
22
|
inputs:
|
|
20
|
-
-
|
|
23
|
+
- Defect report or Issue description
|
|
21
24
|
- Reproduction steps
|
|
22
25
|
- Project codebase
|
|
23
26
|
artifact_versioning:
|
|
24
27
|
outputs:
|
|
25
28
|
- name: analysis
|
|
26
29
|
pattern: "analysis.md | analysis-r{N}.md"
|
|
27
|
-
rule: "Scan existing analysis artifacts; create analysis.md for
|
|
30
|
+
rule: "Scan existing analysis artifacts; create analysis.md for round 1 and analysis-r{N}.md for later revisions (N = current highest round + 1)"
|
|
28
31
|
outputs:
|
|
29
|
-
- Root
|
|
30
|
-
-
|
|
31
|
-
- Updated task
|
|
32
|
+
- Root-cause analysis
|
|
33
|
+
- Affected files list
|
|
34
|
+
- Updated task analysis notes
|
|
35
|
+
|
|
36
|
+
- name: analysis-review
|
|
37
|
+
description: Review whether the defect analysis has sufficient reproduction evidence, a clear root cause, and a scoped fix.
|
|
38
|
+
recommended_agents:
|
|
39
|
+
- claude
|
|
40
|
+
- gemini
|
|
41
|
+
tasks:
|
|
42
|
+
- Verify reproduction evidence or the non-reproducible explanation
|
|
43
|
+
- Check root-cause reasoning and impact scope
|
|
44
|
+
- Confirm the analysis is ready for design
|
|
45
|
+
- Create the requirement analysis review report
|
|
46
|
+
inputs:
|
|
47
|
+
- Latest root-cause analysis
|
|
48
|
+
- Defect report or Issue description
|
|
49
|
+
artifact_versioning:
|
|
50
|
+
inputs:
|
|
51
|
+
- name: analysis
|
|
52
|
+
pattern: "analysis.md | analysis-r{N}.md"
|
|
53
|
+
rule: "Read the highest-round analysis artifact as review input"
|
|
54
|
+
outputs:
|
|
55
|
+
- name: review-analysis
|
|
56
|
+
pattern: "review-analysis.md | review-analysis-r{N}.md"
|
|
57
|
+
rule: "Scan existing requirement-analysis review artifacts; create review-analysis.md for round 1 and review-analysis-r{N}.md for later rounds (N = current highest round + 1)"
|
|
58
|
+
outputs:
|
|
59
|
+
- Requirement analysis review report
|
|
60
|
+
- Findings to fix, if any
|
|
32
61
|
|
|
33
62
|
- name: design
|
|
34
|
-
description: Plan the fix and
|
|
63
|
+
description: Plan the fix and account for edge cases.
|
|
35
64
|
recommended_agents:
|
|
36
65
|
- claude
|
|
37
66
|
tasks:
|
|
38
|
-
- Determine the best approach
|
|
39
|
-
- Identify potential side effects
|
|
40
|
-
- Plan
|
|
41
|
-
- Record the fix plan in the task
|
|
67
|
+
- Determine the best fix approach
|
|
68
|
+
- Identify potential side effects
|
|
69
|
+
- Plan regression tests
|
|
70
|
+
- Record the fix plan in the task workspace
|
|
42
71
|
inputs:
|
|
43
|
-
-
|
|
72
|
+
- Approved root-cause analysis
|
|
44
73
|
- Project architecture
|
|
45
74
|
artifact_versioning:
|
|
46
75
|
inputs:
|
|
47
76
|
- name: analysis
|
|
48
77
|
pattern: "analysis.md | analysis-r{N}.md"
|
|
49
78
|
rule: "Read the highest-round analysis artifact as design input"
|
|
79
|
+
- name: review-analysis
|
|
80
|
+
pattern: "review-analysis.md | review-analysis-r{N}.md"
|
|
81
|
+
rule: "Read the highest-round analysis review artifact and confirm feedback is approved or handled"
|
|
50
82
|
outputs:
|
|
51
83
|
- name: plan
|
|
52
84
|
pattern: "plan.md | plan-r{N}.md"
|
|
53
|
-
rule: "Scan existing plan artifacts; create plan.md for
|
|
85
|
+
rule: "Scan existing plan artifacts; create plan.md for round 1 and plan-r{N}.md for later revisions (N = current highest round + 1)"
|
|
54
86
|
outputs:
|
|
55
|
-
- Fix plan
|
|
56
|
-
-
|
|
87
|
+
- Fix plan
|
|
88
|
+
- Regression test list
|
|
57
89
|
|
|
58
|
-
- name:
|
|
59
|
-
description:
|
|
90
|
+
- name: design-review
|
|
91
|
+
description: Review whether the fix plan addresses the root cause, has sufficient tests, and controls side effects.
|
|
60
92
|
recommended_agents:
|
|
61
|
-
-
|
|
62
|
-
-
|
|
93
|
+
- claude
|
|
94
|
+
- gemini
|
|
63
95
|
tasks:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
- Ensure the code follows project conventions
|
|
96
|
+
- Verify the plan covers the approved root-cause analysis
|
|
97
|
+
- Check regression test strategy and potential side effects
|
|
98
|
+
- Confirm the plan is ready for coding
|
|
99
|
+
- Create the plan review report
|
|
69
100
|
inputs:
|
|
70
|
-
-
|
|
71
|
-
-
|
|
101
|
+
- Latest fix plan
|
|
102
|
+
- Latest root-cause analysis and review report
|
|
72
103
|
artifact_versioning:
|
|
104
|
+
inputs:
|
|
105
|
+
- name: plan
|
|
106
|
+
pattern: "plan.md | plan-r{N}.md"
|
|
107
|
+
rule: "Read the highest-round plan artifact as review input"
|
|
73
108
|
outputs:
|
|
74
|
-
- name:
|
|
75
|
-
pattern: "
|
|
76
|
-
rule: "Scan existing
|
|
109
|
+
- name: review-plan
|
|
110
|
+
pattern: "review-plan.md | review-plan-r{N}.md"
|
|
111
|
+
rule: "Scan existing plan review artifacts; create review-plan.md for round 1 and review-plan-r{N}.md for later rounds (N = current highest round + 1)"
|
|
77
112
|
outputs:
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- Updated task file (implementation notes)
|
|
113
|
+
- Plan review report
|
|
114
|
+
- Findings to fix, if any
|
|
81
115
|
|
|
82
|
-
- name:
|
|
83
|
-
description:
|
|
116
|
+
- name: code
|
|
117
|
+
description: Implement the defect fix and regression coverage; run the same stage again after code review to handle fixes.
|
|
84
118
|
recommended_agents:
|
|
85
|
-
-
|
|
119
|
+
- codex
|
|
120
|
+
- cursor
|
|
86
121
|
tasks:
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
122
|
+
- Create a bug-fix branch
|
|
123
|
+
- Implement the fix
|
|
124
|
+
- Add a regression test that fails without the fix
|
|
125
|
+
- Fix findings from the latest code-review artifact when in fix mode
|
|
126
|
+
- Verify existing tests still pass
|
|
127
|
+
- Ensure code follows project conventions
|
|
92
128
|
inputs:
|
|
93
|
-
-
|
|
94
|
-
-
|
|
129
|
+
- Approved fix plan
|
|
130
|
+
- Project coding standards
|
|
131
|
+
- Latest code review report when in fix mode
|
|
95
132
|
artifact_versioning:
|
|
96
133
|
inputs:
|
|
97
|
-
- name:
|
|
98
|
-
pattern: "
|
|
99
|
-
rule: "Read the highest-round
|
|
134
|
+
- name: plan
|
|
135
|
+
pattern: "plan.md | plan-r{N}.md"
|
|
136
|
+
rule: "Read the highest-round plan artifact as implementation input"
|
|
137
|
+
- name: review-plan
|
|
138
|
+
pattern: "review-plan.md | review-plan-r{N}.md"
|
|
139
|
+
rule: "Read the highest-round plan review artifact and confirm feedback is approved or handled"
|
|
140
|
+
- name: review-code
|
|
141
|
+
pattern: "review-code.md | review-code-r{N}.md"
|
|
142
|
+
rule: "In fix mode, read the highest-round code review artifact and verify it matches the latest Code Review entry in task.md Activity Log"
|
|
100
143
|
outputs:
|
|
101
|
-
- name:
|
|
102
|
-
pattern: "
|
|
103
|
-
rule: "Scan existing
|
|
144
|
+
- name: code
|
|
145
|
+
pattern: "code.md | code-r{N}.md"
|
|
146
|
+
rule: "Scan existing code artifacts; create code.md for round 1 and code-r{N}.md for later fixes or reimplementation (N = current highest round + 1)"
|
|
104
147
|
outputs:
|
|
105
|
-
-
|
|
106
|
-
-
|
|
148
|
+
- Bug-fix branch with implementation or fixes
|
|
149
|
+
- Regression test files
|
|
150
|
+
- Updated task notes
|
|
107
151
|
|
|
108
|
-
- name:
|
|
109
|
-
description:
|
|
152
|
+
- name: code-review
|
|
153
|
+
description: Verify that the fix is correct and complete.
|
|
110
154
|
recommended_agents:
|
|
111
|
-
-
|
|
112
|
-
- cursor
|
|
155
|
+
- claude
|
|
113
156
|
tasks:
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
157
|
+
- Verify the fix addresses the root cause
|
|
158
|
+
- Check regression test sufficiency
|
|
159
|
+
- Ensure no new problems were introduced
|
|
160
|
+
- Verify the fix does not break existing behavior
|
|
161
|
+
- Create the code review report
|
|
117
162
|
inputs:
|
|
118
|
-
- Review report
|
|
119
163
|
- Bug-fix branch
|
|
164
|
+
- Root-cause analysis
|
|
120
165
|
artifact_versioning:
|
|
121
166
|
inputs:
|
|
122
|
-
- name:
|
|
123
|
-
pattern: "
|
|
124
|
-
rule: "Read the highest-round
|
|
167
|
+
- name: code
|
|
168
|
+
pattern: "code.md | code-r{N}.md"
|
|
169
|
+
rule: "Read the highest-round code artifact as review input"
|
|
125
170
|
outputs:
|
|
126
|
-
- name:
|
|
127
|
-
pattern: "
|
|
128
|
-
rule: "Scan existing
|
|
171
|
+
- name: review-code
|
|
172
|
+
pattern: "review-code.md | review-code-r{N}.md"
|
|
173
|
+
rule: "Scan existing code review artifacts; create review-code.md for round 1 and review-code-r{N}.md for later rounds (N = current highest round + 1)"
|
|
129
174
|
outputs:
|
|
130
|
-
-
|
|
131
|
-
-
|
|
175
|
+
- Code review report
|
|
176
|
+
- Findings list, if any
|
|
132
177
|
|
|
133
178
|
- name: commit
|
|
134
|
-
description: Finalize the
|
|
179
|
+
description: Finalize the defect fix and create a pull request (the PR portion runs only when the project enables the PR flow).
|
|
135
180
|
recommended_agents:
|
|
136
181
|
- claude
|
|
137
182
|
- human
|
|
138
183
|
tasks:
|
|
139
184
|
- Ensure all tests pass
|
|
140
|
-
- Write a commit message that references the
|
|
141
|
-
- Create a pull request with a bug-fix summary
|
|
142
|
-
- Link the PR to the bug report issue
|
|
185
|
+
- Write a commit message that references the defect or Issue
|
|
143
186
|
- Move the task to completed
|
|
187
|
+
pr_tasks:
|
|
188
|
+
- Create a pull request with a defect-fix description
|
|
189
|
+
- Link the PR to the defect report Issue
|
|
144
190
|
inputs:
|
|
145
191
|
- Final bug-fix branch
|
|
146
|
-
- Task
|
|
192
|
+
- Task workspace
|
|
147
193
|
outputs:
|
|
148
|
-
-
|
|
149
|
-
-
|
|
194
|
+
- Completed task workspace under .agents/workspace/completed/
|
|
195
|
+
- Pull request (only when the project enables the PR flow)
|