Skip to content

Add chatdsg_repair example + constraint-aware prompts + pddl_repair_tool - #16

Open
JY-HIM4U wants to merge 4 commits into
masterfrom
feature/plan-repair
Open

JY-HIM4U wants to merge 4 commits into
masterfrom
feature/plan-repair

Conversation

@JY-HIM4U

@JY-HIM4U JY-HIM4U commented Jul 20, 2026 •

Copy link
Copy Markdown
Collaborator

Adds a natural-language interface to the plan-repair goal_manager (from the spot_tools/omniplanner plan-repair work). A user can say "go to the loading dock but avoid the bridge" instead of hand-writing PDDL goals and constraint JSON. All 6 files are new; nothing existing is modified.

Changes

examples/chatdsg_repair/chatdsg.py
Runnable entry point. Based on examples/chatdsg/chatdsg.py. Reuses its InputDisplayApp TUI via dynamic module load instead of copying it, and additionally imports pddl_repair_tool (for its registration side-effect) before the agent loads.

examples/chatdsg_repair/agent_config.yaml
Agent config. Based on examples/chatdsg/agent_config.yaml, swapping the tool from send_pddl_goal to send_pddl_goal_with_constraints, and pointing planner_topic at /hilbert/commanded_goal (goal_manager's input) instead of directly at omniplanner's region_rearrange_objects_pddl/pddl_goal. So, goals go through the pause/coverage-check/replan flow instead of bypassing it.

examples/chatdsg_repair/agent_prompt.yaml
System prompt. Based on examples/chatdsg/agent_prompt.yaml, rewritten for the goal-sending (not just querying) workflow, plus rules for when to attach forbidden-poi/forbidden-edge constraints.

examples/prompts/common/pddl_domain_description_with_constraints.yaml
Extends pddl_domain_description.yaml with a <Runtime Constraints> section documenting forbidden-poi/forbidden-edge syntax and lowercase-ID rules for the LLM.

examples/prompts/common/pddl_in_context_examples_with_constraints.yaml
Extends pddl_in_context_examples.yaml with worked examples of constrained and multi-goal calls, in the tool-calling response style this agent actually uses (the original's examples use a bare <answer> tag format that doesn't apply here).

src/heracles_agents/tools/pddl_repair_tool.py
New tool. Based on pddl_calling_tool.py's send_pddl (same robot_name/planner_topic binding pattern), extended to also accept constraints_json. A JSON list the LLM can generate naturally (e.g. [["forbidden-poi","o188"]]), which gets translated internally into the proper ConstrainedPddlGoalMsg/ConstraintFact structure before publishing (subprocess.run instead of the original's os.system).

@JY-HIM4U
JY-HIM4U requested a review from harelb July 20, 2026 18:55
@JY-HIM4U
JY-HIM4U force-pushed the feature/plan-repair branch from a314ccb to a9a2610 Compare July 21, 2026 15:56
@JY-HIM4U
JY-HIM4U force-pushed the feature/plan-repair branch from a9a2610 to 2104c77 Compare July 30, 2026 14:29
Repair-aware chat agent example that talks to the plan-repair goal
manager, plus constraint-aware PDDL domain description and in-context
examples for the LLM prompt.
@JY-HIM4U
JY-HIM4U force-pushed the feature/plan-repair branch from 2104c77 to aa91662 Compare July 30, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants