Field comprehensions can be used to add fields conditionally.

file.cue
price: number

// High prices require a reason and the name of
// the authorising person.
if price > 100 {
	reason!:       string
	authorisedBy!: string
}
stock.yaml
price: 200
TERMINAL
$ cue export file.cue stock.yaml
authorisedBy: field is required but not present:
    ./file.cue:5:1
reason: field is required but not present:
    ./file.cue:5:1