xdrs-core 0.18.0 → 0.20.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.
@@ -36,7 +36,7 @@ Collectively, these are referred to as XDRs.
36
36
  - ALWAYS use the following folder structure for XDR documents:
37
37
  `.xdrs/[scope]/[type]/[subject]/[number]-[short-title].md`
38
38
  - ALWAYS ignore symlinks paths. NEVER create or update documents inside symlinked folders.
39
- - **Readonly files are external XDRs.** A file with read-only permissions (e.g., `444` set by a distribution tool such as filedist) was distributed from an external source repository. It must NEVER be modified locally. To change it, submit the change to the source repository and re-extract the updated package.
39
+ - **Files listed in `.filedist` are external XDRs.** A file whose path appears in the workspace root `.filedist` file was distributed from an external source repository. It must NEVER be modified locally. To change it, submit the change to the source repository and re-extract the updated package. The `.filedist` format is one entry per line: `<relative-path>|<package>|<version>`. A scope is considered external when any of its files appear in `.filedist`, and tools (such as `xdrs-core lint`) will skip external scopes by default.
40
40
  - Optional supporting artifacts under the same subject:
41
41
  - `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`
42
42
  - `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/SKILL.md`
@@ -48,12 +48,12 @@ Collectively, these are referred to as XDRs.
48
48
  - `_core-adr-004` defines article standards
49
49
  - `_core-adr-006` defines research standards
50
50
  - `_core-adr-007` defines plan standards
51
- - For simple structure, flow, layout, or relationship indications, documents SHOULD prefer plain Markdown, tables, or ASCII art instead of external assets.
52
- - Images and other supporting files SHOULD be used only when they are materially necessary to preserve clarity, fidelity, or evidence. When used, they SHOULD live in a sibling `assets/` folder next to the document.
53
- - XDRs in the subject root use `.xdrs/[scope]/[type]/[subject]/assets/`
54
- - Articles use `.xdrs/[scope]/[type]/[subject]/articles/assets/`
55
- - Research uses `.xdrs/[scope]/[type]/[subject]/researches/assets/`
56
- - Skills use `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/assets/`
51
+ - For simple structures, flows, layout, or relationship indications, documents SHOULD prefer plain Markdown, tables, Mermaid.js (sequence, state, activity, entity diagrams) or ASCII art instead of external assets.
52
+ - Images and other supporting files SHOULD be used only when they are materially necessary to preserve clarity, fidelity, or evidence. When used, they MUST live in a sibling `.assets/` folder next to the document.
53
+ - XDRs in the subject root use `.xdrs/[scope]/[type]/[subject]/.assets/`
54
+ - Articles use `.xdrs/[scope]/[type]/[subject]/articles/.assets/`
55
+ - Research uses `.xdrs/[scope]/[type]/[subject]/researches/.assets/`
56
+ - Skills use `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/.assets/`
57
57
  - **Scopes:**
58
58
  - Short name that defines a group or a package of xdrs
59
59
  - examples: `business-x`, `business-y`, `team-43`, `_core`
@@ -107,16 +107,24 @@ Collectively, these are referred to as XDRs.
107
107
  - `governance`: Engineering governance, risk controls, and compliance mechanics.
108
108
  - Examples: dependency governance, approval policies, mandatory quality checks.
109
109
  - Never use emojis
110
- - **Links:** Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`); they break when files are moved and are harder to read.
110
+ - **Links:** Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`); they break when files are moved and are harder to read.
111
111
  - **Indexes**
