xdrs-core 0.28.0 → 0.28.1
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.
- package/.xdrs/_core/adrs/principles/001-xdrs-core.md +1 -1
- package/.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md +1 -1
- package/.xdrs/_core/adrs/principles/skills/002-write-policy/SKILL.md +2 -2
- package/.xdrs/_core/adrs/principles/skills/003-write-skill/SKILL.md +2 -4
- package/.xdrs/_core/adrs/principles/skills/004-write-article/SKILL.md +2 -4
- package/.xdrs/_core/adrs/principles/skills/005-write-research/SKILL.md +2 -3
- package/.xdrs/_core/adrs/principles/skills/006-write-plan/SKILL.md +2 -2
- package/README.md +1 -1
- package/lib/lint.js +3 -3
- package/lib/lint.test.js +2 -2
- package/package.json +1 -1
|
@@ -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`
|
|
@@ -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`
|
|
@@ -131,11 +131,9 @@ If any check fails, revise before continuing.
|
|
|
131
131
|
- MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
|
|
132
132
|
- MUST NOT create a skill that duplicates an existing one — extend or reference it instead.
|
|
133
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`).
|
|
134
|
+
- MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
|
|
135
135
|
- MUST include a References section linking to `003-skill-standards`.
|
|
136
136
|
|
|
137
|
-
## Examples
|
|
138
|
-
|
|
139
137
|
**Input**: "Create a skill to help debug CI pipelines"
|
|
140
138
|
- Type: EDR (engineering workflow)
|
|
141
139
|
- 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:
|
|
@@ -140,11 +140,9 @@ Rules to apply while drafting:
|
|
|
140
140
|
- MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
|
|
141
141
|
- MUST follow the article template and placement rules from `004-article-standards`.
|
|
142
142
|
- 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`).
|
|
143
|
+
- MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
|
|
144
144
|
- MUST defer to active and applicable Policies when article synthesis conflicts with them.
|
|
145
145
|
|
|
146
|
-
## References
|
|
147
|
-
|
|
148
146
|
- [_core-adr-policy-004 - Article standards](../../004-article-standards.md)
|
|
149
147
|
- [_core-adr-policy-006 - Research standards](../../006-research-standards.md)
|
|
150
148
|
- [_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
|
|
@@ -278,6 +278,5 @@ If any check fails, revise before continuing.
|
|
|
278
278
|
- MUST consult `001-xdrs-core` as the canonical source for every core element definition, especially type, scope, subject, numbering, naming, and placement.
|
|
279
279
|
- MUST follow the research template and section-goal rules from `006-research-standards`.
|
|
280
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`).
|
|
281
|
+
- MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
|
|
282
282
|
- 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
|
|
@@ -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`).
|
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
|
|
|
@@ -991,7 +991,7 @@ function isExternalScopeLink(resolvedPath, xdrsRoot, externalScopes) {
|
|
|
991
991
|
if (parts.length === 0 || !parts[0]) return false;
|
|
992
992
|
const scopeName = parts[0];
|
|
993
993
|
|
|
994
|
-
// Treat as external if explicitly listed via .filedist OR if the scope directory
|
|
994
|
+
// Treat as external if explicitly listed via .filedist.lock OR if the scope directory
|
|
995
995
|
// doesn't exist locally (e.g. hasn't been extracted from an external package yet)
|
|
996
996
|
return externalScopes.has(scopeName) || !existsDirectory(path.join(xdrsRoot, scopeName));
|
|
997
997
|
}
|
|
@@ -1192,7 +1192,7 @@ function existsFile(filePath) {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
function loadFiledist(repoRoot) {
|
|
1195
|
-
const filedistPath = path.join(repoRoot, '.filedist');
|
|
1195
|
+
const filedistPath = path.join(repoRoot, '.filedist.lock');
|
|
1196
1196
|
if (!existsFile(filedistPath)) {
|
|
1197
1197
|
return new Set();
|
|
1198
1198
|
}
|
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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.1",
|
|
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",
|