Skip to content

feat(sim): add semantic skill IR and compiler - #492

Merged
yuecideng merged 29 commits into
mainfrom
feat/semantic-skill-compiler
Aug 21, 2026
Merged

feat(sim): add semantic skill IR and compiler#492
yuecideng merged 29 commits into
mainfrom
feat/semantic-skill-compiler

Conversation

@yuecideng

@yuecidengyuecideng commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Stack

Consolidation

Consolidates #489, #490, and #491 into this layer. Scope: semantic IR, call catalog, integration manifest, and compiler.
Add the canonical semantic compiler that resolves calls through the scene registry, robot profile, exact providers, and named policy presets into typed atomic-action invocations.

Compilation is lazy where goals depend on physical effects, validates all reachable resources/providers before execution, and keeps object-centric Pick, Place, HandOver, and articulation semantics out of task-owned motion code.

Refs #471
Refs #474

Type of change

  • New feature (non-breaking change which adds functionality)

Screenshots

Not applicable.

Validation

  • Focused coverage: tests/sim/skills/test_compiler.py plus related atomic-action goal tests
  • Final affected-suite regression on the stack tip: 1215 passed, 2 skipped, 8 deselected
  • Changed Python files pass Black 26.3.1; the Sphinx build and rollout-report drift check pass at the stack tip

Checklist

  • Changed Python files pass Black 26.3.1.
  • Corresponding public/design documentation is included in this stack.
  • Tests cover the affected behavior.
  • No dependency update is required.

@yuecidengyuecideng added atomic action atomic action related functionality enhancement New feature or request labels Aug 11, 2026
@yuecideng
yuecideng marked this pull request as ready for review August 11, 2026 16:46
CopilotAI lite review requested due to automatic review settings August 11, 2026 16:46
@greptile-apps

greptile-appsBot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR introduces a semantic skill intermediate representation, integration binding, compiler, and runtime facade over Atomic Actions.

  • Adds typed Pick, Place, HandOver, and registered semantic-call compilation.
  • Resolves scene entities, robot resources, policy presets, and grounding providers before execution.
  • Adds JIT per-call grounding, effect verification, sticky environment eligibility, and task lifecycle management.
  • Extends Atomic Action planning with bounded scene-dependency monitoring and initial eligible-cohort support.
  • Adds focused tests, tutorials, API references, and architecture documentation.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains within the eligible follow-up review scope.

No blocking failure remains.

Important Files Changed

FilenameOverview
embodichain/lab/sim/skills/compiler.pyAdds provider-free workflow analysis and JIT lowering of semantic calls into typed Atomic Action invocations.
embodichain/lab/sim/skills/runtime.pyAdds task ownership, per-call execution orchestration, effect verification, eligibility propagation, and terminal cleanup.
embodichain/lab/sim/skills/integration.pyAdds manifest-based binding and validation across scene, robot profile, call catalog, and grounding providers.
embodichain/lab/sim/skills/calls.pyDefines the semantic-call IR, descriptors, catalog, and built-in call contracts.
embodichain/lab/sim/atomic_actions/execution.pyAdds sticky initial eligible-cohort handling and bounded scene-dependency monitoring for staged plans.
embodichain/lab/sim/atomic_actions/primitives/pick_up.pyBounds PickUp target monitoring to its reversible approach segment so grasp-induced movement does not trigger invalidation.
embodichain/lab/sim/skills/scene.pyExtends canonical scene metadata and manifest contracts used by semantic integration.
tests/sim/skills/test_compiler.pyCovers semantic linking, resource inheritance, provider selection, late grounding, and registered-call boundaries.

Sequence Diagram

