Fleet onboarding-injection — comms cheat-sheet + peer roster per agent #620

Closed
opened 2026-06-22 16:55:04 +00:00 by jason.woltje · 0 comments
Owner

Fleet onboarding-injection — comms cheat-sheet + peer roster per agent

Root cause (Mos's failed first send): fleet agents are born not knowing their comms tooling. When the fleet spawns a role, inject a comms cheat-sheet + peer roster into that agent's system prompt.

Requirement

Inject (runtime-agnostic, via the launcher system-prompt path composeContract) for each fleet agent:

  • agent-send.sh path + how to reach the orchestrator/lead and known peers (host + tmux session).
  • the [src -> dst] preamble convention + the FLIP-to-reply rule.
  • a note that agent send --verify confirms ACCEPTED (not just injected).
    Peer roster sourced from roster.yaml (each agent gets the others; self excluded). Orchestrator flagged as point-of-contact.

Approach

  • New src/fleet/comms-onboarding.ts: parseRosterAgents, buildFleetCommsBlock, readFleetCommsBlock (no fleet.ts coupling).
  • Wire into composeContract (launch.ts): appends # Fleet Comms only when MOSAIC_AGENT_NAME is set + the agent is in roster.yaml; no-op otherwise.
  • TDD on parser + builder; situational test: composeContract with a fixture roster contains the cheat-sheet + correct peer addresses + self excluded.
## Fleet onboarding-injection — comms cheat-sheet + peer roster per agent **Root cause** (Mos's failed first send): fleet agents are born not knowing their comms tooling. When the fleet spawns a role, inject a comms cheat-sheet + peer roster into that agent's system prompt. ### Requirement Inject (runtime-agnostic, via the launcher system-prompt path `composeContract`) for each fleet agent: - `agent-send.sh` path + how to reach the orchestrator/lead and known peers (host + tmux session). - the `[src -> dst]` preamble convention + the FLIP-to-reply rule. - a note that `agent send --verify` confirms ACCEPTED (not just injected). Peer roster sourced from `roster.yaml` (each agent gets the others; self excluded). Orchestrator flagged as point-of-contact. ### Approach - New `src/fleet/comms-onboarding.ts`: `parseRosterAgents`, `buildFleetCommsBlock`, `readFleetCommsBlock` (no `fleet.ts` coupling). - Wire into `composeContract` (launch.ts): appends `# Fleet Comms` only when `MOSAIC_AGENT_NAME` is set + the agent is in `roster.yaml`; no-op otherwise. - TDD on parser + builder; situational test: `composeContract` with a fixture roster contains the cheat-sheet + correct peer addresses + self excluded.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#620