Analyze code review outputs to extract learnings and identify improvement opportunities
Analyzes code review artifacts to extract patterns and generate improvement suggestions.
/plugin marketplace add galando/universal-ai-dev-framework/plugin install galando-piv@galando/universal-ai-dev-framework[--last=N] [--review=path]commands/validation/Analyze code review artifacts to:
.claude/agents/reviews//validation:code-review)| Argument | Description | Example |
|---|---|---|
--last=N | Analyze last N reviews (default: all) | --last=5 |
--review=path | Analyze specific review | --review=.claude/agents/reviews/code-review-feature-x.md |
# Find all review artifacts
ls -la .claude/agents/reviews/*.md
List all available reviews and their dates.
For each review artifact, extract:
From ## Issues Found section:
From ## Detailed Analysis section:
From ## Positive Findings section:
From ## Recommendations section:
From ## Project Standards Compliance section:
Metadata:
Recurring Issues:
Anti-Patterns:
Good Patterns:
Create artifact at: .claude/agents/learning/insights/learning-insights-{timestamp}.md
Structure:
# Learning Insights: {Date Range}
**Date:** {ISO timestamp}
**Reviews Analyzed:** {count}
**Date Range:** {earliest} to {latest}
## Executive Summary
Analyzed {X} code reviews. Found {Y} total issues across {Z} categories.
{N} recurring issues identified as improvement candidates.
## Issues Summary
### By Severity
| Severity | Count | % of Total |
|----------|-------|------------|
| Critical | X | Y% |
| High | X | Y% |
| Medium | X | Y% |
| Low | X | Y% |
### By Category
| Category | Count | Recurring |
|----------|-------|-----------|
| Logic Errors | X | Y |
| Security | X | Y |
| Performance | X | Y |
| Code Quality | X | Y |
## Recurring Issues (Improvement Candidates)
### 1. {Issue Title}
- **Occurrences:** {N} times in {reviews}
- **Category:** {category}
- **Severity:** {severity}
- **Description:** {description}
- **Improvement Opportunity:** {what to add to rules/validation}
### 2. {Issue Title}
...
## Anti-Patterns Discovered
### 1. {Anti-Pattern Name}
- **Found in:** {reviews}
- **Description:** {what the bad pattern is}
- **Impact:** {why it's bad}
- **Prevention:** {how to prevent in rules/skills}
## Good Patterns Found
### 1. {Pattern Name}
- **Found in:** {reviews}
- **Description:** {what worked well}
- **Encourage:** {how to encourage in rules}
## Improvement Suggestions
Based on this analysis, consider:
1. **Rule Update:** Add {anti-pattern} to `.claude/rules/{file}.md`
- Priority: {priority}
- Rationale: {why}
2. **Validation Addition:** Add check for {issue} to validation pipeline
- Priority: {priority}
- Rationale: {why}
3. **Skill Enhancement:** Enhance {skill} to detect {pattern}
- Priority: {priority}
- Rationale: {why}
## Next Steps
- Run `/validation:suggest-improvement "{suggestion}"` to create improvement artifact
- Review and approve suggestions before applying
- Track effectiveness in learning metrics
Update .claude/agents/learning/learning-metrics.md with:
Output to user:
## Learning Analysis Complete
**Reviews Analyzed:** {N}
**Total Issues Found:** {X}
**Recurring Issues:** {Y} (improvement candidates)
**New Suggestions:** {Z}
**Learning Insights:** `.claude/agents/learning/insights/learning-insights-{timestamp}.md`
**Metrics Updated:** `.claude/agents/learning/learning-metrics.md`
**Next Steps:**
- Review learning insights for accuracy
- Run `/validation:suggest-improvement` for high-priority items
- Track learning effectiveness over time
Artifacts Created:
.claude/agents/learning/insights/learning-insights-{timestamp}.md - Detailed learning insightsArtifacts Updated:
.claude/agents/learning/learning-metrics.md - Aggregate metrics# Analyze all reviews
/validation:learn
# Analyze last 5 reviews only
/validation:learn --last=5
# Analyze specific review
/validation:learn --review=.claude/agents/reviews/code-review-feature-x.md
--last=5 to analyze recent trendsThis command can be automatically suggested after /validation:code-review completes.
The adaptive-learning skill will prompt: "Run learning analysis to capture insights?"