A plain object passed around the codebase whose fields are read and written by anyone — `org.name = '...'` from any consumer.
A bare record (plain object with public fields) becomes a class whose properties are accessed through methods that can validate, log, or derive.
Before the refactoring
const org = { name: 'Acme', country: 'US' };console.log(org.name);
After the refactoring
class Org {constructor({ name, country }) { this._name = name; this._country = country; }name() { return this._name; }country() { return this._country; }}console.log(new Org(org).name());
Field renames touch every reader/writer; validation can't be enforced; the record's invariants drift as consumers diverge in their assumptions.
Wrapping every record adds ceremony — only worth it when behavior or validation will accrete around the data.
Field renames stay internal; invariants can be enforced on every read or write; the record becomes a real domain object.
Wrapping every record on principle — even ones with no validation needs, no derivation, no behavior to attract — adds construction ceremony at every entry point.