Vibe Coding
Pattern: 'If a Wrong Outcome Is Unacceptable, It's a Hook, Not a Prompt' — Plus the New MessageDisplay Hook
Production Claude Code practice is crystallizing around a 5-second rule: anything safety-critical belongs in a deterministic hook (with PreToolUse as the primary checkpoint), not in a prompt the model can ignore. A newly documented MessageDisplay hook event extends this to the output side, letting you transform or hide assistant message text as it renders — useful for redacting secrets or PII before they reach the terminal. The lesson for builders: encode hard guarantees as code at lifecycle events, not as instructions.
↳ Follow the thread