Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Status: ✅ Complete Spec Reference: PF-32 Server-Side Expansion
Last Updated: 2026-03-15

Purpose

Documents integration points for PF-32 Server-Side Condition Evaluation Expansion: Edge Function API, PF-51 Caching Layer, PF-07 Error Monitoring, and client hooks.

Integration Points

Consumer/ProviderPatternDescription
evaluate-conditions Edge FunctionAPIServer-side condition evaluation endpoint
PF-51 Caching LayerPlatform LayerCaching infrastructure for evaluation results
PF-07 Error MonitoringPlatform LayerPerformance metrics, SLO alerts
useConditionEvaluation hookClientHybrid client/server evaluation routing

API Contract: evaluate-conditions

Endpoint: POST /functions/v1/evaluate-conditions
Authentication: Supabase JWT required
Authorization: Use verifyOrgAccess() from _shared/auth.ts

Request

See spec: EvaluateConditionsRequest (organization_id, form_id?, conditions, field_values, options?)

Response

See spec: EvaluateConditionsResponse (results, evaluation_method, evaluation_time_ms, cache_hit)

Error Codes

AUTH_FAILED | RATE_LIMIT | INVALID_CONDITIONS | TIMEOUT | CACHE_ERROR

PF-51 Integration

  • Use PF-51 caching patterns for evaluation result storage
  • pf_condition_evaluation_cache table stores evaluation results with TTL
  • Cache key: SHA-256 hash of condition + field values (see spec)

PF-07 Integration

  • SLO targets: p95 <200ms, cache hit rate >70%
  • Performance dashboard metrics
  • Alert channels for degradation

Cross-Core Integration Matrix

PF-32 Server-Side Expansion is Platform-internal. Add row to CROSS_CORE_INTEGRATIONS.md if cross-core consumers emerge (e.g. FW forms, CL assessments).