> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackra.figentra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 0363 — Configuration over code: business behaviour is data, rules, workflows and studios

> Proposed · 2026-10-25

> [!NOTE]
>
> Note 2026-10-26 (STA-806): open question 1 (pack home) is settled by
> [0370](https://docs.stackra.figentra.com/adr/0370-market-packs-signed-dated-overlaid-data-with-pins-and-legal-floors.md), a new
> package, `@stackra/market-packs`, not part of `@stackra/settings`. Open question 3 has the owner's
> answer RV-4 (review round 2, X2-18): a record follows the pack of its legal entity (or its Market
> for a sale), and a shared process takes the strictest active pack, which
> [0385](https://docs.stackra.figentra.com/adr/0385-market-packs-a-pack-per-rule-subject-for-records-that-touch-two-markets-nested-overlays-and-storage-by-content-hash.md)
> proposes as a pack per rule subject. Open question 2 (who signs) is proposed in
> [0386](https://docs.stackra.figentra.com/adr/0386-market-pack-signing-the-platform-release-service-holds-the-key-reviewers-sign-off-per-key.md).
> These ADRs are Proposed; this page's own status is unchanged.

> [!NOTE]
>
> Proposed. When accepted, it adds a dated Note to
> [0203](https://docs.stackra.figentra.com/adr/0203-the-commercial-model-billing-provider-and-tier-names.md),
> [0242](https://docs.stackra.figentra.com/adr/0242-commercial-model-plan-ladder-add-ons-metric-and-trial.md),
> [0210](https://docs.stackra.figentra.com/adr/0210-tenancy-recursive-tenant-tree-lifecycle-one-context-and-region.md),
> [0189](https://docs.stackra.figentra.com/adr/0189-privacy-operations-and-data-retention.md),
> [0343](https://docs.stackra.figentra.com/adr/0343-cross-tenant-record-sharing-consented-copies-fed-by-events.md),
> [0220](https://docs.stackra.figentra.com/adr/0220-stackra-money-and-the-ledger-package.md),
> [0268](https://docs.stackra.figentra.com/adr/0268-register-answers-thin-items-r1-to-r18.md),
> [0192](https://docs.stackra.figentra.com/adr/0192-translation-workflow-and-arabic-defaults.md),
> [0186](https://docs.stackra.figentra.com/adr/0186-backups-and-disaster-recovery.md) and
> [0360](https://docs.stackra.figentra.com/adr/0360-the-ai-chain-four-layers-one-spine-approval-modes-and-the-never-bypass-floor.md)
> (the items listed in `notes/handover/adr-hardcoding-findings.md`). It reads with
> [0213](https://docs.stackra.figentra.com/adr/0213-settings-v2-cascade-flags-as-a-kind-yaml-packs-and-revisions.md) (settings cascade),
> [0331](https://docs.stackra.figentra.com/adr/0331-stackra-rules-one-condition-engine-for-every-rule-consumer.md) (rules),
> [0153](https://docs.stackra.figentra.com/adr/0153-automations-run-as-principals-and-every-package-exposes-building-blocks.md)
> (automations),
> [0270](https://docs.stackra.figentra.com/adr/0270-builder-architecture-one-editor-kernel-document-kinds-and-collaboration-levels.md)
> (builder document kinds),
> [0356](https://docs.stackra.figentra.com/adr/0356-choosing-a-provider-per-tenant-and-market-through-the-connection-with-a-market-default.md)
> (provider per Market) and
> [0359](https://docs.stackra.figentra.com/adr/0359-modes-and-configuration-environments-display-modes-sandbox-promotion-and-live-records.md)
> (sandbox and live).

## Context

The owner ruled on 2026-10-25 that every business answer is a default configuration, seeded as data and editable in
each product's admin. Several Stackra ADRs still carry business values: the plan ladder in [0242](https://docs.stackra.figentra.com/adr/0242-commercial-model-plan-ladder-add-ons-metric-and-trial.md), tier names in [0203](https://docs.stackra.figentra.com/adr/0203-the-commercial-model-billing-provider-and-tier-names.md),
country tax rules "in OS code" in [0220](https://docs.stackra.figentra.com/adr/0220-stackra-money-and-the-ledger-package.md) and [0268](https://docs.stackra.figentra.com/adr/0268-register-answers-thin-items-r1-to-r18.md), named privacy laws in [0189](https://docs.stackra.figentra.com/adr/0189-privacy-operations-and-data-retention.md) and [0343](https://docs.stackra.figentra.com/adr/0343-cross-tenant-record-sharing-consented-copies-fed-by-events.md), and a 100-recipient threshold in
[0360](https://docs.stackra.figentra.com/adr/0360-the-ai-chain-four-layers-one-spine-approval-modes-and-the-never-bypass-floor.md). A mechanism that names a country or a price cannot serve a second market or a second product without a code
change. Stackra already has the pieces: the settings cascade ([0213](https://docs.stackra.figentra.com/adr/0213-settings-v2-cascade-flags-as-a-kind-yaml-packs-and-revisions.md)), the rules engine ([0331](https://docs.stackra.figentra.com/adr/0331-stackra-rules-one-condition-engine-for-every-rule-consumer.md)), the workflow engine
([0153](https://docs.stackra.figentra.com/adr/0153-automations-run-as-principals-and-every-package-exposes-building-blocks.md)), the builder document kinds ([0270](https://docs.stackra.figentra.com/adr/0270-builder-architecture-one-editor-kernel-document-kinds-and-collaboration-levels.md)) and provider choice per Market ([0356](https://docs.stackra.figentra.com/adr/0356-choosing-a-provider-per-tenant-and-market-through-the-connection-with-a-market-default.md)).

## Decision

1. **Code holds mechanism only.** Engines, ports, drivers, studios and importers are code. Business behaviour is not:
   prices, plans, tiers, seat kinds, modules, fees, limits, trials, offers, policies and thresholds are data.
2. **Four homes for business behaviour.**
   * **Data:** catalogue records and settings, edited in each product's admin.
   * **Rules:** any decision with a condition is a rule set in `@stackra/rules` ([0331](https://docs.stackra.figentra.com/adr/0331-stackra-rules-one-condition-engine-for-every-rule-consumer.md)). Return windows, deposits, cash
     on delivery, approvals, tips, service charges, discount permits and commissions are rule sets.
   * **Workflows:** any multi-step flow is a workflow template ([0153](https://docs.stackra.figentra.com/adr/0153-automations-run-as-principals-and-every-package-exposes-building-blocks.md)).
   * **Studios:** screens, forms, dashboards, reports and print documents are builder documents ([0270](https://docs.stackra.figentra.com/adr/0270-builder-architecture-one-editor-kernel-document-kinds-and-collaboration-levels.md)).
3. **Market packs.** A country or legal area is a market pack: versioned data with effective dates that holds tax,
   e-invoicing, till fiscal rules, legal floors, carriers, payment and messaging providers, sign-in and verification
   methods, holidays, address format, currency and languages. Overlays (a free zone, an EU member state) extend a base
   pack. No Stackra package names a country. A driver may serve one country; choosing it is pack data through the
   Connection rule of [0356](https://docs.stackra.figentra.com/adr/0356-choosing-a-provider-per-tenant-and-market-through-the-connection-with-a-market-default.md).
4. **Legal floors are pack data.** A legal minimum or maximum (a withdrawal period, a reporting window, a retention
   period, a tax rate) is a floor in the pack. The settings resolver and the rules engine refuse a value past the floor
   and say which pack and law set it. Code holds the check, never the number.
5. **Settings layers.** The cascade of [0213](https://docs.stackra.figentra.com/adr/0213-settings-v2-cascade-flags-as-a-kind-yaml-packs-and-revisions.md) decision 2 is read as four business layers: platform floor, product
   default, tenant, user. A narrower layer may only tighten a floor. Each key declares live or sandbox ([0359](https://docs.stackra.figentra.com/adr/0359-modes-and-configuration-environments-display-modes-sandbox-promotion-and-live-records.md) decisions
   3 to 5).
6. **Plan catalogue.** Each product's tiers, seat kinds, modules, limits, trials and offers are records in a plan
   catalogue read by entitlements ([0215](https://docs.stackra.figentra.com/adr/0215-entitlements.md)) and billing ([0358](https://docs.stackra.figentra.com/adr/0358-the-stackra-licence-and-one-billing-engine-with-the-seller-as-a-parameter.md)). A seat meter counts the principal kinds the catalogue
   names as seats. An ADR may name the kinds of limit; it never fixes their values.
7. **Seeds.** A product's defaults ship as its seed pack ([0325](https://docs.stackra.figentra.com/adr/0325-launch-readiness-release-rules-edge-caching-and-update-strategy.md) decision 7, [0190](https://docs.stackra.figentra.com/adr/0190-seed-profiles-and-product-analytics.md)), loaded into the platform and into
   every new sandbox. Changing a default is a seed change and a data migration, not a release of code.
8. **Thresholds in floors.** A platform safety threshold (for example the bulk-send size of [0360](https://docs.stackra.figentra.com/adr/0360-the-ai-chain-four-layers-one-spine-approval-modes-and-the-never-bypass-floor.md) decision 8) is a
   platform-floor setting. A tenant may make it stricter, never looser.
9. **Tests check shape, not values.** A test may check that the seed matches its schema and respects the floors. It
   never asserts a business number copied from an ADR.

## Consequences

* A new country is a new pack and its drivers, not a code change. A new price or plan is an admin edit.
* `@stackra/settings` needs a floor-aware resolver, and `@stackra/rules` needs to read pack floors.
* A market-pack loader, a plan-catalogue model and a seed compiler need homes (see `stackra-package-needs.md`).
* ADRs get shorter: they keep the mechanism and point to the seed for values.
* Reviewers must refuse a pull request that adds a country branch, a price or a policy value to code.

## Enforcement

planned — a lint rule that flags country codes, currency codes and tier names in package source outside packs and
tests; a seed-schema test per product; a resolver test that a tenant value past a pack floor is refused with the
pack and law named.

## Open questions

1. **Pack home.** Whether the market-pack loader is a new package or part of `@stackra/settings` is not decided.
2. **Pack authorship.** Who signs a pack version (counsel, a local reviewer) before it goes live is not decided.
3. **Floor conflicts across packs.** For a tenant active in two markets, which pack wins for a shared record (the
   strictest, or the pack of the record's legal entity) is not decided.

## Supersedes and sources

Supersedes: none. Adds Notes to [0203](https://docs.stackra.figentra.com/adr/0203-the-commercial-model-billing-provider-and-tier-names.md), [0242](https://docs.stackra.figentra.com/adr/0242-commercial-model-plan-ladder-add-ons-metric-and-trial.md), [0210](https://docs.stackra.figentra.com/adr/0210-tenancy-recursive-tenant-tree-lifecycle-one-context-and-region.md), [0189](https://docs.stackra.figentra.com/adr/0189-privacy-operations-and-data-retention.md), [0343](https://docs.stackra.figentra.com/adr/0343-cross-tenant-record-sharing-consented-copies-fed-by-events.md), [0220](https://docs.stackra.figentra.com/adr/0220-stackra-money-and-the-ledger-package.md), [0268](https://docs.stackra.figentra.com/adr/0268-register-answers-thin-items-r1-to-r18.md), [0192](https://docs.stackra.figentra.com/adr/0192-translation-workflow-and-arabic-defaults.md), [0186](https://docs.stackra.figentra.com/adr/0186-backups-and-disaster-recovery.md) and [0360](https://docs.stackra.figentra.com/adr/0360-the-ai-chain-four-layers-one-spine-approval-modes-and-the-never-bypass-floor.md). Sources: owner
principle of 2026-10-25 (`notes/handover/os/owner-answers.md`, last section);
`notes/handover/adr-hardcoding-findings.md`; `notes/handover/config-model.md`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.