IRIS-1329
Build production-quality Codex landing page generation pipeline Open Jira Primary keyword: hvac answering service
Goal
Complete the Dot-Fun/agent-landing-page repo by replacing the fallback-preview path with a real Codex-driven landing page generation pipeline for Iris. The pipeline must generate production-quality, self-contained HTML conversion-page previews using SEMrush research and Codex, validate them before review, and expose scorecards in the review UI.
Repository
/Users/alvinycheung/dotfun/agent-landing-page
Implementation Scope
Remove ENABLE_PREVIEW_FALLBACK, previewFallback(), fallback health UI, fallback docs, and fallback tests.
Replace ENABLE_CLAUDE_GENERATION with deterministic host-side Codex generation: worker queues generation, ensoprime runner invokes /opt/homebrew/bin/codex using /Users/alvin/.codex auth, Codex writes artifacts into the existing ticket artifact directory, and the Docker worker does not require mounted Codex auth.
Require SEMrush for Iris generation: query related keywords from the configured database, build keyword clusters and search-intent notes from volume/CPC/competition, and fail generation when SEMrush is unavailable or unusable for the target seed.
Generate self-contained HTML previews only. Each option must be a full conversion page with hero, pain/offer, proof, workflow, vertical-specific use case, CTA path, FAQ, metadata, and telemetry hooks.
Use Iris brand voice and design system paths as required inputs. No generated images in v1; use layout, CSS, icons, charts, and copy instead.
Ensure variants differ by strategy, layout, proof model, and copy structure.
Quality Gates
Reject placeholder, fallback, or test copy.
Require the first screen to clearly state audience, pain, offer, proof, and CTA.
Require SEMrush-informed title, headings, and sections without keyword stuffing.
Reject hype phrases and vague AI claims through Iris brand voice checks.
Run a browser render check confirming nonblank page, visible CTA, no obvious layout overflow, and iframe-safe rendering.
Auto-revise bad variants up to two times by feeding concrete validation failures back into Codex.
After two failed revisions, mark the generation job failed with the validation report.
Review UI
Add a scorecard next to each option iframe for conversion clarity, SEO depth, brand voice, visual quality, and validation warnings/failures.
Keep the existing keep/disable controls and launch button.
Store scorecard JSON with each option so the dashboard and audit trail explain why an option was accepted.
Test Plan
Unit tests: fallback env/function removed; SEMrush required failure path; SEMrush parsing and clustering; artifact validation rejects placeholders, missing CTA, missing SEO usage, and brand-voice violations; option scorecard persistence.
Integration tests: queued generation invokes host Codex runner abstraction; failed first draft triggers up to two revisions; third failure marks job failed; successful generation creates three options and scorecards.
Live E2E: create a real IRIS ticket with AUTOMATED_LANDING_PAGE_DEPLOYMENT; confirm Jira moves To Do -> In Progress; confirm SEMrush research is present in scorecards; confirm three high-quality previews render in Chrome at multi-variate.dotfun.co; confirm keep/disable persists; do not enable launch-to-Iris production until generation quality is accepted.
Assumptions
Use Codex CLI on ensoprime, not direct OpenAI API calls. The deployed .env has no OPENAI_API_KEY, but ensoprime has Codex auth state.
No Gemini or image generation in v1. Gemini image generation exists through API models, but it requires a separate GEMINI_API_KEY/SDK path and is intentionally out of scope.
Self-contained HTML remains the review artifact; Iris Next route generation stays in the later launch step.
References
Gemini API image generation docs: https://ai.google.dev/gemini-api/docs/image-generation
Gemini CLI docs: https://google-gemini.github.io/gemini-cli/docs/