Scenario Examples
Good: The user says continue after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.
Good: The user changes only the output shape or downstream delivery step (for example make a PR). Preserve earlier non-conflicting workflow constraints and apply the update locally.
Bad: The user says continue, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.
Task: {{ARGUMENTS}}
1---2name: analyze3description: Deep analysis and investigation4---56<Purpose>7Analyze performs deep investigation of architecture, bugs, performance issues, and dependencies. It routes to the architect agent or Codex MCP for thorough analysis and returns structured findings with evidence.8</Purpose>910<Use_When>11- User says "analyze", "investigate", "debug", "why does", or "what's causing"12- User needs to understand a system's architecture or behavior before making changes13- User wants root cause analysis of a bug or performance issue14- User needs dependency analysis or impact assessment for a proposed change15- A complex question requires reading multiple files and reasoning across them16</Use_When>1718<Do_Not_Use_When>19- User wants code changes made -- use executor agents or `ralph` instead20- User wants a full plan with acceptance criteria -- use `plan` skill instead21- User wants a quick file lookup or symbol search -- use `explore` agent instead22- User asks a simple factual question that can be answered from one file -- just read and answer directly23</Do_Not_Use_When>2425<Why_This_Exists>26Deep investigation requires a different approach than quick lookups or code changes. Analysis tasks need broad context gathering, cross-file reasoning, and structured findings. Routing these to the architect agent or Codex ensures the right level of depth without the overhead of a full planning or execution workflow.27</Why_This_Exists>2829<Execution_Policy>30- Prefer Codex MCP for analysis when available (faster, lower cost)31- Fall back to architect agent when Codex is unavailable32- Always provide context files to the analysis tool for grounded reasoning33- Return structured findings, not just raw observations34- Default to concise, evidence-dense progress and completion reporting unless the user or risk level requires more detail35- Treat newer user task updates as local overrides for the active workflow branch while preserving earlier non-conflicting constraints36- If correctness depends on additional inspection, retrieval, execution, or verification, keep using the relevant tools until the analysis is grounded37- Continue through clear, low-risk, reversible next steps automatically; ask only when the next step is materially branching, destructive, or preference-dependent38</Execution_Policy>3940<Steps>411. **Identify the analysis type**: Architecture, bug investigation, performance, or dependency analysis422. **Gather relevant context**: Read or identify the key files involved433. **Route to analyzer**:44 - Preferred: `ask_codex` with `agent_role: "architect"` and relevant `context_files`45 - Fallback: delegate to the `architect` role at THOROUGH tier with the analysis request464. **Return structured findings**: Present the analysis with evidence, file references, and actionable recommendations47</Steps>4849<Tool_Usage>50- Before first MCP tool use, call `ToolSearch("mcp")` to discover deferred MCP tools51- Use `ask_codex` with `agent_role: "architect"` as the preferred analysis route52- Pass `context_files` with all relevant source files for grounded analysis53- Use the `architect` role as fallback when ToolSearch finds no MCP tools or Codex is unavailable54- For broad analysis, use `explore` agent first to identify relevant files before routing to architect55</Tool_Usage>565758## Scenario Examples5960**Good:** The user says `continue` after the workflow already has a clear next step. Continue the current branch of work instead of restarting or re-asking the same question.6162**Good:** The user changes only the output shape or downstream delivery step (for example `make a PR`). Preserve earlier non-conflicting workflow constraints and apply the update locally.6364**Bad:** The user says `continue`, and the workflow restarts discovery or stops before the missing verification/evidence is gathered.6566<Examples>67<Good>68User: "analyze why the WebSocket connections drop after 30 seconds"69Action: Gather WebSocket-related files, route to architect with context, return root cause analysis with specific file:line references and a recommended fix.70Why good: Clear investigation target, structured output with evidence.71</Good>7273<Good>74User: "investigate the dependency chain from src/api/routes.ts"75Action: Use explore agent to map the import graph, then route to architect for impact analysis.76Why good: Uses explore for fact-gathering, architect for reasoning.77</Good>7879<Bad>80User: "analyze the auth module"81Action: Returning "The auth module handles authentication."82Why bad: Shallow summary without investigation. Should examine the module's structure, patterns, potential issues, and provide specific findings with file references.83</Bad>8485<Bad>86User: "fix the bug in the parser"87Action: Running analysis skill.88Why bad: This is a fix request, not an analysis request. Route to executor or ralph instead.89</Bad>90</Examples>9192<Escalation_And_Stop_Conditions>93- If analysis reveals the issue requires code changes, report findings and recommend using `ralph` or executor for the fix94- If the analysis scope is too broad ("analyze everything"), ask the user to narrow the focus95- If Codex is unavailable and the architect agent also fails, report what context was gathered and suggest manual investigation paths96</Escalation_And_Stop_Conditions>9798<Final_Checklist>99- [ ] Analysis addresses the specific question or investigation target100- [ ] Findings reference specific files and line numbers where applicable101- [ ] Root causes are identified (not just symptoms) for bug investigations102- [ ] Actionable recommendations are provided103- [ ] Analysis distinguishes between confirmed facts and hypotheses104</Final_Checklist>105106Task: {{ARGUMENTS}}