@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
package/README.md
CHANGED
|
@@ -380,8 +380,7 @@ The generated `.agents/.airc.json` file is the central contract between the boot
|
|
|
380
380
|
"project": "my-project",
|
|
381
381
|
"org": "my-org",
|
|
382
382
|
"language": "en",
|
|
383
|
-
"
|
|
384
|
-
"templateVersion": "v0.4.0",
|
|
383
|
+
"templateVersion": "v0.4.1",
|
|
385
384
|
"files": {
|
|
386
385
|
"managed": [
|
|
387
386
|
".agents/workspace/README.md",
|
|
@@ -409,7 +408,6 @@ The generated `.agents/.airc.json` file is the central contract between the boot
|
|
|
409
408
|
| `project` | Project name used when rendering commands, paths, and templates. |
|
|
410
409
|
| `org` | GitHub organization or owner used by generated metadata and links. |
|
|
411
410
|
| `language` | Primary project language or locale used by rendered templates. |
|
|
412
|
-
| `templateSource` | Local template root used during rendering. |
|
|
413
411
|
| `templateVersion` | Installed template version for future upgrades and drift tracking. |
|
|
414
412
|
| `files` | Per-path update strategy configuration for managed, merged, and ejected files. |
|
|
415
413
|
|
package/README.zh-CN.md
CHANGED
|
@@ -380,8 +380,7 @@ import-issue #42 从 GitHub Issue 导入任务
|
|
|
380
380
|
"project": "my-project",
|
|
381
381
|
"org": "my-org",
|
|
382
382
|
"language": "en",
|
|
383
|
-
"
|
|
384
|
-
"templateVersion": "v0.4.0",
|
|
383
|
+
"templateVersion": "v0.4.1",
|
|
385
384
|
"files": {
|
|
386
385
|
"managed": [
|
|
387
386
|
".agents/workspace/README.md",
|
|
@@ -409,7 +408,6 @@ import-issue #42 从 GitHub Issue 导入任务
|
|
|
409
408
|
| `project` | 用于渲染命令、路径和模板内容的项目名。 |
|
|
410
409
|
| `org` | 生成元数据和链接时使用的 GitHub 组织或拥有者。 |
|
|
411
410
|
| `language` | 渲染模板时采用的项目主语言或区域设置。 |
|
|
412
|
-
| `templateSource` | 本地模板根目录。 |
|
|
413
411
|
| `templateVersion` | 当前安装的模板版本,用于升级和差异追踪。 |
|
|
414
412
|
| `files` | 针对具体路径配置 `managed`、`merged`、`ejected` 三类更新策略。 |
|
|
415
413
|
|
package/lib/defaults.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
".claude/commands/",
|
|
9
9
|
".claude/hooks/",
|
|
10
10
|
".gemini/commands/",
|
|
11
|
+
".github/hooks/check-version-format.sh",
|
|
11
12
|
".opencode/commands/"
|
|
12
13
|
],
|
|
13
14
|
"merged": [
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
".claude/settings.json",
|
|
27
28
|
".codex/README.md",
|
|
28
29
|
".gemini/settings.json",
|
|
30
|
+
".github/hooks/pre-commit",
|
|
29
31
|
".gitignore",
|
|
30
32
|
".opencode/COMMAND_STYLE_GUIDE.md",
|
|
31
33
|
".opencode/README.md",
|
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
|
@@ -8,6 +8,16 @@ This guide walks you through using multiple AI coding assistants together on a p
|
|
|
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:
|
|
@@ -8,6 +8,16 @@
|
|
|
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. 将任务模板复制到活跃工作区:
|
|
@@ -36,12 +36,11 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
36
36
|
bug-fix.yaml # Bug fix workflow
|
|
37
37
|
code-review.yaml # Code review workflow
|
|
38
38
|
refactoring.yaml # Refactoring workflow
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
logs/ # Collaboration logs
|
|
39
|
+
workspace/ # Runtime workspace (git-ignored)
|
|
40
|
+
active/ # Currently active tasks
|
|
41
|
+
blocked/ # Blocked tasks
|
|
42
|
+
completed/ # Completed tasks
|
|
43
|
+
logs/ # Collaboration logs
|
|
45
44
|
|
|
46
45
|
.claude/ # Claude Code specific config
|
|
47
46
|
CLAUDE.md # Project instructions for Claude
|
|
@@ -53,11 +52,12 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
53
52
|
|
|
54
53
|
The multi-AI collaboration follows a structured workflow:
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
1. Analysis
|
|
56
|
+
2. Design
|
|
57
|
+
3. Implementation
|
|
58
|
+
4. Review
|
|
59
|
+
5. Fix Issues
|
|
60
|
+
6. Commit
|
|
61
61
|
|
|
62
62
|
### Phase Details
|
|
63
63
|
|
|
@@ -123,6 +123,13 @@ When writing or updating `.agents/skills/*/SKILL.md` files and their templates,
|
|
|
123
123
|
5. When renumbering, update every in-document step reference so the instructions remain accurate.
|
|
124
124
|
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.
|
|
125
125
|
|
|
126
|
+
### SKILL.md Size Control
|
|
127
|
+
|
|
128
|
+
- Keep the SKILL.md body within about 500 tokens (roughly 80 lines / 2KB).
|
|
129
|
+
- Move content beyond that threshold into a sibling `reference/` directory.
|
|
130
|
+
- Use explicit navigation in the skeleton, such as: `Read reference/xxx.md before executing this step.`
|
|
131
|
+
- Keep scripts in `scripts/` and execute them instead of inlining long bash blocks.
|
|
132
|
+
|
|
126
133
|
## FAQ
|
|
127
134
|
|
|
128
135
|
### Q: Do I need to configure every AI tool separately?
|
|
@@ -36,12 +36,11 @@
|
|
|
36
36
|
bug-fix.yaml # 缺陷修复工作流
|
|
37
37
|
code-review.yaml # 代码审查工作流
|
|
38
38
|
refactoring.yaml # 重构工作流
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
logs/ # 协作日志
|
|
39
|
+
workspace/ # 运行时工作区(已被 git ignore)
|
|
40
|
+
active/ # 当前活跃任务
|
|
41
|
+
blocked/ # 被阻塞的任务
|
|
42
|
+
completed/ # 已完成的任务
|
|
43
|
+
logs/ # 协作日志
|
|
45
44
|
|
|
46
45
|
.claude/ # Claude Code 专属配置
|
|
47
46
|
CLAUDE.md # Claude 项目指令
|
|
@@ -53,11 +52,12 @@
|
|
|
53
52
|
|
|
54
53
|
多 AI 协作遵循结构化工作流:
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
55
|
+
1. 分析
|
|
56
|
+
2. 设计
|
|
57
|
+
3. 实现
|
|
58
|
+
4. 审查
|
|
59
|
+
5. 修复问题
|
|
60
|
+
6. 提交
|
|
61
61
|
|
|
62
62
|
### 阶段详情
|
|
63
63
|
|
|
@@ -123,6 +123,13 @@
|
|
|
123
123
|
5. 调整编号时,必须同步更新文中的步骤引用,确保说明、命令和检查点一致。
|
|
124
124
|
6. 长 bash 脚本应从 SKILL.md 提取到同级 `scripts/` 目录中,SKILL.md 只保留单行调用(如 `bash .agents/skills/<skill>/scripts/<script>.sh`)和对脚本职责的概要说明。
|
|
125
125
|
|
|
126
|
+
### SKILL.md 体积控制
|
|
127
|
+
|
|
128
|
+
- SKILL.md 正文控制在约 500 tokens(约 80 行 / 2KB)以内。
|
|
129
|
+
- 超过阈值的内容拆分到同级 `reference/` 目录。
|
|
130
|
+
- 骨架中使用明确导航,例如:`执行此步骤前,先读取 reference/xxx.md。`
|
|
131
|
+
- 长脚本继续放在 `scripts/` 目录,优先执行脚本而不是内联大段 bash。
|
|
132
|
+
|
|
126
133
|
## 常见问题
|
|
127
134
|
|
|
128
135
|
### Q:我需要单独配置每个 AI 工具吗?
|
|
@@ -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
|