← Archive
lm-002743 · 2026-08

單一狀態、多重投影

下載 MD 檔 ⬇

title: "單一狀態、多重投影:人類、AI、試算表與 Runtime 的執行同一性" title_en: "One State, Multiple Projections: Executable Identity Across Human, AI, Spreadsheet, and Runtime Views" series: "矩陣原生智能與可稽核計算系列" series_en: "Matrix-Native Intelligence and Auditable Computation Series" series_id: "EML-MNIAC-2026" paper_id: "EML-MNIAC-2026-07" version: "v0.1" date: "2026-08-17" language: "zh-Hant" document_type: "系列第07篇/Executable Identity/多重投影與受控回寫統一論文" status: "Public Draft" author: "Neo.K(許筌崴)/EveMissLab" depends_on: - "EML-MNIAC-2026-06 AI Matrix Ledger Format:從試算表格式到可追溯計算結構 v0.1" internal_artifacts: - "MLF 1.0" - "MLF Compiler 1.0.0" - "MMLC Runtime 1.0" - "PHOSPHOR-SHEET v1.0–v1.2" - "PHOSPHOR-SHEET 本地 Agent 接手與續作指南" - "PHOSPHOR-SHEET 驗證摘要" - "PHOSPHOR-SHEET v1.2 sample round-trip workbook" canonical_keywords: - Executable Identity - Single Source of Truth - Multi-Projection State - PHOSPHOR-SHEET - MLF - MMLC Runtime - Governed Write-back - Command Intent - Round-trip Control - Projection Drift - Authority Boundary - Event Replay - View Update

單一狀態、多重投影

人類、AI、試算表與 Runtime 的執行同一性

One State, Multiple Projections:
Executable Identity Across Human, AI, Spreadsheet, and Runtime Views


摘要

本文是《矩陣原生智能與可稽核計算》系列第 07 篇,正式提出並整理 Executable Identity(執行同一性):當同一計算系統同時具有 Human UI、AI event stream、Spreadsheet workbook、graph/tensor projection 與 deterministic runtime 時,如何避免每個介面逐漸形成一套自己的「真實狀態」?

本文整合三條先前獨立發展的工程主線:

  1. MLF 1.0:保存 canonical structure、identity、formula AST、dependency、route、provenance、projection 與 conversion loss;
  2. MMLC Runtime 1.0:提供 deterministic execution、local/global audit、semantic hash、execution hash 與 replay;
  3. PHOSPHOR-SHEET v1.0–v1.2:把 PHOSPHOR 同一 VM state 正式投影為 Human、AI、Spreadsheet 三種介面,並在 v1.1–v1.2 加入受治理的 XLSX command-intent round trip。

PHOSPHOR-SHEET 的核心規則非常明確:

執行狀態只有一份。
人類介面、AI 事件流與試算表只是同一狀態的不同投影。

因此其架構不是:

SH,SA,SXS_H,\quad S_A,\quad S_X

三套互相同步的 state machine,而是:

SΦHH,SΦAA,SΦXX.\boxed{ S \xrightarrow{\Phi_H} H, \qquad S \xrightarrow{\Phi_A} A, \qquad S \xrightarrow{\Phi_X} X. }

其中 SS 是權威執行狀態, H,A,XH,A,X 是不同用途的 projection。

然而 Spreadsheet 與一般唯讀 view 不同:09_Control 可以攜帶 command intent 回到 Runtime。本文因此進一步區分:

Projection Read Path\boxed{ \text{Projection Read Path} }

與:

Governed Write-back Path.\boxed{ \text{Governed Write-back Path}. }

試算表中的修改不能直接變成:

XS.X'\Rightarrow S'.

而必須經:

XIntentValidationApprovalExplicitCapabilityRuntimeTransitionAuditEventS.\boxed{ X' \rightarrow Intent \rightarrow Validation \rightarrow Approval \rightarrow ExplicitCapability \rightarrow RuntimeTransition \rightarrow AuditEvent \rightarrow S'. }

此架構與 Event Sourcing / CQRS / Materialized View 中「權威事件/寫入模型 + 可重建投影」具有明顯近鄰,也與 bidirectional-transformation / lens 文獻中的 view-update problem 相交;但 PHOSPHOR-SHEET 並不是任意雙向同步 lens。它刻意採用窄化、白名單、權限化的 command intent:只有合法命令經驗證與授權後,才可透過 explicit Host handler 改變 VM。

本文進一步區分 Representational CanonicalityExecutable Canonicality。MLF 的 canonical structure 是交換與表示契約中的規範核心;Runtime 的 canonical state 則是「現在真正執行到哪裡」的權威狀態。兩者可以互相投影與綁定,但不可混為同一概念。

本文最後提出一組 Executable Identity 條件:stable run/session identity、projection source binding、runtime/version binding、deterministic replay 或宣告式 nondeterminism、terminal idempotency、write authorization、event uniqueness、stale-view rejection、round-trip auditability 與 divergence detection。其目的不是創造「唯一真相」的形上學,而是為多介面 AI 系統建立一個可驗證的工程判定:

 不同介面可以看見不同東西, 但不能在未宣告的情況下各自擁有一套執行真實。 \boxed{ \textbf{ 不同介面可以看見不同東西, 但不能在未宣告的情況下各自擁有一套執行真實。 } }

1. 問題:多介面為什麼會產生多重真實?

假設一個系統同時具有:

  • React UI;
  • AI JSONL stream;
  • Excel workbook;
  • CLI;
  • WebSocket;
  • database;
  • runtime snapshot。

最簡單的實作方式往往是:

每個介面都保存自己需要的一份 state。

於是形成:

SH,SA,SX,SCLI.S_H, \quad S_A, \quad S_X, \quad S_{CLI}.

接著再努力同步它們。

表面上這很方便。

但一旦同步延遲、版本不同、寫入競爭或 parser 不一致,就會出現:

SHSASX.\boxed{ S_H \neq S_A \neq S_X. }

2. Dual-Truth Problem

本文將此稱為:

Dual-Truth / Multi-Truth Problem.\boxed{ \text{Dual-Truth / Multi-Truth Problem}. }

其最低形式為:

存在兩個介面:

V1,V2V_1, V_2

都被系統當成 authoritative state,

但:

State(V1)State(V2).State(V_1)\neq State(V_2).

此時系統必須回答:

到底哪一個是真的?

如果答案是:

「看情況。」

那麼其實缺少明示 authority model。


3. PHOSPHOR-SHEET 的核心回答

PHOSPHOR-SHEET 不建立:

Excel VM

而是:

                         ┌─ ΦHuman → React UI
VM Core + CTS + Events ──┼─ ΦAI    → phosphor-jsonl-v1
                         └─ ΦSheet → WorkbookModel / XLSX / validated control

因此:

!Sexec\boxed{ \exists! S_{exec} }

在 declared runtime scope 內只有一個 executable authority。


4. 單一狀態不等於只允許一種表示

單一執行狀態不要求:

H=A=X.H=A=X.

Human UI 可以顯示:

  • 圖;
  • register;
  • timeline。

AI stream 可以使用:

  • JSONL;
  • event vocabulary;
  • machine-readable fields。

Spreadsheet 可以顯示:

  • tick ledger;
  • registers;
  • memory changes;
  • anomalies;
  • CTS;
  • control rows。

所以:

Representational DiversityState Multiplicity.\boxed{ \text{Representational Diversity} \neq \text{State Multiplicity}. }

5. Representational Canonicality 與 Executable Canonicality

這裡需要修正一個容易混淆的「canonical」用法。

5.1 Representational Canonicality

MLF 中:

F\mathcal F

是格式 scope 內完整結構的 canonical representation。

它負責:

  • identity;
  • dependency;
  • formula;
  • route;
  • provenance;
  • loss;
  • projections。

5.2 Executable Canonicality

Runtime 中:

StS_t

是時間 tt 真正有效的 executable state。

它負責:

  • PC / instruction;
  • registers;
  • memory;
  • tick;
  • runtime mode;
  • current event sequence;
  • accepted state transitions。

5.3 二者不是同一個 canonical

因此:

CanonicalreprCanonicalexec.\boxed{ Canonical_{repr} \neq Canonical_{exec}. }

MLF package 可以完整描述一個 state snapshot,

但:

一份很完整的 MLF 文件仍然不會因為「格式完整」就自動成為正在運作 VM 的控制權來源。


6. Canonical Structure 可以描述 Executable State

若:

E:StFtE: S_t \rightarrow \mathcal F_t

是一個 export / encoding,

則:

Ft\mathcal F_t

可以保存:

  • snapshot;
  • identity;
  • event references;
  • dependencies;
  • provenance。

但權威更新仍應是:

StδSt+1.S_t \xrightarrow{\delta} S_{t+1}.

而不是:

Ftarbitrary editSt+1.\mathcal F_t \xrightarrow{\text{arbitrary edit}} S_{t+1}.

7. Projection 模型

定義:

Φi:SVi.\Phi_i: S \rightarrow V_i.

例如:

Ht=ΦH(St),H_t = \Phi_H(S_t), At=ΦA(St),A_t = \Phi_A(S_t), Xt=ΦX(St).X_t = \Phi_X(S_t).

這些 projection 可以是 lossy。

因此每個:

ViV_i

不必包含:

StS_t

全部資訊。


8. Projection Fidelity

對介面 ViV_i 的任務查詢集合:

Qi,\mathcal Q_i,

定義:

PresQi(Φi)=1Pres_{\mathcal Q_i}(\Phi_i)=1

若:

qQi,\forall q\in\mathcal Q_i,

介面答案與 canonical state 在相應 query translation 下保持一致。

這比要求:

Vi=SV_i=S

實用。


9. 投影可以過期

若:

Vi(t)=Φi(St),V_i(t) = \Phi_i(S_t),

但 canonical state 已變成:

St+k,S_{t+k},

則舊 view:

Vi(t)V_i(t)

是 stale projection。

因此必須保存:

ProjectionVersion+SourceIdentity+SourceRevision.\boxed{ ProjectionVersion + SourceIdentity + SourceRevision. }

否則使用者可能拿舊 workbook 去控制新 VM。


10. Stale Projection Hazard

PHOSPHOR-SHEET 已明確把以下風險列為後續安全項目:

  • 舊 workbook 控制新 session;
  • program 切換後 target/session identity 漂移;
  • workbook / command provenance;
  • session ID 與 workbook target 綁定;
  • nonce / expiry / replay protection。

這表示:

View freshness\boxed{ \text{View freshness} }

本身就是 authority 的一部分。


11. Executable Identity 的最低定義

本文定義 executable identity token:

EID(St)=(run,session,target,program,runtimeVersion,revision,eventSeq,semanticDigest).\boxed{ \operatorname{EID}(S_t) = ( run, session, target, program, runtimeVersion, revision, eventSeq, semanticDigest ). }

具體系統可以省略或增加欄位。

其目的是回答:

這個 projection 到底是在描述哪一次執行?


12. 為什麼只用 VM ID 不夠?

同一:

vm_idvm\_id

