MagWorksManaged Intelligence

The mental model

In plain language

Everything on the platform exists to help Matter & Gas create, operate, measure, package and retire Capabilities — the working units that answer a client's request. Nine concepts describe the whole system, and they are arranged in a strict vertical: what is authored flows down into what executes, what executes produces facts, and every number a person sees is a projection of those facts. Nothing downstream can alter what happened upstream.

Capabilities are managed business assets. Everything else exists to help operators create, operate, improve, measure, package, and retire those assets.

That sentence is the architectural identity of the platform.

The nine concepts

  1. Capability — a published Capability is an operational business asset. Operators create, operate, measure, price, package, grant, invoke, audit and retire Capabilities.
  2. Composition — a Capability's behaviour is expressed as a Composition: Actions, Recipes and Configurations arranged by the operator.
  3. Runtime Adapter — the execution boundary between Studio and Magpie. It transforms operator-authored Compositions into executable substrate, owning translation, validation, projection, cost attribution, telemetry attribution and workflow compilation.
  4. Magpie Runtime — the substrate that durably executes Compositions. Magpie thinks in workflows and guarantees execution, audit, idempotency and replay. Operators never interact with Magpie directly.
  5. Execution Truth — the record of what actually happened during a Capability Run. Magpie's audit ledger is its canonical home; all downstream layers read from it.
  6. Cost Accounting — the measurement of resources consumed during a Run. Cost Records are immutable business facts that support pricing, billing, profitability, forecasting, capacity planning, model comparison, anomaly detection and regression detection.
  7. Capability Intelligence — the synthesis of how a Capability is performing: usage, cost, economics, reliability, latency, quality, adoption, trends and recommendations.
  8. Commercial Policy — how a Capability is monetised: pricing, markup, plans, credits, discounts, contracts. Reads cost facts; produces billable amounts.
  9. Billing — subscriptions, invoices, payment processing, dunning. Reads Commercial Policy outputs; collects payment.

The vertical flow

        Capability
            ↓
        Composition
            ↓
       Runtime Adapter
            ↓
        Magpie Runtime
            ↓
       Execution Truth
            ↓
       Cost Accounting
            ↓
   Capability Intelligence
            ↓
       Commercial Policy
            ↓
          Billing

Each layer reads from the layers above it. No layer mutates facts produced by layers above it. Cost is a fact recorded at execution; pricing is bound to that fact at write time; billing is downstream of both. This ordering is the whole design: it is why a bill can always be traced to a run, and a run to the exact configuration that produced it.

The four worlds

World Concepts Role
Studio Capability, Composition Creates business assets
Runtime Adapter Runtime Adapter Transforms business assets into executable assets
Magpie Magpie Runtime, Execution Truth Executes executable assets
Intelligence Layer Cost Accounting, Capability Intelligence Measures what happened

Commercial Policy and Billing sit downstream of the Intelligence Layer as commercial-policy and revenue-collection consumers.

Three projections of one platform

The platform is described three ways, and the three must agree on the facts that matter:

  • Execution architecture — how it runs.
  • Construction architecture — how it is built.
  • Product experience architecture — how operators understand, navigate, own, govern and operate it.

Vocabulary, grouping, visibility and granularity may differ between projections (the substrate says tenantId; the operator surface says "Customer"). What may not differ: the Capability boundary, the immutability of Versions, the measurement-identity tuple, the Magpie / Matter & Gas boundary, the Knowledge / Memory distinction, the Subscription / Entitlement distinction, the replay property and the append-only audit property. When a product decision contradicts an execution or construction invariant, the invariant wins.

Sources

  • matterandgas-com/docs/architecture/platform-mental-model.md (PMM-1.0) — the nine concepts, vertical flow and four worlds, published here nearly verbatim.
  • matterandgas-com/docs/architecture/architectural-truths-v1.md §6 — the projection doctrine.