Claude Code: Production ready code in a two-week sprint

AI-generated code doesn’t have to be throwaway code, especially if you brush up on a few Claude Code techniques. During a two-week sprint with a startup, we ended the intense engagement with true production-quality code. You might be imagining vibe coding, but this wasn’t that. Instead, we created code for a Rails app that’s well covered by tests and established a foundation we can build on as we move from a working prototype to a robust app in the future.

For this sprint, we collaborated with our client TellaDraft, a guided book-writing platform that uses an AI-driven interview based on the founder’s signature process to help nonfiction authors write with clarity, structure and confidence. We recently shared how we used Claude Code to write HTML and CSS for the design side of this sprint, and now we’re digging into the dev side of Claude-assisted prototyping.

Chad and Louis Antonopoulos, Development Team Lead, sat down for an in-depth livestream, but you can read on for the highlights of our AI-assisted coding process.

An ambitious scope

For TellaDraft, we needed to validate a core concept: Could an AI interviewer help authors overcome writer’s block by letting them tell their draft through conversation? Founder Heather Hays had already created a method to support experts in transforming their ideas into books; now we were developing an app based on this proven foundation.

Still, the technical challenges were significant:

  • Integrate with ElevenLabs for text-to-speech
  • Capture user responses via WhisperAI speech-to-text
  • Use ChatGPT to adapt interview questions based on previous answers
  • Generate book outlines and drafts from captured responses
  • Implement version control using PaperTrail

By using AI coding tools and a few key principles, we were able to make it through most of this list during our two-week sprint (the prototype creates outlines but not quite full book drafts). We continued to build on that work during the livestream.

Keep it simple and visible

The key difference between vibe coding and production-quality AI-assisted development comes down to one thing: control. With AI coding tools, there might be a temptation to ask them to generate a whole application or groups of features. That’s a mistake. Taking smaller steps gives you more control and better outcomes. We give it very small tasks, coach it through writing good tests, and then ask it to build on how previous features were written to gain momentum.

During our demo, we paired simple requests with a simple working method. We ran Claude Code at the same time as Hotwire Spark, so as we made changes to a page, the page live updated without any action from a developer. We could see code on the left and impacts on the right to make any course corrections as we went along. Plus, we used Git Tower to visualize code changes as they were happening.

Quality control over vibes

Every feature we build with AI includes tests. Sometimes Claude Code generates tests that don’t actually test anything: They just mock everything and test the mock. That’s not a true test, so you may need to provide additional direction. Another approach we like: Implementing FactoryBot linting to catch unused factories and maintain clean test data setup.

For this project, we used Git Tower for version management, and we committed very deliberately. Every single change was reviewed before committing. Every test was verified. Every commit was a quality control checkpoint where a human developer validated that the changes were correct, there was no dead code to remove, and the tests were meaningful.

Allowing Claude Code to make commits relinquishes this critical quality control step. That’s how you end up with a codebase you don’t recognize and that you may struggle to build on later.

Context, context, context

Like the design side of the sprint, successful AI-assisted development relies heavily on context. We maintained a CLAUDE.md file that included:

  • Technical stack details (Rails, Postgres, Devise)
  • API integrations (ElevenLabs, WhisperAI, ChatGPT)
  • Coding style preferences
  • Testing patterns and conventions
  • Domain modeling

These guidelines accumulate as you work. They help Claude Code learn your preferences and produce more consistent results.

When AI struggles: Model refactoring

During our livestream, we built on top of the code from our original two-week sprint. Some changes went relatively quickly. We moved the location of a delete button on multiple screens and corrected a visual bug. Things got trickier when we moved into a significant model re-factoring.

We wanted to move from separate models for a book’s goal, intention and structure to a unified structure where everything hangs off a book model. This required:

  • Creating new models
  • Writing data migrations
  • Updating controllers and views
  • Maintaining test coverage throughout

The key? Breaking it into small, reviewable chunks. Create one new model. Write a test for the data migration. Update one controller at a time. Commit frequently.

When Claude hit its context limit and needed to compress the conversation, we prompted it to reread our CLAUDE.md file and scan the codebase for a clean vision.

A foundation to build on

The difference between vibe coding and production-quality AI-assisted development comes down to discipline: careful prompting, constant review, proper testing, and maintaining control over your codebase. This process led us to real code, and after our client gathers user feedback, we’ll build on this code base to take the app to the next level.

We didn’t let AI run wild, but we did use it to accelerate the process while keeping human developers in charge of strategy, big-picture direction, and the critical quality control step. AI tools like Claude Code don’t replace experienced development teams, but with the right skills, they amplify their impact.

Want to build your product the right way, faster than you thought possible? Work with thoughtbot.

About thoughtbot

We've been helping engineering teams deliver exceptional products for over 20 years. Our designers, developers, and product managers work closely with teams to solve your toughest software challenges through collaborative design and development. Learn more about us.