logoalt Hacker News

ionetan • today at 8:43 PM • 0 replies • view on HN

Many of the success stories come from already mature teams, with healthy domain segmentation, and reliable CI flows. At the same time most developers find themselves working in legacy codebases, in suboptimal conditions, where blindly waving the AI wand at deep organizational problems isn't going to cut it.

I think a healthy first step could be to segment the codebase into scoped domains where we can validate inputs and outputs, and also contain risk of cognitive debt to a scope where we can accept the risk.

That being said, I think agentic coding has changed the general approach to the craft in a few ways. Agentic code is "soft" in the sense that it allows itself to be easily shaped, providing more liberty in the exploration phase and faster prototyping for instance. However, for software rigidity, this softness can be detrimental. I'd argue that a sturdy architecture is more important than ever. Architecture is to agentic code what sturdy poles are to a fabric tipi. The fabric can be ornate and beautiful, but without structural poles to stretch it out into its shape, it ends up being a flat, tangled mess. Tests won't save us if we don't have some guiding architecture, but with it, tests are a great way to pin down the the architecture, just like in a tipi the pegs pin down the poles and fabric in a symbiotic relationship.

For code reviews this would mean that we can focus our comprehension and review efforts to the most critical parts and rely on locking it down with tests at the edges.

I've elaborated on the Cost of Cognitive Debt in the past: https://epiq.sh/blog/cost-of-cognitive-debt