- [Editing] Use named exports — learned 45 days ago, applied 0x
→ Consider removing if no longer relevant
```
### Productivity Metrics
```
Productivity (last 10 sessions)
Avg session: 35 min
Avg edits/session: 18
Correction rate: 12% (improving)
Learning capture: 2.1 per session
Best session: 2026-02-01 (28 edits, 0 corrections)
Most productive hour: 10-11am
```
## How to Query
Run these SQLite queries against `~/.pro-workflow/data.db`:
**Heatmap by category:**
```sql
SELECT category, COUNT(*) as count
FROM learnings
WHERE mistake IS NOT NULL
GROUP BY category
ORDER BY count DESC
```
**Correction rate by project:**
```sql
SELECT project,
SUM(corrections_count) as total_corrections,
SUM(edit_count) as total_edits,
ROUND(CAST(SUM(corrections_count) AS FLOAT) / NULLIF(SUM(edit_count), 0) * 100, 1) as rate
FROM sessions
WHERE project IS NOT NULL
GROUP BY project
ORDER BY rate DESC
```
**Hot learnings (most corrected patterns):**
```sql
SELECT category, rule, times_applied,
(SELECT COUNT(*) FROM sessions WHERE corrections_count > 0) as correction_sessions
FROM learnings
WHERE mistake IS NOT NULL
ORDER BY times_applied ASC, created_at ASC
LIMIT 10
```
## Options
- **session**: Current session stats only
- **learnings**: Learning database analytics
- **corrections**: Correction pattern analysis
- **heatmap**: Correction heatmap across categories, projects, and files
- **all**: Full report including heatmap (default)
- **--export**: Output as markdown file
## Related Commands
- `/list` - Browse all learnings
- `/search <query>` - Find specific learnings
- `/learn-rule` - Capture a new learning
- `/replay` - Surface learnings for current task
- `/wrap-up` - End-of-session with learning capture
---
**Trigger:** Use when user asks "show stats", "how am I doing", "what patterns", "analytics", "insights", "heatmap", "correction rate", or wants to understand their learning trajectory.