Effect workflow
Follow the official Effect skill: learn Effect from the guidance shipped with the exact installed package, not from a copied API summary in this skill.
Load the official guidance first
Before writing or changing Effect code:
- Identify the owning workspace package and inspect its
package.jsontogether with the root lockfile. - Resolve that workspace's installed
effect/package.json, for example withpnpm --filter <workspace> exec node -p "require.resolve('effect/package.json')". - Require Effect major version 4 and keep every retained
effect/@effect/*package on the exact repository-pinned stable version. - Read the resolved package's sibling
AGENTS.mdcompletely. Follow its relative links intoai-docs/andsrc/when the current topic requires them; read large linked guides such asSCHEMA.mdin relevant chunks. - Use the installed package source as the authority for exact signatures and behavior. Escalate to the canonical
Effect-TS/effectrepository only when needed, preferring the exact installed-version tag overmain.
If dependencies are absent, install the locked workspace dependencies first. Do not float version tags or mix Effect package versions, or infer current behavior from v3, an older beta, or effect-smol.
NiceEval boundaries
Read docs/architecture.md before changing a runtime boundary. Keep pure planning and result folding outside Effect when they do not read the outside world; keep I/O, concurrency, cancellation, and resource lifetime inside Effect. Run Effect only at the owning public Promise or process boundary, preserve typed failures until their domain result boundary, and scope acquired resources so failure and interruption release them.
effect remains an exact dependency bundled with the published NiceEval package because public Host and Record APIs exchange Effect and Schema values with consumers. Use the stable package exports, including effect/cli and effect/process; the former effect/unstable/* paths no longer exist. CLI and process modules belong to private tooling and must not leak through published declarations.
In the pure Inspection dependency closure, import namespaces from their module exports, such as import * as Schema from "effect/Schema". With Effect 4.1.3 and esbuild 0.28.2, the root barrel's Schema namespace retains unused crypto Layer and Scope code in browser bundles. Keep the installed-package browser closure E2E green when changing these imports.
For an actual v3-to-v4 migration, also read ../effect-v3-to-v4/SKILL.md; do not keep migration-only symbol mappings in this ongoing Effect skill.
Validation
Run pnpm typecheck after Effect dependency or source changes, then run the smallest real runtime path covering any changed interruption, finalizer, concurrency, or Promise-adaptation behavior. Follow the repository testing skill before changing test owners.