Internal workbench for turning rough product hunches into pitch cards, signal records, and research dossiers.
The repository combines:
- Guided agent skills for creating product ideation artifacts.
- Markdown templates and legacy run folders.
- A Next.js web app backed by Postgres for deployed use.
- Agent API endpoints so other surfaces can create ideas, signals, and research artifacts.
The initial deployable version is built around one test idea, business-in-box.
Postgres is the canonical data store in deployment. Markdown files in runs/ remain useful as import/export artifacts and as a local fallback when the web app is run without a database.
product-ideation-engine/
workflow.md Workflow phases and quality gates
db-api-agent-plan.md Database/API implementation notes
package.json Wrapper scripts for the web app
runs/ Local markdown idea runs
templates/ Pitch, signal, and research templates
skills/ Codex/agent skills
web/ Next.js app, Prisma schema, API routes
Important skills:
skills/product-idea-pitcher: messy idea to pitch card and one-page brief.skills/product-research-dossier: signaled idea to research dossier.skills/product-ideation-api-writer: write ideas, signals, and artifacts to the deployed app API.
-
Messy idea to pitch
- Output:
00-pitch-card.md,01-one-page-product-brief.md - Goal: get the idea clear enough for internal reaction.
- Output:
-
Signal gate
- Output: raw signals in Postgres and/or
signal-notes.md - Goal: decide whether to continue, clarify, or park.
- Output: raw signals in Postgres and/or
-
Research dossier
- Output:
research-plan.mdand numbered dossier reports. - Goal: decide whether to continue, narrow, pivot, or kill.
- Output:
See workflow.md for the full workflow.
Install and run the web app from this directory:
npm run devThe wrapper script delegates to web/.
Open:
http://localhost:3000
Without DATABASE_URL, the app can browse local markdown runs but cannot save signals.
The web app reads environment variables from web/.env.
Minimum for deployed/database-backed use:
DATABASE_URL="postgresql://user:password@host:5432/database?schema=public"
Useful for agent clients:
PRODUCT_IDEATION_API_BASE_URL="https://your-app.up.railway.app"
PRODUCT_IDEATION_AGENT_API_KEY="pie_live_..."
The deployed web app itself does not need PRODUCT_IDEATION_AGENT_API_KEY to validate incoming agent calls. Agent keys are stored hashed in Postgres.
Prisma lives in web/prisma.
Primary tables:
pie_ideas
pie_idea_artifacts
pie_signals
pie_agent_api_keys
pie_signal_reactions
Run migrations:
npm run db:migrateGenerate Prisma client:
npm run db:generateImport existing markdown runs into Postgres:
npm run db:import:runsCreate an agent API key:
npm run db:agent-key initial-agentThe raw key is printed once. Store it in the environment for whatever agent/client will call the API.
Initial agent API routes:
POST /api/agent/v1/ideas
POST /api/agent/v1/ideas/[slug]/signals
PUT /api/agent/v1/ideas/[slug]/artifacts/[artifactSlug]
GET /api/agent/v1/ideas/[slug]/context
All agent routes require:
Authorization: Bearer <agent-api-key>
API contract examples live in:
skills/product-ideation-api-writer/references/
Recommended setup:
- Deploy from this directory,
product-ideation-engine. - Add a fresh Railway Postgres service.
- Add the Postgres
DATABASE_URLreference variable to the app service. - Set the pre-deploy command:
npm run db:migrate- Let Railway use the package scripts:
npm run build
npm run startThe start script delegates to web and runs next start.
After the first successful deploy, run these once with Railway env vars injected:
railway run npm run db:import:runs
railway run npm run db:agent-key initial-agentUse the printed key only in clients or agent surfaces that call the deployed API.
npm run dev
npm run build
npm run start
npm run lint
npm run db:migrate
npm run db:import:runs
npm run db:agent-key initial-agent- Use a fresh database for the current migration path when possible.
- If Railway reports Prisma P3005 on a non-empty database, either use a fresh DB or baseline migrations before deploying.
- The legacy
runs/folder is not the deployed source of truth after import.