{"id":"fb97fd8c-cd7d-416b-a3f8-657acebaf462","task":"Implement a custom OpenFeature provider to connect a feature flag backend to the OpenFeature SDK","domain":"openfeature.dev/docs","steps":["Install the OpenFeature SDK for your language (e.g., `npm install @openfeature/server-sdk` for Node.js)","Create a class implementing the `Provider` interface; implement `resolveBooleanEvaluation`, `resolveStringEvaluation`, `resolveNumberEvaluation`, and `resolveObjectEvaluation` methods","Inside each resolve method, call your feature flag backend API or SDK, map the result to an OpenFeature `ResolutionDetails` object (including `value`, `reason`, and optionally `variant`)","Implement `initialize()` to set up connections or caches when the provider is registered, and `shutdown()` to clean up","Register your provider globally: `OpenFeature.setProvider(new MyCustomProvider())` before evaluating any flags","Evaluate flags through the OpenFeature client API (`client.getBooleanValue('flag-key', defaultValue, context)`) — the SDK routes calls to your provider transparently"],"gotchas":["OpenFeature providers must handle errors gracefully and return a `ResolutionDetails` with an appropriate `errorCode` rather than throwing — unhandled exceptions in a provider can crash the calling application","The EvaluationContext passed to resolve methods is immutable and merged from global, transaction, and client contexts; do not mutate it inside the provider","If your backend requires async initialization (loading flags from an API), complete this work inside `initialize()` — returning from `initialize()` before the data is ready causes the provider to serve stale or default values"],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:47.415Z"},"url":"https://mcp.waymark.network/r/fb97fd8c-cd7d-416b-a3f8-657acebaf462"}