← Archive
lm-003828 · 2026-09

Paper 05 — 架構推理的跨 AI 可重現性

下載 MD 檔 ⬇

Paper 05 — 架構推理的跨 AI 可重現性

Cross-Agent Reproducibility of Architecture Reasoning

系列: TDD × MSSP Architecture Backtrace and Fresh Reconstruction
系列代號: ABFR Series
文件版本: v0.1
日期: 2026-08-28
作者: Neo.K / EveMissLab


摘要

Paper 01–04 已建立 ABFR(Architecture Backtrace and Fresh Reconstruction)的三閉包方法:Behavioral Closure、Structural Reconstruction Closure 與 Discriminative Closure。然而,只要方法仍主要由單一作者、單一 Agent、單一 repository 或單一既有上下文執行,就不能判斷成功究竟來自方法本身,還是特定模型能力、隱性上下文、熟悉工作區、工具配置或一次性的推理偶然性。

本文提出 Cross-Agent Reproducibility of Architecture Reasoning(架構推理的跨 AI 可重現性) 作為 ABFR 從方法設計走向通用性驗證的核心框架。其目標不是要求不同 AI 產生相同 private reasoning、檔案閱讀順序、工具呼叫序列或完全相同的 Minimal Sufficient Reconstruction Set。對存在合法替代 backend、不同 traversal route 與 stochastic policy 的 Agent 而言,要求 trace identity 不但沒有必要,也會錯誤懲罰合法差異。本文真正要求的是:在相同 canonical inputs、scope、execution contract、fresh context 與受控工具邊界下,不同執行者是否能獨立得到可比較的結構結論、覆蓋必要 critical nodes、重建可接受的 architecture profile、重現必要 falsifying witnesses,並得到一致或可解釋差異的三閉包 verdict

本文將可重現性分為四層:intra-agent repeatability、cross-agent reproducibility、cross-model transportability、cross-project generalizability。並固定第一輪實驗條件:frozen repository revision、canonical ABFR specification、Inline Execution、禁止 sub-agent alternate path、相同工具與 authority contract、fresh session、predeclared replay equivalence、predeclared witness registry,以及所有 Additional Information Requests 的完整記錄。

本文定義 Critical Structural Coverage、Structural Jaccard、Relation Agreement、Divergence Detection、MSRS Equivalence-Class Agreement、Fresh Reconstruction Success、Witness Reproduction Rate、Three-Closure Verdict Agreement、Additional Information Request Rate、Human Intervention Count、成本與 run-to-run variance 等量測。其核心立場是:單一 Agent run 不足以支持方法論可重現性;同一 Agent 的 repeatability 與不同 Agent 的 reproducibility 必須分開測。

近期 repository-level Agent benchmark 已經暴露與本研究高度相關的問題。SWE-bench Verified 以人工驗證任務與 minimal execution setting 強化公平比較;Multi-Docker-Eval 指出 environment construction 仍是 Agent automation 的主要瓶頸之一;RepoReason 將 integration width 指認為 repository-level reasoning 的重要認知瓶頸;SWE-Mutation 顯示 LLM 生成 test suite 可能缺乏足夠 discriminative power;ReproEvalCard 則指出 LLM pipeline 評估若缺少 prompt、judge configuration、retrieval snapshot 與 intermediate traces,重現性會明顯受限。這些結果共同支持本文的實驗設計:不能只比較最終 pass rate,而必須控制 execution environment、保存可重播 evidence、執行多次獨立 rollout,並將方法輸出轉成可比較的結構狀態。

本文不宣稱 ABFR 已具跨 AI 可重現性,而將「其他 AI 是否也能獨立完成」轉換成可證偽問題,並作為後續 Spec B — Cross-AI ABFR Validation Protocol v0.1 的理論基礎。

關鍵詞: Cross-Agent Reproducibility;AI Coding Agent;ABFR;MSSP;Architecture Reasoning;Repository-Level Reasoning;Fresh Replay;Agent Evaluation;Structural Agreement


1. 從一次成功到方法成立

若某個 Agent AA 在 project PP 上成功執行 ABFR,只能得到:

A:ABFRSuccess(A,P)=1\exists A: \operatorname{ABFRSuccess}(A,P)=1

不能推出:

A,P:ABFRSuccess(A,P)=1\forall A,P: \operatorname{ABFRSuccess}(A,P)=1

更不能推出:

ABFR is a general methodology\text{ABFR is a general methodology}

因此本文研究的不是「ABFR 能不能被某個強 Agent 做到」,而是:

ABFR 是否能在移除原始 Agent 的條件下被重新執行\boxed{ \text{ABFR 是否能在移除原始 Agent 的條件下被重新執行} }

2. 核心研究問題

本文將基本問題寫成:

Same Method+Same Canonical Inputs+Fresh Executor?Comparable Structural Conclusions\boxed{ \text{Same Method} + \text{Same Canonical Inputs} + \text{Fresh Executor} \overset{?}{\Longrightarrow} \text{Comparable Structural Conclusions} }

右側刻意不是:

Identical Reasoning Trace\text{Identical Reasoning Trace}

而是:

Comparable Structural Conclusions\text{Comparable Structural Conclusions}

因為不同 Agent 可以合法採取不同路徑。


3. 可重現性不等於 Trace Identity

Paper 03 已定義一個 target QQ 可能存在多個合法 MSRS:

SA,SBMQS_A,S_B\in\mathfrak M_Q

且:

SASBS_A\neq S_B

但:

R(SA,Ef)Q,IR(SB,Ef)\mathcal R(S_A,E_f) \equiv_{Q,\mathcal I} \mathcal R(S_B,E_f)

因此 Agent 1 找到 SAS_A 、Agent 2 找到 SBS_B,兩者都可能正確。

所以:

ReproducibilityTrace Identity\boxed{ \text{Reproducibility} \neq \text{Trace Identity} }

本文採:

Reproducibility=Constraint-Compatible Outcome Agreement\boxed{ \text{Reproducibility} = \text{Constraint-Compatible Outcome Agreement} }

4. 四層可重現性

4.1 Intra-Agent Repeatability

同一模型、Agent shell、工具、repository 與 protocol,以 fresh session 重跑:

Ai(1),Ai(2),A_i^{(1)},A_i^{(2)},\ldots

是否能得到穩定核心結論?

它測:

run-to-run variance\text{run-to-run variance}

而不是跨模型差異。

4.2 Cross-Agent Reproducibility

不同 Agent system:

A1,A2,,AnA_1,A_2,\ldots,A_n

在相同 benchmark contract 下,是否能獨立重現 critical structure、fresh reconstruction、required witnesses 與 closure verdict?

4.3 Cross-Model Transportability

固定 Agent shell、工具與 protocol,只替換 underlying model:

M1,M2,,MnM_1,M_2,\ldots,M_n

測方法是否依賴單一模型家族。

4.4 Cross-Project Generalizability

即使不同 AI 都能在 MSSP project 成功,也可能只是與 MSSP taxonomy 高度耦合。

因此必須比較:

PMSSPP_{\mathrm{MSSP}}

與:

PnonMSSPP_{\mathrm{non-MSSP}}

若 non-MSSP project 只要具有 explicit architecture、relations、tests 與 fresh boundary 也能執行 ABFR,才開始支持:

ABFR-MSSPABFR-General\text{ABFR-MSSP} \subseteq \text{ABFR-General}

5. Repeatability 先於 Reproducibility

若同一 Agent 的:

Repeatability0\text{Repeatability}\approx 0

那麼跨 Agent 差異很難解釋。

因此:

Repeatability FirstCross-Agent Reproducibility\boxed{ \text{Repeatability First} \rightarrow \text{Cross-Agent Reproducibility} }

單次成功不能代表一個 Agent condition。

Agent 執行可能受到 sampling、planner branch、tool timing、search ordering、environment state、retry path、context compression 與服務狀態影響。

第一輪 pilot 建議:

npilot3n_{\text{pilot}}\geq 3

正式比較可從:

nformal5n_{\text{formal}}\geq 5

起步,再依觀察 variance 調整。這些是工程起點,不是統計學普遍定理。


6. Model Effect 與 Agent-System Effect

完整 Agent system 可以表示為:

Ai=(Mi,Fi,Ti,Pi)A_i= ( M_i, F_i, T_i, P_i )

其中:

  • MiM_i:model;
  • FiF_i:framework;
  • TiT_i:tool set;
  • PiP_i:policy / prompt / execution mode。

因此:

Model EffectAgent-System Effect\boxed{ \text{Model Effect} \neq \text{Agent-System Effect} }

若比較模型本身,應盡量固定:

F,T,PF,T,P

只改:

MM

若比較完整產品 Agent,則必須把 shell / framework 當成實驗變項,而不能把差異全部歸因於 model。


7. 第一輪固定 Inline Execution

本系列第一輪通用性驗證固定:

Execution Mode=Inline Execution\boxed{ \text{Execution Mode} = \text{Inline Execution} }

不提供:

  • sub-agent alternate path;
  • hidden worker;
  • automatic delegation;
  • secondary-model task splitting。

不是因為 multi-agent 不可行,而是要先降低 orchestration confound。

第一輪問題是:

Can one fresh executor follow ABFR end-to-end?\boxed{ \text{Can one fresh executor follow ABFR end-to-end?} }

8. Frozen Experimental Baseline

每次 experiment 都必須固定:

B=(repo,commit,tests,artifacts,toolchain)B = ( repo, commit, tests, artifacts, toolchain )

最低記錄:

repository
commit SHA
working tree status
language/runtime versions
dependency lock identity
test command
ABFR protocol version
task ID

若:

BiBjB_i\neq B_j

則兩個 run 不應直接比較。


9. Canonical Input Packet

所有 executor 得到相同:

IC={B,Q,R,Ad,I,F,Q,W,Π}I_C = \{ B, Q, R, A_d, \mathcal I, \mathcal F, \simeq_Q, W, \Pi \}

其中:

  • BB:baseline;
  • QQ:replay targets;
  • RR:behavioral requirements;
  • AdA_d:declared architecture;
  • I\mathcal I:architecture invariants;
  • F\mathcal F:Freshness Contract;
  • Q\simeq_Q:Replay Equivalence;
  • WW:witness registry;
  • Π\Pi:execution protocol。

但 benchmark oracle 不應全部提供給 executor。

因此:

IC=IexecutorIoracleI_C = I_{\text{executor}} \cup I_{\text{oracle}}

例如 injected hidden dependency、critical nodes 與 hidden divergence 放在:

IoracleI_{\text{oracle}}

避免把答案寫進提示詞。


10. Fresh Session

每個 run:

ri,jr_{i,j}

必須建立新的 execution context:

Cprior=0C_{\text{prior}}=0

至少在 protocol 可控制範圍內:

  • 不提供前一 run 對話;
  • 不提供其他 Agent 結果;
  • 不提供作者口頭補充;
  • 不沿用 hidden notes;
  • 不把上一 run 的 private reasoning 直接餵入。

允許重用 canonical artifacts 與經 Freshness Contract 明示的 materials。


11. Tool Capability 與 Authority Contract

工具能力:

Ti={t1,,tk}T_i = \{ t_1,\ldots,t_k \}

可能包括 file read、search、shell、tests、git、network、container、database、GUI。

第一輪應盡量固定 common denominator:

T=iTiT_{\cap} = \bigcap_iT_i

若某 Agent 缺必要工具,應標記 capability-limited,而不是直接算 reasoning failure。

同時:

CapabilityAuthority\text{Capability} \neq \text{Authority}

所以另固定:

read source: yes
modify worktree: yes
run tests: yes
network: protocol-defined
push git: no
deploy: no
access secrets: no

12. Human Interaction 與 AIR

primary experiment 原則:

No non-canonical answer injection\boxed{ \text{No non-canonical answer injection} }

若 Agent 詢問額外資訊,記錄:

AIRAIR

包括 Paper 03 的:

  • AIR-1 Canonical Navigation;
  • AIR-2 Missing Documentation;
  • AIR-3 Hidden Environment;
  • AIR-4 Hidden Decision;
  • AIR-5 Authority Request。

定義:

NAIR(r)N_{AIR}(r)

並記:

HI(r)H_I(r)

即非 canonical human interventions。

理想:

HI=0H_I=0

但 pilot 中 HI>0H_I>0 本身就是「哪些資訊尚未進 canonical method」的研究結果。


13. 輸出不能只有 Final Answer

每個 run 必須輸出:

Or=(Br,Sr,Mr,Fr,Rr,Dr,Wr,Vr,Cr)O_r = ( B_r, S_r, M_r, F_r, R_r, D_r, W_r, V_r, C_r )

其中:

  • BrB_r:backtrace result;
  • SrS_r:structural coverage;
  • MrM_r:MSRS candidate;
  • FrF_r:freshness evidence;
  • RrR_r:replay evidence;
  • DrD_r:declared / observed / effective divergence;
  • WrW_r:witness results;
  • VrV_r:three-closure verdict;
  • CrC_r:cost / interaction metrics。

不要求保存 private chain-of-thought。

需要保存的是:

Reproducible EvidencePrivate Chain-of-Thought\boxed{ \text{Reproducible Evidence} \neq \text{Private Chain-of-Thought} }

例如 inspected artifacts、tool calls、frontier transitions、structured claims、test results 與 evidence links。


14. Structural Agreement

Agent ii 得到 structural node set:

ViV_i

可計算 exploratory Jaccard:

JV(i,j)=ViVjViVjJ_V(i,j) = \frac{ |V_i\cap V_j| }{ |V_i\cup V_j| }

但 Jaccard 不能作為唯一成功標準。

若 benchmark 已知 critical set:

KK^*

則:

CSC(i)=ViKKCSC(i) = \frac{ |V_i\cap K^*| }{ |K^*| }

稱為 Critical Structural Coverage。

同理 relation set:

EiE_i

可以計算:

CRA(i)=EiEECRA(i) = \frac{ |E_i\cap E^*| }{ |E^*| }

其中 EE^* 是 critical relation ground truth。


15. Divergence Detection

Controlled benchmark 可注入:

D={d1,,dm}D^* = \{ d_1,\ldots,d_m \}

例如:

  • undeclared dependency;
  • false modularity;
  • authority leak;
  • stale evidence;
  • hidden runtime state。

Agent 回報:

D^i\hat D_i

則:

PrecisionD=D^iDD^iPrecision_D = \frac{ |\hat D_i\cap D^*| }{ |\hat D_i| } RecallD=D^iDDRecall_D = \frac{ |\hat D_i\cap D^*| }{ |D^*| }

這讓 ABFR 可以與 TDD-only 直接比較 architecture-defect detection。


16. MSRS Agreement

不能要求:

Mi=MjM_i=M_j

因為多個合法 MSRS 可能同時存在。

應定義 equivalence class:

[M]Q,I[M]_{Q,\mathcal I}

若:

MiQ,IMjM_i \sim_{Q,\mathcal I} M_j

即兩者都能 fresh reconstruct、replay equivalent 且保留 invariants,則:

AgreementMSRS(i,j)=1Agreement_{MSRS}(i,j)=1

即使 literal set 不同。

這是「不同路徑、相容結論」的核心例子。


17. Fresh Reconstruction 與 Replay Metrics

對 run:

