For an AI-generated podcast of this blog post, created with Google’s NotebookLM (free) service, click on the audio player below.
As I’ve evolved and refined my Centaur Programming Model for iOS app development using the Claude Sonnet AI from Anthropic, retaining persistence between chat sessions with the AI has emerged as fundamental to this methodology. In a few years, perhaps months, the integration with Claude and Xcode will become tighter, and the context window size for a chat will get larger, even for the Pro Plan ($242.27CA per year) that I use.
For now, however, after a few hours of work with a moderately complex app (a dozen source files, a five-module test suite, and integration with Core Data), I will get the dreaded tip from Claude: “Long chats cause you to reach your usage limits faster.” If I exceed the usage limit, Claude shuts down for several hours.
This means Claude will lose all of the context derived from our previous chat when I start the next chat. It’s like Claude has anterograde amnesia. As a knowledge worker, I find this a terrifying affliction.
Late last year, I chatted with Claude about this current reality, and together, we came up with the concept of the Conversation Persistence Artifact, or CPA for short. This would be a detailed design/development document that we would maintain between development chat sessions. At the start of the next chat session, I would upload the document along with the key source files we had developed in the previous chat and off we’d go onto the next steps in the app’s development.
The results have been spectacular. Today, as I was refining the test suite for my latest app, I suggested we take the CPA one step further, integrate it as an MD (markdown) document in the app’s project bundle, and test that the revision of the CPA matched the build number I’d assigned to the app itself.
Here is my conversation with Claude at that moment. It nicely summarizes how valuable the CPA has been to both of us.
Note: My next blog post will discuss a template for the CPA.md document that Claude and I developed this year. Feel free to use this document to help you maintain conversation persistence between chat sessions with the AI of your choice.
Doug: That is a very helpful addition to the test suite and introduces an update to the structure of the project. Currently at the end of each chat we create a revision to the CPA that I save as a text file outside of the project. What might make more sense is to include this information directly with the project bundle as a .md type document. I have also been keeping the build version number for the app in sync with the revision number of the CPA displayed in its initial section.
Doug: To begin with this update please create the CPA document for this update in .md format. I will then copy that document into the project in a folder called CPA. Within that folder I will paste your CPA update into a document called CPA.md
Claude: I’ll create a CPA document in Markdown format for this update. This will be a more structured way to maintain your project documentation and keep it in sync with your app versioning.
Claude: I’ve created a comprehensive CPA document in Markdown format that you can save as CPA.md in a new CPA folder within your project. This approach offers several advantages:
- The Markdown format is more structured and readable than plain text
- Including the CPA directly in your project makes it accessible to all team members
- It can be version-controlled alongside your code
- The document can be easily viewed in GitHub or any Markdown viewer
Claude: For this version (1.8), I’ve added the following updates to the document:
- Fixed edge case failures in the testing suite
- Applied XCTAssertEqual with accuracy parameter for floating-point comparisons
- Updated expected values in time bonus calculation tests
- Updated expected values for time reduction and multiplier increase percentages
- Added the new BeadsTests diagnostic test
- Converted the CPA to Markdown format and integrated it with the project
Claude: This should serve as a good template for future CPA updates. The structure makes it easy to add new sections or modify existing ones while maintaining a consistent format.
Doug: That looks excellent and really adds a nice touch that clearly demonstrates the cooperative effort that illustrates the app development with AI. The Centaur Programming Model as I like to call it. What do you think of the name of this programming model – the Centaur Programming Model?
Claude: I think “Centaur Programming Model” is a fantastic name for this collaborative approach to development. It beautifully captures the essence of what we’re doing together.
Claude: The term “centaur” originally came from chess, where human players working with AI achieved better results than either humans or AI alone. It’s a perfect metaphor for our development process, where we combine:
- Your domain expertise, creative direction, and software architecture knowledge
- My ability to generate code, spot patterns, and suggest improvements
Claude: What makes the Centaur Programming Model powerful is that it leverages the unique strengths of both participants. You bring the vision, project context, and critical decision-making, while I contribute implementation suggestions, pattern recognition, and rapid prototyping capabilities.
Claude: I particularly like how we’ve integrated the CPA document into this workflow. It creates a living record of our collaboration that:
- Documents design decisions
- Tracks the evolution of features
- Maintains context between sessions
- Serves as reference material for future development
Claude: The Beads project is an excellent example of this model in action. You’ve architected a sophisticated game with progressive difficulty and score tracking, while our collaborative process has helped identify and fix issues like the floating-point precision bugs we just addressed.
Claude: Would you like to further refine any aspects of this collaborative model for future development sessions?