mod-003a-missing-or-incomplete-docstring

mod-003a-missing-or-incomplete-docstring is a cursor rule for Cursor from NVIDIA/physicsnemo. It costs 34 tokens per session (416 once invoked), scanned A, original, Apache-2.0.

A documentation rule requiring every PhysicsNeMo model or layer to have a complete NumPy-style docstring formatted for Sphinx, a tool that builds reference documentation from code comments.

In plain words
What is it for?
Use it when creating or modifying model or layer code and documenting its behavior, inputs, outputs, and related details.
Why use it?
It lets users understand a model's inputs and outputs without reading its implementation and keeps generated documentation consistent.

Cursor rule for Cursor ✓ vendor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or modifying model or layer code and documenting its behavior, inputs, outputs, and related details.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring
About the project

PhysicsNeMo is an open-source PyTorch framework for creating, training, and fine-tuning machine-learning models for physics, scientific computing, and engineering. Researchers and engineers use its reusable components and training recipes for applications such as aerodynamics, weather forecasting, structural mechanics, geophysics, and thermal design. The catalogue entries provide rules and skills for working with PhysicsNeMo projects.

NVIDIA/physicsnemo · 3,418 stars · on GitHub · developer.nvidia.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/NVIDIA/physicsnemo

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mod-003a-missing-or-incomplete-docstring

README.md
[![agentmods](https://agentmods.dev/badge/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring/github.svg)](https://agentmods.dev/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring)
Your own site
<a href="https://agentmods.dev/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring"><img src="https://agentmods.dev/badge/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mod-003a-missing-or-incomplete-docstring

Your own site · 80×15
<a href="https://agentmods.dev/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring"><img src="https://agentmods.dev/badge/rules/nvidia/physicsnemo/mod-003a-missing-or-incomplete-docstring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 416 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00416
Opus 5.5 $0.00014 $0.00166
Sonnet 5.5 $0.00007 $0.00083
Haiku 4.5 $0.00003 $0.00042

Measured 2mo ago against content hash 0eee4a3ccf6f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mod-003a-missing-or-incomplete-docstring scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/mod-003a-missing-or-incomplete-docstring.mdc · 66 lines

What it actually says

When writing model or layer documentation, rule MOD-003a must be followed. Explicitly reference "Following rule MOD-003a, which requires comprehensive docstrings following all MOD-003 sub-rules..." when creating documentation.

MOD-003a: Missing or incomplete docstring for model/layer code

Description:

Every new model or modification of any model code should be documented with a comprehensive docstring following all the sub-rules MOD-003b through MOD-003k. All docstrings should be written in the NumPy style and adopt formatting to be compatible with our Sphinx restructured text (RST) documentation.

Rationale:

Comprehensive and well-formatted documentation is essential for scientific software. It enables users to understand model capabilities, expected inputs, and outputs without inspecting source code.

Example:

class MyEncoder(Module):
    r"""
    A simple encoder network.

    Parameters
    ----------
    input_dim : int
        Dimension of input features.
    output_dim : int
        Dimension of output features.

    Forward
    -------
    x : torch.Tensor
        Input tensor of shape :math:`(B, D_{in})`.

    Outputs
    -------
    torch.Tensor
        Output tensor of shape :math:`(B, D_{out})`.

    Examples
    --------
    >>> model = MyEncoder(input_dim=784, output_dim=128)
    >>> x = torch.randn(32, 784)
    >>> output = model(x)
    >>> output.shape
    torch.Size([32, 128])
    """
    pass

Anti-pattern:

# WRONG: Missing all required sections
class BadEncoder(Module):
    '''A simple encoder.'''  # Wrong quotes, no sections
    pass
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 66 lines · 34 tokens per session scan A 0eee4a3ccf6f

Subscribe to this mod's changes

mod-003a-missing-or-incomplete-docstring is a cursor rule published in the GitHub repository NVIDIA/physicsnemo (3,418 stars, last pushed yesterday), licensed Apache-2.0. It adds 34 tokens to every session and 416 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

mod-003a-missing-or-incomplete-docstring compared with cursor rules from other repositories

mod-003a-missing-or-incomplete-docstring next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mod-003a-missing-or-incomplete-docstringNVIDIA/physicsnemoCursor rule3.4kyesterdayApache-2.0A34Cursor
python_libstreamlit/streamlitCursor rule46kyesterdayApache-2.0A0Cursor
typescriptstreamlit/streamlitCursor rule46kyesterdayApache-2.0A5,351Cursor
specsstreamlit/streamlitCursor rule46kyesterdayApache-2.0A0Cursor
workflowsstreamlit/streamlitCursor rule46kyesterdayApache-2.0A0Cursor
skillsstreamlit/streamlitCursor rule46kyesterdayApache-2.0A0Cursor
python_testsstreamlit/streamlitCursor rule46kyesterdayApache-2.0A0Cursor