Model, memory, chat, tool, and view files put constants and variables
before types, then constructors, grouped methods, and helpers. Shared
test helpers use the same order, and ordinary tests keep tests first.
Declaration text and function bodies stay unchanged.