--- title: "Sprint 4 — CI Briefing" description: "Pre-commit FactId typo check" type: sprint status: archived sprint: 4 team: "ci" --- # Sprint 4: Feel — CI Tasks **Goal:** Content conversion and authoring begins — wiki to YAML, content packs, monologue pool **Branch:** `ci` **Agents:** Justine (build/deploy), Hoshe (QA) ## New Tickets | # | Title | Priority | Blocked by | |---|-------|----------|------------| | #393 | Pre-commit FactId typo check | medium | — | Use `db/connectors/ticket show ` for full details. ## Key Decisions - `decisions/content.md` — D-035 (tag taxonomy, FactId references in dialogue/monologue) - `decisions/architecture.md` — D-030 (testability architecture) ## Notes **Pre-commit FactId typo check (#393):** Grep-based pre-commit hook validating FactId references in YAML content files against canonical `content/global/knowledge/facts.yaml`. Cheap v0.1 bridge until full cross-reference validation lands in v0.2 content tooling (C9). - **What exists:** - Content schema validation: `make validate-content` (Sprint 3, #392) — checks YAML structure - Canonical facts file: location TBD (either in `content/global/knowledge/` or `wiki/knowledge/facts.md` — coordinate with copy team on migration plan) - Pre-commit hook infrastructure: check `.git/hooks/` or `.husky/` directory (if not present, this ticket creates it) - **What to deliver:** Pre-commit hook script (bash/python) that: 1. Extracts all FactId references from YAML files in `content/` (searches for `prerequisite:` maps, `fact_id:` fields, or similar per schema) 2. Reads canonical FactId list from source of truth file 3. Fails commit if any referenced FactId is not in canonical list 4. Prints clear error: "Unknown FactId 'foo_bar' referenced in content/campaigns/.../detective/arrival.yaml line 47" - **Scope:** Structural validation only. Does NOT validate knowledge state progression logic (e.g., "can this FactId actually reach KnowsDetails?"). That's v0.2 semantic validation. - **Integration:** Runs automatically on `git commit`. Should be fast (<100ms) — this is a hot-path check that authors encounter frequently. Consider caching canonical FactId list. - **Files:** `.git/hooks/pre-commit` or `.husky/pre-commit` (create if missing), validation script in `tooling/validate-factids.sh` or similar This is a quality-of-life improvement for content authors. Prevents typos from reaching the repo and getting caught only when the game tries to load content. ## Dependency Chain ``` #393 (FactId typo check) → standalone (quality-of-life for content authors) ``` No blockers. No blocking other tickets. Can be implemented any time during Sprint 4. ## PR Workflow When ready to submit, create a PR with `tea` CLI. **All flags are required** to avoid TTY prompts (see CLAUDE.md "Gitea access" section): ```bash tea pr create --repo jpmschweitzer/settled-reach --login schweitz --title "feat(ci): description" --description "body" --base main --head ci ```