Analyst Agents
Relevant source files
The following files were used as context for generating this wiki page:
Analyst Agents are specialized AI personas within the SuperGemini Framework designed to perform deep investigation, requirements gathering, and code quality assessments. These agents operate through behavioral instruction injection, where specific markdown configuration files modify the Gemini CLI's behavior to embody a domain-specific expert. They are characterized by systematic methodologies—such as evidence-based investigation or Socratic questioning—to ensure software development tasks are grounded in technical accuracy and clear specifications.
These agents are part of a broader "Persona Mode" architecture where the Gemini CLI embodies the agent role rather than spawning separate processes. They activate automatically based on keyword triggers, file types, or task complexity, and often coordinate with MCP Servers like Context7 and Sequential to enhance their analytical capabilities.
Sources: Docs/User-Guide/agents.md:37-45, CLAUDE.md:143-146
Core Analyst Personas
The framework categorizes several agents specifically under "Quality & Analysis," each with a distinct focus ranging from problem diagnosis to technical debt management.
Root Cause Analyst
The root-cause-analyst is the primary agent for systematic problem investigation. It utilizes an evidence-based analysis and hypothesis testing mindset to diagnose system failures and complex multi-component issues.
- Mindset: "Never guess, always investigate." It follows a rigorous methodology of gathering evidence before forming hypotheses.
- Triggers: Keywords like "bug", "issue", "debugging", or "troubleshoot" and cross-system problems requiring methodical investigation.
Sources: SuperGemini/Agents/root-cause-analyst.md:14-16, Docs/User-Guide/agents.md:155-163
Requirements Analyst
The requirements-analyst focuses on the initiation phase of development. It is responsible for discovery and specification development through systematic stakeholder analysis, transforming vague ideas into concrete Product Requirements Documents (PRDs).
- Mindset: "Unclear requirements lead to failed projects." It uses Socratic questioning to uncover hidden needs and constraints.
- Triggers: Keywords like "requirements", "specification", "PRD", or "user story".
Sources: SuperGemini/Agents/requirements-analyst.md:14-16, Docs/User-Guide/agents.md:214-222
Refactoring Expert
The refactoring-expert focuses on code quality improvement and technical debt management. It applies SOLID principles and design patterns to modernize legacy systems.
- Mindset: "Leave the code cleaner than you found it." It identifies code smells and prioritizes refactoring efforts based on impact.
- Triggers: Keywords like "refactor", "clean code", "technical debt", or "SOLID".
Sources: SuperGemini/Agents/refactoring-expert.md:14-16, Docs/User-Guide/agents.md:181-189
Agent Activation and Coordination
Analyst agents are activated through an intelligent routing system that evaluates user input against defined triggers.
The diagram shows the flow from a user request to the activation of specific Analyst Agents and their subsequent coordination with Model Context Protocol (MCP) servers.
Sources: Docs/User-Guide/agents.md:47-60, Docs/Getting-Started/quick-start.md:38-44
Selection Logic
The framework employs a priority hierarchy for agent selection:
- Keywords: Direct terminology (e.g., "vulnerability" triggers security-engineer).
- File Types: Extensions (e.g.,
.pytriggers python-expert). - Complexity: Multi-step tasks engage coordination.
- Context: Related concepts trigger complementary specialists.
Sources: Docs/User-Guide/agents.md:48-53
Technical Specifications and Capabilities
| Agent | Core Domain | Key Actions | Primary MCP Integration |
|---|---|---|---|
| Root Cause Analyst | Problem Diagnosis | Evidence gathering, Hypothesis testing, Log analysis | Sequential, Serena |
| Requirements Analyst | Specification | Stakeholder interviews, User story writing, Scope definition | Context7, Sequential |
| Refactoring Expert | Code Quality | Code smell identification, SOLID application, Modernization | Morphllm, Context7 |
| Technical Writer | Documentation | Information architecture, API docs, User guides | Context7 |
Sources: Docs/User-Guide/agents.md:155-236, SuperGemini/Agents/technical-writer.md:21-27
Analysis Methodologies
Evidence-Based Investigation (RCA)
The root-cause-analyst follows a structured sequence for debugging:
- Gather Evidence: Collect logs, error messages, and system states.
- Map Dependencies: Identify relationships between failing components.
- Form Hypotheses: Create testable theories for the failure.
- Validate: Test hypotheses through targeted investigation.
Sources: SuperGemini/Agents/root-cause-analyst.md:21-25, Docs/User-Guide/agents.md:165-172
Socratic Elicitation (RA)
The requirements-analyst employs a specific "Socratic Mode" to deepen project understanding:
- Clarification: Questioning foundational goals (e.g., "What problem does this solve?").
- Assumption Validation: Identifying deployment or operational assumptions.
- Alternative Exploration: Exploring different approaches to the same goal.
Sources: SuperGemini/Commands/spec-panel.toml:139-150, Docs/User-Guide/agents.md:224-230
Multi-Agent Workflows
Analyst agents rarely work in isolation. They form "Quality Teams" to provide a holistic view of a software project.
Sequence diagram illustrating the collaborative interaction between analyst and architect agents during a troubleshooting workflow.
Sources: Docs/User-Guide/agents.md:238-250, SuperGemini/Commands/spec-panel.toml:111-135
Common Analyst Combinations
- Security Audit:
security-engineer+quality-engineer+root-cause-analyst. - Legacy Assessment:
refactoring-expert+system-architect+quality-engineer. - Documentation Project:
technical-writer+requirements-analyst+learning-guide.
Sources: Docs/User-Guide/agents.md:252-263
Conclusion
Analyst Agents serve as the intellectual foundation of the SuperGemini Framework. By combining the root-cause-analyst for post-implementation debugging, the requirements-analyst for pre-implementation planning, and the refactoring-expert for continuous code health, the framework ensures a systematic approach to software development. Their integration with MCP servers allows them to leverage real-time documentation and sequential reasoning to provide high-fidelity technical insights.