Proposal: Role-based review personas #51
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Introduce role-based review personas to complement (or replace) the current generic multi-model review approach. Each persona brings a specialized lens, reducing noise and catching domain-specific issues that generic reviewers miss.
Problem
Current twin reviews (Sonnet + GPT-5) both perform generic code review:
Proposed Personas
Implementation Approach
1. Persona Prompts
Each persona gets a tailored system prompt with:
Example for Security:
2. Execution Strategy
Option A: Parallel Panel
Option B: Tiered Review
Option C: Selective Assignment
securitylabel → Security Specialistlib/trading/changes → Domain Expert3. Synthesis
After all personas complete:
4. PR Size Adaptation
Gargoyle-Specific Personas
For gargoyle, the Domain Expert would specialize in:
Cost Considerations
Open Questions
Success Metrics
Next Steps
Addendum: Model Selection & Prompt Structure
Model Strengths by Persona
Prompt Structure Principles
1. Role Anchoring
Start with a clear identity that constrains scope:
2. Expertise Context
Give the persona relevant background knowledge:
3. Severity Calibration
Each persona needs domain-specific severity definitions:
4. Output Format
Structured output for easy synthesis:
5. Anti-Patterns to Avoid
Prompt Evolution
Prompts should evolve based on:
Track prompt versions and correlate with finding quality.
Context Shaping
Different personas may need different context windows:
Smaller context = faster + cheaper + more focused. Don't give Security the full codebase when they only need auth flows.