Skip to content

Create a prototype

New prototypes are copied from a template into prototypes/<slug>/ by the CLI. Fill in the fields to get the command — and a prompt for your coding agent.

This page cannot create files — it builds the exact command to run in your terminal (or to give your coding agent).

Template

No templates are indexed yet. Run pnpm protoyard index.

1. Run in the repository root

pnpm protoyard new <slug> --template <template>

2. Then start it

pnpm protoyard dev <slug>

Or paste this prompt into your coding agent

Create a new Protoyard prototype in this repository.

1. Run: pnpm protoyard new <slug> --template <template>
2. Read prototypes/<slug>/src/prototype.ts first, then AGENTS.md for the rules.
3. Build this idea: <describe the product, its users and the key flows>
4. Model the domain in src/database/schema.ts, write services in src/domain/ that
   validate input, check permissions with session.assert() and run inside
   environment.run() and a transaction.
5. Add scenarios (lifecycle, roles, empty/dense data, offline) in src/scenarios/ and
   keep generators deterministic (ctx.rng, ctx.faker, ctx.ids, ctx.time — never Math.random/Date.now).
6. Verify: pnpm protoyard validate <slug> && pnpm protoyard scenario validate <slug> && pnpm protoyard build <slug>