How many lines of someone else's code can you read in a workday without losing focus? A thousand? Two thousand? A modern coding agent can generate an entire application module of tens of thousands of lines in two hours, and it will build, run, and pass basic tests. Line-by-line code review stops working at that point. Humans become the bottleneck, but skipping checks altogether causes a codebase to fall apart within six to twelve months.
So where does control actually live? Timur Shemsedinov tested this in practice on the open-source Node.js stack Metarhia, which was built around strict module isolation, declarative schemas, and a clear split between system and app code. In his experiment, the system core stayed under manual control while an AI coding agent built the entire product layer. He intentionally didn't open the generated product files. This experiment, combined with work on an architectural DSL and coarse-grained subsystems, shows where engineering control is heading.
Two tracks of control: review the core by hand, delegate the product to agents
In any serious system, code splits into two unequal parts. The first is the foundation: network protocols, data storage and sync, process isolation, and core contracts. In Metarhia, this layer includes metacom (an HTTP and WebSocket RPC protocol with sessions, events, and system/introspect), globalstorage (a distributed data sync engine for Node.js 22+ and browsers with delta-state CRDTs, local-first storage over fs, IndexedDB, and OPFS, an operation log, and CAS), and the impress app server with workers and V8 context isolation.
The second part is the product layer built on top. In this test, it included a post feed, group chat with threads, replies, and audio/video calls. That split revealed a clear difference in how the coding agent behaved.
When the agent worked in the system core, where a large codebase with a consistent style and specs already existed, it asked sharp engineering questions. It wrote code so cleanly that manual review required no edits. Even better, newer agents didn't need special questionnaire skills. Given last year's specs, the model spotted gaps on its own and asked about ten clarifying questions before starting.
On the product layer, things went differently. Almost all of the agent's questions focused on UI and UX. Without a clear visual reference, the model got overly creative. One funny failure happened with chat threads. Given the task without a mockup, the agent first suggested a deep nested reply tree, then duplicated messages with quotes. On its third try, it spent three hours building a complex Git-graph-style branching line diagram on Canvas with crossing avoidance and gaps. It ate up about 30% of the screen. They threw out all three hours of work and replaced it with a flat feed where clicking a message highlights its thread in color.
Skipping product code review has a real cost. Even on a spotless core, generated chat or feed code can hide sloppy logic that later hits a scaling wall. Unchecked vibe coding at the app layer usually survives 6–12 months before every change starts breaking nearby screens.
The system core (protocols, storage, isolation, core contracts) stays under manual audit because a bug in the foundation hits the whole project. You can hand product modules to agents using specs without reading every line, as long as strict core boundaries, contracts, and automated checks hold them in place.
A 3–4 screen architectural DSL instead of 200,000 lines of code
Imagine accepting a five-story building from a contractor. You could walk around with a hammer, tap every brick, and tear open drywall to inspect every meter of copper wire. That would take months. Instead, an engineer opens the floor plan and wiring diagram. A few pages immediately show load-bearing walls, risers, panels, and loads.
AI-assisted development works the same way. A human can't read 200,000 lines of generated implementation, but can carefully review 3–4 screens of high-level project description (literally three or four Page Down presses). An architectural DSL (a domain-specific language for describing system structure) should serve as that table of contents for code.
Getting to a compact format took several tries. Version one tried to describe low-level layers, interfaces, and DDD contracts, ending up almost as long as regular code. Version two focused on folder structures, DI containers, and module loading, but turned into bulky boilerplate on real projects.
Version three worked because it deliberately dropped the lowest level: class diagrams and individual method links. It was built around the upper levels of Simon Brown's C4 model: system context, containers (subsystems), and components (services and modules). Even the creator of C4 advises against maintaining level-four code diagrams by hand because they go stale faster than you can redraw them. In DSL v3, all upper levels use one declarative syntax for nested structures, literals, configs, and node links.
Example of a C4 container diagram showing subsystems and connections without diving into classes (Source: c4model.com)
They also made the syntax pluggable. You can write the exact same architecture in a restricted declarative subset of JavaScript, TypeScript, Lisp, or plain Markdown. Each team picks the view that's easiest to read.
That table of contents brought an unexpected bonus for AI agents. In tests on a repo of roughly 500 files, simply pointing the startup instructions to the architectural DSL file (written in restricted JavaScript) was enough. The agent had no prior knowledge of this DSL and no special skills. It read the file as a map of the repo and found the exact module and class in two steps.
Still, it's too early to call this production-ready. At the time of review, the public highscript repo ('DSL for Architectural and Structural Solutions') only had a title in README.md with no translator source code, and full apps haven't been modeled in v3 yet beyond prototypes like a warehouse system.
Algorithmic translation without LLMs and the determinism boundary
Any working developer will ask a fair question here: why invent a formal DSL and write parsers if you can just write the architecture in Markdown and ask an LLM to scaffold the project?
The answer comes down to how language models work. LLM generation is always probabilistic. Ask a model twice to build a service skeleton from the same text doc, and you'll get two slightly different file sets, an extra layer 'just in case', or a quietly dropped link between modules. That's fine for a prototype, but not for a source of truth on architecture.
That's why translation between formats in DSL v3 is strictly algorithmic, with zero LLM involvement. Standard parsers and translators follow hard rules to turn Markdown or Lisp descriptions into an executable JavaScript skeleton (and convert back between syntaxes). The same input always produces the exact same output with no hallucinations or surprises.
This is also where determinism meets generation. The architectural DSL defines the skeleton: which subsystems exist, what configs they take, and how they pass calls and events. Everything inside a module (loops, business rules, data algorithms, distributed patterns) stays in regular JavaScript or TypeScript. A coding agent can work freely inside that room, but it can't step outside or move the load-bearing walls.
Another benefit is framework independence. Since the DSL describes structure and links rather than engine internals, you can describe a NestJS, Fastify, or Vue app just as easily as a Metarhia one.
Which clean-code rules and agent configs lose their point
For decades, programming books taught us to write code so a tired human could read it on a monitor. That's where rules like 'a function or class should fit on one screen' came from. If nobody reads the code by eye, that rule stops making practical sense. Tiny functions scattered across ten files just for neatness can actually hurt by splitting up context.
Diagram of coarse-grained assembly of tested subsystems over a strict core and an independent agent harness with load tests
Other qualities move to the front: rock-solid contracts at module boundaries, clear searchable names across the repo, and isolation so clean that throwing away a bad file and regenerating it from tests is easier than patching two lines.
At the same time, the race to maintain manual AI agent configs is losing steam. Teams recently spent hours writing huge .cursor/rules files, running /init, and updating CLAUDE.md, MEMORY.md, and third-party skills (Metarhia even has metaskills via npx metaskills). In practice, these configs go stale faster than teams update them. A new model drops, and half your prompts need rewriting. Worse, once a codebase passes roughly 100,000 lines, text instructions and memory files lose their punch because context gets diluted.
Another popular idea that looks great on slides but rarely helps architecture is copying human job titles into multi-agent teams. Teams create a 'frontend agent', a 'backend agent', and a 'DevOps agent' and expect smooth teamwork. Under the hood, it's the same language model. What actually makes the difference isn't role-play prompts, but connected tools, access rights, and hard module boundaries.
| Development aspect | Classic manual code | AI-agent development with architecture control |
|---|---|---|
| Main review target | Every line in a pull request | System core, contracts, and a 3–4 screen project map |
| Function and module size | Short functions fitting on one screen | Isolated modules with clear, searchable names |
| Source of truth | Source code, sometimes plus a wiki | Formal specs, architectural DSL, and tests |
| Handling bugs and edits | Targeted 1–2 line patch | Regenerating the whole module against updated tests |
| Debugging | Manual log reading and breakpoints | Autonomous agent loop: run, check, fix |
| Reuse | Small utilities and npm packages | Large, tested product subsystems |
This shift changes how you look at a repo. Instead of arguing over local variable names in code review, an engineer watches that subsystem boundaries don't drift and random dependencies don't creep in.
Coarse-grained assembly, harnesses, and autonomous testing traps
When code generation gets fast, it's tempting to build everything from scratch per project: custom auth, forms, emailers, and job schedulers. It looks cheap at first, but over time it burns tokens and hours debugging the same edge cases. The other extreme (pulling dozens of random npm packages) hurts security through supply-chain attacks.
The middle ground is coarse-grained subsystem assembly. In Metarhia, this idea is discussed under the name 'Metacube' (still a prototype and plan with no public GitHub repo). The idea is simple: instead of tiny bricks like a logger or config parser, a team builds, manually reviews, and thoroughly tests large product blocks once (auth, messaging, reporting, surveys, payments). Each app wires these blocks together with declarative config, contracts, call flows, and event streams, adding only a thin layer of unique business logic on top.
This approach has two honest limits. First, a reusable module that works across projects needs at least twice as much code and edge-case testing as a one-off solution. Second, ready-made blocks cover typical web and business software well, but don't help in deeply specialized areas like a browser DICOM Viewer or a game engine.
Even with good blocks, verification remains hard. Most time saved by AI agents today comes from autonomous debugging, where an agent runs the app, catches an error, and fixes it. The next step is an agent harness: an external wrapper not tied to a specific IDE or model that manages sessions, tools, and acceptance checks.
A good harness doesn't take the model's word for it. If requirements say the service must handle 100,000 requests per minute, the harness doesn't accept 'everything is optimized'. It runs real load tests and collects measured reports.
The same trick works for architecture patterns. If you just write 'use the Saga pattern' in a prompt, an agent will shove complex distributed transactions everywhere, even where a plain database write would do. It's far better to put dynamic failure tests in the harness. If a distributed step fails halfway and leaves data broken, the failing test forces the agent to add compensating actions only where they are truly needed.
Without strict checks like these, skipping code reading hits three weak spots fast.
First, hidden JavaScript performance drops. If the base layer lacks ready data structures and nobody opens generated code, an agent solves problems with brute-force arrays. Everything flies locally, then pegs the CPU under real traffic. Sending the same agent to hunt bottlenecks in unreadable code can burn massive token budgets.
Second, language choice matters. In languages with strict compilers like Rust, whole classes of hard concurrency bugs (like data races) fail at compile time. In JavaScript and Node.js, those bugs are very hard to catch with black-box tests if nobody reads the code.
Third, cross-review by two LLMs is an illusion. On paper it sounds like smart insurance, but without a skilled human referee or a strict test oracle, two models will happily agree with each other's wrong assumptions.
If you check one LLM's output with another LLM, both models rely on probabilistic reasoning and easily agree on false assumptions. Reliable control only comes from deterministic checks: a strict compiler, load test rigs, fault-injection tests, or a reference oracle.
A clear example of a strict oracle is Anthropic's C compiler experiment. Sixteen parallel Claude instances ran about 2,000 sessions and spent roughly $20,000 in API costs to write a 100,000-line C compiler in Rust that built the Linux 6.9 kernel. Nobody read those hundred thousand lines by eye. Quality held up thanks to Rust's strict compiler and GCC acting as an automated test oracle for every build.
The new economics of experiments and the engineer's role
Robert Martin wrote in Clean Code that the hardest part of software is often requirements: people rarely know how to describe what they want upfront. Until you show a first prototype, clients (and developers) forget half the scenarios, like tricky access roles or a future referral program that breaks the database schema three months later.
Coding agents didn't erase that problem; they made it louder. Code is no longer scarce. Before, a team might argue at a whiteboard for two weeks over two architectures because they lacked hands to build both. Now the cost of testing a hypothesis has collapsed.
It's faster and cheaper to define contracts, let agents build two or three options, run them through the same load and failure tests in a harness, and compare real numbers. The engineer's main job moves to where models are still weak: pulling out hidden requirements before start, drawing the line between the audited core and generated code, holding the 3–4 screen system map in mind, and building test rigs that catch bugs with facts instead of trust. Teams that win won't fight AI over every line; they'll team up with it and test engineering choices faster than everyone else.


