認知組織編譯論:全域狀態如何生成動態 Agent 組織
Cognitive Organization Compilation Theory: How Global Cognitive State Generates Dynamic Agent Organizations
系列: Global AI Duality Supplement Series
系列中文名: 全域智能對偶補篇系列
篇次: Supplement 02 / 03
作者: Neo.K with Aletheia
機構: EveMissLab/一言諾科技有限公司
版本: v0.1
日期: 2026-09-11
文件性質: Global AI Architecture / Dynamic Multi-Agent Systems / Cognitive Runtime / Organizational Compilation
摘要
前篇提出「全域—局部對偶智能循環」(Global–Local Dual Intelligence Loop, GLDIL),將成熟類全域 AI 的操作核心寫為:
GtP↓AIOtExploreEtI↑AIGt+1.
其中, Gt 為全域認知狀態, Ot 為局部智能組織, Et 為局部 evidence。前篇已指出,若全域狀態更新卻無法改變下一輪局部組織,則系統仍缺少真正的組織可塑性。
本文進一步處理其中尚未展開的關鍵問題:
全域認知狀態究竟如何被轉換成一個具體可執行的多 Agent 組織?
本文提出「認知組織編譯論」(Cognitive Organization Compilation Theory, COCT)。其核心主張為:未來成熟 Global AI 不應維持一組固定 Agent 組織,再將所有問題塞進固定角色;更合理的架構是將當前世界狀態、任務、因果圖、未知區、風險、資源、方法庫、模型能力與權限條件視為一份「認知原始碼」,再由高階 Strategy / Organization Compiler 動態生成當前任務所需的臨時智能組織。
本文定義:
Ot=OrgCompile(Gt,Ct,Mt,Tt,Pt,Bt)
其中:
- Gt:global cognitive state;
- Ct:causal / dependency structure;
- Mt:可用模型與智能能力池;
- Tt:工具與 execution substrate;
- Pt:policy / authority / privacy constraints;
- Bt:budget / latency / compute envelope。
輸出不是單一 model name,而是一個完整的 Cognitive Organization Plan:
ΠtOrg=(Θt,Rt,Bt,Xt,Vt,St,Ft)
其中包含:
- coordination topology;
- role set;
- role-to-model bindings;
- context projections;
- verification topology;
- stop conditions;
- fallback / recompile rules。
本文承接 GIRA-A05 的 Global Cognitive Operating Architecture。該文已指出 intelligence、method availability、method selection 與 method orchestration 不能混為一談,且一次完整認知策略本身就應包含 representation、method、Agent role、tool、verifier、budget、stop condition 與 fallback。
本文進一步提出:
下一代多 Agent 系統的核心單位,不應只是 Agent,而應是可被編譯、解散、重編譯的臨時認知組織。
1. 固定多 Agent 組織的根本限制
傳統 multi-agent architecture 常見:
Planner
Worker
Reviewer
Judge
或:
Researcher
Coder
Tester
Critic
這些角色可能有用。
但如果任何任務都固定走:
Ofixed,
則系統隱含假設:
∀Ti,Tj,O(Ti)=O(Tj).
這通常不成立。
一個:
JSON schema transformation
與:
大型跨模組架構遷移
不應需要相同組織。
一個:
數值搜尋
與:
形式證明
也不應使用相同角色拓撲。
因此:
Fixed Agent Team=Adaptive Cognitive Organization.
2. GIRA 已經指出:多 Agent 不等於 Orchestration
GIRA-A05 直接提出:
Multi-Agent Architecture=Adaptive Agent Allocation.
因為同時調用更多 Agent 可能增加 duplicated work、consensus echo、coordination overhead 與 state contamination。
所以真正需要最佳化的不是:
Nagents→max.
而是:
U(Ot∣Gt)→max.
其中 Ot 是整個認知組織。
3. 組織本身成為可計算對象
傳統上,我們常把 Agent 當計算單位:
Ai:Ti→Ri.
本文改成:
Ot=computable organizational object.
它具有:
- topology;
- roles;
- capability distribution;
- communication edges;
- authority structure;
- context distribution;
- verification paths;
- budget allocation;
- termination semantics。
所以可以:
Generate(Ot),
也可以:
Modify(Ot),
甚至:
Destroy(Ot).
4. 組織不是身份集合,而是功能結構
假設可用模型:
M={M1,…,Mn}.
傳統方式容易變成:
GPT = architect
Claude = reviewer
GLM = worker
但真正成熟架構應該先建立:
Rt={r1,…,rk},
再做:
ri↦Mj.
因此:
Role→Model
而非:
Model→Permanent Role.
這與 MACR 既有的 role-specific qualification 完全一致:模型不應只被記錄為「GOOD」,而應分別判斷 bounded worker、code worker、architecture reviewer、cross-file worker 等角色資格。
5. 認知組織編譯器
本文正式定義:
OrgCompile:SG→ΠOrg.
其中:
SG=(G,C,K,U,M,T,P,B).
輸出:
ΠOrg=(Θ,R,β,X,V,S,F).
6. 編譯輸入一:Global State
Gt
至少需要知道:
- 目標;
- 當前世界狀態;
- 已解問題;
- 未解問題;
- hypotheses;
- relevant history;
- canonical state;
- completion state。
如果沒有:
Gt,
組織編譯就會退化成:
看 prompt 猜要叫幾個 Agent。
7. 編譯輸入二:Causal Structure
設:
Ct=(V,E,w).
Organization Compiler 需要知道:
- 哪些問題是 root cause;
- 哪些工作可平行;
- 哪些工作具有順序依賴;
- 哪些節點跨域;
- 哪些結果會污染 downstream;
- 哪些局部失敗不影響整體。
所以:
Task Decomposition=Bullet Splitting.
真正 task decomposition 應受因果圖約束。
8. 編譯輸入三:Unknown State
成熟系統不能只儲存:
Known.
還必須保存:
Ut.
也就是:
- unknown;
- unresolved;
- ambiguous;
- contradictory;
- unobserved;
- inaccessible。
如果不知道未知在哪裡,
系統只能對:
Known
重新排列。
而不能自主生成高價值探索。
9. 編譯輸入四:Capability Pool
可用能力不是只有模型。
定義:
Kt={LLMs,specialists,search,solvers,formal tools,simulators,databases,deterministic algorithms}.
所以一個 role 不一定需要 Agent。
可能:
ri→Compiler.
或:
rj→SAT Solver.
甚至:
rk→No execution required.
10. 不需要 Agent 也是合法編譯結果
非常重要的一點是:
OrgCompile⇒Nagents>1.
有些任務最佳組織就是:
Main AI
→ deterministic tool
→ done
甚至:
Main AI
→ direct answer
因此:
能建立 swarm,不代表應建立 swarm。
這也是 Global AI 的選擇能力。
11. 編譯輸入五:Method Library
設:
Mmethod={m1,…,mk}.
例如:
- 搜尋;
- 統計;
- 因果推論;
- 模擬;
- 形式證明;
- numerical exploration;
- code execution;
- debate;
- counterexample search。
GIRA-A05 已指出:
Method Knowledge=Method Selection.
Organization Compiler 因此不能只選:
誰做?
還要選:
怎麼做?
12. 編譯輸入六:Resource Envelope
任何組織都有:
Bt=(C$,Ctoken,Ctime,Ccompute,Chuman).
若忽略 budget,
Agent 系統很容易變成:
Maximum exploration everywhere.
這不是智能。
只是:
unbounded expenditure.
13. 編譯輸入七:Authority Envelope
每個 role 應有:
Ai=(scope,actions,resources,expiry,delegation).
而不是:
Agent 能做什麼工具,就全部能做。
因此:
Capability=Authority.
這與既有 Global AI 對認知、行動、控制與主權的分離相容;GIRA-A09 已明確指出 Global Cognition、Coordination、Agency、Control 與 Sovereignty 是不同操作層。
14. Organization Plan
本文建議組織 plan 至少包含:
ΠtOrg=(Θt,Rt,βt,Xt,Vt,St,Ft).
其中:
Θt:coordination topology;
Rt:role set;
βt:role binding;
Xt:context projection;
Vt:verification topology;
St:stop conditions;
Ft:fallback / recompile policy。
15. Topology 是一級決策
不同問題可能需要:
Θ1=Direct.
也可能:
Θ2=Fan-out.
或者:
Θ3=Supervisor-Worker.
或者:
Θ4=Parallel Specialists + Integration.
甚至:
Θ5=Competitive Hypothesis Search.
所以:
Topology Selection
本身就是 intelligence。
16. 一個任務不應天然需要 Reviewer
傳統 Agent workflow 很容易固定:
Worker→Reviewer.
但如果:
Vdeterministic=1,
例如:
- exact parser;
- compiler;
- schema;
- theorem checker;
- deterministic unit suite;
那麼:
ReviewerLLM
可能沒有必要。
因此:
Verification need→Verifier selection.
而不是:
Every task→Reviewer.
17. Context 也必須被編譯
子 Agent 不應自動取得全部:
Gt.
而應得到:
Xi=πi(Gt).
其中:
πi
是 context projection。
這樣可以降低:
- context bloat;
- irrelevant history;
- conflicting instructions;
- unnecessary authority leakage。
所以:
Global Awareness=Every Agent Sees Everything.
18. Local Context Projection
對角色:
ri,
建立:
Xi=(Goali,Dependenciesi,Constraintsi,RelevantStatei,Evidencei,OutputContracti).
而不是:
Xi=Gt.
這其實也是一種認知壓縮。
19. Local Autonomy 是全域壓縮的一部分
PAIS-05 曾提出:
Local Autonomy=Distributed Computation+Information Compression.
這表示 Global AI 不必 materialize 所有局部狀態。
只需要:
πi(Wi)
達到全域協調所需程度。
20. 認知組織的編譯目標
本文定義:
UOrg=Q−λC−μL−νR−ξO.
其中:
- Q:expected task / epistemic quality;
- C:compute / monetary cost;
- L:latency;
- R:risk;
- O:coordination overhead。
尋找:
ΠtOrg∗=argmaxUOrg.
21. 最強模型全包不一定最優
假設:
MH
是最強模型。
仍不代表:
∀ri,β(ri)=MH.
因為:
C(MH)≫C(ML)
而某些 bounded task:
Q(MH,ri)−Q(ML,ri)≈0.
這時高階模型親自執行沒有必要。
22. 最便宜模型也不一定最優
反過來:
Cgeneration(ML)≪Cgeneration(MH)
仍可能:
Ctotal(ML)>Ctotal(MH)
因為還有:
Cverify+Cretry+Cintegration.
MACR 已經把 execution cost、verification cost、latency、risk 與 task-fit 一起放入模型 routing。
因此 Organization Compiler 應最佳化:
Verified Completion Cost.
23. Coordination Overhead
令組織中:
N
個角色,
communication graph:
GO=(V,E).
則 coordination cost:
Ccoord=f(∣V∣,∣E∣,message size,sync).
Agent 越多,
Ccoord
通常不會下降。
PAIS-05 也指出 global reasoning cost 取決於 interaction topology,而不只是 Agent 數量。
24. 因此需要 Minimal Sufficient Organization
本文提出:
Minimal Sufficient Cognitive Organization
即尋找:
O∗=argOminC(O)
subject to:
Q(O)≥Qmin.
換句話說:
不是用最多 Agent 得到最好答案,而是用足夠小的組織完成所需認知閉環。
25. 高階 Agent 的真正工作是編譯組織
高階主智能不應預設:
我自己做。
更合理的是先問:
What cognitive organization should exist for this problem?
因此 high-level intelligence 的輸出可以不是答案,
而是:
ΠOrg.
這是一個非常不同的智能觀。
26. 組織編譯的三個階段
可以寫成:
Analyze→Compile→Instantiate.
Analyze:
理解任務、因果、未知、能力與風險。
Compile:
生成拓撲、角色、模型、工具、context、verifier。
Instantiate:
真正啟動局部認知組織。
27. 不是每個 role 都需要人格 Agent
role 可以是:
ri=function.
例如:
CounterexampleSearch
可以由:
- LLM;
- SAT solver;
- symbolic engine;
- brute-force program;
其中任一實作。
因此:
Role=Persona.
未來多 Agent 系統不必是很多「人物」。
28. Agent Persona 是可選 projection
如果某些任務需要:
- persistent identity;
- trust history;
- specialist memory;
- social negotiation;
可以建立:
Aipersistent.
但大量 bounded work 只需要:
RoleSlot.
這與 MACR 從固定子 AI 轉向 Worker Slot / Role Slot 的方向一致。
29. 組織應該是暫時的
對任務:
T,
生成:
OT.
完成後:
Dissolve(OT).
只留下:
Artifact+Evidence+Decision+Memory.
因此:
Persistent System+Ephemeral Organization.
可能是高效率架構。
30. Persistent State 與 Temporary Organization 必須分離
若:
Ot
同時持有 canonical knowledge,
解散 Agent 就會丟失:
state.
因此全域狀態必須存在於:
SG
而不是某個臨時 Agent 的聊天歷史。
這與既有壓縮全局智能對主 AI 常駐狀態、全局因果圖、Agent capability directory 與治理政策的設計一致。
31. Organization Recompilation
如果局部 evidence 使:
Gt+1=Gt,
則重新執行:
Πt+1Org=OrgCompile(Gt+1).
這叫:
Organization Recompilation
可能:
- 移除角色;
- 新增角色;
- 換模型;
- 改 representation;
- 改 topology;
- 改 verification;
- 改 budget;
- 完全停止。
32. Recompile 不等於 Reset
重編譯不能:
forget everything.
必須保留:
Ht=organizational history.
其中包含:
- previous plans;
- failure reasons;
- cost;
- model performance;
- unnecessary branches;
- integration debt。
因此:
Recompile=Start Over.
33. 組織歷史也是學習資料
如果某 topology:
Θa
在同類 task 上多次:
Cost↑
且:
Quality↓,
則未來:
P(Θa∣T)↓.
所以組織本身可以學習。
34. 新概念:Organization Memory
本文定義:
MO={Task,Plan,Bindings,Cost,Failures,Outcome,Revisions}.
這不是普通 episodic memory。
它記錄:
什麼樣的認知組織,在什麼問題上有效。
35. Organization Memory 可以形成 Meta-Architecture
長期累積:
MO(1),MO(2),…
後,可以學習:
MetaOrgPolicy.
也就是:
看到某種問題結構時,什麼組織通常最有效?
這使 Agent orchestration 從 prompt engineering 走向:
Organizational Meta-Learning.
36. 但歷史不能變成新的固定模板
如果學到:
這種 task 都用 5-agent swarm
然後永久固定,
又回到:
Ofixed.
所以歷史只能形成 prior:
P(O∣T),
不能形成絕對規則。
37. 全域狀態需要知道「是否值得成立一個組織」
有時:
VOI(T)<CO.
這表示:
建立多 Agent 組織本身就不划算。
此時正確輸出是:
Do Not Spawn.
這是高階 orchestration 很重要的能力。
38. Agent Spawn 需要經濟性
定義:
Gain(Ai)=ΔUi−Ci.
只有:
Gain(Ai)>0
才值得 instantiate。
所以:
Available Agent⇒Useful Agent.
39. 組織膨脹失敗
本文稱:
Nt↑
但:
ΔUt↓
為:
Cognitive Organization Bloat
症狀包括:
- reviewer of reviewer;
- duplicated specialist;
- consensus loops;
- repeated planning;
- redundant validation;
- recursive delegation。
40. 組織編譯需要停止條件
Organization Plan 必須自帶:
St.
例如:
St={goal satisfied,critical uncertainty<ϵ,VOI<cost,budget exhausted}.
沒有 stop semantics 的組織:
cannot be considered fully compiled.
41. Stop Condition 也是 role-level
不同 role 可以有不同:
Si.
例如:
Counterexample Agent:
Sc=found witness OR exhausted search budget.
Literature Agent:
Sl=marginal novel source gain<ϵ.
所以不需要整個組織一起無限跑。
42. Dynamic Scale Allocation
上一系列已建立:
Macro=Meso=Micro.
Organization Compiler 可把:
Scale(Ti)
映射至不同能力。
例如:
Macro→ArchitectModel.
Meso→Coordinator/Specialist.
Micro→CheapWorker/Tool.
所以:
Capability Allocation∝Causal Scale.
43. 全域模型不必執行所有 Macro 以下工作
Global AI 的優勢是:
global judgment.
若它把全部 token 花在 micro execution,
會出現:
Copportunity↑.
所以強 Global AI 應更擅長:
preserve global attention.
44. 認知組織的雙向接口
每個局部 role 不只需要:
InputContracti.
也需要:
ReturnContracti.
Return contract 應包含:
Ri=(Result,Evidence,Confidence,Failure,Anomaly,GlobalImpact.)
因此局部輸出天然適合:
I↑AI.
45. 「答案」不是完整回傳格式
如果 worker 只說:
完成了。
這對 global integration 幾乎沒有價值。
更成熟輸出應能回答:
- 做了什麼;
- 改變什麼;
- 哪些假設成立;
- 哪些假設失敗;
- 是否發現新問題;
- 是否建議改變全域策略。
46. Local Agent 可以要求 Recompile
本文提出:
Recompile Signal
σR(i)
若局部 Agent 發現:
- task definition invalid;
- representation mismatch;
- architecture flaw;
- substrate mismatch;
- unexpected cross-domain dependency;
它不應只是:
FAIL.
而應回傳:
RECOMPILE_REQUEST.
47. 這使局部 Agent 擁有有限的結構反證權
局部 Agent 不能自行重寫整個全域。
但可以說:
目前分派給我的局部問題,本身可能來自錯誤全域假設。
這就是前篇所說的:
Local Evidence Rights.
48. Global Compiler 也不能無條件接受 Recompile Request
否則任一 Agent 都能造成全域震盪。
所以:
σR→RecompileGate.
評估:
- evidence;
- causal reach;
- reproduction;
- confidence;
- global consequence。
49. Partial Recompilation
重編譯不必整個組織重建。
可以只有:
ΔO.
例如:
保留 A/B/C
移除 D
加入 E
調高 B budget
更換 C verifier
所以:
Organization Recompilation
也可 incremental。
50. Hot-Swappable Cognition
如果 role contract 與 model identity 分離,
就可以:
Ma⇝Mb
而不重建整個組織。
這形成:
Hot-Swappable Cognition
即:
組織角色持續,但智能載體可以替換。
51. 新模型出現不必重寫組織架構
只要新模型:
Mnew
取得:
Qualification(Mnew,ri)≥θ,
便可加入候選池。
這是 future-proof AI organization 的關鍵。
52. 組織不是只在模型之間編譯
未來甚至可以:
ri→Human.
如果某 task:
- 需要法律責任;
- 需要價值判斷;
- 需要外部授權;
- 高度模糊;
則:
Human
也是能力池的一部分。
53. Human 應是 Boundary Resource
但不是每一步:
AI→Human→AI.
而是在真正邊界:
Human-at-the-Boundary.
這與 AI 原生工作組織論的方向一致。
54. 認知組織也可以是跨域聯邦
對:
Ω1,Ω2,…,Ωn,
可建立:
Oi.
再建立:
OX
負責 cross-domain integration。
這與 GIRA-A08 的:
Domain Global AI→Multi-Domain Federation→Cross-Domain Global AI
相容。
55. 全域組織不必中央化
可以有:
O=i⨁Oi.
Global layer 只管理:
- inter-domain dependencies;
- shared state;
- conflict;
- resource allocation;
- global constraints。
局部 domain 保留:
LocalStatei.
所以:
Organization Compilation=Centralized Execution.
56. 新概念:Cognitive ABI
若不同 Agent / models 要被動態替換,
需要一個穩定接口。
本文稱:
Cognitive ABI
其至少描述:
(Input,Output,Evidence,Authority,Failure,Escalation).
模型可以改,
但 role contract 不必改。
57. Cognitive ABI 使模型市場可插拔
未來:
M1,M2,M3,…
快速更新。
如果組織綁死 vendor,
架構很快老化。
Cognitive ABI 則允許:
Role→Qualified Capability
再:
Capability→Current Best Provider.
58. 認知組織編譯的真正產物不是 Agent list
最終輸出不是:
Use 5 agents.
而是:
Executable Cognitive Organization.
其包含:
- what;
- who;
- how;
- with what;
- under which authority;
- with what evidence;
- until when。
59. 完整編譯流程
本文提出:
Gt→AnalyzeState→LocateUnknowns→EstimateCausalStructure→GenerateStrategies→SelectTopology→CreateRoles→BindCapabilities→ProjectContexts→AttachVerification→AttachStopConditions→Ot.
60. 組織執行後
產生:
Et.
然後:
Et→I↑AI→Gt+1.
再重新:
Ot+1=OrgCompile(Gt+1).
這就是完整雙向架構。
61. 成熟 Global AI 的組織不應「存在」,而應「生成」
傳統企業問:
我們有幾個團隊?
AI-native system 更可能問:
現在這個世界狀態需要什麼團隊?
因此:
Organization→State-Dependent Generated Structure.
62. 這可能比「更多 Agent」更重要
當 Agent 越便宜,
大家很容易追求:
N→∞.
但本文提出另一條進步路線:
Better Organization Compiler>More Unstructured Agents.
因為一個優秀 compiler 可能讓:
100→12
個 Agent,
仍然得到更好結果。
63. 認知組織壓縮率
定義:
CCR=1−C(Onaive)C(O∗).
其中:
C
可包含:
- agents;
- tokens;
- compute;
- verification;
- human intervention;
- coordination。
若:
CCR↑
而品質不降,
表示全域 intelligence 正在真正消除無效工作。
64. Global AI 越成熟,可能反而越安靜
這是一個有趣推論。
弱 orchestration:
大量 Agent
大量 messages
大量 review
大量 retries
強 orchestration 可能:
少量高價值 Agent
清楚 task contracts
局部 autonomy
必要 integration
快速 stop
所以:
Visible Activity=Intelligence.
65. 組織效率不能只看 throughput
若:
1000
agents 產生大量內容,
但大部分被丟棄,
不代表系統優秀。
應看:
Accepted Global Information Gain/Total Cognitive Cost.
66. 新指標:Organizational Epistemic Efficiency
定義:
ηO=Ccompute+Ccoord+CverifyΔUG.
其中:
ΔUG
是對全域認知狀態的有效提升。
67. 組織的目標不是讓每個 Agent 有事做
成熟組織不追求:
Utilization=100%.
而追求:
Global Objective Closure.
所以 idle Agent 並不是浪費。
不需要被啟動才是正確行為。
68. 這也是 Global Completion 的組織版本
Global Completion Theory 已經提出:
先讓整體存在,再讓整體收斂。
在 multi-agent 層可以改寫:
Compile the whole cognitive organization→execute→recompile only where needed.
而不是:
想到一個小任務
→ spawn agent
→ 再想到一個
→ 再 spawn agent
69. 組織本身也有 Global-First
初始:
O(0)
先覆蓋完整任務必要角色。
不要求每個 role 完美。
再依 evidence:
O(0)→O(1)→⋯.
所以:
Global Organization Sketch→Organizational Refinement.
70. 最終命題一:Organization Compilation Principle
The optimal intelligent organization should be compiled from the current global state, not permanently predefined.
71. 最終命題二:Role-before-Model Principle
Role→Capability→Model.
而不是先決定 model,再替它找工作。
72. 最終命題三:Minimal Sufficient Organization
minC(O)s.t.Q(O)≥Qmin.
73. 最終命題四:Organizational Plasticity
若:
Gt→Gt+1,
則:
Ot
必須具有改變可能。
即:
ΔG⇒ΔO may occur.
74. 最終命題五:Cognitive ABI
Role Contract=Model Identity.
這使能力池可以長期演化而不破壞組織語義。
75. 與前篇的統一
Supplement 01 定義:
Gt⇄Ot.
本文解釋其中:
Gt→Ot
究竟如何成立。
下一篇則會處理:
何時我們能說這個雙向循環真的具有「完備性」?
以及如何測量:
- D↓ ;
- D↑ ;
- organization plasticity;
- causal gluing;
- recompile quality;
- global closure。
結論
未來多 Agent AI 的競爭,不一定只是:
誰能同時跑更多 Agent?
真正重要的問題可能逐漸變成:
誰知道現在根本需要哪些 Agent?
一個真正成熟的全域智能系統,應該能從自己的當前世界模型、未知區、因果結構、方法空間、模型能力池與資源條件中,編譯出一個最適臨時認知組織。
當世界理解改變:
組織也改變。
當方法失敗:
組織重新編譯。
當某條研究路徑失去價值:
Agent 消失。
當新的高價值問題出現:
新角色被生成。
當 deterministic tool 足夠:
不生成額外 Agent。
因此:
AI-Native Organization=Fixed Team of Agents.
更接近:
AI-Native Organization=Continuously Compiled Cognitive Structure.
而真正成熟的 Global AI,不只是擁有一群智能。
它還應該知道:
在這一刻,究竟應該讓什麼樣的智能組織存在。