Skip to content

docs: add JSpecify nullness guidelines to AGENTS.md#13881

Open
nnicolee wants to merge 2 commits into
mainfrom
feat/jspecify-agent
Open

docs: add JSpecify nullness guidelines to AGENTS.md#13881
nnicolee wants to merge 2 commits into
mainfrom
feat/jspecify-agent

Conversation

@nnicolee

Copy link
Copy Markdown
Contributor

This PR adds a dedicated JSpecify Nullness Guidelines section (Section 5) to the repository-wide AGENTS.md onboarding guide for AI coding assistants.

Changes

  • Dependency Requirement: Outlines that JSpecify must be declared in target module POMs.
  • Handwritten vs. Generated Modules: Sets clear guidelines distinguishing handwritten additions from generator-level code composition (gapic-generator-java).
  • JSpecify Type-Use Semantics: Establishes class-level @NullMarked defaulting, and details specific type-use placement rules for:
    • Generics (List<@Nullable String> list)
    • Arrays (String @Nullable [] array)
    • Fully-qualified class names (com.google.auth.oauth2.@Nullable TokenVerifier)

@nnicolee
nnicolee marked this pull request as ready for review July 23, 2026 19:44
@nnicolee
nnicolee requested review from a team as code owners July 23, 2026 19:44
gemini-code-assist[bot]

This comment was marked as resolved.

@nnicolee
nnicolee requested a review from lqiu96 July 23, 2026 19:56
@lqiu96

lqiu96 commented Jul 23, 2026

Copy link
Copy Markdown
Member

going to update this to be docs: prefix

@lqiu96 lqiu96 changed the title feat: add JSpecify nullness guidelines to AGENTS.md docs: add JSpecify nullness guidelines to AGENTS.md Jul 23, 2026
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated

@lqiu96 lqiu96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to test this out for the agent. I think there may be better spots for this (e.g. DEVELOPMENT.md or a specific null annotation skill to not increase up the initial context).

Shouldn't have any harm with trying this out for now and we can always move this around to any better spot in the future.

@nnicolee nnicolee added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Indicates a pull request not ready for merge, due to either quality or timing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants