feat: add minority opinion detection for ranking disagreements #129
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds minority opinion detection to flag when a significant portion of council members disagree with the consensus ranking.
Changes
Backend (
backend/council.py):detect_minority_opinions()functionrun_full_council()metadataFrontend:
Stage2.jsx: AddedminorityOpinionsprop and display componentStage2.css: Added warning-styled card with overvalued/undervalued badgesChatInterface.jsx: Pass minority_opinions to Stage2Validation
8 test cases in
tests/test_minority_opinions.py:test_no_minority_when_consensustest_minority_detected_with_dissenttest_minority_direction_undervaluedtest_below_threshold_not_flaggedtest_within_tolerance_not_flaggedtest_empty_inputstest_5_model_realistic_scenariotest_custom_thresholdDependencies
This PR builds on the tournament ranking feature (PR #128) which provides the consensus baseline.
Test plan
python3 tests/test_minority_opinions.py- all 8 tests pass🤖 Generated with Claude Code