/**
 * schedules.ts — Scheduled evaluation configuration.
 *
 * Each schedule defines a recurring pipeline run with its own source,
 * mode, and delivery preferences. The GitHub Actions cron workflow reads
 * this config to determine which evaluations to run and when.
 *
 * Cron expressions use UTC timezone (GitHub Actions standard).
 *
 * @see docs/design-docs/report-store/implementation.md — Phase 5
 */

import { defineSchedules, env } from "../_vendor/ailf-core/index.js"

export default defineSchedules({
  schedules: [
    // Daily baseline — track score trends against production docs
    {
      name: "daily-baseline",
      cron: "0 2 * * *", // 2:00 AM UTC, every day
      mode: "baseline",
      source: "production",
      publish: true,
      compare: true,
      enabled: true,
    },

    // Weekly full decomposition — complete floor/ceiling/actual report
    {
      name: "weekly-full",
      cron: "0 3 * * 0", // 3:00 AM UTC, every Sunday
      mode: "full",
      source: "production",
      publish: true,
      compare: true,
      enabled: true,
    },
  ],

  // Digest — aggregates reports into periodic summaries
  digest: {
    enabled: true,
    cron: "0 9 * * 1", // 9:00 AM UTC, every Monday
    lookbackDays: 7,
    slackWebhookUrl: env("SLACK_WEBHOOK_URL", ""),
  },
})
