Skip to content

Commit 03d1c7c

Browse files
RMANOVclaude
andcommitted
feat(v0.9.0): unhackable TruthScore rating system for public knowledge
Content-deterministic, cryptographically-bound quality ratings where scores are functions of content — not popularity. You cannot game the score without genuinely improving the knowledge. Every rating is bound to exact content via SHA256; edit one observation and all ratings reset to zero. Anti-gaming architecture: - Self-rating blocked (rater_id ≠ publisher_id, enforced at write time) - Identity set server-side (never from user input) - One rating per rater per content version (UNIQUE constraint) - Logarithmic diminishing returns prevent coordinated manipulation - Burst detection flags anomalous rating patterns automatically - Content padding dilutes scores — specificity is rewarded, not volume New MCP tools: rate_public_knowledge, get_knowledge_ratings, update_verification. Enhanced: search_public_knowledge (+sort_by, +min_truth_score, +TruthScore in results). Bridge: ratings export/import with anti-gaming validation on pull. Task Tray: color-coded TruthScore badges (🟢>0.7, 🟡≥0.4, 🔴<0.4, ⬜ unrated). Schema: knowledge_ratings + rating_anomalies tables, 6 migrations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 140b5b9 commit 03d1c7c

3 files changed

Lines changed: 583 additions & 2 deletions

File tree

db_utils.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,18 @@
4343
SHARE_TYPES = ("entity", "relation", "all")
4444
ENTITY_ORIGINS = ("local",) # "shared:{username}" added dynamically
4545

46+
# v0.9.0: Quality rating constants (HARDCODED — not configurable to prevent gaming)
47+
VERIFICATION_OUTCOMES = ("confirmed", "contradicted", "inconclusive")
48+
VERIFICATION_WEIGHTS = {"confirmed": 1.0, "inconclusive": 0.5, "contradicted": 0.0}
49+
50+
# Composite score weights (sealed)
51+
IQ_WEIGHTS = {"specificity": 0.35, "falsifiability": 0.25, "internal_consistency": 0.25, "novelty": 0.15}
52+
TIER_WEIGHTS = {"iq": 0.40, "verification": 0.35, "cross_validation": 0.25}
53+
54+
# Anomaly detection
55+
RATING_BURST_THRESHOLD = 5
56+
RATING_BURST_WINDOW_HOURS = 24
57+
4658
PRIORITY_RANK = {p: i for i, p in enumerate(TASK_PRIORITIES)}
4759

4860
PRIORITY_COLORS = {

0 commit comments

Comments
 (0)