@fitlab-ai/agent-infra 0.5.6 → 0.5.8
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 +92 -4
- package/README.zh-CN.md +92 -4
- package/bin/cli.js +28 -4
- package/lib/defaults.json +5 -2
- package/lib/init.js +86 -5
- package/lib/prompt.js +28 -1
- package/lib/render.js +1 -1
- package/lib/sandbox/commands/rm.js +6 -4
- package/lib/sandbox/commands/vm.js +43 -16
- package/lib/sandbox/config.js +5 -0
- package/lib/sandbox/engine.js +144 -16
- package/lib/sandbox/shell.js +36 -2
- package/lib/sandbox/task-resolver.js +13 -6
- package/lib/update.js +14 -3
- package/package.json +5 -5
- package/templates/.agents/QUICKSTART.en.md +19 -2
- package/templates/.agents/QUICKSTART.zh-CN.md +19 -2
- package/templates/.agents/README.en.md +71 -2
- package/templates/.agents/README.zh-CN.md +71 -2
- package/templates/.agents/rules/issue-pr-commands.en.md +5 -0
- package/templates/.agents/rules/issue-pr-commands.github.en.md +60 -0
- package/templates/.agents/rules/issue-pr-commands.github.zh-CN.md +60 -0
- package/templates/.agents/rules/issue-pr-commands.zh-CN.md +5 -0
- package/templates/.agents/rules/issue-sync.en.md +19 -0
- package/templates/.agents/rules/issue-sync.github.en.md +14 -0
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +14 -0
- package/templates/.agents/rules/issue-sync.zh-CN.md +19 -0
- package/templates/.agents/rules/label-milestone-setup.en.md +5 -0
- package/templates/.agents/rules/label-milestone-setup.github.en.md +10 -0
- package/templates/.agents/rules/label-milestone-setup.github.zh-CN.md +10 -0
- package/templates/.agents/rules/label-milestone-setup.zh-CN.md +5 -0
- package/templates/.agents/rules/milestone-inference.en.md +5 -0
- package/templates/.agents/rules/milestone-inference.zh-CN.md +5 -0
- package/templates/.agents/rules/pr-sync.en.md +5 -0
- package/templates/.agents/rules/pr-sync.zh-CN.md +5 -0
- package/templates/.agents/rules/release-commands.en.md +5 -0
- package/templates/.agents/rules/release-commands.github.en.md +16 -0
- package/templates/.agents/rules/release-commands.github.zh-CN.md +16 -0
- package/templates/.agents/rules/release-commands.zh-CN.md +5 -0
- package/templates/.agents/rules/security-alerts.en.md +5 -0
- package/templates/.agents/rules/security-alerts.zh-CN.md +5 -0
- package/templates/.agents/scripts/platform-adapters/find-existing-task.github.js +272 -0
- package/templates/.agents/scripts/platform-adapters/find-existing-task.js +5 -0
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +88 -8
- package/templates/.agents/scripts/platform-adapters/platform-sync.js +13 -0
- package/templates/.agents/skills/analyze-task/SKILL.en.md +5 -5
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/analyze-task/config/verify.json +3 -1
- package/templates/.agents/skills/block-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/block-task/config/verify.json +2 -1
- package/templates/.agents/skills/cancel-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/cancel-task/SKILL.zh-CN.md +4 -4
- package/templates/.agents/skills/cancel-task/config/verify.json +2 -1
- package/templates/.agents/skills/check-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/close-codescan/SKILL.en.md +3 -3
- package/templates/.agents/skills/close-codescan/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/close-dependabot/SKILL.en.md +1 -1
- package/templates/.agents/skills/close-dependabot/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/commit/SKILL.en.md +2 -2
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/commit/config/verify.json +2 -1
- package/templates/.agents/skills/complete-task/SKILL.en.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/config/verify.json +2 -1
- package/templates/.agents/skills/create-issue/SKILL.en.md +10 -10
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +10 -10
- package/templates/.agents/skills/create-issue/config/verify.json +2 -1
- package/templates/.agents/skills/create-issue/reference/label-and-type.en.md +3 -3
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +3 -3
- package/templates/.agents/skills/create-issue/reference/template-matching.en.md +6 -34
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +8 -36
- package/templates/.agents/skills/create-pr/SKILL.en.md +3 -3
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/create-pr/config/verify.json +2 -1
- package/templates/.agents/skills/create-pr/reference/pr-body-template.en.md +7 -17
- package/templates/.agents/skills/create-pr/reference/pr-body-template.zh-CN.md +27 -37
- package/templates/.agents/skills/create-release-note/SKILL.en.md +16 -9
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +16 -9
- package/templates/.agents/skills/create-task/SKILL.en.md +5 -5
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/implement-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/implement-task/config/verify.json +3 -1
- package/templates/.agents/skills/import-codescan/SKILL.en.md +3 -3
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-dependabot/SKILL.en.md +2 -2
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/import-issue/SKILL.en.md +41 -11
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +41 -11
- package/templates/.agents/skills/init-labels/SKILL.en.md +10 -10
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +10 -10
- package/templates/.agents/skills/init-labels/scripts/init-labels.sh +6 -0
- package/templates/.agents/skills/init-milestones/SKILL.en.md +8 -8
- package/templates/.agents/skills/init-milestones/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/init-milestones/scripts/init-milestones.sh +6 -0
- package/templates/.agents/skills/plan-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/plan-task/config/verify.json +3 -1
- package/templates/.agents/skills/post-release/SKILL.en.md +95 -0
- package/templates/.agents/skills/post-release/SKILL.zh-CN.md +95 -0
- package/templates/.agents/skills/refine-task/SKILL.en.md +2 -2
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +2 -2
- package/templates/.agents/skills/refine-task/config/verify.json +3 -1
- package/templates/.agents/skills/refine-title/SKILL.en.md +1 -1
- package/templates/.agents/skills/refine-title/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/release/SKILL.en.md +6 -1
- package/templates/.agents/skills/release/SKILL.zh-CN.md +6 -1
- package/templates/.agents/skills/release/scripts/manage-milestones.sh +6 -0
- package/templates/.agents/skills/restore-task/SKILL.en.md +13 -64
- package/templates/.agents/skills/restore-task/SKILL.zh-CN.md +13 -64
- package/templates/.agents/skills/review-task/SKILL.en.md +3 -3
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/review-task/config/verify.json +3 -1
- package/templates/.agents/skills/test/SKILL.en.md +1 -1
- package/templates/.agents/skills/test/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/test-integration/SKILL.en.md +1 -1
- package/templates/.agents/skills/test-integration/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/update-agent-infra/SKILL.en.md +12 -2
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -2
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +344 -16
- package/templates/.agents/skills/upgrade-dependency/SKILL.en.md +1 -1
- package/templates/.agents/skills/upgrade-dependency/SKILL.zh-CN.md +1 -1
- package/templates/.agents/templates/task.en.md +2 -2
- package/templates/.agents/templates/task.zh-CN.md +2 -2
- package/templates/.claude/commands/create-issue.en.md +1 -1
- package/templates/.claude/commands/create-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/import-issue.en.md +1 -1
- package/templates/.claude/commands/import-issue.zh-CN.md +1 -1
- package/templates/.claude/commands/init-labels.en.md +1 -1
- package/templates/.claude/commands/init-labels.zh-CN.md +1 -1
- package/templates/.claude/commands/init-milestones.en.md +1 -1
- package/templates/.claude/commands/init-milestones.zh-CN.md +1 -1
- package/templates/.claude/commands/post-release.en.md +8 -0
- package/templates/.claude/commands/post-release.zh-CN.md +8 -0
- package/templates/.claude/commands/restore-task.en.md +1 -1
- package/templates/.claude/commands/restore-task.zh-CN.md +1 -1
- package/templates/.claude/hooks/check-version-format.sh +1 -1
- package/templates/.gemini/commands/_project_/create-issue.en.toml +1 -1
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.en.toml +1 -1
- package/templates/.gemini/commands/_project_/import-issue.zh-CN.toml +1 -1
- package/templates/.gemini/commands/_project_/init-labels.en.toml +2 -2
- package/templates/.gemini/commands/_project_/init-labels.zh-CN.toml +2 -2
- package/templates/.gemini/commands/_project_/init-milestones.en.toml +2 -2
- package/templates/.gemini/commands/_project_/init-milestones.zh-CN.toml +2 -2
- package/templates/.gemini/commands/_project_/post-release.en.toml +6 -0
- package/templates/.gemini/commands/_project_/post-release.zh-CN.toml +6 -0
- package/templates/.gemini/commands/_project_/restore-task.en.toml +1 -1
- package/templates/.gemini/commands/_project_/restore-task.zh-CN.toml +1 -1
- package/templates/{.github/hooks → .git-hooks}/check-version-format.sh +2 -2
- package/templates/.github/workflows/pr-label.yml +1 -1
- package/templates/.opencode/commands/create-issue.en.md +1 -1
- package/templates/.opencode/commands/create-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/import-issue.en.md +1 -1
- package/templates/.opencode/commands/import-issue.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-labels.en.md +1 -1
- package/templates/.opencode/commands/init-labels.zh-CN.md +1 -1
- package/templates/.opencode/commands/init-milestones.en.md +1 -1
- package/templates/.opencode/commands/init-milestones.zh-CN.md +1 -1
- package/templates/.opencode/commands/post-release.en.md +9 -0
- package/templates/.opencode/commands/post-release.zh-CN.md +9 -0
- package/templates/.opencode/commands/restore-task.en.md +1 -1
- package/templates/.opencode/commands/restore-task.zh-CN.md +1 -1
- /package/templates/{.github/hooks → .git-hooks}/pre-commit +0 -0
|
@@ -122,7 +122,7 @@ The script is responsible for:
|
|
|
122
122
|
|
|
123
123
|
### 9. Output Summary
|
|
124
124
|
|
|
125
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
125
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
126
126
|
|
|
127
127
|
```
|
|
128
128
|
Release v{version} prepared.
|
|
@@ -146,6 +146,11 @@ Next steps (manual):
|
|
|
146
146
|
- Claude Code / OpenCode: /create-release-note {version}
|
|
147
147
|
- Gemini CLI: /{{project}}:create-release-note {version}
|
|
148
148
|
- Codex CLI: $create-release-note {version}
|
|
149
|
+
|
|
150
|
+
4. (Optional) Run post-release follow-up tasks:
|
|
151
|
+
- Claude Code / OpenCode: /post-release
|
|
152
|
+
- Gemini CLI: /{{project}}:post-release
|
|
153
|
+
- Codex CLI: $post-release
|
|
149
154
|
```
|
|
150
155
|
|
|
151
156
|
### Rollback Instructions
|
|
@@ -122,7 +122,7 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
|
|
|
122
122
|
|
|
123
123
|
### 9. 输出摘要
|
|
124
124
|
|
|
125
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
125
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
126
126
|
|
|
127
127
|
```
|
|
128
128
|
版本 v{version} 已准备好发布。
|
|
@@ -146,6 +146,11 @@ bash .agents/skills/release/scripts/manage-milestones.sh "$MAJOR" "$MINOR" "$PAT
|
|
|
146
146
|
- Claude Code / OpenCode:/create-release-note {version}
|
|
147
147
|
- Gemini CLI:/{{project}}:create-release-note {version}
|
|
148
148
|
- Codex CLI:$create-release-note {version}
|
|
149
|
+
|
|
150
|
+
4.(可选)执行发布后处理:
|
|
151
|
+
- Claude Code / OpenCode:/post-release
|
|
152
|
+
- Gemini CLI:/{{project}}:post-release
|
|
153
|
+
- Codex CLI:$post-release
|
|
149
154
|
```
|
|
150
155
|
|
|
151
156
|
### 回滚说明
|
|
@@ -9,7 +9,7 @@ Restore local task workspace files from platform Issue comments that contain syn
|
|
|
9
9
|
|
|
10
10
|
## Boundary / Critical Rules
|
|
11
11
|
|
|
12
|
-
- Restore files only from comments
|
|
12
|
+
- Restore files only from comments that match the marker registry in `.agents/rules/issue-sync.md`
|
|
13
13
|
- Restore into `.agents/workspace/active/{task-id}/` by default
|
|
14
14
|
- Stop immediately if the target directory already exists and ask the user to resolve the conflict first
|
|
15
15
|
- After executing this skill, you **must** immediately update the restored `task.md`
|
|
@@ -31,16 +31,11 @@ Read all Issue comments by following the "Read Issue comments" command in `.agen
|
|
|
31
31
|
|
|
32
32
|
### 3. Determine the task-id and Files to Restore
|
|
33
33
|
|
|
34
|
-
Filter comments by
|
|
35
|
-
|
|
36
|
-
```html
|
|
37
|
-
<!-- sync-issue:{task-id}:{file-stem} -->
|
|
38
|
-
<!-- sync-issue:{task-id}:{file-stem}:{part}/{total} -->
|
|
39
|
-
```
|
|
34
|
+
Filter comments by the task, artifact, and chunked artifact markers defined in `.agents/rules/issue-sync.md`.
|
|
40
35
|
|
|
41
36
|
Rules:
|
|
42
37
|
- when `{task-id}` was provided, match only that task
|
|
43
|
-
- when `{task-id}` was omitted, infer it from the
|
|
38
|
+
- when `{task-id}` was omitted, infer it from the task comment marker first
|
|
44
39
|
- if you cannot determine a unique task-id, stop and tell the user
|
|
45
40
|
- ignore `summary` marker comments because they are complete-task aggregate output rather than restorable local task files
|
|
46
41
|
- map `{file-stem}` back to filenames:
|
|
@@ -58,7 +53,7 @@ Read `.agents/rules/issue-sync.md` before executing this step.
|
|
|
58
53
|
For each file:
|
|
59
54
|
- collect its single comment or chunked comments
|
|
60
55
|
- for `task.md` comments, reverse the `<details>` frontmatter wrapper described in issue-sync.md before reassembling the file body
|
|
61
|
-
- when
|
|
56
|
+
- when a chunk marker includes part and total indexes, sort by part and verify the set is complete
|
|
62
57
|
- extract the file body by removing the hidden marker, heading, and footer
|
|
63
58
|
- concatenate chunk bodies into the final file content
|
|
64
59
|
|
|
@@ -88,66 +83,20 @@ Update the restored `task.md`:
|
|
|
88
83
|
- `status`: `active`
|
|
89
84
|
- `assigned_to`: {current AI agent}
|
|
90
85
|
- `updated_at`: {current time}
|
|
91
|
-
- keep the original `current_step`
|
|
92
|
-
- append this entry to `## Activity Log`:
|
|
93
|
-
```
|
|
94
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Restore Task** by {agent} — Restored task from Issue #{issue-number}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 7. Verification Gate
|
|
98
|
-
|
|
99
|
-
Run the verification gate:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
node .agents/scripts/validate-artifact.js gate restore-task .agents/workspace/active/{task-id} --format text
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Handle the result as follows:
|
|
106
|
-
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
107
|
-
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
108
|
-
- exit code 2 (network blocked) -> stop and tell the user that human intervention is required
|
|
109
86
|
|
|
110
|
-
|
|
87
|
+
Append an Activity Log entry indicating the task was restored from the platform Issue.
|
|
111
88
|
|
|
112
|
-
###
|
|
89
|
+
### 7. Inform User
|
|
113
90
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
117
|
-
|
|
118
|
-
Output format:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
Task {task-id} was restored from Issue #{issue-number}.
|
|
122
|
-
|
|
123
|
-
Summary:
|
|
124
|
-
- Restored files: {count}
|
|
125
|
-
- Task directory: .agents/workspace/active/{task-id}/
|
|
126
|
-
- Current step: {current_step}
|
|
127
|
-
|
|
128
|
-
Next step - check task status:
|
|
129
|
-
- Claude Code / OpenCode: /check-task {task-id}
|
|
130
|
-
- Gemini CLI: /{{project}}:check-task {task-id}
|
|
131
|
-
- Codex CLI: $check-task {task-id}
|
|
132
|
-
```
|
|
91
|
+
Report the restored task id, restored file count, and the active task directory.
|
|
133
92
|
|
|
134
93
|
## Completion Checklist
|
|
135
94
|
|
|
136
|
-
- [ ] Fetched
|
|
137
|
-
- [ ] Restored
|
|
138
|
-
- [ ] Updated
|
|
139
|
-
- [ ]
|
|
140
|
-
- [ ] Showed the next-step commands in every TUI format
|
|
141
|
-
|
|
142
|
-
## STOP
|
|
143
|
-
|
|
144
|
-
Stop after completing the checklist. Do not continue the workflow automatically.
|
|
95
|
+
- [ ] Fetched Issue comments from the platform
|
|
96
|
+
- [ ] Restored task files locally
|
|
97
|
+
- [ ] Updated restored task metadata
|
|
98
|
+
- [ ] Reported the restored directory
|
|
145
99
|
|
|
146
|
-
|
|
100
|
+
### 8. Stop
|
|
147
101
|
|
|
148
|
-
|
|
149
|
-
- Platform CLI unavailable or unauthenticated
|
|
150
|
-
- No sync-marked comments found
|
|
151
|
-
- Unable to determine a unique `task-id`
|
|
152
|
-
- Target directory already exists
|
|
153
|
-
- Missing chunks or incomplete chunk ordering
|
|
102
|
+
Stop after the completion checklist. Do not commit automatically.
|
|
@@ -9,7 +9,7 @@ description: "从平台 Issue 评论还原本地任务文件"
|
|
|
9
9
|
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- 只从匹配 `.agents/rules/issue-sync.md` 标记注册表的评论恢复文件
|
|
13
13
|
- 默认恢复到 `.agents/workspace/active/{task-id}/`
|
|
14
14
|
- 如果目标目录已存在,立即停止并提示用户先处理目录冲突
|
|
15
15
|
- 执行本技能后,你**必须**立即更新恢复出的 `task.md`
|
|
@@ -31,16 +31,11 @@ description: "从平台 Issue 评论还原本地任务文件"
|
|
|
31
31
|
|
|
32
32
|
### 3. 确定 task-id 与待恢复文件
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
```html
|
|
37
|
-
<!-- sync-issue:{task-id}:{file-stem} -->
|
|
38
|
-
<!-- sync-issue:{task-id}:{file-stem}:{part}/{total} -->
|
|
39
|
-
```
|
|
34
|
+
按 `.agents/rules/issue-sync.md` 中定义的 task、artifact 和分片 artifact 标记筛选评论。
|
|
40
35
|
|
|
41
36
|
处理规则:
|
|
42
37
|
- 用户提供了 `{task-id}` 时,仅匹配该任务
|
|
43
|
-
- 未提供时,优先从
|
|
38
|
+
- 未提供时,优先从 task 评论标记推断
|
|
44
39
|
- 若找不到唯一 task-id,立即停止并告知用户
|
|
45
40
|
- 忽略 `summary` 标记评论;它是 complete-task 的聚合产物,不对应本地任务文件
|
|
46
41
|
- 将 `{file-stem}` 映射回文件名:
|
|
@@ -58,7 +53,7 @@ description: "从平台 Issue 评论还原本地任务文件"
|
|
|
58
53
|
对每个文件执行:
|
|
59
54
|
- 收集单条评论或分片评论
|
|
60
55
|
- 对 `task.md` 评论按 issue-sync.md 中的 `<details>` frontmatter 格式反向拆解,提取 frontmatter 后再与正文拼合
|
|
61
|
-
-
|
|
56
|
+
- 如分片标记中存在 part 和 total 序号,按 part 升序排序并校验分片完整
|
|
62
57
|
- 从评论正文中提取文件内容,去掉隐藏标记、标题和页脚
|
|
63
58
|
- 拼接得到最终文件内容
|
|
64
59
|
|
|
@@ -88,66 +83,20 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
88
83
|
- `status`:`active`
|
|
89
84
|
- `assigned_to`:{当前 AI 代理}
|
|
90
85
|
- `updated_at`:{当前时间}
|
|
91
|
-
- 保留原 `current_step`
|
|
92
|
-
- 在 `## 活动日志` 追加:
|
|
93
|
-
```
|
|
94
|
-
- {YYYY-MM-DD HH:mm:ss±HH:MM} — **Restore Task** by {agent} — Restored task from Issue #{issue-number}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### 7. 完成校验
|
|
98
|
-
|
|
99
|
-
运行完成校验:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
node .agents/scripts/validate-artifact.js gate restore-task .agents/workspace/active/{task-id} --format text
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
处理结果:
|
|
106
|
-
- 退出码 0(全部通过)-> 继续到「告知用户」步骤
|
|
107
|
-
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
108
|
-
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
109
86
|
|
|
110
|
-
|
|
87
|
+
追加 Activity Log,说明任务已从平台 Issue 还原。
|
|
111
88
|
|
|
112
|
-
###
|
|
89
|
+
### 7. 告知用户
|
|
113
90
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。
|
|
117
|
-
|
|
118
|
-
输出格式:
|
|
119
|
-
|
|
120
|
-
```text
|
|
121
|
-
任务 {task-id} 已从 Issue #{issue-number} 还原。
|
|
122
|
-
|
|
123
|
-
摘要:
|
|
124
|
-
- 恢复文件:{数量}
|
|
125
|
-
- 任务目录:.agents/workspace/active/{task-id}/
|
|
126
|
-
- 当前步骤:{current_step}
|
|
127
|
-
|
|
128
|
-
下一步 - 查看任务状态:
|
|
129
|
-
- Claude Code / OpenCode:/check-task {task-id}
|
|
130
|
-
- Gemini CLI:/{{project}}:check-task {task-id}
|
|
131
|
-
- Codex CLI:$check-task {task-id}
|
|
132
|
-
```
|
|
91
|
+
报告已恢复的 task id、恢复文件数量和 active task 目录。
|
|
133
92
|
|
|
134
93
|
## 完成检查清单
|
|
135
94
|
|
|
136
|
-
- [ ]
|
|
137
|
-
- [ ]
|
|
138
|
-
- [ ]
|
|
139
|
-
- [ ]
|
|
140
|
-
- [ ] 已向用户展示所有 TUI 格式的下一步命令
|
|
141
|
-
|
|
142
|
-
## 停止
|
|
143
|
-
|
|
144
|
-
完成检查清单后立即停止。不要自动继续执行工作流。
|
|
95
|
+
- [ ] 已从平台获取 Issue 评论
|
|
96
|
+
- [ ] 已恢复本地任务文件
|
|
97
|
+
- [ ] 已更新恢复出的任务元数据
|
|
98
|
+
- [ ] 已报告恢复目录
|
|
145
99
|
|
|
146
|
-
|
|
100
|
+
### 8. 停止
|
|
147
101
|
|
|
148
|
-
|
|
149
|
-
- 平台 CLI 未认证
|
|
150
|
-
- 找不到带 sync 标记的评论
|
|
151
|
-
- 无法唯一确定 `task-id`
|
|
152
|
-
- 目标目录已存在
|
|
153
|
-
- 分片缺失或顺序不完整
|
|
102
|
+
完成检查清单后立即停止。不要自动提交。
|
|
@@ -56,7 +56,7 @@ Update task.md and append:
|
|
|
56
56
|
If task.md contains a valid `issue_number`, perform these sync actions (skip and continue on any failure):
|
|
57
57
|
- Read `.agents/rules/issue-sync.md` before syncing, and complete upstream repository detection plus permission detection
|
|
58
58
|
- Set `status: in-progress` by following issue-sync.md
|
|
59
|
-
- Create or update the
|
|
59
|
+
- Create or update the task comment marker defined in `.agents/rules/issue-sync.md` (follow the task.md comment sync rule in issue-sync.md)
|
|
60
60
|
- Publish the `{review-artifact}` comment
|
|
61
61
|
|
|
62
62
|
### 7. Verification Gate
|
|
@@ -86,7 +86,7 @@ Choose exactly one branch based on the findings:
|
|
|
86
86
|
|
|
87
87
|
> The full four-branch output templates, selection rules, and prohibition clauses live in `reference/output-templates.md`. Read `reference/output-templates.md` before reporting the review result.
|
|
88
88
|
|
|
89
|
-
Include all TUI command formats in the next-step output.
|
|
89
|
+
Include all TUI command formats in the next-step output. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
90
90
|
|
|
91
91
|
## Completion Checklist
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ Include all TUI command formats in the next-step output.
|
|
|
94
94
|
- [ ] Created `{review-artifact}`
|
|
95
95
|
- [ ] Updated task.md and appended the Activity Log entry
|
|
96
96
|
- [ ] Chose exactly one verdict branch in the user output
|
|
97
|
-
- [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
|
|
97
|
+
- [ ] Informed the user of the next step (must include all TUI command formats, including any custom TUIs; do not filter)
|
|
98
98
|
|
|
99
99
|
## Notes
|
|
100
100
|
|
|
@@ -56,7 +56,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
56
56
|
如果 task.md 中存在有效的 `issue_number`,执行以下同步操作(任一失败则跳过并继续):
|
|
57
57
|
- 执行前先读取 `.agents/rules/issue-sync.md`,完成 upstream 仓库检测和权限检测
|
|
58
58
|
- 按 issue-sync.md 设置 `status: in-progress`
|
|
59
|
-
- 创建或更新
|
|
59
|
+
- 创建或更新 `.agents/rules/issue-sync.md` 中定义的 task 评论标记(按 issue-sync.md 的 task.md 评论同步规则)
|
|
60
60
|
- 发布 `{review-artifact}` 评论
|
|
61
61
|
|
|
62
62
|
### 7. 完成校验
|
|
@@ -86,7 +86,7 @@ node .agents/scripts/validate-artifact.js gate review-task .agents/workspace/act
|
|
|
86
86
|
|
|
87
87
|
> 完整的 4 分支输出模板、判断规则和禁止条款见 `reference/output-templates.md`。向用户汇报审查结论前先读取 `reference/output-templates.md`。
|
|
88
88
|
|
|
89
|
-
向用户展示下一步时,必须包含所有 TUI
|
|
89
|
+
向用户展示下一步时,必须包含所有 TUI 命令格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
90
90
|
|
|
91
91
|
## 完成检查清单
|
|
92
92
|
|
|
@@ -94,7 +94,7 @@ node .agents/scripts/validate-artifact.js gate review-task .agents/workspace/act
|
|
|
94
94
|
- [ ] 已创建 `{review-artifact}`
|
|
95
95
|
- [ ] 已更新 task.md 并追加 Activity Log
|
|
96
96
|
- [ ] 用户输出中只选择了一个审查结论分支
|
|
97
|
-
- [ ] 告知了用户下一步(必须展示所有 TUI
|
|
97
|
+
- [ ] 告知了用户下一步(必须展示所有 TUI 的命令格式,含自定义 TUI,不要筛选)
|
|
98
98
|
|
|
99
99
|
## 注意事项
|
|
100
100
|
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
"verify_comment_content": true,
|
|
37
37
|
"verify_task_comment_content": true,
|
|
38
38
|
"verify_issue_type": true,
|
|
39
|
-
"verify_milestone": true
|
|
39
|
+
"verify_milestone": true,
|
|
40
|
+
"expected_status_label_key": "inProgress",
|
|
41
|
+
"expected_comment_marker_key": "artifact"
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
}
|
|
@@ -49,7 +49,7 @@ If tests fail:
|
|
|
49
49
|
|
|
50
50
|
After tests pass, suggest committing the changes:
|
|
51
51
|
|
|
52
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
52
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
53
53
|
|
|
54
54
|
```
|
|
55
55
|
Next step - commit changes:
|
|
@@ -49,7 +49,7 @@ description: "执行项目完整测试流程"
|
|
|
49
49
|
|
|
50
50
|
测试通过后,建议提交变更:
|
|
51
51
|
|
|
52
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
52
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
53
53
|
|
|
54
54
|
```
|
|
55
55
|
下一步 - 提交代码:
|
|
@@ -50,7 +50,7 @@ If tests fail:
|
|
|
50
50
|
|
|
51
51
|
After tests pass, suggest committing the changes:
|
|
52
52
|
|
|
53
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
53
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
Next step - commit changes:
|
|
@@ -50,7 +50,7 @@ description: "执行项目集成测试流程"
|
|
|
50
50
|
|
|
51
51
|
测试通过后,建议提交变更:
|
|
52
52
|
|
|
53
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
53
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
54
54
|
|
|
55
55
|
```
|
|
56
56
|
下一步 - 提交代码:
|
|
@@ -24,7 +24,11 @@ Execute the following command to handle all deterministic steps at once:
|
|
|
24
24
|
node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
The script reads `.agents/.airc.json
|
|
27
|
+
The script reads `.agents/.airc.json` and automatically locates the installed
|
|
28
|
+
`@fitlab-ai/agent-infra/templates/` directory via npm. Before syncing, it merges
|
|
29
|
+
external template sources from `templates.sources`; built-in templates win over
|
|
30
|
+
same-path external files, and later external sources win over earlier external
|
|
31
|
+
sources. Conflicts are recorded in the report. The script then performs:
|
|
28
32
|
- detect the template source version
|
|
29
33
|
- File registry sync (`defaults.json` → `.agents/.airc.json`)
|
|
30
34
|
- All managed files (language selection → exclude merged/ejected → placeholder rendering → overwrite)
|
|
@@ -37,7 +41,12 @@ The script outputs JSON to stdout. Parse and record the report.
|
|
|
37
41
|
- `error`: error message (if non-empty, stop and report)
|
|
38
42
|
- `templateVersion`: current template source version
|
|
39
43
|
- `templateRoot`: absolute path to the template file root directory
|
|
44
|
+
- `templateSources.conflicts`: external template source conflicts; explicitly
|
|
45
|
+
list these in the report so users know which files were ignored because a
|
|
46
|
+
built-in template or later external source won
|
|
40
47
|
- `managed.written` / `managed.created`: updated / newly created managed files
|
|
48
|
+
- `managed.removed`: deleted managed files (including old paths removed during template migrations)
|
|
49
|
+
- `managed.skippedPlatform`: managed / merged entries skipped because they belong to a different platform
|
|
41
50
|
- `merged.pending`: list of merged files for AI to process
|
|
42
51
|
- Each item has `target` (project-relative path) and `template` (template-root-relative path)
|
|
43
52
|
- `registryAdded`: newly added file registry entries
|
|
@@ -124,6 +133,7 @@ warning to the end of the report:
|
|
|
124
133
|
Based on the script report and merged results, output a complete update report including:
|
|
125
134
|
- Template version change
|
|
126
135
|
- File registry additions
|
|
136
|
+
- External template source conflicts, when `templateSources.conflicts` is non-empty
|
|
127
137
|
- Managed file change details (updated, created, skipped merged files)
|
|
128
138
|
- Merged file results (conflicts, remaining TODOs)
|
|
129
139
|
- Ejected file processing
|
|
@@ -131,7 +141,7 @@ Based on the script report and merged results, output a complete update report i
|
|
|
131
141
|
|
|
132
142
|
If there are changes to submit, add:
|
|
133
143
|
|
|
134
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
144
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent. If `.agents/.airc.json` configures custom TUIs (via `customTUIs`), read each tool's `name` and `invoke`, then add the matching command line in the same format (`${skillName}` becomes the skill name and `${projectName}` becomes the project name).
|
|
135
145
|
|
|
136
146
|
```
|
|
137
147
|
Next step - commit changes:
|
|
@@ -22,7 +22,7 @@ description: "更新项目 AI 协作配置"
|
|
|
22
22
|
node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
脚本读取 `.agents/.airc.json`,并通过 npm 自动定位已安装的 `@fitlab-ai/agent-infra/templates/`
|
|
25
|
+
脚本读取 `.agents/.airc.json`,并通过 npm 自动定位已安装的 `@fitlab-ai/agent-infra/templates/` 目录。同步前会合并 `templates.sources` 中配置的外部模板源;相同文件以内置模板为准,多个外部源之间后者覆盖前者,冲突会写入报告。然后自动完成:
|
|
26
26
|
- 检测模板源版本
|
|
27
27
|
- 同步文件注册表(`defaults.json` → `.agents/.airc.json`)
|
|
28
28
|
- 处理所有 managed 文件(语言选择 → 排除 merged/ejected → 占位符渲染 → 覆盖写入)
|
|
@@ -35,7 +35,10 @@ node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
|
35
35
|
- `error`:错误信息(如非空则停止并报告)
|
|
36
36
|
- `templateVersion`:模板源当前版本
|
|
37
37
|
- `templateRoot`:模板文件根目录绝对路径
|
|
38
|
+
- `templateSources.conflicts`:外部模板源冲突列表;报告中必须显式展示,说明哪些文件因内置模板或后续外部源获胜而被忽略
|
|
38
39
|
- `managed.written` / `managed.created`:已更新/新建的 managed 文件
|
|
40
|
+
- `managed.removed`:被删除的 managed 文件(包括模板迁移时移除的旧路径)
|
|
41
|
+
- `managed.skippedPlatform`:因归属其他平台而被跳过的 managed / merged 条目
|
|
39
42
|
- `merged.pending`:需要 AI 处理的 merged 文件列表
|
|
40
43
|
- 每项包含 `target`(项目中的目标路径)和 `template`(模板根目录下的相对路径)
|
|
41
44
|
- `registryAdded`:新增的文件注册条目
|
|
@@ -114,6 +117,7 @@ node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
|
114
117
|
基于脚本报告和 merged 合并结果,输出完整的更新报告,包括:
|
|
115
118
|
- 模板版本变更
|
|
116
119
|
- 文件注册表新增条目
|
|
120
|
+
- 外部模板源冲突(如 `templateSources.conflicts` 非空,必须逐项列出)
|
|
117
121
|
- managed 文件变更明细(已更新、新建、跳过的 merged 文件)
|
|
118
122
|
- merged 文件合并结果(冲突、残余 TODO)
|
|
119
123
|
- ejected 文件处理
|
|
@@ -121,7 +125,7 @@ node .agents/skills/update-agent-infra/scripts/sync-templates.js
|
|
|
121
125
|
|
|
122
126
|
如有变更需要提交,追加:
|
|
123
127
|
|
|
124
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
128
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
125
129
|
|
|
126
130
|
```
|
|
127
131
|
下一步 - 提交代码:
|