You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does a decision step look like in the workflow builder, so that an author can ask a question about a person and send each answer down its own path?
Build a throwaway UI prototype with /prototype on branch prototype/workflow-decision-step, in the real builder (products/workflows/frontend/Workflows/hogflows/) or in Storybook, and let Michael react to it. Explore at least these shapes:
A branching node. A new step whose outputs are its answers: "Yes" and "No" for a yes/no question, one handle per option for a pick-one question, plus an optional "Unsure" handle under a confidence threshold.
A variable writer plus a condition. A function step that writes decision and confidence variables, followed by the existing conditional branch (the shape of PostHog/posthog#107832).
A content picker. A pick-one question whose options map to email templates, so one email step sends the template the model picked.
For each shape, show the config panel: the question, the options with descriptions, what the model sees, the threshold, a "Test with a person" preview, and the cost hint. Use realistic fake people and events, never real customer data.
The one question for Michael: which shape is the primitive the first version ships, and what is it called?
Runtime: T3 Code
Thread: thread:project:3c3db4d9-0010-47d8-88ed-d1bae5334baa:4dd4b9aa-9111-4809-8f22-84a48fdcd5d3
Title: prototype #245: Decision step in the builder: shape and name
Model: Fable 5.1 (UI design with real ambiguity)
Wall-time cap: 120 minutes for the AFK stretch
Runtime: T3 Code
Thread: thread:project:3c3db4d9-0010-47d8-88ed-d1bae5334baa:bb61206f-3db9-4c8c-b2f9-d8d74933050d
Title: prototype #245: Decision step in the builder: shape and name
Model: Opus 5.5, substituted for Fable 5.1 after three rate-limited starts. The earlier thread is archived.
Wall-time cap: 120 minutes for the AFK stretch
Parked for Michael. The prototype is ready to react to.
Open it
Preview (tailnet):https://devbox-michaelr-1.hedgehog-kitefin.ts.net:60001/decision-step-245/ → story Products / Workflows / Prototype / Decision step / All shapes. The bottom bar or the ← → keys switch shapes. The panel is live: edit options, toggle Yes or no, flip the Unsure switch, and run "Test with a person".
Code: a decision action type in the real graph editor (steps/StepDecisionPrototype.tsx, story editor/graph/DecisionStepPrototype.stories.tsx). "AI decision" is also in the step palette under Audience split.
People and events are invented.
Decisions locked so far
Carried over from #242, #243 and #244, and shown in every shape:
The question is author text only. Person data goes in a "What the model sees" list of named, templated fields, with an 8 KB meter and a "Show what is sent" preview.
2 to 16 described options. Yes or no has an "answer yes at N%" slider, 50% by default.
Unsure is an optional path for pick-one questions, off by default. The prototype turns it on to show it.
Model failure or no AI credits goes down a visible "If the decision fails" path, never a silent drop.
"Test with a person" shows the probability of every answer and the path the person takes.
The cost hint says one AI decision per person, with a trigger volume estimate.
The three shapes
A. Branching step: each answer is its own handle on the canvas.
A: full config panel (pick one, and yes or no)
B. Variable writer + conditional branch: the step saves onboarding_track and onboarding_track_confidence, and the existing conditional branch routes on them.
B: full config panel
C. Content picker: each option maps to an email template, and one step sends the picked email.
A1, A3 (a branch per template), A4, A5. A2 through the step's existing Output variables section
A1, A2, A4 (threshold moves into the condition), A5
A3 only
Question stays author text
Enforced on the server by a native action type
A function template enforces it only in the UI, unless Django reads the question from the saved action (#243)
Native, enforced
Author effort
One step
Two steps. The condition must repeat every option name, and a rename breaks it silently
One step
Model failure
Its own path
Empty variables fall into the condition's "No match", mixed with real non-matches
Fallback email
Build cost
New action type across Django, Node, frontend, MCP and graph schema (charting evidence on #240)
Smallest: a function template plus the existing branch
New action type plus a per-option template copy, the biggest email change
Pending question
Which shape ships first, and what is the step called?
Recommendation: A, the branching step, named "AI decision".
A serves four of the five acceptance examples in one step, and the fifth (A2, labeling) through the Output variables section every step already has.
Only a native action type enforces "the question is author text only" on the server, which is the trade-off What a decision sees, and how it stays safe #243 flagged against a function template.
B is cheaper to build, but it makes authors repeat option names in a second step and hides failures in "No match".
C covers one use case that A already covers with one email step per branch. It fits as a later convenience, not as the primitive.
"AI decision" sits next to "Conditional branch" in the palette and says what it does. Other candidates from the map: "Decide", "Ask AI", "Ask Jev". I would keep the model family name out of the step name, because authors don't know it.
Not settled by this prototype, for the spec: whether a test run costs AI credits (the copy assumes it does), an Unsure band for yes or no questions, and the cost copy, which waits on gateway billing (#240).
Accepted: shape A, the branching step, named "AI Decision (Jeeeeeeeeev)". Michael accepted it in the ticket thread.
The name follows the repo's sentence-case rule for UI copy, so the builder shows it as "AI decision (Jeeeeeeeeev)": in the step palette under Audience split, and as the step's default description.
What the shape is
A native action type. Its outputs are its answers: "Yes" and "No" for a yes or no question, or one handle per option for a pick-one question.
An optional "Unsure" handle for pick-one questions, used when no option reaches the author's threshold. It is off by default.
A separate "If the decision fails" path for model failures, timeouts and missing AI credits. Nobody drops out silently.
The answer and its confidence can also go to workflow variables through the "Output variables" section every step already has. That covers labeling (A2) without a second step.
Safety. Only a native action type can enforce "the question is author text only" on the server. A function template enforces it only in the UI (What a decision sees, and how it stays safe #243).
Why not B (variable writer + conditional branch). It is cheaper to build. But the condition step must repeat every option name, and renaming an option breaks it without warning. Model failures also land in "No match", mixed in with real non-matches.
Why not C (content picker). It serves only one use case (A3), which A already covers with one email step per branch. It can come later as a convenience.
The question is author text only. Person data goes in a "What the model sees" list of named, templated fields, with an 8 KB cap and a "Show what is sent" preview.
2 to 16 described options. The option name is the branch label.
Yes or no has an "answer yes at N%" threshold, 50% by default.
"Test with a person" shows the probability of every answer and the path the person takes.
A cost hint says one AI decision per person.
Naming. The model family nickname is in the step name, at Michael's request.
Activity
Silthus commentedon Oct 4, 2026
Runtime: T3 Code
Thread: thread:project:3c3db4d9-0010-47d8-88ed-d1bae5334baa:4dd4b9aa-9111-4809-8f22-84a48fdcd5d3
Title: prototype #245: Decision step in the builder: shape and name
Model: Fable 5.1 (UI design with real ambiguity)
Wall-time cap: 120 minutes for the AFK stretch
Silthus commentedon Oct 4, 2026
Runtime: T3 Code
Thread: thread:project:3c3db4d9-0010-47d8-88ed-d1bae5334baa:bb61206f-3db9-4c8c-b2f9-d8d74933050d
Title: prototype #245: Decision step in the builder: shape and name
Model: Opus 5.5, substituted for Fable 5.1 after three rate-limited starts. The earlier thread is archived.
Wall-time cap: 120 minutes for the AFK stretch
Silthus commentedon Oct 4, 2026
Parked for Michael. The prototype is ready to react to.
Open it
prototype/workflow-decision-step(throwaway, no PR). Locally:cd common/storybook && pnpm start, same story.decisionaction type in the real graph editor (steps/StepDecisionPrototype.tsx, storyeditor/graph/DecisionStepPrototype.stories.tsx). "AI decision" is also in the step palette under Audience split.People and events are invented.
Decisions locked so far
Carried over from #242, #243 and #244, and shown in every shape:
The three shapes
A. Branching step: each answer is its own handle on the canvas.
A: full config panel (pick one, and yes or no)
B. Variable writer + conditional branch: the step saves
onboarding_trackandonboarding_track_confidence, and the existing conditional branch routes on them.B: full config panel
C. Content picker: each option maps to an email template, and one step sends the picked email.
C: full config panel, and the step palette
Pending question
Which shape ships first, and what is the step called?
Recommendation: A, the branching step, named "AI decision".
Not settled by this prototype, for the spec: whether a test run costs AI credits (the copy assumes it does), an Unsure band for yes or no questions, and the cost copy, which waits on gateway billing (#240).
Silthus commentedon Oct 4, 2026
Silthus commentedon Oct 4, 2026
Resolution
Accepted: shape A, the branching step, named "AI Decision (Jeeeeeeeeev)". Michael accepted it in the ticket thread.
The name follows the repo's sentence-case rule for UI copy, so the builder shows it as "AI decision (Jeeeeeeeeev)": in the step palette under Audience split, and as the step's default description.
What the shape is
Decisions behind it
Pointers
prototype/workflow-decision-step(throwaway, no PR).products/workflows/frontend/Workflows/hogflows/steps/StepDecisionPrototype.tsx.editor/graph/DecisionStepPrototype.stories.tsx.editor/graph/decision-step-prototype-screenshots/.Open items for the spec