Skip to content

Daemon: --agent flag on cron commands + multi-agent cron loading #46

Description

@ludusrusso

Parent PRD

#34

What to build

Two changes:

  1. CLI: Add --agent flag to wildgecu cron add, cron ls, and cron rm. When provided, operates on the named agent's crons/ directory.
  2. Daemon: At startup, scan all agents under agents/ and load their cron jobs into the scheduler. Each agent's cron jobs run with the agent's own model (resolved from config.yaml + global providers).

End-to-end: wildgecu cron add --agent=researcher creates a cron under agents/researcher/crons/. On daemon restart, the job runs with the researcher's model.

Acceptance criteria

  • --agent flag on cron add, cron ls, cron rm
  • Cron commands operate on agent's crons dir when flag is provided
  • Daemon scans agents/ at startup and discovers all agents' cron directories
  • Each agent's cron jobs are scheduled with the agent's own provider/model
  • Cron results written to the agent's cron-results/ directory
  • All jobs (main + all agents) run in one gocron.Scheduler
  • When --agent is omitted, existing behavior preserved
  • Daemon reload includes agent crons

Blocked by

User stories addressed

  • User story 9 (add cron to specific agent)
  • User story 10 (list crons for specific agent)
  • User story 14 (one daemon for all)
  • User story 15 (daemon loads all agent crons)
  • User story 16 (crons run with agent identity)

Metadata

Metadata

Assignees

No one assigned

    Labels

    prd/issueImplementation issue from a PRD

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions