Skip to content

One run. Written, booted, checked, running.

A generation is not finished when the code appears. It is finished when the app is answering on a URL and the build has been verified inside the container that serves it.

What happens between the sentence and the URL.

Six stages, in order. The numbers matter here because the sequence is the point.

  1. 01

    Klego reads before it writes

    Every prompt gets a review pass first: the project's own klego.md, the routes and components that already exist, and the saved workflows. A focused request stays focused because the agent knows what it is touching.

  2. 02

    Files are merged, not replaced

    Generated file actions are merged over the previous version, so anything the model did not mention survives. Every route that ships a page also gets its loading state.

    app/leads/new/page.tsx      created
    app/leads/new/loading.tsx   created
    app/api/leads/route.ts      created
    package.json                unchanged
    
  3. 03

    The connector is prepared first

    If the request needs Salesforce, Gmail, Outlook, Slack or Teams, the workflow is created or refined before the app code is written — so the generated route calls a contract that already exists.

  4. 04

    It boots in a container

    Dependencies install, the dev server starts behind an access gate, and readiness is a real HTTP response from the mapped port — not an open socket.

  5. 05

    The build is verified inside it

    A type-check runs in the container. Genuinely missing packages are installed; remaining compile errors go back through a bounded repair pass before the run reports success.

    tsc --noEmit               2 errors
    install lucide-react       ok
    repair pass 1/2            resolved
    preview synced             ready
    
  6. 06

    You answer, it continues

    The next sentence lands on the same version, in the same container. Only a dependency change restarts anything.

When something breaks, it says so.

A fatal build or runtime error surfaces as a plain-language callout above the composer, with the raw log behind a disclosure. A missing package offers a one-click install. Nothing hides the failure behind a spinner.

preview repair
Module not found: Can't resolve 'recharts'
 
→ Install recharts and restart the preview
  one click, one new version, one restart
 
Type error in app/leads/new/page.tsx:41
 
→ Fix with Klego
  routed through the repair agent, then re-checked

Start with one sentence.

You will know within a minute whether it understood you.