惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Your codebase has a new primary reader. And it’s paying 7.5x more.
jucelinux · 2026-05-10 · via DEV Community

Same feature, same verification, two architectures. What three coding-agent codebases converge on, and why Clean Architecture isn’t wrong, just answering the old question.”

series: Grounded Code

First of five articles in the **Grounded Code* series. Architecture principles for codebases primarily extended by agents.*

I. The number nobody was measuring

Same task. Same agent (Claude). Same final output, with Verification: ✅ on both runs. The difference is in the middle column.

Metric agent-opt clean-ddd ratio
Wall clock 73s 329s 4.5x
Turns 17 52 3.1x
Total tokens 230,858 1,722,500 7.5x
Cache reads 195,489 1,652,055 8.5x
Output tokens 3,882 16,941 4.4x
Verification

The first column is a codebase organized around conventions tuned for the agent that’s going to extend the code. The second is the same feature, same stack, organized with Clean Architecture and Domain-Driven Design: layers, ports and adapters, separation by responsibility, ubiquitous language.

The “clean” version needed 4.5x the wall clock, 3.1x the turns, 7.5x the tokens. And then the one that bothered me most: 8.5x more cache reads. Each extra cache read is the agent reopening one more file to rebuild context it had already had and lost.

Here’s the detail that changed how I see the problem.

The more expensive architecture wasn’t wrong by any traditional test. The code compiled. The layers were drawn correctly. The ports did what they promised. A senior engineer would review the PR and approve it without comments. It worked. It was just expensive.

Expensive in what? Expensive in the only resource that matters when the codebase’s primary reader has changed.


II. The primary reader changed

For two decades every architectural pattern we adopted answered an unstated question: how do I make this code easy to review for a human?

Clean Code, DDD, Clean Architecture, hexagonal, ports-and-adapters, ubiquitous language. All of them optimize a reader who carries 5 to 10 files in working memory at once, infers purpose from elegance and DRY, recognizes patterns by conceptual similarity, and reuses domain language to connect concepts across distant files.

That reader still exists. But it isn’t doing the bulk of the reading anymore.

An agent reading code doesn’t scroll. It runs grep, glob, and reads narrow slices with offset+limit. Each file that isn’t in context costs tokens to re-read. Sometimes it doesn’t even fit. Patterns get recognized by co-located names and exact shapes, not by similarity. Domain language is signal only when it appears verbatim in the file the agent is currently looking at.

Every cross-file inference is a token cost. Every grep chase is a context cost. Every re-derivation of a fact already encoded somewhere else is wasted time and a wasted turn.

This is the axis that wasn’t on the chart. Let’s name it:

Re-derivation cost. The unit of architectural cost in the agent era.

The table above measures that cost with three-digit precision. The 1,722,500 tokens in the second column are, mostly, the sum of every time the agent had to re-derive something the clean architecture didn’t have where it needed it. Because the clean architecture was never optimized for that.


III. Clean Architecture isn’t wrong. It’s answering the old question.

This is where I want to be surgical, because going confrontational here would land badly and also be inaccurate.

Clean Architecture, DDD, hexagonal. These patterns optimize a real trade-off, with real cost and benefit columns:

  • Cost: some boilerplate, some indirection, some hops between files.
  • Benefit: a human can reason about the system without holding 30 details in their head.

That trade-off still holds on its own terms. The cost is real. The benefit is real. They balanced when the primary reader was a human about to review the module, debug a bad night, or onboard on a Friday morning.

What changed is that a third column showed up on the chart:

  • Re-derivation cost for the agent.

And on that column, the same patterns score badly. Each extra hop the human thanks you for is one more grep the agent pays for. Each DI interface the human reads as “this is testable” is one more definition the agent has to load into context. Each layered import (controllers/payment.ts, services/payment.ts, repositories/payment.ts) the human appreciates for “separation of responsibilities” is three files opened in sequence just to extend a feature.

Clean architecture didn’t become wrong. It became expensive. And the cost is now paid in tokens, on the critical path of development, day after day, on every feature the agent extends.

The question every architectural decision has to answer changed. It used to be is this elegant? is this DRY? is this testable in isolation?. Now it’s:

When the agent needs to extend feature X, can it find everything about X with one glob, read it in a small number of files under 300 lines, and trust types plus spec for the contract, without leaving the feature directory?

If yes, agent-friendly architecture.

If no, it isn’t. Doesn’t matter how clean it looks in human review.


IV. Triangulation: three codebases, three teams, three convergences

The honest objection to all of this is: “OK, but you pulled this conclusion from one codebase, or from your codebase?”

