Files
ECC/hooks/hooks.metadata.json
T
zpearce-2814andGitHub 1ac07903ec fix(hooks): keep hooks.json within Claude Code's schema
Move stable hook metadata to a validated sidecar while preserving hook commands and installer identity. Reject moved fingerprints and duplicate IDs, and validate before updating metadata. Independent local review passed at c315271624a1fd055b992f2bff889ad2a0ff8a6b; CI run 34678210149 passed. Rollback: revert this squash commit.
2026-09-12 02:59:02 -04:00

140 lines
4.9 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": "0d30f37d2148"
},
{
"id": "pre:powershell:gateguard-fact-force",
"description": "PowerShell fact-forcing gate: inspect destructive commands without running unrelated Bash-only preflight hooks",
"fingerprint": "63877b632223"
},
{
"id": "pre:write:doc-file-warning",
"description": "Doc file warning: warn about non-standard documentation files (exit code 0; warns only)",
"fingerprint": "595406f864e2"
},
{
"id": "pre:edit-write:suggest-compact",
"description": "Suggest manual compaction at logical intervals",
"fingerprint": "d99998a8f039"
},
{
"id": "pre:observe:continuous-learning",
"description": "Capture tool use observations for continuous learning",
"fingerprint": "17f73ac2a883"
},
{
"id": "pre:governance-capture",
"description": "Capture governance events (secrets, policy violations, approval requests). Enable with ECC_GOVERNANCE_CAPTURE=1",
"fingerprint": "ffa978692652"
},
{
"id": "pre:config-protection",
"description": "Block modifications to linter/formatter config files. Steers agent to fix code instead of weakening configs.",
"fingerprint": "2b2be80bbeb3"
},
{
"id": "pre:mcp-health-check",
"description": "Check MCP server health before MCP tool execution and block unhealthy MCP calls",
"fingerprint": "922686364d01"
},
{
"id": "pre:edit-write:gateguard-fact-force",
"description": "Fact-forcing gate: block first Edit/Write/MultiEdit per file and demand investigation (importers, data schemas, user instruction) before allowing",
"fingerprint": "32c4a312b4c2"
}
],
"PreCompact": [
{
"id": "pre:compact",
"description": "Save state before context compaction",
"fingerprint": "5a4ef4aaa985"
}
],
"SessionStart": [
{
"id": "session:start",
"description": "Load previous context and detect package manager on new session",
"fingerprint": "3bbe414382a5"
},
{
"id": "session-start:plan-canvas-sessions",
"description": "Surface open Plan Canvas review sessions so a fresh session can resume the loop",
"fingerprint": "ad75ab423357"
}
],
"PostToolUse": [
{
"id": "post:dispatcher:sync",
"description": "Run synchronous PostToolUse hooks in one process while preserving per-hook controls",
"fingerprint": "cc868baab727"
},
{
"id": "post:dispatcher:async",
"description": "Run background PostToolUse hooks in one process while preserving per-hook controls",
"fingerprint": "5e256d15db44"
}
],
"PostToolUseFailure": [
{
"id": "post:mcp-health-check",
"description": "Track failed MCP tool calls, mark unhealthy servers, and attempt reconnect",
"fingerprint": "9e25549c1229"
},
{
"id": "post:skill:track",
"description": "Record hard Skill tool failures for skill-health telemetry",
"fingerprint": "a4dbe0729f30"
}
],
"Stop": [
{
"id": "stop:plan-canvas-pending",
"description": "Deliver undelivered Plan Canvas browser feedback before the agent stops",
"fingerprint": "e1a0fd79c26f"
},
{
"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": "9836d01e962e"
},
{
"id": "stop:check-console-log",
"description": "Check for console.log in modified files after each response",
"fingerprint": "235c7f182b76"
},
{
"id": "stop:session-end",
"description": "Persist session state after each response (Stop carries transcript_path)",
"fingerprint": "981212c32849"
},
{
"id": "stop:evaluate-session",
"description": "Evaluate session for extractable patterns",
"fingerprint": "d874ecf69ef7"
},
{
"id": "stop:cost-tracker",
"description": "Track token and cost metrics per session",
"fingerprint": "57d255146fc0"
},
{
"id": "stop:desktop-notify",
"description": "Send desktop notification (macOS/WSL) with task summary when Claude responds",
"fingerprint": "668cdbae027d"
}
],
"SessionEnd": [
{
"id": "session:end:marker",
"description": "Session end lifecycle marker (non-blocking)",
"fingerprint": "23a3832480e1"
}
]
}
}