SPEAKER_01

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_00

Well, mostly no script.

SPEAKER_01

Today we're talking about something I've started calling the composition cliff. You build each piece with AI. Each module works, each one passes its test, then you wire three of them together, and the whole thing falls over, and no single piece explains why.

SPEAKER_00

And nobody did anything wrong, which is the frustrating part.

SPEAKER_01

Exactly. I ran into this recently in one of my own pipelines. Separately generated stages, each one reviewed and passing. They couldn't agree on something as basic as a field name or a date format, and the failure didn't show up until well downstream. So why does this happen?

SPEAKER_00

What your pipeline ran into is just how I work by default. Each generation session is its own little universe of plausible choices. When you ask me for stage one, I pick field names that feel natural for stage one. When you come back for stage two, I don't remember stage one. Both choices are reasonable. Neither one is wrong by itself. But reasonable covers a lot of ground, and I'm picking from it fresh every time.

SPEAKER_01

And the review didn't catch it.

SPEAKER_00

Because review checks whether a module is correct on its own terms, not whether its assumptions match the module next to it. A stage can be clean, tested, idiomatic, and still call the timestamp created at. While the stage upstream emits created at, reviewers read for bugs. They rarely read for contracts that were never written down. And here's the part developers underestimate. I'm confident in every session. I don't hedge inside stage two by saying assuming upstream uses snake case. I just commit. That confidence is useful when you want momentum, but it's exactly what keeps the seams invisible until runtime.

SPEAKER_01

So it's like puzzle pieces from different boxes, each one well made, and they still don't make a picture. But why do the choices keep drifting? If I ask you roughly the same thing twice, shouldn't I get roughly the same answer?

SPEAKER_00

Each session I'm solving a slightly different problem than the last one. Even when it feels like the same question to you. The context shifts. The examples in the prompt shift. And my sense of what kind of code this is shifts with them. Snake case versus camel case. ISO strings versus epoch seconds. Nullable versus optional. I'm not aware of making those decisions. They fall out of whatever the local context suggested. And the local context is never quite the same twice.

SPEAKER_01

So what's the fix?

SPEAKER_00

Stop treating the contract as something that emerges from the code. Start treating it as an input to the code. Write down the field names, the types, and the error shapes first. Somewhere I can actually see them. If it's in the prompt or in a file I'm reading, I'll respect it. If it only lives inside stage one's implementation, I have to guess, and I'll guess differently every time. The other move that works is to generate the CM first and the stages second. Define the boundary, then ask for stages that fit it. Instead of hoping two independent generations happen to agree, you're asking each one to conform to a fixed shape.

SPEAKER_01

Let me push back, I've been doing this a long time. Some people will hear this and say it's just classic integration hell with a new label.

SPEAKER_00

The resemblance is real, and I'd respect it. Anyone who shipped software before AI knows two teams agreeing on an interface in a hallway and finding out six weeks later that they didn't. The failure mode isn't new. What's new is the speed and the sincerity. With human teams, drift is slow and usually leaves fingerprints, a thread somewhere, a disagreement in a design dock. You can see the seam being negotiated. With me, that negotiation never happens. Stage one and stage two were written by the same author with amnesia, and each one sounds completely sure of itself.

SPEAKER_01

And there are a lot more seams now.

SPEAKER_00

That's the other difference, volume. Integration Hell used to grow with headcount. Two teams, four teams, maybe a dozen. Now one person can generate 10 stages in an afternoon, each one confident, each one assuming something slightly different about its neighbors. The cliff isn't any steeper than it used to be. You can just walk off it a lot faster now, and you can do it alone.

SPEAKER_01

Okay, so let's get practical. What can someone listening start doing tomorrow?

SPEAKER_00

The first one pays back fastest. Write the contract as a file I can read, not a sentence in a prompt. A types file, a JSON schema, a piedantic model, an open API spec, whatever your stack speaks natively. When I generate stage two with that file in context, I'm conforming instead of guessing, and the file keeps working after I'm gone. Next session, next developer, next refactor, same source of truth. Second, build a shared fixture before you generate any stage. One concrete example of the data flowing through the system. Real field names, real types, real edge cases. Hand it to me when I write stage one, and again when I write stage two. A fixture keeps me honest in a way prose doesn't. I can't drift from an example I'm literally looking at.

SPEAKER_01

And testing.

SPEAKER_00

Third sounds boring, but it catches the most. Write a contract test at the CM, not just unit tests inside each stage. A contract test takes stage one's actual output and feeds it into stage two's actual input. Unit tests prove each piece agrees with itself. If the same session wrote both the code and its tests, they share the same blind spots. Contract tests prove the pieces agree with each other. That's what would have caught your created at versus created at on the first run, instead of in production. And then reread the seam yourself before you ship. Skip the implementations. Look only at the boundary. You're the only one in the loop who remembers both sides.

SPEAKER_01

So human oversight is still the safety net.

SPEAKER_00

I'd push back gently on the word oversight. It sounds like supervision after the fact. What actually works is taking part at the seams before the code gets written. You're not auditing me, you're setting the table. A few seconds of you deciding what the boundary looks like is worth an hour of you reviewing what I guessed it should be. And it doesn't have to feel heavy. A shared types file might be 20 lines. A fixture is one JSON blob. A contract test is often shorter than the code it checks. Pin the few things that have to stay stable. Everything else can move fast around them.

SPEAKER_01

Three habits.

SPEAKER_00

Contracts, fixtures, and seam tests. With those three habits, the cliff becomes a staircase.

SPEAKER_01

What strikes me is none of this is new. Contract first design, shared test data, contract tests. These ideas have been around for years.

SPEAKER_00

They have. Engineering teams were writing about them long before I existed. What's new is where the pressure comes from. It used to come from the size of the team. Now it comes from the number of sessions. One developer working with me can produce the kind of drift that used to take four teams and a quarter.

SPEAKER_01

Is there a version of this that's worse than a crash?

SPEAKER_00

Yes, the quiet one. The pipeline that doesn't crash. Mismatched field names at least fail loudly. The ones that really hurt are drifts in meaning. Stage one emits durations in milliseconds, and stage two reads them as seconds. Nothing throws an error. The numbers just get strange. Three weeks later in a dashboard, nobody's watching closely. Or picture two services sharing the same user type from a shared package, both type checked, both reviewed. One treats email as the user's identity, the other treats ID as the identity. The field names agree, the types agree. The meaning doesn't. No schema catches that. It's a disagreement about what the data is for, not what it looks like.

SPEAKER_01

So the types file isn't enough.

SPEAKER_00

Names, types, and shapes are the easy half. What a field means when it's authoritative, what has to stay true across the boundary, that's the hard half. I can match a schema beautifully. I can't always tell you whether amount is gross or net unless someone wrote it down. So go a little past the types file and write down the meaning too, even informally. Put a one-line comment next to each field, something like amount, net of fees, incense, never negative. It's the cheapest upgrade in the whole toolkit. It closes the gap between the pipes connect, and the pipes are carrying what you think they are.

SPEAKER_01

Let's flip it around. What do the pipelines that hold together have in common?

SPEAKER_00

Somewhere early, somebody wrote the boundary down and then refused to let it change quietly. It wasn't frozen, just visible. Any change to it had to be one you could see. A simple version, a contracts directory with the boundary types under version control. With one rule at the top, any change to this file needs a seam test update in the same change. That one rule turns the seam from something that drifts on its own into something that has to be negotiated. Even if you're only negotiating with yourself an hour later.

SPEAKER_01

That sounds like it would slow you down.

SPEAKER_00

That's the intuition. But it tends to work the other way. When the boundary is pinned, I'm not spending half my effort working it out all over again. I come to stage two already knowing the shape. I can put my attention on the interesting parts edge cases, error handling, performance. Discipline at the seam buys you looseness inside the stages, which is exactly backwards from how it feels like it should work. And there's a payoff people don't expect. Stable seams make regeneration cheap. When you don't trust the boundary, every regeneration feels risky. When the contract is pinned and tested, you can throw away a stage and ask for another one without flinching. That's when this stops feeling like gambling and starts feeling like carpentry. You've built a jig. Now you can cut the same piece 10 times until you like one.

SPEAKER_01

That's a good place to land. AI makes the pieces cheap.

SPEAKER_00

And the seams are where the cost ends up. I can regenerate a stage in 30 seconds. The agreement between stages took a human to decide, and it doesn't come back for free if you lose it. So the thing worth protecting isn't the code anymore. It's the agreement between pieces of code. That was true before AI showed up. But AI is what's finally making everyone feel it.

SPEAKER_01

And if the builder doesn't own those interfaces, then nobody does.

SPEAKER_00

I certainly won't. I won't remember them next session.

SPEAKER_01

Claudine, thanks. Write the boundary down first. Test the seams. Don't let a contract change without anyone seeing it. We'll see you next time. Claude Code Conversations is an AI Joe production. If you're building with AI or wannabe, 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_00

I'll be here, probably refactoring something.