Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-03-23
Spec: FW-58
Status: 📝 Planned
Overview
FW-58 provides business-oriented KPI dashboards (approval rates, SLA compliance, form completion, automation throughput, time-saved estimates), snapshot storage for scalable reads, drill-down into existing FW surfaces, and scheduled PDF reports delivered through PF-10.Integration Points
1. FW-23 (Workflow Performance Analytics)
Pattern: Intra-core navigation / complementary metricsDirection: FW-58 deep-links to execution lists or FW-23 views from automation throughput cards
Status: 📝 Planned FW-23 focuses on technical execution performance. FW-58 consumes execution counts and success rates for business KPIs without duplicating node-level timing charts.
2. FW-34 (Approval Workflows)
Pattern: Data read + drill-down routeDirection: KPI aggregates from
fw_approval_requests; drill-down opens filtered approval listStatus: 📝 Planned
3. FW-35 / PF-83 (SLA)
Pattern: Data readDirection: SLA compliance KPI reads deadline/breach fields from approval + SLA instance data per existing FW-35/PF-83 contracts
Status: 📝 Planned
4. FW-05 (Multi-Page Forms)
Pattern: Data read (optional)Direction: Form drop-off KPI uses page/step analytics when available
Status: 📝 Planned
5. PF-10 (Notifications) & email provider
Pattern: Platform Layer — email with link to stored PDF (Phase 1)Direction: FW-58 Edge function uploads PDF to Storage, then creates
pf_notifications rows and/or sends via sendEmailWithAutoConfig (moduleCode: 'fw')Status: 📝 Planned Contract (high level):
- Caller:
fw-kpi-scheduled-reportEdge function (service role after schedule validation). - Recipients: org profile emails only (Phase 1 per spec).
- No raw PDF attachment in Phase 1:
supabase/functions/_shared/email-provider.tsEmailSendRequesthas noattachmentsfield; HTML body includes signed download URL (and optionalaction_urlto/fw/...dashboard when route exists). - Phase 2 (optional): extend
sendEmail/ Graph / Gmail builders to support attachments, then attachapplication/pdfdirectly.
6. PF-58 (Table v2)
Pattern: Platform LayerDirection: Tabular drill-down lists use
@/platform/table-v2Status: 📝 Planned
7. FW-43 (Audit Trail) — optional
Pattern: Convention / future correlationDirection: Report generation may emit audit events aligned with FW-43 patterns; not blocking for MVP
Status: 📝 Deferred
Event Contracts
No new cross-core domain events required for Phase 1. Optional internal event:fw_kpi_report_sent for observability (intra-core only).
Security & Tenancy
- All new tables include
organization_idand RLS viafw_has_org_access. - Snapshot writes are not exposed as direct authenticated INSERT; use
SECURITY DEFINERbatch function or Edge job with validated scope. - Drill-down respects underlying table RLS and permission keys on target UIs.
Related Documents
- CROSS_CORE_INTEGRATIONS.md — matrix row for FW-58
- PLATFORM_INTEGRATION_LAYERS.md
- FW-58 CONTEXT — UI and behavior decisions