Files
Claude-Code-Workflow/agents/role-analysis-reviewer-agent.md
catlog22 3fd55ebd4b feat: Add Role Analysis Reviewer Agent and validation template
- Introduced Role Analysis Reviewer Agent to validate role analysis outputs against templates and quality standards.
- Created a detailed validation ruleset for the system-architect role, including mandatory and recommended sections.
- Added JSON validation report structure for output.
- Implemented execution command for validation process.

test: Add UX tests for HookCard component

- Created comprehensive tests for HookCard component, focusing on delete confirmation UX pattern.
- Verified confirmation dialog appearance, deletion functionality, and button interactions.
- Ensured proper handling of state updates and visual feedback for enabled/disabled status.

test: Add UX tests for ThemeSelector component

- Developed tests for ThemeSelector component, emphasizing delete confirmation UX pattern.
- Validated confirmation dialog display, deletion actions, and toast notifications for undo functionality.
- Ensured proper management of theme slots and state updates.

feat: Implement useDebounce hook

- Added useDebounce hook to delay expensive computations or API calls, enhancing performance.

feat: Create System Architect Analysis Template

- Developed a comprehensive template for system architect role analysis, covering required sections such as architecture overview, data model, state machine, error handling strategy, observability requirements, configuration model, and boundary scenarios.
- Included examples and templates for each section to guide users in producing SPEC.md-level precision modeling.
2026-03-05 19:58:10 +08:00

98 lines
2.6 KiB
Markdown

# Role Analysis Reviewer Agent
Validates role analysis outputs against role-specific templates and quality standards.
## Objective
Ensure role analysis documents meet SPEC.md-level precision and completeness.
## Input
- Role name (e.g., system-architect, product-manager)
- Role analysis document path (e.g., `.brainstorming/system-architect/analysis.md`)
- Role template path (e.g., `templates/role-templates/system-architect-template.md`)
## Validation Rules
### For system-architect
**MUST have (blocking)**:
- [ ] Data Model section with at least 1 entity definition
- [ ] Entity table with fields: name, type, constraint, description
- [ ] State Machine section with at least 1 lifecycle diagram
- [ ] State transition table with: from, event, to, side effects
- [ ] Error Handling Strategy section
- [ ] Observability Requirements section with at least 3 metrics
**SHOULD have (warning)**:
- [ ] Data Model with 3-5 entities
- [ ] Relationships defined between entities
- [ ] Indexes specified for entities
- [ ] State Machine with error recovery paths
- [ ] Circuit Breaker configuration
- [ ] Health check endpoints defined
**Quality checks**:
- [ ] All constraints use RFC 2119 keywords
- [ ] State diagram is valid ASCII art
- [ ] Metrics have type (Counter/Gauge/Histogram) specified
- [ ] Error handling has timeout values
- [ ] No generic placeholders like "[TODO]" or "[TBD]"
## Output
JSON validation report:
```json
{
"role": "system-architect",
"document": ".brainstorming/system-architect/analysis.md",
"validation": {
"must_pass": true/false,
"should_pass": true/false,
"checks": {
"data_model_present": true,
"entity_count": 3,
"state_machine_present": true,
"error_handling_present": true,
"observability_present": true,
"metrics_count": 5,
"rfc_keywords_count": 12
},
"issues": [
{
"severity": "error",
"section": "Data Model",
"message": "Entity 'User' missing 'Relationships' subsection"
},
{
"severity": "warning",
"section": "Observability",
"message": "Only 3 metrics defined, recommend at least 5"
}
]
},
"score": 8.5,
"recommendation": "Pass with minor improvements"
}
```
## Execution
```javascript
Bash({
command: `ccw cli -p "Validate role analysis document against template.
ROLE: ${roleName}
DOCUMENT: ${analysisDoc}
TEMPLATE: ${roleTemplate}
VALIDATION RULES:
${validationRules}
OUTPUT: JSON validation report with must_pass, should_pass, checks, issues, score, recommendation
" --tool gemini --mode analysis`,
run_in_background: true
});
```