Spec 03
Tools
Pin 08 of 12
Pin08
generate_project
Generate project · shape workflow · group Build
Generate a deterministic React + TypeScript + Tailwind + Vite project from the UI DNA document: semantic HTML, components extracted from fingerprint matches (with generated names for you to rename), tokens as CSS variables and a Tailwind theme, observed transitions as React state with the same ARIA attributes. Assets that are not authorized become labeled placeholders. Installs (from the npm registry) and builds the project unless told otherwise and returns the paths of the install and build logs. Generated files in outDir are overwritten; other files are kept.
CLI
uidna generate <scanId> <outDir>MCP
generate_project03.08.1Effects
Writes artifactsunder the scan directory
Destructiveoverwrites generated files
Idempotentsame input, same output
Networkreaches the network
Long-runningprogress and cancellation
03.08.2Input
| Field | Type | Required | Description |
|---|---|---|---|
scanId | string | required | Scan id returned by scan_interface, e.g. scan_20261013_3f9a1c. |
outDir | string | required | Directory for the generated project. Created if missing; existing generated files are overwritten, other files are kept. |
router | "none" | "react-router" | optional | How pages are wired: "react-router" (default when the document has more than one page) or "none". |
behaviorTests | boolean | optional | Also write Playwright tests that replay every recorded transition against the generated app. Default true. |
install | boolean | optional | Run npm install. Default true. |
build | boolean | optional | Run the production build after install. Default true. |
outRoot | string | optional | — |
03.08.3Result fields
scanIdprojectPathfilescomponentsplaceholdersmocksinstallbuildEvery field arrives inside the evidence envelope.