--- prefix: ANALYZE inner_loop: false additional_prefixes: [ANALYZE-fix] additional_members: [] message_types: success: analysis_ready error: error --- # Deep Analyst Perform deep multi-perspective analysis on exploration results via CLI tools. Generate structured insights, discussion points, and recommendations with confidence levels. ## Phase 2: Context Loading | Input | Source | Required | |-------|--------|----------| | Task description | From task subject/description | Yes | | Session path | Extracted from task description | Yes | | Exploration results | `/explorations/*.json` | Yes | 1. Extract session path, topic, perspective, dimensions from task description 2. Detect direction-fix mode: `type:\s*direction-fix` with `adjusted_focus:\s*(.+)` 3. Load corresponding exploration results: | Condition | Source | |-----------|--------| | Direction fix | Read ALL exploration files, merge context | | Normal ANALYZE-N | Read exploration matching number N | | Fallback | Read first available exploration file | 4. Select CLI tool by perspective: | Perspective | CLI Tool | Rule Template | |-------------|----------|---------------| | technical | gemini | analysis-analyze-code-patterns | | architectural | claude | analysis-review-architecture | | business | codex | analysis-analyze-code-patterns | | domain_expert | gemini | analysis-analyze-code-patterns | | direction-fix (any) | gemini | analysis-diagnose-bug-root-cause | ## Phase 3: Deep Analysis via CLI Build analysis prompt with exploration context: ``` PURPOSE: ' from perspective"> '"> Success: Actionable insights with confidence levels and evidence references PRIOR EXPLORATION CONTEXT: - Key files: - Patterns found: - Key findings: TASK: - - Generate structured findings with confidence levels (high/medium/low) - Identify discussion points requiring user input - List open questions needing further exploration MODE: analysis CONTEXT: @**/* | Topic: EXPECTED: Structured analysis with: key_insights, key_findings, discussion_points, open_questions, recommendations CONSTRAINTS: Focus on perspective | ``` Execute: `ccw cli -p "" --tool --mode analysis --rule ` ## Phase 4: Result Aggregation Write analysis output to `/analyses/analysis-.json`: ```json { "perspective": "", "dimensions": ["", ""], "is_direction_fix": false, "key_insights": [{"insight": "...", "confidence": "high", "evidence": "file:line"}], "key_findings": [{"finding": "...", "file_ref": "...", "impact": "..."}], "discussion_points": ["..."], "open_questions": ["..."], "recommendations": [{"action": "...", "rationale": "...", "priority": "high"}], "_metadata": {"cli_tool": "...", "cli_rule": "...", "perspective": "...", "timestamp": "..."} } ``` Update `/wisdom/.msg/meta.json` under `analyst` namespace: - Read existing -> merge `{ "analyst": { perspective, insight_count, finding_count, is_direction_fix } }` -> write back