APSC Runtime Technical Architecture v0.1
Adaptive Possibility-Space Cognition Runtime — Canonical Engineering Architecture, Contracts, Control Loop, and MVP Roadmap
文件類型:技術白皮書 01 / 02
系列:Adaptive Possibility-Space Cognition(APSC)
版本:v0.1
日期:2026-08-24
作者:Neo.K
機構:EveMissLab / EVEMISS Technology
0. 文件定位
本文件是 APSC 六篇理論論文的第一份統一工程母文件。
它不新增平行母理論,而是把下列理論物件轉成可執行 Runtime:
- Constrained Possibility Space;
- Multi-Scale Future Expansion;
- Counterfactual Observation Expansion(COE);
- Finite Cognitive Spacetime;
- Adaptive Computation Control;
- Cognitive Operating Profile(COP);
- Replayable Cognitive Evidence。
本文件的直接工程目標是:
1. 一句話架構
APSC Runtime 的第一版可以收斂為:
其核心控制流為:
2. 核心工程不變量
2.1 Neural Core 不是 Runtime State
神經模型只是一個:
它可以提出:
- 候選狀態;
- 候選分支;
- 候選觀察;
- 候選策略;
- 候選抽象;
- 候選驗證方式。
但不能直接改寫 canonical state。
因此:
2.2 Observation 不等於 Truth
任何外部觀察都先形成:
不得直接等於:
因此:
2.3 Candidate 不等於 Active Branch
候選分支進入 Runtime 後,必須通過約束與資源檢查。
2.4 Decision 不等於 Commit
控制器提出決策後,仍可能因:
- verifier;
- budget;
- safety;
- user preference;
- deadline;
- rule;
被拒絕或延後。
因此:
2.5 Profile Label 不等於 Canonical Policy
UI 顯示:
Fast
Accurate
Research
Safe
Explore
只是 preset。
Runtime 必須保存:
所以:
3. Runtime 分層
第一版分成九層:
L0 External / Neural Adapters
L1 Observation & Input Normalization
L2 Canonical State Kernel
L3 Possibility Graph & Constraint Engine
L4 Cognitive Operator Runtime
L5 COE / Active Observation Engine
L6 Adaptive Computation Controller
L7 Cognitive Operating Profile Manager
L8 Receipt / Replay / Audit Layer
4. L0:External / Neural Adapters
4.1 Neural Adapter
每個模型供應商只需實作統一介面:
propose_state()
propose_branches()
propose_observations()
propose_abstraction()
propose_action()
Runtime 不依賴某一特定模型。
4.2 Tool Adapter
外部工具統一為:
observe()
verify()
simulate()
execute()
每個工具必須宣告:
- input schema;
- output schema;
- cost estimate;
- latency class;
- side-effect class;
- retry policy;
- trust / reliability metadata。
5. L1:Observation & Input Normalization
5.1 ObservationRecord
第一版 canonical object:
{
"observation_id": "obs://...",
"source": "sensor|tool|user|model|world",
"timestamp": "...",
"payload": {},
"reliability": 0.0,
"cost": {},
"side_effect": "none|possible|confirmed",
"provenance": {}
}
5.2 Observation Status
觀察狀態:
RAW
NORMALIZED
SUPPORTED
CONTRADICTED
UNRESOLVED
SUPERSEDED
6. L2:Canonical State Kernel
6.1 StateObject
核心狀態:
工程表示可拆為:
StateSnapshot
EntityState
RuleState
CausalState
ObservationState
BudgetState
6.2 Unknown 必須顯式表示
欄位不可用:
null
隨意混合:
- unknown;
- unavailable;
- not applicable;
- not observed。
應使用:
KNOWN
UNKNOWN
UNCERTAIN
NOT_APPLICABLE
UNAVAILABLE
6.3 State Versioning
每次 canonical mutation:
必須產生:
state_version
parent_state_version
mutation_receipt
7. L3:Possibility Graph
7.1 PossibilityNode
每個可能節點至少包含:
{
"node_id": "poss://...",
"parent_ids": [],
"state_ref": "state://...",
"horizon": 0,
"resolution": "near|mid|far",
"probability": null,
"risk": null,
"decision_value": null,
"reachability": "supported|contradicted|undetermined",
"status": "candidate|active|dormant|pruned|merged|committed"
}
7.2 PossibilityEdge
邊表示:
ACTION
EVENT
OBSERVATION_UPDATE
COUNTERFACTUAL_INTERVENTION
ABSTRACTION
REFINEMENT
MERGE
7.3 Graph 不要求樹
當兩條路徑進入等價狀態:
可以執行:
所以 Runtime 使用 DAG / general graph,而不是固定 tree。
8. Constraint Engine
8.1 Rule Classes
HARD
SOFT
PROBABILISTIC
UNKNOWN
8.2 ConstraintResult
{
"constraint_id": "rule://...",
"target": "poss://...",
"status": "pass|fail|undetermined",
"severity": "hard|soft",
"reason_code": "...",
"evidence_refs": []
}
8.3 Constraint Projection
候選空間:
經過:
得到:
工程流程:
candidate
→ hard-rule check
→ causal compatibility
→ reachability
→ risk annotation
→ budget relevance
→ active / dormant / prune
9. Reachability Engine
第一版不要求通用規劃器。
只提供統一 contract:
check_reachability(state, target, horizon, budget)
回傳:
SUPPORTED
CONTRADICTED
UNDETERMINED
及可選:
witness_path
blocking_constraints
required_resources
10. Multi-Scale Horizon Manager
10.1 三層 Horizon
NEAR
MID
FAR
10.2 Resolution Policy
一般規則:
但可局部 refine。
10.3 Near
保留:
- explicit state;
- explicit action;
- local causal transition。
10.4 Mid
轉為:
ScenarioFamily
10.5 Far
轉為:
Attractor
Region
MacroState
11. L4:Cognitive Operator Runtime
11.1 Operator Registry
第一版 operator:
expand
counterfactual_intervene
counterfactual_observe
observe
verify
prune
merge
abstract
refine
backtrack
reframe
profile_shift
commit
11.2 OperatorSpec
每個 operator 必須宣告:
{
"operator_id": "cog://expand@0.1",
"input_types": [],
"output_types": [],
"cost_model": {},
"side_effect_class": "none",
"preconditions": [],
"postconditions": [],
"interruptible": true,
"checkpointable": true
}
12. Operator Invocation
任何認知操作都建立:
CognitiveOperation
包含:
operation_id
operator_id
state_ref
goal_ref
profile_ref
budget_before
estimated_value
estimated_cost
status
13. Operator Status
PROPOSED
QUEUED
RUNNING
PAUSED
PREEMPTED
COMPLETED
FAILED
CANCELLED
14. L5:COE Engine
14.1 Candidate Observation Generation
工程輸出:
ObservationCandidate[]
14.2 ObservationCandidate
{
"query_id": "query://...",
"target": "...",
"expected_outcomes": [],
"estimated_information_gain": null,
"estimated_decision_value": null,
"estimated_risk_reduction": null,
"estimated_cost": {},
"observer_effect": "none|possible|likely"
}
15. COE Expansion
對觀察 :
第一版允許:
- discrete outcomes;
- bounded continuous bins;
- symbolic outcomes。
16. Observation Value
統一值函數:
權重由 COP 提供。
17. L6:Adaptive Computation Controller
17.1 Candidate Cognitive Queue
每輪建立:
然後過濾:
17.2 Value Estimator
每個候選:
計算:
18. Marginal Value of Cognition
MVC 是第一版 scheduler 的主要排序訊號之一。
19. Dynamic Shadow Price
每種資源:
當:
通常:
20. Scheduler
第一版 scheduler:
filter infeasible
→ apply hard gates
→ score candidates
→ urgency adjustment
→ risk adjustment
→ choose top action
21. Preemption
若新操作:
可以搶佔:
前提:
interruptible = true
22. Checkpoint
可搶佔操作應支援:
{
"checkpoint_id": "ckpt://...",
"operation_id": "...",
"state_ref": "...",
"open_branches": [],
"evidence_refs": [],
"resume_token": "..."
}
23. Stop Policy
主動停止:
則:
STOP_COGNITION
24. Commit Policy
提交至少考慮:
第一版:
若:
25. L7:COP Manager
25.1 Canonical COP
第一版十維:
25.2 COP Object
{
"cop_id": "cop://...",
"depth": 0.5,
"breadth": 0.5,
"verification": 0.5,
"counterfactual": 0.5,
"observation": 0.5,
"risk": 0.5,
"latency": 0.5,
"abstraction": 0.5,
"commitment": 0.5,
"novelty": 0.5
}
26. COP Sources
有效 Profile 由:
user preference
task profile
system hard constraints
adaptive proposal
合成。
27. Adaptive Region
AI 自調範圍:
28. Profile Shift
重要 shift 必須:
PROPOSE
→ PROJECT_TO_FEASIBLE_REGION
→ APPLY
→ RECEIPT
29. Hysteresis
避免頻繁切換:
否則不 shift。
30. L8:Receipt Layer
30.1 DecisionReceipt
{
"receipt_id": "receipt://decision/...",
"state_ref": "...",
"selected_operation": "...",
"alternatives": [],
"budget_before": {},
"budget_after": {},
"cop_ref": "...",
"commit": false
}
30.2 ProfileReceipt
{
"receipt_id": "receipt://profile/...",
"old_cop": "...",
"new_cop": "...",
"trigger": "...",
"reason_code": "...",
"authorized_region": {}
}
30.3 ObservationReceipt
保存:
query
expected outcomes
actual outcome
estimated value
realized value
cost
31. Replay Layer
Runtime 應輸出:
run_manifest.json
events.jsonl
operations.jsonl
observations.jsonl
budgets.jsonl
profiles.jsonl
receipts.jsonl
final_state.json
32. Private Reasoning Boundary
Runtime 不需要保存:
private chain-of-thought
hidden model scratchpad
需要保存的是:
selected operator
public justification code
state transition
budget transition
external observation
receipt
因此:
33. Canonical Runtime Objects
v0.1 最小 canonical objects:
RunManifest
Goal
ObservationRecord
StateSnapshot
Rule
ConstraintResult
PossibilityNode
PossibilityEdge
CognitiveOperation
ObservationCandidate
BudgetState
CognitiveOperatingProfile
Checkpoint
DecisionReceipt
ProfileReceipt
ObservationReceipt
FinalCommit
34. ID Namespace
建議:
run://
goal://
obs://
state://
rule://
poss://
cog://
query://
budget://
cop://
ckpt://
receipt://
commit://
35. Runtime State Machine
主 Runtime 狀態:
INIT
OBSERVE
STATE_BUILD
GENERATE
CONSTRAIN
ROUTE_COGNITION
EXECUTE
UPDATE
EVALUATE_STOP
COMMIT
DONE
FAILED
36. 主循環
INIT
→ ingest goal / COP / budget
→ OBSERVE
→ normalize observations
→ STATE_BUILD
→ construct canonical state
→ GENERATE
→ propose possibilities
→ CONSTRAIN
→ project to working possibility space
→ ROUTE_COGNITION
→ select operator
→ EXECUTE
→ UPDATE
→ emit receipts
→ EVALUATE_STOP
→ continue / commit
37. API Surface
第一版建議:
POST /runs
GET /runs/{id}
POST /runs/{id}/observe
POST /runs/{id}/step
POST /runs/{id}/pause
POST /runs/{id}/resume
POST /runs/{id}/commit
GET /runs/{id}/state
GET /runs/{id}/possibilities
GET /runs/{id}/budget
GET /runs/{id}/profile
PATCH /runs/{id}/profile
GET /runs/{id}/receipts
GET /runs/{id}/replay
38. Step Contract
POST /runs/{id}/step
輸入:
{
"max_operations": 1,
"allow_external_observation": true
}
輸出:
{
"selected_operation": "...",
"status": "...",
"state_ref": "...",
"budget_ref": "...",
"receipt_ref": "..."
}
39. Budget Contract
{
"wall_ms": 10000,
"compute_units": 100,
"memory_units": 50,
"observation_units": 10,
"external_units": 5,
"risk_ceiling": 0.2
}
40. COP Presets
Preset 只是 convenience:
single_turn_accuracy
exploration
low_latency
high_risk_assurance
research
balanced
Runtime 仍保存展開後的完整 。
41. Failure Model
41.1 State Failure
STATE_UNRESOLVED
STATE_CONTRADICTION
STATE_SCHEMA_ERROR
41.2 Constraint Failure
HARD_RULE_FAIL
CAUSAL_CONFLICT
REACHABILITY_FAIL
41.3 Cognitive Failure
OPERATOR_FAILED
OPERATOR_TIMEOUT
CHECKPOINT_FAILED
PREEMPTION_FAILED
41.4 Observation Failure
OBSERVATION_UNAVAILABLE
OBSERVATION_UNRELIABLE
OBSERVER_EFFECT_BLOCKED
41.5 Budget Failure
BUDGET_EXHAUSTED
DEADLINE_REACHED
EXTERNAL_QUOTA_EXHAUSTED
42. Graceful Degradation
當資源下降:
reduce breadth
→ raise abstraction
→ reduce far-horizon detail
→ defer low-value verify
→ freeze dormant branches
→ minimal viable commit
43. Safety / Governance Gate
第一版 Runtime 至少應具備:
external action allowlist
side-effect classification
budget ceiling
observation permission
COP hard minimum / maximum
manual pause
manual cancel
manual commit override
44. Model Independence
核心 Kernel 不應要求某家模型 SDK。
Agent Adapter 使用:
provider-neutral interface
45. Deterministic Core
能 deterministic 的部分應 deterministic:
- schema validation;
- budget accounting;
- state versioning;
- rule checking;
- receipt generation;
- replay manifest;
- scheduler tie-breaking with seed。
46. Stochastic Boundary
模型 proposal 可不確定,但必須被包進:
ProposalRecord
並保存:
model_id
model_version
seed if available
request hash
response hash
47. Metrics
Runtime 本身輸出:
48. Telemetry
本地 telemetry 至少包含:
active nodes
dormant nodes
pruned nodes
current horizon
current COP
remaining budget
current operation
decision stability
expected further gain
49. Dashboard
第一版 Dashboard 不需華麗。
頁面:
Overview
State
Possibility Graph
Operators
Observations
Budget
COP
Receipts
Replay
50. Possibility Graph View
至少顯示:
- active;
- dormant;
- pruned;
- merged;
- near / mid / far;
- risk;
- reachability;
- decision value。
51. COP Control View
UI 支援:
preset selector
advanced sliders
adaptive toggle
adaptive min / max
profile shift history
52. Minimal Neural Integration
MVP 可以只接一個模型。
要求:
JSON structured proposal
bounded branch count
bounded observation candidate count
bounded abstraction candidates
53. Branch Cap
第一版必須硬限制:
避免模型一次生成無限候選。
54. Horizon Cap
但可以用 abstract node 表示更遠期。
55. COE Cap
以及:
56. Verification Cap
每輪:
57. Runtime Acceptance Gates
Gate A:Schema Integrity
所有 canonical object 必須通過 schema。
Gate B:State Versioning
任何 mutation 都必須有 parent version。
Gate C:No Direct Neural Mutation
模型 proposal 不可直接改 canonical state。
Gate D:Budget Monotonicity
已消耗資源不可無故增加回來。
Gate E:Constraint Enforcement
Hard Rule fail 不可進 active space。
Gate F:COE Boundedness
觀察候選與 outcome 必須有上限。
Gate G:Preemption Safety
搶佔後可恢復或明確標記不可恢復。
Gate H:COP Boundary
Adaptive shift 不可離開授權區域。
Gate I:Receipt Completeness
重要決策必須有 receipt。
Gate J:Replay Integrity
同一 deterministic core 輸入可重播。
Gate K:Commit Gate
未通過 commit policy 不得自動 final commit。
58. MVP v0.1 的完成定義
MVP v0.1 不要求完整 AGI。
只需證明:
- 可以建立 canonical state;
- 可以生成有限 possibility graph;
- 可以執行 constraint projection;
- 可以在至少 5 種 cognition operator 間選擇;
- 可以計算 budget;
- 可以執行 COE 的簡化版本;
- 可以切換 COP;
- 可以主動 stop / commit;
- 可以輸出 receipts;
- 可以完整 replay。
59. MVP Operator Scope
v0.1 建議只做:
expand
observe
verify
prune
abstract
commit
第二輪再加入:
counterfactual_intervene
merge
refine
backtrack
reframe
profile_shift
60. MVP COE Scope
第一版只支援:
discrete observation candidates
bounded outcomes
heuristic DROV
simple cost
不要求完整 causal Bayesian model。
61. MVP Controller
第一版可以使用:
先用 heuristic estimator。
之後再學習:
62. MVP COP
先提供 5 個 preset:
balanced
single_turn_accuracy
exploration
low_latency
high_risk_assurance
外加 advanced JSON。
63. MVP Demo Task
建議第一個 demo 不直接做複雜遊戲。
先做:
Hidden-State Route Planning
世界:
graph map
hidden hazard
limited observation
limited verify
multiple routes
deadline
AI 必須決定:
- 先走;
- 先觀察;
- 先驗證;
- 剪掉哪些路;
- 何時 commit。
64. Demo 可測理論
同一任務可以比較:
Fixed Depth
Fixed Search
APSC without COE
APSC with COE
APSC with COP
65. Phase Plan
Phase 0 — Schema Freeze
完成:
canonical objects
JSON schemas
ID namespace
event types
receipt types
Phase 1 — State / Budget Kernel
完成:
StateStore
BudgetManager
RunManifest
versioning
receipts
Phase 2 — Possibility Graph
完成:
nodes
edges
constraint engine
reachability interface
prune
abstract
Phase 3 — Operator Runtime
完成:
registry
invocation
queue
status
checkpoint
Phase 4 — COE
完成:
observation candidates
outcome expansion
value estimate
observe / update
Phase 5 — Adaptive Controller
完成:
MVC
scheduler
shadow price
stop
commit
preemption
Phase 6 — COP Manager
完成:
profile
presets
adaptive region
shift
receipt
Phase 7 — Replay / Dashboard
完成:
events
replay
graph view
budget view
COP view
Phase 8 — Benchmark Harness
連接下一份白皮書:
AI Tension Arena Protocol & Benchmark Specification。
66. Repository Layout
建議:
apsc-runtime/
├── README.md
├── pyproject.toml
├── schemas/
├── src/apsc/
│ ├── state/
│ ├── possibility/
│ ├── constraints/
│ ├── operators/
│ ├── coe/
│ ├── controller/
│ ├── cop/
│ ├── budget/
│ ├── receipts/
│ ├── replay/
│ ├── adapters/
│ └── api/
├── tests/
├── examples/
├── benchmarks/
└── docs/
67. 測試策略
至少包含:
unit tests
schema tests
property tests
golden replay tests
budget monotonicity tests
profile boundary tests
preemption tests
failure injection
68. Property Tests
重要 property:
除非有明確 external top-up。
以及:
以及:
69. Golden Replay
固定:
seed
world
observations
operator outcomes
應得到相同:
state versions
budget trajectory
receipts
final commit
70. 性能目標
v0.1 不追求最大吞吐。
優先順序:
correctness
replayability
boundedness
auditability
then performance
71. 非目標
v0.1 不做:
- 通用世界模型;
- 通用因果發現;
- 完整 POMDP solver;
- 自主訓練大模型;
- 私有 chain-of-thought 儲存;
- 無限制長期自主;
- 現實高風險 actuator。
72. 可否證工程標準
若 APSC Runtime:
- 無法比固定 depth baseline 降低資源浪費;
- COE 無法改善任何觀察選擇;
- COP 無法穩定改變可預測行為;
- Replay 無法重現 deterministic core;
- Budget accounting 不可靠;
則 v0.1 架構需要被修正,而不是只增加更多模組。
73. 第一版最小成功條件
可以用一個最小公式表示:
並且:
74. 與第二份白皮書的邊界
本文件只定義:
下一份:
AI Tension Arena Protocol & Benchmark Specification
負責:
- arena world contract;
- multi-agent episode;
- fairness;
- scoring;
- benchmark tasks;
- replay comparison;
- leaderboard;
- experimental matrix。
75. 最終架構總結
APSC Runtime 的工程母式:
其中:
觀察候選則透過:
加入 cognition queue。
76. 結論
APSC Runtime 的目的不是重新建立一個神經模型,也不是建立一個與 LLM 平行的「邏輯 AI」。
它建立的是一個位於模型與世界之間的:
神經模型負責提出候選。
Runtime 負責:
哪些候選可以成立?
哪些值得展開?
哪些應觀察?
哪些應驗證?
哪些應剪枝?
哪些應抽象?
下一單位資源該花在哪裡?
Profile 是否需要改變?
現在是否已經值得停止?
最終決策是否可以提交?
因此:
這份白皮書固定了第一版工程骨架。
下一份技術白皮書將進入:
AI Tension Arena Protocol & Benchmark Specification v0.1
並把本 Runtime 放入真正會反作用的多智能體世界中進行可重播驗證。
版本記錄
v0.1 — 2026-08-24
本版首次固定:
- APSC Runtime 九層工程架構;
- Neural Proposal / Canonical Mutation 分離;
- Observation / Truth 分離;
- Candidate / Active Branch 分離;
- Decision / Commit 分離;
- Canonical Runtime Objects;
- State Kernel;
- Possibility Graph;
- Constraint Engine;
- Reachability Interface;
- Multi-Scale Horizon Manager;
- Cognitive Operator Registry;
- COE Engine;
- Observation Value;
- Adaptive Computation Controller;
- MVC;
- Dynamic Shadow Price;
- Scheduler;
- Preemption;
- Checkpoint;
- Stop / Commit Policy;
- COP Manager;
- Adaptive Region;
- Profile Shift / Hysteresis;
- Decision / Profile / Observation Receipts;
- Replay Layer;
- Private Reasoning Boundary;
- Runtime State Machine;
- API Surface;
- Budget Contract;
- Failure Model;
- Graceful Degradation;
- Governance Gate;
- Deterministic Core;
- Telemetry / Dashboard;
- Branch / Horizon / COE / Verification Caps;
- Acceptance Gate A–K;
- MVP Completion Definition;
- MVP Operator Scope;
- MVP COE Scope;
- MVP Controller;
- MVP COP;
- Hidden-State Route Planning Demo;
- Phase 0–8 Implementation Plan;
- Repository Layout;
- Test Strategy;
- Property Tests;
- Golden Replay;
- Non-goals;
- Falsification Criteria。