Skip to content

How prompting works

Trace a prompt through action routing, context selection and file changes. Understand how VoxelSite prepares requests for your AI model.

Updated October 23, 2026 10 min read

VoxelSite’s built-in AI prepares requests with instructions and selected private draft context. It chooses an action, fits the context within a budget and processes the model’s output into draft changes.

This pipeline needs a configured Studio AI provider. An external agent using Studio MCP supplies its own model and uses the site’s rules, context and review tools. It does not trigger the built-in Router, generation or post-generation AI reviews.

Use this reference to understand what context reaches the model and where to inspect a request when the result differs from your instructions.

The pipeline

Generation requests follow the stages below. With AI Router on, VoxelSite first asks Jev to assess the request and select a model tier and prompt recipe. Questions can take a read-only path; explicit no-change requests and some exact text replacements need no writing-model call.

The normal generation path has five stages:

  1. Action detection - choose instructions for the task.
  2. Context assembly - select website files and saved facts.
  3. Budget management - fit the context within the model limit.
  4. Generation - the AI produces output with real-time progress
  5. Post-processing - files are written, CSS is compiled, quality is checked

Action detection

A typo fix and a new site use different instructions and context. The selected action controls those choices.

VoxelSite routes your prompt to a specialised action type based on how you triggered it:

Action Triggered by What it does
Create Site "Build a complete website" or the create action Generates an entire multi-page site from scratch
Edit Page Describing changes in the chat Requests changes to the selected pages
Change Design "Change the colour scheme" or design-focused prompts Adjusts design tokens and visual styling
Visual Edit Clicking a section in the visual editor and describing a change Edits a single section in context
Add Section The + button in the visual editor Generates one new section matching the site's design language
Inline Edit Cmd+K in the code editor Modifies a specific block of code within a file
Import Site Attaching a website URL in the create flow Interprets a reference site's design language and builds a new site inspired by it
AEO Optimise The optimise action Audits and improves structured data and AI discoverability
Restyle "Restyle my site" (optionally with a reference URL) Requests a new visual design using existing content
Free Chat Typing anything that doesn't match a specific action The AI interprets the request using the available site context

Each action type carries its own instruction set, context profile, and output budget. A visual section edit gets a compact, focused prompt and a tight context window. New-site generation uses the full system instructions and an output budget bounded by your saved ceiling and the selected model's limit.

The selected action changes which instructions, website context and output limit reach the model.


Context assembly

Before sending the prompt, VoxelSite builds a context package from selected site files and stored information.

What goes into context

Section What it contains Why the AI needs it
Site Information Business name, type, tagline Identity - the foundation of all content
Design Tokens Your :root custom properties (colours, fonts, spacing) Visual consistency across changes
Current Page Focused page source, when its context tier fits Supplies the existing markup
Page Map Section summaries for up to 10 pages, excluding the focus page Supplies bounded cross-page context
Navigation & Footer Current nav and footer HTML Provides shared markup for new pages
Site Memory Business facts the AI has learned (details) Consistency - no need to repeat yourself
Design Intelligence Design decisions and rationale (details) Coherent aesthetic across sessions
Image Library Available images with encoded metadata (tone, mood, subject) The AI selects visually appropriate images
Form Schemas Existing form definitions Data-driven form awareness
Data Layer Structured data files (services, menus, team members) Cross-file consistency
Data Dependencies Detected references to data files Identifies related files to review
CSS Design tokens and compiled styles The AI stays within the existing visual system
Design Direction New sites only: a drawn brief covering hero style, type pairing, palette, accent hue, layout, corners, motion, and one signature move (details) Variety has to come from outside the model; your words and style choice override the draw

Not every action needs all of this. A section edit doesn't need the full image library. An inline code edit doesn't need form schemas. The action type determines which sections are assembled.

Priority tiers

Context sections are ranked into three priority tiers:

  • Essential - site information, design tokens, saved memory, design notes, page manifest, header, navigation and footer
  • Important - focused or reference page source, image library, form schemas, data files, dependencies and active actions
  • Optional - included last: full compiled CSS, icon reference

If the budget is tight, optional sections are dropped first, then important, keeping essential information intact. Check the request log to see what context reached the model.

Conversation continuity

VoxelSite sends recent user and assistant messages as conversation history. For a follow-up such as "make it darker", name the page or element when earlier context may no longer fit.

History is automatically trimmed to the most recent exchanges to stay within the context budget.


Budget management

A model's context window limits the combined input and output. The instructions, history and reserved output reduce the space available for website context.

VoxelSite calculates the available budget automatically:

Available context = Model's context window
                  − Selected system and action instructions
                  − Output reservation (effective output limit)
                  − Conversation history
                  − Safety buffer

The output reservation uses the same effective limit sent to the provider. VoxelSite never raises your saved Max Output Tokens ceiling to meet an action's default. Section edits, new sections, and focused AI Router edits are capped at 16,000 output tokens, with lower saved or model limits taking precedence. Settings → Output limits shows the values for your selected model.

Action-specific budgets

For focused actions, VoxelSite caps the context budget. The limits depend on the action:

Action Budget Why
Create Site Model budget Builds the requested pages and shared files
Import Site Model budget Includes fetched reference HTML
Edit Page Full Content and design changes may touch multiple files
Change Design Model budget Includes design context within the available space
Restyle Full Changes the visual design across pages
Section Edit Capped (40K chars) One section, one page - focused context
Inline Edit Capped (40K chars) One code block, one file - even more focused
Add Section Capped (40K chars) Matching the site's design language with minimal context
AEO Optimise Full Audits structured data across the whole site
Free Chat Full Could be anything - the AI decides

When the budget is capped, the progressive trimmer drops lowest-priority sections first. For a capped inline edit, icons, CSS and important sections can be omitted. Focused page source is in the Important tier. Check the context metrics in the log.

Check the context sent

  • VoxelSite calculates the budget. The calculation uses the action type and model.
  • A smaller budget includes less context. VoxelSite drops lower-priority sections first. Check the result when an edit depends on several files.
  • Focused actions use less context. Section edits and inline code edits have a capped context budget. Response time still depends on the model and request.
  • The logs show what happened. Check _studio/logs/ for the configured and effective output limits, the selected model's limits, and the context sections included or trimmed.

System prompt engineering

Full generation uses the system prompt below. Focused editing routes use compact instructions; question and classification paths have separate instructions. It defines the rules for code generation, design standards, architectural patterns, and quality expectations.

The full generation instructions cover:

  • Architecture rules - PHP partial structure, file organisation, how pages compose
  • Design mandate - Typography hierarchy, colour theory, spacing rhythm, animation philosophy
  • Design direction and one signature move - a drawn direction block gives the model a brief for the new site, including a distinct visual element
  • Website copy, AI tells and subtraction - specific copy in the site's language, a list of patterns that read as machine-made treated as defects, and a pass that removes decoration without a job before anything is output
  • CSS strategy - Tailwind utility classes in HTML, design tokens in :root, no component classes in the stylesheet
  • Data patterns - JSON data files, Schema.org markup, form handling
  • Memory system - How to store and recall business facts, track confidence, handle rejected directions
  • Design intelligence - How to track and reuse design decisions across sessions
  • Quality guardrails - Accessibility, responsive behaviour, semantic HTML, no external dependencies

Action prompts

Each action type receives a supplementary action prompt that adds task-specific constraints on top of the system prompt. Some examples:

  • Section edit - preserve design language, stay within existing Tailwind classes, maintain responsive breakpoints, modify only the target section
  • Add section - generate one new section matching the site's existing design language, fonts, colours, and spacing rhythm, without inventing names, numbers, or ratings the site does not already contain
  • Inline edit - scope control (modify only what was asked), pattern preservation (match existing code style), file-type-aware rules (different rules for PHP, CSS, JS, and data files)
  • Edit page - use Site Memory for business facts, update Design Intelligence when making visual changes, sync data files when editing structured content
  • Create site - follows the drawn design direction as the client's brief, starts lean, and records the direction in Design Intelligence
  • Import site - interpret a reference website's design language and translate it into clean Tailwind CSS
  • Restyle - request a new visual design using existing content
  • AEO optimise - audit structured data, Schema.org markup, and AI discoverability endpoints

Customising the system prompt

Advanced users can view and edit the system prompt directly in the Code Editor. Your customisations live in _studio/custom_prompts/, which the ZIP updater excludes. Back up your overrides before updating. Reset to the default at any time with the reset button in the file tree.


Image library intelligence

VoxelSite ships with a built-in library of background textures, gradients, and gallery images. Each image filename encodes structured metadata - subject, mood, tone, contrast - that the AI reads to make appropriate visual selections.

For example, a background image might be tagged as warm · texture · earthy · light, while a gallery image might carry food · coffee · warm · high-contrast. When the AI builds your site or adds a section, it picks images that match the mood and tone you've established.

Upload your own images and name their paths when requesting replacements. The prompt asks the model to prefer uploaded assets.


Real-time progress

During generation, VoxelSite streams results in real-time. You see exactly what the AI is doing:

  • Timer - elapsed time since generation started
  • Current step - what phase the engine is in (reading, generating, writing, compiling)
  • Token count - how much the AI has generated so far
  • Stop button - cancel generation at any time

The chat, the visual editor and the code editor's inline AI share a full-page progress overlay - a centred status card with a backdrop that blocks the entire interface during generation. The overlay shows progress and keeps other Studio controls disabled during generation.

Steps you'll see

Step What's happening
Reading your site… Building context from your current files
Generating… The AI is producing output
Creating [filename]… A specific file is being generated
Writing files… Saving generated files to your preview
Compiling styles… Running Tailwind CSS compilation
Reviewing quality… Expert review (if enabled) is running
Reviewing design… Design review (if enabled) is running
Finalising… Post-processing and cleanup

Post-processing

After the AI finishes generating, VoxelSite runs several automated steps before showing the result:

  1. File validation - paths are checked for safety (no directory traversal, no writes to system directories)
  2. Auto-repair - common AI model mistakes are automatically fixed (CSS encoding issues, PHP escaping, structural errors)
  3. Icon resolution - icon name aliases are normalized (e.g. home → house), unresolved icon names are logged, and the icon hydration script is ensured in the footer
  4. Tailwind compilation - CSS utility classes used in the HTML are compiled into a clean stylesheet. This runs on a built-in PHP compiler - no Node.js or build tools needed.
  5. Revision capture - file operations can record before/after state for undo. Check the request result and available history
  6. Page registry sync - the site map and page structure are updated
  7. Draft schema refresh - the private schema partial can update with draft content. Public discovery outputs such as llms.txt, robots.txt and mcp.php are generated for the prepared publication
  8. Reviews - when enabled in Settings, Expert review checks for defects and Design review scores the design; both report into the Expert Review panel in the chat

Check the response for partial output, file warnings or failed checks. Open the affected pages in preview before publishing. Draft CSS, scripts and data remain separate from their live copies.


Verify the result

The context and instructions shape what the model can change. Action routing selects instructions, context budgets limit the files sent, and stored facts help carry business details between requests. Post-processing can correct some output errors.

Check the preview and changed files before publishing. These mechanisms do not prove that a generated page is correct, accessible or ready for visitors.


Found a mistake in these instructions? Open an issue.

Download VoxelSite