You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,12 +260,21 @@ How to test Effect code effectively, reliably, and deterministically.
260
260
261
261
## AI Coding Rules
262
262
263
-
This project provides a machine-readable set of coding rulesfor AI-powered IDEs and coding agents.
263
+
This project provides several machine-readable sets of coding rules, tailored for different needs and optimized for AI-powered IDEs and coding agents like Cursor or GitHub Copilot.
264
264
265
-
You can find the latest rules files in the [rules directory](./rules/). These files are designed for integration with tools like Cursor, GitHub Copilot, and other AI coding assistants.
265
+
You can find the latest rule files in the [`rules`](./rules/) directory. These are automatically generated from the content in this repository.
266
266
267
-
-**rules.md**: Human-readable rules summary
268
-
-**rules.json**: Structured rules for programmatic consumption
267
+
### Available Formats
268
+
269
+
-**Comprehensive Rules (`rules.md`)**: A human-readable markdown file containing all patterns, guidelines, and rationale.
270
+
-**Compact Rules (`rules-compact.md`)**: A condensed version containing only the core rule for each pattern, designed for minimal token usage.
271
+
-**Structured JSON (`rules.json`)**: A machine-readable JSON file containing all rule information for programmatic use.
272
+
-**By Skill Level**: Detailed rules, including examples, split into separate files for each skill level.
273
+
-[`beginner.md`](./rules/beginner.md)
274
+
-[`intermediate.md`](./rules/intermediate.md)
275
+
-[`advanced.md`](./rules/advanced.md)
276
+
-**By Use Case**: Detailed rules, including examples, grouped by practical application areas.
Copy file name to clipboardExpand all lines: content/accumulate-multiple-errors-with-either.mdx
+1-33Lines changed: 1 addition & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,39 +40,7 @@ However, for tasks like validating a user's input, this is poor user experience.
40
40
41
41
Using `Schema.decode` with the `allErrors: true` option demonstrates this pattern perfectly. The underlying mechanism uses `Either` to collect all parsing errors into an array instead of stopping at the first one.
42
42
43
-
````typescript
44
-
import { Effect, Schema } from"effect";
45
-
46
-
const UserSchema =Schema.Struct({
47
-
name: Schema.String.pipe(Schema.minLength(3)),
48
-
email: Schema.String.pipe(Schema.pattern(/@/)),
49
-
});
50
-
51
-
const invalidInput = {
52
-
name: "Al", // Too short
53
-
email: "bob-no-at-sign.com", // Invalid pattern
54
-
};
55
-
56
-
// Use { allErrors: true } to enable error accumulation
Copy file name to clipboardExpand all lines: content/add-caching-by-wrapping-a-layer.mdx
+1-57Lines changed: 1 addition & 57 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,63 +45,7 @@ This approach is powerful because:
45
45
46
46
We have a `WeatherService` that makes slow API calls. We create a `WeatherService.cached` wrapper layer that adds an in-memory cache using a `Ref` and a `Map`.
0 commit comments