xdrs-core 0.7.0 → 0.7.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/index.md
CHANGED
|
@@ -21,4 +21,4 @@ Decisions about how XDRs work
|
|
|
21
21
|
|
|
22
22
|
Project-local XDRs that must not be shared with other contexts. Always keep this scope last so its decisions override or extend all scopes listed above. Add specific `_local` ADR/BDR/EDR index links here when present.
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
|
package/README.md
CHANGED
|
@@ -124,7 +124,7 @@ Document types:
|
|
|
124
124
|
See [.xdrs/index.md](.xdrs/index.md) for the full list of active decision records.
|
|
125
125
|
|
|
126
126
|
For a deeper overview of XDRs — objective, structure, guidelines, extension, and usage — see the [XDRs Overview article](.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md).
|
|
127
|
-
For packaging guidance on publishing your own reusable scope with DRs, skills, and articles, see the [Create your own xdrs-core extension package article](
|
|
127
|
+
For packaging guidance on publishing your own reusable scope with DRs, skills, and articles, see the [Create your own xdrs-core extension package article](docs/create-your-own-xdrs-extension-package.md), then compare [examples/basic-usage](examples/basic-usage) and [examples/mydevkit](examples/mydevkit).
|
|
128
128
|
|
|
129
129
|
## Flow: Decision -> Distribution -> Usage
|
|
130
130
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "A standard way to organize Decision Records (XDRs) across scopes, subjects, and teams so that AI agents can reliably query and follow them.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,10 +30,7 @@
|
|
|
30
30
|
"selector": {
|
|
31
31
|
"files": [
|
|
32
32
|
"AGENTS.md",
|
|
33
|
-
".xdrs/**"
|
|
34
|
-
],
|
|
35
|
-
"exclude": [
|
|
36
|
-
".xdrs/index.md"
|
|
33
|
+
".xdrs/_core/**"
|
|
37
34
|
]
|
|
38
35
|
},
|
|
39
36
|
"output": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# local ADRs Index
|
|
2
|
-
|
|
3
|
-
This index covers project-local architectural documentation for this repository. These documents
|
|
4
|
-
are not meant to be distributed as reusable scope packages unless they are promoted into a named
|
|
5
|
-
shared scope.
|
|
6
|
-
|
|
7
|
-
## Articles
|
|
8
|
-
|
|
9
|
-
Synthetic views combining XDRs, repository examples, and packaging guidance.
|
|
10
|
-
|
|
11
|
-
- [_local-article-001](principles/articles/001-create-your-own-xdrs-extension-package.md) - **Create your own xdrs-core extension package** (package layout, filedist sets, publishing, versioning, and consumer overrides)
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
# _local-article-001: Create your own xdrs-core extension package
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
This article explains how to turn your own XDR scope into a distributable npm package. It is for
|
|
6
|
-
teams that want to publish their own DRs, skills, and articles while staying compatible with the
|
|
7
|
-
xdrs-core structure and extraction flow.
|
|
8
|
-
|
|
9
|
-
## Content
|
|
10
|
-
|
|
11
|
-
### Start with a real shared scope, not `_local`
|
|
12
|
-
|
|
13
|
-
Use `_local` only for project-only records that must stay inside one repository. Shared packages
|
|
14
|
-
should publish a named scope such as `acme-platform` or `team-ml`, because scopes are the unit of
|
|
15
|
-
ownership, distribution, and override ordering in XDRs. The root structure and precedence rules are
|
|
16
|
-
defined in [_core-adr-001](../../../../_core/adrs/principles/001-xdr-standards.md).
|
|
17
|
-
|
|
18
|
-
### Package the whole scope as a normal npm package
|
|
19
|
-
|
|
20
|
-
The package shape used by this repository is the simplest reference implementation: the published
|
|
21
|
-
artifact is a regular npm package with a `files` whitelist, a thin CLI entrypoint, and `filedist`
|
|
22
|
-
configuration embedded in [package.json](../../../../../package.json). The important parts are:
|
|
23
|
-
|
|
24
|
-
- include the shipped XDR tree, agent instruction files, and CLI files in `files`
|
|
25
|
-
- expose `bin/filedist.js` as the package `bin` so consumers run the package through the same
|
|
26
|
-
`extract` and `check` interface
|
|
27
|
-
- define one `filedist.sets` entry for managed files and another for editable local overrides
|
|
28
|
-
|
|
29
|
-
For a minimal consumer flow, see [example/package.json](../../../../../example/package.json) and
|
|
30
|
-
[example/Makefile](../../../../../example/Makefile).
|
|
31
|
-
|
|
32
|
-
### Separate managed files from local overrides
|
|
33
|
-
|
|
34
|
-
This repository's `filedist` config in [package.json](../../../../../package.json) shows the key
|
|
35
|
-
pattern:
|
|
36
|
-
|
|
37
|
-
- managed set: ships `AGENTS.md` and `.xdrs/**`, while excluding `.xdrs/index.md`
|
|
38
|
-
- keep-existing set: ships `.xdrs/index.md` and `AGENTS.local.md` with `managed=false` and
|
|
39
|
-
`keepExisting=true`
|
|
40
|
-
|
|
41
|
-
That split matters because consumers need some files to stay under package control and others to
|
|
42
|
-
remain editable in their own repository. The current example verifies exactly that behavior by
|
|
43
|
-
re-extracting into [example/output](../../../../../example/output) and asserting that local edits to
|
|
44
|
-
`.xdrs/index.md` survive `extract --keep-existing` while managed files are still checked for drift in
|
|
45
|
-
[example/Makefile](../../../../../example/Makefile).
|
|
46
|
-
|
|
47
|
-
### Keep DRs, skills, and articles together
|
|
48
|
-
|
|
49
|
-
Your reusable package should place DRs, skills, and articles under the same scope folder so they
|
|
50
|
-
ship together:
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
.xdrs/
|
|
54
|
-
my-scope/
|
|
55
|
-
adrs/
|
|
56
|
-
index.md
|
|
57
|
-
principles/
|
|
58
|
-
001-my-decision.md
|
|
59
|
-
skills/
|
|
60
|
-
001-my-skill/SKILL.md
|
|
61
|
-
articles/
|
|
62
|
-
001-my-overview.md
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
The co-location rule for skills comes from [_core-adr-003](../../../../_core/adrs/principles/003-skill-standards.md),
|
|
66
|
-
and article placement rules come from [_core-adr-004](../../../../_core/adrs/principles/004-article-standards.md).
|
|
67
|
-
When you publish the scope folder, those documents travel together and stay version-aligned.
|
|
68
|
-
|
|
69
|
-
### Expose skills to Copilot-compatible tooling
|
|
70
|
-
|
|
71
|
-
This repository's managed `filedist` set creates symlinks from `.xdrs/**/skills/*` into
|
|
72
|
-
`.github/skills`, configured in [package.json](../../../../../package.json). That means your skills
|
|
73
|
-
remain authored next to the XDRs they implement, but consumers also get the discovery path expected
|
|
74
|
-
by GitHub Copilot and similar tooling.
|
|
75
|
-
|
|
76
|
-
If your package targets non-Copilot agents too, keep the source of truth in `.xdrs/[scope]/.../skills/`
|
|
77
|
-
and treat `.github/skills` as an exposure mechanism rather than the canonical location.
|
|
78
|
-
|
|
79
|
-
### Verify with a consumer example before publishing
|
|
80
|
-
|
|
81
|
-
The [example](../../../../../example) folder is the best reference in this repository for the
|
|
82
|
-
consumer side of the workflow:
|
|
83
|
-
|
|
84
|
-
1. depend on the locally packed tarball from `dist/`
|
|
85
|
-
2. run `pnpm exec xdrs-core extract --output ./output`
|
|
86
|
-
3. verify the expected files exist
|
|
87
|
-
4. re-run extraction to confirm keep-existing behavior
|
|
88
|
-
5. run `check` and `lint` against the extracted tree
|
|
89
|
-
|
|
90
|
-
That same pattern should exist in your extension package repository. A runnable example catches bad
|
|
91
|
-
selectors, missing files, broken indexes, and skill exposure problems before you publish.
|
|
92
|
-
|
|
93
|
-
### Publish and version the package as an upgrade contract
|
|
94
|
-
|
|
95
|
-
The release flow in [Makefile](../../../../../Makefile) packs the project and publishes it with npm,
|
|
96
|
-
including prerelease tag handling. Your extension package can follow the same shape: `pnpm pack` for
|
|
97
|
-
local verification, then `npm publish` to your public or internal registry.
|
|
98
|
-
|
|
99
|
-
Version the package with semantic versioning according to the impact on consumers, not only on the
|
|
100
|
-
changed file. [_core-adr-005](../../../../_core/adrs/principles/005-semantic-versioning-for-xdr-packages.md)
|
|
101
|
-
defines the practical rule: breaking guidance or changed mandatory behavior is `MAJOR`, additive
|
|
102
|
-
guidance such as new DRs, skills, or articles is usually `MINOR`, and low-risk corrections are
|
|
103
|
-
`PATCH`.
|
|
104
|
-
|
|
105
|
-
### Use agentme as the fuller packaged example
|
|
106
|
-
|
|
107
|
-
This repository shows the baseline xdrs-core packaging model. For a fuller distribution package that
|
|
108
|
-
combines reusable XDR scopes with additional agent workflow files and presets, use
|
|
109
|
-
[flaviostutz/agentme](https://github.com/flaviostutz/agentme) as the reference. Its README shows the
|
|
110
|
-
same extraction model applied to a richer package: install the dependency, run `extract`, review the
|
|
111
|
-
generated output, and re-run `check` when upgrading.
|
|
112
|
-
|
|
113
|
-
## References
|
|
114
|
-
|
|
115
|
-
- [_core-adr-001](../../../../_core/adrs/principles/001-xdr-standards.md) - Scope structure, precedence, and distribution model
|
|
116
|
-
- [_core-adr-003](../../../../_core/adrs/principles/003-skill-standards.md) - Skill co-location and discovery rules
|
|
117
|
-
- [_core-adr-004](../../../../_core/adrs/principles/004-article-standards.md) - Article placement and template rules
|
|
118
|
-
- [_core-adr-005](../../../../_core/adrs/principles/005-semantic-versioning-for-xdr-packages.md) - Versioning policy for published XDR packages
|
|
119
|
-
- [package.json](../../../../../package.json) - Reference `files`, `bin`, symlink, and `filedist` set layout
|
|
120
|
-
- [Makefile](../../../../../Makefile) - Reference pack and publish flow
|
|
121
|
-
- [example/package.json](../../../../../example/package.json) - Minimal consumer dependency setup
|
|
122
|
-
- [example/Makefile](../../../../../example/Makefile) - Extraction, keep-existing, check, and lint verification flow
|
|
123
|
-
- [agentme](https://github.com/flaviostutz/agentme) - Full distribution package example built on top of xdrs-core
|