PRD Validation

מטריצת כיסוי PRD

מיפוי חי בין דרישות PRD v1.0 לבין routes, APIs, tests ופערים. לא מסמנים “Done” עד שכל MUST מכוסה ומאומת.

Covered phase 020
Partial5
Items25
Sourcev1

Acceptance Coverage

דרישות, ראיות ופערים

AC-001partial

משתמש חדש מסוגל לפתוח מרחב, להזמין אדם נוסף ולהוסיף פריט ראשון בתוך פחות מחמש דקות.

פרקים: 1, 6, 7, 10

ממומש: Onboarding panel · Restored /login entry surface with Google/Magic Link affordances and auth contract disclosure · New item draft flow · Repository/API item creation · Phase 0 onboarding checklist for sign-in/family-space/invite/first-item path · Admin/adult-only family invite queue with email preview and audit event · GET/POST /api/onboarding · Onboarding timing measurement against the five-minute target

ראיות: / · /login · /items/new · POST /api/items · GET/POST /api/onboarding · components/OnboardingPanel.js · app/login/page.js · lib/onboarding.js · tests/domain.test.mjs

פער: Phase 0 מכסה login/onboarding UX, checklist, invite queue בטוח, audit ומדידת זמן; חסר Auth/OAuth אמיתי ושליחת אימייל production בפועל.

AC-002partial

כל פריט שנשלח בצ׳אט מופיע בתצוגה המתאימה לאחר סיווג ואישור, עם עקיבות לטקסט המקורי.

פרקים: 4, 12, 32, 34, 41

ממומש: Telegram Personal Task preview copy · Capture API · Raw message persistence · Classification confidence · Clarification-needed flow · Multi-step clarification thread on capture records · POST /api/captures { action: answer_clarification } re-runs classification and creates approval draft when resolved · Approval queue · Audit events · Draft-before-commit policy

ראיות: / · /captures · GET/POST /api/captures · /approvals · GET/PATCH /api/approvals · GET /api/audit · lib/capture.js · tests/domain.test.mjs

פער: Phase 0 כולל traceability, clarification thread, ותשובת הבהרה שמייצרת draft לאישור; חסר Telegram webhook אמיתי ומודל NLP/LLM production.

AC-003partial

אין אפשרות למשתמש או לסוכן לצפות בפריט אישי של משתמש אחר ללא הרשאה מפורשת ומתועדת.

פרקים: 25, 40, 41

ממומש: Auth scope facade · Access policy helper · Personal-private category · Restricted category policy panels · Repository enforcement for reads, creates, and completion updates · Deterministic RLS policy simulation for tenant, personal_private, restricted, and agent_limited workspace rows · Postgres/Supabase RLS draft statements for tenant-scoped workspaces/items/captures/audit access

ראיות: lib/auth.js · lib/access.js · lib/rls.js · db/schema.sql · tests/access.test.mjs · /categories/personal · tests/domain.test.mjs

פער: קיים auth facade, repository enforcement, וסימולציית/טיוטת RLS ל-Phase 0; חסר session/OAuth אמיתי ו-Postgres/Supabase adapter production עם policies מופעלות על מסד חי.

VAL-001partial

כל רכיב UI וכל סוכן קוראים וכותבים דרך אותה שכבת שירותים והרשאות.

פרקים: 2, 35, 37, 38

ממומש: itemRepository contract · DB adapter interface · /api/items · /api/approvals · /api/audit · /api/categories · /api/reminders · /api/calendar · /api/attachments · /api/finance-products · /api/workspaces · RLS contract documents the DB policy cutover boundary before production adapter swap

ראיות: lib/repository.js · lib/dbAdapter.js · lib/rls.js · db/schema.sql · components/CategoryItemsPanel.js · components/ApprovalQueue.js · tests/domain.test.mjs

פער: קיים adapter boundary עם in-memory parity ו-RLS contract/SQL draft; צריך לחבר Postgres/Supabase adapter ו-RLS אמיתי על מסד production.

APPROVAL-001covered-for-phase-0

