| name | compound-learnings |
| description | Extract patterns from git history and session files, recommend artifacts (skill/rule/hook/agent) based on frequency thresholds |
| allowed-tools | Bash Read Glob Grep |
Compound Learnings
Transform recurring patterns into durable artifacts. Use frequency-based thresholds to distinguish noise from signal.
Data Sources
Scan these locations for patterns:
| Source | Command/Path | What to Extract |
|---|
| Git commits | git log --oneline -100 | Repeated fix types, refactor patterns |
| Git commit bodies | git log -50 --format="%B---" | Lessons in commit descriptions |
| PR descriptions | gh pr list --state merged -L 20 | Decisions, learnings |
| Handoffs | $MAIN_WORKTREE/.agents/handoffs/*.md | Patterns, What Worked/Failed |
| Key Learnings | CLAUDE.md (Key Learnings section) | Existing encoded patterns |
Note: Session ledger (.agents/session_ledger.md) is for Skill("reflect") only - ephemeral per-session state.
Pattern Extraction
Step 1: Gather Raw Patterns
git --oneline -100 | -d -f2- | | -c | -rn
grep -h .agents/handoffs/*.md 2>/dev/null | | -c | -rn