Commit 5504b15
authored
* fix: /debate command now manages debate workflow directly instead of delegating to orchestrator agent
Move debate orchestration logic (skill invocation, round execution, verdict
synthesis, state saving) from debate-orchestrator agent into the /debate
command itself, following the /consult pattern.
The debate-orchestrator agent is now the programmatic entry point for other
agents/workflows that need to spawn debates via Task(). Direct user
invocations use the command path.
Syncs OpenCode and Codex adapters.
Fixes #231
* test: update debate tests to match new inline orchestration architecture
The /debate command was refactored from delegating to debate-orchestrator
to executing the debate workflow inline (Skill: debate + Skill: consult
per round). Update 4 tests that checked for the old spawn pattern:
- command spawns debate:debate-orchestrator -> invokes skills inline
- command invokes skill via Task tool in Phase 3 -> Skill blocks in Phase 3
- command handles orchestrator failure -> handles tool failure during debate
- orchestrator description mentions proposer/challenger -> programmatic entry point
* fix: address review feedback - inline failure handling, test coverage, least-privilege tools
- Add inline failure-handling directives in Phase 3b round loop across
all 3 command files (plugin, opencode adapter, codex adapter) for both
proposer and challenger consult invocations
- Remove Task from allowed-tools in plugin command (least-privilege;
command uses Skill: directly, not Task)
- Strengthen test assertion for command/agent skill reference
- Add negative regression test ensuring command does not spawn
debate-orchestrator via Task
- Add test for Skill in allowed-tools, add negative test for Task removal
- Add Challenger fails round 1 check to error handling test
- Remove duplicate skill version test from alignment block (kept in
cross-file consistency block)
* fix: unify warn message, add sanitization constraint to commands, add sanitization test
- Update Error Handling table in all 3 command files to match the inline
Phase 3b challenger failure message exactly:
`[WARN] Challenger ({tool}) failed on round 1. Proceeding with uncontested proposer position.`
- Add "MUST sanitize all tool output before displaying" constraint to all 3
command files (already present in orchestrator agent, now ported to commands)
- Add test verifying command has Output Sanitization section
* docs: update CHANGELOG for #231 debate command fix
Add unreleased entry for /debate command inline orchestration refactor.
* enhance: improve agent descriptions, frontmatter completeness, trigger phrases
- debate-orchestrator: capabilities-focused description replacing "Programmatic entry point..." wording
- debate-orchestrator: simplify Role section triad paragraph to two-line summary
- adapters/codex/skills/debate/SKILL.md: add missing version and argument-hint fields
- adapters/opencode/commands/debate.md: add missing name field to frontmatter
- debate command (plugins + opencode): add trigger phrases to description for better command routing
* chore: regenerate adapters and README after debate command changes
* fix: add 'programmatic' to debate-orchestrator description to satisfy CI test
The test 'orchestrator description describes programmatic entry point' asserts
the agent description contains /programmatic/i and /Task()/. The description
had 'Task()' but was missing 'programmatic'. Updated to: 'Programmatic entry
point for other agents or workflows that need to spawn a structured debate via
Task().'
* fix: sync opencode adapter description to match plugin agent
Update adapters/opencode/agents/debate-orchestrator.md description to match
the updated plugins/debate/agents/debate-orchestrator.md description, keeping
both files in sync as required by the adapter-freshness check.
* fix: add AI provider Bash tool permissions to /debate command allowed-tools
Without Bash(claude:*), Bash(gemini:*) etc., all Skill: consult calls in
the debate command would fail at runtime since skills execute within the
command's tool permission scope.
* fix: address PR review comments - placeholder consistency, sk-proj attribution, process.env wording, stale agent references
- Replace {N} with {round} in round display headers (proposer and challenger) for consistency
- Fix context assembly rule: "rounds 1 through N-2" -> "rounds 1 through {round}-2" to correctly refer to current round
- Correct sk-proj-* attribution: it is an OpenAI project key, not an Anthropic key
- Replace process.env.AI_STATE_DIR with plain English "AI_STATE_DIR environment variable" in Phase 3d
- Update debate-orchestrator agent: replace "pre-resolved by the /debate command" with "pre-resolved by the caller" and fix error message to match
- Regenerate OpenCode and Codex adapter files via gen-adapters.js
1 parent 88e8c86 commit 5504b15
File tree
9 files changed
+391
-128
lines changed- __tests__
- adapters
- codex/skills/debate
- opencode
- agents
- commands
- plugins/debate
- agents
- commands
9 files changed
+391
-128
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
184 | 183 | | |
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
213 | 220 | | |
214 | 221 | | |
215 | 222 | | |
| |||
385 | 392 | | |
386 | 393 | | |
387 | 394 | | |
388 | | - | |
389 | | - | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
390 | 399 | | |
391 | 400 | | |
392 | 401 | | |
| |||
436 | 445 | | |
437 | 446 | | |
438 | 447 | | |
439 | | - | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
440 | 455 | | |
441 | 456 | | |
442 | | - | |
| 457 | + | |
443 | 458 | | |
444 | 459 | | |
445 | 460 | | |
| |||
453 | 468 | | |
454 | 469 | | |
455 | 470 | | |
456 | | - | |
| 471 | + | |
457 | 472 | | |
458 | | - | |
459 | | - | |
| 473 | + | |
| 474 | + | |
460 | 475 | | |
461 | 476 | | |
462 | 477 | | |
| |||
470 | 485 | | |
471 | 486 | | |
472 | 487 | | |
473 | | - | |
474 | | - | |
| 488 | + | |
| 489 | + | |
475 | 490 | | |
476 | 491 | | |
477 | 492 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
154 | | - | |
| 155 | + | |
155 | 156 | | |
156 | | - | |
| 157 | + | |
157 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
158 | 190 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
177 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
178 | 262 | | |
179 | | - | |
| 263 | + | |
180 | 264 | | |
181 | | - | |
182 | | - | |
183 | | - | |
| 265 | + | |
184 | 266 | | |
185 | | - | |
| 267 | + | |
186 | 268 | | |
187 | 269 | | |
188 | 270 | | |
| |||
194 | 276 | | |
195 | 277 | | |
196 | 278 | | |
197 | | - | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
198 | 282 | | |
199 | 283 | | |
200 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
0 commit comments