# Integration Entry Gate
# Validates inputs before integration verification

rules:
  - id: tdd-stage-complete
    type: yaml-field-check
    blocking: true
    message: "Pipeline state must show tdd-cycle as completed"
    file: "{pipeline_state}"
    required_fields:
      - tdd-cycle

  - id: features-have-commits
    type: regex-check
    blocking: true
    message: "Feature tasks must have corresponding git commits"
    file: "{task_split}"
    pattern: "T-\\d+"

  - id: nfr-metrics-defined
    type: regex-check
    blocking: false
    message: "DFX budget should have quantifiable metrics for non-functional testing"
    file: "{arch_doc}"
    pattern: "\\d+\\s*(ms|s|MB|GB|%|req/s|RPS|QPS)"
