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
- Collect available, valid definitions from the registry. Selection is trigger-agnostic.
- Honor an available explicit request/backlog override, then an available conversational override from the orchestration input's
ReviseFeedback. - Handle zero or one candidate without a model call. With multiple candidates, supply task, team roles and workflow descriptions/source tags to the selector.
- Parse the chosen ID/name against available candidates. Parse failures or unknown choices receive up to two attempts; a model exception falls back immediately.
- 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.
| Condition | Outcome |
|---|---|
| Valid explicit/backlog override | Select it before conversational/model selection; not automatic |
| Valid conversational override | Select from available definitions; not automatic |
| One candidate | Return it without a model call |
| Parse failure or unknown model selection | Retry within the two-attempt bound, then fallback |
| Model throws | Immediate fallback |
| Valid automatic choice | Return the matched definition and rationale |
The root workflow library is the canonical blueprint mapping.
Diagram details and constraints
| Element | Contract |
|---|---|
| title | Workflow selection |
| subtitle | Trigger-agnostic • explicit choices precede singleton |
| returns-heading | SOURCE / RETURN |
| outcomes-heading | OUTCOMES |
| footer | Post-decomposition Build & Test compatibility is a separate check (executor:407–494). |
| Load candidates | Load candidates |
| Load candidates | Project default ordered first |
| Load candidates | registry.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 count | Candidate count |
| Candidate count | Only automatic selection |
| Candidate count | 0 / 1 / multiple |
| Ask selection model | Ask selection model |
| Ask selection model | Goal + roles + process fit |
| Ask selection model | maximum 2 attempts |
| Usable candidate? | Usable candidate? |
| Usable candidate? | Parse / normalize / prose match |
| Usable candidate? | reject unknown choices |
| Selected workflow | Selected workflow |
| Selected workflow | Emit selection + rationale |
| Selected workflow | workflow_selected |
| Explicit choice | Explicit choice |
| Explicit choice | Emit selection |
| Explicit choice | not auto-selected |
| Silent choice | Silent choice |
| Silent choice | One: candidate |
| Silent choice | Zero: project default |
| Model fallback | Model fallback |
| Model fallback | default / standard then non-code-review |
| Model fallback | else first candidate |
| Outer fallback | Outer fallback |
| Outer fallback | Project default |
| Outer fallback | when catch permits |
| edge-02-label | available |
| edge-03-label | absent / invalid |
| edge-06-label | 0 or 1 |
| edge-07-label | 2+ |
| edge-08-label | response |
| edge-09-label | exception |
| edge-10-label | accepted |
| edge-11-label | retry once |
| edge-12-label | 2 unusable |
| edge-13-label | emit choice |
| edge-14-label | outer catch |
| fallback | default / standard |

