You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: teach ce:work to consume decision-first plans
- Surface deferred implementation questions and scope boundaries
- Use per-unit Patterns and Verification fields for task execution
- Add execution strategy: inline, serial subagents, or parallel
- Reframe Swarm Mode as Agent Teams with opt-in requirement
- Make tool references platform-agnostic
- Remove plan checkbox editing during execution
Copy file name to clipboardExpand all lines: plugins/compound-engineering/skills/ce-work/SKILL.md
+64-70Lines changed: 64 additions & 70 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,10 @@ This command takes a work document (plan, specification, or todo file) and execu
23
23
1.**Read Plan and Clarify**
24
24
25
25
- Read the work document completely
26
+
- Treat the plan as a decision artifact, not an execution script
27
+
- If the plan includes sections such as `Implementation Units`, `Work Breakdown`, `Requirements Trace`, `Files`, `Test Scenarios`, or `Verification`, use those as the primary source material for execution
28
+
- Check for a `Deferred to Implementation` or `Implementation-Time Unknowns` section — these are questions the planner intentionally left for you to resolve during execution. Note them before starting so they inform your approach rather than surprising you mid-task
29
+
- Check for a `Scope Boundaries` section — these are explicit non-goals. Refer back to them if implementation starts pulling you toward adjacent work
26
30
- Review any references or links provided in the plan
27
31
- If anything is unclear or ambiguous, ask clarifying questions now
28
32
- Get user approval to proceed
@@ -73,12 +77,35 @@ This command takes a work document (plan, specification, or todo file) and execu
73
77
- You plan to switch between branches frequently
74
78
75
79
3.**Create Todo List**
76
-
- Use TodoWrite to break plan into actionable tasks
80
+
- Use your available task tracking tool (e.g., TodoWrite, task lists) to break the plan into actionable tasks
81
+
- Derive tasks from the plan's implementation units, dependencies, files, test targets, and verification criteria
82
+
- For each unit, read the `Patterns to follow` field before implementing — these point to specific files or conventions to mirror
83
+
- Use each unit's `Verification` field as the primary "done" signal for that task
84
+
- Do not expect the plan to contain implementation code, micro-step TDD instructions, or exact shell commands
77
85
- Include dependencies between tasks
78
86
- Prioritize based on what needs to be done first
79
87
- Include testing and quality check tasks
80
88
- Keep tasks specific and completable
81
89
90
+
4.**Choose Execution Strategy**
91
+
92
+
After creating the task list, decide how to execute based on the plan's size and dependency structure:
93
+
94
+
| Strategy | When to use |
95
+
|----------|-------------|
96
+
|**Inline**| 1-2 small tasks, or tasks needing user interaction mid-flight |
97
+
|**Serial subagents**| 3+ tasks with dependencies between them. Each subagent gets a fresh context window focused on one unit — prevents context degradation across many tasks |
98
+
|**Parallel subagents**| 3+ tasks where some units have no shared dependencies and touch non-overlapping files. Dispatch independent units simultaneously, run dependent units after their prerequisites complete |
99
+
100
+
**Subagent dispatch** uses your available subagent or task spawning mechanism. For each unit, give the subagent:
101
+
- The full plan file path (for overall context)
102
+
- The specific unit's Goal, Files, Approach, Patterns, Test scenarios, and Verification
103
+
- Any resolved deferred questions relevant to that unit
104
+
105
+
After each subagent completes, update the plan checkboxes and task list before dispatching the next dependent unit.
106
+
107
+
For genuinely large plans needing persistent inter-agent communication (agents challenging each other's approaches, shared coordination across 10+ tasks), see Swarm Mode below which uses Agent Teams.
108
+
82
109
### Phase 2: Execute
83
110
84
111
1.**Task Execution Loop**
@@ -87,15 +114,14 @@ This command takes a work document (plan, specification, or todo file) and execu
87
114
88
115
```
89
116
while (tasks remain):
90
-
- Mark task as in_progress in TodoWrite
117
+
- Mark task as in-progress
91
118
- Read any referenced files from the plan
92
119
- Look for similar patterns in codebase
93
120
- Implement following existing conventions
94
121
- Write tests for new functionality
95
122
- Run System-Wide Test Check (see below)
96
123
- Run tests after changes
97
-
- Mark task as completed in TodoWrite
98
-
- Mark off the corresponding checkbox in the plan file ([ ] → [x])
124
+
- Mark task as completed
99
125
- Evaluate for incremental commit (see below)
100
126
```
101
127
@@ -113,7 +139,6 @@ This command takes a work document (plan, specification, or todo file) and execu
113
139
114
140
**When this matters most:** Any change that touches models with callbacks, error handling with fallback/retry, or functionality exposed through multiple interfaces.
115
141
116
-
**IMPORTANT**: Always update the original plan document by checking off completed items. Use the Edit tool to change `- [ ]` to `- [x]` for each task you finish. This keeps the plan as a living document showing progress and ensures no checkboxes are left unchecked.
117
142
118
143
2.**Incremental Commits**
119
144
@@ -128,6 +153,8 @@ This command takes a work document (plan, specification, or todo file) and execu
128
153
129
154
**Heuristic:** "Can I write a commit message that describes a complete, valuable change? If yes, commit. If the message would be 'WIP' or 'partial X', wait."
130
155
156
+
If the plan has Implementation Units, use them as a starting guide for commit boundaries — but adapt based on what you find during implementation. A unit might need multiple commits if it's larger than expected, or small related units might land together. Use each unit's Goal to inform the commit message.
157
+
131
158
**Commit workflow:**
132
159
```bash
133
160
# 1. Verify tests pass (use project's test command)
@@ -160,7 +187,15 @@ This command takes a work document (plan, specification, or todo file) and execu
160
187
- Add new tests for new functionality
161
188
-**Unit tests with mocks prove logic in isolation. Integration tests with real objects prove the layers work together.** If your change touches callbacks, middleware, or error handling — you need both.
162
189
163
-
5.**Figma Design Sync** (if applicable)
190
+
5.**Simplify as You Go**
191
+
192
+
After completing a cluster of related implementation units (or every 2-3 units), review recently changed files for simplification opportunities — consolidate duplicated patterns, extract shared helpers, and improve code reuse and efficiency. This is especially valuable when using subagents, since each agent works with isolated context and can't see patterns emerging across units.
193
+
194
+
Don't simplify after every single unit — early patterns may look duplicated but diverge intentionally in later units. Wait for a natural phase boundary or when you notice accumulated complexity.
195
+
196
+
If a `/simplify` skill or equivalent is available, use it. Otherwise, review the changed files yourself for reuse and consolidation opportunities.
197
+
198
+
6.**Figma Design Sync** (if applicable)
164
199
165
200
For UI work with Figma designs:
166
201
@@ -170,7 +205,7 @@ This command takes a work document (plan, specification, or todo file) and execu
170
205
- Repeat until implementation matches design
171
206
172
207
6.**Track Progress**
173
-
- Keep TodoWrite updated as you complete tasks
208
+
- Keep the task list updated as you complete tasks
174
209
- Note any blockers or unexpected discoveries
175
210
- Create new tasks if scope expands
176
211
- Keep user informed of major milestones
@@ -196,12 +231,14 @@ This command takes a work document (plan, specification, or todo file) and execu
196
231
Run configured agents in parallel with Task tool. Present findings and address critical issues.
197
232
198
233
3.**Final Validation**
199
-
- All TodoWrite tasks marked completed
234
+
- All tasks marked completed
200
235
- All tests pass
201
236
- Linting passes
202
237
- Code follows existing patterns
203
238
- Figma designs match (if applicable)
204
239
- No console errors or warnings
240
+
- If the plan has a `Requirements Trace`, verify each requirement is satisfied by the completed work
241
+
- If any `Deferred to Implementation` questions were noted, confirm they were resolved during execution
| Plan has 5+ independent tasks | Plan is linear/sequential |
340
-
| Multiple specialists needed (review + test + implement) | Single-focus work |
341
-
| Want maximum parallelism | Simpler mental model preferred |
342
-
| Large feature with clear phases | Small feature or bug fix |
370
+
For genuinely large plans where agents need to communicate with each other, challenge approaches, or coordinate across 10+ tasks with persistent specialized roles, use agent team capabilities if available (e.g., Agent Teams in Claude Code, multi-agent workflows in Codex).
343
371
344
-
### Enabling Swarm Mode
372
+
**Agent teams are typically experimental and require opt-in.** Do not attempt to use agent teams unless the user explicitly requests swarm mode or agent teams, and the platform supports it.
345
373
346
-
To trigger swarm execution, say:
374
+
### When to Use Agent Teams vs Subagents
347
375
348
-
> "Make a Task list and launch an army of agent swarm subagents to build the plan"
376
+
| Agent Teams | Subagents (standard mode) |
377
+
|-------------|---------------------------|
378
+
| Agents need to discuss and challenge each other's approaches | Each task is independent — only the result matters |
379
+
| Persistent specialized roles (e.g., dedicated tester running continuously) | Workers report back and finish |
380
+
| 10+ tasks with complex cross-cutting coordination | 3-8 tasks with clear dependency chains |
381
+
| User explicitly requests "swarm mode" or "agent teams" | Default for most plans |
349
382
350
-
Or explicitly request: "Use swarm mode for this work"
383
+
Most plans should use subagent dispatch from standard mode. Agent teams add significant token cost and coordination overhead — use them when the inter-agent communication genuinely improves the outcome.
See the `orchestrating-swarms` skill for detailed swarm patterns and best practices.
387
+
1. **Create team** — use your available team creation mechanism
388
+
2. **Create task list** — parse Implementation Units into tasks with dependency relationships
389
+
3. **Spawn teammates** — assign specialized roles (implementer, tester, reviewer) based on the plan's needs. Give each teammate the plan file path and their specific task assignments
390
+
4. **Coordinate** — the lead monitors task completion, reassigns work if someone gets stuck, and spawns additional workers as phases unblock
391
+
5. **Cleanup** — shut down all teammates, then clean up the team resources
398
392
399
393
---
400
394
@@ -436,7 +430,7 @@ See the `orchestrating-swarms` skill for detailed swarm patterns and best practi
436
430
Before creating PR, verify:
437
431
438
432
- [ ] All clarifying questions asked and answered
439
-
- [ ] All TodoWrite tasks marked completed
433
+
- [ ] All tasks marked completed
440
434
- [ ] Tests pass (run project's test command)
441
435
- [ ] Linting passes (use linting-agent)
442
436
- [ ] Code follows existing patterns
@@ -465,6 +459,6 @@ For most features: tests + linting + following patterns is sufficient.
465
459
- **Skipping clarifying questions** - Ask now, not after building wrong thing
466
460
- **Ignoring plan references** - The plan has links for a reason
467
461
- **Testing at the end** - Test continuously or suffer later
468
-
- **Forgetting TodoWrite** - Track progress or lose track of what's done
462
+
- **Forgetting to track progress** - Update task status as you go or lose track of what's done
469
463
- **80% done syndrome** - Finish the feature, don't move on early
470
464
- **Over-reviewing simple changes** - Save reviewer agents for complex work
0 commit comments