Skip to content

Effect

The example code uses Effect 4, which is still a release candidate. Its API moves, so trust the installed version over memory.

  1. Read effect/AGENTS.md and effect/ai-docs/ inside a workspace package’s node_modules, such as packages/bookings/node_modules/effect/AGENTS.md. pnpm does not install effect at the repo root.
  2. For API shape, read the source mirror at .agent_sources/github.com/Effect-TS/effect. Run pnpm vendor:agent-sources if it is missing.
Rule Checked by
Expected errors are Schema.TaggedError classes in the error channel. Never a global Error, never throw in Effect code. Effect diagnostics, in part
A service method returns an Effect with no requirements. Effect diagnostics (leakingRequirements)
Delivery maps typed errors once, in the handler. Use-cases let them flow. review
Never run an Effect by hand inside Effect code or tests. Tests use it.effect or it.layer. Effect diagnostics (runEffectInsideEffect), and review
effect, @effect/vitest, and every @effect/* runtime package share one exact version. review, with exact pins
Never set an Effect diagnostic below error, and never override the preset’s plugins block. review; the wiring test checks tsconfig.base.json

The diagnostics run only in a tsc patched by @effect/tsgo. The root prepare script patches it on install. If tsc stops reporting Effect errors, run pnpm exec effect-tsgo patch.

A new Effect RC is often less than a day old, so it fails the release-age check. It needs a minimumReleaseAgeExclude entry for that exact version, and the owner approves it. A bump moves effect and @effect/vitest together and replaces the old entry.

This site’s generator is plain Node code, not Effect. Its tsconfig.json extends the plugin’s strict.json preset instead of the Effect preset, because Effect diagnostics such as nodeBuiltinImport and globalConsole would fail every line of a Node script. Every strict flag still applies.