Skip to content

feat(vote): add constrained-choice vote deliberation mode (CAC-09 / #3)#49

Merged
ernestprovo23 merged 3 commits into
mainfrom
feat/cac-09-vote-mode
Jun 29, 2026
Merged

feat(vote): add constrained-choice vote deliberation mode (CAC-09 / #3)#49
ernestprovo23 merged 3 commits into
mainfrom
feat/cac-09-vote-mode

Conversation

@ernestprovo23

Copy link
Copy Markdown
Member

Summary

  • Adds a new vote deliberation mode where each council member answers with a single letter choice (A, B, C, ...) from a constrained set
  • Implements VoteResult model (choices, votes, tally, winner, split), run_vote() mode function, Council.vote() / vote_sync(), CLI --mode vote --choices "A,B,C", and rich tally table renderer
  • 21 new tests in tests/test_vote_mode.py; 489/489 passing

Test plan

  • 489 tests passing locally
  • Word-boundary letter parsing (avoids false matches inside words like "cANnot")
  • Majority, split/tie, failed/unrecognised responses, CLI integration

Closes #3

…ssue #3)

- VoteResult model: choices, votes, tally, winner, split
- vote: VoteResult | None field on CouncilResult
- VOTE_SYSTEM prompt + vote_user() helper; bump SYNTHESIS_PROMPT_VERSION
- run_vote() in modes.py: fan-out with word-boundary letter parsing, tally, summary
- Council.vote() / vote_sync() with cache support
- CLI: --mode vote + --choices flag + _render_vote() rich tally table
- cache.make_key() + _cache_key() accept choices for vote mode keying
- 21 new tests in tests/test_vote_mode.py covering majority, split, parse edge cases, CLI
Add strict=False to zip() calls in cli.py and modes.py (B905).
Auto-sort import blocks in tests/test_vote_mode.py (I001).
ruff format --check was failing on these three files; running ruff format
brings them into compliance with the project formatter config.
@ernestprovo23 ernestprovo23 merged commit 91a81a9 into main Jun 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vote mode — structured majority with reported split

1 participant