Files
project-lyra/pyproject.toml
T
serversdown cb99a8bcee feat: deterministic equity/board-reading tool (math via tools, not LLM)
Lyra was hallucinating poker facts — phantom flushes, missed straights, wrong
equity, only correcting when spoon-fed. Board reading + equity are combinatorial
facts an LLM can't do reliably; this is exactly the "math via deterministic
tools, never the LLM" principle.

- lyra/equity.py: treys-backed analyze(hero, villain, board) -> made hands,
  who's ahead, EXACT equity (enumerated), and outs (one to come). Handles 'Jx'
  unknown suits (assigned rainbow to avoid phantom flushes); rejects 'x'/dupes.
- analyze_spot tool wired into chat; persona MANDATES it for any equity/board/
  who's-ahead/outs question — never eyeballed.
- tests on the real JJ-vs-65 hand: flop 78.7%, turn villain straight + hero 6.8%
  with outs "9s 9h 9c" (correctly excludes 9d, which makes villain a flush).

Verified live: she now calls the tool and reports exact numbers, no hallucinated
flush.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 18:45:40 +00:00

47 lines
948 B
TOML

[project]
name = "lyra"
version = "0.1.0"
description = "Persistent, autonomous AI assistant"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"fastapi>=0.115",
"httpx>=0.28.1",
"numpy>=2.4.5",
"openai>=2.37.0",
"python-dotenv>=1.2.2",
"treys>=0.1.8",
"uvicorn[standard]>=0.34",
]
[project.scripts]
lyra = "lyra.__main__:main"
lyra-web = "lyra.web.server:serve"
lyra-import = "lyra.ingest:main"
lyra-summarize = "lyra.summary:main"
lyra-profile = "lyra.profile:main"
lyra-era = "lyra.era:main"
lyra-narrative = "lyra.narrative:main"
lyra-reflect = "lyra.self_state:main"
lyra-dream = "lyra.dream:main"
[dependency-groups]
dev = [
"pytest>=8.0",
"ruff>=0.6",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["lyra"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.pytest.ini_options]
testpaths = ["tests"]