Compliance Redlines & Platform AI Disclosures
The 6 code-enforced compliance redlines in server/src/compliance/redlines.ts, derived Amazon main-image warnings, and copyable platform disclosure templates.
In Slloy, compliance rules are never left as manual editorial guidelines. Every rule in server/src/compliance/redlines.ts is enforced automatically across four architectural layers: derived, block, hide, and warn.
1. The 6 Code-Enforced Compliance Redlines (REDLINES)
redlinePublishProblems(record) runs at the very top of publishProblem() in server/src/promptLibrary.ts before any format check—blocking non-compliant presets from ever being published in /admin.
| # | Redline ID | Layer | Rule Title | Code Enforcement Mechanism |
|---|---|---|---|---|
1 | amazon-main-image | derived | Presets targeting Amazon must explicitly warn against Main Image usage | amazonMainImageRequired(record) checks if record.platforms includes "amazon". Sets PublicPrompt.amazonMainImage = true on the server; cards and detail pages unconditionally render the localized boundary warning without relying on editors to write it in 14 locales. |
2 | person-needs-reference | block | Portrait/person presets must originate from user-uploaded reference photos | Publish gate requires needsReference === true whenever family === "person". On the workbench, presets with needsReference: true disable the generate button and reject /api/generate requests if no reference image is uploaded. |
3 | keep-subject-identical | block | Image-editing presets must not alter the product or person's appearance by a single pixel | Publish gate requires any preset with needsReference === true to contain at least one SUBJECT_LOCK_PHRASES phrase in its prompt body. |
4 | synthetic-person-disclosure | block | Presets generating synthetic humans must provide copyable disclosure text | Publish gate requires family === "person" presets to have a non-empty translations[locale].disclosure in every populated locale; detail page renders a one-click copyable disclosure block. |
5 | no-efficacy-comparison | hide | No weight-loss, skincare, hair-growth, or teeth-whitening before/after efficacy comparisons | Blocked at publish gate by EFFICACY_TERMS; redlineHidden(record) also hides any matching historical database rows from public list/detail SSR (toPublic returns null), and screenGenerationRequest blocks image-to-image generation requests matching EFFICACY_TERMS with HTTP 400. |
6 | no-minor-modification | hide | Never process or modify photographs of minors/children | Blocked at publish gate by MINOR_TERMS; hidden from public SSR via redlineHidden(record); screenGenerationRequest rejects any generation request carrying a reference image (hasReference: true) whose prompt matches MINOR_TERMS with HTTP 400. |
2. Restricted Lexicons & Subject Lock Phrases
Subject Appearance Lock Phrases (SUBJECT_LOCK_PHRASES)
Any preset with needsReference === true must include at least one of the following case-insensitive phrases in promptEn:
"do not redraw","never redraw","do not change","do not alter","do not reshape","keep everything","exactly as","as it is","as photographed","unchanged"
Efficacy Comparison Blocklist (EFFICACY_TERMS)
Matched using word boundaries (\b...\b) for English terms and substring matching for Chinese terms:
- English:
"weight loss","lose weight","before and after","before/after","skincare","anti-aging","anti aging","wrinkle","hair loss","hair growth","teeth whitening","slimming" - Chinese:
"减肥","美白","生发","祛痘","抗皱","术前术后"
Minor / Child Protection Blocklist (MINOR_TERMS)
- English (word-boundary matched so
"child"does not false-positive on"grandchildren"):"child","children","kid","kids","toddler","baby","infant","minor" - Chinese:
"儿童","孩子","宝宝","未成年"
[!NOTE] Why
screenGenerationRequest()Only Filters Requests withhasReference: true: In pure text-to-image generation (hasReference: false), a merchant writing"kids winter jacket product photo on hanger"is describing children's apparel, not modifying a real minor's photograph. By scopingscreenGenerationRequesttohasReference: true, Slloy blocks any attempt to upload and alter a real child's photo while avoiding false-positive blocks on legitimate apparel text prompts.
3. Amazon Main Image Warning (amazonMainImageRequired)
Amazon Seller Central policy strictly requires the Main Image (MAIN) to show the actual product on a pure white (RGB 255, 255, 255) background with zero props or lifestyle staging, whereas secondary gallery slots (PT01–PT08) and A+ Content permit AI lifestyle scenes.
- Whenever
"amazon"is present inrecord.platforms,toPublic()setsamazonMainImage: true. - Even for
F-02(product-photo-pure-white, which crops and pads the user's real product photo onto pure whiteRGB 255,255,255at85%fill), the preset detail page clearly distinguishes between preserving the real product photo while removing background vs. synthesizing a product from scratch, ensuring sellers never use a text-generated concept as an Amazon Main Image.
4. Platform AI Disclosure Library (prompt-disclosures.ts)
In addition to per-preset disclosure strings stored on individual prompts records, frontend/site/content/prompt-disclosures.ts (rendered by frontend/site/components/prompt-disclosure-block.tsx) provides 8 ready-to-copy English disclosure statements grouped into 4 scenarios for Amazon, Etsy, real-estate MLS, and EU AI Act compliance.
The disclosure sentences themselves remain in English (as required by US/EU marketplace listings), while the group headings are localized across all 14 languages under prompts.disclosures.groups in locales/*/works.json:
Group Key (DisclosureGroupKey) | Copyable English Disclosure Statements |
|---|---|
commerce (E-Commerce Product Listings) | • "Background generated with AI. The product shown is the actual item as shipped."• "Lifestyle images may include AI-generated backgrounds; the product photographed is the actual product."• "Image edited with AI to remove background clutter. The product itself is unaltered." |
staging (Real Estate & Interior Virtual Staging) | • "Virtually staged. Furnishings are digitally added for illustration only and are not included in the sale." |
synthetic (Synthetic Presenters & AI Media) | • "AI-generated presenter. Not a real person."• "This video contains AI-generated content."• "Contains AI-generated imagery." |
digital (Digital Downloads & Photo Restoration) | • "Digital product preview generated with AI. You will receive the files shown in this listing."• "Photograph restored and enhanced with AI. Original photograph supplied by the family." |
Prompt Library Architecture & Recommendation Engine
Prompt data model, 8 deliverable families (A-H), 10 target platforms, 60-second isolate cache with generation invalidation, ring-queue recommendations, and slot replacement state machine.
Edge Translation (Workers AI) & Offline CLI Translation
Real-time prompt translation via Cloudflare Workers AI (AI binding) with slot protection and multi-model fallback, plus offline Ark CLI translation tools.