From 864751891e0389c46c923ef8d7fd5b1ec48cc131 Mon Sep 17 00:00:00 2001 From: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Date: Thu, 3 Dec 2026 14:24:07 +0100 Subject: [PATCH] Clarify configuration policy and override precedence --- .../Principles/Software-Design.md | 46 +++++++++++++------ .../Ways-of-Working/Repository-Standard.md | 14 ++++-- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/docs/Ways-of-Working/Principles/Software-Design.md b/src/docs/Ways-of-Working/Principles/Software-Design.md index c1ea70d..961f853 100644 --- a/src/docs/Ways-of-Working/Principles/Software-Design.md +++ b/src/docs/Ways-of-Working/Principles/Software-Design.md @@ -31,25 +31,45 @@ A feature available only through one client does not satisfy the shared API cont ## Smart defaults, local overrides -The default is the smart, secure choice for normal use and when the user has no reason to override it. A system with no configuration is correct, safe, and useful. Configuration expresses a deliberate deviation from the default, not a prerequisite for basic use. +Choose a safe, useful default so normal use needs no local configuration. Apply +[least privilege](Purpose-and-Direction.md#least-privilege) and +[secure by default](#secure-by-default) to permissions and security. -Set the default at the broadest scope, and let each narrower scope override it. The setting closest to the thing it controls wins: +### Authority -```text -org / ecosystem the widest default — set once, inherited everywhere -└── repository may narrow the default for one codebase - └── directory may narrow it further for one area - └── item the last word — closest to what it configures -``` +A **required policy** binds every scope to which it applies. An +**overridable default** supplies a value when no applicable layer provides a +permitted override. A configuration layer can declare both. Check each rule +separately. -This hierarchy supports two properties: +A narrower scope may add compatible constraints. It must not weaken a required +policy by omitting or overriding a setting. Make a delegated choice within the +bounds of the governing rule. For a documented exception that applies, follow +the route the governing rule specifies. If rules conflict or authority is +unclear, refer the decision to the owner of the governing rule. -- **Manageable across the wide.** Change the default once. Items without a local override inherit it. No duplicate configuration needs manual editing. -- **Flexible in the narrow.** A local edit defines the exception beside the item that needs it. It does not change the default for other items. +For example, [Repository Governance](../../Capabilities/repository-governance/spec.md#exemption) +requires an explicit declaration for exemption. A repository with no declared +type uses the default type instead. -Make the shared default and local override easy to set. When they differ, the more specific setting wins by its position in the hierarchy. Do not add special cases to change that order. +### Precedence -The safe choice requires no extra setup because it is the default. A deliberate local override contains the exception. [Least-privilege](Purpose-and-Direction.md#least-privilege) and [secure by default](#secure-by-default) apply this principle to permissions and security. Documentation uses the same hierarchy to connect beliefs and practices. +Set a shared default at the broadest scope where it applies. Each configurable +contract must identify the applicable layers and their order of precedence. +Resolve permitted values in that order. If a layer omits a setting, inherit the +next applicable value. A supported override replaces or extends the inherited +value as the contract specifies. For each collection, state whether the values +combine or the supplied collection replaces the inherited one. + +For example, a permitted repository-local community file takes precedence over +the [organization default](../Organization-Standard.md#community-files-are-organization-defaults). + +### Value intent + +For each configurable contract, state whether it accepts an explicit empty +value and what that value means if accepted. Omission, an empty string, and an +empty collection do not automatically have the same meaning. An explicit empty +value is not an exception to a required policy. ## Secure by default diff --git a/src/docs/Ways-of-Working/Repository-Standard.md b/src/docs/Ways-of-Working/Repository-Standard.md index dc4f270..606d755 100644 --- a/src/docs/Ways-of-Working/Repository-Standard.md +++ b/src/docs/Ways-of-Working/Repository-Standard.md @@ -7,9 +7,16 @@ description: The baseline files and behaviors every repository must expose so it A repository is the smallest unit of ownership in the MSX ecosystem. It must explain what it is, how to contribute, how security is handled, how dependencies are kept current, and which standards govern its automation. -The Repository Standard is the default for every governed repository across the MSX Enterprise, regardless of initiative, organization, or technology. It defines the baseline contract a repository must meet to be understandable, secure, and maintainable on its own. +The Repository Standard defines the ecosystem baseline for every governed +repository, regardless of initiative, organization, or technology. -Initiative standards operate at the same altitude as the ecosystem repository standard, not beneath it. An initiative such as PSModule adds to and adjusts these defaults for its repository types rather than merely implementing them. A repository inherits every baseline rule unless its initiative explicitly changes it; where an initiative standard adds or overrides a rule, the initiative standard governs that initiative's repositories. +An applicable **required policy** remains binding unless a documented exception +applies under its governing rule. Initiative standards may add compatible +requirements and make choices that the governing rule delegates. When an +initiative standard documents a permitted change to an **overridable default**, +the initiative value takes precedence over the ecosystem default for the +repositories to which the change applies. See +[Smart defaults, local overrides](Principles/Software-Design.md#smart-defaults-local-overrides). Initiative documentation owns implementation details such as exact file templates, managed-file source paths, and rollout automation. @@ -230,7 +237,8 @@ Managed-file pull requests should clearly say: ## Initiative implementation guidance -The central standard deliberately stops at the requirement level, and initiative standards operate at the same altitude rather than beneath it: an initiative adds to and adjusts these defaults for its repository types, and a repository inherits every rule this standard sets unless its initiative explicitly changes it. Where an initiative standard adds or overrides a rule, the initiative standard governs that initiative's repositories. Within that relationship, initiative repositories own implementation design. +Initiative repositories own the implementation design, subject to the +[baseline and initiative override rules](#repository-standard). An initiative should document: