Context
0134 gives every field one of six classes (public, internal, pii, financial, secret, regulated) with
“fixed effects” it never lists. 0341 adds product classes, privileged, and four effects: ai, support, search
and export. Wave 10 shipped DataClass and the enums (AiAudience, SupportAccess, SearchSnippet,
ExportLabel) with snake_case codes, and only privileged with values, because the six are a policy decision. Four
products answered the same policy in four places (X2-35); the owner’s principle makes the values data, while the
handling of a secret is a safety floor.
Decision
-
Effects are seed data in
data-classrecords.seed-pack:osholds onedata-class:<key>record per class with itsai,support,search,exportandregioneffects. Products seed their own classes in their seed packs. A product or a tenant may tighten a class’s effects, never loosen them below the floor of decision 3. -
Seeded values for the built-in classes.
Product classes named by the answers are seeded the same way: medical and health as
privileged(in-region, zero retention, tenant opt-in), safeguarding withai: never(X2-35). -
The floor is code. Code holds the order of strictness of each effect (
neveris stricter thantenant_opt_in, which is stricter thanallowed;hiddenthanvisible;no_snippetthansnippet;in_region_zero_retentionthanin_regionthanany) and one invariant from 0134 decision 5: asecretfield is never stored in audit, never indexed, never exported, never logged and never given to a model, whatever a record says. The seed loader refuses adata-classrecord that loosens a class below its floor. -
A fifth effect,
region. The model router of@stackra/aireadsregionto choose a model provider for a context that holds the class (any,in_region,in_region_zero_retention). It joins the four effects of 0341 in@stackra/modeland in a product’sDataClassoptions. -
Snake_case codes. The effect values are the snake_case codes of
0231 (
tenant_opt_in,no_snippet); 0341’s camelCase spellings are read as these. -
Values. Seed data: every
data-classrecord. Settings: a tenant’s tightening (for example turning AI off forpii), resolved through the settings cascade with the seeded value as the product default. Rule sets: per-action AI approval modes stay inrule-set:<product>:ai-approval(0360). Code: the strictness order and the secret invariant.
Consequences
- One table answers what an agent, a support engineer, search and an export may do with each class, and a product cannot weaken it.
- The AI context builder, support access, the search indexer and the export writer read records, not constants.
- Adding
regionis a change to@stackra/modeland the AI router.
Enforcement
planned — thedata-class kind’s validator in the seed registry
(0374 decision 2) refuses a
loosened class; a @stackra/model test fixes the strictness order; the secret invariant is tested in the audit,
search and export writers.
Supersedes and sources
Supersedes: none. Amends, when accepted: 0134 decision 2 (the effects are listed here) and 0341 decision 2 (a fifth effect; snake_case codes). Sources:notes/handover/build-wave10-2026-10-25.md (data builder, question 3);
notes/handover/review-round-2/cross.md (X2-35); notes/handover/review-round-4/whole-plan.md (R4-11, no new class
for government matters).