112
- - Keep a canonical index with all XDRs of a certain type+scope in `.xdrs/[scope]/[type]/index.md`
112
+ - Every document in the collection (XDRs, 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.
113
+ - Keep a canonical type index with all documents of a certain type+scope in `.xdrs/[scope]/[type]/index.md`. The type index must link to every XDR, skill, article, research, and plan under that type+scope.
113
114
  - Canonical index requirements:
114
115
  - Organize XDR documents by subject for easier navigation
115
116
  - Add a short description of what this scope is about (responsibilities, general worries, teams involved, link to discussion process, etc)
116
117
  - Add a list of other scope indexes that this scope might be related to (only add scopes that might be overridden). E.g: "business-x-mobileapp" scope could refer to "business-x" and "sensitive-data" scopes in its index list. XDRs in scopes listed last override XDRs in scopes listed first when addressing the same topic.
117
118
  - Each XDR element entry in the index MUST include a short description of its content, preferably with an imperative statement or the question it answers, when possible (<15 words). Example: "Use this while planning a new feature", "What communication tone we use with our customers?", "PNPM vs Yarn comparison study"
118
- - Outside the scopes, keep an index pointing to all canonical indexes in `.xdrs/index.md`. Add the text "XDRs in scopes listed last override the ones listed first"
119
+ - Outside the scopes, keep a root index in `.xdrs/index.md` that links to each scope index (`.xdrs/[scope]/index.md`). Add the text "XDRs in 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)`).
119
120
  - Always verify if indexes are up to date after making changes
121
+ - **Scope index**
122
+ - Each scope folder must maintain an `index.md` file at `.xdrs/[scope]/index.md`.
123
+ - The scope index is a short article (under 1000 words) that provides an overview of all XDR contents within that scope. Follow article standards (`_core-adr-004`) when writing this file.
124
+ - The audience for the scope index are engineers, architects, or business analysts who want to check if the scope's contents are useful for them before diving into the specific documents. Write a guided summary that helps them decide whether to explore further.
125
+ - Focus on the most relevant content of the scope: what decisions are covered, what problems they address, and how the scope relates to other scopes.
126
+ - At the end of the scope index, always add links to the canonical type indexes (`adrs/index.md`, `bdrs/index.md`, `edrs/index.md`) that exist within the scope.
127
+ - Whenever the contents of a scope change (new XDRs, skills, articles, research, or plans are added, updated, or removed), evaluate whether the scope index should be updated to reflect the newer contents.
120
128
 
121
129
  **Folder structure examples:**
122
130
  - `.xdrs/business-x/edrs/devops/003-required-development-workflow.md`
@@ -126,20 +134,20 @@ Collectively, these are referred to as XDRs.
126
134
  ```text
127
135
  subject/
128
136
  |-- 001-xdr.md
129
- |-- assets/
137
+ |-- .assets/
130
138
  |-- articles/
131
139
  | |-- 001-article.md
132
- | `-- assets/
140
+ | `-- .assets/
133
141
  |-- plans/
134
142
  | |-- 001-plan.md
135
- | `-- assets/
143
+ | `-- .assets/
136
144
  |-- researches/
137
145
  | |-- 001-study.md
138
- | `-- assets/
146
+ | `-- .assets/
139
147
  `-- skills/
140
148
  `-- 001-task/
141
149
  |-- SKILL.md
142
- `-- assets/
150
+ `-- .assets/
143
151
  ```
144
152
 
145
153
  ## References
@@ -109,7 +109,7 @@ Question: In the end, state explicitly the question that needs to be answered. E
109
109
  [Optional section with implementation specifics, applicability boundaries, rules, concise examples, or do/don't guidance. This is the answer to the question in the "Context and Problem Statement". (<1300 words)]
110
110
 
111
111
  ## Considered Options
112
- [this section is present ONLY if there was more than one option to choose from]
112
+ [this section is present ONLY if the user explicitely indicated that there were multiple options to choose from while making this decision.]
113
113
 
114
114
  * (CHOSEN) **Option 2** - Brief description of option 2
115
115
  * Reason: Brief description of why this option was accepted, containing the strengths, strategical motivations and it's differential over the other options.
@@ -63,7 +63,7 @@ Quick test:
63
63
  SKILL.md # required
64
64
  scripts/ # optional: executable scripts the agent may run
65
65
  references/ # optional: detailed reference material
66
- assets/ # optional: images, templates, data files, and other local resources
66
+ .assets/ # optional: images, templates, data files, and other local resources
67
67
  ```
68
68
 
69
69
  Examples:
@@ -114,9 +114,9 @@ Rules:
114
114
  - `## Overview` SHOULD state the task objective, expected outcome, and relevant prerequisites or tools when they matter.
115
115
  - `## Instructions` SHOULD include verification steps or acceptance criteria at the end of the task, or at the end of major phases when partial validation matters.
116
116
  - For simple structure, flow, layout, or relationship indications, `SKILL.md` SHOULD prefer plain Markdown, tables, or ASCII art instead of external assets.
117
- - Images and other local resource files referenced from `SKILL.md` SHOULD be used only when they are materially necessary and SHOULD live in `assets/` inside the same skill package.
117
+ - Images and other local resource files referenced from `SKILL.md` SHOULD be used only when they are materially necessary and MUST live in `.assets/` inside the same skill package.
118
118
  - Keep `SKILL.md` under 6500 words. Move lengthy reference material to `references/`.
119
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/`. Sibling files and child folder references SHOULD use relative paths (e.g., `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../other.md`).
119
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/`. Sibling files and child folder references SHOULD use relative paths (e.g., `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../other.md`).
120
120
  - Always use lowercase file names.
121
121
  - Never use emojis in skill content.
122
122
 
@@ -28,7 +28,7 @@ Articles are Markdown documents placed inside a subject folder alongside decisio
28
28
  - Articles must remain consistent with the XDRs, Research documents, and Skills they reference. When a referenced artifact changes, the article must be reviewed and updated.
29
29
  - Place an article in the subject folder that best matches its topic using the required list of subjects per type defined in `_core-adr-001`. If an article spans more than one subject, place it in `principles`.
30
30
  - For simple structure, flow, layout, or relationship indications, articles SHOULD prefer plain Markdown, tables, or ASCII art instead of external assets.
31
- - Images and other local resource files referenced by an article SHOULD be used only when they are materially necessary and SHOULD live in `articles/assets/` next to the article files.
31
+ - Images and other local resource files referenced by an article SHOULD be used only when they are materially necessary and MUST live in `articles/.assets/` next to the article files.
32
32
  - Always use lowercase file names.
33
33
  - Never use emojis in article content.
34
34
  - Articles should be kept under 1950 words. Move detailed content to referenced XDRs or Skills.
@@ -42,7 +42,7 @@ Articles are Markdown documents placed inside a subject folder alongside decisio
42
42
  [subject]/
43
43
  articles/
44
44
  [number]-[short-title].md
45
- assets/
45
+ .assets/
46
46
  ```
47
47
 
48
48
  Examples:
@@ -48,7 +48,7 @@ Research documents are Markdown files placed inside a subject folder alongside d
48
48
  - Research documents SHOULD link in `## References` to the XDRs, skills, articles, discussions, and external references relevant to the subject or that later cite the work.
49
49
  - A 1:1 relationship between one research document and one decision will likely be common in practice, but it is not required.
50
50
  - One research document MAY also be referenced by multiple XDRs, including a mix of ADRs, BDRs, and EDRs, when the same investigation remains relevant across several decisions.
51
- - Images and other local resource files referenced by a research document SHOULD be used only when they are materially necessary and SHOULD live in `researches/assets/` next to the research files.
51
+ - Images and other local resource files referenced by a research document SHOULD be used only when they are materially necessary and MUST live in `researches/.assets/` next to the research files.
52
52
  - Research file names MUST be lowercase. Never use emojis.
53
53
  - A research document MAY exist before the related XDR is written, or remain after the XDR changes, as long as its status and references stay clear.
54
54
 
@@ -61,7 +61,7 @@ Research documents are Markdown files placed inside a subject folder alongside d
61
61
  [subject]/
62
62
  researches/
63
63
  [number]-[short-title].md
64
- assets/
64
+ .assets/
65
65
  ```
66
66
 
67
67
  Examples:
@@ -31,7 +31,7 @@ Plans are Markdown documents placed inside a subject folder alongside decision r
31
31
  - Plans MUST include an `Expected end date:` field in ISO format (YYYY-MM-DD) inside the `## Proposed Solution` section.
32
32
  - Always use lowercase file names.
33
33
  - Never use emojis in plan content.
34
- - Images and other local resource files referenced by a plan SHOULD live in `plans/assets/` next to the plan files.
34
+ - Images and other local resource files referenced by a plan MUST live in `plans/.assets/` next to the plan files.
35
35
 
36
36
  **Folder layout**
37
37
 
@@ -42,7 +42,7 @@ Plans are Markdown documents placed inside a subject folder alongside decision r
42
42
  [subject]/
43
43
  plans/
44
44
  [number]-[short-title].md
45
- assets/
45
+ .assets/
46
46
  ```
47
47
 
48
48
  Examples:
@@ -35,6 +35,7 @@ Consult `001-xdrs-core` while making each choice in this phase. The summaries be
35
35
  - **EDR**: specific tool/library, coding practice, testing strategy, project structure
36
36
 
37
37
  **Scope** — use `_local` unless the user explicitly names another scope.
38
+ - If the user names a scope other than `_local`, check the workspace root `.filedist` file. If any file under `.xdrs/[scope]/` appears in `.filedist`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
38
39
 
39
40
  **Subject** — pick one from the allowed list for the chosen type (from `001-xdrs-core`):
40
41
  - ADR: `principles`, `application`, `data`, `integration`, `platform`, `controls`, `operations`
@@ -123,7 +124,7 @@ valid-from: [Optional. ISO date YYYY-MM-DD from when enforcement begins]
123
124
  ### Implementation Details
124
125
  [Rules, applicability boundaries, concise examples, and optional do/don't guidance — under 1300 words]
125
126
 
126
- ## Considered Options (if meaningful options exist)
127
+ ## Considered Options (only if the user explicitly indicated multiple options)
127
128
 
128
129
  ## Conflicts (mandatory if conflicts found in Phase 3)
129
130
 
@@ -140,9 +141,9 @@ Mandatory rules to apply while drafting:
140
141
  - Keep the decision itself authoritative in the XDR. Supporting artifacts may elaborate, but they should not restate the full decision when a short reference is enough.
141
142
  - Make clear when the decision applies and any important exception boundaries.
142
143
  - Keep exploratory option analysis in a related Research document when it would distract from the final decision text.
143
- - Prefer plain Markdown, tables, or ASCII art for simple structure, flow, layout, or relationship indications.
144
- - If the XDR genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/assets/` and link them using a same-folder relative path (e.g., `assets/image.png`).
145
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`).
144
+ - Prefer plain Markdown, tables, Mermaid.js (sequence, state, activity, entity diagrams), or ASCII art for simple structure, flow, layout, or relationship indications.
145
+ - If the XDR genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/.assets/` and link them using a same-folder relative path (e.g., `.assets/image.png`).
146
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`).
146
147
  - No emojis. Lowercase filenames.
147
148
  - Target under 1300 words total; under 2600 words for complex decisions.
148
149
 
@@ -167,6 +168,7 @@ If any check fails, revise and re-run this phase before proceeding.
167
168
  3. Add or verify the scope entry in `.xdrs/index.md`.
168
169
  4. If significant research was produced or already exists, link it from the XDR `## Considered Options` section.
169
170
  5. If concise rules, examples, or do/don't bullets help readers apply the decision correctly, add them inside `### Implementation Details` without turning the XDR into a long procedure.
171
+ 6. Evaluate whether the scope index at `.xdrs/[scope]/index.md` should be updated to reflect the new content. If the scope index does not exist, create it following article standards and the scope index rules in `_core-adr-001`.
170
172
 
171
173
  ### Phase 9: Verify Package structure with Lint
172
174
 
@@ -185,6 +187,7 @@ If any check fails, revise and re-run this phase before proceeding.
185
187
  - MUST NOT create an XDR that duplicates a decision already captured in another XDR — extend or reference instead.
186
188
  - MUST prefer links and short references over repeating the same decision content across related documents.
187
189
  - MUST keep scope `_local` unless the user explicitly states otherwise.
190
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
188
191
 
189
192
  ## References
190
193
 
@@ -36,6 +36,7 @@ Quick test:
36
36
  - "How to execute a business process or policy?" → BDR
37
37
 
38
38
  **Scope** — use `_local` unless the user explicitly names another scope.
39
+ - If the user names a scope other than `_local`, check the workspace root `.filedist` file. If any file under `.xdrs/[scope]/` appears in `.filedist`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
39
40
 
40
41
  **Subject** — pick the most specific match for the chosen type (required list per type is in `_core-adr-001`):
41
42
  - ADR subjects: `principles`, `application`, `data`, `integration`, `platform`, `controls`, `operations`
@@ -97,9 +98,9 @@ Rules:
97
98
  - Do not duplicate content from referenced XDRs — link instead.
98
99
  - Do not present the skill itself as policy; mandatory behavior must come from referenced XDRs or other policy artifacts.
99
100
  - When the skill depends on XDRs, make the activation logic and instructions consistent with the XDR metadata so the skill does not operationalize inactive or out-of-scope decisions.
100
- - Prefer plain Markdown, tables, or ASCII art for simple structure, flow, layout, or relationship indications.
101
- - If `SKILL.md` genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/assets/` and link them using a same-folder relative path (e.g., `assets/image.png`).
102
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`).
101
+ - Prefer plain Markdown, tables, Mermaid.js (sequence, state, activity, entity diagrams), or ASCII art for simple structure, flow, layout, or relationship indications.
102
+ - If `SKILL.md` genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/.assets/` and link them using a same-folder relative path (e.g., `.assets/image.png`).
103
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`).
103
104
  - No emojis. Lowercase filenames. Target under 6500 words.
