Repository navigation
v2.4.0
Diff-scoped checking, session pattern detection, contextual echo hints.
New features
-
Diff-scoped checking -- PostToolUse mode now only reports echoes on lines the agent actually changed. Edit tool diffs are computed from the
old_string/new_stringin the hook input JSON. Write tool treats all content as agent-written. Pre-existing code patterns are silently baselined. Stop mode continues full-file checks for comprehensive coverage. -
Session pattern detection -- When the same check fires on 3+ distinct files in a session, ecko emits a behavioral directive:
~~ ecko ~~ pattern: 'bare-except' flagged in 3 files this session -- use explicit exception types. Configurable viapattern_threshold(default 3, 0 to disable). Uses existing session ledger data. -
Contextual echo hints -- Echo messages now include file-type-aware suggestions. Unused imports in
__init__.pyget re-export hints. Test files get fixture hints. Each check has a tailored explanation. Hints appear in both compact text output (check (L1, L2) -- hint) and JSON output.
Config changes
- New field:
pattern_threshold(default: 3) -- number of distinct files before session pattern directive fires. Set to 0 to disable.
Tests
- 376 Rust unit tests (~1s) + 72 validation fixtures.
Full Changelog: v2.3.0...v2.4.0