Where The Daily sits in a real agentic-analytics pipeline.
Five layers, two execution states. Solid lines are wired today. Dashed lines are the production sketch: code committed under dbt/ and airflow/dags/, but it doesn't execute in the MVE.
System at a glance
Solid stroke + filled chip = wired. Dashed stroke + outline chip = sketched.
Wiring legend
Every layer below carries one of three states. The mix matters as much as the picture. Most of the user-visible pipeline runs end-to-end. The warehouse plumbing is the one place that stays sketched for the MVE.
Onboarding & preferences
Runs once per personawiredThe /onboarding form captures Priya's frame in her own words, then writes a per-user preferences file the priority engine reads.
/onboarding form
Captures Priya's frame: cadence, attention thresholds, the metrics she watches.
preferences.md
Per-user file the priority engine reads. Compiled by lib/preferences-compiler.ts.
Warehouse & marts
Production target · sketched todaysketchedA Databricks workspace plus Unity Catalog is the physical home for the marts. dbt models materialize against it. Profiles are templated, credentials are placeholders.
Databricks + Unity Catalog
Physical home for the marts. Catalog and schema mapping in dbt/profiles.yml (placeholder creds today).
dbt-databricks adapter
Materializes mart_* tables against Unity Catalog. The eight models live under dbt/models/marts/.
Airflow DAG
airflow/dags/decision_builder_dag.py schedules dbt plus the builder end-to-end. Today the builder runs by hand.
Decision builder
Manual run · emits the JSON contractwiredReads preferences.md plus a fixture mart and emits one decision_board.json per scenario. Deterministic Python. No LLM at the seam.
scripts/decision_builder.py
Reads preferences plus a fixture mart and emits decision_board.<scenario>.json. Same shape every consumer parses.
decision_board.json
Single contract between data, agent, and UI. Validated against lib/schema.ts at build time.
Static SPA & priority engine
Next.js 15 · static exportwiredThe SPA fetches the JSON, ranks it client-side with the priority formula, and renders the bento. Zero server-side rendering at request time.
lib/priority.ts
Sorts decisions on $-at-risk × urgency × time-fit. Reads the user's weights from preferences.md.
The bento
1 hero, 2 medium, 5 small cards. Peach attention pulse on the urgent ones, classified by lib/attention.ts.
Worker & chat handler
Cloudflare Worker · streamed via SSEwiredThe Worker's /api/chat handler streams Claude responses with the persona profile plus company KB bundled as a cached system prompt.
src/index.ts (Worker)
Single fetch handler. /api/chat routes first; everything else falls through to the static SPA.
/api/chat
Anthropic SDK called direct from the Worker. System prompt cached (ephemeral) so the persona context stays warm.
The four surfaces that would make this a product.
Feedback loop
Capture decision outcomes and re-weight the priority formula per persona over time.
Act layer
Write-back to a price engine or Slack, so recommended actions don't end at "open decision."
Governance + audit log
Every decision board snapshot, preferences edit, and chat trace stored for review.
Multi-persona deployment
The contract is persona-generic. Adding Morgan (growth) or Dana (ops) is a preferences-file change, not a code change.
