mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
fix(lite-plan): clarify executionId definition and tracking flow
Changes: 1. Initialize previousExecutionResults array in Step 5.1 2. Add id field to executionCalls objects (format: [Method-Index]) 3. Add execution loop structure in Step 5.2 showing sequential processing 4. Clarify executionId comes from executionCalls[currentIndex].id 5. Add comments explaining ID storage for result collection Benefits: - Clear definition of where executionId comes from - Explicit initialization of tracking variables - Better understanding of execution flow and result collection - Proper context continuity across multiple execution calls
This commit is contained in:
@@ -462,17 +462,26 @@ Code Review Selection (after execution):
|
|||||||
|
|
||||||
**Step 5.1: Create TodoWrite Execution List**
|
**Step 5.1: Create TodoWrite Execution List**
|
||||||
|
|
||||||
**Before execution starts**, create execution call list (not individual tasks):
|
**Before execution starts**, initialize tracking variables and create execution call list:
|
||||||
|
```javascript
|
||||||
|
// Initialize result tracking for multi-execution scenarios
|
||||||
|
previousExecutionResults = []
|
||||||
|
```
|
||||||
|
|
||||||
|
Create execution call list (not individual tasks):
|
||||||
```javascript
|
```javascript
|
||||||
// Group tasks based on dependencies and execution strategy
|
// Group tasks based on dependencies and execution strategy
|
||||||
// Each execution call handles multiple related tasks
|
// Each execution call handles multiple related tasks
|
||||||
executionCalls = groupTasksByExecution(planObject.tasks, planObject.dependencies)
|
executionCalls = groupTasksByExecution(planObject.tasks, planObject.dependencies).map((call, index) => ({
|
||||||
|
...call,
|
||||||
|
id: `[${call.method}-${index+1}]` // Store ID for result collection
|
||||||
|
}))
|
||||||
|
|
||||||
TodoWrite({
|
TodoWrite({
|
||||||
todos: executionCalls.map((call, index) => ({
|
todos: executionCalls.map(call => ({
|
||||||
content: `[${call.method}-${index+1}] (${call.taskSummary})`,
|
content: `${call.id} (${call.taskSummary})`,
|
||||||
status: "pending",
|
status: "pending",
|
||||||
activeForm: `Executing [${call.method}-${index+1}] (${call.taskSummary})`
|
activeForm: `Executing ${call.id} (${call.taskSummary})`
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
@@ -493,6 +502,19 @@ TodoWrite({
|
|||||||
|
|
||||||
**IMPORTANT**: CLI execution MUST run in foreground (no background execution)
|
**IMPORTANT**: CLI execution MUST run in foreground (no background execution)
|
||||||
|
|
||||||
|
**Execution Loop**:
|
||||||
|
```javascript
|
||||||
|
// Execute each call in the execution list sequentially
|
||||||
|
for (currentIndex = 0; currentIndex < executionCalls.length; currentIndex++) {
|
||||||
|
const currentCall = executionCalls[currentIndex]
|
||||||
|
|
||||||
|
// Update TodoWrite: mark current call as in_progress
|
||||||
|
// Launch execution with previousExecutionResults context
|
||||||
|
// After completion, collect result and add to previousExecutionResults
|
||||||
|
// Update TodoWrite: mark current call as completed
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Based on user selection in Phase 4, execute appropriate method:
|
Based on user selection in Phase 4, execute appropriate method:
|
||||||
- **Agent**: Launch @code-developer agent
|
- **Agent**: Launch @code-developer agent
|
||||||
- **Codex**: Execute with codex CLI tool
|
- **Codex**: Execute with codex CLI tool
|
||||||
@@ -563,7 +585,7 @@ ${result.notes ? `Notes: ${result.notes}` : ''}
|
|||||||
- After each execution completes, collect result summary:
|
- After each execution completes, collect result summary:
|
||||||
```javascript
|
```javascript
|
||||||
executionResult = {
|
executionResult = {
|
||||||
executionId: "[Agent-1]" or "[Codex-1]",
|
executionId: executionCalls[currentIndex].id, // e.g., "[Agent-1]", "[Codex-1]" from Step 5.1 TodoWrite list
|
||||||
status: "completed" or "partial" or "failed",
|
status: "completed" or "partial" or "failed",
|
||||||
tasksSummary: "Brief description of tasks handled",
|
tasksSummary: "Brief description of tasks handled",
|
||||||
completionSummary: "What was completed",
|
completionSummary: "What was completed",
|
||||||
@@ -572,6 +594,7 @@ ${result.notes ? `Notes: ${result.notes}` : ''}
|
|||||||
}
|
}
|
||||||
previousExecutionResults.push(executionResult)
|
previousExecutionResults.push(executionResult)
|
||||||
```
|
```
|
||||||
|
- The `executionId` comes from the execution call ID created in Step 5.1 (format: `[Method-Index]`)
|
||||||
- Pass `previousExecutionResults` to subsequent executions for context continuity
|
- Pass `previousExecutionResults` to subsequent executions for context continuity
|
||||||
|
|
||||||
#### Option B: CLI Execution (Codex)
|
#### Option B: CLI Execution (Codex)
|
||||||
|
|||||||
Reference in New Issue
Block a user