ECC/tests/hooks
Affaan Mustafa 0b0b66c02f
feat: agent compression, inspection logic, governance hooks (#491, #485, #482) (#688)
Implements three roadmap features:

- Agent description compression (#491): New `agent-compress` module with
  catalog/summary/full compression modes and lazy-loading. Reduces ~26k
  token agent descriptions to ~2-3k catalog entries for context efficiency.

- Inspection logic (#485): New `inspection` module that detects recurring
  failure patterns in skill_runs. Groups by skill + normalized failure
  reason, generates structured reports with suggested remediation actions.
  Configurable threshold (default: 3 failures).

- Governance event capture hook (#482): PreToolUse/PostToolUse hook that
  detects secrets, policy violations, approval-required commands, and
  elevated privilege usage. Gated behind ECC_GOVERNANCE_CAPTURE=1 flag.
  Writes to governance_events table via JSON-line stderr output.

59 new tests (16 + 16 + 27), all passing.
2026-03-20 01:38:13 -07:00
..
auto-tmux-dev.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
check-hook-enabled.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
cost-tracker.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
detect-project-worktree.test.js fix(clv2): use -e instead of -d for .git check in detect-project.sh 2026-03-20 16:02:10 +09:00
doc-file-warning.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
evaluate-session.test.js fix: remove unused execFileSync import (no-unused-vars ESLint) 2026-02-18 07:15:53 +05:30
governance-capture.test.js feat: agent compression, inspection logic, governance hooks (#491, #485, #482) (#688) 2026-03-20 01:38:13 -07:00
hook-flags.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
hooks.test.js Add PowerShell installer wrapper and update documentation (#532) 2026-03-16 13:35:17 -07:00
observer-memory.test.js fix(clv2): add --allowedTools to observer Haiku invocation (#661) 2026-03-20 16:00:17 +09:00
post-bash-hooks.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
pre-bash-dev-server-block.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
pre-bash-reminders.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
quality-gate.test.js feat: add C++ language support and hook tests (#539) 2026-03-16 14:31:49 -07:00
suggest-compact.test.js Fix ESLint errors in test files and package-manager.js 2026-02-18 07:04:29 +00:00