design_plan_hierarchy
Splits dense DesignPlans into connected multi-sheet hierarchies, derives inter-sheet ports, and emits top-sheet placement/TOC operations for application before execution.
Instructions
Propose a multi-sheet hierarchy for a dense DesignPlan.
Stage 6 of the autonomous flow (schematic emit,
reference/autonomy-roadmap.md): a plan past ~20 parts stops fitting
one readable sheet and dense single sheets are the known short-risk
regime. This tool partitions the parts by signal connectivity
(min-cut, zones kept atomic), names each child sheet from its
dominant zone role, derives the inter-sheet ports from the signal
nets the cut severs (power/ground rails are continuous through
power ports and never become sheet entries), and emits the
top-sheet op list in the exact parameter shapes of
sch_place_sheet_symbol / sch_place_sheet_entry /
sch_generate_toc. Apply the result to the plan with
design_apply_hierarchy before design_execute_plan.
Deterministic; pure Python, no Altium.
Args:
plan_json: DesignPlan as a JSON string or dict.
max_parts_per_sheet: Split threshold (default 20). At or below
it the plan stays single-sheet (split=False).
Returns:
{"ok": True, "split": bool, "top_sheet": str, "sheets": [{name, refdes, zones, part_count}], "ports": [{net, from_sheet, to_sheet, io_type}], "top_sheet_ops": [{tool, params}], "cut_nets": int} (op coordinates are MILS) or
{"ok": False, "reason": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_json | Yes | ||
| max_parts_per_sheet | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||