Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
60b1047
initial, with added repos
patroza Feb 19, 2026
a13eb19
add task
patroza Feb 19, 2026
372d5e0
update smol
patroza Feb 19, 2026
77834f3
use local refs
patroza Feb 19, 2026
1278253
instructions
patroza Feb 19, 2026
45f7dbf
borrow some AGENTS.md
patroza Feb 19, 2026
009ac6d
doc
patroza Feb 19, 2026
d96d8d6
update instructions
patroza Feb 19, 2026
c205dc1
update docs
patroza Feb 19, 2026
02281db
Update Effect.Service migration recommendation
patroza Feb 19, 2026
48264bf
disable tsplugins during the migration, until after.
patroza Feb 19, 2026
e4891dc
update doc
patroza Feb 19, 2026
05cdc07
VIBE updated, including findings and task md
patroza Feb 19, 2026
63b263e
update instructions
patroza Feb 19, 2026
3165a0a
let it fix things
patroza Feb 19, 2026
9f89417
update repos
patroza Feb 20, 2026
19adf6d
update versions
patroza Feb 20, 2026
a0788a9
packages
patroza Feb 20, 2026
b5b4e38
initial convert
patroza Feb 20, 2026
6fd0d39
progress
patroza Feb 20, 2026
40aed14
update
patroza Feb 20, 2026
c2990f9
add info
patroza Feb 20, 2026
33689f0
revert migration progress and initial convert
patroza Feb 20, 2026
354c563
progress
patroza Feb 20, 2026
2b9955f
update migration task
patroza Feb 20, 2026
588d1f0
update effect-smol
patroza Feb 20, 2026
181553e
as any bs
patroza Feb 20, 2026
2f479b4
reverted as any
patroza Feb 20, 2026
0edec1d
more
patroza Feb 20, 2026
269593f
update instructions
patroza Feb 20, 2026
7169f87
yay
patroza Feb 20, 2026
90feb26
progress
patroza Feb 20, 2026
b9f426a
updates
patroza Feb 23, 2026
a0e8ff7
update task
patroza Feb 23, 2026
d6aedba
update packages
patroza Feb 23, 2026
3e5c086
update built in for Result
patroza Feb 23, 2026
d032e87
update smol
patroza Feb 23, 2026
49ed669
remove bs middlewares
patroza Feb 23, 2026
9bf2024
update task
patroza Feb 23, 2026
3369606
add `Reference` class pattern
patroza Feb 23, 2026
1245058
update packages everywhere
patroza Feb 24, 2026
a206563
fix Context.Reference class
patroza Feb 24, 2026
29a86ce
updates
patroza Feb 24, 2026
6a11317
update instructions
patroza Feb 24, 2026
e2e0a2e
updates
patroza Feb 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "repos/effect-smol"]
path = repos/effect-smol
url = https://github.com/Effect-TS/effect-smol.git
[submodule "repos/effect"]
path = repos/effect
url = https://github.com/Effect-TS/effect.git
140 changes: 140 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Agent Instructions

This is the Effect App library repository, focusing on functional programming patterns and effect systems in TypeScript, wrapping and extending the Effect library.

## Development Workflow

- The git base branch is `main`
- Use `pnpm` as the package manager

### Core Principles

- **Zero Tolerance for Errors**: All automated checks must pass
- **Clarity over Cleverness**: Choose clear, maintainable solutions
- **Conciseness**: Keep code and any wording concise and to the point. Sacrifice grammar for the sake of concision.
- **Reduce comments**: Avoid comments unless absolutely required to explain unusual or complex logic. Comments in jsdocs are acceptable.
- **Never import local `/repos` files**: Always use the latest online versions of packages instead.
- **Never webfetch from the `effect` and `effect-smol` repos**: just use the locally included under `repos`

### Mandatory Validation Steps

#### New Features

- Run `pnpm lint-fix` after editing files
<!-- - Always run tests after making changes: `pnpm test <test_file.ts>` -->
- Run type checking: `pnpm check`
- If type checking continues to fail, run `pnpm clean` to clear caches, then re-run `pnpm check`
<!-- - Build the project: `pnpm build`
- Check JSDoc examples compile: `pnpm docgen` -->

#### Migrations

- Run `pnpm eslint fix ./src/<file.ts>` inside the package root after editing files
- Run type checking: `pnpm check` inside the package root after editing files
- If type checking continues to fail, run `pnpm clean` to clear caches, then re-run `pnpm tsc ./src/<file.ts>`


## Code Style Guidelines

**Always** look at existing code in the repository to learn and follow
established patterns before writing new code.

Do not worry about getting code formatting perfect while writing. Use `pnpm lint-fix`
to automatically format code according to the project's style guidelines.

## Prefer `Effect.fnUntraced` over functions that return `Effect.gen`

Instead of writing:

```ts
const fn = (param: string) =>
Effect.gen(function*() {
// ...
})
```

Prefer:

```ts
const fn = Effect.fnUntraced(function*(param: string) {
// ...
})
```

## Using `ServiceMap.Service`

Prefer the class syntax when working with `ServiceMap.Service`. For example:

```ts
import { ServiceMap } from "effect"

class MyService extends ServiceMap.Service<MyService, {
readonly doSomething: (input: string) => number
}>()("MyService") {}
```

## Checking Array is not empty

Avoid `.length > 0` or `.length === 0` or `!.length` or `!!.length` checks, use `Array.isArrayNonEmpty` for type narrowing by default.

## Filtering and Mapping

Use Effect's `Array.filter()` with a `Filter.Filter` to do both the filtering and mapping.


<!-- ## Barrel files

The `index.ts` files are automatically generated. Do not manually edit them. Use
`pnpm codegen` to regenerate barrel files after adding or removing modules. -->