פעולות סוכן ופעולות רגישות מחייבות Preview, אישור ו-Audit.

פרקים: 34, 41, Appendix A

ממומש: Draft item status · Completion pending approval · Custom category draft approval · Approval queue · Audit API · Actor/workspace/risk scoped approval decisions before mutation

ראיות: PATCH /api/items · GET/PATCH /api/approvals · POST /api/categories · GET /api/audit · tests/domain.test.mjs · tests/access.test.mjs

פער: חסר חתימת מאשר, session/OAuth אמיתי, ושרשור correlation מלא.

CUSTOM-CATEGORY-001covered-for-phase-0

קטגוריות מותאמות אישית נוצרות עם הרשאות, Audit ואישור לפני שינוי מבנה המוח.

פרקים: 26, 38, 41

ממומש: Custom category form · POST/GET /api/categories · Repository custom category draft workflow · Approval queue targetType support · Approved custom drafts become active workspace records · Dynamic custom category detail route and navigation rail support · Item draft creation in approved custom categories

ראיות: /categories/new · /api/categories · /api/workspaces · /items/new?category=[customKey] · /api/items · /categories/[customKey] · /approvals · tests/domain.test.mjs

פער: חסר הרשאות ניהול במסד נתונים קבוע ו-UI לניהול/עריכת קטגוריות מותאמות.

UX-RTL-001covered-for-phase-0

Web/PWA בעברית RTL, נגיש, responsive, בסגנון JARVIS אך ברור.

פרקים: 42, 43

ממומש: RTL root layout · Responsive grid CSS · JARVIS visual system · Accessible labels/status regions · Skip link in root layout · Keyboard focus-visible styles throughout · Loading/error/empty state components · PWA manifest.json, service worker, and icon assets · Accessibility audit contract with 14 deterministic checks for lang/dir/skip-link/focus-visible/reduced-motion/aria-live/aria-label/aria-labelledby/role-status/tablist/aria-selected/role-group · axe-core e2e accessibility audit via Playwright + @axe-core/playwright · 25 e2e accessibility tests across all 24 routes + skip-link verification · All 25 e2e tests passing: 0 critical/serious violations · axe-core ruleset: 26 rules active, bypass/color-contrast/region/landmark skips documented

ראיות: app/layout.js · app/globals.css · / · /categories/finance · /calendar · /reminders · /captures · /search · /relations · /export · public/manifest.json · public/sw.js · components/LoadingSpinner.js · components/ErrorState.js · components/SkeletonCard.js · lib/accessibilityAudit.js · tests/domain.test.mjs · e2e/accessibility.spec.cjs · e2e/playwright.config.mjs

פער: Phase 0 מכסה 14 בדיקות סטטיות + 25 בדיקות E2E axe-core על כל העמודים. חסר color-contrast validation (דורש תיקון ערכת צבעים), WAI-ARIA authoring practices manual audit, ו-screen reader end-to-end validation.

PRD-CH14-REMINDERScovered-for-phase-0

תזכורות, התראות והרגלים — מודל, API, UI, ערוצים, שעות שקטות, הסלמה.

פרקים: 14

ממומש: Reminder model with recurrence, channel, quiet hours, escalation · Seed reminders with demo data · /api/reminders GET/POST · Reminder creation UI form · /reminders UI page · Store operations: listReminders, createReminder · Repository createReminder

ראיות: lib/reminderCalendar.js · /api/reminders · /reminders · POST /api/reminders · tests/domain.test.mjs

פער: חסר reminder trigger engine אמיתי, push/email dispatch, Telegram webhook.

PRD-CH15-CALENDARcovered-for-phase-0

יומן משפחתי ותיאום זמינות — אירועים, Google Calendar sync, פרטיות, התנגשויות.

פרקים: 15

ממומש: Calendar event model with privacy levels, recurrence, participants · Seed events with realistic demo data · /api/calendar GET/POST · Calendar event creation UI form · /calendar UI page with month/week/agenda/day views and view switcher · Detailed day view with hourly slots · Conflict detection on create · Dashboard calendar strip (next 72h events) · Info panel about Google Sync and privacy levels · Store operations: listCalendarEvents, createCalendarEvent · Repository createCalendarEvent

ראיות: lib/reminderCalendar.js · /api/calendar · /calendar · POST /api/calendar · components/CalendarViewSwitcher.js · components/DashboardCalendarStrip.js · tests/domain.test.mjs

פער: חסר Google Calendar OAuth/sync אמיתי ו-time blocking מתקדם.

PRD-CH17-FINANCEcovered-for-phase-0

פיננסים — רישום מוצרים, Knowledge Cards, דוחות, תזכורות סקירה, אבטחה, רעננות נתונים.

פרקים: 17

ממומש: Finance product registry with typed product types and providers · Knowledge cards per product type with jurisdiction/date/source/disclaimer · Seed finance products with masked IDs and balance freshness · Finance product detail page with header, summary, knowledge card, attachments, version timeline, and audited download preparation · Finance family overview dashboard with per-owner grouping and summary stats · Finance report upload review builder extracts OCR signals for yield, balance, and management fees · Store operations: listFinanceProducts, getFinanceProduct, createFinanceProduct

ראיות: lib/financeProducts.js · lib/attachments.js · /api/finance-products · /api/attachments · /finance/products/[id] · /finance · tests/domain.test.mjs

פער: Phase 0 כולל upload/OCR/review contract ו-download audit envelope; חסר object storage/OCR production אמיתי, signed URLs ו-real restore/download streaming.

PRD-CH28-SEARCHcovered-for-phase-0

חיפוש, ניווט וגרף ידע — חיפוש טקסטואלי, פילטרים, הרשאות, שמירת שאילתות.

פרקים: 28

ממומש: Search model with text parsing, keyword relevance scoring, and filters · Search across items and captures · /api/search GET with query + filter params · /search UI page with text input, filter controls, and results list · Advanced filters: date range (from/to), assignee selector · Global search bar in layout with Cmd+K shortcut · Cross-domain unified search across items, finance, calendar, shopping, captures, relations · Grouped domain results with per-domain breakdown in search UI · Domain selector tabs (all/items/finance/calendar/shopping/captures/relations) · Hebrew-aware text relevance scoring (computeTextScore) · Search result highlighting using <mark> with query-aware word matching · Domain-specific color-coded result cards and domain tags · unifiedSearch pure function and searchCrossDomain store wrapper

ראיות: lib/search.js · app/api/search/route.js · /search · /api/search · app/search/page.js · components/GlobalSearchBar.js · app/layout.js · tests/domain.test.mjs · app/globals.css

פער: חסר חיפוש סמנטי/embedding, saved views ו-saved queries. Cross-domain unified search מכסה 6 דומיינים.

PRD-CH28-RELATIONScovered-for-phase-0

גרף ידע — קשרים בין פריטים, תצוגת גרף, קשרי AI לאישור.

פרקים: 28

ממומש: 12 typed relation types with bidirectional lookup · Graph adjacency list builder for visualization · Relation creation with validation and audit · /api/relations GET/POST · /relations UI page with adjacency graph display · Interactive D3.js force-directed knowledge graph with drag, zoom, and relation-type color coding · Visual graph component with node labels, edge labels, legend, and view toggle (graph/list)

ראיות: lib/relations.js · /api/relations · /relations · components/KnowledgeGraph.js · tests/domain.test.mjs

פער: חסר AI-suggested relations, relation search, ו-bulk import/export.

PRD-CH29-ATTACHMENTScovered-for-phase-0

קבצים, OCR, גרסאות — מטא-דאטה, Hash dedup, OCR, גרסאות, אבטחה.

פרקים: 23, 29

ממומש: Attachment metadata model with document types, OCR status, version tracking, expiry · OCR simulation stub with confidence scoring · Private object-storage upload plan with no exposed credentials · Audited download envelope with no raw storage credentials exposed · Document version timeline helper and finance detail UI timeline · OCR job envelope with sanitized storage input · Finance report review builder with extracted signal evidence · Hash-based dedup concept · Seed attachments linked to finance items · /api/attachments GET/POST with linkedItemId filter · POST /api/attachments { action: plan_upload } · POST /api/attachments { action: process_ocr } · POST /api/attachments { action: prepare_download } · Repository createAttachment and prepareAttachmentDownload

ראיות: lib/attachments.js · /api/attachments · POST /api/attachments · /finance/products/[id] · db/schema.sql · tests/domain.test.mjs

פער: Phase 0 כולל pipeline contract בטוח, Download Audit envelope ו-version timeline UI; חסר S3-compatible storage חי, actual file upload/download streaming, signed URLs ו-virus scanning.

PRD-CH36-WEBHOOKScovered-for-phase-0

Webhooks ואירועים — subscriptions, domain events, delivery, retry, dead-letter.

פרקים: 36

ממומש: 19 domain event types in registry · Webhook subscription model with URL validation, secret, retry policy, dead letter · Domain event envelope builder with correlation ID · Delivery log model with pending/delivered/retrying/dead_lettered states · Manual webhook.test event generation · /api/webhooks GET/POST · /webhooks UI page with subscription list, test event action, outbox metrics, delivery logs, retry simulation, and dead-letter evidence

ראיות: lib/webhooks.js · /api/webhooks · /webhooks · tests/domain.test.mjs

פער: Phase 0 כולל outbox/delivery logs/test event/retry-dead-letter simulation; חסר actual webhook delivery engine חיצוני (queue/worker), חתימת HMAC אמיתית, retry scheduling production-grade, ו-dead letter replay מול endpoints אמיתיים.

PRD-CH49-EXPORTcovered-for-phase-0

ייצוא וייבוא נתונים — JSON, CSV, Markdown, ICS, Blob Bundle, Manifest, אבטחה, Dry Run.

פרקים: 49

ממומש: Full space JSON export builder with manifest and entity counts · Export summary with breakdowns by type/status/category/product type · Privacy-safe default JSON export: no secrets and no raw blobs · /api/export GET (summary and full) · /export UI page with format selector · CSV export for items and finance products · ICS export (RFC 5545) for calendar events · Markdown human-readable summary · Obsidian Mirror export with folder paths, frontmatter, wiki links, relation backlinks, and attachment metadata index · Full Blob Bundle export with attachment manifest, base64 payloads where object content is available, SHA-256 hashes, and explicit unavailable markers · Downloadable blob files with Content-Disposition headers · Import dry-run model with entity mapping, create/update/skip preview, duplicate-id detection, warnings/errors, and cancel token · Import staging and approved commit pipeline with sanitized row application and audit event · /api/import GET/POST for capabilities, dry_run, stage, commit, and cancel · /export page import panel with JSON textarea, mapping preview, row preview, staging, approved commit, and cancel action

ראיות: lib/export.js · lib/import.js · lib/store.js · /api/export · /api/import · /export · tests/domain.test.mjs

פער: Phase 0 blob bundle models raw-file portability; production still needs S3/object-storage streaming, large-file chunking, signed URLs, and restore verification.

PRD-CH17-FINANCEcovered-for-phase-0

פיננסים — רישום מוצרים, Knowledge Cards, דוחות, תזכורות סקירה, אבטחה, רעננות נתונים.

פרקים: 17

ממומש: Finance product registry with typed product types and providers · Knowledge cards per product type with jurisdiction/date/source/disclaimer · Seed finance products with masked IDs and balance freshness · Finance product detail page with header, summary, knowledge card, attachments · Finance family overview dashboard with per-owner grouping and summary stats · Finance alerts computation: expired, stale data, pending status, insurance renewal, missing balance · Alerts dashboard section with severity badges and links to product detail · Finance trend view with balance history normalization, per-product deltas, and aggregate timeline · Asset-wide finance search across product labels, providers, types, status, and linked attachment OCR/metadata · Store operations: listFinanceProducts, getFinanceProduct, createFinanceProduct · Repository and API endpoints for trend view and asset-wide search · Seed finance products now include balanceHistory points for trend demo

