From d3e7ecca21ce55b572f01a398a43427acb132fcb Mon Sep 17 00:00:00 2001 From: catlog22 Date: Sun, 28 Dec 2025 20:50:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E8=B7=9F=E8=B8=AA=E5=8A=9F=E8=83=BD=EF=BC=8C=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E5=BE=85=E5=8A=9E=E4=BA=8B=E9=A1=B9=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=B9=B6=E6=9B=B4=E6=96=B0=E4=BB=BB=E5=8A=A1=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .codex/prompts/issue-execute.md | 43 +++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/.codex/prompts/issue-execute.md b/.codex/prompts/issue-execute.md index 04b34ed2..7959b9f8 100644 --- a/.codex/prompts/issue-execute.md +++ b/.codex/prompts/issue-execute.md @@ -112,9 +112,40 @@ Expected solution structure: } ``` +## Step 2.5: Initialize Todo Tracking + +After parsing solution, create todo list to track each task: + +```javascript +// Create todos for all tasks in current solution +TodoWrite({ + todos: solution.tasks.map(task => ({ + content: `${task.id}: ${task.title}`, + activeForm: `Executing ${task.id}: ${task.title}`, + status: "pending" + })) +}) +``` + ## Step 3: Execute Tasks Sequentially -Iterate through `solution.tasks` array and execute each task: +Iterate through `solution.tasks` array and execute each task. + +**Before starting each task**, mark it as in_progress: +```javascript +// Update current task status to in_progress +TodoWrite({ todos: [...existingTodos.map(t => + t.content.startsWith(currentTask.id) ? {...t, status: "in_progress"} : t +)] }) +``` + +**After completing each task** (commit done), mark it as completed: +```javascript +// Update completed task status +TodoWrite({ todos: [...existingTodos.map(t => + t.content.startsWith(completedTask.id) ? {...t, status: "completed"} : t +)] }) +``` ### Phase A: IMPLEMENT @@ -237,7 +268,14 @@ ccw issue done --fail --reason "Task [task.id] failed: [details]" ## Step 5: Continue to Next Solution -Immediately fetch the next solution: +Clear current todo list and fetch next solution: + +```javascript +// Reset todos for next solution +TodoWrite({ todos: [] }) +``` + +Then fetch next solution: ```bash ccw issue next @@ -286,6 +324,7 @@ When `ccw issue next` returns `{ "status": "empty" }`: 6. **Self-verify** - All acceptance criteria must pass before commit 7. **Report accurately** - Use `ccw issue done` after each solution 8. **Handle failures gracefully** - If a solution fails, report via `ccw issue done --fail` and continue to next +9. **Track with todos** - Use TodoWrite to track task progress within each solution ## Error Handling