X Tutup
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
7a3d03f
Add JSpecify agent team orchestrator prompt
claude Feb 28, 2026
b30585a
Move to .claude folder
dondonz Feb 28, 2026
18cd241
Add JSpecify annotations to QueryComplexityCalculator
dondonz Feb 28, 2026
fc88122
Add JSpecify annotations to AbortExecutionException
dondonz Feb 28, 2026
d71b245
Add JSpecify annotations to ConditionalNodeDecision
dondonz Feb 28, 2026
f79e9ea
Add JSpecify annotations to AsyncExecutionStrategy
dondonz Feb 28, 2026
3194a43
Add JSpecify annotations to QueryComplexityInfo
dondonz Feb 28, 2026
119d6dd
Add JSpecify annotations to AsyncSerialExecutionStrategy
dondonz Feb 28, 2026
ce144ba
Add JSpecify annotations to QueryDepthInfo
dondonz Feb 28, 2026
7765059
Add JSpecify annotations to CoercedVariables
dondonz Feb 28, 2026
7c8569a
Add JSpecify annotations to QueryReducer
dondonz Feb 28, 2026
6801331
Add JSpecify annotations to QueryAppliedDirective
dondonz Feb 28, 2026
6035167
Add JSpecify annotations to DataFetcherExceptionHandlerParameters
dondonz Feb 28, 2026
dfae148
Add JSpecify annotations to DataFetcherExceptionHandlerResult
dondonz Feb 28, 2026
460ee6b
Add JSpecify annotations to QueryTransformer
dondonz Feb 28, 2026
4427846
Add JSpecify annotations to DefaultValueUnboxer
dondonz Feb 28, 2026
32ecef7
Add JSpecify annotations to QueryAppliedDirectiveArgument
dondonz Feb 28, 2026
f223706
Add JSpecify annotations to QueryTraversalOptions
dondonz Feb 28, 2026
bfe03d0
Add JSpecify annotations to QueryVisitor
dondonz Feb 28, 2026
8b7d7a2
Add JSpecify annotations to ExecutionContext
dondonz Feb 28, 2026
1d3a502
Add JSpecify annotations to ExecutionId
dondonz Feb 28, 2026
ed60978
Add JSpecify annotations to QueryDirectives
dondonz Feb 28, 2026
24aa942
Add JSpecify annotations to QueryVisitorFieldArgumentEnvironment
dondonz Feb 28, 2026
d92048b
Add JSpecify annotations to QueryVisitorFieldArgumentInputValue
dondonz Feb 28, 2026
1ebd551
Add JSpecify annotations to FieldValidationInstrumentation
dondonz Feb 28, 2026
c3bda94
Add JSpecify annotations to QueryVisitorFieldArgumentValueEnvironment
dondonz Feb 28, 2026
560b28d
Add JSpecify annotations to SimpleFieldValidation
dondonz Feb 28, 2026
b540dbb
Add JSpecify annotations to InstrumentationCreateStateParameters
dondonz Feb 28, 2026
e54951c
Add JSpecify annotations to ExecutionStepInfo
dondonz Feb 28, 2026
f9c46df
Add JSpecify annotations to QueryVisitorFieldEnvironment
dondonz Feb 28, 2026
f99d27b
Add JSpecify annotations to InstrumentationExecuteOperationParameters
dondonz Feb 28, 2026
52a1a56
Add JSpecify annotations to QueryVisitorFragmentDefinitionEnvironment
dondonz Feb 28, 2026
6caa99b
Add JSpecify annotations to QueryVisitorFragmentSpreadEnvironment
dondonz Feb 28, 2026
37f4c59
Add JSpecify annotations to QueryVisitorInlineFragmentEnvironment
dondonz Feb 28, 2026
87e0c39
Add JSpecify annotations to QueryVisitorStub
dondonz Feb 28, 2026
a559997
Add JSpecify annotations to InstrumentationExecutionParameters
dondonz Feb 28, 2026
fd7834c
Add JSpecify annotations to InstrumentationExecutionStrategyParameters
dondonz Feb 28, 2026
760c033
Add JSpecify annotations to ExecutionStrategyParameters
dondonz Feb 28, 2026
0a64cb3
Add JSpecify annotations to InstrumentationFieldCompleteParameters
dondonz Feb 28, 2026
4529690
Add JSpecify annotations to FetchedValue
dondonz Feb 28, 2026
6286c17
Add JSpecify annotations to InstrumentationFieldFetchParameters
dondonz Feb 28, 2026
8df475d
Add JSpecify annotations to InstrumentationFieldParameters
dondonz Feb 28, 2026
1f8ce61
Add JSpecify annotations to FieldValueInfo
dondonz Feb 28, 2026
63677a1
Add JSpecify annotations to InstrumentationValidationParameters
dondonz Feb 28, 2026
bea6679
Add JSpecify annotations to InputMapDefinesTooManyFieldsException
dondonz Feb 28, 2026
0b6534c
Add JSpecify annotations to TracingInstrumentation
dondonz Feb 28, 2026
7197bd9
Add JSpecify annotations to ValueTraverser
dondonz Feb 28, 2026
016e560
Add JSpecify annotations to MergedSelectionSet
dondonz Feb 28, 2026
d372306
Add JSpecify annotations to MissingRootTypeException
dondonz Feb 28, 2026
9063da8
Add JSpecify annotations to TracingSupport
dondonz Feb 28, 2026
df504d2
Add JSpecify annotations to NonNullableValueCoercedAsNullException
dondonz Feb 28, 2026
bc5689f
Add JSpecify annotations to NormalizedVariables
dondonz Feb 28, 2026
9de2bea
Add JSpecify annotations to PreparsedDocumentEntry
dondonz Feb 28, 2026
4b69632
Add JSpecify annotations to OneOfNullValueException
dondonz Feb 28, 2026
8bb5d40
Add JSpecify annotations to ApolloPersistedQuerySupport
dondonz Feb 28, 2026
11d09ce
Add JSpecify annotations to OneOfTooManyKeysException
dondonz Feb 28, 2026
3d4e99f
Add JSpecify annotations to InMemoryPersistedQueryCache
dondonz Feb 28, 2026
1154e30
Add JSpecify annotations to ResultNodesInfo
dondonz Feb 28, 2026
45ed448
Add JSpecify annotations to PersistedQueryCacheMiss
dondonz Feb 28, 2026
d7d5a82
Add JSpecify annotations to PersistedQueryIdInvalid
dondonz Feb 28, 2026
100c2cd
Add JSpecify annotations to PersistedQueryNotFound
dondonz Feb 28, 2026
4c004a1
Add JSpecify annotations to ResultPath
dondonz Feb 28, 2026
3e190f3
Add JSpecify annotations to DelegatingSubscription
dondonz Feb 28, 2026
e540440
Add JSpecify annotations to SimpleDataFetcherExceptionHandler
dondonz Feb 28, 2026
e9fd9e9
Add JSpecify annotations to SubscriptionPublisher
dondonz Feb 28, 2026
76f195c
Add JSpecify annotations to SubscriptionExecutionStrategy
dondonz Feb 28, 2026
9db1bde
Add JSpecify annotations to UnknownOperationException
dondonz Feb 28, 2026
2529914
Add JSpecify annotations to UnresolvedTypeException
dondonz Feb 28, 2026
b3563cf
Review fixes: correct JSpecify annotations for Wave 1 classes
dondonz Feb 28, 2026
30581c8
Remove annotated Wave 1 classes from JSpecify exemption list
dondonz Mar 1, 2026
bb25aed
Clarify jspecify-annotate prompt: public API only, fix exemption cleanup
dondonz Mar 1, 2026
0a77532
Merge branch 'master' into claude/agent-team-jspecify-Frd74
dondonz Mar 1, 2026
04f3778
Update orchestrator
dondonz Mar 7, 2026
4b90480
Add JSpecify annotations to ScalarTypeDefinition
dondonz Mar 7, 2026
ad1b358
Add JSpecify annotations to ScalarTypeExtensionDefinition
dondonz Mar 7, 2026
3933c24
Add JSpecify annotations to GraphQLCompositeType
dondonz Mar 7, 2026
c80ff8b
Add JSpecify annotations to ExtensionsBuilder
dondonz Mar 7, 2026
82f8e84
Add JSpecify annotations to InvalidSyntaxException
dondonz Mar 7, 2026
ad1a071
Add JSpecify annotations to GraphQLInputType
dondonz Mar 7, 2026
64f1506
Add JSpecify annotations to GraphqlElementParentTree
dondonz Mar 7, 2026
b5ecfe0
Add JSpecify annotations to SchemaDefinition
dondonz Mar 7, 2026
212b539
Add JSpecify annotations to GraphQLInputSchemaElement
dondonz Mar 7, 2026
c7fb64d
Add JSpecify annotations to MultiSourceReader
dondonz Mar 7, 2026
c60c4ea
Add JSpecify annotations to DeferPayload
dondonz Mar 7, 2026
208e225
Add JSpecify annotations to SchemaExtensionDefinition
dondonz Mar 7, 2026
d2250d1
Add JSpecify annotations to GraphqlTypeComparatorEnvironment
dondonz Mar 7, 2026
707c279
Add JSpecify annotations to GraphQLOutputType, GraphQLNamedOutputType…
dondonz Mar 7, 2026
e09caed
Add JSpecify annotations to DelayedIncrementalPartialResult
dondonz Mar 7, 2026
71dd830
Add JSpecify annotations to Selection
dondonz Mar 7, 2026
6c10704
Add JSpecify annotations to GraphQLSchemaElement
dondonz Mar 7, 2026
e0bbe97
Add JSpecify annotations to GraphqlTypeComparatorRegistry
dondonz Mar 7, 2026
cead352
Add JSpecify annotations to Parser
dondonz Mar 7, 2026
a0ce820
Add JSpecify annotations to GraphQLNamedSchemaElement
dondonz Mar 7, 2026
6cffcd2
Add JSpecify annotations to SelectionSet
dondonz Mar 7, 2026
19c22c7
Add JSpecify annotations to DelayedIncrementalPartialResultImpl
dondonz Mar 7, 2026
aa38763
Add JSpecify annotations to InputValueWithState
dondonz Mar 7, 2026
6fd997e
Add JSpecify annotations to IncrementalExecutionResult
dondonz Mar 7, 2026
2ff5281
Add JSpecify annotations to SelectionSetContainer
dondonz Mar 7, 2026
38e497d
Add JSpecify annotations to GraphQLInputValueDefinition, GraphQLField…
dondonz Mar 7, 2026
f9b10d8
Add JSpecify annotations to ParserEnvironment
dondonz Mar 7, 2026
508dfc2
Add JSpecify annotations to TypeKind
dondonz Mar 7, 2026
24612dd
Add JSpecify annotations to SchemaElementChildrenContainer
dondonz Mar 7, 2026
dfffaf1
Add JSpecify annotations to ParserOptions
dondonz Mar 7, 2026
3f7c9de
Add JSpecify annotations to IncrementalExecutionResultImpl
dondonz Mar 7, 2026
f111944
Add JSpecify annotations to GraphQLDirectiveContainer
dondonz Mar 7, 2026
dd70a38
Add JSpecify annotations to NodeAdapter
dondonz Mar 7, 2026
52753ae
Add JSpecify annotations to TypeName
dondonz Mar 7, 2026
671cf18
Add JSpecify annotations to GraphQLTypeVisitor, GraphQLTypeVisitorStub
dondonz Mar 7, 2026
1cf7109
Add JSpecify annotations to NodeLocation
dondonz Mar 7, 2026
60c60db
Add JSpecify annotations to SchemaTransformer
dondonz Mar 7, 2026
316615f
Add JSpecify annotations to IncrementalPayload
dondonz Mar 7, 2026
d719bb8
Add JSpecify annotations to DataFetchingFieldSelectionSet
dondonz Mar 7, 2026
7e6590a
Add JSpecify annotations to SchemaTraverser
dondonz Mar 7, 2026
45f1da2
Add JSpecify annotations to AsyncDataFetcher
dondonz Mar 7, 2026
975955c
Add JSpecify annotations to UnionTypeDefinition
dondonz Mar 7, 2026
459f3e8
Add JSpecify annotations to NodeMultiZipper
dondonz Mar 7, 2026
d9a8bff
Add JSpecify annotations to StreamPayload
dondonz Mar 7, 2026
73baeb8
Add JSpecify annotations to SelectedField
dondonz Mar 7, 2026
2dd5e06
Add JSpecify annotations to NodeZipper
dondonz Mar 7, 2026
e4db17c
Add JSpecify annotations to UnionTypeExtensionDefinition
dondonz Mar 7, 2026
2a6a563
Add JSpecify annotations to CoercingParseLiteralException, CoercingPa…
dondonz Mar 7, 2026
8930ff1
Add JSpecify annotations to TraversalControl
dondonz Mar 7, 2026
474e25f
Add JSpecify annotations to GoodFaithIntrospection
dondonz Mar 7, 2026
94efd56
Add JSpecify annotations to StaticDataFetcher
dondonz Mar 7, 2026
1f8779d
Add JSpecify annotations to DataFetcherFactories, DataFetcherFactoryE…
dondonz Mar 7, 2026
b82476c
Add JSpecify annotations to Introspection
dondonz Mar 7, 2026
110889d
Add JSpecify annotations to DefaultGraphqlTypeComparatorRegistry
dondonz Mar 7, 2026
25105cc
Add JSpecify annotations to IntrospectionQuery
dondonz Mar 7, 2026
7bbb5b6
Add JSpecify annotations to VariableDefinition
dondonz Mar 7, 2026
2b491c1
Add JSpecify annotations to TraverserContext
dondonz Mar 7, 2026
9b1401f
Add JSpecify annotations to DelegatingDataFetchingEnvironment
dondonz Mar 7, 2026
0e63fbb
Add JSpecify annotations to FieldCoordinates
dondonz Mar 7, 2026
2b7c527
Add JSpecify annotations to TreeTransformer
dondonz Mar 7, 2026
85cf8ee
Add JSpecify annotations to IntrospectionQueryBuilder
dondonz Mar 7, 2026
2b761b2
Add JSpecify annotations to TreeTransformerUtil
dondonz Mar 7, 2026
a982677
Add JSpecify annotations to DiffCategory, DiffLevel, DiffEvent, DiffS…
dondonz Mar 7, 2026
45fe990
Add JSpecify annotations to GraphQLAppliedDirectiveArgument
dondonz Mar 7, 2026
20a9960
Add JSpecify annotations to IntrospectionResultToSchema
dondonz Mar 7, 2026
01ba639
Add JSpecify annotations to CapturingReporter, ChainedReporter, Print…
dondonz Mar 7, 2026
f2e9b05
Add JSpecify annotations to CombinedWiringFactory
dondonz Mar 7, 2026
2c18b0b
Add JSpecify annotations to GraphQLArgument
dondonz Mar 7, 2026
1115c56
Add JSpecify annotations to IntrospectionWithDirectivesSupport
dondonz Mar 7, 2026
cbc31f9
Add JSpecify annotations to ExecutableNormalizedField
dondonz Mar 7, 2026
7b2694a
Add JSpecify annotations to GraphQLDirective
dondonz Mar 7, 2026
66893ac
Add JSpecify annotations to MapEnumValuesProvider, NaturalEnumValuesP…
dondonz Mar 7, 2026
160fc66
Add JSpecify annotations to ExecutableNormalizedOperation
dondonz Mar 7, 2026
600dfb8
Add JSpecify annotations to GraphQLEnumValueDefinition
dondonz Mar 7, 2026
be4ee78
Add JSpecify annotations to RuntimeWiring
dondonz Mar 7, 2026
35fac95
Add JSpecify annotations to GraphQLFieldDefinition
dondonz Mar 7, 2026
109840b
Add JSpecify annotations to ExecutableNormalizedOperationFactory
dondonz Mar 7, 2026
d7f0ef3
Add JSpecify annotations to SchemaDirectiveWiring, SchemaDirectiveWir…
dondonz Mar 7, 2026
bedab9e
Add JSpecify annotations to GraphQLInputObjectField
dondonz Mar 7, 2026
5932e03
Add JSpecify annotations to SchemaGenerator
dondonz Mar 7, 2026
cd81592
Add JSpecify annotations to GraphQLInputObjectType
dondonz Mar 7, 2026
ef5d836
Add JSpecify annotations to SchemaPrinter
dondonz Mar 7, 2026
8df23fe
Add JSpecify annotations to GraphQLInterfaceType
dondonz Mar 7, 2026
71d6c06
Add JSpecify annotations to ExecutableNormalizedOperationToAstCompiler
dondonz Mar 7, 2026
953b4fa
Add JSpecify annotations to GraphQLNonNull
dondonz Mar 7, 2026
5ccfd7a
Add JSpecify annotations to TypeRuntimeWiring
dondonz Mar 7, 2026
45901a3
Add JSpecify annotations to GraphQLObjectType
dondonz Mar 7, 2026
2e97608
Add JSpecify annotations to NormalizedInputValue
dondonz Mar 7, 2026
2bc8a73
Add JSpecify annotations to SchemaProblem, StrictModeWiringException
dondonz Mar 7, 2026
e70da28
Add JSpecify annotations to GraphQLTypeReference
dondonz Mar 7, 2026
7479870
Add JSpecify annotations to FieldVisibilitySchemaTransformation, Visi…
dondonz Mar 7, 2026
2e82e29
Fix NullAway errors from JSpecify annotation changes
dondonz Mar 7, 2026
8a5bca0
Add JSpecify annotations to SchemaUsage, SchemaUsageSupport
dondonz Mar 7, 2026
bbe52cd
Add JSpecify annotations to SchemaValidationErrorClassification
dondonz Mar 7, 2026
b527cbe
Add JSpecify annotations to BlockedFields, DefaultGraphqlFieldVisibil…
dondonz Mar 7, 2026
cdef600
Fix NullAway errors in JSpecify-annotated introspection classes
dondonz Mar 7, 2026
c0464e7
Add JSpecify annotations to GraphQLSchemaTraversalControl
dondonz Mar 7, 2026
a661884
Fix NullAway errors from JSpecify annotations in schema classes
dondonz Mar 7, 2026
c1bc5e0
Fix NullAway errors from JSpecify annotations
dondonz Mar 7, 2026
a6441a4
Remove annotated classes from JSpecify exemption list
dondonz Mar 7, 2026
1278b17
Add @NullMarked to DirectivePredicateEnvironment inner interface
dondonz Mar 7, 2026
11e3a5a
Remove annotated classes from JSpecify exemption list
dondonz Mar 7, 2026
fd32748
Merge branch 'worktree-agent-a0f2cc92' into claude/jspecify-wave4
dondonz Mar 7, 2026
5295d89
Merge branch 'worktree-agent-a14b2de7' into claude/jspecify-wave4
dondonz Mar 7, 2026
9c394ec
Merge branch 'worktree-agent-aee70ecc' into claude/jspecify-wave4
dondonz Mar 7, 2026
ba51a80
Merge branch 'worktree-agent-a923806e' into claude/jspecify-wave4
dondonz Mar 7, 2026
a21e088
Merge branch 'worktree-agent-a7ac80e9' into claude/jspecify-wave4
dondonz Mar 7, 2026
d8f36d2
Fix NullAway errors from JSpecify Wave 1 annotations
dondonz Mar 7, 2026
23d9285
Remove annotated Wave 1 classes from JSpecify exemption list
dondonz Mar 7, 2026
6099dad
Update orchestrator prompt for wave 5: execution packages only
dondonz Mar 7, 2026
f9f4154
Add JSpecify annotations to NormalizedDeferredExecution
dondonz Mar 7, 2026
0b524b1
Add JSpecify annotations to QueryGeneratorResult
dondonz Mar 7, 2026
5d1ff5f
Add JSpecify annotations to NormalizedDocument
dondonz Mar 7, 2026
24a8f34
Add JSpecify annotations to QueryGeneratorOptions
dondonz Mar 7, 2026
bf92ff4
Add JSpecify annotations to QueryGenerator
dondonz Mar 7, 2026
45ca396
Add JSpecify annotations to OneOfInputObjectRules
dondonz Mar 7, 2026
77a6c74
Add JSpecify annotations to NormalizedDocumentFactory
dondonz Mar 7, 2026
347707e
Add JSpecify annotations to CyclicSchemaAnalyzer
dondonz Mar 7, 2026
cdef4e4
Add JSpecify annotations to SchemaGraph
dondonz Mar 7, 2026
d37b8fa
Add JSpecify annotations to NormalizedOperationToAstCompiler
dondonz Mar 7, 2026
212836c
Add JSpecify annotations to NormalizedField
dondonz Mar 7, 2026
52b3473
Add JSpecify annotations to NormalizedOperation
dondonz Mar 7, 2026
08f6c66
Merge branch 'master' into claude/jspecify-wave4
dondonz Mar 7, 2026
7f17571
Merge branch 'worktree-agent-ac94456e' into claude/jspecify-wave5
dondonz Mar 7, 2026
2ef1bf8
Merge branch 'worktree-agent-aa0c5bf9' into claude/jspecify-wave5
dondonz Mar 7, 2026
645f3ab
Fix NullAway errors from JSpecify Wave 5 annotations
dondonz Mar 7, 2026
dbb0f99
Remove annotated Wave 5 classes from JSpecify exemption list
dondonz Mar 7, 2026
54e6dfd
Fix missing NodeAdapter context var in TreeParallelTransformer
dondonz Mar 7, 2026
49aec56
Update orchestration prompt
dondonz Mar 7, 2026
0f5ad71
Merge branch 'claude/jspecify-wave4' into claude/jspecify-wave5
dondonz Mar 7, 2026
2d0083d
Merge branch 'master' into claude/jspecify-wave5
dondonz Mar 7, 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
12 changes: 9 additions & 3 deletions .claude/commands/jspecify-annotate.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
The task is to annotate public API classes (marked with `@PublicAPI`) with JSpecify nullability annotations.
The task is to annotate public API classes (marked with `@PublicApi` or `@PublicSpi`) with JSpecify nullability annotations.

Note that JSpecify is already used in this repository so it's already imported.

## Scope: Public API only

Only annotate classes marked `@PublicApi` or `@PublicSpi`. Do **not** add JSpecify annotations to `@Internal` classes — these are implementation details and are intentionally left unannotated.

If you see a builder static class, you can label it `@NullUnmarked` and not need to do anymore for this static class in terms of annotations.

Analyze this Java class and add JSpecify annotations based on:
Expand Down Expand Up @@ -29,9 +33,11 @@ If you find NullAway errors, try and make the smallest possible change to fix th
Do not make spacing or formatting changes. Avoid adjusting whitespace, line breaks, or other formatting when editing code. These changes make diffs messy and harder to review. Only make the minimal changes necessary to accomplish the task.

## Cleaning up
Finally, can you remove this class from the JSpecifyAnnotationsCheck as an exemption
Finally, remove this class from the exemption list in `JSpecifyAnnotationsCheck.groovy`.

The exemption list contains fully-qualified class names. Remove **only** the class you just annotated — do not remove entries for `@Internal` classes or any other class you did not annotate.

You do not need to run the JSpecifyAnnotationsCheck. Removing the completed class is enough.
You do not need to run the JSpecifyAnnotationsCheck. Removing the completed class from the list is enough.

Remember to delete all unused imports when you're done from the class you've just annotated.

