Template and Instance Override Model
Design an efficient JSON-like representation and object model that propagates template changes without losing intentional instance customizations.
For this exercise, assume a template describes a reusable component and users create instances that customize fields such as text or color. A template author can publish a later revision, while earlier published revisions remain available to existing instances.
An instance owner can preview and apply an update: compatible customizations remain, while removed or type-incompatible fields are reported as conflicts and committed state stays unchanged until they are resolved.
The representation must distinguish inherited values from user customizations without copying unnecessary defaults. Design an efficient JSON-like representation plus the in-process objects, responsibilities, interfaces, and interactions for this lifecycle.
Commands return synchronously; durable retry reconciliation, distributed collaboration, rendering, storage engines, and network APIs are outside scope.