|
| 1 | +# history Command |
| 2 | + |
| 3 | +Show completion history timeline with analytics and velocity metrics. |
| 4 | + |
| 5 | +## Usage |
| 6 | + |
| 7 | +```bash |
| 8 | +claude-todo history [OPTIONS] |
| 9 | +``` |
| 10 | + |
| 11 | +## Description |
| 12 | + |
| 13 | +The `history` command provides a timeline view of task completions with analytics including: |
| 14 | +- Daily completion counts with sparkline visualization |
| 15 | +- Phase distribution of completed tasks |
| 16 | +- Label breakdown of completions |
| 17 | +- Velocity metrics (tasks/day average and peak) |
| 18 | + |
| 19 | +This command is ideal for: |
| 20 | +- Reviewing productivity trends over time |
| 21 | +- Understanding which phases have the most completions |
| 22 | +- Identifying productive periods and patterns |
| 23 | +- Generating completion reports for stakeholders |
| 24 | + |
| 25 | +## Options |
| 26 | + |
| 27 | +| Option | Short | Description | Default | |
| 28 | +|--------|-------|-------------|---------| |
| 29 | +| `--days N` | | Show last N days | `30` | |
| 30 | +| `--since DATE` | | Show completions since date (YYYY-MM-DD) | | |
| 31 | +| `--until DATE` | | Show completions until date (YYYY-MM-DD) | | |
| 32 | +| `--format FORMAT` | `-f` | Output format: `text` or `json` | `text` | |
| 33 | +| `--no-chart` | | Disable sparkline and bar charts | Show charts | |
| 34 | +| `--help` | `-h` | Show help message | | |
| 35 | + |
| 36 | +## Examples |
| 37 | + |
| 38 | +### Basic Usage |
| 39 | + |
| 40 | +```bash |
| 41 | +# Show last 30 days of completions |
| 42 | +claude-todo history |
| 43 | + |
| 44 | +# Show last week |
| 45 | +claude-todo history --days 7 |
| 46 | + |
| 47 | +# Show specific date range |
| 48 | +claude-todo history --since 2025-12-01 --until 2025-12-15 |
| 49 | +``` |
| 50 | + |
| 51 | +### Output Format |
| 52 | + |
| 53 | +```bash |
| 54 | +# JSON output for scripting |
| 55 | +claude-todo history --format json |
| 56 | + |
| 57 | +# Text output without charts (for terminals without Unicode) |
| 58 | +claude-todo history --no-chart |
| 59 | +``` |
| 60 | + |
| 61 | +## Sample Output |
| 62 | + |
| 63 | +### Text Format |
| 64 | + |
| 65 | +``` |
| 66 | +╭─────────────────────────────────────────────────────────────────╮ |
| 67 | +│ COMPLETION HISTORY │ |
| 68 | +│ Last 30 days │ |
| 69 | +╰─────────────────────────────────────────────────────────────────╯ |
| 70 | +
|
| 71 | + TIMELINE (Daily Completions) |
| 72 | + ──────────────────────────────────────────────────────────────── |
| 73 | + Dec 01 ▁▁▁▃▅▇▅▃▁▁▁▁▃▅▇█▇▅▃▁▁▁▃▅▇▅▃▁▁▁ |
| 74 | +
|
| 75 | + VELOCITY METRICS |
| 76 | + ──────────────────────────────────────────────────────────────── |
| 77 | + Total Completed: 87 tasks |
| 78 | + Average Rate: 2.9 tasks/day |
| 79 | + Peak Day: Dec 15 (32 tasks) |
| 80 | +
|
| 81 | + PHASE DISTRIBUTION |
| 82 | + ──────────────────────────────────────────────────────────────── |
| 83 | + core [████████████████████] 51 (59%) |
| 84 | + polish [████████████░░░░░░░░] 21 (24%) |
| 85 | + setup [██████░░░░░░░░░░░░░░] 8 (9%) |
| 86 | +
|
| 87 | + TOP LABELS |
| 88 | + ──────────────────────────────────────────────────────────────── |
| 89 | + consensus-framework (38) backup-system (12) cli (8) |
| 90 | +``` |
| 91 | + |
| 92 | +### JSON Format |
| 93 | + |
| 94 | +```json |
| 95 | +{ |
| 96 | + "_meta": { |
| 97 | + "command": "history", |
| 98 | + "generated": "2025-12-15T16:30:00Z", |
| 99 | + "period": { |
| 100 | + "days": 30, |
| 101 | + "since": "2025-11-15", |
| 102 | + "until": "2025-12-15" |
| 103 | + } |
| 104 | + }, |
| 105 | + "velocity": { |
| 106 | + "total_completed": 87, |
| 107 | + "average_per_day": 2.9, |
| 108 | + "peak_day": "2025-12-15", |
| 109 | + "peak_count": 32 |
| 110 | + }, |
| 111 | + "timeline": [ |
| 112 | + {"date": "2025-12-15", "count": 32}, |
| 113 | + {"date": "2025-12-14", "count": 5}, |
| 114 | + ... |
| 115 | + ], |
| 116 | + "phases": { |
| 117 | + "core": 51, |
| 118 | + "polish": 21, |
| 119 | + "setup": 8 |
| 120 | + }, |
| 121 | + "labels": { |
| 122 | + "consensus-framework": 38, |
| 123 | + "backup-system": 12, |
| 124 | + "cli": 8 |
| 125 | + } |
| 126 | +} |
| 127 | +``` |
| 128 | + |
| 129 | +## Use Cases |
| 130 | + |
| 131 | +### Sprint Retrospective |
| 132 | + |
| 133 | +```bash |
| 134 | +# Get completion stats for a 2-week sprint |
| 135 | +claude-todo history --since 2025-12-01 --until 2025-12-14 --format json |
| 136 | +``` |
| 137 | + |
| 138 | +### Productivity Analysis |
| 139 | + |
| 140 | +```bash |
| 141 | +# Analyze completion patterns over the last month |
| 142 | +claude-todo history --days 30 |
| 143 | +``` |
| 144 | + |
| 145 | +### CI/CD Integration |
| 146 | + |
| 147 | +```bash |
| 148 | +# Export completion metrics for reporting |
| 149 | +claude-todo history --format json | jq '.velocity' |
| 150 | +``` |
| 151 | + |
| 152 | +## Related Commands |
| 153 | + |
| 154 | +- `dash` - Project dashboard with current status |
| 155 | +- `stats` - Overall task statistics |
| 156 | +- `phases` - Phase management and progress |
| 157 | +- `labels` - Label analytics |
| 158 | + |
| 159 | +## See Also |
| 160 | + |
| 161 | +- [Dashboard Command](dash.md) - Real-time project overview |
| 162 | +- [Stats Command](../reference/stats.md) - Task statistics |
0 commit comments