@fitlab-ai/agent-infra 0.4.0 → 0.4.2
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 +23 -15
- package/README.zh-CN.md +23 -15
- package/lib/defaults.json +5 -9
- package/lib/init.js +1 -6
- package/lib/update.js +0 -55
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.md +17 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +23 -13
- package/templates/.agents/README.md +33 -27
- package/templates/.agents/README.zh-CN.md +35 -29
- 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 +39 -221
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +39 -220
- 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 +2 -5
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/implement-task/SKILL.md +47 -176
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +43 -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 +2 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +2 -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 +40 -162
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +38 -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 +34 -490
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -489
- package/templates/.agents/skills/sync-issue/reference/comment-publish.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.md +62 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +62 -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 +37 -284
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +41 -288
- 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 +45 -55
- 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/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 +2 -2
- package/templates/.claude/commands/create-pr.zh-CN.md +2 -2
- 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 +2 -2
- package/templates/.claude/commands/sync-pr.zh-CN.md +2 -2
- 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 +2 -2
- package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +2 -2
- 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 +2 -2
- package/templates/.opencode/commands/sync-pr.zh-CN.md +2 -2
- 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/.claude/CLAUDE.md +0 -176
- package/templates/.claude/CLAUDE.zh-CN.md +0 -176
- package/templates/.claude/project-rules.md +0 -65
- package/templates/.claude/project-rules.zh-CN.md +0 -65
- package/templates/.codex/README.md +0 -38
- package/templates/.codex/README.zh-CN.md +0 -37
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +0 -232
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +0 -232
- package/templates/.opencode/README.md +0 -76
- package/templates/.opencode/README.zh-CN.md +0 -77
- package/templates/AGENTS.md +0 -104
- package/templates/AGENTS.zh-CN.md +0 -104
|
@@ -1,94 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: refine-task
|
|
3
|
-
description:
|
|
4
|
-
Process code review feedback and fix the issues found in review. Fix items by
|
|
5
|
-
priority (Blocker -> Major -> Minor). Only handle issues explicitly marked in
|
|
6
|
-
the review; do not add unrelated changes. Triggered when the user asks to fix
|
|
7
|
-
review findings. Argument: task-id.
|
|
3
|
+
description: "Handle code review feedback and fix issues"
|
|
8
4
|
---
|
|
9
5
|
|
|
10
|
-
# Refine
|
|
6
|
+
# Refine Task
|
|
7
|
+
|
|
8
|
+
Fix review findings and produce `refinement.md` or `refinement-r{N}.md`.
|
|
11
9
|
|
|
12
10
|
## Boundary / Critical Rules
|
|
13
11
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- After executing this skill, you **must** immediately update task
|
|
12
|
+
- Fix only the issues documented in review artifacts
|
|
13
|
+
- Never auto-run `git add` or `git commit`
|
|
14
|
+
- After executing this skill, you **must** immediately update task.md
|
|
17
15
|
|
|
18
16
|
## Steps
|
|
19
17
|
|
|
20
18
|
### 1. Verify Prerequisites
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
|
|
27
|
-
|
|
28
|
-
If `task.md` is missing or there is no review artifact, prompt the user to complete the prerequisite step first.
|
|
20
|
+
Require:
|
|
21
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
22
|
+
- at least one review artifact: `review.md` or `review-r{N}.md`
|
|
29
23
|
|
|
30
|
-
|
|
31
|
-
1. Scan review artifact files in the task directory (`review.md`, `review-r{N}.md`)
|
|
32
|
-
2. Use the highest-round review artifact as the input for this refinement round and record it as `{review-artifact}`
|
|
33
|
-
3. Scan refinement artifact files (`refinement.md`, `refinement-r{N}.md`) and determine the current refinement artifact:
|
|
34
|
-
- If neither `refinement.md` nor `refinement-r*.md` exists -> this is Round 1 and must create `refinement.md`
|
|
35
|
-
- If `refinement.md` exists and no `refinement-r*.md` exists -> this is Round 2 and must create `refinement-r2.md`
|
|
36
|
-
- If `refinement-r{N}.md` exists -> this is Round N+1 and must create `refinement-r{N+1}.md`
|
|
37
|
-
- Record `{refinement-round}` and `{refinement-artifact}`
|
|
38
|
-
4. Scan implementation report files (`implementation.md`, `implementation-r{N}.md`) and use the highest-round artifact as the implementation context `{implementation-artifact}`
|
|
39
|
-
- Record `{implementation-artifact}`
|
|
40
|
-
5. **Consistency check**: verify that the most recent Code Review entry in `task.md` `## Activity Log` matches the round number and filename of the latest review artifact found in Step 2
|
|
24
|
+
During prerequisite discovery, record `{review-artifact}`, `{refinement-round}`, `{refinement-artifact}`, and Record `{implementation-artifact}` from the latest implementation report.
|
|
41
25
|
|
|
42
|
-
|
|
26
|
+
Also validate the latest Code Review entry in Activity Log. If it points to a missing file, stop with:
|
|
43
27
|
`Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
|
|
44
28
|
|
|
45
29
|
### 2. Read Review and Implementation Context
|
|
46
30
|
|
|
47
|
-
|
|
48
|
-
- All blockers (must fix)
|
|
49
|
-
- All major issues (should fix)
|
|
50
|
-
- Minor issues (optional improvements)
|
|
51
|
-
- Reviewer recommendations and suggestions
|
|
52
|
-
- The context of the current implementation and previous refinements
|
|
53
|
-
|
|
54
|
-
### 3. Plan the Fixes
|
|
55
|
-
|
|
56
|
-
Classify and prioritize:
|
|
57
|
-
1. **Blockers first**: all blockers must be resolved
|
|
58
|
-
2. **Then major issues**: handle all major issues
|
|
59
|
-
3. **Finally minor issues**: fix if appropriate (optional)
|
|
31
|
+
Read the latest `{review-artifact}` and `{implementation-artifact}` before editing any code.
|
|
60
32
|
|
|
61
|
-
|
|
62
|
-
- Which files need to be modified
|
|
63
|
-
- What exact change is required
|
|
64
|
-
- How to verify the fix
|
|
33
|
+
### 3. Plan and Apply the Fixes
|
|
65
34
|
|
|
66
|
-
|
|
35
|
+
Prioritize Blocker -> Major -> Minor and keep changes tightly scoped.
|
|
67
36
|
|
|
68
|
-
|
|
37
|
+
> The detailed fix workflow, repair order, and verification loop live in `reference/fix-workflow.md`. Read `reference/fix-workflow.md` before making changes.
|
|
69
38
|
|
|
70
|
-
|
|
71
|
-
1. Read the affected file
|
|
72
|
-
2. Apply the fix
|
|
73
|
-
3. Verify that the change resolves the review finding
|
|
74
|
-
4. Run relevant tests
|
|
39
|
+
### 4. Run Test Verification
|
|
75
40
|
|
|
76
|
-
|
|
77
|
-
- Only fix marked review issues -- do not add unrelated changes
|
|
78
|
-
- Do not add extra "improvements" beyond the scope of the review
|
|
79
|
-
- Keep the changes minimal and focused
|
|
41
|
+
Run the project test command after the fixes and keep the repair cycle focused on the documented findings.
|
|
80
42
|
|
|
81
|
-
### 5.
|
|
82
|
-
|
|
83
|
-
Execute the project's test command. Reference the `test` skill for the project-specific test command.
|
|
84
|
-
|
|
85
|
-
Ensure all tests still pass after the fixes.
|
|
86
|
-
|
|
87
|
-
### 6. Create Refinement Report
|
|
43
|
+
### 5. Write the Refinement Report
|
|
88
44
|
|
|
89
45
|
Create `.agents/workspace/active/{task-id}/{refinement-artifact}`.
|
|
90
46
|
|
|
91
|
-
|
|
47
|
+
> The report structure and example sections live in `reference/report-template.md`. Read `reference/report-template.md` before writing the report.
|
|
48
|
+
|
|
49
|
+
### 6. Update Task Status
|
|
92
50
|
|
|
93
51
|
Get the current time:
|
|
94
52
|
|
|
@@ -96,115 +54,35 @@ Get the current time:
|
|
|
96
54
|
date "+%Y-%m-%d %H:%M:%S"
|
|
97
55
|
```
|
|
98
56
|
|
|
99
|
-
Update
|
|
100
|
-
- `
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
- Record the refinement artifact for this round: `{refinement-artifact}` (Round `{refinement-round}`)
|
|
104
|
-
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
105
|
-
```
|
|
106
|
-
- {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### 8. Inform User
|
|
110
|
-
|
|
111
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
112
|
-
|
|
113
|
-
> **⚠️ CONDITION CHECK — before showing the two next steps below, you must judge the result of this refinement round first:**
|
|
114
|
-
>
|
|
115
|
-
> - If this round fixed any `Blocker` or `Major` issue, or the changes touched core logic or test scope broadly, **default recommendation** is "Run review again"
|
|
116
|
-
> - If this round fixed only `Minor` issues and the change scope is small and low-risk, "Commit directly" may be offered as an option
|
|
117
|
-
> - If any `Blocker` or `Major` issue remains unresolved, **do not** imply that direct commit is acceptable; explicitly tell the user to continue fixing or re-run review
|
|
118
|
-
>
|
|
119
|
-
> **Do not present "Commit directly" as the default path unless you are sure no high-risk issue remains.**
|
|
120
|
-
|
|
121
|
-
Output format:
|
|
122
|
-
```
|
|
123
|
-
Refinement complete for task {task-id}.
|
|
124
|
-
|
|
125
|
-
Fix summary:
|
|
126
|
-
- Blockers fixed: {count}/{total}
|
|
127
|
-
- Major issues fixed: {count}/{total}
|
|
128
|
-
- Minor issues fixed: {count}/{total}
|
|
129
|
-
- All tests passing: {yes/no}
|
|
130
|
-
- Review input: {review-artifact}
|
|
131
|
-
- Refinement artifact: {refinement-artifact}
|
|
132
|
-
|
|
133
|
-
Next step - re-review or commit:
|
|
134
|
-
- Run review again (default recommendation; prioritize this after Blocker/Major fixes):
|
|
135
|
-
- Claude Code / OpenCode: /review-task {task-id}
|
|
136
|
-
- Gemini CLI: /{{project}}:review-task {task-id}
|
|
137
|
-
- Codex CLI: $review-task {task-id}
|
|
138
|
-
- Commit directly (only when only Minor issues were fixed and risk is low):
|
|
139
|
-
- Claude Code / OpenCode: /commit
|
|
140
|
-
- Gemini CLI: /{{project}}:commit
|
|
141
|
-
- Codex CLI: $commit
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
## Output Template
|
|
145
|
-
|
|
146
|
-
```markdown
|
|
147
|
-
# Refinement Report
|
|
148
|
-
|
|
149
|
-
- **Refinement round**: Round {refinement-round}
|
|
150
|
-
- **Artifact file**: `{refinement-artifact}`
|
|
151
|
-
- **Review input**: `{review-artifact}`
|
|
152
|
-
- **Implementation context**: `{implementation-artifact}`
|
|
153
|
-
|
|
154
|
-
### Review Feedback Handling
|
|
57
|
+
Update task.md:
|
|
58
|
+
- review the `## Requirements` section and only change items from `- [ ]` to `- [x]` when they are newly satisfied by this round's fixes and passing tests
|
|
59
|
+
- append:
|
|
60
|
+
`- {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}`
|
|
155
61
|
|
|
156
|
-
|
|
157
|
-
1. **{Issue title}** (from {review-artifact})
|
|
158
|
-
- **Fix**: {What changed}
|
|
159
|
-
- **File**: `{file-path}:{line-number}`
|
|
160
|
-
- **Validation**: {How it was verified}
|
|
62
|
+
### 7. Inform User
|
|
161
63
|
|
|
162
|
-
|
|
163
|
-
1. **{Issue title}** (from {review-artifact})
|
|
164
|
-
- **Fix**: {What changed}
|
|
165
|
-
- **File**: `{file-path}:{line-number}`
|
|
166
|
-
|
|
167
|
-
#### Minor Issue Handling
|
|
168
|
-
1. **{Issue title}** (from {review-artifact})
|
|
169
|
-
- **Fix**: {What changed}
|
|
170
|
-
|
|
171
|
-
#### Unresolved Issues
|
|
172
|
-
- {Issue}: {Reason it was not handled, for example disagreement with the review suggestion}
|
|
173
|
-
|
|
174
|
-
### Test Results After Refinement
|
|
175
|
-
- All tests passing: {yes/no}
|
|
176
|
-
- Test output: {Summary}
|
|
177
|
-
```
|
|
64
|
+
Recommend re-review by default when Blocker or Major issues were fixed. Only present direct commit as a low-risk option when the changes are truly minor.
|
|
178
65
|
|
|
179
66
|
## Completion Checklist
|
|
180
67
|
|
|
181
|
-
- [ ] Read
|
|
182
|
-
- [ ] Fixed all
|
|
183
|
-
- [ ]
|
|
184
|
-
- [ ]
|
|
185
|
-
- [ ]
|
|
186
|
-
- [ ] Created refinement report `{refinement-artifact}`
|
|
187
|
-
- [ ] Updated task status in task.md
|
|
188
|
-
- [ ] Appended an Activity Log entry to task.md
|
|
189
|
-
- [ ] Informed the user of the next step (must include all TUI command formats without filtering)
|
|
68
|
+
- [ ] Read the latest review and implementation context
|
|
69
|
+
- [ ] Fixed all required Blocker and Major findings
|
|
70
|
+
- [ ] Wrote `{refinement-artifact}`
|
|
71
|
+
- [ ] Updated task.md and appended the Activity Log entry
|
|
72
|
+
- [ ] Recommended the correct next step based on residual risk
|
|
190
73
|
|
|
191
74
|
## Notes
|
|
192
75
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
4. **Disagreement**: If you disagree with a review finding, record your reasoning in "Unresolved Issues"
|
|
197
|
-
5. **Re-review**: After fixing blockers, re-run `review-task` to validate the result
|
|
198
|
-
6. **Consistency requirement**: The latest review artifact, Activity Log entry, and refinement report title must all reference the same review round
|
|
199
|
-
7. **Versioning rule**: First refinement uses `refinement.md`; later rounds use `refinement-r{N}.md`
|
|
76
|
+
- Round 1 uses `refinement.md`; later rounds use `refinement-r{N}.md`
|
|
77
|
+
- Record any disagreement with a review comment under unresolved issues in the report
|
|
78
|
+
- Do not expand scope beyond the review findings
|
|
200
79
|
|
|
201
80
|
## STOP
|
|
202
81
|
|
|
203
|
-
|
|
82
|
+
Stop after the checklist is complete.
|
|
204
83
|
|
|
205
84
|
## Error Handling
|
|
206
85
|
|
|
207
|
-
- Task not found:
|
|
208
|
-
- Missing review report:
|
|
209
|
-
- Review artifact mismatch:
|
|
210
|
-
- Test failure after fixes: Output the test errors and ask the user how to proceed
|
|
86
|
+
- Task not found: `Task {task-id} not found`
|
|
87
|
+
- Missing review report: `Review report not found, please run the review-task skill first`
|
|
88
|
+
- Review artifact mismatch: `Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
|
|
@@ -1,92 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: refine-task
|
|
3
|
-
description:
|
|
4
|
-
处理代码审查反馈并修复审查中发现的问题。按优先级(Blocker -> Major -> Minor)修复。
|
|
5
|
-
仅处理审查中标记的问题,不添加额外变更。当用户要求修复审查问题时触发。参数:task-id。
|
|
3
|
+
description: "处理代码审查反馈并修复问题"
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# 修复审查问题
|
|
9
7
|
|
|
8
|
+
修复审查发现的问题,并产出 `refinement.md` 或 `refinement-r{N}.md`。
|
|
9
|
+
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- 执行本技能后,你**必须**立即更新 task.md
|
|
12
|
+
- 只修复审查产物中记录的问题
|
|
13
|
+
- 绝不自动执行 `git add` 或 `git commit`
|
|
14
|
+
- 执行本技能后,你**必须**立即更新 task.md
|
|
15
15
|
|
|
16
16
|
## 执行步骤
|
|
17
17
|
|
|
18
18
|
### 1. 验证前置条件
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
20
|
+
要求存在:
|
|
21
|
+
- `.agents/workspace/active/{task-id}/task.md`
|
|
22
22
|
- 至少一个审查产物:`review.md` 或 `review-r{N}.md`
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
如果缺少 `task.md` 或没有任何审查产物,提示用户先完成前置步骤。
|
|
27
|
-
|
|
28
|
-
随后执行以下发现与校验:
|
|
29
|
-
1. 扫描任务目录中的审查产物文件(`review.md`、`review-r{N}.md`)
|
|
30
|
-
2. 取最高轮次的审查产物作为本次修复输入,记为 `{review-artifact}`
|
|
31
|
-
3. 扫描修复产物文件(`refinement.md`、`refinement-r{N}.md`)并确定本轮修复产物:
|
|
32
|
-
- 如果不存在 `refinement.md` 且不存在 `refinement-r*.md` → 本轮为第 1 轮,产出 `refinement.md`
|
|
33
|
-
- 如果存在 `refinement.md` 且不存在 `refinement-r*.md` → 本轮为第 2 轮,产出 `refinement-r2.md`
|
|
34
|
-
- 如果存在 `refinement-r{N}.md` → 本轮为第 N+1 轮,产出 `refinement-r{N+1}.md`
|
|
35
|
-
- 记录 `{refinement-round}` 和 `{refinement-artifact}`
|
|
36
|
-
4. 扫描实现报告文件(`implementation.md`、`implementation-r{N}.md`),取最高轮次作为修复上下文的 `{implementation-artifact}`
|
|
37
|
-
- 记录 `{implementation-artifact}`
|
|
38
|
-
5. **一致性校验**:检查 `task.md` 的 `## 活动日志` 中最近一条 Code Review 记录的轮次号和文件名,是否与步骤 2 扫描到的最新审查产物匹配
|
|
24
|
+
在前置检查阶段必须记录 `{review-artifact}`、`{refinement-round}`、`{refinement-artifact}`,并从最新实现报告中记录 `{implementation-artifact}`。
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
同时校验 Activity Log 中最近一条 Code Review 记录;如果引用了不存在的文件,立即停止并输出:
|
|
41
27
|
`Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
|
|
42
28
|
|
|
43
29
|
### 2. 阅读审查与实现上下文
|
|
44
30
|
|
|
45
|
-
|
|
46
|
-
- 所有阻塞项(必须修复)
|
|
47
|
-
- 所有主要问题(应该修复)
|
|
48
|
-
- 次要问题(可选优化)
|
|
49
|
-
- 审查者的建议和推荐
|
|
50
|
-
- 当前实现和之前修复的上下文
|
|
51
|
-
|
|
52
|
-
### 3. 规划修复
|
|
53
|
-
|
|
54
|
-
分类并确定优先级:
|
|
55
|
-
1. **阻塞项优先**:必须解决所有阻塞项
|
|
56
|
-
2. **然后是主要问题**:处理所有主要问题
|
|
57
|
-
3. **最后是次要问题**:如有时间则处理(可选)
|
|
31
|
+
在修改代码前先读取最新的 `{review-artifact}` 和 `{implementation-artifact}`。
|
|
58
32
|
|
|
59
|
-
|
|
60
|
-
- 需要修改哪些文件
|
|
61
|
-
- 具体要做哪些修改
|
|
62
|
-
- 如何验证修复
|
|
33
|
+
### 3. 规划并执行修复
|
|
63
34
|
|
|
64
|
-
|
|
35
|
+
按 Blocker -> Major -> Minor 的顺序处理,始终保持改动聚焦。
|
|
65
36
|
|
|
66
|
-
|
|
37
|
+
> 详细修复流程、优先级和验证循环见 `reference/fix-workflow.md`。执行此步骤前先读取 `reference/fix-workflow.md`。
|
|
67
38
|
|
|
68
|
-
|
|
69
|
-
1. 读取受影响的文件
|
|
70
|
-
2. 应用修复
|
|
71
|
-
3. 验证修复是否解决了审查意见
|
|
72
|
-
4. 运行相关测试
|
|
39
|
+
### 4. 运行测试验证
|
|
73
40
|
|
|
74
|
-
|
|
75
|
-
- 仅修复标记的问题 —— 不要添加无关变更
|
|
76
|
-
- 不要添加超出要求的额外"改进"
|
|
77
|
-
- 保持变更最小化和聚焦
|
|
41
|
+
修复后运行项目测试命令,并把修复范围限制在审查结论内。
|
|
78
42
|
|
|
79
|
-
### 5.
|
|
80
|
-
|
|
81
|
-
执行项目的测试命令。参考 `test` 技能获取项目特定的测试命令。
|
|
82
|
-
|
|
83
|
-
确保修复后所有测试仍然通过。
|
|
84
|
-
|
|
85
|
-
### 6. 创建修复报告
|
|
43
|
+
### 5. 编写修复报告
|
|
86
44
|
|
|
87
45
|
创建 `.agents/workspace/active/{task-id}/{refinement-artifact}`。
|
|
88
46
|
|
|
89
|
-
|
|
47
|
+
> 报告结构和示例章节见 `reference/report-template.md`。写报告前先读取 `reference/report-template.md`。
|
|
48
|
+
|
|
49
|
+
### 6. 更新任务状态
|
|
90
50
|
|
|
91
51
|
获取当前时间:
|
|
92
52
|
|
|
@@ -94,115 +54,35 @@ description: >
|
|
|
94
54
|
date "+%Y-%m-%d %H:%M:%S"
|
|
95
55
|
```
|
|
96
56
|
|
|
97
|
-
更新
|
|
98
|
-
- `
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
- 记录本轮修复产物:`{refinement-artifact}`(Round `{refinement-round}`)
|
|
102
|
-
- **追加**到 `## Activity Log`(不要覆盖之前的记录):
|
|
103
|
-
```
|
|
104
|
-
- {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 8. 告知用户
|
|
108
|
-
|
|
109
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
|
|
110
|
-
|
|
111
|
-
> **⚠️ 条件判断 — 在展示下面两个下一步之前,你必须先判断修复结果:**
|
|
112
|
-
>
|
|
113
|
-
> - 如果本轮修复了任何 `Blocker` 或 `Major` 问题,或改动影响核心逻辑/测试范围较广,**默认推荐**先执行「重新审查」
|
|
114
|
-
> - 如果仅修复 `Minor` 问题,且变更范围很小、风险可控,才可以把「直接提交」作为可选项
|
|
115
|
-
> - 如果仍有未修复的 `Blocker` 或 `Major`,**不要**暗示可以直接提交;应明确提示继续修复或重新审查
|
|
116
|
-
>
|
|
117
|
-
> **禁止把「直接提交」写成默认路径,除非你确认没有剩余高风险问题。**
|
|
118
|
-
|
|
119
|
-
输出格式:
|
|
120
|
-
```
|
|
121
|
-
任务 {task-id} 修复完成。
|
|
122
|
-
|
|
123
|
-
修复情况:
|
|
124
|
-
- 阻塞项修复:{数量}/{总数}
|
|
125
|
-
- 主要问题修复:{数量}/{总数}
|
|
126
|
-
- 次要问题修复:{数量}/{总数}
|
|
127
|
-
- 所有测试通过:{是/否}
|
|
128
|
-
- 审查输入:{review-artifact}
|
|
129
|
-
- 修复产物:{refinement-artifact}
|
|
130
|
-
|
|
131
|
-
下一步 - 重新审查或提交:
|
|
132
|
-
- 重新审查(默认推荐;修复了 Blocker/Major 时优先):
|
|
133
|
-
- Claude Code / OpenCode:/review-task {task-id}
|
|
134
|
-
- Gemini CLI:/agent-infra:review-task {task-id}
|
|
135
|
-
- Codex CLI:$review-task {task-id}
|
|
136
|
-
- 直接提交(仅限只修复 Minor 且风险可控):
|
|
137
|
-
- Claude Code / OpenCode:/commit
|
|
138
|
-
- Gemini CLI:/agent-infra:commit
|
|
139
|
-
- Codex CLI:$commit
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## 输出模板
|
|
143
|
-
|
|
144
|
-
```markdown
|
|
145
|
-
# 修复报告
|
|
146
|
-
|
|
147
|
-
- **修复轮次**:Round {refinement-round}
|
|
148
|
-
- **产物文件**:`{refinement-artifact}`
|
|
149
|
-
- **审查输入**:`{review-artifact}`
|
|
150
|
-
- **实现上下文**:`{implementation-artifact}`
|
|
151
|
-
|
|
152
|
-
### 审查反馈处理
|
|
57
|
+
更新 task.md:
|
|
58
|
+
- 审查 `## 需求` 段落,仅把因本轮修复而新满足且有测试通过支撑的条目从 `- [ ]` 勾为 `- [x]`
|
|
59
|
+
- 追加:
|
|
60
|
+
`- {yyyy-MM-dd HH:mm:ss} — **Refinement (Round {N}, for {review-artifact})** by {agent} — Fixed {n} blockers, {n} major, {n} minor issues → {refinement-artifact}`
|
|
153
61
|
|
|
154
|
-
|
|
155
|
-
1. **{问题标题}**(来自 {review-artifact})
|
|
156
|
-
- **修复**:{做了什么修改}
|
|
157
|
-
- **文件**:`{file-path}:{line-number}`
|
|
158
|
-
- **验证**:{如何验证}
|
|
62
|
+
### 7. 告知用户
|
|
159
63
|
|
|
160
|
-
|
|
161
|
-
1. **{问题标题}**(来自 {review-artifact})
|
|
162
|
-
- **修复**:{做了什么修改}
|
|
163
|
-
- **文件**:`{file-path}:{line-number}`
|
|
164
|
-
|
|
165
|
-
#### 次要问题处理
|
|
166
|
-
1. **{问题标题}**(来自 {review-artifact})
|
|
167
|
-
- **修复**:{做了什么修改}
|
|
168
|
-
|
|
169
|
-
#### 未处理的问题
|
|
170
|
-
- {问题}:{未处理的原因,例如不同意审查建议}
|
|
171
|
-
|
|
172
|
-
### 修复后的测试结果
|
|
173
|
-
- 所有测试通过:{是/否}
|
|
174
|
-
- 测试输出:{摘要}
|
|
175
|
-
```
|
|
64
|
+
如果本轮修复了 Blocker 或 Major,默认推荐重新审查。只有在风险确实很低且只修复 Minor 时,才可把直接提交作为备选项。
|
|
176
65
|
|
|
177
66
|
## 完成检查清单
|
|
178
67
|
|
|
179
|
-
- [ ]
|
|
180
|
-
- [ ]
|
|
181
|
-
- [ ]
|
|
182
|
-
- [ ]
|
|
183
|
-
- [ ]
|
|
184
|
-
- [ ] 创建了 `{refinement-artifact}` 修复报告
|
|
185
|
-
- [ ] 更新了 task.md 中的任务状态
|
|
186
|
-
- [ ] 追加了 Activity Log 条目到 task.md
|
|
187
|
-
- [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
|
|
68
|
+
- [ ] 已读取最新审查与实现上下文
|
|
69
|
+
- [ ] 已修复所有必需的 Blocker 和 Major 问题
|
|
70
|
+
- [ ] 已写出 `{refinement-artifact}`
|
|
71
|
+
- [ ] 已更新 task.md 并追加 Activity Log
|
|
72
|
+
- [ ] 已根据剩余风险推荐正确的下一步
|
|
188
73
|
|
|
189
74
|
## 注意事项
|
|
190
75
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
4. **不同意见**:如果不同意某个审查意见,在"未处理的问题"部分记录你的理由
|
|
195
|
-
5. **重新审查**:修复阻塞项后,建议重新运行 review-task 技能进行验证
|
|
196
|
-
6. **一致性要求**:最新审查产物、Activity Log 记录和修复报告标题必须引用同一轮次文件
|
|
197
|
-
7. **版本化规则**:首轮修复使用 `refinement.md`;后续轮次使用 `refinement-r{N}.md`
|
|
76
|
+
- 首轮修复使用 `refinement.md`,后续轮次使用 `refinement-r{N}.md`
|
|
77
|
+
- 若不同意审查意见,要在报告的未解决问题中记录理由
|
|
78
|
+
- 不要把范围扩展到审查项之外
|
|
198
79
|
|
|
199
80
|
## 停止
|
|
200
81
|
|
|
201
|
-
|
|
82
|
+
完成检查清单后立即停止。
|
|
202
83
|
|
|
203
84
|
## 错误处理
|
|
204
85
|
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
- 修复后测试失败:输出测试错误,询问用户如何处理
|
|
86
|
+
- 任务未找到:`Task {task-id} not found`
|
|
87
|
+
- 缺少审查报告:`Review report not found, please run the review-task skill first`
|
|
88
|
+
- 审查产物不一致:`Review artifact mismatch: Activity Log references {expected} but file not found. Please verify the review artifact exists.`
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Fix Workflow
|
|
2
|
+
|
|
3
|
+
Read this file before changing code during refinement.
|
|
4
|
+
|
|
5
|
+
## Plan the Fixes
|
|
6
|
+
|
|
7
|
+
Classify and prioritize work:
|
|
8
|
+
1. **Blockers first**
|
|
9
|
+
2. **Then major issues**
|
|
10
|
+
3. **Finally minor issues**
|
|
11
|
+
|
|
12
|
+
For each finding, determine:
|
|
13
|
+
- which files must change
|
|
14
|
+
- what specific fix is required
|
|
15
|
+
- how the fix will be verified
|
|
16
|
+
|
|
17
|
+
Detailed priority rules:
|
|
18
|
+
- Blockers must all be fixed before anything else
|
|
19
|
+
- Major issues should all be fixed in the same pass unless a blocker prevents progress
|
|
20
|
+
- Minor issues are optional only after Blockers and Majors are resolved
|
|
21
|
+
- If you disagree with a finding, record that disagreement under unresolved issues instead of silently skipping it
|
|
22
|
+
|
|
23
|
+
## Execute the Fixes
|
|
24
|
+
|
|
25
|
+
For each fix:
|
|
26
|
+
1. read the affected files
|
|
27
|
+
2. apply the smallest necessary change
|
|
28
|
+
3. verify the change addresses the review feedback
|
|
29
|
+
4. run the relevant tests
|
|
30
|
+
|
|
31
|
+
## Run Test Verification
|
|
32
|
+
|
|
33
|
+
Run the project test command from the `test` skill and confirm that all required tests still pass.
|
|
34
|
+
|
|
35
|
+
## Choose the Next-Step Branch
|
|
36
|
+
|
|
37
|
+
Decision rules:
|
|
38
|
+
1. if this round fixed any `Blocker` or `Major`, recommend re-review by default
|
|
39
|
+
2. only when this round fixed Minor issues only and the change is clearly low risk may direct commit be offered as an option
|
|
40
|
+
3. if any `Blocker` or `Major` remains unresolved, do not suggest direct commit
|
|
41
|
+
|
|
42
|
+
Prohibition:
|
|
43
|
+
- never present direct commit as the only next step unless no high-risk issue remains
|
|
44
|
+
|
|
45
|
+
Required output template:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Task {task-id} refinement completed.
|
|
49
|
+
|
|
50
|
+
Refinement status:
|
|
51
|
+
- Blockers fixed: {fixed-blockers}/{total-blockers}
|
|
52
|
+
- Major issues fixed: {fixed-majors}/{total-majors}
|
|
53
|
+
- Minor issues fixed: {fixed-minors}/{total-minors}
|
|
54
|
+
- All tests passing: {yes/no}
|
|
55
|
+
- Review input: {review-artifact}
|
|
56
|
+
- Refinement artifact: {refinement-artifact}
|
|
57
|
+
|
|
58
|
+
Next step - re-review or commit:
|
|
59
|
+
- Re-review (recommended by default when Blocker/Major issues were fixed):
|
|
60
|
+
- Claude Code / OpenCode: /review-task {task-id}
|
|
61
|
+
- Gemini CLI: /agent-infra:review-task {task-id}
|
|
62
|
+
- Codex CLI: $review-task {task-id}
|
|
63
|
+
- Commit directly (Minor-only, low-risk changes only):
|
|
64
|
+
- Claude Code / OpenCode: /commit
|
|
65
|
+
- Gemini CLI: /agent-infra:commit
|
|
66
|
+
- Codex CLI: $commit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
1. **Prerequisite**: a review artifact must exist (`review.md` or `review-r{N}.md`)
|
|
72
|
+
2. **No auto-commit**: do not run `git commit`
|
|
73
|
+
3. **Scope discipline**: only fix reviewed issues
|
|
74
|
+
4. **Disagreement handling**: record any disagreement in the report
|
|
75
|
+
5. **Re-review**: after fixing Blockers or Major issues, recommend `review-task`
|
|
76
|
+
6. **Consistency**: the latest review artifact, Activity Log entry, and refinement report must reference the same round
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# 修复工作流
|
|
2
|
+
|
|
3
|
+
在修复阶段修改代码之前先读取本文件。
|
|
4
|
+
|
|
5
|
+
## 规划修复
|
|
6
|
+
|
|
7
|
+
按以下顺序分类并确定优先级:
|
|
8
|
+
1. **先处理 Blocker**
|
|
9
|
+
2. **再处理 Major**
|
|
10
|
+
3. **最后处理 Minor**
|
|
11
|
+
|
|
12
|
+
对每一个问题,都要明确:
|
|
13
|
+
- 哪些文件必须修改
|
|
14
|
+
- 具体需要怎样修复
|
|
15
|
+
- 如何验证修复已经生效
|
|
16
|
+
|
|
17
|
+
详细优先级规则:
|
|
18
|
+
- 所有 Blocker 都必须最先修完
|
|
19
|
+
- 只要没有被 Blocker 阻塞,所有 Major 都应在同一轮一并修复
|
|
20
|
+
- 只有在 Blocker 和 Major 都解决后,Minor 才是可选项
|
|
21
|
+
- 如果你不同意某条审查意见,不要静默跳过,而是把分歧记录到 unresolved issues
|
|
22
|
+
|
|
23
|
+
## 执行修复
|
|
24
|
+
|
|
25
|
+
对每一项修复:
|
|
26
|
+
1. 读取受影响文件
|
|
27
|
+
2. 施加最小必要改动
|
|
28
|
+
3. 验证改动确实解决了审查反馈
|
|
29
|
+
4. 运行相关测试
|
|
30
|
+
|
|
31
|
+
## 运行测试验证
|
|
32
|
+
|
|
33
|
+
运行项目测试命令。项目测试命令以 `test` skill 为准,并确认所有必需测试仍然通过。
|
|
34
|
+
|
|
35
|
+
## 选择下一步分支
|
|
36
|
+
|
|
37
|
+
判断规则:
|
|
38
|
+
1. 如果本轮修复了任何 `Blocker` 或 `Major`,默认推荐重新审查
|
|
39
|
+
2. 只有当本轮只修复了 Minor,且改动明显低风险时,才可以把直接提交作为一个可选项
|
|
40
|
+
3. 如果仍有任何 `Blocker` 或 `Major` 未解决,就不要建议直接提交
|
|
41
|
+
|
|
42
|
+
禁止规则:
|
|
43
|
+
- 只要还存在高风险问题,绝对不要把直接提交写成唯一下一步
|
|
44
|
+
|
|
45
|
+
必用输出模板:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
任务 {task-id} 修复完成。
|
|
49
|
+
|
|
50
|
+
修复情况:
|
|
51
|
+
- 阻塞项修复:{数量}/{总数}
|
|
52
|
+
- 主要问题修复:{数量}/{总数}
|
|
53
|
+
- 次要问题修复:{数量}/{总数}
|
|
54
|
+
- 所有测试通过:{是/否}
|
|
55
|
+
- 审查输入:{review-artifact}
|
|
56
|
+
- 修复产物:{refinement-artifact}
|
|
57
|
+
|
|
58
|
+
下一步 - 重新审查或提交:
|
|
59
|
+
- 重新审查(默认推荐;修复了 Blocker/Major 时优先):
|
|
60
|
+
- Claude Code / OpenCode:/review-task {task-id}
|
|
61
|
+
- Gemini CLI:/agent-infra:review-task {task-id}
|
|
62
|
+
- Codex CLI:$review-task {task-id}
|
|
63
|
+
- 直接提交(仅限只修复 Minor 且风险可控):
|
|
64
|
+
- Claude Code / OpenCode:/commit
|
|
65
|
+
- Gemini CLI:/agent-infra:commit
|
|
66
|
+
- Codex CLI:$commit
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## 注意事项
|
|
70
|
+
|
|
71
|
+
1. **前置条件**:必须存在审查产物(`review.md` 或 `review-r{N}.md`)
|
|
72
|
+
2. **禁止自动提交**:不要执行 `git commit`
|
|
73
|
+
3. **范围约束**:只修复审查中列出的问题
|
|
74
|
+
4. **分歧处理**:如果不同意审查意见,要在报告里明确记录
|
|
75
|
+
5. **重新审查**:修复了 Blocker 或 Major 后,推荐执行 `review-task`
|
|
76
|
+
6. **一致性**:最新审查产物、Activity Log 记录和修复报告必须引用同一轮次
|