xdrs-core 0.46.2 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -82,7 +82,7 @@ ADR and EDR share the same six technical subject names (see [`_core-adr-policy-0
|
|
|
82
82
|
- `standard` — see [`_core-adr-policy-014`](014-standard-scope-type.md)
|
|
83
83
|
- `_local` — see [`_core-adr-policy-015`](015-local-scope-type.md)
|
|
84
84
|
- Scope name suffixes are unlimited and MAY be used in any scope type.
|
|
85
|
-
- When writing or generating a new XDRS root `index.md`, use the following default ordering (scopes listed later override earlier ones): `core → reference → platform → standard → _local`. Custom-type scopes SHOULD be placed in the `standard` position.
|
|
85
|
+
- When writing or generating a new XDRS root `index.md`, use the following default ordering (scopes listed later override earlier ones): `core → reference → platform → standard → _local`. Custom-type scopes SHOULD be placed in the `standard` position. This ordering is the **default fallback** for conflict resolution between scopes: `extends:` declarations (Section D of `_core-adr-policy-010`) take precedence over it for policy document inheritance, and `follows:` declarations govern authoring governance rules independently. See `_core-adr-policy-010.36-root-index-ordering-fallback` for the full normative definition.
|
|
86
86
|
- **Scope index frontmatter fields:** Every scope's `index.md` MUST include the following YAML frontmatter. Fields match the Policy frontmatter standard (`_core-adr-policy-002`) in purpose, adjusted for scope-level semantics:
|
|
87
87
|
- `name` (required): The scope identifier, MUST exactly match the scope directory name (e.g., `myteam`, `cloud-platform-aws`). Used by tools to verify scope identity.
|
|
88
88
|
- `description` (required): Short overview of what this scope covers and who the intended audience is. Used by AI agents for discovery and relevance matching. Max 40 words.
|
|
@@ -91,7 +91,7 @@ ADR and EDR share the same six technical subject names (see [`_core-adr-policy-0
|
|
|
91
91
|
- `valid-from` (required): ISO date (YYYY-MM-DD) from which this scope became active.
|
|
92
92
|
- `metadata` (optional): Arbitrary key-value map for additional scope metadata.
|
|
93
93
|
- `follows` (optional): Core scope names whose Policies apply as mandatory governance conventions to this scope, beyond `_core`. Last-listed takes precedence on conflicts (e.g., `follows: myarea-core, shared-standards`). All referenced scopes MUST exist in the workspace; if any is absent, READ/WRITE/REVIEW operations MUST fail.
|
|
94
|
-
- `extends` (optional): Scope names whose **policy documents** (decision records only — not skills, articles, research, or plans) are inherited by this scope as if they were authored here. Any scope type except `_local` and `_core` may be referenced. Last-listed extended scope takes precedence on conflicts; the extending scope's own policies always take highest precedence. Depth-first transitive resolution applies: if A extends [B, C] and B extends [D], the effective precedence order is D < B < C < A. `extends:` and `follows:` MUST reference disjoint scope sets. All referenced scopes MUST exist in the workspace; if any is absent, READ/WRITE/REVIEW operations MUST fail. When an extending scope's policy overrides an inherited policy on the same topic, a `## Conflicts` section MUST document the override. Scopes referenced only via `extends:` chains (not entry scopes in the root index) are exempt from the root index link requirement. See `_core-adr-policy-010` Section D (rules 27–35) for full normative rules.
|
|
94
|
+
- `extends` (optional): Scope names whose **policy documents** (decision records only — not skills, articles, research, or plans) are inherited by this scope as if they were authored here. Any scope type except `_local` and `_core` may be referenced. Last-listed extended scope takes precedence on conflicts; the extending scope's own policies always take highest precedence. Depth-first transitive resolution applies: if A extends [B, C] and B extends [D], the effective precedence order is D < B < C < A. `extends:` and `follows:` MUST reference disjoint scope sets. All referenced scopes MUST exist in the workspace; if any is absent, READ/WRITE/REVIEW operations MUST fail. When an extending scope's policy overrides an inherited policy on the same topic, a `## Conflicts` section MUST document the override. Scopes referenced only via `extends:` chains (not entry scopes in the root index) are exempt from the root index link requirement. `extends:` takes precedence over root index ordering for conflict resolution between the scopes involved; root index ordering is the fallback for all other scope pairs. See `_core-adr-policy-010` Section D (rules 27–35) and Section E (rule 36) for full normative rules.
|
|
95
95
|
- `license` (optional): SPDX identifier for the scope's content license.
|
|
96
96
|
- `metadata` (optional): Arbitrary key-value map for additional scope metadata.
|
|
97
97
|
- **Subjects:** The subject folder MUST be chosen per [`_core-adr-policy-016`](016-policy-subjects.md), which defines allowed subjects, full descriptions, examples, and disambiguation tiebreakers.
|
|
@@ -100,13 +100,14 @@ ADR and EDR share the same six technical subject names (see [`_core-adr-policy-0
|
|
|
100
100
|
- **Links:** Use relative paths for all links; MUST NOT use absolute paths starting with `/`.
|
|
101
101
|
- **Indexes**
|
|
102
102
|
- Every document in the collection (Policies, skills, articles, research, and plans) MUST be reachable through the index chain: root index → scope index → type index → document. A document that exists on disk but is not linked from its canonical type index is considered an orphan and MUST be added to the index or removed.
|
|
103
|
+
- Index files MUST NOT contain policy rules or normative requirements. Those MUST be placed in dedicated Policy documents. Indexes are navigation artifacts only: links and short descriptions.
|
|
103
104
|
- Keep a canonical type index with all documents of a certain type+scope in `[xdrs-root]/[scope]/[type]/index.md`. The type index MUST link to every Policy, skill, article, research, and plan under that type+scope.
|
|
104
105
|
- Canonical index requirements:
|
|
105
106
|
- Organize XDRS documents by subject for easier navigation
|
|
106
107
|
- Add a short description of what this scope is about (responsibilities, general worries, teams involved, link to discussion process, etc)
|
|
107
108
|
- Add links to related scope indexes that this scope might override or be overridden by (scopes listed last override earlier ones on the same topic).
|
|
108
109
|
- Each XDRS element entry MUST include a short description. SHOULD use an imperative statement or the question it answers (<15 words). Example: "Use this while planning a new feature", "What communication tone we use with our customers?"
|
|
109
|
-
- Outside the scopes, keep a root index in `[xdrs-root]/index.md` that links to each scope index (`[xdrs-root]/[scope]/index.md`). Add the text "XDRS scopes listed last override the ones listed first". The root index MUST NOT link directly to type indexes; readers navigate from the scope index to the type indexes. Use the link text pattern `View scope [scope_name]` for each scope link (e.g. `[View scope myteam] linking to (myteam/index.md)`).
|
|
110
|
+
- Outside the scopes, keep a root index in `[xdrs-root]/index.md` that links to each scope index (`[xdrs-root]/[scope]/index.md`). Add the text "XDRS scopes listed last override the ones listed first" followed by a note that `extends:` and `follows:` declarations in individual scope indexes take precedence over this ordering for their respective resolution concerns (see `_core-adr-policy-010.36-root-index-ordering-fallback`). The root index MUST NOT link directly to type indexes; readers navigate from the scope index to the type indexes. Use the link text pattern `View scope [scope_name]` for each scope link (e.g. `[View scope myteam] linking to (myteam/index.md)`).
|
|
110
111
|
- MUST verify if indexes are up to date after making changes
|
|
111
112
|
- **Scope index**
|
|
112
113
|
- Each scope folder MUST maintain an `index.md` file at `[xdrs-root]/[scope]/index.md`.
|
|
@@ -81,7 +81,7 @@ Policy documents are the authoritative source of truth for their scope, type, an
|
|
|
81
81
|
- When research exists for a decision, the Policy SHOULD mention the related research documents after the `## Considered Options` list.
|
|
82
82
|
- MUST NOT use emojis in contents.
|
|
83
83
|
- File names MUST be lowercase.
|
|
84
|
-
- For diagram
|
|
84
|
+
- For diagram and asset rules in Policy documents, see [`_core-adr-policy-020`](020-media-and-asset-standards.md). Rule `02-policy-diagram-restrictions` below summarises the overall stance; the detailed rules are in policy 020.
|
|
85
85
|
- Avoid using lengthy instructions on the Policy. If there are long and detailed instructions related to the Policy, or instructions that are outside the decision, create another file with a guide. If the guide is small, keep it in the Policy itself.
|
|
86
86
|
- Policies SHOULD be under 1300 words long as a rule of thumb.
|
|
87
87
|
- This is important to make them focused on a clear decision
|
|
@@ -99,6 +99,10 @@ When a policy's frontmatter includes `freeze-reference: true`, the policy MUST N
|
|
|
99
99
|
|
|
100
100
|
Content-level checks that do not affect the policy's reference (required sections, word count, emojis, broken outgoing links, structured rule block format, normative language) remain enforced. The `valid-from` date is not taken into consideration when evaluating whether `freeze-reference` applies.
|
|
101
101
|
|
|
102
|
+
#### 02-policy-diagram-restrictions
|
|
103
|
+
|
|
104
|
+
Images and diagrams in Policy documents are subject to strict restrictions: images MUST NOT be used; diagrams SHOULD be avoided and are only allowed in direct and punctual cases where directly connected to the decision. Diagram content has no normative force and must not be used for enforcement. For full rules see [`_core-adr-policy-020`](020-media-and-asset-standards.md) rules `10` through `14`.
|
|
105
|
+
|
|
102
106
|
**Policy template**
|
|
103
107
|
|
|
104
108
|
All Policies MUST follow this template
|
|
@@ -223,17 +223,25 @@ When loading the effective policy set for a scope, tools and agents MUST resolve
|
|
|
223
223
|
|
|
224
224
|
Deduplication: if the same scope name appears more than once in the depth-first traversal, keep only the first occurrence. When a scope's policy overrides an inherited policy on the same topic, the overriding policy MUST include a `## Conflicts` section (see rule 34).
|
|
225
225
|
|
|
226
|
-
Note: the `extends:` content-precedence chain is independent of Section C rule 24. `extends:` determines which policy documents are in scope; rule 24 determines which authoring rules apply.
|
|
227
|
-
|
|
228
226
|
#### 34-extends-conflict-declaration
|
|
229
227
|
|
|
230
|
-
When an extending scope's
|
|
228
|
+
When an extending scope's policy overrides an inherited policy, or when extended scopes address the same topic differently, the higher-precedence policy MUST include a `## Conflicts` section that:
|
|
231
229
|
|
|
232
230
|
- Names the conflicting policy (scope and policy ID) being overridden or superseded.
|
|
233
|
-
- Explains why the override
|
|
231
|
+
- Explains why the override exists.
|
|
234
232
|
|
|
235
|
-
An undeclared
|
|
233
|
+
An undeclared conflict MUST be surfaced during review (see `_core-adr-policy-010.34-extends-conflict-declaration`).
|
|
236
234
|
|
|
237
235
|
#### 35-extends-index
|
|
238
236
|
|
|
239
|
-
Scopes referenced only via `extends:` chains and not linked in the root `index.md` are **exempt** from the "root index must link all scopes" requirement.
|
|
237
|
+
Scopes referenced only via `extends:` chains and not linked in the root `index.md` are **exempt** from the "root index must link all scopes" requirement. If a scope is both referenced via `extends:` AND linked in the root index, tools SHOULD warn of ambiguous dual precedence using warning code `_core-adr-policy-010.35-extends-index`.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
**Section E — Root index ordering and global conflict resolution**
|
|
242
|
+
|
|
243
|
+
#### 36-root-index-ordering-fallback
|
|
244
|
+
|
|
245
|
+
The root `index.md` ordering ("scopes listed last override the ones listed first") is the **default fallback** for policy document conflict resolution. `extends:` takes precedence: when a scope explicitly `extends:` another, the `extends:` chain (Section D, rule 33) governs; root index ordering MUST NOT be used to resolve conflicts between those scopes. For all other scope pairs, agents and tools MUST treat the later-listed scope in the root `index.md` as providing the overriding policy.
|
|
246
|
+
|
|
247
|
+
`follows:` is independent of policy document conflict resolution. It governs authoring governance rules only (Section C, rule 24). Agents reading a single scope's `index.md` MUST also read the root `index.md` to determine conflict resolution order absent an `extends:` relationship.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: _core-adr-policy-020-media-and-asset-standards
|
|
3
|
-
description: Defines the preferred order for representing visual information and the rules for non-Markdown assets across all XDRS document types. Use when choosing a diagram format or referencing any non-Markdown file in any XDRS document.
|
|
3
|
+
description: Defines the preferred order for representing visual information and the rules for non-Markdown assets across all XDRS document types, including policy-document-specific restrictions on images and diagrams. Use when choosing a diagram format or referencing any non-Markdown file in any XDRS document.
|
|
4
4
|
apply-to: All XDRS document types
|
|
5
5
|
valid-from: 2026-08-06
|
|
6
6
|
---
|
|
@@ -34,10 +34,10 @@ Mermaid.js SHOULD be used for diagrams that require explicit visual representati
|
|
|
34
34
|
draw.io SHOULD be used when Mermaid cannot adequately express the needed diagram — for example, custom visual layouts, freehand annotations, or combined view types that Mermaid does not support natively. draw.io SHOULD also be used when the diagram is expected to be edited directly by users in a graphical tool and its structure fits the draw.io editing model (e.g., boxes, connectors, swimlanes, layered layouts). draw.io diagrams MUST be saved as `.drawio` files in the sibling `.assets/` folder and referenced directly from the Markdown document.
|
|
35
35
|
|
|
36
36
|
#### 05-svg-for-custom-vector
|
|
37
|
-
Plain SVG MAY be used instead of draw.io when greater visual freedom is needed than draw.io provides, or when the diagram originates from tooling other than draw.io. SVG files MUST be stored in the sibling `.assets/` folder.
|
|
37
|
+
Plain SVG MAY be used instead of draw.io when greater visual freedom is needed than draw.io provides, or when the diagram originates from tooling other than draw.io. SVG files MUST be stored in the sibling `.assets/` folder. SVG MUST NOT be used in Policy documents (see rule `10-no-images-in-policies`).
|
|
38
38
|
|
|
39
39
|
#### 06-png-as-last-resort
|
|
40
|
-
PNG (or other raster formats) MAY be used only when no vector or text-based format can adequately represent the content — for example, screenshots or photographs. PNG files MUST be stored in the sibling `.assets/` folder.
|
|
40
|
+
PNG (or other raster formats) MAY be used only when no vector or text-based format can adequately represent the content — for example, screenshots or photographs. PNG files MUST be stored in the sibling `.assets/` folder. PNG MUST NOT be used in Policy documents (see rule `10-no-images-in-policies`).
|
|
41
41
|
|
|
42
42
|
#### 07-assets-no-policy-content
|
|
43
43
|
Asset files MUST NOT contain policy content. Diagrams and images do not carry mandatory or advisory language — they cannot express MUST, SHOULD, or MAY obligations with the precision that prose requires. Assets MAY be used only to support the understanding of policy already stated in Markdown text; a visual that merely illustrates what the prose already says is acceptable, but any rule or constraint that exists only inside an asset file is invisible to policy and has no normative force. When in doubt, keep the content in Markdown.
|
|
@@ -48,7 +48,23 @@ Non-Markdown files (images, diagrams, schemas, JSON examples, binaries, or any o
|
|
|
48
48
|
#### 09-assets-placement
|
|
49
49
|
Non-Markdown files MUST live in the sibling `.assets/` folder next to the referencing document. The canonical per-document-type `.assets/` paths are defined in `_core-adr-policy-001`.
|
|
50
50
|
|
|
51
|
+
#### 10-no-images-in-policies
|
|
52
|
+
Images — including raster formats (PNG, JPEG, GIF, TIFF, and similar) and SVG files — MUST NOT be used in Policy documents. These formats cannot express MUST, SHOULD, or MAY obligations with the precision that prose requires, and their content cannot be systematically enforced during review.
|
|
53
|
+
|
|
54
|
+
#### 11-diagrams-rare-in-policies
|
|
55
|
+
Mermaid and draw.io diagrams SHOULD be avoided in Policy documents. They MAY be included only in direct and punctual cases where the diagram illustrates the core structural pattern or architecture that the policy decision itself mandates. A diagram that introduces context, detail, or explanation not already present in the policy prose MUST NOT be included.
|
|
56
|
+
|
|
57
|
+
#### 12-diagrams-connected-to-decision
|
|
58
|
+
Any diagram included in a Policy document MUST be directly connected to the policy decision described in that document. A diagram MAY include a simple illustrative example. Diagrams showing multiple usage examples, edge cases, or supplementary context MUST be placed in an article instead.
|
|
59
|
+
|
|
60
|
+
#### 13-diagrams-not-normative-in-policies
|
|
61
|
+
Content within diagrams in Policy documents — labels, annotations, and depicted relationships — MUST NOT be used for policy enforcement. Mandatory and advisory language within a diagram has no normative force. During authoring, diagram content MUST be checked for consistency with the policy prose; any inconsistency MUST be resolved before the policy is published.
|
|
62
|
+
|
|
63
|
+
#### 14-articles-for-visual-explanation
|
|
64
|
+
When additional visual explanation is needed for a Policy — such as multiple usage examples, context breakdowns, detailed walkthroughs, or educational material — an article MUST be written instead of adding more diagrams to the policy. Articles are the appropriate place for visual education about a policy; the policy itself MUST remain focused on the decision declaration.
|
|
65
|
+
|
|
51
66
|
## References
|
|
52
67
|
|
|
53
68
|
- [_core-adr-policy-001 - XDRS standards](001-xdrs-standards.md) - Per-document-type `.assets/` canonical paths
|
|
69
|
+
- [_core-adr-policy-002 - Policy standards](002-policy-standards.md) - Summary rule `02-policy-diagram-restrictions` that points to rules 10–14 here
|
|
54
70
|
- [_core-adr-policy-008 - Policy structured standards](008-policy-structured-standards.md) - Structured rule block format used in this policy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "A framework to structure, compile and distribute Architectural (ADR), Business (BDR), and Engineering (EDR) decision records contents so that AI agents and humans can reliably find and use them with hierarchical scopes and controlled rollout in the format of distributable versioned packages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|