Commit Graph

5 Commits

Author SHA1 Message Date
Dejvino
4b9078d41f TUI now owns the full game loop with embedded LLM engine
The game is now self-contained: run.sh starts the TUI, which calls the
LLM directly via engine.py. No external agent (OpenCode) needed.

- tools/engine.py: Game engine with prompt builder, litellm client,
  response parser (JSON block extraction), and state persistence
- tools/run.py: Refactored TUI with PLAY/CHAR/LOG/BOOK tabs. PLAY tab
  has streaming narrative pane, dynamic choice buttons, and text input.
  Game loop: scene -> input -> resolve -> archive -> apply -> scene
- session/config.json: LLM provider configuration (model, api_key, etc.)
- AGENTS.md: Updated to document the new architecture
- tools/__init__.py: Package marker for clean imports
- session/turn_description.md, turn_reaction.md: Deprecated - no longer
  needed now that the TUI drives the game loop internally
2026-06-25 12:12:04 +02:00
Dejvino
8ee5bc4979 book viewer: three-line nav center with page label, hints, progress bar 2026-06-25 08:20:35 +02:00
Dejvino
2cfd32ca55 formalize game loop, build store_turn.py, redesign TUI
- AGENTS.md: formalized game loop (print turn → wait for reaction →
  process → generate next turn), fixed project layout paths
- tools/store_turn.py: new script to append turn to book.md and clear
  temp files
- tools/run.py: TUI redesign — TODO always on top, CHARACTER/LOG tabs,
  TURN section with rendered markdown, input writes to turn_reaction.md,
  scrolling via VerticalScroll, log auto-populates from previous day,
  >>--- NOW ---> marker at log end with auto-scroll
- session/book.md: story book (append-only narrative)
- session/log/2026-06-25.md: today's log seeded from previous session
2026-06-25 07:35:30 +02:00
Dejvino
d68ea695f8 session: save progress — mill tunnel explored, construct bypassed, guards ambushed, weaver's study discovered 2026-06-24 23:44:49 +02:00
Dejvino
d4a19ef438 Initial commit: The Chaos TTRPG solo campaign skeleton
Locked: rules/ (deck cards + mechanics), tools/ (draw, roll, run)
Unlocked: session/ (character, world, tweaks, log)
Entry: run.sh launches the Textual TUI
2026-06-23 23:15:17 +02:00