Commercial model¶
Decision
This page records a decision and its status. A Proposed decision is not binding; an Accepted decision is binding on the Factory until amended or superseded.
Decided on 2026-10-09 (ADR-0020; D34): the Factory supports all three commercial types — internal budget controls, usage-based billing and seat or edition plans — and implements them by extending the ConnectSoft SaaS templates (Tenants, ProductsCatalog, Entitlements, Billing, Metering) for the Factory's own tenants. The Factory is therefore its own first SaaS customer of the Generated SaaS pack's foundations.
Three types, one spine¶
flowchart LR
U["Usage facts<br/>(BC-05: estimated → reserved → observed → reconciled → uncertain)"] --> M["Meters<br/>(SaaS Metering: per tenant, dimension)"]
M --> B1["Internal budgets<br/>(project and run caps, spend approval threshold — D21)"]
M --> B2["Usage billing<br/>(SaaS Billing: subscriptions, invoices on metered usage)"]
E["Editions and plans<br/>(SaaS ProductsCatalog + Entitlements: features, quotas, seats)"] --> B2
E --> Q["Quotas and entitlement checks<br/>(BC-33 Factory Tenancy & Entitlements)"]
Q --> U
| Type | What it is | Where it lives | First stage |
|---|---|---|---|
| Internal budget controls | Project and run budgets, reservation before dispatch, settlement after, approval above the platform spend threshold | Usage Accounting (BC-05) with the SaaS Metering template as the meter store | Required for the first governed workflow |
| Usage-based billing | Metered tokens, runs, tool invocations, sandbox minutes, operated-product capacity, priced per revision and invoiced per subscription | Factory Commercial (BC-34) on the SaaS Billing template | Designed now, activated when a paying tenant exists |
| Seat and edition plans | Editions with feature sets, quotas and seat counts; per-tenant overrides; experiments through the feature-toggle role | SaaS ProductsCatalog + Entitlements templates, Config Platform for flags | Designed now, activated with billing |
Editions (initial definition)¶
| Edition | Intended for | Entitlements |
|---|---|---|
| Developer | A single team trying the Factory | 1 project, read-only and sandbox workflows, shared model profiles, community support |
| Team | A product team | Projects per plan, controlled writes with approvals, usage billing, standard profiles, business-hours support |
| Enterprise | An organization | Unlimited projects, private model profiles and hybrid compute, hybrid or on-prem profiles, SSO federation, editions for generated products, managed operations of generated products (D33), 24×7 support |
| Managed product | A customer whose product the Factory operates | Product operations plan: SLO tier, upgrade cadence, incident response, per-product capacity metering |
Edition definitions are published assets (Draft → InReview → Published) owned by Platform admin; entitlement checks are evaluated by BC-33 at submission and at every gated action.
Meters¶
| Meter | Dimension | Source of truth |
|---|---|---|
model.tokens |
tenant, project, profile, provider | Model gateway receipts (BC-07) |
runs.accepted, runs.completed |
tenant, project, workflow | Run Control events |
tools.invocations |
tenant, tool, side-effect class | Tool executor receipts (BC-08) |
sandbox.minutes |
tenant, pool | Execution Capacity (BC-26) |
storage.gb |
tenant, store | Knowledge and artifact stores |
product.capacity |
tenant, product, SLO tier | Fleet Inventory (BC-35) |
Prices are versioned (pricingRevision); a usage record keeps the revision it was priced with, so invoices can be reproduced. Unknown usage (provider timeout without a receipt) stays uncertain and is reconciled, never zeroed.
Separation from generated products¶
A generated product's tenants, editions, subscriptions and invoices belong to the product and its owner; they run on the same templates but in the product's own stores and audience (ADR-0015 point 4). Operating a product as a managed service is metered by the Factory as product.capacity and billed to the Factory customer; the product's own revenue is the customer's.
Current implementation¶
The five SaaS templates exist with descriptors and schemas; ConnectSoft.Saas.MeteringTemplate has real transactional usage and quota logic; ConnectSoft.Extensions.Saas.Billing and .Metering provide tenant-scope markers. No Factory usage accounting, budget, edition or invoice exists.