schema: https://opendataproducts.org/odpr-v1.0/schema/odpr.yaml
version: "1.0"
kind: Recipe
recipe:
  metadata:
    id: RCP-GRAPH-001
    name:
      en: Graph Triggered Impact Review
    description:
      en: Review graph impact when a node status changes to production.
  version: "1.0.0"
  type: agent
  scope: graph
  intent: |
    Explain why the changed graph node matters and what business review result
    the impact analysis should support.
  instructions: |
    Use retrieved graph context only. Separate visible graph facts from missing
    context, and do not treat the impact review as business approval.
  groundingTo:
    nodeTypes:
      - DataProduct
      - UseCase
      - BusinessObjective
      - Owner
    edgeTypes:
      - uses
      - supports
      - enables
      - dependsOn
  trigger:
    source: odpg
    event: node.attributeChanged
    subject:
      nodeType: "*"
      attribute:
        name: status
        to: production
  graphContext:
    depth: 2
  contextFormat:
    primary: gcf
    fallback:
      - yaml
      - toon
  execution:
    mode: hosted
    runtimeRef: runtime-profiles/examples/production-quality.yaml#production-quality
  steps:
    - id: explain-impact
      discoveryType: produce-findings-and-recommendations
      kind: graph
      input: generated/graph-context.gcf
      output: generated/graph-impact.md
      intent: |
        Explain the visible impact of the changed graph node.
      instructions: |
        Use the connected graph neighborhood to identify affected context,
        likely review concerns, and the next human decision.
      iterationLimit: 3
      exitWhen: |
        Stop when the generated result is ready for review or when another pass
        over the retrieved graph context does not add materially new grounding.
  outputs:
    - id: graph-impact
      path: generated/graph-impact.md
  review:
    required: true
