handoff-unphased-baton.ts 566 B

12345678910
  1. // No phase markers: every participant sits in the one implicit `unphased` phase. A
  2. // baton pass with no data (the editor's ask does not mention the draft) is still a
  3. // hand-off — causality, not taint, is the relation — while the same-lane self-loop of
  4. // the drafter's two asks dissolves.
  5. const drafter = agent("drafter");
  6. const editor = agent("editor");
  7. const draft = await drafter.ask<string>("draft the memo");
  8. const cleaned = await drafter.ask<string>(`tidy ${draft}`);
  9. await editor.ask<string>("proofread whatever is in the shared doc");
  10. return cleaned;