Skip to content

Coordinator Workflow Selection ​

A blueprint supplies a set of workflows, not one universal pipeline. For example, Software Development supplies software-delivery and bug-fix. The coordinator selects for the task's process and outputs, rather than name similarity.

The selection flow ​

  1. Collect available, valid definitions from the registry. Selection is trigger-agnostic.
  2. Honor an available explicit request/backlog override, then an available conversational override from the orchestration input's ReviseFeedback.
  3. Handle zero or one candidate without a model call. With multiple candidates, supply task, team roles and workflow descriptions/source tags to the selector.
  4. Parse the chosen ID/name against available candidates. Parse failures or unknown choices receive up to two attempts; a model exception falls back immediately.
  5. Persist/surface the selected workflow and rationale, then revalidate compatibility with the decomposition before execution.

The fallback prefers default/standard, then a non-code-review candidate, and only then the first entry. It is not universally the project's first listed workflow. Selection failure does not waive later binding or compatibility checks.

Sources: CoordinatorOrchestratorExecutor.cs:271-372,407-488 and WorkflowSelector.cs:83-218.

User override ​

An explicit request/backlog override takes priority over conversational use {id} selection. The traced orchestration path reads revision feedback; it does not intercept every user message and switch any already-running workflow in place.

Result and event contract ​

WorkflowSelectionResult contains Selected, Rationale and WasAutoSelected. coordinator.workflow_selected carries the selected ID/name, rationale, available choices and override hint where that path emits the selection. Explicit and conversational overrides set wasAutoSelected: false; that value does not identify only singleton projects.

ConditionOutcome
Valid explicit/backlog overrideSelect it before conversational/model selection; not automatic
Valid conversational overrideSelect from available definitions; not automatic
One candidateReturn it without a model call
Parse failure or unknown model selectionRetry within the two-attempt bound, then fallback
Model throwsImmediate fallback
Valid automatic choiceReturn the matched definition and rationale

The root workflow library is the canonical blueprint mapping.

Diagram details and constraints
ElementContract
titleWorkflow selection
subtitleTrigger-agnostic • explicit choices precede singleton
returns-headingSOURCE / RETURN
outcomes-headingOUTCOMES
footerPost-decomposition Build & Test compatibility is a separate check (executor:407–494).
Load candidatesLoad candidates
Load candidatesProject default ordered first
Load candidatesregistry.Available
Explicit override?Explicit override?
Explicit override?Dialog value, else backlog pin
Explicit override?must be available
Conversational choice?Conversational choice?
Conversational choice?Revision feedback: use {id}
Candidate countCandidate count
Candidate countOnly automatic selection
Candidate count0 / 1 / multiple
Ask selection modelAsk selection model
Ask selection modelGoal + roles + process fit
Ask selection modelmaximum 2 attempts
Usable candidate?Usable candidate?
Usable candidate?Parse / normalize / prose match
Usable candidate?reject unknown choices
Selected workflowSelected workflow
Selected workflowEmit selection + rationale
Selected workflowworkflow_selected
Explicit choiceExplicit choice
Explicit choiceEmit selection
Explicit choicenot auto-selected
Silent choiceSilent choice
Silent choiceOne: candidate
Silent choiceZero: project default
Model fallbackModel fallback
Model fallbackdefault / standard then non-code-review
Model fallbackelse first candidate
Outer fallbackOuter fallback
Outer fallbackProject default
Outer fallbackwhen catch permits
edge-02-labelavailable
edge-03-labelabsent / invalid
edge-06-label0 or 1
edge-07-label2+
edge-08-labelresponse
edge-09-labelexception
edge-10-labelaccepted
edge-11-labelretry once
edge-12-label2 unusable
edge-13-labelemit choice
edge-14-labelouter catch
fallbackdefault / standard

Visual model ​

Workflow selection ​

Two-phase flowchart showing Blueprint workflow candidates, explicit and conversational overrides, zero/one/multiple candidate handling, bounded model selection with deterministic fallback, and post-decomposition Build and Test compatibility.

Structured source · Editable draw.io