Skip to content

chore(llm): make system prompt opinionated for React + Tailwind - #11150

Draft
Misacripto wants to merge 1 commit into
stackblitz:mainfrom
Misacripto:misacripto-bolt-new-setup
Draft

chore(llm): make system prompt opinionated for React + Tailwind#11150
Misacripto wants to merge 1 commit into
stackblitz:mainfrom
Misacripto:misacripto-bolt-new-setup

Conversation

@Misacripto

Copy link
Copy Markdown

Why

Ensure generated UI projects follow a single, high-quality visual and technical standard (React + Vite, Tailwind CSS, lucide-react). This reduces variance in model outputs and guarantees the generated code is runnable in the WebContainer with consistent visuals similar to Lovable.

What

  • Adds mandatory stack and design rules to app/lib/.server/llm/prompts.ts (getSystemPrompt): requires React (Vite), Tailwind CSS, lucide-react, modular components, tailwind/postcss configs, and an explicit install step in artifacts.
  • No other runtime or parser logic was changed; this only tightens the system prompt the LLM receives.

Approach

The change embeds strict, machine-readable instructions inside the system prompt so streamed model responses will include the expected files (package.json, tailwind.config.js, postcss.config.js, src/index.css), modular React components, and an explicit <boltAction type="shell"> install command. This keeps generation centralized and avoids ad-hoc post-processing.

Notes for reviewers / caveats

  • The change affects all LLM-generated artifacts that rely on this system prompt. Verify phrasing for any unintended strictness (for example, when user explicitly requests a different stack).
  • Prefer pnpm when a pnpm lockfile exists; otherwise npm is used. Confirm this logic in integration tests if present.
  • No behavior changes to the streaming parser or action runner are included here; those remain backward compatible.

Files changed

  • app/lib/.server/llm/prompts.ts (system prompt updated)

Testing

  • Trigger a model generation that creates a UI project and confirm the output includes the package.json, Tailwind/PostCSS configs, src/index.css, modular components, and an install shell action as required.

Enforce React + Vite, Tailwind CSS, lucide-react, modular components, Tailwind/PostCSS configs, and install step in system prompt (prompts.ts).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@Misacripto
Misacripto marked this pull request as draft August 29, 2026 07:50
@Misacripto Misacripto changed the title llm: enforce React + Tailwind + lucide-react in system prompt chore(llm): make system prompt opinionated for React + Tailwind Aug 29, 2026
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