英語版: Semantic Context OS Vision
Semantic Context OS ビジョン
1. Summary
AIKernel.NET の最終アーキテクチャ目標は Semantic Context OS である。 この OS は、AI の推論(Reasoning)・素材(Material)・生成表現(Expression)を独立したシステムオブジェクトとして統治し、推論の分岐・再利用・監査・合議を構造的に成立させる。
2. Principles and Specification
(詳細は既存仕様を参照)
01Category Separation Principles02Signed Prompt Governance Spec03ROM Core Spec04Model Routing Spec06Replay Dump Spec08Execution Contract Architecture09PDP Guard Decision Plane14Signed Prompt Governance Workflow
3. System Integrity Requirements(システム整合性要件)
OS としての信頼性と決定論を担保するため、以下の物理的・論理的制約を課す。
3.1 Required Interfaces(必須インターフェース)
- SIR-001:
ISemanticHasherおよびIRomCanonicalizerを ROM Core の必須インターフェースとして採用する(MUST)。 - SIR-002 Immutable Execution Constraints: 実行制約
IExecutionConstraintsは、実行中の動的改ざんを防止するため、recordによる不変型として仕様化する(MUST)。
public sealed record ExecutionConstraints(\n IReadOnlySet<string> AllowedTools,\n IReadOnlySet<string> Scopes,\n int MaxTokenBudget,\n int ContextCardinality,\n long AvailableMemoryMb,\n int? MaxLatencyMs,\n string ComputeDeviceType,\n string ComputeDeviceName,\n string QuantizationLevel,\n float ComputeThroughputTflops);
3.2 Kernel Startup State Machine(起動ステートマシン)
- SIR-003: Kernel 起動シーケンスを以下のステートマシンで固定する(MUST)。
- Inactive -> Initializing -> Governing -> Ready -> Executing
- SIR-004: 未定義の遷移、および条件未達の遷移はすべて拒否(Fail-Closed)し、例外の送出と監査ログの記録を行う(MUST)。
| 遷移 | 条件(Transition Constraints) |
|---|---|
| Initializing -> Governing | 必須コンポーネント(Router, Repository 等)の登録完了時。 |
| Governing -> Ready | PDP/Signature/Policy 検証の健全性確認(ガバナンス有効化)後。 |
| Ready -> Executing | 正当な実行要求と、検証済みの署名済み入力が揃った場合。 |
| Executing -> Ready | 実行完了、または安全な中断処理の完了後。 |
public enum KernelState { Inactive, Initializing, Governing, Ready, Executing }\n\npublic interface IKernelStateMachine {\n KernelState Current { get; }\n bool CanTransition(KernelState next);\n void Transition(KernelState next); // 不正遷移時は throw + 監査イベント発行\n}
4. Governance / Constraints(ガバナンス・制約)
4.1 推論プロセスに対するガバナンス
ガバナンスの対象は入力と結果だけでなく、そのプロセスにも及ぶ。
- 思考ステップの制約(Step Constraint): ガバナンス・ポリシーを通じて Thinking ステップ数に上限を設け、モデルが設計原則を解釈し直して勝手なルールを捏造(Hallucinated Constraints)することを防ぐ。
- 抽象汚染の監査(Audit of Abstract Pollution):
Replay Dumpにおいて、中間推論が依存ルールや責務分離を侵害した形跡がある場合、その推論結果の信頼度(TrustLevel)を大幅に減衰させる。
4.2 Architecture Logical Audit(論理的整合性の固定)
AIKernel.NET は、知能の非決定性とシステムの決定論を統合するため、以下のパラドックスを解消する。
- 決定論的リプレイの凍結: リプレイ時は
IModelVectorRouterをバイパスし、LockedProviderInfoに基づき Provider を物理的に固定する。 - PDP の推論隔離(Anti-Hallucinated Approval): ガバナンス判断(PDP)に LLM 推論を介在させてはならない。承認は常に決定論的なコードによって行われる。
- 意味的正準化: ROM は保存・署名前に ID ソートによる正準化を強制し、Git 差分と意味的差分を一致させる。
5. Conclusion
Semantic Context OS ビジョンは、AIKernel.NET における Interface 定義、Provider 実装、将来拡張を拘束する恒久的な北極星である。 システムは常に Fail-Closed であり、整合性が疑われる状態での推論実行を許容しない。
6. Related Documents
- 情報カテゴリ分離の原則
- コンテキスト分離仕様
- Attention Pollution 理論
- DI Composition and Pipeline Bootstrap
- Execution Contract Architecture
- PDP Guard Decision Plane
- Signed Prompt Governance Workflow
- Design Intent
7. Changelog
- v0.0.0 Draft
変更履歴
- v0.0.0 / v0.0.0.0: 初期ドラフト
- v0.0.1 (2026-05-06): ドキュメント規約に基づくバージョン更新
Source:
architecture/16.SEMANTIC_CONTEXT_OS_VISION-jp.md