Skip to content

Commit 73cbfec

Browse files
committed
Rename cost-mode flag to cost-optimized
1 parent 79d499d commit 73cbfec

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

cmd/dun/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ LOOP MODE:
143143
Quorum Options (multi-agent consensus):
144144
--quorum Strategy: any, majority, unanimous, or number (e.g., 2)
145145
--harnesses Comma-separated list of harnesses (e.g., codex,claude,gemini,opencode)
146-
--cost-mode Run harnesses sequentially to minimize cost
146+
--cost-optimized Run harnesses sequentially to minimize cost
147147
--escalate Pause for human review on conflict
148148
--prefer Preferred harness on conflict (e.g., codex)
149149
--similarity Similarity threshold for conflict detection (default: 0.8)
@@ -525,7 +525,7 @@ func runLoop(args []string, stdout io.Writer, stderr io.Writer) int {
525525
// Quorum flags
526526
quorumFlag := fs.String("quorum", "", "quorum strategy: any, majority, unanimous, or number")
527527
harnessesFlag := fs.String("harnesses", "", "comma-separated list of harnesses for quorum")
528-
costMode := fs.Bool("cost-mode", false, "run harnesses sequentially to minimize cost")
528+
costMode := fs.Bool("cost-optimized", false, "run harnesses sequentially to minimize cost")
529529
escalate := fs.Bool("escalate", false, "pause for human review on conflict")
530530
prefer := fs.String("prefer", "", "preferred harness on conflict")
531531
similarity := fs.Float64("similarity", 0.8, "similarity threshold for conflict detection")

cmd/dun/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2103,7 +2103,7 @@ func TestRunLoopQuorumCostMode(t *testing.T) {
21032103
"--max-iterations", "2",
21042104
"--harnesses", "mock1,mock2",
21052105
"--quorum", "any",
2106-
"--cost-mode",
2106+
"--cost-optimized",
21072107
}, &stdout, &stderr)
21082108
if code != dun.ExitSuccess {
21092109
t.Fatalf("expected code %d, got %d: stdout=%s stderr=%s", dun.ExitSuccess, code, stdout.String(), stderr.String())

docs/design/contracts/API-001-dun-cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ proceeding (quorum is applied to the iteration prompt, not per-check prompts).
218218
- `--verbose` : Print prompts sent to harnesses and responses received
219219
- `--quorum` : Quorum strategy (`any`, `majority`, `unanimous`, or number)
220220
- `--harnesses` : Comma-separated harness list for quorum (supports `name@persona`)
221-
- `--cost-mode` : Run harnesses sequentially to minimize cost
221+
- `--cost-optimized` : Run harnesses sequentially to minimize cost
222222
- `--escalate` : Pause for human review on conflict
223223
- `--prefer` : Preferred harness on conflict
224224
- `--similarity` : Similarity threshold for conflict detection (default `0.8`)
@@ -261,7 +261,7 @@ $ dun loop --verbose
261261
- `--task` : Task prompt (string)
262262
- `--quorum` : Quorum strategy (`any`, `majority`, `unanimous`, or number)
263263
- `--harnesses` : Comma-separated harness list (supports `name@persona`)
264-
- `--cost-mode` : Run harnesses sequentially to minimize cost
264+
- `--cost-optimized` : Run harnesses sequentially to minimize cost
265265
- `--escalate` : Pause for human review on conflict
266266
- `--prefer` : Preferred harness on conflict
267267
- `--similarity` : Similarity threshold for conflict detection (default `0.8`)

docs/helix/02-design/solution-designs/SD-011-agent-quorum.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ as task prompts to the harnesses.
637637
| P7.1 | Implement sequential execution | `quorum.go` | 3h |
638638
| P7.2 | Add early exit optimization | `quorum.go` | 2h |
639639

640-
**Deliverable**: `--cost-mode` runs harnesses sequentially with early exit.
640+
**Deliverable**: `--cost-optimized` runs harnesses sequentially with early exit.
641641

642642
### Phase 8: Statistics Tracking (2 tasks)
643643

@@ -669,7 +669,7 @@ Quorum Flags:
669669
--quorum <strategy|N> Quorum strategy: any, majority, unanimous, or number
670670
(default: none - single harness mode)
671671
--harnesses <list> Comma-separated harness names (supports name@persona)
672-
--cost-mode Run harnesses sequentially, stop on quorum
672+
--cost-optimized Run harnesses sequentially, stop on quorum
673673
--escalate Pause for human review on conflict
674674
--prefer <harness> Use this harness response on conflict
675675
--similarity <float> Semantic similarity threshold (default: 0.95)
@@ -685,7 +685,7 @@ dun loop --harnesses claude,gemini,codex --quorum 2
685685
dun loop --harnesses claude,gemini --quorum unanimous
686686

687687
# Cost-optimized: stop when 2 agree
688-
dun loop --harnesses claude,gemini,codex --quorum 2 --cost-mode
688+
dun loop --harnesses claude,gemini,codex --quorum 2 --cost-optimized
689689

690690
# With escalation on conflict
691691
dun loop --harnesses claude,gemini --quorum unanimous --escalate
@@ -751,7 +751,7 @@ dun synth --task \"Write the quorum spec\" --harnesses codex@architect,claude@cr
751751

752752
| Risk | Impact | Likelihood | Mitigation |
753753
|------|--------|------------|------------|
754-
| 3x cost increase with quorum | Unexpected bills | High | Clear documentation, cost-mode default |
754+
| 3x cost increase with quorum | Unexpected bills | High | Clear documentation, cost-optimized default |
755755
| User confusion on conflict resolution | Stuck loops | Medium | Good defaults, clear prompts |
756756
| Stats storage grows unbounded | Disk usage | Low | Retention policy, compaction |
757757

docs/helix/02-design/technical-designs/TD-011-agent-quorum.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dun:
5858
## Interfaces and Config
5959

6060
- CLI:
61-
- `dun loop --quorum`, `--harnesses`, `--cost-mode`, `--escalate`.
61+
- `dun loop --quorum`, `--harnesses`, `--cost-optimized`, `--escalate`.
6262
- `dun quorum [--synthesize] --task "<prompt>" --harnesses ...`
6363
- `dun synth` = `dun quorum --synthesize`
6464
- Config: default quorum strategy, similarity threshold, harness personas,
@@ -79,7 +79,7 @@ dun:
7979
## Risks and Mitigations
8080

8181
- **Risk**: Conflicts slow down loops. **Mitigation**: allow `--prefer` and
82-
`--cost-mode` options.
82+
`--cost-optimized` options.
8383

8484
## Rollout / Compatibility
8585

docs/helix/03-test/test-plans/TP-011-agent-quorum.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ commands.
185185

186186
| Test | Condition | Expected |
187187
|------|-----------|----------|
188-
| TC-011-13a | `--cost-mode`, quorum 2, first 2 agree | Third harness not invoked |
189-
| TC-011-13b | `--cost-mode`, quorum 2, first 2 disagree | Third harness invoked |
190-
| TC-011-13c | `--cost-mode`, unanimous, first disagrees | Remaining harnesses not invoked |
188+
| TC-011-13a | `--cost-optimized`, quorum 2, first 2 agree | Third harness not invoked |
189+
| TC-011-13b | `--cost-optimized`, quorum 2, first 2 disagree | Third harness invoked |
190+
| TC-011-13c | `--cost-optimized`, unanimous, first disagrees | Remaining harnesses not invoked |
191191

192192
### TC-011-14: Agreement Tracking
193193

docs/helix/04-build/implementation-plans/IP-015-agent-quorum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ dun:
5151

5252
1. **Add new command surface**
5353
- Files: `cmd/dun/main.go`, new `cmd/dun/quorum.go`
54-
- Implement `dun quorum` with `--task`, `--quorum`, `--harnesses`, `--cost-mode`,
54+
- Implement `dun quorum` with `--task`, `--quorum`, `--harnesses`, `--cost-optimized`,
5555
`--escalate`, `--prefer`, `--similarity`, `--synthesize`, `--synthesizer`.
5656
- Implement `dun synth` as shorthand for `dun quorum --synthesize`.
5757

0 commit comments

Comments
 (0)