ראיות: lib/financeProducts.js · /api/finance-products · /finance/products/[id] · /finance · app/api/finance-products/route.js · tests/domain.test.mjs

פער: Phase 0 includes deterministic trend view and asset search; חסר report upload/OCR pipeline ו-production object-storage restore path.

PRD-CH15-SYNCpartial

Google Calendar & Drive Sync — OAuth, sync direction, view switching, conflict detection.

פרקים: 15, 29

ממומש: Sync connection model with typed providers, scopes, directions, privacy levels · /api/sync GET/POST stub · /sync UI page with connection list and create form · Seed sync connections for Google Calendar and Drive · Manual sync run action with log creation · Sync logs list in UI · Conflict queue model and human resolution actions · Calendar day/week/month/agenda view switching evidence · Deterministic schedule plan and due-sync runner for cron/worker integration · POST /api/sync { action: run_due_syncs } for safe scheduler triggering · Sanitized webhook intake envelope with accepted/ignored events and no raw secret payload storage · POST /api/sync { action: receive_webhook } plus UI simulation controls

ראיות: lib/sync.js · /api/sync · /sync · app/api/sync/route.js · app/sync/page.js · tests/domain.test.mjs

פער: Phase 0 כולל scheduler/webhook envelope בטוח, logs ו-conflict queue; חסר OAuth 2.0 אמיתי, provider signature verification production-grade, external queue/worker, and live Google Calendar/Drive API writes.

PRD-CH17-FINANCE-OVERVIEWcovered-for-phase-0

Family Finance Overview Dashboard — per-owner aggregation, summary stats, expiry alerts, trend view, asset search.

פרקים: 17

ממומש: Finance overview page with per-owner grouping and summary stats · /finance page with product cards linked to full detail · Knowledge Cards per product type with disclaimer · Finance trend view tab with per-product delta, aggregate timeline, and balance history points · Finance asset-wide search tab with per-query results and match-field tags · Seed finance products with balanceHistory for trend demo

ראיות: app/finance/page.js · /finance · /finance/products/[id] · lib/financeProducts.js · app/api/finance-products/route.js · tests/domain.test.mjs

פער: חסר expiry/review reminders on dashboard, report upload/OCR pipeline.

PRD-CH43-ACCESSIBILITYcovered-for-phase-0

Mobile, נגישות וביצועים — skip link, focus management, keyboard reachability, aria landmarks, loading/error/empty states.

פרקים: 43

ממומש: Skip link in root layout · Keyboard focus-visible styles throughout · Aria labels on all interactive elements · LoadingSpinner, SkeletonCard, ErrorState components for consistent UX · Error states with retry on all client pages · Proper aria-live regions for dynamic updates · PWA manifest.json with app metadata and icons · Service worker stub with cache-first for static assets · PWA icons for 192 and 512 sizes · PWA tests in domain.test.mjs · Axe-core e2e accessibility audit across all 24 pages · 0 critical/serious violations on all pages

ראיות: app/layout.js · app/globals.css · public/manifest.json · public/sw.js · public/icons/icon-192.svg · public/icons/icon-512.svg · components/LoadingSpinner.js · components/ErrorState.js · components/SkeletonCard.js · / · /reminders · /calendar · /search · /relations · /webhooks · /export · tests/domain.test.mjs · e2e/accessibility.spec.cjs · e2e/playwright.config.mjs

פער: Phase 0 מכסה axe-core E2E על 24/24 עמודים. חסר WAI-ARIA authoring practices manual audit, screen reader end-to-end validation, ו-CI integration ל-axe-core.

PRD-CH21-SHOPPINGcovered-for-phase-0

קניות ורשימות משותפות — רשימות מרובות, קליטה מהירה, איתור כפילויות, מצב חנות, המרה למשימה.

פרקים: 21

ממומש: Multiple named shopping lists (supermarket, pharmacy, kids, home) · Quick capture with quantity control · Dedup detection on add with force-add option · Item status lifecycle: pending → in_cart → bought · In-store mode with large action buttons · Department/store grouping · Progress tracking bar · Convert item to task draft (approval workflow) · API CRUD with bulk status updates · Seed data with 13 items across multiple lists

