-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Milestone
Description
Overview
Implement a YAML-based configuration system for AI personas to enable users to create custom analysis personalities without code changes.
Current State
The persona system currently uses hard-coded Python classes:
BasePersona
abstract base classTechnicalAnalystPersona
implementationPersonaManager
with programmatic registration
Proposed Implementation
Phase 1: Core YAML Infrastructure
- Create
ConfigurablePersona
class that loads from YAML files - Enhance
PersonaManager
to support both coded and YAML personas - Add YAML schema validation and comprehensive error handling
- Create
src/git_summary/ai/personas/
directory structure
Phase 2: YAML Configuration Schema
- Design comprehensive YAML schema supporting:
- System prompts with templating
- Analysis framework definition (sections, formats, limits)
- Context processing rules (commit/PR/issue display limits)
- Output format requirements (tone, audience, word limits)
- Convert existing
TechnicalAnalystPersona
to YAML format as reference - Implement dynamic instruction generation from YAML config
Phase 3: CLI Integration
- Add
personas
command to list available personas with type indicators - Add
create-persona
command to generate YAML templates - Enhance
ai-summary
to seamlessly work with YAML personas - Add persona validation and hot-reload functionality for development
Phase 4: Templates & Documentation
- Create template personas:
product_manager.yaml
- Business impact focusteam_lead.yaml
- Team collaboration and velocity focusdata_analyst.yaml
- Metrics and trends focus
- Add comprehensive YAML schema documentation
- Create migration guide from coded to YAML personas
YAML Schema Example
name: "Tech Analyst"
description: "Deep technical analysis focusing on code quality and architecture"
version: "1.0"
author: "git-summary"
system_prompt: |
You are a Senior Technical Analyst specializing in code review...
analysis_framework:
sections:
- name: "Technical Summary"
description: "2-3 sentence overview"
max_length: 150
- name: "Key Technical Themes"
format: "bullet_list"
max_items: 4
context_processing:
commit_analysis:
max_commits_displayed: 10
include_line_changes: true
pr_analysis:
max_prs_displayed: 5
output_format:
max_words: 400
tone: "technical"
audience: "engineers"
Benefits
- No Code Changes: Users create personas via YAML files
- Version Control: YAML files can be shared and collaborated on
- Rapid Iteration: Easy testing of different analysis approaches
- Community Sharing: Effective personas can be shared between teams
- Extensibility: New configuration options without breaking changes
Technical Requirements
- Maintain backward compatibility with existing coded personas
- Add comprehensive error handling for malformed YAML
- Implement YAML schema validation
- Support both absolute and relative paths for persona files
- Add comprehensive logging for debugging persona loading
Acceptance Criteria
- Users can create new personas by editing YAML files
- Existing
TechnicalAnalystPersona
works identically via YAML - CLI commands provide easy persona management
- System gracefully handles YAML errors with helpful messages
- Documentation enables users to create effective custom personas
Related Issues
This implements the configurable persona system discussed in previous AI summary work and enables extensibility for diverse analysis needs.
Metadata
Metadata
Assignees
Labels
No labels