xdrs-core 0.46.3 → 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.
|
@@ -100,6 +100,7 @@ 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
|
|
@@ -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
|
|
@@ -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",
|