xdrs-core 0.28.0 → 0.28.2

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.
@@ -40,7 +40,7 @@ Policies can be of different kinds, depending on the nature of the decision:
40
40
  `[xdrs-root]/[scope]/[type]/[subject]/[number]-[short-title].md`
41
41
  where `[xdrs-root]` is the XDRS root folder (default: `.xdrs/`).
42
42
  - ALWAYS ignore symlinks paths. NEVER create or update documents inside symlinked folders.
43
- - **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. The `.filedist` file can also be used to detect which files changed when bumping an external scope to a newer version: compare the version field in `.filedist` entries before and after the upgrade and diff the affected paths to understand what decisions were added, updated, or removed.
43
+ - **Files listed in `.filedist.lock` are external XDRs.** A file whose path appears in the workspace root `.filedist.lock` 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.lock` format is one entry per line: `<relative-path>|<package>|<version>`. A scope is considered external when any of its files appear in `.filedist.lock`, and tools (such as `xdrs-core lint`) will skip external scopes by default. The `.filedist.lock` file can also be used to detect which files changed when bumping an external scope to a newer version: compare the version field in `.filedist.lock` entries before and after the upgrade and diff the affected paths to understand what decisions were added, updated, or removed.
44
44
  - Optional supporting artifacts under the same subject:
45
45
  - `[xdrs-root]/[scope]/[type]/[subject]/researches/[number]-[short-title].md`
46
46
  - `[xdrs-root]/[scope]/[type]/[subject]/skills/[number]-[skill-name]/SKILL.md`
@@ -181,7 +181,7 @@ Follow [_core-adr-policy-001](../001-xdrs-core.md) and [_core-adr-policy-002](..
181
181
  1. **Install** — add the scope package as a dependency and run `npx xdrs-core extract` (or
182
182
  `pnpm exec xdrs-core extract`) to unpack XDRS files into `.xdrs/` in your workspace.
183
183
  2. **Pins and upgrades** — update the npm dependency version to pull in the latest decisions
184
- for a scope. The `filedist` mechanism tracks managed files in `.filedist` and keeps
184
+ for a scope. The `filedist` mechanism tracks managed files in `.filedist.lock` and keeps
185
185
  `.xdrs/index.md` in `keepExisting` mode so local edits are preserved.
186
186
  3. **Multi-scope** — list multiple scope packages as dependencies. Edit `.xdrs/index.md` to
187
187
  add each scope's canonical index link; place more specific scopes below broader ones.
@@ -35,7 +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
+ - If the user names a scope other than `_local`, check the workspace root `.filedist.lock` file. If any file under `.xdrs/[scope]/` appears in `.filedist.lock`, 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
39
 
40
40
  **Subject** — pick one from the allowed list for the chosen type (from `001-xdrs-core`):
41
41
  - ADR: `principles`, `application`, `data`, `integration`, `platform`, `controls`, `operations`
@@ -174,7 +174,7 @@ If any check fails, revise and re-run this phase before proceeding.
174
174
 
175
175
  1. Run the CLI lint utility from the repository root:
176
176
  ```
177
- npx -y xdrs-core lint .
177
+ npx -y xdrs-core@latest lint
178
178
  ```
179
179
  2. Fix all reported errors before considering the task complete.
180
180
  3. Review warnings; fix straightforward ones and note intentional deviations explicitly.
@@ -187,7 +187,7 @@ If any check fails, revise and re-run this phase before proceeding.
187
187
  - MUST NOT create a Policy that duplicates a decision already captured in another Policy — extend or reference instead.
188
188
  - MUST prefer links and short references over repeating the same decision content across related documents.
189
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`).
190
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
191
191
 
192
192
  ## References
193
193
 
@@ -36,7 +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
+ - If the user names a scope other than `_local`, check the workspace root `.filedist.lock` file. If any file under `.xdrs/[scope]/` appears in `.filedist.lock`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
40
40
 
41
41
  **Subject** — pick the most specific match for the chosen type (required list per type is in `_core-adr-policy-001`):
42
42
  - ADR subjects: `principles`, `application`, `data`, `integration`, `platform`, `controls`, `operations`
@@ -125,17 +125,23 @@ If any check fails, revise before continuing.
125
125
  ```
126
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-policy-001`.
127
127
 
128
+ ### Phase 7: Verify with Lint
129
+
130
+ 1. Run the CLI lint utility from the repository root:
131
+ ```
132
+ npx -y xdrs-core@latest lint
133
+ ```
134
+ 2. Fix all reported errors before considering the task complete.
135
+
128
136
  ### Constraints
129
137
 
130
138
  - MUST follow the agentskills SKILL.md format from `003-skill-standards` exactly.
131
139
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
132
140
  - MUST NOT create a skill that duplicates an existing one — extend or reference it instead.
133
141
  - 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`).
142
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
135
143
  - MUST include a References section linking to `003-skill-standards`.
136
144
 
137
- ## Examples
138
-
139
145
  **Input**: "Create a skill to help debug CI pipelines"
140
146
  - Type: EDR (engineering workflow)
141
147
  - Scope: `_local`
@@ -41,7 +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
+ - If the user names a scope other than `_local`, check the workspace root `.filedist.lock` file. If any file under `.xdrs/[scope]/` appears in `.filedist.lock`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
45
45
 
46
46
  **Type** — match the type of the XDRS elements the article primarily synthesizes (`adrs`, `bdrs`, or `edrs`).
47
47
  If the topic spans multiple types, use `adrs`. Use the same rules as `002-write-policy` Phase 2:
@@ -110,6 +110,14 @@ Rules to apply while drafting:
110
110
  section.
111
111
  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-policy-001`.
112
112
 
113
+ ### Phase 7: Verify with Lint
114
+
115
+ 1. Run the CLI lint utility from the repository root:
116
+ ```
117
+ npx -y xdrs-core@latest lint
118
+ ```
119
+ 2. Fix all reported errors before considering the task complete.
120
+
113
121
  ## Examples
114
122
 
115
123
  **Input:** "Write an article about how skills work in this project."
@@ -140,11 +148,9 @@ Rules to apply while drafting:
140
148
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
141
149
  - MUST follow the article template and placement rules from `004-article-standards`.
142
150
  - MUST keep scope `_local` unless the user explicitly states otherwise.
143
- - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist`).
151
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
144
152
  - MUST defer to active and applicable Policies when article synthesis conflicts with them.
145
153
 
146
- ## References
147
-
148
154
  - [_core-adr-policy-004 - Article standards](../../004-article-standards.md)
149
155
  - [_core-adr-policy-006 - Research standards](../../006-research-standards.md)
150
156
  - [_core-adr-policy-001 - XDRS core](../../001-xdrs-core.md)
@@ -36,7 +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
+ - If the user names a scope other than `_local`, check the workspace root `.filedist.lock` file. If any file under `.xdrs/[scope]/` appears in `.filedist.lock`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
40
40
 
41
41
  **Type** — match the type of decision this research supports (`adrs`, `bdrs`, or `edrs`). Use the same rules as `002-write-policy` Phase 2:
42
42
  - **BDR**: business process, product policy, strategic rule, operational procedure
@@ -247,6 +247,14 @@ If any check fails, revise before continuing.
247
247
  3. Add back-references from the related Policy, article, or skill when the relationship is important for discovery.
248
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-policy-001`.
249
249
 
250
+ ### Phase 12: Verify with Lint
251
+
252
+ 1. Run the CLI lint utility from the repository root:
253
+ ```
254
+ npx -y xdrs-core@latest lint
255
+ ```
256
+ 2. Fix all reported errors before considering the task complete.
257
+
250
258
  ## Examples
251
259
 
252
260
  **Input**: "Create research comparing package distribution options for our Policy scopes"
@@ -278,6 +286,5 @@ If any check fails, revise before continuing.
278
286
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
279
287
  - MUST follow the research template and section-goal rules from `006-research-standards`.
280
288
  - 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`).
289
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
282
290
  - MUST keep the document as research rather than turning it into a final decision.
283
- ing it into a final decision.
@@ -33,7 +33,7 @@ Guides the creation of a well-structured plan document by following `_core-adr-p
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
+ - If the user names a scope other than `_local`, check the workspace root `.filedist.lock` file. If any file under `.xdrs/[scope]/` appears in `.filedist.lock`, the scope is external and new documents MUST NOT be created there. Inform the user and ask them to choose a non-external scope.
37
37
 
38
38
  **Type** — match the type of the Policies the plan primarily implements or relates to (`adrs`, `bdrs`, or `edrs`).
39
39
  - **BDR**: business process, product policy, strategic rule, operational procedure
@@ -130,7 +130,7 @@ Rules to apply while drafting:
130
130
 
