@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
|
@@ -61,7 +61,7 @@ Confirm? (y/N)
|
|
|
61
61
|
|
|
62
62
|
Dismiss the alert by following the Code Scanning dismiss command in `.agents/rules/security-alerts.md`, passing the mapped `{api-reason}` and the user's explanation.
|
|
63
63
|
|
|
64
|
-
**API reason mapping** (per the
|
|
64
|
+
**API reason mapping** (per the Code Scanning API):
|
|
65
65
|
- False Positive -> `false positive`
|
|
66
66
|
- Won't Fix -> `won't fix`
|
|
67
67
|
- Used in Tests -> `used in tests`
|
|
@@ -84,7 +84,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
84
84
|
|
|
85
85
|
### 8. Inform User
|
|
86
86
|
|
|
87
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
87
|
+
> **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).
|
|
88
88
|
|
|
89
89
|
```
|
|
90
90
|
Code Scanning alert #{alert-number} dismissed.
|
|
@@ -96,7 +96,7 @@ Explanation: {explanation}
|
|
|
96
96
|
|
|
97
97
|
View: {html_url}
|
|
98
98
|
|
|
99
|
-
Note: it can be reopened on
|
|
99
|
+
Note: it can be reopened on the platform if necessary.
|
|
100
100
|
|
|
101
101
|
Next step - complete and archive the task if a related task exists:
|
|
102
102
|
- Claude Code / OpenCode: /complete-task {task-id}
|
|
@@ -61,7 +61,7 @@ Code Scanning 告警 #{alert-number}
|
|
|
61
61
|
|
|
62
62
|
按 `.agents/rules/security-alerts.md` 中的 Code Scanning 告警关闭命令执行关闭操作,并传入映射后的 `{api-reason}` 与用户说明。
|
|
63
63
|
|
|
64
|
-
**API reason 映射**(按
|
|
64
|
+
**API reason 映射**(按 Code Scanning API):
|
|
65
65
|
- 误报 -> `false positive`
|
|
66
66
|
- 不会修复 -> `won't fix`
|
|
67
67
|
- 测试代码 -> `used in tests`
|
|
@@ -84,7 +84,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
84
84
|
|
|
85
85
|
### 8. 告知用户
|
|
86
86
|
|
|
87
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
87
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
88
88
|
|
|
89
89
|
```
|
|
90
90
|
Code Scanning 告警 #{alert-number} 已关闭。
|
|
@@ -96,7 +96,7 @@ Code Scanning 告警 #{alert-number} 已关闭。
|
|
|
96
96
|
|
|
97
97
|
查看:{html_url}
|
|
98
98
|
|
|
99
|
-
注意:如有需要,可在
|
|
99
|
+
注意:如有需要,可在 平台上重新打开。
|
|
100
100
|
|
|
101
101
|
下一步 - 完成并归档任务(如有关联任务):
|
|
102
102
|
- Claude Code / OpenCode:/complete-task {task-id}
|
|
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
92
92
|
|
|
93
93
|
### 8. Inform User
|
|
94
94
|
|
|
95
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
95
|
+
> **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).
|
|
96
96
|
|
|
97
97
|
```
|
|
98
98
|
Security alert #{alert-number} dismissed.
|
|
@@ -92,7 +92,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
92
92
|
|
|
93
93
|
### 8. 告知用户
|
|
94
94
|
|
|
95
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
95
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
96
96
|
|
|
97
97
|
```
|
|
98
98
|
安全告警 #{alert-number} 已关闭。
|
|
@@ -44,7 +44,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
44
44
|
|
|
45
45
|
> The full four-case status matrix, prerequisite checks, and multi-TUI next-step commands live in `reference/task-status-update.md`. Read `reference/task-status-update.md` before updating task state.
|
|
46
46
|
|
|
47
|
-
> **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`.
|
|
47
|
+
> **IMPORTANT**: When showing the next step, output every TUI command format in full and directly use the standard template from `reference/task-status-update.md`. 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).
|
|
48
48
|
|
|
49
49
|
Append the Commit Activity Log entry and choose exactly one next-step case:
|
|
50
50
|
- final commit -> `complete-task {task-id}`
|
|
@@ -64,7 +64,7 @@ Failure handling matches "Update Task Status When Applicable": warn, but do **no
|
|
|
64
64
|
|
|
65
65
|
## 7. Sync PR Summary When Applicable
|
|
66
66
|
|
|
67
|
-
When `{task-id}` exists and task.md contains a valid `pr_number`, refresh the PR summary comment
|
|
67
|
+
When `{task-id}` exists and task.md contains a valid `pr_number`, refresh the PR summary comment marked with the PR summary marker defined in `.agents/rules/pr-sync.md` on the PR. Otherwise, skip this step.
|
|
68
68
|
|
|
69
69
|
> The full trigger conditions, aggregation rules, PATCH/POST flow, shell-safety constraints, and error handling live in `reference/pr-summary-sync.md` (which in turn points to `.agents/rules/pr-sync.md`). Read `reference/pr-summary-sync.md` before executing this step.
|
|
70
70
|
>
|
|
@@ -44,7 +44,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
44
44
|
|
|
45
45
|
> 完整的 4 种状态分支、前置条件检查和多 TUI 下一步命令见 `reference/task-status-update.md`。更新任务状态前,先读取 `reference/task-status-update.md`。
|
|
46
46
|
|
|
47
|
-
> **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md`
|
|
47
|
+
> **重要**:向用户展示下一步时,必须完整输出所有 TUI 命令格式,并直接使用 `reference/task-status-update.md` 中对应场景的标准模板。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
48
48
|
|
|
49
49
|
追加 Commit 的 Activity Log,并且只能选择一个下一步分支:
|
|
50
50
|
- 最终提交 -> `complete-task {task-id}`
|
|
@@ -64,7 +64,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
64
64
|
|
|
65
65
|
## 7. 同步 PR 摘要(按需)
|
|
66
66
|
|
|
67
|
-
当 `{task-id}` 存在且 task.md 包含有效 `pr_number` 时,刷新 PR
|
|
67
|
+
当 `{task-id}` 存在且 task.md 包含有效 `pr_number` 时,刷新 PR 上由 `.agents/rules/pr-sync.md` 中定义的 PR 摘要评论标记对应的摘要评论;否则跳过。
|
|
68
68
|
|
|
69
69
|
> 完整的触发条件、聚合规则、PATCH/POST 流程、Shell 安全约束和错误处理见 `reference/pr-summary-sync.md`(其内联引用 `.agents/rules/pr-sync.md`)。执行此步骤前先读取 `reference/pr-summary-sync.md`。
|
|
70
70
|
>
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"when": "pr_number_exists",
|
|
22
22
|
"expected_pr_comment_marker": "<!-- sync-pr:{task-id}:summary -->",
|
|
23
23
|
"verify_in_labels_computed": true,
|
|
24
|
-
"verify_pr_comment_last_commit_matches_head": true
|
|
24
|
+
"verify_pr_comment_last_commit_matches_head": true,
|
|
25
|
+
"expected_pr_comment_marker_key": "prSummary"
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
}
|
|
@@ -93,7 +93,7 @@ If a valid `issue_number` exists:
|
|
|
93
93
|
- First scan and backfill unpublished `task.md`, `analysis*.md`, `plan*.md`, `implementation*.md`, `review*.md`, and `refinement*.md` comments using the backfill rules in `.agents/rules/issue-sync.md` (`task.md` uses the idempotent update path)
|
|
94
94
|
- Backfill checked `## Requirements` items to the Issue body by following the requirements-checkbox sync steps in issue-sync.md
|
|
95
95
|
- Do not set any `status:` label — status labels are automatically cleared when the Issue is closed
|
|
96
|
-
- Finally create or update the summary comment marked with
|
|
96
|
+
- Finally create or update the summary comment marked with the summary marker defined in `.agents/rules/issue-sync.md`
|
|
97
97
|
|
|
98
98
|
### 7. Verification Gate
|
|
99
99
|
|
|
@@ -93,7 +93,7 @@ ls .agents/workspace/completed/{task-id}/task.md
|
|
|
93
93
|
- 先按 `.agents/rules/issue-sync.md` 的补发规则扫描并补发未发布的 `task.md`、`analysis*.md`、`plan*.md`、`implementation*.md`、`review*.md`、`refinement*.md` 评论(`task.md` 走幂等更新路径)
|
|
94
94
|
- 按 issue-sync.md 的需求复选框同步步骤,兜底同步 `## 需求` 中已勾选的条目到 Issue body
|
|
95
95
|
- 不要设置 `status:` label — Issue 关闭后 status label 会被自动清除
|
|
96
|
-
- 最后创建或更新
|
|
96
|
+
- 最后创建或更新 `.agents/rules/issue-sync.md` 中定义的 summary 评论标记对应的 summary 评论
|
|
97
97
|
|
|
98
98
|
### 7. 完成校验
|
|
99
99
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-issue
|
|
3
|
-
description: "Create
|
|
3
|
+
description: "Create an Issue from a task file"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Create Issue
|
|
7
7
|
|
|
8
|
-
Create the base
|
|
8
|
+
Create the base Issue from `task.md` and write `issue_number` back to the task.
|
|
9
9
|
|
|
10
10
|
## Boundary / Critical Rules
|
|
11
11
|
|
|
12
12
|
- Build the Issue title and body from `task.md` only
|
|
13
13
|
- Issue title format: `type(scope): description` - map `type` from task.md (`feature` -> `feat`, `bugfix` -> `fix`, `refactor` -> `refactor`, `docs` -> `docs`, `chore` -> `chore`), infer scope from the affected module (omit it if unclear), and use the task title from task.md verbatim for the description (do not translate or rewrite)
|
|
14
14
|
- Do not read `analysis.md`, `plan.md`, `implementation.md`, or review artifacts
|
|
15
|
-
- The only durable outputs are the
|
|
15
|
+
- The only durable outputs are the Issue and the `issue_number` update in task.md
|
|
16
16
|
- After executing this skill, you **must** immediately update task.md
|
|
17
17
|
|
|
18
18
|
## Steps
|
|
@@ -31,7 +31,7 @@ Extract the title, `## Description`, `## Requirements`, `type`, and `milestone`
|
|
|
31
31
|
|
|
32
32
|
### 3. Build Issue Content
|
|
33
33
|
|
|
34
|
-
Detect `.
|
|
34
|
+
Detect Issue templates through `.agents/rules/issue-pr-commands.md` and decide whether to use a matched template path or the fallback path.
|
|
35
35
|
|
|
36
36
|
> Template detection, field mapping for `textarea`, `input`, `dropdown`, and `checkboxes`, and the fallback body rules live in `reference/template-matching.md`. Read `reference/template-matching.md` before building the body.
|
|
37
37
|
|
|
@@ -57,7 +57,7 @@ Write back `issue_number`, update `updated_at`, and append the Create Issue Acti
|
|
|
57
57
|
|
|
58
58
|
If artifact files already exist in the task directory, backfill them in this order:
|
|
59
59
|
|
|
60
|
-
1. `task.md` ->
|
|
60
|
+
1. `task.md` -> the task comment marker defined in `.agents/rules/issue-sync.md` (idempotent create or update)
|
|
61
61
|
2. Backfill existing `analysis*.md`, `plan*.md`, `implementation*.md`, `review*.md`, and `refinement*.md` files in filename order
|
|
62
62
|
|
|
63
63
|
Every backfill action must follow the raw publishing, task.md sync, and chunking rules in `.agents/rules/issue-sync.md`.
|
|
@@ -81,7 +81,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
81
81
|
|
|
82
82
|
> Execute this step only after the verification gate passes.
|
|
83
83
|
|
|
84
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
84
|
+
> **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).
|
|
85
85
|
|
|
86
86
|
Show the Issue number, URL, labels, Issue Type, milestone result, confirm that `issue_number` was written back, and include the next-step commands in every TUI format:
|
|
87
87
|
|
|
@@ -94,11 +94,11 @@ Next step - run requirements analysis:
|
|
|
94
94
|
|
|
95
95
|
## Completion Checklist
|
|
96
96
|
|
|
97
|
-
- [ ] Created the
|
|
97
|
+
- [ ] Created the Issue
|
|
98
98
|
- [ ] Used `task.md` as the only content source
|
|
99
99
|
- [ ] Recorded `issue_number` in task.md
|
|
100
100
|
- [ ] Updated `updated_at` and appended the Activity Log entry
|
|
101
|
-
- [ ] Included all TUI formats for the next-step commands
|
|
101
|
+
- [ ] Included all TUI formats, including any custom TUIs, for the next-step commands
|
|
102
102
|
|
|
103
103
|
## STOP
|
|
104
104
|
|
|
@@ -106,13 +106,13 @@ Stop after the checklist. Do not start detailed progress sync here.
|
|
|
106
106
|
|
|
107
107
|
## Notes
|
|
108
108
|
|
|
109
|
-
- `create-issue` creates the base Issue; later status, comments, and checkboxes are maintained by workflow skills and
|
|
109
|
+
- `create-issue` creates the base Issue; later status, comments, and checkboxes are maintained by workflow skills and platform automation
|
|
110
110
|
- If no valid labels survive filtering, create the Issue without labels instead of failing
|
|
111
111
|
- If Issue Type or milestone setup fails, continue and record the fallback outcome
|
|
112
112
|
|
|
113
113
|
## Error Handling
|
|
114
114
|
|
|
115
115
|
- Task not found: `Task {task-id} not found`
|
|
116
|
-
-
|
|
116
|
+
- the platform CLI unavailable or unauthenticated
|
|
117
117
|
- Empty description in task.md
|
|
118
118
|
- Issue creation failure
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-issue
|
|
3
|
-
description: "从任务文件创建
|
|
3
|
+
description: "从任务文件创建 Issue"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 创建 Issue
|
|
7
7
|
|
|
8
|
-
仅从 `task.md` 创建基础
|
|
8
|
+
仅从 `task.md` 创建基础 Issue,并把 `issue_number` 回写到任务文件。
|
|
9
9
|
|
|
10
10
|
## 行为边界 / 关键规则
|
|
11
11
|
|
|
12
12
|
- Issue 标题和正文只能来自 `task.md`
|
|
13
13
|
- Issue 标题格式为 `type(scope): 描述`——type 从 task.md 的 `type` 字段映射(feature→feat, bugfix→fix, refactor→refactor, docs→docs, chore→chore),scope 从受影响模块推断(无法确定时省略),描述使用 task.md 中的任务标题原文(不要翻译或改写)
|
|
14
14
|
- 不要读取 `analysis.md`、`plan.md`、`implementation.md` 或审查产物
|
|
15
|
-
- 持久产物只有
|
|
15
|
+
- 持久产物只有 Issue 本身,以及 task.md 中的 `issue_number` 更新
|
|
16
16
|
- 执行本技能后,你**必须**立即更新 task.md
|
|
17
17
|
|
|
18
18
|
## 执行步骤
|
|
@@ -31,7 +31,7 @@ description: "从任务文件创建 GitHub Issue"
|
|
|
31
31
|
|
|
32
32
|
### 3. 构建 Issue 内容
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
通过 `.agents/rules/issue-pr-commands.md` 检测 Issue 模板,决定使用模板路径还是 fallback 路径。
|
|
35
35
|
|
|
36
36
|
> 模板识别、`textarea`、`input`、`dropdown`、`checkboxes` 字段映射,以及 fallback 正文规则见 `reference/template-matching.md`。构建正文前先读取 `reference/template-matching.md`。
|
|
37
37
|
|
|
@@ -57,7 +57,7 @@ date "+%Y-%m-%d %H:%M:%S%:z"
|
|
|
57
57
|
|
|
58
58
|
如果任务目录中已存在产物文件,按以下顺序补发:
|
|
59
59
|
|
|
60
|
-
1. `task.md` →
|
|
60
|
+
1. `task.md` → `.agents/rules/issue-sync.md` 中定义的 task 评论标记(幂等创建或更新)
|
|
61
61
|
2. 按文件名排序补发已存在的 `analysis*.md`、`plan*.md`、`implementation*.md`、`review*.md`、`refinement*.md`
|
|
62
62
|
|
|
63
63
|
所有补发动作都必须遵循 `.agents/rules/issue-sync.md` 的原文发布、task.md 同步和分片规则。
|
|
@@ -81,7 +81,7 @@ node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/ac
|
|
|
81
81
|
|
|
82
82
|
> 仅在校验通过后执行本步骤。
|
|
83
83
|
|
|
84
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
84
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
85
85
|
|
|
86
86
|
展示 Issue 编号、URL、labels、Issue Type、milestone 结果,确认 `issue_number` 已回写,并完整输出所有 TUI 里的下一步命令:
|
|
87
87
|
|
|
@@ -94,11 +94,11 @@ node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/ac
|
|
|
94
94
|
|
|
95
95
|
## 完成检查清单
|
|
96
96
|
|
|
97
|
-
- [ ] 已创建
|
|
97
|
+
- [ ] 已创建 Issue
|
|
98
98
|
- [ ] 已仅使用 `task.md` 作为内容来源
|
|
99
99
|
- [ ] 已在 task.md 中记录 `issue_number`
|
|
100
100
|
- [ ] 已更新 `updated_at` 并追加 Activity Log
|
|
101
|
-
- [ ] 已输出所有 TUI
|
|
101
|
+
- [ ] 已输出所有 TUI 格式的下一步命令(含自定义 TUI)
|
|
102
102
|
|
|
103
103
|
## 停止
|
|
104
104
|
|
|
@@ -106,13 +106,13 @@ node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/ac
|
|
|
106
106
|
|
|
107
107
|
## 注意事项
|
|
108
108
|
|
|
109
|
-
- `create-issue` 只负责创建基础 Issue;后续状态、评论和复选框由工作流技能与
|
|
109
|
+
- `create-issue` 只负责创建基础 Issue;后续状态、评论和复选框由工作流技能与 platform automation 维护
|
|
110
110
|
- 如果过滤后没有有效 label,允许不带 label 创建 Issue
|
|
111
111
|
- 如果 Issue Type 或 milestone 设置失败,继续执行并记录结果
|
|
112
112
|
|
|
113
113
|
## 错误处理
|
|
114
114
|
|
|
115
115
|
- 任务未找到:`Task {task-id} not found`
|
|
116
|
-
-
|
|
116
|
+
- the platform CLI 不可用或未认证
|
|
117
117
|
- task.md 的描述为空
|
|
118
118
|
- 创建 Issue 失败
|
|
@@ -17,11 +17,11 @@ Recommended fallback:
|
|
|
17
17
|
- [ ] {requirement-2}
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
Map task types to
|
|
20
|
+
Map task types to labels and Issue Types, but keep only labels that actually exist.
|
|
21
21
|
|
|
22
22
|
Fallback label mapping:
|
|
23
23
|
|
|
24
|
-
| task.md type |
|
|
24
|
+
| task.md type | label |
|
|
25
25
|
|---|---|
|
|
26
26
|
| `bug`, `bugfix` | `type: bug` |
|
|
27
27
|
| `feature` | `type: feature` |
|
|
@@ -34,7 +34,7 @@ Fallback label mapping:
|
|
|
34
34
|
|
|
35
35
|
Issue Type fallback mapping:
|
|
36
36
|
|
|
37
|
-
| task.md type |
|
|
37
|
+
| task.md type | Issue Type |
|
|
38
38
|
|---|---|
|
|
39
39
|
| `bug`, `bugfix` | `Bug` |
|
|
40
40
|
| `feature`, `enhancement` | `Feature` |
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
- [ ] {requirement-2}
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
将任务类型映射到
|
|
20
|
+
将任务类型映射到 label 和 Issue Type,但只保留仓库里实际存在的 label。
|
|
21
21
|
|
|
22
22
|
Fallback label 映射:
|
|
23
23
|
|
|
24
|
-
| task.md type |
|
|
24
|
+
| task.md type | label |
|
|
25
25
|
|---|---|
|
|
26
26
|
| `bug`, `bugfix` | `type: bug` |
|
|
27
27
|
| `feature` | `type: feature` |
|
|
@@ -34,7 +34,7 @@ Fallback label 映射:
|
|
|
34
34
|
|
|
35
35
|
Issue Type fallback 映射:
|
|
36
36
|
|
|
37
|
-
| task.md type |
|
|
37
|
+
| task.md type | Issue Type |
|
|
38
38
|
|---|---|
|
|
39
39
|
| `bug`, `bugfix` | `Bug` |
|
|
40
40
|
| `feature`, `enhancement` | `Feature` |
|
|
@@ -1,45 +1,17 @@
|
|
|
1
1
|
# Issue Template Matching
|
|
2
2
|
|
|
3
|
-
Read this file before deciding how to build the Issue body
|
|
3
|
+
Read this file before deciding how to build the Issue body.
|
|
4
4
|
|
|
5
5
|
## Detect Issue Templates
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Issue template detection is platform-specific. Read `.agents/rules/issue-pr-commands.md` and follow the template detection section provided by the configured platform.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
rg --files .github/ISSUE_TEMPLATE -g '*.yml' -g '!config.yml'
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
If templates exist, inspect their top-level `name:` fields and choose the best match for the task title and description.
|
|
14
|
-
|
|
15
|
-
Typical candidate templates:
|
|
16
|
-
- `bug_report.yml` for bug work
|
|
17
|
-
- `question.yml` for question or investigation work
|
|
18
|
-
- `feature_request.yml` for feature work
|
|
19
|
-
- `documentation.yml` for documentation work
|
|
20
|
-
- `other.yml` as the general fallback
|
|
9
|
+
If templates exist, inspect their top-level names and choose the best match for the task title and description. Use the candidate template guidance provided by the configured platform rule when available.
|
|
21
10
|
|
|
22
11
|
If no template matches clearly, choose the nearest candidate. If templates are missing, unreadable, or parsing fails, fall back to the default body path.
|
|
23
12
|
|
|
24
13
|
## Build the Body from the Matched Template
|
|
25
14
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
- `labels:`
|
|
30
|
-
- `body:`
|
|
31
|
-
|
|
32
|
-
Field handling rules:
|
|
33
|
-
- `textarea` and `input`: use `attributes.label` as the markdown heading and fill values from task.md
|
|
34
|
-
- `markdown`: skip template explanation prose
|
|
35
|
-
- `dropdown` and `checkboxes`: skip
|
|
36
|
-
- when task.md lacks a suitable value, write `N/A`
|
|
37
|
-
|
|
38
|
-
Suggested field mapping:
|
|
39
|
-
|
|
40
|
-
| Template field hint | task.md source |
|
|
41
|
-
|---|---|
|
|
42
|
-
| `summary`, `title` | task title |
|
|
43
|
-
| `description`, `problem`, `what happened`, `issue-description`, `current-content` | task description |
|
|
44
|
-
| `solution`, `requirements`, `steps`, `suggested-content`, `impact`, `context`, `alternatives`, `expected` | requirements list |
|
|
45
|
-
| other `textarea` / `input` fields | task description, otherwise `N/A` |
|
|
15
|
+
Build the body by following the field handling and field mapping guidance provided by the configured platform section in `.agents/rules/issue-pr-commands.md`.
|
|
16
|
+
|
|
17
|
+
When platform guidance is unavailable, use the default body path.
|
|
@@ -1,45 +1,17 @@
|
|
|
1
1
|
# Issue 模板匹配
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
在决定如何构建 Issue 正文前先读取本文件。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 检测 Issue 模板
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Issue 模板检测属于平台相关逻辑。先读取 `.agents/rules/issue-pr-commands.md`,并按当前配置平台提供的模板检测章节执行。
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
rg --files .github/ISSUE_TEMPLATE -g '*.yml' -g '!config.yml'
|
|
11
|
-
```
|
|
9
|
+
如果存在模板,检查其顶层名称,并根据任务标题和描述选择最匹配的模板。可用时,使用当前配置平台规则提供的候选模板指引。
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
如果没有清晰匹配,选择最接近的候选模板。模板不存在、无法读取或解析失败时,回退到默认正文路径。
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
- `bug_report.yml`:用于 bug 类工作
|
|
17
|
-
- `question.yml`:用于问题排查或调研类工作
|
|
18
|
-
- `feature_request.yml`:用于功能类工作
|
|
19
|
-
- `documentation.yml`:用于文档类工作
|
|
20
|
-
- `other.yml`:通用 fallback
|
|
13
|
+
## 从匹配模板构建正文
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
按 `.agents/rules/issue-pr-commands.md` 中当前配置平台章节提供的字段处理和字段映射指引构建正文。
|
|
23
16
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
读取匹配模板中的:
|
|
27
|
-
- `name`
|
|
28
|
-
- `type:`
|
|
29
|
-
- `labels:`
|
|
30
|
-
- `body:`
|
|
31
|
-
|
|
32
|
-
字段处理规则:
|
|
33
|
-
- `textarea` 和 `input`:使用 `attributes.label` 作为 Markdown 标题,并从 task.md 填充值
|
|
34
|
-
- `markdown`:跳过模板解释性文字
|
|
35
|
-
- `dropdown` 和 `checkboxes`:跳过
|
|
36
|
-
- 当 task.md 没有合适值时,写入 `N/A`
|
|
37
|
-
|
|
38
|
-
建议字段映射:
|
|
39
|
-
|
|
40
|
-
| 模板字段提示 | task.md 来源 |
|
|
41
|
-
|---|---|
|
|
42
|
-
| `summary`, `title` | 任务标题 |
|
|
43
|
-
| `description`, `problem`, `what happened`, `issue-description`, `current-content` | 任务描述 |
|
|
44
|
-
| `solution`, `requirements`, `steps`, `suggested-content`, `impact`, `context`, `alternatives`, `expected` | 需求列表 |
|
|
45
|
-
| 其他 `textarea` / `input` 字段 | 优先使用任务描述,否则写 `N/A` |
|
|
17
|
+
如果平台指引不可用,使用默认正文路径。
|
|
@@ -26,7 +26,7 @@ Use the explicit argument when provided. Otherwise infer the target branch from
|
|
|
26
26
|
|
|
27
27
|
### 3. Prepare the PR Body
|
|
28
28
|
|
|
29
|
-
Read `.
|
|
29
|
+
Read the PR template through `.agents/rules/issue-pr-commands.md`, review recent merged PRs for style, and gather all commits between `<target-branch>` and `HEAD`.
|
|
30
30
|
|
|
31
31
|
> Template handling, HEREDOC body generation, and `Generated with AI assistance` requirements live in `reference/pr-body-template.md`. Read `reference/pr-body-template.md` before writing the PR body.
|
|
32
32
|
|
|
@@ -93,7 +93,7 @@ Keep the gate output in your reply as fresh evidence. Do not claim completion wi
|
|
|
93
93
|
|
|
94
94
|
> Execute this step only after the verification gate passes.
|
|
95
95
|
|
|
96
|
-
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
96
|
+
> **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).
|
|
97
97
|
|
|
98
98
|
Explain the created PR URL, summarize metadata sync and summary-comment results, and recommend `complete-task {task-id}` once the workflow is truly done.
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ Explain the created PR URL, summarize metadata sync and summary-comment results,
|
|
|
101
101
|
|
|
102
102
|
- Review every commit in the branch, not only the latest one
|
|
103
103
|
- `create-pr` must not defer type-label mapping to another skill; inline the mapping here when `{task-id}` is available
|
|
104
|
-
- Keep the hidden summary marker as
|
|
104
|
+
- Keep the hidden summary marker as the PR summary marker defined in `.agents/rules/pr-sync.md` for compatibility with existing PR comments
|
|
105
105
|
- If the current branch already has a PR, show its URL and stop without repeating sync work
|
|
106
106
|
- When metadata inheritance from the Issue fails, continue with task.md and branch-based fallbacks
|
|
107
107
|
|
|
@@ -26,7 +26,7 @@ description: "创建 Pull Request 到目标分支"
|
|
|
26
26
|
|
|
27
27
|
### 3. 准备 PR 正文
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
通过 `.agents/rules/issue-pr-commands.md` 读取 PR 模板,参考最近合并的 PR 风格,并收集 `<target-branch>` 到 `HEAD` 的全部提交。
|
|
30
30
|
|
|
31
31
|
> 模板处理、HEREDOC 正文生成和 `Generated with AI assistance` 要求见 `reference/pr-body-template.md`。编写正文前先读取 `reference/pr-body-template.md`。
|
|
32
32
|
|
|
@@ -93,7 +93,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
93
93
|
|
|
94
94
|
> 仅在校验通过后执行本步骤。
|
|
95
95
|
|
|
96
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI
|
|
96
|
+
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
97
97
|
|
|
98
98
|
说明 PR URL、元数据同步结果、摘要评论结果,并在工作流真正完成后推荐执行 `complete-task {task-id}`。
|
|
99
99
|
|
|
@@ -101,7 +101,7 @@ node .agents/scripts/validate-artifact.js gate create-pr .agents/workspace/activ
|
|
|
101
101
|
|
|
102
102
|
- 必须检查分支中的全部提交,而不是只看最后一个
|
|
103
103
|
- `create-pr` 不能把 type label 映射委托给其他技能,必须在获取到 `{task-id}` 时于本技能内内联处理
|
|
104
|
-
- 隐藏 summary
|
|
104
|
+
- 隐藏 summary 标记必须保持为 `.agents/rules/pr-sync.md` 中定义的 PR 摘要评论标记,以兼容已有 PR 评论
|
|
105
105
|
- 如果当前分支已存在 PR,直接告知用户 PR URL 并结束,不做重复同步
|
|
106
106
|
- 如果从 Issue 继承元数据失败,继续使用 task.md 和分支推断兜底
|
|
107
107
|
|
|
@@ -4,15 +4,11 @@ Read this file before generating the PR title and body.
|
|
|
4
4
|
|
|
5
5
|
## Read the PR Template
|
|
6
6
|
|
|
7
|
-
Read `.
|
|
7
|
+
PR template discovery is platform-specific. Read `.agents/rules/issue-pr-commands.md` and follow the PR template section provided by the configured platform. If no template is available, use the standard format.
|
|
8
8
|
|
|
9
9
|
## Review Recent Merged PRs for Reference
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
gh pr list --limit 3 --state merged --json number,title,body
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Use the recent merged PRs as style and formatting references.
|
|
11
|
+
Use the recent merged PR query from `.agents/rules/issue-pr-commands.md` as style and formatting reference input.
|
|
16
12
|
|
|
17
13
|
## Analyze Current Branch Changes
|
|
18
14
|
|
|
@@ -27,19 +23,13 @@ git diff <target-branch>...HEAD
|
|
|
27
23
|
|
|
28
24
|
Read `.agents/rules/issue-pr-commands.md` before this step.
|
|
29
25
|
|
|
30
|
-
Before syncing linked Issue metadata, complete authentication and code-hosting platform detection through that rule.
|
|
31
|
-
|
|
32
|
-
Before syncing labels, verify the standard label system:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
gh label list --search "type:" --limit 1 --json name --jq 'length'
|
|
36
|
-
```
|
|
26
|
+
Before syncing linked Issue metadata, complete authentication and code-hosting platform detection through that rule.
|
|
37
27
|
|
|
38
|
-
If the result
|
|
28
|
+
Before syncing labels, verify the standard label system by following the label-list command in `.agents/rules/issue-pr-commands.md`. If the result shows no standard type labels, run `init-labels` before retrying metadata sync.
|
|
39
29
|
|
|
40
30
|
Type label mapping:
|
|
41
31
|
|
|
42
|
-
| task.md type |
|
|
32
|
+
| task.md type | label |
|
|
43
33
|
|---|---|
|
|
44
34
|
| `bug`, `bugfix` | `type: bug` |
|
|
45
35
|
| `feature` | `type: feature` |
|
|
@@ -54,7 +44,7 @@ Metadata sync order:
|
|
|
54
44
|
1. query Issue labels and milestone via the Issue read command in `.agents/rules/issue-pr-commands.md`
|
|
55
45
|
2. build `{label-args}` from the mapped type label, non-`type:` / non-`status:` Issue labels, and the current Issue `in:` labels (commit already computed them, so do not recompute them here and do not write back to the Issue)
|
|
56
46
|
3. build `{milestone-arg}` by following "Phase 3: `create-pr`" in `.agents/rules/milestone-inference.md` and reusing the Issue milestone directly
|
|
57
|
-
4. pass `{label-args}` and `{milestone-arg}` atomically
|
|
47
|
+
4. pass `{label-args}` and `{milestone-arg}` atomically by using the create-PR command template and permission-degradation rules in `.agents/rules/issue-pr-commands.md`
|
|
58
48
|
5. ensure the PR body contains `Closes #{issue-number}` or an equivalent closing keyword
|
|
59
49
|
|
|
60
50
|
If those rules say to skip the direct metadata arguments above, keep only the PR body linkage plus later comment sync.
|
|
@@ -72,7 +62,7 @@ Milestone rule:
|
|
|
72
62
|
- Replace `{$IssueNumber}` in the template when present
|
|
73
63
|
- End the PR body with `Generated with AI assistance`
|
|
74
64
|
|
|
75
|
-
Create the PR with the
|
|
65
|
+
Create the PR with the create-PR command template in `.agents/rules/issue-pr-commands.md`.
|
|
76
66
|
|
|
77
67
|
Final user output should include this follow-up path:
|
|
78
68
|
|