KeshavSoft / definitions
Chapter 02 · The shared shape

Different controls.
Same contract.

A table variation and a select variation are not built in the same way. Yet each definition uses the same three keys to describe itself.

Key one

baseFromSpec

Names the starting specification for this variation.

It answers: where does this definition begin?

Key two

instructions

Lists the instruction names associated with assembling this variation.

It answers: what work is to be carried out?

Key three

options

Describes the named options available for this variation.

It answers: what optional features are described here?

The contract stays steady

Every second-level definition in the current V1 JSON has these same three keys. The values change because each variation has a different starting point, instruction list, and set of options.

{ "baseFromSpec": "...", "instructions": [ ... ], "options": { ... } }

This is the common shape—not a promise that every variation uses every feature. An empty instruction list or empty options object is still a valid value in the current definitions.

Why have a common contract?

It gives every definition a familiar shape. Once you understand the three keys in one example, you can read another control's definition without learning a new structure.

The definition can be different in meaning while remaining consistent in form.

← Previous: Two levelsNext: Follow bodyOnly →