Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions src/docs/Ways-of-Working/Principles/Software-Design.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
14 changes: 11 additions & 3 deletions src/docs/Ways-of-Working/Repository-Standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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:

Expand Down
Loading