anthropics / anthropics/skills

[Bug] /feature-dev workflow phases skipped due to TodoWrite overwrite behavior

未关闭
#266 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
176k
派生
20.9k
平均合并
7 小时 21 分钟
30 天内合并 PR
5

描述


When using the `/feature-dev` command, multiple workflow phases are skipped or incomplete:

1. **Phase 6 (Quality Review) is ALWAYS skipped** - code-reviewer agents are never launched
2. **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:
1. Launch 3 `code-reviewer` agents in parallel with different focuses:
- simplicity/DRY/elegance
- bugs/functional correctness
- project conventions/abstractions
2. Consolidate findings and identify highest severity issues
3. Present findings to user and ask what they want to do

### Actual Behavior

1. Phase 1 creates a todo list with all 7 phases
2. During implementation (Phase 5), when updating task-level todos, **the entire phase-level todo list gets overwritten**
3. Phases 6 and 7 "disappear" from the todo list
4. 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.

### Steps to Reproduce

1. Run `/feature-dev ` (e.g., `/feature-dev Add a user profile page`)
2. Observe Phase 1 creates todos for all 7 phases
3. Proceed through Phase 2-4
4. When Phase 5 (Implementation) starts, observe the todo list
5. **Notice that after task-level todos are created, the original phase todos are gone**
6. After implementation completes, workflow jumps to Summary or ends
7. Phase 6 (Quality Review) never executes - no code-reviewer agents are launched

### 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
...
6. 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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。