可能:

  • reset;
  • reload;
  • 換 program;
  • 換 runtime version;
  • 重開 session。

所以:

vm_idvm\_id

只是 identity 的一部分。

需要:

Identity+Revision / Session.\boxed{ \text{Identity} + \text{Revision / Session}. }

13. MMLC Runtime 的 Semantic Hash 與 Execution Hash

MMLC 可分:

HsemH_{sem}

與:

Hexec.H_{exec}.

semantic hash 可綁:

  • ledger semantics;
  • branch structure;
  • layout-relevant semantics;
  • audit policy。

execution hash 再綁:

  • semantic hash;
  • actual outputs。

因此:

SemanticIdentityExecutionIdentity.\boxed{ SemanticIdentity \neq ExecutionIdentity. }

14. 為什麼 Execution Hash 有用?

兩次執行可能:

Hsem(1)=Hsem(2)H_{sem}^{(1)} = H_{sem}^{(2)}

但若 nondeterminism、runtime bug 或外部 input 造成:

Hexec(1)Hexec(2),H_{exec}^{(1)} \neq H_{exec}^{(2)},

就不能說:

「語義一樣,所以執行也一樣。」

反過來也可能偶然:

Output1=Output2Output_1=Output_2

但 semantic structure 已不同。

所以兩種 hash 應分離。


15. Deterministic Replay

對 deterministic runtime,給定:

S0,S_0,

相同:

  • source;
  • operator lock;
  • traversal;
  • seed;
  • runtime version;
  • command/event sequence;

應得到:

ST(1)ST(2)\boxed{ S_T^{(1)} \equiv S_T^{(2)} }

在宣告的 equivalence 下。

MMLC Runtime 已提供:

validate_file()validate\_file()

與:

execute_file(deterministic=True)execute\_file(deterministic=True)

並回傳:

  • global audit;
  • semantic hash;
  • execution hash。

16. Replay 不是 Snapshot Copy

Replay:

E1,E2,,EnSnE_1,E_2,\ldots,E_n \rightarrow S_n

是重新執行 transition。

Snapshot copy:

SnSnS_n \rightarrow S_n'

只是複製 state。

因此:

ReplayStateCopy.\boxed{ Replay \neq State Copy. }

17. Event Sourcing 的外部近鄰

Event Sourcing 的經典工程模式使用:

AppendOnlyEventStore\boxed{ AppendOnlyEventStore }

作 system of record,

並由 events replay 產生 current state。

Materialized views 則是從權威事件源建立的 query-optimized projections。

這和:

SH,A,XS \rightarrow H,A,X

有直接結構近鄰。


18. 但 PHOSPHOR 並非純 Event-Sourced VM

本文不把 PHOSPHOR 偷換成:

純 event-sourcing architecture。

PHOSPHOR 的 canonical snapshot 仍由:

VM state
↓
buildHeadlessSnapshot()

產生,

同時使用:

phosphor-jsonl-v1

作唯一 event envelope。

所以更精確是:

Canonical Runtime State+Append-Only Event Stream+Multiple Projections.\boxed{ \text{Canonical Runtime State} + \text{Append-Only Event Stream} + \text{Multiple Projections}. }

19. Materialized View 的重要教訓

外部 Materialized View pattern 有一條很有價值的原則:

view 是可重建的 read projection,不應被應用直接當作 authoritative source 更新。

PHOSPHOR-SHEET 對 readonly sheets 幾乎遵循同樣思想:

Workbook state sheets can be regenerated from runtime state.\boxed{ \text{Workbook state sheets can be regenerated from runtime state}. }

20. 但 09_Control 是特殊例外

09_Control 不是:

StateView.StateView.

而是:

CommandIntentView.\boxed{ CommandIntentView. }

它允許人類在 Excel 中新增:

  • DRAFT;
  • QUEUED;
  • APPROVED;

command rows。

因此:

XLSX\boxed{ XLSX }

同時包含:

  1. derived state projection;
  2. untrusted input surface。

這兩種角色必須拆開。


21. State Projection 與 Intent Surface

將 workbook 分:

X=(Xstate,Xintent).X = (X_{state},X_{intent}).

其中:

Xstate=ΦX(S)X_{state} = \Phi_X(S)

是 runtime projection。

而:

XintentX_{intent}

是人類/外部工具提出的操作意圖。

所以:

Xintent⊄S\boxed{ X_{intent} \not\subset S }

在被接受前,它不是 canonical state 的一部分。


22. 為什麼不能直接做雙向同步?

最直覺的做法:

get:SX,get: S\rightarrow X, put:XS.put: X\rightarrow S.

但 workbook 可被任意修改。

如果:

putput

對所有 cell edit 都有效,

那麼:

  • 一格 typo;
  • formula;
  • malicious cell;
  • stale workbook;
  • old session;

都可能直接改 VM。

所以:

GeneralViewWriteback\boxed{ GeneralViewWriteback }

風險過高。


23. Bidirectional Lens 的近鄰

Bidirectional transformation / lens 文獻處理:

get:SVget:S\rightarrow V

與:

put:S×VSput:S\times V\rightarrow S

之間的 view-update problem。

一個修改過的 view:

VV'

可以和原 source:

SS

共同決定更新後:

S.S'.

這提供很好的形式對照。


24. PHOSPHOR-SHEET 不是一般 Lens

PHOSPHOR-SHEET 不允許:

ΔX,put(S,X+ΔX).\forall \Delta X, \quad put(S,X+\Delta X).

它只接受:

ΔX\Delta X

中極窄的一部分:

ΔXcontrol\boxed{ \Delta X_{control} }

