Skip to content

Latest commit

 

History

History
191 lines (144 loc) · 10.5 KB

AGENTS.md

File metadata and controls

191 lines (144 loc) · 10.5 KB

source/ — Repository Module Map

This file is the AGENTS routing table for the repository's source tree. For the GitHub-facing user-oriented version (with badges + a "where do I start" diagram), see README.md.

Maintenance contract — when you add a peer distribution, rename a module, or move a package between the first-class / legacy tiers, update this file in the same diff.


🧞 First-class Genie Sim packages

First-class distributions live under source/<pkg>/. The umbrella declares four required Tier-1 peers: geniesim_cli, geniesim_assets, geniesim_benchmark, and geniesim_ros. Install the CLI first; geniesim bootstrap installs or repairs the other required peers in dependency order, then the umbrella. Asset sources are downloaded separately.

geniesim_teleop, geniesim_scene_agent, and geniesim_world are Tier-2 opt-in packages. geniesim_dream is separately installed outside the umbrella's extras. World and Dream require their own environments. The independently maintained modules below are outside both tiers. See installation tiers.

Directory Distribution README AGENTS Skills
geniesim/ umbrella (geniesim) README — —
geniesim_cli/ geniesim_cli — owns the geniesim console script README AGENTS —
geniesim_benchmark/ geniesim_benchmark — benchmark tasks + scoring (Isaac, Newton, native MuJoCo) README — skills/
geniesim_scene_agent/ geniesim_scene_agent — Asset search, scene authoring, and task skills (optional) README AGENTS skills/
geniesim_ros/ geniesim_ros — Genie Sim RT Engine (ROS 2 workspace) README AGENTS skills/
geniesim_teleop/ geniesim_teleop — VR / Pico teleop bridge README AGENTS skills/
geniesim_world/ geniesim_world — multimodal spatial world model (pano → 3D) README AGENTS skills/
geniesim_dream/ geniesim_dream — G1/G2 world-model inference, policy and VLM evaluation (own environments) README AGENTS run-dream

geniesim_world is installed separately because its CUDA and ML dependencies use a dedicated environment. See its README for installation instructions.

geniesim_dream is also installed separately, with isolated world-model, policy and evaluation environments. It is outside the umbrella and default bootstrap.

Benchmark configurations and ROS scene configurations have separate schemas. Benchmark task YAMLs select direct Isaac, managed Newton through the ROS genie_sim_client, or native MuJoCo. See the benchmark runtime guides for environment and asset requirements.


The ROS workspace's genie_sim_robot_model package is maintained in a separate repository and pinned as a Git submodule at its existing package path. See the ROS build guide for initialization. Its version belongs to that repository, rather than parent release synchronization.

🔗 Module dependency DAG — methodology

The rendered diagram lives in source/README.md. This section explains how it's generated so contributors can extend the audit; the diagram itself is read on the README page (GitHub renders Mermaid inline).

Generator

geniesim tool deps-dag             # verify the block in source/README.md is current
geniesim tool deps-dag --fix       # regenerate the block in place

Source of truth, in evaluation order:

  1. source/geniesim_*/pyproject.toml — every peer with a [project] table is enumerated by globbing source/geniesim*/pyproject.toml. Sibling modules that don't match the geniesim_* glob (agent2act, rlinf_geniesim, data_collection, scene_reconstruction, external) are deliberately out of scope.
  2. [build-system].requires → emitted as build edges (-->|build|). External-only requirements (setuptools, wheel) produce no edges; the edge fires when a peer needs another peer at build time.
  3. [project].dependencies → emitted as runtime/exec edges (==>|exec|), with one special case: when the source peer carries role: umbrella in _ANNOTATIONS, its [project].dependencies are reclassified as build edges (-->|build|). The umbrella ships no code beyond __version__, so those deps are packaging declarations ("install these alongside me"), not runtime imports.
  4. [project.optional-dependencies] → emitted as extra edges (-.->|[X] extra|). Edges with the same (src, dst) collapse — geniesim[scene_agent,full] becomes one labelled edge.
  5. _ANNOTATIONS in source/geniesim_cli/src/geniesim_cli/commands/tool.py — the only hand-edited input. Carries status (legacy / leaf / placeholder), role (umbrella / cli), note (short label), refactor_target (planned merge target), and requires_agents (exempt from the docs audit).
  6. refactor_target in _ANNOTATIONS → emitted as a refactor edge (-.->|refactor: layer atop|).

