From 950dc056d8820050998cfe843baaeed70fd36e10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Sat, 6 Jun 2026 04:16:13 +0000 Subject: [PATCH] chore: deduplicate debate frontmatter with YAML anchor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use &debater-frontmatter anchor for the shared oneOf schema between proponent and opponent roles. Procedure blocks remain duplicated since YAML anchors cannot be embedded inside block scalars. capabilities: [] kept — required by WorkflowPayload type. Addresses review suggestions from #133. --- examples/debate.yaml | 49 +++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/examples/debate.yaml b/examples/debate.yaml index e0ff443..df98834 100644 --- a/examples/debate.yaml +++ b/examples/debate.yaml @@ -1,6 +1,23 @@ name: debate description: "Multi-role structured debate with critical thinking framework and host summary." +# Shared frontmatter schema for debater roles (YAML anchor) +x-debater-frontmatter: &debater-frontmatter + type: object + oneOf: + - properties: + $status: { const: speak } + argument: { type: string } + required: [$status, argument] + - properties: + $status: { const: conceded } + reason: { type: string } + required: [$status, reason] + - properties: + $status: { const: final } + closing: { type: string } + required: [$status, closing] + roles: proponent: description: "Argues FOR the proposition" @@ -33,21 +50,7 @@ roles: 4. Otherwise output $status: speak and counter the opponent's points. 5. Be rigorous, cite evidence, stay concise. output: "Debate argument" - frontmatter: - type: object - oneOf: - - properties: - $status: { const: speak } - argument: { type: string } - required: [$status, argument] - - properties: - $status: { const: conceded } - reason: { type: string } - required: [$status, reason] - - properties: - $status: { const: final } - closing: { type: string } - required: [$status, closing] + frontmatter: *debater-frontmatter opponent: description: "Argues AGAINST the proposition" @@ -80,21 +83,7 @@ roles: 4. Otherwise output $status: speak and counter the proponent's points. 5. Be rigorous, cite evidence, stay concise. output: "Debate argument" - frontmatter: - type: object - oneOf: - - properties: - $status: { const: speak } - argument: { type: string } - required: [$status, argument] - - properties: - $status: { const: conceded } - reason: { type: string } - required: [$status, reason] - - properties: - $status: { const: final } - closing: { type: string } - required: [$status, closing] + frontmatter: *debater-frontmatter host: description: "Debate moderator — delivers impartial summary and verdict" -- 2.43.0