979b2b5632
CI / build (push) Successful in 1m25s
The communication rules lived only in two opt-in skills, so nothing always-on told the primary how to orchestrate and nothing guaranteed a worker loaded its playbook. Move protocol and policy into CLAUDE.md, which a worker inherits for free (its worktree is a checkout of this repo), and leave the skills as pure per-job procedure. bridge_whoami closes the load-bearing gap: every tool already consumed the caller identity ConnectionIdentity resolves from the connection, but none reported it, so an agent had to infer its own role from side channels the daemon does not control. Guessing fails asymmetrically — a primary acting as a worker is refused by the authz gate and learns at once, while a worker acting as the primary ends its turn without bridge_reply and the sender silently receives nothing. The tool reuses the same Principal the gate is built on, so the two cannot disagree; the primary gets role only (handing it a sessionId it does not own would invite the forged reply Authz refuses), and a worker missing from the registry still gets role + sessionId rather than 'unknown'. The CLAUDE.md block is written to be copied as-is into any project that mounts the bridge: repo-local details (Authz paths, the .mcp.json/wiki exclusions, the skill names) moved below it into a project addendum, and every role-inference fallback is stated one-way — the mount-name signal only holds for mcp__bridge__* (the launcher fixes it), not for the primary's mount, which each project names itself. The wiki carries the block verbatim as the template, with a sync check. Because this repo IS the bridge, that block is shipped surface, not documentation: the addendum adds a mandatory checklist mapping each part of the code to the part of the prompt it can invalidate. Also: delegate-by-default policy for the primary — the test is not 'could I do this faster myself' but 'can I write a brief good enough for a worker'. mvn clean install: 356 tests green (353 + 3 for whoami); ide_diagnostics clean on both changed files.