src/orchestrator/skills/memory-merger/SKILL.md
Reviews mature LESSONS-LEARNED.md entries, rewrites them as permanent rules in skill/instruction files, archives graduated lessons. Use when graduating lessons into skills, promoting validated lessons, updating skills from past learnings, archiving mature lessons, codifying repeated patterns, or cleaning up a crowded LESSONS-LEARNED.md.
npx skillsauth add monkilabs/opencastle memory-mergerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Combined signals to identify merge candidates.
| Criterion | Signal / Threshold |
|-----------|--------------------|
| File size | LESSONS-LEARNED.md > 50 entries |
| Citation count | Cited 3+ times across sessions |
| Age | >60 days and still relevant |
| Category cluster | 5+ lessons in same category |
| Severity | Marked high or blocking |
| Discretionary | Curator / maintainer judgement (stale file) |
Lesson: LES-XXX — [title]
Target: [file path]
Section: [section name]
Edit: [exact text]
Strategies: add rule, add anti-pattern, add code example, expand existing rule, add table row.
Edit target file; add <!-- Merged from LES-XXX --> attribution inline.
Move merged lessons to ## Archived (Merged) at the bottom of LESSONS-LEARNED.md:
### LES-XXX: [title] → Merged to `[target]` on YYYY-MM-DD
Never delete lessons — archive for traceability.
Update ## Index by Category in LESSONS-LEARNED.md to mark archived lessons.
Source lesson (cited 4×, severity high, 90 days old):
LES-042: MCP tool timeout causes silent failures — set explicit timeout, check return value
Draft:
Lesson: LES-042 — MCP tool timeout
Target: src/orchestrator/skills/orchestration-protocols/SKILL.md
Section: Error Recovery Playbook
Edit: Add row: | **MCP timeout** | Tool returns null/undefined after delay | Set explicit timeout (30s); check return value; retry once; fall back to CLI; log to DLQ | <!-- Merged from LES-042 -->
Archive in LESSONS-LEARNED.md:
### LES-042: MCP tool timeout → Merged to `src/orchestrator/skills/orchestration-protocols/SKILL.md` on 2026-05-18
# Find lessons cited 3+ times across sessions
rg -c "LES-[0-9]+" .opencastle/logs/events.ndjson | awk -F: '$2 >= 3 {print $1}'
# Find lessons referenced in recent retries
rg "retry.*LES-[0-9]+" .opencastle/logs/events.ndjson | rg -o "LES-[0-9]+" | sort | uniq -c | sort -rn | head -20
development
Defines 10 sequential validation gates: secret scanning, lint/test/build checks, blast radius analysis, dependency auditing, browser testing, cache management, regression checks, smoke tests. Use when running pre-deploy validation or CI checks, CI/CD pipelines, deployment pipeline validation, pre-merge checks, continuous integration, or pull request validation.
development
Generates test plans, writes unit/integration/E2E test files, identifies coverage gaps, flags common testing anti-patterns. Use when writing tests, creating test suites, planning test strategies, mocking dependencies, measuring code coverage, or test planning.
development
Provides model routing rules, validates delegation prerequisites, supplies cost tracking templates, defines dead-letter queue formats for Team Lead orchestration. Load when assigning tasks to agents, choosing model tiers, starting delegation session, running multi-agent workflow, delegating work, choosing which model to use, or assigning tasks.
testing
Saves, restores session state including task progress, file changes, delegation history. Use when saving progress, resuming interrupted work, picking up where you left off, or checkpointing current work.