# Build a Project Type

Assemble and configure an ordered sequence of version-pinned Blocks.

## Start from a workflow
Open [Project types](/marketplace/project-types) to inspect an existing type, or choose **Project type template** in the builder. Describe the workflow in chat or arrange the ordered list directly.

## Add and configure Steps
Use **Add Step** at an insertion position to browse Blocks, import a package, or create the missing capability with AI. Each instance keeps its own ID, label, configuration, enabled state, and exact Block version.

## Automatic insertion
`insertStep(type, package, index, catalog)` verifies both neighboring primary connections. It preserves secondary connections and returns a new type definition. It never mutates the original. `insertionLocations(type, package, catalog)` reports compatible positions when insertion fails.

## Persisted structure
The JSON `stages` array stores ordered Steps. Each includes `id`, `blockId`, `version`, and `label`; optional fields include `config`, `enabled`, and `condition`. Embedded SDK Blocks live in `packages`. Explicit `connections` are the technical representation of typed relationships.

A custom Block's declared `script` output can explicitly connect to Voiceover's `input`. Run the Block, then review and apply its script in Voiceover; this does not generate audio or require a Canvas node. See [script handoff](/docs/build/script-handoff) for the connection and acceptance rules.

## Scaffold and test outside the app
```sh
node packages/block-cli/cli.js create-type my-type.json
node packages/block-cli/cli.js validate my-type.json
node packages/block-cli/cli.js test my-type.json
node packages/block-cli/cli.js preview my-type.json
node packages/block-cli/cli.js pack my-type.json my-type.stillmade.json
```
The SDK includes `examples/text-workflow.stillmade.json`. Host workspaces use existing project context and controls; switching to a Step does not automatically call a paid generation provider.

## Protect existing projects
Saved projects retain their pinned type definition. Installing a newer type never silently replaces a workflow in progress. See [conditions](/docs/project-types/conditions), [testing](/docs/project-types/testing), and [versioning](/docs/distribute/versioning).
