Example — fix failed CI

name: Fix failed CI
description: Investigate failed GitHub Actions runs on main.
enabled: true
on:
  workflow_run:
    conclusion: [failure]
    branches: [main]
steps:
  - id: gate
    type: check
    if: "{{failed}} == true"
    else: stop
  - id: investigate
    type: agent
    agent: developer
    repository: "{{repo.full_name}}"
    branch: "{{head_branch}}"
    prompt: |
      GitHub Actions failed for {{workflow.name}} on {{head_branch}}.
      Repo: {{repo.full_name}}
      Failed jobs: {{failed_jobs}}
      Run: {{run.url}}

      Before changing anything, locate .github/workflows/{{workflow.file}},
      read the failing job definition, and inspect the code those jobs exercise.
      Propose a minimal fix and summarize next steps.
  - id: notify
    type: notify
    title: CI investigation finished
    body: "{{workflow.name}} on {{head_branch}} — {{steps.investigate.summary}}"