plaited-eval
Trial runner and strategy comparison CLI for the Plaited framework. Use when running evals against agent adapters, computing pass@k metrics, or comparing two eval runs.
What this skill does
# Plaited Eval
CLI-first evaluation tooling for running prompt trials against agent adapters and comparing strategy performance.
## When to use
- Running evaluation trials against custom agent adapters
- Computing pass@k and pass^k metrics with grading
- Comparing two eval runs (baseline vs challenger)
- Discovering schema inputs/outputs for the eval pipeline
## Command Discovery
List all available commands:
```bash
bunx plaited --schema
```
Discover input/output schemas for a specific command:
```bash
bunx plaited eval --schema input
bunx plaited eval --schema output
bunx plaited compare-trials --schema input
bunx plaited compare-trials --schema output
```
## plaited eval
Runs prompts against an adapter k times, optionally grades results, and computes pass@k/pass^k metrics.
### Basic usage
```bash
# Run eval with prompts from stdin
echo '{"id":"test-1","input":"Hello"}' | bunx plaited eval '{
"adapterPath": "./my-adapter.ts",
"k": 1
}'
# Run eval with prompts from file
bunx plaited eval '{
"adapterPath": "./my-adapter.ts",
"promptsPath": "./prompts.jsonl",
"outputPath": "./results.jsonl",
"k": 3,
"concurrency": 2
}'
```
### With grading
```bash
bunx plaited eval '{
"adapterPath": "./my-adapter.ts",
"promptsPath": "./prompts.jsonl",
"graderPath": "./my-grader.ts",
"k": 5,
"outputPath": "./results.jsonl"
}'
```
### Input schema fields
| Field | Required | Description |
|-------|----------|-------------|
| `adapterPath` | Yes | Path to adapter script (.ts/.js module or executable) |
| `promptsPath` | No | Path to prompts.jsonl (default: read from stdin) |
| `outputPath` | No | Output file path (default: stdout) |
| `k` | No | Trials per prompt (default: 1) |
| `graderPath` | No | Path to grader script |
| `cwd` | No | Working directory for adapter |
| `timeout` | No | Timeout per prompt in ms (default: 60000) |
| `concurrency` | No | Concurrent workers (default: 1) |
| `workspaceDir` | No | Per-prompt workspace isolation base dir |
| `progress` | No | Show progress to stderr (default: false) |
| `append` | No | Append to output file (default: false) |
| `debug` | No | Enable debug mode (default: false) |
## plaited compare-trials
Compares two TrialResult JSONL runs and computes aggregate metrics plus per-prompt deltas with bootstrap confidence intervals.
### Basic usage
```bash
bunx plaited compare-trials '{
"baselinePath": "./baseline-results.jsonl",
"challengerPath": "./challenger-results.jsonl"
}'
```
### With custom labels and confidence settings
```bash
bunx plaited compare-trials '{
"baselinePath": "./baseline-results.jsonl",
"challengerPath": "./challenger-results.jsonl",
"baselineLabel": "gpt-4",
"challengerLabel": "gpt-4o",
"confidence": 0.95,
"resamples": 1000
}'
```
### Input schema fields
| Field | Required | Default | Description |
|-------|----------|---------|-------------|
| `baselinePath` | Yes | - | Path to baseline TrialResult JSONL |
| `challengerPath` | Yes | - | Path to challenger TrialResult JSONL |
| `baselineLabel` | No | "baseline" | Label for baseline run |
| `challengerLabel` | No | "challenger" | Label for challenger run |
| `confidence` | No | 0.95 | Confidence level for bootstrap CI |
| `resamples` | No | 1000 | Bootstrap resamples |
### Output structure
The comparison returns:
- **baseline/challenger run metrics**: avgPassRate, avgPassAtK, avgPassExpK, avgFlakiness, avgDuration, medianDuration, confidence intervals
- **per-prompt comparison**: individual prompt results with winner
- **summary**: win counts and totals
## Trial Artifacts
Eval runs produce `TrialResult` objects as JSONL:
```json
{
"id": "prompt-case-id",
"input": "The prompt text",
"k": 3,
"passRate": 0.67,
"passAtK": 0.96,
"passExpK": 0.30,
"trials": [
{
"trialNum": 1,
"output": "Agent response...",
"duration": 1234,
"pass": true,
"score": 0.9,
"reasoning": "Correct and complete"
}
],
"metadata": {}
}
```
### Metrics explained
| Metric | Description |
|--------|-------------|
| `passRate` | Simple ratio: passes / k |
| `pass@k` | Probability of at least one pass in k samples |
| `pass^k` | Probability of all k samples passing |
| `avgFlakiness` | pass@k - pass^k (indicates non-determinism) |
## Strategy Comparison
Use `compare-trials` to evaluate strategy changes:
1. Run baseline evaluation
```bash
bunx plaited eval '{
"adapterPath": "./adapters/baseline.ts",
"promptsPath": "./prompts.jsonl",
"k": 5,
"outputPath": "./baseline.jsonl"
}'
```
2. Run challenger evaluation
```bash
bunx plaited eval '{
"adapterPath": "./adapters/challenger.ts",
"promptsPath": "./prompts.jsonl",
"k": 5,
"outputPath": "./challenger.jsonl"
}'
```
3. Compare results
```bash
bunx plaited compare-trials '{
"baselinePath": "./baseline.jsonl",
"challengerPath": "./challenger.jsonl",
"baselineLabel": "strategy-a",
"challengerLabel": "strategy-b"
}'
```
## Prompts Format
Prompts are provided as JSONL (newline-delimited JSON):
```jsonl
{"id": "case-1", "input": "What is 2+2?"}
{"id": "case-2", "input": "Write a hello world in Python"}
{"id": "case-3", "input": ["First turn", "Follow up question"], "hint": "Multi-turn"}
```
### Prompt case fields
| Field | Required | Description |
|-------|----------|-------------|
| `id` | Yes | Unique test case identifier |
| `input` | Yes | Prompt text or array of strings for multi-turn |
| `hint` | No | Grader context hint |
| `reference` | No | Reference solution |
| `metadata` | No | Categorization metadata |
| `timeout` | No | Per-case timeout override (ms) |
## Related Skills
- `plaited-eval-adapters` for writing eval-compatible adapter scripts
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.