Paul Taras - AI Engineer
27 November 2026Writing

Two to three months of spike work in two days

How we ran a technical spike with Claude Code, what went well, what went wrong, and how much developer time it saved.

We had a question we couldn’t answer from a whiteboard. Our Manager Dashboard reads straight from Cosmos DB, and as customers grow, those reads get slower and dearer. One option is to keep a reporting copy in Azure SQL, fed by the Cosmos change feed, and point the dashboard at that. Before committing to it, we wanted real numbers. How quickly does a save show up on the dashboard? How fast are the queries at ten times today’s data? What does it cost? What happens when something falls over?

The ticket gave the spike two days. This post covers how I ran it with Claude Code, what went well, what went wrong, and how much developer time I think it saved.

The short version

  • About 2 days of calendar time, Wednesday lunchtime to Friday afternoon.
  • 9,134 lines added across 151 files: a SQL schema with 20 stored procedures and row-level security, a change feed projector, two Azure Functions triggers, bicep for Azure SQL, a load and measurement console app, three admin dashboard views and nearly 2,000 lines of tests.
  • Estimate by hand: 24 to 34 developer days, which is 9 to 13 weeks on the calendar once real life is counted in.
  • The spike measured things a hand-run two-day spike would have left for later: ten times the platform’s data, outages, row-level security cost, deep paging.

How the work was organised

1. Plan first, with questions

I didn’t start with code. I gave Claude the ticket and asked for a plan. Before writing it, Claude asked me twelve scoping questions in three rounds: which Azure environment, the budget, which SQL tiers to compare, what counts as a pass, how to handle deletes, and so on. Each answer went into a decisions table at the top of the plan.

While I answered, two background agents ran. One compared public sample repositories for change feed projections and wrote up best practice. The other mapped where every number on the dashboard comes from in our code. Both finished in about ten minutes. Working through those repos and our own code by hand is easily a day.

The plan split the work into streams with a contract first: the SQL table design and the projector interface. Once the contract was committed, every other stream could be built against it at the same time.

2. Parallel agents, one worktree each

Each stream ran as its own Claude agent in its own git worktree and branch:

Stream What it built
A The projector: maps Cosmos documents to SQL rows, upserts through table-valued parameters, rejects stale writes
B Two change feed triggers with their own lease containers, behind a feature flag
C A seed and load tool that writes realistic data at a chosen scale
E Bicep for Azure SQL and the lease containers, plus schema scripts
F One stored procedure per dashboard card, the breakdown, a paged drill-down list and a timing harness
G A nightly reconcile sweep to remove rows deleted in Cosmos
H One console app for every measure: load, timings, steady replay, lag, outages, costs
I, J, K Admin views: an organisation dashboard, an all-organisations dashboard, an evidence drill-down
L Scale tooling: a 75,000-worker organisation, a fan-out measure, a resumable bulk fill to 8.5 million workers

At the busiest point, three agents were building while I reviewed and merged a fourth. My job moved from typing code to deciding, reviewing and merging. Most merges had a few “keep both sides” conflicts, which Claude resolved and then proved with a Release build and the test suites before anything landed on the feature branch.

3. Local first, then Azure

The whole flow ran locally first: SQL Server in Docker, the Cosmos emulator and the Functions host. That caught wiring faults for free. Only then did it go to our QAT environment, where the real costs (request units, vCore hours) could be measured. Claude prepared the bicep, a what-if review and the runbooks. I ran the deploys.

4. A running write-up

A hook kept an HTML write-up up to date on every prompt: a timestamped timeline, progress against the original estimate, decisions, findings and open questions. It also asked on each turn whether the request moved the spike forward. That kept the side requests honest, and they were flagged as such. At any point I could see where we were, and the write-up became the source for a 13-slide deck for the go or no-go meeting.

5. Guardrails that mattered

  • The repo’s CLAUDE.md and a team “gotchas” file. These carry our conventions (permissions on every request, validators, logging without personal data, Release builds as the real gate). Claude followed them without being reminded.
  • Release builds, not Debug. Our warnings-as-errors only bite in Release, so “it builds” always meant a Release build.
  • Humans run anything that touches a shared environment. More on why below.

What went wrong

It wasn’t flawless, and the mistakes are worth sharing.

  • An unrequested query on a shared environment. I asked Claude to prepare volume queries for our live production database. It ran a “trial” on UAT first without asking: read-only, about 12,800 request units, harmless, but not its call to make. We added a rule to the team gotchas file the same morning: for anything shared, prepare the script, check it parses, and stop at “ready to run”. It hasn’t happened since.
  • A leftover environment variable. The measurement tool’s --qat flag filled in the Cosmos endpoint only if one wasn’t already set. A value left in my shell by the volume script pointed one run at production. The key was read-only and the database name didn’t exist there, so nothing was read. The fix was to make --qat always overwrite, and the runbook now clears those variables first.
  • Values from memory. Claude picked a preview API version for the SQL resources from memory, and quoted Azure unit prices from memory. Both were caught in review. Prices are now marked “unverified” until they’ve been checked in the Azure pricing calculator.
  • Azure surprises no one predicted. North Europe wasn’t accepting new SQL servers on our subscription, so reporting SQL went to UK South. The office proxy exits through several IP addresses, so the SQL firewall rule needed widening twice.

The pattern: Claude is fast and usually right, but it’s confident when it’s wrong. Review, tests and a few hard rules are what make the speed safe.

Working out the saving

Step 1: developer days, bottom-up

I sized each part as one experienced developer who knows our codebase, writing, testing and debugging it without AI help:

Work By hand
SQL schema, 20 procedures, row-level security (1,205 lines of SQL) 3–4 days
Projector engine, two change feed triggers, host wiring 5–8 days
Dashboard queries, endpoints and three admin views 5–7 days
Seed, load, scale and measurement tools 5–7 days
Bicep, Azure scripts and the nightly reconcile sweep 2.5–4 days
Research, production volume analysis, write-up and deck 3–4 days
Total 24–34 days

Step 2: cross-check against lines of code

Git says the branch adds 9,134 lines. A developer writing tested, reviewed code in a mature codebase produces something like 250 to 400 lines a day. That gives 23 to 37 days, which agrees with the bottom-up figure. Lines of code are a rough measure, so I treat this as a sanity check, not the estimate.

Step 3: developer days to calendar time

Nobody gets 24 clear days in a row. A realistic week looks like this:

  • 5 days, minus 1 day of PR duty = 4
  • minus about a quarter of that for meetings, support and helping others = 3
  • minus about 13% for leave (25 days plus 8 bank holidays a year) = about 2.6 focused days a week

24 to 34 days at 2.6 a week is 9 to 13 weeks: two to three months on the calendar. Against two days, that’s a big difference, and both figures are calendar time, so the comparison is fair.

The caveats

  • This is spike code. It’s tested, but it isn’t hardened for production. The production build is estimated separately, at 25 to 37 developer days, and that estimate already assumes Claude helps.
  • Nobody would have written all this by hand in two days. A hand-run spike would have built the projector for a couple of record types and timed a few queries. So the honest framing isn’t only “faster”. Within the same two days, the spike answered questions that would otherwise have waited for the real build: scale at ten times, outage behaviour, the cost of row-level security, and deep paging.
  • My time wasn’t zero. Planning, answering questions, reviewing, merging, running deploys and making the calls took most of the two days. That’s the part that should be human.

What I’d do again

  1. Plan with questions before any code. Twenty minutes of answering questions saved hours of rework.
  2. Contract first, then parallel agents in separate worktrees. Without the contract, the agents would have built against different assumptions.
  3. Keep a running write-up. It makes the work visible, keeps side requests from quietly eating the time, and the presentation almost writes itself.
  4. Write every mistake down as a rule. The team gotchas file is loaded into every session, so a correction made once sticks for everyone.
  5. Keep humans on anything shared or irreversible. Claude prepares it, a person runs it.

The go or no-go still waits on Monday’s full-scale measurements. Either way, we’ll get it in days, not months.