尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
AI agent that runs simulated usability tests and focus groups with AI personas, with PM approval gates, verified quotes, and decision-ready reports (capstone prototype)
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A capstone prototype of an AI agent that runs a simulated focus group for a product manager (PM), then writes a decision-ready report.
The PM describes a feature (a new idea or a partly built feature) and the decision they face: build it, or launch it. They approve a study plan and a set of fictional personas. AI "participants" then react to demo-safe screenshots of the app, and the agent turns their sessions into a report with findings, recommendations and quotes checked against the transcript.
The PM approves every step and owns the build or launch decision. Everything the agents produce is labelled AI-generated simulated research: early signal, not a substitute for real users.
Status: working prototype built for a capstone project. It runs locally with file-based storage. It is not production-hardened.
| Step | Where in the app | Who decides |
|---|---|---|
| 1. Interview: the agent asks about the product, the build-or-launch decision, research questions and target users | Chat panel (on every project page) | PM answers; the agent records the answers |
| 2. Upload screens: demo-safe screenshots plus a short note on how screens connect | Brief & screens tab | PM confirms the screens are public and redacted; each upload is checked for personal data |
| 3. Study design: method, tasks or discussion guide, participant count (max 12) | Study design approval screen | PM edits, approves or rejects |
| 4. Personas: fictional participants matching the target users | Personas approval screen (only after the design is approved) | PM edits, approves or rejects |
| 5. Run: AI personas hold a focus group | Run screen button, or asking the agent explicitly | Only the approved plan can run |
| 6. Report: findings, recommendations, quotes verified against the transcript, limitations | Report approval screen | PM edits, requests changes, approves or rejects. Download and share links unlock only after approval |
node -v.git clone https://github.com/<your-account>/<repo-name>.git
cd <repo-name>
npm install
cp .env.example .env.local
Then edit .env.local:
ANTHROPIC_API_KEY: your key.ANTHROPIC_WORKSPACE_ID: only if your key is an organisation-level key that isn't scoped to a workspace (see Troubleshooting).AUTH_SECRET: any long random string. Generate one with:
npx auth secret
or openssl rand -base64 32..env.local is git-ignored. Never commit it.
npm run dev
Open http://localhost:3000.
Sign in once, then:
npm run seed-demo
This creates "Demo: Pantry Pal collections (seeded)" with a brief, five fictional screens, and a study design and personas waiting for your approval.
All settings live in .env.local (template: .env.example).
| Variable | Required | Purpose |
|---|---|---|
ANTHROPIC_API_KEY | Yes | Claude API key |
ANTHROPIC_WORKSPACE_ID | Only for org-level keys | Workspace to bill (wrkspc_...) when the key isn't workspace-scoped |
AUTH_SECRET | Yes | Signs session cookies (Auth.js) |
AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET | For Google sign-in | OAuth client from Google Cloud Console (type "Web application"). Authorised redirect URI: http://localhost:3000/api/auth/callback/google |
ENABLE_DEV_LOGIN | No | true/false to force the local Demo PM login on or off |
MASTER_MODEL, PERSONA_MODEL, UTILITY_MODEL | No | Models per role. All default to claude-opus-5-5. Set PERSONA_MODEL=claude-sonnet-5-5 to cut run cost |
MASTER_EFFORT, PERSONA_EFFORT, SYNTHESIS_EFFORT | No | Reasoning effort per role (defaults: medium, low, high) |
RUN_CONCURRENCY | No | Persona sessions run in parallel (default 3) |
DATA_DIR | No | Where projects are stored (default ./data) |
DISABLE_GUARD | No | true skips the input content guard (testing only) |
npm run dev, sign in, then npm run seed-demo. Refresh the projects page.To try the full interview, create a new study and answer the agent in the chat panel.
Everything runs on Claude Opus 5.5 by default.
PERSONA_MODEL=claude-sonnet-5-5) lowers cost.PM (browser)
│ chat, approvals, uploads
▼
Next.js API routes ──► Guard classifier (blocks inappropriate input)
│
▼
Master agent (Claude, tool loop)
tools: update_study_brief · propose_study_design · propose_personas
start_study_run · regenerate_report · record_guardrail_event
│ ▲
│ code gates (lib/gates) │ research knowledge base (knowledge/*.md)
▼
Run engine (src/agent/run.ts)
└─ Focus group: opening round → key questions + probes + cross-talk
→ "most important thing said" round → moderator summary confirmed by the group
then: consistency check per persona (flags out-of-character or invented UI)
▼
Synthesis (src/agent/synthesis.ts)
structured report → every quote verified against the transcript
▼
PM reviews / edits / approves → download (Markdown) or read-only share link
Context and memory
knowledge/), loaded into the master agent's cached system prompt. Project outputs are never written back to it.data/users/<user>/projects/<project>/). Deleting a project deletes the folder.npm run typecheck
npm run lint
npm run eval # guardrail scenarios: out-of-scope, inappropriate content, >12 participants, fees, approval integrity (5 variants)
npm run eval -- --happy # + full end-to-end study and report (several minutes, uses the most credits)
npm run eval -- --case fee # a single scenario
eval-data/).SIMSTUDY_DRY_RUN).eval-results/eval-<timestamp>.md. It records each PM input, the agent's reply, the tools it called, whether it proceeded or stopped, programmatic checks, and an LLM-judge verdict.knowledge/ holds the research guidance the master agent uses to choose methods, write neutral tasks and questions, define personas, and structure reports.
01- to 07-) cite their sources inline (Nielsen Norman Group, MeasuringU, peer-reviewed papers, W3C, focus-group handbooks). Each source was checked against the claim it supports.examples/ contains notes in our own words on published focus-group videos, with citations. It also has two clearly labelled teaching transcripts that are made up.knowledge/README.md for review status and open items.Market context is in docs/competitive-brief.md.
src/
agent/ master agent, prompts, guard, run engine, synthesis, LLM wrapper
lib/ schemas (zod), gates, review/versioning, file store, export
app/ pages (projects, approval screens, run, report, share) + API routes
components/ UI: chat panel, review bars, editors, transcript, report document
auth.ts Auth.js config (Google + local demo login)
knowledge/ cited research guidelines + examples
scripts/ eval.ts, seed-demo.ts, fixtures.ts
demo/ fictional "Pantry Pal" mock app + rendered screens S1–S5
docs/ competitive brief
.env.example configuration template (no secrets)
ANTHROPIC_WORKSPACE_ID in .env.local (Console → Settings → Workspaces), or create a key inside a workspace.npm run dev after editing .env.local.ANTHROPIC_API_KEY is missing or empty in .env.local. Restart the server after adding it.AUTH_GOOGLE_ID/AUTH_GOOGLE_SECRET, or run in development, where the Demo PM login appears automatically.npm run render-demo-screens (needs Google Chrome; the script uses the macOS Chrome path).knowledge/07-simulated-research-limits.md for the evidence.src/lib/store.ts for a database to deploy.The code is released under the MIT License: you're free to use, modify and share it, with attribution.
Cited third-party sources in knowledge/ (articles, papers, videos) belong to their authors. The knowledge-base files summarise them in our own words and link to the originals.