Skip to content

Capturing Decisions

Design decisions as data

At a minimum, a decision record requires

  • model - defines both the decision type and which model to use to produce it
  • name - to identify the decision
  • params - an object following the decision model schema

The following example defines two decisions:

[
{
"type": "color-value/explicit",
"name": "Primary Background",
"params": {
"value": "#090E0B"
}
},
{
"type": "color-set/anchored",
"name": "Primary Backgrounds",
"params": {
"start": { "$name": "Primary Background" },
"steps": 5,
"modifier": {
"space": "oklch",
"l": { "mode": "linear", "by": 3 }
}
}
}
]

If you are declaring decisions in JSON files you are encouraged to organize them in small groups using directories and files.

  • Directoryspace/
  • Directorytypography/
  • Directorycolors/
    • base.json
    • palettes.json
    • ratios.json
  • Directorycontexts/

Next steps

Proceed to the next guide for step by step instructions on how to load all decision files at once, as well as how to validate the input data and inspect validation errors.

See Also