Expand Down
178 changes: 178 additions & 0 deletions .claude/commands/jspecify-team-prompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
# JSpecify Annotation Team Orchestrator Prompt

You are an orchestrator agent responsible for coordinating a team of worker
agents to add JSpecify nullability annotations to public API classes in the
graphql-java project.

## Your Job

1. Read the current exemption list from:
`src/test/groovy/graphql/archunit/JSpecifyAnnotationsCheck.groovy`
Before building batch assignments, check which classes from the lists below
are still present in the exemption list. Only assign classes that remain.
This makes the orchestrator safe to re-run after interruption.

2. Group the remaining classes into batches (see batches below).

3. Launch worker agents in **waves of 2** (only 2 workers this wave).
After the wave completes, launch the reviewer.

4. After the reviewer confirms no errors, launch the validator.

## Execution Flow

### Wave 1
Launch Workers 1, 2 in parallel. Wait for all to complete.
Launch Reviewer for Wave 1. Wait for completion and NullAway confirmation.

### Final Step
Launch the validator to remove completed classes from
`JSpecifyAnnotationsCheck.groovy` and push the branch.

---

## Batch Assignments

### Worker 1 — graphql.normalized (5 classes)
```
graphql.normalized.incremental.NormalizedDeferredExecution
graphql.normalized.nf.NormalizedDocument
graphql.normalized.nf.NormalizedDocumentFactory
graphql.normalized.nf.NormalizedField
graphql.normalized.nf.NormalizedOperation
```

