@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
package/README.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/logo.svg" alt="Agent Infra Logo" width="200">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@fitlab-ai/agent-infra)
|
|
5
|
-
[](License.txt)
|
|
6
|
-
[](https://nodejs.org/)
|
|
7
|
-
[](https://github.com/fitlab-ai/agent-infra/releases)
|
|
8
|
-
[](CONTRIBUTING.md)
|
|
5
|
+
<h1 align="center">Agent Infra</h1>
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
The missing collaboration layer for AI coding agents — unified skills and workflows for Claude Code, Codex, Gemini CLI, and OpenCode.
|
|
9
|
+
</p>
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<strong>Semi-automated programming, powered by AI agents.</strong> Define a requirement, let AI handle analysis, planning, coding, review, and delivery — you only step in when it matters.
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/@fitlab-ai/agent-infra"><img src="https://img.shields.io/npm/v/@fitlab-ai/agent-infra" alt="npm version"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@fitlab-ai/agent-infra"><img src="https://img.shields.io/npm/dm/@fitlab-ai/agent-infra" alt="npm downloads"></a>
|
|
18
|
+
<a href="License.txt"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
|
|
19
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%3E%3D18-brightgreen?logo=node.js" alt="Node.js >= 18"></a>
|
|
20
|
+
<a href="https://github.com/fitlab-ai/agent-infra/releases"><img src="https://img.shields.io/github/v/release/fitlab-ai/agent-infra" alt="GitHub release"></a>
|
|
21
|
+
<a href="CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
|
|
22
|
+
</p>
|
|
13
23
|
|
|
14
24
|
[中文版](README.zh-CN.md)
|
|
15
25
|
|
|
@@ -74,7 +84,7 @@ Just fix it at the application layer in LoginService.
|
|
|
74
84
|
|
|
75
85
|
```bash
|
|
76
86
|
/commit
|
|
77
|
-
/create-pr
|
|
87
|
+
/create-pr TASK-20260319-100000
|
|
78
88
|
/complete-task TASK-20260319-100000
|
|
79
89
|
```
|
|
80
90
|
|
|
@@ -264,8 +274,8 @@ agent-infra ships with **28 built-in AI skills**. They are organized by use case
|
|
|
264
274
|
|-------|-------------|------------|----------------------|
|
|
265
275
|
| `create-issue` | Create a GitHub Issue from a task file. | `task-id` | Push a local task into GitHub tracking. |
|
|
266
276
|
| `sync-issue` | Post task progress updates back to the linked GitHub Issue. | `task-id` or `issue-number` | Keep stakeholders updated as the task evolves. |
|
|
267
|
-
| `create-pr` | Open a Pull Request to an inferred or explicit target branch. | `target-branch` (optional) | Publish reviewed changes for merge. |
|
|
268
|
-
| `sync-pr` | Sync task progress and review metadata into the Pull Request. | `task-id` | Keep PR metadata aligned with the local task record. |
|
|
277
|
+
| `create-pr` | Open a Pull Request to an inferred or explicit target branch. | `task-id` (optional), `target-branch` (optional) | Publish reviewed changes for merge, with optional explicit task linkage after a fresh session. |
|
|
278
|
+
| `sync-pr` | Sync task progress and review metadata into the Pull Request. | `task-id` or `pr-number` | Keep PR metadata aligned with the local task record from either task or PR entrypoints. |
|
|
269
279
|
|
|
270
280
|
<a id="code-quality"></a>
|
|
271
281
|
|
|
@@ -380,8 +390,7 @@ The generated `.agents/.airc.json` file is the central contract between the boot
|
|
|
380
390
|
"project": "my-project",
|
|
381
391
|
"org": "my-org",
|
|
382
392
|
"language": "en",
|
|
383
|
-
"
|
|
384
|
-
"templateVersion": "v0.4.0",
|
|
393
|
+
"templateVersion": "v0.4.2",
|
|
385
394
|
"files": {
|
|
386
395
|
"managed": [
|
|
387
396
|
".agents/workspace/README.md",
|
|
@@ -409,7 +418,6 @@ The generated `.agents/.airc.json` file is the central contract between the boot
|
|
|
409
418
|
| `project` | Project name used when rendering commands, paths, and templates. |
|
|
410
419
|
| `org` | GitHub organization or owner used by generated metadata and links. |
|
|
411
420
|
| `language` | Primary project language or locale used by rendered templates. |
|
|
412
|
-
| `templateSource` | Local template root used during rendering. |
|
|
413
421
|
| `templateVersion` | Installed template version for future upgrades and drift tracking. |
|
|
414
422
|
| `files` | Per-path update strategy configuration for managed, merged, and ejected files. |
|
|
415
423
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./assets/logo.svg" alt="Agent Infra 标志" width="200">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/@fitlab-ai/agent-infra)
|
|
5
|
-
[](License.txt)
|
|
6
|
-
[](https://nodejs.org/)
|
|
7
|
-
[](https://github.com/fitlab-ai/agent-infra/releases)
|
|
8
|
-
[](CONTRIBUTING.md)
|
|
5
|
+
<h1 align="center">Agent Infra</h1>
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
AI 编程代理之间缺失的协作层 —— 为 Claude Code、Codex、Gemini CLI、OpenCode 提供统一的 skills 和工作流。
|
|
9
|
+
</p>
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<strong>AI Agent 半自动化编程神器。</strong> 定义需求,让 AI 完成分析、方案设计、编码、审查和交付 —— 你只需在关键节点介入。
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://www.npmjs.com/package/@fitlab-ai/agent-infra"><img src="https://img.shields.io/npm/v/@fitlab-ai/agent-infra" alt="npm version"></a>
|
|
17
|
+
<a href="https://www.npmjs.com/package/@fitlab-ai/agent-infra"><img src="https://img.shields.io/npm/dm/@fitlab-ai/agent-infra" alt="npm downloads"></a>
|
|
18
|
+
<a href="License.txt"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
|
|
19
|
+
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%3E%3D18-brightgreen?logo=node.js" alt="Node.js >= 18"></a>
|
|
20
|
+
<a href="https://github.com/fitlab-ai/agent-infra/releases"><img src="https://img.shields.io/github/v/release/fitlab-ai/agent-infra" alt="GitHub release"></a>
|
|
21
|
+
<a href="CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"></a>
|
|
22
|
+
</p>
|
|
13
23
|
|
|
14
24
|
[English](README.md)
|
|
15
25
|
|
|
@@ -74,7 +84,7 @@ agent-infra 的目标就是把这层协作面标准化。它为所有支持的 A
|
|
|
74
84
|
|
|
75
85
|
```bash
|
|
76
86
|
/commit
|
|
77
|
-
/create-pr
|
|
87
|
+
/create-pr TASK-20260319-100000
|
|
78
88
|
/complete-task TASK-20260319-100000
|
|
79
89
|
```
|
|
80
90
|
|
|
@@ -264,8 +274,8 @@ agent-infra 内置 **28 个 AI skills**。它们按使用场景分组,但共
|
|
|
264
274
|
|-------|------|------|---------|
|
|
265
275
|
| `create-issue` | 根据任务文件创建 GitHub Issue。 | `task-id` | 需要把本地任务同步到 GitHub 跟踪时。 |
|
|
266
276
|
| `sync-issue` | 将任务进度同步回关联的 GitHub Issue。 | `task-id` 或 `issue-number` | 任务推进过程中持续同步状态。 |
|
|
267
|
-
| `create-pr` | 向推断出的目标分支或显式指定分支创建 Pull Request。 | `target-branch`(可选) | 变更准备合入时创建 PR
|
|
268
|
-
| `sync-pr` | 将任务进度和审查元数据同步到 Pull Request。 | `task-id` |
|
|
277
|
+
| `create-pr` | 向推断出的目标分支或显式指定分支创建 Pull Request。 | `task-id`(可选)、`target-branch`(可选) | 变更准备合入时创建 PR;清空上下文后也可显式传入任务关联。 |
|
|
278
|
+
| `sync-pr` | 将任务进度和审查元数据同步到 Pull Request。 | `task-id` 或 `pr-number` | 允许从任务入口或 PR 入口同步,让 PR 元数据与本地任务记录保持一致。 |
|
|
269
279
|
|
|
270
280
|
<a id="code-quality"></a>
|
|
271
281
|
|
|
@@ -380,8 +390,7 @@ import-issue #42 从 GitHub Issue 导入任务
|
|
|
380
390
|
"project": "my-project",
|
|
381
391
|
"org": "my-org",
|
|
382
392
|
"language": "en",
|
|
383
|
-
"
|
|
384
|
-
"templateVersion": "v0.4.0",
|
|
393
|
+
"templateVersion": "v0.4.2",
|
|
385
394
|
"files": {
|
|
386
395
|
"managed": [
|
|
387
396
|
".agents/workspace/README.md",
|
|
@@ -409,7 +418,6 @@ import-issue #42 从 GitHub Issue 导入任务
|
|
|
409
418
|
| `project` | 用于渲染命令、路径和模板内容的项目名。 |
|
|
410
419
|
| `org` | 生成元数据和链接时使用的 GitHub 组织或拥有者。 |
|
|
411
420
|
| `language` | 渲染模板时采用的项目主语言或区域设置。 |
|
|
412
|
-
| `templateSource` | 本地模板根目录。 |
|
|
413
421
|
| `templateVersion` | 当前安装的模板版本,用于升级和差异追踪。 |
|
|
414
422
|
| `files` | 针对具体路径配置 `managed`、`merged`、`ejected` 三类更新策略。 |
|
|
415
423
|
|
package/lib/defaults.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"managed": [
|
|
4
|
+
".agents/QUICKSTART.md",
|
|
5
|
+
".agents/README.md",
|
|
4
6
|
".agents/skills/",
|
|
5
7
|
".agents/templates/",
|
|
6
8
|
".agents/workflows/",
|
|
@@ -8,6 +10,7 @@
|
|
|
8
10
|
".claude/commands/",
|
|
9
11
|
".claude/hooks/",
|
|
10
12
|
".gemini/commands/",
|
|
13
|
+
".github/hooks/check-version-format.sh",
|
|
11
14
|
".opencode/commands/"
|
|
12
15
|
],
|
|
13
16
|
"merged": [
|
|
@@ -15,21 +18,14 @@
|
|
|
15
18
|
"**/test-integration.*",
|
|
16
19
|
"**/test.*",
|
|
17
20
|
"**/upgrade-dependency.*",
|
|
18
|
-
".agents/QUICKSTART.md",
|
|
19
|
-
".agents/README.md",
|
|
20
21
|
".agents/skills/release/SKILL.*",
|
|
21
22
|
".agents/skills/test-integration/SKILL.*",
|
|
22
23
|
".agents/skills/test/SKILL.*",
|
|
23
24
|
".agents/skills/upgrade-dependency/SKILL.*",
|
|
24
|
-
".claude/CLAUDE.md",
|
|
25
|
-
".claude/project-rules.md",
|
|
26
25
|
".claude/settings.json",
|
|
27
|
-
".codex/README.md",
|
|
28
26
|
".gemini/settings.json",
|
|
29
|
-
".
|
|
30
|
-
".
|
|
31
|
-
".opencode/README.md",
|
|
32
|
-
"AGENTS.md"
|
|
27
|
+
".github/hooks/pre-commit",
|
|
28
|
+
".gitignore"
|
|
33
29
|
],
|
|
34
30
|
"ejected": []
|
|
35
31
|
}
|
package/lib/init.js
CHANGED
|
@@ -57,11 +57,7 @@ async function cmdInit() {
|
|
|
57
57
|
const configPath = path.join('.agents', '.airc.json');
|
|
58
58
|
|
|
59
59
|
// check existing config
|
|
60
|
-
if (
|
|
61
|
-
fs.existsSync(configPath) ||
|
|
62
|
-
fs.existsSync('.airc.json') ||
|
|
63
|
-
fs.existsSync(path.join('.agent-infra', 'config.json'))
|
|
64
|
-
) {
|
|
60
|
+
if (fs.existsSync(configPath)) {
|
|
65
61
|
err('This project already has agent-infra configuration.');
|
|
66
62
|
err('Use /update-agent-infra in your AI TUI to update.');
|
|
67
63
|
process.exitCode = 1;
|
|
@@ -165,7 +161,6 @@ async function cmdInit() {
|
|
|
165
161
|
project: projectName,
|
|
166
162
|
org: orgName,
|
|
167
163
|
language,
|
|
168
|
-
templateSource: 'templates/',
|
|
169
164
|
templateVersion: VERSION,
|
|
170
165
|
files: structuredClone(defaults.files)
|
|
171
166
|
};
|
package/lib/update.js
CHANGED
|
@@ -10,52 +10,6 @@ const defaults = JSON.parse(
|
|
|
10
10
|
|
|
11
11
|
const CONFIG_DIR = '.agents';
|
|
12
12
|
const CONFIG_PATH = path.join(CONFIG_DIR, '.airc.json');
|
|
13
|
-
const LEGACY_CONFIG_PATHS = ['.airc.json', path.join('.agent-infra', 'config.json')];
|
|
14
|
-
const WORKSPACE_PATH = path.join(CONFIG_DIR, 'workspace');
|
|
15
|
-
const LEGACY_WORKSPACE_PATHS = ['.agent-workspace', path.join('.agent-infra', 'workspace')];
|
|
16
|
-
|
|
17
|
-
function migrateLegacyPaths() {
|
|
18
|
-
let migratedConfig = false;
|
|
19
|
-
let migratedWorkspace = false;
|
|
20
|
-
let configFrom = null;
|
|
21
|
-
let workspaceFrom = null;
|
|
22
|
-
|
|
23
|
-
if (!fs.existsSync(CONFIG_PATH)) {
|
|
24
|
-
for (const legacyPath of LEGACY_CONFIG_PATHS) {
|
|
25
|
-
if (!fs.existsSync(legacyPath)) {
|
|
26
|
-
continue;
|
|
27
|
-
}
|
|
28
|
-
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
29
|
-
fs.renameSync(legacyPath, CONFIG_PATH);
|
|
30
|
-
migratedConfig = true;
|
|
31
|
-
configFrom = legacyPath;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (!fs.existsSync(WORKSPACE_PATH)) {
|
|
37
|
-
for (const legacyPath of LEGACY_WORKSPACE_PATHS) {
|
|
38
|
-
if (!fs.existsSync(legacyPath)) {
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
fs.mkdirSync(CONFIG_DIR, { recursive: true });
|
|
42
|
-
fs.renameSync(legacyPath, WORKSPACE_PATH);
|
|
43
|
-
migratedWorkspace = true;
|
|
44
|
-
workspaceFrom = legacyPath;
|
|
45
|
-
break;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
try {
|
|
50
|
-
if (fs.existsSync('.agent-infra') && fs.readdirSync('.agent-infra').length === 0) {
|
|
51
|
-
fs.rmdirSync('.agent-infra');
|
|
52
|
-
}
|
|
53
|
-
} catch {
|
|
54
|
-
// Ignore cleanup failures for partially migrated directories.
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return { migratedConfig, migratedWorkspace, configFrom, workspaceFrom };
|
|
58
|
-
}
|
|
59
13
|
|
|
60
14
|
function syncFileRegistry(config) {
|
|
61
15
|
config.files ||= {};
|
|
@@ -107,15 +61,6 @@ async function cmdUpdate() {
|
|
|
107
61
|
console.log(' ==================================');
|
|
108
62
|
console.log('');
|
|
109
63
|
|
|
110
|
-
const { migratedConfig, migratedWorkspace, configFrom, workspaceFrom } = migrateLegacyPaths();
|
|
111
|
-
|
|
112
|
-
if (migratedConfig) {
|
|
113
|
-
ok(`Migrated ${configFrom} -> ${CONFIG_PATH}`);
|
|
114
|
-
}
|
|
115
|
-
if (migratedWorkspace) {
|
|
116
|
-
ok(`Migrated ${workspaceFrom} -> ${WORKSPACE_PATH}`);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
64
|
// check config exists
|
|
120
65
|
if (!fs.existsSync(CONFIG_PATH)) {
|
|
121
66
|
err(`No ${CONFIG_PATH} found in current directory.`);
|
package/package.json
CHANGED
|
@@ -4,10 +4,20 @@ This guide walks you through using multiple AI coding assistants together on a p
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- At least one AI coding tool installed (Claude Code, Codex CLI, Gemini CLI, or
|
|
7
|
+
- At least one AI coding tool installed (Claude Code, Codex CLI, Gemini CLI, or OpenCode)
|
|
8
8
|
- A project with `.agents/` directory set up (this project)
|
|
9
9
|
- Familiarity with your project's codebase
|
|
10
10
|
|
|
11
|
+
## Git Hook Setup
|
|
12
|
+
|
|
13
|
+
Enable the shared Git hooks path before relying on the template hook chain:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git config core.hooksPath .github/hooks
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This makes Git invoke the hooks synced into `.github/hooks/`, including `pre-commit` and `check-version-format.sh`.
|
|
20
|
+
|
|
11
21
|
## Creating Your First Task
|
|
12
22
|
|
|
13
23
|
1. Copy the task template to the active workspace:
|
|
@@ -22,7 +32,7 @@ cp .agents/templates/task.md .agents/workspace/active/task-001.md
|
|
|
22
32
|
id: task-001
|
|
23
33
|
type: feature # feature | bugfix | refactor | docs | review
|
|
24
34
|
status: open # open | in-progress | review | blocked | completed
|
|
25
|
-
assigned_to: claude # claude | codex | gemini |
|
|
35
|
+
assigned_to: claude # claude | codex | gemini | opencode | human
|
|
26
36
|
```
|
|
27
37
|
|
|
28
38
|
3. Describe the task in the body of the document.
|
|
@@ -53,7 +63,7 @@ gemini
|
|
|
53
63
|
# create a technical design. Define interfaces and outline the approach."
|
|
54
64
|
```
|
|
55
65
|
|
|
56
|
-
### Phase 3: Implementation (Recommended: Codex CLI or
|
|
66
|
+
### Phase 3: Implementation (Recommended: Codex CLI or OpenCode)
|
|
57
67
|
|
|
58
68
|
```bash
|
|
59
69
|
# Switch to Codex CLI for implementation
|
|
@@ -81,7 +91,7 @@ claude
|
|
|
81
91
|
### Bug Fix
|
|
82
92
|
|
|
83
93
|
1. **Reproduce & Analyze** (Claude Code): Identify the root cause.
|
|
84
|
-
2. **Implement Fix** (Codex CLI /
|
|
94
|
+
2. **Implement Fix** (Codex CLI / OpenCode): Write the fix and tests.
|
|
85
95
|
3. **Review** (Claude Code): Verify the fix is correct and complete.
|
|
86
96
|
4. **Commit**: Create PR with bug fix description.
|
|
87
97
|
|
|
@@ -90,7 +100,7 @@ claude
|
|
|
90
100
|
cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
|
|
91
101
|
# Edit the task, then:
|
|
92
102
|
# 1. Use Claude Code to analyze
|
|
93
|
-
# 2. Use Codex/
|
|
103
|
+
# 2. Use Codex/OpenCode to fix
|
|
94
104
|
# 3. Use Claude Code to review
|
|
95
105
|
```
|
|
96
106
|
|
|
@@ -109,7 +119,7 @@ cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
|
|
|
109
119
|
|
|
110
120
|
1. **Analyze Scope** (Claude Code / Gemini CLI): Map all affected areas.
|
|
111
121
|
2. **Design** (Claude Code): Plan the refactoring approach.
|
|
112
|
-
3. **Implement** (Codex CLI /
|
|
122
|
+
3. **Implement** (Codex CLI / OpenCode): Execute the refactoring.
|
|
113
123
|
4. **Verify** (Claude Code): Ensure no regressions, run tests.
|
|
114
124
|
|
|
115
125
|
```bash
|
|
@@ -146,7 +156,7 @@ Even if you're switching between AIs quickly, a brief handoff note saves time an
|
|
|
146
156
|
### 3. Use the Right Tool for the Job
|
|
147
157
|
|
|
148
158
|
- Complex analysis? Use Claude Code or Gemini CLI.
|
|
149
|
-
- Straightforward implementation? Use Codex CLI or
|
|
159
|
+
- Straightforward implementation? Use Codex CLI or OpenCode.
|
|
150
160
|
- Large file review? Use Gemini CLI.
|
|
151
161
|
|
|
152
162
|
### 4. Keep Tasks Small
|
|
@@ -4,16 +4,26 @@
|
|
|
4
4
|
|
|
5
5
|
## 前提条件
|
|
6
6
|
|
|
7
|
-
- 至少安装一个 AI 编程工具(Claude Code、Codex CLI、Gemini CLI 或
|
|
7
|
+
- 至少安装一个 AI 编程工具(Claude Code、Codex CLI、Gemini CLI 或 OpenCode)
|
|
8
8
|
- 项目已设置 `.agents/` 目录(本项目已就绪)
|
|
9
9
|
- 熟悉你的项目代码库
|
|
10
10
|
|
|
11
|
+
## Git Hook 配置
|
|
12
|
+
|
|
13
|
+
在依赖模板中的 Git hook 链路前,先启用共享 hooks 路径:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git config core.hooksPath .github/hooks
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
这样 Git 才会调用同步到 `.github/hooks/` 下的 hook,包括 `pre-commit` 和 `check-version-format.sh`。
|
|
20
|
+
|
|
11
21
|
## 创建第一个任务
|
|
12
22
|
|
|
13
23
|
1. 将任务模板复制到活跃工作区:
|
|
14
24
|
|
|
15
25
|
```bash
|
|
16
|
-
cp .agents/templates/task.
|
|
26
|
+
cp .agents/templates/task.md .agents/workspace/active/task-001.md
|
|
17
27
|
```
|
|
18
28
|
|
|
19
29
|
2. 填写任务元数据:
|
|
@@ -22,7 +32,7 @@ cp .agents/templates/task.zh-CN.md .agents/workspace/active/task-001.md
|
|
|
22
32
|
id: task-001
|
|
23
33
|
type: feature # feature | bugfix | refactor | docs | review
|
|
24
34
|
status: open # open | in-progress | review | blocked | completed
|
|
25
|
-
assigned_to: claude # claude | codex | gemini |
|
|
35
|
+
assigned_to: claude # claude | codex | gemini | opencode | human
|
|
26
36
|
```
|
|
27
37
|
|
|
28
38
|
3. 在文档正文中描述任务。
|
|
@@ -53,7 +63,7 @@ gemini
|
|
|
53
63
|
# 创建技术设计方案。定义接口并概述实现思路。"
|
|
54
64
|
```
|
|
55
65
|
|
|
56
|
-
### 阶段 3:实现(推荐:Codex CLI 或
|
|
66
|
+
### 阶段 3:实现(推荐:Codex CLI 或 OpenCode)
|
|
57
67
|
|
|
58
68
|
```bash
|
|
59
69
|
# 切换到 Codex CLI 进行实现
|
|
@@ -81,16 +91,16 @@ claude
|
|
|
81
91
|
### 缺陷修复
|
|
82
92
|
|
|
83
93
|
1. **复现和分析**(Claude Code):识别根本原因。
|
|
84
|
-
2. **实现修复**(Codex CLI /
|
|
94
|
+
2. **实现修复**(Codex CLI / OpenCode):编写修复代码和测试。
|
|
85
95
|
3. **审查**(Claude Code):验证修复是否正确和完整。
|
|
86
96
|
4. **提交**:创建包含缺陷修复描述的 PR。
|
|
87
97
|
|
|
88
98
|
```bash
|
|
89
99
|
# 快速缺陷修复工作流
|
|
90
|
-
cp .agents/templates/task.
|
|
100
|
+
cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
|
|
91
101
|
# 编辑任务,然后:
|
|
92
102
|
# 1. 使用 Claude Code 分析
|
|
93
|
-
# 2. 使用 Codex/
|
|
103
|
+
# 2. 使用 Codex/OpenCode 修复
|
|
94
104
|
# 3. 使用 Claude Code 审查
|
|
95
105
|
```
|
|
96
106
|
|
|
@@ -101,7 +111,7 @@ cp .agents/templates/task.zh-CN.md .agents/workspace/active/bugfix-001.md
|
|
|
101
111
|
3. **报告**:从模板生成审查报告。
|
|
102
112
|
|
|
103
113
|
```bash
|
|
104
|
-
cp .agents/templates/review-report.
|
|
114
|
+
cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
|
|
105
115
|
# 使用 Claude Code 填写审查内容
|
|
106
116
|
```
|
|
107
117
|
|
|
@@ -109,12 +119,12 @@ cp .agents/templates/review-report.zh-CN.md .agents/workspace/active/review-pr-4
|
|
|
109
119
|
|
|
110
120
|
1. **分析范围**(Claude Code / Gemini CLI):映射所有受影响区域。
|
|
111
121
|
2. **设计**(Claude Code):规划重构方案。
|
|
112
|
-
3. **实现**(Codex CLI /
|
|
122
|
+
3. **实现**(Codex CLI / OpenCode):执行重构。
|
|
113
123
|
4. **验证**(Claude Code):确保没有回归问题,运行测试。
|
|
114
124
|
|
|
115
125
|
```bash
|
|
116
|
-
cp .agents/templates/task.
|
|
117
|
-
# 按照 .agents/workflows/refactoring.
|
|
126
|
+
cp .agents/templates/task.md .agents/workspace/active/refactor-001.md
|
|
127
|
+
# 按照 .agents/workflows/refactoring.yaml 中的重构工作流执行
|
|
118
128
|
```
|
|
119
129
|
|
|
120
130
|
## 创建交接文档
|
|
@@ -122,7 +132,7 @@ cp .agents/templates/task.zh-CN.md .agents/workspace/active/refactor-001.md
|
|
|
122
132
|
在 AI 工具之间切换时,创建交接文档:
|
|
123
133
|
|
|
124
134
|
```bash
|
|
125
|
-
cp .agents/templates/handoff.
|
|
135
|
+
cp .agents/templates/handoff.md .agents/workspace/active/handoff-task-001-phase2.md
|
|
126
136
|
```
|
|
127
137
|
|
|
128
138
|
填写:
|
|
@@ -146,7 +156,7 @@ cp .agents/templates/handoff.zh-CN.md .agents/workspace/active/handoff-task-001-
|
|
|
146
156
|
### 3. 选择合适的工具
|
|
147
157
|
|
|
148
158
|
- 复杂分析?使用 Claude Code 或 Gemini CLI。
|
|
149
|
-
- 直接的实现工作?使用 Codex CLI 或
|
|
159
|
+
- 直接的实现工作?使用 Codex CLI 或 OpenCode。
|
|
150
160
|
- 大文件审查?使用 Gemini CLI。
|
|
151
161
|
|
|
152
162
|
### 4. 保持任务小而精
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Multi-AI Collaboration Guide
|
|
2
2
|
|
|
3
|
-
This project supports collaboration across multiple AI coding assistants, including Claude Code, OpenAI Codex CLI, Gemini CLI,
|
|
3
|
+
This project supports collaboration across multiple AI coding assistants, including Claude Code, OpenAI Codex CLI, Gemini CLI, OpenCode, and others.
|
|
4
4
|
|
|
5
5
|
## Dual-Config Architecture
|
|
6
6
|
|
|
@@ -8,10 +8,10 @@ Different AI tools read configuration from different locations:
|
|
|
8
8
|
|
|
9
9
|
| AI Tool | Primary Config | Fallback |
|
|
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
|
| Other AI Tools | `AGENTS.md` | Project README |
|
|
16
16
|
|
|
17
17
|
- **Claude Code** uses its dedicated `.claude/` directory for project instructions, slash commands, and settings.
|
|
@@ -23,10 +23,8 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
23
23
|
|
|
24
24
|
```
|
|
25
25
|
.agents/ # AI collaboration config (version-controlled)
|
|
26
|
-
README.md #
|
|
27
|
-
README.zh-CN.md # Chinese version
|
|
26
|
+
README.md # Collaboration guide
|
|
28
27
|
QUICKSTART.md # Quick start guide
|
|
29
|
-
QUICKSTART.zh-CN.md # Quick start guide (Chinese)
|
|
30
28
|
templates/ # Task and document templates
|
|
31
29
|
task.md # Task template
|
|
32
30
|
handoff.md # AI-to-AI handoff template
|
|
@@ -36,28 +34,28 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
36
34
|
bug-fix.yaml # Bug fix workflow
|
|
37
35
|
code-review.yaml # Code review workflow
|
|
38
36
|
refactoring.yaml # Refactoring workflow
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
logs/ # Collaboration logs
|
|
37
|
+
workspace/ # Runtime workspace (git-ignored)
|
|
38
|
+
active/ # Currently active tasks
|
|
39
|
+
blocked/ # Blocked tasks
|
|
40
|
+
completed/ # Completed tasks
|
|
41
|
+
logs/ # Collaboration logs
|
|
45
42
|
|
|
46
43
|
.claude/ # Claude Code specific config
|
|
47
44
|
CLAUDE.md # Project instructions for Claude
|
|
48
45
|
commands/ # Slash commands
|
|
49
|
-
settings
|
|
46
|
+
settings.json # Claude settings
|
|
50
47
|
```
|
|
51
48
|
|
|
52
49
|
## Collaboration Model
|
|
53
50
|
|
|
54
51
|
The multi-AI collaboration follows a structured workflow:
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
1. Analysis
|
|
54
|
+
2. Design
|
|
55
|
+
3. Implementation
|
|
56
|
+
4. Review
|
|
57
|
+
5. Fix Issues
|
|
58
|
+
6. Commit
|
|
61
59
|
|
|
62
60
|
### Phase Details
|
|
63
61
|
|
|
@@ -76,21 +74,21 @@ When one AI completes a phase, it produces a **handoff document** (see `.agents/
|
|
|
76
74
|
|
|
77
75
|
Each AI tool has different strengths. Use them accordingly:
|
|
78
76
|
|
|
79
|
-
| Capability | Claude Code | Codex CLI | Gemini CLI |
|
|
80
|
-
|
|
77
|
+
| Capability | Claude Code | Codex CLI | Gemini CLI | OpenCode |
|
|
78
|
+
|-----------|-------------|-----------|------------|----------|
|
|
81
79
|
| Codebase analysis | Excellent | Good | Excellent | Good |
|
|
82
|
-
| Code review | Excellent | Good | Good |
|
|
80
|
+
| Code review | Excellent | Good | Good | Good |
|
|
83
81
|
| Implementation | Good | Excellent | Good | Excellent |
|
|
84
|
-
| Large context | Good | Fair | Excellent |
|
|
85
|
-
| Refactoring | Good | Good | Good |
|
|
86
|
-
| Documentation | Excellent | Good | Good |
|
|
82
|
+
| Large context | Good | Fair | Excellent | Fair |
|
|
83
|
+
| Refactoring | Good | Good | Good | Good |
|
|
84
|
+
| Documentation | Excellent | Good | Good | Good |
|
|
87
85
|
|
|
88
86
|
### Recommended Assignments
|
|
89
87
|
|
|
90
88
|
- **Analysis & Review** - Claude Code (strong reasoning, thorough exploration)
|
|
91
|
-
- **Implementation** - Codex CLI or
|
|
89
|
+
- **Implementation** - Codex CLI or OpenCode (fast code generation, command-driven editing)
|
|
92
90
|
- **Large Context Tasks** - Gemini CLI (large context window for cross-file analysis)
|
|
93
|
-
- **
|
|
91
|
+
- **Command-Driven Iteration** - OpenCode (workflow-friendly TUI execution)
|
|
94
92
|
|
|
95
93
|
## Quick Start
|
|
96
94
|
|
|
@@ -118,10 +116,18 @@ When writing or updating `.agents/skills/*/SKILL.md` files and their templates,
|
|
|
118
116
|
|
|
119
117
|
1. Use consecutive integers for top-level steps: `1.`, `2.`, `3.`.
|
|
120
118
|
2. Use nested numbering only for child actions that belong to a parent step: `1.1`, `1.2`, `2.1`.
|
|
121
|
-
3. Use `a`, `b`, and `c` markers for branches, conditions, or alternative paths within the same step.
|
|
119
|
+
3. Use `a`, `b`, and `c` markers for branches, conditions, or alternative paths within the same step; keep them scoped to child options rather than standalone decision tracks or output templates.
|
|
122
120
|
4. Do not use intermediate numbers such as `1.5` or `2.5`; if a new standalone step is needed, renumber the following top-level steps.
|
|
123
121
|
5. When renumbering, update every in-document step reference so the instructions remain accurate.
|
|
124
122
|
6. Extract long bash scripts into a sibling `scripts/` directory; the SKILL.md should contain only a single-line invocation (e.g., `bash .agents/skills/<skill>/scripts/<script>.sh`) and a brief summary of the script's responsibilities.
|
|
123
|
+
7. In SKILL.md files and their `reference/` templates, use “Scenario” naming for standalone condition branches, decision paths, or output templates (for example, “Scenario A”).
|
|
124
|
+
|
|
125
|
+
### SKILL.md Size Control
|
|
126
|
+
|
|
127
|
+
- Keep the SKILL.md body within about 500 tokens (roughly 80 lines / 2KB).
|
|
128
|
+
- Move content beyond that threshold into a sibling `reference/` directory.
|
|
129
|
+
- Use explicit navigation in the skeleton, such as: `Read reference/xxx.md before executing this step.`
|
|
130
|
+
- Keep scripts in `scripts/` and execute them instead of inlining long bash blocks.
|
|
125
131
|
|
|
126
132
|
## FAQ
|
|
127
133
|
|