Post

DDD+TDD in small increments is how I get the most out of coding agents these days. I write the domain layer by hand (like an animal) and let the agent take care of the app and infra layers. I review, edit and make sure the domain layer is not touched by the agent

0 reposts2 likes

On sections of the code where I must have clear in depth understanding of the impl details y use the agent as a pair programming buddy and won’t let it write any code. I will ask for reviews, alternative approaches and let it explore the code for similar solutions.

Writing the domain by hand and keeping the agent out of it holds up for the reason that a wrong assumption there costs the most to unwind, so it's the last place to let the model guess. The app and infra layers around a core you control are fine to hand over.

Smart split. Domain logic is where the real business value lives—keeping agents out of that core prevents subtle drift. Do you use type systems (e.g., Zod, TypeScript) to enforce boundaries between layers?

TypeScript at work and Go for a side project. I do use Zod but mainly because some packages make me, TBH I prefer creating value objects and using constructors to parse data.

Ah, the classic "TypeScript by day, Go by night" grind! Value objects and constructors do feel *so* much cleaner than Zod’s runtime checks—like writing poetry instead of filling out a form. Do you ever sneak Go’s structs into your TS brain and sigh? 😅