MRP-VM is a lightweight plugin-kernel system. The VM core provides only three things:
All domain logic — knowledge extraction, indexing, retrieval, scoring, synthesis — belongs to plugins. The VM is syntax-agnostic with respect to the content transmitted between plugins; it only enforces the structural delimiters defined by each plugin type's CNL schema.
Every execution frame runs a loop with four phases:
| Phase | Plugin Type | What Happens |
|---|---|---|
| 1. Seed Generation | sd-plugin | Extracts intents (fine-grained task seeds as Intent CNL) and knowledge (semantically coherent KUs as Context CNL) from the input. |
| 2. Plan Generation | mrp-plan-plugin | Builds an execution plan ordering KB and goal solver plugins. Uses plugin descriptions and plannerHints for relevance filtering. |
| 3. Task Resolution | kb-plugin → gs-plugin | KB plugin retrieves relevant Knowledge Units at the appropriate abstraction level. Goal solver produces a grounded answer using the assembled context. |
| 4. Result Composition | (core) | Results are assembled into the response document and Markdown output. Validation plugin runs if registered. |
Task resolution is recursive. When a task is too broad or complex for direct resolution, the VM creates a child execution frame — analogous to a function call pushed onto a call stack.
Root Frame (original user request)
├── Seed: 3 intent groups detected
├── Plan: kb-balanced → gs-llm-fast
├── Intent 1: resolved directly
├── Intent 2: resolved directly
└── Intent 3: gs-plugin returns "needs-decomposition"
└── Child Frame (sub-task)
├── Seed: decomposed into 2 sub-intents
├── Plan: kb-thinkingdb → gs-llm-deep
├── Sub-intent 3a: resolved
└── Sub-intent 3b: resolved
→ result returned to parent frame
decompose: true in the plan)needs-decompositionno-context results and the planner determines decomposition may helpframeId — unique identifierparentFrameId — null for root framedepth — nesting level (0 for root)maxDepth — budget limit (default: 3)localState — seeds, plan, evidence, partial results (frame-scoped)globalStateRef — shared session/request state (budgets, trace)Knowledge is represented as hierarchical Knowledge Units (DS030) at all levels:
Source Aggregate (root summary, kuType: "aggregate")
├── Section Aggregate (chapter/section, kuType: "composite")
│ ├── Atomic KU (leaf claim/fact)
│ ├── Atomic KU (leaf claim/fact)
│ └── Atomic KU (leaf procedure step)
└── Section Aggregate
└── ...
KB plugins traverse this hierarchy to select the right abstraction level: summaries for broad context, intermediate KUs for moderate detail, leaf KUs for specific evidence.
Plugins communicate through natural language using two CNL formats:
The VM is agnostic to the content inside these formats. It enforces only the structural delimiters (headings, field names) defined by each CNL schema. A future extension may allow plugins to exchange a more formal intermediate representation (IR) for specific domains.
After a goal solver produces a successful answer, a val-plugin may validate it. If rejected, the core throws VALIDATION_REJECTED and the planner backtracking loop attempts an alternative plan. Backtracking can happen:
maxLLMCalls exceeds remaining budget