104
105
 
105
106
  ### Phase 5: Review the Draft
@@ -122,6 +123,7 @@ If any check fails, revise before continuing.
122
123
  mkdir -p .github/skills/[number]-[skill-name]
123
124
  ln -s ../../.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name] .github/skills/[number]-[skill-name]
124
125
  ```
126
+ 3. Evaluate whether the scope index at `.xdrs/[scope]/index.md` should be updated to reflect the new skill. If the scope index does not exist, create it following article standards and the scope index rules in `_core-adr-001`.
125
127
 
126
128
  ### Constraints
127
129
 
@@ -129,6 +131,7 @@ If any check fails, revise before continuing.
129
131
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
130
132
  - MUST NOT create a skill that duplicates an existing one — extend or reference it instead.
131
133
  - MUST keep scope `_local` unless the user explicitly states otherwise.
134
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
132
135
  - MUST include a References section linking to `003-skill-standards`.
133
136
 
134
137
  ## Examples
@@ -41,6 +41,7 @@ Do NOT proceed to Phase 1 until you have at minimum a clear **topic** and **audi
41
41
  Consult `001-xdrs-core` while making each choice in this phase. The summaries below are orientation only; when any detail is unclear, the standard decides.
42
42
 
43
43
  **Scope** — use `_local` unless the user explicitly names another scope.
44
+ - If the user names a scope other than `_local`, check the workspace root `.filedist` file. If any file under `.xdrs/[scope]/` appears in `.filedist`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
44
45
 
45
46
  **Type** — match the type of the XDRs the article primarily synthesizes (`adrs`, `bdrs`, or `edrs`).
46
47
  If the topic spans multiple types, use `adrs`. Use the same rules as `002-write-xdr` Phase 2:
@@ -93,9 +94,9 @@ Rules to apply while drafting:
93
94
  - Every factual claim must link back to the authoritative XDR or Skill.
94
95
  - If the article advises readers what to do, clearly separate active/applicable XDRs from background, historical, or out-of-scope ones.
95
96
  - Never reproduce decision text verbatim; summarize and link.
96
- - Prefer plain Markdown, tables, or ASCII art for simple structure, flow, layout, or relationship indications.
97
- - If the article genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/articles/assets/` and link them using a same-folder relative path (e.g., `assets/image.png`).
98
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`).
97
+ - Prefer plain Markdown, tables, Mermaid.js (sequence, state, activity, entity diagrams), or ASCII art for simple structure, flow, layout, or relationship indications.
98
+ - If the article genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/articles/.assets/` and link them using a same-folder relative path (e.g., `.assets/image.png`).
99
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`).
99
100
  - Keep the article under 1950 words; move detailed content to XDRs or Skills.
100
101
  - Use lowercase file names. Never use emojis.
101
102
  - If a conflict exists between the article and a Decision Record, note it and defer to the XDR.
@@ -106,6 +107,7 @@ Rules to apply while drafting:
106
107
  2. Add a link to the article in the canonical index for that scope+type (`.xdrs/[scope]/[type]/index.md`).
107
108
  3. Add back-references in the XDRs, Research documents, and Skills that the article synthesizes, under their `## References`
108
109
  section.
110
+ 4. Evaluate whether the scope index at `.xdrs/[scope]/index.md` should be updated to reflect the new article. If the scope index does not exist, create it following article standards and the scope index rules in `_core-adr-001`.
109
111
 
110
112
  ## Examples
111
113
 
@@ -136,6 +138,7 @@ Rules to apply while drafting:
136
138
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
137
139
  - MUST follow the article template and placement rules from `004-article-standards`.
138
140
  - MUST keep scope `_local` unless the user explicitly states otherwise.
141
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
139
142
  - MUST defer to active and applicable XDRs when article synthesis conflicts with them.
140
143
 
141
144
  ## References
@@ -36,6 +36,7 @@ If the answers from Phase 1 leave scope, type, or subject ambiguous, use `vscode
36
36
  Consult `001-xdrs-core` while making each choice in this phase. The summaries below are orientation only; when any detail matters, the standard decides.
37
37
 
38
38
  **Scope** — use `_local` unless the user explicitly names another scope.
39
+ - If the user names a scope other than `_local`, check the workspace root `.filedist` file. If any file under `.xdrs/[scope]/` appears in `.filedist`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
39
40
 
40
41
  **Type** — match the type of decision this research supports (`adrs`, `bdrs`, or `edrs`). Use the same rules as `002-write-xdr` Phase 2:
41
42
  - **BDR**: business process, product policy, strategic rule, operational procedure
@@ -134,9 +135,9 @@ Rules:
134
135
  - Keep traceability to related XDRs, skills, articles, discussions, and external sources primarily in `## References`.
