Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
383 changes: 169 additions & 214 deletions .claude/handoff.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Thumbs.db
# Distribution
dist/
build/
*.egg-info/
*.egg-info/logs/
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This change replaces the ignore rule for *.egg-info/ directories with *.egg-info/logs/. This is likely a mistake as it stops ignoring the .egg-info directories themselves, only ignoring a logs subdirectory within them. If the goal was to ignore a top-level logs/ directory, it should be added as a separate line.

*.egg-info/
logs/

23 changes: 13 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ What lives here:
Good for you if: you've used Textual or want to learn it; you have
opinions on accessibility, color contrast, or keyboard ergonomics.

### 3. Unciv mod (JSON + Lua)
### 3. Unciv mod (JSON content + offline save-edit tool)

The mod side is the actual game. It defines The Operators civ, the
Session Forge building, tutorials, and the Lua hook that reads the
bridge's save exchange and applies per-city rewards at turn boundary.
The mod side is the actual game content. It defines The Operators
civ, the Session Forge building, tutorials, and the pantheon belief.

Unciv does NOT support Lua mod scripting or runtime hooks (verified
in `docs/unciv-research-2026-05-11.md`), so dynamic per-turn rewards
must be applied through an **external save-edit tool** that mutates
Unciv's save file while the game is closed (ADR-001's model). That
tool is the next missing piece of the project.

Files: `mod/ClaudeKingdoms/`. Install instructions:
`mod/ClaudeKingdoms/README.md`.
Expand All @@ -62,11 +67,11 @@ What lives here:
- `jsons/Buildings.json` — Session Forge + Charter Hall
- `jsons/Tutorials.json` — six tutorials including the no-decay promise
- `jsons/Beliefs.json` — pantheon for theme
- `mod.lua` — runtime hook reading `kingdom_save.json`
- `ModOptions.json` — Unciv mod metadata

Good for you if: you've modded Unciv or another Civ-like, you read
Lua fluently, or you want to author medieval-flavor content.
Good for you if: you've modded Unciv or another Civ-like, you want
to author medieval-flavor content, or you'd like to build the
offline save-edit tool that closes the bridge↔Unciv loop.

### 4. Documentation (Markdown, no code)

Expand Down Expand Up @@ -96,7 +101,7 @@ notice when an instruction doesn't match the code.
| Bridge → TUI schema compliance | Shared (Bridge + TUI) | Contract (`bridge/tests/test_prd_schema.py`) |
| Save exchange write/read round-trip | Bridge contributor | Integration |
| TUI state rendering from bridge payload | TUI contributor | Unit |
| Mod JSON / Lua | Mod contributor | Smoke (`bridge/tests/test_mod_jsons.py`) |
| Mod JSON content | Mod contributor | Smoke (`bridge/tests/test_mod_jsons.py`) |
| End-to-end vertical slice | Shared | Integration (`bridge/tests/test_e2e_vertical_slice.py`) |

CI threshold per PRD: **80%** coverage for bridge scoring + session
Expand Down Expand Up @@ -155,8 +160,6 @@ Some standing options if no labeled issues are open:
explanation.
- Markdown: 80-col soft limit, ATX headers (`#`), prefer tables for
status lists, fenced code blocks with language tags.
- Lua: 4-space indent, `local` for everything by default, no globals
outside an explicit `mod` table.
- JSON: 2-space indent, trailing commas NOT allowed (Unciv parses
with strict JSON).

Expand Down
277 changes: 0 additions & 277 deletions bridge/tests/test_integration.py

This file was deleted.

11 changes: 6 additions & 5 deletions bridge/tests/test_per_city_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,14 @@ def test_per_city_status_empty_when_no_sessions(tmp_path):


# ────────────────────────────────────────────────────────────────────────
# Mod-side contract sanity (no Lua runtime — just documents the keys)
# Downstream-consumer contract: lowercase, stable, machine-friendly values
# ────────────────────────────────────────────────────────────────────────

def test_per_city_status_uses_lowercase_status_values_for_lua_glyph_table():
"""mod.lua's STATUS_GLYPHS table is keyed by lowercase strings —
"active", "redirected", "waiting", etc. — so the bridge must emit
SessionStatus.value (already lowercase) verbatim.
def test_per_city_status_uses_lowercase_machine_friendly_values():
"""Downstream consumers (a future save-edit tool, or whatever
surface the eventual Unciv integration uses) need stable lowercase
keys. The bridge emits SessionStatus.value verbatim, which is
already lowercase, so a glyph/lookup table can key off it directly.
"""
sessions = [
_session("a", "c", SessionStatus.ACTIVE),
Expand Down
Loading
Loading