v1.0 · 2026
工程方法论 · 架构篇ENGINEERING · ARCHITECTURE CHAPTER/← 返回工程方法论← back to Engineering

AI-Native 架构方法论

AI-Native Architecture Methodology

实现变便宜,架构反而更重要。当 agent 把实现变成随取随用,稀缺的就不再是"写出来",而是不让生成坍缩成技术债的结构。因为 agent 会放大你给它的一切——好结构被复利,坏接缝被批量复制。架构师的活,从"设计完交给人实现",变成设计接缝、可逆性、范围与信任边界,让 agent 在其中安全地、规模化地实现。

As implementation gets cheap, architecture matters more. When agents make implementation something you draw on at will, the scarce thing is no longer "getting it written," but the structure that keeps generation from collapsing into technical debt. Agents amplify whatever you give them: good structure compounds, bad seams get replicated at scale. The architect's job shifts from "design, then hand to humans to implement" to designing the seams, reversibility, scope, and trust boundaries that let agents implement safely, at scale.

工程
架构篇
ENG
ARCH
SHEET
00
PROLOGUE · 概念
PROLOGUE · The Concept
定义 · 先划界
Definition · Draw the line first

从 AI 辅助架构,到AI-Native 架构

From AI-Assisted Architecture to AI-Native Architecture

用 AI 画架构图、让 AI 生成代码,仍然只是把旧架构流程加速。AI-Native 架构真正要回答的是:当实现充裕、生成会被放大,什么样的结构能让产出复利成价值,而不是坍缩成技术债

Using AI to draw diagrams or generate code still only accelerates the old architecture process. AI-native architecture asks the structural question: when implementation is abundant and generation gets amplified, what structure makes output compound into value rather than collapse into technical debt.

有一种错觉:实现既然便宜了,架构就不重要了——随便写,反正能重写。恰恰相反。agent 不会判断你的结构好不好,它只会忠实地放大它:一个清晰的边界,被它在一百个地方正确复用;一条含糊的接缝,也被它在一百个地方复制。实现越快,坏结构的代价摊得越快、越广。

There is an illusion that since implementation is cheap, architecture no longer matters: write whatever, you can always rewrite. The opposite is true. An agent does not judge whether your structure is good; it faithfully amplifies it: a clean boundary gets reused correctly in a hundred places, a vague seam gets copied into a hundred places. The faster implementation goes, the faster and wider the cost of bad structure spreads.

所以这一卷不教"怎么让 AI 帮你写代码",而是问一个结构问题:实现充裕之后,架构该怎么重画——把判断花在哪几个接缝上,怎么让结构对 agent 可读,怎么含住一次错误的爆炸半径,又把人留在哪些不可逆的承重决策上。

So this volume does not teach "how to get AI to write your code." It asks a structural question: once implementation is abundant, how should architecture be redrawn: which seams the judgment goes into, how to make structure legible to agents, how to contain the blast radius of a single mistake, and which irreversible load-bearing decisions stay with humans.

SHEET
01
THE KERNEL · 内核特化
THE KERNEL · Specialization
命题 · 承重
Thesis · Load-bearing

同一条内核,作用在结构这个面上

The same kernel, on the surface of structure

系列共享一条内核:执行变充裕 → 判断退守 → 上下文成基础设施 → 人回归于意义。把它的四步填上"系统结构"的具体内容,就得到 AI-Native 架构的全部命题。

The series shares one kernel: execution becomes abundant → judgment retreats → context becomes infrastructure → people return to meaning. Fill its four steps with the specifics of system structure and you get the whole thesis of AI-native architecture.

母版 · 特化到架构MASTER TEMPLATE · specialized to architecture
充裕ABUNDANCE
实现 / 探索
Implementation / exploration
agent 把写代码与试方案都变便宜;"造出来"不再稀缺。
Agents make both writing code and trying designs cheap; "getting it built" is no longer scarce.
判断JUDGMENT
边界 · 可逆性 · 范围 · 信任
Boundaries · reversibility · scope · trust
稀缺的是接缝放哪、什么可逆、造不造、信任边界设在哪。
What is scarce: where the seams go, what is reversible, what not to build, where the trust boundary sits.
上下文CONTEXT
结构对 agent 可读
Structure legible to agents
架构本身成为上下文:约定、ADR、接口契约、类型即护栏。
The architecture itself becomes context: conventions, ADRs, interface contracts, types as guardrails.
MEANING
承重决策 · 品味
Load-bearing calls · taste
人做不可逆、系统级的承重决策与品味;其余下放给 agent。
People make the irreversible, systemic, load-bearing calls and the taste; the rest delegates to agents.

