design_apply_hierarchy
Rewrite a DesignPlan onto the sheets a hierarchy proposes, re-homing every part and its zones to produce a new multi-sheet plan ready for validation and execution.
Instructions
Rewrite a DesignPlan onto the sheets a hierarchy proposes.
Stage 6 of the autonomous flow (schematic emit,
reference/autonomy-roadmap.md), the second half of the hierarchy
step: take the result of design_plan_hierarchy and produce a
NEW plan with sheets = [top sheet, *child sheets], every
part's sheet re-homed per the hierarchy, and every zone moved
with its parts (part-less zones park on the top sheet). The input
plan is never mutated; a non-split hierarchy returns the plan
unchanged. Feed the returned plan to design_validate_plan and
then design_execute_plan; emit the hierarchy's
top_sheet_ops separately to draw the top sheet. Pure Python.
Args:
plan_json: DesignPlan as a JSON string or dict.
hierarchy: The dict returned by design_plan_hierarchy.
Returns:
{"ok": True, "plan": {...rewritten DesignPlan...}, "sheets": [names], "summary": "..."} or
{"ok": False, "reason": "..."} on a malformed plan or
hierarchy.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hierarchy | Yes | ||
| plan_json | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||