<!-- ## Running test code

If you need to run some code for testing or debugging purposes, create a new
file in the `scratchpad/` directory at the root of the repository. You can then
run the file with `node scratchpad/your-file.ts`.

Make sure to delete the file after you are done testing. -->

<!-- ## Testing

Before writing tests, look at existing tests in the codebase for similar
functionality to follow established patterns.

- Test files are located in `packages/*/test/` directories for each package
- Main Effect library tests: `packages/effect/test/`
- Always verify implementations with tests
- Run specific tests with: `pnpm test <filename>`

### it.effect Testing Pattern

- Use `it.effect` for all Effect-based tests, not `Effect.runSync` with regular `it`
- Import `{ assert, describe, it }` from `@effect/vitest`
- Never use `expect` from vitest in Effect tests - use `assert` methods instead
- All tests should use `it.effect("description", () => Effect.gen(function*() { ... }))`

Before writing tests, look at existing tests in the codebase for similar
functionality to follow established patterns.

### Type level tests

Type level tests are located in the `dtslint` directories of each package.

You can run them with `pnpm test-types <filename>`.

Take a look at the existing `.tst.ts` files for examples of how to write type
level tests. They use the `tstyche` testing library. -->

## Changesets

All pull requests must include a changeset. You can create changesets in the
`.changeset/` directory.

The have the following format:

```md
---
"package-name": patch | minor | major
---

A description of the change.
```
3 changes: 3 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# CLAUDE.md

Strictly follow the rules in ./AGENTS.md
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"pnpm": {
"patchedDependencies": {
"eslint-plugin-codegen@0.17.0": "patches/eslint-plugin-codegen@0.17.0.patch",
"effect": "patches/effect.patch",
"ts-plugin-sort-import-suggestions": "patches/ts-plugin-sort-import-suggestions.patch",
"@tanstack/query-core": "patches/@tanstack__query-core.patch",
"typescript": "patches/typescript.patch",
Expand All @@ -22,7 +21,7 @@
"preinstall": "npx only-allow pnpm",
"clean": "pnpm all clean",
"clean-dist": "pnpm -r clean-dist",
"autofix": "NODE_OPTIONS=--max-old-space-size=6144 pnpm -r --no-bail autofix",
"lint-fix": "NODE_OPTIONS=--max-old-space-size=6144 pnpm -r --no-bail lint-fix",
"lint": "pnpm -r lint",
"circular:dist": "pnpm -r circular:dist",
"test": "pnpm -r test:run",
Expand Down Expand Up @@ -62,10 +61,9 @@
"@effect-app/cli": "^1.29.2",
"@effect-app/eslint-codegen-model": "workspace:*",
"@effect-app/infra": "workspace:*",
"@effect/language-service": "0.71.2",
"@effect/platform": "^0.94.1",
"@effect/platform-node": "^0.104.0",
"@effect/vitest": "^0.27.0",
"@effect/language-service": "0.75.1",
"@effect/platform-node": "^4.0.0-beta.12",
"@effect/vitest": "^4.0.0-beta.12",
"@tsconfig/strictest": "^2.0.8",
"@types/lodash": "^4.17.23",
"@types/node": "25.0.8",
Expand All @@ -75,7 +73,7 @@
"@vue/eslint-config-typescript": "^14.6.0",
"concurrently": "^9.2.1",
"dprint": "^0.51.1",
"effect": "^3.19.14",
"effect": "^4.0.0-beta.12",
"effect-app": "workspace:*",
"enhanced-resolve": "^5.18.4",
"eslint": "^9.39.2",
Expand Down
9 changes: 5 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"effect-app-cli": "./bin.js"
},
"dependencies": {
"@effect/cli": "^0.73.0",
"@effect/platform-node": "^0.104.0",
"@effect/platform-node": "^4.0.0-beta.12",
"effect": "^4.0.0-beta.12",
"js-yaml": "4.1.1",
"node-watch": "^0.7.4"
},
Expand Down Expand Up @@ -54,7 +54,8 @@
},
"scripts": {
"watch": "pnpm build:tsc -w",
"build:tsc": "pnpm clean-dist && tsc --build",
"build:tsc": "pnpm clean-dist && pnpm check",
"check": "tsc --build",
"build": "pnpm build:tsc",
"watch2": "pnpm clean-dist && NODE_OPTIONS=--max-old-space-size=6144 tsc -w",
"clean": "rm -rf dist",
Expand All @@ -65,7 +66,7 @@
"compile": "NODE_OPTIONS=--max-old-space-size=6144 tsc --noEmit",
"lint": "NODE_OPTIONS=--max-old-space-size=6144 ESLINT_TS=1 eslint ./src",
"lint:watch": "ESLINT_TS=1 esw -w --changed --clear --ext ts,tsx .",
"autofix": "pnpm lint --fix",
"lint-fix": "pnpm lint --fix",
"test": "vitest",
"test:run": "pnpm run test run --passWithNoTests",
"testsuite": "pnpm lint && pnpm circular && pnpm run test:run",
Expand Down
5 changes: 2 additions & 3 deletions packages/cli/src/extract.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { type Error as PlatformError, FileSystem, Path } from "@effect/platform"
import { Array as EffectArray, Effect, Order, pipe } from "effect"
import { Array as EffectArray, Effect, FileSystem, Order, Path, pipe, type PlatformError } from "effect"

/**
* Generates package.json exports mappings for TypeScript modules
Expand Down Expand Up @@ -61,7 +60,7 @@ export const ExtractExportMappingsService = Effect.fn("effa-cli.extractExportMap

const sortedMappings = pipe(
exportMappings,
EffectArray.sort(Order.string),
EffectArray.sort(Order.String),
EffectArray.join(",\n")
)

Expand Down
Loading
Loading