接下来的图纸,每一张都是这张母版的一格展开:SHEET 02 解剖失效的旧架构习惯,SHEET 03–06 逐一重画边界、范围、可读性、信任边界,SHEET 07 给落地的原则与信号。最后一件仪器,帮你把每个待决的架构决策分诊到"交给 agent / 先原型 / 人快拍 / 人必承重"。

Every sheet that follows expands one cell of this template: SHEET 02 dissects the architecture habits that stalled, SHEET 03–06 redraw boundaries, scope, legibility, and trust in turn, and SHEET 07 gives the principles and signals for rollout. A final instrument triages each pending architecture decision into "let agents / prototype first / quick human call / human must own."

SHEET
02
MECHANISM · 旧习惯为何失效
MECHANISM · Habits that stalled
机理 · 受力分析
Mechanism · Force analysis

失效的四个旧架构习惯

Four architecture habits that stopped working

"全量预先设计、结构可隐式、末期评审、代码越多越好"——四个为"人来实现、实现很贵"而养成的习惯,在 agent 实现下逐一失效。先一眼看全,再逐张展开。

"Design it all up front, structure can stay implicit, review at the end, more code is more value": four habits formed for a world where humans implement and implementation is expensive, each stalling under agent implementation. At a glance first, then each gets its own sheet.

预先设计 · 旧Up-front design · before
全量预先设计——实现贵,动工前要想到底。
Design it all up front; implementation was expensive, so think it through before starting.
新 → SHEET 03after → SHEET 03
只把判断花在接缝上;可逆的下放、原型化。
Spend judgment only on the seams; delegate and prototype the reversible.
隐式结构 · 旧Implicit structure · before
结构可隐式——人能从上下文脑补出来。
Structure can stay implicit; humans infer it from context.
新 → SHEET 05after → SHEET 05
显式、可读——结构要写成 agent 能读懂的东西。
Explicit and legible; structure must be something an agent can read.
末期评审 · 旧Late review · before
末期评审架构——做完了再看结构对不对。
Review architecture at the end; check the structure once it's done.
新 → SHEET 03 / 06after → SHEET 03 / 06
边界与信任前置为护栏——含住爆炸半径。
Set boundaries and trust up front as guardrails; contain the blast radius.
多即是好 · 旧More is better · before
代码越多越好——产出即价值。
More code is more value; output equals value.
新 → SHEET 04after → SHEET 04
范围纪律——决定不造什么,是新的稀缺技能。
Scope discipline; deciding what not to build is the new scarce skill.
SHEET
03
REDRAW · 边界即判断节点
REDRAW · Boundaries as judgment
重画 · 接缝
Redraw · Seams

重画 · 边界即判断节点

Redraw · boundaries are the judgment nodes

模块、服务、接口的边界,正是可逆性与爆炸半径所在——也就是非人不可的判断节点。架构师决定接缝放哪,agent 去填模块里面。

The boundaries between modules, services, and interfaces are exactly where reversibility and blast radius live, and therefore the judgment nodes that require a human. The architect decides where the seams go; agents fill what is inside the modules.

机制:过去边界可以松——反正人来实现,事后再重构。为何失效:agent 会放大结构。一条松散的边界,会被它在生成里反复跨越、复制,熵在规模上爆炸;事后重构的成本也随生成量水涨船高。

Mechanism: boundaries used to be allowed to stay loose; humans implemented, and you could refactor later. Why it stalls: agents amplify structure. A loose boundary gets crossed and copied throughout generation, and entropy explodes at scale; the cost of refactoring later rises with the volume of generated code.

重画:把架构师的活收敛到一件事——决定接缝放在哪里。沿着"什么可逆 × 影响多大"切模块:可逆、局部的,放进一个模块、下放给 agent;不可逆、系统级的,单独成为一道边界、由人把守。边界不是文档里的方框,是判断的落点

Redraw: narrow the architect's job to one thing: deciding where the seams go. Cut modules along "what is reversible × how large the blast": the reversible and local goes inside a module and delegates to agents; the irreversible and systemic becomes its own boundary, guarded by a human. A boundary is not a box in a diagram; it is where judgment lands.

检验信号Test signal

你能不能改动一个模块、而不引发级联?爆炸半径越小,说明接缝切得越对——agent 也就能在模块里放手跑。

Can you change one module without triggering a cascade? The smaller the blast radius, the better the seams are cut, and the more agents can run freely inside a module.

SHEET
04
REDRAW · 范围纪律
REDRAW · Scope discipline
重画 · 不造什么
Redraw · What not to build

重画 · 范围纪律

Redraw · scope discipline

agent 让"再多造一点"几乎免费——于是范围蔓延、表面爆炸、AI 生成的技术债悄悄堆积。新的稀缺技能,是决定不造什么

Agents make "build a little more" nearly free, so scope creeps, surface area explodes, and AI-generated technical debt quietly piles up. The new scarce skill is deciding what not to build.

机制:过去范围被成本天然兜住——造得贵,自然就少造。为何失效:当造的成本坍塌,唯一的刹车就只剩判断。没有范围纪律的 agent 团队,会用惊人的速度造出一个谁也维护不动的系统。

Mechanism: scope used to be bounded by cost; building was expensive, so you built less. Why it stalls: when the cost of building collapses, the only brake left is judgment. An agent team without scope discipline builds, at remarkable speed, a system no one can maintain.

重画:把"少造"当成一等的架构决策。保持表面小、依赖少、抽象只在挣到它的时候才引入。这正是创始人手册里那条技术忠告的内核——用架构、范围与安全实践,让 AI 生成的代码库不积累技术债。每加一个特性前先问:它配得上它将带来的维护面吗?

Redraw: treat "build less" as a first-class architectural decision. Keep surfaces small, dependencies few, abstractions introduced only when they earn their keep. This is the kernel of the technical advice in the founder's playbook: use architecture, scope, and security practices to keep AI-generated codebases from accruing technical debt. Before each feature, ask: is it worth the maintenance surface it brings?

检验信号Test signal

表面积与技术债,没有比价值长得更快。生成量飙升时,维护面与缺陷率仍然平稳——说明范围纪律在起作用。

Surface area and technical debt are not growing faster than value. When generation surges, the maintenance surface and defect rate stay flat; that is scope discipline working.

SHEET
05
REDRAW · 结构可读
REDRAW · Legible structure
重画 · 架构即上下文
Redraw · Architecture as context

重画 · 让结构对 agent 可读

Redraw · make structure legible to agents

架构本身就是 agent 要用的上下文。约定、ADR、接口契约、类型即护栏、CLAUDE.md——把结构写成 agent 能读懂、也愿意遵守的东西。这是内核第③腿在架构面的落地。

The architecture itself is context the agent must use. Conventions, ADRs, interface contracts, types as guardrails, CLAUDE.md: write the structure as something an agent can read and will respect. This is the kernel's third leg, landed on the architecture surface.

机制:过去结构可以隐式——靠口口相传、靠资深工程师脑补。为何失效:agent 读不到部落知识。隐式约定它无从遵守,于是漂移、违例、各处不一致——你用回归测试去追,永远慢半拍。

Mechanism: structure used to be allowed to stay implicit, carried by word of mouth and senior engineers' inference. Why it stalls: an agent cannot read tribal knowledge. It has no way to follow an implicit convention, so it drifts, violates, and diverges; chasing it with regression tests always lags.

重画:把架构变成可读的工件。类型与契约当护栏(违例直接编译/检查失败);ADR 记下每个承重决策的"为什么";约定与 CLAUDE.md 把隐式知识显式化。结构越可读,agent 一次做对的概率越高——这也接驳系列的"上下文工程"卷。

Redraw: turn architecture into legible artifacts. Use types and contracts as guardrails (a violation fails the compile or check outright); use ADRs to record the "why" of each load-bearing decision; use conventions and CLAUDE.md to make implicit knowledge explicit. The more legible the structure, the higher the chance an agent gets it right the first time; this also docks onto the series' Context Engineering volume.

检验信号Test signal

一个全新的 agent,不靠人解释架构,就能提交一个符合结构的正确改动。它读得懂,就说明结构真的可读。

A fresh agent, with no human explaining the architecture, ships a correct change that respects the structure. If it can read it, the structure is genuinely legible.

SHEET
06
REDRAW · 安全与信任边界
REDRAW · Security & trust
重画 · 边界把守
Redraw · Guard the boundary

重画 · 把信任边界设成一等结构

Redraw · make the trust boundary a first-class structure

agent 什么都碰,而且很快。安全敏感的接缝要前置、显式、由人把守——最小权限、含住爆炸半径。信任边界不是事后的审查,是架构里的一等元素。

Agents touch everything, and fast. Security-sensitive seams must be up front, explicit, and human-guarded: least privilege, contained blast radius. The trust boundary is not a review after the fact; it is a first-class element of the architecture.

机制:过去安全是末期的一道人审闸门。为何失效:生成的速度与体量让末期闸门形同虚设——等你审到,问题早已被复制了一百遍;而一次越权的爆炸半径,在一个互联系统里可以是全局的。

Mechanism: security used to be a late human gate. Why it stalls: the speed and volume of generation make a late gate meaningless; by the time you review, the problem has been copied a hundred times, and the blast radius of one over-privileged action can be global in an interconnected system.

重画:把信任边界画进架构。最小权限(每个组件只拿它该有的)、爆炸半径含住(一处失陷不致全局)、安全敏感的接缝由人把守(接驳工程卷 trust-but-verify 的"留人"侧:法务风险、信任边界、敏感数据)。agent 可以在边界内放手,但跨越边界必须经过人的闸门。

Redraw: draw the trust boundary into the architecture. Least privilege (each component holds only what it should), contained blast radius (one breach does not become global), security-sensitive seams human-guarded (docking onto the "keep with humans" side of the engineering volume's trust-but-verify: legal risk, trust boundaries, sensitive data). Agents run freely inside a boundary, but crossing one must pass a human gate.

检验信号Test signal

agent 越不过一道信任边界而不经人闸;任何单次改动的爆炸半径都被含住。两者成立,结构就是安全可放手的。

An agent cannot cross a trust boundary without a human gate; the blast radius of any single change is contained. With both true, the structure is safe to let agents run in.

SHEET
07
PLAYBOOK · 落地
PLAYBOOK · Rollout
行动 · 可执行
Action · Operable

落地 · 四原则 + 三信号

Rollout · four principles + three signals

原则定方向,信号验真伪。把判断省下来,只花在那几个不可逆、系统级的承重决策上——其余交给 agent。

Principles set direction; signals verify. Save your judgment and spend it only on the few irreversible, systemic, load-bearing decisions; delegate the rest to agents.

四条原则

Four principles

01
设计接缝,不设计实现Design seams, not code
架构师的产出是边界与契约,不是实现细节——后者交给 agent。
The architect's output is boundaries and contracts, not implementation; that goes to agents.
02
让结构可读Make structure legible
类型/契约/ADR/CLAUDE.md——把隐式知识写成 agent 能读懂的护栏。
Types / contracts / ADRs / CLAUDE.md: write implicit knowledge as guardrails an agent can read.
03
含住爆炸半径Contain the blast radius
最小权限、小接缝、信任边界——让一处错误改不动全局。
Least privilege, small seams, trust boundaries: keep one mistake from moving the whole system.
04
可逆下放,不可逆亲为Delegate reversible, own irreversible
易撤的决策让 agent 跑;难撤、系统级的,人亲自承重。
Let agents run the easily-undone; own the hard-to-undo and systemic yourself.

三个该追踪的信号

Three signals to track

技术债比率Tech-debt ratio
维护面与缺陷率没有比价值长得更快。
Maintenance surface and defect rate not growing faster than value.
变更爆炸半径Change blast radius
改一个模块,波及的范围在缩小。
Changing one module touches an ever-smaller surface.
新 agent 一次做对率Fresh-agent correctness
不靠人解释,新 agent 一次提交就符合结构。
Without human explanation, a fresh agent's first change respects the structure.

怎么起步

How to start

把手上每一个待决的架构决策,丢进下面的分诊器:按"可逆吗 × 系统级吗"两轴,它会告诉你哪些必须你亲自承重、哪些可以放心交给 agent。判断是稀缺资源,只花在承重那几个上。

Run every pending architecture decision through the triage below: on the two axes "is it reversible × is it systemic," it tells you which ones you must own and which you can safely let agents run. Judgment is scarce; spend it only on the load-bearing few.

INSTRUMENT 07架构决策分诊器ARCHITECTURE-DECISION TRIAGE
决策Decision可逆?Reversible?系统级?Systemic?分诊Triage
选一个库 / 依赖Pick a library / dependency
内部函数命名Internal naming
缓存策略Caching strategy
错误处理约定Error-handling convention
数据库 schemaDatabase schema
认证与信任边界Auth & trust boundary

规律:可逆 × 局部 → 交给 agent可逆 × 系统级 → 先原型再定不可逆 × 局部 → 人快拍一下不可逆 × 系统级 → 人必承重(数据库 schema、API 契约、信任边界都在这格)。判断只欠承重那几个。

The rule: reversible × local → let agents; reversible × systemic → prototype first; irreversible × local → a quick human call; irreversible × systemic → a human must own it (database schema, API contracts, trust boundaries all sit here). Your judgment is owed only to the load-bearing few.