every-session-joins-the-mesh — Every LLM session joins the Majordomus mesh at start, told the mesh as work
Any LLM session that starts in a repository with an enabled mesh is on the mesh from its first turn, told who works where on every machine and what waits for it, and a task built outside the mesh is refused by the repository's gates.
ACTIVE 2 of 4 issues done
- ready
- 1
- blocked
- 1
- active
- 0
- verify
- 0
- done
- 2
- cancelled
- 0
Problem
Mesh participation was left to the worker: the start printed one health line (lib/capture.sh mj_capture_mesh_line), MCP initialize instructions never mentioned the mesh (apps/majordomus-cli/src/mcp/protocol.rs), only Claude Code had a lifecycle adapter (lib/capture.sh MJ_CAPTURE_LIFECYCLE), nothing surfaced handovers or reviews waiting for this machine, and no gate noticed a task built outside the mesh. Survey of 2026-10-10 at master a804ae2045.
Outcome
Any LLM session that starts in a repository with an enabled mesh is on the mesh from its first turn, told who works where on every machine and what waits for it, and a task built outside the mesh is refused by the repository's gates.
Current state
Partly automatic: an announcing MCP client is projected as a mesh session with advisory claims; everything else is the worker's memory.
Desired state
mesh.briefing at every start and MCP initialize, a mesh session and a claim for every task, a gated rule, projections and the Cockpit, an article.
Scope
- apps/majordomus-cli/src/mesh
- apps/majordomus-cli/src/mcp/protocol.rs
- lib/capture.sh
- bin/majordomus-cli
- lib/rust_bin.sh
- .ai/repo/prompts
- lib/derive.sh
- .ai/repo/rules/project
- .ai/repo/providers
- docs/MESH.md
- README.md
- site/content-src
Out of scope
- Changing what the mesh may decide: it stays observation, not authority (ADR 0050).
Acceptance criteria
- A runtime's briefing shows another machine's live session, its exclusive claim, its handover and its review
- The start briefing of a checkout whose mesh runs carries the briefing lines
- An MCP initialize answer on a server whose mesh runs names the briefing and the protocol
- After majordomus start the task's scope is a live claim on every linked runtime
- finish refuses a task whose scope was never claimed while the mesh was enabled
- A Codex or Gemini session start runs the same lifecycle, proved against the real tool
- The provider projections and README name mesh.briefing and the protocol
- The article is published by the site build and passes site-check
- A client that starts the MCP server from a checkout with no executable it can build is served by the installed release and told so (ADR 0172)
- A bare session start in a checkout is handed the session-start prompt, so the worker joins the board and takes up the active task without being asked (ADR 0172)
Validation
- bin/majordomus plan validate
- cargo test --lib mesh::briefing
- cargo test --test mesh_briefing
Evidence required
- mesh_briefing_two_nodes_test
Risks
- A start that waits on the mesh is a slower start for everyone: the briefing is read within a budget and skipped, not waited for.
Issues
Each one is an execution contract with its own acceptance criteria, validation command and required evidence. The wave column is the layer of the dependency graph it sits in.
| issue | status | wave | depends on | title |
|---|---|---|---|---|
| I2288 | DONE | 1 | I2734 | A task is on the mesh while it works |
| I2289 | READY | 2 | I2288 | A task built off the mesh is refused |
| I2734 | DONE | 0 | — | A session joins the mesh at its start and leaves it at its end |
| I2735 | BLOCKED | 3 | I2289 | An edit no claim covers is refused |
The graph
flowchart LR
I2288["I2288<br/>A task is on the mesh while it works"]:::done
I2289["I2289<br/>A task built off the mesh is refused"]:::ready
I2734["I2734<br/>A session joins the mesh at its start and leaves it at its end"]:::done
I2735["I2735<br/>An edit no claim covers is refused"]:::blocked
I2288 --> I2289
I2289 --> I2735
I2734 --> I2288
classDef done stroke:#16a34a,fill:#dcfce7,color:#14532d,stroke-width:2px
classDef active stroke:#2563eb,fill:#eff6ff,color:#1e3a8a,stroke-width:2px
classDef verify stroke:#7c3aed,fill:#f5f3ff,color:#4c1d95,stroke-width:2px
classDef ready stroke:#0891b2,fill:#ecfeff,color:#164e63,stroke-width:2px
classDef planned stroke:#0891b2,fill:#ecfeff,color:#164e63,stroke-width:2px
classDef blocked stroke:#b45309,fill:#fffbeb,color:#78350f,stroke-width:2px
classDef cancelled stroke:#6b7280,fill:#f9fafb,color:#374151,stroke-width:2px
classDef superseded stroke:#6b7280,fill:#f9fafb,color:#374151,stroke-width:2pxCanonical record: .ai/repo/project/milestones/every-session-joins-the-mesh.yaml. Read it back with majordomus plan show every-session-joins-the-mesh.