feat(task-engine): add semantic task frontend - #534
Conversation
Greptile SummaryThe PR adds scene-independent semantic task interpretation, candidate generation, scene grounding, TaskSpec assembly, scene handoff validation, and simulator configuration generation.
Confidence Score: 4/5The 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/
|
| 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]
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] |
There was a problem hiding this 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.
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.ab8e7d4 to
d3c36b3
Compare
d3c36b3 to
fa8d11d
Compare
fa8d11d to
89a7411
Compare
76da198 to
1260a42
Compare
Stack
ljd/gen-sim-refactor-02-seedgraph-contractsDescription
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
Validation
black --check --diff --color ./python docs/scripts/check_api_docs.pypytest tests/gen_sim/task_engine/test_agent.py tests/gen_sim/task_engine/test_interpretation.py -q(14 passed)Checklist