Problem
multi_agent.lex has three hardcoded pipelines (build→test, build→spec→test+review). There is no way to compose arbitrary agent graphs at runtime — e.g. explore + plan in parallel, then hand results to build.
Design
Replace hardcoded pipelines with a small graph DSL:
type Node = AgentNode(AgentDef) | ParallelNode(List[Node]) | SequenceNode(List[Node])
fn run_graph(root: Node, input: Str, provider: ProviderTag) -> [concurrent, io, ...] GraphResult
This keeps the existing three presets as named constructors:
fn impl_then_test() -> Node { SequenceNode([AgentNode(build_agent()), AgentNode(test_agent())]) }
fn impl_then_spec_then_test() -> Node { ... }
And allows new compositions without touching the core runner.
The TUI --multi flag should accept a pipeline name or eventually a graph spec string.
Acceptance
- Existing three presets produce identical behavior
- New graph compositions can be expressed without modifying
multi_agent.lex
lex check --strict src/ passes
Problem
multi_agent.lexhas three hardcoded pipelines (build→test, build→spec→test+review). There is no way to compose arbitrary agent graphs at runtime — e.g. explore + plan in parallel, then hand results to build.Design
Replace hardcoded pipelines with a small graph DSL:
This keeps the existing three presets as named constructors:
And allows new compositions without touching the core runner.
The TUI
--multiflag should accept a pipeline name or eventually a graph spec string.Acceptance
multi_agent.lexlex check --strict src/passes