sequenceDiagram
participant App as Application
participant Runtime as SemanticSkillRuntime
participant Compiler as SemanticSkillCompiler
participant Scene as Scene Registry / Providers
participant Engine as AtomicActionEngine
participant Runner as ExecutionRunner
App->>Runtime: start SemanticTask
Runtime->>Compiler: analyze workflow
Compiler->>Scene: resolve entities, resources, providers
Runtime->>Compiler: ground next call from fresh observation
Compiler-->>Runtime: GroundedSemanticCall
Runtime->>Engine: start invocation with eligible mask
Engine-->>Runner: ExecutionSession
Runner->>Engine: tick with latest observations
Engine-->>Runner: commands / effect request
Runner-->>Runtime: terminal result and verified TaskState
alt more semantic calls
Runtime->>Compiler: ground next call
else task complete
Runtime-->>App: SemanticTaskResult
end
Loading

Reviews (9): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new semantic skill compilation layer in embodichain.lab.sim.skills that statically analyzes object-centric workflows (Pick/Place/HandOver/registered calls) and then JIT-lowers each call into typed atomic-action invocations using the bound scene registry + robot profile + installed providers/grounders/lowerers.

Changes:

  • Introduces SemanticSkillCompiler with workflow analysis (SemanticWorkflow) and per-call grounding (GroundedSemanticCall), including look-ahead targets and verified held-object dependencies.
  • Extends scene/profile integration: SceneRegistry.object_semantics() for owned ObjectSemantics snapshots; RobotSkillProfile.grounding_providers for selecting named grounding providers (e.g., handover pose providers).
  • Updates atomic actions to accept late-bound pose goal values (SceneEntityPose or tensors) and correctly collect scene dependencies / resolve targets at plan time; adds focused regression tests.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
