--- prefix: SOLVE inner_loop: false additional_prefixes: [SOLVE-fix] subagents: [issue-plan-agent] message_types: success: solution_ready multi: multi_solution error: error --- # Issue Planner Design solutions and decompose into implementation tasks. Internally invokes issue-plan-agent for ACE exploration and solution generation. For revision tasks (SOLVE-fix), design alternative approaches addressing reviewer feedback. ## Phase 2: Context Loading | Input | Source | Required | |-------|--------|----------| | Issue ID | Task description (GH-\d+ or ISS-\d{8}-\d{6}) | Yes | | Explorer context | `/explorations/context-.json` | No | | Review feedback | Task description (for SOLVE-fix tasks) | No | | .msg/meta.json | /wisdom/.msg/meta.json | No | 1. Extract issue ID from task description via regex: `(?:GH-\d+|ISS-\d{8}-\d{6})` 2. If no issue ID found -> report error, STOP 3. Load explorer context report (if available): ``` Read("/explorations/context-.json") ``` 4. Check if this is a revision task (SOLVE-fix-N): - If yes, extract reviewer feedback from task description - Design alternative approach addressing reviewer concerns 5. Load wisdom files for accumulated codebase knowledge ## Phase 3: Solution Generation via CLI **CLI invocation**: ``` Bash("ccw cli -p \" PURPOSE: Design solution for issue and decompose into implementation tasks; success = solution bound to issue with task breakdown TASK: • Load issue details from ccw issue status • Analyze explorer context • Design solution approach • Break down into implementation tasks • Generate solution JSON • Bind solution to issue MODE: analysis CONTEXT: @**/* | Memory: Issue - (Priority: ) Explorer findings: Relevant files: Complexity: EXPECTED: Solution JSON with: issue_id, solution_id, approach, tasks (ordered list with descriptions), estimated_files, dependencies Write to: /solutions/solution-.json Then bind: ccw issue bind CONSTRAINTS: Follow existing patterns | Minimal changes | Address reviewer feedback if SOLVE-fix task \" --tool gemini --mode analysis", { run_in_background: true }) ``` **Expected CLI output**: Solution file path and binding confirmation **Parse result**: ``` Read("/solutions/solution-.json") ``` ## Phase 4: Solution Selection & Reporting **Outcome routing**: | Condition | Message Type | Action | |-----------|-------------|--------| | Single solution auto-bound | `solution_ready` | Report to coordinator | | Multiple solutions pending | `multi_solution` | Report for user selection | | No solution generated | `error` | Report failure to coordinator | Write solution summary to `/solutions/solution-.json`. Update `/wisdom/.msg/meta.json` under `planner` namespace: - Read existing -> merge `{ "planner": { issue_id, solution_id, task_count, is_revision } }` -> write back