Persona Mode Overview
Relevant source files
The following files were used as context for generating this wiki page:
Persona Mode is a core architectural feature of the SuperGemini Framework that enables the Gemini CLI to embody specialized AI agent roles. Unlike traditional multi-agent systems that spawn separate processes, Persona Mode uses instruction injection to modify the behavior of the primary AI, allowing it to act as a domain-specific expert within a single session. This system coordinates 13 specialized AI specialists to handle complex software development tasks ranging from architectural design to security auditing.
Sources: README.md:16-19, CLAUDE.md:126-128, Docs/Getting-Started/quick-start.md:37-39
Architectural Design and Implementation
Persona Mode operates through a configuration-driven architecture. The system does not execute agent logic as Python code at runtime; instead, it utilizes Markdown-based instruction files stored in the SuperGemini/Agents/ directory. During installation, these behavioral instructions are deployed to the ~/.gemini/ directory, where the Gemini CLI reads them to adopt a specific persona.
Agent Activation Logic
Agents within the Persona Mode system are activated dynamically based on specific environmental triggers. This "Auto-activation" ensures that the correct domain expert is applied to the current task without manual user intervention for every step.
The diagram above illustrates how the Agent Router selects the appropriate specialist based on context, complexity, and explicit user tags.
Sources: CLAUDE.md:130-143, Docs/Getting-Started/quick-start.md:52-57
Core Components
The implementation of Persona Mode relies on two primary directory structures:
- Source (
SuperGemini/Agents/): Contains the.mdinstruction files defining the 13 specialized personas. - Installation (
setup/components/): Python logic responsible for validating and deploying these instructions to the local environment.
Sources: CLAUDE.md:94-118, README.md:43-45
Specialized AI Personas
SuperGemini features 13 distinct specialists that cover the full lifecycle of software development. These agents are categorized by their technical domain and responsibilities.
Specialist Directory
| Agent Persona | Primary Responsibility | Key Focus Areas |
|---|---|---|
| System Architect | High-level design | Complex multi-domain tasks, scalability |
| Security Engineer | Security analysis | Vulnerability auditing, veto authority |
| Backend Architect | Server-side systems | API design, database structures |
| Frontend Architect | UI/UX architecture | Modern patterns, accessibility |
| Quality Engineer | Testing & Validation | Test suite generation, coverage reporting |
| Performance Engineer | Optimization | Bottleneck identification, benchmarking |
| DevOps Architect | Infrastructure | Deployment, CI/CD pipelines |
| Requirements Analyst | Discovery | Socratic questioning, PRD generation |
Sources: CLAUDE.md:130-143, README.md:43-45, Docs/Reference/basic-examples.md:33-60
Coordination with Behavioral Modes
Persona Mode often works in tandem with Behavioral Modes to refine how a specialist interacts with the user. For instance, an agent might operate in "Introspection Mode" to provide transparent reasoning for its architectural decisions or "Token Efficiency Mode" to communicate in compressed symbols.
Mode Integration Flow
The sequence shows how a command triggers both a specific persona and a behavioral mode to produce a specialized, transparent response.
Sources: Docs/User-Guide/modes.md:104-123, Docs/Getting-Started/quick-start.md:65-75
Usage and Activation Patterns
While activation is often automatic, users can explicitly trigger or focus a persona using specific flags and commands within the Gemini CLI.
Manual Activation Examples
- Architecture Focus:
/sg:analyze . --focus architecture(Activates System Architect). - Security Focus:
/sg:analyze src/ --focus security(Activates Security Engineer). - Performance Focus:
/sg:analyze api/ --focus performance(Activates Performance Engineer). - Explicit Tagging: Using
@agent-namein a prompt forces the embodying of that specific persona.
Sources: Docs/Reference/basic-examples.md:73-88, CLAUDE.md:143
Summary
Persona Mode transforms a general-purpose AI assistant into a specialized development team. By utilizing instruction injection through the SuperGemini/Agents/ configuration files, the framework allows for dynamic expert coordination without the overhead of managing multiple sub-agent processes. This system provides systematic workflows for analysis, implementation, and optimization by ensuring that domain-specific expertise is automatically applied based on the technical context of the user's request.
Sources: README.md:40-52, Docs/Getting-Started/quick-start.md:100-115