---
name: prompt-workbench
description: >
  Design, test, and iterate on prompts for GRAFTKIT agents, commands,
  and skills. A/B test prompt variants and measure output quality.
version: 0.1.0
author: Jero (LATTICE / MARPA Design Studios)
triggers:
  - "design a prompt"
  - "test this prompt"
  - "improve the prompt"
  - "prompt engineering"
  - "A/B test prompts"
tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep
---

# Prompt Workbench

USE WHEN the user wants to design, test, iterate on, or compare prompts for agents, commands, skills, or any LLM-powered component.

## What It Does

A workspace for prompt engineering within GRAFTKIT:

1. **Design** — Create structured prompts with system/user/assistant roles and variables
2. **Test** — Run prompts against sample inputs and evaluate outputs
3. **Iterate** — Refine prompts based on output quality, hallucination rate, adherence to spec
4. **Compare** — A/B test prompt variants (Polygraft pattern) with side-by-side output
5. **Extract** — Turn successful prompts into Scions (reusable patterns for new Rootstocks)

## Usage

```
design a prompt for the classifier agent
test this prompt against 5 sample inputs
compare prompt A vs prompt B for entity extraction
```

## Prompt Structure

```markdown
---
name: prompt-name
target: agent | command | skill | hook
model: claude-opus-4-6 | claude-sonnet-4-6
temperature: 0.0-1.0
---

## System
[System instructions]

## User
[User message template with {{variables}}]

## Expected Output
[Format and content expectations]
```

## Evaluation Criteria

| Criterion | Weight | Description |
|-----------|--------|-------------|
| Accuracy | 40% | Correct output for given input |
| Adherence | 25% | Follows format and vocabulary spec |
| Efficiency | 20% | Token usage relative to output quality |
| Robustness | 15% | Handles edge cases and malformed input |
