# Sprint 31: Bedrock — CI Tasks **Goal:** Complete Phase 1 wiki content (cultural sweep, GTTR depth, star map popups) and refactor accumulated complexity in atlas.rs, main.gd, and Python tooling. **Branch:** `sprint-31/ci` **Agents:** Justine (build/deploy), Hoshe (QA) ## New Tickets | # | Title | Blocked by | |---|-------|------------| | #777 | Add ruff linting + shared DB path module for Python scripts | — | Use `tooling/db/ticket show ` for full details. ## Key Decisions - `decisions/process.md` — development process decisions ## Notes ### #777 ruff linting + shared DB path module (refactor) Python scripts in `tooling/db/` lack linting and share duplicated patterns. **Deliver:** 1. **pyproject.toml** at repo root with ruff config (line length, target Python version, rule selection) 2. **Shared module** `tooling/db/common.py` extracting: - `resolve_db_path()` — uses `PROJECT_DB_PATH` env var with parent-dir fallback - `load_config()` — reads `tooling/db/config.json` - `get_connection()` — returns WAL-mode SQLite connection 3. **Update all consumers** — `sqlite_connector.py`, `ticket`, `sprint`, `decisions_sync.py` to import from `common.py` instead of duplicating 4. **Pre-push hook integration** — add `ruff check tooling/` to the pre-push hook alongside GDScript and Rust checks 5. **Makefile target** — `make lint-python` running ruff **Key files:** - `tooling/db/sqlite_connector.py` — current DB path resolution - `tooling/db/ticket` — duplicated resolve pattern - `tooling/db/sprint` — duplicated resolve pattern - `tooling/db/decisions_sync.py` — duplicated resolve pattern - `tooling/db-backup` — bash equivalent **Verify:** `ruff check tooling/` passes. All DB CLI commands still work (`tooling/db/ticket count`, `tooling/db/sprint status`). ## Dependency Chain ``` #777 (ruff + shared module) → standalone ``` ## PR Workflow ```bash tea pr create --repo jpmschweitzer/settled-reach --login schweitz \ --title "chore(ci): Sprint 31 — ruff linting + shared DB module" \ --description "body" --base main --head sprint-31/ci ```