@fitlab-ai/agent-infra 0.3.2 → 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 +18 -35
- package/README.zh-CN.md +18 -35
- package/lib/defaults.json +5 -12
- package/lib/init.js +9 -25
- package/lib/paths.js +3 -42
- package/lib/update.js +43 -32
- package/package.json +2 -1
- package/templates/.agents/QUICKSTART.md +17 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +17 -7
- package/templates/.agents/README.md +21 -14
- package/templates/.agents/README.zh-CN.md +21 -14
- package/templates/.agents/skills/analyze-task/SKILL.md +7 -10
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +7 -9
- package/templates/.agents/skills/block-task/SKILL.md +9 -13
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +9 -12
- package/templates/.agents/skills/check-task/SKILL.md +4 -8
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +4 -6
- 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 +8 -13
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +8 -11
- 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 +5 -8
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -7
- package/templates/.agents/skills/implement-task/SKILL.md +48 -178
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +44 -172
- 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 +2 -5
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/import-dependabot/SKILL.md +4 -7
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +4 -6
- package/templates/.agents/skills/import-issue/SKILL.md +6 -8
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +6 -8
- 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 +7 -11
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +7 -9
- 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 +58 -19
- package/templates/.agents/skills/release/SKILL.zh-CN.md +58 -18
- 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 +32 -490
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +33 -490
- 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 +7 -11
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +7 -9
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +59 -118
- package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
- package/templates/.agents/templates/handoff.md +1 -1
- package/templates/.agents/templates/handoff.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.yaml +71 -71
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.yaml +71 -71
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/refactoring.yaml +76 -76
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
- package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
- package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
- package/templates/.claude/CLAUDE.md +14 -52
- package/templates/.claude/CLAUDE.zh-CN.md +14 -52
- 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/.claude/hooks/check-version-format.sh +44 -0
- package/templates/.claude/settings.json +14 -0
- 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/COMMAND_STYLE_GUIDE.md +6 -6
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
- 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 +11 -3
- package/templates/AGENTS.zh-CN.md +11 -3
- package/templates/.editorconfig +0 -15
- package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
- package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
- package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
- package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
- package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
- package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
- package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
- package/templates/.github/dependabot.yml +0 -17
- package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
- package/templates/.github/release.yml +0 -27
- package/templates/.github/workflows/pr-title-check.yml +0 -42
- package/templates/.mailmap +0 -4
- package/templates/CONTRIBUTING.md +0 -126
- package/templates/CONTRIBUTING.zh-CN.md +0 -124
- package/templates/SECURITY.md +0 -131
- package/templates/SECURITY.zh-CN.md +0 -131
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: update-agent-infra
|
|
3
|
-
description:
|
|
4
|
-
Update the current project's AI collaboration infrastructure
|
|
5
|
-
and project governance to match the latest agent-infra
|
|
6
|
-
templates. Intelligently merges template changes while
|
|
7
|
-
preserving project-specific customizations.
|
|
3
|
+
description: "Update the project AI collaboration configuration"
|
|
8
4
|
---
|
|
9
5
|
|
|
10
6
|
# Update Project
|
|
@@ -28,12 +24,12 @@ Execute the following command to handle all deterministic steps at once:
|
|
|
28
24
|
node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
29
25
|
```
|
|
30
26
|
|
|
31
|
-
The script reads `.airc.json
|
|
32
|
-
-
|
|
33
|
-
- File registry sync (`defaults.json` → `.airc.json`)
|
|
27
|
+
The script reads `.agents/.airc.json`, automatically locates the installed `@fitlab-ai/agent-infra/templates/` directory via npm, and performs:
|
|
28
|
+
- detect the template source version
|
|
29
|
+
- File registry sync (`defaults.json` → `.agents/.airc.json`)
|
|
34
30
|
- All managed files (language selection → exclude merged/ejected → placeholder rendering → overwrite)
|
|
35
31
|
- Ejected files (create only on first install)
|
|
36
|
-
- `.airc.json` update (`templateVersion`, file lists)
|
|
32
|
+
- `.agents/.airc.json` update (`templateVersion`, file lists)
|
|
37
33
|
|
|
38
34
|
The script outputs JSON to stdout. Parse and record the report.
|
|
39
35
|
|
|
@@ -46,14 +42,14 @@ The script outputs JSON to stdout. Parse and record the report.
|
|
|
46
42
|
- Each item has `target` (project-relative path) and `template` (template-root-relative path)
|
|
47
43
|
- `registryAdded`: newly added file registry entries
|
|
48
44
|
- `selfUpdate`: whether this is a self-update scenario
|
|
49
|
-
- `configUpdated`: whether `.airc.json` was updated
|
|
45
|
+
- `configUpdated`: whether `.agents/.airc.json` was updated
|
|
50
46
|
|
|
51
47
|
## Phase B: Process merged files (AI intelligent merge)
|
|
52
48
|
|
|
53
49
|
Process each item in the report's `merged.pending` list:
|
|
54
50
|
|
|
55
51
|
1. Read the template file from `<templateRoot>/<template>`
|
|
56
|
-
2. Render placeholders: replace double-brace `project` and `org` placeholders with actual values from .airc.json
|
|
52
|
+
2. Render placeholders: replace double-brace `project` and `org` placeholders with actual values from .agents/.airc.json
|
|
57
53
|
3. Read the current local file (`<project-root>/<target>`)
|
|
58
54
|
|
|
59
55
|
**If the local file does not exist** (first-time setup), write the rendered
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: update-agent-infra
|
|
3
|
-
description:
|
|
4
|
-
更新当前项目的 AI 协作基础设施和项目治理配置,使其与最新的 agent-infra 模板保持一致。
|
|
5
|
-
智能合并模板变更,同时保留项目特定的定制内容。
|
|
3
|
+
description: "更新项目 AI 协作配置"
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# 更新项目
|
|
@@ -24,12 +22,12 @@ description: >
|
|
|
24
22
|
node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
脚本读取 `.airc.json
|
|
28
|
-
-
|
|
29
|
-
- 同步文件注册表(`defaults.json` → `.airc.json`)
|
|
25
|
+
脚本读取 `.agents/.airc.json`,并通过 npm 自动定位已安装的 `@fitlab-ai/agent-infra/templates/` 目录,然后自动完成:
|
|
26
|
+
- 检测模板源版本
|
|
27
|
+
- 同步文件注册表(`defaults.json` → `.agents/.airc.json`)
|
|
30
28
|
- 处理所有 managed 文件(语言选择 → 排除 merged/ejected → 占位符渲染 → 覆盖写入)
|
|
31
29
|
- 处理 ejected 文件(仅首次安装时创建)
|
|
32
|
-
- 更新 `.airc.json`(`templateVersion`、文件列表)
|
|
30
|
+
- 更新 `.agents/.airc.json`(`templateVersion`、文件列表)
|
|
33
31
|
|
|
34
32
|
脚本输出 JSON 到 stdout,解析并记录报告内容。
|
|
35
33
|
|
|
@@ -42,14 +40,14 @@ node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
|
42
40
|
- 每项包含 `target`(项目中的目标路径)和 `template`(模板根目录下的相对路径)
|
|
43
41
|
- `registryAdded`:新增的文件注册条目
|
|
44
42
|
- `selfUpdate`:是否为自更新模式
|
|
45
|
-
- `configUpdated`:`.airc.json` 是否已更新
|
|
43
|
+
- `configUpdated`:`.agents/.airc.json` 是否已更新
|
|
46
44
|
|
|
47
45
|
## 阶段 B:处理 merged 文件(AI 智能合并)
|
|
48
46
|
|
|
49
47
|
根据报告中 `merged.pending` 列表,逐个文件处理。对于每个条目:
|
|
50
48
|
|
|
51
49
|
1. 从 `<templateRoot>/<template>` 读取模板文件
|
|
52
|
-
2. 渲染占位符:将双花括号包裹的 `project` 和 `org` 占位符替换为 .airc.json 中的实际值
|
|
50
|
+
2. 渲染占位符:将双花括号包裹的 `project` 和 `org` 占位符替换为 .agents/.airc.json 中的实际值
|
|
53
51
|
3. 读取本地当前文件(`<项目根>/<target>`)
|
|
54
52
|
|
|
55
53
|
**如果本地文件不存在**(首次安装),直接写入渲染后的模板,跳过合并。
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* sync-templates.js — Deterministic template sync for managed & ejected files.
|
|
4
4
|
*
|
|
5
|
-
* Handles SKILL steps: 2 (
|
|
6
|
-
* 6 (ejected), 7 (.airc.json update).
|
|
5
|
+
* Handles SKILL steps: 2 (detect template source version), 3.0 (registry sync), 4 (managed),
|
|
6
|
+
* 6 (ejected), 7 (.agents/.airc.json update).
|
|
7
7
|
*
|
|
8
8
|
* Merged files (step 5) are NOT handled — they require AI semantic merge.
|
|
9
9
|
* The report includes `merged.pending` so the AI knows what to process.
|
|
@@ -16,39 +16,20 @@
|
|
|
16
16
|
|
|
17
17
|
import childProcess from 'node:child_process';
|
|
18
18
|
import fs from 'node:fs';
|
|
19
|
-
import os from 'node:os';
|
|
20
19
|
import path from 'node:path';
|
|
21
20
|
import { fileURLToPath } from 'node:url';
|
|
22
21
|
|
|
23
|
-
// Keep these helpers aligned with lib/paths.js for clone installs.
|
|
24
|
-
function resolveInstallDir() {
|
|
25
|
-
return path.join(os.homedir(), '.agent-infra');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function resolveTemplateDir() {
|
|
29
|
-
const clonePath = path.join(resolveInstallDir(), 'templates');
|
|
30
|
-
if (fs.existsSync(clonePath)) {
|
|
31
|
-
return clonePath;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
22
|
const DEFAULTS = {
|
|
38
23
|
"files": {
|
|
39
24
|
"managed": [
|
|
40
25
|
".agents/skills/",
|
|
41
26
|
".agents/templates/",
|
|
42
27
|
".agents/workflows/",
|
|
43
|
-
".
|
|
28
|
+
".agents/workspace/README.md",
|
|
44
29
|
".claude/commands/",
|
|
45
|
-
".
|
|
30
|
+
".claude/hooks/",
|
|
46
31
|
".gemini/commands/",
|
|
47
|
-
".github/hooks/",
|
|
48
|
-
".github/ISSUE_TEMPLATE/",
|
|
49
|
-
".github/PULL_REQUEST_TEMPLATE.md",
|
|
50
|
-
".github/release.yml",
|
|
51
|
-
".github/workflows/pr-title-check.yml",
|
|
32
|
+
".github/hooks/check-version-format.sh",
|
|
52
33
|
".opencode/commands/"
|
|
53
34
|
],
|
|
54
35
|
"merged": [
|
|
@@ -67,20 +48,17 @@ const DEFAULTS = {
|
|
|
67
48
|
".claude/settings.json",
|
|
68
49
|
".codex/README.md",
|
|
69
50
|
".gemini/settings.json",
|
|
70
|
-
".github/
|
|
51
|
+
".github/hooks/pre-commit",
|
|
71
52
|
".gitignore",
|
|
72
|
-
".mailmap",
|
|
73
53
|
".opencode/COMMAND_STYLE_GUIDE.md",
|
|
74
54
|
".opencode/README.md",
|
|
75
|
-
"AGENTS.md"
|
|
76
|
-
"CONTRIBUTING.md",
|
|
77
|
-
"SECURITY.md"
|
|
55
|
+
"AGENTS.md"
|
|
78
56
|
],
|
|
79
57
|
"ejected": []
|
|
80
58
|
}
|
|
81
59
|
};
|
|
82
60
|
|
|
83
|
-
const INSTALLER_VERSION = "v0.
|
|
61
|
+
const INSTALLER_VERSION = "v0.4.1";
|
|
84
62
|
|
|
85
63
|
function norm(p) { return p.replace(/\\/g, '/'); }
|
|
86
64
|
|
|
@@ -138,32 +116,42 @@ function renderPathname(p, project) {
|
|
|
138
116
|
return p.replace(/_project_/g, project);
|
|
139
117
|
}
|
|
140
118
|
|
|
141
|
-
function
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
if (path.isAbsolute(templateSource)) {
|
|
147
|
-
candidates.push(templateSource);
|
|
148
|
-
} else {
|
|
149
|
-
if (fallbackRoot) {
|
|
150
|
-
candidates.push(path.resolve(path.dirname(fallbackRoot), templateSource));
|
|
151
|
-
}
|
|
152
|
-
candidates.push(path.resolve(projectRoot, templateSource));
|
|
153
|
-
}
|
|
119
|
+
function isTemplateDir(dir) {
|
|
120
|
+
try {
|
|
121
|
+
return fs.statSync(dir).isDirectory();
|
|
122
|
+
} catch {
|
|
123
|
+
return false;
|
|
154
124
|
}
|
|
155
|
-
|
|
156
|
-
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function resolveInstalledTemplateDir(nodeModulesRoot) {
|
|
128
|
+
if (!nodeModulesRoot) return null;
|
|
129
|
+
const candidate = path.join(nodeModulesRoot, '@fitlab-ai', 'agent-infra', 'templates');
|
|
130
|
+
return isTemplateDir(candidate) ? candidate : null;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function resolveTemplateRoot(projectRoot) {
|
|
134
|
+
try {
|
|
135
|
+
const globalRoot = childProcess.execSync('npm root -g', {
|
|
136
|
+
encoding: 'utf8',
|
|
137
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
138
|
+
}).trim();
|
|
139
|
+
const globalTemplateRoot = resolveInstalledTemplateDir(globalRoot);
|
|
140
|
+
if (globalTemplateRoot) return globalTemplateRoot;
|
|
141
|
+
} catch {
|
|
142
|
+
// npm may be unavailable or not configured.
|
|
157
143
|
}
|
|
158
144
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
145
|
+
try {
|
|
146
|
+
const localRoot = childProcess.execSync('npm root', {
|
|
147
|
+
cwd: projectRoot,
|
|
148
|
+
encoding: 'utf8',
|
|
149
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
150
|
+
}).trim();
|
|
151
|
+
const localTemplateRoot = resolveInstalledTemplateDir(localRoot);
|
|
152
|
+
if (localTemplateRoot) return localTemplateRoot;
|
|
153
|
+
} catch {
|
|
154
|
+
// npm may be unavailable or the project may not have a local install.
|
|
167
155
|
}
|
|
168
156
|
|
|
169
157
|
return null;
|
|
@@ -179,15 +167,6 @@ function isBinary(fp) {
|
|
|
179
167
|
return false;
|
|
180
168
|
}
|
|
181
169
|
|
|
182
|
-
function fileModule(rel) {
|
|
183
|
-
const p = norm(rel);
|
|
184
|
-
if (p.startsWith('.github/')) return 'github';
|
|
185
|
-
if (p.startsWith('.agents/') || p.startsWith('.claude/') ||
|
|
186
|
-
p.startsWith('.gemini/') || p.startsWith('.opencode/') ||
|
|
187
|
-
p.startsWith('.codex/') || p === 'AGENTS.md') return 'ai';
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
170
|
function gitUrl(dir) {
|
|
192
171
|
try {
|
|
193
172
|
return childProcess.execSync('git remote get-url origin', {
|
|
@@ -196,9 +175,6 @@ function gitUrl(dir) {
|
|
|
196
175
|
} catch { return null; }
|
|
197
176
|
}
|
|
198
177
|
|
|
199
|
-
// Public-facing docs should keep all available language variants in sync.
|
|
200
|
-
const MULTI_LANG = new Set(['SECURITY.md']);
|
|
201
|
-
|
|
202
178
|
function langSelect(rels, lang, allSet, project) {
|
|
203
179
|
const sel = new Map();
|
|
204
180
|
|
|
@@ -226,45 +202,24 @@ function langSelect(rels, lang, allSet, project) {
|
|
|
226
202
|
return sel;
|
|
227
203
|
}
|
|
228
204
|
|
|
229
|
-
function syncTemplates(projectRoot) {
|
|
230
|
-
const
|
|
205
|
+
function syncTemplates(projectRoot, templateRootOverride) {
|
|
206
|
+
const configDir = path.join(projectRoot, '.agents');
|
|
207
|
+
const cfgPath = path.join(configDir, '.airc.json');
|
|
208
|
+
|
|
231
209
|
if (!fs.existsSync(cfgPath)) {
|
|
232
|
-
return { error: 'No .airc.json in project root.' };
|
|
210
|
+
return { error: 'No .agents/.airc.json in project root.' };
|
|
233
211
|
}
|
|
234
212
|
|
|
235
213
|
const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
236
|
-
const
|
|
214
|
+
const configPathRel = norm(path.relative(projectRoot, cfgPath));
|
|
215
|
+
const templateRoot = templateRootOverride || resolveTemplateRoot(projectRoot);
|
|
237
216
|
if (!templateRoot) {
|
|
238
|
-
return { error: 'Template source not found. Install:
|
|
217
|
+
return { error: 'Template source not found. Install via npm: npm install -g @fitlab-ai/agent-infra' };
|
|
239
218
|
}
|
|
240
|
-
const
|
|
219
|
+
const version = INSTALLER_VERSION;
|
|
220
|
+
const hadTemplateSource = Object.prototype.hasOwnProperty.call(cfg, 'templateSource');
|
|
241
221
|
|
|
242
|
-
const
|
|
243
|
-
if (hasGit) {
|
|
244
|
-
try { childProcess.execSync('git fetch --tags --quiet', { cwd: installDir, stdio: 'pipe' }); } catch { /* network */ }
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
let version = 'unknown';
|
|
248
|
-
if (hasGit) {
|
|
249
|
-
let tagOutput;
|
|
250
|
-
try {
|
|
251
|
-
tagOutput = childProcess.execSync('git tag --sort=-v:refname', {
|
|
252
|
-
cwd: installDir, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe']
|
|
253
|
-
}).trim();
|
|
254
|
-
} catch {
|
|
255
|
-
return { error: 'Failed to list tags in agent-infra repository. Please check git installation.' };
|
|
256
|
-
}
|
|
257
|
-
const latestTag = tagOutput.split('\n')[0];
|
|
258
|
-
if (!latestTag) {
|
|
259
|
-
return { error: 'No tags found in agent-infra repository. This is unexpected — please reinstall.' };
|
|
260
|
-
}
|
|
261
|
-
try { childProcess.execFileSync('git', ['checkout', latestTag, '--quiet'], { cwd: installDir, stdio: 'pipe' }); } catch { /* ignore */ }
|
|
262
|
-
version = latestTag;
|
|
263
|
-
} else {
|
|
264
|
-
version = INSTALLER_VERSION || version;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
const { project, org, language: lang = 'en', modules = [] } = cfg;
|
|
222
|
+
const { project, org, language: lang = 'en' } = cfg;
|
|
268
223
|
const vars = { project, org };
|
|
269
224
|
|
|
270
225
|
const managed = [...(cfg.files.managed || [])];
|
|
@@ -275,7 +230,7 @@ function syncTemplates(projectRoot) {
|
|
|
275
230
|
templateVersion: version,
|
|
276
231
|
templateRoot: norm(templateRoot),
|
|
277
232
|
registryAdded: [],
|
|
278
|
-
managed: { written: [], created: [], unchanged: [], skippedMerged: [],
|
|
233
|
+
managed: { written: [], created: [], unchanged: [], skippedMerged: [], removed: [] },
|
|
279
234
|
ejected: { created: [], skipped: [] },
|
|
280
235
|
merged: { pending: [] },
|
|
281
236
|
configUpdated: false,
|
|
@@ -292,8 +247,6 @@ function syncTemplates(projectRoot) {
|
|
|
292
247
|
|
|
293
248
|
const allRels = walkDir(templateRoot).map(f => norm(path.relative(templateRoot, f)));
|
|
294
249
|
const allSet = new Set(allRels);
|
|
295
|
-
const modSet = new Set(modules);
|
|
296
|
-
|
|
297
250
|
for (const entry of managed) {
|
|
298
251
|
const isDir = entry.endsWith('/');
|
|
299
252
|
let entryRels;
|
|
@@ -313,19 +266,11 @@ function syncTemplates(projectRoot) {
|
|
|
313
266
|
if (!entryRels.length) continue;
|
|
314
267
|
}
|
|
315
268
|
|
|
316
|
-
const selected =
|
|
317
|
-
? entryRels.map(r => [norm(renderPathname(r, project)), r])
|
|
318
|
-
: langSelect(entryRels, lang, allSet, project);
|
|
269
|
+
const selected = langSelect(entryRels, lang, allSet, project);
|
|
319
270
|
|
|
320
271
|
for (const [tgt, src] of selected) {
|
|
321
272
|
if (expectedTargets) expectedTargets.add(tgt);
|
|
322
273
|
|
|
323
|
-
const mod = fileModule(tgt);
|
|
324
|
-
if (mod !== null && !modSet.has(mod)) {
|
|
325
|
-
report.managed.skippedModule.push(tgt);
|
|
326
|
-
continue;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
274
|
if (matchesAny(tgt, merged) || matchesAny(tgt, ejected)) {
|
|
330
275
|
report.managed.skippedMerged.push(tgt);
|
|
331
276
|
continue;
|
|
@@ -364,11 +309,9 @@ function syncTemplates(projectRoot) {
|
|
|
364
309
|
const projFiles = walkDir(projDir).map(f => norm(path.relative(projectRoot, f)));
|
|
365
310
|
for (const projFile of projFiles) {
|
|
366
311
|
if (expectedTargets.has(projFile)) continue;
|
|
312
|
+
if (projFile === configPathRel) continue;
|
|
367
313
|
if (matchesAny(projFile, merged) || matchesAny(projFile, ejected)) continue;
|
|
368
314
|
|
|
369
|
-
const mod = fileModule(projFile);
|
|
370
|
-
if (mod !== null && !modSet.has(mod)) continue;
|
|
371
|
-
|
|
372
315
|
fs.unlinkSync(path.join(projectRoot, projFile));
|
|
373
316
|
report.managed.removed.push(projFile);
|
|
374
317
|
}
|
|
@@ -420,9 +363,7 @@ function syncTemplates(projectRoot) {
|
|
|
420
363
|
const ext = path.extname(entry), base = entry.slice(0, -ext.length);
|
|
421
364
|
const zh = norm(base + '.zh-CN' + ext);
|
|
422
365
|
if (allSet.has(zh)) rels.push(zh);
|
|
423
|
-
const selected =
|
|
424
|
-
? rels.map(r => [norm(renderPathname(r, project)), r])
|
|
425
|
-
: langSelect(rels, lang, allSet, project);
|
|
366
|
+
const selected = langSelect(rels, lang, allSet, project);
|
|
426
367
|
for (const [t, s] of selected) {
|
|
427
368
|
if (!mergedMap.has(t)) mergedMap.set(t, s);
|
|
428
369
|
}
|
|
@@ -433,8 +374,7 @@ function syncTemplates(projectRoot) {
|
|
|
433
374
|
);
|
|
434
375
|
|
|
435
376
|
const projUrl = gitUrl(projectRoot);
|
|
436
|
-
|
|
437
|
-
report.selfUpdate = !!(projUrl && instUrl && projUrl === instUrl);
|
|
377
|
+
report.selfUpdate = !!(projUrl && /fitlab-ai\/agent-infra/.test(projUrl));
|
|
438
378
|
|
|
439
379
|
const hasChanges = (
|
|
440
380
|
report.managed.written.length +
|
|
@@ -450,8 +390,9 @@ function syncTemplates(projectRoot) {
|
|
|
450
390
|
cfg.files.merged = merged;
|
|
451
391
|
cfg.files.ejected = ejected;
|
|
452
392
|
cfg.templateVersion = version;
|
|
393
|
+
delete cfg.templateSource;
|
|
453
394
|
|
|
454
|
-
report.configUpdated = hasChanges || prevVersion !== version;
|
|
395
|
+
report.configUpdated = hasChanges || prevVersion !== version || hadTemplateSource;
|
|
455
396
|
|
|
456
397
|
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n', 'utf8');
|
|
457
398
|
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: upgrade-dependency
|
|
3
|
-
description:
|
|
4
|
-
Upgrade a specified dependency package to a new version and verify
|
|
5
|
-
the change. Triggered when the user requests dependency upgrade.
|
|
6
|
-
Arguments: package name, old version, new version.
|
|
3
|
+
description: "Upgrade a dependency and validate the change"
|
|
7
4
|
---
|
|
8
5
|
|
|
9
6
|
# Upgrade Dependency
|
|
@@ -1,149 +1,149 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
1
|
+
# Bug Fix Workflow
|
|
2
|
+
# Use this workflow when fixing a bug.
|
|
3
3
|
|
|
4
4
|
name: bug-fix
|
|
5
|
-
description:
|
|
5
|
+
description: Workflow for diagnosing and fixing a bug.
|
|
6
6
|
|
|
7
7
|
steps:
|
|
8
8
|
- name: analysis
|
|
9
|
-
description:
|
|
9
|
+
description: Reproduce the bug, identify the root cause, and determine the scope of the fix.
|
|
10
10
|
recommended_agents:
|
|
11
11
|
- claude
|
|
12
12
|
- gemini
|
|
13
13
|
tasks:
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
14
|
+
- Understand the bug report and expected behavior
|
|
15
|
+
- Reproduce the bug when possible
|
|
16
|
+
- Trace the code path to identify the root cause
|
|
17
|
+
- Determine impacted files and components
|
|
18
|
+
- Record findings in the task file
|
|
19
19
|
inputs:
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
20
|
+
- Bug report or issue description
|
|
21
|
+
- Reproduction steps
|
|
22
|
+
- Project codebase
|
|
23
23
|
artifact_versioning:
|
|
24
24
|
outputs:
|
|
25
25
|
- name: analysis
|
|
26
26
|
pattern: "analysis.md | analysis-r{N}.md"
|
|
27
|
-
rule: "
|
|
27
|
+
rule: "Scan existing analysis artifacts; create analysis.md for the first round, then analysis-r{N}.md for later revisions (N = current highest round + 1)"
|
|
28
28
|
outputs:
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
29
|
+
- Root cause analysis
|
|
30
|
+
- List of impacted files
|
|
31
|
+
- Updated task file (analysis section)
|
|
32
32
|
|
|
33
33
|
- name: design
|
|
34
|
-
description:
|
|
34
|
+
description: Plan the fix and consider edge cases.
|
|
35
35
|
recommended_agents:
|
|
36
36
|
- claude
|
|
37
37
|
tasks:
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
38
|
+
- Determine the best approach for fixing the bug
|
|
39
|
+
- Identify potential side effects of the fix
|
|
40
|
+
- Plan test cases to validate the fix
|
|
41
|
+
- Record the fix plan in the task file
|
|
42
42
|
inputs:
|
|
43
|
-
-
|
|
44
|
-
-
|
|
43
|
+
- Root cause analysis from the previous step
|
|
44
|
+
- Project architecture
|
|
45
45
|
artifact_versioning:
|
|
46
46
|
inputs:
|
|
47
47
|
- name: analysis
|
|
48
48
|
pattern: "analysis.md | analysis-r{N}.md"
|
|
49
|
-
rule: "
|
|
49
|
+
rule: "Read the highest-round analysis artifact as design input"
|
|
50
50
|
outputs:
|
|
51
51
|
- name: plan
|
|
52
52
|
pattern: "plan.md | plan-r{N}.md"
|
|
53
|
-
rule: "
|
|
53
|
+
rule: "Scan existing plan artifacts; create plan.md for the first round, then plan-r{N}.md for later revisions (N = current highest round + 1)"
|
|
54
54
|
outputs:
|
|
55
|
-
-
|
|
56
|
-
-
|
|
55
|
+
- Fix plan recorded in the task file
|
|
56
|
+
- List of test cases to add
|
|
57
57
|
|
|
58
58
|
- name: implementation
|
|
59
|
-
description:
|
|
59
|
+
description: Implement the bug fix and add regression tests.
|
|
60
60
|
recommended_agents:
|
|
61
61
|
- codex
|
|
62
62
|
- cursor
|
|
63
63
|
tasks:
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
64
|
+
- Create a bug-fix branch
|
|
65
|
+
- Implement the fix
|
|
66
|
+
- Add regression tests that would fail without the fix
|
|
67
|
+
- Verify that existing tests still pass
|
|
68
|
+
- Ensure the code follows project conventions
|
|
69
69
|
inputs:
|
|
70
|
-
-
|
|
71
|
-
-
|
|
70
|
+
- Fix plan from the previous step
|
|
71
|
+
- Project coding standards
|
|
72
72
|
artifact_versioning:
|
|
73
73
|
outputs:
|
|
74
74
|
- name: implementation
|
|
75
75
|
pattern: "implementation.md | implementation-r{N}.md"
|
|
76
|
-
rule: "
|
|
76
|
+
rule: "Scan existing implementation artifacts; create implementation.md for the first round, then implementation-r{N}.md for later re-implementations (N = current highest round + 1)"
|
|
77
77
|
outputs:
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
78
|
+
- Bug-fix branch with the implementation
|
|
79
|
+
- Regression test files
|
|
80
|
+
- Updated task file (implementation notes)
|
|
81
81
|
|
|
82
82
|
- name: review
|
|
83
|
-
description:
|
|
83
|
+
description: Verify that the fix is correct and complete.
|
|
84
84
|
recommended_agents:
|
|
85
85
|
- claude
|
|
86
86
|
tasks:
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
87
|
+
- Verify that the fix addresses the root cause
|
|
88
|
+
- Check whether regression tests are sufficient
|
|
89
|
+
- Ensure no new issues were introduced
|
|
90
|
+
- Verify that the fix does not break existing functionality
|
|
91
|
+
- Create a review report
|
|
92
92
|
inputs:
|
|
93
|
-
-
|
|
94
|
-
-
|
|
93
|
+
- Bug-fix branch
|
|
94
|
+
- Root cause analysis
|
|
95
95
|
artifact_versioning:
|
|
96
96
|
inputs:
|
|
97
97
|
- name: implementation
|
|
98
98
|
pattern: "implementation.md | implementation-r{N}.md"
|
|
99
|
-
rule: "
|
|
99
|
+
rule: "Read the highest-round implementation artifact as review input"
|
|
100
100
|
outputs:
|
|
101
101
|
- name: review
|
|
102
102
|
pattern: "review.md | review-r{N}.md"
|
|
103
|
-
rule: "
|
|
103
|
+
rule: "Scan existing review artifacts; create review.md for the first round, then review-r{N}.md for later rounds (N = current highest round + 1)"
|
|
104
104
|
outputs:
|
|
105
|
-
-
|
|
106
|
-
-
|
|
105
|
+
- Review report
|
|
106
|
+
- List of issues if any
|
|
107
107
|
|
|
108
108
|
- name: fix
|
|
109
|
-
description:
|
|
109
|
+
description: Address issues found during review.
|
|
110
110
|
recommended_agents:
|
|
111
111
|
- codex
|
|
112
112
|
- cursor
|
|
113
113
|
tasks:
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
114
|
+
- Fix issues identified in the review
|
|
115
|
+
- Update tests as needed
|
|
116
|
+
- Verify that all tests pass
|
|
117
117
|
inputs:
|
|
118
|
-
-
|
|
119
|
-
-
|
|
118
|
+
- Review report
|
|
119
|
+
- Bug-fix branch
|
|
120
120
|
artifact_versioning:
|
|
121
121
|
inputs:
|
|
122
122
|
- name: review
|
|
123
123
|
pattern: "review.md | review-r{N}.md"
|
|
124
|
-
rule: "
|
|
124
|
+
rule: "Read the highest-round review artifact and verify that it matches the latest Code Review entry in the task.md Activity Log"
|
|
125
125
|
outputs:
|
|
126
126
|
- name: refinement
|
|
127
127
|
pattern: "refinement.md | refinement-r{N}.md"
|
|
128
|
-
rule: "
|
|
128
|
+
rule: "Scan existing refinement artifacts; create refinement.md for the first round, then refinement-r{N}.md for later rounds (N = current highest round + 1)"
|
|
129
129
|
outputs:
|
|
130
|
-
-
|
|
131
|
-
-
|
|
130
|
+
- Updated branch with fixes
|
|
131
|
+
- Updated task file
|
|
132
132
|
|
|
133
133
|
- name: commit
|
|
134
|
-
description:
|
|
134
|
+
description: Finalize the bug fix and create a pull request.
|
|
135
135
|
recommended_agents:
|
|
136
136
|
- claude
|
|
137
137
|
- human
|
|
138
138
|
tasks:
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
-
|
|
139
|
+
- Ensure all tests pass
|
|
140
|
+
- Write a commit message that references the bug or issue
|
|
141
|
+
- Create a pull request with a bug-fix summary
|
|
142
|
+
- Link the PR to the bug report issue
|
|
143
|
+
- Move the task to completed
|
|
144
144
|
inputs:
|
|
145
|
-
-
|
|
146
|
-
-
|
|
145
|
+
- Final bug-fix branch
|
|
146
|
+
- Task file
|
|
147
147
|
outputs:
|
|
148
|
-
-
|
|
149
|
-
-
|
|
148
|
+
- Pull request
|
|
149
|
+
- Completed task file (stored in .agents/workspace/completed/)
|