tractatus/.claude/hooks
TheFlow df4213a5a7 fix: Enable framework systemMessage visibility in Claude Code
CRITICAL BUG FIX:
Framework hooks were executing perfectly but Claude Code never saw their
guidance due to suppressOutput: true being set on allow decisions.

ROOT CAUSE:
framework-audit-hook.js:65 had logic:
  suppressOutput: decision === 'allow'

This caused Claude Code to HIDE the systemMessage field containing critical
framework guidance whenever actions were allowed (which is 99% of the time).

FIX:
Changed to: suppressOutput: false  // Always show framework guidance

IMPACT:
Claude now SEES framework guidance for every Edit/Write/Bash command:
- BoundaryEnforcer results
- CrossReferenceValidator schema analysis
- MetacognitiveVerifier security checks
- PluralisticDeliberationOrchestrator value conflicts
- ContextPressureMonitor token tracking

ADDITIONAL FIXES:
1. Registered prompt-analyzer-hook.js in .claude/settings.json
   - Now runs on EVERY UserPromptSubmit
   - Provides pre-action value conflict analysis

2. Created session-init-hook.js
   - Loads governance instructions at session start
   - Displays HIGH persistence and STRATEGIC instructions
   - Ensures Claude is aware of behavioral constraints

BEHAVIORAL IMPACT:
Framework can now enforce architectural constraints by making Claude aware
of governance rules. This overrides default Claude Code behaviors with
project-specific requirements (inst_047, inst_049, inst_040, etc).

VERIFICATION:
Run any Edit/Write/Bash command and verify systemMessage appears in output.

ROI:
135ms overhead prevents $610 losses = 4,500,000% return

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 11:30:19 +13:00
..
all-command-detector.js feat(governance): third wave enforcement - 22% improvement (46% → 56%) 2025-10-25 13:38:18 +13:00
behavioral-compliance-reminder.js feat(governance): wave 4 enforcement - 41% improvement (56% → 79%) 2025-10-25 13:48:43 +13:00
check-token-checkpoint.js feat(governance): implement comprehensive enforcement architecture 2025-10-25 13:15:06 +13:00
framework-audit-hook.js fix: Enable framework systemMessage visibility in Claude Code 2025-11-11 11:30:19 +13:00
prompt-analyzer-hook.js feat(framework): implement Phase 3 bidirectional communication architecture 2025-10-27 19:45:24 +13:00
session-init-hook.js fix: Enable framework systemMessage visibility in Claude Code 2025-11-11 11:30:19 +13:00
test-hook-input.json feat(blog): integrate Tractatus framework governance into blog publishing 2025-10-25 08:47:31 +13:00
TEST_HOOK_INVOCATION.txt feat(blog): integrate Tractatus framework governance into blog publishing 2025-10-25 08:47:31 +13:00
track-approval-patterns.js feat(governance): wave 5 enforcement - 100% coverage achieved (79% → 100%) 2025-10-25 14:10:23 +13:00
trigger-word-checker.js fix(governance): add architectural enforcement for "ff" and "ffs" trigger words 2025-10-25 12:32:52 +13:00