A/B Compare
Description
Generates multiple implementation variants for a task using different agent profiles, benchmarks each variant, and selects the best one.
Usage
/ab-compare "task description" [--variants 3] [--benchmark]
Agent Profiles
| Profile | Strategy |
|---|---|
| concise-agent | Minimal code, one-liners, built-in methods |
| robust-agent | Comprehensive error handling, edge cases |
| readable-agent | Self-documenting, clarity over brevity |
| performant-agent | Optimized, minimal allocations |
| testable-agent | Pure functions, DI, clear interfaces |
Scoring
| Criterion | Weight | Description |
|---|---|---|
| Conciseness | 30% | Fewer lines = higher score |
| Error Handling | 35% | try/catch, null checks, throw |
| Readability | 35% | Line length, comments, naming |
Output Format
A/B Comparison Report
=====================
Task: "add input validation to login form"
Variants: 3
| Agent | Concise | Error | Readable | Total |
| -------------- | ------- | ----- | -------- | ----- |
| concise-agent | 90 | 50 | 60 | 65 |
| robust-agent | 40 | 95 | 70 | 78 |
| readable-agent | 60 | 65 | 90 | 73 |
Winner: robust-agent (78/100)