Flow Example
Flow doc with steps, branches, and paths
type: flowid: signintitle: Sign Instatus: drafttags: [auth]context: - feature/authentication - domain/auth
{% tldr scope="agent" %}Sequences the credential submission and session creation steps for the authentication feature.{% /tldr %}
{% flow id="signin" feature="feature/authentication" scope="agent" %}
{% precondition %}User account exists and status is active.{% /precondition %} {% postcondition %}Session token issued; user redirected to dashboard.{% /postcondition %} {% postcondition outcome="invalid-credentials" %}Login attempt logged; error message shown.{% /postcondition %}
{% step actor="user" %} User navigates to the login screen. {% /step %}
{% step action="submit-credentials" actor="user" %} User submits email and password via the login form. {% /step %}
{% branch condition="credentials-valid" %} {% path outcome="success" label="Session created" emit="user-authenticated" %} validate-credentials succeeds → CreateSession → user-authenticated event emitted → redirect. {% /path %} {% path outcome="invalid-credentials" label="Login failed" throws="invalid-credentials" %} validate-credentials fails → increment attempt counter → show error message. {% /path %} {% /branch %}
{% /flow %}