This is the compact reference for moving code toward the current Effect
shape. The high-level roadmap is todo.md; examples and
rules are in guide.md.
Effect.Effect.fn("Domain.method").defaultLayer wires production dependencies; tests can use open layers
when replacing dependencies.Use InstanceState for per-directory state, subscriptions, scoped
background work, and per-instance cleanup.
Do not add ad hoc started flags on top of InstanceState; the scoped
cache handles run-once and concurrent deduplication.
Prefer AppRuntime for crossing from non-Effect code into the shared app
layer.
makeRuntime(...) exists for intentional service-local boundaries and
legacy facades. Do not add new service-local runtimes unless the service is
genuinely outside AppLayer.
FSUtil.Service instead of raw filesystem APIs in
effectified services.AppProcess.Service instead of raw process wrappers.HttpClient.HttpClient instead of raw fetch in Effect code.Effect.cached for shared in-flight work.Effect.callback for callback APIs.When migrating code, migrate touched tests toward
test/EFFECT_TEST_MIGRATION.md:
testEffect(...)it.effect, it.live, or it.instance