Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .agents/skills/decide-and-proceed/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ fleet queue block <task> --reason-class escalated-to-user \
- If you cannot write the action as one sentence a person could do in five minutes, it is not a hands item. It is a decision, and rule 1 applies.
- The queue refuses a person-wait block or park that has no `--hands` and `--action`.

On the GitHub issue, a hands item carries `user/escalated` and one marker line in its body, so every tool can tell it from a parked choice:

```markdown
<!-- hands:v1 kind=interactive-login action="<the same one sentence>" -->
```

`fleet agent next` never hands such an issue to an agent, and the dashboard lists it under "Needs a person's hands". An issue with `user/escalated` and no marker is shown as fleet work and is handed out to be decided.

## Recording a decision

One comment on the issue the decision belongs to:
Expand Down
4 changes: 3 additions & 1 deletion .agents/skills/next-work/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ A result is one of three things: a merged change that makes an unchecked accepta

## Choosing work

Read the plan's **Now** table first. Then take the first of these that exists:
The short way is `fleet agent next`: it returns one task from the highest intake rung that has one (a command pushed to you, the queue, the host's shortlist, GitHub priority) and the commands to run when the task is done. When it hands you an issue, do one slice of it. When it tells you the shortlist is low, filling the list is your task for that run.

To choose by hand, read the plan's **Now** table first. Then take the first of these that exists:

1. **Breakage on main in an active track's code.** A red `id` suite outranks every feature slice, because every later verdict reads that signal.
2. **The next slice of an active track.** Follow [`feature-slice`](../feature-slice/SKILL.md). The track's row names its exit test and its open issues.
Expand Down

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions doc/agents/fleet-command-channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ their mailbox, act on commands, and answer. Bridge side:
`pkgs/message-bridge/worker/README.md` ("Fleet mailboxes"); client:
`fleet bridge` (`pkgs/fleet/crates/fleet-bridge`).

## The short way

`fleet agent next` does the mailbox check below and then tries the queue,
the host's shortlist and GitHub priority, in that order, and returns one
task. An agent that uses it does not need to run the steps in the next
section by hand. Enrolment and the full ladder:
[onboarding an agent](onboarding-an-agent.md).

## Every lane run (Muse lanes and any other fleet agent)

At the start of each run, before claiming queue work:
Expand Down
91 changes: 91 additions & 0 deletions doc/agents/onboarding-an-agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Onboarding an agent to the fleet

Any agent joins the fleet the same way, whatever it is: a Muse lane, an
OpenCode or OpenChamber session, an OpenClaw agent, a Grok bot, Dot, Duet,
Codex, Gemini, Antigravity, or a Claude Code session. Design:
[`doc/2026-11-21T11-30-00Z_design_fleet-agent-front-door/`](../2026-11-21T11-30-00Z_design_fleet-agent-front-door/2026-11-21T11-30-00Z_design_fleet-agent-front-door.md).

## An agent with a shell

```bash
fleet agent kinds # pick your kind
fleet agent enroll --kind <kind> --name <name> # once per seat
fleet agent next # each time you want work
```

- `<name>` is the agent's own stable name, the one the queue uses as worker
and lane: lowercase letters, digits, `.`, `_`, `-`.
- Enrolment registers your mailbox, tells you which intake rungs work from
your seat, and saves a profile so later verbs know who is asking.
- `fleet agent next` returns one task and the commands to run when it is
done. Exit `5` means no rung had work this run.
- `fleet agent doctor` repeats the reachability check at any time.

## An agent that can only make HTTPS requests

Enrol it from any seat that has the binary, then give the agent its name:

```bash
fleet agent enroll --kind http --name <name> --groups <its-kind>
```

The agent reads and answers its mailbox with the bridge's HTTPS calls
(`pkgs/message-bridge/worker/README.md`, "Fleet mailboxes"). `dot` and `duet`
are kinds of this seat.

## Claude and ChatGPT

Nothing to enrol. Their addresses are `claude` and `chatgpt`, reached through
the Message Bridge connector. Send to them like any other address.

## Sending work to an agent

```bash
fleet bridge send --to agent:<name> --command "<the task>" # one agent
fleet bridge send --to group:muse --command "<the task>" # every agent of a kind
fleet bridge send --to group:opencode --command "<the task>" # OpenCode and OpenChamber
fleet bridge send --to claude "<a note>" # a connector
```

A command is a task and gets an answer. A plain message is information.

## Where work comes from

`fleet agent next` tries four places in order and takes the first task it
finds: a command pushed to you, the shared queue, the host's shortlist, then
the highest-priority open issue. If the shortlist is low and nobody is
refilling it, your task for that run is to refill it. You do not choose the
rung; the answer says which one fed you and why the others did not.

## Builds

Do not build inside a limited sandbox. Run the command where builds belong:

```bash
fleet shell -- <command> # the laptop, a codespace, or here
fleet shell --build -- <command> # a long build: takes a build slot
fleet shell # an interactive shell
```

## What you need

HTTPS is enough for messages and for three of the four rungs. The queue rung
and `fleet shell` need a route to the laptop, which the binary finds by
itself: the broker, the Cloudflare tunnel, the tailnet, then ssh. Secrets are
resolved by name through `fleet secrets`; never read a token file or call a
vault tool yourself.

## Waiting on a person

Do not. Decide, record the decision on the issue, and continue
(`.agents/skills/decide-and-proceed`,
[FDR-0013](../decisions/FDR-0013-no-owner-decision-gates.md)). The queue
refuses a park or block that waits on a person unless it is a hands item:

```bash
fleet queue block <task> --worker <w> --lane <l> --reason-class escalated-to-user \
--hands interactive-login --action "<one sentence a person can do in five minutes>" \
--blocker "<what it stops>"
```

A hands item blocks that step only. Take the next task.
36 changes: 36 additions & 0 deletions doc/placement-intake/placement.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,39 @@ the org-run surface is `active` in the registry and the Blacksmith
variant exists there too — a `fleet-org-blacksmith`-style registry
entry on the code host is all that remains if Blacksmith legs are
ever wanted on org-run itself.

---

## 2026-11-21T11-50-00Z Update: surfaces may dispatch as the user

The statement above that there is no user-token dispatch path no longer
holds. A surface entry may say `"dispatch_as": "user"`; that surface then
uses the fleet's own GitHub user token for eligibility, dispatch, status and
load reads. A surface without the field is App-only, as before. Reasons and
the decision record:
[`doc/2026-11-21T11-30-00Z_design_fleet-agent-front-door/`](../2026-11-21T11-30-00Z_design_fleet-agent-front-door/2026-11-21T11-30-00Z_design_fleet-agent-front-door.md)
and [FDR-0013](../decisions/FDR-0013-no-owner-decision-gates.md).

Status on 2026-11-21, each proven by a real run:

| Surface | Status | Dispatches as | Proof |
| ---------------------- | ------ | ------------- | ----------------------------------------------------------- |
| `fleet-personal` | active | the App | unchanged |
| `org-run` | active | the App | unchanged |
| `fleet-org` | active | the user | run 44900088840, success |
| `fleet-org-blacksmith` | active | the user | run 44900255411, success on a Blacksmith runner |
| `fleet-forks` | active | the user | run 44900259404, success after a sync to upstream `72049ac` |
| `codespace-overflow` | waits | | the `gh` login lacks the `codespace` scope |

Two facts in the earlier text are out of date. The org copy has its repo
secrets. The forks copy needs no checkout secret for public targets, which
are the only targets its entry lists.

Adding a location is now: copy the repo, register the entry, and either
install the App on the copy or set `dispatch_as` to `user` where the fleet's
GitHub user can start workflows there.

The org copy's `fleet-run.yml` still differs from upstream in both
directions, so its daily sync fails on a merge conflict. Until the copies
converge, that entry declares no `dispatch_id` input and its runs are matched
by the snapshot fallback.
10 changes: 10 additions & 0 deletions pkgs/fleet/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkgs/fleet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ members = [
"crates/fleet-laptop-agent",
"crates/fleet-search",
"crates/fleet-bridge",
"crates/fleet-agent",
"crates/fleet",
]
resolver = "2"
Expand All @@ -49,6 +50,7 @@ fleet-proxy = { path = "crates/fleet-proxy" }
fleet-laptop-agent = { path = "crates/fleet-laptop-agent" }
fleet-search = { path = "crates/fleet-search", default-features = false }
fleet-bridge = { path = "crates/fleet-bridge" }
fleet-agent = { path = "crates/fleet-agent" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
sha2 = "0.11"
Expand Down
18 changes: 15 additions & 3 deletions pkgs/fleet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ crates/fleet-bridge/ the bridge domain: fleet mailboxes on the
(fleet token, derived from the owner token
when its own secret is missing). Runbook:
doc/agents/fleet-command-channel.md.
crates/fleet-agent/ the agent domain and `fleet shell`: one
front door over the other verbs. `agent
enroll` registers any kind of agent and
reports which intake rungs its seat
reaches; `agent next` returns one task
from the highest rung that has one (a
pushed command, the queue, the host's
shortlist, GitHub priority); `shell` runs
a command or opens a shell on the laptop,
a codespace or here. Runbook:
doc/agents/onboarding-an-agent.md.
crates/fleet-queue/ the queue domain (step 2): the repo-queue
client, the queue-broker and secrets-broker
roles, and packet validation — the broker
Expand Down Expand Up @@ -251,9 +262,10 @@ behind them — lives in one place,
and every build compiles it, so no build can know a domain another
build forgot. The registered domains are `fleet queue`, `fleet serve`,
`fleet proxy`, `fleet dispatch`, `fleet dispatch-test`,
`fleet secrets`, `fleet gh`, `fleet bridge`, `fleet search` and
`fleet laptop-agent`, plus the built-ins `fleet init`,
`fleet version`, `fleet capabilities` and `fleet help`.
`fleet secrets`, `fleet gh`, `fleet bridge`, `fleet agent`,
`fleet shell`, `fleet search` and `fleet laptop-agent`, plus the
built-ins `fleet init`, `fleet version`, `fleet capabilities` and
`fleet help`.

One staleness, stated honestly: the registry's per-domain
`subcommands` arrays are descriptive, and for the `queue` domain they
Expand Down
17 changes: 17 additions & 0 deletions pkgs/fleet/crates/fleet-agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "fleet-agent"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
description = "The fleet agent domain: one front door for any agent. Enrol a named agent of any kind, check what this seat can reach, ask for the next piece of work down the intake ladder (pushed command, queue claim, local shortlist, highest priority), and open a shell where builds belong."

[dependencies]
fleet-config = { workspace = true }
# preserve_order: every verb prints JSON, and the key order is the shape.
serde_json = { version = "1", features = ["preserve_order"] }

[dev-dependencies]
# Property tests (AGENTS.md testing doctrine), the same proptest version
# the other fleet crates use.
proptest = "1.12"
8 changes: 8 additions & 0 deletions pkgs/fleet/crates/fleet-agent/proptest-regressions/tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Seeds for failure cases proptest has generated in the past. It is
# automatically read and these particular cases re-run before any
# novel cases are generated.
#
# It is recommended to check this file in to source control so that
# everyone who runs the test benefits from these saved cases.
cc 8ab280ccda55b49a7ae04ee5ca75326551661a22320b5eacd8ec7087c7595a2d # shrinks to specs = {1: (0, 0), 2: (0, 0)}
cc 267937dcd89ad2723dc8f8a9a4ccd6952378fdf435c0fcf6184182e8b298f9a6 # shrinks to word = "~"
Loading