Modular Composition
sharedHow modules are soft-disabled, hard-removed, and packaged for starter profiles.
Composition layers
- backend runtime flags (
BACKEND_MODULE_*) - frontend runtime flags (
VITE_MODULE_*) - hard-remove workflow for permanent pruning
Soft-disable semantics
- code remains in repo
- disabled surfaces are hidden/gated
- modules can be re-enabled without recovery work
Hard-remove rule
- soft-disable first
- operate safely in disabled mode
- remove contracts/routes/module code with migration plan
- update docs and roadmap in same PR
Never hard-remove from fully enabled state.
Compatibility guarantees
- projection policy still applies (
public/client/admin) - contract-first integrity must remain intact
- env templates must reflect module switches
Related deep reference
See docs/architecture/40-modular-composition.md and /docs/module-profiles.