FCAO × OpenHarness Integration Architecture and MVP Specification v0.1
分形式對話智能體組織 × OpenHarness 整合架構與 MVP 規格:Reuse / Extend / Patch / Fork 的最小工程路線
English Title: FCAO × OpenHarness Integration Architecture and MVP Specification v0.1
系列: FCAO / Fractal Conversational Agent Organization
文件編號: EML-FCAO-OH-2026-v0.1
文件類型: Technical Whitepaper / Fit-Gap Analysis / Integration Architecture / MVP Specification
作者: Neo.K
協作: Aletheia / GPT-5.6 Sol
機構: EveMissLab/一言諾科技有限公司
版本: v0.1
日期: 2026-08-24
狀態: Engineering Integration Draft / Canonical UTF-8 Source
直接前置:
EML-FCAO-2026-00-v0.1— FCAO Foundation / Integration PaperEML-FCAO-2026-01-v0.1— Twin-Agent GovernanceEML-FCAO-2026-02-v0.1— Temporal-Topological ComputationEML-FCAO-RA-2026-v0.1— FCAO Twin-Core Reference Architecture- OpenHarness source snapshot supplied for this study
OpenHarness snapshot observations used in this document:
The inspected source includes coordinator mode, agent spawning, task management, swarm backends, teams, hooks, plugins, MCP integration, agent definitions, verification agent definitions, background execution, worktree support, memory, task notifications, and provider/runtime abstractions. This whitepaper does not assume those interfaces are frozen across future upstream versions.
Integration Policy:Reuse first → Extend second → Patch only when generic core capability is missing → Fork only when architectural divergence becomes persistent.
Canonical Source Policy:
本文 Markdown 為正式 UTF-8 source;數學只使用 $...$ 與 $$...$$;不以聊天渲染文字作為 canonical source。
生成、保真與來源邊界聲明
本文是 FCAO v0.1 理論與 reference architecture 的工程落地文件。它不把 OpenHarness 宣稱為 FCAO,也不把 FCAO 宣稱為 OpenHarness 的替代品。兩者關係為:
以及:
本文對 OpenHarness 的工程判斷基於本次提供的 source snapshot,而非假設未來 upstream 版本永久保持一致。因此每一項 integration decision 都應在實作開始時以 pinned commit / release 再確認。
本文不主張需要立即 fork。相反地,v0.1 明確採:
作為首選。
摘要
FCAO v0.1 提出一個 Conversation-local / project-local 的分形式多智能體組織模型:一段對話可以形成 temporary local computational world;其最小治理單位不是單一 Root,而是 Primary–Twin 雙核心加 Named Ephemeral Agents;任務不是固定 step list,而是可版本化 task / verification topology;切分前需估計時間上下界,執行中可依 telemetry、verification bottleneck 與 integration risk 動態 REOPEN、REASSIGN、SPLIT 與 REPARTITION。
OpenHarness 已提供相當多 FCAO 所需的底層 execution primitives,包括 coordinator mode、background Agent spawn、agent definitions、verification agent、task manager、subprocess / in-process / terminal swarm backend、team registry、message passing、hooks、plugin manifests、MCP client/tools、memory、worktree、task notifications、usage metadata 與 provider abstractions。
因此最合理的工程策略不是從零建立新的 agent shell,也不是立即 fork OpenHarness,而是建立:
映射 FCAO 的 canonical state、Primary–Twin、Named Ephemeral Identity、Topology Engine、Temporal Envelope、Local Closure Certificate、Closure Certificate、CTCL-ITR receipts 與 SEDB adapter 到 OpenHarness 既有 runtime。
本文逐項將需求分類為:
初步結果為:
- Reuse:provider/runtime、task process、background execution、MCP、agent definitions、verification worker、worktree、memory、basic team/message primitives;
- Extend:Primary/Twin profiles、FCAO plugin、LCC、temporal estimator、topology store、closure engine、SEDB / CTCL adapters、telemetry、dashboard semantics;
- Patch Candidate:真正 recursive parent lineage、per-instance ephemeral naming、richer task/event metadata、first-class topology edge callbacks;
- Fork:v0.1 不建議。只有當 upstream extension surface 長期無法承載 canonical lineage、scheduler interception 或 topology semantics,且 upstream patch 不可接受時才成立。
本文進一步提出一個五階段 MVP。第一階段不改 OpenHarness core,只以 plugin + hooks + external FCAO state store 建立 Primary、Twin、Named Agent registry 與 LCC;第二階段加入 temporal envelope / topology engine;第三階段加入 Twin selective audit / closure gate;第四階段才測試 recursive child lineage patch;第五階段進 benchmark,比較 Single Agent、OpenHarness fixed coordinator、fresh verifier、FCAO Primary–Twin dynamic topology。
最終目標不是證明 FCAO 一定比 OpenHarness 原生 coordinator 更好,而是建立一套可測量實驗,使下列命題可以被驗證或否證:
0. 工程問題
本文件只回答一個工程問題:
FCAO 既然已有完整理論與 reference architecture,而 OpenHarness 又已提供成熟的 Agent execution substrate,我們應該如何最少改動地把 FCAO 跑起來?
不是:
如何把 OpenHarness 改成另一個產品?
也不是:
如何維護一個永久 fork?
1. OpenHarness 在 FCAO 中的位置
FCAO reference architecture:
OpenHarness 最適合承載:
FCAO 自己保留:
所以:
2. 本次 source snapshot 中已確認的 OpenHarness primitives
本次 source inspection 確認至少有:
CoordinatorModeAgentToolTaskManagerTaskRecordTeammateSpawnConfig- subprocess swarm backend
- in-process backend
- tmux / iTerm2 teammate backend
- team registry
- task notification
send_messagetask_stop- agent definitions
- verification agent definition
- plugin manifest
- plugin agents / tools / hooks
- hook events
- MCP client / tools
- memory
- worktree / isolation support
- usage fields including token / tool / duration
- project / user plugin loading
- background Agent lifecycle
這些已足以支撐 FCAO MVP 的 execution carrier。
3. OpenHarness coordinator 對 FCAO Primary
OpenHarness Coordinator 已負責:
- user goal;
- worker dispatch;
- result synthesis;
- verification worker;
- task stop;
- follow-up message。
因此:
但不能直接等同:
因為 FCAO Primary 還需要:
- canonical World ID;
- task topology;
- Temporal Envelope;
- decomposition decision;
- versioned closure;
- Twin peer;
- CTCL receipt;
- SEDB state projection。
所以分類:
4. OpenHarness verification agent 對 FCAO Twin
OpenHarness 已有 verification agent,且其設計目標是:
- fresh verification;
- try to break implementation;
- run tests;
- return evidence;
- avoid self-confirmation。
這非常適合:
但 FCAO Twin 是:
Twin 還需要:
- project-wide structural observation;
- audit priority;
- topology hole detection;
- temporal breach monitoring;
REOPEN;REPARTITION;- closure challenge;
- temporary arbiter policy。
因此:
而:
5. AgentTool 與 Named Ephemeral Agent
現有 AgentToolInput 有:
descriptionpromptsubagent_typemodelcommandteammode
spawn 時目前以:
這不足以表達:
FCAO 要求:
agent_id: ag-017
ephemeral_name: Atlas
agent_type: worker
task_name: Storage Topology
parent_agent_id: primary-root
因此第一階段可以在 external FCAO registry 中維持 mapping:
分類:
若 UI / task notification 必須直接顯示 per-instance name,再考慮 core patch。
6. 真正 parent lineage
現有 Agent spawn config 在 inspected snapshot 中使用:
parent_session_id = "main"
這對普通 coordinator → worker 足夠,但 FCAO recursive delegation 需要:
真正需要保存:
v0.1 可以先由 FCAO external state 記錄 logical parent:
如果 child 真的需要原生 recursive spawn 且 runtime security / context 必須依 lineage 自動處理,才需要 core patch。
分類:
7. TaskRecord 對 FCAO Task Node
OpenHarness TaskRecord 目前核心狀態接近:
FCAO Task Node:
兩者不是同一層。
因此不應硬塞 FCAO 全部語義進 TaskRecord。
推薦:
而:
用 task_id / metadata 對接。
分類:
8. TeamRegistry 對 FCAO 分形組織
OpenHarness TeamRegistry 有:
- team name;
- members;
- messages。
這能承載:
但 FCAO team 還需要:
- parent team;
- world;
- task region;
- authority;
- topology scope;
- Twin activation;
- lifecycle。
因此:
可直接做 UI / runtime grouping,但 canonical fractal organization 應由 FCAO state 保留。
分類:
9. TaskNotification 對 FCAO Result Packet
OpenHarness TaskNotification 已有:
usage 有:
FCAO Local Result Packet:
現有 notification 很適合當 transport envelope,但不足以當 closure object。
方案:
- worker 產生 LCC artifact / JSON;
- task notification metadata 引用 LCC URI;
- FCAO hook 在
subagent_stop時讀取 LCC; - 更新 canonical topology。
分類:
10. Hooks 是 FCAO 最重要的 extension surface
目前 hook events 包含:
- session start / end;
- pre / post compact;
- pre / post tool use;
- user prompt submit;
- notification;
- stop;
- subagent stop。
FCAO 第一版最重要的 hook:
因為它可以:
POST_TOOL_USE 也可用於 telemetry。
因此:
11. Plugin system
OpenHarness PluginManifest 已提供:
- tools;
- hooks;
- MCP;
- agents;
- skills;
- commands。
這非常接近 FCAO 所需的非 fork extension surface。
推薦 plugin:
.openharness/plugins/fcao/
├── plugin.json
├── agents/
│ ├── fcao-primary.md
│ ├── fcao-twin.md
│ ├── fcao-auditor.md
│ └── fcao-arbiter.md
├── tools/
│ ├── topology.py
│ ├── temporal.py
│ ├── closure.py
│ ├── lcc.py
│ └── state.py
├── hooks.json
├── mcp.json
├── schemas/
└── profiles/
分類:
12. MCP
OpenHarness 已有 MCP client / resource / auth / tool support。
因此 FCAO 不需要自己重造 MCP stack。
MCP 在 FCAO 中:
不是:
分類:
13. CLI / subprocess
OpenHarness subprocess backend 已提供:
- background task;
- process execution;
- polling;
- result collection。
適合:
- coding Agent;
- CLI Agent;
- local model runner;
- isolated worker。
FCAO 只需要封裝:
分類:
14. Worktree / isolation
多 coding Agents 共用 repo 時,worktree 能降低:
FCAO 把它視為:
的一種工程實現。
分類:
15. Memory
OpenHarness memory 可承載:
- session continuity;
- Agent memory;
- team memory。
但 FCAO canonical state 不應只依賴 memory subsystem。
因此:
而:
分類:
16. Coordinator mode 的限制
OpenHarness coordinator prompt 已有很好的 engineering delegation heuristic,但它仍主要以:
為中心。
FCAO 需要:
因此不建議直接大改 coordinator prompt 來假裝 Twin。
應建立獨立 persistent Twin session / agent record,透過 FCAO state event 與 hooks 接收 project updates。
17. Twin runtime design
推薦:
Primary Session
|
+---- FCAO State Store ---- Twin Session
| | |
| | +-- Audit Agent
| | +-- Fresh Verifier
| |
+-- Workers ---+
Twin 不需要收到所有 worker token stream。
它只需要:
- task transition;
- temporal estimate;
- LCC;
- verification result;
- risk change;
- topology version;
- closure candidate。
18. Twin event subscription
v0.1 由 FCAO hook / state event bus 實作。
事件:
Twin 只在 policy 需要時 wake。
因此:
不代表持續燒 token。
19. Twin IDLE
若沒有高價值 intervention:
這對成本控制非常重要。
20. Topology Engine 不應塞進 OpenHarness TaskManager v0.1
第一版推薦 external SQLite / SEDB-compatible store:
worlds
agents
tasks
edges
delegations
estimates
lcc
verification
events
closures
OpenHarness TaskManager 只負責實際執行生命週期。
因此:
21. Temporal Engine
第一版不需要 machine learning。
只需:
- heuristic lower / upper;
- task-class defaults;
- observed duration;
- historical percentile;
- verification allowance;
- retry allowance。
object:
target: task-017
lower_ms: 180000
upper_ms: 720000
confidence: 0.6
當:
產生:
22. Temporal Engine 與 OpenHarness usage
TaskNotification / task metadata 已能提供:
- duration;
- token;
- tool use。
這些可直接回填:
因此:
23. LCC 實作
v0.1 worker output contract 增加:
{
"status": "partial",
"artifacts": [],
"verified": [],
"open_gaps": [],
"assumptions": [],
"receipts": []
}
最初可存:
.fcao/runs/<task_id>/lcc.json
之後再換 SEDB。
24. LCC 不要求修改每個 provider
可由 wrapper prompt / agent definition 要求 worker 最後輸出固定 machine-readable artifact。
因此:
先屬於:
不需要 core patch。
25. Closure Engine
第一版 external tool:
fcao_closure_check(world_id)
檢查:
- mandatory node;
- LCC;
- verification;
- open gap;
- conflict;
- deferred node;
- topology version。
輸出:
26. Primary closure challenge
Primary 提出:
Twin 檢查後回:
CONCURCHALLENGEREOPENESCALATE
只有通過 policy 才 CLOSE。
27. REOPEN mapping
OpenHarness 已有:
- send message;
- task stop;
- re-spawn。
所以第一代 REOPEN 不需要 core primitive。
FCAO state 先:
然後 scheduler:
- follow-up existing Agent;
- spawn new Agent;
- spawn verifier;
- reassign。
分類:
28. REPARTITION mapping
第一代 repartition 由外部 Topology Engine 改圖,再使用 existing AgentTool / task stop / send_message 執行。
因此:
只有當需要 atomic scheduler interception 才考慮 patch。
29. Stop / pause
OpenHarness 已有 task stop。
如果未來 FCAO 要:
且 backend 不一致,可能要 extension / patch。
v0.1 不把 pause/resume 列為硬依賴。
30. Fit-Gap Summary
Reuse
- coordinator execution
- worker spawn
- task process
- task stop
- send_message
- MCP
- worktree
- memory
- verification worker
- agent definitions
- provider runtime
- background tasks
- basic teams
- usage metadata
- plugin loader
- hooks
Extend
- FCAO World
- Primary profile
- Persistent Twin
- Named Ephemeral Identity registry
- topology graph
- temporal envelope
- candidate decomposition
- LCC
- closure engine
- CTCL receipts
- SEDB adapter
- Twin event bus
- audit priority
- dynamic repartition
- benchmark harness
Patch Candidate
- actual recursive runtime parent lineage
- per-instance Agent display name in spawn path
- richer task metadata / event payload
- topology-native scheduler callback
- first-class pause/resume if required
Fork
v0.1:
31. 為什麼現在不 fork
Fork 會立即產生:
- upstream merge burden;
- security patch burden;
- provider compatibility burden;
- CLI/TUI maintenance;
- MCP maintenance;
- test drift;
- duplicated infrastructure work。
而 FCAO 真正新意主要在:
這些目前大部分能放在 extension layer。
32. Patch policy
只有當:
且 blocker 是 generic capability 時,先提出 upstream patch。
例如:
expose actual parent agent ID in spawn configuration.
這對任何 recursive orchestration 都有價值。
33. Fork criteria
只有同時滿足:
- blocker 位於 core execution path;
- plugin / hook 無法解;
- upstream generic patch 不接受;
- FCAO 需要長期不同 semantics;
- patch queue 持續擴大;
- merge cost 已高於 fork ownership benefit;
才:
34. Fork Decision Metric
可以定義:
當:
且 architecture divergence 穩定,才考慮 fork。
35. Repository strategy
建議新 repo:
fcao-openharness
但不是 OpenHarness fork。
它是 integration layer:
fcao-openharness/
├── README.md
├── plugin/
├── schemas/
├── runtime/
├── adapters/
├── benchmarks/
├── tests/
├── examples/
└── vendor-lock/
36. Upstream pin
保存:
openharness:
repository: HKUDS/OpenHarness
commit: <PINNED_SHA>
release: <OPTIONAL_RELEASE>
不要依賴 floating main 作 benchmark baseline。
37. License handling
若使用 OpenHarness 原始碼、copy / modify code,必須依其 LICENSE 保留相應 notice。
若純 plugin / external integration,只需依實際分發內容決定 notice placement。
v0.1 package 應保留:
THIRD_PARTY_NOTICES.md
38. FCAO Plugin Manifest
範例:
{
"name": "fcao",
"version": "0.1.0",
"description": "FCAO Twin-Core orchestration extension",
"enabled_by_default": true,
"tools_dir": "tools",
"hooks_file": "hooks.json",
"agents": "agents"
}
39. FCAO Agents
至少:
fcao-primary
fcao-twin
fcao-auditor
fcao-arbiter
fcao-integrator
其中:
- auditor 是 fresh verifier;
- arbiter 是 temporary;
- integrator 是 optional hierarchical merge worker。
40. FCAO Tools
最小:
fcao_world_get
fcao_task_get
fcao_topology_get
fcao_topology_propose
fcao_temporal_estimate
fcao_lcc_submit
fcao_reopen
fcao_repartition
fcao_closure_check
fcao_event_append
41. Hooks
第一版:
{
"subagent_stop": ["fcao_on_subagent_stop"],
"post_tool_use": ["fcao_on_post_tool_use"],
"session_start": ["fcao_on_session_start"],
"session_end": ["fcao_on_session_end"]
}
42. subagent_stop workflow
43. post_tool_use workflow
只保存必要 telemetry:
- tool class;
- duration;
- status;
- target resource;
- cost if available。
不保存 hidden reasoning。
44. Canonical State Backend v0.1
第一版推薦:
理由:
- local-first;
- deterministic;
- easy test;
- easy replay;
- no external dependency。
之後:
45. Minimal tables
world
agent
task
edge
delegation
estimate
artifact
lcc
verification
event
closure
46. Event ID
所有治理 event:
唯一。
OpenHarness task ID、Agent ID 只是 references。
47. Identity mapping
建立:
fcao_agent_id
openharness_agent_id
openharness_task_id
ephemeral_name
role
parent_fcao_agent_id
因此 runtime implementation 可以替換。
48. Primary bootstrap
使用者進入 FCAO mode:
- 建 World;
- assign Primary;
- load policy;
- load / create Twin;
- create initial topology;
- persist
WORLD_OPEN。
49. Twin bootstrap
Twin 初始只讀:
- world summary;
- topology;
- policy;
- risk;
- estimates。
不需要複製 Primary 全 context。
50. Candidate decomposition MVP
v0.1 只生成:
不要一開始做任意 graph optimization。
51. Decomposition output
candidate: split-3
tasks:
- task-a
- task-b
- task-c
dependencies: []
verification:
- merge-check
expected:
lower_ms: 300000
upper_ms: 900000
52. NO_SPLIT test
MVP 必須有至少一個 case:
勝出。
否則 scheduler 可能只是:
always spawn agents.
這不符合 FCAO。
53. Twin selective audit MVP
Twin 不持續全讀。
只有:
才:
- inspect LCC;
- spawn auditor;
- challenge merge;
- reopen。
54. Audit Agent reuse
OpenHarness verification agent 可以直接作:
只需 wrapper contract 要求 machine-readable receipt。
55. Arbiter
第一版可以仍用 generic fresh Agent:
subagent_type = verification / plan
外部 FCAO registry 標記 role=arbiter。
不需要修改 OpenHarness built-in role system。
56. Hierarchical merge
如果:
Primary 可以 spawn integrator worker。
其 output 仍需 LCC / merge certificate。
57. Temporal breach
當 observed duration 超過:
hook / scheduler 產生:
ESTIMATE_BREACH
Twin wake:
- inspect;
- IDLE;
- REASSIGN;
- SPLIT;
- STOP;
- escalate。
58. Verification bottleneck
若:
Twin 可以:
- spawn fresh verifier;
- 降低低風險 audit;
- 暫停新 speculative task。
59. Integration bottleneck
若 Primary pending results 過多:
scheduler 可:
- hierarchical merge;
- freeze fan-out;
- create integrator。
60. Recursive Agent MVP boundary
第一版不要求 child 原生 spawn child。
先由 Primary 代行 logical recursive spawn:
A1 requests subdelegation
→ FCAO state validates authority
→ Primary/Runtime spawns A1.1
→ parent_fcao_agent_id = A1
因此 FCAO semantic recursion 可先成立,而不改 core。
61. Native recursive spawn patch
第二階段才測:
- child calls AgentTool;
- real parent session / agent ID propagation;
- subdelegation authority inheritance;
- nested team / topology scope。
若無法用 plugin 解,就形成 upstream patch proposal。
62. Patch 01 candidate:Ephemeral Name
理想新增:
ephemeral_name: str | None
與:
agent_name = ephemeral_name or subagent_type or "agent"
這是低風險 generic patch。
63. Patch 02 candidate:Parent Identity
理想:
parent_session_id=context.session_id
parent_agent_id=context.agent_id
而不是固定 main。
64. Patch 03 candidate:Task Metadata
TaskRecord metadata 已有 dict,但若需要 typed structured metadata,可提出:
metadata: dict[str, Any]
或 extension field。
65. Patch 04 candidate:Hook Event
如果 subagent_stop 不足以捕捉:
- task start;
- task status change;
- spawn;
- message;
- verification state;
可以提出 generic lifecycle events。
66. 不應先 patch 的東西
不要為 FCAO 直接改:
- provider;
- TUI;
- MCP client;
- terminal;
- memory core;
- worktree;
- command parser;
除非有明確 blocker。
67. MVP Phase 0 — Carrier Verification
目標:確認 OpenHarness snapshot 可作穩定 carrier。
測:
- spawn;
- task poll;
- stop;
- message;
- verifier;
- hooks;
- plugin;
- MCP;
- usage。
輸出:
68. MVP Phase 1 — FCAO State + Identity
完成:
- World;
- Primary;
- Twin registry;
- child identity;
- task graph;
- event store;
- no topology optimization yet。
69. MVP Phase 2 — LCC + Closure
完成:
- worker LCC;
- subagent_stop ingestion;
- global closure engine;
- Twin challenge;
- fresh verifier。
70. MVP Phase 3 — Temporal Topology
完成:
- envelope;
- candidate split;
- NO_SPLIT;
- estimate breach;
- one repartition;
- topology version。
71. MVP Phase 4 — Recursive Semantics
完成:
- logical recursive delegation;
- authority propagation;
- nested lineage;
- optional native parent patch experiment。
72. MVP Phase 5 — SEDB / CTCL
完成:
- CTCL event fields;
- SEDB state projection;
- replay;
- snapshot;
- long-running project restore。
73. MVP Phase 6 — Benchmark
四組:
- Single Agent;
- OpenHarness Coordinator fixed decomposition;
- OpenHarness + fresh verifier;
- FCAO Primary–Twin dynamic topology。
74. Benchmark Case A — Tiny task
期望:
若 FCAO 反而多開多個 Agent,失敗。
75. Case B — Independent branches
期望:
降低 makespan。
76. Case C — High coupling
期望:
或較小 fan-out。
77. Case D — Hidden defect
worker 局部看似完成,但 merge invariant 失敗。
期望:
78. Case E — Temporal breach
一個 child 超過 upper envelope。
期望:
或 REASSIGN。
79. Case F — Verification queue
worker 完成速度高於 verifier throughput。
期望 Twin 不繼續盲目 fan-out。
80. Case G — False closure
Primary candidate closure 漏掉 mandatory node。
期望 Twin:
81. Case H — Twin overhead
低風險 task 中 Twin 不應過度工作。
期望:
或 LIGHT mode。
82. Metrics
至少:
83. Success criterion
FCAO MVP 不以:
Agent 數量更多
為成功。
成功是:
- 能選擇不切;
- 能形成 named worker;
- 能保存 logical parent lineage;
- 能用 LCC 降低重算;
- Twin 能 selective audit;
- 能在 breach 後改 topology;
- closure 可被 challenge;
- event 可 replay;
- OpenHarness 可升級而 FCAO state 不破裂。
84. Failure criterion
若以下任一成立,需重新設計:
- plugin 無法穩定讀取 task lifecycle;
- task / Agent mapping 無法可靠建立;
- Twin 必須 full duplicate 才能工作;
- topology state 只能塞在 prompt;
- 每次 OpenHarness update 都破壞 FCAO;
- core patch 數快速增長;
- external state 與 runtime state 無法 reconcile。
85. Runtime reconciliation
定義:
若 runtime 有 task:
但 FCAO 無對應:
若 FCAO task running,但 runtime 不存在:
都要 event 化。
86. Orphan handling
OrphanExecution:
- adopt;
- stop;
- ignore;
依 policy。
不得 silent merge。
87. Lost execution
LostExecution:
再:
- restore;
- reassign;
- fail。
88. Snapshot restore
project restore:
- load FCAO snapshot;
- replay events;
- query OpenHarness tasks;
- reconcile;
- resume Primary / Twin;
- reopen stale tasks。
89. Context compaction
OpenHarness 有 pre/post compact hooks。
FCAO 可利用:
保存:
- current world state ref;
- topology version;
- active task refs;
- unresolved conflict。
避免 compaction 破壞 continuity。
90. Security
Project plugin / hook 是 executable extension。
因此 FCAO plugin 必須:
- source controlled;
- pinned;
- reviewed;
- no arbitrary credential logging;
- respect permissions;
- deny unauthorized world commit。
91. Twin authority
Twin 不應預設 shell admin。
其第一版 authority:
- read project state;
- inspect artifact;
- spawn verifier;
- propose reopen;
- propose repartition;
- challenge closure。
直接 destructive action 仍需 Primary / policy gate。
92. Arbiter authority
Temporary arbiter:
不得因仲裁獲得全 project 控制。
93. Protocol neutrality
即使 OpenHarness 日後被替換:
仍可保留。
只需替換:
這是避免 vendor lock-in 的核心。
94. OpenHarness-specific code boundary
所有 OpenHarness-specific implementation 限制在:
adapters/openharness/
核心:
fcao/core/
不得 import OpenHarness internal class。
理想 interface:
FCAOCore
→ ExecutionAdapter Protocol
→ OpenHarnessAdapter
95. Import policy
Core 層只能依賴 FCAO 自己的 protocols / schemas。
禁止:
from openharness.tasks import ...
出現在:
fcao/core/
只能出現在:
fcao/adapters/openharness/
96. Upstream update policy
每次 upgrade:
- update pinned ref;
- run carrier tests;
- run adapter contract tests;
- run FCAO benchmark smoke;
- compare behavior;
- promote version。
97. Compatibility manifest
保存:
fcao_version: 0.1
openharness:
tested_commit: ...
tested_version: ...
compatibility:
plugin: pass
hooks: pass
spawn: pass
task_notification: pass
mcp: pass
verifier: pass
98. Implementation directory
推薦:
fcao-openharness/
├── fcao/
│ ├── core/
│ │ ├── world.py
│ │ ├── topology.py
│ │ ├── temporal.py
│ │ ├── identity.py
│ │ ├── closure.py
│ │ └── events.py
│ ├── adapters/
│ │ ├── openharness/
│ │ ├── sedb/
│ │ └── ctcl_itr/
│ ├── schemas/
│ └── benchmark/
├── openharness-plugin/
│ ├── plugin.json
│ ├── agents/
│ ├── tools/
│ └── hooks.json
└── tests/
99. v0.1 Engineering Invariants
Invariant 1
Invariant 2
Invariant 3
Invariant 4
Invariant 5
作為工程政策,而非數學序關係。
Invariant 6
必須先於 native recursive spawn 成立。
Invariant 7
不得只存在自由文字 summary。
Invariant 8
不得只存在 Primary prompt。
Invariant 9
必須可以被 observed telemetry 修正。
Invariant 10
Invariant 11
Invariant 12
需要具體 blocker,不可因「未來可能改」而先 fork。
100. 結論
本次 source inspection 顯示,OpenHarness 已經提供 FCAO 最難重造、但理論上並非 FCAO 核心貢獻的一大批 infrastructure:
因此 FCAO 不需要重新寫一套完整 agent CLI / harness。
真正應該建立的是:
OpenHarness 只作:
v0.1 的 Fit-Gap 結論不是:
fork OpenHarness。
而是:
這個順序同時降低 maintenance cost 與 upstream divergence,也保留 FCAO protocol-agnostic 的本體地位。
最重要的是,FCAO 的 MVP 現在不再需要從 provider、terminal、tool calling、MCP、swarm、verification worker 開始。工程可以直接從真正有研究差異的地方開始:
因此本文件完成後,FCAO v0.1 已具備:
- 三篇理論文;
- 一份 protocol-agnostic Reference Architecture;
- 一份 OpenHarness Fit-Gap / Integration Whitepaper;
- machine-readable schemas;
- MVP phase plan;
- benchmark plan;
- fork decision policy。
下一個合理產物已不是新論文或新白皮書,而是:
也就是開始真正跑。
附錄 A:Fit-Gap Matrix
| FCAO Requirement | OpenHarness Primitive | v0.1 Decision |
|---|---|---|
| Primary execution | CoordinatorMode | Reuse + Extend |
| Persistent Twin | Verification / Agent runtime | Extend |
| Fresh verifier | verification agent | Reuse |
| Named ephemeral agent | AgentTool / agent name | Extend, optional Patch |
| Recursive lineage | parent_session / task metadata | Extend, Patch candidate |
| Task execution | TaskManager | Reuse |
| Task topology | none first-class | Extend |
| Verification topology | verifier + external graph | Extend |
| Temporal envelope | usage duration only | Extend |
| Dynamic repartition | spawn/stop/message primitives | Extend |
| LCC | no canonical LCC | Extend |
| Closure certificate | no canonical GCC | Extend |
| CTCL receipt | hooks + timestamps | Extend |
| SEDB canonical state | memory / external storage | Extend |
| MCP | MCP client/tools | Reuse |
| CLI/subprocess | swarm subprocess | Reuse |
| Worktree isolation | worktree | Reuse |
| Team grouping | TeamRegistry | Reuse + Extend |
| Lifecycle hooks | HookEvent | Reuse |
| Native recursive parent | hard-coded / limited lineage | Patch candidate |
| Full FCAO semantics | none | Extension layer |
| Fork | not required | No |
附錄 B:MVP Acceptance Checklist
- Pin OpenHarness snapshot.
- Build FCAO plugin shell.
- Create World ID.
- Register Primary.
- Register Persistent Twin.
- Spawn child with FCAO machine ID + ephemeral name.
- Preserve logical parent lineage.
- Maintain task graph outside prompt.
- Emit LCC.
- Ingest
subagent_stop. - Store duration/token/tool telemetry.
- Create Temporal Envelope.
- Demonstrate
NO_SPLIT. - Demonstrate
SPLIT. - Demonstrate Twin
IDLE. - Demonstrate Twin fresh verifier.
- Demonstrate
REOPEN. - Demonstrate
REPARTITION. - Emit topology version.
- Emit CTCL-style event receipt.
- Emit Global Closure Certificate.
- Reconcile runtime tasks after restart.
- Compare against three baselines.
附錄 C:Fork Decision Record Template
decision_id: fork-decision-001
fcao_version: 0.1
openharness_commit: "<sha>"
blockers:
- requirement: recursive_parent_lineage
extension_possible: false
upstream_patch_possible: true
- requirement: first_class_topology_callback
extension_possible: true
patch_queue_size: 1
upstream_merge_cost: low
fork_ownership_cost: high
decision: DO_NOT_FORK
reason:
- "Current blockers remain solvable through extension or generic upstream patch."
附錄 D:Compatibility Manifest Example
fcao_version: 0.1
openharness:
repository: HKUDS/OpenHarness
tested_commit: "<PINNED_SHA>"
compatibility:
plugin_loader: pass
hook_subagent_stop: pass
agent_spawn: pass
task_polling: pass
task_stop: pass
message: pass
verifier: pass
mcp: pass
worktree: pass
known_gaps:
- native_recursive_parent_lineage
- per_instance_ephemeral_name
End of canonical source.