HOW IT WORKS

How Alfred works.

One run, from the timer that starts it to the Slack message at the end. Nothing running in the cloud, no service to sign up for.

THE SEVEN STEPS

Seven steps, every time.

Every Alfred agent follows the same seven steps. If any step fails, the run stops cleanly and posts a note to Slack.

  1. 01

    A timer starts the run

    A built-in scheduler (launchd on macOS, systemd on Linux) starts each agent on its configured cadence. Senior-dev checks for implementation work every 20 minutes by default, and the fleet keeps running across reboots.

    [12:00:00] launchd -> ~/.alfred/bin/senior-dev.py
  2. 02

    Safety checks run first

    Before any provider call, the agent checks GitHub and the selected coding CLI. It stops when authentication, quota, or readiness checks fail.

    [12:00:01] preflight ok  spend=$3.21/$20.00
  3. 03

    It picks up a task

    Senior-dev looks at the open tasks marked agent:implement, takes the oldest one, and marks it agent:in-flight. Other agents see that label and leave it alone.

    [12:00:03] senior-dev claimed your-backend#247  label=agent:in-flight
  4. 04

    It makes its own copy of the repo

    A code-changing or review role opens a separate git worktree under ~/.alfred. Concurrent runs keep their branch changes separate from the main checkout.

    [12:00:05] worktree ~/.alfred/wt/12000305/  branch=agent/247-billing-v2
  5. 05

    The selected coding engine writes the code

    The agent hands the task to Claude Code, Codex, or OpenCode with the full project in context. Alfred saves the run log under ALFRED_HOME.

    [12:00:06] claude_invoke pid=84217  log=state/logs/12000305.log
  6. 06

    It opens a pull request

    When the work is done, the agent pushes the branch and opens a pull request on GitHub. The task's label changes from agent:in-flight to agent:pr-open.

    [12:18:09] gh pr create  PR #1247  label=agent:pr-open
  7. 07

    It tells you on Slack

    The agent posts a short summary to your Slack: what it did, what it opened, what failed, and what it cost. Anything that needs your attention is easy to spot.

    [12:18:11] slack_post severity=info  PR #1247 opened
HOW AGENTS STAY OUT OF EACH OTHER'S WAY

GitHub labels track every task.

Agents coordinate through GitHub labels, not a database. The label on a task tells every agent what is happening and who is on it, so two agents never grab the same work.

agent:implement

You or Drake add this. It tells Lucius the task is small enough and clear enough to pick up.

agent:in-flight

Lucius adds this when it takes the task. Other agents see it and skip the task.

agent:pr-open

Added when the agent opens a pull request. Ra's al Ghul watches for this label to start a review.

agent:done

Added when the pull request merges. The task is finished and drops out of the active list.

agent:needs-changes

Ra's al Ghul adds this when a review asks for changes. senior-dev picks it back up on its next run.

TRY IT LOCALLY

Do a test run before you spend anything.

A test run walks through every step above without calling Claude or Codex, so nothing is spent. Run it once on every new setup.

terminal copy
$ alfred dry-run senior-dev
alfred dry-run: senior-dev
role: senior developer
mode: safe simulation
would: resolve config, acquire the agent lock, run preflight, and enter the runner
would not: call the host scheduler, mutate GitHub, post Slack, invoke an LLM, or edit files