You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Use when reviewing a Newton pull request, branch, commit range, work-in-progress change, or design proposal for project fit, requirements fidelity, and coding and repository standards.
4
+
---
5
+
6
+
# Review Newton Changes
7
+
8
+
Read `REVIEW_GUIDELINES.rst` and `CODING_GUIDELINES.rst` in full. Treat the
9
+
former as the explicit definitions of the Fit, Requirements, and Standards
10
+
axes, and enforce the latter during Standards review.
11
+
12
+
1. Resolve the exact merge base and head. Read the complete
13
+
`merge-base..head` diff and commit list.
14
+
2. Read the pull-request description, linked issue or specification, relevant
15
+
primary sources, and `CODING_GUIDELINES.rst`. If no separate specification
16
+
exists, use the pull-request description as the stated intent. Do not read
17
+
existing review comments yet.
18
+
3. Perform an adversarial correctness-first Requirements pass. Trace changed
19
+
inputs, state, counts, offsets, ownership, and outputs through every relevant
20
+
supported execution mode. Check applicable zero/one/many and capacity
21
+
boundaries, heterogeneous inputs, toggle/reset/reuse and partial failures,
22
+
CPU/CUDA and backend differences, autodiff, determinism, graph capture, and
23
+
numerical invariants. For performance changes, examine setup and steady-state
24
+
complexity, allocations, synchronization, transfers, and whether benchmarks
25
+
exercise the changed path. Run a minimal adversarial probe when feasible.
26
+
4. Freeze candidate findings before reading existing reviews. Record the
27
+
location, triggering input or condition, mechanism, observable impact,
28
+
evidence, and confidence for each candidate.
29
+
5. Read the top-level discussion and review threads. Refine or deduplicate the
30
+
independently discovered concerns; acknowledge existing concerns when they
31
+
affect the verdict.
32
+
6. Review Fit and Standards independently using their definitions in
33
+
`REVIEW_GUIDELINES.rst`. When independent agent contexts are available, use
34
+
separate passes so one conclusion does not bias another.
35
+
7. Report Fit and architectural concerns first, but retain every supported
36
+
material behavioral, correctness, compatibility, and performance finding
37
+
even when Fit fails. Do not let missing tests, documentation, or measurements
38
+
replace the search for an underlying behavioral defect.
39
+
8. For each remaining concern, state its priority, location, problem, impact,
40
+
and evidence. Distinguish demonstrated defects from questions, evidence
41
+
requests, requirements, and judgment calls. Do not prescribe a correction
42
+
unless the user asks for one.
43
+
44
+
Aggregate the three axes without suppressing a finding merely because another
45
+
axis passes. Give the explicit Fit verdict defined by the review guide.
Copy file name to clipboardExpand all lines: .claude/skills/release-audit/SKILL.md
+33-6Lines changed: 33 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,15 @@ allowed-tools: Bash(git log *) Bash(git show *) Bash(git grep *) Bash(git tag *)
10
10
11
11
Generates a markdown audit of a Newton release for keep/defer decisions (or, in retrospective mode, for skill calibration). Three modes, auto-detected in Phase 1:
12
12
13
+
Read `CODING_GUIDELINES.rst` and `REVIEW_GUIDELINES.rst` from the
14
+
repository root before auditing. They define the canonical coding, API, and
15
+
review policies. This skill performs the final cross-release reconciliation;
16
+
it does not replace pull-request review, and a prior review pass does not make
17
+
any audit phase optional. In retrospective mode, using the current guides is
18
+
intentional: calibrate the current audit policy against evidence pinned to the
19
+
target tag. Do not claim historical noncompliance unless the requirement also
20
+
existed at that tag.
21
+
13
22
-**Pre-release**: spot-check while work is still landing on main. No release branch cut. Version string is `X.Y.Z.devN`.
14
23
-**Release-candidate**: readiness review after the release branch is cut. Version string is `X.Y.ZrcN` or head is `release-X.Y`.
15
24
-**Retrospective**: audit an already-shipped release (e.g., `v1.1.0`) against its predecessor, with a Calibration Notes section (Phase 7) that checks Claude's flags against what subsequent patch/minor releases actually did. Triggered by passing a bare released-version argument that matches an existing git tag.
@@ -244,7 +253,25 @@ Classification:
244
253
245
254
**If an entry mentions multiple symbols where some are new and some pre-existed** (e.g., "Add `newton.geometry.compute_offset_mesh()` and a viewer toggle"), split: the genuinely new symbols each get a New API entry; the extensions to existing symbols each get a Changes entry.
246
255
247
-
**Public-API exposure check.** For every symbol that passes the "genuinely new" test, also verify at HEAD that it is reachable via one of the public re-export modules listed above. If the symbol only exists under `newton._src.*` and is not re-exported through a public module, flag it in the report (Section "CHANGELOG Review Notes" → 🕵️ Private-only) — AGENTS.md requires user-facing symbols to be re-exported and forbids examples/docs from importing `newton._src`. Do not treat this as a hard block on the entry; surface it so the release manager can confirm the symbol was intended to be public.
256
+
**Public-API declaration and exposure check.** At HEAD, inspect every public
257
+
module discovered by `api_modules()` and `solver_submodule_pages()`. Each module
258
+
must define `__all__` as a list or tuple containing only strings; a missing or
259
+
invalid declaration is a policy finding in "CHANGELOG Review Notes". For every
260
+
symbol that passes the "genuinely new" test, collect its memberships across
261
+
those declarations:
262
+
263
+
- No memberships: report 🕵️ Private-only. The symbol exists only under
264
+
`newton._src.*` and was not re-exported through a public module.
265
+
- One membership: the symbol has a canonical public import path.
266
+
- More than one membership: report a duplicate-public-export policy finding
267
+
and list every public module that exports it.
268
+
269
+
`CODING_GUIDELINES.rst` requires each public symbol to appear in exactly one
270
+
public module's `__all__` and forbids examples/docs from importing
271
+
`newton._src`. Do not treat the private-only finding as a hard block on the
272
+
entry; surface it so the release manager can confirm the symbol was intended
273
+
to be public. Treat missing or invalid declarations and duplicate exports as
274
+
policy findings that require an explicit release decision.
248
275
249
276
### 4b — Resolve New API signatures + docstrings
250
277
@@ -273,7 +300,7 @@ For each CHANGELOG entry in Changed / Removed / Deprecated (plus any "capability
273
300
- For semantic-only changes (no signature shift) where the prose describes a rename / reorder / behavioral flip: skip the diff block; include the backing commit's URL and the full CHANGELOG text.
274
301
- For Removed entries: show the old signature on a `-` line; omit `+`.
275
302
276
-
**Deprecation-window lookup forRemoved entries.** Newton's policy (per AGENTS.md) is: *breaking changes require a deprecation first*. Every Removed entry needs evidence of a deprecationin a prior release. Start with the released CHANGELOG, then fall back to code-level runtime-warning evidence at the base ref. For every Removed entry (and every Changed entry whose prose describes a removal), search CHANGELOG.md for the matching prior Deprecated entry:
303
+
**Deprecation-window lookup for Removed entries.** Newton's policy (per `CODING_GUIDELINES.rst`) is: *breaking changes require a deprecation first*. Every Removed entry needs evidence of a deprecation in a prior release. Start with the released CHANGELOG, then fall back to code-level runtime-warning evidence at the base ref. For every Removed entry (and every Changed entry whose prose describes a removal), search CHANGELOG.md for the matching prior Deprecated entry:
277
304
278
305
1. Extract distinctive tokens from the Removed entry: the named symbol(s) in backticks and, if the entry carries a GH ref, that ref number.
279
306
2. Scan the appropriate released-version sections of CHANGELOG.md for a `### Deprecated` bullet that names the same symbol(s) OR the same GH ref. The search scope depends on mode:
@@ -367,8 +394,8 @@ Read `references/language-review-examples.md`. For EACH CHANGELOG entry, apply L
367
394
- **🗣️ Internal language**: internal module paths (`newton._src.*`), private identifiers with a leading underscore, Warp-internal types (`wp.types.*` that are not documented user types), implementation-detail verbs ("refactor", "reorganize", "rewrite") without a user-visible outcome.
368
395
- **📝 Too terse**: under ~10 words with no context, or missing migration guidance in a Deprecated / Changed entry that names a rename or removal.
369
396
- **🕵️ Private-only symbol**: the CHANGELOG `### Added` entry names a symbol that exists only in `newton._src.*` at HEAD and is not re-exported through a public module. See Phase 4a.
370
-
- **📐 Missing migration guidance** (Newton-specific): entries in `### Deprecated`, `### Removed`, or `### Changed` (where the prose indicates rename / reorder / removal) MUST include migration guidance per AGENTS.md ("Use `Y` instead", "in favor of `Y`", "switch to `Y`"). Flag entries that rename or remove symbols without pointing to the replacement.
371
-
- **🏷️ Naming-convention drift** (Newton-specific): new public symbols in `### Added` whose names violate Newton's prefix-first convention (e.g., `PDActuator` should be `ActuatorPD`;`add_sphere_shape()` should be `add_shape_sphere()`). See AGENTS.md.
397
+
- **⬆️ Missing migration guidance** (Newton-specific): entries in `### Deprecated`, `### Removed`, or `### Changed` (where the prose indicates rename / reorder / removal) MUST include migration guidance per `changelog/README.md` ("Use `Y` instead", "in favor of `Y`", "switch to `Y`"). Flag entries that rename or remove symbols without pointing to the replacement.
398
+
- **🏷️ Naming-convention drift** (Newton-specific): new public symbols in `### Added` whose names violate Newton's prefix-first convention (e.g., `PDActuator` should be `ActuatorPD`;`add_sphere_shape()` should be `add_shape_sphere()`). See `CODING_GUIDELINES.rst`.
372
399
373
400
Record flagged entries. Keep the FULL entry text in the audit table — do not truncate.
374
401
@@ -434,7 +461,7 @@ The calibration section groups results by flag class and, within each, by outcom
434
461
- Invalidated if: the symbol stays reachable only via `_src`in every post-target release AND no issues reference it — it was probably intentional internal-only despite its position in the Added section. Note this as "intended internal; CHANGELOG language could have been clearer".
435
462
- Unresolved if: the symbol was removed / renamed before re-export resolution.
436
463
437
-
**📐 Missing-migration-guidance:**
464
+
**⬆️ Missing-migration-guidance:**
438
465
- Validated if: a later release's CHANGELOG bullet (in `### Changed` or `### Fixed`) retroactively points to the replacement, OR a subsequent issue references users stuck on the migration. The second signal is only available if `gh issue list` returns matches for the symbol name; probe with `gh issue list --search "<symbol>" --state all --json number,title`.
439
466
- Invalidated if: the migration was handled by a runtime `DeprecationWarning` with a clear message (grep the code at `v<target>` for the warning text).
440
467
- Unresolved: default.
@@ -596,7 +623,7 @@ Never pass `--public`. Never file a destination the user did not choose.
- Symbol extraction from entry text: backtick-quoted `newton.X`, `newton.X.Y`, `ClassName.method`, bare `ClassName` (capitalized identifier), bare `snake_case_name()`. The FIRST backtick-quoted symbol in the bullet is usually the primary subject.
Copy file name to clipboardExpand all lines: .claude/skills/release-audit/references/classification-rules.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ Used to decide whether a symbol is "genuinely new" vs. "pre-existed and got exte
9
9
Newton exposes its public surface through per-topic re-export modules discovered dynamically by `docs/generate_api.py`:
10
10
11
11
-`api_modules()` imports `newton`, starts with the top-level module, and adds every module-valued name exported through `newton.__all__`.
12
-
- Each discovered module's own `__all__` defines its public symbols; when `__all__` is absent, `public_symbols()`falls back to non-private, non-module attributes.
12
+
- Each discovered module's own `__all__`list or tuple defines its public symbols. `public_symbols()`rejects missing declarations, invalid containers, and non-string entries.
13
13
-`solver_submodule_pages()` adds public solver submodules and recursively exposed module trees under `newton.solvers`.
14
14
- There is no fixed `MODULES` constant. Inspect `docs/generate_api.py`, `newton/__init__.py`, and `newton/solvers.py` at both refs so additions such as a new top-level public module or nested experimental solver namespace are included.
15
15
16
-
Representative modules include `newton.geometry`, `newton.solvers`, and `newton.viewer`. Each public module re-exports from `newton/_src/<topic>/...`. `newton._src` is internal (AGENTS.md: "Examples and docs must not import from `newton._src`").
16
+
Representative modules include `newton.geometry`, `newton.solvers`, and `newton.viewer`. Each public module re-exports from `newton/_src/<topic>/...`. `newton._src` is internal (`CODING_GUIDELINES.rst`: examples and docs must not import from `newton._src`).
17
17
18
18
**To determine if `newton.X` existed at base**:
19
19
- Inspect module-valued exports in `newton.__all__` at base and target using the `api_modules()` rules above.
@@ -22,7 +22,7 @@ Representative modules include `newton.geometry`, `newton.solvers`, and `newton.
22
22
- For nested solver modules: apply `solver_submodule_pages()` reachability rules to `newton.solvers` at the relevant ref.
23
23
- For method additions on an existing class (e.g., `SolverXPBD.update_contacts`): resolve the class's real source file (e.g., `newton/_src/solvers/xpbd.py`) and `ast`-walk it at base.
24
24
25
-
**Public-API exposure check (Phase 4a addition)**: for every symbol that is genuinely new, verify at HEAD that it is reachable via at least one public module. If the symbol lives only in `newton._src.<path>` and is not re-exported, raise a 🕵️ Private-only flag. Reason: AGENTS.md forbids examples/docs from importing `newton._src`, so a user-facing symbol that is not re-exported is unusable by Newton's own examples and will churn.
25
+
**Public-API declaration and exposure check (Phase 4a addition)**: inspect every discovered public module at HEAD. Its `__all__` must be a list or tuple containing only strings. For every genuinely new symbol, collect all public-module `__all__` declarations that contain it. Zero memberships raise a 🕵️ Private-only flag; one establishes the canonical public import path; more than one raises a duplicate-public-export policy finding listing all paths. Reason: `CODING_GUIDELINES.rst` requires each public symbol to appear in exactly one public module's `__all__` and forbids examples/docs from importing `newton._src`.
26
26
27
27
## No kernel-scope builtin registry
28
28
@@ -75,11 +75,11 @@ Newton's CHANGELOG does NOT use the `**Breaking:**` literal marker. Instead, mig
75
75
- "Reorder `X()` parameters so `a` precedes `b`."
76
76
- "Migrate all Y logic to Z, all Y functions now return ..."
77
77
78
-
When Phase 4d / 5a encounter these patterns, treat them as migration-required changes (Kind `rename` or `parameter reorder` in the Changes-to-Existing-API table). Check that the entry includes migration guidance (`Use ...`, `in favor of ...`, `prefer ...`). If guidance is missing, raise a 📐 flag in the language review.
78
+
When Phase 4d / 5a encounter these patterns, treat them as migration-required changes (Kind `rename` or `parameter reorder` in the Changes-to-Existing-API table). Check that the entry includes migration guidance (`Use ...`, `in favor of ...`, `prefer ...`). If guidance is missing, raise a ⬆️ flag in the language review.
79
79
80
80
## Deprecation policy (Phase 4d)
81
81
82
-
AGENTS.md: "Breaking changes require a deprecation first." A prior released `### Deprecated` entry is the preferred evidence. A matching runtime `DeprecationWarning` at the base ref also proves that users received a deprecation window, even if the released CHANGELOG omitted it. The warning may be emitted directly or by a shared helper / decorator that clearly applies to the removed API or behavior.
82
+
`CODING_GUIDELINES.rst`: breaking changes require a deprecation first. A prior released `### Deprecated` entry is the preferred evidence. A matching runtime `DeprecationWarning` at the base ref also proves that users received a deprecation window, even if the released CHANGELOG omitted it. The warning may be emitted directly or by a shared helper / decorator that clearly applies to the removed API or behavior.
83
83
84
84
When Phase 4d cannot find the prior Deprecated entry:
85
85
- Resolve the symbol or legacy behavior in code at the base ref.
0 commit comments