## Lesson — Guard against null substrate journal roots

**Tags:** substrate, error-handling
**Scope:** .claude/hooks/**/*.js, !**/*.test.*, !**/*.spec.*

Always check for `null` journal roots in substrate resolver outputs before performing file operations. This enables graceful degradation and prevents crashes when a substrate source is missing or incorrectly configured.
