Skip to content

Cron-based session scheduling #12

Description

@Allann

CURRENT STATE: OverwatchService is a background timer that detects stalled Kanban tasks and either nudges the assigned agent or escalates to a Decision. It is entirely reactive — it only responds to inactivity on existing tasks. There is no way to start new work on a schedule.

GAP: ADS cannot proactively trigger agent sessions at a set time or recurring interval without a human creating an inbox message first.

INSPIRED BY: Devin's Schedules feature — cron-expression-based resources that create new sessions automatically. Each schedule has a prompt, cron string, timezone, and enabled flag. They are managed as first-class API resources.

IMPLEMENT:

  1. Define a schedules.json schema at workspaces/{project}/schedules.json. Each entry: { id, agentSlug, prompt, cron, timezone, enabled, lastFiredAt }.
  2. Add a SchedulerService (registered alongside OverwatchService as a hosted background service). On each timer tick, iterate enabled schedules and evaluate whether the cron expression is due, accounting for timezone.
  3. Use a cron parsing library (e.g. Cronos, which is already common in .NET) for expression evaluation.
  4. When a schedule fires, write a new inbox message to workspaces/{project}/agents/{agentSlug}/inbox/ — this triggers the existing DispatcherService pipeline with no executor changes needed.
  5. Update lastFiredAt in schedules.json after firing to prevent double-fires.
  6. Add a Schedules UI page for managing schedule entries.

FILES TO CHANGE: new ai-dev.core/Services/SchedulerService.cs, new ai-dev.core/Features/Schedules/, ai-dev.core/Extensions/ (register hosted service), new UI page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions