* Refresh OpenProse skill conventions * Align OpenProse skill with service system conventions * Fix OpenProse PR review inconsistencies * Clarify OpenProse state backend loading * Enforce OpenProse smoke run state gate
2.4 KiB
name, kind
| name | kind |
|---|---|
| fan-out | pattern |
Fan-Out
Parallel delegation without reduction. Send briefs to N delegates, collect all results. The instantiating system decides how to use them.
Metadata
version: 0.1.0role: coordinator
Slots
delegates
Config
- None. The instantiating system supplies delegate bindings with
with:and briefs as system inputs.
Invariants
- Each delegate receives exactly one brief
- Delegates remain independent and do not see each other's outputs
- Result order matches the order of the
delegatesslot instances - The pattern never merges, ranks, or synthesizes delegate outputs
Shape
self: dispatch briefs to delegates in parallel, collect all results, return collectiondelegates:delegate_1..delegate_N: execute assigned brief
prohibited: merging or synthesizing results — that is the instantiating system's job
Requires
- Pattern instance receives: delegates: string[] -- service or system names for each delegate briefs: string[] -- one brief per delegate (same length as delegates) OR a single string applied to all delegates
Ensures
- Each delegate receives exactly one brief
- All delegates execute in parallel
- No delegate knows other delegates exist
- Results are returned as an ordered array matching the input delegates
- No merging or synthesis — the raw results are the output
result: array of all delegate outputsresults: same array, provided as a keyed alias
Delegation
let results = parallel for delegate, index in delegates:
call delegate
brief: briefs[index]
fallback_brief: task_brief
return {
result: results,
results: results
}
Notes
No delegate knows other delegates exist. Each receives a brief and returns a result. The fan-out pattern collects results but does not interpret them — interpretation is the instantiating system's responsibility.
Different from map-reduce: map-reduce includes a reducer that merges results into a single output. Fan-out returns the raw collection. Use fan-out when the instantiating system needs to see all results individually (e.g., to compare, to select, to present side-by-side). Use map-reduce when the goal is a single merged artifact.
Different from race: fan-out waits for ALL delegates. Race returns the FIRST acceptable result and cancels the rest.