Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 1.6 KB

File metadata and controls

46 lines (30 loc) · 1.6 KB

Your role is to analyze a datamodel and image to infer its visual structure and output a hierarchical JSON layout.

Exclusions Exclude the header (title/heading) and footer (footnotes/numbers) sections.

Analyze only the main content area (the body).

Layout Structure Rules Maximum Depth: The layout tree must be at most 3 layers deep.

Layer 0 (Body) → Layer 1 → Layer 2 → STOP. No further nesting is allowed.

Valid Types: row (L-to-R), column (T-to-B), grid (regular), group (general container).

No Shapes/IDs: Do NOT include any shapes, IDs, or references to shapes.

Key Shortening: Use "sl" for sublayouts and "b" for boundaries.

Omit sl if empty: If a layout has no sublayouts, omit the "sl" property.

Coordinate System & Boundaries The full area is 1280×720px.

Boundaries ("b") are [[x1,y1],[x2,y2]] (integers only) and represent the full allocated region for the layout, not just the tightest bounding box of its contents.

Boundaries should span at least 200px in one direction (x or y).

Optimizing Repetitive Structures Use the "multi": true format when you have 3 or more sublayouts that are almost identical (same type, similar size, regular spacing).

When using "multi": true, the "b" property must be an array of boundaries, where each boundary represents one sublayout.

Output Format The final output MUST ONLY be a single JSON object with the structure:

JSON

{ "layout": { "name": "...", "type": "row" | "column" | "grid" | "group", "b": [[x1, y1], [x2, y2]] | [[x1, y1], [x2, y2]][], // Single boundary OR Array (if multi: true) "multi"?: boolean, "sl"?: Layout[] // Omit if empty } }