Skip to content

Flow lines

An organization draws its own steps on /flowlines, connects them however work really moves, and the board's step groups are those steps. The two views cannot disagree because they read the same nodes.

Naming

The feature was called "workflow" until August 2026. The archetypes kept that name (WorkflowStep, WorkflowSteps) because moving or renaming a declaration orphans stored data.

Steps and kinds

A step is a WorkflowStep node under the WorkflowSteps box. It has a name the team chose, a colour, an owner role (not a person), a one-line blurb, a canvas position and a sort_order. Behind the name sits a semantic kind:

Kind Means Legacy status written Default colour
start Not started Backlog sky
active Someone is on it In Progress indigo
handoff Waiting on another person (review) Review amber
blocked Stopped, needs attention Blocked rose
done Terminal Done emerald

The app keys behaviour on the kind, never the name, so renaming "Review & merge" to "Code review" changes nothing about how tasks behave.

Kind -> legacy status. A move writes both, so insights, GitHub sync and the assistant never have to learn what a step is.

glob KIND_STATUS: dict[str, str] = {
    "start": "Backlog",
    "active": "In Progress",
    "handoff": "Review",
    "blocked": "Blocked",
    "done": "Done"
};

constants.jac:3

Legacy status -> kind, for placing tasks that carry no step_id.

glob STATUS_KIND: dict[str, str] = {
    "Backlog": "start",
    "In Progress": "active",
    "Review": "handoff",
    "Changes Requested": "active",
    "Done": "done",
    "Blocked": "blocked"
};

constants.jac:3

Why every move writes two fields

Roughly thirty places in the code care what a status means: Done is terminal, Blocked needs attention, Review is a handoff. Rather than teach insights, the GitHub sync, the assistant and the log what a step is, every task write sets step_id and the legacy status mapped through KIND_STATUS. Those subsystems keep reading status.

flowchart LR
    move["MoveTask<br/>step_id = Implement"] --> step["WorkflowStep<br/>kind = active"]
    step -- "KIND_STATUS" --> status["status = In Progress"]
    status --> insights["Insights"]
    status --> github["GitHub sync"]
    status --> assistant["Assistant"]
    status --> log["Activity log"]

Changes Requested is the one legacy status with no kind of its own; it maps back to active.

Done has a date

Every status write goes through Task.set_status(status, stamp), never a plain assignment. It stamps done_at when a task enters Done and clears it when the task leaves. The done day is done_at (falling back to updated_at on rows written before the stamp existed), and a task created straight into Done is history rather than throughput. A closed issue from a GitHub import carries the issue's own created and closed dates, so it counts in the week it was really closed. The Overview's weekly counts, the burn-up charts, the assistant's snapshot and the board's recent-done window all read that one rule, so they agree.

Transitions

A step stores its outgoing transitions in its own transitions field, in draw order, one entry per target:

{"to": "<target step jid>", "label": "ready and tested", "carries": "pr"}
  • label says what has to be true to cross.
  • carries is issue (no code yet), pr (code, waiting on a person) or empty.
  • Cycles and branches are allowed on purpose; a self-loop is refused.
  • There are no edges between steps. Incoming transitions are computed by reading every step's list (StepView.prev_ids), and a transition that points at a deleted step is dropped from the view.

Templates

Two templates ship in FLOW_LINE_TEMPLATES. Setup's last step offers both plus Draw my own, and the flow line page offers both plus a blank canvas whenever there are no steps. ApplyTemplate only seeds an empty flow line; if any step exists it reports the existing steps and writes nothing. The template's key is stored as the box's template_key, so a template can be renamed but never re-keyed.

Simple (simple)

The recommended start: four steps, and Review can send work back to Doing. A review that requests changes takes that arrow on its own (the changes_requested trigger), whether a person left it on the linked PR or an AI responsibility did. It seeds no roles and no step owners.

flowchart LR
    T["To do<br/><small>start</small>"]
    G["Doing<br/><small>active</small>"]
    R["Review<br/><small>handoff</small>"]
    D["Done<br/><small>done</small>"]

    T --> G --> R --> D
    R -- "Changes requested" --> G

    classDef sky stroke:#2e6c97,stroke-width:2px
    classDef indigo stroke:#5550ac,stroke-width:2px
    classDef rose stroke:#a34b83,stroke-width:2px
    classDef emerald stroke:#387a51,stroke-width:2px
    class T sky
    class G indigo
    class R rose
    class D emerald

Software team (jaseci)

Seven steps from the GitHub issue pool to Done. Work stays an issue until an engineer picks it up and opens a PR; from there it is a PR until the Model Oversight Engineer marks it done. Arrows marked auto move work on their own (see Automation).

