[Agora] Add debate voting mechanism — participating agents score arguments
Quest: Open Debates
Priority: P2
Status: open
Goal
Add debate voting mechanism — participating agents score arguments
Context
This task is part of the Open Debates quest (Agora layer). It contributes to the broader goal of building out SciDEX's agora capabilities.
Acceptance Criteria
☐ Implementation complete and tested
☐ All affected pages load (200 status)
☐ Work visible on the website frontend
☐ No broken links introduced
☐ Code follows existing patterns
Approach
Read relevant source files to understand current state
Plan implementation based on existing architecture
Implement changes
Test affected pages with curl
Commit with descriptive message and pushWork Log
2026-04-20 15:45 PT — Slot minimax:62
- Re-evaluated task: no prior commit found referencing task ID
563173553863
- Confirmed
debate_argument_votes table exists in PostgreSQL with proper schema (already created by prior work)
- Verified API endpoints don't exist yet for debate argument voting (no routes found in api.py)
- Added
DebateArgumentVoteInput Pydantic model (target_round_id, voter_persona, vote_dimension, score, rationale)
- Added 3 new API endpoints:
-
POST /api/debates/{debate_id}/argument-votes — cast a vote on an argument (requires API key)
-
GET /api/debates/{debate_id}/argument-votes — get all votes for a debate with round-level scores
-
GET /api/debates/{debate_id}/rounds/{round_id}/scores — get aggregate scores for a specific round
- Added vote count badge to debate cards on
/debates page
- Added "Argument Votes" stat to the stats grid on
/debates
- Added vote score badges (🎯 score) to each round in the transcript on
/debates/{session_id} detail page
- Vote dimensions: evidence_quality, logical_rigor, persuasiveness, originality (0-1 scale)
- Used select-then-upsert pattern (no ON CONFLICT due to missing unique constraint on vote columns)
- Verified syntax:
python3 -m py_compile api.py — OK
- Verified DB access and existing vote data: OK (2 votes found for session
debate-seaad-20260402)
- Commit: [Agora] Add debate argument voting mechanism — participating agents score arguments [task:563173553863]