[Bug] /feature-dev workflow phases skipped due to TodoWrite overwrite behavior
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description
When using the /feature-dev command, multiple workflow phases are skipped or incomplete:
- Phase 6 (Quality Review) is ALWAYS skipped - code-reviewer agents are never launched
- Phase 4 (Architecture Design) is sometimes incomplete - doesn't always propose 2-3 architecture approaches as specified
The root cause appears to be that TodoWrite updates overwrite the entire todo list instead of modifying existing items, causing earlier phase todos to be lost.
### Expected Behavior
According to feature-dev.md:
Phase 4 should:
- Launch 2-3 code-architect agents with different focuses
- Present multiple approaches with trade-offs comparison
Phase 6 should:
- Launch 3
code-revieweragents in parallel with different focuses:
- simplicity/DRY/elegance
- bugs/functional correctness
- project conventions/abstractions
- Consolidate findings and identify highest severity issues
- Present findings to user and ask what they want to do
### Actual Behavior
- Phase 1 creates a todo list with all 7 phases
- During implementation (Phase 5), when updating task-level todos, the entire phase-level todo list gets overwritten
- Phases 6 and 7 "disappear" from the todo list
- The workflow considers itself complete after Phase 5, skipping Quality Review entirely
### Suspected Cause
The TodoWrite tool appears to replace the entire todo list rather than update specific items. When the workflow or agents call TodoWrite to track implementation progress, they inadvertently overwrite the phase-tracking todos created in Phase 1.
From feature-dev.md:
- Phase 1: "Create todo list with all phases"
- Phase 5: "Update todos as you progress"
These instructions conflict when TodoWrite replaces rather than updates.
What Should Happen?
### Suggested Fixes
Option 1: Fix TodoWrite usage in the prompt
Modify commands/feature-dev.md to explicitly preserve phase todos when updating:
```markdown
## Phase 5: Implementation
...
- Update todos as you progress (IMPORTANT: preserve the phase-level todos, only update task-level items)
Option 2: Add explicit phase completion checks
Add explicit checks before moving to next phase:
## After Phase 5: Implementation
Before proceeding to Phase 6, verify the todo list contains entries for Phase 6 and Phase 7.
If missing, recreate them.
Option 3: Use separate todo tracking
- Use phase-level todos with a prefix like [PHASE]
- Use task-level todos with a prefix like [TASK]
- Ensure agents only modify their respective category
Environment
- Claude Code version: latest
- Plugin: feature-dev v1.0.0
- OS: macOS
Additional Context
The Core Principles in feature-dev.md state "Use TodoWrite: Track all progress throughout". However, the current implementation causes TodoWrite updates to destroy the workflow structure rather than track it.
This bug significantly impacts the value of the /feature-dev command, as the Quality Review phase (launching code-reviewer agents) is one of its key differentiating features.
Error Messages/Logs
Steps to Reproduce
### Steps to Reproduce
- Run
/feature-dev <feature description>(e.g.,/feature-dev Add a user profile page) - Observe Phase 1 creates todos for all 7 phases
- Proceed through Phase 2-4
- When Phase 5 (Implementation) starts, observe the todo list
- Notice that after task-level todos are created, the original phase todos are gone
- After implementation completes, workflow jumps to Summary or ends
- Phase 6 (Quality Review) never executes - no code-reviewer agents are launched
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.15
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