Skip to main content
VelinStyle v1.4.0
⌂ Home

Semantic Apply 1.4.0

The exclusive DOM-writing stage translates validated intents into known attributes, component contracts, or constrained section order.

Apply ownership

Signals → Policy → Intent → Validator → Guardrails → Semantic Apply → Audit / Undo. Policy, Local AI, Blocks, and Inspector never write adaptation DOM directly.

Example

const result = controller.applyIntent({
  type: 'layout',
  target: { role: 'hero' },
  value: 'split',
  reason: 'available width',
  source: 'policy',
  timestamp: Date.now()
});

Mutation map

IntentApply surface
theme / contrastKnown root data attribute
density / layoutSemantic data attribute plus known bridge
component-attributeAllowlisted public WC attribute
section-orderExisting role siblings under registry graph

Atomic safety

Invalid targets or parameters reject before mutation. Free HTML, CSS text, event handlers, arbitrary attributes, and Shadow DOM internals are never apply surfaces.

After apply

The engine emits velin-adapt-apply, records semantic before/after values, and stores an inverse patch for undo.