ci-pipeline-and-gateslisted
Install: claude install-skill zakariaf/CatchLaw
# CI Pipeline & Gates
A CI gate is not a decorative green check — it converts one release-blocking contract into a check a build either passes or fails, *without trusting a human*. Keep the pipeline lean: one workflow file for most single-package apps, every job pinned, every gate traceable to a named contract, and an honest note wherever CI cannot prove the thing that actually matters.
Read the reference for the task at hand:
- `references/workflow-skeleton.md` — the copy-paste single-file `ci.yml`: pinned runner + toolchain, freshness gates, format/analyze, randomized tests, host-sqlite, coverage-strip, and the release-build job.
- `references/policy-grep-gate.md` — the grep-based invariant gate: the three-criteria bar, strip-comments-first, anchor-to-structure, accumulate-and-fail-once, write-the-reason-for-a-stranger.
Run `scripts/ci-gates.sh` and `scripts/banned-strings.sh` before a PR to reproduce the static gates locally.
## Non-negotiable rules
1. **Every gate maps to exactly one named contract — name it.** A check that serves no stated contract is not a gate: make it advisory and say so, or don't add it. Never invent a merge-blocker with nothing behind it. This keeps the pipeline auditable and stops gate-sprawl.
2. **Pin the runner AND the toolchain on every job.** `runs-on: ubuntu-24.04` (never `-latest` — image drift moves lcov/toolchain versions with no diff to review) and `subosito/flutter-action@v2` with an explicit `flutter-version` or `flutter-version-fi