case0 / src /case_zero /schemas /clue.py
HusseinEid's picture
Case Zero - initial public release (fully local: Qwen2.5-1.5B via llama.cpp + Supertonic, custom pixel-noir SPA via gradio.Server)
414dc55
Raw
History Blame Contribute Delete
1.15 kB
"""Clues and facts - the discoverable evidence the player reasons over."""
from __future__ import annotations
from pydantic import BaseModel, ConfigDict, Field
from .enums import DiscoveryMethod
class Fact(BaseModel):
"""An atomic truth about the case. ``true_value`` lets a fact encode a claim
that is false (e.g. a suspect's stated whereabouts)."""
model_config = ConfigDict(frozen=True)
fact_id: str
statement: str
true_value: bool = True
loc_id: str | None = None
at_min: int | None = None
class Clue(BaseModel):
"""A piece of evidence the player can discover and present.
A clue listed in a suspect's ``AnchoredLie.breaks_on`` and whose
``contradicts_alibi_of`` names that suspect is "breaking" evidence.
"""
model_config = ConfigDict(frozen=True)
clue_id: str
name: str
reveal_text: str
discoverable_at_loc_id: str
discovery_method: DiscoveryMethod
supports_fact_id: str | None = None
points_to_sus_id: str | None = None
contradicts_alibi_of: str | None = None
is_red_herring: bool = False
weight: float = Field(default=1.0, ge=0.0, le=1.0)