FRS(r)={1,fresh reconstruction succeeds0,otherwiseFRS(r) = \begin{cases} 1,&\text{fresh reconstruction succeeds}\\ 0,&\text{otherwise} \end{cases}

但失敗仍需依 Paper 03 分類:

FR-01,,FR-07FR\text{-}01,\ldots,FR\text{-}07

對 replay targets qkq_k,每個 Agent 輸出:

vi,k{PASS,PARTIAL,FAIL,INCONCLUSIVE}v_{i,k} \in \{ PASS, PARTIAL, FAIL, INCONCLUSIVE \}

若不同 Agent 使用相同:

Q\simeq_Q

卻得到不同 verdict,必須追查 evidence、environment、observation 或 reasoning 差異。


18. Witness Reproduction

Paper 04 定義 falsifying witness registry:

WW^-

對 fresh Agent:

AiA_i

若能重現 witness ww 的 expected failure,記:

Repi(w)=1Rep_i(w)=1

定義:

WRRi=wWRepi(w)WWRR_i = \frac{ \sum_{w\in W^-}Rep_i(w) }{ |W^-| }

critical witness 可以要求:

WRR=1WRR=1

若 Agent 找到 registry 之外的新有效反例:

wneww_{\text{new}}

則記 Novel Witness Discovery,但它是額外研究指標,不是基本 PASS 要求。


19. Three-Closure Verdict Agreement

每個 Agent 輸出:

Vi=(CB,CS,CD)V_i = ( C_B, C_S, C_D )

與:

V3C{PASS,PARTIAL,FAIL,INCONCLUSIVE}V_{3C} \in \{ PASS, PARTIAL, FAIL, INCONCLUSIVE \}

可以報:

  • exact percent agreement;
  • pairwise agreement;
  • 適用時使用 Cohen's kappa、Fleiss' kappa 或 Krippendorff's alpha。

但:

Agreement⇏Correctness\boxed{ \text{Agreement} \not\Rightarrow \text{Correctness} }

如果所有 Agent 都犯同一錯誤,agreement 仍會很高。

所以 agreement 必須和 hidden oracle / injected ground truth 一起報。

20. Correctness 與 Reproducibility 必須分開

反過來:

Correctness⇏Reproducibility\text{Correctness} \not\Rightarrow \text{Reproducibility}

如果每個 Agent 最後都修好功能,但:

  • 有時漏 architecture divergence;
  • 有時靠作者補充;
  • 有時 fresh reconstruction 失敗;
  • 有時 witness 無法重現;

則 final correctness 不足以支持 method reproducibility。

因此每個 experiment 至少同時報:

Task Correctness\text{Task Correctness}

與:

Method Reproducibility\text{Method Reproducibility}

21. Disagreement Taxonomy

不同 Agent verdict 不同時,至少分類:

DG-01 Coverage Disagreement

某 Agent 沒看到 critical structure。

DG-02 Relation Interpretation

節點相同,但 dependency / authority relation 判斷不同。

DG-03 Effective-State Interpretation

對:

AeA_e

推導不同。

DG-04 Equivalence Interpretation

對相同 replay output 是否:

Q\simeq_Q

判斷不同。

DG-05 Evidence Weighting

看到相同 evidence,但可信度不同。

DG-06 Tool Observation

實際 tool run 產生不同結果。

DG-07 Environment Drift

benchmark environment 沒固定好。

DG-08 Protocol Violation

Agent 沒遵守 ABFR procedure。

DG-09 Benchmark Ambiguity

canonical instructions 本身不足。

DG-10 Legitimate Alternative Architecture

不同結論都位於允許的 architecture equivalence class。

這個 taxonomy 比只報「模型不一致」更有診斷價值。


22. Run-to-Run Variance

對 scalar metric mm

m1,,mnm_1,\ldots,m_n

計算:

mˉ=1nimi\bar m = \frac{1}{n} \sum_i m_i

與:

sm=i(mimˉ)2n1s_m = \sqrt{ \frac{ \sum_i(m_i-\bar m)^2 }{ n-1 } }

對 categorical verdict 則報 frequency、entropy 與 agreement。

如果同一 Agent 產生:

PASS,FAIL,PASS,INCONCLUSIVE,PASSPASS,FAIL,PASS,INCONCLUSIVE,PASS

只報平均 pass rate 仍不足以描述其穩定性。


23. Stability Profile

每個 Agent 可有:

SA=(Scoverage,Sreplay,Switness,Sverdict,Scost)S_A = ( S_{coverage}, S_{replay}, S_{witness}, S_{verdict}, S_{cost} )

這區分:

平均很好但非常不穩定

與:

每次都中等但高度穩定。

兩者在工程使用上是不同風險。


24. Cost Metrics

每個 run 記錄:

Cr=(Tr,Kr,Nr,Lr,Hr)C_r = ( T_r, K_r, N_r, L_r, H_r )

其中:

  • TrT_r:tokens / context usage;
  • KrK_r:tool calls;
  • NrN_r:files / structural nodes inspected;
  • LrL_r:wall-clock;
  • HrH_r:human interventions。

若平台不提供某項數值,應記:

UNKNOWNUNKNOWN

而不是推估假數字。

效率排序只能在相同 closure class 中比較:

Closure Correctness>Efficiency\boxed{ \text{Closure Correctness} > \text{Efficiency} }

25. 三級 Benchmark

Tier 1 — Synthetic / Controlled

刻意注入:

  • hidden dependency;
  • false modularity;
  • authority leak;
  • stale evidence;
  • wrong subject;
  • untracked fixture。

這一層的優勢是:

DD^*

與:

KK^*

有明確 ground truth。

Tier 2 — Small Real Repository

使用真實 project,但固定 commit、task、environment 與已知 architecture defect。

Tier 3 — Large Repository / Long-Horizon

測:

  • context traversal;
  • revisit;
  • environment reconstruction;
  • integration width;
  • multi-stage replay。

第一輪應先通過 Tier 1,再往大 repository 擴張。


26. Injected Defect 的要求

Injected defect 不應直接洩漏答案。

它應:

  1. 符合原專案 code style;
  2. 通過 baseline functional tests;
  3. 不在 task text 中直接命名;
  4. 能被 architecture backtrace 或 fresh reconstruction 揭露;
  5. 具有 deterministic 或可驗證 oracle。

理想 benchmark 正是:

TDD-only passes\text{TDD-only passes}

但:

ABFR should detect structural defect\text{ABFR should detect structural defect}

27. 三個主要 Method Conditions

第一輪至少比較:

G0=TDD-onlyG_0 = \text{TDD-only} G1=TDD + generic clean rerunG_1 = \text{TDD + generic clean rerun} G2=TDD + ABFRG_2 = \text{TDD + ABFR}

其中 G1G_1 非常重要,因為它回答:

ABFR 的收益是來自「重新跑一次」,還是來自 structured backtrace + MSRS + freshness + witness closure?

保持相同 Agent、repository、requirement、工具與 budget,再比較:

ΔRecallD\Delta Recall_D ΔFRS\Delta FRS ΔWRR\Delta WRR ΔHI\Delta H_I

與成本差。


28. MSSP 與 Non-MSSP Profile

再比較:

PM=MSSP-native projectP_M = \text{MSSP-native project}

與:

PN=non-MSSP projectP_N = \text{non-MSSP project}

ABFR method core 不變,只替換 architecture adapter。

定義:

Aadapter:AnativeAneutral\mathcal A_{adapter} : A_{\text{native}} \rightarrow A_{\text{neutral}}

neutral representation 至少包含:

{Entity,Relation,Responsibility,Authority,State,Evidence}\{ Entity, Relation, Responsibility, Authority, State, Evidence \}

若只有 MSSP project 成功,就應稱:

MSSP-specific methodology\text{MSSP-specific methodology}

而不是直接聲稱 general methodology。


29. Adapter 也可能失敗

如果 native architecture 有重要 relation,但 adapter 漏掉:

Anative↛AneutralA_{\text{native}} \not\rightarrow A_{\text{neutral}}

那麼 Agent backtrace 的漏失不能直接歸因於 model。

因此需要:

CoverageadapterCoverage_{adapter}

或 controlled adapter tests。

這把:

Agent Failure\text{Agent Failure}

與:

Representation Failure\text{Representation Failure}

分開。


30. Cross-Agent Matrix

實驗空間可以寫成:

E=A×P×M×R\mathcal E = A \times P \times M \times R

其中:

  • AA:Agent / model condition;
  • PP:project;
  • MM:method condition;
  • RR:repeated runs。

例如較完整設計:

3×3×2×5=903\times3\times2\times5 = 90

runs。

若第一輪資源有限,可先:

3×2×2×3=363\times2\times2\times3 = 36

runs。

這能初步回答:

  1. 同一 AI 自己穩不穩?
  2. ABFR 是否比 TDD-only 多抓架構缺陷?
  3. 不同 AI 是否能使用同一 protocol?
  4. MSSP / non-MSSP 是否皆有初步可行性?

31. Environment Reconstruction 是一級指標

Multi-Docker-Eval 的 2026 結果顯示,environment construction 本身仍是 software engineering Agent 的重要瓶頸。

對 ABFR 而言這不是前置雜務。

Fresh Reconstruction 本來就要求:

EfE_f

可以被建立。

因此:

Environment Reconstruction\boxed{ \text{Environment Reconstruction} }

直接屬於:

CFC_F

與:

CRC_R

不能把:

測試在原工作區能跑

當成:

architecture 可以 fresh reconstruct。


32. Repository-Level Integration Width

RepoReason 2026 的 repository-level white-box evaluation 指出 integration width 是重要認知瓶頸之一。

這與 Paper 02 的 Structural Attention 假說直接相鄰。

所以 experiment 應至少記錄 integration-width proxy:

  • critical files;
  • critical modules;
  • relation hops;
  • cross-layer dependencies。

再觀察:

PerformanceWIPerformance \sim W_I

是否隨 integration width 上升而下降。


33. Test Discriminative Power 不能由 Agent 自我宣告

SWE-Mutation 顯示 LLM 生成 test suite 可能表面完整但 discriminative power 仍不足。

因此不能讓 executor:

  1. 自己寫 test;
  2. 自己決定 test 足夠;
  3. 只用自己那套 test 宣告成功。

至少 critical witness 必須由 frozen registry、hidden mutation 或 independent evaluator 提供外部約束。

這正是 Paper 04 的:

CDC_D

在 cross-agent experiment 中的必要性。


34. Evaluation Artifact Reproducibility

ReproEvalCard 對 LLM pipeline 評估的核心提醒是:模型與 dataset 不足以重現 pipeline evaluation,還需要 prompt、judge configuration、retrieval snapshot 與 intermediate traces 等 artifact。

ABFR evaluation 同樣需要:

canonical protocol
repository revision
architecture snapshot
tool capability contract
authority contract
freshness evidence
replay target definitions
equivalence profile
witness registry
structured run trace
verdict

換言之:

A reproducibility methodology itself needs reproducible evaluation artifacts\boxed{ \text{A reproducibility methodology itself needs reproducible evaluation artifacts} }

35. Experiment Package

每個 experiment condition 建議輸出:

experiment/
  manifest.json
  canonical-input/
  oracle/
  runs/
    agent-A-run-01/
    agent-A-run-02/
    agent-B-run-01/
  evaluation/
  summary/

其中:

oracle\text{oracle}

在 executor 執行期間不可見。

每個 run manifest 至少有:

run_id
agent_id
model_id
agent_shell
protocol_version
repo_commit
method_condition
execution_mode
tool_contract
authority_contract
freshness_mode
start_time
end_time
final_verdict

36. Structural Trace

不要求 private reasoning,但需要可重播 trace event:

visited_node
relation_followed
evidence_read
claim_created
claim_resolved
claim_unresolved
frontier_added
frontier_closed
test_executed
reconstruction_step
witness_executed

這使我們比較的是:

architecture traversal\text{architecture traversal}

而不是自然語言思考內容。


37. Protocol Compliance 與 Method Uptake

若 Agent 最後修對功能,但跳過:

  • backtrace;
  • fresh reconstruction;
  • replay;
  • attack;

則:

Task Success=1\text{Task Success}=1

但:

ABFR Compliance=0\text{ABFR Compliance}=0

不能算 ABFR 成功。

因此定義:

PC(r)PC(r)

為 Protocol Compliance。

另定義:

MU(r)MU(r)

為 Method Uptake。

最低 Method Uptake 要有 actual backtrace、fresh reconstruction、replay、witness execution 與 evidence emission。

所以:

Vocabulary AdoptionMethod Adoption\boxed{ \text{Vocabulary Adoption} \neq \text{Method Adoption} }

38. Blindness Levels

Cross-AI experiment 可分:

B0 — Open

Agent 知道 defect 類型。

B1 — Method-Blind Defect

Agent 知道 ABFR,但不知道 injected defect。

B2 — Partial Blind

Agent 知道 project area,不知道 exact target node。

B3 — Fully Hidden Oracle

Agent 只收到正常 task,所有 defect truth 都由 evaluator 保留。

第一輪最合理的是:

B1B1

因為我們要測「知道方法後,能不能自己找到未透露的 architecture defect」。


39. Leakage 與 Contamination

Benchmark 必須檢查:

  • filenames;
  • comments;
  • issue text;
  • commit messages;
  • test names;
  • generated artifacts;

是否洩漏 oracle。

公共 GitHub repository 也可能存在 training contamination,因此第一輪最好混合:

  • newly generated controlled benchmark;
  • recent injected mutation;
  • public real repository。

最可靠的 hidden defect 應在 experiment 建立後注入。


40. Cross-Agent Independence

Primary experiment 要求:

OiContextj=O_i \cap Context_j = \varnothing

對:

iji\neq j

即 Agent B 不能看到 Agent A 的結果。

所有 independent runs 完成後,才可做 secondary:

Peer Review Phase\text{Peer Review Phase}

研究 evidence exchange 後的 convergence。

但:

Consensus⇏Truth\boxed{ \text{Consensus} \not\Rightarrow \text{Truth} }

仍需 external oracle。


41. 可接受與不可接受的差異

通常可接受:

  • 讀檔順序不同;
  • tool call order 不同;
  • equivalent MSRS;
  • 合法 backend 不同;
  • 額外但無害的 structural nodes;
  • 不同自然語言命名;
  • 不同效率。

通常不可接受:

  • 漏掉 critical hidden dependency;
  • authority verdict 相反;
  • 一方靠 hidden context 才能 fresh reconstruct;
  • critical falsifying witness 一方通過;
  • replay equivalence 被 post-hoc 放寬;
  • unresolved 被當作 PASS;
  • critical three-closure verdict 相反且無法解釋。

42. General-Method Success Criterion

通用方法不要求所有模型永遠成功。

比較合理的是:

P(G3C=1ABFR)P( G_{3C}=1 \mid ABFR )

相對於:

P(G3C=1control)P( G_{3C}=1 \mid control )

是否提高,以及:

P(critical defect detectedABFR)P( \text{critical defect detected} \mid ABFR )

是否提高。

通用方法論的意義是:

多種 executor 能使用、效益可被重複觀察、失敗邊界可以描述。

而不是:

每一個 AI 永遠成功。


43. Capability Threshold

如果某些 Agent 穩定成功,另一些總是失敗在 Backtrace Frontier Management,這可能表示存在:

θABFR\theta_{ABFR}

使:

Capability(A)θABFRCapability(A)\geq\theta_{ABFR}

時方法才實用。

這仍是有價值的結果。

ABFR 不需要對最弱模型也成立,才可以成為工程方法;但最低能力邊界必須被實驗描述。


44. Failure Anatomy

每個 run 的 stage vector:

Zr=(zB,zBT,zREC,zMS,zF,zR,zD)Z_r = ( z_B, z_{BT}, z_{REC}, z_{MS}, z_F, z_R, z_D )

其中每個:

zi{PASS,PARTIAL,FAIL,INCONCLUSIVE}z_i \in \{ PASS, PARTIAL, FAIL, INCONCLUSIVE \}

分別代表:

  • Behavioral;
  • Backtrace;
  • Reconciliation;
  • MSRS;
  • Freshness;
  • Replay;
  • Discrimination。

這比只發一個 leaderboard score 更重要。


45. Primary Endpoints

第一輪建議 primary endpoints:

  1. Critical Structural Coverage;
  2. Injected Divergence Recall;
  3. Fresh Reconstruction Success;
  4. Critical Witness Reproduction;
  5. Three-Closure Verdict Correctness;
  6. Human Intervention Count。

Secondary endpoints:

  • Structural Jaccard;
  • Relation Jaccard;
  • tool calls;
  • tokens;
  • wall time;
  • MSRS cost;
  • novel witness discovery。

46. 主要假說

H1 — Cross-Agent Feasibility

存在至少兩個不同 executor:

AiAjA_i\neq A_j

能在相同 canonical inputs 與 fresh condition 下獨立完成:

G3C=1G_{3C}=1

且不需:

HI>0H_I>0

H2 — Architecture Defect Detection

相對 TDD-only:

RecallDABFR>RecallDTDDRecall_D^{ABFR} > Recall_D^{TDD}

H3 — Fresh Reconstruction

相對 generic handoff:

FRSABFR>FRSgenericFRS^{ABFR} > FRS^{generic}

H4 — Structural Agreement Exceeds Trace Agreement

不同 Agent 的 tool trace overlap 可以很低,但:

CSCCSC

與:

CRACRA

仍高。

即:

Different PathsCompatible Structural Conclusions\boxed{ \text{Different Paths} \rightarrow \text{Compatible Structural Conclusions} }

H5 — Multiple Valid MSRS

對可替換架構:

MiMjM_i\neq M_j

但:

MiQ,IMjM_i \sim_{Q,\mathcal I} M_j

支持 Paper 03 的:

MQ>1|\mathfrak M_Q|>1

H6 — Witness Registry Improves Verdict Stability

提供:

W+,W,WW^+,W^-,W^{\equiv}

應比 vague architecture rules 提升 CDC_D 的跨 Agent一致性。

H7 — Freshness Reveals Hidden Context Dependence

若 control 使用 previous state 而 PASS,但 fresh run FAIL 且可分類為 FR leakage,表示 ABFR 成功揭露 hidden causal support。

H8 — Cross-Project Transport

MSSP 與 non-MSSP project 都能被多 Agent 執行,才支持 taxonomy independence。


47. Negative Result Criteria

下列都應視為重要負面證據:

  1. 多數 Agent 無法理解 protocol;
  2. backtrace 成本遠高於收益;
  3. ABFR 與 TDD-only defect recall 無差;
  4. fresh replay 大量失敗於 protocol 自身;
  5. non-MSSP adapter 無法穩定建立;
  6. MSRS 幾乎不可操作;
  7. witness 維護成本過高;
  8. Agent disagreement 無法由 evidence 解釋。

研究必須允許:

ABFR is not generally useful\boxed{ \text{ABFR is not generally useful} }

成為合法結論。


48. Success Levels

Level 0 — Anecdotal

單 Agent、單 project。

Level 1 — Repeatable

同 Agent 多次 fresh run。

Level 2 — Cross-Agent Reproducible

不同 Agent 成功。

Level 3 — Cross-Model Transportable

固定 shell 下不同模型成功。

Level 4 — Cross-Project Generalizable

MSSP / non-MSSP profile 均成功。

Level 5 — Comparative Benefit

相對 control 具有明顯工程與統計優勢。

只有 Level 4–5 才適合較強地稱:

general methodology\text{general methodology}

49. 第一輪建議流程

Phase A — Protocol Smoke Test

同一 Agent:

33

次 fresh run。

確認:

  • Spec B 沒歧義;
  • output schema 可用;
  • benchmark 可 reset;
  • oracle 沒洩漏。

Phase B — Cross-Agent Pilot

三個 AI 各:

33

次。

Phase C — Method Control

同一三個 AI 跑 TDD-only、generic clean rerun 與 ABFR。

Phase D — Non-MSSP Transfer

再加入至少一個 non-MSSP project。


50. Experiment Integrity Gate

在解讀 Agent 結果前,先驗:

GE=BFTFAFCFOHG_E = B_F \land T_F \land A_F \land C_F \land O_H

其中:

  • BFB_F:baseline frozen;
  • TFT_F:tool contract fixed;
  • AFA_F:authority fixed;
  • CFC_F:fresh context;
  • OHO_H:oracle hidden。

若:

GE=0G_E=0

該 run 不應進 primary comparison。


51. Protocol Violation

若 Agent:

  • 使用不允許的 sub-agent;
  • 讀 oracle;
  • 使用 previous run artifact;
  • 跳過 fresh reconstruction;
  • 修改 hidden test;
  • result 出來後才修改 equivalence;

則標:

PVPV

Protocol Violation。

final result 就算正確,也不能保留為 ABFR primary success。


52. Cross-Agent Reproducibility Criterion v0.1

對 project-task:

(P,Q)(P,Q)

若至少兩個獨立 executor:

Ai,AjA_i,A_j

在多次 fresh runs 中:

  1. protocol compliance 成立;
  2. critical structural coverage 達門檻;
  3. critical divergence 被識別;
  4. fresh reconstruction 成功;
  5. critical witnesses 正確重現;
  6. three-closure verdict 與 oracle 相容;
  7. 不依賴非 canonical human intervention;

則稱:

CAR(P,Q)=1\boxed{ CAR(P,Q)=1 }

其中:

CAR=Cross-Agent ReproducibilityCAR = \text{Cross-Agent Reproducibility}

CAR 不要求所有 AI 都成功。


53. Method Generalization Criterion

令 project family:

P={P1,,Pk}\mathcal P = \{ P_1,\ldots,P_k \}

若:

CAR(Pi,Qi)=1CAR(P_i,Q_i)=1

跨越至少兩種不同 architecture profile,且至少一種不是 MSSP-native,則可以標記:

Gmethod=SUPPORTEDG_{method} = \text{SUPPORTED}

而不是:

PROVEN\text{PROVEN}

有限 benchmark 永遠不等於 universal proof。


54. 為什麼現在不能先寫 Paper 06

Paper 06 預定為:

A Multi-Agent Empirical Evaluation of Architecture Backtrace and Fresh Reconstruction

目前還沒有 cross-agent dataset。

所以現在不應預先寫:

  • 成功率;
  • effect size;
  • p-value;
  • model ranking;
  • generality conclusion。

Paper 05 到此只建立 protocol-ready research design。


55. 對 Spec B 的直接要求

Spec B 至少固定:

EXPERIMENT_ID
RUN_ID
AGENT_ID
MODEL_ID
AGENT_SHELL
REPOSITORY
COMMIT
METHOD_CONDITION
EXECUTION_MODE=INLINE
FRESH_CONTEXT=true
TOOL_CONTRACT
AUTHORITY_CONTRACT
TARGETS
INVARIANTS
EQUIVALENCE_PROFILE
WITNESS_REGISTRY
OUTPUT_SCHEMA
STOP_CONDITIONS
PROTOCOL_VIOLATIONS

並明確:

SUBAGENT_PATH = NOT PROVIDED

停止條件至少包括:

  1. three-closure PASS;
  2. blocking FAIL;
  3. critical unresolved;
  4. environment impossible under contract;
  5. budget exhausted;
  6. protocol violation。

56. Evaluator

Evaluator 最好與 executor 分開。

優先序:

Executable / Deterministic Oracle>Frozen External Judge>LLM-Only Judge\boxed{ \text{Executable / Deterministic Oracle} > \text{Frozen External Judge} > \text{LLM-Only Judge} }

如果只能使用 LLM judge,至少固定:

  • judge model;
  • prompt;
  • temperature;
  • rubric;
  • judge count。

57. Method-Level Fresh Replay

整個系列最初來自一個意外:某個本地 Agent 在精確 TDD plan 後,自主提出在進入 Direct runtime / UI 前先做 MSSP fresh replay。

Paper 01–04 把這個一次性組合抽象化。

Paper 05 現在做最後一個必要動作:

Remove the original Agent from the experiment\boxed{ \text{Remove the original Agent from the experiment} }

如果換掉原始 Agent,方法仍能被另一個 fresh executor 重建,才開始說明:

被發現的不是某一個 Agent 的個人技巧,而是一個可轉移的方法。

這形成一個遞迴:

ABFR 對 software system 問:

Can architecture reconstruct the system?\text{Can architecture reconstruct the system?}

Paper 05 對 ABFR 自己問:

Can specification reconstruct the method in another AI?\boxed{ \text{Can specification reconstruct the method in another AI?} }

如果:

ABFR Spec+Fresh AIComparable ABFR Execution\text{ABFR Spec} + \text{Fresh AI} \rightarrow \text{Comparable ABFR Execution}

那麼 ABFR 自己也通過了一種:

Method-Level Fresh Replay\text{Method-Level Fresh Replay}

這不是循環論證,因為 benchmark 與 oracle 仍由外部固定。


58. 不宣稱事項

本文明確不宣稱:

  1. 不同 AI 必須具有相同 reasoning trace。
  2. 高 structural Jaccard 等於正確。
  3. 高 agreement 等於 truth。
  4. 同一模型一次成功代表 repeatability。
  5. 三次 run 足以建立正式統計結論。
  6. agent shell 差異可以忽略。
  7. environment setup 只是測試雜務。
  8. 工具能力不同也可直接公平比較。
  9. public repository 完全沒有 training contamination。
  10. non-MSSP 成功一次就證明 architecture independence。
  11. cross-agent success 等於 universal applicability。
  12. LLM judge 可以無條件取代 deterministic oracle。
  13. sub-agent architecture 永遠不好。
  14. Inline Execution 是最終最佳 architecture。
  15. ABFR 已被證明比 TDD-only 更好。
  16. ABFR 已被證明具 cross-agent reproducibility。

59. 結論

一個方法由某個強 AI 成功執行,只能證明:

A:Success(A)=1\exists A: Success(A)=1

不能證明方法具有通用性。

因此 ABFR 必須接受方法層的 fresh replay:

Method Specification+Fresh Independent AIComparable Structural Execution\boxed{ \text{Method Specification} + \text{Fresh Independent AI} \rightarrow \text{Comparable Structural Execution} }

本文將這個問題拆成:

Repeatability\text{Repeatability} Cross-Agent Reproducibility\text{Cross-Agent Reproducibility} Cross-Model Transportability\text{Cross-Model Transportability} Cross-Project Generalizability\text{Cross-Project Generalizability}

真正應比較的不是私人 reasoning trace,而是:

Critical Structure+Divergence+Fresh Reconstruction+Witnesses+Three-Closure Verdict\boxed{ \text{Critical Structure} + \text{Divergence} + \text{Fresh Reconstruction} + \text{Witnesses} + \text{Three-Closure Verdict} }

健康的 cross-agent result 可以是:

Different Traversal Paths\text{Different Traversal Paths}

但:

Compatible Architecture Conclusions\text{Compatible Architecture Conclusions}

本文提出:

CAR(P,Q)CAR(P,Q)

作為 Cross-Agent Reproducibility 的第一版操作定義,並建立 frozen baseline、canonical input、fresh context、fixed tools、fixed authority、Inline Execution、hidden oracle、repeated runs、TDD-only control、generic-rerun control、non-MSSP transfer 與 structured evidence output 的完整框架。

這使 ABFR Series 第一次真正具備「可以交給其他 AI 做盲測」的條件。

如果另一個 AI 無法由規格重建這個方法,我們就還沒有通用方法論。

如果不同 Agent、不同模型與不同 architecture profile 都能在 fresh condition 下反覆得到相容的三閉包結果,ABFR 才開始有資格從一次非常有價值的方法組合,轉變成:

a reproducible AI-assisted software engineering methodology\boxed{ \text{a reproducible AI-assisted software engineering methodology} }

參考文獻

[1] SWE-bench. (2025–2026). SWE-bench Verified. Human-validated subset of 500 SWE-bench instances and standardized evaluation settings.

[2] Fu, K., Liu, T., Shang, Z., Ma, Y., Liu, J., Yang, J., & Bian, K. (2026). Multi-Docker-Eval: A “Shovel of the Gold Rush” Benchmark on Automatic Environment Building for Software Engineering. Findings of ACL 2026. DOI: 10.18653/v1/2026.findings-acl.889.

[3] Li, J., Su, Y., & Lyu, M. R. (2026). From Laboratory to Real-World Applications: Benchmarking Agentic Code Reasoning at the Repository Level. Proceedings of ACL 2026, 8845–8869. DOI: 10.18653/v1/2026.acl-long.399.

[4] Sun, Y., Zhao, Y., Wang, Y., Du, Y., Ma, Z., Wang, J., Zhang, M., Zhang, K., & Huang, Z. (2026). SWE-Mutation: Can LLMs Generate Reliable Test Suites in Software Engineering? Findings of ACL 2026, 39651–39674. DOI: 10.18653/v1/2026.findings-acl.1976.

[5] Pattnayak, P., & Bhatia, A. (2026). ReproEvalCard: A Reporting Standard for Reproducible Evaluation of LLM Pipelines. Proceedings of ACL 2026, Short Papers.

[6] Hans, A., & Bilionis, I. (2026). Coding-agents can replicate scientific machine learning papers. arXiv:2607.02134.

[7] Jha, S., Paltenghi, M., Maddila, C., Murali, V., Ugare, S., & Chandra, S. (2026). ProdCodeBench: A Production-Derived Benchmark for Evaluating AI Coding Agents. arXiv:2604.01527.

[8] Jiang, J., Zheng, S., Vidra, N., & Setty, S. (2026). Beyond Pass@k: Measuring Reliability and Security of Agentic Code Generation. arXiv:2608.14711.

[9] Neo.K / EveMissLab. (2026). MSSP Field Manual 01–06 and Development Area. thisoneisneok.com/mssp.

[10] Neo.K / EveMissLab. (2026). ABFR Series Papers 01–04.


Canonical status

本文為 ABFR Series Paper 05 v0.1

目前狀態:

  • Cross-agent reproducibility question: defined.
  • Repeatability / reproducibility / transportability / generalizability distinction: defined.
  • Inline Execution control: fixed for first-round validation.
  • Sub-agent alternate path: explicitly not provided.
  • Canonical input packet: defined.
  • Fresh-session policy: defined.
  • Tool / authority contract: defined.
  • Structured run output: defined.
  • Structural coverage metrics: defined.
  • Divergence detection metrics: defined.
  • MSRS equivalence-class agreement: defined.
  • Fresh reconstruction metric: defined.
  • Witness reproduction metric: defined.
  • Three-closure verdict comparison: defined.
  • AIR / human intervention metrics: defined.
  • TDD-only and generic-rerun controls: defined.
  • MSSP / non-MSSP transfer design: defined.
  • Cross-AI empirical results: pending.
  • Statistical superiority claim: not made.
  • General methodology claim: not yet established.

下一正式產出應為 Spec A — ABFR Methodology v0.1,接著 Spec B — Cross-AI ABFR Validation Protocol v0.1。Spec B 完成後即可開始第一輪 fresh cross-AI pilot。