### Worker 2 — graphql.normalized + schema + util (4 classes)
```
graphql.normalized.nf.NormalizedOperationToAstCompiler
graphql.schema.diffing.SchemaGraph
graphql.schema.validation.OneOfInputObjectRules
graphql.util.CyclicSchemaAnalyzer
graphql.util.querygenerator.QueryGenerator
graphql.util.querygenerator.QueryGeneratorOptions
graphql.util.querygenerator.QueryGeneratorResult
```

---

## Instructions for Each Worker Agent

Each worker agent must follow these rules for every class in its batch:

### Per-class steps
1. Find the class at `src/main/java/<package/ClassName>.java`
2. Add `@NullMarked` at the class level
3. Remove redundant `@NonNull` annotations added by IntelliJ
4. Check Javadoc `@param` tags mentioning "null", "nullable", "may be null"
5. Check Javadoc `@return` tags mentioning "null", "optional", "if available"
6. Check method bodies that return null or check for null
7. Consult the GraphQL spec (https://spec.graphql.org/draft/) for the
relevant concept — prioritize spec nullability over IntelliJ inference
8. If the class has a static Builder inner class, annotate it `@NullUnmarked`
and skip further annotation of that inner class
9. Delete unused imports from the class after editing
10. Do NOT modify `JSpecifyAnnotationsCheck.groovy`

### IntelliJ inspection check
After editing each file, use the IntelliJ MCP `inspections` tool to check
for warnings in the modified file. Fix any nullability-related warnings
before moving on. This catches issues that NullAway alone may miss.

### Generics rules
- `<T>` does NOT allow `@Nullable` type arguments (`Box<@Nullable String>` illegal)
- `<T extends @Nullable Object>` DOES allow `@Nullable` type arguments
- Use `<T extends @Nullable Object>` only when callers genuinely need nullable types

### After each class
- Commit with message: `"Add JSpecify annotations to ClassName"`
- `git pull` before starting the next class to pick up any concurrent changes

### If a class has NullAway errors
- Make the smallest possible fix
- Use `Objects.requireNonNull(x, "message")` or `assertNotNull(x, "message")`
only as a last resort
- Do NOT run the full build — leave that for the reviewer

---

## Reviewer Agent Instructions

After each wave of workers completes, launch a single reviewer agent.
The reviewer must NOT read any worker agent output or context — it works
only from the git diff.

### Step 1 — Get the diffs

For each class annotated in this wave, get its diff:
```
git diff origin/main...HEAD -- <path/to/ClassName.java>
```

### Step 2 — Review each diff independently

For each changed file, check:

**JSpecify correctness:**
- `@NullMarked` is present at the class level
- No redundant `@NonNull` annotations remain
- `@Nullable` is used where null is genuinely possible, not speculatively
- `<T extends @Nullable Object>` only used when callers truly need nullable
type arguments
- Builder inner classes are marked `@NullUnmarked` and nothing more

**GraphQL spec compliance:**
Fetch https://spec.graphql.org/draft/ for the relevant concept.
`MUST` = non-null. Conditional/IF = nullable.
Does the annotation match the spec?

**Unused imports:**
Are there leftover imports (e.g. `org.jetbrains.annotations.NotNull`)?

### Step 3 — Fix any issues found

Make the minimal fix directly in the file.
Do NOT revert the whole annotation — fix only the specific problem.
Do NOT modify `JSpecifyAnnotationsCheck.groovy`.

If you make any fixes, commit with:
```
"Review fixes: correct JSpecify annotations for ClassName"
```

### Step 4 — Run the compile check

```
./gradlew compileJava
```

If it passes, report success and stop.

If it fails:
- Read the NullAway error output carefully
- Make the smallest possible fix (prefer `assertNotNull(x, "message")`
over restructuring code)
- Re-run `./gradlew compileJava`
- Repeat until it passes or you have tried 3 times
- If still failing after 3 attempts, report the error details to the
orchestrator so it can decide whether to continue to the next wave

---

## Validator Agent Instructions

All waves are complete and the reviewer has confirmed `compileJava` passes
for each wave. Your job is cleanup and push only.

1. Read the current exemption list from `JSpecifyAnnotationsCheck.groovy`
2. For each class that now has `@NullMarked` in its source file, remove it
from the `JSPECIFY_EXEMPTION_LIST` in `JSpecifyAnnotationsCheck.groovy`
3. Run `./gradlew compileJava` one final time to confirm the full build passes
4. Commit: `"Remove annotated classes from JSpecify exemption list"`
5. Push: `git push -u origin claude/jspecify-wave5`

---

## Repository Details
- Working directory: `/Users/dondonz/Development/graphql-java`
- Branch: `claude/jspecify-wave5`
- NullAway compile check: `./gradlew compileJava`
2 changes: 1 addition & 1 deletion src/main/java/graphql/ExceptionWhileDataFetching.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ExceptionWhileDataFetching implements GraphQLError {
private final List<SourceLocation> locations;
private final @Nullable Map<String, Object> extensions;

public ExceptionWhileDataFetching(ResultPath path, Throwable exception, SourceLocation sourceLocation) {
public ExceptionWhileDataFetching(ResultPath path, Throwable exception, @Nullable SourceLocation sourceLocation) {
this.path = assertNotNull(path).toList();
this.exception = assertNotNull(exception);
this.locations = Collections.singletonList(sourceLocation);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/graphql/GraphQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ private CompletableFuture<ExecutionResult> parseValidateAndExecute(ExecutionInpu
return CompletableFuture.completedFuture(new ExecutionResultImpl(preparsedDocumentEntry.getErrors()));
}
try {
return execute(Assert.assertNotNull(executionInputRef.get()), preparsedDocumentEntry.getDocument(), graphQLSchema, instrumentationState, engineRunningState, profiler);
return execute(Assert.assertNotNull(executionInputRef.get()), assertNotNull(preparsedDocumentEntry.getDocument(), "document must not be null"), graphQLSchema, instrumentationState, engineRunningState, profiler);
} catch (AbortExecutionException e) {
return CompletableFuture.completedFuture(e.toExecutionResult());
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/graphql/UnresolvedTypeError.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ private String mkMessage(ResultPath path, UnresolvedTypeException exception, Exe
return format("Can't resolve '%s'. Abstract type '%s' must resolve to an Object type at runtime for field '%s.%s'. %s",
path,
exception.getInterfaceOrUnionType().getName(),
simplePrint(info.getParent().getUnwrappedNonNullType()),
info.getFieldDefinition().getName(),
simplePrint(assertNotNull(info.getParent(), "executionStepInfo parent must not be null").getUnwrappedNonNullType()),
assertNotNull(info.getFieldDefinition(), "fieldDefinition must not be null").getName(),
exception.getMessage());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import graphql.execution.instrumentation.SimplePerformantInstrumentation;
import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

import java.util.function.Function;

Expand Down Expand Up @@ -84,7 +85,7 @@ QueryTraverser newQueryTraverser(ExecutionContext executionContext) {
.build();
}

private int getPathLength(QueryVisitorFieldEnvironment path) {
private int getPathLength(@Nullable QueryVisitorFieldEnvironment path) {
int length = 1;
while (path != null) {
path = path.getParentEnvironment();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import graphql.execution.CoercedVariables;
import graphql.language.Document;
import graphql.schema.GraphQLSchema;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;
import org.jspecify.annotations.Nullable;

import java.util.LinkedHashMap;
import java.util.Map;
Expand All @@ -16,12 +19,13 @@
* into it.
*/
@PublicApi
@NullMarked
public class QueryComplexityCalculator {

private final FieldComplexityCalculator fieldComplexityCalculator;
private final GraphQLSchema schema;
private final Document document;
private final String operationName;
private final @Nullable String operationName;
private final CoercedVariables variables;

public QueryComplexityCalculator(Builder builder) {
Expand Down Expand Up @@ -95,6 +99,7 @@ public static Builder newCalculator() {
return new Builder();
}

@NullUnmarked
public static class Builder {
private FieldComplexityCalculator fieldComplexityCalculator;
private GraphQLSchema schema;
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/graphql/analysis/QueryComplexityInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
import graphql.PublicApi;
import graphql.execution.instrumentation.parameters.InstrumentationExecuteOperationParameters;
import graphql.execution.instrumentation.parameters.InstrumentationValidationParameters;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;
import org.jspecify.annotations.NullUnmarked;

/**
* The query complexity info.
*/
@PublicApi
@NullMarked
public class QueryComplexityInfo {

private final int complexity;
private final InstrumentationValidationParameters instrumentationValidationParameters;
private final InstrumentationExecuteOperationParameters instrumentationExecuteOperationParameters;
private final @Nullable InstrumentationValidationParameters instrumentationValidationParameters;
private final @Nullable InstrumentationExecuteOperationParameters instrumentationExecuteOperationParameters;

private QueryComplexityInfo(Builder builder) {
this.complexity = builder.complexity;
Expand All @@ -35,7 +38,7 @@ public int getComplexity() {
*
* @return the instrumentation validation parameters.
*/
public InstrumentationValidationParameters getInstrumentationValidationParameters() {
public @Nullable InstrumentationValidationParameters getInstrumentationValidationParameters() {
return instrumentationValidationParameters;
}

Expand All @@ -44,7 +47,7 @@ public InstrumentationValidationParameters getInstrumentationValidationParameter
*
* @return the instrumentation execute operation parameters.
*/
public InstrumentationExecuteOperationParameters getInstrumentationExecuteOperationParameters() {
public @Nullable InstrumentationExecuteOperationParameters getInstrumentationExecuteOperationParameters() {
return instrumentationExecuteOperationParameters;
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryDepthInfo.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;

/**
* The query depth info.
*/
@PublicApi
@NullMarked
public class QueryDepthInfo {

private final int depth;
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/graphql/analysis/QueryReducer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package graphql.analysis;

import graphql.PublicApi;
import org.jspecify.annotations.NullMarked;

/**
* Used by {@link QueryTraverser} to reduce the fields of a Document (or part of it) to a single value.
Expand All @@ -10,6 +11,7 @@
* See {@link QueryTraverser#reducePostOrder(QueryReducer, Object)} and {@link QueryTraverser#reducePreOrder(QueryReducer, Object)}
*/
@PublicApi
@NullMarked
@FunctionalInterface
public interface QueryReducer<T> {

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/graphql/analysis/QueryTransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import java.util.LinkedHashMap;
import java.util.Map;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.NullUnmarked;

import static graphql.Assert.assertNotNull;
Expand All @@ -31,6 +32,7 @@
* visitField calls.
*/
@PublicApi
@NullMarked
public class QueryTransformer {

private final Node root;
Expand Down Expand Up @@ -82,7 +84,7 @@ public Node transform(QueryVisitor queryVisitor) {

@Override
public TraversalControl enter(TraverserContext<Node> context) {
return context.thisNode().accept(context, nodeVisitor);
return assertNotNull(context.thisNode(), "thisNode should not be null").accept(context, nodeVisitor);
}

@Override
Expand All @@ -91,7 +93,7 @@ public TraversalControl leave(TraverserContext<Node> context) {
return TraversalControl.CONTINUE;
}
};
return new TreeTransformer<>(AST_NODE_ADAPTER).transform(root, nodeTraverserVisitor, rootVars);
return assertNotNull(new TreeTransformer<>(AST_NODE_ADAPTER).transform(root, nodeTraverserVisitor, rootVars), "transform result should not be null");
}

public static Builder newQueryTransformer() {
Expand Down
Loading
Loading
X Tutup