<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aleks</title>
    <description>The latest articles on DEV Community by Aleks (@aleks4).</description>
    <link>https://dev.to/aleks4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F914858%2F00a3b63b-2323-48a4-a0c9-c7787f08ed04.jpeg</url>
      <title>DEV Community: Aleks</title>
      <link>https://dev.to/aleks4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aleks4"/>
    <language>en</language>
    <item>
      <title>Rails Won Because It Had Opinions. AI-Native Apps Need the Same Thing.</title>
      <dc:creator>Aleks</dc:creator>
      <pubDate>Fri, 12 Jun 2026 22:48:59 +0000</pubDate>
      <link>https://dev.to/aleks4/rails-won-because-it-had-opinions-ai-native-apps-need-the-same-thing-456h</link>
      <guid>https://dev.to/aleks4/rails-won-because-it-had-opinions-ai-native-apps-need-the-same-thing-456h</guid>
      <description>&lt;p&gt;We keep hearing the same comparison:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.harper.fast/" rel="noopener noreferrer"&gt;Harper&lt;/a&gt; feels like Ruby on Rails.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That comparison did not come from a positioning exercise. We were not sitting in a room trying to make Harper sound like Rails. It came from developers, advisors, analysts, and technical leaders trying to describe what feels different about building with Harper.&lt;/p&gt;

&lt;p&gt;And the more we hear it, the more obvious the point becomes.&lt;/p&gt;

&lt;p&gt;The comparison is not about Ruby. It is not about MVC. It is not about scaffolding CRUD apps or recreating Rails in JavaScript.&lt;/p&gt;

&lt;p&gt;It is about a product philosophy.&lt;/p&gt;

&lt;p&gt;Rails won because it had opinions.&lt;/p&gt;

&lt;p&gt;It made choices for developers. It gave teams a coherent way to build. It reduced the number of architectural decisions required to get from idea to working application. It proved that the right constraints can make great developers faster.&lt;/p&gt;

&lt;p&gt;That lesson matters again because software development is entering another major shift.&lt;/p&gt;

&lt;p&gt;AI is changing who, or what, makes implementation decisions. Agents are beginning to generate code, wire services together, create workflows, and make architectural choices on behalf of teams. In that world, opinionated systems become more valuable, not less.&lt;/p&gt;

&lt;p&gt;When humans are building software, good conventions reduce decision fatigue.&lt;/p&gt;

&lt;p&gt;When AI agents are building software, good conventions become guardrails.&lt;/p&gt;

&lt;p&gt;They shape what gets generated, how pieces fit together, and whether the result is a coherent application or just a pile of working parts.&lt;/p&gt;

&lt;p&gt;That is why Harper keeps getting compared to Rails.&lt;/p&gt;

&lt;p&gt;Just like Rails, Harper brings an opinionated, integrated model to a part of the stack that has become far too fragmented: distributed application infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rails Made the Path Obvious
&lt;/h2&gt;

&lt;p&gt;Rails changed web development by making the common path clear.&lt;/p&gt;

&lt;p&gt;Before Rails, every project started with a sea of open questions. Which ORM? Which templating engine? How should directories be structured? How should URLs map to code? Where should the configuration live? How should dependencies be managed? How should tests be organized? How should the database schema evolve?&lt;/p&gt;

&lt;p&gt;Rails answered those questions with defaults.&lt;/p&gt;

&lt;p&gt;Active Record. ERB. Routing conventions. Configuration patterns. Migrations. Testing defaults. Project structure. Naming rules that made the pieces work together.&lt;/p&gt;

&lt;p&gt;That was the breakthrough.&lt;/p&gt;

&lt;p&gt;Rails did not make developers faster by giving them infinite flexibility. It made them faster by reducing meaningless flexibility. It removed decisions that most teams should not need to make from scratch.&lt;/p&gt;

&lt;p&gt;The best developers still had room to customize. But they started with a coherent system rather than a blank page.&lt;/p&gt;

&lt;p&gt;That is what “convention over configuration” really gave us: speed, clarity, and shared understanding.&lt;/p&gt;

&lt;p&gt;The magic was not just Ruby. It was not just MVC. It was not any single abstraction.&lt;/p&gt;

&lt;p&gt;The magic was that Rails made application development feel like one integrated experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29sc6nz4va5b4bl618ao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29sc6nz4va5b4bl618ao.png" alt="A two-panel infographic titled “Rails Reduced Decision Fatigue.” The left panel shows a developer facing many open decisions before Rails, including ORM, templating, directory layout, URL routing, configuration, dependency management, testing, and schema evolution. The right panel shows Rails answering those same questions with opinionated defaults like Active Record, ERB, Rails Router, Bundler, Minitest, and Migrations, represented as a clear paved path." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Stack Became the Framework
&lt;/h2&gt;

&lt;p&gt;Modern applications have changed around the framework.&lt;/p&gt;

&lt;p&gt;Rails has continued to collapse more of the application tier into the framework itself. Rails 8 and the Solid stack are a perfect example. Cache, queue, jobs, real-time updates, routing, authentication patterns, and deployment have all become more integrated, more conventional, and less dependent on separate services.&lt;/p&gt;

&lt;p&gt;That is exactly the Rails philosophy at work.&lt;/p&gt;

&lt;p&gt;But the data tier remains different.&lt;/p&gt;

&lt;p&gt;Even when Rails absorbs more infrastructure into the application experience, the database is still a separate process. Often it is a separate machine. At scale, it may be a separate region. And as more parts of the application depend on database-backed primitives, more of the system routes through that same boundary.&lt;/p&gt;

&lt;p&gt;Solid Cache removes the need for Redis in many cases, but it still stores cache data in the database. Solid Queue removes the need for a separate queue service, but jobs are still stored in the database. Solid Cable brings real-time messaging into the Rails pattern, but the backing state still lives in the database.&lt;/p&gt;

&lt;p&gt;That consolidation is a win. Rails has already moved the ecosystem toward fewer external services and stronger defaults.&lt;/p&gt;

&lt;p&gt;But it also reveals the boundary Rails cannot fully close on its own:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The app tier and the data tier are still separated by a network hop.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every request that needs data crosses it. Every query crosses it. Every job, cache read, message, and update that depends on the database crosses it. Replicas and multi-region deployments can improve scale and resilience, but they also make the topology more complex.&lt;/p&gt;

&lt;p&gt;This is the next layer of decision fatigue.&lt;/p&gt;

&lt;p&gt;The developer is no longer just asking how to structure the app. They are asking where data should live, where logic should run, how far each request needs to travel, how state moves across regions, and how the system behaves when the data boundary gets stretched.&lt;/p&gt;

&lt;p&gt;Rails made the app tier coherent.&lt;/p&gt;

&lt;p&gt;The data tier is the remaining frontier.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4gr4x2glbitvbhvqo4h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc4gr4x2glbitvbhvqo4h.png" alt="A technical infographic showing Rails as a unified application tier with controllers, models, views, and the database-backed Solid Stack: Solid Cache, Solid Queue, and Solid Cable. A separate database tier sits outside the Rails process, connected by a red network-hop arrow. Supporting callouts show infrastructure Rails has absorbed, such as Solid Cache, Solid Queue, Solid Cable, routing/auth, and Kamal, while object storage, CDN, and observability remain external dependencies." width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Raises the Cost of Bad Defaults
&lt;/h2&gt;

&lt;p&gt;This problem gets sharper in the AI era.&lt;/p&gt;

&lt;p&gt;AI agents are very good at producing code. They can generate endpoints, write functions, create schemas, connect services, and propose architectures quickly.&lt;/p&gt;

&lt;p&gt;But without strong conventions, they can also create systems that technically work and architecturally sprawl.&lt;/p&gt;

&lt;p&gt;An agent can add a service because a service seems reasonable. Add a cache because performance matters. Add a queue because async work is needed. Add a table because state has to go somewhere. Add another API because something needs to call something else.&lt;/p&gt;

&lt;p&gt;Very quickly, the application becomes a collection of generated parts.&lt;/p&gt;

&lt;p&gt;This is where the Rails lesson becomes newly important.&lt;/p&gt;

&lt;p&gt;Rails gave human developers a paved path. AI-native development needs paved paths even more.&lt;/p&gt;

&lt;p&gt;If agents are going to make more implementation decisions, the platform needs to encode better architectural defaults. It needs to guide decisions about data, logic, messaging, caching, and locality. It needs to make the coherent path easier than the fragmented one.&lt;/p&gt;

&lt;p&gt;AI does not eliminate the need for opinionated platforms.&lt;/p&gt;

&lt;p&gt;It increases it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Harper Keeps Getting Compared to Rails
&lt;/h2&gt;

&lt;p&gt;Harper is not Rails.&lt;/p&gt;

&lt;p&gt;It is not a Ruby framework. It is not trying to recreate MVC. It is not asking Rails developers to abandon what made Rails great.&lt;/p&gt;

&lt;p&gt;The comparison is philosophical, not literal.&lt;/p&gt;

