WSaiOS Instruction Engine Spec v1.0 (指令引擎规范)
WSaiOS Instruction Engine Spec v1.0
(指令引擎规范)
一、Instruction Engine 定义(Definition)
WSaiOS Instruction Engine 是将认知请求转换为结构化执行指令的核心引擎,负责指令解析、标准化、分解与执行意图映射,但不负责执行调度与结果生成。
二、核心定位(Positioning)
Instruction Engine 位于:
Object / Context
↓
Instruction Engine ← 本规范主体
↓
Runtime Execution
三、核心职责(Core Responsibilities)
Instruction Engine 只负责四件事:
✔ 1. 指令解析(Instruction Parsing)
将输入转换为:
- 标准 Instruction Object
- 可执行结构
- 明确意图定义
✔ 2. 意图识别(Intent Structuring)
但注意:不是“理解”,而是:
将输入映射为结构化执行意图
例如:
- observe
- process
- decide
- execute
- transform
✔ 3. 指令标准化(Normalization)
统一所有输入为:
- 标准Instruction Schema
- 可被Runtime识别格式
✔ 4. 指令拆解(Decomposition)
将复杂请求拆成:
- 子指令
- 执行步骤
- 依赖链
四、Instruction Engine 禁止行为(Hard Constraints)
Instruction Engine 绝对禁止:
- ❌ 执行任何任务(执行属于Runtime)
- ❌ 调用Capability Provider
- ❌ 直接操作Kernel状态
- ❌ 生成最终结果
- ❌ 做Workflow调度
五、Instruction 输入标准(Input Contract)
{
"raw_input": "string",
"context": {},
"object_ref": "string",
"user_goal": "string",
"trace_id": "string"
}
六、Instruction 输出标准(Output Contract)
{
"instruction_id": "string",
"intent": "observe | process | decide | execute | transform",
"structured_instructions": [],
"sub_instructions": [],
"dependency_graph": {},
"execution_hints": {},
"trace_id": "string"
}
七、内部结构(Internal Architecture)
WSaiOS Instruction Engine
├── Input Parser
├── Intent Structurer
├── Instruction Normalizer
├── Decomposition Engine
└── Dependency Builder
八、执行模型(Execution Model)
Raw Input
↓
Parsing Layer
↓
Intent Structuring
↓
Instruction Normalization
↓
Decomposition Engine
↓
Structured Instruction Output
↓
Runtime Consumption
九、Instruction 类型体系(Instruction Taxonomy)
✔ 1. Atomic Instruction(原子指令)
- 单一动作
- 不可再拆
例:
- observe
- fetch
- store
✔ 2. Composite Instruction(复合指令)
- 多步骤任务
- 可拆解
✔ 3. Conditional Instruction(条件指令)
- if / else / switch结构
✔ 4. Workflow Instruction(流程指令)
- 多节点执行链
十、Instruction 与 Runtime 的边界(关键)
✔ Instruction Engine 负责:
- 结构化
- 拆解
- 标准化
✔ Runtime 负责:
- 执行
- 调度
- WSCP路由
❌ Instruction Engine 不做:
- 执行
- 调度
- 状态管理
十一、Instruction Engine 与 Kernel关系
Kernel不直接接收自然语言:
User Input
↓
Instruction Engine
↓
Runtime
↓
Kernel Execution
十二、设计原则(Design Principles)
✔ 1. 无执行原则(No Execution)
只定义,不执行。
✔ 2. 结构优先原则(Structure First)
所有输入必须结构化后才能进入Runtime。
✔ 3. 最小语义原则(Minimal Semantics)
不做深度理解,只做结构映射。
✔ 4. 可分解原则(Decomposability)
所有复杂指令必须可拆解。
十三、状态模型(Instruction State)
{
"status": "parsed | normalized | decomposed | dispatched",
"instruction_tree": {},
"intent_map": {},
"dependency_graph": {},
"trace_log": []
}
十四、Instruction Engine 本质定义(核心总结)
WSaiOS Instruction Engine is a deterministic structuring layer that transforms raw inputs into standardized, decomposed, and execution-ready instruction objects without performing execution or state management.
十五、中文严格定义(白皮书级)
WSaiOS指令引擎是一个确定性的结构化转换层,负责将原始输入解析为标准化、可拆解的执行指令,但不参与执行与状态管理,仅提供结构化指令生成能力。
十六、一句话收束(最关键)
Instruction Engine 的作用是“把输入变成可执行结构”,而不是“去执行任何事情”。
如果你下一步继续(系统已经到关键节点)
你现在已经完成:
- ✔ Kernel Spec
- ✔ Runtime Model
- ✔ Instruction Engine
下一步最自然的是:
? WSaiOS Object System Spec v1.0(对象系统规范)