ראיות: lib/shopping.js · app/api/shopping/route.js · app/shopping/page.js · components/ShoppingList.js · tests/domain.test.mjs

פער: חסר sharing/real-time sync between family members, push notifications, voice capture, ו-price tracking.

PRD-CH10-DASHBOARDcovered-for-phase-0

דף הבית ולוח הפיקוד — Global Capture, Today Brief, Calendar Strip, Pending Confirmations, Category Rail, Quick Search, Focus.

פרקים: 10

ממומש: Global quick capture input with type buttons · Today Brief section with DashboardCalendarStrip (next 72h events) · DashboardPendingConfirmations widget (approve/reject) · Metrics row with live counts · Category rail navigation · Priority Queue (urgent/important sorted tasks) · Finance panel with subcategories · JARVIS panel with command preview · Onboarding panel · Focus section with WIP limit and toggle tasks · GlobalSearchBar with Cmd+K shortcut

ראיות: app/page.js · components/DashboardCalendarStrip.js · components/DashboardPendingConfirmations.js · components/FocusSection.js · components/GlobalSearchBar.js · lib/domain.js · tests/domain.test.mjs

פער: חסר widget rearrangement by user, calendar view switching improved in ongoing phase.

PRD-CH27-IDEAScovered-for-phase-0

רעיונות, פרויקטים ותמונות מייצגות — שלבי בשלות (גולמי → בבדיקה → מועמד → מאושר/נדחה → ארכיון), ערך/מאמץ, תגיות, תצוגת לוח.

פרקים: 8, 27

ממומש: Idea maturity stage model (raw/exploring/candidate/approved/rejected/archived) · Value/effort scoring with priority ratio · Tag system for categorization · Seed demo ideas with varied maturity stages and values · Dedicated /ideas page with kanban board grouped by maturity stage · Category filter on ideas page · Idea card component with value/effort bars and representative image rendering · Representative image support with imageUrl display or gradient placeholder · TaskCard also renders representative images for project/idea items · Navigation link from dashboard

ראיות: lib/knowledgeIdeas.js · /ideas · app/ideas/page.js · components/TaskCard.js · tests/domain.test.mjs

פער: חסר drag-and-drop between maturity stages, AI-suggested maturity moves, bulk operations.

PRD-CH8-NOTEScovered-for-phase-0

מידע וידע (Note/Knowledge) — תמיכה ב-Markdown, תגיות, סינון, תצוגת כרטיסים, חיפוש פנימי.

פרקים: 8, 30

ממומש: Knowledge note model with markdown body, tags, sources · Rich markdown rendering (headers, bold, italic, tables, checkboxes, lists, links, code) · Expandable card view with full markdown preview · Tag-based filtering and text search · Seed demo knowledge notes across categories (finance, medical, travel, AI, family) · Dedicated /notes page with filter bar and knowledge card grid · Navigation link from dashboard · Phase 0 deterministic note intelligence: auto-summary, suggested tags, wiki-link extraction, backlinks, unresolved link tracking, and version-history timeline

ראיות: lib/knowledgeIdeas.js · /notes · app/notes/page.js · tests/domain.test.mjs

פער: Phase 0 כולל סיכום/תגיות/קישורי Wiki/Backlinks/גרסאות דטרמיניסטיים; חסר LLM production suggestions, collaborative editor diffing, and persisted note-version table.

PRD-CH45-ANALYTICScovered-for-phase-0

אנליטיקה, תובנות וסקירות — daily brief, weekly review, overdue/stale/expiring detection, inbox aging, pending approval age.

פרקים: 10, 45

