manifest: qloops.loop/v1

# Check a draft against an explicit rubric before allowing the next workflow step.
# OpenRouter example: configure the model explicitly. CLI acceptance uses the caller interface.

id: strict-gate
name: "Strict gate: a check that is allowed to say no"
version: 1.1.0
description: >
  Runs a machine check that ends the run when it fails, instead of handing the
  decision to a person. The shape to use when the answer is not negotiable.
owner: oleg
enabled: true

triggers:
  - kind: manual

settings:
  budgetUsd: 0.10

steps:
  - id: sg-fetch
    kind: fetch
    config:
      name: "Read rate"
      url: "{{env.QLOOP_SOURCE_URL}}"
      format: json
      timeoutSec: "20"

  - id: sg-check
    kind: approval-gate
    config:
      name: "Above the line?"
      reviewer: agent
      rubric: >
        The payload holds `json.rates.UAH`. PASS only if it is above 42.0.
        Otherwise FAIL.
      escalateOn: none

  - id: sg-send
    kind: api-request
    config:
      name: "Send the alert"
      method: POST
      url: "{{env.QLOOP_WEBHOOK_URL}}"
      expect: "2xx"
      timeoutSec: "20"
      body: '{"rate":"{{steps.Read rate.output.json.rates.UAH}}"}'
