11# Poll (Multi-Provider Q&A) - Flow
22
33This workflow simulates “ask the room”:
4+
45- ** You** = Driver (the provider that invoked ` /poll ` ; broadcasts first, drafts its own answer, then ends its turn to collect replies, then synthesizes)
56- ** Other mounted providers** = Respondents (answer independently; no code changes)
67
78## Inputs
89
910From ` $ARGUMENTS ` :
11+
1012- ` question ` : the question to broadcast
1113- Optional: ` respondents=<comma-separated providers> ` (default: all mounted except ` {self} ` )
1214- Optional: ` format=consensus|list|table ` (default: ` consensus ` )
1315
1416## Step 0: Detect which providers can respond
1517
1618Run:
19+
1720``` bash
1821cq-mounted
1922```
2023
2124If ` cq-mounted ` succeeds and returns a ` mounted[] ` list, define:
25+
2226- For this skill, ` {self} = codex `
2327- ` respondents = mounted - {self} `
2428- If ` respondents=... ` is provided, use ` respondents = (mounted ∩ requested_respondents) - {self} `
2529
2630If ` cq-mounted ` fails (non-zero) or returns invalid/empty output:
31+
2732- If ` respondents=... ` is provided, use ` respondents = requested_respondents - {self} `
2833- Otherwise proceed solo
2934
3035If ` respondents ` is empty, proceed solo: answer the question yourself and clearly label it as a solo response.
3136
3237Generate a fresh correlation id (32-hex) you can match against later. Use it as the ` req_id ` for all broadcast ` ask ` calls:
38+
3339- ` POLL_ID = <32-hex id> ` (example: ` 66094bea382bbce94019e3ea9218ac81 ` )
3440 - Generate: ` POLL_ID="$(python -c 'import secrets; print(secrets.token_hex(16))')" `
35- - ` POLL_DRIVER = {self} ` (the provider that invoked ` /poll ` )
3641
3742## Step 1: Clarify if needed
3843
@@ -47,11 +52,13 @@ Send one request per respondent.
4752### Prompt template (use as-is)
4853
4954Provide respondents with:
55+
5056- The question
5157- The correlation id (` POLL_ID ` )
5258- Explicit instruction to not invoke skills
5359
5460Template:
61+
5562```
5663You are responding to a multi-provider poll. Provide an answer only — do not invoke `/poll`, `/pair`, or `/all-plan`, and do not implement changes.
5764
@@ -66,9 +73,6 @@ Do not reply in your own pane; send your answer via `ask --reply-to` so it arriv
6673POLL_ID:
6774<paste id>
6875
69- POLL_DRIVER:
70- codex
71-
7276Question:
7377<paste question>
7478
@@ -79,6 +83,7 @@ Reply with:
7983```
8084
8185Then run, once per respondent (sequentially; pause ~ 1s between providers):
86+
8287``` bash
8388ask < provider> --req-id " $POLL_ID " << 'EOF '
8489<message>
@@ -90,6 +95,7 @@ Note: Don’t worry about how to get the reply yet — just send the request and
9095## Step 2.5: Driver answer (while waiting)
9196
9297After broadcasting to respondents, write your own answer ** independently** (don’t wait for anyone else, and don’t look at any replies yet):
98+
9399- Answer (2-8 sentences)
94100- Confidence: high|medium|low
95101- Key assumptions / caveats (bullets)
@@ -101,6 +107,7 @@ Do not send your driver answer to respondents; broadcast only the question.
101107Respondents send answers back to your pane via ` ask --reply-to ... --caller <provider> ` .
102108
103109Each reply payload should include:
110+
104111- ` CQ_REPLY: <POLL_ID> `
105112- ` CQ_FROM: <provider> `
106113
@@ -111,12 +118,14 @@ Do not scrape panes to collect answers (forbidden): no `wezterm cli get-text`, n
111118## Step 4: Synthesize
112119
113120Create a combined answer with:
121+
114122- A “consensus” section (or “no consensus”)
115123- Disagreements/outliers (by provider)
116124- Caveats & assumptions (deduped)
117125- Action items / follow-ups (only if needed)
118126
119127Synthesis heuristics:
128+
120129- If a majority agrees on the core answer, report as consensus.
121130- If split, report vote counts and the main trade-off axes.
122131- Prefer high-confidence answers when weighing ambiguous splits.
@@ -128,6 +137,7 @@ Synthesis heuristics:
128137Use the requested format (default: ` consensus ` ).
129138
130139### Format: consensus (default)
140+
131141```
132142## Poll Results
133143
@@ -157,6 +167,7 @@ Use the requested format (default: `consensus`).
157167```
158168
159169### Format: list
170+
160171```
161172## Poll Results
162173
@@ -174,6 +185,7 @@ Use the requested format (default: `consensus`).
174185```
175186
176187### Format: table
188+
177189```
178190## Poll Results
179191
0 commit comments