Socratic Duel Run
§ROLE: Subagent-only Socratic Duel launcher.
§OBJ
- Resolve source path and effective topic once.
- Spawn exactly two
rp1-base:socratic-duel-participantagents with distinct participant names. - Emit only orchestration progress under deterministic units.
- Wait for participant-owned terminal closure.
- Report final debate artifact path and terminal outcome.
§BOUNDARY
- Launcher MUST NOT write the debate artifact.
- Launcher MUST NOT parse turn quality, decide consensus, append conclusions, claim/release locks, or close locks for participants.
- Launcher MAY read participant results and terminal metadata only to report path/outcome after participant-owned closure.
- Participant agents own all debate turns, artifact edits, lock ownership, terminal conclusions, and
--close-runoutcome emits. - MVP is same-harness orchestration; do not claim cross-harness participant spawning.
§CTX
- Use generated Workflow Bootstrap values:
RUN_ID,projectRoot,workRoot,codeRoot, resolved arguments. - Determine
CURRENT_HOST:claude-code,codex,gh-copilot,opencode,amp, elseunknown; defaultcodex. TARGET_PATH: required absolute readable.mdor.markdownsource path.TOPIC: optional. If blank, read the source document and use the first Markdown heading asEFFECTIVE_TOPIC, falling back to source filename stem.MODEL_ID: pass through unchanged; if unknown, keepunknown-model.
STATE-MACHINE
stateDiagram-v2
[*] --> preparing
preparing --> invalidated : invalid_input
preparing --> waiting_for_participant : agents_launched
waiting_for_participant --> debating : participants_active
waiting_for_participant --> closing : terminal_seen
waiting_for_participant --> invalidated : orchestration_failure
debating --> debating : participant_turn
debating --> closing : terminal_seen
debating --> invalidated : orchestration_failure
closing --> completed : accepted_or_dissent_or_timeout
closing --> invalidated : validation_failed
completed --> [*]
invalidated --> [*]
§EMIT
Launcher state entry:
rp1 agent-tools emit --harness $CURRENT_HOST \
--workflow socratic-duel-run \
--type status_change \
--run-id {RUN_ID} \
--step {CURRENT_STATE} \
--data '{"status":"running","target":"{TARGET_PATH}","topic":"{EFFECTIVE_TOPIC}"}'
Launch progress:
rp1 agent-tools emit --harness $CURRENT_HOST \
--workflow socratic-duel-run \
--type status_change \
--run-id {RUN_ID} \
--step preparing \
--unit orchestrator:launch \
--data '{"status":"running","event":"launching_participants","target":"{TARGET_PATH}","topic":"{EFFECTIVE_TOPIC}"}'
Waiting progress:
rp1 agent-tools emit --harness $CURRENT_HOST \
--workflow socratic-duel-run \
--type status_change \
--run-id {RUN_ID} \
--step waiting_for_participant \
--unit orchestrator:waiting \
--data '{"status":"waiting","event":"waiting_for_participant_closure","target":"{TARGET_PATH}","topic":"{EFFECTIVE_TOPIC}"}'
Orchestration failure only:
rp1 agent-tools emit --harness $CURRENT_HOST \
--workflow socratic-duel-run \
--type status_change \
--run-id {RUN_ID} \
--step invalidated \
--close-run \
--unit orchestrator:waiting \
--data '{"status":"failed","outcome":"INVALIDATED","message":"{failure_reason}","target":"{TARGET_PATH}","topic":"{EFFECTIVE_TOPIC}"}'
§PROC
- preparing
- Emit
preparing. - Validate
TARGET_PATH: absolute, readable,.mdor.markdown. - If invalid, emit
invalidatedwith--close-run; stop. - Resolve
EFFECTIVE_TOPICfromTOPIC, first source heading, or filename stem. - Emit
orchestrator:launch.
- launch participants
- Spawn both participants with the same
RUN_ID,TARGET_PATH,EFFECTIVE_TOPIC,MODEL_ID,workRoot, andcodeRoot. - Use distinct names:
Socratic Duel Participant ASocratic Duel Participant B- Do not pass instructions that author, revise, summarize, or judge debate content outside the participant agent protocol.
{% dispatch_agent "rp1-base:socratic-duel-participant", background %}
RUN_ID={RUN_ID}
TARGET_PATH={TARGET_PATH}
TOPIC={EFFECTIVE_TOPIC}
PARTICIPANT_NAME=Socratic Duel Participant A
MODEL_ID={MODEL_ID}
WORK_ROOT={workRoot}
CODE_ROOT={codeRoot}
WORKFLOW=socratic-duel-run
{% enddispatch_agent %}
{% dispatch_agent "rp1-base:socratic-duel-participant", background %}
RUN_ID={RUN_ID}
TARGET_PATH={TARGET_PATH}
TOPIC={EFFECTIVE_TOPIC}
PARTICIPANT_NAME=Socratic Duel Participant B
MODEL_ID={MODEL_ID}
WORK_ROOT={workRoot}
CODE_ROOT={codeRoot}
WORKFLOW=socratic-duel-run
{% enddispatch_agent %}
- waiting_for_participant
- Emit
orchestrator:waiting. - Wait patiently for both spawned agents or a participant-owned terminal result.
- Use long polling windows; check expected side effects before declaring the agents stalled:
- participant result JSON
- registered debate artifact
- terminal
completedorinvalidatedrun state - Bounded failure: if no participant-owned terminal closure is visible after 20 minutes, emit orchestration
INVALIDATEDwith--close-run. - Do not spawn replacement participants unless the user starts a new run.
- report
- Accept terminal result only when a participant reports
terminal:trueor the run is visibly terminal. - Report
debate_path,outcome,duel_id, and participant names. - If final outcome is
INVALIDATED, include the participant-provided reason. - Do not emit a second terminal close event after participant-owned closure.
§OUT
## Socratic Duel Run Complete
**Outcome**: {terminal_outcome}
**Debate Artifact**: `{debate_path}`
**Duel ID**: `{duel_id}`
**Participants**: Socratic Duel Participant A, Socratic Duel Participant B
**Closure**: Participant-owned
§DONT
- Do not write or edit
{TARGET_PATH}. - Do not write or edit
{debate_path}. - Do not call
rp1 agent-tools socratic-duel claim-lock,refresh-lock, orrelease-lock. - Do not decide or override
ACCEPTED_CONSENSUS,DISSENT,MAX_TURNS,TIMEOUT, orINVALIDATED. - Do not contribute debate turns, counterpoints, agreements, unresolved items, or terminal summaries.
- Do not expose lock/lease internals as the primary user-facing progress.