From piv-speckit
Analyzes code review artifacts [--last=N] [--review=path] to extract issues, patterns, positive findings, and learnings, generating a structured markdown insights report.
How this command is triggered — by the user, by Claude, or both
Slash command
/piv-speckit:learn [--last=N] [--review=path]commands/validation/The summary Claude sees in its command listing — used to decide when to auto-load this command
# Learning Analysis: Extract Insights from Code Reviews > **Full methodology:** `$CLAUDE_PLUGIN_ROOT/.claude-plugin/reference/skills-full/adaptive-learning-full.md` ## Purpose Analyze code review artifacts to: 1. **Extract structured data** from review outputs (issues, patterns, recommendations) 2. **Identify recurring patterns** across multiple reviews 3. **Generate improvement suggestions** for rules, validation, and skills 4. **Update learning metrics** to track progress over time ## Prerequisites - At least one code review artifact exists in `.claude/agents/reviews/` - Code review ...
Full methodology:
$CLAUDE_PLUGIN_ROOT/.claude-plugin/reference/skills-full/adaptive-learning-full.md
Analyze code review artifacts to:
.claude/agents/reviews//piv-speckit: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 `/piv-speckit: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 `/piv-speckit: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
/piv-speckit:learn
# Analyze last 5 reviews only
/piv-speckit:learn --last=5
# Analyze specific review
/piv-speckit:learn --review=.claude/agents/reviews/code-review-feature-x.md
--last=5 to analyze recent trendsThis command can be automatically suggested after /piv-speckit:code-review completes.
The adaptive-learning skill will prompt: "Run learning analysis to capture insights?"
npx claudepluginhub galando/piv-speckit --plugin piv/self-reflectExtracts learnings from recent PR reviews, conversations, and session patterns to update the knowledge base.
/review-gladiatorReviews session history observations, clusters patterns, generates workflow recommendations, and suggests changes or existing solutions.
/learnAnalyzes git history, PRs, and handoffs for repeated patterns, recommends artifacts like skills/rules/hooks/agents, and creates them upon user approval.
/reviewOrchestrates 7 parallel specialist agents for standalone code review, analyzing hotspots, tech debt, quality, tests, coupling, practices, standards, and AI ergonomics.
/insightsSurfaces analytics on coding sessions, workflow learnings, correction patterns, heatmaps, and productivity metrics with trends and suggestions. Supports session, learnings, corrections, heatmap subcommands.
/learn-reportGenerates learning insights report from accumulated LEARN.md files in the project, analyzing top skills, coverage gaps, and overall health with next-step suggestions. Supports markdown or json format.