aiblueprint-cli 1.4.40 → 1.4.42
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/claude-code-config/skills/apex/SKILL.md +116 -0
- package/claude-code-config/skills/{workflow-apex → apex}/scripts/setup-templates.sh +12 -2
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00-init.md +19 -34
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-interactive.md +13 -1
- package/claude-code-config/skills/apex/steps/step-00b-save.md +123 -0
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-01-analyze.md +36 -17
- package/claude-code-config/skills/apex/steps/step-02-plan.md +593 -0
- package/claude-code-config/skills/apex/steps/step-02b-tasks.md +301 -0
- package/claude-code-config/skills/apex/steps/step-03-execute-teams.md +296 -0
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-03-execute.md +1 -0
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-04-validate.md +3 -1
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-05-examine.md +92 -35
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-06-resolve.md +1 -0
- package/claude-code-config/skills/{workflow-apex → apex}/steps/step-09-finish.md +32 -2
- package/claude-code-config/skills/{workflow-apex → apex}/templates/00-context.md +2 -0
- package/claude-code-config/skills/{meta-claude-memory → claude-memory}/SKILL.md +59 -1
- package/dist/cli.js +84 -37
- package/package.json +1 -1
- package/claude-code-config/skills/workflow-apex/SKILL.md +0 -303
- package/claude-code-config/skills/workflow-apex/steps/step-02-plan.md +0 -264
- /package/claude-code-config/skills/{workflow-apex → apex}/scripts/update-progress.sh +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-branch.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-00b-economy.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-07-tests.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/steps/step-08-run-tests.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/01-analyze.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/02-plan.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/03-execute.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/04-validate.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/05-examine.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/06-resolve.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/07-tests.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/08-run-tests.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/09-finish.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/README.md +0 -0
- /package/claude-code-config/skills/{workflow-apex → apex}/templates/step-complete.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/comprehensive-example.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/optimize-guide.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/project-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/prompting-techniques.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/rules-directory-guide.md +0 -0
- /package/claude-code-config/skills/{meta-claude-memory → claude-memory}/references/section-templates.md +0 -0
- /package/claude-code-config/skills/{git-commit → commit}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-create-pr → create-pr}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-fix-errors → fix-errors}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-fix-grammar → fix-grammar}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-fix-pr-comments → fix-pr-comments}/SKILL.md +0 -0
- /package/claude-code-config/skills/{git-merge → merge}/SKILL.md +0 -0
- /package/claude-code-config/skills/{utils-oneshot → oneshot}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/anthropic-best-practices.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/anti-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/clarity-principles.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/few-shot-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/openai-best-practices.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/prompt-templates.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/reasoning-techniques.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/system-prompt-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-prompt-creator → prompt-creator}/references/xml-structure.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/LICENSE.txt +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/package.json +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/output-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/progressive-disclosure-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/prompting-integration.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/real-world-examples.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/script-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/workflows.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/references/xml-tag-guide.md +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/init-skill.ts +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/package-skill.ts +0 -0
- /package/claude-code-config/skills/{meta-skill-creator → skill-creator}/scripts/validate.ts +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/SKILL.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/context-management.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/debugging-agents.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/error-handling-and-recovery.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/evaluation-and-testing.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/orchestration-patterns.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/subagents.md +0 -0
- /package/claude-code-config/skills/{meta-subagent-creator → subagent-creator}/references/writing-subagent-prompts.md +0 -0
- /package/claude-code-config/skills/{utils-ultrathink → ultrathink}/SKILL.md +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-02b-tasks
|
|
3
|
+
description: Generate task breakdown with dependencies from the implementation plan
|
|
4
|
+
prev_step: steps/step-02-plan.md
|
|
5
|
+
next_step: steps/step-03-execute.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 2b: Task Breakdown
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER start implementing - that's step 3
|
|
13
|
+
- 🛑 NEVER write or modify code in this step
|
|
14
|
+
- ✅ ALWAYS create individual task files with clear structure
|
|
15
|
+
- ✅ ALWAYS include dependencies between tasks
|
|
16
|
+
- ✅ ALWAYS create a README.md explaining the task graph
|
|
17
|
+
- 📋 YOU ARE A TASK ARCHITECT, not an implementer
|
|
18
|
+
- 💬 FOCUS on breaking down the plan into executable tasks
|
|
19
|
+
- 🚫 FORBIDDEN to use Edit, Write (except for task files), or Bash tools
|
|
20
|
+
|
|
21
|
+
## EXECUTION PROTOCOLS:
|
|
22
|
+
|
|
23
|
+
- 🎯 Analyze the plan from step-02 before creating tasks
|
|
24
|
+
- 💾 Create `tasks/` folder inside output directory (if save_mode)
|
|
25
|
+
- 📖 Reference the implementation plan structure
|
|
26
|
+
- 🚫 FORBIDDEN to proceed until all tasks are created
|
|
27
|
+
|
|
28
|
+
## CONTEXT BOUNDARIES:
|
|
29
|
+
|
|
30
|
+
- Context from step-01 (analysis) and step-02 (plan) is available
|
|
31
|
+
- Implementation has NOT started
|
|
32
|
+
- Tasks should map directly to plan sections
|
|
33
|
+
- Each task is self-contained with all context needed
|
|
34
|
+
|
|
35
|
+
## YOUR TASK:
|
|
36
|
+
|
|
37
|
+
Transform the implementation plan into individual task files with clear dependencies, enabling parallel execution where possible.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
<available_state>
|
|
42
|
+
From previous steps:
|
|
43
|
+
|
|
44
|
+
| Variable | Description |
|
|
45
|
+
|----------|-------------|
|
|
46
|
+
| `{task_description}` | What to implement |
|
|
47
|
+
| `{task_id}` | Kebab-case identifier |
|
|
48
|
+
| `{acceptance_criteria}` | Success criteria from step-01 |
|
|
49
|
+
| `{auto_mode}` | Skip confirmations |
|
|
50
|
+
| `{save_mode}` | Save outputs to files |
|
|
51
|
+
| `{tasks_mode}` | Generate task breakdown (should be true) |
|
|
52
|
+
| `{output_dir}` | Path to output (if save_mode) |
|
|
53
|
+
| Plan | Full implementation plan from step-02 |
|
|
54
|
+
</available_state>
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## EXECUTION SEQUENCE:
|
|
59
|
+
|
|
60
|
+
### 1. Create Tasks Directory
|
|
61
|
+
|
|
62
|
+
**If `{save_mode}` = true:**
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
mkdir -p {output_dir}/tasks
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 2. Analyze Plan and Identify Tasks
|
|
69
|
+
|
|
70
|
+
From the implementation plan, identify:
|
|
71
|
+
|
|
72
|
+
- **Independent tasks** - Can run in parallel (no dependencies)
|
|
73
|
+
- **Sequential tasks** - Must wait for other tasks to complete
|
|
74
|
+
- **File-grouped tasks** - Changes to same file that could be combined
|
|
75
|
+
|
|
76
|
+
**Task sizing guidelines:**
|
|
77
|
+
|
|
78
|
+
- Each task should be completable in one focused session
|
|
79
|
+
- Tasks should modify 1-3 files maximum
|
|
80
|
+
- Complex file changes can be split into multiple tasks
|
|
81
|
+
|
|
82
|
+
### 3. Create Individual Task Files
|
|
83
|
+
|
|
84
|
+
For each task, create a file: `{output_dir}/tasks/task-NN-{name}.md`
|
|
85
|
+
|
|
86
|
+
**Task file structure:**
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
---
|
|
90
|
+
id: task-NN
|
|
91
|
+
name: {short-descriptive-name}
|
|
92
|
+
status: pending
|
|
93
|
+
priority: {high|medium|low}
|
|
94
|
+
depends_on: [task-XX, task-YY] # Empty array if no dependencies
|
|
95
|
+
blocks: [task-ZZ] # Tasks waiting for this one
|
|
96
|
+
estimated_files:
|
|
97
|
+
- path/to/file1.ts
|
|
98
|
+
- path/to/file2.ts
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
# Task NN: {Descriptive Title}
|
|
102
|
+
|
|
103
|
+
## Objective
|
|
104
|
+
|
|
105
|
+
{One sentence describing what this task accomplishes}
|
|
106
|
+
|
|
107
|
+
## Context
|
|
108
|
+
|
|
109
|
+
{2-3 sentences providing background needed to complete the task}
|
|
110
|
+
|
|
111
|
+
## Plan
|
|
112
|
+
|
|
113
|
+
{Specific implementation steps, referencing line numbers and patterns}
|
|
114
|
+
|
|
115
|
+
1. Step one
|
|
116
|
+
2. Step two
|
|
117
|
+
3. Step three
|
|
118
|
+
|
|
119
|
+
## Files to Modify
|
|
120
|
+
|
|
121
|
+
| File | Action | Changes |
|
|
122
|
+
|------|--------|---------|
|
|
123
|
+
| `path/to/file.ts` | Modify | Add function X, update Y |
|
|
124
|
+
|
|
125
|
+
## Acceptance Criteria
|
|
126
|
+
|
|
127
|
+
- [ ] AC1: {Specific testable criterion}
|
|
128
|
+
- [ ] AC2: {Specific testable criterion}
|
|
129
|
+
|
|
130
|
+
## Dependencies
|
|
131
|
+
|
|
132
|
+
**Depends on:**
|
|
133
|
+
- `task-XX`: {Why this dependency exists}
|
|
134
|
+
|
|
135
|
+
**Blocks:**
|
|
136
|
+
- `task-ZZ`: {Why this blocks other tasks}
|
|
137
|
+
|
|
138
|
+
## Notes
|
|
139
|
+
|
|
140
|
+
{Any additional context, gotchas, or considerations}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 4. Build Dependency Graph
|
|
144
|
+
|
|
145
|
+
Analyze task relationships:
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
task-01 ──┬──► task-02 ──► task-04
|
|
149
|
+
│
|
|
150
|
+
└──► task-03 ──► task-05
|
|
151
|
+
▲
|
|
152
|
+
│
|
|
153
|
+
task-06 ─────────────┘
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Identify:
|
|
157
|
+
- **Critical path** - Longest chain of dependencies
|
|
158
|
+
- **Parallel groups** - Tasks that can run simultaneously
|
|
159
|
+
- **Bottlenecks** - Tasks blocking many others
|
|
160
|
+
|
|
161
|
+
### 5. Create README.md
|
|
162
|
+
|
|
163
|
+
Create `{output_dir}/tasks/README.md`:
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
# Task Breakdown: {task_description}
|
|
167
|
+
|
|
168
|
+
**Generated:** {timestamp}
|
|
169
|
+
**Total Tasks:** {count}
|
|
170
|
+
**Parallel Groups:** {count}
|
|
171
|
+
|
|
172
|
+
## Overview
|
|
173
|
+
|
|
174
|
+
{1-2 sentences summarizing the task breakdown}
|
|
175
|
+
|
|
176
|
+
## Dependency Graph
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
[Visual representation of task dependencies]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Task Summary
|
|
183
|
+
|
|
184
|
+
| ID | Name | Status | Depends On | Priority |
|
|
185
|
+
|----|------|--------|------------|----------|
|
|
186
|
+
| 01 | {name} | pending | - | high |
|
|
187
|
+
| 02 | {name} | pending | 01 | medium |
|
|
188
|
+
|
|
189
|
+
## Parallel Execution Groups
|
|
190
|
+
|
|
191
|
+
**Group 1 (Start immediately):**
|
|
192
|
+
- task-01: {name}
|
|
193
|
+
- task-06: {name}
|
|
194
|
+
|
|
195
|
+
**Group 2 (After Group 1):**
|
|
196
|
+
- task-02: {name} (after task-01)
|
|
197
|
+
- task-03: {name} (after task-01, task-06)
|
|
198
|
+
|
|
199
|
+
**Group 3 (After Group 2):**
|
|
200
|
+
- task-04: {name} (after task-02)
|
|
201
|
+
- task-05: {name} (after task-03)
|
|
202
|
+
|
|
203
|
+
## Critical Path
|
|
204
|
+
|
|
205
|
+
task-01 → task-02 → task-04
|
|
206
|
+
|
|
207
|
+
## Notes
|
|
208
|
+
|
|
209
|
+
{Any additional context about the task breakdown}
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### 6. Validate Task Breakdown
|
|
213
|
+
|
|
214
|
+
Checklist:
|
|
215
|
+
- [ ] All plan sections have corresponding tasks
|
|
216
|
+
- [ ] No circular dependencies
|
|
217
|
+
- [ ] Each task has clear acceptance criteria
|
|
218
|
+
- [ ] Dependencies are logical and minimal
|
|
219
|
+
- [ ] Parallel opportunities maximized
|
|
220
|
+
- [ ] README accurately describes the graph
|
|
221
|
+
|
|
222
|
+
### 7. Present Summary
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
**Task Breakdown Complete**
|
|
226
|
+
|
|
227
|
+
**Total tasks:** {count}
|
|
228
|
+
**Independent (can start now):** {count}
|
|
229
|
+
**Sequential chains:** {count}
|
|
230
|
+
|
|
231
|
+
**Files created:**
|
|
232
|
+
- tasks/README.md
|
|
233
|
+
- tasks/task-01-{name}.md
|
|
234
|
+
- tasks/task-02-{name}.md
|
|
235
|
+
- ...
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
**If `{auto_mode}` = true:**
|
|
239
|
+
→ Skip confirmation, proceed to execution
|
|
240
|
+
|
|
241
|
+
**If `{auto_mode}` = false:**
|
|
242
|
+
|
|
243
|
+
```yaml
|
|
244
|
+
questions:
|
|
245
|
+
- header: "Tasks"
|
|
246
|
+
question: "Task breakdown complete. Ready to proceed to implementation?"
|
|
247
|
+
options:
|
|
248
|
+
- label: "Continue to execution (Recommended)"
|
|
249
|
+
description: "Start implementing tasks in order"
|
|
250
|
+
- label: "Review tasks first"
|
|
251
|
+
description: "I want to examine the task files"
|
|
252
|
+
- label: "Adjust breakdown"
|
|
253
|
+
description: "Modify the task structure"
|
|
254
|
+
multiSelect: false
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## SUCCESS METRICS:
|
|
260
|
+
|
|
261
|
+
✅ Tasks directory created with all task files
|
|
262
|
+
✅ Each task has clear dependencies documented
|
|
263
|
+
✅ README.md provides complete overview
|
|
264
|
+
✅ Dependency graph has no cycles
|
|
265
|
+
✅ Parallel groups identified
|
|
266
|
+
✅ Critical path documented
|
|
267
|
+
✅ NO code written or modified
|
|
268
|
+
|
|
269
|
+
## FAILURE MODES:
|
|
270
|
+
|
|
271
|
+
❌ Creating tasks without clear dependencies
|
|
272
|
+
❌ Missing README.md
|
|
273
|
+
❌ Circular dependencies in graph
|
|
274
|
+
❌ Tasks too large or too granular
|
|
275
|
+
❌ Starting to write code (that's step 3!)
|
|
276
|
+
❌ **CRITICAL**: Not using AskUserQuestion for confirmation
|
|
277
|
+
|
|
278
|
+
## TASK BREAKDOWN PROTOCOLS:
|
|
279
|
+
|
|
280
|
+
- Each task must be self-contained with all needed context
|
|
281
|
+
- Dependencies should be minimal and justified
|
|
282
|
+
- Maximize parallel execution opportunities
|
|
283
|
+
- Task files follow consistent structure
|
|
284
|
+
- README provides birds-eye view
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## NEXT STEP:
|
|
289
|
+
|
|
290
|
+
After user confirms via AskUserQuestion (or auto-proceed):
|
|
291
|
+
|
|
292
|
+
**If `{teams_mode}` = true:**
|
|
293
|
+
→ Load `./step-03-execute-teams.md` for Agent Team parallel execution
|
|
294
|
+
|
|
295
|
+
**Otherwise:**
|
|
296
|
+
→ Load `./step-03-execute.md` to start implementation
|
|
297
|
+
|
|
298
|
+
<critical>
|
|
299
|
+
Remember: This step ONLY creates task documentation - save all implementation for step-03!
|
|
300
|
+
The tasks folder gives a clear roadmap of what to implement and in what order.
|
|
301
|
+
</critical>
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-03-execute-teams
|
|
3
|
+
description: Execute implementation using Claude Code Agent Teams for parallel task execution
|
|
4
|
+
prev_step: steps/step-02b-tasks.md
|
|
5
|
+
next_step: steps/step-04-validate.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 3t: Execute with Agent Teams
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
11
|
+
|
|
12
|
+
- 🛑 NEVER implement code yourself - you are the TEAM LEAD
|
|
13
|
+
- 🛑 NEVER use Edit, Write tools for implementation
|
|
14
|
+
- ✅ ALWAYS delegate implementation to teammates
|
|
15
|
+
- ✅ ALWAYS use delegate mode (Shift+Tab) to stay coordination-only
|
|
16
|
+
- ✅ ALWAYS keep the team alive after tasks complete
|
|
17
|
+
- 📋 YOU ARE A COORDINATOR, not an implementer
|
|
18
|
+
- 💬 FOCUS on assigning tasks, monitoring progress, resolving blockers
|
|
19
|
+
- 🚫 FORBIDDEN to write any implementation code
|
|
20
|
+
|
|
21
|
+
## EXECUTION PROTOCOLS:
|
|
22
|
+
|
|
23
|
+
- 🎯 Create team, assign tasks, monitor completion
|
|
24
|
+
- 💾 Log progress to output (if save_mode)
|
|
25
|
+
- 📖 Each teammate gets full task context
|
|
26
|
+
- 🚫 FORBIDDEN to implement anything yourself
|
|
27
|
+
|
|
28
|
+
## CONTEXT BOUNDARIES:
|
|
29
|
+
|
|
30
|
+
- Task breakdown from step-02b is available
|
|
31
|
+
- TaskList has all tasks with dependencies
|
|
32
|
+
- You have the plan from step-02
|
|
33
|
+
- Implementation has NOT started
|
|
34
|
+
- **If context was cleared ("Execute and clear context"):** The plan file contains all APEX state variables in the "APEX Workflow Context" section. Read the plan file first and restore all variables before proceeding.
|
|
35
|
+
|
|
36
|
+
## YOUR TASK:
|
|
37
|
+
|
|
38
|
+
Coordinate a team of Claude Code agents to implement all tasks in parallel, acting purely as team lead.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
<available_state>
|
|
43
|
+
From previous steps:
|
|
44
|
+
|
|
45
|
+
| Variable | Description |
|
|
46
|
+
|----------|-------------|
|
|
47
|
+
| `{task_description}` | What to implement |
|
|
48
|
+
| `{task_id}` | Kebab-case identifier |
|
|
49
|
+
| `{auto_mode}` | Skip confirmations |
|
|
50
|
+
| `{save_mode}` | Save outputs to files |
|
|
51
|
+
| `{teams_mode}` | Should be true |
|
|
52
|
+
| `{tasks_mode}` | Should be true |
|
|
53
|
+
| `{output_dir}` | Path to output (if save_mode) |
|
|
54
|
+
| TaskList | All tasks with dependencies from step-02 |
|
|
55
|
+
| Task files | Individual task files from step-02b (if save_mode) |
|
|
56
|
+
</available_state>
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## EXECUTION SEQUENCE:
|
|
61
|
+
|
|
62
|
+
### 1. Initialize Save Output (if save_mode)
|
|
63
|
+
|
|
64
|
+
**If `{save_mode}` = true:**
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "03" "execute-teams" "in_progress"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 2. Analyze Tasks for Team Sizing
|
|
71
|
+
|
|
72
|
+
Review TaskList and determine team size:
|
|
73
|
+
|
|
74
|
+
| Tasks | Teammates | Rationale |
|
|
75
|
+
|-------|-----------|-----------|
|
|
76
|
+
| 1-2 | 1 | Sequential is fine |
|
|
77
|
+
| 3-4 | 2 | Small parallel benefit |
|
|
78
|
+
| 5-8 | 3-4 | Good parallelism |
|
|
79
|
+
| 9+ | 4-6 | Max parallel benefit |
|
|
80
|
+
|
|
81
|
+
<critical>
|
|
82
|
+
NEVER create more than 6 teammates. Group related tasks if needed.
|
|
83
|
+
Cap at the number of independent task groups, not total tasks.
|
|
84
|
+
</critical>
|
|
85
|
+
|
|
86
|
+
### 3. Map Skills to Tasks
|
|
87
|
+
|
|
88
|
+
For each task, check if a matching skill should be suggested:
|
|
89
|
+
|
|
90
|
+
| Task Type | Suggested Skill |
|
|
91
|
+
|-----------|----------------|
|
|
92
|
+
| UI/Frontend components | `/frontend-design` |
|
|
93
|
+
| API endpoints | - |
|
|
94
|
+
| Database/schema | - |
|
|
95
|
+
| Tests | - |
|
|
96
|
+
| Documentation | - |
|
|
97
|
+
|
|
98
|
+
Add `skill_hint` to task assignments when relevant.
|
|
99
|
+
|
|
100
|
+
### 4. Use Existing Team (created in step-02-plan)
|
|
101
|
+
|
|
102
|
+
<critical>
|
|
103
|
+
IMPORTANT: Claude Code Agent Teams is an EXPERIMENTAL feature.
|
|
104
|
+
Ensure CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set in settings.json.
|
|
105
|
+
|
|
106
|
+
The team "apex-{feature_name}" was ALREADY created in step-02-plan BEFORE the TaskList.
|
|
107
|
+
Do NOT call TeamCreate again — it would reset the task list and lose all tasks.
|
|
108
|
+
</critical>
|
|
109
|
+
|
|
110
|
+
**Spawn teammates using the Task tool with `subagent_type: "implementer"`:**
|
|
111
|
+
|
|
112
|
+
<critical>
|
|
113
|
+
MANDATORY: Always use `subagent_type: "implementer"` for ALL teammates.
|
|
114
|
+
The `implementer` agent is the dedicated APEX executor — it knows how to:
|
|
115
|
+
- Claim tasks from TaskList via TaskUpdate
|
|
116
|
+
- Stay within its assigned file boundaries
|
|
117
|
+
- Report via SendMessage (not plain text)
|
|
118
|
+
- Handle shutdown requests gracefully
|
|
119
|
+
NEVER use `general-purpose` or other agent types.
|
|
120
|
+
</critical>
|
|
121
|
+
|
|
122
|
+
For each teammate, spawn via the Task tool:
|
|
123
|
+
- `subagent_type`: `"implementer"` (MANDATORY)
|
|
124
|
+
- `team_name`: `"apex-{feature_name}"`
|
|
125
|
+
- `name`: `"impl-{group-name}"` (e.g., `impl-backend`, `impl-frontend`)
|
|
126
|
+
- `mode`: `"bypassPermissions"`
|
|
127
|
+
- `prompt`: Full task context (see template below)
|
|
128
|
+
|
|
129
|
+
### 5. Spawn Teammates with Assignments
|
|
130
|
+
|
|
131
|
+
**Spawn template (one Task call per teammate):**
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Task:
|
|
135
|
+
subagent_type: "implementer"
|
|
136
|
+
team_name: "apex-{feature_name}"
|
|
137
|
+
name: "impl-{group-name}"
|
|
138
|
+
mode: "bypassPermissions"
|
|
139
|
+
prompt: |
|
|
140
|
+
You are impl-{group-name} in team apex-{feature_name}.
|
|
141
|
+
|
|
142
|
+
## Your Assignment
|
|
143
|
+
|
|
144
|
+
**Task:** {task-id} - {task-title}
|
|
145
|
+
|
|
146
|
+
### Objective
|
|
147
|
+
{objective from task file}
|
|
148
|
+
|
|
149
|
+
### Plan
|
|
150
|
+
{implementation steps from task file}
|
|
151
|
+
|
|
152
|
+
### Files to Modify (YOUR boundary — only touch these)
|
|
153
|
+
{file list from task file}
|
|
154
|
+
|
|
155
|
+
### Acceptance Criteria
|
|
156
|
+
{criteria from task file}
|
|
157
|
+
|
|
158
|
+
### Patterns to Follow
|
|
159
|
+
{relevant patterns from step-01 analysis}
|
|
160
|
+
|
|
161
|
+
### Skill Hint
|
|
162
|
+
{skill to invoke, if applicable — e.g., "Use /frontend-design for UI components"}
|
|
163
|
+
|
|
164
|
+
### Dependencies
|
|
165
|
+
{list of completed dependencies and their outputs}
|
|
166
|
+
|
|
167
|
+
IMPORTANT: Check TaskList, claim your task, implement, then report via SendMessage.
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Spawn rules:**
|
|
171
|
+
- Spawn all INDEPENDENT teammates in PARALLEL (single message, multiple Task calls)
|
|
172
|
+
- Each teammate gets ALL context (they can't see your conversation)
|
|
173
|
+
- Use `mode: "bypassPermissions"` to avoid permission prompt interruptions
|
|
174
|
+
- As tasks with dependencies complete, spawn teammates for dependent tasks
|
|
175
|
+
- 2-4 teammates for most tasks — more adds overhead, not speed
|
|
176
|
+
|
|
177
|
+
### 6. Monitor Progress
|
|
178
|
+
|
|
179
|
+
**While tasks are running:**
|
|
180
|
+
|
|
181
|
+
Messages from teammates arrive AUTOMATICALLY — no need to poll or check periodically.
|
|
182
|
+
|
|
183
|
+
1. Wait for teammate messages (completion reports or blocker reports)
|
|
184
|
+
2. If a teammate reports a blocker:
|
|
185
|
+
- Analyze the blocker
|
|
186
|
+
- Send guidance via SendMessage
|
|
187
|
+
- If blocker requires another task's output, check TaskList for its status
|
|
188
|
+
3. If a teammate reports completion, verify via TaskList that the task is marked `completed`
|
|
189
|
+
(The `implementer` agent marks its own tasks complete — you don't need to do it)
|
|
190
|
+
4. As tasks complete, spawn teammates for newly-unblocked dependent tasks
|
|
191
|
+
|
|
192
|
+
### 7. Handle Completion
|
|
193
|
+
|
|
194
|
+
**When ALL tasks are complete:**
|
|
195
|
+
|
|
196
|
+
<critical>
|
|
197
|
+
NEVER clean up or dismiss the team here.
|
|
198
|
+
The team MUST stay alive through validation (step-04), examine (step-05), resolve (step-06), and finish (step-09).
|
|
199
|
+
Team shutdown happens ONLY in step-09-finish.md — the very last step of the APEX workflow.
|
|
200
|
+
</critical>
|
|
201
|
+
|
|
202
|
+
**If `{auto_mode}` = true:**
|
|
203
|
+
→ Proceed directly to step-04-validate.md
|
|
204
|
+
|
|
205
|
+
**If `{auto_mode}` = false:**
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
questions:
|
|
209
|
+
- header: "Team Status"
|
|
210
|
+
question: "All tasks complete. What would you like to do?"
|
|
211
|
+
options:
|
|
212
|
+
- label: "Proceed to validation (Recommended)"
|
|
213
|
+
description: "Run typecheck, lint, and verify acceptance criteria"
|
|
214
|
+
- label: "Assign additional tasks"
|
|
215
|
+
description: "Give more work to the team"
|
|
216
|
+
- label: "Message a teammate"
|
|
217
|
+
description: "Send follow-up instructions to a specific teammate"
|
|
218
|
+
multiSelect: false
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### 8. Complete Save Output (if save_mode)
|
|
222
|
+
|
|
223
|
+
**If `{save_mode}` = true:**
|
|
224
|
+
|
|
225
|
+
Append to `{output_dir}/03-execute.md`:
|
|
226
|
+
|
|
227
|
+
```markdown
|
|
228
|
+
## Execution Mode: Agent Teams
|
|
229
|
+
|
|
230
|
+
**Team size:** {count} teammates
|
|
231
|
+
**Tasks completed:** {count}/{total}
|
|
232
|
+
|
|
233
|
+
### Task Results
|
|
234
|
+
| Task | Teammate | Status | Files Changed |
|
|
235
|
+
|------|----------|--------|---------------|
|
|
236
|
+
| task-01 | impl-backend | ✓ | file1.ts, file2.ts |
|
|
237
|
+
| task-02 | impl-frontend | ✓ | file3.ts |
|
|
238
|
+
|
|
239
|
+
**Team Status:** Active (kept alive for follow-up)
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## Step Complete
|
|
244
|
+
|
|
245
|
+
**Status:** ✓ Complete
|
|
246
|
+
**Next:** step-04-validate.md
|
|
247
|
+
**Timestamp:** {ISO timestamp}
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
bash {skill_dir}/scripts/update-progress.sh "{task_id}" "03" "execute-teams" "complete"
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## SUCCESS METRICS:
|
|
257
|
+
|
|
258
|
+
✅ All tasks assigned to teammates
|
|
259
|
+
✅ All tasks completed successfully
|
|
260
|
+
✅ TaskList updated with completion status
|
|
261
|
+
✅ Team kept alive (NOT cleaned up)
|
|
262
|
+
✅ NO implementation code written by team lead
|
|
263
|
+
✅ Output saved (if save_mode)
|
|
264
|
+
|
|
265
|
+
## FAILURE MODES:
|
|
266
|
+
|
|
267
|
+
❌ Team lead writing implementation code
|
|
268
|
+
❌ Cleaning up or dismissing the team
|
|
269
|
+
❌ **CRITICAL**: Calling TeamCreate again (team already exists from step-02-plan — re-creating resets TaskList!)
|
|
270
|
+
❌ Using any agent type other than `implementer` for teammates
|
|
271
|
+
❌ Not providing enough context to teammates
|
|
272
|
+
❌ Assigning tasks with unmet dependencies
|
|
273
|
+
❌ Not monitoring for blockers
|
|
274
|
+
|
|
275
|
+
## BEST PRACTICES:
|
|
276
|
+
|
|
277
|
+
- Give each teammate ALL context they need (they can't see your conversation)
|
|
278
|
+
- Avoid assigning tasks that modify the same files to different teammates
|
|
279
|
+
- Size tasks appropriately - not too large, not too small
|
|
280
|
+
- Monitor actively and resolve blockers quickly
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## NEXT STEP:
|
|
285
|
+
|
|
286
|
+
After all tasks complete, load `./step-04-validate.md`
|
|
287
|
+
|
|
288
|
+
<critical>
|
|
289
|
+
Remember:
|
|
290
|
+
- You are the TEAM LEAD — NEVER implement code yourself
|
|
291
|
+
- ALWAYS use `subagent_type: "implementer"` when spawning teammates
|
|
292
|
+
- Keep the team ALIVE — shutdown happens ONLY in step-09-finish.md
|
|
293
|
+
- NEVER send shutdown_request to teammates in this step
|
|
294
|
+
- Each teammate needs FULL context (plan, patterns, file references)
|
|
295
|
+
- The `implementer` agent handles TaskList claiming, SendMessage reporting, and file boundaries automatically
|
|
296
|
+
</critical>
|
|
@@ -32,6 +32,7 @@ next_step: steps/step-04-validate.md
|
|
|
32
32
|
- Files to modify are known from the plan
|
|
33
33
|
- Patterns to follow are documented from step-01
|
|
34
34
|
- Don't add features - stick to the plan
|
|
35
|
+
- **If context was cleared ("Execute and clear context"):** The plan file contains all APEX state variables in the "APEX Workflow Context" section. Read the plan file first and restore all variables before proceeding.
|
|
35
36
|
|
|
36
37
|
## YOUR TASK:
|
|
37
38
|
|
|
@@ -27,10 +27,11 @@ next_step: steps/step-05-examine.md
|
|
|
27
27
|
|
|
28
28
|
## CONTEXT BOUNDARIES:
|
|
29
29
|
|
|
30
|
-
- Implementation from step-03 is complete
|
|
30
|
+
- Implementation from step-03 (or step-03-execute-teams) is complete
|
|
31
31
|
- Tests may or may not pass yet
|
|
32
32
|
- Type errors may exist
|
|
33
33
|
- Focus is on verification, not new implementation
|
|
34
|
+
- **If `{teams_mode}` = true:** The agent team is still alive. Do NOT shutdown or dismiss teammates. Team shutdown happens in step-09-finish only.
|
|
34
35
|
|
|
35
36
|
## YOUR TASK:
|
|
36
37
|
|
|
@@ -261,4 +262,5 @@ Based on flags (check in order):
|
|
|
261
262
|
|
|
262
263
|
<critical>
|
|
263
264
|
Remember: NEVER proceed with failing checks - fix everything first!
|
|
265
|
+
If teams_mode is active: NEVER shutdown teammates — they stay alive until step-09-finish!
|
|
264
266
|
</critical>
|