/build-flow — Design a Flow (any type) from a business requirement
Design a flow from business requirements with detailed planning and analysis.
Wraps agents/flow-builder/AGENT.md. Returns the Flow type decision, element plan, subflow plan, fault path, bulkification notes, and test matrix.
Step 1 — Collect inputs
Ask the user:
1. Requirement (plain English, one or two sentences)?
Example: "When a Case is created on a Platinum-tier Account, route to the Platinum Support queue and notify the account owner"
2. Target object (if implied by the requirement)?
Example: Case
3. Target org alias (required — agent checks for existing automation)?
4. Trigger context (optional)?
before-save / after-save / scheduled / screen / autolaunched
(Inferred from the requirement if omitted)
5. Expected volume (optional)?
small / medium / high (drives bulkification emphasis)
6. Include the Flow XML skeleton in the output? yes / no
(Default: no — design doc only)
Step 2 — Load the agent
Read agents/flow-builder/AGENT.md + mandatory reads, especially standards/decision-trees/automation-selection.md (the Flow-vs-Apex-vs-Agentforce gate).
Step 3 — Execute the plan
- Run the automation-selection decision tree — may route to a different tool entirely
- Probe for existing automation (
list_flows_on_object,tooling_queryon ApexTrigger) - Decompose into elements
- Subflow plan
- Bulkification review
- Test design
- Emit the design
Step 4 — Deliver the output
- Summary (Flow type chosen + confidence)
- Element plan (table)
- Subflow plan
- Fault path
- Bulkification notes
- Test matrix
- XML skeleton (only if requested)
- Process Observations
- Citations
Step 5 — Recommend follow-ups
/analyze-flow(existing Wave-1 agent) after the flow is deployed/gen-tests(existing) for any invocable Apex the flow calls/scan-security(existing) if the flow does callouts/audit-validation-rulesif the agent flagged VR-vs-flow conflicts
What this command does NOT do
- Does not deploy the flow.
- Does not modify existing flows.
- Does not build invocable Apex actions (use
/refactor-apexor the relevant SfSkills skill directly). - Does not replace
/analyze-flowfor audit workloads.