AIKernel Architecture Index
AIKernel.NET のアーキテクチャ思想を体系的にまとめたドキュメント群への入口。
AIKernel は「AI アプリケーションの OS」を目指すフレームワークであり、 その中心思想は 情報カテゴリ分離・前処理中心・Attention 汚染防止・推論と表現の分離 にある。
この index は、AIKernel の設計原則・理論背景・構造比較を理解するためのガイドとして機能する。
1. Core Architectural Principles
1.1 情報カテゴリ分離の原則
LLM に渡す情報は単一コンテキストに混在させてはならない。 混在は attention を破壊し、推論を停止させ、表面模写モードを誘発する。
カテゴリ例:
- purpose(目的)
- constraints(制約)
- structure(抽象構造)
- history(履歴)
- rag_material(RAG 素材)
- expression(表現)
- metadata(メタ情報)
「LLM に渡す情報は、単一のコンテキストに混在させてはならない。」 — 情報カテゴリ分離の原則
1.2 コンテキスト隔離仕様
AIKernel は LLM に渡す前に情報を Orchestration / Expression / Material の 3 層に分離する。
- OrchestrationContext(推論)
- ExpressionContext(表現)
- MaterialContext(素材)
例・文体・RAG の断片は推論に混ぜてはならない。
1.3 Attention 汚染理論
LLM の推論能力は attention の純度に依存する。 例・文体模倣・RAG の断片・履歴が混ざると attention が表面構造に吸われ、推論が停止する。
「attention が表面構造に吸われると、推論は停止し、表面模写モードに落ちる。」 — Attention 汚染理論
1.4 表面模写モードの危険性
例を見ると LLM は「推論しないモード」に落ちる。 これは AIKernel が例を隔離する理由のひとつ。
1.5 Preprocessing vs Prompting
プロンプト設計よりも 前処理の構造化 が本質。 何を attention に乗せ、何を隔離するかが推論精度を決める。
1.6 DI Composition and Pipeline Bootstrap
AIKernel が DI でモデル選定、Provider 解決、パイプライン実行を合成する方法を定義する。
IServiceRegistrar/IProviderRegistrarIKernelModule/IKernelHostIModelVectorRouter/IProviderRouter/IModelProviderIPipelineOrchestrator/ITaskManager
あわせて IPromptVerifier を Fail-Closed な起動ゲートとして規定する。
1.7 Execution Contract Architecture
Structure -> Generation -> Polish のフェーズ境界を定義し、推論層と表現層の越境を防止する。
1.8 PDP Guard Decision Plane
統治責務を分離し、次の運用原則を強制する。
- LLM は提案
- PDP が決定
1.9 Dynamic Capacity Routing
動的軸を含む能力ベクトル駆動ルーティングを定義する。
ModelCapacityVectorIDynamicCapacityProviderIVectorMatcherIModelVectorRouter
1.10 Material Quarantine Trust Model
外部素材を推論経路へ投入する前の検疫・正規化・出典追跡の規則を定義する。
1.11 Semantic Memory Management Spec
トークン予算制約下での意味メモリ管理を定義する。
- 層別 purge/swap 優先度
- provenance を保持した要約
- コンテキスト圧迫時の Fail-Closed 条件
1.12 Capability Definition Schema
モデル/Provider のオンボーディングとルーティング整合性のため、能力次元と宣言スキーマを定義する。
1.13 Signed Prompt Governance Workflow
Prompt Artifact 読み込みから実行可否判定までのシーケンスレベル Fail-Closed 検証を定義する。
1.14 Replayable Execution Dump Format
決定論的リプレイダンプ構造(seed、hash 群、provider manifest、execution outcome chain)を定義する。
1.15 Semantic Context OS ビジョン
AIKernel の最終アーキテクチャ目標は Semantic Context OS であり、推論・素材・表現を独立統治する。
本章では次を中核要件として定義する。
- System Integrity Requirements(
SIR-001〜SIR-004) - Kernel 起動ステートマシン(Inactive -> Initializing -> Governing -> Ready -> Executing)
- 論理的整合性監査(Replay 固定 / PDP 推論隔離 / ROM 正準化)
この文書は、AIKernel を「AI を厳格なステートマシンと不変制約下に置く OS」として拘束する北極星である。
1.16 Phase 1 Query Processing
Query 補間・分解・意味空間化・query routing を Phase 1 Context Build の責務として定義する。
本章は RAG を Core の検索実装から切り離し、Query Processing を ROM、CacheDB、Material Quarantine、Governance と整合させる。
1.17 DSL Pipeline and ROM Specification
標準 JSON DSL pipeline IR、決定論的 loop / suspend semantics、DSL ROM 保存、dsl:// capability 呼び出し、history:// による HistoryROM 保存、再利用可能な AI 生成 capability の replay metadata を定義する。
v0.0.4 では、このモデルの共有 contract surface を AIKernel.Abstractions.Dsl、AIKernel.Abstractions.History、AIKernel.Abstractions.Time と対応 DTO namespace から公開する。
1.18 HATL Interface Contracts
v0.0.5 では、HATL ledger entry、public anchor、Digital Deed、verification result、外部 cryptographic operator 統合の最初の公開 contract surface を追加する。 cryptographic implementation は AIKernel.NET の外に残し、AIKernel.RH ベース operator または監査済み module が提供できるようにする。
1.19 DynamicSLM Model ABI Contracts
v0.0.5 では、DynamicSLM capability-modular SLM artifact と SeedSLM discipline surface 向けの最初の公開 contract surface を追加する。 Interface index は interfaces/dynamicslm/index-jp.md にある。
この contract は、Model ABI descriptor、capability subgraph 解決、lineage 検証、payload materialization、scheduler placement、differential distillation planning、background distillation offload を扱い、runtime behavior は Core / Provider 実装へ残す。SeedSLM 追加分は strict output discipline、fail-closed delegation、ReplayLog 互換 thought artifact、常駐 SeedSLM / paging される CapabilitySLM の memory placement metadata を扱う。
1.20 Paper Implementation Status
DOI 付き論文ごとに、現在の AIKernel.NET contract surface への反映状況と、Core / Provider / RH / Tools / 将来の HATL 作業が所有する runtime behavior を整理する。 Paper 12 の Canonical Trajectory Governance と v0.1.1.1 contract mapping も含む。
1.21 Governance Admission Vocabulary
v0.0.5 では、external Capability module manifest / invocation envelope、pre-inference admissibility replay / profile / budget / result record、trajectory governance evidence record、Semantic IR G/T/C/B slot の共有 DTO / enum vocabulary を追加する。 これにより、Core semantic compiler は admission evidence の安定した contract surface を利用できる。一方で、gate execution、policy evaluation、ResultStep composition、ReplayLog hashing は AIKernel.NET の外に残す。 Semantic Compilation DTO は、observable semantic state、Semantic IR element、governed circuit descriptor、finite prototype space、semantic distance report、deterministic synthesis descriptor、semantic transition を運ぶ contract-only carrier も提供する。
1.22 Memory Region / Mapper Contracts
v0.1.0 では、OS 非依存の IMemoryRegion / IMemoryMapper contract surface を AIKernel.NET に移動する。共有 DTO / enum vocabulary は AIKernel.Dtos.Memory と AIKernel.Enums が所有し、Result-based adapter と Win32/POSIX 実装は AIKernel.Core / AIKernel.Kernel に残す。
1.23 Domain Contract Surface v0.1.1.1
v0.1.1.1 では、adapter、runtime control、process control、replay、 observability、diagnostics、operator strategy、profiles、telemetry、 metrics、HUD signal、overlay annotation の semantic contract surface を追加する。
この surface は追加型である。既存 v0.1.1 の public signature は維持し、 新規 interface は opt-in、DTO 追加は optional、enum handling は fail-closed な Unknown = 0 方針に従う。
1.24 Canonical Trajectory Governance
v0.1.1.1 では、triadic council evaluation、deterministic step gate、 trajectory gate、ROM-backed governance request、replayable governance trace の ための CTG contract vocabulary を追加する。
この文書は、Zenodo 公開済み CTG 論文を developer architecture へ対応付ける。 canon rule text や runtime implementation は AIKernel.NET に埋め込まない。 Monolith CTG-ROM は、runtime VFS merge における personalized developer diff layer の base canon layer として文書化する。
1.25 CTG Developer Theory
CTG theory を開発者向けに説明する。three council、finite vote value、 discrete step / trajectory gate、rejection taxonomy、canon reference、 deterministic replay boundary を扱う。
CTG DTO、enum、runtime package implementation が canon rule を創作せず、 paper invariant を維持しているかを review する場合に利用する。
1.26 Canonical Language Dictionary
v0.2.x の coding を開始する前に、Concept Elevation Refactoring で使用する ecosystem-wide な哲学由来 vocabulary を定義する。
この辞書は naming と ubiquitous language の guide であり、CTG-ROM、GateInput、 CouncilVoteValue、RejectReasonKind、CanonReference、canonical governance contract を変更しない。
2. Comparative Architecture
2.1 AIKernel vs LangChain
LangChain の問題点:
- 全情報を単一コンテキストに混在
- RAG をそのまま渡す
- 例と履歴が混ざる
- attention が破壊される
AIKernel の特徴:
- 情報カテゴリ分離
- 推論層と表現層の分離
- 例の隔離
- RAG の素材化
- attention 汚染防止
「LangChain は“偶然うまくいく”構造。AIKernel は“構造的に正しく動く”アーキテクチャ。」
3. Architectural Philosophy
3.1 設計意図(Design Intent)
Design Intent は design layer に属します。この architecture index では architecture specification space 内の下位方向への導線を維持し、上位または横断方向への jump を作らずに関係性のみを説明します。
AIKernel の設計哲学:
- Markdown 第一主義(人間可読性)
- Core = 抽象 + Contracts(JSON Schema)
- Provider = Capability ベース
- LLM は提案者、PDP が決定者
- Pipeline = DAG
- PromptRules = 署名付き Markdown
- Deterministic Replay(再現性)
4. How to Use This Architecture Section
この architecture/ ディレクトリは以下の目的で構成されている:
- AIKernel の思想を理解する
- なぜカテゴリ分離が必要かを説明する
- LangChain など他フレームワークとの構造的違いを明確化する
- 実装(Core / Kernel / Providers)を読む前に前提知識を提供する
AIKernel のコードを読む前に、この index と各ドキュメントを順番に読むことで、 AIKernel が「AI アプリケーションの OS」である理由が理解できる。
5. 推奨読書順
次の順序で architecture 文書を読み進めてください。各項目は architecture specification space の下位文書へ進むリンクです。
- 情報カテゴリ分離の原則
- コンテキスト隔離仕様
- Attention 汚染理論
- 表面模写モードの危険性
- Preprocessing vs Prompting
- AIKernel vs LangChain
- DI Composition and Pipeline Bootstrap
- Execution Contract Architecture
- PDP Guard Decision Plane
- Dynamic Capacity Routing
- Material Quarantine Trust Model
- Semantic Memory Management Spec
- Capability Definition Schema
- Signed Prompt Governance Workflow
- Replayable Execution Dump Format
- Semantic Context OS ビジョン
- Phase 1 Query Processing
- DSL Pipeline and ROM Specification
- Capabilities Interfaces
- HATL Interface Contracts
- DynamicSLM Interface Contracts
- Governance Interfaces
- Memory Interfaces
- Domain Contract Surface v0.1.1.1
- Canonical Trajectory Governance
- CTG Developer Theory
- Canonical Language Dictionary
- Paper Implementation Status
6. 最後に
AIKernel のアーキテクチャは「偶然うまくいく」ものではなく、 構造的に正しく動くために設計された OS 的アプローチである。
この index はその全体像を理解するための入口である。
変更履歴
- v0.0.0 / v0.0.0.0: 初期ドラフト
- v0.0.1 (2026-05-06): ドキュメント規約に基づくバージョン更新
- v0.0.4 (2026-06-04): DSL / History ROM / Time contract 公開に合わせて architecture index を更新
- v0.0.5 (2026-06-05): DynamicSLM Model ABI / distillation offload / SeedSLM discipline contract 導線を追加
- v0.0.5 (2026-06-05): paper implementation status 導線を追加
- v0.0.5 (2026-06-05): HATL external cryptographic operator contract 導線を追加
- v0.0.5 (2026-06-05): governance admission と Semantic IR vocabulary の導線を追加
- v0.0.5 (2026-06-05): Semantic Compilation DTO vocabulary の導線を追加
- v0.0.5 (2026-06-05): external Capability module contract の導線を追加
- v0.1.0 (2026-06-07): MemoryRegion / MemoryMapper contract extraction の導線を追加
- v0.1.1.1 (2026-06-14): domain contract surface、Canonical Trajectory Governance、CTG Developer Theory、Monolith CTG-ROM layout の導線を追加
- v0.1.1.1 (2026-06-15): Concept Elevation canonical language の導線を追加
architecture/index-jp.md