@fitlab-ai/agent-infra 0.6.4 → 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 +63 -27
- package/README.zh-CN.md +61 -25
- package/bin/cli.ts +18 -6
- package/dist/bin/cli.js +20 -6
- package/dist/lib/cp.js +127 -0
- package/dist/lib/defaults.json +1 -0
- package/dist/lib/init.js +3 -0
- package/dist/lib/sandbox/clipboard/bridge.js +23 -4
- package/dist/lib/sandbox/clipboard/index.js +12 -3
- package/dist/lib/sandbox/commands/create.js +11 -2
- package/dist/lib/sandbox/commands/enter.js +29 -6
- 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 +15 -7
- package/dist/lib/sandbox/config.js +3 -0
- package/dist/lib/sandbox/index.js +6 -4
- package/dist/lib/sandbox/readme-scaffold.js +148 -0
- package/dist/lib/sandbox/runtimes/ai-tools.dockerfile +12 -6
- package/dist/lib/sandbox/runtimes/base.dockerfile +3 -3
- package/dist/lib/sandbox/tools.js +213 -8
- package/dist/lib/update.js +12 -1
- package/lib/cp.ts +177 -0
- package/lib/defaults.json +1 -0
- package/lib/init.ts +10 -0
- package/lib/sandbox/clipboard/bridge.ts +23 -4
- package/lib/sandbox/clipboard/index.ts +12 -3
- package/lib/sandbox/commands/create.ts +18 -2
- package/lib/sandbox/commands/enter.ts +48 -6
- package/lib/sandbox/commands/list-running.ts +135 -0
- package/lib/sandbox/commands/ls.ts +28 -49
- package/lib/sandbox/commands/rebuild.ts +24 -7
- package/lib/sandbox/config.ts +7 -0
- package/lib/sandbox/index.ts +6 -4
- package/lib/sandbox/readme-scaffold.ts +177 -0
- package/lib/sandbox/runtimes/ai-tools.dockerfile +12 -6
- package/lib/sandbox/runtimes/base.dockerfile +3 -3
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"skill": "
|
|
2
|
+
"skill": "review-plan",
|
|
3
3
|
"checks": {
|
|
4
4
|
"task-meta": {
|
|
5
5
|
"required_fields": [
|
|
@@ -12,35 +12,39 @@
|
|
|
12
12
|
"agent_infra_version",
|
|
13
13
|
"current_step",
|
|
14
14
|
"assigned_to"
|
|
15
|
-
]
|
|
15
|
+
],
|
|
16
|
+
"expected_step": "technical-design-review"
|
|
16
17
|
},
|
|
17
18
|
"artifact": {
|
|
18
|
-
"file_pattern": "
|
|
19
|
+
"file_pattern": "review-plan.md|review-plan-r{N}.md",
|
|
19
20
|
"required_sections": [
|
|
20
|
-
"
|
|
21
|
-
"
|
|
21
|
+
"审查摘要",
|
|
22
|
+
"问题清单",
|
|
23
|
+
"环境性遗留",
|
|
24
|
+
"结论与建议",
|
|
22
25
|
"状态核对",
|
|
23
26
|
"证据原文"
|
|
24
27
|
],
|
|
25
|
-
"freshness_minutes": 30,
|
|
26
28
|
"required_patterns": [
|
|
29
|
+
"^### 审查决定$",
|
|
27
30
|
"^\\$ "
|
|
28
|
-
]
|
|
31
|
+
],
|
|
32
|
+
"freshness_minutes": 30
|
|
29
33
|
},
|
|
30
34
|
"activity-log": {
|
|
31
|
-
"expected_action_pattern": "
|
|
35
|
+
"expected_action_pattern": "Plan Review \\(Round \\d+\\)",
|
|
32
36
|
"freshness_minutes": 30
|
|
33
37
|
},
|
|
34
38
|
"platform-sync": {
|
|
35
39
|
"when": "issue_number_exists",
|
|
36
|
-
"expected_status_label": "status:
|
|
40
|
+
"expected_status_label": "status: pending-design-work",
|
|
37
41
|
"expected_comment_marker": "<!-- sync-issue:{task-id}:{artifact-stem} -->",
|
|
38
42
|
"verify_comment_content": true,
|
|
39
43
|
"verify_task_comment_content": true,
|
|
40
44
|
"verify_issue_type": true,
|
|
41
45
|
"verify_issue_fields": false,
|
|
42
46
|
"verify_milestone": true,
|
|
43
|
-
"expected_status_label_key": "
|
|
47
|
+
"expected_status_label_key": "pendingDesignWork",
|
|
44
48
|
"expected_comment_marker_key": "artifact"
|
|
45
49
|
}
|
|
46
50
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Review Output Templates
|
|
2
|
+
|
|
3
|
+
Read this file before presenting the final review result to the user.
|
|
4
|
+
|
|
5
|
+
## Select exactly one output scenario
|
|
6
|
+
|
|
7
|
+
Evaluate in this order (**env-blocked count does not participate in selection**):
|
|
8
|
+
1. If `Blocker = 0`, `Major = 0`, and `Minor = 0`, use Scenario A, regardless of env-blocked count
|
|
9
|
+
2. If `Blocker = 0` and (`Major > 0` or `Minor > 0`), use Scenario B
|
|
10
|
+
3. If `Blocker > 0` and the issues can be handled by one focused revision, use Scenario C
|
|
11
|
+
4. If the technical plan needs major redesign, broad rewriting, or a restart, use Scenario D
|
|
12
|
+
|
|
13
|
+
Rules:
|
|
14
|
+
- Do not skip scenario selection
|
|
15
|
+
- Do not mix text from multiple scenarios
|
|
16
|
+
- If `Blocker > 0`, never use an approved template
|
|
17
|
+
- Never count env-blocked items as blocker / major / minor or use them to trigger Scenario B/C/D
|
|
18
|
+
- The selected scenario must include all TUI command formats
|
|
19
|
+
|
|
20
|
+
### Scenario A: Approved with no findings
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Task {task-id} technical plan review completed. Verdict: approved.
|
|
24
|
+
- Blockers: 0 | Major issues: 0 | Minor issues: 0[ | Environment-blocked: {n} (outside AI fix scope)]
|
|
25
|
+
[- Review report: .agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
|
+
|
|
27
|
+
Next step - write code:
|
|
28
|
+
- Claude Code / OpenCode: /code-task {task-id}
|
|
29
|
+
- Gemini CLI: /agent-infra:code-task {task-id}
|
|
30
|
+
- Codex CLI: $code-task {task-id}
|
|
31
|
+
|
|
32
|
+
[When env-blocked > 0, append:]
|
|
33
|
+
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Scenario B: Approved with findings
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
Task {task-id} technical plan review completed. Verdict: approved.
|
|
40
|
+
- Blockers: 0 | Major issues: {n} | Minor issues: {n}[ | Environment-blocked: {n} (outside AI fix scope)]
|
|
41
|
+
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
42
|
+
|
|
43
|
+
Next step - revise plan before coding (recommended):
|
|
44
|
+
- Claude Code / OpenCode: /plan-task {task-id}
|
|
45
|
+
- Gemini CLI: /agent-infra:plan-task {task-id}
|
|
46
|
+
- Codex CLI: $plan-task {task-id}
|
|
47
|
+
|
|
48
|
+
Or proceed directly to coding:
|
|
49
|
+
- Claude Code / OpenCode: /code-task {task-id}
|
|
50
|
+
- Gemini CLI: /agent-infra:code-task {task-id}
|
|
51
|
+
- Codex CLI: $code-task {task-id}
|
|
52
|
+
|
|
53
|
+
[When env-blocked > 0, append:]
|
|
54
|
+
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Scenario C: Changes requested
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
Task {task-id} technical plan review completed. Verdict: changes requested.
|
|
61
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n}[ | Environment-blocked: {n} (outside AI fix scope)]
|
|
62
|
+
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
63
|
+
|
|
64
|
+
Next step - revise technical plan:
|
|
65
|
+
- Claude Code / OpenCode: /plan-task {task-id}
|
|
66
|
+
- Gemini CLI: /agent-infra:plan-task {task-id}
|
|
67
|
+
- Codex CLI: $plan-task {task-id}
|
|
68
|
+
|
|
69
|
+
[When env-blocked > 0, append:]
|
|
70
|
+
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Scenario D: Rejected
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
Task {task-id} technical plan review completed. Verdict: rejected, redesign required.
|
|
77
|
+
- Blockers: {n} | Major issues: {n} | Minor issues: {n}[ | Environment-blocked: {n} (outside AI fix scope)]
|
|
78
|
+
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
79
|
+
|
|
80
|
+
Next step - redesign:
|
|
81
|
+
- Claude Code / OpenCode: /plan-task {task-id}
|
|
82
|
+
- Gemini CLI: /agent-infra:plan-task {task-id}
|
|
83
|
+
- Codex CLI: $plan-task {task-id}
|
|
84
|
+
|
|
85
|
+
[When env-blocked > 0, append:]
|
|
86
|
+
Reminder: env-blocked items belong in the PR description manual verification checklist and should not trigger /plan-task.
|
|
87
|
+
```
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# 审查输出模板
|
|
2
|
+
|
|
3
|
+
在向用户汇报最终审查结论之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 选择唯一输出场景
|
|
6
|
+
|
|
7
|
+
按以下顺序判断(**注意:env-blocked 数量不参与判断**):
|
|
8
|
+
1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0`,使用场景 A(不管 env-blocked 是否 > 0)
|
|
9
|
+
2. 如果 `Blocker = 0` 且(`Major > 0` 或 `Minor > 0`),使用场景 B
|
|
10
|
+
3. 如果 `Blocker > 0`,且问题可以通过一次聚焦修复解决,使用场景 C
|
|
11
|
+
4. 如果技术方案需要重大重构、大范围重写或整体重来,使用场景 D
|
|
12
|
+
|
|
13
|
+
禁止规则:
|
|
14
|
+
- 不要跳过场景判断步骤
|
|
15
|
+
- 不要混用不同场景的文案
|
|
16
|
+
- 只要 `Blocker > 0`,就绝对不能输出通过模板
|
|
17
|
+
- env-blocked 项绝对不能被计入 blocker / major / minor 计数,也不能用作触发场景 B/C/D 的依据
|
|
18
|
+
- 所选场景中必须包含所有 TUI 命令格式
|
|
19
|
+
|
|
20
|
+
### 场景 A:通过且无问题
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
任务 {task-id} 技术方案审查完成。结论:通过。
|
|
24
|
+
- 阻塞项:0 | 主要问题:0 | 次要问题:0[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
25
|
+
[- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}]
|
|
26
|
+
|
|
27
|
+
下一步 - 编写代码:
|
|
28
|
+
- Claude Code / OpenCode:/code-task {task-id}
|
|
29
|
+
- Gemini CLI:/agent-infra:code-task {task-id}
|
|
30
|
+
- Codex CLI:$code-task {task-id}
|
|
31
|
+
|
|
32
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
33
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 场景 B:通过但有问题
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
任务 {task-id} 技术方案审查完成。结论:通过。
|
|
40
|
+
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
41
|
+
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
42
|
+
|
|
43
|
+
下一步 - 修订方案后编码(推荐):
|
|
44
|
+
- Claude Code / OpenCode:/plan-task {task-id}
|
|
45
|
+
- Gemini CLI:/agent-infra:plan-task {task-id}
|
|
46
|
+
- Codex CLI:$plan-task {task-id}
|
|
47
|
+
|
|
48
|
+
或直接进入编码:
|
|
49
|
+
- Claude Code / OpenCode:/code-task {task-id}
|
|
50
|
+
- Gemini CLI:/agent-infra:code-task {task-id}
|
|
51
|
+
- Codex CLI:$code-task {task-id}
|
|
52
|
+
|
|
53
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
54
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 场景 C:需要修改
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
任务 {task-id} 技术方案审查完成。结论:需要修改。
|
|
61
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
62
|
+
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
63
|
+
|
|
64
|
+
下一步 - 修订技术方案:
|
|
65
|
+
- Claude Code / OpenCode:/plan-task {task-id}
|
|
66
|
+
- Gemini CLI:/agent-infra:plan-task {task-id}
|
|
67
|
+
- Codex CLI:$plan-task {task-id}
|
|
68
|
+
|
|
69
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
70
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 场景 D:拒绝
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
任务 {task-id} 技术方案审查完成。结论:拒绝,需要重新设计。
|
|
77
|
+
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}[ | 环境性遗留:{n}(不在 AI 修复范围)]
|
|
78
|
+
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
79
|
+
|
|
80
|
+
下一步 - 重新设计:
|
|
81
|
+
- Claude Code / OpenCode:/plan-task {task-id}
|
|
82
|
+
- Gemini CLI:/agent-infra:plan-task {task-id}
|
|
83
|
+
- Codex CLI:$plan-task {task-id}
|
|
84
|
+
|
|
85
|
+
[当 env-blocked > 0 时,在最后附加一行:]
|
|
86
|
+
提醒:env-blocked 项需在 PR description 的「待人工验证」清单中承接,不应触发 /plan-task。
|
|
87
|
+
```
|
|
@@ -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
|
|