# AGENTS.md This repository is a reusable robotics and simulation asset library hosted as a Hugging Face Dataset. ## Scope The asset library stores normalized, reusable assets from multiple sources: - RoboCasa - Discoverse - TinyForge - Hunter - third-party asset sites RoboCasa is one source inside this library, not the root format for the whole library. ## Directory layout Use this canonical layout: ```text assets//raw//// ``` Example: ```text assets/robocasa/raw/fixtures/dishwashers/Dishwasher031/ ``` Each asset directory must contain the source asset files and a `metadata.yaml`. For large upstream asset trees with many internal relative references, still use the canonical four-level layout under `raw/` and index the tree as one collection-level asset. Current example: ```text assets/discoverse/raw/collections/models/discoverse_models/ ``` This avoids breaking MJCF includes and mesh paths. Derived outputs must live under: ```text assets//derived//// ``` Use `derived/` for convex decomposition, collision meshes, cleaned meshes, conversions, and other generated outputs. Do not overwrite raw assets. For convex decomposition, use: ```text assets//derived/convex_decompositions//_/ ``` Preferred generator: ```bash python scripts/run_convex_decomposition.py assets//raw/// --mesh --variant coacd_v1 ``` Generated MuJoCo include files have different insertion contexts: ```text mjcf/convex_assets_include.xml # include at MJCF root/top level mjcf/convex_geoms_include.xml # include inside the target body mjcf/convex_collision_include.xml # standalone wrapper for preview/convenience ``` Do not edit the raw source `model.xml` when adding convex collision geometry. Integrate the derived includes in downstream task scenes or in separate derived MJCF files. For thin rod, rack, grid, shelf, and slot-like structures where convex hulls may bridge functional gaps, prefer primitive collision proxies: ```text assets//derived/primitive_collision_proxies//_/ ``` Preferred generator: ```bash python scripts/run_primitive_collision_proxy.py assets//raw/// --mesh --variant primitive_boxes_v1 ``` Primitive proxy source of truth: ```text proxy/primitive_collision_proxy.json ``` Generated downstream fragments: ```text mjcf/primitive_geoms_include.xml # include inside the target body mjcf/primitive_collision_include.xml # standalone wrapper for preview/convenience curobo/primitive_world.yml # cuRobo cuboid fragment from forbidden cuboids ``` Use primitive proxies only after inspecting that boxes do not bridge task-critical gaps. For temporary trials, do not use `--register-manifest`. Detailed rules are in: ```text docs/primitive_collision_proxy_spec.md ``` Whenever a source is reorganized during import, record the original upstream layout and the current layout in: ```text docs/structure_mapping.md docs/source_notes/.md ``` Do not change source paths without recording the correspondence. ## Naming rules - `source`: lowercase snake_case, for example `robocasa`, `discoverse`, `tinyforge`, `hunter`, `third_party`. - `asset_type`: lowercase snake_case plural when it represents a collection, for example `fixtures`, `objects`, `scenes`, `textures`, `robots`, `environments`, `convex_decompositions`, `primitive_collision_proxies`. - `category`: lowercase snake_case, usually preserving common upstream category wording, for example `dishwashers`, `cabinets`, `cups`. - `asset_id`: preserve upstream IDs when they are stable and meaningful, for example `Dishwasher031`. - Global `asset_id`: `...`. ## Required metadata Every asset directory must include `metadata.yaml` with at least: - `asset_id` - `source` - `source_asset_id` - `asset_type` - `category` - `format` - `entry_file` - `license` - `origin_url` - `path` - `tags` Recommended additional fields for production-oriented assets: - `readiness_level` - `source_commit` - `retrieval_date` - `conversion_tool` - `conversion_notes` - `raw_sha256` - `validation_status` Readiness levels are defined in: ```text docs/asset_readiness_classification.md ``` ## Third-party asset rule If any external third-party asset is used by a project, experiment, dataset, or generated scene, copy that exact used asset into this repository under: ```text assets/third_party/raw//// ``` Do not rely only on remote third-party URLs for reproducibility. Record the original URL, license, retrieval date, and any conversion steps in `metadata.yaml`. Before use, candidate external sources may be recorded as links only in: ```text docs/external_source_catalog.md docs/placement_asset_notes.md docs/source_notes/third_party.md ``` Do not add link-only candidates to `manifest/assets.jsonl`; the manifest is only for assets physically stored in this repository. When evaluating or importing external assets, keep these counts separate: ```text candidate_count license_pass_count downloaded_count load_pass_count physics_pass_count policy_pass_count L0_count ``` Do not equate source dataset size or downloaded file count with production-ready assets. ## Manifest rule Every asset must also be listed in: ```text manifest/assets.jsonl ``` The manifest is the global index. Keep one JSON object per line. ## Validation Before upload, run: ```bash python scripts/validate_asset.py assets//raw/// python scripts/validate_asset.py assets//derived/// python scripts/validate_asset.py --all ``` For MJCF assets, validation should verify: - `metadata.yaml` exists - the declared entry file exists - mesh and texture references in `model.xml` resolve relative to the asset directory - the asset has a matching row in `manifest/assets.jsonl` ## Hugging Face workflow This repository is intended to be uploaded to a Hugging Face Dataset repo. Recommended commands: ```bash export HF_ENDPOINT=https://hf-mirror.com hf auth login hf repo create / --type dataset --private hf upload / . . --repo-type dataset hf download / --repo-type dataset --local-dir ./asset-library --max-workers 4 ``` Prefer the wrapper scripts in this repository: ```bash scripts/upload_to_hf.sh / scripts/download_from_hf.sh / ./asset-library ```