Skip to content

Add Cloud Agent dev environment + mod validation tooling - #1

Draft
IAALAI wants to merge 1 commit into
devfrom
cursor/setup-dev-environment-6644
Draft

Add Cloud Agent dev environment + mod validation tooling#1
IAALAI wants to merge 1 commit into
devfrom
cursor/setup-dev-environment-6644

Conversation

@IAALAI

@IAALAI IAALAI commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

Sets up a reproducible, repo-managed development environment for the ttl Victoria 3 content mod. The mod has no traditional build system — "development" means editing Paradox script (.txt), localization (.yml), and image assets. The relevant "application" for a mod developer is a validator, so this environment installs the canonical one and adds an offline validation harness.

Because .cursor/environment.json is committed, this becomes the highest-precedence environment source: merging this PR activates the environment for future Cloud Agents (no dashboard Save needed).

Changes

  • .cursor/environment.json — repo-managed Cloud Agent environment; runs the install script on setup.
  • .cursor/install.sh — idempotent bootstrap that installs vic3-tiger v1.19.0 (the canonical Victoria 3 mod validator) to /usr/local/bin and makes the validation scripts executable. Retries downloads with exponential backoff.
  • scripts/validate_mod.py — dependency-free offline well-formedness checker:
    • Paradox script { } brace balance and quote-termination (comment- and string-aware).
    • Localization .yml UTF-8 BOM, l_<language>: header, and KEY:<n> "value" entry format.
    • .metadata/metadata.json JSON validity.
    • .png asset signature integrity.
    • Exits non-zero on error (usable as a CI/pre-commit check).
  • scripts/validate.sh — wrapper that runs the offline checks and, when a Victoria 3 install is available via VIC3_DIR, the full vic3-tiger semantic validation.

Why an offline harness

vic3-tiger performs full cross-reference validation but requires the copyrighted Victoria 3 game files, which cannot be shipped in a Cloud Agent VM. The offline harness runs the meaningful checks that do not need the base game, so the environment has a working end-to-end validation flow out of the box. Full semantic validation is a single command away for anyone with the game installed.

Validation

  • Install script runs cleanly and is idempotent (second run is a no-op).
  • scripts/validate.sh validates all 24 mod files: 0 errors, 0 warnings.
  • Verified the checker catches real errors on a deliberately broken fixture (unbalanced brace, missing BOM, unterminated quote, invalid JSON) and exits non-zero.
  • Environment build bld-20260806-ae0f6634-b787-4b9e-830e-e1353496187d SUCCEEDED (fresh git checkout + install).
  • Booted a fresh Cloud Agent from that build and re-ran all checks: vic3-tiger 1.19.0 and python3 on PATH, setup files present, harness clean (24 files, 0 errors), and broken-fixture detection confirmed.
Open in Web Open in Cursor 

- .cursor/environment.json + install.sh install vic3-tiger (canonical
  Victoria 3 mod validator) idempotently.
- scripts/validate_mod.py: offline well-formedness checks (Paradox script
  brace/quote balance, localization BOM/format, metadata JSON, PNG signature).
- scripts/validate.sh: runs the offline checks and, when a Victoria 3 game
  directory is available (VIC3_DIR), the full vic3-tiger validation.

Co-authored-by: IAALAI <iaalai@iaalai.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants