PlotDirector/docs/phases/Phase-21D1-Automatic-Starter-Illustration-Generation.md

54 lines
1.8 KiB
Markdown

# Phase 21D.1 - Automatic Starter Illustration Generation
## Summary
Phase 21D.1 changes the Illustration Library starter workflow from a two-step planning and queuing process to one admin-confirmed action: `Generate Starter Library`.
The action creates any missing starter specifications, queues eligible planned or failed starter items, skips successful or already-running items, and lets the existing background worker generate images after the browser closes.
## One-Click Workflow
Admin route:
`/admin/story-intelligence/illustration-library`
The primary action is `Generate Starter Library`. It confirms the number of character, location and asset images that will be queued.
Eligible starter items are:
- Missing starter specifications
- Existing `Planned` starter items
- Existing `Failed` starter items
Skipped starter items are:
- `Queued`
- `Generating`
- `Generated`
- `Approved`
This prevents accidental duplicate submissions and avoids regenerating successful artwork unnecessarily.
## Prototype Activation
The development Story Intelligence prototype resolves starter illustrations in this order:
1. Approved starter illustration
2. Generated starter illustration
3. Existing SVG fallback
This is limited to the development prototype route and does not weaken future production approval workflows.
## Configuration Diagnostics
The OpenAI image provider now reports specific missing settings without exposing secrets:
- OpenAI API key
- image-generation model
The local development service has `OpenAI__ApiKey` configured through `/etc/plotdirector/plotdirector.env`, but no image-generation model setting is currently present.
## Tests
The test harness now covers starter generation planning, duplicate protection for successful starter items, failed-item retry eligibility and provider missing-configuration diagnostics.