@fitlab-ai/agent-infra 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -39
- package/README.zh-CN.md +29 -39
- package/bin/cli.js +1 -1
- package/lib/defaults.json +3 -12
- package/lib/init.js +13 -24
- package/lib/paths.js +3 -42
- package/lib/update.js +98 -32
- package/lib/version.js +2 -1
- package/package.json +2 -1
- package/templates/.agents/QUICKSTART.md +7 -7
- package/templates/.agents/QUICKSTART.zh-CN.md +7 -7
- package/templates/.agents/README.md +16 -4
- package/templates/.agents/README.zh-CN.md +16 -4
- package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
- package/templates/.agents/skills/analyze-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/block-task/SKILL.md +8 -8
- package/templates/.agents/skills/block-task/SKILL.zh-CN.md +8 -8
- package/templates/.agents/skills/check-task/SKILL.md +3 -3
- package/templates/.agents/skills/check-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
- package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
- package/templates/.agents/skills/commit/SKILL.md +1 -1
- package/templates/.agents/skills/commit/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/complete-task/SKILL.md +7 -7
- package/templates/.agents/skills/complete-task/SKILL.zh-CN.md +7 -7
- package/templates/.agents/skills/create-issue/SKILL.md +57 -12
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +57 -12
- package/templates/.agents/skills/create-pr/SKILL.md +44 -7
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +44 -7
- package/templates/.agents/skills/create-release-note/SKILL.md +18 -11
- package/templates/.agents/skills/create-release-note/SKILL.zh-CN.md +18 -11
- package/templates/.agents/skills/create-task/SKILL.md +80 -78
- package/templates/.agents/skills/create-task/SKILL.zh-CN.md +11 -10
- package/templates/.agents/skills/implement-task/SKILL.md +15 -18
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +15 -18
- package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
- package/templates/.agents/skills/import-codescan/SKILL.zh-CN.md +1 -1
- package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
- package/templates/.agents/skills/import-dependabot/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/import-issue/SKILL.md +58 -58
- package/templates/.agents/skills/import-issue/SKILL.zh-CN.md +5 -5
- package/templates/.agents/skills/init-labels/SKILL.md +8 -0
- package/templates/.agents/skills/init-labels/SKILL.zh-CN.md +8 -0
- package/templates/.agents/skills/plan-task/SKILL.md +151 -149
- package/templates/.agents/skills/plan-task/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/refine-task/SKILL.md +3 -3
- package/templates/.agents/skills/refine-task/SKILL.zh-CN.md +3 -3
- package/templates/.agents/skills/release/SKILL.md +55 -14
- package/templates/.agents/skills/release/SKILL.zh-CN.md +55 -14
- package/templates/.agents/skills/review-task/SKILL.md +9 -9
- package/templates/.agents/skills/review-task/SKILL.zh-CN.md +9 -9
- package/templates/.agents/skills/sync-issue/SKILL.md +258 -279
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +34 -56
- package/templates/.agents/skills/sync-pr/SKILL.md +8 -28
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +7 -27
- package/templates/.agents/skills/update-agent-infra/SKILL.md +6 -6
- package/templates/.agents/skills/update-agent-infra/SKILL.zh-CN.md +6 -6
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +61 -116
- package/templates/.agents/templates/handoff.md +1 -1
- package/templates/.agents/templates/handoff.zh-CN.md +1 -1
- package/templates/.agents/workflows/bug-fix.yaml +71 -71
- package/templates/.agents/workflows/bug-fix.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/feature-development.yaml +71 -71
- package/templates/.agents/workflows/feature-development.zh-CN.yaml +1 -1
- package/templates/.agents/workflows/refactoring.yaml +76 -76
- package/templates/.agents/workflows/refactoring.zh-CN.yaml +1 -1
- package/templates/{.agent-workspace → .agents/workspace}/README.md +1 -1
- package/templates/{.agent-workspace → .agents/workspace}/README.zh-CN.md +1 -1
- package/templates/.claude/CLAUDE.md +14 -1
- package/templates/.claude/CLAUDE.zh-CN.md +14 -1
- package/templates/.claude/hooks/check-version-format.sh +44 -0
- package/templates/.claude/settings.json +14 -0
- package/templates/.opencode/COMMAND_STYLE_GUIDE.md +6 -6
- package/templates/.opencode/COMMAND_STYLE_GUIDE.zh-CN.md +6 -6
- package/templates/AGENTS.md +14 -1
- package/templates/AGENTS.zh-CN.md +14 -1
- package/templates/.editorconfig +0 -15
- package/templates/.github/ISSUE_TEMPLATE/01_bug_report.yml +0 -149
- package/templates/.github/ISSUE_TEMPLATE/02_question.yml +0 -101
- package/templates/.github/ISSUE_TEMPLATE/03_feature_request.yml +0 -131
- package/templates/.github/ISSUE_TEMPLATE/04_documentation.yml +0 -165
- package/templates/.github/ISSUE_TEMPLATE/05_other.yml +0 -147
- package/templates/.github/ISSUE_TEMPLATE/config.yml +0 -11
- package/templates/.github/PULL_REQUEST_TEMPLATE.md +0 -123
- package/templates/.github/dependabot.yml +0 -17
- package/templates/.github/hooks/check-utf8-encoding.sh +0 -25
- package/templates/.github/release.yml +0 -27
- package/templates/.github/workflows/pr-title-check.yml +0 -42
- package/templates/.mailmap +0 -4
- package/templates/CONTRIBUTING.md +0 -126
- package/templates/CONTRIBUTING.zh-CN.md +0 -124
- package/templates/SECURITY.md +0 -131
- package/templates/SECURITY.zh-CN.md +0 -131
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: import-issue
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Import from a GitHub Issue and create a task file.
|
|
5
|
+
Triggered when the user asks to import an Issue. Argument: issue number.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# Import Issue
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Import the specified GitHub Issue and create a task. Argument: issue number.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Boundary / Critical Rules
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
14
|
+
- The only output is `task.md`
|
|
15
|
+
- Do not write or modify business code; import only
|
|
16
|
+
- After executing this skill, you **must** immediately update task status
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Execution Flow
|
|
19
19
|
|
|
20
|
-
### 1.
|
|
20
|
+
### 1. Retrieve Issue Information
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
gh issue view <issue-number> --json number,title,body,labels
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Extract: issue number, title, description, and labels.
|
|
27
27
|
|
|
28
|
-
### 2.
|
|
28
|
+
### 2. Check for an Existing Task
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
30
|
+
Search `.agents/workspace/active/` for an existing task linked to this Issue.
|
|
31
|
+
- If found, ask the user whether to re-import or continue with the existing task
|
|
32
|
+
- If not found, create a new task
|
|
33
33
|
|
|
34
|
-
### 3.
|
|
34
|
+
### 3. Create the Task Directory and File
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
37
|
date +%Y%m%d-%H%M%S
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
40
|
+
- Create the directory: `.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
|
|
41
|
+
- Use the `.agents/templates/task.md` template to create `task.md`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Task metadata:
|
|
44
44
|
```yaml
|
|
45
45
|
id: TASK-{yyyyMMdd-HHmmss}
|
|
46
46
|
issue_number: <issue-number>
|
|
@@ -51,69 +51,69 @@ created_at: {yyyy-MM-dd HH:mm:ss}
|
|
|
51
51
|
updated_at: {yyyy-MM-dd HH:mm:ss}
|
|
52
52
|
created_by: human
|
|
53
53
|
current_step: requirement-analysis
|
|
54
|
-
assigned_to: {
|
|
54
|
+
assigned_to: {current AI agent}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
### 4.
|
|
57
|
+
### 4. Update Task Status
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
Get the current time:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
62
|
date "+%Y-%m-%d %H:%M:%S"
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
- `current_step
|
|
67
|
-
- `assigned_to
|
|
68
|
-
- `updated_at
|
|
69
|
-
-
|
|
65
|
+
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
66
|
+
- `current_step`: requirement-analysis
|
|
67
|
+
- `assigned_to`: {current AI agent}
|
|
68
|
+
- `updated_at`: {current time}
|
|
69
|
+
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
70
70
|
```
|
|
71
71
|
- {yyyy-MM-dd HH:mm:ss} — **Import Issue** by {agent} — Issue #{number} imported
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
### 5.
|
|
74
|
+
### 5. Inform User
|
|
75
75
|
|
|
76
|
-
>
|
|
76
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
77
77
|
|
|
78
78
|
```
|
|
79
|
-
Issue #{number}
|
|
79
|
+
Issue #{number} imported.
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
81
|
+
Task information:
|
|
82
|
+
- Task ID: {task-id}
|
|
83
|
+
- Title: {title}
|
|
84
|
+
- Workflow: {workflow}
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
-
|
|
86
|
+
Output file:
|
|
87
|
+
- Task file: .agents/workspace/active/{task-id}/task.md
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
- Claude Code / OpenCode
|
|
91
|
-
- Gemini CLI
|
|
92
|
-
- Codex CLI
|
|
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
93
|
```
|
|
94
94
|
|
|
95
|
-
##
|
|
95
|
+
## Completion Checklist
|
|
96
96
|
|
|
97
|
-
- [ ]
|
|
98
|
-
- [ ]
|
|
99
|
-
- [ ]
|
|
100
|
-
- [ ]
|
|
101
|
-
- [ ]
|
|
102
|
-
- [ ]
|
|
103
|
-
- [ ]
|
|
97
|
+
- [ ] Created the task file `.agents/workspace/active/{task-id}/task.md`
|
|
98
|
+
- [ ] Recorded `issue_number` in task.md
|
|
99
|
+
- [ ] Updated `current_step` to requirement-analysis
|
|
100
|
+
- [ ] Updated `updated_at` to the current time
|
|
101
|
+
- [ ] Appended an Activity Log entry to task.md
|
|
102
|
+
- [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
|
|
103
|
+
- [ ] **Did not modify any business code**
|
|
104
104
|
|
|
105
|
-
##
|
|
105
|
+
## STOP
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
After completing the checklist, **stop immediately**. Do not continue to later steps.
|
|
108
108
|
|
|
109
|
-
##
|
|
109
|
+
## Notes
|
|
110
110
|
|
|
111
|
-
1. **Issue
|
|
112
|
-
2.
|
|
113
|
-
3.
|
|
111
|
+
1. **Issue validation**: verify that the Issue exists before continuing
|
|
112
|
+
2. **Duplicate task**: if this Issue already has a linked task, ask the user before creating a new one
|
|
113
|
+
3. **Next step**: after import, run `analyze-task` before `plan-task`
|
|
114
114
|
|
|
115
|
-
##
|
|
115
|
+
## Error Handling
|
|
116
116
|
|
|
117
|
-
- Issue
|
|
118
|
-
-
|
|
119
|
-
-
|
|
117
|
+
- Issue not found: output "Issue #{number} not found, please check the issue number"
|
|
118
|
+
- Network error: output "Cannot connect to GitHub, please check network"
|
|
119
|
+
- Permission error: output "No access to this repository"
|
|
@@ -27,7 +27,7 @@ gh issue view <issue-number> --json number,title,body,labels
|
|
|
27
27
|
|
|
28
28
|
### 2. 检查已有任务
|
|
29
29
|
|
|
30
|
-
搜索 `.
|
|
30
|
+
搜索 `.agents/workspace/active/` 中是否已有链接到此 Issue 的任务。
|
|
31
31
|
- 如果找到,询问用户是重新导入还是继续使用现有任务
|
|
32
32
|
- 如果未找到,创建新任务
|
|
33
33
|
|
|
@@ -37,7 +37,7 @@ gh issue view <issue-number> --json number,title,body,labels
|
|
|
37
37
|
date +%Y%m%d-%H%M%S
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
- 创建目录:`.
|
|
40
|
+
- 创建目录:`.agents/workspace/active/TASK-{yyyyMMdd-HHmmss}/`
|
|
41
41
|
- 使用 `.agents/templates/task.md` 模板创建 `task.md`
|
|
42
42
|
|
|
43
43
|
任务元数据:
|
|
@@ -62,7 +62,7 @@ assigned_to: {当前 AI 代理}
|
|
|
62
62
|
date "+%Y-%m-%d %H:%M:%S"
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
更新 `.
|
|
65
|
+
更新 `.agents/workspace/active/{task-id}/task.md`:
|
|
66
66
|
- `current_step`:requirement-analysis
|
|
67
67
|
- `assigned_to`:{当前 AI 代理}
|
|
68
68
|
- `updated_at`:{当前时间}
|
|
@@ -84,7 +84,7 @@ Issue #{number} 已导入。
|
|
|
84
84
|
- 工作流:{workflow}
|
|
85
85
|
|
|
86
86
|
产出文件:
|
|
87
|
-
- 任务文件:.
|
|
87
|
+
- 任务文件:.agents/workspace/active/{task-id}/task.md
|
|
88
88
|
|
|
89
89
|
下一步 - 执行需求分析:
|
|
90
90
|
- Claude Code / OpenCode:/analyze-task {task-id}
|
|
@@ -94,7 +94,7 @@ Issue #{number} 已导入。
|
|
|
94
94
|
|
|
95
95
|
## 完成检查清单
|
|
96
96
|
|
|
97
|
-
- [ ] 创建了任务文件 `.
|
|
97
|
+
- [ ] 创建了任务文件 `.agents/workspace/active/{task-id}/task.md`
|
|
98
98
|
- [ ] 在 task.md 中记录了 issue_number
|
|
99
99
|
- [ ] 更新了 `current_step` 为 requirement-analysis
|
|
100
100
|
- [ ] 更新了 `updated_at` 为当前时间
|
|
@@ -45,6 +45,14 @@ The script manages these common label families:
|
|
|
45
45
|
- GitHub-default-name labels intentionally overwritten in place: `good first issue` and `help wanted`
|
|
46
46
|
- Additional shared labels such as `dependencies`
|
|
47
47
|
|
|
48
|
+
#### Scope
|
|
49
|
+
|
|
50
|
+
| Label prefix | Issue | PR | Notes |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| `type:` | — | Yes | Issues use the native GitHub Type field; PRs need `type:` labels to drive changelog grouping |
|
|
53
|
+
| `status:` | Yes | — | PRs already have their own state flow (Open/Draft/Merged/Closed); Issues use `status:` labels for project tracking |
|
|
54
|
+
| `in:` | Yes | Yes | Both Issues and PRs need module-based filtering |
|
|
55
|
+
|
|
48
56
|
### 4. Scope discovery rules
|
|
49
57
|
|
|
50
58
|
Directory-derived labels follow these rules:
|
|
@@ -45,6 +45,14 @@ bash .agents/skills/init-labels/scripts/init-labels.sh
|
|
|
45
45
|
- 明确覆盖的 GitHub 默认同名 labels:`good first issue` 和 `help wanted`
|
|
46
46
|
- 额外通用 labels,例如 `dependencies`
|
|
47
47
|
|
|
48
|
+
#### 适用范围
|
|
49
|
+
|
|
50
|
+
| Label 前缀 | Issue | PR | 说明 |
|
|
51
|
+
|---|---|---|---|
|
|
52
|
+
| `type:` | — | Yes | Issue 使用 GitHub 原生 Type 字段;PR 无原生类型字段,需 `type:` label 驱动 changelog |
|
|
53
|
+
| `status:` | Yes | — | PR 有自身状态流转(Open/Draft/Merged/Closed);Issue 使用 `status:` label 标记项目管理状态 |
|
|
54
|
+
| `in:` | Yes | Yes | Issue 和 PR 均需按模块筛选 |
|
|
55
|
+
|
|
48
56
|
### 4. 范围探测规则
|
|
49
57
|
|
|
50
58
|
目录派生 label 遵循以下规则:
|
|
@@ -1,225 +1,227 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: plan-task
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Design a technical plan for a task and output a detailed implementation
|
|
5
|
+
plan. Triggered when the user asks for a design or technical plan after
|
|
6
|
+
requirements analysis is complete. This is a mandatory human review
|
|
7
|
+
checkpoint. Argument: task-id.
|
|
6
8
|
---
|
|
7
9
|
|
|
8
|
-
#
|
|
10
|
+
# Design Technical Plan
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## Boundary / Critical Rules
|
|
11
13
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
14
|
+
- This skill only outputs a technical plan document (`plan.md` or `plan-r{N}.md`) and does not modify any business code
|
|
15
|
+
- This is a **mandatory human review checkpoint**; do not automatically proceed to implementation
|
|
16
|
+
- After executing this skill, you **must** immediately update task status in task.md
|
|
15
17
|
|
|
16
|
-
##
|
|
18
|
+
## Steps
|
|
17
19
|
|
|
18
|
-
### 1.
|
|
20
|
+
### 1. Verify Prerequisites
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
- `.
|
|
22
|
-
-
|
|
22
|
+
Check required files:
|
|
23
|
+
- `.agents/workspace/active/{task-id}/task.md` - Task file
|
|
24
|
+
- At least one analysis artifact: `analysis.md` or `analysis-r{N}.md`
|
|
23
25
|
|
|
24
|
-
|
|
26
|
+
Note: `{task-id}` format is `TASK-{yyyyMMdd-HHmmss}`, for example `TASK-20260306-143022`
|
|
25
27
|
|
|
26
|
-
|
|
28
|
+
If any required file is missing, prompt the user to complete the prerequisite step first.
|
|
27
29
|
|
|
28
|
-
### 2.
|
|
30
|
+
### 2. Determine the Plan Round
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
32
|
+
Scan `.agents/workspace/active/{task-id}/` for plan artifact files:
|
|
33
|
+
- If neither `plan.md` nor `plan-r*.md` exists -> this is Round 1 and must create `plan.md`
|
|
34
|
+
- If `plan.md` exists and no `plan-r*.md` exists -> this is Round 2 and must create `plan-r2.md`
|
|
35
|
+
- If `plan-r{N}.md` exists -> this is Round N+1 and must create `plan-r{N+1}.md`
|
|
34
36
|
|
|
35
|
-
|
|
36
|
-
- `{plan-round}
|
|
37
|
-
- `{plan-artifact}
|
|
37
|
+
Record:
|
|
38
|
+
- `{plan-round}`: the current plan round
|
|
39
|
+
- `{plan-artifact}`: the artifact filename for this round
|
|
38
40
|
|
|
39
|
-
### 3.
|
|
41
|
+
### 3. Read Requirements Analysis
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
43
|
+
Scan the task directory for analysis artifact files (`analysis.md`, `analysis-r{N}.md`):
|
|
44
|
+
- If any `analysis-r{N}.md` exists, read the highest N file
|
|
45
|
+
- otherwise read `analysis.md`
|
|
46
|
+
Use it to understand:
|
|
47
|
+
- the requirements and background
|
|
48
|
+
- related files and code structure
|
|
49
|
+
- impact scope and dependencies
|
|
50
|
+
- identified technical risks
|
|
51
|
+
- effort and complexity assessment
|
|
50
52
|
|
|
51
|
-
### 4.
|
|
53
|
+
### 4. Understand the Problem
|
|
52
54
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
55
|
+
- Read the relevant source files identified in the analysis
|
|
56
|
+
- Understand the current architecture and patterns
|
|
57
|
+
- Identify constraints (backward compatibility, performance, etc.)
|
|
58
|
+
- Consider edge cases and failure scenarios
|
|
57
59
|
|
|
58
|
-
### 5.
|
|
60
|
+
### 5. Design the Technical Plan
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
Follow the `technical-design` step in `.agents/workflows/feature-development.yaml`:
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
- [ ]
|
|
64
|
-
- [ ]
|
|
65
|
-
- [ ]
|
|
66
|
-
- [ ]
|
|
67
|
-
- [ ]
|
|
68
|
-
- [ ]
|
|
64
|
+
**Required tasks**:
|
|
65
|
+
- [ ] Define the technical approach and rationale
|
|
66
|
+
- [ ] Consider alternatives and explain the tradeoffs
|
|
67
|
+
- [ ] List implementation steps in detailed order
|
|
68
|
+
- [ ] List all files that need to be created or modified
|
|
69
|
+
- [ ] Define the verification strategy (tests, manual checks)
|
|
70
|
+
- [ ] Assess impact and risks
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
1.
|
|
72
|
-
2.
|
|
73
|
-
3.
|
|
74
|
-
4.
|
|
72
|
+
**Design principles**:
|
|
73
|
+
1. **Simplicity**: prefer the simplest approach that satisfies the requirement
|
|
74
|
+
2. **Consistency**: follow existing code patterns and conventions
|
|
75
|
+
3. **Testability**: design for straightforward testing
|
|
76
|
+
4. **Reversibility**: prefer changes that are easy to roll back
|
|
75
77
|
|
|
76
|
-
### 6.
|
|
78
|
+
### 6. Output Plan Document
|
|
77
79
|
|
|
78
|
-
|
|
80
|
+
Create `.agents/workspace/active/{task-id}/{plan-artifact}`.
|
|
79
81
|
|
|
80
|
-
### 7.
|
|
82
|
+
### 7. Update Task Status
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
Get the current time:
|
|
83
85
|
|
|
84
86
|
```bash
|
|
85
87
|
date "+%Y-%m-%d %H:%M:%S"
|
|
86
88
|
```
|
|
87
89
|
|
|
88
|
-
|
|
89
|
-
- `current_step
|
|
90
|
-
- `assigned_to
|
|
91
|
-
- `updated_at
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
90
|
+
Update `.agents/workspace/active/{task-id}/task.md`:
|
|
91
|
+
- `current_step`: technical-design
|
|
92
|
+
- `assigned_to`: {current AI agent}
|
|
93
|
+
- `updated_at`: {current time}
|
|
94
|
+
- Record the plan artifact for this round: `{plan-artifact}` (Round `{plan-round}`)
|
|
95
|
+
- If the task template contains a `## Design` section, update it to link to `{plan-artifact}`
|
|
96
|
+
- Mark technical-design as complete in workflow progress and include the actual round when the task template supports it
|
|
97
|
+
- **Append** to `## Activity Log` (do NOT overwrite previous entries):
|
|
96
98
|
```
|
|
97
99
|
- {yyyy-MM-dd HH:mm:ss} — **Technical Design (Round {N})** by {agent} — Plan completed, awaiting human review → {artifact-filename}
|
|
98
100
|
```
|
|
99
101
|
|
|
100
|
-
### 8.
|
|
102
|
+
### 8. Inform User
|
|
101
103
|
|
|
102
|
-
>
|
|
104
|
+
> **IMPORTANT**: All TUI command formats listed below must be output in full. Do not show only the format for the current AI agent.
|
|
103
105
|
|
|
104
|
-
|
|
106
|
+
Output format:
|
|
105
107
|
```
|
|
106
|
-
|
|
108
|
+
Technical plan complete for task {task-id}.
|
|
107
109
|
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
110
|
+
Plan summary:
|
|
111
|
+
- Round: Round {plan-round}
|
|
112
|
+
- Approach: {brief description}
|
|
113
|
+
- Files to modify: {count}
|
|
114
|
+
- Files to create: {count}
|
|
115
|
+
- Estimated complexity: {assessment}
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
+
Output file:
|
|
118
|
+
- Technical plan: .agents/workspace/active/{task-id}/{plan-artifact}
|
|
117
119
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
Important: human review checkpoint.
|
|
121
|
+
Please review the technical plan before continuing to implementation.
|
|
120
122
|
|
|
121
|
-
|
|
122
|
-
- Claude Code / OpenCode
|
|
123
|
-
- Gemini CLI
|
|
124
|
-
- Codex CLI
|
|
123
|
+
Next step - implement the task:
|
|
124
|
+
- Claude Code / OpenCode: /implement-task {task-id}
|
|
125
|
+
- Gemini CLI: /{{project}}:implement-task {task-id}
|
|
126
|
+
- Codex CLI: $implement-task {task-id}
|
|
125
127
|
```
|
|
126
128
|
|
|
127
|
-
##
|
|
129
|
+
## Output Template
|
|
128
130
|
|
|
129
131
|
```markdown
|
|
130
|
-
#
|
|
132
|
+
# Technical Plan
|
|
131
133
|
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
+
- **Plan round**: Round {plan-round}
|
|
135
|
+
- **Artifact file**: `{plan-artifact}`
|
|
134
136
|
|
|
135
|
-
##
|
|
136
|
-
{
|
|
137
|
+
## Problem Understanding
|
|
138
|
+
{Summarize the problem to solve and the key constraints}
|
|
137
139
|
|
|
138
|
-
##
|
|
139
|
-
- {
|
|
140
|
-
- {
|
|
140
|
+
## Constraints
|
|
141
|
+
- {Constraint 1}
|
|
142
|
+
- {Constraint 2}
|
|
141
143
|
|
|
142
|
-
##
|
|
144
|
+
## Option Comparison
|
|
143
145
|
|
|
144
|
-
###
|
|
145
|
-
-
|
|
146
|
-
-
|
|
147
|
-
-
|
|
146
|
+
### Option A: {Name}
|
|
147
|
+
- **Approach**: {Description}
|
|
148
|
+
- **Pros**: {Advantages}
|
|
149
|
+
- **Cons**: {Drawbacks}
|
|
148
150
|
|
|
149
|
-
###
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
151
|
+
### Option B: {Name}
|
|
152
|
+
- **Approach**: {Description}
|
|
153
|
+
- **Pros**: {Advantages}
|
|
154
|
+
- **Cons**: {Drawbacks}
|
|
153
155
|
|
|
154
|
-
###
|
|
155
|
-
{
|
|
156
|
+
### Decision
|
|
157
|
+
{Which option was chosen and why}
|
|
156
158
|
|
|
157
|
-
##
|
|
158
|
-
{
|
|
159
|
+
## Technical Approach
|
|
160
|
+
{Detailed description of the selected approach}
|
|
159
161
|
|
|
160
|
-
##
|
|
162
|
+
## Implementation Steps
|
|
161
163
|
|
|
162
|
-
###
|
|
163
|
-
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
164
|
+
### Step 1: {Title}
|
|
165
|
+
- **File**: `{file-path}`
|
|
166
|
+
- **Action**: {What to do}
|
|
167
|
+
- **Details**: {Specific details}
|
|
166
168
|
|
|
167
|
-
###
|
|
169
|
+
### Step 2: {Title}
|
|
168
170
|
...
|
|
169
171
|
|
|
170
|
-
##
|
|
172
|
+
## File List
|
|
171
173
|
|
|
172
|
-
###
|
|
173
|
-
- `{file-path}` - {
|
|
174
|
+
### New Files
|
|
175
|
+
- `{file-path}` - {Purpose}
|
|
174
176
|
|
|
175
|
-
###
|
|
176
|
-
- `{file-path}` - {
|
|
177
|
+
### Modified Files
|
|
178
|
+
- `{file-path}` - {Planned changes}
|
|
177
179
|
|
|
178
|
-
##
|
|
180
|
+
## Verification Strategy
|
|
179
181
|
|
|
180
|
-
###
|
|
181
|
-
- {
|
|
182
|
-
- {
|
|
182
|
+
### Unit Tests
|
|
183
|
+
- {Test case 1}
|
|
184
|
+
- {Test case 2}
|
|
183
185
|
|
|
184
|
-
###
|
|
185
|
-
- {
|
|
186
|
+
### Manual Validation
|
|
187
|
+
- {Validation step}
|
|
186
188
|
|
|
187
|
-
##
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
-
|
|
189
|
+
## Impact Assessment
|
|
190
|
+
- Breaking change: {Yes/No - details}
|
|
191
|
+
- Performance impact: {Assessment}
|
|
192
|
+
- Security considerations: {Assessment}
|
|
191
193
|
|
|
192
|
-
##
|
|
193
|
-
- {
|
|
194
|
-
- {
|
|
194
|
+
## Risk Control
|
|
195
|
+
- {Risk 1}: {Mitigation}
|
|
196
|
+
- {Risk 2}: {Mitigation}
|
|
195
197
|
```
|
|
196
198
|
|
|
197
|
-
##
|
|
199
|
+
## Completion Checklist
|
|
198
200
|
|
|
199
|
-
- [ ]
|
|
200
|
-
- [ ]
|
|
201
|
-
- [ ]
|
|
202
|
-
- [ ]
|
|
203
|
-
- [ ]
|
|
204
|
-
- [ ]
|
|
205
|
-
- [ ]
|
|
206
|
-
- [ ]
|
|
207
|
-
- [ ]
|
|
208
|
-
- [ ]
|
|
201
|
+
- [ ] Read and understood the requirements analysis
|
|
202
|
+
- [ ] Considered alternative options
|
|
203
|
+
- [ ] Created the plan document `.agents/workspace/active/{task-id}/{plan-artifact}`
|
|
204
|
+
- [ ] Updated `current_step` to technical-design in task.md
|
|
205
|
+
- [ ] Updated `updated_at` to the current time in task.md
|
|
206
|
+
- [ ] Recorded `{plan-artifact}` as a completed artifact in task.md
|
|
207
|
+
- [ ] Marked technical-design as complete in workflow progress
|
|
208
|
+
- [ ] Appended an Activity Log entry to task.md
|
|
209
|
+
- [ ] Informed the user that this is a human review checkpoint
|
|
210
|
+
- [ ] Informed the user of the next step (must include all TUI command formats; do not filter)
|
|
209
211
|
|
|
210
|
-
##
|
|
212
|
+
## STOP
|
|
211
213
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
+
After completing the checklist, **stop immediately**.
|
|
215
|
+
This is a **mandatory human review checkpoint**; the user must review and approve the plan before implementation can continue.
|
|
214
216
|
|
|
215
|
-
##
|
|
217
|
+
## Notes
|
|
216
218
|
|
|
217
|
-
1.
|
|
218
|
-
2.
|
|
219
|
-
3.
|
|
220
|
-
4.
|
|
219
|
+
1. **Prerequisite**: at least one round of requirements analysis must already be complete (`analysis.md` or `analysis-r{N}.md` exists)
|
|
220
|
+
2. **Human review**: this is a mandatory checkpoint; do not automatically proceed to implementation
|
|
221
|
+
3. **Plan quality**: the plan should be detailed enough that another AI agent can implement it without extra context
|
|
222
|
+
4. **Versioning rule**: the first plan uses `plan.md`; later revisions use `plan-r{N}.md`
|
|
221
223
|
|
|
222
|
-
##
|
|
224
|
+
## Error Handling
|
|
223
225
|
|
|
224
|
-
-
|
|
225
|
-
-
|
|
226
|
+
- Task not found: output "Task {task-id} not found, please check the task ID"
|
|
227
|
+
- Analysis missing: output "Analysis not found, please run the analyze-task skill first"
|