# PMOS portable kit — CI gate drop-in (D54). Copy to .github/workflows/pmos-gate.yml in the
# target repo. Enforces the loop fail-closed on every PR, entirely from files — no network.
name: pmos-gate
on:
  pull_request:
    types: [opened, synchronize, reopened, edited, labeled, unlabeled]

permissions:
  contents: read

jobs:
  anchored:
    name: anchored
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Initiative gate (file-backed)
        env:
          HEAD_REF: ${{ github.head_ref }}
          PR_BODY: ${{ github.event.pull_request.body }}
          PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
        run: bash pmos/scripts/gate-initiative.sh
  rubrics:
    name: rubrics
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Rubric well-formedness
        run: python3 pmos/planning/evals/check_rubrics.py
