Agent pack
Product imagery: covers, logos, screenshots
How promotion imagery is made, declared and served into the catalog.
How promotion imagery for blueforge.studio is made, declared and served. Verified 2026-10-11 against
blueforge main (ab627a8b7) and installed @blueforge-studio/blueforge-sidecar-schemas 0.35.0;
the primaryApp rule and recipe below re-verified 2026-11-06 against forge-control's blueforge-assets.ts /
blueforge-register.ts (pack v0.1.25).
Spec docs: docs/deploy/asset-sync.md, docs/sidecar-standards.md (both have drift, see the end).
Declaring assets in the sidecar
blueforge.product.yml, key assets (strict: an unknown key fails the build):
assets:
logo: apps/web/public/icon-512.png # repo-relative paths
og: brand/og.jpg
cover: apps/site/public/cover.webp
screenshots:
- path: brand/screen-01-home.dark.webp
id: home # stable key; features reference it as @screenshot/<id>
label: Home # gallery label
variant: dark # dark | light
caption: "Learn languages through adventure"
alt: "Home page showing ..."
- path: brand/screen-01-home.light.webp
id: home # same id, other variant = one logical screenshot
label: Home
variant: light
caption: "..."
alt: "..."
Screenshot entry fields (all strict): path (required), caption, alt, id, label, variant.
alt falls back to caption, then to "id ?? label: a variant with
neither gives no pairing. Real example: linguaquest/blueforge.product.yml.
primaryApp decides whose deploy uploads the assets — read this before declaring any
forge-control uploads a product's assets: only from the deploy of the app the sidecar names as
primaryApp (hosting-core blueforge-assets.ts, assetsForApp). Three cases:
- one
apps:entry (or none) — that app owns the upload, noprimaryAppneeded. - several
apps:and noprimaryApp— no deploy is ever eligible. Nothing fails: the deploy logs"<id>: declares assets but none were uploaded - primaryApp (unset, and the entry lists several apps) … Set primaryApp in blueforge.product.yml to one of them."and the card silently falls back to the initials monogram tile (never a broken image). This sat under Strategy Mind's logo for weeks before #494 fixed it. primaryAppmust be one ofapps:—pnpm sidecars:checkenforces it, and repos carrying the sidecars test assert "assets + several apps ⇒ primaryApp ∈ apps" (seescripts/adult-sidecars.test.tsin strategy-4-kids for the guard to copy).
Set it right next to assets:; site is the usual answer (the front door).
Recipe: give a product its icon on blueforge.studio/apps
- Make the mark — a ~512 px flat image (
generate-product-art.js --kind=logo, or a hand-madebrand/logo-512.webp; prompt gotchas below — check every output by eye, SVG<text>renders blank). - Declare it —
assets.logo: <repo-relative path>, plusprimaryApp:wheneverapps:has more than one entry (rule above). The schema is strict: no invented keys. - Land the PR — the deploy of
primaryAppuploads by sha256 after a successful deploy. ThatPUTis operator-token-only; agents never call it themselves, and an upload failure only warns. - Verify —
GET https://blueforge.studio/api/products/<id>/assetsmust list"kind": "logo", or runnode scripts/assets-gap-report.mjsin blueforge (read-only; two views: uploaded vs resolved). Until then the card shows the monogram — the failure signature of an unownedassets:block, not a broken image. Alternative: declare noassets:at all and let head-discovery on registration pick up the live site's icon/og:image, or ship a bundledpublic/images/products/<id>/. - Local gates —
pnpm sidecars:check(paths exist,primaryApp ∈ apps) plus the sidecars test if the repo has one.
Annotations do not exist. There is no annotation, callout or overlay field and no tool. The only text tied to
an image is label, caption and alt. Do not invent a field (strict schema). If annotated shots are wanted,
that is a schema + site change in blueforge-org / blueforge, and until then annotations would have to be baked
into the image file by hand.
House rule: take every screenshot in both themes, label it (id, label) and write real alt and caption.
Both variants share the id.
How assets are produced
| Kind | Tool | Notes |
|---|---|---|
| cover, og, logo (AI art) | scripts/generate-product-art.js in blueforge |
Replicate black-forest-labs/flux-schnell, 16:9. REPLICATE_API_TOKEN=… node scripts/generate-product-art.js --kind=cover|logo|og --out=/abs/path --hint="…" [--dry-run] or --batch=<name>. |
| og card without AI | scripts/generate-missing-og.mjs |
text-on-gradient 1200x630, sharp only. Output goes to public/images/products/<id>/ (bundled fallback). |
| screenshots | scripts/capture-screenshots.mjs; per-repo pair capture |
see below |
Prompt gotchas (from the script's own comments):
- Hints must describe unmarked scenes. If the subject structurally has lettering (screen, dashboard, chart, gauge, blueprint, sign) FLUX returns garbled pseudo-text despite "no text". Check every output by eye.
- A logo glyph must be saturated: FLUX "white" is ~240-250, so a pale mark on white keys out to blank.
- Generate a 2000x1250 cover master; normalize crops covers at 16:10.
- SVG logos with live
<text>render blank server-side. Use a flatbrand/logo-512.webp. generate-logos.js/generate-blog-covers.jsare for bundled site art, not for sidecar repos.
Screenshots in light and dark
- Generic:
node scripts/capture-screenshots.mjs --themes light,dark [--surface site|app] [ids…] [--no-write](Playwright chromium 1280x800, 2x, reduced motion; dark isemulateMedia({colorScheme:"dark"})+ 600 ms settle). Its--pushuploads light only, and the weekly job runs--pushonly, so it does not produce dark pairs. - Real pairs: the pattern in
linguaquest/scripts/quest-audit/product-shots.mjs. It captures each screen withcolorScheme: variantand writes the app's own theme to localStorage, converts tobrand/*.dark.webp/*.light.webpat q88, and rewrites the sidecar block. Needs sidecar-schemas >= 0.35.0. Copy this for other repos. - Site selection (
src/lib/screenshot-theme.ts): one shot per group matching the visitor's theme (OSprefers-color-scheme, overridable by the Dark/Light toggle, stored inbf-shot-theme); a lone variant shows regardless of theme; untagged shots always show. The toggle renders only when a pair exists. SSR/first paint is dark.
Upload, normalize, approve, serve
- forge-control uploads after a successful deploy, only for assets whose sha256 changed:
PUT /api/products/:id/assets/:kind[?slot=N]. Screenshots are positional: slot = index in the declared list. Upload failures are warnings, not failed deploys.id/label/caption/alt/varianttravel with the registration. - Normalized to webp (
src/lib/assets/normalize.ts): logo 512/128/96/64; og 1200x630, 512x320; cover 2048x1280 down to 320x200; screenshot 1024x640, 640x400, 512x320. 10 MB cap. - Approval gate: new uploads are
pending. With the gate on, unapproved renditions 404 to anonymous callers and the last approved version keeps serving. FlagsVISION_GATEWAY_ENABLED,APPROVAL_AUTO_ENABLED,APPROVAL_GATE_ENABLED(all off by default, ramped one per deploy). Rejection always needs a person. - Resolution order: uploaded asset, then asset discovered from the live site
<head>, then bundledpublic/images/products/<id>/. Screenshots are never used as a cover (operator ruling 2026-09-24).
Doc drift found (the code wins)
asset-sync.md:59-67lists fewer renditions thannormalize.ts;:113-123still lists a screenshot as a cover fallback.sidecar-standards.md:158-165says four kinds and omitshero. The strictassetsschema has noherokey.sidecar-standards.mdandasset-sync.mdshow screenshots as bare strings; the schema declares an object, so write objects.- UNVERIFIED: the marketing-os social-card source mentioned in the blueforge CLAUDE.md was not found in this repo.