From 89b3a4c9ea2b11af5f6172946d451a852dce8b09 Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Mon, 9 Mar 2026 23:01:48 -0700 Subject: [PATCH] feat(plan): add bite-sized work item decomposition to ce:plan Plans now include structured Work Items sections with exact file paths, complete code snippets, verification commands, and commit boundaries. Phase 5.5 decomposes implementation into 2-5 minute tasks that ce:work can execute directly as TodoWrite items. TDD-first when applicable. Only for MORE and A LOT detail levels - MINIMAL stays quick. Closes #245 Refs #146 Co-Authored-By: Claude Opus 4.6 --- CHANGELOG.md | 6 ++ .../.claude-plugin/plugin.json | 2 +- .../compound-engineering/commands/ce/plan.md | 98 +++++++++++++++++++ 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0df2e20b..1a965244 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Release numbering now follows the repository `v*` tag line. Starting at `v2.34.0`, the root CLI package and this changelog stay on that shared version stream. Older entries below retain the previous `0.x` CLI numbering. +## [2.38.2] (2026-03-09) + +### Added + +* **plan:** add bite-sized work item decomposition to ce:plan. Plans now include structured `## Work Items` sections with exact file paths, complete code snippets, verification commands, and commit boundaries. Only for MORE and A LOT detail levels. Inspired by Superpowers' task granularity. Closes [#146](https://github.com/EveryInc/compound-engineering-plugin/issues/146) + ## [2.34.4](https://github.com/EveryInc/compound-engineering-plugin/compare/v2.34.3...v2.34.4) (2026-03-04) diff --git a/plugins/compound-engineering/.claude-plugin/plugin.json b/plugins/compound-engineering/.claude-plugin/plugin.json index e659557f..d833afc9 100644 --- a/plugins/compound-engineering/.claude-plugin/plugin.json +++ b/plugins/compound-engineering/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "compound-engineering", - "version": "2.38.1", + "version": "2.38.2", "description": "AI-powered development tools. 29 agents, 22 commands, 20 skills, 1 MCP server for code review, research, design, and workflow automation.", "author": { "name": "Kieran Klaassen", diff --git a/plugins/compound-engineering/commands/ce/plan.md b/plugins/compound-engineering/commands/ce/plan.md index e4b02406..5561fb2f 100644 --- a/plugins/compound-engineering/commands/ce/plan.md +++ b/plugins/compound-engineering/commands/ce/plan.md @@ -288,6 +288,35 @@ origin: docs/brainstorms/YYYY-MM-DD--brainstorm.md # if originated from [What could block or complicate this] +## Work Items + +> Ordered by dependency. Each task is 2-5 minutes. +> ce:work will use these as TodoWrite items. + +### Task 1: [Component Name] + +**Files:** +- Create: `exact/path/to/new_file` +- Modify: `exact/path/to/existing_file` +- Test: `test/exact/path/to/test_file` + +- [ ] **Step 1: Write failing test** + [Complete test code in fenced code block] + +- [ ] **Step 2: Verify test fails** + Run: `[exact test command]` + Expected: FAIL + +- [ ] **Step 3: Implement** + [Complete implementation code in fenced code block] + +- [ ] **Step 4: Verify test passes** + Run: `[exact test command]` + Expected: PASS + +- [ ] **Step 5: Commit** + `git add [specific files] && git commit -m "[conventional message]"` + ## Sources & References - **Origin brainstorm:** [docs/brainstorms/YYYY-MM-DD--brainstorm.md](path) — include if plan originated from a brainstorm @@ -429,6 +458,44 @@ origin: docs/brainstorms/YYYY-MM-DD--brainstorm.md # if originated from [What docs need updating] +## Work Items + +> Ordered by dependency. Each task is 2-5 minutes. +> ce:work will use these as TodoWrite items. +> For A LOT plans, group tasks into implementation phases. + +### Phase 1: [Foundation] + +#### Task 1: [Component Name] + +**Files:** +- Create: `exact/path/to/new_file` +- Modify: `exact/path/to/existing_file` +- Test: `test/exact/path/to/test_file` + +- [ ] **Step 1: Write failing test** + [Complete test code in fenced code block] + +- [ ] **Step 2: Verify test fails** + Run: `[exact test command]` + Expected: FAIL + +- [ ] **Step 3: Implement** + [Complete implementation code in fenced code block] + +- [ ] **Step 4: Verify test passes** + Run: `[exact test command]` + Expected: PASS + +- [ ] **Step 5: Commit** + `git add [specific files] && git commit -m "[conventional message]"` + +### Phase 2: [Core Implementation] + +#### Task 2: [Component Name] + +[Same structure as Task 1] + ## Sources & References ### Origin @@ -510,6 +577,37 @@ end - [ ] Emphasize comprehensive testing given rapid implementation - [ ] Document any AI-generated code that needs human review +### 5.5. Work Item Decomposition + +**Only for MORE and A LOT detail levels.** MINIMAL plans skip this step. + +Decompose the implementation approach into bite-sized work items that `/ce:work` can execute directly as TodoWrite tasks. Each task should be completable in 2-5 minutes by an agent or developer with no prior context beyond the plan itself. + +**File Map:** Before writing tasks, list all files that will be created or modified: + +| Action | Path | Responsibility | +|--------|------|---------------| +| Create | `exact/path/to/new_file` | What this file does | +| Modify | `exact/path/to/existing_file` | What changes and why | +| Test | `test/exact/path/to/test_file` | What behavior is verified | + +**Decomposition Rules:** + +1. **One action per step** - "Write the test" and "Run the test" are separate steps +2. **Exact file paths** - Never "create a test file", always `test/models/user_test.rb` +3. **Complete code** - Never "add validation", always the actual code in a fenced code block +4. **Verification commands** - Every implementation step has a run command with expected output +5. **Commit boundaries** - Group related steps, commit after each logical unit +6. **Dependency ordering** - Tasks that depend on earlier tasks come later +7. **TDD-first when applicable** - Write test, verify fail, implement, verify pass +8. **2-5 minute scope** - If a step would take longer, split it + +**Task count guidance:** +- MORE: 3-8 tasks typical +- A LOT: 5-15 tasks, grouped into implementation phases + +Fill in the `## Work Items` section in the plan template with concrete tasks following these rules. + ### 6. Final Review & Submission **Brainstorm cross-check (if plan originated from a brainstorm):**