xdrs-core 0.27.1 → 0.28.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.
- package/.filedist-package.yml +3 -1
- package/.xdrs/_core/adrs/index.md +1 -0
- package/.xdrs/_core/adrs/principles/008-xdr-standards-structured.md +12 -12
- package/.xdrs/_core/adrs/principles/articles/.assets/001-xdrs-overview-slides.md +234 -0
- package/.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md +1 -0
- package/.xdrs/_core/adrs/principles/skills/008-write-xdrs-doc/SKILL.md +46 -0
- package/package.json +1 -1
package/.filedist-package.yml
CHANGED
|
@@ -27,6 +27,7 @@ Step-by-step procedural guides for humans and AI agents.
|
|
|
27
27
|
- [_core-adr-skill-005-write-research](principles/skills/005-write-research/SKILL.md) - **Write Research** — create a new research document
|
|
28
28
|
- [_core-adr-skill-006-write-plan](principles/skills/006-write-plan/SKILL.md) - **Write Plan** — create a new plan document
|
|
29
29
|
- [_core-adr-skill-007-write-presentation](principles/skills/007-write-presentation/SKILL.md) - **Write Presentation** — create Marp slide presentations for XDRS documents
|
|
30
|
+
- [_core-adr-skill-008-write-xdrs-doc](principles/skills/008-write-xdrs-doc/SKILL.md) - **Write XDRS Doc** — router skill; infers document type and delegates to the appropriate authoring skill
|
|
30
31
|
|
|
31
32
|
## Articles
|
|
32
33
|
|
|
@@ -17,7 +17,7 @@ Question: How should a Policy document expose strong or individually referenceab
|
|
|
17
17
|
|
|
18
18
|
**Numbered rule blocks inside Details with a canonical citation syntax**
|
|
19
19
|
|
|
20
|
-
When a Policy document defines strong rules or policies that
|
|
20
|
+
When a Policy document defines strong rules or policies that must be stated explicitly, or when documents and skills need to cite individual rules precisely, each rule must be placed inside `### Details` as a numbered heading block. Referencing documents and skills must cite rules using the canonical dot-notation identifier.
|
|
21
21
|
|
|
22
22
|
### Details
|
|
23
23
|
|
|
@@ -28,11 +28,11 @@ Use this format when the decision defines strong rules or policies that must be
|
|
|
28
28
|
Each numbered rule must be written as:
|
|
29
29
|
|
|
30
30
|
```markdown
|
|
31
|
-
#### [NN]-[short
|
|
31
|
+
#### [NN]-[short-rule-title-in-mandatory-advisory-language-in-kebab-case-<12-words]
|
|
32
32
|
[Body using mandatory or advisory language as defined in _core-adr-policy-001. State the requirement and the situations in which it must or should be followed. Under 500 words.]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
Where `NN` is a two-digit zero-padded sequence number (e.g. `01`, `02`, `12`). Numbers must be unique within the document and must never be reused after a rule is removed.
|
|
35
|
+
Where `NN` is a two-digit zero-padded sequence number (e.g. `01`, `02`, `12`). Numbers must be unique within the document and must never be reused after a rule is removed. The short descriptive title must be in kebab-case (lowercase words separated by hyphens, no spaces or uppercase letters) and express the rule summary contents (e.g.: "43-code-must-be-linted", "12-use-standard-file-structure", "02-log-all-errors-to-mlflow")
|
|
36
36
|
|
|
37
37
|
Rule bodies must use the mandatory or advisory language terms defined in `_core-adr-policy-001`:
|
|
38
38
|
|
|
@@ -44,31 +44,31 @@ Rule bodies must use the mandatory or advisory language terms defined in `_core-
|
|
|
44
44
|
When another document or skill cites a specific rule, it must use the following dot-notation:
|
|
45
45
|
|
|
46
46
|
```
|
|
47
|
-
policy-name.
|
|
47
|
+
policy-name.NN-short-rule-title-in-kebab-case
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
Examples:
|
|
51
51
|
|
|
52
|
-
- `_core-adr-policy-008-policy-standards-structured.
|
|
53
|
-
- `_local-bdr-policy-003-data-retention-policy.
|
|
52
|
+
- `_core-adr-policy-008-policy-standards-structured.01-always-use-numbered-rules-for-strong-or-referenceable-policies`
|
|
53
|
+
- `_local-bdr-policy-003-data-retention-policy.02-purge-schedule-for-pii`
|
|
54
54
|
|
|
55
|
-
The `policy-name` must match the `name` field in the frontmatter of the source document exactly. The rule identifier
|
|
55
|
+
The `policy-name` must match the `name` field in the frontmatter of the source document exactly. The rule identifier after the dot must match the heading text exactly, including the two-digit prefix.
|
|
56
56
|
|
|
57
|
-
#### 01-
|
|
57
|
+
#### 01-always-use-numbered-rules-for-strong-or-referenceable-policies
|
|
58
58
|
|
|
59
59
|
Numbered rule blocks must be added to a Policy when the decision defines strong rules or policies that must be stated explicitly as stable items, or when there is a clear need for other documents, skills, or agents to cite individual rules by identifier. Adding numbered rules only for cosmetic organization is not recommended. Standard Policy documents that do not define strong rule sets and are not expected to be cited at the rule level should follow `_core-adr-policy-002-policy-standards` without this structured format.
|
|
60
60
|
|
|
61
|
-
#### 02-
|
|
61
|
+
#### 02-rule-numbering-must-be-stable
|
|
62
62
|
|
|
63
63
|
Rule numbers must never be reused within the same document. When a rule is removed, its number becomes permanently retired for that document. Gaps in the sequence are expected and must not be filled by renumbering remaining rules, as existing citations depend on number stability.
|
|
64
64
|
|
|
65
|
-
#### 03-
|
|
65
|
+
#### 03-rule-body-must-use-normative-language
|
|
66
66
|
|
|
67
67
|
Every rule body must contain at least one mandatory or advisory language term as defined in `_core-adr-policy-001`. Rule bodies without normative language must not be published, as they fail to communicate whether compliance is required or recommended.
|
|
68
68
|
|
|
69
|
-
#### 04-
|
|
69
|
+
#### 04-citations-must-use-exact-identifiers
|
|
70
70
|
|
|
71
|
-
Documents and skills that cite a rule must use the exact dot-notation form: `policy-name.
|
|
71
|
+
Documents and skills that cite a rule must use the exact dot-notation form: `policy-name.NN-short-rule-title-in-kebab-case`. Prose paraphrases such as "see rule 3" or "the third rule in that Policy" must not be used as citations, because they are ambiguous and break when rules are reordered or reworded.
|
|
72
72
|
|
|
73
73
|
## Considered Options
|
|
74
74
|
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
marp: true
|
|
3
|
+
paginate: true
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# XDRS Framework
|
|
7
|
+
|
|
8
|
+
A structured system for capturing, organizing, and distributing architectural, business, and engineering decisions
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Teams accumulate decisions across architecture, engineering, and business domains.
|
|
15
|
+
|
|
16
|
+
Without structure, decisions are:
|
|
17
|
+
- Buried in wikis, tickets, or chat threads
|
|
18
|
+
- Mixed with rationale, plans, and how-to guides
|
|
19
|
+
- Invisible to AI agents and future contributors
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Problem
|
|
24
|
+
|
|
25
|
+
A standard Decision Record combines too many concerns in one file:
|
|
26
|
+
|
|
27
|
+
| Concern | Job |
|
|
28
|
+
|---------|-----|
|
|
29
|
+
| Why we decided | Rationale / Research |
|
|
30
|
+
| What we decided | Policy (the rule) |
|
|
31
|
+
| How to implement it | Plan |
|
|
32
|
+
| How to apply it daily | Skill |
|
|
33
|
+
| Overview for readers | Article |
|
|
34
|
+
|
|
35
|
+
Mixing these makes decisions hard to search, update, and apply.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Solution: Separate Artifact Types
|
|
40
|
+
|
|
41
|
+
XDRS splits the concerns into focused, linkable documents:
|
|
42
|
+
|
|
43
|
+
- **Policy** — the authoritative decision (ADR / BDR / EDR)
|
|
44
|
+
- **Research** — exploration, options, evidence
|
|
45
|
+
- **Skill** — step-by-step execution procedure
|
|
46
|
+
- **Article** — synthetic overview linking multiple artifacts
|
|
47
|
+
- **Plan** — ephemeral execution plan, deleted after implementation
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Policies — the Source of Truth
|
|
52
|
+
|
|
53
|
+
The central artifact. Answers a concrete question and records the adopted direction.
|
|
54
|
+
|
|
55
|
+
Three types:
|
|
56
|
+
- **ADR** — architectural and technical decisions
|
|
57
|
+
- **BDR** — business and operational decisions
|
|
58
|
+
- **EDR** — engineering implementation decisions
|
|
59
|
+
|
|
60
|
+
If Research and a Policy disagree, **the Policy wins**.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Research
|
|
65
|
+
|
|
66
|
+
Captures exploration **before or around** a decision.
|
|
67
|
+
|
|
68
|
+
- Constraints, findings, options, pros, cons
|
|
69
|
+
- Supports elaboration and discussion — not a rule
|
|
70
|
+
- One Research document may inform multiple downstream Policies
|
|
71
|
+
- Lives beside the Policy in `researches/`
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Skills
|
|
76
|
+
|
|
77
|
+
Describe **how to execute** work under the constraints of a decision.
|
|
78
|
+
|
|
79
|
+
- Add procedural detail that Policies intentionally avoid
|
|
80
|
+
- Used by humans, AI agents, or both
|
|
81
|
+
- Task-based, end in a verifiable outcome
|
|
82
|
+
- Only mandatory when a Policy makes them mandatory
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Articles
|
|
87
|
+
|
|
88
|
+
Synthetic views that **explain a topic** across multiple Policies, Research, and Skills.
|
|
89
|
+
|
|
90
|
+
- Help readers understand the system without making new decisions
|
|
91
|
+
- Do not replace the source of truth
|
|
92
|
+
- Useful for onboarding and cross-cutting topics
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Plans
|
|
97
|
+
|
|
98
|
+
Describe a problem, proposed solution, and implementation approach.
|
|
99
|
+
|
|
100
|
+
- Clear start and end, well-defined scope
|
|
101
|
+
- **Ephemeral**: deleted after full implementation
|
|
102
|
+
- Lasting outputs are captured as Policies, Skills, or Articles
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## How They Differ at a Glance
|
|
107
|
+
|
|
108
|
+
| Artifact | Central question |
|
|
109
|
+
|----------|-----------------|
|
|
110
|
+
| Policy | What did we decide? |
|
|
111
|
+
| Research | What did we learn while evaluating options? |
|
|
112
|
+
| Skill | How do we carry out work under this decision? |
|
|
113
|
+
| Article | How do these artifacts fit together for a reader? |
|
|
114
|
+
| Plan | What are we going to do, why, and how? |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Lifecycle
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
Explore → Decide → Execute → Explain → Distribute
|
|
122
|
+
Research Policy Skill Article Scopes / Indexes
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Research usually appears **before** a decision.
|
|
126
|
+
The Policy marks the **adopted outcome**.
|
|
127
|
+
Skills appear when the decision must be **executed repeatedly**.
|
|
128
|
+
Articles appear when the **ecosystem around the decision** needs explanation.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Folder Structure
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
.xdrs/
|
|
136
|
+
[scope]/
|
|
137
|
+
[type]/ # adrs | bdrs | edrs
|
|
138
|
+
[subject]/
|
|
139
|
+
[N]-[title].md ← Policy
|
|
140
|
+
researches/
|
|
141
|
+
skills/[N]-[name]/SKILL.md
|
|
142
|
+
articles/
|
|
143
|
+
plans/
|
|
144
|
+
.assets/ ← slides, diagrams
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
- **Scope** — ownership domain (e.g. `_core`, `team-43`)
|
|
148
|
+
- **Type** — ADR / BDR / EDR
|
|
149
|
+
- **Subject** — topic category (e.g. `principles`, `application`)
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## Scope Precedence
|
|
154
|
+
|
|
155
|
+
The root `.xdrs/index.md` lists all scope indexes.
|
|
156
|
+
|
|
157
|
+
Scopes listed **later override** those listed earlier.
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
_core ← base rules (broadest)
|
|
161
|
+
my-platform ← platform-specific overrides
|
|
162
|
+
_local ← project-specific overrides (narrowest)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Applying a Policy
|
|
168
|
+
|
|
169
|
+
Before treating a Policy as a rule, check in order:
|
|
170
|
+
|
|
171
|
+
1. **Valid** — is the policy active?
|
|
172
|
+
2. **Applied to** — does the current context match the scope?
|
|
173
|
+
3. **Decision text** — do the context and exceptions allow this case?
|
|
174
|
+
|
|
175
|
+
Only decisions that pass all three checks should be enforced.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Getting Started
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# 1. Install
|
|
183
|
+
npm install xdrs-core # or pnpm add xdrs-core
|
|
184
|
+
|
|
185
|
+
# 2. Bootstrap
|
|
186
|
+
npx xdrs-core
|
|
187
|
+
|
|
188
|
+
# 3. Start writing with your AI agent
|
|
189
|
+
# "Create an ADR about our decision to use Python for AI projects."
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
This creates `AGENTS.md` and `.xdrs/index.md` with the `_core` scope pre-loaded.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Extending XDRS
|
|
197
|
+
|
|
198
|
+
| Goal | Action |
|
|
199
|
+
|------|--------|
|
|
200
|
+
| New scope | Create `.xdrs/[scope]/[type]/index.md`, add to root index |
|
|
201
|
+
| New subject | Add subject folder under scope+type path |
|
|
202
|
+
| New research | Add `researches/[N]-[title].md` |
|
|
203
|
+
| New skill | Add `skills/[N]-[name]/SKILL.md` |
|
|
204
|
+
| Distribute a scope | Pack `.xdrs/[scope]/` and publish to an npm registry |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Distributing Across Teams
|
|
209
|
+
|
|
210
|
+
- Pack `.xdrs/[scope]/` with `pnpm pack`
|
|
211
|
+
- Publish to public or internal npm registry
|
|
212
|
+
- Consumers install the package and run `npx xdrs-core extract`
|
|
213
|
+
- `filedist` tracks managed files; `_local` overrides are preserved
|
|
214
|
+
- Run `npx xdrs-core check` to verify files are in sync
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
# Summary
|
|
219
|
+
|
|
220
|
+
- XDRS separates concerns: Policy, Research, Skill, Article, Plan
|
|
221
|
+
- Policies are the source of truth; all other artifacts support them
|
|
222
|
+
- Scopes and indexes make decisions discoverable and overridable
|
|
223
|
+
- AI agents consult XDRS before every request via `AGENTS.md`
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
# References
|
|
228
|
+
|
|
229
|
+
- [XDRS Overview article](../001-xdrs-overview.md)
|
|
230
|
+
- [_core-adr-policy-001 - XDRS core](../../001-xdrs-core.md)
|
|
231
|
+
- [_core-adr-policy-002 - Policy standards](../../002-policy-standards.md)
|
|
232
|
+
- [_core-adr-policy-003 - Skill standards](../../003-skill-standards.md)
|
|
233
|
+
- [_core-adr-policy-004 - Article standards](../../004-article-standards.md)
|
|
234
|
+
- [_core-adr-policy-009 - Presentation standards](../../009-presentation-standards.md)
|
|
@@ -192,6 +192,7 @@ Follow [_core-adr-policy-001](../001-xdrs-core.md) and [_core-adr-policy-002](..
|
|
|
192
192
|
|
|
193
193
|
## References
|
|
194
194
|
|
|
195
|
+
- [Presentation slides](.assets/001-xdrs-overview-slides.md) - Marp slide deck overview of this article
|
|
195
196
|
- [_core-adr-policy-001](../001-xdrs-core.md) - XDRS elements: types, scopes, subjects, folder structure
|
|
196
197
|
- [_core-adr-policy-002](../002-policy-standards.md) - Policy document standards and mandatory template
|
|
197
198
|
- [_core-adr-policy-003](../003-skill-standards.md) - Skill standards and co-location rules
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: _core-adr-skill-008-write-xdrs-doc
|
|
3
|
+
description: >
|
|
4
|
+
Use when writing documents such as decisions, policies, skills, procedures, research, plans, articles, or presentations.
|
|
5
|
+
Activate this skill when the user asks to create or write any XDRS element.
|
|
6
|
+
metadata:
|
|
7
|
+
author: flaviostutz
|
|
8
|
+
version: "1.0"
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
Routes the request to the appropriate XDRS authoring skill based on the type of document the user wants to create. Reads the target skill at runtime and follows its instructions in full.
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
### Phase 1: Infer Document Type
|
|
18
|
+
|
|
19
|
+
1. Infer the target document type from the user's request and context using the mapping below. Do not ask the user unless the type is genuinely ambiguous after reading the request.
|
|
20
|
+
- **Policy** (ADR/BDR/EDR) — user wants to record a decision, rule, standard, guideline, or architectural/business/engineering policy
|
|
21
|
+
- **Skill** — user wants to create an agent skill, SKILL.md, or reusable workflow instruction
|
|
22
|
+
- **Research** — user wants to produce a study, investigation, evidence-based analysis, or IMRAD-style document
|
|
23
|
+
- **Plan** — user wants to create an execution plan, project plan, roadmap, or milestone document
|
|
24
|
+
- **Article** — user wants to create a guide, overview, or synthetic document that combines multiple XDRS elements
|
|
25
|
+
- **Presentation** — user wants to create slides or a Marp deck for an existing XDRS document
|
|
26
|
+
|
|
27
|
+
2. If the type cannot be confidently inferred, ask the user one focused question: *"What type of XDRS document do you want to create — Policy, Skill, Research, Plan, Article, or Presentation?"* Wait for the answer before proceeding.
|
|
28
|
+
|
|
29
|
+
### Phase 2: Load and Follow Target Skill
|
|
30
|
+
|
|
31
|
+
Read the full content of the skill file for the inferred type, then follow all its phases and instructions exactly as if that skill had been activated directly.
|
|
32
|
+
|
|
33
|
+
| Document type | Skill file to read and follow |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Policy (ADR / BDR / EDR) | `.xdrs/_core/adrs/principles/skills/002-write-policy/SKILL.md` |
|
|
36
|
+
| Skill | `.xdrs/_core/adrs/principles/skills/003-write-skill/SKILL.md` |
|
|
37
|
+
| Article | `.xdrs/_core/adrs/principles/skills/004-write-article/SKILL.md` |
|
|
38
|
+
| Research | `.xdrs/_core/adrs/principles/skills/005-write-research/SKILL.md` |
|
|
39
|
+
| Plan | `.xdrs/_core/adrs/principles/skills/006-write-plan/SKILL.md` |
|
|
40
|
+
| Presentation | `.xdrs/_core/adrs/principles/skills/007-write-presentation/SKILL.md` |
|
|
41
|
+
|
|
42
|
+
### Constraints
|
|
43
|
+
|
|
44
|
+
- MUST read the full target SKILL.md before proceeding — do not rely on summaries or prior knowledge of the target skill.
|
|
45
|
+
- MUST follow all phases of the target skill from Phase 1 onward; do not skip any phase.
|
|
46
|
+
- MUST NOT create documents of a type not listed in the routing table above.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"description": "A framework to structure, compile and distribute Architectural (ADR), Business (BDR), and Engineering (EDR) decision records contents so that AI agents and humans can reliably find and use them with hierarchical scopes and controlled rollout in the format of distributable versioned packages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|