Guide

Experiment flow & branching

Order experiments and route participants based on their answers.

The Flow tab arranges the experiments in a project into the sequence participants experience, and can send different participants down different paths.

Build a flow

  1. 1

    Add experiments to the flow

    In the Flow tab, click + on an experiment to add it. The first experiment is where participants start.

  2. 2

    Reorder

    Drag the handle to change the order.

  3. 3

    Add branching (optional)

    Open a step’s branch config and choose how to split participants: Split randomly (assign each to a path) or Branch on a value (route by a shared value a task recorded).

Shared values (carry data across tasks)

Most multi-task studies just need to pass a value from one task to the next — a screen-size calibration, a score, a name. Just ask the AI in the task’s chat. No code, no JSON, nothing to copy.

Two sentences, in two tasks

  • In the task that produces it: “save px_per_mm for later tasks”. The AI adds it to the Shared values card on the Flow tab and saves it when it is measured.
  • In a task that uses it: “size the stimuli using px_per_mm”. The AI already knows the study’s shared values and what each is for.

The Shared values card lists every value the study uses. Edit a value’s “what it’s for” there to change how the AI uses it, or remove one no task needs. Under the hood the value is stored on the participant’s session and read in later tasks with window.__SESSION.get.

Branching (optional)

Only needed if different participants should take different paths. Open a step’s branch config and pick one of two ways to split:

Two ways to split

  • Split randomly — name the paths (e.g. A, B), pick the next task for each, and choose even split (counterbalance) or random. The platform assigns each participant and remembers their path.
  • Branch on a value — pick a shared value a task set, then map each value (e.g. hard → Task X) to the next task. Add a route named default for anything unmatched.
Use Preview project to walk the full participant experience end-to-end, including branches and shared values.

Shared values AI prompt (advanced)

The AI already follows this; it is the reference for reading/writing shared values in an experiment by hand.

Use VibeMyExpt session variables so this task shares state with the other tasks in the study.

Session variables are shared across all tasks in a participant's run. Use them to read a value an earlier task set, and to write a value later tasks or the flow can use.

Requirements:

1. READ: window.__SESSION.get('<name>', <fallback>), e.g.
   const pxPerMm = window.__SESSION.get('px_per_mm', 3.78);
   The fallback is used when no earlier task set the value (e.g. this task run on its own).

2. WRITE: when the task determines a value that later tasks or branching should use:
   window.__SESSION.set('<name>', <value>);
   or several at once: window.__SESSION.set({ '<name>': <value> });

3. If the flow BRANCHES on a variable, its value must be one of the exact discrete string values the researcher declared for it (e.g. 'A' / 'B'). Continuous values (e.g. px_per_mm) are for read-back only.

4. Keep variable names and values consistent with what I describe below. Do not change the trial_data / experiment_complete protocol.