131
131
  1. Run the CLI lint utility from the repository root:
132
132
  ```
133
- npx -y xdrs-core lint .
133
+ npx -y xdrs-core@latest lint
134
134
  ```
135
135
  2. Fix all reported errors before considering the task complete.
136
136
 
@@ -164,4 +164,4 @@ Rules to apply while drafting:
164
164
  - MUST follow the plan template and section-goal rules from `007-plan-standards`.
165
165
  - MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
166
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`).
167
+ - MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
@@ -126,7 +126,7 @@ Rules:
126
126
 
127
127
  1. Run the CLI lint utility from the repository root:
128
128
  ```
129
- npx -y xdrs-core lint .
129
+ npx -y xdrs-core@latest lint
130
130
  ```
131
131
  2. Fix all reported errors before considering the task complete.
132
132
 
package/.xdrs/index.md CHANGED
@@ -19,4 +19,6 @@ Defines how XDRS framework work
19
19
 
20
20
  ### _local (reserved)
21
21
 
22
+ _local scope is the default scope for new xdrs and might override other scope decisions. These decisions are local and are not supposed to be shared in other contexts.
23
+
22
24
  Read _local scope index at `_local/index.md` when it exists.
package/README.md CHANGED
@@ -166,7 +166,7 @@ Multiple scope packages can be combined in the same workspace by listing them as
166
166
  The published package exposes the `xdrs-core` CLI.
167
167
 
168
168
  - Bootstrap or extract managed XDRS files with the existing `filedist`-backed commands such as `npx -y xdrs-core extract` and `npx -y xdrs-core check`.
169
- - Lint a Policy 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.
169
+ - Lint a Policy tree with `npx -y xdrs-core lint .`. By default, scopes whose files are listed in the workspace root `.filedist.lock` file are treated as external and skipped; use `--all` to include them.
170
170
 
171
171
  The `lint` command reads `./.xdrs/**` from the given workspace path and checks common consistency rules, including:
172
172
 
package/lib/lint.js CHANGED
@@ -64,7 +64,7 @@ function printHelp() {
64
64
  console.log('Usage: xdrs-core lint [options] [path]\n');
65
65
  console.log('Lint the XDRS tree rooted at [path] when [path] contains an index.md, or at [path]/.xdrs by default.');
66
66
  console.log('\nOptions:');
67
- console.log(' --all Check all files, including files from external scopes distributed via .filedist (default: skip external scopes)');
67
+ console.log(' --all Check all files, including files from external scopes distributed via .filedist.lock (default: skip external scopes)');
68
68
  console.log('\nAll other commands continue to be delegated to the bundled filedist CLI.');
69
69
  }
70
70
 
@@ -791,12 +791,6 @@ function lintOrphanAssets(assetsDir, documentPaths, xdrsRoot, errors) {
791
791
  return;
792
792
  }
793
793
 
794
- if (assetTree.directories.length > 0 && assetTree.files.length <= 10) {
795
- for (const directoryPath of assetTree.directories) {
796
- errors.push(`.assets directory must be flat unless it already contains more than 10 files: ${toDisplayPath(directoryPath)}`);
797
- }
798
- }
799
-
800
794
  const repoRoot = path.dirname(xdrsRoot);
801
795
  const referencedAssets = new Set();
802
796
 
@@ -844,9 +838,10 @@ function lintSlideFile(filePath, documentPaths, xdrsRoot, errors) {
844
838
  if (!fm.present) {
845
839
  errors.push(`Slide file must start with a YAML frontmatter block containing marp: true: ${toDisplayPath(filePath)}`);
846
840
  } else {
847
- const hasMarp = /^marp:\s*true$/m.test(content.match(/^---\r?\n([\s\S]*?)\r?\n---/)[1]);
848
- if (!hasMarp) {
849
- errors.push(`Slide frontmatter must include marp: true: ${toDisplayPath(filePath)}`);
841
+ const frontmatterBody = content.match(/^---\r?\n([\s\S]*?)\r?\n---/)[1];
842
+ const firstKey = frontmatterBody.trimStart().split(/\r?\n/)[0];
843
+ if (!/^marp:\s*true$/.test(firstKey)) {
844
+ errors.push(`Slide frontmatter must include marp: true as the first key: ${toDisplayPath(filePath)}`);
850
845
  }
851
846
  }
852
847
 
@@ -991,7 +986,7 @@ function isExternalScopeLink(resolvedPath, xdrsRoot, externalScopes) {
991
986
  if (parts.length === 0 || !parts[0]) return false;
992
987
  const scopeName = parts[0];
993
988
 
994
- // Treat as external if explicitly listed via .filedist OR if the scope directory
989
+ // Treat as external if explicitly listed via .filedist.lock OR if the scope directory
995
990
  // doesn't exist locally (e.g. hasn't been extracted from an external package yet)
996
991
  return externalScopes.has(scopeName) || !existsDirectory(path.join(xdrsRoot, scopeName));
997
992
  }
@@ -1192,7 +1187,7 @@ function existsFile(filePath) {
1192
1187
  }
1193
1188
 
1194
1189
  function loadFiledist(repoRoot) {
1195
- const filedistPath = path.join(repoRoot, '.filedist');
1190
+ const filedistPath = path.join(repoRoot, '.filedist.lock');
1196
1191
  if (!existsFile(filedistPath)) {
1197
1192
  return new Set();
1198
1193
  }
package/lib/lint.test.js CHANGED
@@ -91,7 +91,7 @@ test('skips external scopes by default and checks them when ignoreExternal is fa
91
91
  'See [Missing](002-missing.md).',
92
92
  ''
93
93
  ].join('\n'),
94
- '.filedist': '.xdrs/extscope/adrs/principles/001-ext.md|some-package|1.0.0\n',
94
+ '.filedist.lock': '.xdrs/extscope/adrs/principles/001-ext.md|some-package|1.0.0\n',
95
95
  });
96
96
 
97
97
  const defaultResult = lintWorkspace(workspaceRoot);
@@ -160,7 +160,7 @@ test('skips entire external scope when only some of its files are in filedist',
160
160
  'See [Missing](003-missing.md).',
161
161
  ''
162
162
  ].join('\n'),
163
- '.filedist': '.xdrs/extscope/adrs/principles/001-ext.md|some-package|1.0.0\n',
163
+ '.filedist.lock': '.xdrs/extscope/adrs/principles/001-ext.md|some-package|1.0.0\n',
164
164
  });
165
165
 
166
166
  const result = lintWorkspace(workspaceRoot);
@@ -721,8 +721,8 @@ test('reports unexpected directories inside a skill package', () => {
721
721
  expect(result.errors.join('\n')).toContain('extras');
722
722
  });
723
723
 
724
- test('reports nested directories in .assets when it has 10 files or fewer', () => {
725
- const workspaceRoot = createWorkspace('asset-subdir-too-small', {
724
+ test('allows nested directories in .assets', () => {
725
+ const workspaceRoot = createWorkspace('asset-subdir-allowed', {
726
726
  '.xdrs/index.md': rootIndex(),
727
727
  '.xdrs/_local/index.md': '# _local Scope Overview\n\nOverview.\n\n[ADRs](adrs/index.md)\n',
728
728
  '.xdrs/_local/adrs/index.md': localAdrIndex([
@@ -738,64 +738,19 @@ test('reports nested directories in .assets when it has 10 files or fewer', () =
738
738
  '',
739
739
  '## Context and Problem Statement',
740
740
  '',
741
- 'See ![img](.assets/used.png).',
741
+ 'See ![img](.assets/grouped/used.png).',
742
742
  '',
743
743
  '## Decision Outcome',
744
744
  '',
745
745
  'Test decision outcome.',
746
746
  ''
747
747
  ].join('\n'),
748
- '.xdrs/_local/adrs/principles/.assets/used.png': Buffer.alloc(0),
749
- '.xdrs/_local/adrs/principles/.assets/grouped/extra.png': Buffer.alloc(0),
750
- });
751
-
752
- const result = lintWorkspace(workspaceRoot);
753
-
754
- expect(result.errors.join('\n')).toContain('.assets directory must be flat unless it already contains more than 10 files');
755
- expect(result.errors.join('\n')).toContain('.assets/grouped');
756
- });
757
-
758
- test('allows nested directories in .assets when it has more than 10 files', () => {
759
- const workspaceRoot = createWorkspace('asset-subdir-large-enough', {
760
- '.xdrs/index.md': rootIndex(),
761
- '.xdrs/_local/index.md': '# _local Scope Overview\n\nOverview.\n\n[ADRs](adrs/index.md)\n',
762
- '.xdrs/_local/adrs/index.md': localAdrIndex([
763
- '- [001-main](principles/001-main.md) - Main decision'
764
- ]),
765
- '.xdrs/_local/adrs/principles/001-main.md': [
766
- '---',
767
- 'name: _local-adr-policy-001-main-decision',
768
- 'description: Test XDRS element',
769
- '---',
770
- '',
771
- '# _local-adr-policy-001: Main decision',
772
- '',
773
- '## Context and Problem Statement',
774
- '',
775
- 'See ![img](.assets/used.png).',
776
- '',
777
- '## Decision Outcome',
778
- '',
779
- 'Test decision outcome.',
780
- ''
781
- ].join('\n'),
782
- '.xdrs/_local/adrs/principles/.assets/used.png': Buffer.alloc(0),
783
- '.xdrs/_local/adrs/principles/.assets/01.png': Buffer.alloc(0),
784
- '.xdrs/_local/adrs/principles/.assets/02.png': Buffer.alloc(0),
785
- '.xdrs/_local/adrs/principles/.assets/03.png': Buffer.alloc(0),
786
- '.xdrs/_local/adrs/principles/.assets/04.png': Buffer.alloc(0),
787
- '.xdrs/_local/adrs/principles/.assets/05.png': Buffer.alloc(0),
788
- '.xdrs/_local/adrs/principles/.assets/06.png': Buffer.alloc(0),
789
- '.xdrs/_local/adrs/principles/.assets/07.png': Buffer.alloc(0),
790
- '.xdrs/_local/adrs/principles/.assets/08.png': Buffer.alloc(0),
791
- '.xdrs/_local/adrs/principles/.assets/09.png': Buffer.alloc(0),
792
- '.xdrs/_local/adrs/principles/.assets/10.png': Buffer.alloc(0),
793
- '.xdrs/_local/adrs/principles/.assets/grouped/11.png': Buffer.alloc(0),
748
+ '.xdrs/_local/adrs/principles/.assets/grouped/used.png': Buffer.alloc(0),
794
749
  });
795
750
 
796
751
  const result = lintWorkspace(workspaceRoot);
797
752
 
798
- expect(result.errors.join('\n')).not.toContain('.assets directory must be flat unless it already contains more than 10 files');
753
+ expect(result.errors.join('\n')).not.toContain('.assets directory must be flat');
799
754
  });
800
755
 
801
756
  function teamAdrIndex(entries) {
@@ -1346,7 +1301,32 @@ test('reports slide file missing marp: true in frontmatter', () => {
1346
1301
 
1347
1302
  const result = lintWorkspace(workspaceRoot);
1348
1303
 
1349
- expect(result.errors.join('\n')).toContain('Slide frontmatter must include marp: true');
1304
+ expect(result.errors.join('\n')).toContain('Slide frontmatter must include marp: true as the first key');
1305
+ });
1306
+
1307
+ test('reports slide file with marp: true not as the first frontmatter key', () => {
1308
+ const workspaceRoot = createWorkspace('slide-marp-not-first', {
1309
+ '.xdrs/index.md': rootIndex(),
1310
+ '.xdrs/_local/adrs/index.md': localAdrIndex([
1311
+ '- [001-main](principles/001-main.md) - Main decision'
1312
+ ]),
1313
+ '.xdrs/_local/adrs/principles/001-main.md': xdrDocument('Body.\n\n[Slides](.assets/001-main-slides.md)'),
1314
+ '.xdrs/_local/adrs/principles/.assets/001-main-slides.md': [
1315
+ '---',
1316
+ 'theme: default',
1317
+ 'marp: true',
1318
+ '---',
1319
+ '',
1320
+ '# Slides',
1321
+ '',
1322
+ '[Parent](../001-main.md)',
1323
+ ''
1324
+ ].join('\n'),
1325
+ });
1326
+
1327
+ const result = lintWorkspace(workspaceRoot);
1328
+
1329
+ expect(result.errors.join('\n')).toContain('Slide frontmatter must include marp: true as the first key');
1350
1330
  });
1351
1331
 
1352
1332
  test('reports slide file without any frontmatter', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xdrs-core",
3
- "version": "0.28.0",
3
+ "version": "0.28.2",
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",
@@ -30,7 +30,7 @@
30
30
  "jest": "^29.7.0"
31
31
  },
32
32
  "dependencies": {
33
- "filedist": "^0.34.1",
33
+ "filedist": "^0.34.2",
34
34
  "ignore": "^7.0.5",
35
35
  "minimatch": "^10.2.5"
36
36
  },