Use when writing or reviewing functions that are deeply nested, do too many things, have unclear side effects, or are hard to follow linearly. Also when an agent produces code with high cognitive load — nested if-else pyramids, functions mixing validation+business logic+IO, mutable state leaks, or control flow that jumps around. Complements folder-architecture (file/dir level) with function-level design principles.