# kit-gates.yml — CI backstop for the starter-kit's honesty gates.
# REFERENCE COPY — do not edit this file. Edit the installed working copy at
# .github/workflows/kit-gates.yml (installed by scripts/init.sh).
#
# Rationale: local pre-commit hooks are advisory by git's design —
# `git commit --no-verify` bypasses them silently, and no hook can prevent
# that. This workflow re-runs every gate where --no-verify cannot reach.
# A locally bypassed gate with green CI is a process violation, not a
# silent pass. (CHECKLIST.md B5)
#
# The readiness gate is expected to be RED until Phase A of the checklist
# completes — that redness is the gate working, not a failure to fix by
# weakening the check.
name: kit-gates

on:
  push:
  pull_request:

jobs:
  gates:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Planning-packet readiness (A3)
        run: sh scripts/check-readiness.sh

      - name: Claim discipline — README vs proofs (B6)
        run: sh scripts/check-claim-discipline.sh

      # --- Toolchain gate (Gate 5, observed in 21/44 suite projects) ---
      # A per-change toolchain gate (fmt/lint/test/build) belongs HERE, not
      # in the pre-commit hook: a hook that builds the workspace gets
      # --no-verify'd on its second use (frankensim). Uncomment and fill per
      # your language. Keep it under ~5 minutes or it becomes the bottleneck
      # everyone routes around.
      # - name: Format
      #   run: cargo fmt --check
      # - name: Lint
      #   run: cargo clippy -- -D warnings
      # - name: Test
      #   run: cargo test
