On this page
- Status: Accepted. Batch 2 (2026-09-10), Track A-1.
- Owners: Platform (site programme).
- Extends: ADR 0012 D8 (an org type is a blueprint), ADR 0019 (default-snapshot law — no per-tenant column for a derivable fact), ADR 0020 D9 (two metric planes), ADR 0038 (tenant dataset semantic layer), ADR 0042 (dashboard packs as data).
- Related: ADR 0049 (dataset connector contract, forthcoming, Batch 3), ADR 0050 (AI metric
authoring +
/admin/metrics, forthcoming, Batch 4).
Context#
"Pillar" names three different things in this codebase, and none of the three is what the operator means by "vertical" (eCom, marketing, HR, finance…):
| Axis | What it decides | Values in code today |
|---|---|---|
| Data plane | trust + gate: the org's own data (DATA gate, chat) vs. a 3rd-party estimate | 1st-party eCom, 1st-party marketing, 3rd-party market-intel (§57/§58/§60d) |
| Ingest family | which queue/promoter/picker group a connector rides (connector) |
marketplace, marketing, market_, content_ |
| Resolver dispatch | which explore. resolver answers a catalog slug (MetricPillar) |
ecom, marketing, social, crm, market, audience |
YouNet HR fits none of the three: no catalog slug (its metrics are DATA per ADR 0020 D9 / ADR 0038),
no eCom-shaped connector output, plane "1st-party tenant dataset". It landed in dataset-workspace,
whose own comment says "owns no pillar" — true for resolver dispatch, false for the product. A fourth,
product-level axis was missing.
Decisions#
D1 — Vertical: one compiled registry indexing the other three axes
packages/plugin-host/src/verticals.ts (plugin-host is the one package both apps/web and
apps/worker already import for taxonomy; it stays free of DB/AI deps). Seven values, each a row
only where at least one of plane, ingest family, metric mechanism or blueprint differs from every
other row:
| vertical | plane | ingest families | metric mechanism | blueprint(s) |
|---|---|---|---|---|
ecom |
1p | marketplace |
catalog (pillar ecom) |
standard-, standard- |
marketing |
1p | marketing |
catalog (marketing, social) |
marketing- |
crm |
1p | marketing (Bitrix24/sheet) |
catalog (pillar crm) |
marketing- (shared today) |
audience |
1p | content_ |
catalog (pillar audience) |
content- |
market |
3p ESTIMATE | market_ |
catalog (pillar market) |
market- |
hr |
1p | dataset (new, ADR 0049) |
dataset packs (ADR 0042) | hr- (new, D3) |
finance |
1p | dataset (new, ADR 0049) |
dataset packs | finance- (sketch, no org) |
Why seven, not five or nine:
socialstays a resolver pillar under themarketingvertical — six catalog slugs, one nav plugin (social-intelligence), no org has ever been provisioned "social only"; folding it in is a registry mapping, not a rename.crmstays its own vertical even though it ships insidemarketing-analyticstoday: it has its own resolver pillar (8 slugs), its own silver (crm_leads/deals/stage_events), and a CRM-only tenant is plausible. Keeping it separate costs one registry row.audienceandmarketare separate verticals because they are already separate planes with separate gates — merging either intomarketingwould misstate what gate its numbers answer to (ADR 0022 D1's own argument).hrandfinanceare the two the operator asked for, and ADR 0038's context line already names them ("HR first, finance next").- No
inventory/creator/settlementvertical: those areownedBysub-domains ofecomand share its plane, connectors and blueprint.
D2 — Where a vertical is DECLARED, and where it is DERIVED
Declared (all additive, all optional, so every existing row parses byte-identically — the contract every ADR 0019/0020/0038 field already follows):
orgBlueprintSchema.verticals?: Vertical[]— the org type's verticals (ADR 0012 D8: an org type is a blueprint).org-blueprint-validity.tsrequires every plugin the blueprint enables whose manifest declares averticalto be a member of this list — a blueprint may not enable an HR connector while claiming to be eCom-only.pluginManifestSchema.vertical?: Verticalonkind:'connector'plugins — groups the/connectorscatalog ("HRM: Odoo" under HR) and feeds the blueprint check above.org_datasets.vertical(nullable text, CHECK over the registry values; no index — the table is small and org-scoped) — distinguishes an HR dataset from a finance dataset in one org, tells the AI metric-authoring flow (ADR 0050) which standard-field vocabulary to propose from, and a pack install stamps it.org_dataset_packs.content.vertical(pack schema field, required for a pack in the repo, audited bydataset-pack-registry-validity.ts).
Derived, never a second hand-written field:
MetricDefinition— DERIVED frompillarthrough the registry (verticalOfPillar).- An ORG's verticals — the union over its applied blueprints (
verticalsForOrg, read fromorg_blueprint_applications), never anorganizations.verticalcolumn. A per-org column here would be a second snapshot of a fact the applied-blueprints join already answers — exactly what ADR 0019's default-snapshot law forbids: a value re-derivable from an existing source of truth does not get its own stored column.
What is NOT done: no rename of MetricPillar, connectorFamily or ownedBy (240+ citations across
resolver dispatch keys and the generated surface registry); no organizations.vertical/org_type
column (see above).
D3 — hr-workspace blueprint; dataset-workspace stays the vertical-less generic
New blueprint hr-workspace v1 (verticals: ['hr']) in apps/web/src/server/org-blueprints/registry.ts:
plugins chat-with-data + connector-google-sheets (+ connector-odoo-hr once ADR 0049 ships,
defaultEnabled:false, listed but not required), disablePlugins = the marketplace set, role grants
identical to dataset-workspace v3 (verified by a blueprint-diff unit test — the menu a YouNet HR
editor/viewer sees does not change), precondition no_active_commerce_connectors, plus a NEW blueprint
step datasetPacks: ['hr-people-analytics']: applyOrgBlueprint declares the pack's datasets
through declarePackDatasets and installs its pages through installDatasetPack for every brand the
org has at apply time (both already idempotent per ADR 0042 D2 / ADR 0038 amendment (d)), skipping a
pack version already installed.
Amended in Batch 5 (D6): hr-workspace is at v2, and its hiddenMenuItems is dataset-workspace's
MINUS briefing — the one deliberate divergence, because the vertical now has a brief persona. The
blueprint-diff test asserts that difference in both directions rather than byte equality.
dataset-workspace remains as the vertical-less generic ("an org whose data is its own datasets,
vertical unknown yet") — it owns the tenant-dataset PLANE and no resolver pillar; it is the base a
vertical workspace specialises.
younet-hr moves from dataset-workspace v2 to hr-workspace v1 by one applyOrgBlueprint on
production (operator-run; additive: same plugins, same grants, pack already at its current version →
the apply writes the org_blueprint_applications row, stamps org_datasets.vertical='hr' on the 12
existing rows, and nothing else — dry-run output must show exactly that before the real apply).
D4 — Two metric mechanisms stay; the registry is the one index; the read surface ships later
ADR 0020 D9 is right and this program keeps it: platform metrics (shared semantics, versioned, §49 one
definition) are code; tenant metrics are data. What was missing was not a merge but an INDEX: the
vertical registry (D1) maps each vertical to its metric mechanism, and one super-admin read surface,
/admin/metrics, will list both sides per vertical (catalog slugs by pillar; dataset packs and, per
org, confirmed dataset fields) — planned for Batch 4 (ADR 0050), not built in this batch. Widgets
already read both through WidgetSpec.dataSources (ADR 0041) — no renderer change here.
D5 — L3-L5 doors kept open; honest mso-17 status
Three doors this program keeps open without building, none claiming a level (mso-17 addendum, same
date):
- A signal may one day point at a tenant-dataset measure — the binding key (org, brand,
datasetVersion,bindingHash) plus a field'sschema_versionalready makeorg_dataset:<key>.<measure>@v<N>an unambiguous, replayable address; the vertical registry records which verticals are 1st-party (signal-eligible) vs. estimate (never a lever input, §60d). Not built: aSignalRefsource kind for datasets. - Levers are per vertical —
OFFTAKE_LEVERSis eCom's; the registry row is where a futurehr/financelever vocabulary would hang. Not built. - Self-proving needs provenance on every number — dataset cells carry dataset key + schema_version +
source binding, catalog metrics carry slug + version + provenance;
/admin/metrics(D4) is the first place both provenances would be visible side by side.
D6 — Every vertical states its Morning Brief persona, or states that it has none
The brief is written for a READER (PERSONAS in @yng/agent), and until Batch 5 the reader set was
owner/ops (commerce) and marketing (media). A vertical with no persona did not fail: it fell
through selectBriefPersonas' commerce default, so an HR org received two commerce documents whose
most prominent sentence was a permanent absence. The stop-gap (BRIEFING_INELIGIBLE_BLUEPRINT_KEYS,
apps/worker/src/briefing-eligibility.ts) suppressed the job instead, which is silence rather than a
wrong answer, and neither state could be caught by a test because the rule was nowhere written down.
The rule: a vertical's row here states which brief persona reads it. A vertical with a persona is
enqueued and its blueprint does not hide briefing; a vertical with none is skipped by the fan-out and
its blueprint hides the item. The two halves move together, in one change.
| vertical | brief persona | enqueued | briefing in nav |
|---|---|---|---|
ecom |
owner, ops |
yes | shown |
marketing |
marketing |
yes | shown |
crm |
marketing (shared blueprint) |
yes | shown |
audience |
none — excluded by design (a corpus deck is not an operational plane, ADR 0035 D1) | yes, but the surface gates itself out | hidden by its own requires |
market |
owner (estimate bullets only) |
yes | shown |
hr |
hr |
yes | shown |
finance |
none yet | no | hidden |
hr (Batch 5): the persona reads the org's own HR rollup — headcount, hires, leavers, turnover rate
and staff-cost variance for the latest month agg_org_dataset_period holds, through the same cells the
HR dashboards render (§49), plus whatever the pack's own alertRules fired. No money figure appears:
salary, staff cost and budget carry sensitivity: 'compensation' and a brief reaches every member of
the org, so the collector drops them at read time.
finance: declared, applied to no org, no persona written. finance-workspace therefore stays on the
ineligible list and keeps briefing hidden — the entry comes off both in the same change that adds the
persona.
WHICH personas an org gets is decided by selectBriefPersonas over BriefOrgShape, whose hr leg is
the org's VERTICAL (this registry, over org_blueprint_applications) and not a probe of whether HR
rows exist this morning: an HR org whose monthly sheet has not synced is still an HR org. The vertical
answers before the pillar set, because metricPillarsIn hands an org matching no pillar the commerce
default, so every HR org reaches the selector looking like a commerce one.
Alternatives considered#
MetricPillar.hr. Rejected: there is no HR resolver, HR numbers are dataset cells; a pillar with zero catalog slugs is a lie themetric-semantics-coverage.pyaudit would have to special-case.organizations.org_typecolumn. Rejected: ADR 0012 D8 already made the blueprint the org type; a column would be a second source of truth for a fact the applied blueprint already states.- Renaming
MetricPillar/connectorFamily/ownedByto "vertical". Rejected: each already names a real, narrower axis (resolver dispatch, ingest routing, ownership sub-domain respectively) with 240+ citations; collapsing three names into one would erase a distinction the code depends on, not simplify it. The registry indexes them instead of replacing them.
Consequences#
- A department-shaped org (HR today, finance next) gets a product-level identity distinct from its resolver pillar, ingest family, and plane — without widening any of those three enums.
- An org's verticals are always a live derivation from its applied blueprints, never a value that can drift from what was actually provisioned.
- A future vertical (a fifth department shape) is a registry row plus a blueprint, not a rename or a new column.
Implementation status (declared 2026-09-10)#
| Decision | Status | Evidence |
|---|---|---|
D1 Vertical enum + compiled registry |
Landed (batch 2) | packages/ |
| D2 declared fields + derived reads | Landed (batch 2) | orgBlueprint, plugin, migration adding org_, org_, org- |
D3 hr- blueprint + pack apply step |
Landed (batch 2) | hr- in apps/; dataset step in applyOrgBlueprint |
| D4 metric-mechanism index | Planned (batch 4) | / — forthcoming ADR 0050 |
| D6 per-vertical brief persona coverage | Landed (batch 5) | PERSONAS/select/hrFactsToBullets (packages/), collect (packages/), apps/, hr- v2 (briefing un-hidden) |
Connector contract (Dataset) |
Landed (batch 3) | ADR 0049 — dataset-/dataset-, sync-, packages/ |
| AI metric authoring | Planned (batch 4) | forthcoming ADR 0050 |
| D5 L3-L5 doors | Landed (batch 2) | mso- addendum — no level claimed |