What
Move engine::Pad and its helpers (index_of, pad_at, is_drum) out of firmware/src/engine/state.h into a narrow header of their own (for example engine/pad.h), and have state.h, events.h and kit.h include it. Then sound/engine.cpp includes the pad header instead of state.h.
Why
sound/ reads events and kit data only and never names engine::State (D-074), but the only header that declares Pad today also declares State, so the boundary is a convention rather than something the include graph shows. Raised by CodeRabbit on PR #2 (thread on firmware/src/sound/engine.cpp:6); deferred there because it is engine/ work and a structural change that must not share a commit with behaviour.
How
- A pure move: no behaviour change, no test change beyond includes; T-74 and every sound test stay green.
- One structural commit on its own (CLAUDE.md, Change discipline), so the diff is a rename/move and nothing else.
- Afterwards the CI layer grep (D-029) could gain
engine/state.h in the denylist for firmware/src/sound, so the boundary is enforced, not just observed.
Done when
grep -rn 'engine/state.h' firmware/src/sound is empty, both builds and ./build/tests are green, and the layer grep covers it.
What
Move
engine::Padand its helpers (index_of,pad_at,is_drum) out offirmware/src/engine/state.hinto a narrow header of their own (for exampleengine/pad.h), and havestate.h,events.handkit.hinclude it. Thensound/engine.cppincludes the pad header instead ofstate.h.Why
sound/reads events and kit data only and never namesengine::State(D-074), but the only header that declaresPadtoday also declaresState, so the boundary is a convention rather than something the include graph shows. Raised by CodeRabbit on PR #2 (thread onfirmware/src/sound/engine.cpp:6); deferred there because it is engine/ work and a structural change that must not share a commit with behaviour.How
engine/state.hin the denylist forfirmware/src/sound, so the boundary is enforced, not just observed.Done when
grep -rn 'engine/state.h' firmware/src/soundis empty, both builds and./build/testsare green, and the layer grep covers it.