|
| 1 | +--- |
| 2 | +description: Review a momentum or pymomentum diff against project rules |
| 3 | +--- |
| 4 | +Review a momentum or pymomentum diff against project rules. |
| 5 | + |
| 6 | +If $ARGUMENTS is provided, treat it as a diff number (e.g., D{number}). Otherwise, review the current working directory changes. |
| 7 | + |
| 8 | +Do the following: |
| 9 | + |
| 10 | +1. **Load the diff**: Read the diff details including summary, test plan, and raw diff content. |
| 11 | + |
| 12 | +2. **Read project rules**: Read the relevant `.llms/rules/` files for the project(s) touched by the diff: |
| 13 | + - `arvr/libraries/momentum/.llms/rules/overview.md` — commit format, reviewer |
| 14 | + - `arvr/libraries/momentum/.llms/rules/code_style.md` — code organization, downstream deps |
| 15 | + - `arvr/libraries/momentum/.llms/rules/cpp_style.md` — C++ style |
| 16 | + - `arvr/libraries/momentum/.llms/rules/oss_maintenance.md` — OSS export, diff summary, banned words |
| 17 | + - `arvr/libraries/pymomentum/.llms/rules/code_style.md` — pybind11 conventions (if pymomentum files touched) |
| 18 | + |
| 19 | +3. **Diff summary review**: |
| 20 | + - Check that the public portion of the summary contains no internal references (team names, internal URLs, task/SEV/diff IDs, internal tools, internal file paths, project codenames). Follow the guidance in `oss_maintenance.md`. |
| 21 | + - Check that internal context is behind `Internal:` on its own line. |
| 22 | + - Check that the title follows the commit format in `overview.md`. |
| 23 | + - Check that `Reviewers: momentum` is set. |
| 24 | + |
| 25 | +4. **Code review**: |
| 26 | + - Check changed code against `cpp_style.md` (naming, docs, headers, error handling). |
| 27 | + - Check that new `.cpp`/`.h` files are added to `build_variables.bzl`. |
| 28 | + - Check that new classes are added to `gen_fwd_input.toml` (momentum only). |
| 29 | + - Check BUCK/CMake sync if BUCK was modified. |
| 30 | + - Check for banned words in the shipit config (read from `oss_maintenance.md`). |
| 31 | + - If pybind11 bindings changed, check for Sphinx docstrings and stub regeneration. |
| 32 | + |
| 33 | +5. **Benchmark recommendation**: Follow `.llms/rules/benchmarking.md` to determine if the changed modules have corresponding benchmarks. If so, note which benchmarks should be run in the report. |
| 34 | + |
| 35 | +6. **Report**: Provide a structured review with findings organized by severity (must-fix, should-fix, nit). Include specific file:line references and benchmark recommendations if applicable. |
0 commit comments