Edge taxonomy

Edge style Mermaid syntax Source
Build `--> build
Exec (runtime) `==> exec
Optional extra `-.-> [X] extra
Refactor target `-.-> refactor: layer atop

Marker contract

The generator writes between <!-- AUTOGEN:deps-dag start --> and <!-- AUTOGEN:deps-dag end -->. Both must be present in the target file; missing markers raise a hard error. Do not hand-edit between them — CI runs geniesim tool deps-dag (without --fix) and fails on drift. Run --fix after any pyproject change or _ANNOTATIONS update and commit the result.

Adding a new edge category

Use _RUNTIME_EDGES in tool.py for runtime contracts without a pip dependency. The Newton benchmark client uses ROS packages built by colcon. For a new edge category, add an emission pass inside _emit_mermaid and define its arrow style.


🧩 Separately-maintained modules

These directories live under source/ but are not part of the geniesim_* peer set: they have their own build / run conventions, their own release cadence, and they are not pulled in by geniesim bootstrap. They have independent integration and dependency contracts. Don't extend without a plan, and don't cross-reference them as if they were peer distributions.

Directory Description
agent2act/ LLM-to-action runtime and CoRobot WebSocket service; own uv environment — see README.md and AGENTS.md
data_collection/ Independent Isaac Sim 6.2 / cuRobo v2 collection and replay — see AGENTS.md
rlinf_geniesim/ RL training pipeline (RLinf, human-in-the-loop, distributed) — see README.md and AGENTS.md
scene_reconstruction/ 3D reconstruction pipeline (Dockerfile, third-party deps)
external/ Vendored third-party code (ml-sharp, DA360, …)

🤖 Agent skills convention

Every first-class peer that needs operator-driven workflows ships a skills/ directory; each skills/<name>/SKILL.md is a self-contained recipe (frontmatter → When to Use → Critical Patterns → Workflow → Commands → Notes → Resources). They are invocable directly by agentic coding agents and readable by humans via cat.

When you add a SKILL.md, also link it from the package's README, AGENTS, and any .agent/<pkg>.md dispatcher.


📜 Doc-coverage rules

Per-package contracts:

  • Every first-class peer ships README.md (user-facing pitch + install).
  • Every peer with non-trivial dispatch logic ships AGENTS.md (agent / contributor routing).
  • Every peer with operator workflows ships skills/<name>/SKILL.md files.

The ROS workspace has a stricter audit:

  • Every package under geniesim_ros/src/ros_ws/src/ ships both README.md and AGENTS.md — enforced by geniesim tool docs --scope ros.

Canonical AGENTS.md skeleton

When you author a new source/<pkg>/AGENTS.md, follow this heading skeleton so agents reading any package find the same structure:

# <pkg> — Agent Development Guide
> Maintenance contract — when X changes, update this file in the same diff.

1. What this is (one paragraph, why this distribution exists)
2. Layout (filesystem tree)
3. CLI / API surface (table)
4. Architectural rules / invariants (numbered, do-not-violate)
5. Skills index (table — link to skills/README.md)
6. Common workflows (links to SKILL.md files, not inline duplicates)
7. Troubleshooting (table)
8. Verification recipes (table)
9. Do not (bullet list of foot-guns)

Use this skeleton for new guides and incremental documentation updates.

Canonical SKILL.md frontmatter

---
name: <skill-name>
description: >
  One paragraph and English trigger phrases.
license: MPL-2.0
metadata:
  author: genie-sim
  version: "1.0"
prerequisites:               # other skills that must run first
  - <pkg>:<skill>
inputs:                      # machine-readable input declaration
  - name: <key>
    desc: …
    required: true|false
    default: …               # optional
outputs:
  - desc: What the skill leaves behind on success
---

Body sections (in order): When to Use · Critical Patterns · Workflow · Commands · Notes · Resources.


🔗 Pointers