# Task Decomposition Exit Gate
# Validates task decomposition outputs

rules:
  - id: task-split-exists
    type: yaml-field-check
    blocking: true
    message: "task-split.md must exist with features and tasks sections"
    file: "{task_split}"
    required_fields:
      - features
      - tasks

  - id: tasks-have-ids
    type: regex-check
    blocking: true
    message: "Each task must have a T-NNN ID"
    file: "{task_split}"
    pattern: "T-\\d+"

  - id: tasks-have-type-label
    type: regex-check
    blocking: true
    message: "Each task must be labeled HITL or AFK"
    file: "{task_split}"
    pattern: "(hitl|afk)"

  - id: tasks-have-acceptance
    type: regex-check
    blocking: false
    message: "Tasks should have acceptance criteria"
    file: "{task_split}"
    pattern: "acceptance"
