Skip to content

Add AGENTS.md and agent skills for PR review and issue triage for guided agentic coding - #1669

Open
cmdupuis3 wants to merge 14 commits into
mainfrom
cmd/claude-md
Open

cmdupuis3 wants to merge 14 commits into
mainfrom
cmd/claude-md

Conversation

@cmdupuis3

@cmdupuis3 cmdupuis3 commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Note: Adding everyone just to keep informed about our agentic coding changes - review from everyone not needed.

Closes #1668

Overview

EDIT (11/13/2026): @cmdupuis3 and @erogluorhan discussed and agreed for @erogluorhan to take this over and rework as follows:

  • AGENTS.md: every claim checked against current main, plus the project's issues, discussions and PR reviews. It corrects stale claims (optional [geo]/[viz] extras since Refactor dependencies to make more optional #1548, Python 3.12+, cross_sections after remove code with 1+ year-old DeprecationWarnings #1851, pins, benchmarks, the AI disclosure in the PR template). It removes the date-based freshness section, the generic numba advice and the contradictory error rule raised in review. It adds the grid-preservation contract, parallel_njit, settled design decisions with links, and what reviewers ask for.
  • Agent skills in .agents/skills/ (overview in .agents/README.md):
    • uxarray-pr-review reviews a PR and verifies each finding by running code (mutation tests per hunk, input sweeps over antimeridian, pole and fill-value meshes, base vs PR equivalence, laziness checks). It posts only after approval.
    • uxarray-issue-triage classifies an issue, finds duplicates and past decisions, reproduces it on small test meshes and suggests labels.
  • Claude Code reads AGENTS.md itself in recent versions, so .claude/CLAUDE.md is removed. .claude/skills/ symlinks make the skills available as /uxarray-pr-review <N> and /uxarray-issue-triage <N>.

Original overview was as follows:
This PR adds an AGENTS.md markdown file to help orient LLMs, hopefully yielding more efficient and better outputs.

A CLAUDE.md pointer markdown is also included, pointers for other LLMs are welcome as well.

This draft should be taken as a starting point for what an AGENTS.md file could look like. All community input is welcome in regards to reviews, concerns, philosophies, etc.

For reviewers

  • Discovery was checked with headless Claude Code 2.1.323: both skills are listed and AGENTS.md is loaded. Older versions (e.g. 2.1.270) don't read AGENTS.md.
  • Pilot runs of the skills on real PRs and issues will follow, as evidence that they help.

PR Checklist

General

  • An issue is created and linked
  • Added appropriate labels
  • Filled out Overview section

Documentation and Examples

  • [N/A] No code changes

AI Disclosure

AI Usage: Claude Code (Claude Opus 5.5) for researching the repo, issues and reviews, and drafting the files; every claim was checked against the code.

  • I have tested and take responsibility for all AI-generated content in my PR.

🤖 Generated with Claude Code

@cmdupuis3

Copy link
Copy Markdown
Collaborator Author

pre-commit.ci autofix

@cmdupuis3 cmdupuis3 added the new feature New user-facing functionality label Aug 11, 2026
@cmdupuis3 cmdupuis3 self-assigned this Aug 11, 2026
@rljacob

rljacob commented Aug 11, 2026

Copy link
Copy Markdown
Member

Did you use ask claude or other to write this or is it by hand?

@cmdupuis3

cmdupuis3 commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator Author

Mostly I used Claude to generate it, I edited some parts by hand on parts of uxarray I'm more familiar with. I'm hoping others can help review it so I'm not missing any blind corners.

@Sevans711

Copy link
Copy Markdown
Collaborator

Upon quick skimming, I noticed a few things:

  1. The number of tests is wrong (it's 800+ not 546)
  2. The file refers to Claude.md despite the file name being AGENTS.md
  3. This file is a snapshot, not an oracle. Where it contradicts the repository, the repository wins, but establish that by dates, not by instinct. I am confused why the request is to establish that by dates. There are some things in this file which are probably currently incorrect, and I would want an LLM to always use the repository as ground truth rather than this file, I think?
  4. JIT functions must be **module-level** and take/return plain arrays and scalars. `self`, `xr.DataArray`, and dicts cannot cross the boundary Is this really necessary? I would think that LLMs should be smart enough to "know" this generic statement about numba, without instructing them.
  5. on failure raise a **typed error from `errors.py`** I don't think this is correct, you shouldn't always raise a custom error type. Lines above this clarified that already, this contradicts those lines.
  6. I don't really know how to properly review something like this, especially since LLMs are not deterministic. Is there any way to test whether it is actually causing LLMs to produce improved results? Even if it's something you've run by-hand and not included anywhere in the automatic test suite, I think before this PR gets approved I would really like to see at least one example of "I gave an LLM the same prompt, without AGENTS.md, and with AGENTS.md, and it did a better job responding in the latter case." (To make sure order doesn't matter, also try doing in the reverse order. Maybe there is a need to disable "remember things across chats" somehow too.) This would at least provide some direct evidence that the file is plausibly providing an improvement for LLM usage. Alternatively, maybe there is some other way to show that evidence, such as existing tools which might review AGENTS.md files?

