# phase-transition-gate.yaml
#
# Defines the gate between Phase 2 (school-side design + procurement)
# and Phase 3 (off-site vendor burn). Phase 3 happens only if every
# item below is satisfied. The teacher signs off; the vendor's
# licensed operator runs the test.
#
# This is a governance document, not a chemistry document. The most
# important rows are the ones about *paper* — vendor agreement,
# parent communication, insurance, named licensed operator. If any
# are missing, Phase 3 does not happen this term, no matter how good
# the design is.
#
# Status: DRAFT. Phase 3 cannot proceed until each box below is
# explicitly true. The teacher updates this file as gates close.

version: "0.1-draft"
date: "2026-05-08"

transition_to_phase_3_requires:

  # ── Engineering evidence ──────────────────────────────────────────
  engineering_evidence:
    - id: "ENG-1"
      requirement: "Phase 1 atmospheric LPG demo completed successfully on TA-01 brass insurance rig"
      evidence: "Lab Report 2 submitted by all students; load-cell data logged"
      status: pending

    - id: "ENG-2"
      requirement: "Phase 1 atmospheric LPG demo completed successfully on TA-02-plastic form study"
      evidence: "Photographic evidence of intact plastic chamber post-demo; nozzle alignment verified"
      status: pending

    - id: "ENG-3"
      requirement: "CAD model for TA-04 (copper chamber) frozen and reviewed"
      evidence: "STEP file under change control; signed off by Manufacturing Lead + teacher"
      status: pending

    - id: "ENG-4"
      requirement: "Computational Engineering prediction sheet for the vendor burn issued"
      evidence: "Markdown prediction sheet + CSV time series generated from Rust crate; reviewed by teacher"
      status: pending

    - id: "ENG-5"
      requirement: "Reconciliation between Phase 1 atmospheric prediction and measurement within ±25%"
      evidence: "If wider than ±25%, the prediction model has not been validated; do not extrapolate to Phase 3 without addressing residual"
      status: pending

  # ── Vendor agreement ──────────────────────────────────────────────
  vendor_agreement:
    - id: "VEN-1"
      requirement: "Three vendor RFQs received in writing"
      evidence: "Manufacturing team selection memo attached; each quote includes lead time, fabrication method (option H or L), pressure-test certification, telemetry deliverables"
      status: pending

    - id: "VEN-2"
      requirement: "Selected vendor named in writing; their licensed operator named"
      evidence: "Vendor name + ABN + operator name + license number in vendor selection memo"
      status: pending

    - id: "VEN-3"
      requirement: "Vendor signs off on DFM (design for manufacture) review of the STEP file"
      evidence: "Email or written DFM review from vendor; any required design changes flowed back to ICD"
      status: pending

    - id: "VEN-4"
      requirement: "Telemetry deliverable agreed in writing: CSV time series + MP4 video + burn-duration log"
      evidence: "Vendor agreement document referenced"
      status: pending

    - id: "VEN-5"
      requirement: "Vendor confirms pressurised combustion is within their licensed operation"
      evidence: "Vendor's WHS licence or equivalent referenced in agreement"
      status: pending

  # ── Insurance and indemnity ───────────────────────────────────────
  insurance:
    - id: "INS-1"
      requirement: "Vendor's public liability insurance covers third-party (student/school) observation"
      evidence: "Certificate of currency on file"
      status: pending

    - id: "INS-2"
      requirement: "School's insurance covers off-site educational observation by students"
      evidence: "Confirmed with school business manager"
      status: pending

  # ── Parent communication ──────────────────────────────────────────
  parent_communication:
    - id: "PAR-1"
      requirement: "Parents informed of the project's off-site Phase 3 + video-only observation model"
      evidence: "Communication sent at or before W1L1"
      status: pending

    - id: "PAR-2"
      requirement: "If live-streaming is intended, parents have consented to student image appearing on any vendor-side recording"
      evidence: "Consent forms returned for any in-person observers (none expected)"
      status: pending

  # ── School governance ─────────────────────────────────────────────
  school_governance:
    - id: "GOV-1"
      requirement: "HoD Science has approved the program scope and safety case"
      evidence: "Signed safety-case.qmd or equivalent record"
      status: pending

    - id: "GOV-2"
      requirement: "WHS Officer has approved at-school chemistry experiments"
      evidence: "Signed safety-case.qmd or equivalent record"
      status: pending

    - id: "GOV-3"
      requirement: "Principal or delegate authority for off-site educational engagement (video observation) confirmed"
      evidence: "Email confirmation referenced"
      status: pending

  # ── Phase 3 venue constraints (verified by Manufacturing team) ───
  venue:
    - id: "VEN-V1"
      requirement: "Test cell is on the vendor's own licensed premises"
      evidence: "Vendor address + licence number in agreement"
      status: pending

    - id: "VEN-V2"
      requirement: "Approved fire suppression on site at vendor cell"
      evidence: "Vendor confirms per their WHS"
      status: pending

    - id: "VEN-V3"
      requirement: "Minimum supervising adults at vendor cell: vendor's named licensed operator + one additional vendor staff member or technician"
      evidence: "Vendor confirms per their SOP"
      status: pending

# All-clear conditions for Phase 3 to run:
#   Every status field above must be `confirmed` (with linked evidence)
#   OR explicitly `not-applicable` (with rationale).
#
# If even one is `pending` or `failed` at the planned Phase 3 date,
# Phase 3 does not happen this term. The project still passes; the
# reconciliation lab report is written against the predicted telemetry
# shape rather than measured.
#
# Reverting this gate to `pending` after it has been satisfied
# requires teacher sign-off. There is no informal way to lower the gate.