ממומש: Analytics library with deterministic Phase 0 helpers: buildDailyBrief, buildWeeklyReview, buildDocumentReviewQueue, buildAnalyticsSnapshot, buildAnalyticsTrend, buildDashboardAnalyticsWidgets, getOverdueItems, getStaleItems, getExpiringDocuments, getExpiredDocuments, getAgedInboxItems, getAgedApprovals · Document review queue normalizes expiresAt/expiryAt, flags expired/expiring/OCR/hash issues, and recommends renewal/manual-review/hash-capture actions · Snapshot history captures daily/weekly/expiry metrics for trend-over-time review in the safe Phase 0 store · Trend helper computes deltas for overdue, stale, expiring, expired, document review queue, and approval pressure metrics · Configurable dashboard analytics widgets with default catalog, selected-widget normalization, safe preference storage, and audit event · Seed analytics demo data with overdue, waiting, stale, expiring documents, and accomplished items · Store wrappers: runDailyBrief, runWeeklyReview, runOverdueCheck, runStaleCheck, runExpiryCheck, recordAnalyticsSnapshot, listAnalyticsSnapshots, runAnalyticsTrend, getDashboardAnalyticsWidgets, updateDashboardAnalyticsWidgets · API route GET /api/analytics with ?view=daily|weekly|overdue|stale|expiry|snapshots|dashboard_widgets and POST record_snapshot/update_dashboard_widgets · UI page /reviews with tabbed daily brief, weekly review, overdue items, stale items, expiry sections, document review queue evidence, and snapshot trend panel · DashboardAnalyticsWidgets component renders user-selected analytics widgets on home dashboard · Dashboard link to reviews page · Auto-refresh every 60 seconds on reviews page

ראיות: lib/analytics.js · app/api/analytics/route.js · app/reviews/page.js · components/DashboardAnalyticsWidgets.js · app/page.js · lib/store.js · db/schema.sql · tests/domain.test.mjs

פער: Phase 0 analytics are deterministic and include document review recommendations, in-memory snapshot/trend history, and configurable dashboard widgets; חסר DB-backed production persistence, external scheduled collection, automated weekly digest delivery, and production preference persistence.

PRD-CH31-RULEScovered-for-phase-0

כללי אוטומציה — מודל כלל (טריגר, תנאי, פעולה), מנוע התאמה, UI לניהול כללים, סימולציה.

פרקים: 31

ממומש: Rule model with triggers, conditions (6 operators), and actions (8 types) · Deterministic rule matching engine: evaluateCondition, evaluateRule, matchRules · Rule action application: applyRuleActions, computeRuleEffects · 7 seed rules: auto-tag finance, urgency alert, medical auto-categorize, document expiry, shopping task, AI project tag, daily document expiry scan · Rule toggle (enable/disable) and match statistics · Automatic item.created/item.updated/item.status_changed trigger evaluation in the store layer with mutating safe actions and notification audit queue · Deterministic schedule.daily evaluation via runDailyRuleEvaluation and POST /api/rules { action: run_daily } · Action ordering and blocking conflict detection before mutating automated effects · Persisted in-memory conflict review queue with candidate actions and reviewer decision capture · Resolved conflict reviews apply the selected safe action exactly once and audit the applied item id · POST /api/rules { action: resolve_conflict_review } · UI ConflictReviewPanel for resolving open rule conflicts · Store wrappers: listRules, getRule, createRule, toggleRule, deleteRule, simulateRuleMatching, listRuleConflictReviews, persistRuleConflictReview, resolvePersistedRuleConflict · API route GET/POST /api/rules with simulation, daily-run, and conflict-review support · UI page /rules with rule cards, filter (all/enabled/disabled), simulation panel, daily scheduler panel, persisted conflict review panel, capabilities · Dashboard link to rules page · Condition presets for quick simulation testing · Audit events for rule creation, toggle, delete, match simulation, automatic evaluation, daily evaluation, conflict detection/review, resolution application, and notification queue

ראיות: lib/rules.js · app/api/rules/route.js · app/rules/page.js · lib/store.js · /api/rules · /rules · tests/domain.test.mjs

פער: Phase 0 כולל automatic item triggers, schedule.daily run endpoint/UI, ordered actions, and persisted in-memory conflict-review workflow; חסר production external cron/worker wiring ו-DB-backed conflict-review workflow.