Skip to content

feat(task-engine): add semantic task frontend - #534

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

feat(task-engine): add semantic task frontend#534
skywhite1024 wants to merge 1 commit into
ljd/gen-sim-refactor-02-seedgraph-contractsfrom
ljd/gen-sim-refactor-03-task-frontend

Conversation

@skywhite1024

@skywhite1024 skywhite1024 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Stack

Description

This PR adds the scene-independent semantic TaskAgent frontend. It generates and validates multiple structured task candidates, deterministically derives SceneRequest and SuccessSpec contracts, deduplicates candidates, and fails closed on invalid model output.

Grounding, planning, and simulator execution remain in later layers.

Type of change

  • Bug fix
  • Enhancement
  • New feature
  • Breaking change
  • Documentation update

Validation

  • black --check --diff --color ./
  • python docs/scripts/check_api_docs.py
  • pytest tests/gen_sim/task_engine/test_agent.py tests/gen_sim/task_engine/test_interpretation.py -q (14 passed)

Checklist

  • Code is formatted with Black 26.3.1
  • Public API documentation is aligned
  • Focused tests cover the semantic frontend
  • This layer is independently importable and testable

@skywhite1024 skywhite1024 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

greptile-apps Bot commented Aug 20, 2026

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

Filename Overview
embodichain/gen_sim/task_engine/interpretation.py Adds strict LLM instruction interpretation, normalization, transport configuration, and intent validation.
embodichain/gen_sim/task_engine/agent.py Adds concurrent candidate generation, canonicalization, deduplication, and vote aggregation.
embodichain/gen_sim/task_engine/contracts.py Defines and validates JSON-safe task drafts, scene requests, success specifications, and candidate sets.
embodichain/gen_sim/action_engine/tasks/grounding.py Adds fail-closed semantic scene-reference grounding with cardinality and eligibility checks.
embodichain/gen_sim/action_engine/tasks/interpretation.py Bridges validated Task Engine intents into grounded Action Engine TaskSpecs.
embodichain/gen_sim/action_engine/tasks/assembly.py Adds scene inventory modeling and E1–E9 TaskSpec and requirement assembly.
embodichain/gen_sim/action_engine/generation/config_builder.py Adds 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 Greploop Fix All in Codex Fix 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.

P1 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.

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 Codex Fix in Claude Code

@skywhite1024
skywhite1024 marked this pull request as draft August 21, 2026 07:30
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from ab8e7d4 to d3c36b3 Compare August 21, 2026 09:56
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from d3c36b3 to fa8d11d Compare August 21, 2026 10:11
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from fa8d11d to 89a7411 Compare August 21, 2026 10:19
@skywhite1024 skywhite1024 changed the title feat(task-engine): add semantic task interpretation and grounding feat(task-engine): add task interpretation and canonical scene binding Aug 21, 2026
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-03-task-frontend branch from 76da198 to 1260a42 Compare August 27, 2026 06:59
@skywhite1024 skywhite1024 changed the title feat(task-engine): add task interpretation and canonical scene binding feat(task-engine): add semantic task frontend Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant