Context
The scope tree was first described as a Pro package,@stackra-pro/scope. The owner’s later answer (mem L878, 2026-10-20 night) changed it: the tree is free code everywhere, and plans unlock depth (the numbers are in ADR 0242). Settings and IAM share the tree. The rule tenancy and the constitution’s tenancy page still described the Pro package, which this ADR corrects.
Decision
- Free code. The scope tree is free code in
@stackra/iamand@stackra/tenancy. There is no@stackra-pro/scopepackage. - Depth is a plan entitlement. Depth is a plan entitlement; the numbers are in ADR 0242 (Starter 2, Pro 4, Business 8, Enterprise unlimited, with no Free plan). The plan entitlement is the gate (ADR 0215).
- Shared tree. Settings (ADR 0213) and IAM (ADR 0208) use the same tree.
- Rules updated.
.agents/rules/tenancy.md(point 3) and the constitution’s tenancy page (the “Scope tree” section) describe free code with depth by plan, in the same change as this ADR. - The rest of the shape stays. Nodes use
scope_idas their primary key. Tables that belong to a node carryscope_idand a denormalisedscope_pathwith a GiST index (ADR 0239 keeps this out of the business-table policy).
Consequences
- A product gets the tree without a separate package, and its depth is sold as a plan.
- A deep tree costs the same to store as a shallow one, so the plan gate is the only control on depth.
Enforcement
planned — the depth check against the plan entitlement at tree creation; the validator rejects a@stackra-pro/scope dependency.
Supersedes and sources
Supersedes: the scope-tree part of 0088 and the Pro statements of 0208. Sources: owner scope-tree answer (stackra-decisions-2026-10-19.md L878, 2026-10-20 night); gap analysis P0-5 (B-06); contradiction C-04b.