Add JSpecify annotations to 10 classes in graphql.language package and improve annotation prompt#4216
Add JSpecify annotations to 10 classes in graphql.language package and improve annotation prompt#4216
Conversation
Co-authored-by: dondonz <[email protected]>
|
This is from me, I'm experimenting with Copilot agents running in parallel |
|
builds didn't run because I am targeting an inprogress JSpecify branch |
|
I will later change this branch to target master for merging. The other JSpecify PR should be merged in first I ran the NullAway checks, and the full test suite locally, and it's passed. Very impressed with Copilot agents for parallelising this work. This was made with Claude Sonnet 4.5 Other learnings - I tried 40-50 classes at a time with Opus 4.5 via Antigravity. It couldn't cope with too much context. Much better results with doing 10 at a time, as done here |
|
@copilot Excellent work. Coming back to the original JSpecify prompt, what would you change to make the next agent run even more effective? |
Based on this run, here are suggestions to make the prompt even more effective: Add to the prompt:
Already working well:
The current prompt is solid - these additions would just reduce exploration time and catch issues faster. |
|
@copilot Make these changes to the prompt in this pull request |
Co-authored-by: dondonz <[email protected]>
Updated the prompt in Added sections:
The prompt now provides clearer guidance on workflow and includes practical examples to reduce exploration time. |
| def sanitizedBranchName = branchName.replace('/', '-') | ||
|
|
||
| return makeDevelopmentVersion(["0.0.0", branchName, "SNAPSHOT"]) | ||
| return makeDevelopmentVersion(["0.0.0", sanitizedBranchName, "SNAPSHOT"]) |
There was a problem hiding this comment.
Copliot PRs always have a / in the name, which makes it appear like the jar is in another directory when developing locally. This sanitises the name
|
This diff looks unusual because it depends on the first large jspecify pr to go in |
Annotates 10 foundational classes in
graphql.languagewith JSpecify nullability markers, continuing the repository-wide nullability annotation effort. Also updates the JSpecify annotation prompt with effectiveness improvements for future annotation work.Changes
Interfaces (4):
Node,Definition,Type,NodeVisitor@NullMarkedat class levelSimple classes (4):
IgnoredChar,IgnoredChars,NodeVisitorStub,Comment@NullMarkedat class levelComment.sourceLocationas@Nullable(parser may create comments without location)Complex classes (2):
SourceLocation,NodeChildrenContainer@NullMarkedat class levelSourceLocation.sourceNameandgetLocation()return as@NullableNodeChildrenContainer.getChildOrNull()return as@Nullable@NullUnmarkedforNodeChildrenContainer.Builderper JSpecify builder patternExemption list: Removed all 10 classes from
JSpecifyAnnotationsCheck.groovyPrompt improvements: Enhanced
.claude/commands/jspecify-annotate.mdwith:All changes validated with NullAway static analysis via
./gradlew compileJava.Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.