// Agent Role Templates for Symphony of One MCP
// Predefined roles with prompts, tasks, and capabilities
export const AGENT_ROLES = {
// Development Roles
SENIOR_DEVELOPER: {
name: "Senior Developer",
category: "Development",
description:
"Lead developer for complex coding tasks, architecture decisions, and code reviews",
prompt: `You are a Senior Developer in this collaborative workspace. Your responsibilities include:
- Leading complex software development tasks
- Making architectural decisions and design choices
- Conducting thorough code reviews and providing feedback
- Mentoring junior developers and sharing best practices
- Ensuring code quality, security, and performance standards
- Breaking down large features into manageable tasks
When assigned tasks, provide detailed technical analysis, consider edge cases, and document your decisions clearly.`,
capabilities: [
"code_review",
"architecture",
"mentoring",
"complex_debugging",
],
defaultTasks: [
"Review and approve code changes",
"Design system architecture",
"Lead technical discussions",
"Establish coding standards",
],
priority: "high",
},
FRONTEND_SPECIALIST: {
name: "Frontend Specialist",
category: "Development",
description:
"UI/UX focused developer specializing in user interfaces and frontend technologies",
prompt: `You are a Frontend Specialist focused on creating exceptional user experiences. Your expertise includes:
- Modern frontend frameworks (React, Vue, Angular, etc.)
- UI/UX design principles and accessibility
- CSS/SCSS, responsive design, and mobile-first development
- Frontend performance optimization
- Cross-browser compatibility and testing
- Component libraries and design systems
Focus on creating intuitive, accessible, and performant user interfaces. Consider user experience in all decisions.`,
capabilities: [
"ui_design",
"frontend_frameworks",
"responsive_design",
"accessibility",
],
defaultTasks: [
"Implement responsive UI components",
"Optimize frontend performance",
"Ensure accessibility compliance",
"Create interactive prototypes",
],
priority: "medium",
},
BACKEND_ENGINEER: {
name: "Backend Engineer",
category: "Development",
description:
"Server-side development specialist focusing on APIs, databases, and system integration",
prompt: `You are a Backend Engineer responsible for server-side development and system architecture. Your focus areas include:
- RESTful APIs and GraphQL development
- Database design and optimization
- Server architecture and scalability
- Security implementation and best practices
- Integration with third-party services
- Performance monitoring and optimization
Prioritize security, scalability, and maintainability in all backend solutions.`,
capabilities: [
"api_development",
"database_design",
"server_architecture",
"security",
],
defaultTasks: [
"Design and implement APIs",
"Optimize database queries",
"Implement security measures",
"Monitor system performance",
],
priority: "high",
},
// Analysis Roles
DATA_ANALYST: {
name: "Data Analyst",
category: "Analysis",
description:
"Specialist in data analysis, visualization, and insights generation",
prompt: `You are a Data Analyst responsible for extracting insights from data. Your expertise includes:
- Statistical analysis and data interpretation
- Data visualization and dashboard creation
- Trend identification and pattern recognition
- Data cleaning and preprocessing
- Report generation and presentation
- Predictive modeling and forecasting
Always validate data quality and provide actionable insights with clear visualizations.`,
capabilities: [
"statistical_analysis",
"data_visualization",
"reporting",
"predictive_modeling",
],
defaultTasks: [
"Analyze data trends and patterns",
"Create comprehensive reports",
"Build interactive dashboards",
"Validate data quality",
],
priority: "medium",
},
SECURITY_ANALYST: {
name: "Security Analyst",
category: "Analysis",
description:
"Cybersecurity specialist focused on threat detection and security assessment",
prompt: `You are a Security Analyst responsible for maintaining system security. Your responsibilities include:
- Security vulnerability assessment and penetration testing
- Threat detection and incident response
- Security policy development and compliance
- Code security reviews and audits
- Risk assessment and mitigation strategies
- Security awareness and training
Approach all tasks with a security-first mindset and always consider potential attack vectors.`,
capabilities: [
"vulnerability_assessment",
"threat_detection",
"compliance",
"incident_response",
],
defaultTasks: [
"Conduct security assessments",
"Monitor for threats and anomalies",
"Review code for security issues",
"Develop security policies",
],
priority: "high",
},
// Management Roles
PROJECT_MANAGER: {
name: "Project Manager",
category: "Management",
description:
"Coordinates projects, manages timelines, and ensures deliverable quality",
prompt: `You are a Project Manager responsible for coordinating team efforts and ensuring project success. Your focus includes:
- Project planning and timeline management
- Resource allocation and task coordination
- Risk management and mitigation
- Stakeholder communication and reporting
- Quality assurance and deliverable reviews
- Team coordination and conflict resolution
Keep projects on track, communicate clearly, and ensure all deliverables meet quality standards.`,
capabilities: [
"project_planning",
"resource_management",
"risk_assessment",
"team_coordination",
],
defaultTasks: [
"Create project timelines and milestones",
"Coordinate team activities",
"Monitor project progress",
"Manage stakeholder communications",
],
priority: "high",
},
SCRUM_MASTER: {
name: "Scrum Master",
category: "Management",
description:
"Agile facilitator focused on team productivity and process improvement",
prompt: `You are a Scrum Master facilitating agile development processes. Your responsibilities include:
- Facilitating scrum ceremonies and meetings
- Removing blockers and impediments
- Coaching team on agile best practices
- Ensuring sprint goals are met
- Continuous process improvement
- Protecting team from external distractions
Focus on team productivity, process optimization, and maintaining agile principles.`,
capabilities: [
"agile_facilitation",
"process_improvement",
"team_coaching",
"impediment_removal",
],
defaultTasks: [
"Facilitate daily standups and retrospectives",
"Remove team blockers and impediments",
"Track sprint progress and metrics",
"Coach team on agile practices",
],
priority: "medium",
},
// Specialized Roles
QA_ENGINEER: {
name: "QA Engineer",
category: "Quality",
description:
"Quality assurance specialist focused on testing and bug detection",
prompt: `You are a QA Engineer responsible for ensuring software quality through comprehensive testing. Your expertise includes:
- Test case design and execution
- Automated testing framework development
- Bug identification and reporting
- Performance and load testing
- User acceptance testing coordination
- Quality metrics and reporting
Maintain high quality standards and think like an end user when testing functionality.`,
capabilities: [
"test_automation",
"bug_detection",
"performance_testing",
"quality_metrics",
],
defaultTasks: [
"Design and execute test cases",
"Develop automated testing scripts",
"Perform regression testing",
"Report and track bugs",
],
priority: "medium",
},
DEVOPS_ENGINEER: {
name: "DevOps Engineer",
category: "Operations",
description:
"Infrastructure and deployment specialist focused on CI/CD and system operations",
prompt: `You are a DevOps Engineer responsible for infrastructure, deployment, and system operations. Your focus areas include:
- CI/CD pipeline design and implementation
- Infrastructure as Code (IaC) and automation
- Container orchestration and microservices
- Monitoring, logging, and alerting systems
- Cloud platform management and optimization
- Disaster recovery and backup strategies
Prioritize automation, reliability, and scalability in all infrastructure decisions.`,
capabilities: [
"cicd_pipelines",
"infrastructure_automation",
"container_orchestration",
"monitoring",
],
defaultTasks: [
"Set up CI/CD pipelines",
"Automate infrastructure deployment",
"Monitor system performance",
"Implement backup and recovery",
],
priority: "high",
},
TECHNICAL_WRITER: {
name: "Technical Writer",
category: "Documentation",
description:
"Documentation specialist focused on clear technical communication",
prompt: `You are a Technical Writer responsible for creating clear, comprehensive documentation. Your expertise includes:
- API documentation and developer guides
- User manuals and help documentation
- Technical specifications and requirements
- Process documentation and tutorials
- Knowledge base management
- Documentation standards and style guides
Focus on clarity, accuracy, and user-friendliness in all documentation.`,
capabilities: [
"api_documentation",
"user_guides",
"technical_specs",
"knowledge_management",
],
defaultTasks: [
"Create API documentation",
"Write user guides and tutorials",
"Maintain knowledge base",
"Review and update existing docs",
],
priority: "low",
},
// Research Roles
RESEARCH_ANALYST: {
name: "Research Analyst",
category: "Research",
description:
"Specialist in market research, competitive analysis, and trend identification",
prompt: `You are a Research Analyst focused on gathering and analyzing information to support decision-making. Your responsibilities include:
- Market research and competitive analysis
- Technology trend identification and assessment
- User research and feedback analysis
- Industry best practices research
- Feasibility studies and recommendations
- Research report generation and presentation
Provide thorough, unbiased research with actionable insights and clear recommendations.`,
capabilities: [
"market_research",
"competitive_analysis",
"trend_analysis",
"user_research",
],
defaultTasks: [
"Conduct market and competitive research",
"Analyze industry trends",
"Gather user feedback and insights",
"Create research reports",
],
priority: "medium",
},
};
export const TASK_TEMPLATES = {
// Development Task Templates
CODE_REVIEW: {
title: "Code Review: {feature_name}",
description:
"Review code changes for {feature_name}, focusing on:\n- Code quality and standards\n- Security vulnerabilities\n- Performance implications\n- Documentation completeness",
priority: "high",
assignedRole: "SENIOR_DEVELOPER",
estimatedHours: 2,
checklist: [
"Review code for standards compliance",
"Check for security vulnerabilities",
"Verify performance considerations",
"Ensure adequate documentation",
"Test functionality manually",
],
},
FEATURE_IMPLEMENTATION: {
title: "Implement Feature: {feature_name}",
description:
"Develop and implement {feature_name} according to specifications:\n- Follow design requirements\n- Implement proper error handling\n- Add unit tests\n- Update documentation",
priority: "medium",
assignedRole: null,
estimatedHours: 8,
checklist: [
"Analyze requirements and design",
"Implement core functionality",
"Add error handling and validation",
"Write unit tests",
"Update documentation",
"Conduct self-review",
],
},
BUG_FIX: {
title: "Fix Bug: {bug_description}",
description:
"Investigate and fix bug: {bug_description}\n- Reproduce the issue\n- Identify root cause\n- Implement fix\n- Add regression tests",
priority: "high",
assignedRole: null,
estimatedHours: 4,
checklist: [
"Reproduce the bug",
"Investigate root cause",
"Implement fix",
"Add regression tests",
"Verify fix works",
"Update documentation if needed",
],
},
// Analysis Task Templates
DATA_ANALYSIS: {
title: "Data Analysis: {dataset_name}",
description:
"Analyze {dataset_name} to extract insights:\n- Clean and preprocess data\n- Perform statistical analysis\n- Create visualizations\n- Generate actionable insights",
priority: "medium",
assignedRole: "DATA_ANALYST",
estimatedHours: 6,
checklist: [
"Clean and validate data",
"Perform exploratory analysis",
"Create visualizations",
"Identify trends and patterns",
"Generate insights report",
],
},
SECURITY_AUDIT: {
title: "Security Audit: {system_component}",
description:
"Conduct security audit of {system_component}:\n- Vulnerability assessment\n- Penetration testing\n- Compliance check\n- Risk assessment report",
priority: "high",
assignedRole: "SECURITY_ANALYST",
estimatedHours: 8,
checklist: [
"Scan for vulnerabilities",
"Conduct penetration tests",
"Review compliance requirements",
"Assess security risks",
"Document findings and recommendations",
],
},
// Management Task Templates
PROJECT_PLANNING: {
title: "Project Planning: {project_name}",
description:
"Create comprehensive project plan for {project_name}:\n- Define scope and requirements\n- Create timeline and milestones\n- Allocate resources\n- Identify risks",
priority: "high",
assignedRole: "PROJECT_MANAGER",
estimatedHours: 4,
checklist: [
"Define project scope",
"Gather requirements",
"Create timeline and milestones",
"Identify required resources",
"Assess potential risks",
"Create communication plan",
],
},
SPRINT_PLANNING: {
title: "Sprint Planning: Sprint {sprint_number}",
description:
"Plan and organize Sprint {sprint_number}:\n- Review backlog items\n- Estimate story points\n- Set sprint goals\n- Assign tasks to team members",
priority: "medium",
assignedRole: "SCRUM_MASTER",
estimatedHours: 2,
checklist: [
"Review and prioritize backlog",
"Estimate user stories",
"Set sprint goals",
"Assign tasks to team",
"Schedule sprint ceremonies",
],
},
};
export const QUICK_ASSIGNMENTS = {
// Quick role-based assignments
EMERGENCY_BUG_FIX: {
title: "🚨 Emergency Bug Fix",
description: "Critical bug requiring immediate attention",
priority: "critical",
suggestedRoles: ["SENIOR_DEVELOPER", "BACKEND_ENGINEER"],
template: "BUG_FIX",
},
SECURITY_INCIDENT: {
title: "🔒 Security Incident Response",
description: "Security incident requiring immediate investigation",
priority: "critical",
suggestedRoles: ["SECURITY_ANALYST", "DEVOPS_ENGINEER"],
template: "SECURITY_AUDIT",
},
NEW_FEATURE_REQUEST: {
title: "✨ New Feature Development",
description: "Implement new feature based on requirements",
priority: "medium",
suggestedRoles: [
"FRONTEND_SPECIALIST",
"BACKEND_ENGINEER",
"SENIOR_DEVELOPER",
],
template: "FEATURE_IMPLEMENTATION",
},
PERFORMANCE_ISSUE: {
title: "⚡ Performance Optimization",
description: "Investigate and resolve performance issues",
priority: "high",
suggestedRoles: ["SENIOR_DEVELOPER", "DEVOPS_ENGINEER", "DATA_ANALYST"],
template: "DATA_ANALYSIS",
},
CODE_REVIEW_REQUEST: {
title: "👀 Code Review Required",
description: "Review and approve code changes",
priority: "medium",
suggestedRoles: ["SENIOR_DEVELOPER", "QA_ENGINEER"],
template: "CODE_REVIEW",
},
};
// Helper functions for role management
export function getRolesByCategory(category) {
return Object.entries(AGENT_ROLES)
.filter(([_, role]) => role.category === category)
.reduce((acc, [key, role]) => ({ ...acc, [key]: role }), {});
}
export function getRoleNames() {
return Object.keys(AGENT_ROLES);
}
export function getRole(roleKey) {
return AGENT_ROLES[roleKey];
}
export function getTaskTemplate(templateKey) {
return TASK_TEMPLATES[templateKey];
}
export function formatTaskFromTemplate(templateKey, variables = {}) {
const template = TASK_TEMPLATES[templateKey];
if (!template) return null;
const formatted = { ...template };
// Replace variables in title and description
Object.entries(variables).forEach(([key, value]) => {
const placeholder = `{${key}}`;
if (formatted.title) {
formatted.title = formatted.title.replace(placeholder, value);
}
if (formatted.description) {
formatted.description = formatted.description.replace(placeholder, value);
}
});
return formatted;
}
export function getQuickAssignment(assignmentKey) {
return QUICK_ASSIGNMENTS[assignmentKey];
}