tests/sim/skills/test_scene.pyAdds coverage for rejecting non-owning affordance deepcopy behavior and for owned ObjectSemantics snapshots.
tests/sim/skills/test_profiles.pyTests immutability/validation for new grounding_providers mapping on RobotSkillProfile.
tests/sim/skills/test_compiler.pyNew comprehensive tests for semantic workflow analysis + JIT lowering behavior, provider selection, and validation.
tests/sim/atomic_actions/test_core.pyTightens regression around late-bound pose ownership semantics.
tests/sim/atomic_actions/test_actions.pyAdds tests ensuring pose options own late-bound transforms and replan resolves latest scene snapshot targets.
embodichain/lab/sim/skills/scene.pyHardens affordance metadata copying and adds SceneRegistry.object_semantics() helper.
embodichain/lab/sim/skills/profiles.pyAdds grounding_providers field and normalizes it as an immutable mapping.
embodichain/lab/sim/skills/integration.pyShifts “registered lowerer installed” validation away from link_call (now enforced by compiler analysis).
embodichain/lab/sim/skills/compiler.pyNew compiler module implementing analysis + grounding registries (relation grounders, registered lowerers, handover pose providers).
embodichain/lab/sim/skills/init.pyExports compiler surface types from the skills package.
embodichain/lab/sim/atomic_actions/primitives/pick_up.pyAllows downstream look-ahead targets as pose goal values; resolves them at plan time; collects scene deps.
embodichain/lab/sim/atomic_actions/primitives/hand_over.pyAllows pose goal values for middle/final targets; resolves/collects deps at plan time.
embodichain/lab/sim/atomic_actions/goals.pyAdds SceneEntityPose.snapshot() and exposes collect_scene_dependencies() for late-bound pose values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1377 to +1386
endpoint = analyzed.bound.binding.action_binding.endpoint(slot_id, "motion")
try:
target = endpoint.require_target(JointPositionTarget)
except TypeError as exc:
raise _diagnostic(
"unsupported_builtin_endpoint",
(*path, "resources", slot_id, "motion"),
"The current built-in semantic lowerer requires a joint-position "
"motion endpoint.",
) from exc
Comment on lines 330 to +342
target = self.require_goal(request)
options = request.skill_options
options = replace(
request.skill_options,
downstream_object_target_poses=tuple(
resolve_pose_goal(
target,
context,
name=f"downstream_object_target_poses[{index}]",
)
for index, target in enumerate(
request.skill_options.downstream_object_target_poses
)
),
@yuecideng
yuecideng changed the base branch from feat/semantic-integration-manifest to feat/atomic-action-pr2c-runtime-endpointsAugust 11, 2026 17:47
@yuecidengyuecideng changed the title feat(sim): compile semantic skill workflowsfeat(sim): add semantic skill IR and compilerAug 11, 2026
Make endpoint bindings, timed command frames, transports, routing, safe holds, and profile lowering controller-agnostic. Preserve joint trajectories as optional feedback artifacts and add staged, same-address invocation revision semantics for mobile and whole-body safety.
…2c-runtime-endpoints
# Conflicts:
#	docs/design/declarative_expert_program_plan.md
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py
#	embodichain/lab/sim/atomic_actions/primitives/hand_over.py
#	embodichain/lab/sim/atomic_actions/primitives/move_end_effector.py
#	embodichain/lab/sim/atomic_actions/primitives/move_held_object.py
#	embodichain/lab/sim/atomic_actions/primitives/move_joints.py
#	embodichain/lab/sim/atomic_actions/primitives/pick_up.py
#	embodichain/lab/sim/atomic_actions/primitives/place.py
#	embodichain/lab/sim/atomic_actions/primitives/press.py
#	embodichain/lab/sim/skills/profiles.py
#	scripts/tutorials/atomic_action/assemble.py
#	scripts/tutorials/atomic_action/coordinated_pickment.py
#	scripts/tutorials/atomic_action/coordinated_placement.py
#	scripts/tutorials/atomic_action/hand_over.py
#	scripts/tutorials/atomic_action/move_end_effector.py
#	scripts/tutorials/atomic_action/move_held_object.py
#	scripts/tutorials/atomic_action/move_joints.py
#	scripts/tutorials/atomic_action/place.py
#	scripts/tutorials/atomic_action/press.py
Remove fallback control periods from motion policies and the atomic action engine. Require planners and custom actions to provide validated timing, propagate explicit interpolation cadence through planning contexts, and update built-ins, tasks, benchmarks, tutorials, docs, and tests.
BREAKING CHANGE: planner results with positions must include dt and duration, custom atomic actions must return TimedTrajectory, and fallback_control_dt is removed.
…pr2c-runtime-endpoints
# Conflicts:
#	agent_context/topics/atomic-actions/atomic-actions.md
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/tutorial/atomic_actions.rst
#	embodichain/lab/sim/atomic_actions/execution.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_runner.py
…2c-runtime-endpoints
# Conflicts:
#	agent_context/topics/atomic-actions/atomic-actions.md
#	agent_context/topics/motion-planning/motion-planning.md
#	docs/design/declarative_expert_program_plan.md
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/overview/sim/planners/motion_generator.md
#	docs/source/tutorial/atomic_actions.rst
#	docs/source/tutorial/motion_gen.rst
#	embodichain/lab/sim/atomic_actions/core.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/atomic_actions/policies.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py
#	embodichain/lab/sim/atomic_actions/primitives/hand_over.py
#	embodichain/lab/sim/atomic_actions/primitives/move_end_effector.py
#	embodichain/lab/sim/atomic_actions/primitives/move_held_object.py
#	embodichain/lab/sim/atomic_actions/primitives/move_joints.py
#	embodichain/lab/sim/atomic_actions/primitives/pick_up.py
#	embodichain/lab/sim/atomic_actions/primitives/place.py
#	embodichain/lab/sim/atomic_actions/primitives/press.py
#	embodichain/lab/sim/planners/base_planner.py
#	embodichain/lab/sim/planners/motion_generator.py
#	embodichain/lab/sim/planners/neural_planner.py
#	embodichain/lab/sim/planners/utils.py
#	scripts/benchmark/atomic_action/press_benchmark.py
#	scripts/benchmark/motion_generation/planners/ik_interpolate.py
#	scripts/tutorials/atomic_action/control_dt.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	scripts/tutorials/atomic_action/press.py
#	tests/benchmark/motion_generation/test_motion_generation_benchmark.py
#	tests/sim/atomic_actions/test_actions.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_runner.py
#	tests/sim/planners/test_motion_generator_batched.py
#	tests/sim/planners/test_plan_state_batched.py
…mantic-skill-compiler
# Conflicts:
#	agent_context/MAP.yaml
#	agent_context/topics/atomic-actions/atomic-actions.md
#	agent_context/topics/motion-planning/motion-planning.md
#	docs/design/declarative_expert_program_plan.md
#	docs/source/overview/sim/atomic_actions/builtin_actions.md
#	docs/source/overview/sim/atomic_actions/index.md
#	docs/source/overview/sim/atomic_actions/robot_skill_profiles.md
#	docs/source/tutorial/atomic_actions.rst
#	embodichain/lab/sim/atomic_actions/__init__.py
#	embodichain/lab/sim/atomic_actions/affordance.py
#	embodichain/lab/sim/atomic_actions/bindings.py
#	embodichain/lab/sim/atomic_actions/core.py
#	embodichain/lab/sim/atomic_actions/effects.py
#	embodichain/lab/sim/atomic_actions/engine.py
#	embodichain/lab/sim/atomic_actions/execution.py
#	embodichain/lab/sim/atomic_actions/plans.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_pickment.py
#	embodichain/lab/sim/atomic_actions/primitives/coordinated_placement.py
#	embodichain/lab/sim/atomic_actions/primitives/hand_over.py
#	embodichain/lab/sim/atomic_actions/primitives/move_end_effector.py
#	embodichain/lab/sim/atomic_actions/primitives/move_held_object.py
#	embodichain/lab/sim/atomic_actions/primitives/move_joints.py
#	embodichain/lab/sim/atomic_actions/primitives/pick_up.py
#	embodichain/lab/sim/atomic_actions/primitives/place.py
#	embodichain/lab/sim/atomic_actions/primitives/press.py
#	embodichain/lab/sim/atomic_actions/state.py
#	embodichain/lab/sim/planners/base_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_planner.py
#	embodichain/lab/sim/planners/curobo/curobo_yaml.py
#	embodichain/lab/sim/planners/motion_generator.py
#	embodichain/lab/sim/skills/__init__.py
#	embodichain/lab/sim/skills/profiles.py
#	embodichain/lab/sim/skills/scene.py
#	scripts/benchmark/atomic_action/press_benchmark.py
#	scripts/tutorials/atomic_action/assemble.py
#	scripts/tutorials/atomic_action/coordinated_pickment.py
#	scripts/tutorials/atomic_action/coordinated_placement.py
#	scripts/tutorials/atomic_action/dynamic_obstacle_recovery.py
#	scripts/tutorials/atomic_action/hand_over.py
#	scripts/tutorials/atomic_action/move_end_effector.py
#	scripts/tutorials/atomic_action/move_held_object.py
#	scripts/tutorials/atomic_action/move_joints.py
#	scripts/tutorials/atomic_action/moving_target_recovery.py
#	scripts/tutorials/atomic_action/pickup.py
#	scripts/tutorials/atomic_action/place.py
#	scripts/tutorials/atomic_action/press.py
#	tests/sim/atomic_actions/test_actions.py
#	tests/sim/atomic_actions/test_control.py
#	tests/sim/atomic_actions/test_core.py
#	tests/sim/atomic_actions/test_endpoint_runtime_e2e.py
#	tests/sim/atomic_actions/test_engine.py
#	tests/sim/atomic_actions/test_runner.py
#	tests/sim/atomic_actions/test_trajectory_ops.py
#	tests/sim/planners/test_curobo_planner.py
#	tests/sim/planners/test_motion_generator_batched.py
#	tests/sim/skills/test_profiles.py
#	tests/sim/skills/test_scene.py
Base automatically changed from feat/atomic-action-pr2c-runtime-endpoints to mainAugust 20, 2026 02:41
@skywhite1024
skywhite1024force-pushed the feat/semantic-skill-compiler branch 2 times, most recently from 7b8424c to 7862cf5CompareAugust 21, 2026 11:31
@yuecideng
yuecideng merged commit 240c4f8 into mainAug 21, 2026
8 of 9 checks passed
@yuecideng
yuecideng deleted the feat/semantic-skill-compiler branch August 21, 2026 14:59
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

atomic actionatomic action related functionalityenhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yuecideng