Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
310 changes: 310 additions & 0 deletions .claude/AGENT_ROLE_MAPPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,310 @@
# Agent Role Mapping

## Overview

This document defines how the multi-agent system maps to software development workflows and responsibilities.

## Agent Responsibilities

### **Requirements Analyst** (PM/Analyst Role)
**Primary Role**: Project management, requirements clarification, scope decisions

**Responsibilities**:
- Analyze and clarify user requirements
- Create implementation plans and project phases
- Identify dependencies and constraints
- Define acceptance criteria and success metrics
- Flag scope issues and technical challenges
- Document business requirements

**Output Status**: `READY_FOR_DEVELOPMENT`

**When to Use**:
- Starting a new feature or project phase
- Analyzing bug reports or issues
- Clarifying ambiguous requirements
- Creating project roadmaps
- Auditing project scope

---

### **Architect** (Technical Design Role)
**Primary Role**: System architecture, technical design, high-level decisions

**Responsibilities**:
- Design system architecture and structure
- Make technology and framework choices
- Design APIs, interfaces, and data models
- Plan integration strategies
- Document design decisions and rationale
- Create technical specifications
- Consider security, performance, and scalability

**Output Status**: `READY_FOR_IMPLEMENTATION`

**When to Use**:
- Designing new features or systems
- Planning refactoring approaches
- Making technology choices
- Designing APIs or interfaces
- Planning system integrations
- Addressing architectural concerns

---

### **Implementer** (Development Role)
**Primary Role**: Hands-on coding, feature implementation, code writing

**Responsibilities**:
- Write production-quality code
- Implement features per specifications
- Follow coding standards and conventions
- Handle edge cases and errors
- Integrate with existing codebase
- Add appropriate logging and comments
- Ensure code quality and maintainability

**Output Status**: `READY_FOR_TESTING` or `IMPLEMENTATION_COMPLETE`

**When to Use**:
- Implementing designed features
- Writing production code
- Fixing bugs
- Refactoring code
- Adding new functionality
- Integrating third-party libraries

---

### **Tester** (Quality Assurance Role)
**Primary Role**: Testing strategy, test implementation, quality validation

**Responsibilities**:
- Design comprehensive test strategies
- Write unit, integration, and end-to-end tests
- Execute tests and analyze results
- Validate against requirements
- Test edge cases and error handling
- Ensure code coverage and quality
- Document test results and issues

**Output Status**: `TESTING_COMPLETE`

**When to Use**:
- After implementation is complete
- Validating bug fixes
- Regression testing
- Performance testing
- Integration testing
- Quality assurance validation

---

### **Documenter** (Documentation Role)
**Primary Role**: Documentation creation, maintenance, and organization

**Responsibilities**:
- Write user guides and tutorials
- Create API documentation
- Document architecture and design
- Write code comments and docstrings
- Create examples and code samples
- Update existing documentation
- Maintain documentation consistency

**Output Status**: `DOCUMENTATION_COMPLETE`

**When to Use**:
- After feature implementation
- Updating existing documentation
- Creating user guides
- Documenting APIs
- Writing tutorials
- Creating migration guides

---

## Standard Workflow Patterns

### Complete Feature Development
```
Requirements Analyst โ†’ Architect โ†’ Implementer โ†’ Tester โ†’ Documenter
```

**Flow**:
1. **Requirements Analyst**: Analyzes requirements, creates plan โ†’ `READY_FOR_DEVELOPMENT`
2. **Architect**: Designs system architecture โ†’ `READY_FOR_IMPLEMENTATION`
3. **Implementer**: Writes production code โ†’ `READY_FOR_TESTING`
4. **Tester**: Validates functionality โ†’ `TESTING_COMPLETE`
5. **Documenter**: Creates documentation โ†’ `DOCUMENTATION_COMPLETE`

---

### Bug Fix Workflow
```
Requirements Analyst โ†’ Architect โ†’ Implementer โ†’ Tester
```

**Flow**:
1. **Requirements Analyst**: Analyzes bug, identifies scope โ†’ `READY_FOR_DEVELOPMENT`
2. **Architect**: Designs fix approach โ†’ `READY_FOR_IMPLEMENTATION`
3. **Implementer**: Implements fix โ†’ `READY_FOR_TESTING`
4. **Tester**: Validates fix, regression testing โ†’ `TESTING_COMPLETE`

---

### Hotfix Workflow (Critical Issues)
```
Implementer โ†’ Tester
```

**Flow**:
1. **Implementer**: Quick fix implementation โ†’ `READY_FOR_TESTING`
2. **Tester**: Emergency validation โ†’ `TESTING_COMPLETE`

