Multi-step flow with data flowing between steps
Primitives used: persona · flow · step
// Chained reasoning: step 2 consumes step 1's output.
// The compiler verifies the output types align across the chain.
persona Analyst {
domain: ["analysis", "synthesis"]
tone: analytical
confidence_threshold: 0.8
cite_sources: true
}
type Document { content: String }
type Outline { sections: String }
type Summary { text: String }
flow Summarise(doc: Document) -> Summary {
step Decompose {
given: doc
ask: "Break the document into a sectioned outline."
output: Outline
}
step Refine {
given: Decompose.output
ask: "Compose a tight summary from the outline."
output: Summary
}
return Refine.output
}