| name | planning-and-task-breakdown |
| description | Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. |
Planning and Task Breakdown
Overview
Decompose work into small, verifiable tasks with explicit acceptance criteria. Good task breakdown is the difference between an agent that completes work reliably and one that produces a tangled mess. Every task should be small enough to implement, test, and verify in a single focused session.
When to Use
- You have a spec and need to break it into implementable units
- A task feels too large or vague to start
- Work needs to be parallelized across multiple agents or sessions
- You need to communicate scope to a human
- The implementation order isn't obvious
When NOT to use: Single-file changes with obvious scope, or when the spec already contains well-defined tasks.
The Planning Process
Step 1: Enter Plan Mode
Before writing any code, operate in read-only mode:
- Read the spec and relevant codebase sections
- Identify existing patterns and conventions
- Map dependencies between components
- Note risks and unknowns
Do NOT write code during planning. The output is a plan document, not implementation.
Step 2: Identify the Dependency Graph
Map what depends on what:
State model (AppState/PaneState)
│
├── Protocol / IPC message types
│ │
│ ├── Server-side handlers (server/api)
│ │ │
│ │ └── CLI client commands
│ │ │
│ │ └── Rendering (compute_view → render)
│ │
│ └── Validation logic
│
└── Persistence / migrations
Implementation order follows the dependency graph bottom-up: build foundations first.
Step 3: Slice Vertically
Instead of building all the state model, then all the protocol handlers, then all the rendering — build one complete feature path at a time:
Bad (horizontal slicing):
Task 1: Build entire state model
Task 2: Build all protocol/IPC handlers
Task 3: Build all rendering
Task 4: Connect everything
Good (vertical slicing):
Task 1: User can create a pane (state + protocol command + CLI + render)
Task 2: User can list panes (query + protocol command + CLI output)
Task 3: User can rename a pane (mutation + protocol command + CLI + render)
Task 4: User can close a pane (state + protocol command + CLI + confirmation)
Each vertical slice delivers working, testable functionality.
Step 4: Write Tasks
Each task follows this structure:
## Task [N]: [Short descriptive title]
**Description:** One paragraph explaining what this task accomplishes.
**Acceptance criteria:**
- [ ] [Specific, testable condition]
- [ ] [Specific, testable condition]
**Verification:**
- [ ] Tests pass: `just test-one <filter>` (e.g. `pane_create`)
- [ ] Build succeeds: `just build`
- [ ] Manual check: [description of what to verify]
**Dependencies:** [Task numbers this depends on, or "None"]
**Files likely touched:**
- `src/path/to/file.rs`
- `tests/path/to/test.rs`
**Estimated scope:** [Small: 1-2 files | Medium: 3-5 files | Large: 5+ files]
Step 5: Order and Checkpoint
Arrange tasks so that:
- Dependencies are satisfied (build foundation first)
- Each task leaves the system in a working state
- Verification checkpoints occur after every 2-3 tasks
- High-risk tasks are early (fail fast)
Add explicit checkpoints:
## Checkpoint: After Tasks 1-3
- [ ] All tests pass (`just test`)
- [ ] Project builds without errors (`just build`)
- [ ] Lint clean (`just lint`)
- [ ] Core user flow works end-to-end
- [ ] Review with human before proceeding
Task Sizing Guidelines
| Size | Files | Scope | Example |
|---|
| XS | 1 | Single function or config change | Add a validation rule |
| S | 1-2 | One handler or protocol command | Add a new IPC command |
| M | 3-5 | One feature slice | Pane creation flow |
| L | 5-8 | Multi-component feature | Pane search with filtering and ordering |
| XL | 8+ | Too large — break it down further | — |
If a task is L or larger, it should be broken into smaller tasks. An agent performs best on S and M tasks.
When to break a task down further:
- It would take more than one focused session (roughly 2+ hours of agent work)
- You cannot describe the acceptance criteria in 3 or fewer bullet points
- It touches two or more independent subsystems (e.g., detection and persistence)
- You find yourself writing "and" in the task title (a sign it is two tasks)
Plan Document Template
# Implementation Plan: [Feature/Project Name]
## Overview
[One paragraph summary of what we're building]
## Architecture Decisions
- [Key decision 1 and rationale]
- [Key decision 2 and rationale]
## Task List
### Phase 1: Foundation
- [ ] Task 1: ...
- [ ] Task 2: ...
### Checkpoint: Foundation
- [ ] Tests pass, builds clean
### Phase 2: Core Features
- [ ] Task 3: ...
- [ ] Task 4: ...
### Checkpoint: Core Features
- [ ] End-to-end flow works
### Phase 3: Polish
- [ ] Task 5: ...
- [ ] Task 6: ...
### Checkpoint: Complete
- [ ] All acceptance criteria met
- [ ] Ready for review
## Risks and Mitigations
| Risk | Impact | Mitigation |
|------|--------|------------|
| [Risk] | [High/Med/Low] | [Strategy] |
## Open Questions
- [Question needing human input]
Parallelization Opportunities
When multiple agents or sessions are available:
- Safe to parallelize: Independent feature slices, tests for already-implemented features, documentation
- Must be sequential: Persistence/migration changes, shared state mutations, dependency chains
- Needs coordination: Features that share a protocol/IPC contract (define the contract first, then parallelize the server handler and the CLI client)
Common Rationalizations
| Rationalization | Reality |
|---|
| "I'll figure it out as I go" | That's how you end up with a tangled mess and rework. 10 minutes of planning saves hours. |
| "The tasks are obvious" | Write them down anyway. Explicit tasks surface hidden dependencies and forgotten edge cases. |
| "Planning is overhead" | Planning is the task. Implementation without a plan is just typing. |
| "I can hold it all in my head" | Context windows are finite. Written plans survive session boundaries and compaction. |
Red Flags
- Starting implementation without a written task list
- Tasks that say "implement the feature" without acceptance criteria
- No verification steps in the plan
- All tasks are XL-sized
- No checkpoints between tasks
- Dependency order isn't considered
Verification
Before starting implementation, confirm: