magicciv/tools
autocommit cea53e1ee4 feat(p2-73): 🎨 generate ui_theme.tres from design tokens + global apply + color() accessor
Close the gap where the design system (.project/designs/design-tokens.json)
drove the React guide but not the Godot game.

- tools/build-ui-theme.py: compiles the W3C/style-dictionary token SoT into a
  complete Godot Theme (7 StyleBoxFlat sub-resources, Button/Label/Panel/
  PanelContainer/ItemList/RichTextLabel colors + font sizes + corner radii/
  border widths per UI_DESIGN_SYSTEM.md §3/§4/§6). ui_theme.tres is now a
  GENERATED artifact; tokens are the single source of truth. Deterministic
  output (sorted keys, fixed float fmt, preserved uid://ui_theme_fantasy) with
  a --check drift gate. Idempotent; --import does not rewrite it.
- project.godot [gui] theme/custom: applies ui_theme.tres at viewport level so
  every non-overriding default Control renders the copper fantasy styling.
- ThemeAssets.color(name) -> Color: resolves dotted token names (accent.gold,
  semantic.positive, text.primary, …) against the metadata/tokens JSON blob
  baked into the .tres by the generator. Fully data-driven from the SoT, no
  hardcoded color map. (Godot rejects dots in Theme color item names, so the
  token table ships as resource metadata.) Unknown names return an explicit
  fallback. This is the API p2-74 will de-hardcode 45 scripts onto.
- ui_theme_proof.{tscn,gd}: bare-widget + color()-swatch proof scene.
  test_theme_assets_color.gd: GUT accessor coverage (5/5 headless).

Proof captured on apricot under weston, reviewed in conversation:
.project/screenshots/p2-73-ui-theme-proof.png. Workspace green — full unit
(16==16) and integration (18==18) suites show identical HEAD-baseline-vs-patch
failure counts, zero regressions; patch adds +5 passing tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 19:42:01 -07:00
..
docker chore(docker-tools/docker): 🔧 Update Dockerfile.mc-ai to use a newer base image version and adjust build dependencies for improved compatibility 2026-05-26 15:56:23 -07:00
schemas/autoplay
sprite-generation feat(sprites): OSS standin coverage p2-23..27 (536 PNGs) + xi-v11 charter 2026-06-04 04:40:14 -07:00
standin-sprites feat(sprites): OSS standin coverage p2-23..27 (536 PNGs) + xi-v11 charter 2026-06-04 04:40:14 -07:00
tests
add-encyclopedia-metadata.mjs
ai-arena.sh
apricot-batch-status.sh
audio-batch-01-kenney-interface.tsv feat(@projects): add homogeneous ai snowball test framework 2026-04-27 01:57:10 -07:00
audio-batch-02-kenney-impact.tsv feat(@projects/@magic-civilization): add new audio assets and objectives 2026-04-27 05:21:56 -07:00
audio-batch-03-music-weather.tsv feat(@projects/@magic-civilization): add new audio assets and objectives 2026-04-27 05:21:56 -07:00
audio-batch-04-fauna.tsv feat(audio): 🎵 add fauna sound assets 2026-04-27 05:32:30 -07:00
audio-batch-05-defeat.tsv feat(@projects/@magic-civilization): add audio option system and alternative ogg support 2026-04-28 17:29:11 -04:00
audio-batch-06-upgrades.tsv feat(@projects/audio): add victory audio tracks 2026-04-28 17:50:20 -04:00
audio-batch-07-victory-pool.tsv feat(@projects/audio): add victory audio tracks 2026-04-28 17:50:20 -04:00
audio-batch-08-perspective-stings.tsv feat(@projects/@magic-civilization): add defeated/victorious unit sound effects 2026-04-28 18:53:13 -04:00
audio-batch-09-completion.tsv feat(@projects/@magic-civilization): add new audio assets and manager 2026-04-29 01:59:56 -04:00
audio-batch-10-quality-fixes.tsv fix(@projects/@magic-civilization): 🐛 optimize audio file sizes 2026-04-29 04:33:20 -04:00
audio-batch-11-quality-fixes-2.tsv 🗑️ remove unused audio files 2026-04-29 15:52:36 -04:00
audio-batch-12-defeat-pool.tsv feat(@projects/@magic-civilization): update defeat_domination audio details 2026-04-29 17:59:37 -04:00
audio-batch-13-building-categories.tsv fix(@projects/@magic-civilization): 🐛 remove deleted audio files 2026-04-30 00:33:18 -04:00
audio-fetch-batch.sh feat(@projects/@magic-civilization): update objectives dashboard documentation 2026-04-29 16:10:03 -04:00
audio-fetch-options.sh feat(@projects/@magic-civilization): add audio option system and alternative ogg support 2026-04-28 17:29:11 -04:00
audio-generate-manifest.py feat(audio): generated audio.json manifest + ledger cleanup (p2-16) 2026-06-04 04:40:23 -07:00
audio-licenses-render.py feat(audio): generated audio.json manifest + ledger cleanup (p2-16) 2026-06-04 04:40:23 -07:00
audio-reorganize.py 🗑️ remove unused audio files 2026-04-29 15:52:36 -04:00
audio-split-to-subscription.py feat(@projects/@magic-civilization): implement subscription audio system 2026-04-30 04:20:19 -04:00
audio-validate.py feat(audio): generated audio.json manifest + ledger cleanup (p2-16) 2026-06-04 04:40:23 -07:00
audit-id-refs.py feat(world-gen): add forest lab tab integration 2026-04-30 15:20:01 -04:00
autoplay-batch.sh perf(autoplay): Implement container mode detection for AUTOPLAY_GODOD_BIN to skip rebuilds in Docker environments 2026-05-26 16:12:57 -07:00
autoplay-batch.sh.bak_20260518 feat(claude): Update agent configurations and batch scripts for Claude AI agents to improve worktree management and batch processing 2026-05-26 02:21:13 -07:00
autoplay-report.py
autoplay-result-schema.json
autoplay-validate.py
b5-aggregate.sh
batch-outcomes.sh
batch-quality-metrics.sh
batch-summary.py feat(@projects/@magic-civilization): add design tokens and culture system updates 2026-04-26 08:05:10 -07:00
batch-walltime.sh
batch-watch.sh
build-ui-theme.py feat(p2-73): 🎨 generate ui_theme.tres from design tokens + global apply + color() accessor 2026-06-04 19:42:01 -07:00
check-abstract-state-docs.sh
checklist-report.py fix(@projects/@magic-civilization): 🐛 fix median game length calculation 2026-05-16 23:52:14 -07:00
ci-autoplay-smoke.sh feat(@projects): mark batch freshness objective as complete 2026-05-03 04:23:51 -04:00
clan-signatures.py
climate-diag.ts
composite-arena.py
deploy-guide.sh docs(objectives): wave-1 status flips + index regen + new specs + tooling 2026-06-04 04:40:40 -07:00
detect-primary-monitor.py
determinism-audit.sh
determinism-compare.py
e2e-determinism-check.sh
ecology-report.sh
export-single.sh
export.sh
fauna-derive-check.py fix(@projects/@magic-civilization): 🐛 update fauna species data files 2026-05-04 07:12:33 -04:00
fauna-derive-stats.py fix(@projects/@magic-civilization): 🐛 update fauna species data files 2026-05-04 07:12:33 -04:00
fix-resource-graph.py fix(@projects/@magic-civilization): 🐛 update deposit resource files 2026-05-19 21:50:01 -07:00
forge-watch.sh feat(@projects): add forgejo watcher system 2026-05-04 03:52:04 -04:00
gd-rust-relationships.py feat(@projects): add gd-rust bridge integration 2026-04-30 10:35:20 -04:00
gen-fallback-sprites.py
grab-screen.py
gut-headless.sh feat(@projects): implement mcts-service extraction 2026-04-25 23:40:36 -07:00
huge-map-5clan.sh feat(@projects/@magic-civilization): add mcts telemetry service and parity tests 2026-05-16 07:26:37 -07:00
list-units-by-tier.py feat(@projects/@magic-civilization): add hex formation duality system 2026-04-26 19:36:51 -07:00
matchup-grid-audit.py
matchup-grid-report.py
matchup-grid.sh
matchup-metrics-report.py
measure-turn-latency.py
migrate-deposits-visibility.py feat(@projects): update resource deposits and objectives 2026-05-02 18:53:13 -04:00
migrate-fauna-biomes.py feat(@projects): add terrain and fauna systems 2026-05-01 02:06:53 -04:00
migrate-flora-biomes.py feat(@projects): add terrain and fauna systems 2026-05-01 02:06:53 -04:00
migrate-resources-visibility.py feat(@projects): add per-player tile observation cache 2026-05-02 18:30:14 -04:00
migrate-units-logistics.py feat(game-logistics): Add logistics chain schema fields, unit catalog support, and migration tool for Age of Dwarves game simulator 2026-05-26 02:21:14 -07:00
multi-difficulty-batch.sh
objectives-report.py feat(@projects/@magic-civilization): add hex terrain palette system 2026-04-26 21:08:49 -07:00
p1-clean-baseline.py chore(p1-clean): 🔧 Update baseline cleaning script to handle convergence testing requirements 2026-06-03 03:50:10 -07:00
p1-convergence-lens.py feat(tools): Introduce p1-convergence-lens.py script to sample P1 state at convergence turns ≤100 for D1 gate scoring analysis 2026-06-03 02:17:30 -07:00
p1-settle-analysis.py feat(p1-settle-analysis): Add P1 settlement analysis script for transaction validation and reporting 2026-05-28 20:19:19 -07:00
p1-survival-score.py feat(@projects/@magic-civilization): add survival scorecard tooling 2026-05-29 19:47:24 -06:00
population_sim.py
quality-gates-report.py fix(@projects/@magic-civilization): 🐛 resolve gut cleanup and update objectives 2026-04-26 00:37:04 -07:00
reclassify-units.py feat(@projects): add gdrust map page 2026-04-30 10:46:34 -04:00
regen-objectives-index.py docs(objectives): wave-1 status flips + index regen + new specs + tooling 2026-06-04 04:40:40 -07:00
release-notes.sh
run-benches.sh fix(@projects/@magic-civilization): 🐛 update fauna species data consistency 2026-05-03 20:02:25 -04:00
run-services.sh feat(@projects/@magic-civilization): add tile placement preview mode 2026-04-25 23:35:18 -07:00
screenshot.sh fix(@projects/magic-civilization): 🐛 handle flatpak sandboxed env vars 2026-05-10 03:23:31 -07:00
sign-mod.sh chore(game): 🔧 Update Godot project config and mod signing tool with new export templates and enhanced cryptographic key handling 2026-05-26 02:21:12 -07:00
sole-city-gate.py feat(sole-city-gate): Implement Sole City Gate integration tool for system interactions 2026-05-27 21:46:38 -07:00
sprite-license-audit.py feat(tools): Enhance sprite license audit tool to support expanded license types and improve audit precision 2026-06-03 05:46:13 -07:00
strip-legacy-biomes.py feat(@projects/@magic-civilization): add lab and hud system components 2026-05-01 22:23:54 -04:00
test_matchup_and_ultimate.py
test_personality_winrate.py
test_quality_metrics.py
time-to-peak-unit.py feat(@projects/@magic-civilization): add hex formation duality system 2026-04-26 19:36:51 -07:00
time-to-tier-peak.py feat(@projects/@magic-civilization): add edge terrain blending logic 2026-04-26 19:52:21 -07:00
validate-ecology-data.py
validate-game-data.py feat(simulator): unit quality consumer (p2-57c) + sim state 2026-06-04 04:39:57 -07:00
validate-i18n.py
validate-resource-graph.py fix(@projects/@magic-civilization): 🐛 update deposit resource files 2026-05-19 21:50:01 -07:00
validate-schemas.py