# Dillon Mulroy's Coding Standards and Error Design docs

Two rule docs Dillon Mulroy carries from project to project in place of a pile of skills. One covers coding standards for Effect + Alchemy TypeScript on Cloudflare, the other covers how to design errors that humans and agents can act on.

**Type:** guideline
**Added:** 2026-10-31
**Author:** [Dillon Mulroy (@dillon_mulroy)](https://x.com/dillon_mulroy)
**Link:** https://github.com/dmmulroy/cf-workflow-pool/blob/main/docs/coding-standards.md
**Topics:** AI Coding, Backend
**Tags:** agents, effect-ts, typescript

---

Both files live in the `docs/` folder of [cf-workflow-pool](https://github.com/dmmulroy/cf-workflow-pool), his pre-started instance pool for Cloudflare Workflows built with Effect and Alchemy. Instead of installing many separate skills, he keeps these two docs and copies them between repos.

[`coding-standards.md`](https://github.com/dmmulroy/cf-workflow-pool/blob/main/docs/coding-standards.md) is the big one. Its rules include: apps under `apps/*` never import from each other, and code moves into `packages/*` only once a second consumer needs it. Every environment gets isolated infrastructure. Validation depends on where a value came from: unknown input is decoded at the adapter boundary, and values that are already parsed are never re-parsed or widened to `unknown` or `Record<string, unknown>`. Any type assertion needs a `// SAFETY:` comment plus a `Verified by:` test. Optional values are always `Option`, never `null` or `undefined`. Durable Objects are treated as HTTP services behind application-owned clients. On Effect style, `Effect.gen` holds business logic and `.pipe` holds retries, tracing and error translation. There are also rules for Effect imports, Layer dependencies and JSDoc on every exported symbol.

[`errors.md`](https://github.com/dmmulroy/cf-workflow-pool/blob/main/docs/errors.md) treats errors as part of the public interface. An error message says what failed and why, tells the caller what to do next, reassures only when the system can prove nothing changed, and avoids blame and jargon. Errors carry typed context: a stable code, the operation, safe IDs, a classified reason, a retryable flag that is actually true, and a `requestId`. Each tagged error is translated explicitly with `catchTag` instead of a catch-all. The doc ends with HTTP status guidance and a 10-point review checklist. It pairs well with the [Effect Skill](/directory/effect-skill).

---

## Links

- Directory entry: https://andrey-markin.com/directory/dmmulroy-agent-docs
- All directory entries: https://andrey-markin.com/directory
- Contact: https://andrey-markin.com/#contact
