diff --git a/.claude/skills/world-building/SKILL.md b/.claude/skills/world-building/SKILL.md index 53aded7..b54e1a2 100644 --- a/.claude/skills/world-building/SKILL.md +++ b/.claude/skills/world-building/SKILL.md @@ -112,10 +112,11 @@ default — it's what the five-rung gate system exists to deliver. ### 4. Build and verify — not done until green -The build regenerates `content/world/` + `content/server/` from the bible and the -`--check` gate is what CI enforces (`.github/workflows/content-build.yml`). Run, -from repo root, with the repo venv active (`source .venv/bin/activate`) — the -`content_build` package lives under `tools/`, so `PYTHONPATH=tools` is required: +The build regenerates `content/world/` + `content/server/` from the bible, and the +`--check` gate is what proves it stayed valid. **There is no CI — nothing runs +these for you.** You are the gate; run them, from repo root, with the repo venv +active (`source .venv/bin/activate`). The `content_build` package lives under +`tools/`, so `PYTHONPATH=tools` is required: ``` PYTHONPATH=tools python -m content_build # regenerate world/ + server/ from lore/ @@ -123,6 +124,19 @@ PYTHONPATH=tools python -m content_build --check # must exit 0: fresh, valid, PYTHONPATH=tools python -m pytest tools/content_build/tests -q # schema + secrecy + cli coverage ``` +**If the build changed anything under `content/world/`, also run the client +suite** — `bash client/run_tests.sh` (must be fully green): + +``` +bash client/run_tests.sh # Godot/GUT; content/world/ is a CLIENT INPUT, not just build output +``` + +That last one is not optional and not paranoia. `client/scripts/content/content_db.gd` +loads `content/world/`, and `client/tests/unit/test_content_db.gd` asserts on it — so +**deleting or renaming generated content is a client change.** A content purge once +left the client erroring on a vanished directory and turned a secrecy assertion into a +test that passed while checking nothing. Nothing else will catch that for you. + (If `python` isn't found, the venv isn't active — use `.venv/bin/python`.) If any step fails, read the `BUILD FAILED` / `STALE:` message — it names the source file and line — fix the bible, rebuild, recheck. Never hand-edit the diff --git a/.github/workflows/content-build.yml b/.github/workflows/content-build.yml deleted file mode 100644 index 50d7b90..0000000 --- a/.github/workflows/content-build.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: content-build -on: - push: - paths: ["content/**", "tools/content_build/**", ".github/workflows/content-build.yml"] - pull_request: - paths: ["content/**", "tools/content_build/**"] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - run: pip install -r tools/requirements-dev.txt - - name: Unit tests - run: PYTHONPATH=tools python -m pytest tools/content_build/tests -q - - name: Content freshness + validity - run: PYTHONPATH=tools python -m content_build --check diff --git a/tools/content_build/tests/test_real_content.py b/tools/content_build/tests/test_real_content.py index a2efe07..3c322b2 100644 --- a/tools/content_build/tests/test_real_content.py +++ b/tools/content_build/tests/test_real_content.py @@ -1,6 +1,8 @@ -"""Smoke gate: the real Margreave bible builds clean. Local mirror of the CI -content-build workflow's `--check` step — asserts freshness/validity only, -never specific entities (that's what made the old Duncarrow-era test brittle).""" +"""Smoke gate: the real Margreave bible builds clean. + +There is no CI — this test IS the `--check` gate (freshness, validity, no +orphans, no secrecy leaks). It asserts those properties only, never specific +entities; pinning entities is what made the old Duncarrow-era test brittle.""" from pathlib import Path