Skip to content

LLM based coding documentation#279

Open
greole wants to merge 2 commits into
developfrom
feat/agentsmd
Open

LLM based coding documentation#279
greole wants to merge 2 commits into
developfrom
feat/agentsmd

Conversation

@greole
Copy link
Copy Markdown
Contributor

@greole greole commented May 13, 2026

This PR adds a first AGENTS.md and instructions for LLM based coding. I think we can gradually extend the AGENTS.md file.

Additionally, to avoid flooding the repo with tool specific stuff CLAUDE.md and .planning are added to gitignore.

@github-actions
Copy link
Copy Markdown

Deployed test documentation to https://exasim-project.com/NeoFOAM/Build_PR_279

Copy link
Copy Markdown
Collaborator

@HendriceH HendriceH left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Collaborator

@chihtaw chihtaw left a comment

Choose a reason for hiding this comment

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

LGTM!
The only major thing I think is missing is explicit GPU execution guidance.

Comment thread AGENTS.md
### `test/`

Each test file starts an OpenFOAM `Time`/mesh in `test_main.cpp`, then Catch2 test cases use `GENERATE(allAvailableExecutor())` to run the same case on every compiled executor (Serial, CPUExecutor for OpenMP/threads, GPUExecutor for CUDA/HIP/SYCL). Setup case files live in `test/setup_<name>/`.

Copy link
Copy Markdown
Collaborator

@chihtaw chihtaw May 13, 2026

Choose a reason for hiding this comment

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

Consider adding a section about GPU execution semantics/Kokkos constraints

Since NeoFOAM heavily relies on NeoN/Kokkos portability, we can add something like

## GPU considerations
- Device kernels must use NEON_LAMBDA
- Avoid host-only allocations/access insider kernels
- Prefer parallelFor abstractions over raw loops
- Explicit synchronization may be required before host reads ( NeoN::fence(exec) )
- Use .copyToHost() when validating vectors in tests

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point so far, no one is using Claude or anything else on a GPU node, but this will come at some point.

Comment thread AGENTS.md

### `test/`

Each test file starts an OpenFOAM `Time`/mesh in `test_main.cpp`, then Catch2 test cases use `GENERATE(allAvailableExecutor())` to run the same case on every compiled executor (Serial, CPUExecutor for OpenMP/threads, GPUExecutor for CUDA/HIP/SYCL). Setup case files live in `test/setup_<name>/`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Consider documenting testing conventions more explicitly

Suggested change
Each test file starts an OpenFOAM `Time`/mesh in `test_main.cpp`, then Catch2 test cases use `GENERATE(allAvailableExecutor())` to run the same case on every compiled executor (Serial, CPUExecutor for OpenMP/threads, GPUExecutor for CUDA/HIP/SYCL). Setup case files live in `test/setup_<name>/`.
Tests should generally validate behavior across all enabled executors (CPU/GPU) and avoid assumptions about deterministic floating-point ordering.
Each test file starts an OpenFOAM `Time`/mesh in `test_main.cpp`, then Catch2 test cases use `GENERATE(allAvailableExecutor())` to run the same case on every compiled executor (Serial, CPUExecutor for OpenMP/threads, GPUExecutor for CUDA/HIP/SYCL). Setup case files live in `test/setup_<name>/`.

Comment thread README.md
## Agentic coding

We provide an `AGENTS.md` file to support LLM-based coding workflows.
Please instruct tools such as Claude Code to reference this file, for example by prompting: “See `AGENTS.md` for shared project instructions.”
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The current wording might unintentionally imply a Claude-specific workflow. It could be slightly broader.

Suggested change
Please instruct tools such as Claude Code to reference this file, for example by prompting: “See `AGENTS.md` for shared project instructions.”
Please instruct AI coding tools to reference this file, for example by prompting: “See `AGENTS.md` for shared project instructions.”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants