Skip to content

Relax reviewer for narrative-referenced creatures + add starry-sky body background#8

Open
asofio wants to merge 1 commit into
mainfrom
reviewer-creatures-and-body-bg
Open

Relax reviewer for narrative-referenced creatures + add starry-sky body background#8
asofio wants to merge 1 commit into
mainfrom
reviewer-creatures-and-body-bg

Conversation

@asofio
Copy link
Copy Markdown
Contributor

@asofio asofio commented May 21, 2026

What

Two scoped changes from all-features brought to main (nothing else):

1. Reviewer no longer flags narrative-mentioned creatures (backend/app/prompts.py)

Problem: A scene whose text described "wobbling" creature silhouettes had those creatures removed during the revision pass. The PER_PAGE_REVIEWER only listed human-shaped background figures ("crowds, townspeople, neighbours, soldiers") as acceptable, so it treated narrative-referenced creatures as unauthorized characters. The STORY_ARCHITECT prompt also baked a self-contradicting negative constraint into every image_prompt ("Do not include any other animals or living creatures…" immediately followed by "…background figures are acceptable when the narrative describes them"), which both reinforced the reviewer's strict reading and steered the image generator away from creatures the text called for.

Fix:

  • PER_PAGE_REVIEWER_INSTRUCTIONS: expand the allowed-background-figures list to include animals, birds, insects, fish, fantastical creatures, etc. Make explicit that creatures referenced in the page text/scene description are EXPECTED in the illustration and must not be flagged. The only real failure is a NEW named prominent character.
  • STORY_ARCHITECT_INSTRUCTIONS: rewrite the per-image negative constraint to forbid inventing NAMED characters only, and welcome narrative-referenced background creatures as small, unnamed, secondary figures.

2. Starry-sky body background + readability fixes

  • frontend/src/styles/global.css: body uses bodybackground.png (cover/center/fixed); .app-header gets a bottom-edge mask so the sky imagery feathers into the matching navy body color.
  • frontend/src/components/StoryBook.module.css: .title and .meta switch to white with text-shadow so they stay legible on navy. Scoped .actions :global(.btn-secondary) override gives the Save Story / Create Another Story buttons a translucent light-on-dark treatment, with a hover that flips to solid white. The override is scoped to .actions so other uses of .btn-secondary inside white cards (e.g. the "Try Again" button) are untouched.

Scope guardrails

  • --color-bg (CSS var consumed by form inputs in 9 places) is not touched. Body color is applied directly on html, body.
  • No backend logic changes — prompt strings only.
  • No other features from all-features included (TTS, Wikipedia RAG, activity pages, OTEL, Foundry hosting, demo stories, etc. all stay out of main).

Verification

  • python3 -c 'from app import prompts' — imports cleanly.
  • npm run build in frontend — clean (CSS + asset bundled).

Follow-up

When this merges, re-run python -m app.scripts.provision_foundry_agents against the Foundry workspace so PerPageReviewerAgent and StoryArchitectAgent pick up the new instructions. (For local-hosted agents the change takes effect immediately.)

…dy background

Reviewer / Architect prompts (backend/app/prompts.py)
- PER_PAGE_REVIEWER_INSTRUCTIONS: expand the allowed background-figures
  list to explicitly include animals, birds, insects, fish, and other
  creatures. Make it clear that creatures referenced in the page text or
  scene description are EXPECTED in the illustration and must not be
  flagged as 'unauthorized characters'. The only real failure is a NEW
  named prominent character not in character_descriptions.
- STORY_ARCHITECT_INSTRUCTIONS: rewrite the per-image negative constraint
  that was previously self-contradicting ('no other animals or living
  creatures' immediately followed by 'background figures are acceptable
  when the narrative describes them'). The new wording forbids inventing
  NAMED characters only, and welcomes narrative-referenced background
  creatures as small, unnamed, secondary figures.

Body background (frontend/src/styles/global.css)
- Apply a starry-sky body background image (bodybackground.png) with
  cover/center/fixed attachment; #0e1e74 fallback.
- Add a bottom-edge mask gradient to .app-header so the sky imagery
  fades into the matching navy body background.

Readability on dark background (frontend/src/components/StoryBook.module.css)
- StoryBook .title and .meta now use white text with text-shadow so they
  remain legible on the navy body background.
- Scoped :global(.btn-secondary) override inside .actions for the Save
  Story / Create Another Story buttons (white text, translucent panel,
  hover flips to solid white). Scoped so .btn-secondary used inside
  white cards elsewhere (App.jsx Try Again) keeps its dark text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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