Skip to content

fix(build): independent style/mood rotation for auto-media prompts (#1018) - #1028

Merged
developer-ainative merged 1 commit into
mainfrom
fix/1018-media-style-variation
Oct 8, 2026
Merged

developer-ainative merged 1 commit into
mainfrom
fix/1018-media-style-variation

Conversation

@developer-ainative

Copy link
Copy Markdown
Contributor

Summary

  • buildBrandPrompt() sent one fixed, generic style phrase for every company, every run: 'Style: modern, clean, professional photography or illustration, high visual quality.' A fintech company and a children's toy company got identical style instructions, so even with [BUG] Recurring auto-media generation produces the same image every time — buildBrandPrompt() is fully deterministic #909's composition variation and the existing subject-matter grounding, every company's generated asset read as "the same overarching theme."
  • Adds STYLE_DESCRIPTORS, a second rotating style/mood axis analogous to VARIATION_DESCRIPTORS ([BUG] Recurring auto-media generation produces the same image every time — buildBrandPrompt() is fully deterministic #909) but independently indexed — styleIndex vs variantIndex — so a company can land on, say, composition-variant 2 + style-variant 0, rather than one combined rotation of fixed pairs.
  • buildBrandPrompt(mediaKind, brand, variantIndex?, styleIndex?) gains a 4th optional param. The old static style line is replaced (not just appended to) by the rotating descriptor, since it was never a grounding instruction, just inert filler. Both axes still layer on top of (never weaken) the existing "ground in what this company does" and "no on-image text" instructions.
  • MediaRoutine.lastStyleVariant persists the style rotation state the same way lastVariant already does; coerceRoutine/saveRoutine carry it; runMediaRoutines picks the next style index via the existing pickNextVariant helper and advances it forward independently of the composition index.
  • Out of scope (per the issue): the actual image/video model choice lives entirely in core — no model-selection lever exists on Builder's side.

Test plan

  • New unit tests in __tests__/lib/build/media-schedule.test.ts covering: STYLE_DESCRIPTORS shape, different style indices producing different prompt text, defensive out-of-range/missing index handling (never undefined/throws), grounding/no-text instructions preserved across every style variant, independence from the composition axis, and back-compat for 3-arg callers.
  • New unit tests in __tests__/lib/build/media-routine.test.ts covering the nightly-loop runner picking + persisting an independent lastStyleVariant, and baking it into the actual prompt sent to core.
  • npx vitest run — full suite: 530 passed / 3 failed files (6847 passed / 10 failed tests), identical failing files to a clean main baseline (BuildApp-protected-screens.test.ts, agent-runtime.test.ts, agent-test-runner-341.test.ts — all pre-existing, unrelated to this change; verified via git stash against main).
  • npx tsc --noEmit — clean, no errors.
  • Merge → verify on core-staging (Railway auto-deploy) before any production promotion, per repo policy.

…1018)

buildBrandPrompt sent one fixed, generic style phrase ("modern, clean,
professional photography or illustration, high visual quality") for
every company, every run — a fintech company and a children's toy
company got identical style language. Subject grounding and the
composition/framing variation axis (#909) were already real and
working; this was the remaining gap.

Adds STYLE_DESCRIPTORS, a second rotating style/mood axis analogous to
VARIATION_DESCRIPTORS but independently indexed (styleIndex vs
variantIndex) so a company can land on, say, composition-variant 2 +
style-variant 0 rather than one combined rotation of fixed pairs.
Threaded the same way lastVariant already is: MediaRoutine gains
lastStyleVariant, coerceRoutine/saveRoutine persist it, and
runMediaRoutines picks the next style index via the existing
pickNextVariant helper and advances it forward alongside (not
conflated with) the composition index.
@developer-ainative
developer-ainative merged commit 410320e into main Oct 8, 2026
1 check passed
@developer-ainative
developer-ainative deleted the fix/1018-media-style-variation branch October 8, 2026 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant