Skip to content

Commit 69dbf35

Browse files
committed
Use the more general AGENTS.md instead of GEMINI.md
1 parent a5dbd99 commit 69dbf35

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

GEMINI.md renamed to AGENTS.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- When generating new Dart code, strictly follow the style conventions defined in [Effective Dart](https://dart.dev/effective-dart).
66
- Systematically prefer using `const` constructors and literals whenever possible to optimize runtime performance.
7+
- Prefer using the Dart MCP tool instead of running commands manually.
78

89
## Comments, Documentation and Examples
910

@@ -27,27 +28,27 @@
2728

2829
### Code Quality
2930

30-
- The code must be free of linter warnings (run `dart analyze` and `dart fix --apply`).
3131
- The code must be auto-formatted (run `dart format .`).
32-
- Embrace strict **null safety**. Avoid using the non-null assertion operator (`!`) unless you can prove adherence to a loop invariant or similar logical guarantee that the compiler cannot infer.
32+
- The code must be free of linter warnings (run `dart analyze` and `dart fix --apply`).
33+
- Embrace strict null safety. Avoid using the non-null assertion operator (`!`) or `dynamic` types, if possible.
3334

3435
## Logic and Patterns
3536

3637
### Asynchrony
3738

38-
- Prefer `async` / `await` syntax over chaining `Future.then`, `Future.catchError`, etc., for better readability.
39-
- Always return `Future<void>` instead of `void` for asynchronous functions (unless it's an event handler where `void` is required).
39+
- Prefer `async` / `await` syntax over chaining `Future.then`, `Future.catchError`, ...
40+
- Always return `Future<void>` instead of `void` for asynchronous functions.
4041

4142
### Error Handling
4243

43-
- Throw specific exceptions (e.g., `ArgumentError`, `StateError`, `FormatException`) rather than generic `Exception` strings.
44+
- Throw specific exceptions (e.g., `ArgumentError`, `StateError`, `FormatException`) rather than generic `Exception`.
4445
- Catch specific exceptions. Avoid generic `catch (e)` unless you are logging the error or rethrowing it.
4546

4647
## Architecture
4748

4849
- Keep the root `lib/` directory clean. It should primarily contain the public API exports.
4950
- Place implementation details in `lib/src/`. Users of the package should not import files from `lib/src/` directly.
50-
- Avoid introducing new external dependencies in `pubspec.yaml` unless absolutely necessary and no alternative exists in the SDK. If required, justify the addition to the user.
51+
- Avoid introducing new external dependencies in `pubspec.yaml` unless absolutely necessary and no alternative exists in the SDK. Justify any addition to the user.
5152

5253
## Testing
5354

0 commit comments

Comments
 (0)