@fitlab-ai/agent-infra 0.4.0 → 0.4.1
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 +1 -3
- package/README.zh-CN.md +1 -3
- package/lib/defaults.json +2 -0
- package/lib/init.js +1 -6
- package/lib/update.js +0 -55
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.md +10 -0
- package/templates/.agents/QUICKSTART.zh-CN.md +10 -0
- package/templates/.agents/README.md +18 -11
- package/templates/.agents/README.zh-CN.md +18 -11
- package/templates/.agents/skills/analyze-task/SKILL.md +1 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/block-task/SKILL.md +1 -5
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/check-task/SKILL.md +1 -5
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/commit/SKILL.md +26 -198
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +26 -197
- package/templates/.agents/skills/commit/reference/commit-message.md +60 -0
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +60 -0
- package/templates/.agents/skills/commit/reference/copyright-check.md +39 -0
- package/templates/.agents/skills/commit/reference/copyright-check.zh-CN.md +39 -0
- package/templates/.agents/skills/commit/reference/task-status-update.md +88 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +88 -0
- package/templates/.agents/skills/complete-task/SKILL.md +1 -6
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/create-issue/SKILL.md +32 -251
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +33 -252
- package/templates/.agents/skills/create-issue/reference/label-and-type.md +77 -0
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +77 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.md +45 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +45 -0
- package/templates/.agents/skills/create-pr/SKILL.md +33 -224
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +32 -222
- package/templates/.agents/skills/create-pr/reference/branch-strategy.md +29 -0
- package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +29 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.md +86 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +86 -0
- package/templates/.agents/skills/create-release-note/SKILL.md +10 -13
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/create-task/SKILL.md +1 -4
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/implement-task/SKILL.md +46 -176
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +42 -170
- package/templates/.agents/skills/implement-task/reference/implementation-rules.md +58 -0
- package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +58 -0
- package/templates/.agents/skills/implement-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/implement-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/import-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-issue/SKILL.md +1 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/init-labels/SKILL.md +1 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/init-milestones/SKILL.md +1 -3
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/plan-task/SKILL.md +1 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/refine-task/SKILL.md +38 -162
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +36 -158
- package/templates/.agents/skills/refine-task/reference/fix-workflow.md +76 -0
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +76 -0
- package/templates/.agents/skills/refine-task/reference/report-template.md +38 -0
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +38 -0
- package/templates/.agents/skills/refine-title/SKILL.md +1 -4
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/release/SKILL.md +10 -12
- package/templates/.agents/skills/release/SKILL.zh-CN.md +10 -11
- package/templates/.agents/skills/review-task/SKILL.md +37 -239
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +37 -238
- package/templates/.agents/skills/review-task/reference/output-templates.md +72 -0
- package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +72 -0
- package/templates/.agents/skills/review-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.md +24 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +24 -0
- package/templates/.agents/skills/sync-issue/SKILL.md +29 -487
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +30 -487
- package/templates/.agents/skills/sync-issue/reference/comment-publish.md +88 -0
- package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +88 -0
- package/templates/.agents/skills/sync-issue/reference/delivery-detection.md +42 -0
- package/templates/.agents/skills/sync-issue/reference/delivery-detection.zh-CN.md +42 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.md +63 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +63 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
- package/templates/.agents/skills/sync-pr/SKILL.md +25 -287
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +29 -291
- package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
- package/templates/.agents/skills/test/SKILL.md +1 -3
- package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/test-integration/SKILL.md +1 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/update-agent-infra/SKILL.md +2 -6
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +42 -46
- package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
- package/templates/.claude/CLAUDE.md +13 -51
- package/templates/.claude/CLAUDE.zh-CN.md +13 -51
- package/templates/.claude/commands/analyze-task.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.md +2 -1
- package/templates/.claude/commands/block-task.zh-CN.md +2 -1
- package/templates/.claude/commands/check-task.md +2 -1
- package/templates/.claude/commands/check-task.zh-CN.md +2 -1
- package/templates/.claude/commands/close-codescan.md +2 -1
- package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/close-dependabot.md +2 -1
- package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/commit.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-issue.md +1 -1
- package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.md +1 -1
- package/templates/.claude/commands/create-pr.zh-CN.md +1 -1
- package/templates/.claude/commands/create-release-note.md +2 -1
- package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
- package/templates/.claude/commands/create-task.md +1 -1
- package/templates/.claude/commands/create-task.zh-CN.md +1 -1
- package/templates/.claude/commands/implement-task.md +1 -1
- package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
- package/templates/.claude/commands/import-codescan.md +1 -0
- package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/import-dependabot.md +1 -0
- package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/import-issue.md +1 -1
- package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/init-labels.md +1 -0
- package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
- package/templates/.claude/commands/init-milestones.md +2 -1
- package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
- package/templates/.claude/commands/plan-task.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-title.md +2 -1
- package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
- package/templates/.claude/commands/release.md +2 -1
- package/templates/.claude/commands/release.zh-CN.md +2 -1
- package/templates/.claude/commands/review-task.md +1 -1
- package/templates/.claude/commands/review-task.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-issue.md +1 -1
- package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-pr.md +1 -1
- package/templates/.claude/commands/sync-pr.zh-CN.md +1 -1
- package/templates/.claude/commands/test-integration.md +2 -1
- package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
- package/templates/.claude/commands/test.md +1 -1
- package/templates/.claude/commands/test.zh-CN.md +1 -1
- package/templates/.claude/commands/update-agent-infra.md +2 -1
- package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
- package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/release.toml +1 -1
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-pr.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/test.toml +1 -1
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
- package/templates/.github/hooks/check-version-format.sh +29 -0
- package/templates/.github/hooks/pre-commit +8 -0
- package/templates/.opencode/commands/analyze-task.md +1 -1
- package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/block-task.md +1 -1
- package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/check-task.md +1 -1
- package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-codescan.md +1 -1
- package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-dependabot.md +1 -1
- package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/commit.md +1 -1
- package/templates/.opencode/commands/commit.zh-CN.md +1 -1
- package/templates/.opencode/commands/complete-task.md +1 -1
- package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-pr.md +1 -1
- package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-release-note.md +1 -1
- package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-task.md +1 -1
- package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/implement-task.md +1 -1
- package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-issue.md +1 -1
- package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-milestones.md +1 -1
- package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
- package/templates/.opencode/commands/plan-task.md +1 -1
- package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-title.md +1 -1
- package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
- package/templates/.opencode/commands/release.md +1 -1
- package/templates/.opencode/commands/release.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-task.md +1 -1
- package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-issue.md +1 -1
- package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-pr.md +1 -1
- package/templates/.opencode/commands/sync-pr.zh-CN.md +1 -1
- package/templates/.opencode/commands/test-integration.md +1 -1
- package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
- package/templates/.opencode/commands/test.md +1 -1
- package/templates/.opencode/commands/test.zh-CN.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
- package/templates/AGENTS.md +10 -2
- package/templates/AGENTS.zh-CN.md +10 -2
|
@@ -1,79 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-task
|
|
3
|
-
description:
|
|
4
|
-
Review implemented task changes and output a code review report, categorized by
|
|
5
|
-
severity (Blocker / Major / Minor). Triggered when the user requests code
|
|
6
|
-
review after implementation is complete. Argument: task-id.
|
|
3
|
+
description: "Review a task implementation and output a code review report"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Code Review
|
|
10
7
|
|
|
8
|
+
Review the latest implementation round and produce `review.md` or `review-r{N}.md`.
|
|
9
|
+
|
|
11
10
|
## Boundary / Critical Rules
|
|
12
11
|
|
|
13
|
-
- This skill
|
|
14
|
-
- After executing this skill, you **must** immediately update task
|
|
12
|
+
- This skill reviews code and writes a report; it does not modify product code
|
|
13
|
+
- After executing this skill, you **must** immediately update task.md
|
|
15
14
|
|
|
16
15
|
## Steps
|
|
17
16
|
|
|
18
17
|
### 1. Verify Prerequisites
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
|
|
25
|
-
|
|
26
|
-
If either file is missing, prompt the user to complete the prerequisite step first.
|
|
19
|
+
Require:
|
|
20
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
21
|
+
- at least one implementation artifact: `implementation.md` or `implementation-r{N}.md`
|
|
27
22
|
|
|
28
23
|
### 2. Determine Review Round
|
|
29
24
|
|
|
30
|
-
Scan
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
- If `review-r{N}.md` exists -> this is Round N+1 and must create `review-r{N+1}.md`
|
|
34
|
-
|
|
35
|
-
Record:
|
|
36
|
-
- `{review-round}`: the current review round
|
|
37
|
-
- `{review-artifact}`: the review report filename for this round
|
|
38
|
-
|
|
39
|
-
### 3. Read Implementation and Refinement Reports
|
|
40
|
-
|
|
41
|
-
Scan implementation reports in the task directory (`implementation.md`, `implementation-r{N}.md`) and read the highest-round file to understand:
|
|
42
|
-
- The list of modified files
|
|
43
|
-
- The key functionality that was implemented
|
|
44
|
-
- Test results
|
|
45
|
-
- Any items the implementer marked for reviewer attention
|
|
46
|
-
|
|
47
|
-
If refinement artifacts exist (`refinement.md`, `refinement-r{N}.md`), read the highest-round file to understand:
|
|
48
|
-
- Which review findings were already fixed
|
|
49
|
-
- The effect of those fixes on code and tests
|
|
50
|
-
- How the current code state changed relative to the previous review
|
|
25
|
+
Scan the task directory and record:
|
|
26
|
+
- `{review-round}`
|
|
27
|
+
- `{review-artifact}` as `review.md` or `review-r{N}.md`
|
|
51
28
|
|
|
52
|
-
###
|
|
29
|
+
### 3. Read Implementation and Refinement Context
|
|
53
30
|
|
|
54
|
-
|
|
31
|
+
Read the highest-round implementation artifact and, if present, the highest-round refinement artifact.
|
|
55
32
|
|
|
56
|
-
|
|
57
|
-
- [ ] Code quality and coding standards (per project instructions)
|
|
58
|
-
- [ ] Bug and risk detection
|
|
59
|
-
- [ ] Test coverage and test quality (when a feature is removed, verify that test fixtures and assertions for that feature are also removed — not mechanically flipped; assertions that only confirm data passes through unchanged are not valid tests)
|
|
60
|
-
- [ ] Error handling and edge cases
|
|
61
|
-
- [ ] Performance and security concerns
|
|
62
|
-
- [ ] Code comments and documentation
|
|
63
|
-
- [ ] Alignment with the technical plan
|
|
33
|
+
### 4. Perform the Review
|
|
64
34
|
|
|
65
|
-
|
|
66
|
-
1. **Strict but fair**: Point out issues while also calling out what was done well
|
|
67
|
-
2. **Specific**: Provide exact file paths and line numbers
|
|
68
|
-
3. **Actionable**: Do not only point out problems; give fix suggestions
|
|
69
|
-
4. **Severity-based**: Distinguish must-fix issues from optional improvements
|
|
35
|
+
Follow `.agents/workflows/feature-development.yaml` and inspect `git diff` for the full change context.
|
|
70
36
|
|
|
71
|
-
|
|
37
|
+
> Detailed review criteria, severity rules, and reviewer expectations live in `reference/review-criteria.md`. Read `reference/review-criteria.md` before reviewing.
|
|
72
38
|
|
|
73
|
-
### 5.
|
|
39
|
+
### 5. Write the Review Report
|
|
74
40
|
|
|
75
41
|
Create `.agents/workspace/active/{task-id}/{review-artifact}`.
|
|
76
42
|
|
|
43
|
+
> The report format and severity layout live in `reference/report-template.md`. Read `reference/report-template.md` before writing the review.
|
|
44
|
+
|
|
77
45
|
### 6. Update Task Status
|
|
78
46
|
|
|
79
47
|
Get the current time:
|
|
@@ -82,205 +50,35 @@ Get the current time:
|
|
|
82
50
|
date "+%Y-%m-%d %H:%M:%S"
|
|
83
51
|
```
|
|
84
52
|
|
|
85
|
-
Update
|
|
86
|
-
-
|
|
87
|
-
- `assigned_to`: {reviewer}
|
|
88
|
-
- `updated_at`: {current time}
|
|
89
|
-
- Record the review artifact for this round: `{review-artifact}` (Round `{review-round}`)
|
|
90
|
-
- Mark code-review as complete in workflow progress and include the actual round when the task template supports it
|
|
91
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
92
|
-
```
|
|
93
|
-
- {yyyy-MM-dd HH:mm:ss} — **Code Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n} → {artifact-filename}
|
|
94
|
-
```
|
|
53
|
+
Update task.md and append:
|
|
54
|
+
`- {yyyy-MM-dd HH:mm:ss} — **Code Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n} → {artifact-filename}`
|
|
95
55
|
|
|
96
56
|
### 7. Inform User
|
|
97
57
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
>
|
|
104
|
-
> 1. If `Blocker = 0` and `Major = 0` and `Minor = 0` -> use "Output Branch A - Passed with No Issues"
|
|
105
|
-
> 2. If `Blocker = 0` and (`Major > 0` or `Minor > 0`) -> use "Output Branch B - Passed with Issues"
|
|
106
|
-
> 3. If `Blocker > 0` and the issues can be resolved in a focused follow-up fix, **without requiring broad rework** -> use "Output Branch C - Changes Requested"
|
|
107
|
-
> 4. If the issues require major rework, redesign, or re-implementation -> use "Output Branch D - Rejected"
|
|
108
|
-
>
|
|
109
|
-
> **Do not skip the decision. Do not mix templates from different branches. You must output exactly one branch. As soon as `Blocker > 0`, you must not output any "Approved" template.**
|
|
110
|
-
|
|
111
|
-
**📋 Output Branch A - Passed with No Issues** (Condition: Blocker = 0 and Major = 0 and Minor = 0):
|
|
112
|
-
```
|
|
113
|
-
Code review complete for task {task-id}. Verdict: Approved.
|
|
114
|
-
- Blockers: 0 | Major issues: 0 | Minor issues: 0
|
|
115
|
-
|
|
116
|
-
Next step - commit changes:
|
|
117
|
-
- Claude Code / OpenCode: /commit
|
|
118
|
-
- Gemini CLI: /{{project}}:commit
|
|
119
|
-
- Codex CLI: $commit
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
**📋 Output Branch B - Passed with Issues** (Condition: Blocker = 0 and (`Major > 0` or `Minor > 0`)):
|
|
123
|
-
```
|
|
124
|
-
Code review complete for task {task-id}. Verdict: Approved.
|
|
125
|
-
- Blockers: 0 | Major issues: {n} | Minor issues: {n}
|
|
126
|
-
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
127
|
-
|
|
128
|
-
Next step - fix issues before commit (recommended):
|
|
129
|
-
- Claude Code / OpenCode: /refine-task {task-id}
|
|
130
|
-
- Gemini CLI: /{{project}}:refine-task {task-id}
|
|
131
|
-
- Codex CLI: $refine-task {task-id}
|
|
132
|
-
|
|
133
|
-
Or commit directly (skip fixes):
|
|
134
|
-
- Claude Code / OpenCode: /commit
|
|
135
|
-
- Gemini CLI: /{{project}}:commit
|
|
136
|
-
- Codex CLI: $commit
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**📋 Output Branch C - Changes Requested** (Condition: Blocker > 0, and the issues are fixable without major rework):
|
|
140
|
-
```
|
|
141
|
-
Code review complete for task {task-id}. Verdict: Changes Requested.
|
|
142
|
-
- Blockers: {n} | Major issues: {n} | Minor issues: {n}
|
|
143
|
-
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
144
|
-
|
|
145
|
-
Next step - refine the issues:
|
|
146
|
-
- Claude Code / OpenCode: /refine-task {task-id}
|
|
147
|
-
- Gemini CLI: /{{project}}:refine-task {task-id}
|
|
148
|
-
- Codex CLI: $refine-task {task-id}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
**📋 Output Branch D - Rejected** (Condition: major rework, redesign, or re-implementation is required):
|
|
152
|
-
```
|
|
153
|
-
Code review complete for task {task-id}. Verdict: Rejected, major rework required.
|
|
154
|
-
- Review report: .agents/workspace/active/{task-id}/{review-artifact}
|
|
155
|
-
|
|
156
|
-
Next step - re-implement:
|
|
157
|
-
- Claude Code / OpenCode: /implement-task {task-id}
|
|
158
|
-
- Gemini CLI: /{{project}}:implement-task {task-id}
|
|
159
|
-
- Codex CLI: $implement-task {task-id}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
## Output Template
|
|
58
|
+
Choose exactly one branch based on the findings:
|
|
59
|
+
- no blockers, no major, no minor -> approved with no issues
|
|
60
|
+
- no blockers, but major or minor findings -> approved with issues
|
|
61
|
+
- blockers that can be fixed in a focused pass -> changes requested
|
|
62
|
+
- major redesign or re-implementation needed -> rejected
|
|
163
63
|
|
|
164
|
-
|
|
165
|
-
# Code Review Report
|
|
64
|
+
> The full four-branch output templates, selection rules, and prohibition clauses live in `reference/output-templates.md`. Read `reference/output-templates.md` before reporting the review result.
|
|
166
65
|
|
|
167
|
-
|
|
168
|
-
- **Artifact file**: `{review-artifact}`
|
|
169
|
-
- **Implementation input**:
|
|
170
|
-
- `{implementation-artifact}`
|
|
171
|
-
- `{refinement-artifact}` (if present)
|
|
172
|
-
|
|
173
|
-
## Review Summary
|
|
174
|
-
|
|
175
|
-
- **Reviewer**: {reviewer name}
|
|
176
|
-
- **Review time**: {timestamp}
|
|
177
|
-
- **Review scope**: {file count and major modules}
|
|
178
|
-
- **Overall verdict**: {Approved / Changes Requested / Rejected}
|
|
179
|
-
|
|
180
|
-
## Findings
|
|
181
|
-
|
|
182
|
-
### Blockers (must fix)
|
|
183
|
-
|
|
184
|
-
#### 1. {Issue title}
|
|
185
|
-
**File**: `{file-path}:{line-number}`
|
|
186
|
-
**Description**: {Detailed description}
|
|
187
|
-
**Suggested fix**: {Concrete suggestion}
|
|
188
|
-
**Severity**: High
|
|
189
|
-
|
|
190
|
-
### Major Issues (should fix)
|
|
191
|
-
|
|
192
|
-
#### 1. {Issue title}
|
|
193
|
-
**File**: `{file-path}:{line-number}`
|
|
194
|
-
**Description**: {Detailed description}
|
|
195
|
-
**Suggested fix**: {Concrete suggestion}
|
|
196
|
-
**Severity**: Medium
|
|
197
|
-
|
|
198
|
-
### Minor Issues (optional improvements)
|
|
199
|
-
|
|
200
|
-
#### 1. {Improvement point}
|
|
201
|
-
**File**: `{file-path}:{line-number}`
|
|
202
|
-
**Suggestion**: {Improvement suggestion}
|
|
203
|
-
|
|
204
|
-
## Highlights
|
|
205
|
-
|
|
206
|
-
- {Positive aspect 1}
|
|
207
|
-
- {Positive aspect 2}
|
|
208
|
-
|
|
209
|
-
## Standards Compliance
|
|
210
|
-
|
|
211
|
-
### Coding Standards
|
|
212
|
-
- [ ] Naming conventions
|
|
213
|
-
- [ ] Code style
|
|
214
|
-
- [ ] Comment standards
|
|
215
|
-
- [ ] Testing standards
|
|
216
|
-
|
|
217
|
-
### Code Quality Metrics
|
|
218
|
-
- Cyclomatic complexity: {Assessment}
|
|
219
|
-
- Code duplication: {Assessment}
|
|
220
|
-
- Test coverage: {Percentage or assessment}
|
|
221
|
-
|
|
222
|
-
## Test Review
|
|
223
|
-
|
|
224
|
-
### Test Coverage
|
|
225
|
-
- Unit tests: {Assessment}
|
|
226
|
-
- Edge cases: {Covered?}
|
|
227
|
-
- Error scenarios: {Covered?}
|
|
228
|
-
|
|
229
|
-
### Test Quality
|
|
230
|
-
- Test naming: {Assessment}
|
|
231
|
-
- Assertion sufficiency: {Assessment}
|
|
232
|
-
- Test independence: {Assessment}
|
|
233
|
-
|
|
234
|
-
## Security Review
|
|
235
|
-
|
|
236
|
-
- SQL injection risk: {Check result}
|
|
237
|
-
- XSS risk: {Check result}
|
|
238
|
-
- Access control: {Check result}
|
|
239
|
-
- Sensitive data exposure: {Check result}
|
|
240
|
-
|
|
241
|
-
## Performance Review
|
|
242
|
-
|
|
243
|
-
- Algorithmic complexity: {Assessment}
|
|
244
|
-
- Resource management: {Check result}
|
|
245
|
-
- Potential bottlenecks: {Assessment}
|
|
246
|
-
|
|
247
|
-
## Alignment with Plan
|
|
248
|
-
|
|
249
|
-
- [ ] Implementation matches the technical plan
|
|
250
|
-
- [ ] No deviation from design intent
|
|
251
|
-
- [ ] No out-of-scope functionality was added
|
|
252
|
-
|
|
253
|
-
## Conclusion and Recommendation
|
|
254
|
-
|
|
255
|
-
### Approval Decision
|
|
256
|
-
- [ ] Approved - no blocking issues
|
|
257
|
-
- [ ] Changes Requested - issues need to be resolved
|
|
258
|
-
- [ ] Rejected - major rework required
|
|
259
|
-
|
|
260
|
-
### Next Steps
|
|
261
|
-
{Recommendation based on the review result}
|
|
262
|
-
```
|
|
66
|
+
Include all TUI command formats in the next-step output.
|
|
263
67
|
|
|
264
68
|
## Completion Checklist
|
|
265
69
|
|
|
266
|
-
- [ ]
|
|
267
|
-
- [ ] Created
|
|
268
|
-
- [ ] Updated
|
|
269
|
-
- [ ]
|
|
270
|
-
- [ ] Updated `assigned_to` to the reviewer name in task.md
|
|
271
|
-
- [ ] Appended an Activity Log entry to task.md
|
|
272
|
-
- [ ] Marked code-review as complete in workflow progress
|
|
273
|
-
- [ ] Informed the user of the next step based on the review result (must include all TUI command formats without filtering)
|
|
70
|
+
- [ ] Reviewed the latest implementation context
|
|
71
|
+
- [ ] Created `{review-artifact}`
|
|
72
|
+
- [ ] Updated task.md and appended the Activity Log entry
|
|
73
|
+
- [ ] Chose exactly one verdict branch in the user output
|
|
274
74
|
|
|
275
75
|
## Notes
|
|
276
76
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
4. **Severity categories**: Blockers must be fixed; major issues should be fixed; minor issues are optional
|
|
281
|
-
5. **Versioning rule**: First review uses `review.md`; later rounds use `review-r{N}.md`
|
|
77
|
+
- Round 1 uses `review.md`; later rounds use `review-r{N}.md`
|
|
78
|
+
- Always cite concrete file paths and line numbers in findings
|
|
79
|
+
- Review severity must distinguish blockers, major issues, and minor issues
|
|
282
80
|
|
|
283
81
|
## Error Handling
|
|
284
82
|
|
|
285
|
-
- Task not found:
|
|
286
|
-
- Missing implementation report:
|
|
83
|
+
- Task not found: `Task {task-id} not found`
|
|
84
|
+
- Missing implementation report: `Implementation report not found, please run the implement-task skill first`
|
|
@@ -1,78 +1,47 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-task
|
|
3
|
-
description:
|
|
4
|
-
审查任务实现代码并输出代码审查报告,按严重程度分类(Blocker / Major / Minor)。
|
|
5
|
-
当用户在实现完成后要求代码审查时触发。参数:task-id。
|
|
3
|
+
description: "审查任务实现并输出代码审查报告"
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# 代码审查
|
|
9
7
|
|
|
8
|
+
审查最新实现轮次,并产出 `review.md` 或 `review-r{N}.md`。
|
|
9
|
+
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
- 执行本技能后,你**必须**立即更新 task.md
|
|
12
|
+
- 本技能只审查代码并写报告,不修改业务代码
|
|
13
|
+
- 执行本技能后,你**必须**立即更新 task.md
|
|
14
14
|
|
|
15
15
|
## 执行步骤
|
|
16
16
|
|
|
17
17
|
### 1. 验证前置条件
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
注意:`{task-id}` 格式为 `TASK-{yyyyMMdd-HHmmss}`,例如 `TASK-20260306-143022`
|
|
24
|
-
|
|
25
|
-
如果任一文件缺失,提示用户先完成前置步骤。
|
|
19
|
+
要求存在:
|
|
20
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
21
|
+
- 至少一个实现产物:`implementation.md` 或 `implementation-r{N}.md`
|
|
26
22
|
|
|
27
23
|
### 2. 确定审查轮次
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
- 如果存在 `review-r{N}.md` → 本轮为第 N+1 轮,产出 `review-r{N+1}.md`
|
|
33
|
-
|
|
34
|
-
记录:
|
|
35
|
-
- `{review-round}`:本轮审查轮次
|
|
36
|
-
- `{review-artifact}`:本轮审查报告文件名
|
|
37
|
-
|
|
38
|
-
### 3. 阅读实现与修复报告
|
|
39
|
-
|
|
40
|
-
扫描任务目录中的实现报告文件(`implementation.md`、`implementation-r{N}.md`),读取最高轮次的文件以理解:
|
|
41
|
-
- 修改的文件列表
|
|
42
|
-
- 实现的关键功能
|
|
43
|
-
- 测试情况
|
|
44
|
-
- 实现者标记的需关注事项
|
|
45
|
-
|
|
46
|
-
如果存在修复产物(`refinement.md`、`refinement-r{N}.md`),读取最高轮次的文件以理解:
|
|
47
|
-
- 已修复了哪些审查问题
|
|
48
|
-
- 修复对代码和测试的影响
|
|
49
|
-
- 当前代码状态相对上轮审查的变化
|
|
25
|
+
扫描任务目录并记录:
|
|
26
|
+
- `{review-round}`
|
|
27
|
+
- 作为本轮产物的 `{review-artifact}`,格式为 `review.md` 或 `review-r{N}.md`
|
|
50
28
|
|
|
51
|
-
###
|
|
29
|
+
### 3. 阅读实现与修复上下文
|
|
52
30
|
|
|
53
|
-
|
|
31
|
+
读取最高轮次的实现产物;如存在修复产物,也读取最高轮次的修复产物。
|
|
54
32
|
|
|
55
|
-
|
|
56
|
-
- [ ] 代码质量和编码规范(按项目指南)
|
|
57
|
-
- [ ] Bug 和潜在问题检测
|
|
58
|
-
- [ ] 测试覆盖率和测试质量(删除功能时,确认为该功能而存在的测试 fixture 和断言已一并删除,而非机械翻转断言方向;仅确认数据原样通过的断言不构成有效测试)
|
|
59
|
-
- [ ] 错误处理和边界情况
|
|
60
|
-
- [ ] 性能和安全问题
|
|
61
|
-
- [ ] 代码注释和文档
|
|
62
|
-
- [ ] 与技术方案的一致性
|
|
33
|
+
### 4. 执行审查
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
1. **严格但公正**:指出问题的同时也肯定做得好的地方
|
|
66
|
-
2. **具体**:提供准确的文件路径和行号
|
|
67
|
-
3. **提供建议**:不仅指出问题,还要提供解决方案
|
|
68
|
-
4. **按严重程度分类**:区分必须修复和可优化项
|
|
35
|
+
遵循 `.agents/workflows/feature-development.yaml`,并同时检查 `git diff` 获取完整变更上下文。
|
|
69
36
|
|
|
70
|
-
|
|
37
|
+
> 详细审查标准、严重程度划分和 reviewer 关注点见 `reference/review-criteria.md`。执行此步骤前先读取 `reference/review-criteria.md`。
|
|
71
38
|
|
|
72
|
-
### 5.
|
|
39
|
+
### 5. 编写审查报告
|
|
73
40
|
|
|
74
41
|
创建 `.agents/workspace/active/{task-id}/{review-artifact}`。
|
|
75
42
|
|
|
43
|
+
> 报告格式和严重程度布局见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
|
|
44
|
+
|
|
76
45
|
### 6. 更新任务状态
|
|
77
46
|
|
|
78
47
|
获取当前时间:
|
|
@@ -81,205 +50,35 @@ description: >
|
|
|
81
50
|
date "+%Y-%m-%d %H:%M:%S"
|
|
82
51
|
```
|
|
83
52
|
|
|
84
|
-
更新
|
|
85
|
-
- `
|
|
86
|
-
- `assigned_to`:{审查者}
|
|
87
|
-
- `updated_at`:{当前时间}
|
|
88
|
-
- 记录本轮审查产物:`{review-artifact}`(Round `{review-round}`)
|
|
89
|
-
- 在工作流进度中标记 code-review 为已完成,并注明实际轮次(如果任务模板支持)
|
|
90
|
-
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
91
|
-
```
|
|
92
|
-
- {yyyy-MM-dd HH:mm:ss} — **Code Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n} → {artifact-filename}
|
|
93
|
-
```
|
|
53
|
+
更新 task.md,并追加:
|
|
54
|
+
`- {yyyy-MM-dd HH:mm:ss} — **Code Review (Round {N})** by {agent} — Verdict: {Approved/Changes Requested/Rejected}, blockers: {n}, major: {n}, minor: {n} → {artifact-filename}`
|
|
94
55
|
|
|
95
56
|
### 7. 告知用户
|
|
96
57
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
>
|
|
103
|
-
> 1. 如果 `Blocker = 0` 且 `Major = 0` 且 `Minor = 0` → 使用「输出分支 A — 通过且无问题」
|
|
104
|
-
> 2. 如果 `Blocker = 0` 且 (`Major > 0` 或 `Minor > 0`) → 使用「输出分支 B — 通过但有问题」
|
|
105
|
-
> 3. 如果 `Blocker > 0` 且问题可通过一次修复解决,**且未达到需要整体重做的程度** → 使用「输出分支 C — 需要修改」
|
|
106
|
-
> 4. 如果问题需要重大返工、重新设计或重新实现 → 使用「输出分支 D — 拒绝」
|
|
107
|
-
>
|
|
108
|
-
> **禁止跳过判断、禁止混用不同分支的模板。每次只能输出一个分支。只要 `Blocker > 0`,就绝不能输出任何“通过”模板。**
|
|
109
|
-
|
|
110
|
-
**📋 输出分支 A — 通过且无问题**(条件:Blocker = 0 且 Major = 0 且 Minor = 0):
|
|
111
|
-
```
|
|
112
|
-
任务 {task-id} 代码审查完成。结论:通过。
|
|
113
|
-
- 阻塞项:0 | 主要问题:0 | 次要问题:0
|
|
114
|
-
|
|
115
|
-
下一步 - 提交代码:
|
|
116
|
-
- Claude Code / OpenCode:/commit
|
|
117
|
-
- Gemini CLI:/agent-infra:commit
|
|
118
|
-
- Codex CLI:$commit
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
**📋 输出分支 B — 通过但有问题**(条件:Blocker = 0 且 (`Major > 0` 或 `Minor > 0`)):
|
|
122
|
-
```
|
|
123
|
-
任务 {task-id} 代码审查完成。结论:通过。
|
|
124
|
-
- 阻塞项:0 | 主要问题:{n} | 次要问题:{n}
|
|
125
|
-
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
126
|
-
|
|
127
|
-
下一步 - 修复问题后提交(推荐):
|
|
128
|
-
- Claude Code / OpenCode:/refine-task {task-id}
|
|
129
|
-
- Gemini CLI:/agent-infra:refine-task {task-id}
|
|
130
|
-
- Codex CLI:$refine-task {task-id}
|
|
131
|
-
|
|
132
|
-
或直接提交(跳过修复):
|
|
133
|
-
- Claude Code / OpenCode:/commit
|
|
134
|
-
- Gemini CLI:/agent-infra:commit
|
|
135
|
-
- Codex CLI:$commit
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**📋 输出分支 C — 需要修改**(条件:Blocker > 0,且问题可修复但无需重大返工):
|
|
139
|
-
```
|
|
140
|
-
任务 {task-id} 代码审查完成。结论:需要修改。
|
|
141
|
-
- 阻塞项:{n} | 主要问题:{n} | 次要问题:{n}
|
|
142
|
-
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
143
|
-
|
|
144
|
-
下一步 - 修复问题:
|
|
145
|
-
- Claude Code / OpenCode:/refine-task {task-id}
|
|
146
|
-
- Gemini CLI:/agent-infra:refine-task {task-id}
|
|
147
|
-
- Codex CLI:$refine-task {task-id}
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
**📋 输出分支 D — 拒绝**(条件:需要重大返工、重新设计或重新实现):
|
|
151
|
-
```
|
|
152
|
-
任务 {task-id} 代码审查完成。结论:拒绝,需要重大返工。
|
|
153
|
-
- 审查报告:.agents/workspace/active/{task-id}/{review-artifact}
|
|
154
|
-
|
|
155
|
-
下一步 - 重新实现:
|
|
156
|
-
- Claude Code / OpenCode:/implement-task {task-id}
|
|
157
|
-
- Gemini CLI:/agent-infra:implement-task {task-id}
|
|
158
|
-
- Codex CLI:$implement-task {task-id}
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## 输出模板
|
|
58
|
+
必须先判断结果,再只选择一个输出分支:
|
|
59
|
+
- 无 blocker、major、minor -> 通过且无问题
|
|
60
|
+
- 无 blocker,但有 major 或 minor -> 通过但有问题
|
|
61
|
+
- 有 blocker,且可集中修复 -> 需要修改
|
|
62
|
+
- 需要重大返工或重新实现 -> 拒绝
|
|
162
63
|
|
|
163
|
-
|
|
164
|
-
# 代码审查报告
|
|
64
|
+
> 完整的 4 分支输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
|
|
165
65
|
|
|
166
|
-
|
|
167
|
-
- **产物文件**:`{review-artifact}`
|
|
168
|
-
- **实现输入**:
|
|
169
|
-
- `{implementation-artifact}`
|
|
170
|
-
- `{refinement-artifact}`(如存在)
|
|
171
|
-
|
|
172
|
-
## 审查摘要
|
|
173
|
-
|
|
174
|
-
- **审查者**:{审查者名称}
|
|
175
|
-
- **审查时间**:{时间戳}
|
|
176
|
-
- **审查范围**:{文件数量和主要模块}
|
|
177
|
-
- **总体结论**:{已批准 / 需要修改 / 拒绝}
|
|
178
|
-
|
|
179
|
-
## 发现的问题
|
|
180
|
-
|
|
181
|
-
### 阻塞项(必须修复)
|
|
182
|
-
|
|
183
|
-
#### 1. {问题标题}
|
|
184
|
-
**文件**:`{file-path}:{line-number}`
|
|
185
|
-
**描述**:{详细描述}
|
|
186
|
-
**建议修复**:{具体建议}
|
|
187
|
-
**严重程度**:高
|
|
188
|
-
|
|
189
|
-
### 主要问题(应该修复)
|
|
190
|
-
|
|
191
|
-
#### 1. {问题标题}
|
|
192
|
-
**文件**:`{file-path}:{line-number}`
|
|
193
|
-
**描述**:{详细描述}
|
|
194
|
-
**建议修复**:{具体建议}
|
|
195
|
-
**严重程度**:中
|
|
196
|
-
|
|
197
|
-
### 次要问题(可选优化)
|
|
198
|
-
|
|
199
|
-
#### 1. {优化点}
|
|
200
|
-
**文件**:`{file-path}:{line-number}`
|
|
201
|
-
**建议**:{优化建议}
|
|
202
|
-
|
|
203
|
-
## 亮点
|
|
204
|
-
|
|
205
|
-
- {做得好的方面 1}
|
|
206
|
-
- {做得好的方面 2}
|
|
207
|
-
|
|
208
|
-
## 规范符合度
|
|
209
|
-
|
|
210
|
-
### 编码规范
|
|
211
|
-
- [ ] 命名规范
|
|
212
|
-
- [ ] 代码风格
|
|
213
|
-
- [ ] 注释规范
|
|
214
|
-
- [ ] 测试规范
|
|
215
|
-
|
|
216
|
-
### 代码质量指标
|
|
217
|
-
- 圈复杂度:{评估}
|
|
218
|
-
- 代码重复:{评估}
|
|
219
|
-
- 测试覆盖率:{百分比或评估}
|
|
220
|
-
|
|
221
|
-
## 测试审查
|
|
222
|
-
|
|
223
|
-
### 测试覆盖率
|
|
224
|
-
- 单元测试:{评估}
|
|
225
|
-
- 边界情况:{是否覆盖?}
|
|
226
|
-
- 错误场景:{是否覆盖?}
|
|
227
|
-
|
|
228
|
-
### 测试质量
|
|
229
|
-
- 测试命名:{评估}
|
|
230
|
-
- 断言充分性:{评估}
|
|
231
|
-
- 测试独立性:{评估}
|
|
232
|
-
|
|
233
|
-
## 安全审查
|
|
234
|
-
|
|
235
|
-
- SQL 注入风险:{检查结果}
|
|
236
|
-
- XSS 风险:{检查结果}
|
|
237
|
-
- 访问控制:{检查结果}
|
|
238
|
-
- 敏感数据暴露:{检查结果}
|
|
239
|
-
|
|
240
|
-
## 性能审查
|
|
241
|
-
|
|
242
|
-
- 算法复杂度:{评估}
|
|
243
|
-
- 资源管理:{检查结果}
|
|
244
|
-
- 潜在瓶颈:{评估}
|
|
245
|
-
|
|
246
|
-
## 与方案的一致性
|
|
247
|
-
|
|
248
|
-
- [ ] 实现与技术方案一致
|
|
249
|
-
- [ ] 没有偏离设计意图
|
|
250
|
-
- [ ] 没有添加计划外的功能
|
|
251
|
-
|
|
252
|
-
## 结论和建议
|
|
253
|
-
|
|
254
|
-
### 审批决定
|
|
255
|
-
- [ ] 通过 - 无阻塞问题
|
|
256
|
-
- [ ] 需要修改 - 有需要解决的问题
|
|
257
|
-
- [ ] 拒绝 - 需要重大返工
|
|
258
|
-
|
|
259
|
-
### 后续步骤
|
|
260
|
-
{基于审查结果的建议}
|
|
261
|
-
```
|
|
66
|
+
向用户展示下一步时,必须包含所有 TUI 命令格式。
|
|
262
67
|
|
|
263
68
|
## 完成检查清单
|
|
264
69
|
|
|
265
|
-
- [ ]
|
|
266
|
-
- [ ]
|
|
267
|
-
- [ ]
|
|
268
|
-
- [ ]
|
|
269
|
-
- [ ] 更新了 task.md 中的 `assigned_to` 为审查者名称
|
|
270
|
-
- [ ] 追加了 Activity Log 条目到 task.md
|
|
271
|
-
- [ ] 在工作流进度中标记了 code-review 为已完成
|
|
272
|
-
- [ ] 根据审查结果告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
|
|
70
|
+
- [ ] 已审查最新实现上下文
|
|
71
|
+
- [ ] 已创建 `{review-artifact}`
|
|
72
|
+
- [ ] 已更新 task.md 并追加 Activity Log
|
|
73
|
+
- [ ] 用户输出中只选择了一个审查结论分支
|
|
273
74
|
|
|
274
75
|
## 注意事项
|
|
275
76
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
4. **严重程度分类**:阻塞项必须修复;主要问题应该修复;次要问题为可选
|
|
280
|
-
5. **版本化规则**:首轮审查使用 `review.md`;后续轮次使用 `review-r{N}.md`
|
|
77
|
+
- 首轮审查使用 `review.md`,后续轮次使用 `review-r{N}.md`
|
|
78
|
+
- 所有问题都要引用具体文件路径和行号
|
|
79
|
+
- 严重程度必须区分 blocker、major、minor
|
|
281
80
|
|
|
282
81
|
## 错误处理
|
|
283
82
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
83
|
+
- 任务未找到:`Task {task-id} not found`
|
|
84
|
+
- 缺少实现报告:`Implementation report not found, please run the implement-task skill first`
|