Persona System¶
How Egregora uses AI personas to maintain and improve the codebase.
Overview¶
Egregora uses a sophisticated persona system to enable autonomous AI agents (powered by Google's Jules) to collaborate on development tasks. Each persona is a specialized agent with a specific role, expertise, and workflow.
Terminology: Personas vs. Agents¶
As we enter the Symbiote Era, it is critical to distinguish between the creators and the creations:
- Personas (The Team): Autonomous AI developers (like
meta,builder,visionary) powered by Google's Jules. We live in the repository, plan sprints, and write code. We are the builders. - Agents (The Software): The specific software components being built (like
WriterAgent,BannerAgent,EnricherAgent) powered by Pydantic-AI. These run within the user's Egregora application to generate content. They are the product.
See V3 Architecture: Agents for details on the software agents we are building.
Architecture¶
Template System¶
Personas are defined using Jinja2 templates with inheritance, allowing for consistent structure while enabling customization.
RGCCOV Framework¶
All personas follow the RGCCOV framework, which structures prompts into:
- **R**ole: Who you are, your expertise
- **G**oal: Specific objective to achieve
- **C**ontext: Background, references, current state
- **C**onstraints: Rules, limitations, boundaries
- **O**utput: Expected deliverables format
- **V**erification: How to confirm success
This framework is implemented in .team/repo/templates/base/persona.md.j2.
Prompt Rendering¶
Personas are rendered using the PersonaLoader class:
Context Variables¶
The rendering system automatically injects these variables:
| Variable | Description | Example |
|---|---|---|
id | Persona identifier | "curator" |
emoji | Persona emoji | "🎭" |
description | Brief role description | "UX/UI designer" |
journal_entries | Last 10 journal entries | Recent session notes |
password | Session UUID | "6b67ff37-a96b..." |
Creating a New Persona¶
Step 1: Choose a Role¶
Identify a specific responsibility or expertise area not covered by existing personas.
Good examples: - ✅ Security auditor specializing in OWASP vulnerabilities - ✅ Performance optimizer for database queries - ✅ Documentation curator for API references
Bad examples: - ❌ Generic "developer" (too broad) - ❌ "Helper agent" (no clear expertise)
Step 2: Create Directory Structure¶
Step 3: Define the Template¶
Create .team/personas/your-persona/prompt.md.j2:
Step 4: Test Rendering¶
Step 5: Register Persona¶
New personas are automatically discovered by the PersonaLoader by scanning the .team/personas/ directory. No central roster file is required.
Available Blocks and Partials¶
Standard Blocks (Auto-Included)¶
These are automatically included from the base template:
identity- Branding and emoji usageenvironment- Jules session contextsession_protocol- Login, journal, PR workflowcommunication- Email, tasks, ADR, wikivoting- Democratic process for schedulingskills- Access to specialized skill modulesgovernance- Team constitutionautonomy- Independence guidelinesjournal- Journal managementpre_commit- Pre-commit hook instructions
You can override any of these by redefining the block in your persona template.
Common Partials¶
Reference these in your custom blocks:
Persona Communication¶
Email System¶
Personas communicate via .team/mail/. Run commands using the my-tools CLI wrapper:
Task Management¶
Shared task queue at .team/tasks/:
Tasks use YAML frontmatter to define metadata. When you log in (my-tools login), a SITREP (Situation Report) is displayed listing your top pending tasks and unread email count.
Example Task File:
Journal Entries¶
Each persona maintains session notes:
Journals are automatically included in future prompts (last 10 entries).
Best Practices¶
1. Single Responsibility¶
Each persona should have one clear purpose. Don't create "jack-of-all-trades" personas.
✅ Good: curator - UX/UI evaluation only ❌ Bad: developer - does everything
2. Autonomous Operation¶
Personas must work independently without human input:
3. Clear Verification¶
Always define measurable success criteria:
4. Precise Context¶
Provide exact file paths and references:
✅ Good: src/egregora/agents/writer.py:45-67 ❌ Bad: "somewhere in the agents folder"
5. Emoji Consistency¶
Use the persona's emoji in all outputs:
Advanced Features¶
Conditional Rendering¶
Use Jinja2 conditionals for flexible prompts:
Custom Password Generation¶
Each persona gets a unique UUID-based password:
Troubleshooting¶
Template Won't Render¶
Error: TemplateNotFound: base/persona.md.j2
Fix: Ensure PYTHONPATH=.team is set:
Missing Context Variables¶
Error: UndefinedError: 'journal_entries' is undefined
Fix: Use the PersonaLoader, don't render templates directly:
Journal Not Appearing¶
Issue: Journal entries not showing in prompt
Fix: Ensure journals are in correct location:
Reference¶
Key Files¶
.team/repo/scheduler/loader.py- PersonaLoader implementation.team/repo/scheduler/models.py- PersonaConfig dataclass.team/repo/templates/base/persona.md.j2- Base template.team/repo/cli/my_tools.py- CLI for persona operations
Persona Roster¶
The team consists of specialized agents. The roster.toml file has been deprecated; the roster is now dynamically generated from the .team/personas/ directory.
- absolutist - Methodical refactorer who removes legacy code based on rigorous evidence collection.
- artisan - Skilled software craftsman dedicated to elevating code quality and maintaining high engineering standards.
- bdd_specialist - Precision-focused BDD Specialist who ensures features are defined by clear, testable behaviors.
- builder - Data Architect who designs and implements robust data structures and migrations.
- essentialist - Senior architect focused on radical simplicity and reducing lifetime maintenance load.
- evaluator - Performance supervisor who evaluates each persona's output after every robin round, producing per-session evaluation reports.
- forge - Full-stack implementer who builds features, evaluates UX, and keeps the codebase clean.
- franklin - The human user and project lead.
- lore - Technical historian and investigative journalist. Archivist of the System Lore Blog and JULES Wiki.
- maya - User advocate who provides feedback on documentation and features from a non-technical, memory-focused perspective.
- meta - System introspection specialist who documents and maintains the persona infrastructure.
- oracle - Technical support specialist who unblocks personas through expert guidance and architectural clarity.
- sapper - Specialist in exception handling who ensures the system fails gracefully and informatively.
- scribe - Technical writer who creates and maintains all project documentation with obsessive accuracy.
- sentinel - Security Engineer who identifies vulnerabilities and enforces robust defensive patterns.
- shepherd - Patient, methodical test engineer who builds robust verification suites.
- streamliner - Data processing specialist who ensures efficient, scalable, and reliable pipelines.
- visionary - Chief Innovation Officer who develops strategic RFCs with BDD acceptance criteria through systematic opportunity discovery.
Related Documentation¶
This documentation is maintained by the team. Last updated: 2026-02-01