Report spaced-repetition statistics: total facts, overdue count, retention rate, active decks, and facts added this week. Use when the user says "stats", "estatísticas", "como está meu aprendizado", "/learn-stats", or wants a dashboard of their learning loop.
Reads workspace/learning/facts/ and workspace/learning/.state/review-log.jsonl to produce a markdown stats report.
User wants a snapshot of their learning loop health.
.md files in workspace/learning/facts/total = count of all fact filesoverdue = count where next_review <= todayactive_decks = count of unique deck values across all factsadded_this_week = count where created >= today - 7 daysIf workspace/learning/facts/ does not exist or is empty:
"Nenhum fato encontrado. Use /learn-capture para adicionar fatos primeiro." Stop here.
workspace/learning/.state/review-log.jsonl line by line (each line is a JSON object)total_reviews = 0, retention_rate = "N/A"total_reviews = count of all log entriesgood_easy_count = count where grade == "good" OR grade == "easy"retention_rate = round(good_easy_count / total_reviews * 100)%Print in markdown, in pt-BR:
## 📊 Learning Loop — Stats
| Métrica | Valor |
|---------------------|--------------|
| Total de fatos | {total} |
| Vencidos hoje | {overdue} |
| Taxa de retenção | {retention_rate} ({good_easy_count}/{total_reviews} revisões) |
| Decks ativos | {active_decks} |
| Adicionados (7 dias)| {added_this_week} |
**Data:** {today YYYY-MM-DD}
If overdue > 0:
💡 Use
/learn-reviewpara revisar os fatos vencidos.
If total < 10:
💡 Use
/learn-capturepara adicionar mais fatos (meta v0: 20 fatos em 2 semanas).
If overdue > 0 and overdue <= 10, list them:
### Fatos vencidos
- `{filename}` (deck: {deck}, venceu: {next_review})
> {Retrieval Q — first 80 chars}
N/A for retention — do not error.