Setup Product
High-level orientation for turning Seed into a new product. This is the first-stop skill when the user is starting a fork — it sets direction and points at the lower-level skills that do the actual work.
Default stance
Edit lib/brand.ts and the product contract: schema strategy, OpenAPI/REST, MCP, CLI, skills, docs, and smoke. Don't reinvent the deployment, auth, or release machinery — it's already in the box. A new fork that touches Vercel config, the auth setup, or the release pipeline before it has a working schema strategy is almost always doing too much. Get the product identity in, decide what is strict versus flexible, generate the schema migration, push, validate the preview, then expand.
Stay agentic in product shaping. The repo enforces the few hard rails (no db:push, env parity, etc.) and lets you make every other decision in conversation with the user.
Use this skill when
Forking Seed for a new product, setting product identity, deciding what the minimal first slice is, or explaining the fork → ship path to a new collaborator.
Minimal path
Read WORKFLOW.md first for the root fork/build/deploy sequence. Use this skill for product setup decisions inside that workflow.
- Update
lib/brand.ts— product name, CLI name, public URLs. This is the seam between "Seed template" and "your product." - Define the schema strategy — classify data as platform-owned, product-owned, or user/agent-owned before editing
lib/schema.ts. - Prefer the product rails — put product metadata, schema, OpenAPI, and skills in
product/<slug>/, then runbun run product:generateandbun run product:check. - Define the product schema — edit
lib/schema.tswith org-scoped tables (every table that holds product data should haveorganizationId). Use strict columns for stable facts and flexible definitions/JSONB records for customizable fields, objects, and relationships. - Add API surface — see
add-api-endpointfor the OpenAPI-first flow. If the product supports customization, include schema discovery and mutation routes. - Add MCP tools and CLI verbs for the product's core headless actions. The CLI binary must match the product slug in
lib/brand.ts; flexible schema controls need MCP and CLI coverage too. - Publish product skills under
UnionStreetAI/skills/<product>/skills/*; use those public skills as the source for/skills,/docs, andllms.txt. - Build only required UI — headless products should not get a GUI unless the user explicitly asks for one. Public pages such as
/skills,/docs, auth, and billing must follow Union Street design. - Generate migrations —
bun run db:generate. Neverdb:push. - Run gates and headless smoke —
./scripts/gates.sh, Svix smoke, Stripe smoke when billing applies. - Provision live rails —
bun run product:provisioncreates/verifies GitHub, Vercel, Neon, env, domain, Svix, and Stripe. - Deploy and smoke —
bun run product:deploy,bun run product:smoke, thenbun run product:ship-report. - Push and validate the preview URL.
- Promote through staging → main — see
promote-deployment.
Hard rules
bun run db:pushis banned. Hosted migrations apply during the Vercel build.- Push the branch and wait for the preview deployment before debugging branch env or DB wiring.
- Validate the live preview URL first. Local DB poking is a fallback, not a default.
- If you need branch wiring details, use
vercel env pull. If you still need direct DB access after that, useneonctl. - Product docs must be product docs. Do not include Seed factory docs, factory runbooks, or internal launch instructions in
/docsorllms.txt. - Missing product skills, missing MCP tools, stale CLI binary naming, missing headless smoke, or Union Street design violations are release blockers.
- Missing schema strategy is a release blocker. Do not hide custom fields or relationships in anonymous JSON blobs; define them, scope them, and expose them through API/MCP/CLI/skills/docs.
Skill web
Use this skill for orientation. Drop into:
fork-build-deploy— the full sequence at the coordinator leveldb-health— migration and Neon rules; read this before touchinglib/schema.tsadd-api-endpoint— adding API routes (OpenAPI-first)promote-deployment— preview → staging → main floworganization-best-practices/better-auth-best-practices— multi-tenant + auth tuningwebhooks-and-events/sandboxed-tasks— reactive and agent surfaces if the product needs them
Where things live
| File | Purpose |
|---|---|
lib/brand.ts | Product identity (name, CLI name, base URLs) |
product/<slug>/ | Agent-authored product rail input |
scripts/product-rails.mjs | Generates/checks mechanical product plumbing |
scripts/product-live.mjs | Provisions/deploys/smokes live product infrastructure |
lib/schema.ts | Drizzle tables — strict platform/product tables plus flexible schema definitions where customization is allowed |
lib/auth.ts | Better Auth config — usually unchanged per fork |
lib/org-access.ts | Role/resource permissions — adjust per product RBAC |
app/ | Next.js App Router |
openapi/v1.yaml | API spec — single source of truth |
cli/ | Go CLI scaffold — binary name must match product slug |
sdks/typescript/ | TS SDK scaffold — only if the product needs an SDK |
UnionStreetAI/skills/<product>/skills/* | Public product skills that drive install/docs surfaces |
/skills | Product skill installation page |
/docs | Product documentation generated from public product skills |
llms.txt | LLM-facing product surface index |
CLAUDE.md | Repo conventions, env matrix, Neon quirks |
Auxiliary content
- references/original-guide.md — minimal-path canonical guide
- references/graph.md — handoff boundaries
- scripts/list-fork-surfaces.sh — enumerates fork-customization points (brand.ts, schema, scopes, event types, env contract); run on a fresh fork to see what's still seed-default
- assets/env-contract.json — declarative env contract for the product (which vars must be set per environment)
- assets/fork-manifest-template.md — fill-in template for declaring product identity in a fork manifest