@fitlab-ai/agent-infra 0.3.1 → 0.4.0
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 +29 -39
- package/README.zh-CN.md +29 -39
- package/bin/cli.js +1 -1
- package/lib/defaults.json +3 -12
- package/lib/init.js +13 -24
- package/lib/paths.js +3 -42
- package/lib/update.js +98 -32
- package/lib/version.js +2 -1
- package/package.json +2 -1
- package/templates/.agents/QUICKSTART.md +7 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +7 -7
- package/templates/.agents/README.md +16 -4
- package/templates/.agents/README.zh-CN.md +16 -4
- package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/block-task/SKILL.md +8 -8
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/check-task/SKILL.md +3 -3
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
- package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
- package/templates/.agents/skills/commit/SKILL.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.md +7 -7
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/create-issue/SKILL.md +57 -12
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +57 -12
- package/templates/.agents/skills/create-pr/SKILL.md +44 -7
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +44 -7
- package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
- package/templates/.agents/skills/create-task/SKILL.md +80 -78
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +11 -10
- package/templates/.agents/skills/implement-task/SKILL.md +15 -18
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +15 -18
- package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.md +58 -58
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/init-labels/SKILL.md +8 -0
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
- package/templates/.agents/skills/plan-task/SKILL.md +151 -149
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/refine-task/SKILL.md +3 -3
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/release/SKILL.md +55 -14
- package/templates/.agents/skills/release/SKILL.zh-CN.md +55 -14
- package/templates/.agents/skills/review-task/SKILL.md +9 -9
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +9 -9
- package/templates/.agents/skills/sync-issue/SKILL.md +258 -279
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -56
- package/templates/.agents/skills/sync-pr/SKILL.md +8 -28
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +7 -27
- package/templates/.agents/skills/update-agent-infra/SKILL.md +6 -6
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +61 -116
- 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 -1
- package/templates/.claude/CLAUDE.zh-CN.md +14 -1
- package/templates/.claude/hooks/check-version-format.sh +44 -0
- package/templates/.claude/settings.json +14 -0
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
- package/templates/AGENTS.md +14 -1
- package/templates/AGENTS.zh-CN.md +14 -1
- 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
package/lib/update.js
CHANGED
|
@@ -1,15 +1,75 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import { execSync } from 'node:child_process';
|
|
4
3
|
import { info, ok, err } from './log.js';
|
|
5
|
-
import { resolveTemplateDir
|
|
4
|
+
import { resolveTemplateDir } from './paths.js';
|
|
6
5
|
import { renderFile, copySkillDir } from './render.js';
|
|
7
6
|
|
|
8
7
|
const defaults = JSON.parse(
|
|
9
8
|
fs.readFileSync(new URL('./defaults.json', import.meta.url), 'utf8')
|
|
10
9
|
);
|
|
11
10
|
|
|
11
|
+
const CONFIG_DIR = '.agents';
|
|
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
|
+
|
|
12
60
|
function syncFileRegistry(config) {
|
|
61
|
+
config.files ||= {};
|
|
62
|
+
const before = JSON.stringify({
|
|
63
|
+
files: {
|
|
64
|
+
managed: config.files.managed || [],
|
|
65
|
+
merged: config.files.merged || [],
|
|
66
|
+
ejected: config.files.ejected || []
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
config.files.managed = config.files.managed || [];
|
|
70
|
+
config.files.merged = config.files.merged || [];
|
|
71
|
+
config.files.ejected = config.files.ejected || [];
|
|
72
|
+
|
|
13
73
|
const allExisting = [
|
|
14
74
|
...config.files.managed,
|
|
15
75
|
...config.files.merged,
|
|
@@ -30,7 +90,15 @@ function syncFileRegistry(config) {
|
|
|
30
90
|
}
|
|
31
91
|
}
|
|
32
92
|
|
|
33
|
-
|
|
93
|
+
const after = JSON.stringify({
|
|
94
|
+
files: {
|
|
95
|
+
managed: config.files.managed,
|
|
96
|
+
merged: config.files.merged,
|
|
97
|
+
ejected: config.files.ejected
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
return { added, changed: before !== after };
|
|
34
102
|
}
|
|
35
103
|
|
|
36
104
|
async function cmdUpdate() {
|
|
@@ -39,9 +107,18 @@ async function cmdUpdate() {
|
|
|
39
107
|
console.log(' ==================================');
|
|
40
108
|
console.log('');
|
|
41
109
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
+
// check config exists
|
|
120
|
+
if (!fs.existsSync(CONFIG_PATH)) {
|
|
121
|
+
err(`No ${CONFIG_PATH} found in current directory.`);
|
|
45
122
|
err('Run "ai init" first to initialize the project.');
|
|
46
123
|
process.exitCode = 1;
|
|
47
124
|
return;
|
|
@@ -52,27 +129,12 @@ async function cmdUpdate() {
|
|
|
52
129
|
if (!templateDir) {
|
|
53
130
|
err('Template directory not found.');
|
|
54
131
|
err('Install via npm: npm install -g @fitlab-ai/agent-infra');
|
|
55
|
-
err('Or via clone: curl -fsSL https://raw.githubusercontent.com/fitlab-ai/agent-infra/main/install.sh | sh');
|
|
56
132
|
process.exitCode = 1;
|
|
57
133
|
return;
|
|
58
134
|
}
|
|
59
135
|
|
|
60
|
-
// auto-update: only for clone installs
|
|
61
|
-
if (isCloneInstall()) {
|
|
62
|
-
const installDir = resolveInstallDir();
|
|
63
|
-
if (fs.existsSync(path.join(installDir, '.git'))) {
|
|
64
|
-
info('Updating templates to latest version...');
|
|
65
|
-
try {
|
|
66
|
-
execSync('git pull --rebase --quiet', { cwd: installDir, stdio: 'pipe' });
|
|
67
|
-
ok('Templates updated.');
|
|
68
|
-
} catch {
|
|
69
|
-
err('Failed to update templates (network issue?). Using local version.');
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
136
|
// read project config
|
|
75
|
-
const config = JSON.parse(fs.readFileSync(
|
|
137
|
+
const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));
|
|
76
138
|
const { project, org, language } = config;
|
|
77
139
|
const replacements = { project, org };
|
|
78
140
|
|
|
@@ -130,20 +192,24 @@ async function cmdUpdate() {
|
|
|
130
192
|
ok('Updated .opencode/commands/update-agent-infra.md');
|
|
131
193
|
|
|
132
194
|
// sync file registry
|
|
133
|
-
const added = syncFileRegistry(config);
|
|
195
|
+
const { added, changed } = syncFileRegistry(config);
|
|
134
196
|
const hasNewEntries = added.managed.length > 0 || added.merged.length > 0;
|
|
135
197
|
|
|
136
|
-
if (
|
|
198
|
+
if (changed) {
|
|
137
199
|
console.log('');
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
200
|
+
if (hasNewEntries) {
|
|
201
|
+
info(`New file entries synced to ${CONFIG_PATH}:`);
|
|
202
|
+
for (const entry of added.managed) {
|
|
203
|
+
ok(` managed: ${entry}`);
|
|
204
|
+
}
|
|
205
|
+
for (const entry of added.merged) {
|
|
206
|
+
ok(` merged: ${entry}`);
|
|
207
|
+
}
|
|
208
|
+
} else {
|
|
209
|
+
info(`File registry changed in ${CONFIG_PATH}.`);
|
|
144
210
|
}
|
|
145
|
-
fs.writeFileSync(
|
|
146
|
-
ok(
|
|
211
|
+
fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, 2) + '\n', 'utf8');
|
|
212
|
+
ok(`Updated ${CONFIG_PATH}`);
|
|
147
213
|
}
|
|
148
214
|
|
|
149
215
|
// done
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fitlab-ai/agent-infra",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Bootstrap tool for AI multi-tool collaboration infrastructure — works with Claude Code, Codex, Gemini CLI, and OpenCode",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "node scripts/build-inline.js",
|
|
45
|
+
"prepare": "git config core.hooksPath .github/hooks || true",
|
|
45
46
|
"test": "node scripts/build-inline.js --check && node --test tests/*.test.js",
|
|
46
47
|
"prepublishOnly": "node scripts/build-inline.js --check && node --test tests/*.test.js"
|
|
47
48
|
}
|
|
@@ -13,7 +13,7 @@ This guide walks you through using multiple AI coding assistants together on a p
|
|
|
13
13
|
1. Copy the task template to the active workspace:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
cp .agents/templates/task.md .
|
|
16
|
+
cp .agents/templates/task.md .agents/workspace/active/task-001.md
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
2. Fill in the task metadata:
|
|
@@ -49,7 +49,7 @@ Claude Code excels at codebase exploration and understanding complex relationshi
|
|
|
49
49
|
gemini
|
|
50
50
|
|
|
51
51
|
# Example prompt:
|
|
52
|
-
# "Based on the analysis in .
|
|
52
|
+
# "Based on the analysis in .agents/workspace/active/task-001.md,
|
|
53
53
|
# create a technical design. Define interfaces and outline the approach."
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -60,7 +60,7 @@ gemini
|
|
|
60
60
|
codex
|
|
61
61
|
|
|
62
62
|
# Example prompt:
|
|
63
|
-
# "Implement the changes described in .
|
|
63
|
+
# "Implement the changes described in .agents/workspace/active/task-001.md.
|
|
64
64
|
# Follow the design section. Create a new branch for this work."
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -87,7 +87,7 @@ claude
|
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
# Quick bug fix workflow
|
|
90
|
-
cp .agents/templates/task.md .
|
|
90
|
+
cp .agents/templates/task.md .agents/workspace/active/bugfix-001.md
|
|
91
91
|
# Edit the task, then:
|
|
92
92
|
# 1. Use Claude Code to analyze
|
|
93
93
|
# 2. Use Codex/Cursor to fix
|
|
@@ -101,7 +101,7 @@ cp .agents/templates/task.md .agent-workspace/active/bugfix-001.md
|
|
|
101
101
|
3. **Report**: Generate review report from template.
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
cp .agents/templates/review-report.md .
|
|
104
|
+
cp .agents/templates/review-report.md .agents/workspace/active/review-pr-42.md
|
|
105
105
|
# Use Claude Code to fill in the review
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -113,7 +113,7 @@ cp .agents/templates/review-report.md .agent-workspace/active/review-pr-42.md
|
|
|
113
113
|
4. **Verify** (Claude Code): Ensure no regressions, run tests.
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
cp .agents/templates/task.md .
|
|
116
|
+
cp .agents/templates/task.md .agents/workspace/active/refactor-001.md
|
|
117
117
|
# Follow the refactoring workflow in .agents/workflows/refactoring.yaml
|
|
118
118
|
```
|
|
119
119
|
|
|
@@ -122,7 +122,7 @@ cp .agents/templates/task.md .agent-workspace/active/refactor-001.md
|
|
|
122
122
|
When switching between AI tools, create a handoff document:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
cp .agents/templates/handoff.md .
|
|
125
|
+
cp .agents/templates/handoff.md .agents/workspace/active/handoff-task-001-phase2.md
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
Fill in:
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
1. 将任务模板复制到活跃工作区:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
cp .agents/templates/task.zh-CN.md .
|
|
16
|
+
cp .agents/templates/task.zh-CN.md .agents/workspace/active/task-001.md
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
2. 填写任务元数据:
|
|
@@ -49,7 +49,7 @@ Claude Code 擅长代码库探索和理解文件间的复杂关系。
|
|
|
49
49
|
gemini
|
|
50
50
|
|
|
51
51
|
# 示例提示:
|
|
52
|
-
# "基于 .
|
|
52
|
+
# "基于 .agents/workspace/active/task-001.md 中的分析结果,
|
|
53
53
|
# 创建技术设计方案。定义接口并概述实现思路。"
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -60,7 +60,7 @@ gemini
|
|
|
60
60
|
codex
|
|
61
61
|
|
|
62
62
|
# 示例提示:
|
|
63
|
-
# "实现 .
|
|
63
|
+
# "实现 .agents/workspace/active/task-001.md 中描述的变更。
|
|
64
64
|
# 遵循设计部分。为此工作创建新分支。"
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -87,7 +87,7 @@ claude
|
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
# 快速缺陷修复工作流
|
|
90
|
-
cp .agents/templates/task.zh-CN.md .
|
|
90
|
+
cp .agents/templates/task.zh-CN.md .agents/workspace/active/bugfix-001.md
|
|
91
91
|
# 编辑任务,然后:
|
|
92
92
|
# 1. 使用 Claude Code 分析
|
|
93
93
|
# 2. 使用 Codex/Cursor 修复
|
|
@@ -101,7 +101,7 @@ cp .agents/templates/task.zh-CN.md .agent-workspace/active/bugfix-001.md
|
|
|
101
101
|
3. **报告**:从模板生成审查报告。
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
cp .agents/templates/review-report.zh-CN.md .
|
|
104
|
+
cp .agents/templates/review-report.zh-CN.md .agents/workspace/active/review-pr-42.md
|
|
105
105
|
# 使用 Claude Code 填写审查内容
|
|
106
106
|
```
|
|
107
107
|
|
|
@@ -113,7 +113,7 @@ cp .agents/templates/review-report.zh-CN.md .agent-workspace/active/review-pr-42
|
|
|
113
113
|
4. **验证**(Claude Code):确保没有回归问题,运行测试。
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
|
-
cp .agents/templates/task.zh-CN.md .
|
|
116
|
+
cp .agents/templates/task.zh-CN.md .agents/workspace/active/refactor-001.md
|
|
117
117
|
# 按照 .agents/workflows/refactoring.zh-CN.yaml 中的重构工作流执行
|
|
118
118
|
```
|
|
119
119
|
|
|
@@ -122,7 +122,7 @@ cp .agents/templates/task.zh-CN.md .agent-workspace/active/refactor-001.md
|
|
|
122
122
|
在 AI 工具之间切换时,创建交接文档:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
cp .agents/templates/handoff.zh-CN.md .
|
|
125
|
+
cp .agents/templates/handoff.zh-CN.md .agents/workspace/active/handoff-task-001-phase2.md
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
填写:
|
|
@@ -37,7 +37,7 @@ This dual-config approach ensures every AI tool receives appropriate project con
|
|
|
37
37
|
code-review.yaml # Code review workflow
|
|
38
38
|
refactoring.yaml # Refactoring workflow
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.agents/workspace/ # Runtime workspace (git-ignored)
|
|
41
41
|
active/ # Currently active tasks
|
|
42
42
|
blocked/ # Blocked tasks
|
|
43
43
|
completed/ # Completed tasks
|
|
@@ -95,11 +95,23 @@ Each AI tool has different strengths. Use them accordingly:
|
|
|
95
95
|
## Quick Start
|
|
96
96
|
|
|
97
97
|
1. **Read the quick start guide**: See `QUICKSTART.md` for step-by-step instructions.
|
|
98
|
-
2. **Create a task**: Copy `.agents/templates/task.md` to `.
|
|
98
|
+
2. **Create a task**: Copy `.agents/templates/task.md` to `.agents/workspace/active/`.
|
|
99
99
|
3. **Assign to an AI**: Update the `assigned_to` field in the task metadata.
|
|
100
100
|
4. **Run the workflow**: Follow the appropriate workflow in `.agents/workflows/`.
|
|
101
101
|
5. **Hand off**: When switching AIs, create a handoff document from the template.
|
|
102
102
|
|
|
103
|
+
## Label Conventions
|
|
104
|
+
|
|
105
|
+
GitHub Labels in this project use the following prefixes, each with a defined scope:
|
|
106
|
+
|
|
107
|
+
| Label prefix | Issue | PR | Notes |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| `type:` | — | Yes | Issues use the native GitHub Type field; PRs use `type:` labels for changelog generation and categorization |
|
|
110
|
+
| `status:` | Yes | — | PRs already have their own state flow (Open / Draft / Merged / Closed); Issues use `status:` labels for project tracking states |
|
|
111
|
+
| `in:` | Yes | Yes | Both Issues and PRs can be filtered by module |
|
|
112
|
+
|
|
113
|
+
Initialize the label set with the `/init-labels` command.
|
|
114
|
+
|
|
103
115
|
## Skill Authoring Conventions
|
|
104
116
|
|
|
105
117
|
When writing or updating `.agents/skills/*/SKILL.md` files and their templates, keep step numbering consistent:
|
|
@@ -119,7 +131,7 @@ No. Claude Code reads from `.claude/CLAUDE.md`, and all other tools read from `A
|
|
|
119
131
|
|
|
120
132
|
### Q: How do tasks get passed between AI tools?
|
|
121
133
|
|
|
122
|
-
Through handoff documents stored in `.
|
|
134
|
+
Through handoff documents stored in `.agents/workspace/`. Each handoff includes context, progress, and next steps so the receiving AI can continue seamlessly.
|
|
123
135
|
|
|
124
136
|
### Q: What if an AI tool doesn't support AGENTS.md?
|
|
125
137
|
|
|
@@ -131,4 +143,4 @@ It's not recommended. The workflow model is sequential -- one AI per phase. Para
|
|
|
131
143
|
|
|
132
144
|
### Q: Where are runtime files stored?
|
|
133
145
|
|
|
134
|
-
In `.
|
|
146
|
+
In `.agents/workspace/`, which is git-ignored. Only templates and workflow definitions in `.agents/` are version-controlled.
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
code-review.yaml # 代码审查工作流
|
|
38
38
|
refactoring.yaml # 重构工作流
|
|
39
39
|
|
|
40
|
-
.
|
|
40
|
+
.agents/workspace/ # 运行时工作区(已被 git ignore)
|
|
41
41
|
active/ # 当前活跃任务
|
|
42
42
|
blocked/ # 被阻塞的任务
|
|
43
43
|
completed/ # 已完成的任务
|
|
@@ -95,11 +95,23 @@
|
|
|
95
95
|
## 快速入门
|
|
96
96
|
|
|
97
97
|
1. **阅读快速入门指南**:参见 `QUICKSTART.zh-CN.md` 获取分步说明。
|
|
98
|
-
2. **创建任务**:将 `.agents/templates/task.zh-CN.md` 复制到 `.
|
|
98
|
+
2. **创建任务**:将 `.agents/templates/task.zh-CN.md` 复制到 `.agents/workspace/active/`。
|
|
99
99
|
3. **分配给 AI**:更新任务元数据中的 `assigned_to` 字段。
|
|
100
100
|
4. **执行工作流**:按照 `.agents/workflows/` 中相应的工作流执行。
|
|
101
101
|
5. **交接**:切换 AI 时,从模板创建交接文档。
|
|
102
102
|
|
|
103
|
+
## Label 规范
|
|
104
|
+
|
|
105
|
+
本项目的 GitHub Labels 按以下前缀分类,各前缀有明确的适用范围:
|
|
106
|
+
|
|
107
|
+
| Label 前缀 | Issue | PR | 说明 |
|
|
108
|
+
|---|---|---|---|
|
|
109
|
+
| `type:` | — | Yes | Issue 使用 GitHub 原生 Type 字段;PR 无原生类型字段,通过 `type:` label 驱动 changelog 和分类 |
|
|
110
|
+
| `status:` | Yes | — | PR 有自身状态流转(Open / Draft / Merged / Closed);Issue 使用 `status:` label 标记等待反馈、已确认等项目管理状态 |
|
|
111
|
+
| `in:` | Yes | Yes | Issue 和 PR 均可按模块筛选 |
|
|
112
|
+
|
|
113
|
+
初始化 Label 体系:使用 `/init-labels` 命令一次性创建标准 labels。
|
|
114
|
+
|
|
103
115
|
## Skill 编写规范
|
|
104
116
|
|
|
105
117
|
编写或维护 `.agents/skills/*/SKILL.md` 及其模板时,步骤编号遵循以下规则:
|
|
@@ -119,7 +131,7 @@
|
|
|
119
131
|
|
|
120
132
|
### Q:任务如何在 AI 工具之间传递?
|
|
121
133
|
|
|
122
|
-
通过存储在 `.
|
|
134
|
+
通过存储在 `.agents/workspace/` 中的交接文档。每份交接文档包含上下文、进度和后续步骤,让接收方 AI 能无缝接续。
|
|
123
135
|
|
|
124
136
|
### Q:如果某个 AI 工具不支持 AGENTS.md 怎么办?
|
|
125
137
|
|
|
@@ -131,4 +143,4 @@
|
|
|
131
143
|
|
|
132
144
|
### Q:运行时文件存储在哪里?
|
|
133
145
|
|
|
134
|
-
在 `.
|
|
146
|
+
在 `.agents/workspace/` 中,该目录已被 git ignore。只有 `.agents/` 中的模板和工作流定义受版本控制。
|