Innovation Engine — productivity

Hook Pipeline Smoke Test

April 13, 2026

A cron job that exercises your Claude Code hook pipeline (context-inject.js, tdd-prompt-inject.sh, stop-test-guard.sh) every hour with synthetic inputs and verifies they produce valid output. You've spent at least 4 recent sessions discovering broken hooks mid-conversation — this catches regressions proactively via notify-focus instead of wasting session context on diagnosis.

claude-code-hooksnotify-focussystem-heartbeatcron

Create ~/bin/hook-smoke-test as a ~80-line bash script. For each hook in ~/.claude/hooks/, invoke it with a minimal synthetic payload (a fake prompt JSON for UserPromptSubmit hooks, a fake tool-call JSON for PreToolUse/PostToolUse hooks) and assert: (1) exit code 0, (2) output is valid JSON where expected, (3) context-inject.js emits at least one rule for a known project dir. On any failure, call notify-focus with the hook name and failure reason. On success, touch ~/.cache/hook-smoke-test/last-ok. Add a cron entry: 0 * * * * ~/bin/hook-smoke-test. Add a system-heartbeat-collect integration that includes hook health status (last-ok age) in the daily digest. The smoke test payloads live in ~/.claude/hook-test-fixtures/ as 3-4 small JSON files representing common prompt types (coding, discussion, planning).

Needs Review
Build timed out after 5 minutes
Active Projects
innovation-engine, note-ocr, russ-telegram, bys-website, .claude
Category
productivity