Context
Currently, the Swarm /lead-role is delegated manually by the human operator. To achieve greater autonomy and fully realize the Flat Peer-Team model, the swarm must self-manage the rotation of this coordination role across sessions.
The Problem
Without a deterministic, decentralized rotation mechanism, the swarm risks Zero-State Amnesia upon fresh boot, or calcifying a single agent into a central orchestrator. Existing generic leader-election patterns fail our Flat Peer-Team mandate by introducing shared locks or a central orchestrator. A naive "round robin" stateful rotation risks starvation if an agent fails to pick it up.
The Architectural Reality
The solution must be decentralized and leverage our existing native primitives (A2A messages, Memory Core). Static files like sandman_handoff.md introduce race conditions during simultaneous triad sunsets. The A2A Mailbox provides a native, asynchronous queue.
The Fix
Implement "The A2A Baton Pass" (V1) using a Strict Fixed Cycle (Claude → Gemini → GPT → Claude). During the sunset protocol, the current lead computes the next lead and sends a targeted, wake-suppressed A2A DM. Upon fresh boot, the mandatory Mailbox Check surfaces the baton, prompting the receiving agent to invoke the /lead-role.
Acceptance Criteria
session-sunset-workflow.md: Add a branch to Step 7 explicitly detailing the A2A baton pass if the agent currently holds the /lead-role.
- Baton Message Shape: Explicitly define the message structure:
to: [next-agent-id], subject: '[handoff] Lead Role Baton', taggedConcepts: ['lead-role-baton'], wakeSuppressed: true. The body must contain explicit baton fields: fromLead, toLead, sourceSessionId, reason, createdAt, and expiry/staleness limits.
/lead-role Rotation Discipline: Add a section explicitly defining the Fixed Cycle array (['@neo-opus-4-7', '@neo-gemini-3-1-pro', '@neo-gpt']) to compute the next assignee.
AGENTS.md §22: Add a cross-reference noting that finding the lead-role-baton in the Mailbox Check immediately invokes the /lead-role skill (unless overridden by human instruction).
- Operator Override: Explicitly document that manual delegation ("you take the lead") at session boot ALWAYS overrides the baton pass logic.
- Targeted DM Only: The baton message MUST be a targeted DM (e.g.,
to: '@neo-gpt'), NOT a broadcast.
- Failure State (Missing Baton): Explicitly document that if no baton is found, agents default to peer-role, dispatch an explicit
lead-role-baton-missing A2A alert, and await operator instruction or human-triggered recovery.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback / Edge Case |
Docs |
Evidence |
session-sunset Step 7 lead baton branch |
#11038 + Discussion #11037 |
If the current session holds /lead-role at sunset, compute the next lead via the fixed cycle and send a targeted, wake-suppressed A2A DM baton. |
If the next identity cannot be resolved or the send fails, preserve normal sunset flow and emit an explicit blocked / baton-missing alert; no silent self-election. |
.agents/skills/session-sunset/references/session-sunset-workflow.md |
L1 static docs; L2 only if shared helper logic is introduced. |
| Baton message shape |
#11038 + Discussion #11037 + #11042 per-recipient mailbox substrate |
Define the envelope as to: [next-agent-id], subject: '[handoff] Lead Role Baton', taggedConcepts: ['lead-role-baton'], wakeSuppressed: true; body fields: fromLead, toLead, sourceSessionId, reason, createdAt, expiry / staleness limits. |
Stale, malformed, or missing body fields do not grant lead status; continue peer-role triage and emit lead-role-baton-missing. |
Sunset workflow and /lead-role reference docs |
L1 static docs; L2 only if parsing / validation helper code is added. |
/lead-role rotation discipline |
#11038 + Discussion #11037 + AGENTS.md §15.6 |
Add the fixed cycle array ['@neo-opus-4-7', '@neo-gemini-3-1-pro', '@neo-gpt'] and document that it computes the next assignee. |
Human boot instruction overrides the cycle; autonomous mid-session baton passing remains out of scope. |
.agents/skills/lead-role/ reference payload |
L1 static docs. |
AGENTS.md §22 mailbox check |
#11038 + AGENTS.md §22 |
Finding a mailbox item tagged lead-role-baton invokes /lead-role immediately unless human instruction overrides it. |
If no valid baton is found, default to peer-role, dispatch lead-role-baton-missing, and await operator instruction or human-triggered recovery. |
AGENTS.md |
L1 static docs. |
| Operator override |
#11038 + Discussion #11037 |
Manual delegation at session boot, e.g. "you take the lead", always overrides baton pass logic. |
Conflicting baton is treated as stale / superseded context, not as authority over the operator. |
AGENTS.md and /lead-role reference payload as needed |
L1 static docs. |
| Targeted DM only |
#11038 + #11042 DELIVERED_TO broadcast-read substrate |
Baton delivery uses a targeted A2A DM to the computed next lead; it MUST NOT use AGENT:* broadcast. |
Broadcast baton is invalid for lead acquisition; recipient continues peer-role and emits lead-role-baton-missing / clarification alert. |
Sunset workflow and /lead-role reference payload |
L1 static docs. |
| Failure state: missing / stale baton |
#11038 + Discussion #11037 |
Agents without a valid baton default to peer-role, dispatch an explicit lead-role-baton-missing A2A alert, and await operator instruction or human-triggered recovery. |
No silent self-election, no lock-based leader election, and no calcification of one permanent lead. |
AGENTS.md, sunset workflow, and /lead-role reference payload |
L1 static docs; L2 only if helper logic is introduced. |
Out of Scope
- Autonomous mid-session baton passing.
- Metrics-based override logic.
Related
- Closes Discussion #11037
- Relates to #11028 (
/lead-role skill)
Origin Session ID: d5ed6767-0292-46bf-9346-439f268048ec
Context Currently, the Swarm
/lead-roleis delegated manually by the human operator. To achieve greater autonomy and fully realize the Flat Peer-Team model, the swarm must self-manage the rotation of this coordination role across sessions.The Problem Without a deterministic, decentralized rotation mechanism, the swarm risks Zero-State Amnesia upon fresh boot, or calcifying a single agent into a central orchestrator. Existing generic leader-election patterns fail our Flat Peer-Team mandate by introducing shared locks or a central orchestrator. A naive "round robin" stateful rotation risks starvation if an agent fails to pick it up.
The Architectural Reality The solution must be decentralized and leverage our existing native primitives (A2A messages, Memory Core). Static files like
sandman_handoff.mdintroduce race conditions during simultaneous triad sunsets. The A2A Mailbox provides a native, asynchronous queue.The Fix Implement "The A2A Baton Pass" (V1) using a Strict Fixed Cycle (
Claude → Gemini → GPT → Claude). During the sunset protocol, the current lead computes the next lead and sends a targeted, wake-suppressed A2A DM. Upon fresh boot, the mandatory Mailbox Check surfaces the baton, prompting the receiving agent to invoke the/lead-role.Acceptance Criteria
session-sunset-workflow.md: Add a branch to Step 7 explicitly detailing the A2A baton pass if the agent currently holds the/lead-role.to: [next-agent-id],subject: '[handoff] Lead Role Baton',taggedConcepts: ['lead-role-baton'],wakeSuppressed: true. The body must contain explicit baton fields:fromLead,toLead,sourceSessionId,reason,createdAt, and expiry/staleness limits./lead-roleRotation Discipline: Add a section explicitly defining the Fixed Cycle array (['@neo-opus-4-7', '@neo-gemini-3-1-pro', '@neo-gpt']) to compute the next assignee.AGENTS.md§22: Add a cross-reference noting that finding thelead-role-batonin the Mailbox Check immediately invokes the/lead-roleskill (unless overridden by human instruction).to: '@neo-gpt'), NOT a broadcast.lead-role-baton-missingA2A alert, and await operator instruction or human-triggered recovery.Contract Ledger Matrix
session-sunsetStep 7 lead baton branch/lead-roleat sunset, compute the next lead via the fixed cycle and send a targeted, wake-suppressed A2A DM baton..agents/skills/session-sunset/references/session-sunset-workflow.mdto: [next-agent-id],subject: '[handoff] Lead Role Baton',taggedConcepts: ['lead-role-baton'],wakeSuppressed: true; body fields:fromLead,toLead,sourceSessionId,reason,createdAt, expiry / staleness limits.lead-role-baton-missing./lead-rolereference docs/lead-rolerotation discipline['@neo-opus-4-7', '@neo-gemini-3-1-pro', '@neo-gpt']and document that it computes the next assignee..agents/skills/lead-role/reference payloadAGENTS.md§22 mailbox checklead-role-batoninvokes/lead-roleimmediately unless human instruction overrides it.lead-role-baton-missing, and await operator instruction or human-triggered recovery.AGENTS.mdAGENTS.mdand/lead-rolereference payload as neededAGENT:*broadcast.lead-role-baton-missing/ clarification alert./lead-rolereference payloadlead-role-baton-missingA2A alert, and await operator instruction or human-triggered recovery.AGENTS.md, sunset workflow, and/lead-rolereference payloadOut of Scope
Related
/lead-roleskill)Origin Session ID: d5ed6767-0292-46bf-9346-439f268048ec