name: Product CI (PMOS starter)

# PMOS kit starter CI (D58) — copy to .github/workflows/ alongside pmos-gate.yml.
# A fresh repo's Quality Gate must NOT be silently empty: the product-tests step below FAILS
# UNTIL you wire your real tests (or consciously replace the body with a dated waiver line).
# That failure is the design working — an empty tier 1 quietly hands first-line defense to the
# leniency-prone Review Gate, which is exactly the trap this template exists to prevent.

on:
  pull_request:
  push:
    branches: [main]

permissions:
  contents: read

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

      - name: PMOS rubric well-formedness
        run: python3 pmos/planning/evals/check_rubrics.py

      - name: Product tests (WIRE ME)
        run: |
          # Replace this block with your product's real test command(s), e.g.:
          #   npm ci && npm test
          #   pytest
          #   go test ./...
          # If this repo GENUINELY has nothing testable yet, replace the two lines below with a
          # dated waiver comment (e.g. "# 2026-07-18 waived: docs-only repo") and `exit 0` —
          # the waiver then lives visibly in your git history.
          echo "::error::Quality Gate is not wired — replace the 'Product tests (WIRE ME)' step body with your test command (or a dated waiver). An empty tier 1 is the leniency trap (PMOS D58)."
          exit 1
