@fitlab-ai/agent-infra 0.5.8 → 0.5.9
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 +44 -4
- package/README.zh-CN.md +44 -4
- package/lib/sandbox/commands/vm.js +7 -1
- package/lib/sandbox/constants.js +3 -0
- package/lib/sandbox/engine.js +38 -3
- package/lib/sandbox/runtimes/base.dockerfile +9 -2
- package/package.json +3 -1
- package/templates/.agents/rules/create-issue.en.md +5 -0
- package/templates/.agents/rules/create-issue.github.en.md +178 -0
- package/templates/.agents/rules/create-issue.github.zh-CN.md +178 -0
- package/templates/.agents/rules/create-issue.zh-CN.md +5 -0
- package/templates/.agents/rules/issue-sync.github.en.md +1 -1
- package/templates/.agents/rules/issue-sync.github.zh-CN.md +1 -1
- package/templates/.agents/rules/milestone-inference.github.en.md +2 -2
- package/templates/.agents/rules/milestone-inference.github.zh-CN.md +2 -2
- package/templates/.agents/scripts/platform-adapters/platform-sync.github.js +46 -1
- package/templates/.agents/skills/create-task/SKILL.en.md +69 -11
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +70 -12
- package/templates/.agents/skills/create-task/config/verify.json +6 -1
- package/templates/.agents/skills/implement-task/reference/implementation-rules.en.md +7 -12
- package/templates/.agents/skills/implement-task/reference/implementation-rules.zh-CN.md +7 -12
- package/templates/.agents/skills/import-issue/SKILL.en.md +1 -1
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/refine-task/reference/fix-workflow.en.md +2 -2
- package/templates/.agents/skills/refine-task/reference/fix-workflow.zh-CN.md +2 -2
- package/templates/.agents/skills/test/SKILL.en.md +45 -6
- package/templates/.agents/skills/test/SKILL.zh-CN.md +45 -6
- package/templates/.agents/skills/create-issue/SKILL.en.md +0 -118
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +0 -118
- package/templates/.agents/skills/create-issue/config/verify.json +0 -30
- package/templates/.agents/skills/create-issue/reference/label-and-type.en.md +0 -71
- package/templates/.agents/skills/create-issue/reference/label-and-type.zh-CN.md +0 -71
- package/templates/.agents/skills/create-issue/reference/template-matching.en.md +0 -17
- package/templates/.agents/skills/create-issue/reference/template-matching.zh-CN.md +0 -17
- package/templates/.claude/commands/create-issue.en.md +0 -8
- package/templates/.claude/commands/create-issue.zh-CN.md +0 -8
- package/templates/.gemini/commands/_project_/create-issue.en.toml +0 -8
- package/templates/.gemini/commands/_project_/create-issue.zh-CN.toml +0 -8
- package/templates/.opencode/commands/create-issue.en.md +0 -11
- package/templates/.opencode/commands/create-issue.zh-CN.md +0 -11
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-issue
|
|
3
|
-
description: "Create an Issue from a task file"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Create Issue
|
|
7
|
-
|
|
8
|
-
Create the base Issue from `task.md` and write `issue_number` back to the task.
|
|
9
|
-
|
|
10
|
-
## Boundary / Critical Rules
|
|
11
|
-
|
|
12
|
-
- Build the Issue title and body from `task.md` only
|
|
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
|
-
- Do not read `analysis.md`, `plan.md`, `implementation.md`, or review artifacts
|
|
15
|
-
- The only durable outputs are the Issue and the `issue_number` update in task.md
|
|
16
|
-
- After executing this skill, you **must** immediately update task.md
|
|
17
|
-
|
|
18
|
-
## Steps
|
|
19
|
-
|
|
20
|
-
### 1. Verify Prerequisites
|
|
21
|
-
|
|
22
|
-
Check:
|
|
23
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
24
|
-
- read `.agents/rules/issue-pr-commands.md` first, then follow its prerequisite steps to complete authentication and code-hosting platform detection
|
|
25
|
-
|
|
26
|
-
If `issue_number` already exists and is not empty or `N/A`, confirm with the user before creating a replacement Issue.
|
|
27
|
-
|
|
28
|
-
### 2. Extract Task Information
|
|
29
|
-
|
|
30
|
-
Extract the title, `## Description`, `## Requirements`, `type`, and `milestone` from task.md. Build the Issue title by mapping task.md `type` to a Conventional Commits type, inferring scope, and formatting it as `cc_type(scope): task_title` or `cc_type: task_title` when scope is unclear. If task.md does not provide an explicit `milestone` field, infer it by following "Phase 1: `create-issue`" in `.agents/rules/milestone-inference.md`.
|
|
31
|
-
|
|
32
|
-
### 3. Build Issue Content
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
38
|
-
> Label filtering, Issue Type fallback, `issue-types` API handling, `milestone` logic, `--milestone`, and `in:` label rules live in `reference/label-and-type.md`. Read `reference/label-and-type.md` before creating the Issue.
|
|
39
|
-
|
|
40
|
-
### 4. Create the Issue
|
|
41
|
-
|
|
42
|
-
Create and enrich the Issue by following the "Create Issue" and "Set the Issue Type" sections in `.agents/rules/issue-pr-commands.md`. Omit label arguments when nothing valid remains.
|
|
43
|
-
|
|
44
|
-
Handle labels, milestone, Issue Type, and assignee behavior by following the permission-degradation rules in `.agents/rules/issue-pr-commands.md` and `.agents/rules/issue-sync.md`.
|
|
45
|
-
|
|
46
|
-
### 5. Update Task Status
|
|
47
|
-
|
|
48
|
-
Get the current time:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Write back `issue_number`, update `updated_at`, and append the Create Issue Activity Log entry.
|
|
55
|
-
|
|
56
|
-
### 5.1 Backfill Existing Artifacts
|
|
57
|
-
|
|
58
|
-
If artifact files already exist in the task directory, backfill them in this order:
|
|
59
|
-
|
|
60
|
-
1. `task.md` -> the task comment marker defined in `.agents/rules/issue-sync.md` (idempotent create or update)
|
|
61
|
-
2. Backfill existing `analysis*.md`, `plan*.md`, `implementation*.md`, `review*.md`, and `refinement*.md` files in filename order
|
|
62
|
-
|
|
63
|
-
Every backfill action must follow the raw publishing, task.md sync, and chunking rules in `.agents/rules/issue-sync.md`.
|
|
64
|
-
|
|
65
|
-
### 6. Verification Gate
|
|
66
|
-
|
|
67
|
-
Run the verification gate to confirm the task artifact and sync state are valid:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/active/{task-id} --format text
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Handle the result as follows:
|
|
74
|
-
- exit code 0 (all checks passed) -> continue to the "Inform User" step
|
|
75
|
-
- exit code 1 (validation failed) -> fix the reported issues and run the gate again
|
|
76
|
-
- exit code 2 (network blocked) -> stop and tell the user that human intervention is required
|
|
77
|
-
|
|
78
|
-
Keep the gate output in your reply as fresh evidence. Do not claim completion without output from this run.
|
|
79
|
-
|
|
80
|
-
### 7. Inform User
|
|
81
|
-
|
|
82
|
-
> Execute this step only after the verification gate passes.
|
|
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. 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
|
-
|
|
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
|
-
|
|
88
|
-
```
|
|
89
|
-
Next step - run requirements analysis:
|
|
90
|
-
- Claude Code / OpenCode: /analyze-task {task-id}
|
|
91
|
-
- Gemini CLI: /{{project}}:analyze-task {task-id}
|
|
92
|
-
- Codex CLI: $analyze-task {task-id}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Completion Checklist
|
|
96
|
-
|
|
97
|
-
- [ ] Created the Issue
|
|
98
|
-
- [ ] Used `task.md` as the only content source
|
|
99
|
-
- [ ] Recorded `issue_number` in task.md
|
|
100
|
-
- [ ] Updated `updated_at` and appended the Activity Log entry
|
|
101
|
-
- [ ] Included all TUI formats, including any custom TUIs, for the next-step commands
|
|
102
|
-
|
|
103
|
-
## STOP
|
|
104
|
-
|
|
105
|
-
Stop after the checklist. Do not start detailed progress sync here.
|
|
106
|
-
|
|
107
|
-
## Notes
|
|
108
|
-
|
|
109
|
-
- `create-issue` creates the base Issue; later status, comments, and checkboxes are maintained by workflow skills and platform automation
|
|
110
|
-
- If no valid labels survive filtering, create the Issue without labels instead of failing
|
|
111
|
-
- If Issue Type or milestone setup fails, continue and record the fallback outcome
|
|
112
|
-
|
|
113
|
-
## Error Handling
|
|
114
|
-
|
|
115
|
-
- Task not found: `Task {task-id} not found`
|
|
116
|
-
- the platform CLI unavailable or unauthenticated
|
|
117
|
-
- Empty description in task.md
|
|
118
|
-
- Issue creation failure
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: create-issue
|
|
3
|
-
description: "从任务文件创建 Issue"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 创建 Issue
|
|
7
|
-
|
|
8
|
-
仅从 `task.md` 创建基础 Issue,并把 `issue_number` 回写到任务文件。
|
|
9
|
-
|
|
10
|
-
## 行为边界 / 关键规则
|
|
11
|
-
|
|
12
|
-
- Issue 标题和正文只能来自 `task.md`
|
|
13
|
-
- Issue 标题格式为 `type(scope): 描述`——type 从 task.md 的 `type` 字段映射(feature→feat, bugfix→fix, refactor→refactor, docs→docs, chore→chore),scope 从受影响模块推断(无法确定时省略),描述使用 task.md 中的任务标题原文(不要翻译或改写)
|
|
14
|
-
- 不要读取 `analysis.md`、`plan.md`、`implementation.md` 或审查产物
|
|
15
|
-
- 持久产物只有 Issue 本身,以及 task.md 中的 `issue_number` 更新
|
|
16
|
-
- 执行本技能后,你**必须**立即更新 task.md
|
|
17
|
-
|
|
18
|
-
## 执行步骤
|
|
19
|
-
|
|
20
|
-
### 1. 验证前置条件
|
|
21
|
-
|
|
22
|
-
检查:
|
|
23
|
-
- `.agents/workspace/active/{task-id}/task.md`
|
|
24
|
-
- 执行前先读取 `.agents/rules/issue-pr-commands.md`,并按其中的前置步骤完成认证和代码托管平台检测
|
|
25
|
-
|
|
26
|
-
如果 `issue_number` 已存在且既不为空也不为 `N/A`,创建前必须先与用户确认。
|
|
27
|
-
|
|
28
|
-
### 2. 提取任务信息
|
|
29
|
-
|
|
30
|
-
从 task.md 提取标题、`## Description`、`## Requirements`、`type` 和 `milestone`。构造 Issue 标题:将 task.md 的 `type` 映射为 Conventional Commits type,推断 scope,拼接为 `cc_type(scope): task_title` 或 `cc_type: task_title`(scope 不确定时省略)。如果 task.md 没有显式 `milestone` 字段,按 `.agents/rules/milestone-inference.md` 的「阶段 1:`create-issue`」推断。
|
|
31
|
-
|
|
32
|
-
### 3. 构建 Issue 内容
|
|
33
|
-
|
|
34
|
-
通过 `.agents/rules/issue-pr-commands.md` 检测 Issue 模板,决定使用模板路径还是 fallback 路径。
|
|
35
|
-
|
|
36
|
-
> 模板识别、`textarea`、`input`、`dropdown`、`checkboxes` 字段映射,以及 fallback 正文规则见 `reference/template-matching.md`。构建正文前先读取 `reference/template-matching.md`。
|
|
37
|
-
|
|
38
|
-
> `labels:` 过滤、Issue Type fallback、`issue-types` API、`milestone` 逻辑、`--milestone` 和 `in:` label 规则见 `reference/label-and-type.md`。创建 Issue 前先读取 `reference/label-and-type.md`。
|
|
39
|
-
|
|
40
|
-
### 4. 创建 Issue
|
|
41
|
-
|
|
42
|
-
按 `.agents/rules/issue-pr-commands.md` 中的 “创建 Issue” 与 “Issue Type 设置” 规则创建并补充 Issue;如果没有有效 label,就省略 label 参数。
|
|
43
|
-
|
|
44
|
-
Label、milestone、Issue Type 和 assignee 的具体处理方式,都按 `.agents/rules/issue-pr-commands.md` 与 `.agents/rules/issue-sync.md` 中的权限降级规则执行。
|
|
45
|
-
|
|
46
|
-
### 5. 更新任务状态
|
|
47
|
-
|
|
48
|
-
获取当前时间:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
date "+%Y-%m-%d %H:%M:%S%:z"
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
回写 `issue_number`,更新 `updated_at`,并追加 Create Issue 的 Activity Log。
|
|
55
|
-
|
|
56
|
-
### 5.1 补发已有产物
|
|
57
|
-
|
|
58
|
-
如果任务目录中已存在产物文件,按以下顺序补发:
|
|
59
|
-
|
|
60
|
-
1. `task.md` → `.agents/rules/issue-sync.md` 中定义的 task 评论标记(幂等创建或更新)
|
|
61
|
-
2. 按文件名排序补发已存在的 `analysis*.md`、`plan*.md`、`implementation*.md`、`review*.md`、`refinement*.md`
|
|
62
|
-
|
|
63
|
-
所有补发动作都必须遵循 `.agents/rules/issue-sync.md` 的原文发布、task.md 同步和分片规则。
|
|
64
|
-
|
|
65
|
-
### 6. 完成校验
|
|
66
|
-
|
|
67
|
-
运行完成校验,确认任务产物和同步状态符合规范:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
node .agents/scripts/validate-artifact.js gate create-issue .agents/workspace/active/{task-id} --format text
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
处理结果:
|
|
74
|
-
- 退出码 0(全部通过)-> 继续到「告知用户」步骤
|
|
75
|
-
- 退出码 1(校验失败)-> 根据输出修复问题后重新运行校验
|
|
76
|
-
- 退出码 2(网络中断)-> 停止执行并告知用户需要人工介入
|
|
77
|
-
|
|
78
|
-
将校验输出保留在回复中作为当次验证输出。没有当次校验输出,不得声明完成。
|
|
79
|
-
|
|
80
|
-
### 7. 告知用户
|
|
81
|
-
|
|
82
|
-
> 仅在校验通过后执行本步骤。
|
|
83
|
-
|
|
84
|
-
> **重要**:以下「下一步」中列出的所有 TUI 命令格式必须完整输出,不要只展示当前 AI 代理对应的格式。如果 `.agents/.airc.json` 中配置了自定义 TUI(`customTUIs`),读取每个工具的 `name` 和 `invoke`,按同样格式补充对应命令行(`${skillName}` 替换为技能名,`${projectName}` 替换为项目名)。
|
|
85
|
-
|
|
86
|
-
展示 Issue 编号、URL、labels、Issue Type、milestone 结果,确认 `issue_number` 已回写,并完整输出所有 TUI 里的下一步命令:
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
下一步 - 执行需求分析:
|
|
90
|
-
- Claude Code / OpenCode:/analyze-task {task-id}
|
|
91
|
-
- Gemini CLI:/agent-infra:analyze-task {task-id}
|
|
92
|
-
- Codex CLI:$analyze-task {task-id}
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## 完成检查清单
|
|
96
|
-
|
|
97
|
-
- [ ] 已创建 Issue
|
|
98
|
-
- [ ] 已仅使用 `task.md` 作为内容来源
|
|
99
|
-
- [ ] 已在 task.md 中记录 `issue_number`
|
|
100
|
-
- [ ] 已更新 `updated_at` 并追加 Activity Log
|
|
101
|
-
- [ ] 已输出所有 TUI 格式的下一步命令(含自定义 TUI)
|
|
102
|
-
|
|
103
|
-
## 停止
|
|
104
|
-
|
|
105
|
-
完成检查清单后立即停止。不要在本技能里继续做详细进度同步。
|
|
106
|
-
|
|
107
|
-
## 注意事项
|
|
108
|
-
|
|
109
|
-
- `create-issue` 只负责创建基础 Issue;后续状态、评论和复选框由工作流技能与 platform automation 维护
|
|
110
|
-
- 如果过滤后没有有效 label,允许不带 label 创建 Issue
|
|
111
|
-
- 如果 Issue Type 或 milestone 设置失败,继续执行并记录结果
|
|
112
|
-
|
|
113
|
-
## 错误处理
|
|
114
|
-
|
|
115
|
-
- 任务未找到:`Task {task-id} not found`
|
|
116
|
-
- the platform CLI 不可用或未认证
|
|
117
|
-
- task.md 的描述为空
|
|
118
|
-
- 创建 Issue 失败
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"skill": "create-issue",
|
|
3
|
-
"checks": {
|
|
4
|
-
"task-meta": {
|
|
5
|
-
"required_fields": [
|
|
6
|
-
"id",
|
|
7
|
-
"type",
|
|
8
|
-
"workflow",
|
|
9
|
-
"status",
|
|
10
|
-
"created_at",
|
|
11
|
-
"updated_at",
|
|
12
|
-
"current_step",
|
|
13
|
-
"assigned_to"
|
|
14
|
-
],
|
|
15
|
-
"require_issue_number": true
|
|
16
|
-
},
|
|
17
|
-
"activity-log": {
|
|
18
|
-
"expected_action_pattern": "Create Issue",
|
|
19
|
-
"freshness_minutes": 30
|
|
20
|
-
},
|
|
21
|
-
"platform-sync": {
|
|
22
|
-
"when": "issue_number_exists",
|
|
23
|
-
"issue_must_exist": true,
|
|
24
|
-
"verify_task_comment_content": true,
|
|
25
|
-
"verify_issue_type": true,
|
|
26
|
-
"verify_milestone": true,
|
|
27
|
-
"expected_status_label_key": "waitingForTriage"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Labels, Issue Type, and Milestone Rules
|
|
2
|
-
|
|
3
|
-
Read this file before applying labels, Issue Type, milestone, or `in:` labels.
|
|
4
|
-
|
|
5
|
-
## Default Body Format (Fallback)
|
|
6
|
-
|
|
7
|
-
Recommended fallback:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
{task-description}
|
|
13
|
-
|
|
14
|
-
## Requirements
|
|
15
|
-
|
|
16
|
-
- [ ] {requirement-1}
|
|
17
|
-
- [ ] {requirement-2}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Map task types to labels and Issue Types, but keep only labels that actually exist.
|
|
21
|
-
|
|
22
|
-
Fallback label mapping:
|
|
23
|
-
|
|
24
|
-
| task.md type | label |
|
|
25
|
-
|---|---|
|
|
26
|
-
| `bug`, `bugfix` | `type: bug` |
|
|
27
|
-
| `feature` | `type: feature` |
|
|
28
|
-
| `enhancement` | `type: enhancement` |
|
|
29
|
-
| `docs`, `documentation` | `type: documentation` |
|
|
30
|
-
| `dependency-upgrade` | `type: dependency-upgrade` |
|
|
31
|
-
| `task`, `chore` | `type: task` |
|
|
32
|
-
| `refactor`, `refactoring` | `type: enhancement` |
|
|
33
|
-
| other values | skip |
|
|
34
|
-
|
|
35
|
-
Issue Type fallback mapping:
|
|
36
|
-
|
|
37
|
-
| task.md type | Issue Type |
|
|
38
|
-
|---|---|
|
|
39
|
-
| `bug`, `bugfix` | `Bug` |
|
|
40
|
-
| `feature`, `enhancement` | `Feature` |
|
|
41
|
-
| `task`, `documentation`, `dependency-upgrade`, `chore`, `docs`, `refactor`, `refactoring`, and all other values | `Task` |
|
|
42
|
-
|
|
43
|
-
## Create the Issue
|
|
44
|
-
|
|
45
|
-
Before creating the Issue, read `.agents/rules/issue-pr-commands.md` and use its "Create an Issue" command template.
|
|
46
|
-
|
|
47
|
-
Before calling the creation command, follow `.agents/rules/issue-sync.md` / `.agents/rules/issue-pr-commands.md` to complete the prerequisite authentication and code-hosting platform detection steps.
|
|
48
|
-
|
|
49
|
-
If no valid labels remain, omit label arguments.
|
|
50
|
-
|
|
51
|
-
For milestone inference, read `.agents/rules/milestone-inference.md` and follow "Phase 1: `create-issue`" before creating the Issue.
|
|
52
|
-
|
|
53
|
-
Issue Type setup follows the matching commands in `.agents/rules/issue-pr-commands.md`.
|
|
54
|
-
|
|
55
|
-
- handle direct writes for labels, milestones, `in:` labels, and Issue Type by following the permission-degradation rules in `.agents/rules/issue-pr-commands.md` and `.agents/rules/issue-sync.md`
|
|
56
|
-
- when those rules say to skip a direct write, continue without failing Issue creation
|
|
57
|
-
|
|
58
|
-
`in:` labels (coarse selection):
|
|
59
|
-
|
|
60
|
-
Prepare label edit arguments by following the Issue update command in `.agents/rules/issue-pr-commands.md`.
|
|
61
|
-
|
|
62
|
-
Use the returned labels to do semantic matching against the task.md title and description:
|
|
63
|
-
- add a label when the task **explicitly mentions** a module (for example, "fix CLI argument parsing" -> `in: cli`)
|
|
64
|
-
- add a label when the task **strongly implies** a module
|
|
65
|
-
- skip the label when the mapping is ambiguous or uncertain
|
|
66
|
-
|
|
67
|
-
Principle: prefer missing labels over wrong labels. Coarse selection does not need to be perfect because implement-task / create-pr will refine `in:` labels from actual changed files later.
|
|
68
|
-
|
|
69
|
-
Handle relevant `in:` labels by following the permission-degradation rules in `.agents/rules/issue-sync.md`. Do not fail Issue creation when `in:` labels are unavailable, irrelevant, or skipped by those rules.
|
|
70
|
-
|
|
71
|
-
Skip unavailable labels, Issue Types, or milestones without failing the Issue creation flow.
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# Label、Issue Type 和 Milestone 规则
|
|
2
|
-
|
|
3
|
-
在应用 label、Issue Type、milestone 或 `in:` label 之前先读取本文件。
|
|
4
|
-
|
|
5
|
-
## 默认正文格式(Fallback)
|
|
6
|
-
|
|
7
|
-
推荐 fallback:
|
|
8
|
-
|
|
9
|
-
```markdown
|
|
10
|
-
## Description
|
|
11
|
-
|
|
12
|
-
{task-description}
|
|
13
|
-
|
|
14
|
-
## Requirements
|
|
15
|
-
|
|
16
|
-
- [ ] {requirement-1}
|
|
17
|
-
- [ ] {requirement-2}
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
将任务类型映射到 label 和 Issue Type,但只保留仓库里实际存在的 label。
|
|
21
|
-
|
|
22
|
-
Fallback label 映射:
|
|
23
|
-
|
|
24
|
-
| task.md type | label |
|
|
25
|
-
|---|---|
|
|
26
|
-
| `bug`, `bugfix` | `type: bug` |
|
|
27
|
-
| `feature` | `type: feature` |
|
|
28
|
-
| `enhancement` | `type: enhancement` |
|
|
29
|
-
| `docs`, `documentation` | `type: documentation` |
|
|
30
|
-
| `dependency-upgrade` | `type: dependency-upgrade` |
|
|
31
|
-
| `task`, `chore` | `type: task` |
|
|
32
|
-
| `refactor`, `refactoring` | `type: enhancement` |
|
|
33
|
-
| 其他值 | 跳过 |
|
|
34
|
-
|
|
35
|
-
Issue Type fallback 映射:
|
|
36
|
-
|
|
37
|
-
| task.md type | Issue Type |
|
|
38
|
-
|---|---|
|
|
39
|
-
| `bug`, `bugfix` | `Bug` |
|
|
40
|
-
| `feature`, `enhancement` | `Feature` |
|
|
41
|
-
| `task`, `documentation`, `dependency-upgrade`, `chore`, `docs`, `refactor`, `refactoring` 以及其他所有值 | `Task` |
|
|
42
|
-
|
|
43
|
-
## 创建 Issue
|
|
44
|
-
|
|
45
|
-
创建 Issue 时,执行前先读取 `.agents/rules/issue-pr-commands.md`,并使用其中的 “创建 Issue” 命令模板。
|
|
46
|
-
|
|
47
|
-
调用创建命令前,先按 `.agents/rules/issue-sync.md` / `.agents/rules/issue-pr-commands.md` 完成前置步骤中的认证和代码托管平台检测。
|
|
48
|
-
|
|
49
|
-
如果最终没有有效 label,就省略 label 参数。
|
|
50
|
-
|
|
51
|
-
Milestone 推断规则见 `.agents/rules/milestone-inference.md` 的「阶段 1:`create-issue`」。推断前先读取该文件。
|
|
52
|
-
|
|
53
|
-
Issue Type 设置同样遵循 `.agents/rules/issue-pr-commands.md` 中的对应命令。
|
|
54
|
-
|
|
55
|
-
- Label、milestone、`in:` label 和 Issue Type 的直接设置,都按 `.agents/rules/issue-pr-commands.md` 与 `.agents/rules/issue-sync.md` 的权限降级规则处理
|
|
56
|
-
- 当规则判定应跳过直接写入时,继续创建 Issue,不要让流程失败
|
|
57
|
-
|
|
58
|
-
`in:` label(粗选):
|
|
59
|
-
|
|
60
|
-
执行前先按 `.agents/rules/issue-pr-commands.md` 的 Issue 更新命令准备 label 编辑参数。
|
|
61
|
-
|
|
62
|
-
从查询结果中,根据 task.md 的标题和描述进行语义匹配:
|
|
63
|
-
- 任务描述**明确提及**某个模块(如"修复 CLI 参数解析"→ `in: cli`)→ 添加
|
|
64
|
-
- 任务描述**强烈暗示**某个模块 → 添加
|
|
65
|
-
- 无法确定或模糊 → **不添加**
|
|
66
|
-
|
|
67
|
-
原则:宁缺毋滥。粗选阶段不求精确,后续 implement-task / create-pr 阶段会基于实际改动文件精修。
|
|
68
|
-
|
|
69
|
-
相关 `in:` label 的添加按 `.agents/rules/issue-sync.md` 的权限降级规则处理。当 `in:` label 不可用、不相关或规则判定应跳过时,不要让创建 Issue 流程失败。
|
|
70
|
-
|
|
71
|
-
当 label、Issue Type 或 milestone 不可用时,应跳过并继续,不要让 Issue 创建失败。
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# Issue Template Matching
|
|
2
|
-
|
|
3
|
-
Read this file before deciding how to build the Issue body.
|
|
4
|
-
|
|
5
|
-
## Detect Issue Templates
|
|
6
|
-
|
|
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
|
-
|
|
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.
|
|
10
|
-
|
|
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.
|
|
12
|
-
|
|
13
|
-
## Build the Body from the Matched Template
|
|
14
|
-
|
|
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,17 +0,0 @@
|
|
|
1
|
-
# Issue 模板匹配
|
|
2
|
-
|
|
3
|
-
在决定如何构建 Issue 正文前先读取本文件。
|
|
4
|
-
|
|
5
|
-
## 检测 Issue 模板
|
|
6
|
-
|
|
7
|
-
Issue 模板检测属于平台相关逻辑。先读取 `.agents/rules/issue-pr-commands.md`,并按当前配置平台提供的模板检测章节执行。
|
|
8
|
-
|
|
9
|
-
如果存在模板,检查其顶层名称,并根据任务标题和描述选择最匹配的模板。可用时,使用当前配置平台规则提供的候选模板指引。
|
|
10
|
-
|
|
11
|
-
如果没有清晰匹配,选择最接近的候选模板。模板不存在、无法读取或解析失败时,回退到默认正文路径。
|
|
12
|
-
|
|
13
|
-
## 从匹配模板构建正文
|
|
14
|
-
|
|
15
|
-
按 `.agents/rules/issue-pr-commands.md` 中当前配置平台章节提供的字段处理和字段映射指引构建正文。
|
|
16
|
-
|
|
17
|
-
如果平台指引不可用,使用默认正文路径。
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Create an Issue from a task file"
|
|
3
|
-
agent: general
|
|
4
|
-
subtask: false
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
Create Issue for task $1.
|
|
8
|
-
|
|
9
|
-
Read and execute the create-issue skill from `.agents/skills/create-issue/SKILL.md`.
|
|
10
|
-
|
|
11
|
-
Follow all steps defined in the skill exactly.
|