graph TD
A[Input: Compliant Keywords/Text] --> B[Task 190: Craft Image Prompt]
B --> C[Task 222: Generate Design with Ideogram API]
C --> D[Check Background]
D --> E{Is Background Already Transparent?}
E -->|No| F[Remove.bg API: Strip Background]
E -->|Yes| G[Skip Background Removal]
F --> H[Merge Paths]
G --> H
H --> I[Task 191: Resize to 4500x5400]
I --> J[AI Upscaler API: Set 300 DPI]
J --> K[Quality Check]
K --> L{Meets All Requirements?}
L -->|No| C
L -->|Yes| M[Output: Final T-Shirt Design PNG]
subgraph Requirements
N[300 DPI]
O[4500x5400 pixels]
P[Transparent Background]
Q[Policy Compliant Design]
end