@fitlab-ai/agent-infra 0.3.1 → 0.3.2
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 +12 -7
- package/README.zh-CN.md +12 -7
- package/bin/cli.js +1 -1
- package/lib/version.js +2 -1
- package/package.json +1 -1
- package/templates/.agents/README.md +12 -0
- package/templates/.agents/README.zh-CN.md +12 -0
- package/templates/.agents/skills/analyze-task/SKILL.md +106 -105
- package/templates/.agents/skills/close-codescan/SKILL.md +64 -63
- package/templates/.agents/skills/close-dependabot/SKILL.md +71 -70
- package/templates/.agents/skills/create-issue/SKILL.md +55 -10
- package/templates/.agents/skills/create-issue/SKILL.zh-CN.md +55 -10
- package/templates/.agents/skills/create-pr/SKILL.md +43 -6
- package/templates/.agents/skills/create-pr/SKILL.zh-CN.md +43 -6
- 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 +7 -6
- package/templates/.agents/skills/implement-task/SKILL.md +7 -10
- package/templates/.agents/skills/implement-task/SKILL.zh-CN.md +7 -10
- package/templates/.agents/skills/import-codescan/SKILL.md +54 -53
- package/templates/.agents/skills/import-dependabot/SKILL.md +57 -56
- package/templates/.agents/skills/import-issue/SKILL.md +58 -58
- 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/sync-issue/SKILL.md +252 -273
- package/templates/.agents/skills/sync-issue/SKILL.zh-CN.md +26 -48
- package/templates/.agents/skills/sync-pr/SKILL.md +5 -25
- package/templates/.agents/skills/sync-pr/SKILL.zh-CN.md +4 -24
- package/templates/.agents/skills/update-agent-infra/scripts/sync-templates.js +1 -1
- package/templates/.claude/CLAUDE.md +13 -0
- package/templates/.claude/CLAUDE.zh-CN.md +13 -0
- package/templates/AGENTS.md +13 -0
- package/templates/AGENTS.zh-CN.md +13 -0
|
@@ -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
|
-
- `.agent-workspace/active/{task-id}/task.md` -
|
|
22
|
-
-
|
|
22
|
+
Check required files:
|
|
23
|
+
- `.agent-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 `.agent-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 `.agent-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 `.agent-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: .agent-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 `.agent-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"
|