Skip to content

Commit 63fce95

Browse files
yutingyefacebook-github-bot
authored andcommitted
Add Claude Code AI setup (#1090)
Summary: Add CLAUDE.md for Claude Code support. Differential Revision: D95275618
1 parent 2e8a9b8 commit 63fce95

4 files changed

Lines changed: 94 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
description: Build the momentum project
3+
---
4+
Build the momentum project. Auto-detects platform.
5+
6+
Do the following:
7+
1. Read the build modes from `.llms/rules/overview.md` to get the correct mode for the current platform.
8+
2. If $ARGUMENTS is provided, treat it as a specific target name and run:
9+
`buck build @BUILD_MODE //arvr/libraries/momentum:$ARGUMENTS`
10+
3. If no arguments, build everything:
11+
`buck build @BUILD_MODE //arvr/libraries/momentum/...`
12+
4. Report the result (success or failure with errors).
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
description: Run momentum tests
3+
---
4+
Run momentum tests. Auto-detects platform.
5+
6+
Do the following:
7+
1. Read the build modes from `.llms/rules/overview.md` to get the correct mode for the current platform.
8+
2. If $ARGUMENTS is provided, treat it as a specific test target and run:
9+
`buck test @BUILD_MODE //arvr/libraries/momentum:$ARGUMENTS`
10+
3. If no arguments, run all tests:
11+
`buck test @BUILD_MODE //arvr/libraries/momentum/...`
12+
4. Report the result (pass/fail counts, any failures with details).
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
description: Full pre-diff verification for momentum
3+
---
4+
Full pre-diff verification for momentum. Runs build, tests, and checks.
5+
6+
Do the following steps in order. Stop and report at the first failure.
7+
8+
1. **Read build modes**: Read `.llms/rules/overview.md` to get the correct build mode for the current platform.
9+
10+
2. **Build**: Build all of momentum using the platform-appropriate mode:
11+
`buck build @BUILD_MODE //arvr/libraries/momentum/...`
12+
13+
3. **Test**: Run all momentum tests:
14+
`buck test @BUILD_MODE //arvr/libraries/momentum/...`
15+
16+
4. **Downstream dependency check**: Follow the downstream dependency testing procedure in `.llms/rules/code_style.md`. Build and test the most obvious direct dependents.
17+
18+
5. **Build file check**: Follow the code organization rules in `.llms/rules/code_style.md` to verify that any new files or classes have been registered in the appropriate build files.
19+
20+
6. **BUCK/CMake sync check**: Follow the BUCK/CMake sync rule in `.llms/rules/code_style.md` to verify that dependency changes are reflected in both build systems.
21+
22+
7. **OSS checks**: Follow the rules in `.llms/rules/oss_maintenance.md`:
23+
- Check for banned words in changed files and the diff summary.
24+
- Check that the public portion of the diff summary contains no internal URLs, SEV references, customer names, or internal team names. Remind the user to use the `Internal:` section for internal-only context.
25+
- If changes affect public API surface, module structure, or documentation, check whether `__github__/README.md` or `__github__/CLAUDE.md` needs updating.
26+
27+
8. **Doc sync check**: Follow the rules in `.llms/rules/ai_config_maintenance.md`:
28+
- If directories were added/removed/renamed, check that `.llms/rules/overview.md` structure tree is up to date.
29+
- If core modules were added/removed, check that `README.md` module list is up to date.
30+
31+
9. **Benchmarks**: Follow `.llms/rules/benchmarking.md` to determine if benchmarks should be run based on which modules were changed. Run the relevant benchmarks and report results.
32+
33+
10. **Lint**: Run `arc lint -a` on all changed files (by path, not by revision — so they get fully linted). Then run `arc lint -e extra` for comprehensive slower linters (CLANGTIDY, etc.). This runs last because earlier steps may modify code.
34+
35+
11. **Report**: Summarize all results (build, test, downstream deps, file checks, OSS checks, doc sync, benchmarks, lint).

0 commit comments

Comments
 (0)