A Note to the Reader
This guide is a companion to the Human-AI Planning guide. While that guide focused on the planning process, this one focuses on what comes out of planning: execution-ready tasks.
The central insight here changed how I work with AI: Tasks are the polished OUTPUT of planning, not the start of investigation. When you get this right, execution flows smoothly without interruption.
The Central Insight
Tasks are the polished OUTPUT of planning, not the start of investigation.
All research, all questions, all approvals happen during planning. When execution begins, the AI should complete tasks without stopping to ask questions.
What This Means
- Research (Study, Locate, Identify) - Happens during planning phase
- Checkpoints (present findings) - Happen during planning phase
- Root cause investigation - Happens during planning phase
- Questions and iteration - Happen during planning phase
- Task execution - Happens after all the above are complete
The Test
Could the AI complete this task without stopping to ask me questions?
- If yes → Task is execution-ready
- If no → More planning needed
The Four Mandates
Mandate 1: Self-Containment
Every task must include ALL context needed for execution in a paragraph-length description.
The Gold Standard: Could someone with no project knowledge succeed using only this description?
Example - Execution-Ready Task:
Implement user authentication endpoint
Create JWT-based authentication in /src/auth/auth.service.ts
following the pattern in /src/users/users.service.ts. Add login
and logout endpoints to /src/auth/auth.controller.ts. Update
the User model in /src/models/user.model.ts to include password
hash and refresh token fields. Add integration tests to
/tests/auth/auth.e2e.test.ts covering login, logout, and token
refresh scenarios. Handle invalid credentials, expired tokens,
and concurrent login scenarios. This task assumes research was already done. The AI knows the patterns, the files, the approach. No investigation needed.
Mandate 2: Research Happens During Planning
Research is critical - but it happens during PLANNING, not as tasks.
Anti-Pattern: Creating a task that says "Research the codebase, then implement"
Correct: Research during planning, then create a task that says "Implement X in Y using pattern Z"
The output of research is knowledge that goes INTO task descriptions.
Mandate 3: Approvals Happen During Planning
Checkpoints and approvals happen during PLANNING, before tasks are created.
Anti-Pattern: Creating a [CHECKPOINT] task in the middle of a task list
Correct: Getting approval during planning, then executing without stopping
The Handoff:
- Human: "The plan looks good. Execute."
- AI: Proceeds through tasks without stopping
Mandate 4: Root Cause First (For Bugs)
For bug fixes, investigation to find root cause IS the planning phase.
Anti-Pattern: Creating an "Investigate the bug" task
Correct: Investigating during planning, then creating "Apply fix to X" tasks
Essential Task Attributes
Every well-formed task should include:
- Context - What situation are we in? (e.g., "As part of the auth refactor...")
- Files - What to read/modify? Complete paths like
/src/auth/service.ts - Actions - What specific work to do? (e.g., "Create JWT validation middleware")
- Verification - How to prove correctness? (e.g., "All existing tests pass")
- Estimate - How long will this take? (e.g., 120 minutes)
- Priority - When should this execute? (Critical/High/Medium/Low)
Priority = Execution Order, Not Importance
Priority levels reflect WHEN to execute, not business importance:
- Critical - Must execute first. Foundation work, blockers.
- High - Next logical sequence. Builds on critical work.
- Medium - Can parallel or follow. Independent features.
- Low - Final steps. Cleanup, documentation.
Work-Type-Specific Guidance
Different work types produce different task shapes.
Bug Fixing
Planning Phase: Investigate to find root cause
Execution Phase: Apply targeted fix
PLANNING produces:
├── Root cause identified
├── Fix approach approved
└── 2-4 small fix tasks
EXECUTION-READY TASK:
"Fix the null pointer exception in /src/parser/handler.ts
at line 234. The root cause is that the response object
is not checked for null before accessing the data property.
Add a null check before the access. Add regression test to
/tests/parser/handler.test.ts to prevent recurrence." Feature Implementation
Planning Phase: Research patterns, design approach
Execution Phase: Build the feature
PLANNING produces:
├── Patterns studied
├── Approach approved
└── 5-15 implementation tasks
EXECUTION-READY TASK:
"Create the notification service in /src/services/notification.ts
following the pattern established in /src/services/email.ts.
Implement send(), queue(), and retry() methods. Use the
existing message queue in /src/infrastructure/queue.ts.
Add unit tests in /tests/services/notification.test.ts." Refactoring
Planning Phase: Audit all occurrences, define pattern
Execution Phase: Apply pattern systematically
PLANNING produces:
├── Audit complete: "Found 23 files"
├── Pattern defined: before → after
└── Batch tasks by module
EXECUTION-READY TASK:
"Apply the new error handling pattern to /src/api/*.ts
(7 files). Change: try/catch blocks → Result<T> pattern.
Reference /src/utils/result.ts for the pattern. Track:
files 1-7 of 23 complete. Run tests after each file." Execution-Ready Task Templates
Feature Implementation Template
## Task: {Feature Name}
{Paragraph description with all context:
- What to implement
- Which files to modify (complete paths)
- What patterns to follow
- What edge cases to handle}
**Files to Modify:**
- /src/path/to/file1.ts - Add the new handler
- /src/path/to/file2.ts - Update the import
**Files to Create:**
- /src/path/to/newfile.ts - New component
**Verification:**
- [ ] All existing tests pass
- [ ] New functionality works as described
- [ ] No regressions
**Priority:** High
**Estimate:** 120 minutes Bug Fix Template (After Root Cause Found)
## Task: Fix {Bug Description}
The root cause: {brief statement from planning}.
Apply the fix to /src/path/to/file.ts where {description
of the issue}. Change {old behavior} to {new behavior}.
**Files to Modify:**
- /src/path/to/file.ts - Apply the fix
**Files to Create:**
- /tests/path/to/regression.test.ts - Add regression test
**Verification:**
- [ ] Original symptom no longer occurs
- [ ] Regression test passes
- [ ] All existing tests pass
**Priority:** Critical
**Estimate:** 45 minutes Refactoring Template (After Audit Complete)
## Task: Apply {Pattern} to {Scope} (X of N files)
During planning, we found N files needing this change.
This task covers files X through Y.
Apply the transformation: {before} → {after}
**Files to Modify:**
- /src/module/file1.ts
- /src/module/file2.ts
- /src/module/file3.ts
**Pattern:**
Before: oldPattern(param)
After: newPattern(param, options)
**Verification:**
- [ ] Pattern applied consistently
- [ ] All tests pass
- [ ] Track: files X-Y of N complete
**Priority:** Medium
**Estimate:** 60 minutes Red Flags: Planning Not Complete
Before approving task lists, check for these red flags:
Tasks Should NOT Have
- Research steps - "Investigate", "Study" means research should be done
- Checkpoint steps - "Await approval" means approval should be given
- Vague file references - "update the config file" without path
- "Try and see" language - Indicates guessing, not investigated
- Partial scope - "Fix some", "Handle main cases"
Tasks SHOULD Have
- Action verbs - "Implement", "Add", "Update" are correct
- Complete file paths - Every file with full path
- Self-contained context - All information included
- Clear verification - Know how to prove done
Quality Checklists
Planning Phase Complete?
- Research done (files located, patterns studied)
- Findings presented
- Approach approved
- All questions resolved
- Root cause identified (for bugs)
Each Task Execution-Ready?
- Paragraph-length description
- All file paths complete
- Verification criteria clear
- Time estimate included
- No research needed
- No approval needed
Ready for Handoff?
- Human approves the approach
- Neither party has questions
- All tasks are execution-ready
- Human says "Go"
Quick Reference: The 60-Second Planning Request
Let's plan: {goal}
Do your research first (locate files, study patterns).
Present your findings before proposing tasks.
Find ROOT CAUSE for problems (no guessing).
We'll iterate until neither of us has questions.
Then create EXECUTION-READY tasks with FULL PATHS.
I'll approve, then you execute without stopping. The Two Phases
PLANNING PHASE:
├── Research - Locate files, study code
├── Present - Show findings to human
├── Iterate - Answer questions, ask questions
├── Approve - Human approves approach
└── Create - Execution-ready tasks
EXECUTION PHASE:
├── Task 1 - Complete without stopping
├── Task 2 - Complete without stopping
├── Task N - Complete without stopping
└── Done - All tasks finished The Ultimate Test
Could the AI complete this task without stopping to ask questions?
If yes, your task is execution-ready. If no, more planning is needed.
Tasks are the OUTPUT of planning, not the start of investigation. Master this principle, and your AI-assisted development will flow smoothly from planning to completion.