Skip to content

routines: schedule bounded recurring task and agent actions #36

Description

@guicybercode

Phase

Post-MVP. Do not implement before task lifecycle, Maestro policies, and notification delivery are stable.

Context

Recurring review, test, and maintenance workflows are useful, but an unrestricted scheduler can create infinite loops, orphan sessions, and surprising repository mutations.

Goal

Add local, durable Routines that execute typed CLI Master operations on a schedule.

Scope

  • Define a versioned routine with schedule, project/task target, typed actions, limits, and notification policy.
  • Support actions such as refresh Git status, start an approved task template, send a message, run an approved check, or request review.
  • Persist next/last run and outcomes.
  • Handle daemon downtime and missed runs explicitly.
  • Provide enable, disable, run-now, pause-all, and history controls.
  • Use a fake clock and deterministic scheduler tests.

Acceptance criteria

  • Routines cannot contain arbitrary shell strings.
  • Every action goes through the same validation and confirmation policy as an interactive request.
  • Missed runs never cause an unbounded catch-up storm.
  • Per-routine and global concurrency/session limits are enforced.
  • A failing routine backs off and notifies instead of retrying forever.
  • Disabled agents, moved projects, dirty worktrees, and unavailable Git fail safely.
  • Users can inspect the next action before enabling a routine.
  • Routine history omits prompts, env values, terminal output, and secrets.
  • Linux suspend/resume and macOS sleep/wake behavior are covered.

Out of scope

Cloud scheduling, remote workers, and mobile push infrastructure.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions