/pmstack:pmstack-make-tracesfrom pmstack: Eval Studio for product managers
Generates realistic synthetic test traces for AI products with few real traces. Writes test requests, runs them through the product, and saves results for Eval Studio review. Useful pre-launch or for probing rare failures.
Ships in pmstack: Eval Studio for product managers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You write the {userLabel}'s side only: requests. The real product writes the replies, its trace logging records them, and the reviewer judges them later in error discovery. The target is about 100 traces. Work through the phases in order and tell the user in one line what each phase did.
{userLabel} is the product's user word (patient, customer, employee). Examples use the Maple Dental booking assistant, which books, moves, and cancels dental appointments by text, web chat, or phone with tools such as find_slots, get_patient, and book_appointment.
Locate the pmstack command line (Phase 9 needs it). Replace <skill-dir> with this skill's base directory (Claude Code shows it as "Base directory for this skill") and keep the quotes:
PMSTACK=""
for p in "<skill-dir>/../../../.pmstack/bin/pmstack.mjs" "<skill-dir>/../../bin/pmstack.mjs" "$HOME/.pmstack/bin/pmstack.mjs"; do
[ -f "$p" ] && PMSTACK="$p" && break
done
If none is found, the finished trace file can still be loaded in Eval Studio in the browser (https://ryanalberts.github.io/pmstack/studio/, Set up, then Add traces). Never install npm packages.
Questions: when the user must choose, give 2 to 5 lettered options in plain words. When one option is better, put it first, marked "(recommended)" with its reason. Accept a single letter. When the files already answer a question, state what you found and continue.
pmstack-find-failures.Gather failure guesses: ask the user where they expect the product to break, read its instructions and tool list, and read any traces or user feedback that exist.
Define 3 dimensions, each with a name, what it captures, and 3 to 5 values. Add a fourth only after traces show failures along a new axis.
| Dimension | Captures | Maple Dental values |
|---|---|---|
task | What the patient wants | book a new visit, move a visit, cancel a visit, ask about a bill, ask for a person |
patient | Who is writing | new patient, existing patient, parent booking for a child |
clarity | How complete the request is | clear day and time, missing the day, a day with no open times, out of scope |
Check each value against the product's instructions. When a value targets behavior the instructions never mention, fix the instructions instead of generating tests for them: drop the value for now and tell the team what instruction is missing. Maple Dental's instructions say nothing about bills, so "ask about a bill" waits until the team adds a line saying billing questions go to the front desk; add it back afterwards to confirm the fix.
Ask:
A. Use these three dimensions (recommended: each one targets a place the product may fail) B. Change some values C. Swap a dimension for another
Done when the user picked A.
A combination picks one value per dimension; each becomes one test request. Write 20 by hand. Use every value at least once, and include the combinations most likely to fail (out of scope, a day with no open times, a parent booking for a child). Show them as a numbered table and ask:
Which of these never happen for your product? A. All 20 are realistic B. Drop some: reply with their numbers
Done when the user confirms the list.
synthetic/requests.jsonl, with an id: {"id":"syn-001","task":"move a visit","patient":"parent booking for a child","clarity":"missing the day","channel":"sms"}. When the product has channels, spread combinations across them and record channel.claude -p --model <exact model id>.You write one message that a real person sends to <product>: <one-line description>.
The person: <patient>. What they want: <task>. How clear they are: <clarity>. Channel: <channel>.
Write only their message, the way they would type or say it. Real messages are often short and casual, and some have typos.
A message from a different situation, for style only: "hi do u have anything tues after 3 for a cleaning"
Return JSON only: {"request": "..."}
request to the combination's line. Write requests only. The product writes the reply, and the reviewer decides whether it was good.A. These read like real patients B. Too formal or too tidy C. Too similar to each other D. Something else
Done when the user picked A and every line has a request.
A request only tests its scenario when the test setup makes the scenario real:
find_slots returns nothing for it;get_patient;Check each combination with code where you can (call the tool or query the test data), add missing test data, or drop the combination. Record the assumption on the line: "assumes": "2026-09-25 has no open slots".
pmstack-find-failures, Phase 1. Make the run script reuse the request's id as the trace id. Follow-up turns need a simulated user, which is harder to make realistic, so start with first turns.metadata, plus "source": "synthetic". When the logging cannot add them, merge them after the run:
node -e '
const fs = require("fs");
const [tracesFile, requestsFile] = process.argv.slice(1);
const lines = (f) => fs.readFileSync(f, "utf8").split("\n").filter(Boolean).map((l) => JSON.parse(l));
const values = new Map(lines(requestsFile).map(({ id, request, assumes, ...dims }) => [id, dims]));
const merged = lines(tracesFile).map((t) => values.has(t.id) ? { ...t, metadata: { ...t.metadata, ...values.get(t.id), source: "synthetic" } } : t);
fs.writeFileSync(tracesFile, merged.map((t) => JSON.stringify(t)).join("\n") + "\n");
' traces/traces.jsonl synthetic/requests.jsonl
Done when about 100 traces exist, each with its dimension values in metadata.
FOLDER is the directory that holds the trace file (here traces/).
node "$PMSTACK" import "$FOLDER/traces.jsonl" --out "$FOLDER/pmstack/project.json" --name "Maple Dental booking assistant". Existing project: add --append (traces already there are skipped).experience.filters (edit project.json while no studio is running, or use Set up in Eval Studio), so the reviewer can check whether a failure clusters in one kind of scenario.node "$PMSTACK" validate "$FOLDER/pmstack/project.json" until it exits 0.pmstack-find-failures and continue from its Phase 2, skipping step 2 (the project already exists): read the traces in step 1, then correct experience from step 3 on.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ryanalberts/pmstack --plugin pmstack12 skills in this plugin
/pmstack-build-judgeBuilds an AI judge (a prompt that asks a model for Pass or Fail) for one failure mode found while reviewing traces, and saves it as a check in the pmstack project. Checks the prerequisites (at least 20 Problem and 20 Good labels, no simple rule that could decide it, the product's instructions already ask for the behavior), turns the failure mode's definition into Pass and Fail rules, picks 2 to 4 examples from the examples split only, puts the critique before the result, limits what the judge sees, pins an exact model version, and runs it on the tuning set. Use when a failure mode is marked Build a check and needs judgment a simple rule cannot make, or when someone asks to write, draft, or improve a judge prompt./pmstack-check-sourcesChecks an answer bot that searches documents by testing the search and the answer separately. Reviews full traces first, has the reviewer mark the sources each answer needed, measures the search with Recall@k and mean reciprocal rank, fixes search before the answer step, then builds one judge for answers backed by their sources and another for answers that address the question. Use when a product answers questions from a document collection, knowledge base, help center, or search results, when its answers cite sources, or when someone mentions RAG.Other plugins' skills for the same job