feat: implement --onboard flag in multi-agent-mux-create and update AGENT.md onboarding handshake protocol

This commit is contained in:
2026-06-28 10:42:23 +09:00
parent 6e3c866461
commit ef57749e9f
5 changed files with 135 additions and 2 deletions
+19
View File
@@ -138,4 +138,23 @@ Use this checklist when deploying this agent orchestration model to a new projec
---
## 6. Onboarding Handshake Protocol (Onboarding Handshake)
Newly spawned Team Leader agents must align their context using the `--onboard` mechanism before receiving any real work. This ensures they operate with the correct design rules and repository history.
### 🔄 The Onboarding Handshake Sequence
1. **Creation with Onboard flag**: The General Manager spawns a new session with:
```bash
bash .agents/skills/multi-agent-mux-create/scripts/create_session.sh --workspace "$(pwd)" --agent <agent> --role <role> --onboard
```
2. **Orienting the Agent**: The agent session starts up and automatically receives a registered job instructing it to:
- Read `README.md` and `.agents/AGENT.md` to align with design principles and constraints.
- Run `git status` and `git diff` to analyze active modifications.
- Read `.mam/agent-sessions.yaml` to identify other running agents and verify its own assigned `role`.
3. **Handshake Publication**: The agent executes these orientation tasks and publishes a `completed` event to the broker (using `publish_event.py`) with:
- Detail: `"Onboarding complete; aligned with role <role>"`
4. **GM Gating Check**: The General Manager polls or subscribes to this `completed` event. The GM **must** wait for this onboarding handshake to succeed before delegating any implementation or review jobs to the new session.
---
*This guide balances collaboration efficiency with strict code security. Any required changes must be discussed and agreed upon by the General Manager and all Team Leaders before updating this document.*