01
The research hypothesis
An AI agent should be able to expand a physical-product catalog from a bounded product contract, with people setting policy and handling exceptions instead of assembling every SKU.
Catalog growth is repeated coordination. Each product needs a subject, product data, copy, price, customer imagery, a manufacturable asset, and a fulfillment identity. Those parts have to agree when the catalog grows from ten products to hundreds or thousands.
World Patches became the test bed. A location brief enters a generator; code produces a supplier file, a store preview, and a catalog record. Fifty-nine products were enough to expose repeatability problems, manual work, and the point where a research pipeline could become a business.
02
The guide image
The first blocking technology problem was manufacturing geometry. “Leave room for bleed” is clear to a print designer and vague to an image model. The generator attaches the same 985 × 985 px PNG to every request. Three high-separation colours divide the file into a safe area, a bleed ring, and a sacrificial outer square.
| Marker | Meaning | Instruction sent with the image |
|---|---|---|
| Green | Safe area | Keep the patch face, landmark, location name, and subtext inside this circle. |
| Orange | Bleed ring | Continue decorative artwork through this ring. Do not place critical text here. |
| Red | Cut-away area | Fill the square to every edge so a crop cannot expose an empty corner. |
Design decision
Marker colours should sit outside the intended product palette. The current patch prompt forbids green, orange, and red so residue is obvious. That also prevents legitimate use of those colours. A general generator should select a temporary marker palette per job and test that it has been removed.
03
The request sent to the model
Gemini receives the guide PNG and the product brief in one request. The brief supplies the location, landmark, visible labels, border colour, permitted palette, and explicit rules for each zone. Google documents image-plus-text input for Gemini image generation and provides a batch API for larger jobs. Batch capacity does not remove the need for acceptance tests.
contents = [zone_guide_png, product_prompt]
image_config = {
"aspect_ratio": "1:1",
"image_size": "1K"
}
candidate = generate(model, contents, image_config)
manufacturing = resize(candidate, 984, 984)
save_png(manufacturing, dpi=300)Model output is treated as a candidate. Deterministic code resizes the first returned image to 984 × 984 px and writes 300 dpi metadata. A second pass masks the square image into a circular store preview and overlays the supplier border. The square manufacturing file keeps artwork outside the visible circle because those pixels are needed at the cut line.


04
Results from the first 59 products
We audited the repository on 10 July 2026. File presence and raster geometry are consistent across the catalog. Visual acceptance is still a human step.
- Catalog records
- 59
- Manufacturing files present
- 59 / 59
- Store previews present
- 59 / 59
- Manufacturing dimensions
- 59 / 59 at 984 × 984 px
- Manufacturing density metadata
- 300 dpi
- Automated visual acceptance
- Not implemented
Audit scope: catalog JSON, generated files, raster dimensions, and density metadata in the World Patches repository. It does not include a new print run or an end-to-end paid order.
05
Failures observed during generation
The prompt became specific because loose versions failed in specific ways. Lofoten returned a tiny inner scene, buildings over the ring, a green ring, and incorrect inferred subtext. Faroe and Geiranger also needed individual reruns for boundary violations and scene clutter.
| Observed candidate | Current response | Control still missing |
|---|---|---|
| The center scene came back too small. | The prompt now tells the model to fill the inner medallion edge to edge. | Measure occupied area automatically; the current check is visual. |
| Houses, mountains, and boats crossed into the text ring. | The prompt names the ring as a hard boundary and tells the model to omit objects that do not fit. | Segment the ring and reject foreground detail inside it. |
| Guide colours survived in some candidates. | Green, orange, and red are explicitly forbidden in the requested palette. | Run a tolerant colour-residue test before accepting the file. |
| Long names and inferred subtext were unreliable. | Visible labels and subtext are supplied as separate bounded inputs; individual failures are rerun. | OCR the two text arcs and compare them with the product record. |
The current invalidator
A valid file can still describe the wrong product.
The generator asks for raised embroidery texture. The supplier makes this SKU by dye sublimation on spun polyester. The bleed geometry may pass while the preview sets the wrong material expectation. The next catalog regeneration must be tuned against physical samples for a flat printed appearance.
There is also a supplier-spec question to close. Prodigi’s patch page lists JPG or PDF at 300 dpi; its general Print API documentation accepts JPG, PNG, or PDF. The current pipeline submits PNG. A sandbox order and supplier confirmation should settle the product-specific contract before unattended generation.
06
What we would add before 10,000 assets
A batch endpoint makes generation faster. It does not make bad files cheaper to find. At catalog scale, acceptance must be expressed as tests with a saved result for every asset.
| Acceptance check | Machine test | Current implementation |
|---|---|---|
| File contract | Dimensions, density metadata, colour mode, file type, and readable asset URL. | Dimensions and density are normalized. The rest needs a formal validator. |
| Safe-area occupancy | Critical content stays inside the inner circle; decorative pixels reach the outer edge. | Prompted and reviewed by eye. |
| Text fidelity | OCR result matches the requested location and subtext. | Manual review only. |
| Guide removal | No marker-colour residue remains after generation. | Prompted and reviewed by eye. |
| Physical match | Approved sample links prompt version, supplier SKU, source asset, and received product. | Samples exist; the art direction still needs retuning against them. |
| Reproducibility | Immutable manifest records model, prompt, guide, inputs, output hash, review, and reruns. | Catalog identity exists. Generation history is not yet complete enough for unattended scale. |
Physical samples remain part of the test plan. Pixel checks can prove that a file matches a template. They cannot prove legibility on fabric, colour under the supplier process, edge placement after cutting, or whether the rendered material matches what arrives.
07
From research pipeline to venture
The backend was built to test agent-run catalog expansion. Patches made the test bounded: one supplier SKU, a fixed print template, location-specific subject matter, and repeatable product fields. Producing a coherent 59-product catalog created enough working inventory to launch World Patches.
The storefront uses conventional Next.js, Stripe Checkout, and Prodigi order plumbing. Its value to the research is operational: every accepted asset must keep its product identity through catalog publication, payment, and the supplier request.
The fulfillment path also has an unresolved retry defect. A supplier-order failure is currently acknowledged to Stripe with HTTP 200, which marks the webhook delivery as successful. Stripe documents retries after non-2xx responses. Durable retry and reconciliation must move outside this request before the order path can be trusted.
Commercial experiment: World Patches (opens in a new tab)08
Primary references
- Google AI for Developers: Gemini image generation
Image-plus-text inputs, output sizing, model limits, and batch generation.
- Prodigi: round fabric patch specification
PATCH-ROUND size, material, print process, file format, and 300 dpi guidance.
- Prodigi Print API reference
Asset sizing modes, order payload, and idempotency behavior.
- Stripe: receive webhook events
Signature verification, delivery status, and retry behavior.
Repository and source review completed 10 July 2026.