&lt;p&gt;Rails brought convention, integration, and a coherent developer experience to web application development. Harper brings that same philosophy to distributed application infrastructure.&lt;/p&gt;

&lt;p&gt;Harper is a unified application platform that combines database, caching, messaging, and application logic into a single high-performance runtime. Instead of forcing teams to assemble separate systems for each backend concern, Harper gives developers a more integrated way to build and run distributed applications.&lt;/p&gt;

&lt;p&gt;That is where the Rails-like feeling comes from.&lt;/p&gt;

&lt;p&gt;Rails made the application feel coherent.&lt;/p&gt;

&lt;p&gt;Harper makes the distributed backend feel coherent.&lt;/p&gt;

&lt;p&gt;Rails reduced the number of decisions required to build a web app.&lt;/p&gt;

&lt;p&gt;Harper reduces the number of systems required to build a distributed app.&lt;/p&gt;

&lt;p&gt;Rails gave developers a productive default path.&lt;/p&gt;

&lt;p&gt;Harper gives developers and AI agents a stronger architectural path for data, logic, messages, and caching.&lt;/p&gt;

&lt;p&gt;That is also why the Node.js and JavaScript foundation is not a barrier to the comparison. Developers are not saying Harper feels like Rails because they think it is Ruby. They are saying it because the experience reminds them of what Rails got right: strong opinions, integrated primitives, and a system that helps you move faster by making better decisions on your behalf.&lt;/p&gt;

&lt;p&gt;JavaScript simply makes that model accessible to the modern application ecosystem. It gives teams a familiar language for writing logic inside a platform that is doing much more than running Node.js code.&lt;/p&gt;

&lt;p&gt;The important thing is not that Harper is built on JavaScript.&lt;/p&gt;

&lt;p&gt;The important thing is that Harper is built with opinions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Difference Is Fewer Seams
&lt;/h2&gt;

&lt;p&gt;Consider a commerce application.&lt;/p&gt;

&lt;p&gt;A product page seems simple until it has to be fast, dynamic, personalized, and globally available.&lt;/p&gt;

&lt;p&gt;Some content is stable: product descriptions, images, specifications, editorial copy. Some content changes constantly: price, inventory, promotions, recommendations, loyalty status, delivery estimates, and customer-specific offers.&lt;/p&gt;

&lt;p&gt;The traditional answer is to spread those concerns across a growing stack.&lt;/p&gt;

&lt;p&gt;The app handles the request. The database stores the source of truth. The cache accelerates hot reads. A queue handles updates. Workers process changes. The CDN caches what it can. Custom invalidation logic tries to keep everything from lying to the user.&lt;/p&gt;

&lt;p&gt;Again, none of these tools are bad.&lt;/p&gt;

&lt;p&gt;But the team is no longer just building a product page. It is maintaining a distributed coordination system.&lt;/p&gt;

&lt;p&gt;A more opinionated platform changes the shape of the problem. Data, logic, messaging, and caching can live in one runtime. Application behavior can be placed closer to the data and closer to the user. Updates can move through the system without every team having to rebuild its own coordination layer.&lt;/p&gt;

&lt;p&gt;The value is not merely fewer tools.&lt;/p&gt;

&lt;p&gt;The value is fewer seams.&lt;/p&gt;

&lt;p&gt;Fewer places where the developer has to stop building the product and start designing infrastructure. Fewer places where an AI agent can make a technically reasonable but architecturally messy choice. Fewer places where performance, consistency, and developer velocity are traded against each other by default.&lt;/p&gt;

&lt;p&gt;That is the “oh, I get it” moment for Rails developers.&lt;/p&gt;

&lt;p&gt;The same reason Rails felt magical for building web applications is the reason an opinionated distributed runtime feels powerful now.&lt;/p&gt;

&lt;p&gt;It gives you a path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fic87gi58o3ds25u78e4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fic87gi58o3ds25u78e4z.png" alt="A side-by-side architecture diagram comparing a traditional distributed backend with many separate systems to Harper’s distributed runtime. The traditional side shows an app connected to separate database, cache, queue, workers, CDN, messaging, and edge logic boxes. The Harper side shows multiple regions, each containing data, logic, caching, and messaging inside the same runtime, connected across regions." width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Distributed Apps Need Their Rails Moment
&lt;/h2&gt;

&lt;p&gt;The lesson of Rails was that coherent systems win.&lt;/p&gt;

&lt;p&gt;Developers move faster when the platform makes good decisions. Teams build better software when the common path is clear. Applications are easier to reason about when the pieces are designed to fit together.&lt;/p&gt;

&lt;p&gt;That lesson is becoming more relevant with AI.&lt;/p&gt;

&lt;p&gt;As applications become more distributed, and as AI agents participate more directly in building them, the need for opinionated architecture will only grow. The future will not belong to teams that assemble the most tools. It will belong to teams that can turn ideas into coherent, high-performance applications the fastest.&lt;/p&gt;

&lt;p&gt;Rails gave developers convention over configuration for web apps.&lt;/p&gt;

&lt;p&gt;Harper brings that idea to distributed application infrastructure.&lt;/p&gt;

&lt;p&gt;And once you see that, the comparison becomes hard to ignore.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
      <category>ai</category>
      <category>architecture</category>
    </item>
    <item>
      <title>The Next Step After AI Codegen: Self-Modifying Systems</title>
      <dc:creator>Aleks</dc:creator>
      <pubDate>Fri, 20 Mar 2026 16:39:48 +0000</pubDate>
      <link>https://dev.to/aleks4/when-ai-agents-stop-writing-code-and-start-modifying-systems-n2b</link>
      <guid>https://dev.to/aleks4/when-ai-agents-stop-writing-code-and-start-modifying-systems-n2b</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/aleks4/designing-tech-stacks-for-ai-generated-code-1b"&gt;A follow-up to Designing Tech Stacks for AI-Generated Code&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;AI agents are moving from code generation into live system intervention. That transition changes what "good architecture" means, and most current stacks are not designed for it.&lt;/p&gt;

&lt;p&gt;The previous piece was about reducing the surface area agents have to reason about when writing code. This one is about a harder question: what architectural conditions make it safe for an agent to modify the thing it's already running on?&lt;/p&gt;

&lt;h2&gt;
  
  
  Two different problems
&lt;/h2&gt;

&lt;p&gt;There is a meaningful gap between an AI agent that writes code and one that maintains a running system. The first is a productivity story. The second is an architectural one, and it's the one the industry has not seriously engaged with yet.&lt;/p&gt;

&lt;p&gt;When an agent can not only write a schema migration but also apply it, validate the system's behavior afterward, and roll back autonomously if something looks wrong, the infrastructure is no longer a static target. It is a dynamic surface the agent is continuously touching. That is a different class of problem.&lt;/p&gt;

&lt;p&gt;Self-modifying software is not new. &lt;a href="https://dev.to/chat2db/what-are-stored-procedures-goc"&gt;Stored procedures&lt;/a&gt;, &lt;a href="https://dev.to/himankbhalla/demystifying-metaprogramming-understanding-the-basics-408h"&gt;metaprogramming&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Adaptive_system" rel="noopener noreferrer"&gt;adaptive systems&lt;/a&gt;: code that changes its operating environment at runtime is as old as the discipline. But those patterns were always bounded. A program adjusted its internal state within a runtime. The schema, the API contracts, the deployment configuration were maintained by humans, on a different timescale, with different tools.&lt;/p&gt;

&lt;p&gt;What agents introduce is a collapse of that boundary. The autonomous loop writing the migration is the same loop running the system. And that changes the question you have to ask about architecture fundamentally.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the failure looks like
&lt;/h2&gt;

&lt;p&gt;Before the theory, the concrete case.&lt;/p&gt;

&lt;p&gt;An agent adds a column to a user profile schema. Simple enough. But in a conventional multi-service stack, here is what that change touches:&lt;/p&gt;

&lt;p&gt;The database migration runs. The new column exists.&lt;/p&gt;

&lt;p&gt;The cache layer is still serving serialized user objects in the old shape. It does not know the schema changed.&lt;/p&gt;

&lt;p&gt;The API layer has deserialized expectations about the structure of that data. Its contracts are now subtly wrong.&lt;/p&gt;

&lt;p&gt;Background jobs consuming user events were written against the old schema. They will silently handle the new shape incorrectly, or fail loudly, depending on how they were written.&lt;/p&gt;

&lt;p&gt;The agent attempts a rollback. The database reverts. But the cache is still populated with objects that were written during the window when the new schema was live. The message queue still has events that were produced in that window. The rollback does not reach them, because rollback is a database primitive, not a system primitive.&lt;/p&gt;

&lt;p&gt;This is not an edge case. It is the ordinary failure mode of autonomous change in a fragmented architecture. Each component has its own notion of version, its own failure mode, and its own rollback semantics. There is no system-level transaction boundary. The agent modified a distributed agreement, not a thing.&lt;/p&gt;

&lt;p&gt;Now contrast the same change in a unified runtime, where database, cache, application logic, and messaging are the same in-memory process deploying as a single atomic unit. Either the new version is running or the old version is running. The cache cannot hold objects in the old shape because the cache is the same process as the database. The API layer cannot have deserialized expectations that diverge from the schema because they are derived from the same schema definition. Rollback means rolling back one artifact, not coordinating across five systems with different rollback mechanics.&lt;/p&gt;

&lt;p&gt;The failure mode does not disappear. But the blast radius is bounded by a coherent system boundary, not distributed across a web of implicit contracts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Coherence as a prerequisite
&lt;/h2&gt;

&lt;p&gt;Here is the thesis: safe self-modification requires a coherent self. That sounds philosophical, but it has a precise architectural meaning.&lt;/p&gt;

&lt;p&gt;A system has a coherent self when there is a single shared notion of version, state, and transaction boundary. When you can answer the question "what is the system's current state" with one answer rather than aggregating across multiple components that may have diverged.&lt;/p&gt;

&lt;p&gt;It's worth being precise about what this does and does not mean. Coherence is not the same as monolithic. Formally coordinated distributed systems, well-typed service contracts, transactional deployment patterns, migration frameworks that enforce compatibility across versions, and policy engines that make inter-service dependencies legible are all genuine paths toward a more coherent distributed system. Teams with deep investment in those approaches are not doing it wrong.&lt;/p&gt;

&lt;p&gt;But there is a structural argument for why runtime coherence, fusing the components into a single process with a shared transaction model, is particularly suited to the self-modification problem. It is not just that the agent can reason about fewer files. It is that the agent can reason about the change as an atomic operation against a unified state. Deploy, validate, roll back: one action, one artifact, one audit trail. The alternative requires the agent to coordinate that sequence across components whose failure modes interact in ways that are difficult to observe and harder to reverse.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.harper.fast/resources/unified-runtime-the-architecture-ai-friendly-systems-need" rel="noopener noreferrer"&gt;unified runtime&lt;/a&gt; is a strong answer to the self-modification problem. It is not the only answer. But it is the one where the guarantees are structural rather than procedural, which matters when the entity enforcing those guarantees is an autonomous agent rather than a careful human.&lt;/p&gt;

&lt;h2&gt;
  
  
  The constraint that cannot live inside the system
&lt;/h2&gt;

&lt;p&gt;There is one piece of this architecture that cannot be automated, and it is worth being direct about it.&lt;/p&gt;

&lt;p&gt;The permission model for agent self-modification cannot live inside the agent. It cannot live inside the system the agent is modifying. It has to be external and structurally inaccessible to the agent itself.&lt;/p&gt;

&lt;p&gt;This is not a novel security principle. It is the same logic that makes a well-designed access control layer work: the control layer is not accessible to the entities it controls. We are applying that principle to a new kind of entity.&lt;/p&gt;

&lt;p&gt;What this means practically: the agent operates against a defined API surface that enforces what it can read, write, and deploy. That surface is not controlled by the agent. Certain schema primitives are immutable to the agent regardless of its reasoning. Core identity structures, audit log tables, and permission tables: not writable by an agent under any circumstances. Every action the agent takes is logged to an append-only audit trail that the agent cannot modify or delete.&lt;/p&gt;

&lt;p&gt;An agent that can grant itself new permissions is not a safe agent. The coherent runtime buys you legibility. The external permission boundary buys you control. Legibility without control is a transparent but ungoverned system. Control without legibility is a safe but opaque one. You need both, and they require deliberate design rather than emergent safety from capable agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  The hard edges we have not solved
&lt;/h2&gt;

&lt;p&gt;The honest version of this argument has to name what we do not know.&lt;/p&gt;

&lt;p&gt;Schema evolution under live load is a genuinely hard problem that the unified runtime framework does not fully resolve. Backward and forward compatibility, dual writes during transitions, schema version skew across concurrent clients, and the observability lag that makes autonomous validation difficult during partial rollout states are all real constraints. A coherent runtime makes these problems more legible. It does not make them disappear.&lt;/p&gt;

&lt;p&gt;We do not have a strong empirical answer to where the right boundary sits between what an agent can safely modify autonomously and what requires human review. The intuitions are informed but not validated at the scale and concurrency that real multi-tenant systems operate at. Many agents operating against shared infrastructure with different permission surfaces is a genuinely open problem.&lt;/p&gt;

&lt;p&gt;And the failure mode of an agent that reasons confidently but incorrectly about the downstream effects of a change is not well characterized. Human error tends to occur at human speed, with natural review steps built into workflows. Agent errors can compound across many instances before anyone notices, faster than any human escalation path.&lt;/p&gt;

&lt;p&gt;The teams with the right instinct are the ones asking hardest about rollback semantics and audit trails before they ask about capability. Open-source, non-critical paths, and environments with instrumentation to closely observe agent behavior are where this should be proven out before it reaches regulated or high-stakes systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this leaves the architecture conversation
&lt;/h2&gt;

&lt;p&gt;The previous piece described a shift in evaluation criteria: not just "how productive is a human developer on this stack" but "how well does an AI agent perform against this architecture." Stacks that score well on both dimensions will have an advantage.&lt;/p&gt;

&lt;p&gt;This piece describes the next frame after that one. Not just stacks that AI can write against, but stacks that AI can maintain, modify, and redeploy autonomously. Infrastructure that is not just a target but a participant.&lt;/p&gt;

&lt;p&gt;The prerequisite for that is not more capable agents. It is infrastructure with a coherent self to reason about and a permission boundary that the agent cannot reach. Both of those are design decisions that can be made now, before the agents are sophisticated enough to act on them.&lt;/p&gt;

&lt;p&gt;Most of the conversation about AI and backend architecture has been about what the agents can do. The more consequential question is what we build for them to do it against.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>agents</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Designing Tech Stacks for AI-Generated Code</title>
      <dc:creator>Aleks</dc:creator>
      <pubDate>Wed, 18 Mar 2026 21:07:39 +0000</pubDate>
      <link>https://dev.to/aleks4/designing-tech-stacks-for-ai-generated-code-1b</link>
      <guid>https://dev.to/aleks4/designing-tech-stacks-for-ai-generated-code-1b</guid>
      <description>&lt;p&gt;Something interesting is happening in backend engineering. The tools writing our code are getting smarter every month, but the infrastructure those tools have to target hasn't changed much in a decade. We're pointing increasingly capable AI agents at the same multi-service architectures we built for human developers, and in many cases, the output is more fragile than it needs to be.&lt;/p&gt;

&lt;p&gt;The conversation around AI-assisted development has been almost entirely about the models. Which agent is best. Which IDE integration is fastest. Which model scores highest on SWE-bench. But there's a quieter, more consequential question that fewer people are asking: what should the target architecture look like when AI is writing a growing share of the code?&lt;/p&gt;

&lt;p&gt;I don't think this requires throwing out everything we know about backend engineering. But I do think it's worth examining which architectural patterns help AI agents succeed and which ones create unnecessary friction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the friction actually lives
&lt;/h2&gt;

&lt;p&gt;Here's the core tension. Modern backend architecture evolved to solve human organizational problems. Microservices exist because teams needed to deploy independently. ORMs exist because developers didn't want to write SQL. Docker exists because "works on my machine" was destroying release cycles. Kubernetes exists because container orchestration is hard.&lt;/p&gt;

&lt;p&gt;These tools work. Teams ship production software on them every day and will continue to do so. But none of them were designed with the assumption that a language model would be writing and modifying the code. They were designed for humans working in teams across long time horizons with institutional knowledge about how the pieces fit together.&lt;/p&gt;

&lt;p&gt;An AI coding agent doesn't have institutional knowledge. It has a context window. And every additional service in your stack, every configuration file, every implicit dependency between systems, consumes that context window and introduces another surface where the agent can make mistakes.&lt;/p&gt;

&lt;p&gt;I've watched Claude Code try to set up a standard production stack: Express, Prisma, Postgres, Redis, a WebSocket server, and Docker Compose. It gets each individual piece maybe 80% right. But the integration between them is where things get shaky. Environment variables don't match between services. The ORM generates a migration that conflicts with the seed data. The cache invalidation logic doesn't account for the way the WebSocket server reads from the database. Each bug is small. Together they cost you an afternoon.&lt;/p&gt;

&lt;p&gt;Can strong teams mitigate this with existing practices? Absolutely. Good tests, thorough code review, and solid CI pipelines catch most of these issues regardless of whether the code was written by a human or an AI. The question isn't whether traditional practices still work. They do. The question is whether the architecture itself could make the AI's job easier in the first place.&lt;/p&gt;

&lt;h2&gt;
  
  
  How teams are responding
&lt;/h2&gt;

&lt;p&gt;The industry hasn't converged on a single answer yet. Teams are at very different stages of adoption, from simply adding Copilot to their existing workflow to rethinking their infrastructure from the ground up. Many are somewhere in between, and that's fine. But several patterns are emerging that are worth understanding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adding AI to existing stacks
&lt;/h3&gt;

&lt;p&gt;The most common approach today is incremental. Keep your existing architecture. Add an AI coding assistant. Use it for boilerplate, test generation, code review, and documentation. Improve your CI pipeline to catch AI-introduced errors.&lt;/p&gt;

&lt;p&gt;This works, and it's the right starting point for most teams. You get productivity gains without migration risk. The ceiling on this approach is that the AI is still targeting an architecture that wasn't designed for it, so you're relying more heavily on validation layers (tests, reviews, linting) to catch the integration mistakes that the architecture's complexity makes likely.&lt;/p&gt;

&lt;p&gt;There's nothing wrong with this. It's where most of the industry is today and where it will remain for a while.&lt;/p&gt;

&lt;h3&gt;
  
  
  Backend-as-a-Service platforms
&lt;/h3&gt;

&lt;p&gt;Supabase, Firebase, Appwrite, and Convex all reduce surface area by bundling database, auth, storage, and functions into a managed platform. The developer writes application logic. The platform handles infrastructure.&lt;/p&gt;

&lt;p&gt;This works well for AI agents because there's less to configure. An agent writing Supabase code really only needs to know the client SDK and the database schema. It doesn't need to reason about connection pooling or deployment manifests.&lt;/p&gt;

&lt;p&gt;The tradeoff is control. You're renting someone else's architecture. When you need something the platform doesn't support, you either work around it or migrate, and migration from a BaaS is notoriously painful. The other tradeoff is performance ceiling. When your database, your auth layer, and your edge functions are all separate services behind a network boundary, there's a latency floor you can't optimize below, no matter how good your queries are.&lt;/p&gt;

&lt;h3&gt;
  
  
  Infrastructure-from-code tools
&lt;/h3&gt;

&lt;p&gt;Encore, SST, and Pulumi's newer offerings let you declare infrastructure as part of your application code. Instead of writing Terraform separately, you annotate your TypeScript with infrastructure semantics and the tool provisions everything.&lt;/p&gt;

&lt;p&gt;This is clever because it keeps the infrastructure definition close to the application logic, which means an AI agent reading your codebase can see both at once. Fewer files to reason about. Fewer implicit dependencies.&lt;/p&gt;

&lt;p&gt;The tradeoff is that you're still running multiple services at runtime. The code might be co-located, but your database is still a separate process from your API server, which is still a separate process from your cache. The deployment is simplified, but the runtime architecture is not. An agent can more easily set things up, but the same class of integration bugs still exists once the system is running.&lt;/p&gt;

&lt;h3&gt;
  
  
  Declarative frameworks
&lt;/h3&gt;

&lt;p&gt;NestJS, Redwood, and Blitz collapse some of the decision space by being opinionated about project structure. They pick the ORM, the testing framework, the file layout. An agent working in a Redwood project has fewer choices to make, which means fewer wrong choices.&lt;/p&gt;

&lt;p&gt;But these are still frameworks, not runtimes. They sit on top of the same multi-service architecture underneath. Your Redwood app still needs a database connection, still needs a deployment target, still needs infrastructure decisions that the framework doesn't make for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Unified runtimes
&lt;/h3&gt;

&lt;p&gt;This is the approach I find most architecturally interesting, though it's also the most opinionated and the earliest in adoption. Instead of bundling services together at the management layer or the code layer, unified runtimes actually fuse them at the process level. Database, cache, application logic, and messaging run in the same memory space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.harper.fast/" rel="noopener noreferrer"&gt;Harper&lt;/a&gt; is the most developed example of this pattern I've come across. Your data model is a GraphQL schema. REST APIs are generated automatically from that schema. Custom endpoints are JavaScript classes that extend your tables. Real-time messaging is built in via WebSockets, MQTT, and server-sent events. Caching isn't a separate layer because all data access is already in memory and persistent on disk (really, solid-state drives).&lt;/p&gt;

&lt;p&gt;The entire application is three files. A schema, a config, and a resources module. That's not a simplification of the developer experience on top of hidden complexity. That's the actual architecture. There is no separate database process. There is no Redis instance. There is no message broker to configure.&lt;/p&gt;

&lt;p&gt;For AI agents, this is a fundamentally different target. The agent doesn't need to reason about how services communicate because there's only one service. The agent doesn't need to manage connection strings because there are no connections. The schema is the source of truth for the data model, the API, and the access patterns simultaneously.&lt;/p&gt;

&lt;p&gt;The tradeoff is real. You're not using Postgres. You're not using standard ORMs. Your team needs to learn Harper's model, and if you decide to leave, you're migrating data and rewriting your API layer. That's a meaningful cost, and for teams with deep investment in their current stack, it may not be worth it.&lt;/p&gt;

&lt;p&gt;But there's something worth watching in where this goes long-term. Harper's deployment platform, Harper Fabric, distributes your application across a global cluster by selecting regions and latency targets. Because the runtime knows everything about your application from those three declarative files, it can make deployment decisions that would require significant DevOps expertise in a traditional stack. The gap between "I wrote the code" and "it's running in production across three continents" collapses to a single command.&lt;/p&gt;

&lt;p&gt;When you project this forward into a world where AI agents are writing a larger share of initial code, the combination of a minimal-surface-area runtime and an infrastructure-aware deployment platform is compelling. Whether it becomes a dominant pattern or a niche one is still an open question, but it's worth tracking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes a stack AI-friendly
&lt;/h2&gt;

&lt;p&gt;Regardless of which approach you take, a pattern emerges. The stacks where AI agents produce the best output share a few properties. These aren't requirements. They're design principles that reduce the surface area for AI-introduced errors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fewer files that matter.&lt;/strong&gt; Every file in your project is context the agent needs to hold. A three-file application is easier to reason about than a thirty-file application. This isn't about lines of code. It's about the number of distinct configuration surfaces.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Explicit over implicit.&lt;/strong&gt; When your data model is declared in a schema that generates the API, the agent can see the relationship between data and endpoints. When your API is hand-wired through a routing layer that references a service layer that references a repository layer that references an ORM, the agent has to trace four levels of indirection to understand what a GET request returns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Declarative over imperative.&lt;/strong&gt; Telling the system what you want rather than how to do it means the agent makes fewer implementation decisions. Fewer decisions means fewer wrong decisions. A unified runtime's schema annotation like &lt;code&gt;@export&lt;/code&gt; that generates a REST endpoint is one line the agent needs to write. Compared to a hand-coded controller with validation, error handling, and serialization, which is forty lines, the agent needs to get right.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Co-located concerns.&lt;/strong&gt; When your database schema, your API definition, your caching behavior, and your deployment config all live in the same place or are derived from the same source, changes propagate automatically. The agent doesn't need to remember to update the cache invalidation logic when it changes the data model because they're the same thing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deterministic deployment.&lt;/strong&gt; If the deployment system can derive everything it needs from the application definition, the agent never needs to touch infrastructure config. If deploying requires a separate Dockerfile, Kubernetes manifest, and CI pipeline, the agent needs to maintain consistency across all of them.&lt;/p&gt;

&lt;p&gt;None of this means your existing stack is broken. If you have strong engineering practices, good test coverage, and a team that reviews AI output carefully, you can get excellent results with a traditional architecture. These principles just describe what makes the AI's job easier, which in turn means less time spent on review and debugging.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shift that's forming
&lt;/h2&gt;

&lt;p&gt;I think we're in the early stages of a broader evolution in how developers and AI collaborate on backend systems. Not a revolution where everything gets replaced overnight, but a gradual shift in what we optimize for when choosing tools.&lt;/p&gt;

&lt;p&gt;For twenty years, we've been decomposing backend systems into smaller, more specialized pieces. Separate database. Separate cache. Separate message broker. Separate API gateway. Separate auth service. Each piece is independently excellent. The complexity lives in the composition.&lt;/p&gt;

&lt;p&gt;That composition complexity was manageable when humans were doing all the wiring, because humans carry implicit context about how the pieces relate. An experienced engineer knows that when you change the user schema, you also need to update the cache key format and the WebSocket subscription filter. That knowledge lives in their head, not in the codebase.&lt;/p&gt;

&lt;p&gt;AI agents don't carry that implicit context. They have what's in the files. And if the relationship between your schema change and your cache invalidation logic is implicit, mediated through three layers of abstraction across two services, the agent is more likely to miss it. Not because it's incapable, but because the architecture made the dependency invisible.&lt;/p&gt;

&lt;p&gt;The direction I see forming is toward stacks that make dependencies explicit, keep surface area manageable, and derive as much as possible from a single source of truth. For some teams that means a BaaS. For others, it means infrastructure-from-code. For teams starting fresh, a unified runtime is worth serious consideration.&lt;/p&gt;

&lt;p&gt;This doesn't mean traditional stacks are going away. Postgres isn't dying. Kubernetes still has its place. Microservices will continue to be the right answer for large organizations with complex deployment requirements. But the evaluation criteria for choosing tools are expanding. "How productive is a human developer on this stack" is no longer the only question. "How well does an AI agent perform against this architecture" is becoming a real factor in the decision, and the stacks that score well on both dimensions will increasingly have an advantage.&lt;/p&gt;

&lt;p&gt;We're early. The patterns are still forming. But the teams paying attention to this question now will have a head start when the rest of the industry catches up.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>architecture</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
