Lev Self-Improvement

SkillAI & models

[WHAT] Self-improvement system transforming event streams into actionable system improvements [HOW] Analyze events.jsonl for patterns, generate proposals with confidence scores, human-approve, apply to skills/config/daemons [WHEN] Use when asking what lev can learn, proposing improvements, or conducting fail-forward root cause analysis [WHY] Enables proactive system evolution based on observed failures and patterns instead of reactive fixes

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the Lev Self-Improvement skill

What this skill tells your AI

The instructions your AI receives, as published by lev-os/agents in skills-db/.archive/lev-self/SKILL.md and read by ahel’s review.

Transform event streams into actionable system improvements. Proactive learning (not just reactive fixes).

Quick Reference

TriggerAction
"what can lev learn?"Full analysis cycle
"propose improvements"Generate proposals from patterns
"why did X fail?"Root cause analysis (fail-forward)
"self-learn"Automated improvement cycle

Architecture

events.jsonl → Analyze → Patterns → Proposals → Human Review → Apply
                 ↑                                              │
                 └──────────── feedback loop ──────────────────┘

Core Workflows

1. Event Analysis

lev learn analyze              # Detect patterns in events.jsonl
lev learn analyze --since 24h  # Last 24 hours only

See: references/event-analysis.md

2. Fail-Forward Protocol

When something fails, extract learning:

  1. Capture: What happened? (exact error, context)
  2. Root Cause: Why? (5 whys, dependencies)
  3. Proposal: How to prevent? (skill patch, config change)
  4. Confidence: How sure? (low/medium/high)

See: references/fail-forward.md

3. Proposal Workflow

# ~/.config/lev/proposals/{id}.yaml
id: prop-abc123
type: skill-patch | config-change | new-workflow
target: ~/.claude/skills/lev/SKILL.md
confidence: 0.85
description: "Add timeout handling"
diff: |
  + timeout: 30s
status: pending | approved | rejected | applied

See: references/proposals.md

Evolution Targets

TargetLocationWhen
Skills~/.claude/skills/*/SKILL.mdBehavior improvements
Config~/lev/.lev/config.yamlSettings optimization
Daemons~/.config/lev/daemons.yamlProcess tuning
Workflows~/lev/workflows/*.yamlPattern codification

Relationship to Other Skills

  • skill-evolver (absorbed): Reactive skill fixes
  • lev (sibling): Behavior definition (lev-self improves it)
  • bd (integration): Track proposals as issues

Storage Schema

~/.config/lev/
├── proposals/           # Pending proposals
│   └── {id}.yaml
├── memory/
│   ├── patterns.jsonl   # Detected patterns
│   ├── proposals.jsonl  # Proposal history
│   └── applied.jsonl    # Applied changes + outcomes
└── patterns.jsonl       # Active patterns for matching

Confidence Thresholds

ConfidenceAction
≥90%Auto-apply (after notification)
70-89%Propose with recommendation
50-69%Propose, request review
<50%Log only, don't propose

See: references/tracking-schema.md

CLI Quick Reference

# Analysis
lev learn analyze             # Full event analysis
lev learn patterns            # Show detected patterns

# Proposals
lev learn propose             # Generate proposals from patterns
lev learn review              # Interactive proposal review
lev learn apply <id>          # Apply approved proposal

# Tracking
lev learn status              # Show pending proposals
lev learn history             # Show applied changes

Human-in-the-Loop

All changes require confirmation:

  1. Proposal generated → notification
  2. Human reviews diff
  3. Approve/reject/modify
  4. Applied changes logged with outcome

Rollback:

lev learn rollback <id>       # Revert applied proposal

For detailed schemas and protocols, see references/

Signals

GitHub stars
22
Forks
2
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
lev-self
Source
github.com/lev-os/agents