@fitlab-ai/agent-infra 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -15
- package/README.zh-CN.md +23 -15
- package/lib/defaults.json +5 -9
- package/lib/init.js +1 -6
- package/lib/update.js +0 -55
- package/package.json +1 -1
- package/templates/.agents/QUICKSTART.md +17 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +23 -13
- package/templates/.agents/README.md +33 -27
- package/templates/.agents/README.zh-CN.md +35 -29
- package/templates/.agents/skills/analyze-task/SKILL.md +1 -4
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/block-task/SKILL.md +1 -5
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/check-task/SKILL.md +1 -5
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/close-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/commit/SKILL.md +26 -198
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +26 -197
- package/templates/.agents/skills/commit/reference/commit-message.md +60 -0
- package/templates/.agents/skills/commit/reference/commit-message.zh-CN.md +60 -0
- package/templates/.agents/skills/commit/reference/copyright-check.md +39 -0
- package/templates/.agents/skills/commit/reference/copyright-check.zh-CN.md +39 -0
- package/templates/.agents/skills/commit/reference/task-status-update.md +88 -0
- package/templates/.agents/skills/commit/reference/task-status-update.zh-CN.md +88 -0
- package/templates/.agents/skills/complete-task/SKILL.md +1 -6
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/create-issue/SKILL.md +32 -251
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +33 -252
- package/templates/.agents/skills/create-issue/reference/label-and-type.md +77 -0
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +77 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.md +45 -0
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +45 -0
- package/templates/.agents/skills/create-pr/SKILL.md +39 -221
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +39 -220
- package/templates/.agents/skills/create-pr/reference/branch-strategy.md +29 -0
- package/templates/.agents/skills/create-pr/reference/branch-strategy.zh-CN.md +29 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.md +86 -0
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +86 -0
- package/templates/.agents/skills/create-release-note/SKILL.md +10 -13
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +10 -12
- package/templates/.agents/skills/create-task/SKILL.md +2 -5
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/implement-task/SKILL.md +47 -176
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +43 -170
- package/templates/.agents/skills/implement-task/reference/implementation-rules.md +58 -0
- package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +58 -0
- package/templates/.agents/skills/implement-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/implement-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/import-codescan/SKILL.md +1 -4
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-dependabot/SKILL.md +1 -4
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/import-issue/SKILL.md +2 -3
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +2 -3
- package/templates/.agents/skills/init-labels/SKILL.md +1 -4
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +1 -4
- package/templates/.agents/skills/init-milestones/SKILL.md +1 -3
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/plan-task/SKILL.md +1 -5
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/refine-task/SKILL.md +40 -162
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +38 -158
- package/templates/.agents/skills/refine-task/reference/fix-workflow.md +76 -0
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +76 -0
- package/templates/.agents/skills/refine-task/reference/report-template.md +38 -0
- package/templates/.agents/skills/refine-task/reference/report-template.zh-CN.md +38 -0
- package/templates/.agents/skills/refine-title/SKILL.md +1 -4
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/release/SKILL.md +10 -12
- package/templates/.agents/skills/release/SKILL.zh-CN.md +10 -11
- package/templates/.agents/skills/review-task/SKILL.md +37 -239
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +37 -238
- package/templates/.agents/skills/review-task/reference/output-templates.md +72 -0
- package/templates/.agents/skills/review-task/reference/output-templates.zh-CN.md +72 -0
- package/templates/.agents/skills/review-task/reference/report-template.md +63 -0
- package/templates/.agents/skills/review-task/reference/report-template.zh-CN.md +63 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.md +24 -0
- package/templates/.agents/skills/review-task/reference/review-criteria.zh-CN.md +24 -0
- package/templates/.agents/skills/sync-issue/SKILL.md +34 -490
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -489
- package/templates/.agents/skills/sync-issue/reference/comment-publish.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/comment-publish.zh-CN.md +84 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.md +62 -0
- package/templates/.agents/skills/sync-issue/reference/label-sync.zh-CN.md +62 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.md +37 -0
- package/templates/.agents/skills/sync-issue/reference/milestone-sync.zh-CN.md +37 -0
- package/templates/.agents/skills/sync-pr/SKILL.md +37 -284
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +41 -288
- package/templates/.agents/skills/sync-pr/reference/comment-publish.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/comment-publish.zh-CN.md +82 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.md +54 -0
- package/templates/.agents/skills/sync-pr/reference/delivery-detection.zh-CN.md +54 -0
- package/templates/.agents/skills/test/SKILL.md +1 -3
- package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/test-integration/SKILL.md +1 -4
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -3
- package/templates/.agents/skills/update-agent-infra/SKILL.md +2 -6
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +2 -4
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +45 -55
- package/templates/.agents/skills/upgrade-dependency/SKILL.md +1 -4
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -3
- package/templates/.claude/commands/analyze-task.md +1 -1
- package/templates/.claude/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.claude/commands/block-task.md +2 -1
- package/templates/.claude/commands/block-task.zh-CN.md +2 -1
- package/templates/.claude/commands/check-task.md +2 -1
- package/templates/.claude/commands/check-task.zh-CN.md +2 -1
- package/templates/.claude/commands/close-codescan.md +2 -1
- package/templates/.claude/commands/close-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/close-dependabot.md +2 -1
- package/templates/.claude/commands/close-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/commit.md +1 -1
- package/templates/.claude/commands/commit.zh-CN.md +1 -1
- package/templates/.claude/commands/complete-task.md +1 -1
- package/templates/.claude/commands/complete-task.zh-CN.md +1 -1
- package/templates/.claude/commands/create-issue.md +1 -1
- package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/create-pr.md +2 -2
- package/templates/.claude/commands/create-pr.zh-CN.md +2 -2
- package/templates/.claude/commands/create-release-note.md +2 -1
- package/templates/.claude/commands/create-release-note.zh-CN.md +2 -1
- package/templates/.claude/commands/create-task.md +1 -1
- package/templates/.claude/commands/create-task.zh-CN.md +1 -1
- package/templates/.claude/commands/implement-task.md +1 -1
- package/templates/.claude/commands/implement-task.zh-CN.md +1 -1
- package/templates/.claude/commands/import-codescan.md +1 -0
- package/templates/.claude/commands/import-codescan.zh-CN.md +2 -1
- package/templates/.claude/commands/import-dependabot.md +1 -0
- package/templates/.claude/commands/import-dependabot.zh-CN.md +2 -1
- package/templates/.claude/commands/import-issue.md +1 -1
- package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/init-labels.md +1 -0
- package/templates/.claude/commands/init-labels.zh-CN.md +2 -1
- package/templates/.claude/commands/init-milestones.md +2 -1
- package/templates/.claude/commands/init-milestones.zh-CN.md +2 -1
- package/templates/.claude/commands/plan-task.md +1 -1
- package/templates/.claude/commands/plan-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-task.zh-CN.md +1 -1
- package/templates/.claude/commands/refine-title.md +2 -1
- package/templates/.claude/commands/refine-title.zh-CN.md +2 -1
- package/templates/.claude/commands/release.md +2 -1
- package/templates/.claude/commands/release.zh-CN.md +2 -1
- package/templates/.claude/commands/review-task.md +1 -1
- package/templates/.claude/commands/review-task.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-issue.md +1 -1
- package/templates/.claude/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/sync-pr.md +2 -2
- package/templates/.claude/commands/sync-pr.zh-CN.md +2 -2
- package/templates/.claude/commands/test-integration.md +2 -1
- package/templates/.claude/commands/test-integration.zh-CN.md +2 -1
- package/templates/.claude/commands/test.md +1 -1
- package/templates/.claude/commands/test.zh-CN.md +1 -1
- package/templates/.claude/commands/update-agent-infra.md +2 -1
- package/templates/.claude/commands/update-agent-infra.zh-CN.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.md +2 -1
- package/templates/.claude/commands/upgrade-dependency.zh-CN.md +2 -1
- package/templates/.gemini/commands/_project_/analyze-task.toml +1 -1
- package/templates/.gemini/commands/_project_/analyze-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.toml +1 -1
- package/templates/.gemini/commands/_project_/block-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.toml +1 -1
- package/templates/.gemini/commands/_project_/check-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.toml +1 -1
- package/templates/.gemini/commands/_project_/close-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.toml +1 -1
- package/templates/.gemini/commands/_project_/close-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.toml +1 -1
- package/templates/.gemini/commands/_project_/commit.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.toml +1 -1
- package/templates/.gemini/commands/_project_/complete-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.toml +1 -1
- package/templates/.gemini/commands/_project_/create-pr.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.toml +1 -1
- package/templates/.gemini/commands/_project_/create-release-note.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.toml +1 -1
- package/templates/.gemini/commands/_project_/create-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.toml +1 -1
- package/templates/.gemini/commands/_project_/implement-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-codescan.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-dependabot.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.toml +1 -1
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.toml +1 -1
- package/templates/.gemini/commands/_project_/plan-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.toml +1 -1
- package/templates/.gemini/commands/_project_/refine-title.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/release.toml +1 -1
- package/templates/.gemini/commands/_project_/release.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.toml +1 -1
- package/templates/.gemini/commands/_project_/review-task.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/sync-pr.toml +2 -2
- package/templates/.gemini/commands/_project_/sync-pr.zh-CN.toml +2 -2
- package/templates/.gemini/commands/_project_/test-integration.toml +1 -1
- package/templates/.gemini/commands/_project_/test-integration.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/test.toml +1 -1
- package/templates/.gemini/commands/_project_/test.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.toml +1 -1
- package/templates/.gemini/commands/_project_/update-agent-infra.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.toml +1 -1
- package/templates/.gemini/commands/_project_/upgrade-dependency.zh-CN.toml +1 -1
- package/templates/.github/hooks/check-version-format.sh +29 -0
- package/templates/.github/hooks/pre-commit +8 -0
- package/templates/.opencode/commands/analyze-task.md +1 -1
- package/templates/.opencode/commands/analyze-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/block-task.md +1 -1
- package/templates/.opencode/commands/block-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/check-task.md +1 -1
- package/templates/.opencode/commands/check-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-codescan.md +1 -1
- package/templates/.opencode/commands/close-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/close-dependabot.md +1 -1
- package/templates/.opencode/commands/close-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/commit.md +1 -1
- package/templates/.opencode/commands/commit.zh-CN.md +1 -1
- package/templates/.opencode/commands/complete-task.md +1 -1
- package/templates/.opencode/commands/complete-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-pr.md +1 -1
- package/templates/.opencode/commands/create-pr.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-release-note.md +1 -1
- package/templates/.opencode/commands/create-release-note.zh-CN.md +1 -1
- package/templates/.opencode/commands/create-task.md +1 -1
- package/templates/.opencode/commands/create-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/implement-task.md +1 -1
- package/templates/.opencode/commands/implement-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-codescan.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-dependabot.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-issue.md +1 -1
- package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-milestones.md +1 -1
- package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
- package/templates/.opencode/commands/plan-task.md +1 -1
- package/templates/.opencode/commands/plan-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/refine-title.md +1 -1
- package/templates/.opencode/commands/refine-title.zh-CN.md +1 -1
- package/templates/.opencode/commands/release.md +1 -1
- package/templates/.opencode/commands/release.zh-CN.md +1 -1
- package/templates/.opencode/commands/review-task.md +1 -1
- package/templates/.opencode/commands/review-task.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-issue.md +1 -1
- package/templates/.opencode/commands/sync-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/sync-pr.md +2 -2
- package/templates/.opencode/commands/sync-pr.zh-CN.md +2 -2
- package/templates/.opencode/commands/test-integration.md +1 -1
- package/templates/.opencode/commands/test-integration.zh-CN.md +1 -1
- package/templates/.opencode/commands/test.md +1 -1
- package/templates/.opencode/commands/test.zh-CN.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.md +1 -1
- package/templates/.opencode/commands/update-agent-infra.zh-CN.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.md +1 -1
- package/templates/.opencode/commands/upgrade-dependency.zh-CN.md +1 -1
- package/templates/.claude/CLAUDE.md +0 -176
- package/templates/.claude/CLAUDE.zh-CN.md +0 -176
- package/templates/.claude/project-rules.md +0 -65
- package/templates/.claude/project-rules.zh-CN.md +0 -65
- package/templates/.codex/README.md +0 -38
- package/templates/.codex/README.zh-CN.md +0 -37
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +0 -232
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +0 -232
- package/templates/.opencode/README.md +0 -76
- package/templates/.opencode/README.zh-CN.md +0 -77
- package/templates/AGENTS.md +0 -104
- package/templates/AGENTS.zh-CN.md +0 -104
|
@@ -1,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,7 +24,7 @@ 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 `.agents/.airc.json
|
|
27
|
+
The script reads `.agents/.airc.json`, automatically locates the installed `@fitlab-ai/agent-infra/templates/` directory via npm, and performs:
|
|
32
28
|
- detect the template source version
|
|
33
29
|
- File registry sync (`defaults.json` → `.agents/.airc.json`)
|
|
34
30
|
- All managed files (language selection → exclude merged/ejected → placeholder rendering → overwrite)
|
|
@@ -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,7 +22,7 @@ description: >
|
|
|
24
22
|
node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
25
23
|
```
|
|
26
24
|
|
|
27
|
-
脚本读取 `.agents/.airc.json
|
|
25
|
+
脚本读取 `.agents/.airc.json`,并通过 npm 自动定位已安装的 `@fitlab-ai/agent-infra/templates/` 目录,然后自动完成:
|
|
28
26
|
- 检测模板源版本
|
|
29
27
|
- 同步文件注册表(`defaults.json` → `.agents/.airc.json`)
|
|
30
28
|
- 处理所有 managed 文件(语言选择 → 排除 merged/ejected → 占位符渲染 → 覆盖写入)
|
|
@@ -22,6 +22,8 @@ import { fileURLToPath } from 'node:url';
|
|
|
22
22
|
const DEFAULTS = {
|
|
23
23
|
"files": {
|
|
24
24
|
"managed": [
|
|
25
|
+
".agents/QUICKSTART.md",
|
|
26
|
+
".agents/README.md",
|
|
25
27
|
".agents/skills/",
|
|
26
28
|
".agents/templates/",
|
|
27
29
|
".agents/workflows/",
|
|
@@ -29,6 +31,7 @@ const DEFAULTS = {
|
|
|
29
31
|
".claude/commands/",
|
|
30
32
|
".claude/hooks/",
|
|
31
33
|
".gemini/commands/",
|
|
34
|
+
".github/hooks/check-version-format.sh",
|
|
32
35
|
".opencode/commands/"
|
|
33
36
|
],
|
|
34
37
|
"merged": [
|
|
@@ -36,27 +39,20 @@ const DEFAULTS = {
|
|
|
36
39
|
"**/test-integration.*",
|
|
37
40
|
"**/test.*",
|
|
38
41
|
"**/upgrade-dependency.*",
|
|
39
|
-
".agents/QUICKSTART.md",
|
|
40
|
-
".agents/README.md",
|
|
41
42
|
".agents/skills/release/SKILL.*",
|
|
42
43
|
".agents/skills/test-integration/SKILL.*",
|
|
43
44
|
".agents/skills/test/SKILL.*",
|
|
44
45
|
".agents/skills/upgrade-dependency/SKILL.*",
|
|
45
|
-
".claude/CLAUDE.md",
|
|
46
|
-
".claude/project-rules.md",
|
|
47
46
|
".claude/settings.json",
|
|
48
|
-
".codex/README.md",
|
|
49
47
|
".gemini/settings.json",
|
|
50
|
-
".
|
|
51
|
-
".
|
|
52
|
-
".opencode/README.md",
|
|
53
|
-
"AGENTS.md"
|
|
48
|
+
".github/hooks/pre-commit",
|
|
49
|
+
".gitignore"
|
|
54
50
|
],
|
|
55
51
|
"ejected": []
|
|
56
52
|
}
|
|
57
53
|
};
|
|
58
54
|
|
|
59
|
-
const INSTALLER_VERSION = "v0.4.
|
|
55
|
+
const INSTALLER_VERSION = "v0.4.2";
|
|
60
56
|
|
|
61
57
|
function norm(p) { return p.replace(/\\/g, '/'); }
|
|
62
58
|
|
|
@@ -114,18 +110,45 @@ function renderPathname(p, project) {
|
|
|
114
110
|
return p.replace(/_project_/g, project);
|
|
115
111
|
}
|
|
116
112
|
|
|
117
|
-
function
|
|
118
|
-
|
|
113
|
+
function isTemplateDir(dir) {
|
|
114
|
+
try {
|
|
115
|
+
return fs.statSync(dir).isDirectory();
|
|
116
|
+
} catch {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
function resolveInstalledTemplateDir(nodeModulesRoot) {
|
|
122
|
+
if (!nodeModulesRoot) return null;
|
|
123
|
+
const candidate = path.join(nodeModulesRoot, '@fitlab-ai', 'agent-infra', 'templates');
|
|
124
|
+
return isTemplateDir(candidate) ? candidate : null;
|
|
125
|
+
}
|
|
123
126
|
|
|
127
|
+
function resolveTemplateRoot(projectRoot) {
|
|
124
128
|
try {
|
|
125
|
-
|
|
129
|
+
const globalRoot = childProcess.execSync('npm root -g', {
|
|
130
|
+
encoding: 'utf8',
|
|
131
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
132
|
+
}).trim();
|
|
133
|
+
const globalTemplateRoot = resolveInstalledTemplateDir(globalRoot);
|
|
134
|
+
if (globalTemplateRoot) return globalTemplateRoot;
|
|
126
135
|
} catch {
|
|
127
|
-
|
|
136
|
+
// npm may be unavailable or not configured.
|
|
128
137
|
}
|
|
138
|
+
|
|
139
|
+
try {
|
|
140
|
+
const localRoot = childProcess.execSync('npm root', {
|
|
141
|
+
cwd: projectRoot,
|
|
142
|
+
encoding: 'utf8',
|
|
143
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
144
|
+
}).trim();
|
|
145
|
+
const localTemplateRoot = resolveInstalledTemplateDir(localRoot);
|
|
146
|
+
if (localTemplateRoot) return localTemplateRoot;
|
|
147
|
+
} catch {
|
|
148
|
+
// npm may be unavailable or the project may not have a local install.
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
return null;
|
|
129
152
|
}
|
|
130
153
|
|
|
131
154
|
function isBinary(fp) {
|
|
@@ -173,44 +196,9 @@ function langSelect(rels, lang, allSet, project) {
|
|
|
173
196
|
return sel;
|
|
174
197
|
}
|
|
175
198
|
|
|
176
|
-
function syncTemplates(projectRoot) {
|
|
199
|
+
function syncTemplates(projectRoot, templateRootOverride) {
|
|
177
200
|
const configDir = path.join(projectRoot, '.agents');
|
|
178
201
|
const cfgPath = path.join(configDir, '.airc.json');
|
|
179
|
-
const legacyCfgPaths = [
|
|
180
|
-
path.join(projectRoot, '.airc.json'),
|
|
181
|
-
path.join(projectRoot, '.agent-infra', 'config.json')
|
|
182
|
-
];
|
|
183
|
-
const workspacePath = path.join(configDir, 'workspace');
|
|
184
|
-
const legacyWorkspacePaths = [
|
|
185
|
-
path.join(projectRoot, '.agent-workspace'),
|
|
186
|
-
path.join(projectRoot, '.agent-infra', 'workspace')
|
|
187
|
-
];
|
|
188
|
-
|
|
189
|
-
if (!fs.existsSync(cfgPath)) {
|
|
190
|
-
for (const legacyCfgPath of legacyCfgPaths) {
|
|
191
|
-
if (!fs.existsSync(legacyCfgPath)) continue;
|
|
192
|
-
fs.mkdirSync(configDir, { recursive: true });
|
|
193
|
-
fs.renameSync(legacyCfgPath, cfgPath);
|
|
194
|
-
break;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
if (!fs.existsSync(workspacePath)) {
|
|
198
|
-
for (const legacyWorkspacePath of legacyWorkspacePaths) {
|
|
199
|
-
if (!fs.existsSync(legacyWorkspacePath)) continue;
|
|
200
|
-
fs.mkdirSync(configDir, { recursive: true });
|
|
201
|
-
fs.renameSync(legacyWorkspacePath, workspacePath);
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
try {
|
|
207
|
-
const legacyConfigDir = path.join(projectRoot, '.agent-infra');
|
|
208
|
-
if (fs.existsSync(legacyConfigDir) && fs.readdirSync(legacyConfigDir).length === 0) {
|
|
209
|
-
fs.rmdirSync(legacyConfigDir);
|
|
210
|
-
}
|
|
211
|
-
} catch {
|
|
212
|
-
// Ignore cleanup failures for partially migrated directories.
|
|
213
|
-
}
|
|
214
202
|
|
|
215
203
|
if (!fs.existsSync(cfgPath)) {
|
|
216
204
|
return { error: 'No .agents/.airc.json in project root.' };
|
|
@@ -218,11 +206,12 @@ function syncTemplates(projectRoot) {
|
|
|
218
206
|
|
|
219
207
|
const cfg = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));
|
|
220
208
|
const configPathRel = norm(path.relative(projectRoot, cfgPath));
|
|
221
|
-
const templateRoot =
|
|
209
|
+
const templateRoot = templateRootOverride || resolveTemplateRoot(projectRoot);
|
|
222
210
|
if (!templateRoot) {
|
|
223
211
|
return { error: 'Template source not found. Install via npm: npm install -g @fitlab-ai/agent-infra' };
|
|
224
212
|
}
|
|
225
213
|
const version = INSTALLER_VERSION;
|
|
214
|
+
const hadTemplateSource = Object.prototype.hasOwnProperty.call(cfg, 'templateSource');
|
|
226
215
|
|
|
227
216
|
const { project, org, language: lang = 'en' } = cfg;
|
|
228
217
|
const vars = { project, org };
|
|
@@ -395,8 +384,9 @@ function syncTemplates(projectRoot) {
|
|
|
395
384
|
cfg.files.merged = merged;
|
|
396
385
|
cfg.files.ejected = ejected;
|
|
397
386
|
cfg.templateVersion = version;
|
|
387
|
+
delete cfg.templateSource;
|
|
398
388
|
|
|
399
|
-
report.configUpdated = hasChanges || prevVersion !== version;
|
|
389
|
+
report.configUpdated = hasChanges || prevVersion !== version || hadTemplateSource;
|
|
400
390
|
|
|
401
391
|
fs.writeFileSync(cfgPath, JSON.stringify(cfg, null, 2) + '\n', 'utf8');
|
|
402
392
|
|
|
@@ -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,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Mark task as blocked and record
|
|
2
|
+
description: "Mark a task as blocked and record the reason"
|
|
3
3
|
usage: "/block-task <task-id> [reason]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the block-task skill from `.agents/skills/block-task/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "标记任务为阻塞状态并记录原因"
|
|
3
3
|
usage: "/block-task <task-id> [reason]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/block-task/SKILL.md` 中的 block-task 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Check a task's current status and progress"
|
|
3
3
|
usage: "/check-task <task-id>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the check-task skill from `.agents/skills/check-task/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Close Code Scanning alert with documented reason"
|
|
2
|
+
description: "Close a Code Scanning alert with a documented reason"
|
|
3
3
|
usage: "/close-codescan <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the close-codescan skill from `.agents/skills/close-codescan/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "关闭 Code Scanning
|
|
2
|
+
description: "关闭 Code Scanning 告警并记录理由"
|
|
3
3
|
usage: "/close-codescan <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/close-codescan/SKILL.md` 中的 close-codescan 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Close Dependabot
|
|
2
|
+
description: "Close a Dependabot alert with a documented reason"
|
|
3
3
|
usage: "/close-dependabot <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the close-dependabot skill from `.agents/skills/close-dependabot/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "关闭 Dependabot
|
|
2
|
+
description: "关闭 Dependabot 安全告警并记录理由"
|
|
3
3
|
usage: "/close-dependabot <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/close-dependabot/SKILL.md` 中的 close-dependabot 技能。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Create Pull Request to
|
|
3
|
-
usage: "/create-pr [target-branch]"
|
|
2
|
+
description: "Create a Pull Request to a target branch"
|
|
3
|
+
usage: "/create-pr [task-id] [target-branch]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Read and execute the create-pr skill from `.agents/skills/create-pr/SKILL.md`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "创建 Pull Request
|
|
3
|
-
usage: "/create-pr [target-branch]"
|
|
2
|
+
description: "创建 Pull Request 到目标分支"
|
|
3
|
+
usage: "/create-pr [task-id] [target-branch]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
读取并执行 `.agents/skills/create-pr/SKILL.md` 中的 create-pr 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Generate release notes from PRs and commits"
|
|
3
3
|
usage: "/create-release-note <ver> [prev]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the create-release-note skill from `.agents/skills/create-release-note/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "从 PR 和 commit
|
|
2
|
+
description: "从 PR 和 commit 生成版本发布说明"
|
|
3
3
|
usage: "/create-release-note <ver> [prev]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/create-release-note/SKILL.md` 中的 create-release-note 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "导入 Code Scanning
|
|
2
|
+
description: "导入 Code Scanning 告警并创建修复任务"
|
|
3
3
|
usage: "/import-codescan <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/import-codescan/SKILL.md` 中的 import-codescan 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "导入 Dependabot
|
|
2
|
+
description: "导入 Dependabot 安全告警并创建修复任务"
|
|
3
3
|
usage: "/import-dependabot <alert-number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/import-dependabot/SKILL.md` 中的 import-dependabot 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "Initialize the repository's standard GitHub Milestones taxonomy
|
|
2
|
+
description: "Initialize the repository's standard GitHub Milestones taxonomy"
|
|
3
3
|
usage: "/init-milestones [--history]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the init-milestones skill from `.agents/skills/init-milestones/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "初始化仓库的 GitHub Milestones 体系"
|
|
3
3
|
usage: "/init-milestones [--history]"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/init-milestones/SKILL.md` 中的 init-milestones 技能。
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "Rewrite an Issue or PR title in Conventional Commits format"
|
|
3
3
|
usage: "/refine-title <number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
Read and execute the refine-title skill from `.agents/skills/refine-title/SKILL.md`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
2
|
+
description: "重构 Issue/PR 标题为 Conventional Commits 格式"
|
|
3
3
|
usage: "/refine-title <number>"
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
读取并执行 `.agents/skills/refine-title/SKILL.md` 中的 refine-title 技能。
|