Implement, debug, refactor, migrate, review, or explain Effect TypeScript code. Use when a task touches `effect` or `@effect/*` APIs, especially services, layers, schemas, runtime wiring, platform or CLI packages, Effect testing, or Promise-to-Effect migration.
98
100%
Does it follow best practices?
Impact
93%
1.16xAverage score across 3 eval scenarios
Passed
No known issues
Use this file for Promise interop, framework integration, runtime questions, and debugging missing services or awkward Effect migrations.
Adopt Effect at boundaries first.
Good starting points:
Bad starting points:
Wrap Promise APIs instead of letting them leak through the codebase.
Effect.tryPromise when the Promise can reject or throw.Effect.promise when the Promise is already trustworthy and failure semantics are clear.AbortSignalPrefer a narrow wrapper at the boundary instead of sprinkling Promise conversion throughout the app.
use Patterneffect-solutions documents a practical use pattern for third-party libraries with wide Promise APIs.
Shape:
use methodAbortSignal into a callbackUse this when a library has many operations and writing a fully wrapped service API would create noise. Do not use it when a handful of explicit methods would be clearer.
Official runtime docs emphasize that Effect.run* executes a blueprint. Keep those calls at program edges.
Good places for Effect.run*:
Bad places for Effect.run*:
Use ManagedRuntime.make(layer) when an external framework or host environment needs to execute Effect code repeatedly but does not naturally own the main Effect entrypoint.
Good fits:
When an effect will not compose because of missing services:
R requirements deeper.Effect.fn functions so traces and spans are readable.Effect.either when you want to inspect failures without crashing the flow.Effect.runPromiseExit when defects or interruption matter during debugging.async functions returning Effect values or mixing await with yield*Effect.runPromise inside handlers that should stay inside Effect.unknown