diff --git a/.gitignore b/.gitignore index 24e536c80..0875f31c4 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ docs/_build/ /.nb-gradle/ gen .DS_Store -.vscode \ No newline at end of file +.vscode +.claude/scheduled_tasks.lock \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index 369e771d6..3ac0eb552 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,16 @@ # AI Agent Context for graphql-java -This file provides context for AI assistants working with this codebase. +## Rules + +- **Tests in Spock (Groovy)**, not JUnit: `src/test/groovy/graphql/` +- **No new dependencies** (firm policy) +- **No wildcard imports**, no inner classes, no `Optional` +- Max 2 indent levels; early returns; extract methods to reduce nesting +- Immutable data classes w/ Builder: `newFoo()` factory, `foo(value)` setters, `transform()` method +- Use `graphql.Assert` not `Objects.requireNonNull` +- Use `@Public`/`@Internal` annotations — never package-private/protected +- `@NullMarked` on all public API classes; `@NullUnmarked` on their Builder classes; use `@Nullable` for nullable params/returns; NullAway enforced via ErrorProne +- Full style guide: `coding-guidelines.md` ## Test Execution