mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-17 21:42:11 +00:00
Address bot review on the Stop delivery path: the stop:evaluate-session registration no longer carries async (an async Stop registration cannot block), so delivery is synchronous, and the metadata fingerprint for the changed entry is regenerated with the repo's own function; the delivery marker is now claimed atomically with exclusive create and any write failure fails closed instead of delivering without once-per-session protection; the skill doc now marks the shell entry as counting-only, requires the JavaScript evaluator through the plugin hooks for delivery, and clarifies that Stop fires whenever Claude finishes responding; test spawn helpers no longer coerce a failed spawn to exit 0. Test plan: - tests/hooks/evaluate-session.test.js: 25 passed, 0 failed (2 new: marker write failure skips delivery, registration is synchronous); pristine comparison: 22 passed, 3 failed (delivery, marker, registration) - tests/hooks/hooks.test.js: 260 passed - tests/hooks/stop-hooks-stdout.test.js: 48 passed - tests/hooks/cursor-hook-dispatchers.test.js: 27 passed - tests/integration/hooks.test.js: 27 passed - scripts/ci/check-unicode-safety.js: passed
157 lines
5.8 KiB
JSON
157 lines
5.8 KiB
JSON
{
|
|
"$schema": "../schemas/hooks-metadata.schema.json",
|
|
"entries": {
|
|
"PreToolUse": [
|
|
{
|
|
"id": "pre:bash:dispatcher",
|
|
"description": "Consolidated Bash preflight dispatcher for quality, tmux, push, and GateGuard checks",
|
|
"fingerprint": "73f5c1a01074"
|
|
},
|
|
{
|
|
"id": "pre:powershell:gateguard-fact-force",
|
|
"description": "PowerShell fact-forcing gate: inspect destructive commands without running unrelated Bash-only preflight hooks",
|
|
"fingerprint": "46a805223053"
|
|
},
|
|
{
|
|
"id": "pre:write:doc-file-warning",
|
|
"description": "Doc file warning: warn about non-standard documentation files (exit code 0; warns only)",
|
|
"fingerprint": "7b414e2f33ce"
|
|
},
|
|
{
|
|
"id": "pre:edit-write:suggest-compact",
|
|
"description": "Suggest manual compaction at logical intervals",
|
|
"fingerprint": "c5221aa445cc"
|
|
},
|
|
{
|
|
"id": "pre:observe:continuous-learning",
|
|
"description": "Capture tool use observations for continuous learning",
|
|
"fingerprint": "a77d63149961"
|
|
},
|
|
{
|
|
"id": "pre:governance-capture",
|
|
"description": "Capture governance events (secrets, policy violations, approval requests). Enable with ECC_GOVERNANCE_CAPTURE=1",
|
|
"fingerprint": "5ccfc381eb8a"
|
|
},
|
|
{
|
|
"id": "pre:config-protection",
|
|
"description": "Block modifications to linter/formatter config files. Steers agent to fix code instead of weakening configs.",
|
|
"fingerprint": "b75c69a065b7"
|
|
},
|
|
{
|
|
"id": "pre:mcp-health-check",
|
|
"description": "Check MCP server health before MCP tool execution and block unhealthy MCP calls",
|
|
"fingerprint": "773a20e88ec8"
|
|
},
|
|
{
|
|
"id": "pre:edit-write:gateguard-fact-force",
|
|
"description": "Fact-forcing gate: deny the first Edit/Write/MultiEdit/NotebookEdit of each file with questions chosen by target class and by what the change touches; a completed search naming the file in the current turn, a comment or whitespace-only edit, or a same-turn sibling of a new file already gated passes with a note instead; sensitive targets (secrets, keys, auth/payment code, migrations, CI workflows) and hard-linked files are always gated, also in subagents",
|
|
"fingerprint": "4778e39c56cf"
|
|
},
|
|
{
|
|
"id": "pre:hookify-runtime",
|
|
"description": "Evaluate project-local Hookify rules before Bash, PowerShell, and file tools run",
|
|
"fingerprint": "3577a44df932"
|
|
}
|
|
],
|
|
"UserPromptSubmit": [
|
|
{
|
|
"id": "prompt:hookify-runtime",
|
|
"description": "Evaluate project-local Hookify prompt rules before a user prompt is processed",
|
|
"fingerprint": "e59b2f099bf7"
|
|
}
|
|
],
|
|
"PreCompact": [
|
|
{
|
|
"id": "pre:compact",
|
|
"description": "Save state before context compaction",
|
|
"fingerprint": "28991284118e"
|
|
}
|
|
],
|
|
"SessionStart": [
|
|
{
|
|
"id": "session:start",
|
|
"description": "Load previous context and detect package manager on new session",
|
|
"fingerprint": "e4e7c9f975d2"
|
|
},
|
|
{
|
|
"id": "session-start:plan-canvas-sessions",
|
|
"description": "Surface open Plan Canvas review sessions so a fresh session can resume the loop",
|
|
"fingerprint": "1c23f955ee8b"
|
|
}
|
|
],
|
|
"PostToolUse": [
|
|
{
|
|
"id": "post:dispatcher:sync",
|
|
"description": "Run synchronous PostToolUse hooks in one process while preserving per-hook controls",
|
|
"fingerprint": "ca419a145e5b"
|
|
},
|
|
{
|
|
"id": "post:dispatcher:async",
|
|
"description": "Run background PostToolUse hooks in one process while preserving per-hook controls",
|
|
"fingerprint": "c494e10d87ed"
|
|
}
|
|
],
|
|
"PostToolUseFailure": [
|
|
{
|
|
"id": "post:mcp-health-check",
|
|
"description": "Track failed MCP tool calls, mark unhealthy servers, and attempt reconnect",
|
|
"fingerprint": "42692c6b8819"
|
|
},
|
|
{
|
|
"id": "post:skill:track",
|
|
"description": "Record hard Skill tool failures for skill-health telemetry",
|
|
"fingerprint": "db25a82289aa"
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"id": "stop:hookify-runtime",
|
|
"description": "Evaluate project-local Hookify completion rules before Claude stops",
|
|
"fingerprint": "7b319512edb9"
|
|
},
|
|
{
|
|
"id": "stop:plan-canvas-pending",
|
|
"description": "Deliver undelivered Plan Canvas browser feedback before the agent stops",
|
|
"fingerprint": "6f634558e137"
|
|
},
|
|
{
|
|
"id": "stop:format-typecheck",
|
|
"description": "Batch format (Biome/Prettier) and typecheck (tsc) all JS/TS files edited this response — runs once at Stop instead of after every Edit",
|
|
"fingerprint": "243bd81ff17a"
|
|
},
|
|
{
|
|
"id": "stop:check-console-log",
|
|
"description": "Check for console.log in modified files after each response",
|
|
"fingerprint": "8211fdea0cdd"
|
|
},
|
|
{
|
|
"id": "stop:session-end",
|
|
"description": "Persist session state after each response (Stop carries transcript_path)",
|
|
"fingerprint": "bb1cddf9932b"
|
|
},
|
|
{
|
|
"id": "stop:evaluate-session",
|
|
"description": "Evaluate session for extractable patterns",
|
|
"fingerprint": "1c3322c0f2a2"
|
|
},
|
|
{
|
|
"id": "stop:cost-tracker",
|
|
"description": "Track token and cost metrics per session",
|
|
"fingerprint": "c6b1c1c6e9e3"
|
|
},
|
|
{
|
|
"id": "stop:desktop-notify",
|
|
"description": "Send desktop notification (macOS/WSL) with task summary when Claude responds",
|
|
"fingerprint": "23030441f3f5"
|
|
}
|
|
],
|
|
"SessionEnd": [
|
|
{
|
|
"id": "session:end:marker",
|
|
"description": "Session end lifecycle marker (non-blocking)",
|
|
"fingerprint": "a991d34f4d89"
|
|
}
|
|
]
|
|
}
|
|
}
|