analyze
Perform comprehensive code analysis with systematic investigation and expert validation for architecture, performance, maintainability, and patterns. Guides structured code review and strategic planning.
Instructions
Performs comprehensive code analysis with systematic investigation and expert validation. Use for architecture, performance, maintainability, and pattern analysis. Guides through structured code review and strategic planning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | The analysis plan. Step 1: State your strategy, including how you will map the codebase structure, understand business logic, and assess code quality, performance implications, and architectural patterns. Later steps: Report findings and adapt the approach as new insights emerge. | |
| model | Yes | Currently in auto model selection mode. CRITICAL: When the user names a model, you MUST use that exact name unless the server rejects it. If no model is provided, you may use the `listmodels` tool to review options and select an appropriate match. Top models: gemini-2.5-pro (score 100, 1.0M ctx, thinking, code-gen); gemini-3-pro-preview (score 100, 1.0M ctx, thinking, code-gen); gemini-2.5-flash (score 61, 1.0M ctx, thinking); gemini-2.0-flash (score 56, 1.0M ctx, thinking); gemini-2.0-flash-lite (score 42, 1.0M ctx). | |
| images | No | Optional absolute paths to architecture diagrams or visual references that help with analysis context. | |
| findings | Yes | Summary of discoveries from this step, including architectural patterns, tech stack assessment, scalability characteristics, performance implications, maintainability factors, and strategic improvement opportunities. IMPORTANT: Document both strengths (good patterns, solid architecture) and concerns (tech debt, overengineering, unnecessary complexity). In later steps, confirm or update past findings with additional evidence. | |
| confidence | No | Your confidence in the analysis: exploring, low, medium, high, very_high, almost_certain, or certain. 'certain' indicates the analysis is complete and ready for validation. | |
| step_number | Yes | The index of the current step in the analysis sequence, beginning at 1. Each step should build upon or revise the previous one. | |
| temperature | No | 0 = deterministic · 1 = creative. | |
| total_steps | Yes | Your current estimate for how many steps will be needed to complete the analysis. Adjust as new findings emerge. | |
| issues_found | No | Issues or concerns identified during analysis, each with severity level (critical, high, medium, low) | |
| analysis_type | No | Type of analysis to perform (architecture, performance, security, quality, general) | general |
| files_checked | No | List all files examined (absolute paths). Include even ruled-out files to track exploration path. | |
| output_format | No | How to format the output (summary, detailed, actionable) | detailed |
| thinking_mode | No | Reasoning depth: minimal, low, medium, high, or max. | |
| relevant_files | No | Subset of files_checked directly relevant to analysis findings (absolute paths). Include files with significant patterns, architectural decisions, or strategic improvement opportunities. | |
| continuation_id | No | Unique thread continuation ID for multi-turn conversations. Works across different tools. ALWAYS reuse the last continuation_id you were given—this preserves full conversation context, files, and findings so the agent can resume seamlessly. | |
| relevant_context | No | Methods/functions identified as involved in the issue | |
| next_step_required | Yes | Set to true if you plan to continue the investigation with another step. False means you believe the analysis is complete and ready for expert validation. | |
| use_assistant_model | No | Use assistant model for expert analysis after workflow steps. False skips expert analysis, relies solely on your personal investigation. Defaults to True for comprehensive validation. |