feat: work-type modes — Talk / Poker / Build / Explore / Study

The manual version of the architecture's `route` step: Brian points her at the
TYPE of work and her register + tools shift to match. Biggest single lever on the
'meh' problem (a mode card can demand decisive/technical/generative, countering
gpt-4o's default warm-vapor).

- modes.py: Build (heads-down engineering — decisive, concrete, tradeoffs, no
  listicles), Explore (open brainstorming — generative, riffs + honest catch,
  spawn threads, don't converge early), Study (poker review away from the table —
  analytical, GTO-aware, teaching; read-only lookups + analyze_spot). Cash relabeled
  Poker (key kept for compat).
- UI: mode selectors (desktop + mobile) get all five; badge taps now cycle modes.
- design: docs/COGNITION.md (the society-of-parts control-plane sketch).
- tests: presence + tool-gating for the new modes. Suite 85, ruff clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 03:43:37 +00:00
parent 97afa82594
commit f1f15972ac
4 changed files with 234 additions and 12 deletions
+16
View File
@@ -47,6 +47,22 @@ def test_every_mode_tool_exists(lyra):
assert set(mode.tools) <= set(tools.TOOLS), f"{mode.key} references unknown tools"
def test_work_modes_present_and_gated(lyra):
_, _, modes, tools = lyra
# the full set Brian chose
assert set(modes.MODES) == {"conversation", "poker_cash", "build", "explore", "study"}
# Build/Explore are conversational: base agency tools only, no live poker logging
for key in ("build", "explore"):
names = _names(tools.specs(modes.get(key).tools))
assert {"journal_write", "note", "think_about"} <= names
assert "log_hand" not in names and "start_session" not in names
assert modes.get(key).card # each has a real behavioral card
# Study = read-only review: lookups + equity, but no live logging
study = _names(tools.specs(modes.STUDY.tools))
assert {"running_stats", "analyze_spot", "player_profile"} <= study
assert "log_hand" not in study and "end_session" not in study
def test_mode_resolution_and_persistence(lyra):
memory, _, modes, _ = lyra
assert modes.get(None).key == modes.DEFAULT