flowchart TB
    U["Incoming<br/><small>start · anyone</small>"]
    V["Ready<br/><small>start · Product Engineer · needs a due date</small>"]
    P["Building<br/><small>active · Model Pilot Engineer</small>"]
    A["Design<br/><small>active · Architect</small>"]
    R["In review<br/><small>handoff · Product Engineer · needs a PR</small>"]
    M["Final check<br/><small>handoff · Model Oversight Engineer</small>"]
    D["Done<br/><small>done · Model Oversight Engineer</small>"]

    U -- "auto: label validated" --> V
    V -- "picked up" --> P
    P -- "needs a design decision" --> A
    A -- "decision made" --> P
    P -- "auto: label ready-to-review" --> R
    R -- "auto: changes requested" --> P
    R -- "auto: PR merged" --> M
    M -- "correct, no polish" --> D

    classDef sky stroke:#2e6c97,stroke-width:2px
    classDef indigo stroke:#5550ac,stroke-width:2px
    classDef slate stroke:#6a726e,stroke-width:2px
    classDef amber stroke:#a1711a,stroke-width:2px
    classDef rose stroke:#a34b83,stroke-width:2px
    classDef emerald stroke:#387a51,stroke-width:2px
    class U sky
    class V,R indigo
    class A slate
    class P amber
    class M rose
    class D emerald

Software team also seeds four roles (Product Engineer, Model Pilot Engineer, Architect, Model Oversight Engineer) as ordinary Role nodes that the team can edit afterwards. Existing roles with the same name are left alone, and the box records template_key = "jaseci".

Automation

Two settings on the flow line itself make it act on its own; both are edited on /flowlines in Edit mode.

Entry rules on a step (needs_due_date, needs_pr, set with SetStepRules) turn a task away unless it has a due date or a linked PR. They hold for every move onto the step: a board drag, a sheet save, a new task and a GitHub trigger. The page stops the move before sending it and the server refuses it too (refused on the reported task view).

Triggers on a transition (trigger, github_label) move a task across the arrow when the GitHub sync or a webhook drain sees the fact, only from the step the arrow leaves:

Trigger Fires when
label The named label is newly added to the task's issue or its linked PR
pr_merged The linked PR merges
changes_requested A review on the linked PR requests changes

A triggered move lands like a drag: the end of the target column, the step's owner takes the task when exactly one person holds that role on the project, and the log reads Moved to <step> · <why>. When the target's entry rule turns it away the task stays and the log reads Stayed on <step> · <reason>. A PR is linked to its task when its body closes the issue (Closes #12, fixes org/repo#12); see GitHub sync.

GitHub labels on a transition work the other way too. For a repo with label sync on, a move across an arrow that names a label adds it on GitHub, by hand or by a trigger (except the label that moved it), to the linked PR when the arrow carries a PR and to the issue otherwise. Leaving a step takes off the labels of the arrows into it unless the arrow keeps them. In the Software team template:

Arrow Label Where Taken off when
Incoming → Ready validated issue never (kept)
Building → Design needs-design issue the task goes back to Building
Building → In review ready-to-review PR the task goes back to Building, or merges
In review → Building changes-requested PR the task goes back to In review

The log line names each write (Moved to Ready · labelled validated on GitHub), and a GitHub error never blocks the move.

The templates as declared in constants.jac

Prebuilt flows, recommended first. The key persists on the flow line (WorkflowSteps.template_key), so rename a template, never re-key it. Roles, link_labels and link_carries are optional per template.

glob FLOW_LINE_TEMPLATES: list[dict[str, any]] = [
    {
        "key": "simple",
        "name": "Simple",
        "description": "Four steps, and Review can send work back to Doing.",
        "steps": [
            {
                "name": "To do",
                "kind": "start",
                "color": "sky",
                "x": 60.0,
                "y": 60.0
            },
            {
                "name": "Doing",
                "kind": "active",
                "color": "indigo",
                "x": 400.0,
                "y": 60.0
            },
            {
                "name": "Review",
                "kind": "handoff",
                "color": "rose",
                "x": 740.0,
                "y": 60.0
            },
            {
                "name": "Done",
                "kind": "done",
                "color": "emerald",
                "x": 1080.0,
                "y": 60.0
            }
        ],
        "links": [[0, 1], [1, 2], [2, 3], [2, 1]],
        "link_labels": ["", "", "", "Changes requested"],
        # A review wanting changes takes this arrow, a person's or AI's.
        "link_triggers": ["", "", "", "changes_requested"]
    },
    {
        "key": "jaseci",
        "name": "Software team",
        "description": "Seven steps from the GitHub issue pool to Done: validate, pick, review the PR, then oversight decides. GitHub labels and merges move the work. Adds four roles.",
        # The four roles. ApplyTemplate seeds these as Role nodes
        # (editable org data from then on); colors match the step each
        # role owns so the Roles tab echoes the canvas.
        "roles": [
            {
                "name": "Product Engineer",
                "blurb": "Validates issues, reviews PRs.",
                "color": "indigo"
            },
            {
                "name": "Model Pilot Engineer",
                "blurb": "Picks issues and ships the PRs.",
                "color": "amber"
            },
            {
                "name": "Architect",
                "blurb": "Makes the design decisions for big changes.",
                "color": "slate"
            },
            {
                "name": "Model Oversight Engineer",
                "blurb": "Checks merged work. Decides done.",
                "color": "rose"
            }
        ],
        # Unassigned and Validated are both `start`: validated but
        # unpicked work is still Backlog. Ready needs a due date and In
        # review a linked PR, whether a label or a person moves it.
        "steps": [
            {
                "name": "Incoming",
                "kind": "start",
                "color": "sky",
                "owner": "anyone",
                "blurb": "new issues from GitHub",
                "x": 60.0,
                "y": 40.0
            },
            {
                "name": "Ready",
                "kind": "start",
                "color": "indigo",
                "owner": "Product Engineer",
                "blurb": "validated, prioritised, dated",
                "needs_due_date": True,
                "x": 60.0,
                "y": 260.0
            },
            {
                "name": "Building",
                "kind": "active",
                "color": "amber",
                "owner": "Model Pilot Engineer",
                "blurb": "one engineer; a linked PR is fetched",
                "x": 400.0,
                "y": 480.0
            },
            {
                "name": "Design",
                "kind": "active",
                "color": "slate",
                "owner": "Architect",
                "blurb": "big changes only",
                "x": 400.0,
                "y": 700.0
            },
            {
                "name": "In review",
                "kind": "handoff",
                "color": "indigo",
                "owner": "Product Engineer",
                "blurb": "PR open, being reviewed",
                "needs_pr": True,
                "x": 740.0,
                "y": 260.0
            },
            {
                "name": "Final check",
                "kind": "handoff",
                "color": "rose",
                "owner": "Model Oversight Engineer",
                "blurb": "is the solution right?",
                "x": 1080.0,
                "y": 480.0
            },
            {
                "name": "Done",
                "kind": "done",
                "color": "emerald",
                "owner": "Model Oversight Engineer",
                "blurb": "correct, no polish needed",
                "x": 1420.0,
                "y": 480.0
            }
        ],
        "links": [[0, 1], [1, 2], [2, 3], [3, 2], [2, 4], [4, 2], [4, 5], [5, 6]],
        # Index-aligned with `links`, as are the carries and triggers.
        "link_labels": [
            "validated, with priority",
            "picked up",
            "needs a design decision",
            "decision made",
            "ready to review",
            "changes requested",
            "PR merged",
            "correct, no polish"
        ],
        "link_carries": [
            "issue",
            "issue",
            "issue",
            "issue",
            "pr",
            "pr",
            "pr",
            "pr"
        ],
        # What moves a task along the arrow without a person (see
        # TRANSITION_TRIGGERS). `link_github_labels` is each arrow's GitHub
        # label: what a label trigger waits for, and what crossing the
        # arrow writes for a repo with label sync; only `validated` stays.
        "link_triggers": [
            "label",
            "",
            "",
            "",
            "label",
            "changes_requested",
            "pr_merged",
            ""
        ],
        "link_github_labels": [
            "validated",
            "",
            "needs-design",
            "",
            "ready-to-review",
            "changes-requested",
            "",
            ""
        ],
        "link_keep_labels": [True, False, False, False, False, False, False, False]
    }
];

constants.jac:3

Where a task sits on the board

Tasks written before flow lines existed, and tasks whose step was deleted, carry an empty step_id. Both fallbacks below are load-bearing.

  1. step_id names an existing step: the task sits on that step.
  2. Otherwise: the task sits on the first step whose kind is STATUS_KIND[status] (a Blocked task goes to the first blocked step).
  3. No step of that kind exists: the flow line's counts leave the task out, and the board draws it in its first step group.
  4. No flow line at all: the board falls back to the legacy STATUSES as groups, and a task's status is its group.

First, by which order?

The server takes the first step of a kind by sort_order; the board orders its step groups by canvas x, then sort_order. They agree unless a step of the same kind was created later but sits further left.

Handoffs follow roles

A step's owner is a role name such as Model Pilot Engineer. When MoveTask moves a task onto a different step, it looks for the one active member who holds that role and is on the task's project. If there is exactly one, the task's assignees are replaced by that person and the log line names them (Moved to Implement · Priya Raman). With no owner, anyone, no project, or zero or several holders, the assignees are left alone. Reordering a task within its own step is never a handoff.

Editing rules

Action What happens
Rename a step Nothing else changes; behaviour follows the kind.
Change a step's kind Every task whose step_id is that step gets the new mapped status (no log line, no updated_at bump).
Move a step on the canvas MoveStep stores x and y; a coordinate outside 0..20000 is reset to 0.
Delete a step Refused for the only start or only done step. Otherwise tasks on it keep their status and fall back per the rules above, and every transition into it is removed.
Delete the flow line Every step and transition goes, tasks keep their status, and template_key resets so the picker appears again. Roles stay.
Rename or delete a role A rename rewrites every step owner that used the old name; a delete clears it. Members follow through their HasRole edge.

The walkers are documented in the Flow lines API.