135
136
  - Use good-enough evidence. Experienced professional judgment is allowed, but the conclusions still need support that other colleagues can inspect and learn from.
136
137
  - Ensure the methods and test conditions are reproducible enough for an experienced professional to rerun or evolve the critical parts later.
137
- - Prefer plain Markdown, bullet points, tables, or ASCII art for simple explanations and comparisons, especially in the introduction and results.
138
- - If the research genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/researches/assets/` and link them using a same-folder relative path (e.g., `assets/image.png`).
139
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`).
138
+ - Prefer plain Markdown, tables, Mermaid.js (sequence, state, activity, entity diagrams), bullet points, or ASCII art for simple explanations and comparisons, especially in the introduction and results.
139
+ - If the research genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/researches/.assets/` and link them using a same-folder relative path (e.g., `.assets/image.png`).
140
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`).
140
141
  - Keep section word limits within the standard and keep the document under 5000 words total unless the introduction explicitly states that a very detailed analysis is required.
141
142
 
142
143
  ### Phase 8: Check Section Goals
@@ -244,6 +245,7 @@ If any check fails, revise before continuing.
244
245
  1. Create the research file at `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`.
245
246
  2. Add an entry to `.xdrs/[scope]/[type]/index.md`.
246
247
  3. Add back-references from the related XDR, article, or skill when the relationship is important for discovery.
