ข้ามไปยังเนื้อหาหลัก
BlueForge

Agent pack

Product imagery: covers, logos, screenshots

How promotion imagery is made, declared and served into the catalog.

Rendered from docs/agent-pack/imagery.mdrelease v0.2.0Edit on forge-git

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 " screenshot N". Pairing is by 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, no primaryApp needed.
  • several apps: and no primaryApp — 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.
  • primaryApp must be one of apps: — pnpm sidecars:check enforces it, and repos carrying the sidecars test assert "assets + several apps ⇒ primaryApp ∈ apps" (see scripts/adult-sidecars.test.ts in 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

  1. Make the mark — a ~512 px flat image (generate-product-art.js --kind=logo, or a hand-made brand/logo-512.webp; prompt gotchas below — check every output by eye, SVG <text> renders blank).
  2. Declare it — assets.logo: <repo-relative path>, plus primaryApp: whenever apps: has more than one entry (rule above). The schema is strict: no invented keys.
  3. Land the PR — the deploy of primaryApp uploads by sha256 after a successful deploy. That PUT is operator-token-only; agents never call it themselves, and an upload failure only warns.
  4. Verify — GET https://blueforge.studio/api/products/<id>/assets must list "kind": "logo", or run node scripts/assets-gap-report.mjs in blueforge (read-only; two views: uploaded vs resolved). Until then the card shows the monogram — the failure signature of an unowned assets: block, not a broken image. Alternative: declare no assets: at all and let head-discovery on registration pick up the live site's icon/og:image, or ship a bundled public/images/products/<id>/.
  5. 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 flat brand/logo-512.webp.
  • generate-logos.js / generate-blog-covers.js are 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 is emulateMedia({colorScheme:"dark"}) + 600 ms settle). Its --push uploads light only, and the weekly job runs --push only, so it does not produce dark pairs.
  • Real pairs: the pattern in linguaquest/scripts/quest-audit/product-shots.mjs. It captures each screen with colorScheme: variant and writes the app's own theme to localStorage, converts to brand/*.dark.webp / *.light.webp at 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 (OS prefers-color-scheme, overridable by the Dark/Light toggle, stored in bf-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/variant travel 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. Flags VISION_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 bundled public/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-67 lists fewer renditions than normalize.ts; :113-123 still lists a screenshot as a cover fallback.
  • sidecar-standards.md:158-165 says four kinds and omits hero. The strict assets schema has no hero key.
  • sidecar-standards.md and asset-sync.md show 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.

ติดตามข่าวสาร

บันทึกการอัปเดตและสิทธิ์เข้าใช้ก่อนใคร

ส่งอีเมลหนึ่งฉบับเมื่อมีอะไรใหม่ปล่อยออกมา: ฟีเจอร์ใหม่ของแพลตฟอร์ม แอปใหม่ และคำเชิญร่วมงานเปิดตัว เข้าร่วมรายชื่อรอเพื่อรับสิทธิ์ใช้งานก่อนใครสำหรับการสมัครด้วยตนเองและเว็บไซต์โปรโมชัน

ไม่มีสแปม ยกเลิกการรับได้ด้วยคลิกเดียว