Documentation
¶
Overview ¶
Package quickbench implements BAR-based RocketCode benchmarks.
Index ¶
- func Capture(ctx context.Context, opt CaptureOptions) error
- func Dump(w io.Writer, bar *BAR, namesOnly bool) error
- func Pack(dir, outPath string) error
- func Run(ctx context.Context, argv0 string, args []string) error
- func Unpack(barPath, outDir string) error
- func WriteDir(dir string, bar *BAR) error
- type AgentOverlay
- type BAR
- type BashDouble
- type CaptureOptions
- type CellResult
- type EloRating
- type MatrixAgent
- type MatrixEntry
- type Message
- type Meta
- type PairResult
- type Report
- type ToolMock
- type Variation
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.
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).
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 {
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 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 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>/.