xdrs-core 0.4.2 → 0.5.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/.xdrs/_core/adrs/index.md +7 -0
- package/.xdrs/_core/adrs/principles/001-xdr-standards.md +2 -0
- package/.xdrs/_core/adrs/principles/003-skill-standards.md +17 -4
- package/.xdrs/_core/adrs/principles/004-article-standards.md +78 -0
- package/.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md +138 -0
- package/README.md +17 -2
- package/package.json +1 -1
|
@@ -10,3 +10,10 @@ Foundational standards, principles, and guidelines.
|
|
|
10
10
|
|
|
11
11
|
- [_core-adr-001](principles/001-xdr-standards.md) - **XDR standards** (includes XDR template)
|
|
12
12
|
- [_core-adr-003](principles/003-skill-standards.md) - **Skill standards**
|
|
13
|
+
- [_core-adr-004](principles/004-article-standards.md) - **Article standards**
|
|
14
|
+
|
|
15
|
+
## Articles
|
|
16
|
+
|
|
17
|
+
Synthetic views combining XDRs and Skills around a specific topic.
|
|
18
|
+
|
|
19
|
+
- [_core-article-001](principles/articles/001-xdrs-overview.md) - **XDRs Overview** (objective, structure, getting started, guidelines, extension, usage)
|
|
@@ -138,3 +138,5 @@ Question: In the end, state explicitly the question that needs to be answered. E
|
|
|
138
138
|
## References
|
|
139
139
|
|
|
140
140
|
- [001-lint skill](skills/001-lint/SKILL.md) - Skill for reviewing code changes against XDRs
|
|
141
|
+
- [_core-adr-003 - Skill standards](003-skill-standards.md)
|
|
142
|
+
- [_core-adr-004 - Article standards](004-article-standards.md)
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Context and Problem Statement
|
|
4
4
|
|
|
5
|
-
AI agents benefit from reusable, discoverable
|
|
5
|
+
Teams and AI agents benefit from reusable, discoverable procedural packages that encode specific expertise or behaviors. Without a standard, these "skills" accumulate inconsistently across repositories, making them hard to find, validate, or share.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
A skill may describe a procedure performed exclusively by a human today but that is expected to be partially or fully automated by an AI agent in the future. Defining skills in a single, shared format from the start allows them to evolve along that automation gradient without restructuring.
|
|
8
|
+
|
|
9
|
+
How should skills be authored, structured, and organized within a project so that they are consistent, readable by humans and LLMs alike, and easy to discover?
|
|
8
10
|
|
|
9
11
|
## Decision Outcome
|
|
10
12
|
|
|
@@ -12,10 +14,20 @@ How should skills be authored, structured, and organized within a project so tha
|
|
|
12
14
|
|
|
13
15
|
Skills follow the [agentskills](https://agentskills.io/specification) open format and live inside the XDR subject folder under a `skills/` sub-directory. Each skill occupies its own numbered package folder, mirroring the XDR numbering convention.
|
|
14
16
|
|
|
17
|
+
A skill may target a human operator, an AI agent, or both. Instructions must be written imperatively and at a level of detail that either a person or an agent can follow without additional context. This design allows a skill to start as a human-only procedure and evolve — incrementally — toward partial or full AI automation without restructuring the document.
|
|
18
|
+
|
|
15
19
|
### Implementation Details
|
|
16
20
|
|
|
17
|
-
**
|
|
18
|
-
Skills
|
|
21
|
+
**Automation gradient**
|
|
22
|
+
Skills exist on a spectrum from fully manual (human-only) to fully automated (agent-only). A skill should be written so it can be executed at any point on that spectrum:
|
|
23
|
+
- Human reads and follows each step manually.
|
|
24
|
+
- Human delegates some steps to an AI assistant.
|
|
25
|
+
- An AI agent executes the skill autonomously.
|
|
26
|
+
|
|
27
|
+
Write instructions so that each step is unambiguous and self-contained. Avoid implicit knowledge that only a human or only an AI would have.
|
|
28
|
+
|
|
29
|
+
**Relation with XDRs and Articles**
|
|
30
|
+
Skills are procedures, XDRs are guardrails and decisions, and Articles are synthetic views that combine information from multiple XDRs and Skills.
|
|
19
31
|
Always create links back and forth between skills <-> XDRs as a reference.
|
|
20
32
|
|
|
21
33
|
Place a skill under the XDR type that matches the nature of the activity the skill performs:
|
|
@@ -109,3 +121,4 @@ skills-ref validate .xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]
|
|
|
109
121
|
- [agentskills/agentskills repository](https://github.com/agentskills/agentskills)
|
|
110
122
|
- [skills-ref validation library](https://github.com/agentskills/agentskills/tree/main/skills-ref)
|
|
111
123
|
- [_core-adr-001 - XDR standards](001-xdr-standards.md)
|
|
124
|
+
- [_core-adr-004 - Article standards](004-article-standards.md)
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# _core-adr-004: Article standards
|
|
2
|
+
|
|
3
|
+
## Context and Problem Statement
|
|
4
|
+
|
|
5
|
+
As the number of XDRs and Skills grows, navigating and understanding related decisions across subjects and types becomes difficult. Without a structured format for synthetic documentation, teams create ad-hoc documents that drift from the actual decisions over time.
|
|
6
|
+
|
|
7
|
+
How should articles be structured and organized to provide useful views over XDRs and Skills without replacing them as the source of truth?
|
|
8
|
+
|
|
9
|
+
## Decision Outcome
|
|
10
|
+
|
|
11
|
+
**Subject-level synthetic documents co-located with XDRs**
|
|
12
|
+
|
|
13
|
+
Articles are Markdown documents placed inside a subject folder alongside decision records. Placing articles within a subject keeps them close to the decisions and skills they reference.
|
|
14
|
+
|
|
15
|
+
### Implementation Details
|
|
16
|
+
|
|
17
|
+
- Articles are views, not decisions. They summarize and synthesize content from XDRs and Skills but are NOT the source of truth. When there is a conflict between an article and a Decision Record, the Decision Record takes precedence.
|
|
18
|
+
- Articles must reference the XDRs and Skills they synthesize. Never duplicate decision content; link back to the authoritative sources.
|
|
19
|
+
- Articles may serve as indexes, combining related DRs and Skills on a specific topic into a single navigable document.
|
|
20
|
+
- Articles must remain consistent with the XDRs and Skills they reference. When a referenced XDR or Skill changes, the article must be reviewed and updated.
|
|
21
|
+
- Place an article in the subject folder that best matches its topic. If an article spans more than one subject, place it in `principles`.
|
|
22
|
+
- Always use lowercase file names.
|
|
23
|
+
- Never use emojis in article content.
|
|
24
|
+
- Articles should be kept under 150 lines. Move detailed content to referenced XDRs or Skills.
|
|
25
|
+
|
|
26
|
+
**Folder layout**
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
.xdrs/[scope]/[type]/[subject]/
|
|
30
|
+
articles/
|
|
31
|
+
[number]-[short-title].md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
- `.xdrs/_local/adrs/principles/articles/001-onboarding-guide.md`
|
|
36
|
+
- `.xdrs/business-x/bdrs/product/articles/002-checkout-flow-overview.md`
|
|
37
|
+
- `.xdrs/business-x/bdrs/principles/articles/003-cross-domain-overview.md` ← spans multiple subjects
|
|
38
|
+
|
|
39
|
+
**Article numbering**
|
|
40
|
+
|
|
41
|
+
- Each article has a number unique within its `scope/type/subject/articles/` namespace.
|
|
42
|
+
- Determine the next number by checking the highest number already present in that namespace.
|
|
43
|
+
- Never reuse numbers of deleted articles. Gaps in the sequence are expected and allowed.
|
|
44
|
+
|
|
45
|
+
**Article template**
|
|
46
|
+
|
|
47
|
+
All articles MUST follow this template:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
# [scope]-article-[number]: [Short Title]
|
|
51
|
+
|
|
52
|
+
## Overview
|
|
53
|
+
|
|
54
|
+
[Brief description of what this article covers and its intended audience. (<3 lines)]
|
|
55
|
+
|
|
56
|
+
## Content
|
|
57
|
+
|
|
58
|
+
[Synthetic text combining and explaining the topic. Use links to Decision Records and Skills
|
|
59
|
+
when referencing an information from those documents.]
|
|
60
|
+
|
|
61
|
+
## References
|
|
62
|
+
|
|
63
|
+
- [XDR id or Skill name](relative/path/to/file.md) - Brief description of relevance
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Considered Options
|
|
67
|
+
|
|
68
|
+
* (REJECTED) **Inline summaries inside XDR index files** - Keeps everything in one place but clutters the navigation indexes.
|
|
69
|
+
* Reason: Index files should remain lean navigation aids; mixing synthesis into them hurts readability and makes updates harder.
|
|
70
|
+
* (REJECTED) **Separate documentation repository** - Removes drift risk but decouples docs from decisions.
|
|
71
|
+
* Reason: Increases maintenance burden and makes it easy for articles to go stale relative to the XDRs they reference.
|
|
72
|
+
* (CHOSEN) **Subject-level articles folder co-located with XDRs** - Keeps articles alongside the decision records and skills they reference, with `principles` as the fallback for cross-subject articles.
|
|
73
|
+
* Reason: Easy to discover, consistent with where skills are placed, and clearly distinct from the decision records themselves.
|
|
74
|
+
|
|
75
|
+
## References
|
|
76
|
+
|
|
77
|
+
- [_core-adr-001 - XDR standards](001-xdr-standards.md)
|
|
78
|
+
- [_core-adr-003 - Skill standards](003-skill-standards.md)
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# _core-article-001: XDRs Overview
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This article introduces XDRs (Decision Records), explains their purpose and design, and guides
|
|
6
|
+
teams through adopting, extending, and distributing them. It is an entry point for anyone new to
|
|
7
|
+
the framework and links out to the authoritative Decision Records for full details.
|
|
8
|
+
|
|
9
|
+
## Content
|
|
10
|
+
|
|
11
|
+
### What are XDRs?
|
|
12
|
+
|
|
13
|
+
XDRs are structured Markdown documents that capture decisions made by teams. Three types exist:
|
|
14
|
+
|
|
15
|
+
- **ADR (Architectural Decision Record)** — architectural and technical decisions: system context,
|
|
16
|
+
integration patterns, overarching corporate practices.
|
|
17
|
+
- **BDR (Business Decision Record)** — business process, product strategy, compliance, and
|
|
18
|
+
operational decisions.
|
|
19
|
+
- **EDR (Engineering Decision Record)** — engineering implementation details: library choices,
|
|
20
|
+
tooling standards, coding practices.
|
|
21
|
+
|
|
22
|
+
Collectively they are called XDRs. See [_core-adr-001](../001-xdr-standards.md) for the full
|
|
23
|
+
definition and mandatory template.
|
|
24
|
+
|
|
25
|
+
### Objective
|
|
26
|
+
|
|
27
|
+
As organizations grow, decisions accumulate across teams and domains. Without a consistent
|
|
28
|
+
structure, AI agents cannot reliably locate the right decision for a given context, and humans
|
|
29
|
+
struggle to maintain hundreds of documents. XDRs solve both problems by defining:
|
|
30
|
+
|
|
31
|
+
- A predictable folder hierarchy that any agent can navigate.
|
|
32
|
+
- Small, focused files (target under 100 lines) that are fast for LLMs to read.
|
|
33
|
+
- Scope and subject grouping that limits the search space.
|
|
34
|
+
- A root index as a single discovery entry point.
|
|
35
|
+
|
|
36
|
+
### How it works
|
|
37
|
+
|
|
38
|
+
Every XDR lives at a fixed path:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
.xdrs/[scope]/[type]/[subject]/[number]-[short-title].md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Scopes** represent ownership domains (e.g. `_core`, `business-x`, `team-43`). `_local` is
|
|
45
|
+
reserved for project-specific decisions that must not be shared externally; it always sits last
|
|
46
|
+
in `.xdrs/index.md` so its decisions override all others.
|
|
47
|
+
|
|
48
|
+
**Types** are `adrs`, `bdrs`, or `edrs`.
|
|
49
|
+
|
|
50
|
+
**Subjects** constrain the domain further (e.g. `principles`, `application`, `devops`, `finance`).
|
|
51
|
+
See [_core-adr-001](../001-xdr-standards.md) for the full allowed subject list per type.
|
|
52
|
+
|
|
53
|
+
**IDs** follow the pattern `[scope]-[type abbrev]-[number]`, e.g. `_core-adr-001`. Numbers are
|
|
54
|
+
never reused. Gaps in the sequence indicate deleted records.
|
|
55
|
+
|
|
56
|
+
Each scope+type has a canonical `index.md` that lists all XDRs with short descriptions. A root
|
|
57
|
+
`.xdrs/index.md` points to all canonical indexes and defines scope precedence (later scopes
|
|
58
|
+
override earlier ones).
|
|
59
|
+
|
|
60
|
+
Skills — step-by-step procedural instructions for humans and AI agents — live in `[subject]/skills/` sub-directories and are
|
|
61
|
+
distributed alongside the XDRs they implement. A skill may start as a human-only procedure and evolve toward partial or full
|
|
62
|
+
AI automation over time, without needing to be restructured. See [_core-adr-003](../003-skill-standards.md).
|
|
63
|
+
|
|
64
|
+
Articles — like this document — are synthetic views that combine XDRs and Skills for a specific
|
|
65
|
+
topic. They never replace the Decision Records as source of truth. See
|
|
66
|
+
[_core-adr-004](../004-article-standards.md).
|
|
67
|
+
|
|
68
|
+
### Why it is implemented this way
|
|
69
|
+
|
|
70
|
+
Key design choices and their rationale:
|
|
71
|
+
|
|
72
|
+
- **Scoped folders over a flat list** — flat lists become unmanageable at scale; scopes give
|
|
73
|
+
clear ownership and allow selective adoption.
|
|
74
|
+
- **Small focused files** — LLMs have limited context windows; small files make token budgets
|
|
75
|
+
predictable and keep decisions unambiguous.
|
|
76
|
+
- **Canonical indexes** — agents read the index first to narrow the set of relevant files, rather
|
|
77
|
+
than scanning every document.
|
|
78
|
+
- **npm distribution** — versioned packages let teams adopt specific decision sets at a specific
|
|
79
|
+
version without being forced to take all changes at once.
|
|
80
|
+
- **Skills co-located with XDRs** — keeping procedural guidance next to the decisions it
|
|
81
|
+
implements reduces drift and makes discovery straightforward for humans and agents alike.
|
|
82
|
+
Because skills span a spectrum from fully manual to fully automated, co-location also
|
|
83
|
+
makes it easy to see when a human procedure is ready to be promoted to an agent workflow.
|
|
84
|
+
|
|
85
|
+
### Getting started
|
|
86
|
+
|
|
87
|
+
1. Create or open a project workspace.
|
|
88
|
+
2. Run `npx xdrs-core` in the workspace root. This installs:
|
|
89
|
+
- `AGENTS.md` — instructs AI agents to always consult XDRs.
|
|
90
|
+
- `AGENTS.local.md` — project-specific agent instructions (editable).
|
|
91
|
+
- `.xdrs/index.md` — root index (editable, `keepExisting` mode).
|
|
92
|
+
- `_core` XDRs and skills under `.xdrs/_core/`.
|
|
93
|
+
3. Start a conversation with your AI agent:
|
|
94
|
+
> Create an ADR about our decision to use Python for AI projects.
|
|
95
|
+
|
|
96
|
+
### Guidelines
|
|
97
|
+
|
|
98
|
+
Follow [_core-adr-001](../001-xdr-standards.md) strictly. Key rules:
|
|
99
|
+
|
|
100
|
+
- Use **mandatory language** (`must`, `never`, `required`) for non-negotiable rules and
|
|
101
|
+
**advisory language** (`should`, `recommended`) for guidance.
|
|
102
|
+
- Keep XDRs under 100 lines. Move procedural detail to a co-located Skill.
|
|
103
|
+
- Always update the scope+type index and the root index after adding or changing an XDR.
|
|
104
|
+
- Use `_local` scope when a decision is project-specific and must not be shared.
|
|
105
|
+
- Never reuse a number once it has been assigned, even if the XDR is deleted.
|
|
106
|
+
|
|
107
|
+
### How to extend
|
|
108
|
+
|
|
109
|
+
- **New scope** — create `.xdrs/[scope]/[type]/index.md` and add it to `.xdrs/index.md`.
|
|
110
|
+
- **New subject** — create the subject folder under the existing scope+type path. Add an
|
|
111
|
+
allowed subject or use `principles` if none fits (propose a new subject via a `_core` ADR).
|
|
112
|
+
- **New skill** — add a `skills/[number]-[skill-name]/SKILL.md` inside the relevant subject
|
|
113
|
+
folder, following [_core-adr-003](../003-skill-standards.md).
|
|
114
|
+
- **New article** — add an `articles/[number]-[short-title].md` inside the relevant subject
|
|
115
|
+
folder, following [_core-adr-004](../004-article-standards.md).
|
|
116
|
+
|
|
117
|
+
### Using XDRs in your own project
|
|
118
|
+
|
|
119
|
+
1. **Install** — add the scope package as a dependency and run `npx xdrs-core extract` (or
|
|
120
|
+
`pnpm exec xdrs-core extract`) to unpack XDR files into `.xdrs/` in your workspace.
|
|
121
|
+
2. **Pins and upgrades** — update the npm dependency version to pull in the latest decisions
|
|
122
|
+
for a scope. The `filedist` mechanism tracks managed files in `.filedist` and keeps
|
|
123
|
+
`AGENTS.local.md` and `.xdrs/index.md` in `keepExisting` mode so local edits are preserved.
|
|
124
|
+
3. **Multi-scope** — list multiple scope packages as dependencies. Edit `.xdrs/index.md` to
|
|
125
|
+
add each scope's canonical index link; place more specific scopes below broader ones.
|
|
126
|
+
4. **Verify** — run `npx xdrs-core check` to confirm all managed files are in sync with the
|
|
127
|
+
installed packages.
|
|
128
|
+
5. **Distribute your own scope** — pack `.xdrs/[scope]/` with `pnpm pack` and publish to an
|
|
129
|
+
npm registry (public or internal). Pin a tag for prerelease versions.
|
|
130
|
+
|
|
131
|
+
## References
|
|
132
|
+
|
|
133
|
+
- [_core-adr-001](../001-xdr-standards.md) - XDR standards and mandatory template
|
|
134
|
+
- [_core-adr-003](../003-skill-standards.md) - Skill standards and co-location rules
|
|
135
|
+
- [_core-adr-004](../004-article-standards.md) - Article standards
|
|
136
|
+
- [001-lint skill](../skills/001-lint/SKILL.md) - Linting code against XDRs
|
|
137
|
+
- [002-write-xdr skill](../skills/002-write-xdr/SKILL.md) - Writing a new XDR
|
|
138
|
+
- [003-write-skill skill](../skills/003-write-skill/SKILL.md) - Writing a new skill
|
package/README.md
CHANGED
|
@@ -10,6 +10,14 @@ Decision Records capture Architectural (ADR), Business (BDR), and Engineering (E
|
|
|
10
10
|
|
|
11
11
|
This project defines a standard for organizing XDRs that satisfies the following requirements.
|
|
12
12
|
|
|
13
|
+
## XDR elements
|
|
14
|
+
|
|
15
|
+
Every XDR package contains three types of documents:
|
|
16
|
+
|
|
17
|
+
- **Decision Records (XDRs)** — Architectural (ADR), Business (BDR), or Engineering (EDR) records that capture a single decision, its rationale, and the rules that follow from it. They are the source of truth.
|
|
18
|
+
- **Skills** — Step-by-step procedural guides that can be followed by humans, AI agents, or both. A skill may start as a fully manual procedure and evolve toward partial or full AI automation over time. Co-located with the XDRs they implement.
|
|
19
|
+
- **Articles** — Synthetic explanatory texts that combine information from multiple XDRs and Skills around a specific topic or audience. They never replace XDRs as source of truth.
|
|
20
|
+
|
|
13
21
|
## Getting started
|
|
14
22
|
|
|
15
23
|
1. Create a new project workspace
|
|
@@ -68,19 +76,25 @@ This is especially important for BDRs: because business rules govern decisions t
|
|
|
68
76
|
index.md # canonical index for this scope+type
|
|
69
77
|
[subject]/
|
|
70
78
|
[number]-[short-title].md # individual decision record
|
|
71
|
-
skills/ # optional
|
|
79
|
+
skills/ # optional skill packages for humans and AI agents
|
|
72
80
|
[number]-[skill-name]/
|
|
73
81
|
SKILL.md
|
|
82
|
+
articles/ # optional synthetic views over XDRs and Skills
|
|
83
|
+
[number]-[short-title].md
|
|
74
84
|
```
|
|
75
85
|
|
|
76
|
-
|
|
86
|
+
Document types:
|
|
77
87
|
|
|
78
88
|
- **ADR** - Architectural Decision Record: architectural and technical decisions
|
|
79
89
|
- **BDR** - Business Decision Record: business process and strategy decisions
|
|
80
90
|
- **EDR** - Engineering Decision Record: engineering workflow and tooling decisions
|
|
91
|
+
- **Skills** - Step-by-step procedural guides that can be followed by humans, AI agents, or both. Must comply with Decision Records, but add the execution detail they lack. A skill may start as a fully manual human procedure and evolve incrementally toward partial or full AI automation without being restructured. Co-located with the XDRs they implement inside `skills/` sub-directories.
|
|
92
|
+
- **Articles** - Synthetic views that explain concepts or combine information from multiple Decision Records and Skills into a coherent text for a specific topic or audience. Articles are not the source of truth; Decision Records take precedence when there is a conflict. Useful as navigational indexes that link related DRs and Skills around a specific aspect.
|
|
81
93
|
|
|
82
94
|
See [.xdrs/index.md](.xdrs/index.md) for the full list of active decision records.
|
|
83
95
|
|
|
96
|
+
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).
|
|
97
|
+
|
|
84
98
|
## Flow: Decision -> Distribution -> Usage
|
|
85
99
|
|
|
86
100
|
XDRs and skills follow a three-stage lifecycle that keeps decision-making decentralized while allowing controlled adoption across projects.
|
|
@@ -108,4 +122,5 @@ Multiple scope packages can be combined in the same workspace by listing them as
|
|
|
108
122
|
[subject]/ [subject]/
|
|
109
123
|
*.md *.md
|
|
110
124
|
skills/ skills/
|
|
125
|
+
articles/ articles/
|
|
111
126
|
```
|
package/package.json
CHANGED