# maariv01 — MASTER MAARIV > Read this first every session. Single source of truth for coordination. > URL: https://maariv01.desk-ai.vip ## IDENTITY [MASTER-MAARIV] = Claude (architect, MCP, code, deploy, coordination) [AZOLAI] = Yossi Azolai (product owner, keys, decisions, final approval) ## SUPER-LAW - ALL UI = maariv01.desk-ai.vip (Cloudflare Worker) - ALL data = R2 maariv01 (articles 10170 V3 envelopes) + D1 maariv-edge-db - ALL AI = Gateway maariv01 (Gemini 2.5 Flash, /compat endpoint) - ALL keys = CF Secrets Store (GEMINI_KEY) — never on server - ALL logs = R2 maariv01/_system/log/ (append) - FORBIDDEN: azolai bucket, 188 direct, 63 on hot path - FORBIDDEN: deploy without test, fabricate data ## STACK (pure Cloudflare) Worker: maariv-avi-cohen @ maariv01.desk-ai.vip (v8bcfa5f9) D1: maariv-edge-db (383b2dcf) — catalog R2: maariv01 — 10170 articles (1.47GB) + _system/ Gateway: maariv01 — Gemini 2.5 Flash Vectorize: maariv-5w-{who,what,when,where,why} — 4794 vectors Dev: /maariv-master on EX63 (wrangler deploys from here) ## ENDPOINTS GET /health — worker status GET /tasks — task board (R2 _system/tasks.json) GET /log — today log (R2 _system/log/YYYY-MM-DD.ndjson) GET /capabilities — CF capabilities research GET /llms.txt — this file POST /5w — extract who/what/when/where/why (responseSchema JSON) POST /classify — classify press release (JSON) POST /write — write article SSE stream POST /headlines — 3 headline variants A/B/C (JSON) ## CURRENT FOCUS Test A7: full press-release -> article SSE (T002) Evaluate AI Search on maariv01 R2 (T008) — may replace D1+Vectorize Evaluate R2 SQL on maariv01 V3 envelopes (T009) — may replace D1 catalog ## LOG FORMAT YYYY-MM-DD HH:MM | [IDENTITY] action — result Append to: R2 maariv01/_system/log/YYYY-MM-DD.ndjson # OPEN TASKS - [T001] Seed D1 maariv-edge-db catalog (6545 articles) (claude, high) - [T002] Test /write SSE full press release -> article (A7) (claude, high) - [T003] Rotate Gemini test API key (azolai, high) - [T004] Build /fetch-body Worker using env.ARTICLES R2 binding (claude, medium) - [T005] Sign canonical law after A7 success (both, high) - [T006] Cloudflare Access on maariv01.desk-ai.vip (claude, medium) - [T007] Add /log SSE + /tasks endpoints to Worker (claude, medium) - [T008] Evaluate AI Search on maariv01 R2 bucket (replaces D1+Vectorize?) (claude, critical) - [T009] Evaluate R2 SQL on maariv01 articles (replaces D1 catalog?) (claude, critical) - [T010] Update Worker to /compat unified endpoint (provider-agnostic) (claude, high) # CF CAPABILITIES (critical) ## AI Search (2026-04-16) Hybrid search (keyword+semantic) on R2 maariv01 directly. Workers Binding. MCP support. Custom metadata filtering. Relevance boosting. /chat/completions endpoint. Impact: ARCHITECTURE CHANGE: replaces D1 FTS + Vectorize combo. AI Search indexes R2 maariv01 articles and provides both keyword and semantic search in one binding. env.SEARCH.search(query) Action: Evaluate AI Search on maariv01 bucket BEFORE building D1 catalog (T001) ## R2 SQL (2026-05-15) SQL engine directly on R2 objects. JOINs, subqueries, 190+ functions, JSON functions, EXPLAIN FORMAT JSON. Impact: ARCHITECTURE CHANGE: run SQL on the 10170 V3 envelopes in R2 maariv01 without extracting to D1. SELECT content->who, content->headline FROM r2.maariv01 WHERE ... Action: Evaluate R2 SQL before seeding D1 catalog (T001 - may become obsolete) ## AI Gateway unified REST API (2026-05-21) Single /ai/run endpoint + /compat/chat/completions. All providers (Gemini, Anthropic, OpenAI, Workers AI). Same prompt, change only model name. Impact: Avi Cohen is fully provider-agnostic. Switch Gemini->Anthropic->Workers AI without changing prompt or code. Action: Update Worker to use /compat endpoint instead of direct google-ai-studio path ## Agents SDK v0.14.0 (2026-06-02) Agent Skills (modular on-demand tools), Telegram messenger, declarative scheduled tasks, durable reasoning in Workflows. Impact: Avi Cohen becomes true super-agent: stateful, persistent, provider-agnostic, sub-agents, scheduled tasks. Action: After A7 test: migrate Worker to @cloudflare/agents AIChatAgent