tractatus/.claude
TheFlow b932ee2e2a feat: enhance hooks with metrics tracking and admin dashboard
Implements comprehensive monitoring and fixes hook execution issues.

Hook Validator Enhancements:
- Fixed stdin JSON input reading (was using argv, now reads from stdin)
- Changed exit codes from 1 to 2 for proper blocking (Claude Code spec)
- Added metrics logging to all validators (Edit and Write hooks)
- Metrics track: executions, blocks, success rates, timestamps

Admin Dashboard:
- Created /admin/hooks-dashboard.html - Real-time metrics visualization
- Shows: total executions, blocks, block rates, hook breakdown
- Displays recent blocked operations and activity feed
- Auto-refreshes every 30 seconds

API Integration:
- Created /api/admin/hooks/metrics endpoint
- Serves metrics.json to admin dashboard
- Protected by admin authentication middleware

Metrics Storage:
- Created .claude/metrics/hooks-metrics.json
- Tracks last 1000 executions, 500 blocks
- Session stats: total hooks, blocks, last updated
- Proven working: 11 hook executions logged during implementation

Bug Fix:
- Resolved "non-blocking status code 1" issue
- Hooks now properly receive tool parameters via stdin JSON
- Exit code 2 properly blocks operations per Claude Code spec

Impact:
- Framework enforcement is now observable and measurable
- Admin can monitor hook effectiveness in real-time
- Validates architectural enforcement approach

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-15 20:17:11 +13:00
..
metrics feat: enhance hooks with metrics tracking and admin dashboard 2025-10-15 20:17:11 +13:00
sessions feat: fix CSP violations & implement three audience paths 2025-10-07 12:21:00 +13:00
instruction-history.json feat: add comprehensive security vetting framework (inst_041-046) 2025-10-14 14:29:15 +13:00
instruction-history.json.backup-20251012-143441 feat: newsletter modal and deployment script enhancements 2025-10-14 13:11:46 +13:00
plan-registry.json feat: comprehensive accessibility improvements (WCAG 2.1 AA) 2025-10-12 07:08:40 +13:00
tractatus-config.json feat: ACTIVATE Tractatus Governance Framework 🤖 2025-10-07 09:22:05 +13:00