248
+ 4. Evaluate whether the scope index at `.xdrs/[scope]/index.md` should be updated to reflect the new research. If the scope index does not exist, create it following article standards and the scope index rules in `_core-adr-001`.
247
249
 
248
250
  ## Examples
249
251
 
@@ -276,4 +278,5 @@ If any check fails, revise before continuing.
276
278
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
277
279
  - MUST follow the research template and section-goal rules from `006-research-standards`.
278
280
  - MUST keep scope `_local` unless the user explicitly states otherwise.
281
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
279
282
  - MUST keep the document as research rather than turning it into a final decision.
@@ -33,6 +33,7 @@ Guides the creation of a well-structured plan document by following `_core-adr-0
33
33
  Consult `001-xdrs-core` while making each choice in this phase. The summaries below are orientation only; when any detail is unclear, the standard decides.
34
34
 
35
35
  **Scope** — use `_local` unless the user explicitly names another scope.
36
+ - If the user names a scope other than `_local`, check the workspace root `.filedist` file. If any file under `.xdrs/[scope]/` appears in `.filedist`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
36
37
 
37
38
  **Type** — match the type of the XDRs the plan primarily implements or relates to (`adrs`, `bdrs`, or `edrs`).
38
39
  - **BDR**: business process, product policy, strategic rule, operational procedure
@@ -114,8 +115,8 @@ Rules to apply while drafting:
114
115
  - If the plan scope is too large for 2 years, break it into multiple plans.
115
116
  - Remember that this plan must be deleted after full implementation. Write it with that ephemeral nature in mind.
116
117
  - Prefer plain Markdown, tables, or ASCII art for structure and flow.
117
- - If the plan genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/plans/assets/` and link them using a same-folder relative path (e.g., `assets/image.png`).
118
- - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../assets/test.png`, `../other.md`).
118
+ - If the plan genuinely needs local images or supporting files, store them in `.xdrs/[scope]/[type]/[subject]/plans/.assets/` and link them using a same-folder relative path (e.g., `.assets/image.png`).
119
+ - Links that reference a parent folder MUST use absolute paths from the repository root with a leading `/` (e.g., `/.xdrs/_core/adrs/principles/001-xdrs-core.md`). Sibling files and child folder references SHOULD use relative paths (e.g., `002-other-doc.md`, `.assets/image.png`, `subdir/file.md`). Never use relative paths that traverse up the directory tree (e.g., `../../.assets/test.png`, `../other.md`).
119
120
  - Use lowercase file names. Never use emojis.
120
121
 
121
122
  ### Phase 6: Place and Register
@@ -123,6 +124,7 @@ Rules to apply while drafting:
123
124
  1. Save the file at `.xdrs/[scope]/[type]/[subject]/plans/[number]-[short-title].md`.
124
125
  2. Add a link to the plan in the canonical index for that scope+type (`.xdrs/[scope]/[type]/index.md`).
125
126
  3. Add back-references in the XDRs, Research documents, and Skills that the plan relates to, under their `## References` section.
127
+ 4. Evaluate whether the scope index at `.xdrs/[scope]/index.md` should be updated to reflect the new plan. If the scope index does not exist, create it following article standards and the scope index rules in `_core-adr-001`.
126
128
 
127
129
  ### Phase 7: Verify with Lint
128
130
 
@@ -156,3 +158,10 @@ Rules to apply while drafting:
156
158
  - [_core-adr-001 - XDRs core](/.xdrs/_core/adrs/principles/001-xdrs-core.md)
157
159
  - [_core-adr-007 - Plan standards](/.xdrs/_core/adrs/principles/007-plan-standards.md)
158
160
  - [_core-adr-002 - XDR standards](/.xdrs/_core/adrs/principles/002-xdr-standards.md)
161
+
162
+ ## Constraints
163
+
164
+ - MUST follow the plan template and section-goal rules from `007-plan-standards`.
165
+ - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
166
+ - MUST keep scope `_local` unless the user explicitly states otherwise.
167
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
@@ -0,0 +1,56 @@
1
+ # _core Scope Overview
2
+
3
+ ## Overview
4
+
5
+ The `_core` scope defines the XDR framework itself: how decision records, skills, research, articles, and plans are structured, written, versioned, and discovered. This scope is aimed at engineers, architects, and business analysts who build or consume XDR-based documentation.
6
+
7
+ ## Content
8
+
9
+ ### What this scope covers
10
+
11
+ The `_core` scope is the foundation that all other scopes inherit from. It establishes the rules and conventions that every XDR document, skill, article, research, and plan must follow regardless of which team, product, or domain produces them.
12
+
13
+ If you are evaluating whether to adopt XDRs, setting up a new XDR project, or extending the framework with your own scopes, start here.
14
+
15
+ ### Framework structure and organization
16
+
17
+ The core architectural decision [_core-adr-001](adrs/principles/001-xdrs-core.md) defines the fundamental building blocks: three decision types (ADR for architecture, BDR for business, EDR for engineering), scopes as grouping boundaries, subjects as topic categories within each type, and a folder layout that keeps everything discoverable. It also defines the index system (canonical type indexes, scope indexes, and the root index) that ties the collection together.
18
+
19
+ ### Document writing standards
20
+
21
+ Each artifact type has its own writing standard:
22
+
23
+ - **XDR documents** follow [_core-adr-002](adrs/principles/002-xdr-standards.md), which defines the mandatory template, frontmatter metadata, applicability rules, conflict handling, and word limits that keep decisions concise and authoritative.
24
+ - **Structured XDRs** with individually referenceable rules follow the extension [_core-adr-008](adrs/principles/008-xdr-standards-structured.md), adding numbered rule blocks and a dot-notation citation syntax.
25
+ - **Skills** follow [_core-adr-003](adrs/principles/003-skill-standards.md), using the agentskills format so they work for both humans and AI agents on an automation gradient from fully manual to fully automated.
26
+ - **Articles** follow [_core-adr-004](adrs/principles/004-article-standards.md), providing synthetic views that combine and link multiple XDRs, research, and skills without replacing them as the source of truth.
27
+ - **Research** follows [_core-adr-006](adrs/principles/006-research-standards.md), using an IMRAD-based structure for studies that back decisions with reproducible evidence.
28
+ - **Plans** follow [_core-adr-007](adrs/principles/007-plan-standards.md), capturing ephemeral execution plans with problem context, proposed solutions, milestones, and deliverables that are deleted after implementation.
29
+
30
+ ### Versioning and distribution
31
+
32
+ [_core-adr-005](adrs/principles/005-semantic-versioning-for-xdr-packages.md) defines how XDR packages use semantic versioning to communicate upgrade impact when decisions are shared across repositories or teams.
33
+
34
+ ### Usage policy
35
+
36
+ The business decision [_core-bdr-001](bdrs/principles/001-xdr-decisions-and-skills-usage.md) establishes how agents and humans must use XDR decisions and skills, separating policy authority (which lives in XDRs) from execution guidance (which lives in skills).
37
+
38
+ ### Available skills
39
+
40
+ The `_core` scope ships with six skills that automate the most common framework operations:
41
+
42
+ - **001-lint** reviews code and files against applicable XDRs
43
+ - **002-write-xdr** guides creation of a new decision record
44
+ - **003-write-skill** guides creation of a new skill package
45
+ - **004-write-article** guides creation of a new article
46
+ - **005-write-research** guides creation of a new research document
47
+ - **006-write-plan** guides creation of a new execution plan
48
+
49
+ ### Getting started
50
+
51
+ For a narrative introduction to the framework, including how elements differ, how to decide whether an XDR applies, and how to extend the framework with your own scopes, see the overview article [_core-article-001](adrs/principles/articles/001-xdrs-overview.md).
52
+
53
+ ## Type Indexes
54
+
55
+ - [ADRs Index](adrs/index.md) - Architectural decisions about the XDR framework structure and standards
56
+ - [BDRs Index](bdrs/index.md) - Business and operational decisions about framework usage policy
package/.xdrs/index.md CHANGED
@@ -9,8 +9,7 @@ XDRs in scopes listed last override the ones listed first
9
9
  ### _core
10
10
 
11
11
  Decisions about how XDRs work
12
- [View _core ADRs Index](_core/adrs/index.md)
13
- [View _core BDRs Index](_core/bdrs/index.md)
12
+ [View scope _core](_core/index.md)
14
13
 
15
14
  ---
16
15
 
package/README.md CHANGED
@@ -86,20 +86,20 @@ This is especially important for BDRs: because business rules govern decisions t
86
86
  index.md # canonical index for this scope+type
87
87
  [subject]/
88
88
  [number]-[short-title].md # individual decision record
89
- assets/ # optional local resources for subject-level XDR files
89
+ .assets/ # optional local resources for subject-level XDR files
90
90
  researches/ # optional decision-backing research documents
91
91
  [number]-[short-title].md
92
- assets/
92
+ .assets/
93
93
  skills/ # optional skill packages for humans and AI agents
94
94
  [number]-[skill-name]/
95
95
  SKILL.md
96
- assets/
96
+ .assets/
97
97
  articles/ # optional synthetic views over XDRs, Research, and Skills
98
98
  [number]-[short-title].md
99
- assets/
99
+ .assets/
100
100
  plans/ # optional ephemeral execution plans
101
101
  [number]-[short-title].md
102
- assets/
102
+ .assets/
103
103
  ```
104
104
 
105
105
  Document types:
@@ -129,7 +129,7 @@ Each scope manages its own set of XDR artifacts independently. Scope owners disc
129
129
 
130
130
  Once a set of decisions is ready to share, scope owners pack the relevant `.xdrs/[scope]/` folder into a versioned npm package using a tool such as [filedist](https://github.com/flaviostutz/filedist) and publish it to an npm registry, either public or a company-internal one. Versioning gives consumers explicit control over which revision of a scope's decisions they adopt, avoiding situations where a single breaking policy change is forced on all consumers at once.
131
131
 
132
- The same applies to Research documents, skills, articles, and any sibling `assets/` folders: because they live alongside XDRs inside the scope folder, they are included in the same package and published together.
132
+ The same applies to Research documents, skills, articles, and any sibling `.assets/` folders: because they live alongside XDRs inside the scope folder, they are included in the same package and published together.
133
133
 
134
134
  ### Usage
135
135
 
@@ -153,7 +153,7 @@ Multiple scope packages can be combined in the same workspace by listing them as
153
153
  The published package exposes the `xdrs-core` CLI.
154
154
 
155
155
  - Bootstrap or extract managed XDR files with the existing `filedist`-backed commands such as `npx -y xdrs-core extract` and `npx -y xdrs-core check`.
156
- - Lint an XDR tree with `npx -y xdrs-core lint .`. By default, read-only files distributed from external scopes are skipped; use `--all` to include them.
156
+ - Lint an XDR tree with `npx -y xdrs-core lint .`. By default, scopes whose files are listed in the workspace root `.filedist` file are treated as external and skipped; use `--all` to include them.
157
157
 
158
158
  The `lint` command reads `./.xdrs/**` from the given workspace path and checks common consistency rules, including:
159
159
 
@@ -168,7 +168,7 @@ The `lint` command reads `./.xdrs/**` from the given workspace path and checks c
168
168
  - root index coverage for all discovered canonical indexes
169
169
  - XDR metadata section placement and `valid-from` / `applied-to` field format
170
170
  - local markdown links between XDR documents, skills, articles, researches, and plans (excluding fenced code blocks)
171
- - local image and `assets/` links resolving inside the sibling `assets/` folder for each document
171
+ - local image and `.assets/` links resolving inside the sibling `.assets/` folder for each document
172
172
 
173
173
  Examples:
174
174