Pattern Lifecycle

MUR v2 has a complete lifecycle system that automatically promotes, demotes, and cleans up patterns based on real usage.

Overview

                    mur evolve
                        β”‚
  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚  Draft  β”‚ ──► β”‚Emerging β”‚ ──► β”‚ Stable  β”‚ ──► β”‚ Canonical β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚               β”‚               β”‚
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    decay / demotion

Evolve

Run the lifecycle engine to evaluate all patterns:

mur evolve

This:

  1. Applies exponential decay based on tier half-lives
  2. Promotes patterns with strong feedback and usage
  3. Demotes patterns that haven't been used

Preview changes first:

mur evolve --dry-run

Emergence Detection

MUR can detect emergent patterns β€” recurring themes across sessions that you haven't explicitly captured:

mur emerge

This uses behavior fingerprinting + Jaccard clustering to find cross-session similarities. Patterns that appear in 3+ sessions (configurable) are surfaced as candidates.

# Require at least 5 sessions
mur emerge --threshold 5

# Preview without creating
mur emerge --dry-run

Garbage Collection

Remove patterns that have decayed below the quality threshold:

mur gc

Interactive by default β€” shows what would be archived and asks for confirmation:

# Auto-archive without prompting
mur gc --auto

Composition Suggestions

MUR tracks pattern co-occurrence and can suggest:

  • Composition β€” Patterns that are always used together β†’ combine into a workflow
  • Decomposition β€” Patterns that are too broad β†’ split into focused patterns
mur suggest

# Auto-create suggestions as drafts
mur suggest --create

Manual Lifecycle Controls

CommandEffect
mur pin <name>Skip decay β€” pattern persists indefinitely
mur mute <name>Skip injection β€” pattern stays but isn't used
mur boost <name>Increase importance by 0.1
mur promote <name>Move to higher tier (project/core)
mur deprecate <name>Mark as deprecated

Feedback Loop

The lifecycle is driven by feedback:

# After a helpful injection
mur feedback helpful swift-testing-macro

# After an unhelpful injection
mur feedback unhelpful old-convention

# Auto-analyze last session for contradictions
mur feedback auto

Contradiction detection works in both English and Chinese.

See Also