AI Context & Iterations

Meku remembers context across prompts. This page covers how context is managed, how to refine step by step, and how to add technical context such as APIs and database schemas.

Meku remembers context across projects, allowing you to build web apps and sites step by step, without losing progress. Iterations refine the project incrementally using prompts, rather than starting from scratch each time.

This page explains how context works, how to use iterations effectively, and how to add technical details for better results.

How Context Works

When you create a project, Meku stores the generated components, structure, and styles in context. Each new prompt is applied on top of this context.

Create a landing page with a hero section that includes a headline, subheading, and primary call-to-action button. Add a top navbar with logo and links: Home, Features, Pricing, Contact.  

Meku generates a hero and navbar with the specified details.

blog image
Add a pricing section with three plans: Free, Pro, and Growth. Place it below the hero section.  

Instead of rebuilding the page, Meku adds the pricing section below the existing hero.

Key point: Context ensures Meku builds on what already exists instead of starting over.

Iterating with Prompts

Use short, focused prompts to refine features.

- Change the navbar background to white with shadow-sm.  
- Update the hero button to use bg-indigo-600 hover:bg-indigo-700.  
- Add a testimonials section with three customer quotes below the pricing section.
blog image

Each iteration updates the preview while keeping the existing structure intact.

Adding Technical Context

Meku can utilize schemas, APIs, and data models when they are provided in prompts.

Database schema example:

Use schema: users(id, name, email, created_at).  
Generate a CRUD interface with a table to list users and a form to add and edit users.  

API example:

Connect to REST endpoint /api/orders.  
Fetch and display a paginated table with columns: id, user_id, total, created_at.

Design context example:

Apply minimal design with whitespace, rounded-lg cards, and consistent padding across all sections.  

Adding technical details ensures the generated code aligns with the stack.

Handling AI Drift

Sometimes iterations may drift from the intended design or functionality.

Causes:

  • Prompts are too vague.
  • Multiple changes packed into one request.
  • Ambiguous instructions.

Fixes:

  • Rephrase the prompt with specifics.
  • Break down changes into smaller steps.
  • Roll back to a previous point using the restore button if needed.

Best Practices

Follow these guidelines to get reliable results when working with context and iterations.

  • Start with a broad but specific prompt, then refine gradually.
  • Use clear, action-driven instructions.
  • Add technical context early (schemas, APIs, design system).
  • Save and export regularly to prevent losing stable versions.
  • Review results after each iteration before moving forward.

Applying these practices helps you avoid drift and keep the project consistent as it grows.

AI Context & Iterations - Documentation | Meku.dev