rn-agent-compact
Run the compaction cycle for the Experience Engine. Scans telemetry, generates candidates from failure patterns, auto-promotes verified recoveries, and decays stale heuristics.
/rn-dev-agent:rn-agent-compactWhat Happens
Section titled “What Happens”- Scan all telemetry JSONL files in
~/.claude/rn-agent/telemetry/ - Group failures by tool + normalized error signature
- Generate candidates for patterns seen 3+ times with 67%+ recovery success
- Auto-promote ghost recovery shortcuts to
~/.claude/rn-agent/experience.md - Write candidates for human review to
~/.claude/rn-agent/candidates/ - Decay stale heuristics not triggered in 20+ runs (-20% confidence)
- Remove dead heuristics below 30% confidence
Promotion Rules
Section titled “Promotion Rules”| Destination | Gate | Criteria |
|---|---|---|
experience.md | Auto | Ghost recovery with 67%+ success rate over 3+ occurrences |
candidates/*.md | Human review | All other patterns |
Project .rn-agent-experience.md | Manual | User copies from candidates after review |
Output
Section titled “Output”Reports a summary table with telemetry files scanned, events processed, failure groups found, candidates generated, auto-promoted count, heuristics decayed/removed, and token usage.
When to Run
Section titled “When to Run”- After completing 5-10
rn-feature-devsessions - When
~/.claude/rn-agent/telemetry/grows large - Before sharing project experience
- Weekly or biweekly maintenance