Prevent unbounded growth of system artifacts. Use when checking system health, consolidating files, or managing archives.
Help the system grow sustainably. Provide visibility into scale, suggest consolidation opportunities, and maintain awareness of growth patterns by implementing soft limits and managing archives. Never blocks, only advises.
Soft limits educate rather than frustrate. They allow justified exceptions while building awareness over time.
Self-improving systems naturally accumulate skills, error history, metrics, documentation, and archives. Without management, context windows overflow, cognitive load rises, and effectiveness decreases.
HEALTHY → APPROACHING (80%) → EXCEEDED (100%) → CRITICAL (120%)
.claude/archives/ (older than 90 days), deprecated skills, historical metrics.| Artifact | Soft Limit | Review Trigger | Critical |
|---|---|---|---|
| CLAUDE.md | 400 lines | 450 lines | 500 lines |
| quick-reference.md | 100 lines | 120 lines | 150 lines |
| procedural-memory.md | 500 lines / 250KB | 600 lines / 300KB | 750 lines |
| episodic-memory.md | 200 lines | 250 lines | 300 lines |
| Individual SKILL.md | 300 lines | 350 lines | 400 lines |
| ai-pain-points.md | 50 active | 75 active | 100 active |
| ai-error-history.json | 100 entries | 150 entries | 200 entries |
| skill-metrics.json | 500KB | 750KB | 1MB |
| Category | Soft Limit | Review Trigger | Critical |
|---|---|---|---|
| Active skills | 30 | 40 | 50 |
| Skills per category | 5 | 8 | 10 |
| Active pain points | 50 | 65 | 80 |
| Error history entries | 100 | 150 | 200 |
| Patterns in quick-ref | 20 | 25 | 30 |
| Unused skills (90 days) | 3 | 5 | — |
| Low success skills (< 60%) | 2 | 4 | — |
| Content Type | Hot | Warm | Cold (Archive) | Delete |
|---|---|---|---|---|
| Patterns | Rolling 6 months | — | Unused 6 months | Never |
| Session summaries | 30 days | — | After 30 days | After 1 year |
| Error history | 7 days | 30 days | 90 days | 1 year |
| Skill metrics | 30 days | 90 days | 1 year | 2 years |
| Resolved pain points | 30 days | 90 days | 6 months | 1 year |
| Archived skills | — | — | 6 months | 1 year |
| Improvement logs | 90 days | 1 year | 2 years | Never |
Collect current state of all monitored artifacts:
# Count lines in key files
wc -l .claude/CLAUDE.md
wc -l .claude/memory/active/quick-reference.md
wc -l .claude/memory/active/procedural-memory.md
wc -l .claude/memory/active/episodic-memory.md
# Count skills
find .claude/skills -name "SKILL.md" | wc -l
# Count active pain points
grep -c "^### " .claude/pain-points/active-pain-points.md
# Count error history entries
python3 -c "import json; print(len(json.load(open('.claude/pain-points/ai-error-history.json')).get('errors', {})))"
For each metric, determine status:
Present findings in clear format:
## System Health Report - YYYY-MM-DD
### Summary
- Overall Status: [Healthy / Needs Attention / Action Required]
- Items Approaching Limits: N
- Items Exceeding Limits: N
### Detailed Metrics
| Artifact | Current | Limit | Status |
|----------|---------|-------|--------|
| CLAUDE.md | 385 lines | 400 | Approaching (96%) |
| Skills | 28 | 30 | Approaching (93%) |
| Pain Points | 42 | 50 | Healthy (84%) |
### Recommended Actions
1. [Specific action for exceeded items]
2. [Specific action for approaching items]
For items needing attention:
For CLAUDE.md bloat:
.claude/specs/ or linked docsFor skill bloat:
For memory bloat:
For pain point bloat:
Only after user approval:
Identify skills that should be merged.
Consolidation Criteria:
Consolidation Process:
Output: Per-candidate block listing overlap %, combined invocations, and recommendation (MERGE / KEEP SEPARATE / DEPRECATE). See Example 3 below for the full shape.
# Pseudo-logic for error history pruning
for fingerprint in error_history:
if fingerprint.last_seen > 90_days_ago:
if fingerprint.resolved:
move_to_archive(fingerprint)
else:
keep_but_flag_stale(fingerprint)
if fingerprint.last_seen > 1_year_ago:
delete(fingerprint)
if fingerprint.count == 1 and fingerprint.age > 30_days:
delete(fingerprint) # One-off errors, not patterns
CLAUDE.md Maintenance:
Pattern:
# Before (bloated)
**[SPEC-001]** Long detailed explanation of feature A with
multiple lines of context and examples that could be in a
separate document...
# After (lean)
**[SPEC-001]** Feature A: [one-line summary] → See `docs/feature-a.md`
.claude/archives/YYYY-MM-[type].mdArchive file format: Header with metadata (date, source, item count, reason), then each archived item with full original content preserved plus its original location and archive reason.
Three levels keep cognitive load low:
**[SPEC-001]** Detect-Decide-Act on every tool failure → .claude/skills/error-learner/Rule: No more than 20 active items in any tracking document.
When limit approached:
CREATED → ACTIVE → DEPRECATED → ARCHIVED → DELETE, with Any → MERGED available during consolidation.
Note: These are suggestions, not blocks. The system warns and recommends but doesn't prevent growth.
| Trigger | Action |
|---|---|
| CLAUDE.md > 400 lines | Gentle reminder to consider refactoring |
| CLAUDE.md > 450 lines | Suggest moving content to linked docs |
| Skills > 30 | Suggest quarterly consolidation review |
| Skills > 40 | Recommend consolidation review this week |
| Error history > 100 | Suggest pruning oldest resolved entries |
| Error history > 150 | Auto-archive entries > 90 days old |
| Pain points > 50 active | Suggest prioritization review |
| Any skill 0 invocations in 90 days | Flag for review (keep if intentional) |
| Any skill < 60% success rate | Prioritize for skill-improver attention |
Condition: Weekly check lands on a holiday Handling: Run check on next working day, note delay in report
Condition: Several artifacts exceed critical thresholds Handling: Prioritize by impact — CLAUDE.md > skills > memory > pain points
Condition: Project is new, most metrics near zero Handling: Skip check, note "healthy — early stage project"
Condition: Archive target doesn't exist Handling: Create archive structure before moving files
Trigger: Weekly Monday check Response: One-paragraph "all artifacts within limits, no action required" plus the metrics table from Step 3. Note next scheduled check date.
Trigger: User says "check for bloat" Response:
## System Health Report - 2026-01-16
Overall Status: **Action Required** — 2 items exceeding limits, 1 approaching.
| Artifact | Current | Limit | Status |
|----------|---------|-------|--------|
| CLAUDE.md | 456 lines | 400 | **Exceeded (114%)** |
| Skills | 35 | 30 | **Exceeded (117%)** |
| Pain Points | 45 | 50 | Approaching (90%) |
### Recommended Actions
1. **CLAUDE.md (High):** Move deployment specs (lines 180–250) to `.claude/specs/deployment.md`; archive deprecated 2025 rules (lines 312–340). Expected reduction: ~100 lines.
2. **Skills (High):** Merge `data-validator` + `input-checker`; archive `legacy-formatter` (0 invocations in 60 days). Expected reduction: 5 skills.
3. **Pain Points (Medium):** Review 12 pain points older than 30 days; 5 appear resolved but not archived.
Shall I proceed?
## Skill Consolidation Review - 2026-01-31
**MERGE RECOMMENDED**
- `error-learner` + `skill-improver` — Trigger overlap 35%, sequential pattern 78%.
Recommendation: **Keep separate** — distinct responsibilities (detection vs improvement); overlap is intentional pipeline stages.
**DEPRECATE RECOMMENDED**
- `legacy-data-checker` — last invoked 112 days ago, absorbed by data-pipeline skill. Action: move to deprecated, archive in 30 days.
| Frequency | Task |
|---|---|
| Weekly (Monday) | Size check, error history prune |
| Monthly (1st) | Skill consolidation review, archive cycle |
| Quarterly | Documentation consolidation, full audit |
| Yearly | Deep archive review, permanent deletions |
When adding new content, first ask: "Can this be merged with existing content?"
The system should remain understandable. If it takes more than 5 minutes to explain the skill ecosystem, it's too complex.
Limits should evolve. If 30 skills is consistently too few, the real problem may be skill granularity, not the limit.
Version: 1.1.0 Created: 2025-12-31 Last Updated: 2026-05-08 (consolidation merge — absorbed playmakers fork) Category: System Maintenance & Governance Integration: Memory System, Pain Points, Skill Metrics, Skill Builder, Skill Improver, Error Learner Schedule: Weekly checks, Monthly reviews, Quarterly audits