Weidong Shi.

AI in Action · Jul 7, 2026 · 16 min read

AI in Action: Building RetireCheck with Cursor

How practical engineering, domain architecture, and AI-assisted development shipped a production retirement calculator — from wizard UX to Monte Carlo projections.

I built a production-ready app in about a day of focused effort, spread over a weekend. I didn't write most of the code — but I made every architectural decision. That distinction is the whole story.

RetireCheck is AI in Action #1 — from empty repo to deployed production app (frontend on Vercel, API on Render, tests and CI green) through intent-driven vibe coding: rules plus one-line prompts, with the pipeline enforcing quality. Vibe coding gets you a demo. Intent plus guardrails gets you production.

RetireCheck product showcase — wizard, gauge, and results
RetireCheck: four-step wizard, animated readiness gauge, and shareable results.

The product journey

Every AI in Action application follows the same methodology: Build → Validate → Improve → Document → Share. RetireCheck was the first full pass — prove the loop on a high-stakes domain (retirement math) before applying it to wellness and AI readiness.

The problem

People quietly worry about one question: will your money last? Advisor-grade tools are heavy. Spreadsheet guesses ignore sequence of returns, Social Security timing, RMDs, and Medicare IRMAA. A credible answer needs simulation — and the math must live somewhere that can be tested, not in a React component the AI rewrote overnight.

Design principles

Before asking Cursor to write a single component, I wrote the rulebook. The highest-leverage line in the repo:

All financial math lives in RetirementCalculator.Domain. No calculation logic in React components or API controllers.
  • Pure domain layer before UI scaffolding
  • Ranges and sample plans before forcing exact numbers
  • Estimates only — not financial advice — on every surface
  • No account; inputs used for the request, not stored as a plan
  • CI and xUnit on Social Security math before trusting a demo
Context, loop, and ship workflow diagram for Cursor-assisted development
Context → Loop → Ship: the engineer decides, the AI assistant types, the pipeline verifies.

What shipped

RetireCheck is a free US retirement calculator: a four-step wizard, 1,000-scenario Monte Carlo, Social Security claiming comparison, and year-by-year federal/state tax, RMD, and IRMAA projections — with a shareable readiness score card.

Stack: Next.js 16 + TypeScript + Recharts (Vercel) · ASP.NET Core with a pure C# domain library (Render) · xUnit · GitHub Actions CI.

Monte Carlo fan chart. One sentence — “Replace the pie chart with a Monte Carlo fan chart — shaded P10–P90 band, median line, open by default” — produced a Recharts composed chart. Review, typecheck, tests, ship.

RetireCheck Monte Carlo fan chart screenshot
The result of that one-sentence prompt: P10–P90 band with median line.

One-click sample plan. Most visitors from a social feed will not fill a four-step form. A sample-plan button wires a realistic profile through the same API path — still no calculation logic in the UI.

RetireCheck animated readiness gauge from sample plan
One click from the homepage: animated readiness score from 1,000 simulations.

Reference architecture

That domain boundary keeps every tax bracket, Social Security adjustment, and Monte Carlo run in a pure, unit-testable C# library. The React layer stays a thin rendering shell — so there is no “AI spaghetti” where a tax formula quietly lands in a component. The Next.js app proxies to the API; browsers never call the calculation engine directly.

RetireCheck architecture diagram — Next.js, API, and C# domain
One rule governs this architecture: all math lives in the C# domain layer.

Engineer and AI Assistant

  • Engineer — product question, domain boundary, API contract, disclaimer language, review of every diff.
  • AI Assistant — scaffolding, UI exploration, chart wiring, docs — inside the rules.
  • Pipeline — typecheck, xUnit, and CI dispose of every meaningful change. The assistant proposes; git and CI dispose.

Testing what matters

Visitors notice wrong Social Security math and silent UI formulas — not elegant prompts. Failure modes we designed against:

  • Tax or SS logic drifting into React
  • Sample plan bypassing the real API path
  • CI green while domain tests are skipped

xUnit covers Social Security math and validation; GitHub Actions runs on every push. That is the minimum bar for “production” when money is on the screen — estimates only, but still trustworthy estimates.

Takeaways

  1. Write rules before prompts.
  2. Isolate business logic in a pure, testable layer.
  3. Review diffs — never trust-and-paste.
  4. Ship something real; deploys teach.
  5. Your value moves up the stack: boundaries, contracts, tests, taste.

Closing

RetireCheck was the first full pass of the AI in Action loop: Build → Validate → Improve → Document → Share. SleepCheck follows the same philosophy in a different domain — proof that the methodology travels.

AI accelerates software delivery. Experienced engineering judgment shapes the final product.