coverage-reportlisted
Install: claude install-skill parisgroup-ai/imersao-ia-setup
# coverage-report
Generate comprehensive coverage reports with historical data and trend analysis.
## Commands
```bash
/coverage-report # Current + 7-day trend
/coverage-report --full # Full report with all gaps
/coverage-report --compare # Compare branch vs main
/coverage-report --trend 30 # 30-day trend analysis
```
## Execution Flow
### 1. Load History
```bash
cat .coverage-history/snapshots.jsonl
```
Parse all snapshots into array for analysis. Each line is a JSON object.
### 2. Calculate Current State
From latest snapshot (last line):
```bash
tail -1 .coverage-history/snapshots.jsonl | jq .
```
Extract:
- Vitest: lines, branches, functions
- Playwright: routes covered / total
- pytest: lines, branches
### 3. Calculate Trends
**7-day trend (default):**
```bash
# Get snapshot from 7 days ago
WEEK_AGO=$(date -v-7d +%Y-%m-%d)
grep "\"ts\":\"$WEEK_AGO" .coverage-history/snapshots.jsonl | tail -1
```
**30-day trend (with --trend 30):**
```bash
MONTH_AGO=$(date -v-30d +%Y-%m-%d)
grep "\"ts\":\"$MONTH_AGO" .coverage-history/snapshots.jsonl | tail -1
```
**Trend indicators:**
| Delta | Indicator |
|-------|-----------|
| > +0.5% | ↑ (improving) |
| -0.5% to +0.5% | → (stable) |
| < -0.5% | ↓ (declining) |
### 4. Load Critical Gaps History
```bash
cat .coverage-history/critical-gaps.jsonl
```
Track persistence:
- **New:** First seen in current snapshot
- **Persistent:** Seen in multiple snapshots (calculate days)
- **Resolved:** Was in hist