newton-mcp: Instructions file for Codex

AGENTS.md

newton-mcp AGENTS.md is an instructions file for Codex, OpenCode from wkzMagician/newton-mcp. It costs 2,552 tokens per session, scanned A, original, Apache-2.0.

A set of project instructions for Newton, a physics and robotics library. It explains which parts form the public programming interface, how names and command-line options should be written, and which tools to use.

In plain words
What is it for?
Use it when adding Newton classes or functions, changing its API, writing examples or documentation, managing dependencies, or running tests and benchmarks.
Why use it?
It helps keep user code independent from internal implementation details and keeps new features discoverable and consistent.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is wkzMagician/newton-mcp's own configuration. It tells Codex and OpenCode how to work on newton-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything newton-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to wkzMagician/newton-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/wkzMagician/newton-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/wkzMagician/newton-mcp

Made for: Codex, OpenCode.

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 newton-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/wkzmagician/newton-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/wkzmagician/newton-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/wkzmagician/newton-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/wkzmagician/newton-mcp/agents-md/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 newton-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/wkzmagician/newton-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/wkzmagician/newton-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,552 This file is loaded in full into every session.
When invoked 2,552 The same file — it is already loaded in full.
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.02552 $0.02552
Opus 5 $0.01276 $0.01276
Sonnet 5 $0.00510 $0.00510
Haiku 4.5 $0.00255 $0.00255

Measured 11d ago against content hash be188c3346f9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

newton-mcp AGENTS.md 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 11d 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.

AGENTS.md · 184 lines

How it starts

The opening of the file, as written. The whole thing — 184 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Newton Guidelines

Public API and _src boundary

  • newton/_src/ is internal library implementation only.
    • User code, that means Newton examples (under newton/examples/) and documentation, must not import from newton._src.
    • Internal refactors can freely reorganize code under _src as long as the public API stays stable.
  • Any user-facing class/function/object added under _src must be exposed via the public Newton API.
    • Add re-exports in the appropriate public module (e.g. newton/geometry.py, newton/solvers.py, newton/sensors.py, etc.).
    • Prefer a single, discoverable public import path. Example: from newton.geometry import BroadPhaseAllPairs (not from newton._src.geometry.broad_phase_all_pairs import BroadPhaseAllPairs).

API design rules (naming + structure)

  • Prefix-first naming for discoverability (autocomplete).
    • Classes: ActuatorPD, ActuatorPID (not PDActuator, PIDActuator).
    • Methods: add_shape_sphere() (not add_sphere_shape()).
  • Method names are snake_case.
  • CLI arguments are kebab-case.
    • Example: --use-cuda-graph (not --use_cuda_graph).
  • Prefer nested classes when self-contained.
    • If a helper type or an enum is only meaningful inside one parent class and doesn't need a public identity, define it as a nested class instead of creating a new top-level class/module.
  • Follow PEP 8 for Python code.
  • Use modern Python type-hint syntax.
    • Prefer PEP 604 unions: x | y, x | None. Do not use typing.Union or typing.Optional.
  • Use specific type hints for public interfaces.
    • For Warp arrays, annotate concrete dtypes (e.g., wp.array(dtype=wp.vec3)) rather than generic object.
    • Prefer consistent parameter names across base/override APIs (e.g., xforms, scales, colors, materials).
  • Use Google-style docstrings.
    • Write clear, concise docstrings that explain what the function does, its parameters, and its return value.
    • Keep argument/return types in function annotations, not inline in docstrings.
    • In Args: entries, use name: description (not name (Type): description).
    • Use Sphinx cross-reference roles for symbol references (e.g. :class:, :meth:, :attr:, :paramref:), but keep targets as short as possible.
    • Within the same class/module, prefer short local references (e.g. :meth:\log_mesh`, :attr:`model``) over fully qualified paths.
    • If qualification is needed, prefer public API paths (e.g. newton.Mesh) and do not use newton._src in Sphinx role targets.
  • State SI units for all physical quantities in docstrings.
    • Use inline [unit] notation, e.g. """Particle positions [m], shape [particle_count, 3], float.""".
    • For joint-type-dependent quantities use [m or rad, depending on joint type].
    • For spatial vectors annotate both components, e.g. [N, N·m].
    • For compound arrays list per-component units, e.g. [0] k_mu [Pa], [1] k_lambda [Pa], ....
    • When a parameter's interpretation varies across solvers, document each solver's convention instead of a single unit.
    • Skip non-physical fields (indices, keys, counts, flags).
    • This rule applies to public API docstrings only, not test docstrings.
  • Keep the documentation up-to-date.
    • When adding new files or symbols that are part of the public-facing API, make sure to keep the auto-generated documentation updated by running docs/generate_api.py.
  • Add examples to README.md
    • When contributing a new Newton example you must follow the format of the existing examples, where we have an Example class. Then register the example in the appropriate table in README.md with the corresponding uv run command and a screenshot.
    • Ensure your example implements a meaningful test_final() method that is executed after the example has been run to verify the state of the simulation is valid.
    • Optionally you may implement a test_post_step() method that is evaluated after every step() of the example.

Read the full file on GitHub · 184 lines

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. 11d ago First seen · 184 lines · 2,552 tokens per session scan A be188c3346f9

Subscribe to this mod's changes

newton-mcp AGENTS.md is an instructions file published in the GitHub repository wkzMagician/newton-mcp (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 2,552 tokens to every session, about $0.0128 per session on Opus 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-31.

Related

Other instructions, from other repositories

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,126 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens