# Release Entry Gate
# Validates inputs before release packaging

rules:
  - id: integration-complete
    type: yaml-field-check
    blocking: true
    message: "Pipeline state must show integration-verify as completed"
    file: "{pipeline_state}"
    required_fields:
      - integration-verify

  - id: all-features-merged
    type: regex-check
    blocking: true
    message: "All features must be fully merged"
    file: "{task_split}"
    pattern: "merged"

  - id: no-open-defects-release
    type: exec
    blocking: true
    message: "No open defects allowed before release"
    command: "test $(find {project_root}/defects -name '*.open.md' 2>/dev/null | wc -l) -eq 0"

  - id: changelog-updated
    type: section-check
    blocking: false
    message: "CHANGELOG.md should be updated for this release"
    file: "{changelog}"
    required_sections: 1
