You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Land the cross-session events substrate — events + event_links + FTS5 tables — and populate it via the prompted event-emission contract plus a hub-observed synthesis fallback. No Overseer yet; just the substrate.
docs/plans/2026-06-03-overseer-contracts.md §1 (worker event taxonomy, wire format, hub-observed fallback), the events / event_links / artifact_refs schemas, §2 (worker state model, for stale synthesis)
Code refs: hub/src/store/messages.ts, hub/src/store/sessions.ts (store layer to model on); shared/src/modes.tsAGENT_FLAVORS
Acceptance
Migration adds events table (incl. artifact_refs, operator_action_required, risk_detected, attention_candidate, dedupe_key, severity, confidence, provenance, idempotency_key) per the contracts schema.
FTS5 virtual table over summary + tags + payload_json.
Worker event taxonomy implemented via the prompted event-emission contract (sentinel-delimited JSON blocks <!--HAPI_EVENTS_BEGIN--> / <!--HAPI_EVENTS_END-->, schema_version, required event_type + summary, defensive coercion/validation; malformed input writes a validation_error event with source_kind = system).
completed enrichment honored: resolving flags (operator_action_required, artifact_refs, risk_detected, confidence) rather than completion subtypes.
Hub-observed event synthesis layer: when prompt compliance fails (no completed despite finishing, no stale despite long silence, no tool_result despite an obvious tool call), the hub synthesizes the event from observable signals with source_kind = system and provenance noting the inferred signal.
Read-only events viewer in the UI debug pane to confirm shape and density.
attention_candidate defaults to 0 (safe default: unknown event types do not push the operator).
1-2 PRs: events schema migration; worker prompted-emission contract + wire format; hub-observed fallback (could split if migration and fallback land separately).
Risks
The events table is the new load-bearing wall: schema wrong, retrofit painful; schema right, every future feature plugs in for free. The migration deserves specific review attention. Add event_links from day one — retrofitting typed dependency edges into a populated events table is much more painful than getting them in early.
Prompted event-emission is best-effort; workers will sometimes fail to emit. The hub-observed fallback is essential and must be built alongside the taxonomy, not later — otherwise the substrate has silent holes the Overseer cannot reason about.
Goal
Land the cross-session events substrate —
events+event_links+ FTS5 tables — and populate it via the prompted event-emission contract plus a hub-observed synthesis fallback. No Overseer yet; just the substrate.Spec
docs/plans/2026-06-03-overseer-build-sequence.mdStep 2 (primary)docs/plans/2026-06-03-overseer-contracts.md§1 (worker event taxonomy, wire format, hub-observed fallback), theevents/event_links/artifact_refsschemas, §2 (worker state model, forstalesynthesis)hub/src/store/messages.ts,hub/src/store/sessions.ts(store layer to model on);shared/src/modes.tsAGENT_FLAVORSAcceptance
eventstable (incl.artifact_refs,operator_action_required,risk_detected,attention_candidate,dedupe_key,severity,confidence,provenance,idempotency_key) per the contracts schema.event_linkstable (typed edges:spawned | blocks | blocked_by | supersedes | resolves | caused_by | duplicates) — from day one.summary + tags + payload_json.<!--HAPI_EVENTS_BEGIN-->/<!--HAPI_EVENTS_END-->,schema_version, requiredevent_type+summary, defensive coercion/validation; malformed input writes avalidation_errorevent withsource_kind = system).completedenrichment honored: resolving flags (operator_action_required,artifact_refs,risk_detected,confidence) rather than completion subtypes.completeddespite finishing, nostaledespite long silence, notool_resultdespite an obvious tool call), the hub synthesizes the event from observable signals withsource_kind = systemandprovenancenoting the inferred signal.attention_candidatedefaults to 0 (safe default: unknown event types do not push the operator).Out of scope
source_kind=channel) — post-MVP (Hub/MCP: channels support - inbound push from MCP servers into sessions #17).Dependencies
Suggested PR breakdown
1-2 PRs: events schema migration; worker prompted-emission contract + wire format; hub-observed fallback (could split if migration and fallback land separately).
Risks
event_linksfrom day one — retrofitting typed dependency edges into a populated events table is much more painful than getting them in early.