Skip to content

Conversation

@ram-cherukuri
Copy link
Collaborator

Adding context file for helping LLMs understand and use PhysicsNeMo codebase to help users

PhysicsNeMo Pull Request

Description

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.
  • The CHANGELOG.md is up to date with these changes.
  • An issue is linked to this pull request.

Dependencies

Review Process

All PRs are reviewed by the PhysicsNeMo team before merging.

Depending on which files are changed, GitHub may automatically assign a maintainer for review.

We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.

AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.

Adding context file for helping LLMs understand and use PhysicsNeMo codebase to help users
Added detailed design patterns and architectural guidelines for PhysicsNeMo, including registry patterns, module hierarchy, configuration management, and more. Updated the document to enhance clarity and usability for developers.
**Example:**

```python
from physicsnemo.core.version_check import check_min_version, require_version
Copy link
Collaborator

Choose a reason for hiding this comment

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

This syntax is incorrect; check_min_version does not exist in this module.

**Pattern:**

```python
def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor] = None) -> torch.Tensor:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def forward(self, x: torch.Tensor, mask: Optional[torch.Tensor] = None) -> torch.Tensor:
def forward(self, x: torch.Tensor, mask: torch.Tensor | None = None) -> torch.Tensor:

The existing syntax here will throw a Ruff formatting error.

@@ -0,0 +1,973 @@
# LLM-Context.md
Copy link
Collaborator

Choose a reason for hiding this comment

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

In general, it seems like this LLM-Context.md may be better suited for ./.cursor/rules, and indeed some of the contents here duplicate existing rules. Perhaps we can deduplicate and consolidate these?


PhysicsNeMo provides a rich set of **domain-specific datapipes**:

**Organization:**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cursor / Claude Code / other agent-based tooling should be able to dynamically scan the repository structure and docs here to determine repo organization and layout. I'm a bit concerned that hard-coding a directory structure like this will create multiple sources of truth down the road as the repo evolves. Could we perhaps remove this and instead let the agent dynamically determine repo structure?


**Pattern Type:** Living Documentation

**Related Rules:** MOD-003a through MOD-003k
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this section add any new detail that the existing referenced .cursor/rules/ do not already have? If not, creating multiple sources of truth will increase maintenance burden.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants