Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:21st dev Magic mcp Generation Review

From Leeroopedia
Knowledge Sources
Domains AI_Generation, Retrieval
Last Updated 2026-10-19 16:40 GMT

Overview

A retrieval pattern that reads back the code of a previously-generated UI (by generation id and take id), so drafts can be reviewed, selected, and installed.

Description

Generation review is the act of reading the stored output of an AI UI generation — the generation record (all takes/variants) and the code of a single take. It addresses the fact that generation is non-deterministic and produces variants: the caller must be able to inspect and choose among them before installing. Crucially, reads remain available even when AI access is off, so drafts created while AI was enabled stay reviewable after entitlement lapses.

Usage

Use this principle after `generate` has produced a generation, to inspect its takes and read the code of the one to install. Also use it to review existing sketch drafts regardless of current AI status.

Theoretical Basis

The core operation is a two-stage read:

# Abstract algorithm description (NOT real implementation)
generation = get_generation(generationId)   # list of takes with takeIds
take_code   = get_take(generationId, takeId) # source for one take

Reads are pure retrieval; they do not consume credits and are not gated by the AI entitlement (only generation is).

Practical Guide

  • Call `get_generation` first to list takes.
  • Then `get_take` for the chosen `takeId` to read its code.
  • Reads work even with AI off — use this to review old drafts.
  • After reading, install the code or iterate with another `generate` call.

Related Pages

Implemented By

Notes

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment