# Notifications layer + Settings → Notifications → Factory

outcome: every module can emit named notification events; the owner toggles them per adapter (systray, Telegram) in the web UI; the factory is the first fully wired module.
status: ACTIVE — factory run launched 2026-08-15 against this plan.
source request: owner 2026-08-15 /brainstorm (verbatim anchors in the spec).
design spec: docs/specs/2026-08-15-notifications-layer-design.md — architecture, seams, decisions live there.
queued successor: docs/plans/2026-08-15-notification-overrides.md (per-run/per-project overrides — write seams now, build there).

## Execution

- [ ] N1 pipeline core: `POST /notify/emit`, rules engine (global scope; scope column present, non-global ignored), journal, defaults fallback. Evidence: an emitted test event routes per a rule and journals its decision.
- [ ] N2 adapters: telegram (via botmaster's channel resolution — SAME data, never duplicated) + systray (existing mechanism). Evidence: one event delivered on both, one adapter failure journaled without blocking the other.
- [ ] N3 factory becomes catalog module #1: refactor the just-landed factory start/finish/crash botmaster calls to emit through the pipeline; catalog JSON shipped. Evidence: a real factory run's notices arrive via the pipeline, journal shows the routing.
- [ ] N4 Settings UI: Settings → Notifications → Factory matrix (events × adapters, toggles) + journal strip; module-generic (any catalog module appears). Evidence: toggle an event off, run the factory, the disabled notice does not arrive and the journal says suppressed-by-rule.
- [ ] N5 `od-notify` CLI + TS client, fail-open proven (collector down → emitter unaffected).

Each slice: gates green (collector bun test, pnpm --filter web test typecheck build, factory pytest for N3 — NEVER weaken a gate), lands via ship.sh submit, deploys, evidence proven live before the next. UI: Astryx primitives, od-ui-dev rules, owner language. Constraints: edge-triggered only (no cooldown timers); fail-open everywhere; crash notices must survive rules-store outage (defaults fallback).

current receipt: spec + this plan + queued successor authored 2026-08-15; factory launched.
next executable action: factory run executes N1.
