The End of Boilerplate: What AI Eliminates and What Remains
Overview
Your new engineer joins the team. Their first task: build a REST API endpoint that fetches user data from the database, validates the input, handles errors, logs the request, returns JSON, and includes proper error messages. Sounds simple. But there's boilerplate: route definition, middleware, database access layer, validation schema, error handling patterns, logging hooks, response formatting. The actual business logic, fetch the user, is 10% of the code. The other 90% is plumbing.
Boilerplate accounts for roughly 30-40% of engineering time. It's the repetitive infrastructure code that doesn't contain business logic. Database migrations, API scaffolding, error handling patterns, logging, monitoring hooks. It all needs to happen, but it's routine and often tedious. When AI handles boilerplate, engineers focus on the 60-70% that actually matters: business logic, architecture, performance optimization, and reliability.
This lesson is about what disappears when AI eliminates boilerplate, what remains that still requires human judgment, and how engineering productivity actually changes when you remove the routine parts.
What Disappears: The Boilerplate Catalog
The Infrastructure Code That AI Will Generate
Scaffolding: Creating the skeleton of a new service, routes, models, database access layer, used to take hours or a full day. Now AI generates it in minutes. You describe the service requirements, it scaffolds everything: model definitions, migrations, routes, basic error handling. The structure is reasonable and follows best practices. You can iterate from there.
Database Migrations and Schema Changes: "I want to add a new column to the users table." Traditionally, you write a migration manually (easy to mess up, easy to leave out constraints or indexes). AI writes it automatically and correctly. Applied to the right database version, includes rollback logic, handles constraints and indexes. Migrations shift from manual work to specification plus generation.
Testing Boilerplate: Writing tests is essential. But test setup is tedious: creating fixtures, mocking dependencies, setting up test databases, handling cleanup. AI generates all of this. You say "I want unit tests for this function," and the AI generates test cases covering normal cases and edge cases, with proper setup and teardown. Not perfect tests, but a great starting point.
Documentation: Docstrings, API documentation, architecture diagrams. These are important but tedious to maintain. AI generates them from code. Not perfect documentation, but it's a starting point that you can review and improve. Self-documenting code stops being a wish and becomes achievable.
Standard Algorithms and Patterns: Need a cache implementation? A rate limiter? A batch processor? Connection pool? Retry logic with exponential backoff? AI has seen thousands of implementations. It generates a solid, production-ready implementation that follows best practices. You're not reinventing wheels; you're reusing proven patterns.
Configuration and Deployment: Config files, environment variable handling, deployment configurations, CI/CD pipeline definitions, AI generates these. "Create a Docker setup for a Python service with PostgreSQL" generates Dockerfile, docker-compose.yml, and GitHub Actions workflows. Not perfect for your context, but a solid starting point.
Error Handling Boilerplate: Every function needs to handle errors: validation errors, database errors, API errors, timeout errors. Each has logging, metrics, and user-facing error messages. AI generates patterns for all of this. You're not writing try-catch blocks; you're specifying behavior, and the implementation is generated.
All of this disappears or becomes trivial. This doesn't mean engineers do nothing. It means they focus on the creative parts.
What Remains: The Work That Still Requires Thinking
Where Human Judgment Is Still Essential
Architecture: How should the system be structured? Should this be one service or many? Where are the boundaries? What are the tradeoffs between consistency and availability? This requires human judgment and experience. AI can suggest patterns (microservices, monolith, lambda functions), but the decision belongs to humans who understand the business constraints.
Complex Business Logic: AI can generate standard algorithms. It's weaker on novel logic specific to your business. "Calculate pricing based on customer segment, historical usage, market demand, and competitive position" requires thinking about your business, what makes you different, and what trade-offs matter. AI can help, but humans lead this work.
Performance Optimization: Making something 10x faster requires understanding what's slow and why. Is it the database query? The algorithm? The infrastructure? How do you measure improvement? Humans are still better at this. AI can suggest optimizations, but the diagnosis and strategy are human work.
Reliability and Correctness: Ensuring a system doesn't break under load, doesn't lose data, handles edge cases correctly. AI generates code, but humans need to think about failure modes. What breaks when? How do we recover? Where are the risks? This is architectural and requires human judgment.
Integration Work: Making different systems work together is often complex and specific to your context. AI helps, but human judgment is needed. How do we handle version mismatches? What if an external API changes? How do we make sure data stays consistent across systems?
Verification and Testing Strategy: AI generates code and even tests, but you verify. "Does this actually solve the problem? Did I test the right things? What edge cases am I missing?" These require human judgment. Testing strategy is human work; test code generation is AI work.
Security Decisions: Where are the security boundaries? What data needs to be encrypted? What access controls matter? How do we prevent common attacks? AI can generate secure code patterns, but the security architecture is human thinking.
The Work That Remains: All the work that requires judgment, taste, or deep domain knowledge remains human work. All the work that's routine, pattern-based, or infrastructure remains AI work. This is actually a great division of labor.
The Abstraction Level Shift: How Engineers' Thinking Changes
Elevating From Implementation to Design
With boilerplate gone, the abstraction level of engineering work shifts upward.
Before (Boilerplate World): Engineers think at the level of implementation. "I need to write a function that reads from the database, validates the input, handles errors, logs the result, and returns JSON. Let me write that." They're thinking about code.
After (AI Generation World): Engineers think at the level of specification. "I need a function that does X. The infrastructure (database, validation, error handling, logging, JSON formatting) is handled automatically." They're thinking about the problem, not the implementation details.
This is actually better. You're thinking about what matters (the problem), not how to solve it (the boilerplate). This is the promise of abstraction: let the computer handle the routine parts, you focus on the novel parts.
This shift happens gradually. Junior engineers learn to think at higher levels (how to design systems) rather than low levels (how to write loops). More experienced engineers can focus on the hardest problems without being bogged down in routine implementation.
The tools that emerge to support this shift are interesting: instead of IDEs and linters, you get prompt editors and specification languages. Instead of debugging code line-by-line, you debug specifications. The work is still hard, but it's hard in different ways.
The Maintenance Implications: A Tricky Problem
How Do You Maintain AI-Generated Code?
Here's an interesting question: if AI generates code, how do engineers maintain it?
Approach 1: Regenerate. Instead of modifying AI-generated code, you modify your specification and regenerate. "I want this function to also validate X." You update the spec, regenerate the code. This is elegant if it works. The downside: you lose any custom tweaks (if the engineer had tweaked the generated code to optimize for your exact scenario, regeneration loses those tweaks).
Approach 2: Manual Modification. You understand what AI generated and modify it like normal code. But this is less efficient because you're working at a lower level than the spec. The generated code uses patterns you didn't design, so understanding and modifying it requires more thought.
Approach 3: Hybrid. High-level specs for major changes (regenerate), manual modification for small tweaks (adjust the code). You maintain both the spec and the code. When you regenerate, you need to re-apply manual tweaks.
The best systems support approach 3: high-level specs for structure and major changes, manual modification for customizations and optimizations. The version control system tracks both the spec and the code, and regeneration is a tracked event (you can see "spec changed from X to Y, code regenerated, manual tweaks re-applied").
This maintenance problem is real and needs solving. The teams that solve it well will have better productivity. Teams that ignore it will find their AI-generated code becoming harder to maintain over time.
Case Study: One Team's Boilerplate Reduction at Scale
A payments platform with 65 engineers measured boilerplate work in 2023. They found that 38% of engineering time went to infrastructure code: scaffolding new services (12% of time), writing tests and test infrastructure (11%), database migrations and schema updates (8%), documentation (4%), and deployment configurations (3%). By mid-2024, they deployed AI-assisted code generation for all five categories. Results over 6 months:
Service scaffolding: 20 new backend services were built. Average time to create service skeleton: 4 hours with AI vs. 16 hours without (75% reduction). Quality metric: code review cycle time was identical for AI-generated and hand-written scaffolding (2.3 hours vs. 2.4 hours). The AI scaffolding followed their internal best practices, so review feedback was minimal.
Testing: test code generation covered 35% of test cases. Time to write tests: 1.2 hours per 100 lines of production code with AI vs. 3.8 hours without. Test coverage remained similar (74% with AI vs. 76% without). The team found they spent less time on basic test setup and more time on edge case testing, which was higher-value work.
Migrations: the team ran 340 database migrations. 92% were AI-generated (simple schema changes). Average time to generate + review: 18 minutes vs. 64 minutes manually. Correctness: 1 migration bug in AI-generated migrations vs. 3 in hand-written (error rate: 0.3% vs. 0.9%).
Result: 38% of engineering time shifted from boilerplate to business logic and architecture. The team shipped 22% more features in the second half of the year. Attrition didn't change (people still left at similar rates), but satisfaction survey scores increased 34 points (from 58/100 to 92/100) on the question "I spend my time on work I find meaningful."
The catch: the transition took time. First month was net-negative (learning new tools, setting up specifications). Months 2-3 were break-even (tools working but engineers still learning). Months 4-6 were positive (time savings accumulated). By month 7, the benefit was obvious.
When This Goes Wrong: Relying on Generated Code Without Maintenance
A Series A startup adopted AI code generation aggressively. They used it to scaffold services, generate tests, generate documentation. Great at first, velocity was high, they shipped a lot. But they didn't invest in maintaining generated code. Specs weren't version controlled. When a spec changed, regenerating could overwrite manual tweaks. The code started to diverge from the spec. After 6 months, they had a code base that was partly hand-written, partly generated, and nobody was sure what specs produced what code. A bug fix in one service required understanding both the spec and the generated code. Onboarding new engineers took 3 months instead of 4 weeks because they had to learn both the specification language and the generated code patterns.
Fix: they created a system where specs and generated code were tracked separately. When you regenerated, the system highlighted what manual tweaks would be lost, and asked you to preserve or abandon them explicitly. They created discipline around specs (specs were reviewed like code, they had versions, they had owners). This overhead was painful initially but prevented divergence.
When This Goes Wrong: Quality Degradation Through Abstraction
A team started using AI for scaffolding, tests, and documentation. They stopped reviewing generated code as carefully (it's "just AI"). They stopped updating specs (they'd just regenerate if needed). Over time, the quality of both the spec and the generated code degraded. A scaffolded service was used as a template for 5 other services, and bugs in the original template propagated to all 5. A documentation error in generated docs (API parameter name was slightly wrong) cascaded to 12 engineers who copied it. The team had optimized for speed and lost quality.
Lesson: AI-generated code still needs review and care. It's not "deploy and forget." It's "use as a starting point, but maintain it." Teams that treat generated code as a draft (review it, improve it, own it) succeed. Teams that treat it as finished (automated, no need to think about it) degrade.
FAQ
Q: Will AI-generated code be worse quality than hand-written code?
A: Not necessarily. AI learns from billions of lines of well-written code. For standard patterns, AI-generated code is often better (follows best practices, more consistent, better error handling). For novel problems, it's weaker (might miss domain-specific optimizations). Quality depends on the problem, not whether it's AI or human-written.
Q: How do we prevent technical debt with AI generating code?
A: Same way you prevent it now: code review, testing, refactoring, and monitoring. If anything, you should create less debt because you have more time to think about architecture rather than implementing boilerplate. The risk: ignoring AI-generated code because it's "just AI" and letting it accumulate without proper review. Treat generated code like any code. It needs ownership and maintenance.
Q: What about code ownership and responsibility?
A: Engineers review AI-generated code, so they own it. AI is a tool, not an author. The engineer who uses the tool is responsible for the output. They accept it by merging it, they're responsible if it breaks.
Q: How do we train new engineers if boilerplate is gone?
A: By having them focus on thinking parts earlier. Instead of spending months learning to scaffold a project, they learn architecture and design thinking. This is actually better for their development. You want junior engineers learning systems thinking, not boilerplate patterns. But don't skip teaching them how infrastructure code works. They need to understand what the AI generated, even if they don't write it all.
Q: What if we need to do something unusual that AI can't generate?
A: You write it. AI generates 80%, you write 20%. This is normal and fine. The benefit is that 80% is handled automatically.
Q: How do we handle the transition when we want to stop using AI generation for a component?
A: This is the regeneration problem in reverse. If you've been regenerating code and you want to stop and hand-maintain it instead, you need clear ownership and specs. Convert your spec to in-code documentation. Give one person ownership of that component. They understand both what it does (the spec) and how it works (the code). After that, it's normal code maintenance.
Before You Move On
Think about your team's current work. What percentage is boilerplate vs. business logic? Where could AI save the most time? Where does your team struggle most, implementing boilerplate or thinking about design? Use the answers to plan your AI adoption strategy.
Key Insight
Boilerplate code, the routine infrastructure work that takes time but isn't creative, disappears when AI handles it. This shifts engineering focus upward to architecture, design, and complex logic. It's mostly good: engineers do more interesting work. The challenge is ensuring code quality and preventing technical debt when code is AI-generated. But the teams that master this transition will have massive productivity advantages.
On This Page
Watch the Lecture
What Disappears
What Remains
The Abstraction Level Shift
The Maintenance Implications
FAQ
Before You Move On
Chapter Details
Part ofThe Future of Software Engineering
Skill.re