Trainerflow Docs trainerflow.com
Core elements › Output

Core elements

Output

A value the program prescribes for an action, like the weight on the bar or the number of reps.

An Output is one of the core elements of the Coach language. It represents information that the program provides to the athlete: how many reps, how much weight, how long to rest.

Definition

To define an output you need the keyword output, a type, a name and a list of properties in square brackets (the list may be empty):

output:number reps [title: "Reps"]
output:|kg| weight [title: "Weight"]
output:boolean to_failure [title: "To failure"]
output:string tempo [title: "Tempo"]

Think of the type as the type of the value that you specify when you use this output. It can be one of:

  • number, e.g. reps,
  • a unit of measurement between vertical bars, e.g. |kg| or |min|, for outputs like weight or duration,
  • boolean, e.g. to_failure,
  • string, for text, e.g. tempo or a coaching cue.

The name has to start with a letter and may contain letters, digits, _ and ?. The Trainerflow convention is to use a lowercase (snake_case) name for outputs.

An output is not tied to an action, so the same reps can be specified for a squat, a bench press and a curl. Declare your outputs once and use them everywhere.

Properties

The properties customize how the output is presented to the athlete:

Property What it does
title The label of the target the athlete sees. Without it, the athlete sees the output’s name.
description A longer explanation shown with the target.
constraint Restrictions on the value, e.g. a list of named choices, as with inputs.

Inheritance

An output can be derived from another one with <. It keeps the type and the properties of its parent and adds or overrides its own:

output:number reps [title: "Reps"]
output top_set_reps < reps [title: "Top set reps"]

Outputs and inputs

It is very common to have an output and an input with the same name, e.g. a reps output, for the reps the program asks for, and a reps input, for the reps the athlete actually did. They are two separate declarations and they do not clash:

output:number reps [title: "Reps"]
input:number reps [title: "Reps"]

The apps put the two side by side, so the athlete sees the target next to the field for what they actually did.

Usage

See the specify command.