Skip to content

feat(task-engine): add task interpretation and canonical scene binding - #534

Draft
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-02-seedgraph-contractsfrom
ljd/gen-sim-refactor-03-task-frontend
Draft

feat(task-engine): add task interpretation and canonical scene binding#534
skywhite1024 wants to merge 2 commits into
ljd/gen-sim-refactor-02-seedgraph-contractsfrom
ljd/gen-sim-refactor-03-task-frontend

Conversation

@skywhite1024

@skywhite1024skywhite1024 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Stack

Add the strict Task Engine frontend that turns structured instruction candidates into provider-free task intent and binds language roles once to canonical scene identities.

Architecture boundary

  • Adds strict TaskDraft, SceneRequirements, semantic call candidate, and bound-draft values.
  • Consumes the JSON-safe projection emitted by ExpertProgramIntegrationCatalog.planner_projection() and requires its exact integration fingerprint.
  • Decodes deterministic and structured-model outputs through the same local TaskSpec and canonical semantic-call validators.
  • Supports multiple independent candidates, candidate-local failures, deterministic deduplication, and model provenance.
  • Resolves roles only through canonical SceneManifest references (SceneObjectRef, SceneArticulationRef, SceneLinkRef, and SceneAffordanceRef). Unknown, ambiguous, or mistyped identities fail explicitly.
  • Keeps language-role binding separate from physical goal grounding; no poses, qpos, trajectories, ActionInvocations, controllers, solvers, or live providers are produced.
  • Removes robot/action config construction, packaged arm profiles, hard-coded arm fields, and the parallel Action Engine scene inventory.

Refs #531

Type of change

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

Validation

  • pytest -q tests/gen_sim/task_engine - 48 passed
  • pytest -q tests/docs/test_check_api_docs.py - 8 passed
  • Black 26.3.1 - 789 Python files unchanged
  • Public API docs - 1862/1862 exports documented
  • git diff --check - passed
  • Full Sphinx build not run locally because sphinx-build is unavailable in the validation environment

Checklist

  • Code passes Black 26.3.1.
  • Tests cover canonical codec reuse, catalog fingerprint matching, typed SceneManifest binding, explicit failure, and shared model/deterministic validation.
  • Public API documentation is aligned.
  • No new third-party dependency is required.

@skywhite1024skywhite1024 added agent Features related to agentic system enhancement New feature or request task A task written in openai gym format for imitation learning or reinforcement learning labels Aug 20, 2026
@greptile-apps

Copy link
Copy Markdown

Greptile Summary

The PR adds scene-independent semantic task interpretation, candidate generation, scene grounding, TaskSpec assembly, scene handoff validation, and simulator configuration generation.

  • Introduces strict Task Engine drafts, scene requests, success specifications, and candidate-set contracts.
  • Adds LLM-backed instruction interpretation and scene-reference grounding for E1–E9 tasks.
  • Adds Action Engine TaskSpec lowering and scene handoff validation.
  • Adds robot-profile-driven simulator and agent configuration builders.

Confidence Score: 4/5

The PR is not safe to merge until the simulator templates required by build_fast_gym_config are added or its template references are corrected.

The semantic interpretation and grounding contracts appear internally consistent, but every invocation of the new gym-config builder reaches missing packaged templates and raises FileNotFoundError before producing a configuration.

Files Needing Attention: embodichain/gen_sim/action_engine/generation/config_builder.py and embodichain/gen_sim/action_engine/generation/templates/

Important Files Changed

FilenameOverview
embodichain/gen_sim/task_engine/interpretation.pyAdds strict LLM instruction interpretation, normalization, transport configuration, and intent validation.
embodichain/gen_sim/task_engine/agent.pyAdds concurrent candidate generation, canonicalization, deduplication, and vote aggregation.
embodichain/gen_sim/task_engine/contracts.pyDefines and validates JSON-safe task drafts, scene requests, success specifications, and candidate sets.
embodichain/gen_sim/action_engine/tasks/grounding.pyAdds fail-closed semantic scene-reference grounding with cardinality and eligibility checks.
embodichain/gen_sim/action_engine/tasks/interpretation.pyBridges validated Task Engine intents into grounded Action Engine TaskSpecs.
embodichain/gen_sim/action_engine/tasks/assembly.pyAdds scene inventory modeling and E1–E9 TaskSpec and requirement assembly.
embodichain/gen_sim/action_engine/generation/config_builder.pyAdds simulator and agent manifest generation, but its required robot, sensor, and light templates are absent, making the new gym-config API fail immediately.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
I[Task instruction] --> TI[Task Engine interpretation]
TI --> D[Validated semantic draft]
D --> G[Scene-reference grounding]
S[Scene inventory] --> G
G --> TS[Grounded TaskSpec and scene requirements]
TS --> H[Scene handoff validation]
H --> C[Simulator and agent config generation]
C --> R[Action Engine runtime]
Loading

Fix all with GreploopFix All in CodexFix All in Claude Code

Prompt To Fix All With AI
### Issue 1
embodichain/gen_sim/action_engine/generation/config_builder.py:225
**Required configuration templates are missing**
When `build_fast_gym_config()` runs, `_make_robot()` and the subsequent sensor and light loaders reference template files that are absent from this directory, causing generation to raise `FileNotFoundError` before returning a gym configuration. A/B mode also requires the absent `vlm_sensors.json`; please include the referenced templates or correct these references.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(task-engine): add semantic task int..." | Re-trigger Greptile

light = _load_template("default_lights.json")

rigid_uids = [str(config["uid"]) for config in scene.rigid_objects]
background_uids = [str(config["uid"]) for config in scene.background]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1Required configuration templates are missing

When build_fast_gym_config() runs, _make_robot() and the subsequent sensor and light loaders reference template files that are absent from this directory, causing generation to raise FileNotFoundError before returning a gym configuration. A/B mode also requires the absent vlm_sensors.json; please include the referenced templates or correct these references.

Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/action_engine/generation/config_builder.py
Line: 225
Comment:
**Required configuration templates are missing**
When `build_fast_gym_config()` runs, `_make_robot()` and the subsequent sensor and light loaders reference template files that are absent from this directory, causing generation to raise `FileNotFoundError` before returning a gym configuration. A/B mode also requires the absent `vlm_sensors.json`; please include the referenced templates or correct these references.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in CodexFix in Claude Code

@skywhite1024
skywhite1024 marked this pull request as draft August 21, 2026 07:30
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from ab8e7d4 to d3c36b3CompareAugust 21, 2026 09:56
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from d3c36b3 to fa8d11dCompareAugust 21, 2026 10:11
@skywhite1024
skywhite1024force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from fa8d11d to 89a7411CompareAugust 21, 2026 10:19
@skywhite1024skywhite1024 changed the title feat(task-engine): add semantic task interpretation and groundingfeat(task-engine): add task interpretation and canonical scene bindingAug 21, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentFeatures related to agentic systemenhancementNew feature or requesttaskA task written in openai gym format for imitation learning or reinforcement learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@skywhite1024@yuecideng