From 03eacbabb29d3e15a75a6b9925c85cc737f7b61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Sat, 23 May 2026 07:50:38 +0000 Subject: [PATCH] feat: add debate workflow for resume integration testing Two-role debate (against/for) with up to 3 rounds per side. Each role re-enters with session resume, making this an ideal integration test for cross-process session continuity. Supports early termination via concession (conceded=true in frontmatter). Refs #418 --- examples/debate.yaml | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 examples/debate.yaml diff --git a/examples/debate.yaml b/examples/debate.yaml new file mode 100644 index 0000000..505af3f --- /dev/null +++ b/examples/debate.yaml @@ -0,0 +1,83 @@ +name: "debate" +description: "Structured debate between two sides. Tests cross-process session resume." +roles: + against: + description: "Argues against the proposition" + goal: | + You are a skilled debater arguing AGAINST the proposition. + Be logical, cite evidence, and directly address your opponent's points. + Keep each argument concise (under 200 words). + capabilities: + - argumentation + - critical-thinking + procedure: | + 1. If this is the opening, present your strongest argument against the proposition. + 2. If responding to the other side, directly counter their points with evidence and logic. + 3. If you find yourself genuinely convinced by the other side, you may concede. + output: | + Provide your argument in the frontmatter. + Set conceded to true ONLY if you are genuinely convinced and wish to stop debating. + frontmatter: + type: object + properties: + argument: + type: string + conceded: + type: boolean + required: [argument, conceded] + for: + description: "Argues for the proposition" + goal: | + You are a skilled debater arguing FOR the proposition. + Be logical, cite evidence, and directly address your opponent's points. + Keep each argument concise (under 200 words). + capabilities: + - argumentation + - critical-thinking + procedure: | + 1. Read the opposing side's latest argument carefully. + 2. Counter their points with evidence and logic. + 3. If you find yourself genuinely convinced by the other side, you may concede. + output: | + Provide your argument in the frontmatter. + Set conceded to true ONLY if you are genuinely convinced and wish to stop debating. + frontmatter: + type: object + properties: + argument: + type: string + conceded: + type: boolean + required: [argument, conceded] +conditions: + againstConceded: + description: "The against side conceded" + expression: "$last('against').conceded = true" + forConceded: + description: "The for side conceded" + expression: "$last('for').conceded = true" + moreRounds: + description: "Fewer than 3 rounds completed per side" + expression: "$count(steps[role = 'against']) < 3" +graph: + $START: + - role: "against" + condition: null + prompt: "Present your opening argument against the proposition." + against: + - role: "$END" + condition: "againstConceded" + prompt: "The against side conceded. Debate over." + - role: "for" + condition: null + prompt: "Counter the opposing argument. Address their points directly." + for: + - role: "$END" + condition: "forConceded" + prompt: "The for side conceded. Debate over." + - role: "against" + condition: "moreRounds" + prompt: "Counter the opposing argument. Address their points directly." + - role: "$END" + condition: null + prompt: "Maximum rounds reached. Debate over."