Local Effect doctrine for the pi healthcare harness. Use when a task touches files importing effect and needs consistent rules for services, schemas, errors, layers, config, and structured effectful composition.
Keep the harness on one Effect style so builder and reviewer do not improvise different patterns for contracts, runtime services, and failures.
effect.Schema boundary contracts.Schema for external contracts, agent handoffs, and runtime boundary
data.Schema.TaggedError for domain and transport errors that need stable
structure.catchTag or catchTags, not broad catchAll
rewrites that erase intent.Effect.Service for business services and declare dependencies in the
service definition.provide chains at random call sites.Effect.fn for named effectful operations that deserve stable tracing and
reviewable boundaries.Effect.log with structured fields instead of console.log.Config with validation instead of reading process.env directly in
domain or service logic.runSync or runPromise inside domain services.