@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,6 +1,6 @@
|
|
|
1
1
|
# 多 AI 协作指南
|
|
2
2
|
|
|
3
|
-
本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Gemini CLI、
|
|
3
|
+
本项目支持多个 AI 编程助手协同工作,包括 Claude Code、OpenAI Codex CLI、Gemini CLI、OpenCode 等。
|
|
4
4
|
|
|
5
5
|
## 双配置架构
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
| AI 工具 | 主要配置 | 备选配置 |
|
|
10
10
|
|---------|---------|---------|
|
|
11
|
-
| Claude Code | `.claude/`(CLAUDE.md、commands/、settings
|
|
11
|
+
| Claude Code | `.claude/`(CLAUDE.md、commands/、settings.json) | - |
|
|
12
12
|
| OpenAI Codex CLI | `AGENTS.md` | - |
|
|
13
13
|
| Gemini CLI | `AGENTS.md` | - |
|
|
14
|
-
|
|
|
14
|
+
| OpenCode | `AGENTS.md` | - |
|
|
15
15
|
| 其他 AI 工具 | `AGENTS.md` | 项目 README |
|
|
16
16
|
|
|
17
17
|
- **Claude Code** 使用专属的 `.claude/` 目录存放项目指令、斜杠命令和设置。
|
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
.agents/ # AI 协作配置(版本控制)
|
|
26
|
-
README.md #
|
|
27
|
-
README.zh-CN.md # 中文版本
|
|
26
|
+
README.md # 协作指南
|
|
28
27
|
QUICKSTART.md # 快速入门指南
|
|
29
|
-
QUICKSTART.zh-CN.md # 快速入门指南(中文)
|
|
30
28
|
templates/ # 任务和文档模板
|
|
31
29
|
task.md # 任务模板
|
|
32
30
|
handoff.md # AI 间交接模板
|
|
@@ -36,28 +34,28 @@
|
|
|
36
34
|
bug-fix.yaml # 缺陷修复工作流
|
|
37
35
|
code-review.yaml # 代码审查工作流
|
|
38
36
|
refactoring.yaml # 重构工作流
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
logs/ # 协作日志
|
|
37
|
+
workspace/ # 运行时工作区(已被 git ignore)
|
|
38
|
+
active/ # 当前活跃任务
|
|
39
|
+
blocked/ # 被阻塞的任务
|
|
40
|
+
completed/ # 已完成的任务
|
|
41
|
+
logs/ # 协作日志
|
|
45
42
|
|
|
46
43
|
.claude/ # Claude Code 专属配置
|
|
47
44
|
CLAUDE.md # Claude 项目指令
|
|
48
45
|
commands/ # 斜杠命令
|
|
49
|
-
settings
|
|
46
|
+
settings.json # Claude 设置
|
|
50
47
|
```
|
|
51
48
|
|
|
52
49
|
## 协作模型
|
|
53
50
|
|
|
54
51
|
多 AI 协作遵循结构化工作流:
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
1. 分析
|
|
54
|
+
2. 设计
|
|
55
|
+
3. 实现
|
|
56
|
+
4. 审查
|
|
57
|
+
5. 修复问题
|
|
58
|
+
6. 提交
|
|
61
59
|
|
|
62
60
|
### 阶段详情
|
|
63
61
|
|
|
@@ -76,26 +74,26 @@
|
|
|
76
74
|
|
|
77
75
|
每个 AI 工具有不同的优势,请据此分配任务:
|
|
78
76
|
|
|
79
|
-
| 能力 | Claude Code | Codex CLI | Gemini CLI |
|
|
80
|
-
|
|
77
|
+
| 能力 | Claude Code | Codex CLI | Gemini CLI | OpenCode |
|
|
78
|
+
|-----|-------------|-----------|------------|----------|
|
|
81
79
|
| 代码库分析 | 优秀 | 良好 | 优秀 | 良好 |
|
|
82
|
-
| 代码审查 | 优秀 | 良好 | 良好 |
|
|
80
|
+
| 代码审查 | 优秀 | 良好 | 良好 | 良好 |
|
|
83
81
|
| 代码实现 | 良好 | 优秀 | 良好 | 优秀 |
|
|
84
|
-
| 大上下文处理 | 良好 | 一般 | 优秀 |
|
|
85
|
-
| 重构 | 良好 | 良好 | 良好 |
|
|
86
|
-
| 文档编写 | 优秀 | 良好 | 良好 |
|
|
82
|
+
| 大上下文处理 | 良好 | 一般 | 优秀 | 一般 |
|
|
83
|
+
| 重构 | 良好 | 良好 | 良好 | 良好 |
|
|
84
|
+
| 文档编写 | 优秀 | 良好 | 良好 | 良好 |
|
|
87
85
|
|
|
88
86
|
### 推荐分配
|
|
89
87
|
|
|
90
88
|
- **分析和审查** - Claude Code(推理能力强,探索全面)
|
|
91
|
-
- **代码实现** - Codex CLI 或
|
|
89
|
+
- **代码实现** - Codex CLI 或 OpenCode(代码生成快,命令式工作流顺手)
|
|
92
90
|
- **大上下文任务** - Gemini CLI(大上下文窗口,适合跨文件分析)
|
|
93
|
-
-
|
|
91
|
+
- **命令式迭代** - OpenCode(适合按工作流连续推进)
|
|
94
92
|
|
|
95
93
|
## 快速入门
|
|
96
94
|
|
|
97
|
-
1. **阅读快速入门指南**:参见 `QUICKSTART.
|
|
98
|
-
2. **创建任务**:将 `.agents/templates/task.
|
|
95
|
+
1. **阅读快速入门指南**:参见 `QUICKSTART.md` 获取分步说明。
|
|
96
|
+
2. **创建任务**:将 `.agents/templates/task.md` 复制到 `.agents/workspace/active/`。
|
|
99
97
|
3. **分配给 AI**:更新任务元数据中的 `assigned_to` 字段。
|
|
100
98
|
4. **执行工作流**:按照 `.agents/workflows/` 中相应的工作流执行。
|
|
101
99
|
5. **交接**:切换 AI 时,从模板创建交接文档。
|
|
@@ -118,10 +116,18 @@
|
|
|
118
116
|
|
|
119
117
|
1. 顶级步骤使用连续整数:`1.`、`2.`、`3.`。
|
|
120
118
|
2. 只有父步骤下的从属动作才使用子步骤:`1.1`、`1.2`、`2.1`。
|
|
121
|
-
3.
|
|
119
|
+
3. 同一步中的从属选项、条件分支或并列可能性使用 `a`、`b`、`c` 标记;仅用于步骤内部的子项展开,不用于命名独立的决策路径或输出模板。
|
|
122
120
|
4. 不要使用 `1.5`、`2.5` 这类中间编号;如新增独立步骤,应整体顺延后续编号。
|
|
123
121
|
5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
|
|
124
122
|
6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
|
|
123
|
+
7. 在 SKILL.md 及其 `reference/` 模板中,如需为独立的条件分流、决策路径或输出模板命名,统一使用“场景”命名(例如使用“场景 A”)。
|
|
124
|
+
|
|
125
|
+
### SKILL.md 体积控制
|
|
126
|
+
|
|
127
|
+
- SKILL.md 正文控制在约 500 tokens(约 80 行 / 2KB)以内。
|
|
128
|
+
- 超过阈值的内容拆分到同级 `reference/` 目录。
|
|
129
|
+
- 骨架中使用明确导航,例如:`执行此步骤前,先读取 reference/xxx.md。`
|
|
130
|
+
- 长脚本继续放在 `scripts/` 目录,优先执行脚本而不是内联大段 bash。
|
|
125
131
|
|
|
126
132
|
## 常见问题
|
|
127
133
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: analyze-task
|
|
3
|
-
description:
|
|
4
|
-
Analyze an existing task and output a requirements analysis document,
|
|
5
|
-
supporting multi-round artifacts (`analysis.md` / `analysis-r{N}.md`).
|
|
6
|
-
Triggered when the user asks to analyze a task. Argument: task-id.
|
|
3
|
+
description: "Analyze a task and produce a requirements document"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Analyze Task
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: block-task
|
|
3
|
-
description:
|
|
4
|
-
Mark a task as blocked and record the blocking reason, moving it from
|
|
5
|
-
the active directory to the blocked directory. Use when a task cannot
|
|
6
|
-
proceed due to technical problems, unclear requirements, missing resources,
|
|
7
|
-
or pending decisions. Arguments: task-id, optional blocking reason.
|
|
3
|
+
description: "Mark a task as blocked and record the reason"
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Block Task
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: check-task
|
|
3
|
-
description:
|
|
4
|
-
Check a task's current status, workflow progress, and context files. This is a
|
|
5
|
-
read-only operation that reports the task status and recommends appropriate
|
|
6
|
-
next steps. Triggered when the user asks to inspect task status. Argument:
|
|
7
|
-
task-id.
|
|
3
|
+
description: "Check a task's current status and progress"
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Check Task Status
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: close-codescan
|
|
3
|
-
description:
|
|
4
|
-
Dismiss a Code Scanning (CodeQL) alert with a documented justification.
|
|
5
|
-
Triggered when the user asks to dismiss a Code Scanning alert.
|
|
6
|
-
Argument: alert number.
|
|
3
|
+
description: "Close a Code Scanning alert with a documented reason"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Dismiss Code Scanning Alert
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: close-dependabot
|
|
3
|
-
description:
|
|
4
|
-
Dismiss a Dependabot security alert with a documented justification.
|
|
5
|
-
Triggered when the user asks to dismiss a Dependabot alert.
|
|
6
|
-
Argument: alert number.
|
|
3
|
+
description: "Close a Dependabot alert with a documented reason"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Dismiss Dependabot Alert
|
|
@@ -1,139 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: commit
|
|
3
|
-
description:
|
|
4
|
-
Commit current changes to Git, including copyright header year
|
|
5
|
-
check and task status update. Triggered when the user requests
|
|
6
|
-
a code commit or save changes.
|
|
3
|
+
description: "Commit the current changes to Git"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Commit Changes
|
|
10
7
|
|
|
11
|
-
|
|
8
|
+
Create a Git commit without overwriting user work and update the related task state when needed.
|
|
12
9
|
|
|
13
|
-
##
|
|
10
|
+
## 1. Check Local Modifications (CRITICAL)
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
Before any edit, inspect:
|
|
16
13
|
|
|
17
14
|
```bash
|
|
18
15
|
git status --short
|
|
19
16
|
git diff
|
|
20
17
|
```
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
1. **Read `git diff` output carefully** - understand what the user has already changed
|
|
24
|
-
2. **Make incremental edits** on top of user modifications - do not overwrite their implementation
|
|
25
|
-
3. **If your planned edits conflict** with user modifications, ask the user first:
|
|
26
|
-
```
|
|
27
|
-
This file has local modifications:
|
|
28
|
-
- Your changes: [describe user's changes]
|
|
29
|
-
- My planned changes: [describe planned changes]
|
|
30
|
-
Please confirm how to proceed.
|
|
31
|
-
```
|
|
32
|
-
4. **Do NOT** rewrite code the user has already implemented
|
|
33
|
-
5. **Do NOT** add "improvements" the user didn't ask for
|
|
19
|
+
Respect existing user changes. If your planned edit conflicts with them, stop and ask before proceeding.
|
|
34
20
|
|
|
35
|
-
##
|
|
21
|
+
## 2. Update Copyright Headers
|
|
36
22
|
|
|
37
|
-
|
|
23
|
+
Use the current year dynamically and only update files that are already modified.
|
|
38
24
|
|
|
39
|
-
|
|
25
|
+
> The full copyright workflow lives in `reference/copyright-check.md`. Read `reference/copyright-check.md` before editing any header.
|
|
40
26
|
|
|
41
|
-
|
|
42
|
-
date +%Y
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Never hardcode the year.**
|
|
46
|
-
|
|
47
|
-
### Check Modified Files
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
git status --short
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
### For Each Modified File
|
|
54
|
-
|
|
55
|
-
Check if the file has a copyright header:
|
|
56
|
-
```bash
|
|
57
|
-
grep "Copyright.*[0-9]\{4\}" <modified_file>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
If it has a copyright header and the year is not current, update the year.
|
|
61
|
-
|
|
62
|
-
**Common formats**:
|
|
63
|
-
- `Copyright (C) 2024-2025` -> `Copyright (C) 2024-{CURRENT_YEAR}`
|
|
64
|
-
- `Copyright (C) 2024` -> `Copyright (C) 2024-{CURRENT_YEAR}`
|
|
65
|
-
- `Copyright (C) 2025` -> `Copyright (C) {CURRENT_YEAR}` (if already current)
|
|
66
|
-
|
|
67
|
-
### Copyright Checklist
|
|
68
|
-
|
|
69
|
-
Before executing `git commit`:
|
|
70
|
-
- [ ] Used `date +%Y` to dynamically get the current year
|
|
71
|
-
- [ ] Checked all files about to be committed
|
|
72
|
-
- [ ] Updated copyright year in all files that have copyright headers
|
|
73
|
-
- [ ] **Never** hardcoded the year
|
|
74
|
-
- [ ] **Only** updated modified files, not the entire project
|
|
75
|
-
|
|
76
|
-
## Step 2: Analyze Changes and Generate Commit Message
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
git status
|
|
80
|
-
git diff
|
|
81
|
-
git log --oneline -5
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Generate commit message in Conventional Commits format:
|
|
85
|
-
- `<type>(<scope>): <subject>` (English imperative mood, max 50 chars)
|
|
86
|
-
- Body: 2-4 bullet points explaining what and why
|
|
87
|
-
- Signature block:
|
|
88
|
-
- `Co-Authored-By: {Your Model Name} <noreply@provider.com>`
|
|
89
|
-
- If task-related, append extra `Co-Authored-By` lines for other contributing agents
|
|
90
|
-
|
|
91
|
-
### Multi-Agent Co-Authorship (If Task-Related)
|
|
92
|
-
|
|
93
|
-
If the commit belongs to an active task and `.agents/workspace/active/{task-id}/task.md` exists:
|
|
94
|
-
|
|
95
|
-
1. Read the `## Activity Log` section from `task.md`.
|
|
96
|
-
2. Extract all unique agent names from entries matching `by {agent}`. A loose pattern such as `by (\S+)` is acceptable.
|
|
97
|
-
3. Exclude `human` because the Git author is already the human user.
|
|
98
|
-
4. Map each agent to a `Co-Authored-By` line:
|
|
99
|
-
|
|
100
|
-
| Agent | Signature |
|
|
101
|
-
|-------|-----------|
|
|
102
|
-
| `claude` | `Co-Authored-By: Claude <noreply@anthropic.com>` |
|
|
103
|
-
| `codex` | `Co-Authored-By: Codex <noreply@openai.com>` |
|
|
104
|
-
| `gemini` | `Co-Authored-By: Gemini <noreply@google.com>` |
|
|
105
|
-
| `opencode` | `Co-Authored-By: OpenCode <noreply@opencode.ai>` |
|
|
106
|
-
|
|
107
|
-
5. Build the signature block with these rules:
|
|
108
|
-
- Keep the current executing agent's signature in its original position.
|
|
109
|
-
- Append other unique participating agents as additional `Co-Authored-By` lines.
|
|
110
|
-
- Do not duplicate the current agent if it already appears in `Activity Log`.
|
|
111
|
-
- For unknown agent names, use `Co-Authored-By: {Agent} <noreply@unknown>`.
|
|
112
|
-
|
|
113
|
-
If the commit is not task-related, keep the existing single-signature behavior.
|
|
114
|
-
|
|
115
|
-
## Step 3: Create Commit
|
|
27
|
+
## 3. Build the Commit Message
|
|
116
28
|
|
|
117
|
-
|
|
118
|
-
git add <specific-files>
|
|
119
|
-
git commit -m "$(cat <<'EOF'
|
|
120
|
-
<type>(<scope>): <subject>
|
|
29
|
+
Review status, diff, and recent history, then prepare a Conventional Commit with the correct co-author lines.
|
|
121
30
|
|
|
122
|
-
-
|
|
123
|
-
- <bullet point 2>
|
|
31
|
+
> Commit message rules, examples, and multi-agent co-authorship details live in `reference/commit-message.md`. Read `reference/commit-message.md` before writing the commit.
|
|
124
32
|
|
|
125
|
-
|
|
126
|
-
<additional Co-Authored-By lines for other task participants, if any>
|
|
127
|
-
EOF
|
|
128
|
-
)"
|
|
129
|
-
```
|
|
33
|
+
## 4. Create the Commit
|
|
130
34
|
|
|
131
|
-
|
|
132
|
-
- Add specific files by name - do NOT use `git add -A` or `git add .`
|
|
133
|
-
- Do NOT commit files that may contain secrets (.env, credentials, keys)
|
|
134
|
-
- For task-related commits, keep the current agent first and append the extra lines generated above
|
|
35
|
+
Stage specific files only and run `git commit` with the prepared message.
|
|
135
36
|
|
|
136
|
-
##
|
|
37
|
+
## 5. Update Task Status When Applicable
|
|
137
38
|
|
|
138
39
|
Get the current time:
|
|
139
40
|
|
|
@@ -141,93 +42,20 @@ Get the current time:
|
|
|
141
42
|
date "+%Y-%m-%d %H:%M:%S"
|
|
142
43
|
```
|
|
143
44
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
For all cases below, **append** to `## Activity Log` in task.md (do NOT overwrite previous entries):
|
|
147
|
-
```
|
|
148
|
-
- {yyyy-MM-dd HH:mm:ss} — **Commit** by {agent} — {commit hash short} {commit subject}
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
> **⚠️ Situation Check — you must inspect task state first, then choose exactly one matching case below:**
|
|
152
|
-
>
|
|
153
|
-
> - Check `task.md` for `current_step`, workflow progress, and the latest `## Activity Log` entry
|
|
154
|
-
> - Check whether the latest `review.md` / `review-r{N}.md` exists and whether the latest review passed with no issues
|
|
155
|
-
> - Check whether any follow-up repair, review, or PR creation step is still pending
|
|
156
|
-
>
|
|
157
|
-
> | Decision basis | Required case |
|
|
158
|
-
> |---------------|---------------|
|
|
159
|
-
> | All workflow steps complete + latest review passed with no issues + all tests pass | Case 1: Final Commit |
|
|
160
|
-
> | There are still incomplete steps, unresolved fixes, or waiting actions | Case 2: More Work Needed |
|
|
161
|
-
> | The purpose of this commit is to send the implementation/refinement into code review | Case 3: Ready for Review |
|
|
162
|
-
> | Code is committed, review is done, and the next action should be PR creation | Case 4: Ready for PR |
|
|
163
|
-
>
|
|
164
|
-
> **Do not mix multiple cases. You must decide first, then output the single matching next step.**
|
|
165
|
-
|
|
166
|
-
### Case 1: Final Commit (Trigger: all work is done and the next step is task archival)
|
|
167
|
-
|
|
168
|
-
If this is the last commit and all work is done:
|
|
169
|
-
|
|
170
|
-
Prerequisites:
|
|
171
|
-
- [ ] All code committed
|
|
172
|
-
- [ ] All tests pass
|
|
173
|
-
- [ ] Code review passed
|
|
174
|
-
- [ ] All workflow steps complete
|
|
175
|
-
|
|
176
|
-
Suggest next step:
|
|
177
|
-
|
|
178
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
179
|
-
|
|
180
|
-
```
|
|
181
|
-
Next step - complete and archive the task:
|
|
182
|
-
- Claude Code / OpenCode: /complete-task {task-id}
|
|
183
|
-
- Gemini CLI: /{{project}}:complete-task {task-id}
|
|
184
|
-
- Codex CLI: $complete-task {task-id}
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Case 2: More Work Needed (Trigger: incomplete steps, unresolved issues, or pending collaboration remain)
|
|
45
|
+
> The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
|
|
188
46
|
|
|
189
|
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
47
|
+
Append the Commit Activity Log entry and choose exactly one next-step case:
|
|
48
|
+
- final commit -> `complete-task {task-id}`
|
|
49
|
+
- more work remains -> update task.md and stop
|
|
50
|
+
- ready for review -> `review-task {task-id}`
|
|
51
|
+
- ready for PR -> `create-pr`
|
|
192
52
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
If the commit is ready for code review:
|
|
196
|
-
- Update `task.md`: set `current_step` to `code-review`
|
|
197
|
-
- Update `task.md`: set `updated_at` to current time
|
|
198
|
-
- Mark implementation step as complete in workflow progress
|
|
199
|
-
|
|
200
|
-
Suggest next step:
|
|
201
|
-
|
|
202
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
203
|
-
|
|
204
|
-
```
|
|
205
|
-
Next step - code review:
|
|
206
|
-
- Claude Code / OpenCode: /review-task {task-id}
|
|
207
|
-
- Gemini CLI: /{{project}}:review-task {task-id}
|
|
208
|
-
- Codex CLI: $review-task {task-id}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Case 4: Ready for PR (Trigger: the next action should be `create-pr`)
|
|
212
|
-
|
|
213
|
-
If the commit should become a Pull Request:
|
|
214
|
-
- Update `task.md`: set `updated_at` to current time
|
|
215
|
-
- Record PR plan in task.md
|
|
216
|
-
|
|
217
|
-
Suggest next step:
|
|
53
|
+
## Notes
|
|
218
54
|
|
|
219
|
-
|
|
55
|
+
- Never commit secrets such as `.env`, credentials, or keys
|
|
56
|
+
- Keep the current agent first in the co-author block
|
|
57
|
+
- Do not use `git add -A` or `git add .`
|
|
220
58
|
|
|
221
|
-
|
|
222
|
-
Next step - create a Pull Request:
|
|
223
|
-
- Claude Code / OpenCode: /create-pr
|
|
224
|
-
- Gemini CLI: /{{project}}:create-pr
|
|
225
|
-
- Codex CLI: $create-pr
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Notes
|
|
59
|
+
## Error Handling
|
|
229
60
|
|
|
230
|
-
-
|
|
231
|
-
- Ensure commit messages clearly describe the changes
|
|
232
|
-
- Follow the project's Conventional Commits conventions
|
|
233
|
-
- If task status update fails, warn the user but do not block the commit
|
|
61
|
+
- If the task status update fails, warn the user but do not block the commit
|