Phillip Tarrant 6589d7c4ed fix(creation-screen): the guards did not guard
Review found three tests in test_character_creation_screen.gd could not fail
against the bug they named — including both tests claiming to enforce §7
(Luck is invisible) and the only test covering origin->calling gating. The
five-ability-cards test asserted the script's own range(5) loop bound, not
the scene. The Luck sweep filtered on `Label` and missed both RichTextLabels
(the only nodes rendering authored prose) plus every Button and the
LineEdit. The reroll test's pool assertion already held true before the
reroll ran. The origin-gating test ran only against the deserter origin,
which allows all 7 callings, so shown==allowed was a trivial 7==7.

Rewrote all four to assert against the scene, the rules tables, or a
restrictive injected origin instead of values the code already guaranteed.
Added a node-count guard tying authored cards/chips to Races/Callings/
Skills/Attributes table sizes. Deleted the test-only
_complete_a_valid_draft_for_test() from the shipped Control and replaced it
with a test-file helper that drives the real click handlers, closing the
gap where no test touched _on_race_pressed/_on_calling_pressed/
_on_pool_pressed/_on_bonus_pressed at all. Guarded _ready() against a
degenerate origin (empty/missing allowed_callings) indexing an empty array.

Each fixed guard was deliberately re-broken and confirmed red before being
reverted (see .superpowers/sdd/task-6-report-fix.md, gitignored). 291 tests
green, up from 289.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 15:19:10 -05:00
2026-07-11 11:13:16 -05:00
2026-07-09 11:17:54 -05:00

coc-rpg

AI-driven single-player, party-based fantasy RPG. Godot 4 client, FastAPI proxy, AI as Dungeon Master.

Read CLAUDE.md first — project charter and working agreement. It is the source of truth. If code disagrees with it, the charter wins until the charter is changed.

The one rule

Code owns state. AI owns text. (charter §2)

Repo layout

/client        Godot 4.7 game client (GDScript) — ALL game state, ALL game rules
  /docs        Client-specific docs (scenes, input, combat wiring)
/api           FastAPI proxy — auth, metering, prompt routing, logging (charter §4)
  /docs        API-specific docs (endpoints, model routing, deploy)
  /prompts     Role prompts — source code, versioned, reviewed (charter §5, §16)
/content       Authored game data — quests, NPC knowledge lists, fallback text
  /quests      Story skeletons and quest definitions
  /npcs        Per-NPC knowledge lists (charter §6 — "the whole design")
  /fallback    Authored degraded-DM text for every AI surface (charter §13)
/docs          Cross-cutting docs — roadmap, ADRs, planning affecting both sides
  /adr         Architecture Decision Records

The three processes (charter §4)

client (GDScript)  ──HTTP──▶  api (FastAPI)  ──▶  Replicate / Ollama

The client holds no API key, ever. It knows one base URL and a set of role endpoints. It sends game state, receives text.

Description
No description provided
Readme 3.3 MiB
Languages
Text 100%