quickbench

package
v0.0.46 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package quickbench implements BAR-based RocketCode benchmarks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Capture added in v0.0.46

func Capture(ctx context.Context, opt CaptureOptions) error

Capture builds a BAR from RocketClaw session entries.

func Dump added in v0.0.46

func Dump(w io.Writer, bar *BAR, namesOnly bool) error

Dump writes BAR contents (or names only) to w.

func Pack added in v0.0.46

func Pack(dir, outPath string) error

Pack writes a BAR directory to a .bar txtar file.

func Run

func Run(ctx context.Context, argv0 string, args []string) error

Run is the quickbench CLI entrypoint.

func Unpack added in v0.0.46

func Unpack(barPath, outDir string) error

Unpack extracts a .bar archive to a directory.

func WriteDir added in v0.0.46

func WriteDir(dir string, bar *BAR) error

WriteDir writes a BAR's members to an unpacked directory.

Types

type AgentOverlay added in v0.0.46

type AgentOverlay struct {
	Model  string // optional model selector string
	System string // optional prompt body (markdown body after frontmatter)
}

AgentOverlay overrides one agent inside a variation.

type BAR added in v0.0.46

type BAR struct {
	Path       string
	Meta       Meta
	Matrix     []MatrixEntry     // subject runs from bench.yaml; empty means one "default" cell
	Agents     map[string][]byte // agent name → full .md bytes (verbatim)
	Variations []Variation
	Criteria   string
	Judge      string
	// contains filtered or unexported fields
}

BAR is a loaded benchmark archive (directory or .bar).

func Open added in v0.0.46

func Open(path string) (*BAR, error)

Open loads and validates a BAR from a .bar file or unpacked directory.

type BashDouble added in v0.0.46

type BashDouble struct {
	Command  string `json:"command,omitempty"`
	Pattern  string `json:"pattern,omitempty"`
	Output   string `json:"output"`
	ExitCode int    `json:"exitCode,omitempty"`
}

BashDouble is a recorded or hand-authored shell command double for bench re-runs. Prefer exact Command; Pattern is a simple prefix match ending in "*" (e.g. "gh *").

type CaptureOptions added in v0.0.46

type CaptureOptions struct {
	Workspace      string
	RuntimeDir     string
	DatabaseURL    string
	ConversationID string
	AgentsDir      string // workspace agents/ directory (required for full tree)
	Root           string // root agent name; default main
	Out            string
	Variation      string
	Pack           bool
}

CaptureOptions configures Capture.

type CellResult added in v0.0.46

type CellResult struct {
	Label         string             `json:"label"`
	Variation     string             `json:"variation"`
	Matrix        string             `json:"matrix"`
	Model         string             `json:"model"` // same as Matrix; kept for report compatibility
	Text          string             `json:"text,omitempty"`
	ToolCalls     []observedToolCall `json:"toolCalls,omitempty"`
	Error         string             `json:"error,omitempty"`
	Latency       string             `json:"latency"`
	LatencyMillis int64              `json:"latencyMillis"`
	Metrics       cellMetrics        `json:"metrics"`
}

CellResult is one variation×matrix run.

type EloRating added in v0.0.46

type EloRating struct {
	Label  string  `json:"label"`
	Rating float64 `json:"rating"`
}

EloRating is one ladder row.

type MatrixAgent added in v0.0.46

type MatrixAgent struct {
	Model  modelSelector // empty Raw means no model override
	System string        // empty means no system/prompt override
}

MatrixAgent overrides one agent for a matrix row. Zero fields keep the BAR agent value.

type MatrixEntry added in v0.0.46

type MatrixEntry struct {
	ID     string
	Agents map[string]MatrixAgent // agent name → optional model/system overrides
}

MatrixEntry is one subject configuration in the run matrix (variation × matrix).

type Message added in v0.0.46

type Message struct {
	Role string `json:"role"`
	Text string `json:"text"`
}

Message is a user or assistant turn in a variation transcript.

type Meta added in v0.0.46

type Meta struct {
	Name        string
	Description string
	Tags        []string
	Root        string // default agent name; empty means "main"
}

Meta is BAR metadata from bench.yaml.

type PairResult added in v0.0.46

type PairResult struct {
	A      string `json:"a"`
	B      string `json:"b"`
	Winner string `json:"winner"` // A, B, or TIE
	Raw    string `json:"raw,omitempty"`
	Error  string `json:"error,omitempty"`
}

PairResult is one pairwise judgment.

type Report added in v0.0.46

type Report struct {
	Path    string       `json:"path"`
	Name    string       `json:"name,omitempty"`
	Cells   []CellResult `json:"cells"`
	Ladder  []EloRating  `json:"ladder,omitempty"`
	Pairs   []PairResult `json:"pairs,omitempty"`
	Skipped string       `json:"eloSkipped,omitempty"`
}

Report is the run + ELO output.

type ToolMock added in v0.0.46

type ToolMock struct {
	Name        string         `json:"name"`
	Description string         `json:"description"`
	Parameters  map[string]any `json:"parameters"`
	Response    string         `json:"response"`
}

ToolMock is a static tool definition returned on every call.

type Variation added in v0.0.46

type Variation struct {
	ID            string
	System        string // legacy: root prompt overlay when AgentOverlays[root].System empty
	Transcript    []Message
	AgentOverlays map[string]AgentOverlay
	Tools         []ToolMock
	BashDoubles   []BashDouble
}

Variation is one prompt variant under variations/<id>/.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL