Agentic Pattern Libraryby Vikas Goyal
← All patterns
69

Spike-and-Compare Prototypes

Also known as: prototype bake-off, competing spikes, set-based design

Have agents build two or three rough versions of a design choice, then decide with evidence instead of debate.

TrackAI-native software delivery FamilyPlan & Design Maturity Emerging ChangesDecisionCoordination
01

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.
02

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.

03

Diagram

Question3 optionscriteria written first Agent · option Aspike + result Agent · option Bspike + result Agent · option Cspike + result Team comparesagainst criteriadecision record Rebuild winnerfrom a spec Delete spikesincluding winner's same timeboxsame harness

Agents make alternatives cheap; the team's job shifts from arguing about options to judging measured results.

04

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
05

Trade-offs

Latency Hours of parallel agent work before deciding
Cost Two or three agent runs, mostly thrown away
Complexity A shared harness and written criteria
Reliability Decisions rest on measured results

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
06

Worked example

Scenario
The Linkwatch team is designing a new click-analytics service and can't agree how to ingest events.
  1. 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.
  2. SpikesThree agent runs in separate worktrees, each with a 3-hour timebox and the same load-test harness.
  3. 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.
  4. DecisionThe team picks the queue and writes a short decision record citing the numbers. The other two spikes are deleted.
  5. BuildA spec is written from what the winning spike taught them, and an agent builds the production version test-first.
07

Failure modes

FailureSymptomMitigation
Unequal spikesOne option got more time or better instructionsSame timebox, harness and instructions for every option
Criteria after the factCriteria chosen to favor the preferred optionWrite the criteria before any spike runs
Spike shippedPrototype code ends up in productionDelete spikes and rebuild the winner from a spec
Too many optionsEvaluation takes longer than the debate it replacedCap the comparison at three options