Skip to content

OTel coordination contract

Copy page

OTEL carries the signal. Tapestry interprets the signal as coordination reinforcement.

OTel is the canonical telemetry transport (OTLP → Grafana Cloud). This page is the attribute contract every Tapestry-emitting event must carry so the observer can read those events as coordination signals — not just hook/tool noise.

  • Keep the existing OTLP → Grafana Cloud pipeline.
  • Preserve current hook / tool / session / snapshot / observer events.
  • Convert free-text note data into structured attributes where possible.
  • Add missing attributes only when they can be reliably generated.
AttributePurpose
tapestry.coordination_context_idThe single anchor that ties every event in one coordination episode together. Required on every Tapestry-emitting event.
AttributeWhen set
tapestry.project_idAlways
tapestry.session_idAlways
tapestry.agent_idIf known
tapestry.agent_roleIf known
tapestry.surface_id or tapestry.workflow_surfaceIf known
tapestry.surface_typeIf known
AttributeCarried by
tapestry.hook_nameEvery hook event
tapestry.tool_namePreToolUse / tool-invocation events
tapestry.architecture_snapshot_idSessionStart snapshot events
tapestry.diff_report_idSnapshot diff events
tapestry.observer_ranObserver events
tapestry.observer_detected_countObserver events
tapestry.observer_created_countObserver events
tapestry.observer_updated_countObserver events
tapestry.friction_presentAny event that surfaces friction
tapestry.friction_typeWhen friction_present=true
tapestry.correction_presentEvents involving an operator correction
tapestry.memory_read_countEvents that touch loom-memory
tapestry.memory_write_countEvents that touch loom-memory
tapestry.memory_missWhen a recall returned nothing
tapestry.upskill_candidate_presentEvents that surfaced a candidate

Coordination-quality signals MUST use one of these four states. Missing instrumentation is blind, not healthy.

StateMeaning
healthySignal present; coordination working as expected
degradedSignal present; coordination quality dropping
blindSignal not yet instrumented; absence of evidence ≠ evidence of absence
unknownSignal expected but unavailable this event (transient)

The Tapestry dashboard reads from OTel-backed telemetry. It is not Grafana. Grafana is the backend observability substrate; the Tapestry dashboard is the coordination-support view layered over that telemetry.

The transport is wired (integrations/claude-code/tapestry-discipline/scripts/_observability.py) — OTLP/HTTP push to Grafana Cloud via raw urllib, no SDK dependency.

Current attributes per event: hook_name, event, exit_code, elapsed_ms, action, note. The note field carries unstructured strings (out_of_scope, malformed_input, etc.) that this contract is meant to replace with typed attributes.

Intent. Intent is observer-derived, not telemetry-emitted. Adding intent attributes here would conflate the interpretation layer with the emission layer. The observer reads these typed attributes (plus memory, transcripts, diffs, prior findings) and produces an intent hypothesis as a separate output.

This page is the operator-facing surface of the contract. The internal architecture spec lives at docs/reference/coordination-telemetry-contract.md in the repo root (Tapestry-agent owned). If the two diverge, the repo-root spec is canonical.