$npx -y skills add heymegabyte/claude-skills --skill 15-site-generationEnd-to-end AI website generation pipeline. Claude Opus 4.8 emits Bolt-style <boltArtifact> envelopes (multi-file, plan-first) that customize Vite+React+Tailwind templates from pre-researched business data. Pre-research via APIs, media acquisition, brand extraction, visual inspect
| 1 | # 15 — Site Generation |
| 2 | |
| 3 | Run the end-to-end AI website generation pipeline: research→media→Bolt artifact emission→R2 upload→D1 status for all business types. |
| 4 | |
| 5 | > **Model migration note (pass-78, 2026-06-09)**: `DALL-E` → **GPT Image 1.5** + `GPT-4o` → **GPT Image 2 vision**. Per `platform.openai.com/docs/deprecations`. Generation pipeline unchanged. |
| 6 | |
| 7 | ## Submodules |
| 8 | |
| 9 | - **research-pipeline** — API-driven business research, scraping, enrichment |
| 10 | - **media-acquisition** — image/video/logo sourcing across 17 engines (Flux 1.1 Pro Ultra, Ideogram 3.0, Recraft V3, GPT Image 1.5, Sora) — Pexels-first / AI-fallback, pHash dedup |
| 11 | - **build-prompts** — master prompt + enhancement phases |
| 12 | - **quality-gates** — Lighthouse CI v0.15+, axe-core / playwright v4.11+ WCAG 2.2 AA, source-parity diff, 3-tier visual regression, console-error gate, Recommendations Loop |
| 13 | - **domain-features** — category-specific for 18+ business types |
| 14 | - **template-system** — Vite + React + Tailwind + shadcn/ui starter |
| 15 | - **local-seo** — citation building, GBP sync, review generation, trust badges, local conversion tracking |
| 16 | - **bolt-artifact-protocol** — `<boltArtifact>` XML envelope spec — ordered file/shell actions, PLAN.md-first, runtime parser + executor, ~$6/site at 80K output tokens |
| 17 | - **blog-import.mjs** — RSS-first crawl + Squarespace JSON fallback → strip CMS residue → GPT Image 2 vision-mini typed-block restructure → pHash dedup → `src/data/blog-posts.ts` |
| 18 | - **validate-assets.mjs** — post-build R2/dist gate — 13 mandatory files + every img/link/script/source ref resolves OR matches allowlist |
| 19 | |
| 20 | ## Dual-Template Architecture (TWO REPOS — NEVER CONFUSE) |
| 21 | |
| 22 | - **Local Business**: `megabytespace/template.projectsites.dev` — Vite + React + Tailwind + shadcn/ui, 15 local components, CSS var brand slots. Use for: restaurant, salon, medical, legal, fitness, contractor, retail, etc. |
| 23 | - **SaaS**: `megabytespace/saas-starter` — Hono + D1 + Clerk + Stripe + Inngest + Resend on CF Workers. Use for: SaaS products, APIs, dev tools, platforms. |
| 24 | |
| 25 | ### Template selection (from `_form_data.json.category`) |
| 26 | |
| 27 | - `restaurant|cafe|salon|spa|medical|dental|legal|fitness|automotive|construction|photography|real_estate|education|financial|retail|pet_services|wedding|church|nonprofit|government` → `template.projectsites.dev` |
| 28 | - `saas|api|platform|devtool|marketplace` → `saas-starter` |
| 29 | - Unknown → local business |
| 30 | |
| 31 | ### Auto-sync |
| 32 | |
| 33 | After ANY change to skills 05-15, evaluate: "Does this improve template?" If yes → push to appropriate template repo same prompt. |
| 34 | |
| 35 | ## Generation Protocol |
| 36 | |
| 37 | Model emits ONE `<boltArtifact>` XML envelope with ordered `<boltAction type="file" filePath="…">` and `<boltAction type="shell">` actions. See `bolt-artifact-protocol.md`. |
| 38 | |
| 39 | - First action ALWAYS `PLAN.md` (route tree, design-token diff, media count, file count, validators) |
| 40 | - Runtime parser validates first-action-is-PLAN.md + required-files + `npm…build` shell action; failures re-prompt (max 2 retries) |
| 41 | - Executor modes: `container` (default — `git clone template → npm install → vite build → upload dist/`) | `r2-files` (pre-built static) |
| 42 | |
| 43 | ## Pipeline |
| 44 | |
| 45 | ``` |
| 46 | Phase 0: Pre-Research + Media Acquisition (ALL BUILD MODES) |
| 47 | → Google Places, scraping, social verification, brand extraction, media discovery |
| 48 | → Download ALL images from original; stock via Pexels/Pixabay; AI via GPT Image 1.5 / Stability AI |
| 49 | → YouTube/Pexels video embeds |
| 50 | → Output: _research.json, _scraped_content.json, _assets/ |
| 51 | → HARD GATE: <10 images = build NOT complete |
| 52 | |
| 53 | Phase 1: Claude Opus 4.8 Bolt-Artifact Emission (Worker OR Container) |
| 54 | → Reads all _ context files; emits ONE <boltArtifact> envelope |
| 55 | → First action ALWAYS PLAN.md |
| 56 | → Customizes pre-installed Vite+React+Tailwind+shadcn |