@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,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,33 @@ description: >
|
|
|
94
54
|
date "+%Y-%m-%d %H:%M:%S"
|
|
95
55
|
```
|
|
96
56
|
|
|
97
|
-
更新
|
|
98
|
-
- `
|
|
99
|
-
- `assigned_to`:{当前 AI 代理}
|
|
100
|
-
- `updated_at`:{当前时间}
|
|
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
|
+
`- {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
59
|
|
|
154
|
-
|
|
155
|
-
1. **{问题标题}**(来自 {review-artifact})
|
|
156
|
-
- **修复**:{做了什么修改}
|
|
157
|
-
- **文件**:`{file-path}:{line-number}`
|
|
158
|
-
- **验证**:{如何验证}
|
|
60
|
+
### 7. 告知用户
|
|
159
61
|
|
|
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
|
-
```
|
|
62
|
+
如果本轮修复了 Blocker 或 Major,默认推荐重新审查。只有在风险确实很低且只修复 Minor 时,才可把直接提交作为备选项。
|
|
176
63
|
|
|
177
64
|
## 完成检查清单
|
|
178
65
|
|
|
179
|
-
- [ ]
|
|
180
|
-
- [ ]
|
|
181
|
-
- [ ]
|
|
182
|
-
- [ ]
|
|
183
|
-
- [ ]
|
|
184
|
-
- [ ] 创建了 `{refinement-artifact}` 修复报告
|
|
185
|
-
- [ ] 更新了 task.md 中的任务状态
|
|
186
|
-
- [ ] 追加了 Activity Log 条目到 task.md
|
|
187
|
-
- [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,不要筛选)
|
|
66
|
+
- [ ] 已读取最新审查与实现上下文
|
|
67
|
+
- [ ] 已修复所有必需的 Blocker 和 Major 问题
|
|
68
|
+
- [ ] 已写出 `{refinement-artifact}`
|
|
69
|
+
- [ ] 已更新 task.md 并追加 Activity Log
|
|
70
|
+
- [ ] 已根据剩余风险推荐正确的下一步
|
|
188
71
|
|
|
189
72
|
## 注意事项
|
|
190
73
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
4. **不同意见**:如果不同意某个审查意见,在"未处理的问题"部分记录你的理由
|
|
195
|
-
5. **重新审查**:修复阻塞项后,建议重新运行 review-task 技能进行验证
|
|
196
|
-
6. **一致性要求**:最新审查产物、Activity Log 记录和修复报告标题必须引用同一轮次文件
|
|
197
|
-
7. **版本化规则**:首轮修复使用 `refinement.md`;后续轮次使用 `refinement-r{N}.md`
|
|
74
|
+
- 首轮修复使用 `refinement.md`,后续轮次使用 `refinement-r{N}.md`
|
|
75
|
+
- 若不同意审查意见,要在报告的未解决问题中记录理由
|
|
76
|
+
- 不要把范围扩展到审查项之外
|
|
198
77
|
|
|
199
78
|
## 停止
|
|
200
79
|
|
|
201
|
-
|
|
80
|
+
完成检查清单后立即停止。
|
|
202
81
|
|
|
203
82
|
## 错误处理
|
|
204
83
|
|
|
205
|
-
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
- 修复后测试失败:输出测试错误,询问用户如何处理
|
|
84
|
+
- 任务未找到:`Task {task-id} not found`
|
|
85
|
+
- 缺少审查报告:`Review report not found, please run the review-task skill first`
|
|
86
|
+
- 审查产物不一致:`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 记录和修复报告必须引用同一轮次
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Refinement Report Template
|
|
2
|
+
|
|
3
|
+
Use this structure when writing `refinement.md` or `refinement-r{N}.md`.
|
|
4
|
+
|
|
5
|
+
## Output Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Refinement Report
|
|
9
|
+
|
|
10
|
+
- **Refinement Round**: Round {refinement-round}
|
|
11
|
+
- **Artifact File**: `{refinement-artifact}`
|
|
12
|
+
- **Review Input**: `{review-artifact}`
|
|
13
|
+
- **Implementation Context**: `{implementation-artifact}`
|
|
14
|
+
|
|
15
|
+
### Review Feedback Handling
|
|
16
|
+
|
|
17
|
+
#### Blocker Fixes
|
|
18
|
+
1. **{issue-title}**
|
|
19
|
+
- **Fix**: {what changed}
|
|
20
|
+
- **File**: `{file-path}:{line-number}`
|
|
21
|
+
- **Validation**: {validation}
|
|
22
|
+
|
|
23
|
+
#### Major Issue Fixes
|
|
24
|
+
1. **{issue-title}**
|
|
25
|
+
- **Fix**: {what changed}
|
|
26
|
+
- **File**: `{file-path}:{line-number}`
|
|
27
|
+
|
|
28
|
+
#### Minor Issue Handling
|
|
29
|
+
1. **{issue-title}**
|
|
30
|
+
- **Fix**: {what changed}
|
|
31
|
+
|
|
32
|
+
#### Unresolved Issues
|
|
33
|
+
- {issue}: {reason}
|
|
34
|
+
|
|
35
|
+
### Test Results After Refinement
|
|
36
|
+
- All tests passing: {yes/no}
|
|
37
|
+
- Test output: {summary}
|
|
38
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# 修复报告模板
|
|
2
|
+
|
|
3
|
+
编写 `refinement.md` 或 `refinement-r{N}.md` 时,使用以下结构。
|
|
4
|
+
|
|
5
|
+
## 输出模板
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# 修复报告
|
|
9
|
+
|
|
10
|
+
- **修复轮次**: Round {refinement-round}
|
|
11
|
+
- **产物文件**: `{refinement-artifact}`
|
|
12
|
+
- **审查输入**: `{review-artifact}`
|
|
13
|
+
- **实现上下文**: `{implementation-artifact}`
|
|
14
|
+
|
|
15
|
+
### 审查反馈处理
|
|
16
|
+
|
|
17
|
+
#### 阻塞项修复
|
|
18
|
+
1. **{issue-title}**
|
|
19
|
+
- **修复**: {what changed}
|
|
20
|
+
- **文件**: `{file-path}:{line-number}`
|
|
21
|
+
- **验证**: {validation}
|
|
22
|
+
|
|
23
|
+
#### 主要问题修复
|
|
24
|
+
1. **{issue-title}**
|
|
25
|
+
- **修复**: {what changed}
|
|
26
|
+
- **文件**: `{file-path}:{line-number}`
|
|
27
|
+
|
|
28
|
+
#### 次要问题处理
|
|
29
|
+
1. **{issue-title}**
|
|
30
|
+
- **修复**: {what changed}
|
|
31
|
+
|
|
32
|
+
#### 未解决问题
|
|
33
|
+
- {issue}: {reason}
|
|
34
|
+
|
|
35
|
+
### 修复后的测试结果
|
|
36
|
+
- 所有测试通过: {yes/no}
|
|
37
|
+
- 测试输出: {summary}
|
|
38
|
+
```
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: refine-title
|
|
3
|
-
description:
|
|
4
|
-
Deeply analyze Issue or PR content and reformat the title to
|
|
5
|
-
Conventional Commits format. Triggered when the user requests
|
|
6
|
-
title optimization. Argument: issue or PR number.
|
|
3
|
+
description: "Rewrite an Issue or PR title in Conventional Commits format"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Refine Title
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: release
|
|
3
|
-
description:
|
|
4
|
-
Execute the version release workflow. Triggered when the user
|
|
5
|
-
requests a version release. Argument: version number (X.Y.Z).
|
|
3
|
+
description: "Run the version release workflow"
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Version Release
|
|
@@ -13,7 +11,7 @@ Execute the version release workflow for the specified version.
|
|
|
13
11
|
|
|
14
12
|
## Execution Flow
|
|
15
13
|
|
|
16
|
-
###
|
|
14
|
+
### 1. Parse and Validate Version
|
|
17
15
|
|
|
18
16
|
Extract version from arguments. Must match `X.Y.Z` format.
|
|
19
17
|
|
|
@@ -23,7 +21,7 @@ Parse components:
|
|
|
23
21
|
|
|
24
22
|
If format is invalid, error: "Version format incorrect, expected X.Y.Z (e.g. 1.2.3)"
|
|
25
23
|
|
|
26
|
-
###
|
|
24
|
+
### 2. Verify Clean Workspace
|
|
27
25
|
|
|
28
26
|
```bash
|
|
29
27
|
git status --short
|
|
@@ -31,7 +29,7 @@ git status --short
|
|
|
31
29
|
|
|
32
30
|
If there are uncommitted changes, error: "Workspace has uncommitted changes. Please commit or stash first."
|
|
33
31
|
|
|
34
|
-
###
|
|
32
|
+
### 3. Pre-release Verification
|
|
35
33
|
|
|
36
34
|
<!-- TODO: Replace with your project's pre-release verification steps -->
|
|
37
35
|
|
|
@@ -50,7 +48,7 @@ Handling rules:
|
|
|
50
48
|
- If the current branch is unexpected, print a warning or exit based on your policy
|
|
51
49
|
- If any verification command fails, stop the release process and fix the issue first
|
|
52
50
|
|
|
53
|
-
###
|
|
51
|
+
### 4. Update Version References
|
|
54
52
|
|
|
55
53
|
<!-- TODO: Replace with your project's version update steps -->
|
|
56
54
|
|
|
@@ -76,7 +74,7 @@ Search for version references in project files and update them:
|
|
|
76
74
|
|
|
77
75
|
If the project uses `package-lock.json`, run `npm install --package-lock-only` after updating `package.json` so the lockfile version stays in sync.
|
|
78
76
|
|
|
79
|
-
###
|
|
77
|
+
### 5. Rebuild Artifacts
|
|
80
78
|
|
|
81
79
|
<!-- TODO: Replace with your project's artifact rebuild steps -->
|
|
82
80
|
|
|
@@ -91,20 +89,20 @@ Execution guidance:
|
|
|
91
89
|
- If your project has no generated artifacts, document that explicitly in the project-specific skill
|
|
92
90
|
- If the rebuild fails, stop the release process and fix the build first
|
|
93
91
|
|
|
94
|
-
###
|
|
92
|
+
### 6. Create Release Commit
|
|
95
93
|
|
|
96
94
|
```bash
|
|
97
95
|
git add -A
|
|
98
96
|
git commit -m "chore: release v{version}"
|
|
99
97
|
```
|
|
100
98
|
|
|
101
|
-
###
|
|
99
|
+
### 7. Create Git Tag
|
|
102
100
|
|
|
103
101
|
```bash
|
|
104
102
|
git tag v{version}
|
|
105
103
|
```
|
|
106
104
|
|
|
107
|
-
###
|
|
105
|
+
### 8. Manage Milestones
|
|
108
106
|
|
|
109
107
|
Close the milestone for the released version when it exists, and create the missing planning milestones for the next cycle.
|
|
110
108
|
|
|
@@ -121,7 +119,7 @@ The script is responsible for:
|
|
|
121
119
|
- When `PATCH=0`, also ensuring `{MAJOR}.{MINOR+1}.0` and `{MAJOR}.{MINOR+1}.x`
|
|
122
120
|
- Printing a milestone summary with the released milestone action and new milestone count
|
|
123
121
|
|
|
124
|
-
###
|
|
122
|
+
### 9. Output Summary
|
|
125
123
|
|
|
126
124
|
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
127
125
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: release
|
|
3
|
-
description:
|
|
4
|
-
执行版本发布流程。当用户要求发布版本时触发。参数:版本号(X.Y.Z)。
|
|
3
|
+
description: "执行版本发布流程"
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# 版本发布
|
|
@@ -12,7 +11,7 @@ description: >
|
|
|
12
11
|
|
|
13
12
|
## 执行流程
|
|
14
13
|
|
|
15
|
-
###
|
|
14
|
+
### 1. 解析并验证版本号
|
|
16
15
|
|
|
17
16
|
从参数中提取版本。必须匹配 `X.Y.Z` 格式。
|
|
18
17
|
|
|
@@ -22,7 +21,7 @@ description: >
|
|
|
22
21
|
|
|
23
22
|
如果格式无效,报错:"Version format incorrect, expected X.Y.Z (e.g. 1.2.3)"
|
|
24
23
|
|
|
25
|
-
###
|
|
24
|
+
### 2. 验证工作区干净
|
|
26
25
|
|
|
27
26
|
```bash
|
|
28
27
|
git status --short
|
|
@@ -30,7 +29,7 @@ git status --short
|
|
|
30
29
|
|
|
31
30
|
如果有未提交的变更,报错:"Workspace has uncommitted changes. Please commit or stash first."
|
|
32
31
|
|
|
33
|
-
###
|
|
32
|
+
### 3. 发布前验证
|
|
34
33
|
|
|
35
34
|
<!-- TODO: 替换为你的项目发布前验证步骤 -->
|
|
36
35
|
|
|
@@ -49,7 +48,7 @@ git branch --show-current
|
|
|
49
48
|
- 如果当前分支不符合预期,按项目策略输出警告或直接退出
|
|
50
49
|
- 如果任何验证命令失败,停止发布流程并先修复问题
|
|
51
50
|
|
|
52
|
-
###
|
|
51
|
+
### 4. 更新版本引用
|
|
53
52
|
|
|
54
53
|
<!-- TODO: 替换为你的项目版本更新步骤 -->
|
|
55
54
|
|
|
@@ -75,7 +74,7 @@ git branch --show-current
|
|
|
75
74
|
|
|
76
75
|
如果项目使用 `package-lock.json`,在更新 `package.json` 后运行 `npm install --package-lock-only`,确保锁文件中的版本号保持同步。
|
|
77
76
|
|
|
78
|
-
###
|
|
77
|
+
### 5. 重新生成构建产物
|
|
79
78
|
|
|
80
79
|
<!-- TODO: 替换为你的项目产物重建步骤 -->
|
|
81
80
|
|
|
@@ -90,20 +89,20 @@ git branch --show-current
|
|
|
90
89
|
- 如果项目没有生成产物,请在项目特化版本中明确说明
|
|
91
90
|
- 如果重建失败,停止发布流程并先修复构建问题
|
|
92
91
|
|
|
93
|
-
###
|
|
92
|
+
### 6. 创建发布提交
|
|
94
93
|
|
|
95
94
|
```bash
|
|
96
95
|
git add -A
|
|
97
96
|
git commit -m "chore: release v{version}"
|
|
98
97
|
```
|
|
99
98
|
|
|
100
|
-
###
|
|
99
|
+
### 7. 创建 Git 标签
|
|
101
100
|
|
|
102
101
|
```bash
|
|
103
102
|
git tag v{version}
|
|
104
103
|
```
|
|
105
104
|
|
|
106
|
-
###
|
|
105
|
+
### 8. 管理里程碑
|
|
107
106
|
|
|
108
107
|
为已发布版本关闭对应版本里程碑,并为下一轮创建缺失的规划里程碑。
|
|
109
108
|
|
|
@@ -120,7 +119,7 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
|
|
|
120
119
|
- 当 `PATCH=0` 时,同时确保 `{MAJOR}.{MINOR+1}.0` 与 `{MAJOR}.{MINOR+1}.x`
|
|
121
120
|
- 输出包含已发布里程碑动作和新建数量的汇总
|
|
122
121
|
|
|
123
|
-
###
|
|
122
|
+
### 9. 输出摘要
|
|
124
123
|
|
|
125
124
|
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
|
|
126
125
|
|