Skip to main content

Assessment

To get support by the Visual Studio Code extension, create a file with the name *.assessment.yml or *.assessment.yaml.

version: "0.1"
assessment:
id: "my-assessment"
title: "Assessment Title"
questions: [...]
scales: [...]

Root Structure

The top-level YAML structure.

PropertyTypeRequiredDescription
versionstringYesFixed to "0.1".
assessmentAssessmentYesThe assessment definition.

Assessment

The assessment configuration object.

PropertyTypeRequiredDescription
idstringYesUnique identifier for the assessment.
titlestringYesHuman-readable title of the assessment.
questionsarray<Question>NoList of Questions. Default: [].
scalesarray<Scale>NoList of Scales. Default: [].

Example

version: "0.1"
assessment:
id: depression-screening
title: Depression Screening
questions: [...]
scales: [...]

Questions

Defines the individual items to be presented to the user. A Question object is polymorphic based on its type property.

PropertyTypeRequiredDescription
idstringYesUnique identifier for the question.
titlestringYesThe text/prompt of the question.
answerAnswerNoPre-filled answer (usually null).
typestringYesDiscriminator for the question type.
bodyobjectYesConfiguration specific to the type.

Question Types

TypeBody DefinitionDescription
"scale"LikertScaleBodyA numeric rating scale.
"textfield"TextBodySingle-line text input.
"textarea"TextBodyMulti-line text input.
"select"SelectBodyBinary choice (Yes/No).
"single-choice"EmptyBodySingle selection from a predefined option set.
"multi-choice"MultiBodyMultiple selection from a predefined option set.

Answer

The user's response to a question. Can be one of:

  • integer (uint8, 0–255)
  • boolean
  • string
  • null (no answer provided)

Question Bodies

TextBody

Used for textfield and textarea.

PropertyTypeRequiredDescription
placeholderstringYesPlaceholder text shown in the input field.

SelectBody

Used for select (binary choice: Yes/No).

PropertyTypeRequiredDescription
yesstringNoLabel for true/yes option.
nostringNoLabel for false/no option.

MultiBody

Used for multi_choice.

PropertyTypeRequiredDescription
optionsarray<string>YesList of available options.

Example

id: depression-screening
title: Depression Screening
questions:
- id: q1
type: textfield
body:
placeholder: "Please enter your name"
answer: null
scales: [...]

EmptyBody

Used for types that require no extra configuration (e.g., single_choice). Object with no properties.

Scales

Defines a scoring scale or sub-scale within the assessment.

PropertyTypeRequiredDescription
idstringYesUnique identifier for the scale.
titlestringYesDisplay title for the scale.
typestringYesMust be "scale".
modeModeYesCalculation mode for results ("sum" or "average").
itemsarray<Item>YesList of Items included in this scale.
bodyScaleBodyYesDefines the numerical range and constraints for the scale.

Mode

String. Must be one of:

  • "sum": Sum of item scores.
  • "average": Average of item scores.

Item

References a question to include in a scale.

PropertyTypeRequiredDescription
idstringYesMust match a Question ID in the assessment.
reversebooleanNoIf true, reverse-score this item (e.g., flip a 0-4 scale to 4-0). Default: false.

LikertScaleBody

Defines the range and constraints for a numeric scale (used in scale questions).

PropertyTypeRequiredDescription
mininteger (uint8)YesMinimum value (0–255).
maxinteger (uint8)YesMaximum value (0–255).
hint-minstringNoLabel for the minimum value (e.g., "Strongly Disagree").
hint-maxstringNoLabel for the maximum value (e.g., "Strongly Agree").

ScaleBody

Defines the numerical range for a scale.

PropertyTypeRequiredDescription
mininteger (uint32)YesMinimum score value.
maxinteger (uint32)YesMaximum score value.

Example

version: "0.1"
assessment:
id: depression-screening
title: Depression Screening
questions:
- id: q1
title: How often do you feel sad?
type: scale
body:
min: 0
max: 4
hint-min: Never
hint-max: Always
scales:
- id: depression-total
title: Depression Score
type: scale
mode: sum
items:
- id: q1
body:
min: 0
max: 4