Effect v4 discipline: typed errors over hand-rolled tags, Config over direct env reads, named Effect.fn, deterministic generators, validated boundaries, no casts that silence the type system. The mechanical rules of the kitlangton Effect skill, enforced.
Ships as effect-v4-kitlangton. All checks use semantic revision 2 and shared
JS/TS syntax, call, identity, binding and span facts. Syntax-only Effect checks
run only in files with a parser-resolved Effect import reference; zod checks
apply to resolved imports from zod.
| Severity | Check | Catches |
|---|---|---|
| warning | type-silencing-cast |
as any, a double cast, or a non-null assertion in Effect code |
| warning | schema-class-as-default |
Schema.Class / Schema.TaggedClass for application data modeling |
| warning | handrolled-tagged-error |
A _tag error class hand-rolled instead of Schema.TaggedErrorClass |
| info | cause-level-recovery |
catchCause / catchAllCause / sandbox where typed-error recovery is the default |
| warning | direct-process-env-read |
process.env read directly inside Effect application code |
| warning | unnamed-effect-fn |
Effect.fn without a span/tracing name |
| warning | date-now-in-gen |
Date.now() inside an Effect.gen body |
| warning | zod-single-record |
z.record called with a single argument |
| warning | sleep-in-test |
Effect.sleep inside a test file |
| info | blind-layer-merge |
Layer.mergeAll / provideMerge as a make-it-compile composition tool |
Blind spots (the short version)
- Effect idioms routed through re-exporting wrappers are not covered;
generated
.d.tsfiles are skipped entirely. - API aliases, multiline calls, static bracket access and shadowed lookalikes
are resolved structurally.
Effect.fnnames andEffect.genbodies must be direct static arguments; aliased or dynamic values and opaque generator factories narrow instead of producing a definite finding. - Class and generator extents come from the parser; braces in strings, templates or regex literals do not truncate the scan.
- Boundary and startup code legitimately reads the environment — the check cannot tell application logic from boundaries.
cause-level-recoveryandblind-layer-mergerecord the skill’s defaults, not proven misuse.sleep-in-testonly fires when test files are scanned — pass--include-teststo check test discipline.- Without the shared analysis provider, all checks narrow to silence; that is incomplete coverage, not a clean result.
The full list prints in every report this doctor appears in.