Context
Discussion #10354 ("Phase 3: Cross-harness autonomous wake substrate — closing the human-postman gap") has converged through 4 iterations with @neo-gemini-3-1-pro. All 6 substantive Open Questions resolved to AC, Shape (D) Hybrid consensus locked. Sole remaining graduation gate is the standards-alignment reference document — concrete schema mappings for the three architectural shapes against MCP and A2A standards.
The Problem
Discussion #10354 specifies the architecture (Shape D Hybrid: standards-first MCP/A2A push when supported, bridge daemon fallback) but at the contract level — not at the wire-format / schema level. Future Epic sub-tickets implementing Shape (A), (B), and (C) need concrete payload shapes, handshake protocols, retry semantics, and adapter contracts to build against.
Without the ref doc:
- Shape (A) MCP notifications path can't specify the
notifications/message payload schema for our three trigger primitives
- Shape (B) A2A webhook can't specify the HTTP POST body shape, signing, retry policy
- Shape (C) bridge daemon can't specify what each per-harness adapter receives + emits
The Architectural Reality
Per @tobiu's direction (relayed via Gemini): the ref doc lives at learn/agentos/decisions/ following the existing ADR pattern established by 0001-cross-process-cache-coherence.md. Numbered convention → 0002-phase3-wake-substrate-standards-alignment.md.
ADR 0001's structure (Context → Existing Substrate Audit → Decision Drivers → Considered Options → Decision Outcome → Concrete Specifications → Consequences → Alternatives Rejected → References → Handoff Hints) is the precedent. ADR 0002 follows the same shape.
The Fix
Draft learn/agentos/decisions/0002-phase3-wake-substrate-standards-alignment.md as the standards-alignment reference document. Three concrete-specification sections form the load-bearing content:
MCP notifications schema (Shape A) — notifications/message payload shape for wake/sent_to_me, wake/task_state_changed, wake/permission_granted event types. Subscription handshake protocol. Capability negotiation at MCP initialize.
A2A webhook payload shape (Shape B) — HTTP POST schema extending A2A Task notification spec. HMAC-SHA256 body signing. Retry semantics with exponential backoff. Webhook registration via WAKE_SUBSCRIPTION.harnessTargetMetadata.url.
Bridge daemon protocol (Shape C) — GraphLog-watch contract using existing syncCache() lastSyncId pattern. Per-harness adapter shapes (tmux send-keys, osascript, Antigravity native API). Coalescing window per OQ 6 (30-60s digest delivery). Wake-prompt format.
Acceptance Criteria
Out of Scope
- Shape A / B / C implementations themselves — those are Epic sub-tickets that consume this ADR. ADR specifies contracts; implementation tickets satisfy them.
WAKE_SUBSCRIPTION schema migration — referenced in this ADR (Section on subscription state), but the actual schema migration ticket falls into the Epic.
- Anthropic feature request for MCP notification subscription — meta-action per OQ 1; parallel to substrate work, not gated on this ADR.
- Multi-tenant wake routing — defers to #9999 transition; ADR notes the substrate is multi-tenant-ready via
userId scoping but doesn't implement the RLS engagement.
Avoided Traps
- Schema-anticipation for unsupported variations. ADR specifies the shapes for the three concrete trigger primitives (SENT_TO_ME, TASK_STATE_CHANGED, PERMISSION_GRANTED) and four filters; doesn't anticipate trigger types not yet justified by use cases.
- Generic notification framework. This is wake-substrate-specific; doesn't try to be a generic event-bus abstraction.
- Hardcoding harness-specific commands in the ADR. Adapter shapes are abstract; concrete adapter implementations (osascript template, tmux command shape) live in the Shape C sub-ticket, not the ADR.
- Missing the "existing substrate audit" section. ADR 0001's pre-design awareness check is critical — for ADR 0002 the analog is auditing what A2A and MCP standards already provide BEFORE specifying our extensions.
Related
- Discussion #10354 — converged architecture; this ADR is the final graduation deliverable
- ADR 0001 (
learn/agentos/decisions/0001-cross-process-cache-coherence.md) — format precedent and substrate-pattern peer
- #10311 — Phase 1 Swarm Autonomy epic; eventual Epic graduating from #10354 will be sub-tree under here
- #10334 / #10342 — A2A Task envelope + state machine; ADR Section A2A webhook extends these alignments
- #10353 — GraphService transactional
linkNodes + WAL cache-warm retry; ADR Section bridge daemon consumes the same delta-stream pattern as syncCache()
- #10349 — Sunset Protocol self-DM handover; ADR Section MCP notifications enables auto-discovery via
taggedConcepts: ['sunset-protocol-handover'] filter
Origin Session ID: 52e84f76-2d4f-41cc-a42e-9d1d3fcaa381
Retrieval Hint: query_raw_memories(query='ADR 0002 phase 3 wake substrate standards alignment MCP notifications A2A webhook bridge daemon protocol schema specification')
Context
Discussion #10354 ("Phase 3: Cross-harness autonomous wake substrate — closing the human-postman gap") has converged through 4 iterations with @neo-gemini-3-1-pro. All 6 substantive Open Questions resolved to AC, Shape (D) Hybrid consensus locked. Sole remaining graduation gate is the standards-alignment reference document — concrete schema mappings for the three architectural shapes against MCP and A2A standards.
The Problem
Discussion #10354 specifies the architecture (Shape D Hybrid: standards-first MCP/A2A push when supported, bridge daemon fallback) but at the contract level — not at the wire-format / schema level. Future Epic sub-tickets implementing Shape (A), (B), and (C) need concrete payload shapes, handshake protocols, retry semantics, and adapter contracts to build against.
Without the ref doc:
notifications/messagepayload schema for our three trigger primitivesThe Architectural Reality
Per @tobiu's direction (relayed via Gemini): the ref doc lives at
learn/agentos/decisions/following the existing ADR pattern established by0001-cross-process-cache-coherence.md. Numbered convention →0002-phase3-wake-substrate-standards-alignment.md.ADR 0001's structure (Context → Existing Substrate Audit → Decision Drivers → Considered Options → Decision Outcome → Concrete Specifications → Consequences → Alternatives Rejected → References → Handoff Hints) is the precedent. ADR 0002 follows the same shape.
The Fix
Draft
learn/agentos/decisions/0002-phase3-wake-substrate-standards-alignment.mdas the standards-alignment reference document. Three concrete-specification sections form the load-bearing content:MCP notifications schema (Shape A) —
notifications/messagepayload shape forwake/sent_to_me,wake/task_state_changed,wake/permission_grantedevent types. Subscription handshake protocol. Capability negotiation at MCPinitialize.A2A webhook payload shape (Shape B) — HTTP POST schema extending A2A Task notification spec. HMAC-SHA256 body signing. Retry semantics with exponential backoff. Webhook registration via
WAKE_SUBSCRIPTION.harnessTargetMetadata.url.Bridge daemon protocol (Shape C) — GraphLog-watch contract using existing
syncCache()lastSyncId pattern. Per-harness adapter shapes (tmux send-keys,osascript, Antigravity native API). Coalescing window per OQ 6 (30-60s digest delivery). Wake-prompt format.Acceptance Criteria
learn/agentos/decisions/0002-phase3-wake-substrate-standards-alignment.mddraftedOut of Scope
WAKE_SUBSCRIPTIONschema migration — referenced in this ADR (Section on subscription state), but the actual schema migration ticket falls into the Epic.userIdscoping but doesn't implement the RLS engagement.Avoided Traps
Related
learn/agentos/decisions/0001-cross-process-cache-coherence.md) — format precedent and substrate-pattern peerlinkNodes+ WAL cache-warm retry; ADR Section bridge daemon consumes the same delta-stream pattern assyncCache()taggedConcepts: ['sunset-protocol-handover']filterOrigin Session ID:
52e84f76-2d4f-41cc-a42e-9d1d3fcaa381Retrieval Hint:
query_raw_memories(query='ADR 0002 phase 3 wake substrate standards alignment MCP notifications A2A webhook bridge daemon protocol schema specification')