crewboss v0.2.0
Scheduled automation

Routines crewboss routines

Schedule recurring audits with collectors, turn high and medium findings into deduplicated tasks, and publish one report per run on systemd or launchd.

v0.2.0
crewboss routines list | run <name> [--dry-run] | install | uninstall
Command Behavior Description
routines listinspect
crewboss routines list
default: —
Lists every configured and mod-enabled routine with its latest run.
routines runexecute
crewboss routines run <name> [--dry-run]
default: —
Runs collector and agent; --dry-run forces read mode and skips publishing.
routines installschedule
crewboss routines install
default: systemd / launchd
Creates user timers or launchd agents for enabled routines and removes disabled ones.
routines uninstallcleanup
crewboss routines uninstall
default: —
Removes all scheduled crewboss units or launchd plists.

Define a routine in crewboss.json

Add a routine with a schedule, tier (or explicit tool + model), prompt file, and optional shell collector:

{
  "tiers": { "small": [{"tool": "claude", "model": "haiku"}], "medium": [], "large": [] },
  "routines": [
    {
      "name": "deps-audit",
      "enabled": true,
      "schedule": "Mon *-*-* 09:00:00",
      "size": "small",
      "prompt": "agents/routines/deps-audit.md",
      "collect": "npm outdated --json || true",
      "timeout_minutes": 20,
      "project": "my-project",
      "assignee": "me"
    }
  ]
}

Required JSON report block

A routine prompt asks the agent to write a short Markdown summary and end with a JSON block:

{
  "status": "ok or issues",
  "summary": "one line",
  "findings": [{"severity": "high, medium or low", "title": "...", "evidence": "...", "proposal": "..."}],
  "memory": [{"scope": "routine:deps-audit", "text": "something worth remembering next time"}]
}

memory is optional and restricted to routine:<name> or project:<project> scopes.

Execution lifecycle

  1. Takes an exclusive per-routine lock so the same routine never overlaps.
  2. Picks a model like crewboss agent, never using paid candidates.
  3. Runs collect in the workspace (output above ~60 KB is attached as a file).
  4. Builds the prompt with preamble, open tasks (preventing duplicates), memory notes, collected data, and read/write instructions (--dry-run always uses read mode).
  5. Turns high and medium findings into tasks unless an open task with the same title and assignee already exists.
  6. Publishes exactly one report per run, including error or skipped outcomes.

Systemd (Linux) & launchd (macOS)

crewboss routines install installs schedules for enabled routines and removes disabled or deleted ones:

  • Linux: ~/.config/systemd/user/crewboss-<name>.service and .timer using OnCalendar.
  • macOS: ~/Library/LaunchAgents/crewboss-<name>.plist. Supports shorthands (hourly, daily, weekly, monthly, yearly) and forms like Mon *-*-* 09:00:00, Mon..Fri 08:30, Sat,Sun 10:00, *-*-* 00/4:00:00, or *-*-01 06:00. Missed runs while asleep start on wake.

Scheduled jobs capture the PATH active when you ran routines install.