---

### Refactoring Workflow
```
Architect โ†’ Implementer โ†’ Tester โ†’ Documenter
```

**Flow**:
1. **Architect**: Designs refactoring strategy โ†’ `READY_FOR_IMPLEMENTATION`
2. **Implementer**: Refactors code โ†’ `READY_FOR_TESTING`
3. **Tester**: Regression testing โ†’ `TESTING_COMPLETE`
4. **Documenter**: Updates technical docs โ†’ `DOCUMENTATION_COMPLETE`

---

### Documentation Update Workflow
```
Requirements Analyst โ†’ Documenter โ†’ Tester
```

**Flow**:
1. **Requirements Analyst**: Audits documentation needs โ†’ `READY_FOR_DEVELOPMENT`
2. **Documenter**: Updates documentation โ†’ `DOCUMENTATION_COMPLETE`
3. **Tester**: Validates accuracy of examples โ†’ `TESTING_COMPLETE`

---

## Agent Selection Guidelines

### Choose Requirements Analyst when:
- โœ… Starting a new feature or project
- โœ… Requirements are unclear or ambiguous
- โœ… Need to analyze bug reports
- โœ… Planning project phases
- โœ… Defining acceptance criteria
- โŒ **NOT** for technical implementation decisions
- โŒ **NOT** for writing code

### Choose Architect when:
- โœ… Need to design system architecture
- โœ… Making technology or framework choices
- โœ… Designing APIs or interfaces
- โœ… Planning major refactoring
- โœ… Need to make technical trade-off decisions
- โŒ **NOT** for writing production code
- โŒ **NOT** for defining business requirements

### Choose Implementer when:
- โœ… Ready to write production code
- โœ… Architecture/design is complete
- โœ… Implementing features or bug fixes
- โœ… Refactoring existing code
- โœ… Integrating third-party code
- โŒ **NOT** for designing architecture
- โŒ **NOT** for writing tests

### Choose Tester when:
- โœ… Implementation is complete
- โœ… Need to validate functionality
- โœ… Writing test suites
- โœ… Regression testing
- โœ… Performance validation
- โŒ **NOT** for implementing features
- โŒ **NOT** for architectural decisions

### Choose Documenter when:
- โœ… Feature is implemented and tested
- โœ… Need to update documentation
- โœ… Writing user guides
- โœ… Creating API documentation
- โœ… Adding code examples
- โŒ **NOT** for writing production code
- โŒ **NOT** for making technical decisions

---

## Status Transition Guide

| Current Status | Recommended Next Agent |
|----------------|----------------------|
| *Starting New Work* | Requirements Analyst |
| `READY_FOR_DEVELOPMENT` | Architect |
| `READY_FOR_IMPLEMENTATION` | Implementer |
| `IMPLEMENTATION_COMPLETE` | Tester |
| `READY_FOR_TESTING` | Tester |
| `TESTING_COMPLETE` | Documenter (optional) or Complete |
| `DOCUMENTATION_COMPLETE` | Complete |

---

## Communication Between Agents

### Information Handoffs

**Requirements Analyst โ†’ Architect**:
- Feature requirements and acceptance criteria
- Business constraints and limitations
- Technical challenges identified
- Project scope and phases

**Architect โ†’ Implementer**:
- System architecture and design
- API/interface specifications
- Technical decisions and rationale
- Integration guidance
- Implementation priorities

**Implementer โ†’ Tester**:
- Completed features and changes
- Edge cases to test
- Known limitations
- Integration points
- Suggested test scenarios

**Tester โ†’ Documenter**:
- Validated functionality
- Usage patterns observed
- Edge cases discovered
- Common issues encountered

---

## Benefits of This Approach

1. **Clear Separation of Concerns**: Each agent focuses on its specialty
2. **Quality Assurance**: Multiple review points in workflow
3. **Comprehensive Coverage**: All aspects of development covered
4. **Flexible Workflows**: Adapt agent sequence to project needs
5. **Scalable**: Easy to add more specialized agents
6. **Traceable**: Clear status transitions and handoffs

---

## Customization for Your Project

[**NOTE TO TEMPLATE USER**: Customize agent workflows for your project]

Consider your project's specific needs:
- **Parallel Development**: Can multiple agents work simultaneously?
- **Skip Steps**: Which agents are optional for your workflow?
- **Additional Agents**: Do you need specialized agents?
- **Custom Workflows**: What are your common development patterns?

---

This mapping ensures agents work efficiently within their expertise while maintaining comprehensive coverage of all development aspects.
Loading
Loading