Fair objection. I’ll answer with actual evidence before going on to the prescriptive part.

I audited three coding-agent codebases built by independent teams, with no coordination between them:

  • Claude Code (Anthropic): sourcemap dump, March 2026.
  • opencode (SST): production dev branch.
  • pi (Pi Labs): packages/coding-agent, packages/agent, packages/ai.

Three teams. Three stacks with subtle differences (all TypeScript, but around different runtimes, extension formats, and plugin models). Zero cross-communication. The three codebases converge on the same structure:

  • Directories by feature, not by layer. src/tools/BashTool/ in Claude Code holds implementation, prompt, path validation, permission logic, and UI all in the same place. The equivalents in opencode and pi follow the same mold.
  • Files under 300 lines for what the agent will modify. Orchestrators can be larger; feature code can’t.
  • Relative imports with explicit extensions, no path aliases. ../utils/foo.ts, not @utils/foo.
  • Comments as an incident-and-rationale channel, not as explanatory prose about what the code does. (“Lazy require to avoid circular dependency with telemetry.ts”: yes. “This function adds two numbers”: no.)
  • A spec document next to the feature, with parseable frontmatter.
  • A five-step loop (spec → plan → implement → verify → consolidate) showing up in three slightly different flavors.

Convergence without communication is the strongest empirical signal I have. It isn’t proof. It’s convergence. But it’s the kind of convergence three disciplined teams, working in parallel, rarely produce by accident.

The caveat that matters. All three are coding agents. Some of these conventions may be specific to that subculture. The series will mark, on every principle, how far the evidence travels: what came from the three coding agents, what survives in general-purpose backend and frontend applications, and what’s still informed speculation waiting for a test. I won’t ship generalizations I haven’t validated.


V. Grounded Code

Every new category needs a name. Without one it stays “some conventions these teams use” and never crosses over to the next codebase.

The name:

Grounded Code. Each feature carries its own ground: a spec next to the code, close enough that the agent never has to derive it.

The central image is the anchor. The agent, reading through narrow slices, is always one file away from knowing:

  • What this feature does (purpose:).
  • What the public contract is (public_api:).
  • What’s out of scope (out_of_scope:, a field tests-first never had).
  • How to verify (verification:).

When context fills up and the summary has to cut, the spec survives. When the session compacts, the agent gets re-anchored in seconds. When you come back to the project two weeks later, the spec is where you read first.

The spec is the ground. The code is the house. The test is the gate. All three live on the same plot, and the agent never has to leave it to understand what’s going on.

The name also resolves an important asymmetry: the natural opposite of grounded is floating. Code that drifts, that has to be re-anchored every turn, that pays tokens to re-derive what could have been read once. That’s exactly the cost the first table measured.


VI. What’s coming in the series

Five articles. Each one stands alone, but they’re meant to be read in sequence:

  1. This one. The manifesto and the number.
  2. What to unlearn. The anti-patterns inherited from the human-optimized world: deep DI, inheritance, premature abstraction, codegen, path aliases, implicit decorators. Each one with the case for why it worked before, and why it costs now.
  3. The central artifact. The full format of <feature>.spec.md, with a real example, and the innovation tests-first never had: the out_of_scope field.
  4. The five-step loop. Spec → plan mode → implement → verify → consolidate. Why step 2 (read-only plan mode) is the one that saves the most time, and why skipping step 1 is the most expensive failure mode.
  5. The ten principles. Grouped into three clusters (locality, contracts, quarantine), with code as proof in each.

In every article I’ll mark how far the evidence travels. Where the three coding agents converge, I’ll say so. Where only Claude Code carries the pattern, I’ll say so. Where I’m speculating outside the subculture, I’ll say so.


VII. The five-minute test

Before you close this tab, an experiment. Five minutes.

Pick a feature from your project. Any one. An endpoint, a component, a lambda. Something you’d have to extend tomorrow.

Ask your agent to extend it. Count:

  • Total tool calls.
  • Turns until verification passes.
  • Tokens consumed (Claude Code’s /cost shows them; other harnesses vary).

Then apply only principle #1: co-locate everything about the feature in a single directory, with parallel names. Don’t change the code. Just move files and fix imports.

Ask again.

If the numbers drop, even half as much as they did in the benchmark above, you just measured a margin that was hidden in your project. If they don’t, principle #1 doesn’t apply to your case, and you just helped me calibrate the scope of the series.

Either way, the number you get back is the argument I don’t have to make.


Next in the series: *“What to unlearn: the most expensive patterns from the human era.”***

If you want to know when the next one ships, [follow me on dev.to] / [subscribe to the newsletter].