Spike-and-Compare Prototypes
Have agents build two or three rough versions of a design choice, then decide with evidence instead of debate.
Problem
Design choices such as which library, sync or async, or which data model used to be debated in meetings, because building the alternatives cost too much. Coding agents make rough prototypes cheap, but teams often keep debating anyway, or they adopt the first thing an agent built as the design without comparing it to anything.
- Debates are slow and tend to settle on opinion or seniority.
- An agent’s first attempt anchors the team.
- Prototypes are cheap, but evaluating them still takes people’s time.
- Throwaway code has a habit of becoming production code.
Solution
Frame the decision as a question with two or three named options and a short list of criteria, measured by the same test or benchmark. Write the criteria before any code exists. Give each option to a separate agent run with the same timebox and the same instructions apart from the option itself. Each run produces a minimal working spike and a one-page result: numbers against the criteria, problems hit, and code size. The team compares the results, picks one, records the decision and the evidence, and deletes the losing spikes. The winner is rebuilt properly from a spec rather than promoted as it stands.
Diagram
Agents make alternatives cheap; the team's job shifts from arguing about options to judging measured results.
When to use
Use it when
- A design choice with real alternatives and measurable criteria
- Greenfield systems or new components
- A disagreement that won't settle by discussion
- Options can be prototyped in hours, not weeks
Avoid it when
- Cheap, easily reversed choices; just pick one
- Criteria that a spike can't measure, such as long-term maintainability
- An organization standard already dictates the answer
Trade-offs
Gains
- Design decisions backed by evidence, not opinion
- Less anchoring on the first idea
- Faster resolution of team disagreements
Costs
- Evaluating spikes still takes senior time
- Spikes test only what they can measure in hours
- Discipline needed to delete the losing code
Worked example
The Linkwatch team is designing a new click-analytics service and can't agree how to ingest events.
- QuestionThree options: write to the database directly, put events on a queue, or batch them to files. Criteria: sustain 5,000 events per second, 95th-percentile ingest under 50 ms, and low operational burden.
- SpikesThree agent runs in separate worktrees, each with a 3-hour timebox and the same load-test harness.
- ResultsDirect writes: 180 ms at 5,000 events per second. Queue: 22 ms. Files: 9 ms, but a 60-second delay that breaks the live dashboard.
- DecisionThe team picks the queue and writes a short decision record citing the numbers. The other two spikes are deleted.
- BuildA spec is written from what the winning spike taught them, and an agent builds the production version test-first.
Failure modes
| Failure | Symptom | Mitigation |
|---|---|---|
| Unequal spikes | One option got more time or better instructions | Same timebox, harness and instructions for every option |
| Criteria after the fact | Criteria chosen to favor the preferred option | Write the criteria before any spike runs |
| Spike shipped | Prototype code ends up in production | Delete spikes and rebuild the winner from a spec |
| Too many options | Evaluation takes longer than the debate it replaced | Cap the comparison at three options |