Docs Evaluation

Evaluation Plan

Quantify piex lift over bare Pi, with omp as peer reference—suites, metrics, Docker architecture, and rollout path.

Goal

Quantify how much piex lifts bare Pi, with omp as a peer reference—same suites, same model, comparable metrics.

Using Pi as the baseline, compare pi + piex and omp on the same suites. The goal is to quantify how much piex lifts Pi, with omp as a peer reference for industry-relative level.

Goals

Core questions: How much does piex help Pi? How do metrics compare to omp?

RoleAgentNotes
Baselinepi (bare)Stock Pi, no extensions: the starting point
Subjectpi + piexAll implemented piex packages: measure lift
Referenceompoh-my-pi, source of many piex capabilities: peer level

Together they answer:

  • How large is piex’s lift over bare Pi?
  • How far is pi + piex from omp?

Comparison matrix

Same suite, same model for the three self-run agents. Competitor numbers are taken from public leaderboards—not re-run here.

Self-run agents

RoleAgentConfig
Baselinepi (bare)Stock Pi, no extensions
Subjectpi + piexPi + all implemented piex packages
Referenceompoh-my-pi, full built-ins

Public competitors (cited)

SWE-bench Leaderboard, official blogs, papers—Claude Code / Aider / OpenHands / Devin, etc.

PieX evaluation scope

Each run loads all implemented piex packages; re-run after new packages land.

Implemented (in scope)

PackageCapabilityEval link
hashlineoverrides edit (hashline syntax)SWE-bench (edit accuracy, tokens), Can It Edit
dapdebug (14 adapters)DebugBench, SWE-bench (debug path)
lsplsp (~50 default servers)RepoBench, SWE-bench (code understanding)
plan/plan, /todosSWE-bench (multi-step planning)
review/review, review toolCodeReviewer / c-CRAB

Planned (reserved)

PackageStatusEval link
todo📋 P0SWE-bench (task management)
conflict📋 P0custom merge-conflict suite
ast-grep / ast-edit📋 P1SWE-bench (search/edit precision)
web-search📋 P1external-knowledge tasks
eval📋 P1data-analysis tasks
memory📋 P1cross-session retention
gh📋 P1PR/Issue operations
browser📋 P2web interaction

Suites

Tier 1 — core

SuiteScaleWhat it testspiex link
SWE-bench Verified500 tasks, 12 Python reposrepo-level bugfix end-to-endedit, search, debug, plan—almost all piex
Aider Polyglot225 tasks, multi-langNL → code edithashline
Can It Editmulti-lang edit instructionsfine-grained editshashline / ast-edit

Tier 2 — specialized

SuiteScalepiex link
DebugBench4,253 bugsdap: locate & fix
RepoBenchcross-file completionlsp + ast-grep
CodeReviewer / c-CRABPR reviewreview quality

Tier 3 — later

Suitepiex link
SWE-bench Multimodalbrowser (image issues)

Metrics

Core (comparable across three agents)

MetricDefinitionFocus
resolve_ratepass / totalgap vs omp
avg_tokensmean tokens per taskefficiency
avg_timemean wall timespeed
est_costmean API cost per taskcost

Attribution (Pi family only—credit individual packages)

MetricDefinitionPackage
edit_accuracyfraction of edit calls with valid hashline syntaxhashline
search_precisionfraction of grep/glob/lsp hits that are relevantlsp
first_try_ratefraction of first edits that are correcthashline
debug_successfraction of dap uses that locate the bugdap
plan_follow_ratefraction of runs that follow the planplan
review_qualityfraction of reviews that surface real issuesreview

Docker architecture

Each task runs in one Docker environment with baseline (pi bare), subject (pi + piex), and reference (omp), judged by the standard harness.

text
┌────────────────────────────────────────────────────────────┐
│                        Eval Orchestrator                    │
│  eval/runner.ts                                            │
│                                                             │
│  Task Loader ──→ Agent Runner ──→ Sandbox ──→ Judge       │
│  (JSONL)        (pi/omp CLI)    (Docker)    (SWE-bench)    │
│                                                             │
│  ┌──────────────────────────────────────────────────────┐  │
│  │              Metrics Collector                        │  │
│  │  resolve_rate │ tokens │ wall time │ API cost        │  │
│  └──────────────────────────────────────────────────────┘  │
│                                                             │
│  ┌──────────────────────────────────────────────────────┐  │
│  │              Report Generator                         │  │
│  │  baseline → subject → reference + public leaderboard │  │
│  └──────────────────────────────────────────────────────┘  │
└────────────────────────────────────────────────────────────┘

Single-task flow

text
1. Task Loader: read { repo_url, base_commit, issue_text, test_patch }

2. Sandbox: docker run swebench-image-{repo}
   → container already at base_commit with deps installed

3. Agent Runner:
   docker exec pi pi --model ${MODEL} \
     -e /piex/extensions/hashline/src/hashline.ts \
     -e /piex/extensions/dap/src/dap.ts \
     -e /piex/extensions/lsp/src/lsp.ts \
     -e /piex/extensions/plan/src/plan.ts \
     -e /piex/extensions/review/src/review.ts \
     -p "${ISSUE_TEXT}" > /workspace/result.json

4. Collect: result.json → patch + tool_calls + token_usage

5. Judge: apply patch → run test_patch → pass/fail

6. Metrics: persist to SQLite / JSONL

Images

ImageNotes
pi.DockerfilePi base (Node.js)—used for pi bare and pi+piex
omp.Dockerfileomp (Bun)
swebench.DockerfileSWE-bench repo runtime

pi bare and pi+piex share one image; -e controls which extensions load.

Directory layout

text
piex/eval/
├── README.md
├── package.json
├── tsconfig.json
│
├── src/
│   ├── runner.ts
│   ├── orchestrator.ts
│   ├── sandbox.ts
│   ├── agents/
│   │   ├── pi.ts
│   │   └── omp.ts
│   ├── benchmarks/
│   │   ├── swebench.ts
│   │   ├── aider-polyglot.ts
│   │   ├── can-it-edit.ts
│   │   ├── debugbench.ts
│   │   └── repobench.ts
│   ├── metrics.ts
│   └── report.ts
│
├── docker/
│   ├── pi.Dockerfile
│   ├── omp.Dockerfile
│   └── swebench.Dockerfile
│
├── results/                   # gitignored
│   └── 2026-07-14/
│       ├── swebench-pi-bare.json
│       ├── swebench-pi-piex.json
│       ├── swebench-omp.json
│       └── report.md
│
└── fixtures/
    └── merge-conflicts/

Report format

Each run produces a Markdown report: piex lift over Pi first, then omp as reference:

markdown
## SWE-bench Verified — piex report (2026-07-14)

### Results

| Role | Agent | Model | Resolve Rate | Avg Tokens | Avg Time | Est. Cost |
|------|-------|-------|-------------|------------|----------|-----------|
| Baseline | pi (bare) | deepseek-v3 | 12.4% | 85K | 3.2min | $0.18 |
| **Subject** | **pi + piex** | deepseek-v3 | **18.8%** | 62K | 2.8min | $0.14 |
| Reference | omp | deepseek-v3 | 19.2% | 60K | 2.6min | $0.13 |

### pi + piex analysis

| Metric | pi bare | pi + piex | omp | vs baseline | vs omp |
|--------|---------|-----------|-----|-------------|--------|
| resolve_rate | 12.4% | 18.8% | 19.2% | **+51.6%** | **-2.1%** |
| avg_tokens | 85K | 62K | 60K | **-27.1%** | **+3.3%** |
| edit_accuracy | 67% | 91% | 92% | **+35.8%** | **-1.1%** |
| avg_tool_calls | 42 | 28 | 26 | **-33.3%** | **+7.7%** |

### Public leaderboard (same suite)

| Agent | Resolve Rate | Source |
|-------|-------------|--------|
| Claude 4 Opus + SWE-agent | 42.6% | anthropic.com/blog |
| Devin | 35.8% | swebench.com |
| GPT-5 + OpenHands | 38.2% | openhands.dev |

### Takeaways

- piex lift over Pi: resolve rate **+51.6%**, tokens **-27.1%**
- vs omp: gap **< 5%**, core edit capability in the same band
- Pi Extension API can carry omp-level agent capability with a lighter architecture

Implementation path

Phase 1 — Docker infra + first suite (~1 week)

  • [ ] docker/pi.Dockerfile
  • [ ] docker/omp.Dockerfile
  • [ ] docker/swebench.Dockerfile
  • [ ] src/sandbox.ts
  • [ ] src/agents/pi.ts (bare + piex)
  • [ ] src/agents/omp.ts
  • [ ] src/benchmarks/aider-polyglot.ts — first end-to-end suite

Phase 2 — SWE-bench (~1 week)

  • [ ] src/benchmarks/swebench.ts — dataset + official harness
  • [ ] first pi vs pi+piex vs omp report

Phase 3 — specialized (as needed)

  • [ ] can-it-edit.ts → hashline
  • [ ] debugbench.ts → DAP
  • [ ] repobench.ts → LSP
  • [ ] src/benchmarks/code-reviewer.ts → review

Risks & mitigations

RiskMitigation
SWE-bench contaminationfocus on relative lift, not absolute; LiveCodeBench later
ARM64 / x86 emulation costprefer SWE-bench Lite (300); Modal cloud if needed
Pi non-interactive limitsvalidate -p; PTY if required
Eval costLite first, full Verified on demand

Source Markdown: docs/evaluation.md