v3.6.6
Added
- ABC-Inspired Agent Hardening — 5-phase enforcement inspired by the Agentic Brownfield Coding project:
- Bypass Hints — Detects when agents use native Read/Grep instead of lean-ctx tools and emits a single-line reminder with cooldown logic. Configurable via
bypass_hintsconfig key orLEAN_CTX_BYPASS_HINTSenv var (modes:gentle,firm,off). - Tool Description Enhancement — All core tool descriptions now explicitly state "replaces native X" to guide AI agents directly from the MCP schema.
- Rules Deduplication — Removed redundant tool mapping tables from injected rules. Tool descriptions now carry the mapping, rules focus on mode selection, anti-patterns, and editing workflow.
lean-ctx hardenCLI — Activates strict enforcement mode (LEAN_CTX_HARDEN=1in MCP configs). Optionally denies Bash in Claude Code'spermissions.deny.lean-ctx export-rulesCLI — Exports high-confidence knowledge facts as editor-native rules (MDC for Cursor,AGENTS.md,CLAUDE.md).
- Bypass Hints — Detects when agents use native Read/Grep instead of lean-ctx tools and emits a single-line reminder with cooldown logic. Configurable via
Fixed
git status --porcelaintruncation — Shell compression no longer truncatesgit statusoutput when it doesn't match specific section parsing (e.g.--porcelain,--shortflags). Developers now always see full status information.init --agentrules injection — Global rules and skill file are now correctly injected. Fixed data dir split causing emptygainfield in responses. (#238, #239)- Integration test alignment —
rules_consistencyandrules_injecttests updated to match new deduplicated rule content.
Upgrade
lean-ctx update # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxNote: After upgrading via cargo/npm/brew, run
lean-ctx setupto refresh shell aliases.lean-ctx updatedoes this automatically.
Full Changelog: v3.6.6...v3.6.6