The best way to control Claude Code, Codex and more from any computer or phone
| 1 | --- |
| 2 | name: effect-development |
| 3 | description: Effect development guidance. Use when implementing or reviewing code that composes Effect APIs or patterns, or that adds or changes API signatures. |
| 4 | --- |
| 5 | |
| 6 | Use the repository's AI documentation as targeted reference, not ambient |
| 7 | context: |
| 8 | |
| 9 | 1. Identify the Effect APIs and concepts involved in the change. |
| 10 | 2. Search `LLMS.md` and `ai-docs/src` for those names and concepts, then read |
| 11 | the matching sections and examples. |
| 12 | 3. Apply the relevant guidance and inspect nearby source and tests for any |
| 13 | repository-internal conventions not covered by the documentation. |
| 14 | |
| 15 | The task is ready for implementation when every material Effect API or pattern |
| 16 | has matching local guidance, or the search has established that none exists. |
| 17 | |
| 18 | ## API conventions |
| 19 | |
| 20 | Write option types inline in the signature by default. Mark fields `readonly` |
| 21 | and add `| undefined` to optional fields: |
| 22 | |
| 23 | ```ts |
| 24 | export const make = (options: { |
| 25 | readonly capacity: number |
| 26 | readonly strategy?: "dropping" | "sliding" | undefined |
| 27 | }): Effect.Effect<Queue> => ... |
| 28 | ``` |
| 29 | |
| 30 | Declare a named options type only in these cases: |
| 31 | |
| 32 | - A substantial set of options is shared across several APIs, so a named type |
| 33 | keeps them in sync. |
| 34 | - The options type needs complex conditional logic, such as conditional or |
| 35 | mapped types driven by type parameters. |
| 36 | |
| 37 | A long option list for a single API is not on its own a reason to extract a |
| 38 | named type. |