refactor(hooks)!: remove 4 low-value hooks (P2.1) - #67
Merged
Conversation
klpanagi
force-pushed
the
refactor/p2.1-trim-hooks
branch
from
September 8, 2026 17:17
74c1c53 to
544d829
Compare
BREAKING CHANGE: disabled_hooks entries for grep-output-truncator, question-label-truncator, mcp-startup-notification, directory-readme-injector now fail Zod validation. Remove them from matrixx.jsonc. - HookNameSchema 65→61 (ghost + 3 low-value) - Delete question-label-truncator (PreToolUse hot path), mcp-startup-notification (startup toast), directory-readme-injector (duplicate README injection, FS access storm) — 223 LOC src + 470 LOC tests - Clean wiring in create-session-hooks, create-tool-guard-hooks, tool-execute-before/after, event, hook-mutation-classification, bench, AGENTS.md - Update docs/configurations.md, features.md, context-management.md - Regenerate assets/matrixx.schema.json via build:schema Co-authored-by: Morpheus <morpheus@matrixx>
klpanagi
force-pushed
the
refactor/p2.1-trim-hooks
branch
from
September 8, 2026 17:20
544d829 to
a19ff88
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes heaviness from the hook registry — 1 ghost schema entry + 3 low-value implementations.
BREAKING CHANGE:
disabled_hooksentries for the 4 deleted names now fail Zod validation. Remove them frommatrixx.jsonc.Changes
src/config/schema/hooks.ts): deletegrep-output-truncator(ghost, 0 LOC, already covered bytool-output-truncator'sTRUNCATABLE_TOOLS),question-label-truncator(63 LOC, PreToolUse hot path),mcp-startup-notification(37 LOC, startup toast),directory-readme-injector(122 LOC, duplicate README injection with FS access storm)src/hooks/question-label-truncator/,src/hooks/mcp-startup-notification/,src/hooks/directory-readme-injector/(6 files) + 3 test dirs (~470 LOC) — 26 files -764/+22src/hooks/index.ts(3 exports),create-session-hooks.ts(un-gated truncator + gated mcp),create-tool-guard-hooks.ts,tool-execute-before/after.ts,event.ts,hook-mutation-classification.md,tool-execute-before.bench.ts(16→14 calls),src/hooks/AGENTS.mddocs/configurations.mdenumeration 65→61,docs/features.md,docs/context-management.mdassets/matrixx.schema.jsonregenerated viabun run build:schemaRationale
Verification
bun run typecheck— 0 errorsbun run lint— 960 files, 0 errorsbun run build— 1140 modules, ESM+CLI+schema greengrep -chooks.ts → 61, orphanrgfor 4 names → 0 matches in src/testsls3 hook dirs → No such file, survivors intactFollow-up
P2.2 (context-window consolidation), P2.3 (evolution gating), P2.4 (skill consolidation), P3 remain.
manager.ts1749 LOC deferred (needs Oracle facade plan).Closes P2.1