Skip to content

feat(action-engine): add SeedGraph planning and bundle generation - #535

Draft
skywhite1024 wants to merge 1 commit into
ljd/gen-sim-refactor-03-task-frontendfrom
ljd/gen-sim-refactor-04-planning-generation
Draft

feat(action-engine): add SeedGraph planning and bundle generation#535
skywhite1024 wants to merge 1 commit into
ljd/gen-sim-refactor-03-task-frontendfrom
ljd/gen-sim-refactor-04-planning-generation

Conversation

@skywhite1024

@skywhite1024 skywhite1024 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Description

Stack

Add deterministic and online SeedGraph planning, strict compiler and linker stages, offline/online candidate selection, bundle generation, packaged robot and sensor templates, artifact hashing, and headless graph visualization.

The persisted graph is validated through the same loader boundary used by later execution layers.

Refs #531

Type of change

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

Validation

  • Focused compiler/planning/generation coverage - 203 passed
  • Stack-tip GenSim regression - 706 passed, 9 warnings
  • Black 26.3.1 - 855 Python files unchanged at the stack tip
  • git diff --check - passed

Checklist

  • Code passes Black 26.3.1.
  • Tests cover the affected behavior.
  • Stack-level architecture documentation is included by layer 7.
  • No new third-party dependency is required.

@skywhite1024 skywhite1024 added agent Features related to agentic system enhancement New feature or request visualization Features or functions for visualization with the simulation labels Aug 20, 2026
@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

The PR adds SeedGraph planning, compilation, runtime loading, visualization, and generation of complete Action Engine bundles from Prompt2Scene exports.

  • Adds deterministic conversion between semantic recipes, SeedGraph v3, and runtime ExecutionPrograms.
  • Adds offline and online planning, graph linking, candidate selection, and persisted runtime contracts.
  • Adds scene normalization, artifact generation, CLI integration, templates, and focused test coverage.
  • The fan-in conversion currently produces an inaccurate source-state topology in generated graph visualizations.

Confidence Score: 4/5

The fan-in state-topology defect should be fixed before merging because generated bundle diagrams can misrepresent the execution graph.

Multi-parent execution units preserve all dependency IDs but use only one parent state as their source, while visualization derives its topology solely from those source-to-target transitions.

Files Needing Attention: embodichain/gen_sim/action_engine/compiler/v2.py and embodichain/gen_sim/action_engine/graph_visualization.py

Important Files Changed

Filename Overview
embodichain/gen_sim/action_engine/compiler/v2.py Adds bidirectional SeedGraph conversion, but fan-in units materialize an inconsistent source-state topology that produces inaccurate graph visualizations.
embodichain/gen_sim/action_engine/generation/generator.py Orchestrates task interpretation, planning, scene normalization, validation, and bundle generation with extensive input checks.
embodichain/gen_sim/action_engine/generation/source_scene.py Resolves Prompt2Scene formats and normalizes identifiers, paths, scales, poses, and world-frame rotation.
embodichain/gen_sim/action_engine/planning/linker.py Links node and task-group dependencies while validating persisted execution contracts and resource constraints.
embodichain/gen_sim/action_engine/runtime/loader.py Loads and verifies persisted SeedGraphs, supports regeneration and A/B artifacts, and converts them into runtime programs.
embodichain/gen_sim/action_engine/graph_visualization.py Adds chain and DAG rendering with runtime overlays; its source-target topology exposes the compiler's fan-in representation defect.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    A[Prompt2Scene export] --> B[Scene preparation]
    B --> C[Task planning]
    C --> D[SeedGraph linking and validation]
    D --> E[SeedGraph artifact]
    D --> F[ExecutionProgram conversion]
    F --> G[Runtime loader]
    F --> H[Graph visualization PNG]
    B --> I[Fast gym config]
    E --> J[Generated bundle]
    H --> J
    I --> J
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/compiler/v2.py:238
**Fan-in state topology drops branches**

When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in `depends_on`. Because graph visualization derives topology exclusively from `source` and `target`, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "feat(action-engine): add SeedGraph plann..." | Re-trigger Greptile

for unit_id in ordered_units:
unit = units[unit_id]
dependencies = sorted(unit["depends_on"])
source = start if not dependencies else target_by_unit[dependencies[0]]

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 Fan-in state topology drops branches

When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in depends_on. Because graph visualization derives topology exclusively from source and target, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.

Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/gen_sim/action_engine/compiler/v2.py
Line: 238

Comment:
**Fan-in state topology drops branches**

When an execution unit has multiple parent units, this conversion uses only the first parent’s target as the edge source while retaining every parent in `depends_on`. Because graph visualization derives topology exclusively from `source` and `target`, generated bundle diagrams disconnect the remaining branches from the join and can assign incorrect DAG levels and layout.

---

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-04-planning-generation branch from 058e21a to 28f9695 Compare August 21, 2026 09:56
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-04-planning-generation branch from 28f9695 to 63a6f6a Compare August 21, 2026 10:11
@skywhite1024
skywhite1024 force-pushed the ljd/gen-sim-refactor-04-planning-generation branch from 63a6f6a to ef4449c Compare August 21, 2026 10:19
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 visualization Features or functions for visualization with the simulation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant