Przejdź do treści
Biblioteka skilli
AI i agenci · Testowanie

pmstack-make-traces

/pmstack-make-traces

Tworzy realistyczne testowe ślady dla produktu AI, który ma ich mało: pisze zapytania, przepuszcza je przez produkt i zapisuje wyniki do przeglądu w Eval Studio.

Repozytorium
pmstack ↗
Licencja
MIT
Ostatnia zmiana repozytorium
24.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 24.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Tworzy realistyczne testowe ślady dla produktu AI, który ma ich mało: pisze zapytania, przepuszcza je przez produkt i zapisuje wyniki do przeglądu w Eval Studio.

Oryginalny opis (EN)

Makes realistic test traces for an AI product that has few or no real ones: writes test requests, runs them through the product, and saves the results as traces ready to review in Eval Studio. Starts from three ways the product is likely to fail, checks 20 combinations with the user, writes one request per combination with a separate model call, drops unrealistic ones, confirms each scenario can happen in the test setup, and tags every trace with its values so Eval Studio can filter by them. Use when a product has not launched, real traces are too few to review, or someone wants to probe a kno

Jak działa

  1. Setup
  2. Phase 1: Check that test traces fit
  3. Phase 2: Pick three dimensions where failures are expected
  4. Phase 3: Write 20 combinations with the user
  5. Phase 4: Expand to about 100 combinations
  6. Phase 5: Write one request per combination
  7. Phase 6: Filter
  8. Phase 7: Confirm each scenario can happen
  9. Phase 8: Run the requests through the product
  10. Phase 9: Load the traces into pmstack
Sekcje z nagłówków SKILL.md, w oryginale · 130 linii, 1 425 słów
Podgląd SKILL.md
---
name: pmstack-make-traces
description: "Makes realistic test traces for an AI product that has few or no real ones: writes test requests, runs them through the product, and saves the results as traces ready to review in Eval Studio. Starts from three ways the product is likely to fail, checks 20 combinations with the user, writes one request per combination with a separate model call, drops unrealistic ones, confirms each scenario can happen in the test setup, and tags every trace with its values so Eval Studio can filter by them. Use when a product has not launched, real traces are too few to review, or someone wants to probe a known rare failure before users hit it."
---

# Make test traces

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`.

## Setup

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:

```sh
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.

## Phase 1: Check that test traces fit

- 100 or more real, varied traces already exist: use them instead and load `pmstack-find-failures`.
- Synthetic traces fit before launch, when real traces are too few, and for probing a known rare failure.
- Tell the user once: synthetic traces show what can fail, not how often it fails in production, and they are weakest for specialist documents (medical records, legal filings) and for low-resource languages or dialects, where real examples serve better.

## Phase 2: Pick three dimensions where failures are expected

1. 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.
2. 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 |

3. 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.
4. 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.

## Phase 3: Write 20 combinations with the user

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.

## Phase 4: Expand to about 100 combinations

- Small space (a full cross product under about 150): list every combination with code, drop the impossible ones using the user's rules (Maple Dental: a new patient has no visit to move or cancel), then sample about 100 so every value still appears.
- Large space: ask a model for 10 new combinations at a time, giving it the dimensions, their allowed values, and the approved 20; reject duplicates and values outside the lists.
- Save one line per combination to `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`.

## Phase 5: Write one request per combination

1. Tell the user how many model calls this takes and which model, then start.
2. Make one model call per combination: a single call that writes many requests repeats itself. Use subagents, or a loop over any command that reads a prompt on standard input, such as `claude -p --model <exact model id>`.
3. Prompt for each call:
   ```text
   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": "..."}
   ```
4. Add `request` to the combination's line. Write requests only. The product writes the reply, and the reviewer decides whether it was good.

## Phase 6: Filter

1. Read every request. Regenerate any that read as unrealistic, do not match their combination, or nearly repeat another request.
2. Show the user 10 random requests and ask:
   > 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.

## Phase 7: Confirm each scenario can happen

A request only tests its scenario when the test setup makes the scenario real:
- "a day with no open times" needs a day with no open slots in the test calendar, so `find_slots` returns nothing for it;
- "existing patient" needs a matching record for `get_patient`;
- "move a visit" needs an appointment to move.

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"`.

## Phase 8: Run the requests through the product

1. Send each request as the {userLabel}'s first message through the real product (a local server, staging, or the team's test script) with trace logging on; the trace format is in `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.
2. Every trace carries its dimension values in `metadata`, plus `"source": "synthetic"`. When the logging cannot add them, merge them after the run:
   ```sh
   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
   ```
3. Count traces per dimension value; every value should appear in at least 5 traces.

Done when about 100 traces exist, each with its dimension values in `metadata`.

## Phase 9: Load the traces into pmstack

`FOLDER` is the directory that holds the trace file (here `traces/`).

1. New project: `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).
2. Add the dimension names to `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.
3. Run `node "$PMSTACK" validate "$FOLDER/pmstack/project.json"` until it exits 0.
4. Load `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.

## Never

- Write the product's replies, expected answers, or verdicts.
- Keep a combination the test setup cannot trigger.
- Install npm packages.

Wersje

W bazie nie ma innych skilli o nazwie pmstack-make-traces.

Migawka bazy z 13.11.2026 · wersja paczki 7c206f017e2c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100pmstack-find-failures
    Pomaga znaleźć sposoby awarii produktu AI podczas przeglądu prawdziwych śladów w Eval Studio: konfiguruje projekt pmstack, uruchamia lokalne studio i podpowiada problemy.
  • 100pmstack-custom-view
    Sprawia, że Eval Studio pokazuje każdy ślad tak, jak widział go użytkownik, gdy żaden wbudowany widok nie pasuje, przez układ paneli lub własny plik widoku.
  • 100retrieving-mlflow-traces
    Pobiera ślady MLflow przez CLI lub Python API: według ID, z filtrowaniem po statusie, tagach, metadanych i czasie wykonania, oraz debugowanie nieudanych śladów.
  • 100ingest-traces
    Wizualizuje produkcyjne ślady LLM, zamienia je w lokalne, zredagowane zestawy ewaluacyjne i profiluje koszty wydawane na modele.
  • 100eval-optimize
    Automatycznie poprawia skill w pętli: uruchamia ewaluację, znajduje porażki sędziów, czyta ślady i uzasadnienia, edytuje SKILL.md, uruchamia ponownie i sprawdza regresje.
  • 84run-eval
    Uruchamia ewaluacje agenta Copilot Studio przez Power Platform Evaluation API na wersjach roboczych bez publikacji, pobiera wyniki i proponuje poprawki YAML dla niepowodzeń.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.