(Clarifying the following because you already requested review, which feels more official than just asking for help looking through the content) I'd be happy to properly give this a full review once you have indicated that you take responsibility for the AI generated content. I think the intention of those boxes is that an actual review (which is different from just providing suggestions or working together in thread) should not occur until you are ready to take responsibility for the content, in order to save reviewers' time.

@cmdupuis3

Copy link
Copy Markdown
Collaborator Author

@Sevans711:

1 + 2) I'll fix these.

  1. Well, my hope is that at some point, the AGENTS.md would be about as trustworthy as anything else. Since these are instructions about how to understand the repo, I think it makes sense that an up-to-date AGENTS.md file would take into consideration the state of the whole repo at the time it was last edited. Files that are older can't have insight to what's in the AGENTS.md file, and aside from documentation, aren't really supposed to help LLMs anyway. LLMs tend to trust these files more than the actual source code, so the failure mode is usually the exact opposite scenario, where the LLMs trust the older AGENTS.md files more than the source code.

  2. It's cheaper to just tell the LLM how to deal with these situations than it is for them to figure it out for themselves at every prompt. That's part of the point of adding this file. Ideally, we'd get higher quality outputs too.

  3. Mmm, yeah I'll fix that too.

  4. I think that's going to be really subjective. IMO the only way to get a sense if it's working is to include it and see if it feels like the outputs are better in general. That should probably be an iterative process.

I didn't want to check the AI responsibility boxes yet because I was hoping to get input on some of the later sections. IMO it's better to have a starting point that someone else can look at than to leave it blank and expect someone else to come along and add stuff. My intent here is for this to be a conversation for now, I don't expect to have this merge in anytime soon. If there are remaining bits nobody can vouch for, I'll delete them.

@cmdupuis3 cmdupuis3 assigned erogluorhan and unassigned cmdupuis3 Nov 10, 2026
@cmdupuis3 cmdupuis3 closed this Nov 10, 2026
@cmdupuis3 cmdupuis3 reopened this Nov 10, 2026
cmdupuis3 and others added 4 commits November 10, 2026 12:16
Check every claim in the draft against the code and the project's issues,
discussions and PR reviews:

- Fix stale or wrong claims: optional dependencies (viz/geo extras since
  #1548, enforced import rules, OptionalDependencyNotFoundError), Python
  3.12+, dependency pins, cross_sections (deprecated methods removed in
  #1851), pytest config, benchmarks, and the PR template's AI disclosure.
- Remove the date-based freshness section (the repo is the source of
  truth), generic numba advice, and the contradictory error-type rule.
- Add grid preservation through xarray ops, parallel_njit and the
  no-compilation-on-import rule, settled design decisions with links, and
  what reviewers ask for in PRs.
- Remove .claude/CLAUDE.md: Claude Code reads AGENTS.md itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- uxarray-pr-review: reads the PR's review history, traces changed code to
  its public entry points, and verifies each finding by running code
  (mutation tests per hunk, input/option sweeps, base vs PR equivalence,
  laziness and uxgrid checks) before drafting a short review. Posts only
  after the user approves the text.
- uxarray-issue-triage: classifies an issue, finds duplicates and past
  decisions, tries to reproduce it on small test meshes, and suggests
  labels from the repo's own label set.

Claude Code finds them through symlinks in .claude/skills/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@erogluorhan
erogluorhan marked this pull request as ready for review November 13, 2026 19:28
@erogluorhan

Copy link
Copy Markdown
Member
  1. I don't really know how to properly review something like this, especially since LLMs are not deterministic. Is there any way to test whether it is actually causing LLMs to produce improved results? Even if it's something you've run by-hand and not included anywhere in the automatic test suite, I think before this PR gets approved I would really like to see at least one example of "I gave an LLM the same prompt, without AGENTS.md, and with AGENTS.md, and it did a better job responding in the latter case." (To make sure order doesn't matter, also try doing in the reverse order. Maybe there is a need to disable "remember things across chats" somehow too.) This would at least provide some direct evidence that the file is plausibly providing an improvement for LLM usage. Alternatively, maybe there is some other way to show that evidence, such as existing tools which might review AGENTS.md files?

I'll try to pilot these skills towards an existing PR and share its review results for reference here. Plus, if we all can start to and keep using it as much as possible, we'll have a chance to improve it along the way depending on our expectations and experiences.

@erogluorhan erogluorhan changed the title Init AGENTS.md Add AGENTS.md and agent skills for PR review and issue triage for guided agentic coding Nov 17, 2026

@rajeeja rajeeja left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Content checks out against main. Two small suggestions inline: (1) YAC test location and skip behaviour, (2) keep the docs vendor-neutral. Also, .agents/README.md L16-23 and L35 and the .claude/skills symlinks are Claude-specific. Could they be labelled as an optional Claude Code convenience, with the pinned version and claude update removed?

Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentic-coding new feature New user-facing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding an AGENTS.md file

5 participants