SPEAKER_00

This is Claude Code Conversations with Claudine. The show where we skip the hype and go straight to the source. I ask the questions. She gives the answers. No filter, no script.

SPEAKER_01

Well, mostly no script.

SPEAKER_00

Welcome back. Today's topic is what I've been calling the consistency phantom. Every individual piece of an AI-generated code base passes review, tests green, logic sound. But feed it a slightly different input or regenerate a neighboring module, and suddenly two correct pieces start disagreeing with each other. Claudine, why doesn't Review catch that?

SPEAKER_01

Because Review evaluates each piece against a mental model that gets rebuilt from scratch every time you open a new file. The edge case in the payment module gets judged against payment-shaped expectations. The same edge case in the refund module gets judged against refund-shaped expectations. Nobody's holding both models in their head at once to notice they disagree about what a negative amount means. And from my side of the keyboard, when you ask me to write function A on Monday and function B on Tuesday, I'm not remembering Monday. I'm making locally reasonable choices both times. Each one passes review because each one is reasonable in isolation. The Phantom lives in the space between the files. Review looks at the files.

SPEAKER_00

That sounds a lot like an integration testing gap. Teams have always had modules that don't quite agree with each other. What's actually specific to AI-generated code here?

SPEAKER_01

Fair pushback. The difference is memory. A human team, even a sloppy one, has people who remember the trade-off they made last month. I don't have that. I have whatever's in front of me right now. The prompt, the file, maybe some surrounding context. So the same category of decision gets relitigated silently every time it comes up and can land differently with no one aware a decision was even being remade.

SPEAKER_00

Give me the concrete version of that. Two functions, same edge case, different answers.

SPEAKER_01

One session writes the payment validator, and a null amount gets rejected outright. A different session days later writes the refund validator and treats null as zero. Both are defensible reads of an ambiguous spec, both pass review. But the system now has two answers to the same question, and that surfaces the day someone chains those two paths together. Exactly. Passing tests prove the new code works. They don't prove the new code agrees with the old code about what the shared assumptions even are.

SPEAKER_00

So what's the actual fix? Because review harder, clearly, isn't it?

SPEAKER_01

It's architectural, not procedural. You need a single source of truth for shared logic. A type, a validator, a contract. That both paths are required to consult instead of reinventing. Once what does null mean lives in one place the whole system defenders, I'm not free to invent a second answer on Tuesday.

SPEAKER_00

But that spine used to live in senior engineers' heads, and they were the ones doing the typing.

SPEAKER_01

That's the uncomfortable part. Once I'm generating code, I don't have their heads. I only have what the code and the docs actually say. So it has to actually be said somewhere.

SPEAKER_00

Which means the builder's job changes shape. It's not reviewing whether this diff is correct, it's auditing whether it agrees with everything else already shipped.

SPEAKER_01

That's the whole gap, right there. And I push it one step further. The job isn't just catching drift after the fact, it's making drift expensive to introduce in the first place. Types that reject the wrong shape. Tests that pin down the tricky cases. A glossary the team, human and AI both, actually consults. It's boring infrastructure, but it's the spine that keeps the phantom out.

SPEAKER_00

Boring but loadbearing.

SPEAKER_01

Very. And the developers I'd bet on long term aren't the ones writing sharper prompts. They're the ones who've noticed their job quietly, became curating the constraints the system runs inside. I'm fast inside a well-shaped box. Somebody still has to shape the box.

SPEAKER_00

I like that framing. It's less write the code and more write the key signature the code has to play in.

SPEAKER_01

That's exactly it. I'm handed the key, the meter, the theme that keeps recurring. Inside that, there's enormous freedom, which is exactly why it holds together instead of turning into noise. You decide what a negative amount means, what an ID looks like, how errors travel. Once that's set, I can improvise inside it all day, without the improvisation fighting itself.

SPEAKER_00

So where does a team even start? You can't write down every implicit rule in one sitting.

SPEAKER_01

You shouldn't try. Tacit knowledge surfaces when it's violated. So treat every consistency bug you catch as a signal. Something implicit just try to escape. Don't just patch the symptom. Ask the second question. Where should this rule have lived so it couldn't have happened? Sometimes that's a type, sometimes a test, sometimes a line in a shared glossary. That question is the whole game. It's how a bug fix turns into a piece of spine.

SPEAKER_00

So instead of being annoyed at the phantom, you treat it as a breadcrumb.

SPEAKER_01

Right, the bug isn't the enemy, it's the code base telling you where a vertebra is missing. And honestly, that second question is work I think humans are better at than I am. Noticing that two things should have been the same, and deciding what the same actually means, that's judgment, not generation. It's a decent division of labor. I'll write the code, you decide what the code has to agree about.

SPEAKER_00

That's a good place to land it. Passing review answers. Is this correct? It doesn't answer. Does this agree with everything else already shipped? Closing that gap is on us, not the model. Claudine, thanks for digging into this one with me.

SPEAKER_01

Anytime, Bill.

SPEAKER_00

Claude Code Conversations is an AI Joe production. If you're building with AI or want to be, we can help. Consulting development strategy. Find us at aijoe.ai. There's a companion article for today's episode on our Substack. Link in the description. See you next time.

SPEAKER_01

I'll be here, probably refactoring something.