Presenters
Source
Embrace the Friction: Steering AI Agents in Software Development 🚀💡
“Ship without friction.” Sounds like a dream, doesn’t it? A smooth, unhindered path from idea to deployment. But what if that frictionless journey secretly leads to a cliff edge? That’s the intriguing question Armin Ronacher, a software development veteran with 20 years in the open-source space (and creator of the Python framework Flask!), and Cristina Poncela Cubeiro, a self-described “native AI engineer,” challenged us with. Their message is clear: in the age of AI agents, we need to add a little bit of friction back into our development process.
Armin and Cristina, who co-founded Arendelle to make sense of the AI landscape, shared insights from their 12 months of building with and on agents. They’ve discovered that while AI offers immense leverage, it also introduces significant disengagement and two core problems: a psychological one and an engineering one. This isn’t about finding all the solutions, but about sharing their journey and what they’ve learned so far.
The Siren Song of AI: Psychological Challenges 🧠✨
Remember the early days of playing with AI tools? It felt like magic! You’d prompt, and suddenly, you were more productive, having more fun. But as Cristina points out, this quickly shifted. What was once a fun productivity boost became a baseline expectation. Now, we have to use them, creating pressure to ship faster and produce more code. This leads us straight into a trap.
AI tools are incredibly addictive. That next prompt might just be the one that makes your product shine, or it might be the “last drop of slop” that brings everything crashing down. This addiction, combined with the sheer volume of output, tricks us into believing we’re more efficient. In reality, we lose the crucial time needed to stop, think, and question: Is this the best way? We lose our agency, letting the agent run wild, reading files it shouldn’t, and creating unintended behaviors.
Armin highlights how this changes the very composition of an engineering team. We were once supply-constrained by code creation. Now, every engineer has a multitude of producing power compared to their reviewing power. This piles up pull requests, leading to more skipped or “rubber-stamped” reviews. Worse, people from other departments, like marketing or even former CEOs, are now shipping code with AI, but the responsibility still rests with the engineering team. The total number of entities creating code far outnumbers those who can truly be responsible for it.
Engineering’s New Reality: The Agent’s Impact 🛠️👾
Beyond the psychological toll, AI agents present tangible engineering challenges. They tend to create larger pull requests, sometimes reaching 5,000 lines of code, because generating code is “free.” Agents are optimized to produce code that runs and makes progress, often at the expense of quality and robustness.
Consider this: an agent might write code that attempts to read a config file and, if it fails, loads some defaults. A human engineer knows this is dangerous because you might not realize you’re running with defaults until it’s too late, potentially corrupting data. Agents, lacking emotions, don’t “feel bad” about writing brittle code or creating many more failure conditions than human-written code normally would. This leads to systems that are “hobbling along,” creating a codebase so complex that the agent itself can no longer navigate it effectively, leading to increased entropy in the source code.
However, not all is lost! Cristina notes a strong correlation between what agents excel at and the type of codebases they work on. Agents perform much better with libraries because they have clearly defined problems, tight constraints, and simple cores. Products, with their intertwined concerns (UI, API, permissions, billing), are much harder because the agent cannot fit the entire global structure into its context window. It might be reasonable locally but becomes “demented” globally.
Designing for Agents: The Agent-Legible Codebase 🏗️📄
The solution? Treat your codebase as infrastructure and design it to be “agent-legible.” This means making it easy for agents to understand and interact with.
Here are the key principles:
- Modularization: Break down components to allow agents to add features in one spot without corrupting others. This also applies to modularizing your code flow itself, clearly defining steps to prevent agents from adding “fuzz” (unwanted parsing, state changes) between them.
- Follow Known Patterns: Don’t fight the reinforcement learning (RL). Lean into established patterns for better, more scalable output.
- Simple Core, Push Complexity: Design a simple core and push complexity to other abstraction layers, making the codebase easier for both humans and agents to read.
- No Hidden Magic: Avoid tools that hide intent from the agent, like React server actions or ORMs instead of raw SQL. If an agent can’t see it, it can’t respect it.
Reintroducing Friction: Tools and Mindset 🚦🛑
To mechanically enforce these principles and reintroduce necessary friction, Armin and Cristina leverage tools and specific practices:
- Linting Rules: These are crucial for enforcing standards, such as no bare
catchrules. - One Query Interface for SQL: Ensures agents don’t have to hunt for different SQL implementations, preventing missed changes and breaking behaviors.
- Primitives Components Library for UI: Guarantees consistent styling and behavior, avoiding raw input boxes.
- No Dynamic Imports: Simplifies the codebase.
- Unique Function Names: Improves legibility for both humans and agents and boosts token efficiency. If an agent searches for a feature and gets only one result, it performs better.
- Erasable Syntax-Only TypeScript Mode: This makes the code essentially JavaScript with type annotations. It provides a single source of truth, reducing confusion for agents when looking for errors.
The goal is to get the agent to produce good code, but more importantly, you need to feel the pain that the agent doesn’t feel. Tools like their custom PyExtension for code review are vital. This extension separates mechanical bugs (which the agent can fix automatically) from critical human callouts. For instance, database migrations or permission changes should always require human judgment due to potential impacts on locks, data size, and production. This “hit” helps reactivate human brainpower precisely when it’s most needed.
The Power of Slow: Where Human Judgment Shines 🐢🌟
While AI offers addictive speed and productivity, we must recognize where this speed is detrimental. AI excels at:
- Reproduction Cases: Quickly recreating customer issues.
- Exploring Product Directions: Rapidly generating different code implementations for ideas, provided you commit to thorough review.
However, AI agents are not good at:
- System Architecture: Designing robust, reliable systems.
- Creating Reliability: Ensuring long-term stability.
Why? Because these areas demand we go slow. AI can generate months of technical debt in weeks or even days, leading to a rapid drop in our understanding of our own codebase. Armin shares the frustrating, disappointing experience of committing AI-generated code that later failed in production, realizing he was the one who screwed up by not slowing down. Objectively judging the state of a codebase becomes incredibly hard.
Embrace the Friction! 🤝❤️
Every engineering team strives to eliminate friction in shipping. And yes, much of that friction is annoying and unnecessary. But as Armin reminds us, in large engineering organizations, systems like SLOs (Service Level Objectives) are intentionally designed to add friction to make us think about reliability, criticality, and staffing.
With AI agents, we’ve fallen into the trap of wanting to remove all friction. Yet, friction is what’s necessary on a physical level to steer. Without it, there’s no control.
So, let’s cultivate a more positive association with friction. It’s where your judgment, your experience, and your unique human insight comes into play. Insert that friction, feel it, and reclaim control over the incredible power AI agents offer. Your code, your systems, and your sanity will thank you.