Autonomous Intelligence Layer
lean-ctx now runs its optimization pipeline autonomously — no manual tool calls needed. The system self-configures, pre-loads context, deduplicates files, and provides efficiency hints without the user or AI agent triggering anything explicitly. All features enabled by default.
Added
- Session Lifecycle Manager — Auto-triggers ctx_overview or ctx_preload on first MCP tool call
- Related Files Hints — [related: ...] hints after every ctx_read based on import graph
- Silent Background Preload — Top-2 imported files auto-cached after ctx_read
- Auto-Dedup — ctx_dedup runs automatically at 8+ cached files (measured: -89.5%)
- Task Propagation — Session task flows to all ctx_read / ctx_multi_read calls
- Shell Efficiency Hints — Suggests token-efficient MCP alternatives for grep, cat, find
- AutonomyConfig — Per-feature toggles + LEAN_CTX_AUTONOMY=false env var
- PHP/Laravel Support — Full PHP AST, Laravel compression (Eloquent, Controllers, Migrations, Blade), php artisan / pest shell patterns
- 15 new autonomy integration tests, 13 new PHP/Laravel tests
Changed
- System prompt: compact AUTONOMY block replaces verbose PROACTIVE + OTHER TOOLS (~20 tok saved)
- ctx_multi_read propagates session task
Fixed
- --version uses env!("CARGO_PKG_VERSION") (no more hardcoded strings)
Performance
- Net savings: ~1,739 tokens/session from autonomy features
- Pre-hook: 10 tok (1x) | Hints: ~10 tok/read | Auto-dedup: ~750 tok | Silent preload: ~974 tok
Full changelog: https://github.com/yvgude/lean-ctx/blob/main/CHANGELOG.md
Full Changelog: v2.14.0...v2.14.1