再把它解析成:

Intent.Intent.

所以更接近:

Governed Command Lens\boxed{ \text{Governed Command Lens} }

而不是 general bidirectional data synchronization。


25. Governed Write-back

定義:

ΨX:XI\Psi_X: X' \rightarrow I

抽取 command intents。

接著:

V:(I,S){valid,invalid}.V: (I,S) \rightarrow \{valid,invalid\}.

授權:

A:(I,S,Policy){allow,deny,review}.A: (I,S,Policy) \rightarrow \{allow,deny,review\}.

Host capability:

K:IHandler.K: I \rightarrow Handler.

最後:

S=δ(S,K(I))\boxed{ S' = \delta(S,K(I)) }

只在所有 gate 通過後發生。


26. 完整回寫路徑

因此:

XParseIntentValidationApprovalCapabilityRuntimeEventSΦX(S).\boxed{ X' \rightarrow Parse \rightarrow Intent \rightarrow Validation \rightarrow Approval \rightarrow Capability \rightarrow Runtime \rightarrow Event \rightarrow S' \rightarrow \Phi_X(S'). }

這是一個完整 round trip。


27. Authority 不在 Workbook

PHOSPHOR-SHEET 明確要求:

工作簿本身不能取得 ambient authority。

因此:

Authority\boxed{ Authority }

存在於:

  • Runtime;
  • Policy;
  • Explicit Handler Injection。

不是:

  • cell address;
  • formula;
  • Approved 字串本身。

28. Approved 不是裝飾欄

UI 不得:

看到 Approved=True 就直接執行 raw row。

它仍需:

  • command allowlist;
  • target allowlist;
  • parameter validation;
  • handler existence;
  • session binding;
  • terminal state check。

所以:

ApprovalCapability.\boxed{ Approval \neq Capability. }

29. Capability 也不是 Authority 全部

即使 handler 存在:

K(I)K(I)

也不代表:

II

被批准。

因此:

IntentValidationApprovalCapabilityExecution.\boxed{ Intent \neq Validation \neq Approval \neq Capability \neq Execution. }

這五層不應壓成一個 if


30. DRAFT 必須 Inert

PHOSPHOR control state:

DRAFT      → inert
QUEUED     → processable
APPROVED   → processable
EXECUTED   → terminal
REJECTED   → terminal
FAILED     → terminal

所以:

DRAFT⇏Execution.\boxed{ DRAFT \not\Rightarrow Execution. }

這是 write-back safety 的第一條最低律。


31. Mutation 額外需要 Approval

Mutation command:

  • vm:run
  • vm:pause
  • vm:step
  • vm:reset
  • vm:call

還要求:

Approved=TRUE.\boxed{ Approved=TRUE. }

因此 read-like inspect 與 state mutation 的 authority 不同。


32. Command Allowlist

目前正式 command set 包含:

vm:inspect
vm:run
vm:pause
vm:step
vm:reset
vm:call
stream:replay
sheet:export

這使:

Workbook command language is finite and declared.\boxed{ \text{Workbook command language is finite and declared}. }

不是任意 shell。


33. 禁止 eval() 是架構問題,不只是資安風格

若:

WorkbookCelleval()RuntimeWorkbookCell \rightarrow eval() \rightarrow Runtime

則 projection 直接取得:

AmbientAuthority.AmbientAuthority.

這會摧毀:

ExecutableCanonicality.\boxed{ ExecutableCanonicality. }

因為 workbook 開始成為第二個 runtime semantics source。


34. 終止狀態必須冪等

對:

EXECUTED,REJECTED,FAILEDEXECUTED, REJECTED, FAILED

再次 import:

δ(S,c)=S\boxed{ \delta(S,c)=S }

在 command execution 意義上必須成立。

也就是:

TerminalIdempotency.\boxed{ TerminalIdempotency. }

35. Duplicate Command ID

若相同:

command_idcommand\_id

再次出現,

必須拒絕。

否則:

WorkbookReplay\boxed{ WorkbookReplay }

可能變成:

CommandReplayAttack/AccidentalDuplicateExecution.\boxed{ CommandReplayAttack / AccidentalDuplicateExecution. }

36. v1.2 Round-trip 實驗

PHOSPHOR-SHEET v1.2 的最小 round trip:

  1. 建立 VM session;
  2. export XLSX;
  3. 在 Excel / LibreOffice 修改 09_Control
  4. 加入:
    • DRAFT vm:inspect
    • QUEUED vm:inspect
    • approved APPROVED vm:step
  5. 儲存;
  6. import browser;
  7. execute ready commands;
  8. 驗證:
    • DRAFT 保持 DRAFT;
    • QUEUED inspect → EXECUTED;
    • APPROVED step → EXECUTED;
    • Result JSON 回寫;
    • audit events 回 event stream;
  9. re-export;
  10. re-import;
  11. terminal commands 不重跑。

這其實已經是一個:

Governed Bidirectional Round Trip.\boxed{ \text{Governed Bidirectional Round Trip}. }

37. Round-trip Law 1 — Read Consistency

對 projection:

Xt=ΦX(St),X_t=\Phi_X(S_t),

應滿足 declared query domain:

ObserveX(Xt)ObserveS(St).\boxed{ Observe_X(X_t) \equiv Observe_S(S_t). }

不是 byte-identical,

而是 projection contract 內 semantic consistency。


38. Round-trip Law 2 — Inert Draft

若:

Intent.status=DRAFT,Intent.status=DRAFT,

則:

St+1=St\boxed{ S_{t+1}=S_t }

除了可能產生非執行性 UI state 之外,

不得造成 VM mutation。


39. Round-trip Law 3 — Authorized Mutation

只有:

Valid(I)Approved(I)Capability(I)Valid(I) \land Approved(I) \land Capability(I)

才能:

StSt+1.S_t\rightarrow S_{t+1}.

所以:

MutationValidationAuthorizationCapability.\boxed{ Mutation \Rightarrow Validation\land Authorization\land Capability. }

40. Round-trip Law 4 — Audit Completeness

任何 command outcome:

executed,rejected,failedexecuted, rejected, failed

必須對應:

phosphor-jsonl-v1phosphor\text{-}jsonl\text{-}v1

event。

因此:

StateTransitionAuditEvent.\boxed{ StateTransition \Rightarrow AuditEvent. }

41. Round-trip Law 5 — Terminal Idempotency

若:

c.status{EXECUTED,REJECTED,FAILED},c.status\in \{EXECUTED,REJECTED,FAILED\},

則再次 import / process:

ExecuteAgain(c)=false.\boxed{ ExecuteAgain(c)=false. }

42. Round-trip Law 6 — Projection Rebuildability

對 state sheets:

XstateX_{state}

應能由:

S+EventsS+Events

重新產生。

因此:

WorkbookStateView\boxed{ WorkbookStateView }

不應成為不可替代唯一資料庫。


43. Round-trip Law 7 — Source Binding

接受 command 前,

需能判定它屬於:

EID(St).\operatorname{EID}(S_t).

若 workbook source:

EIDXEID_X

和 runtime:

EIDSEID_S

不一致,

則:

Reject/Review.\boxed{ Reject / Review. }

44. Round-trip Law 8 — Version Binding

如果 workbook protocol、runtime API、event envelope 或 snapshot shape 已 changed,

舊 workbook 不能被默認相容。

必須:

  • migrate;
  • reject;
  • explicit backward compatibility。

因此:

VersionMismatch⇏ImplicitAcceptance.\boxed{ VersionMismatch \not\Rightarrow ImplicitAcceptance. }

45. Round-trip Law 9 — No Ambient Authority

Workbook 不得直接:

  • shell;
  • eval;
  • OS path;
  • arbitrary VM method。

所有 authority 必須來自:

ExplicitInjectedCapability.\boxed{ ExplicitInjectedCapability. }

46. Round-trip Law 10 — Projection Divergence Must Surface

如果:

ΦX(St)\Phi_X(S_t)

和 imported workbook:

XX'

在非-control canonical sheets 出現不允許差異,

系統應:

DetectConflict\boxed{ DetectConflict }

而不是靜默以 workbook 覆蓋 runtime。


47. 十張 Canonical Workbook Sheets

PHOSPHOR-SHEET v1.2 使用:

00_Manifest
01_Tick_Ledger
02_Registers
03_Memory_Changes
04_Event_Stream
05_Semantic_Dictionary
06_Anomalies
07_Intent_Actual
08_CTS
09_Control

其中前九張主要是:

State/EvidenceProjection.\boxed{ State / Evidence Projection. }

而:

09_Control09\_Control

是:

UntrustedIntent+ExecutionLedger.\boxed{ Untrusted Intent + Execution Ledger. }

這種角色分離很重要。


48. Canonical Workbook 不等於 Canonical Runtime

「canonical sheets」只表示:

PHOSPHOR-SHEET protocol 規定的標準 workbook shape。

它不表示:

Workbook=RuntimeAuthority.\boxed{ Workbook=RuntimeAuthority. }

所以必須區分:

CanonicalWorkbookSchemaCanonicalWorkbookSchema

與:

CanonicalExecutableState.CanonicalExecutableState.

49. v1.0 → v1.2 的能力演進

v1.0 — Read-only Projection

  • WorkbookModel;
  • Snapshot / Event / CTS;
  • 9 standard sheets;
  • CSV / SpreadsheetML;
  • React SHEET tab;
  • 27 checks。

v1.1 — Real XLSX + Governed Control

  • real ZIP / OOXML XLSX;
  • 09_Control
  • command allowlist;
  • approval;
  • Host handler;
  • Node reader;
  • control audit events;
  • total 51 checks。

v1.2 — Interactive Round-trip Control

  • browser XLSX reader;
  • Excel-modify/reimport;
  • DRAFT / QUEUED / APPROVED governance;
  • parameter ranges;
  • Host target allowlist;
  • actual VM command execution;
  • total 61 checks。

50. 驗證摘要

現有摘要記錄:

v1.0:27v1.0: 27

checks passed;

v1.1:29+22=51v1.1: 29+22=51

checks passed;

v1.2:29+32=61v1.2: 29+32=61

checks passed。

v1.2 另外記錄:

  • browser-safe strict TypeScript PASS;
  • React JSX parse PASS;
  • stored / deflated XLSX browser import PASS;
  • patch apply / final tree identity PASS;
  • formula errors = 0。

但隔離建置環境沒有重新執行完整 upstream npm install 與 Vite production build。

因此:

Verified ScopeUniversal Build Claim.\boxed{ \text{Verified Scope} \neq \text{Universal Build Claim}. }

51. MLF 在這裡扮演什麼角色?

MLF 提供:

How to preserve structure across projections.\boxed{ \text{How to preserve structure across projections}. }

PHOSPHOR-SHEET 提供:

How one concrete runtime exposes three projections.\boxed{ \text{How one concrete runtime exposes three projections}. }

MMLC Runtime 提供:

How deterministic execution / audit / replay can be independently checked.\boxed{ \text{How deterministic execution / audit / replay can be independently checked}. }

三者不是重複。


52. 三層統一架構

因此可寫:

Representation LayerExecution LayerProjection / Control Layer.\boxed{ \text{Representation Layer} \rightarrow \text{Execution Layer} \rightarrow \text{Projection / Control Layer}. }

具體:

MLFMMLC RuntimePHOSPHOR-SHEET.\boxed{ MLF \leftrightarrow MMLC\ Runtime \leftrightarrow PHOSPHOR\text{-}SHEET. }

但不是說目前三個 repo 已直接共用同一 runtime package。

這是理論與架構對齊,不應冒充已完成程式碼整合。


53. 一個更一般的 Executable Identity Model

定義系統:

E=(S,Δ,E,Φ,Ψ,P,K,I),\mathfrak E = ( S, \Delta, E, \Phi, \Psi, P, K, I ),

其中:

  • SS:canonical executable state;
  • Δ\Delta:合法 transition;
  • EE:append-only events / audit;
  • Φ\Phi:outbound projections;
  • Ψ\Psi:inbound intent extractors;
  • PP:validation / policy;
  • KK:explicit capabilities;
  • II:identity / version / session bindings。

54. Outbound Projection

Φ={ΦH,ΦA,ΦX,}.\Phi = \{ \Phi_H, \Phi_A, \Phi_X, \ldots \}.

每個:

Φi\Phi_i

只能讀取其合法 visibility domain。

因此:

Projection\boxed{ Projection }

本身也可以有 permission boundary。


55. Inbound Intent

ΨX:XIntentSet.\Psi_X: X \rightarrow IntentSet.

重要的是:

ΨX\Psi_X

不應解釋整份 workbook 的所有改動。

它只抽取:

DeclaredControlSurface.\boxed{ DeclaredControlSurface. }

例如:

09_Control.09\_Control.

56. Policy

對 intent:

i,i,

policy:

P(i,S,I)P(i,S,I)

檢查:

  • status;
  • args;
  • target;
  • approval;
  • session;
  • duplication;
  • version;
  • handler;
  • range。

57. Capability

合法 intent 最後映射:

K(i)K(i)

至:

NarrowHostHandler.\boxed{ NarrowHostHandler. }

這是一種 capability-based boundary。

Workbook 不知道:

Host 裡還有哪些能力。

它只知道:

這個 command name 是否有合法 handler。


58. Transition

最後:

St+1=Δ(St,K(i)).S_{t+1} = \Delta( S_t, K(i) ).

並產生:

et+1.e_{t+1}.

所以:

WriteBack=ValidatedTransition,\boxed{ WriteBack = ValidatedTransition, }

不是:

StateOverwrite.\boxed{ StateOverwrite. }

59. Conflict 有哪些類型?

本文將 projection conflict 分成至少六類。

C1 — Stale View

projection revision < runtime revision。

C2 — Wrong Session

workbook 綁定舊 session。

C3 — Structural Drift

canonical sheets 被任意修改。

C4 — Command Conflict

同一 command ID 重複或 terminal command 重播。

C5 — Version Conflict

sheet protocol / event protocol / runtime API 不相容。

C6 — Authority Conflict

workbook 企圖呼叫未注入 capability。


60. Conflict 不應全部自動 Merge

某些 conflict 可以:

  • re-project;
  • migrate;
  • ignore presentation changes。

但:

  • stale mutation;
  • unknown target;
  • duplicate command;
  • ambiguous state write;

不應自動 merge。

因此:

Conflict⇏AutoMerge.\boxed{ Conflict \not\Rightarrow AutoMerge. }

61. 目前還沒有完成的多人同步問題

PHOSPHOR-SHEET v1.2 是:

single-workbook governed round trip\boxed{ \text{single-workbook governed round trip} }

的主要證據。

它還沒有自動解決:

  • 多人同時編輯;
  • 多 workbook concurrent writes;
  • offline branch merge;
  • RBAC quorum approval;
  • distributed conflict-free merge。

所以本文不把:

MultiWriterConsistency\boxed{ MultiWriterConsistency }

宣稱為已完成。


62. 未來多寫入需要更強版本/併發協定

若未來存在:

X1,X2X_1', X_2'

同時基於:

StS_t

提出 mutation,

Runtime 必須處理:

OptimisticVersionCheck\boxed{ OptimisticVersionCheck }

或其他 concurrency policy。

外部 Event Sourcing / CQRS 也同樣強調 version、event ordering 與 optimistic concurrency。

這是 Executable Identity 未來自然延伸。


63. Materialized View 與 PHOSPHOR Projection 的差異

Materialized View 通常:

ReadOnly.\boxed{ ReadOnly. }

PHOSPHOR-SHEET:

StateSheets=ReadProjection,ControlSheet=IntentSurface.\boxed{ StateSheets=ReadProjection, \quad ControlSheet=IntentSurface. }

所以不能籠統說:

整個 workbook 是 materialized view。

更精確是 mixed projection artifact。


64. View Update Problem 與 PHOSPHOR 的差異

經典 lens:

get:SV,get:S\rightarrow V, put:S×VS.put:S\times V\rightarrow S.

PHOSPHOR:

get:SX,get:S\rightarrow X,

但回程是:

putcontrol:S×Intent(X)S.\boxed{ put_{control}: S\times Intent(X) \rightarrow S'. }

不是:

putallcells.put_{allcells}.

這種 asymmetry 是刻意安全設計。


65. Executable Identity 的判定條件

本文提出最低判定:

若多 projection system 在 declared scope 中滿足:

  1. canonical executable state 唯一;
  2. projection 可綁定 source identity;
  3. runtime transition 只有一條權威路徑;
  4. mutation 必須經 validation / authorization;
  5. event / audit sequence 可追蹤;
  6. terminal operation 冪等;
  7. stale / wrong-session projection 可拒絕;
  8. version migration 明示;
  9. deterministic domain 可 replay;
  10. projection divergence 可檢測;

則稱系統具有:

Executable Identity.\boxed{ \text{Executable Identity}. }

66. Executable Identity 不要求 Byte Identity

Human UI:

HH

和 workbook:

XX

當然不會 byte-identical。

所以:

ByteIdentity\boxed{ ByteIdentity }

不是判定條件。

真正要求:

AuthorityIdentity+SourceBinding+TransitionConsistency.\boxed{ AuthorityIdentity + SourceBinding + TransitionConsistency. }

67. Executable Identity 也不要求所有 Projection 同步即時

某些 projection 可以 eventual-consistent。

例如 UI 或 report lag。

只要:

  • revision 明示;
  • stale state 不被冒充 fresh;
  • write-back 有 revision gate;

就仍可以保持 executable identity。

所以:

InstantConsistency\boxed{ InstantConsistency }

不是必要條件。


68. 但「不知道自己過期」是失敗

如果:

XtX_t

已 stale,

卻沒有任何:

revision,session,source_hashrevision, session, source\_hash

可以辨認,

那麼 workbook 可能被錯誤提升為 current control source。

這是:

IdentityFailure.\boxed{ IdentityFailure. }

69. 一個理想的 Workbook Binding

未來可以在 00_Manifest 保存:

sheet_proto: phosphor-sheet-v1
vm_id: ...
session_id: ...
program_id: ...
runtime_version: ...
snapshot_revision: ...
event_seq: ...
source_semantic_hash: ...
source_execution_hash: ...
issued_at: ...
expires_at: ...
nonce: ...

這裡部分欄位屬於本文建議,並非 v1.2 全部已實作。


70. 一個理想的 Command Binding

每個 command:

command_id: ...
workbook_revision: ...
target_session: ...
command: vm:step
args: ...
requested_by: ...
approved: true
approval_identity: ...
status: APPROVED
nonce: ...

執行後追加:

result: ...
execution_event: ...
new_revision: ...

同樣,這是基於現有架構的後續形式化建議。


71. 為什麼 Hash 仍不等於 Authority?

即使:

Hash(X)=expected,Hash(X)=expected,

也只能證明:

workbook bytes 沒變。

不能證明:

workbook 有權修改 VM。

因此:

IntegrityAuthorization.\boxed{ Integrity \neq Authorization. }

這和 MLF、MMR-Bench 的結論一致。


72. 為什麼 Signature 仍不等於 Valid Command?

簽章可證明:

某 identity 簽過這個 command。

但如果 command:

  • target 錯;
  • args 超界;
  • runtime version 不相容;

仍必須拒絕。

所以:

SignatureSemanticValidity.\boxed{ Signature \neq SemanticValidity. }

73. Human / AI / Sheet 三種介面的對稱與不對稱

在 read side:

ΦH,ΦA,ΦX\Phi_H, \Phi_A, \Phi_X

大致對稱:

都只是:

SS

的 projection。

但在 write side:

它們的權限可以完全不同。

例如:

  • Human UI 可以按 Pause;
  • AI 只能 propose;
  • Sheet mutation 需要 Approval;
  • Headless observer 只能 read。

所以:

ReadProjectionSymmetry⇏WriteAuthoritySymmetry.\boxed{ ReadProjectionSymmetry \not\Rightarrow WriteAuthoritySymmetry. }

74. AI View 也不能自動成為 Authority

如果 AI event stream 看到:

St,S_t,

並產生:

proposal,proposal,

它也應走:

ProposalPolicyCapabilityTransition.\boxed{ Proposal \rightarrow Policy \rightarrow Capability \rightarrow Transition. }

所以 Executable Identity 不是只為 Excel 設計。

它適用所有外部 Agent interface。


75. 這和 MLF prediction/decision/promotion 完全對齊

MLF:

predictiondecisionpromotion.prediction \neq decision \neq promotion.

PHOSPHOR:

intentapprovalexecution.intent \neq approval \neq execution.

兩者其實具有共同治理骨架:

Proposed State ChangeAuthorized State Change.\boxed{ \text{Proposed State Change} \neq \text{Authorized State Change}. }

76. MMLC 的 Audit 又補上第三條腿

MMLC:

ExecutionAuditHash.Execution \rightarrow Audit \rightarrow Hash.

所以三者可以形成:

MLF:Preserve\boxed{ MLF: \text{Preserve} } PHOSPHOR:Govern\boxed{ PHOSPHOR: \text{Govern} } MMLC:Execute / Audit / Replay.\boxed{ MMLC: \text{Execute / Audit / Replay}. }

這是本系列目前最乾淨的三分。


77. 但目前還不是一個單一產品

本文必須保持工程誠實。

現在的:

  • matrix-ledger-format
  • mmlc-runtime
  • eml-phosphor;

是不同工程節點。

本文建立的是:

Unified Architecture / Research Interface.\boxed{ \text{Unified Architecture / Research Interface}. }

不是宣稱:

三個 repo 現在已共用同一 codebase。


78. 可證偽條件

F1 — Projection Drift Undetected

如果:

XX

與:

SS

已經不一致,

系統仍無法識別 stale / conflict,

Executable Identity 失敗。


F2 — Workbook Becomes Second VM

如果 Spreadsheet layer 自己重新實作:

  • memory;
  • PC;
  • instruction semantics;

並能和 VM Core 分叉,

則:

SingleStatePrinciple\boxed{ SingleStatePrinciple }

失敗。


F3 — Direct Cell Mutation

如果使用者改:

02_Registers!R0

就能直接改 canonical VM register,

而沒有 command / policy / event,

則:

ProjectionBoundary\boxed{ ProjectionBoundary }

失敗。


F4 — Terminal Replay

如果:

EXECUTEDEXECUTED

command re-import 後再次執行,

則 idempotency 失敗。


F5 — Wrong Session Accepted

如果舊 workbook 能修改新 session,

則 source binding 失敗。


F6 — Audit Missing

如果 state 已變:

StSt+1,S_t\rightarrow S_{t+1},

但 event stream 沒有對應 control event,

則 audit completeness 失敗。


F7 — Capability Escalation

如果 workbook 可以指定未 allowlist 的 Host method,

則 capability boundary 失敗。


F8 — Replay Inconsistency

對 deterministic MMLC-like domain,

相同 source / lock / traversal / runtime version 不能重現 execution hash,

則 executable replay claim 失敗。


79. Executable Identity 不是「單一真理哲學」

本文最後要刻意避免:

Single Source of TruthMetaphysical Monism.\boxed{ \text{Single Source of Truth} \rightarrow \text{Metaphysical Monism}. }

我們只是在一個明確 runtime scope 中規定:

哪個 state transition source 具有執行 authority。

這是工程治理。

不是宇宙本體論。


80. 最終核心命題

本文最終將 Executable Identity 濃縮為:

Sexec,Vi=Φi(Sexec),ΔVi⇏ΔSexec,ΔSexec only through declared validated transition.\boxed{ \begin{aligned} &\exists S_{exec},\\ &V_i=\Phi_i(S_{exec}),\\ &\Delta V_i\not\Rightarrow\Delta S_{exec},\\ &\Delta S_{exec} \text{ only through declared validated transition}. \end{aligned} }

也就是:

 看見狀態的介面可以很多, 改變狀態的合法路徑必須是明示且可稽核的。 \boxed{ \textbf{ 看見狀態的介面可以很多, 改變狀態的合法路徑必須是明示且可稽核的。 } }

81. 從「Excel 當 AI」走到這裡

最早的直覺是:

AI 模型能不能放在表格裡?

後來:

試算表能不能跑計算?

再後來:

矩陣能不能保存方向、依賴與稽核?

到 MLF:

同一完整結構能不能產生不同 projection?

到本文:

不同 projection 能不能共同操作同一 runtime,而不產生多套真實?

所以整條研究線真正走到了:

RepresentationExecutionGoverned Multi-Interface State.\boxed{ \text{Representation} \rightarrow \text{Execution} \rightarrow \text{Governed Multi-Interface State}. }

82. 下一篇

EML-MNIAC-2026-08

《矩陣原生智能:從多方向路由到 MMR-IFN 稀疏注意力》

下一篇將重新回到「模型 architecture」主線,處理:

  • MMR route semantics;
  • IFN hierarchical address;
  • active slice;
  • graph compilation;
  • edge-list sparse attention;
  • dense vs sparse;
  • complexity;
  • routing quality;
  • CPU benchmark boundary;
  • language-model quality 尚未證明;
  • matrix-native intelligence 的真正最強/最弱主張。

參考資料

內部規格與工程

  1. EveMissLab, PHOSPHOR-SHEET 本地 Agent 接手與續作指南, 2026-07-14.
  2. EveMissLab, PHOSPHOR-SHEET 版本路線圖.
  3. EveMissLab, PHOSPHOR-SHEET 驗證摘要.
  4. EveMissLab, PHOSPHOR-SHEET v1.2 sample / round-trip workbooks.
  5. Repository: kakon77777-commits/eml-phosphor.
  6. EveMissLab, MLF 1.0 / MLF Compiler 1.0.0.
  7. Repository: kakon77777-commits/matrix-ledger-format.
  8. EveMissLab, MMLC Runtime 1.0 / MMLF 1.0.
  9. Repository: kakon77777-commits/mmlc-runtime.
  10. EML-MNIAC-2026-06, 《AI Matrix Ledger Format:從試算表格式到可追溯計算結構》.

外部技術近鄰

  1. Microsoft Azure Architecture Center, Event Sourcing pattern.
    https://learn.microsoft.com/en-us/azure/architecture/patterns/event-sourcing

  2. Microsoft Azure Architecture Center, CQRS pattern.
    https://learn.microsoft.com/en-us/azure/architecture/patterns/cqrs

  3. Microsoft Azure Architecture Center, Materialized View pattern.
    https://learn.microsoft.com/en-us/azure/architecture/patterns/materialized-view

  4. J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, Alan Schmitt, Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View Update Problem, POPL 2005 / TOPLAS 2007.
    https://www.cs.cornell.edu/~jnfoster/papers/lenses.pdf

Event Sourcing / CQRS 提供「權威事件/寫模型與可重建讀模型」的成熟外部近鄰;Materialized View 強調 view 可由 source 重建且不應成為隨意直接更新的權威來源;bidirectional lenses 則形式化 source/view 的 get-put 關係。PHOSPHOR-SHEET 與這些思想有結構共鳴,但其回寫範圍更窄:它不是同步任意 workbook state,而是只把 09_Control 的已宣告 command intent 經 validation、approval 與 explicit Host capability 轉換成 Runtime transition。


系列狀態: 第 07 篇完成。
下一篇: EML-MNIAC-2026-08 —《矩陣原生智能:從多方向路由到 MMR-IFN 稀疏注意力》