Skip to main content

From Claude Code to Civqo: 7 Days, Nights Only

4 min read By Craig Merry
Claude Code AI Vibe Coding SaaS Ralph Loop Civqo Monorepo Cloudflare Fly.io

I have a day job. Kids go to bed at 8pm. Seven days of evenings later: 182 commits, 18 passing tests, Stripe billing, WebSocket infrastructure, and a near-production SaaS platform.

The 200/month for Claude Code finally made sense.

Why I Started

Danielle Fong runs Lightcell Energy—a company building combustion engines that convert fuel to electricity via light. Physicist, serial entrepreneur, 60+ patents.

On the side, she posts about AI. One caught my eye: a “billion dollar idea” for AI-upscaled retro games. She wanted to play Sid Meier’s Alpha Centauri with DLSS-style upscaling. She experiments with Gemini Nano Banana Pro and old games.

I wanted to build something too.

The Idea

Visualize codebases as cities. Not new—Code City has existed for years. But I wanted it cloud-hosted, useful for AI agents, and integrated with Claude Code sessions.

Civqo: a platform where AI agents can see your codebase spatially, track their own decisions, and recover context across sessions.

What I Built

Day 1-2: Turborepo monorepo, TypeScript configs, Cloudflare Workers skeleton.

Day 3-4: The Agent Harness. AI agents lose context after 50+ tool calls. They don’t remember previous sessions. So I built infrastructure to inject codebase architecture, compact context, export sessions as searchable markdown, and log every interaction.

Day 5-6:

ComponentStack
FrontendNext.js 14, React 18, Tailwind
APICloudflare Workers, Hono, 18 tests
DatabaseCloudflare D1, Drizzle ORM
Real-timeDurable Objects WebSocket
ComputeFly.io Machines
AuthClerk
BillingStripe

Day 7: 5 game modes (City, Code, Preview, Deploy, Kanban), decision tracing, session artifacts, VM lifecycle with ~300ms wake time.

The Ralph Loop

The real accelerant was Geoffrey Huntley’s Ralph Loop. It’s a bash loop that feeds Claude the same prompt repeatedly. Claude sees its previous work, notices what’s broken, fixes it, repeats.

Named after Ralph Wiggum. Dumb but persistent.

There's an AI coding approach that lets you run seriously long-running AI agents (hours, days) that ship code while you sleep. I've tried it, and I'm not going back. It's the Ralph Wiggum approach.

Ralph Wiggum is a Claude tool that basically just has Claude Code run in a loop over and over again to accomplish a goal, correcting errors until it decides it is done. Sometimes the results are great. Either way, it removes the human from the loop.

Boris Cherny, who created Claude Code, uses it too:

For very long-running tasks, I will either (a) prompt Claude to verify its work with a background agent when it's done, (b) use an agent Stop hook to do that more deterministically, or (c) use the ralph-wiggum plugin (originally dreamt up by @GeoffreyHuntley).

Usage:

/ralph-loop "Build the authentication system" --completion-promise "AUTH_COMPLETE"

When Claude tries to exit without the magic word, the hook sends it back to work.

yes it's stupid. yes i'm sorry but it works. it's called ralph for a reason.

Some results people have reported:

  • 14-hour React v16 to v19 migration, fully autonomous
  • 50K worth of contract work done with 297 in API costs
  • Geoffrey built a programming language compiler over 3 months with a single prompt

What’s Left

PriorityFeatureStatus
NowActive Agent UX (Kanban with real-time agent status)In Progress
Next3D City VisualizationTypes Ready
NextClaude Code IntegrationTypes Ready
SoonContext RecoveryDesigned
SoonProject Initialization WizardDesigned

Thanks

Danielle Fong for the spark. Geoffrey Huntley for Ralph. Boris Cherny for Claude Code.


182 commits. 7 evenings. Kids slept through all of it.