ompsure
All reviews
Enforcement catches

'use client' on a layout file

2026-06-10

enforcement hook — composure-pro · 2026-06-10
[composure:enforcement] The write you just attempted to layout.tsx matches a pattern this codebase doesn't want shipped. What the rule caught (1 item): - [nextjs-use-client-page] Pages, layouts, and loading files MUST be server components — never add 'use client'. Extract interactive parts into a client component in components/ and import it.

The agent agreed with the structure, not just the block: “The enforcement rule wants interactive parts in components/ — fair, and the cleaner shape anyway. Creating the button as its own component.” The layout stayed a server component.

Why this matters: Speed & getting foundThe failure mode this catch prevents — in App architecture, in practice.

Composure enforcement hook, firing mid-session in the composure-pro repo. Catch message reproduced verbatim.