Add AGENTS.md#32749
Conversation
|
We just did something similar to this in TMAP8. It might be helpful to take a look at some of what we put down too! |
|
Pinging @chaibhave @simopier @lin-yang-ly |
|
I should have said in the original PR post that this is modeled after PETSc's I have read the TMAP8 AGENTS.md and there is good content there for sure. There are other things which are not my favorite. The ones I remember off the top of my head:
Those are relatively small things |
|
Job Documentation, step Docs: sync website on df4edab wanted to post the following: View the site here This comment will be updated on new commits. |
|
Job Coverage, step Generate coverage on df4edab wanted to post the following: Framework coverage
Modules coverageThermal hydraulics
Full coverage reportsReports
This comment will be updated on new commits. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Would it be beneficial to add some info on OS-specific behavior? Like conda-related info for macs? |
|
Oh I see you didn't like it, I think it could be still useful. |
|
I suppose we can cutomize it locally on top of the base info here. Was also thinking about the sandbox behavior on mac. |
I don't think we should assume conda, but we could instruct the agent from agents file to begin a session by asking
|
|
Ok in newest commit:
|
|
I think we should make it a goal to get this merged reasonably soon. I think this is one of those things that once it's merged we should get a bunch of follow-on improvements since all of a sudden it will be affecting people's agents' use |
|
I guess I'm trying to motivate collaboration here. We don't want a piece of garbage getting merged, so I won't rush to get this merged |
| ## Common Commands | ||
|
|
||
| - `make -j<N> METHOD=opt` — build optimized | ||
| - `make -j<N> METHOD=dbg` — build debug | ||
| - `make -j<N> METHOD=devel` — build with asserts and optimizations | ||
| - `git clang-format [<branch>]` — auto-format C++ changes relative to a branch | ||
| - `black .` — auto-format all Python code | ||
| - `./run_tests -j<N>` — run all tests for the application in the current | ||
| directory (respects `METHOD`, default `opt`) | ||
| - `./run_tests -j<N> --re <pattern>` — run tests matching a regex |
There was a problem hiding this comment.
Here are some things from my AGENTS.md/CLAUDE.md
Build, Test, and Development Commands
Build and test from relevant subtree instead of repo root.
Build
For framework-only build:
cd test && make -j8An executable will be created at test/moose_test-opt.
For module-specific build:
cd modules/<module-name> && make -j8An executable will be created at modules/<module-name>/<module_name>-opt.
To build all of MOOSE:
cd modules && make -j8An executable will be created at modules/combined/combined-opt.
For unit testing:
cd unit && make -j8An executable will be created at unit/moose-unit-opt.
Testing
Each of the subtrees described above will have a ./run_tests command to run associated test (except for the unit testing).
To run ALL tests associated with that executable do:
./run_tests -j4To execute a specific test, use regular expression matching with the --re flag:
./run_tests -j4 --re <folder-name>.<test-name>Other flags are available to test with different configurations:
-p <n> # Execute test with <n> processors
--distributed-mesh # Execute test with distributed mesh
--recover # Perform test with half transient and see if it recovers properly
--restep # Simulate a failed solveUnit tests are executed by calling the built executable
./moose-unit-optFilter tests using regular expression:
./moose-unit-opt --gtest_filter=*<test-name>*Python tests can be run with:
cd python && ./run_tests -j8Note that moose_test-opt usually needs to be built to perform these tests.
Formatting
`git clang-format [<branch>]` # auto-format C++ changes relative to a branch
`black .` # auto-format all Python code|
What if instead of AGENTS.md we put a .agents/skills/
I feel like this would be less intrusive then a AGENTS.md file. |
|
I fully support adding skills. That's included in #32497. Perhaps that can fully replace an AGENTS.md (I've symlinked CLAUDE.md to point to AGENTS.md in this PR), but it would lead me to wonder why other OSS projects are introducing these files and why claude itself has asked me in the past to write a |
|
I feel that the claude/agents.md file is better setup by each person individually depending on what they work on in MOOSE most often, but I can see the benefit. I wonder if creating a CONTEXT.md file that a user can point to in their claude/agents.md file would be better. Then it would be more opt in type of thing. |
|
I agree with @maxnezdyur. A lot of the content may be better to add as skills so that agent will load them when needed instead of load agent.md every time as system prompt. Here is an example of claude.md recommended by Andrej Karpathy in his tweet https://github.com/forrestchang/andrej-karpathy-skills/blob/main/CLAUDE.md |
|
That's a great looking file @MengnanLi91.
I hear what you're saying @maxnezdyur. But I want to take steps to ensure that people are submitting code to MOOSE that is reviewable. @nmnobre caught some code that codex wrote (with my signature attached) which was more complicated than it needed to be. As agent use increases (I firmly believe it will), we'll continue to see more agent written code. It would be best for everyone, I firmly believe, if that agent code is standardized as much as possible. And there's no reason it shouldn't be; we write things like style guides that we expect human developers to follow. I think the simple guidelines in the |
|
It would be great if you smarter AI people could add the skills 😄 |
|
Job Test, step Results summary on df4edab wanted to post the following: Framework test summaryCompared against ba7b856 in job civet.inl.gov/job/3782078. No change Modules test summaryCompared against ba7b856 in job civet.inl.gov/job/3782078. No change |
|
The most heavily-AI-written PR I've reviewed so far is libMesh/libmesh#4441, and some of the mistakes there were specific to libMesh or specific to that PR's goals, but others might be worth trying to preempt here:
|
|
Those are all good suggestions and I think I had the framing of some of those things earlier but moved to the simpler AGENTS.md based on the feedback from @maxnezdyur and @MengnanLi91, with the alternative seemingly being to put things into skills. Note that putting a link to the coding style guide in AGENTS.md does not mean in general that the agent will read it. That was the reason that the PETSc team totally changed their agents file to stop using links |
Refs #32497
@idaholab/moose-ccb let's work on this together