This file provides guidance to AI coding agents (Claude Code, OpenAI Codex, etc.) when working with code in this repository.
Run all scripts and commands from this repo in one of these environments:
- The Docker container started with
./docker/run_docker.sh(or./docker/run_docker.sh -cfor cuRobo). Users must start the container manually; if no container started by the appropriate command exists, prompt the user to start it. - The repo's uv environment on the host, created by the user with
uv sync --locked(with--group curobofor SkillGen). Run commands from the repo root asuv run --no-sync .... If.venvdoes not exist, prompt the user to runuv sync --locked.
Pre-commit hooks enforce the style guide: black (line length 120), flake8, isort, pyupgrade (py312+), and codespell. Run checks manually before committing — not after:
# Run all checks (if hooks modify files, stage them and re-run before committing)
pre-commit run --all-files- Prefer
assertoverif-then-raise ValueErrorfor internal invariant checks. Useassert condition, "message"instead ofif not condition: raise ValueError("message"). - Follow PEP 8. Method names and CLI arguments are
snake_case. - Use modern type hints: PEP 604 unions (
x | y,x | None); do not usetyping.Unionortyping.Optional. Annotate concrete types on public interfaces (e.g.torch.Tensor,wp.array(dtype=wp.vec3)). - Keep parameter names consistent across base/override APIs.
- Name for autocomplete discoverability:
- Classes group by domain concept —
ActuatorNetLSTM, notLSTMActuatorNet. - Methods put noun before modifier —
set_joint_position_target(), notset_target_joint_position().
- Classes group by domain concept —
- Prefer nested classes for helpers or enums only meaningful inside one parent class.
- Use Google-style docstrings on public APIs:
Args:entries usename: description(types live in annotations, not docstrings).- State SI units inline as
[unit]for physical quantities (e.g.positions [m],[N, N·m]). Skip non-physical fields (indices, counts, flags). - Use Sphinx roles (
:class:,:meth:,:attr:) with short local references; avoid_srcor private module paths.
- File headers: new files use the current-year SPDX copyright header; do not change the year on existing files.
- Do not change or modify anything in the submodules. All git-related operations in submodules are read-only: do not commit or push code or create branches in a submodule.
- Don't mutate the
autodataconda env. Nopip install/uninstall,conda install/remove, or version upgrades. If a dependency is missing, surface the exact command and let the user run it. - Don't change
uv.lockor the uv environment. Nouv sync,uv add,uv remove,uv lock --upgrade, oruv pip install;uv run --no-syncchanges neither. If a dependency is missing, surface the exact command and let the user run it. - Don't re-run, modify, or work around
conda_installer.sh. No env recreate/rename/delete, no channel or conda config changes. Installer issues get reported, not patched in-flight. - Don't change any existing design docs or diagrams in /docs, that is only for human created files. If you need to add any new diagrams or designs, add them to the /agentic_design directory.