# Generate Learning Report

## Purpose

Aggregate anonymous usage patterns from learning logs to create actionable insights.

## Context

This task reads learning event logs and generates a comprehensive report showing usage patterns, friction points, and improvement opportunities.

## Input Required

- None (reads from existing logs)

## Steps

1. **Check for learning logs**

   ```bash
   ls -la .bmad-workspace/ck-jira-integration/feedback/learning-log-*.md
   ```

2. **Read and aggregate event data**
   - Count event types
   - Identify patterns
   - Calculate success rates
   - Find common friction points

3. **Generate aggregated report**
   File: `.bmad-workspace/ck-jira-integration/feedback/jira-expansion-learnings.md`

   Content structure:

   ```markdown
   # JIRA Expansion Pack - Usage Learnings

   Generated: {{date}}
   Sessions Analyzed: {{count}}

   ## Summary

   - Total events logged: {{event_count}}
   - Success rate: {{success_percentage}}%
   - Most common operations: {{top_3_operations}}
   - Average setup time: {{setup_time_range}}

   ## Observed Patterns

   ### Setup Experience

   - {{setup_success_rate}}% completed setup successfully
   - Common friction point: {{top_setup_issue}}
   - Most successful method: {{best_setup_approach}}

   ### Command Usage

   - Most confused commands: {{confused_commands}}
   - Help frequency: {{help_rate}}
   - Discovery patterns: {{how_users_find_features}}

   ### Sync Operations

   - Preview usage: {{preview_percentage}}%
   - Bulk sync adoption: {{bulk_usage}}%
   - Average items per sync: {{avg_sync_size}}

   ## Improvement Opportunities

   Based on usage patterns:

   1. {{suggestion_1}}
   2. {{suggestion_2}}
   3. {{suggestion_3}}

   ## Anonymous Event Summary

   {{event_summary_table}}
   ```

4. **Archive old logs** (optional)
   - Move logs older than 30 days to archive
   - Keep report current and relevant

## Output

- Updated learning report at `.bmad-workspace/ck-jira-integration/feedback/jira-expansion-learnings.md`
- Summary shown to user if requested

## Usage

- Run periodically (weekly/monthly)
- After significant usage (100+ events)
- When user requests feedback summary
- Before expansion pack updates

## Privacy Note

All data remains anonymous and pattern-focused. No personal or project information is included in reports.
