xdrs-core 0.24.1 → 0.26.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 +19 -19
- package/.xdrs/_core/adrs/principles/001-xdrs-core.md +37 -37
- package/.xdrs/_core/adrs/principles/002-policy-standards.md +153 -0
- package/.xdrs/_core/adrs/principles/003-skill-standards.md +23 -22
- package/.xdrs/_core/adrs/principles/004-article-standards.md +23 -23
- package/.xdrs/_core/adrs/principles/{005-semantic-versioning-for-xdr-packages.md → 005-semantic-versioning-for-xdrs-packages.md} +11 -11
- package/.xdrs/_core/adrs/principles/006-research-standards.md +24 -24
- package/.xdrs/_core/adrs/principles/007-plan-standards.md +14 -14
- package/.xdrs/_core/adrs/principles/008-xdr-standards-structured.md +19 -19
- package/.xdrs/_core/adrs/principles/009-presentation-standards.md +11 -11
- package/.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md +61 -50
- package/.xdrs/_core/adrs/principles/skills/{001-lint/001-lint.test.int.js → 001-review/001-review.test.int.js} +4 -4
- package/.xdrs/_core/adrs/principles/skills/{001-lint/001-lint.test.int.report → 001-review/001-review.test.int.report} +1 -1
- package/.xdrs/_core/adrs/principles/skills/001-review/SKILL.md +94 -0
- package/.xdrs/_core/adrs/principles/skills/002-write-policy/002-write-policy.test.int.js +24 -0
- package/.xdrs/_core/adrs/principles/skills/{002-write-xdr/002-write-xdr.test.int.report → 002-write-policy/002-write-policy.test.int.report} +2 -2
- package/.xdrs/_core/adrs/principles/skills/{002-write-xdr → 002-write-policy}/SKILL.md +40 -40
- package/.xdrs/_core/adrs/principles/skills/003-write-skill/SKILL.md +18 -18
- package/.xdrs/_core/adrs/principles/skills/004-write-article/SKILL.md +32 -32
- package/.xdrs/_core/adrs/principles/skills/005-write-research/SKILL.md +25 -25
- package/.xdrs/_core/adrs/principles/skills/006-write-plan/SKILL.md +17 -17
- package/.xdrs/_core/adrs/principles/skills/007-write-presentation/SKILL.md +14 -14
- package/.xdrs/_core/index.md +21 -26
- package/.xdrs/index.md +4 -4
- package/AGENTS.md +12 -12
- package/README.md +53 -40
- package/lib/lint.js +53 -48
- package/lib/lint.test.js +96 -96
- package/package.json +3 -3
- package/.xdrs/_core/adrs/principles/002-xdr-standards.md +0 -158
- package/.xdrs/_core/adrs/principles/skills/001-lint/SKILL.md +0 -94
- package/.xdrs/_core/adrs/principles/skills/002-write-xdr/002-write-xdr.test.int.js +0 -24
- package/.xdrs/_core/bdrs/index.md +0 -9
- package/.xdrs/_core/bdrs/principles/001-xdr-decisions-and-skills-usage.md +0 -52
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: _core-adr-002-xdr-standards
|
|
3
|
-
description: Defines how XDR decision documents should be written, including template, frontmatter, applicability fields, and conflict handling. Use when writing or reviewing any XDR document.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# _core-adr-002: XDR standards
|
|
7
|
-
|
|
8
|
-
## Context and Problem Statement
|
|
9
|
-
|
|
10
|
-
XDR framework elements (types, scopes, subjects, folder structure) are defined in `_core-adr-001`. Once a decision record's structural placement is clear, how should the document itself be written to remain authoritative, concise, and consistently structured?
|
|
11
|
-
|
|
12
|
-
## Decision Outcome
|
|
13
|
-
|
|
14
|
-
**Structured decision records with a mandatory template, applicability metadata, and clear conflict rules**
|
|
15
|
-
|
|
16
|
-
XDR documents are the authoritative policy for their scope, type, and subject. They must be concise, template-compliant, and clear about applicability so that humans and AI agents can reliably determine whether and how to apply any decision.
|
|
17
|
-
|
|
18
|
-
### Details
|
|
19
|
-
|
|
20
|
-
- XDRs MUST contain a clear decision about a certain problem or situation. Avoid being too verbose and focus on explaining clearly the context and the decision. Avoid adding contents that are not original. If you have other references that are important to understand the document, add links and references. Always cite sources.
|
|
21
|
-
- XDRs are the central artifact of the framework and the authoritative policy for their scope, type, and subject. Supporting artifacts may explain, justify, or operationalize the decision (like articles, researches and skills), but they do not replace it.
|
|
22
|
-
- XDR documents MUST include a YAML frontmatter block at the very beginning of the file. The supported fields are:
|
|
23
|
-
|
|
24
|
-
| Field | Required | Constraints |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| `name` | Yes | 1-64 characters. Lowercase letters, numbers, hyphens, and leading underscores only. Must not end with a hyphen. Must not contain consecutive hyphens. Must match the document identifier from the heading: `[scope]-[type]-[number]-[short-title]`. |
|
|
27
|
-
| `description` | Yes | 1-1024 characters. Describes what this decision is about and when to use it. Should include keywords that help agents identify when to apply it. |
|
|
28
|
-
| `apply-to` | No | Short description of contexts this decision is applicable to. Keep it under 40 words. If omitted, the decision applies to all logically applicable elements. ONLY use this section if the usage is very specific to a specific case. Examples: `Only frontend code`, `JavaScript projects`. |
|
|
29
|
-
| `valid-from` | No | ISO date (`YYYY-MM-DD`) indicating from when this decision must be enforced. Before this date it should be used everywhere possible, but compliance is not enforced during reviews until after this date. |
|
|
30
|
-
| `license` | No | SPDX license expression (e.g. `MIT`, `Apache-2.0`, `CC-BY-4.0`). Indicates the license under which the document content is shared. If omitted, the license is governed by the repository or package defaults. |
|
|
31
|
-
| `metadata` | No | Arbitrary key-value map for additional properties not defined by this spec. |
|
|
32
|
-
|
|
33
|
-
- Minimal example:
|
|
34
|
-
```yaml
|
|
35
|
-
---
|
|
36
|
-
name: _core-adr-002-xdr-standards
|
|
37
|
-
description: Defines how XDR documents should be written. Use when writing or reviewing any XDR.
|
|
38
|
-
---
|
|
39
|
-
```
|
|
40
|
-
- Example with optional fields:
|
|
41
|
-
```yaml
|
|
42
|
-
---
|
|
43
|
-
name: _core-adr-002-xdr-standards
|
|
44
|
-
description: Defines how XDR documents should be written. Use when writing or reviewing any XDR.
|
|
45
|
-
apply-to: All XDR scopes
|
|
46
|
-
valid-from: 2026-06-01
|
|
47
|
-
metadata:
|
|
48
|
-
author: example-org
|
|
49
|
-
---
|
|
50
|
-
```
|
|
51
|
-
- All documents present in the collection are considered active. There is no status field. When a decision is no longer relevant, valid or active, it must be removed from the collection. Historical versions are available via versioned packages or git history.
|
|
52
|
-
- Before using, enforcing, or citing an XDR as a current rule, humans and AI agents MUST decide whether the decision is applicable for the current case.
|
|
53
|
-
- Check `valid-from:` first. If a date is present and has not yet been reached, the decision SHOULD be adopted for new implementations but is not enforced during reviews.
|
|
54
|
-
- Check `apply-to:` next to determine whether the decision fits the current codebase, system, workflow, or audience.
|
|
55
|
-
- Check the decision context and implementation details last to determine any additional boundaries, exceptions, or qualifiers that metadata alone cannot express.
|
|
56
|
-
- Research documents MAY be added under the same subject to capture the exploration, findings, and proposals that backed a decision. Research is useful during elaboration, discussion, and updates of XDRs, but the XDR document remains the source of truth.
|
|
57
|
-
- **XDR Id:** [scope]-[type]-[xdr number] (numbers are scoped per type+scope combination and must not be reused within that combination; always use lowercase)
|
|
58
|
-
- Types in IDs: `adr`, `bdr`, `edr`
|
|
59
|
-
- Define the next number of an XDR by checking what is the highest number present in the type+scope. Don't fill numbering gaps, as they might be old deleted XDRs and we should never reuse numbers of different documents/decisions. Numbering gaps are expected.
|
|
60
|
-
- Decisions MUST be concise and reference other XDRs to avoid duplication.
|
|
61
|
-
- The `### Details` section SHOULD state relevant boundaries or exceptions and what a reader should do or avoid in common cases. Use the frontmatter fields `apply-to` and `valid-from` as the first-pass filter for applicability, then keep nuanced boundaries in the decision text.
|
|
62
|
-
- Use concise rules, examples, `Allowed` / `Disallowed` lists or checklists with required items to help the reader apply the decision correctly. Keep them short and decision-specific.
|
|
63
|
-
- When the decision defines strong policies or rules that should be stated explicitly as stable rule blocks, or when other documents, skills, or agents need to cite those rules individually by identifier, the XDR MUST follow the extension [_core-adr-008 - XDR standards - structured](008-xdr-standards-structured.md) instead of using plain bullet lists for those rules.
|
|
64
|
-
- Conflict handling applies to XDR documents:
|
|
65
|
-
- For cross-scope overrides, document the decision conflict in the XDR `## Conflicts` section of the XDR that overrides another scope.
|
|
66
|
-
- **Within-scope conflicts:** XDRs within the same type+scope must not conflict. If two XDRs appear to conflict, one should be updated, removed, or the conflict resolved through a new XDR.
|
|
67
|
-
- When research exists for a decision, the XDR SHOULD mention the related research documents after the `## Considered Options` list.
|
|
68
|
-
- Never use emojis in contents.
|
|
69
|
-
- Always use file names with lowercase.
|
|
70
|
-
- Any non-Markdown files referenced by an XDR (schemas, JSON examples, images, diagrams, binaries, or any other data files) SHOULD be used only when they are materially necessary and MUST live in `[xdrs-root]/[scope]/[type]/[subject]/.assets/`.
|
|
71
|
-
- Sub-directories inside this `.assets/` folder are allowed only when it already has more than 10 files. Otherwise, keep files flat.
|
|
72
|
-
- Avoid using lengthy instructions on the XDR. If there are long and detailed instructions related to the XDR, or instructions that are outside the decision, create another file with a guide. If the guide is small, keep it in the XDR itself.
|
|
73
|
-
- XDRs should be under 1300 words long as a rule of thumb.
|
|
74
|
-
- This is important to make them focused on a clear decision
|
|
75
|
-
- Exceptions can reach under 2600 words (templates, more elaborate decision implementations etc)
|
|
76
|
-
- ALWAYS use `_local` scope if the user doesn't explicitly indicate a specific scope while creating an xdr or skill.
|
|
77
|
-
|
|
78
|
-
**XDR template**
|
|
79
|
-
|
|
80
|
-
All XDRs MUST follow this template
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
---
|
|
84
|
-
name: [scope]-[type]-[number]-[short-title]
|
|
85
|
-
description: [What this decision is about and when to use it]
|
|
86
|
-
apply-to: [Optional. Contexts this decision applies to, under 40 words]
|
|
87
|
-
valid-from: [Optional. ISO date YYYY-MM-DD from when enforcement begins]
|
|
88
|
-
license: [Optional. SPDX license expression]
|
|
89
|
-
metadata:
|
|
90
|
-
[optional-key]: [optional-value]
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
# [scope]-[type]-[number]: [Short Title]
|
|
94
|
-
|
|
95
|
-
## Context and Problem Statement
|
|
96
|
-
|
|
97
|
-
[Describe the context, background, or need that led to this decision.
|
|
98
|
-
What is the problem we are trying to solve? Who is being impacted? (<40 words)
|
|
99
|
-
|
|
100
|
-
Question: In the end, state explicitly the question that needs to be answered. E.g: "Which platform should I use when implementing an AI agent?"]
|
|
101
|
-
|
|
102
|
-
## Decision Outcome
|
|
103
|
-
|
|
104
|
-
**[Chosen Option Title]**
|
|
105
|
-
[Very short description of what is the decision, aligned with the titles on the Considered Options section]
|
|
106
|
-
|
|
107
|
-
[Short description of implementation details for the chosen path]
|
|
108
|
-
|
|
109
|
-
### Details
|
|
110
|
-
|
|
111
|
-
[Optional section with implementation specifics, applicability boundaries, rules, concise examples, or do/don't guidance. This is the answer to the question in the "Context and Problem Statement". (<1300 words)]
|
|
112
|
-
|
|
113
|
-
## Considered Options
|
|
114
|
-
[this section is present ONLY if the user explicitely indicated that there were multiple options to choose from while making this decision.]
|
|
115
|
-
|
|
116
|
-
* (CHOSEN) **Option 2** - Brief description of option 2
|
|
117
|
-
* Reason: Brief description of why this option was accepted, containing the strengths, strategical motivations and it's differential over the other options.
|
|
118
|
-
* (REJECTED) **Option 1** - Brief description of option 1
|
|
119
|
-
* Reason: Brief description why this was rejected with important aspects to be re-checked in the case we want to change this decision
|
|
120
|
-
|
|
121
|
-
[Related research, if any]
|
|
122
|
-
- [Research document title](researches/001-example.md) - Brief description of what it informed
|
|
123
|
-
|
|
124
|
-
## Conflicts
|
|
125
|
-
|
|
126
|
-
[If this XDR has conflicts with other scopes, this section is MANDATORY and needs to have an explanation why the conflict is accepted]
|
|
127
|
-
|
|
128
|
-
* Conflict with [XDR id] (e.g.: adr-business-x-001)
|
|
129
|
-
* Summary: Brief description of the conflict
|
|
130
|
-
* Reason to accept: Brief description of why it was decided to accept this conflict, possibly overriding or diverging from the other decision/scopes
|
|
131
|
-
|
|
132
|
-
## References
|
|
133
|
-
|
|
134
|
-
[optional section]
|
|
135
|
-
[useful links related to this implementation]
|
|
136
|
-
[links to the discussion (PRs, meetings etc)]
|
|
137
|
-
[links to related skills]
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**Examples:**
|
|
141
|
-
- Frontmatter examples:
|
|
142
|
-
- `valid-from: 2026-03-01`
|
|
143
|
-
- `apply-to: JavaScript projects`
|
|
144
|
-
|
|
145
|
-
**XDR ID Examples:**
|
|
146
|
-
- `business-x-adr-001` (not `ADR-business-x-001` or `business-x-adr-1`)
|
|
147
|
-
- `business-x-edr-042` (not `EDR-BUSINESS-X-042`)
|
|
148
|
-
- `business-x-bdr-007`
|
|
149
|
-
|
|
150
|
-
## References
|
|
151
|
-
|
|
152
|
-
- [_core-adr-001 - XDRs core](001-xdrs-core.md) - Framework elements: types, scopes, subjects, folder structure
|
|
153
|
-
- [001-lint skill](skills/001-lint/SKILL.md) - Skill for reviewing code changes against XDRs
|
|
154
|
-
- [002-write-xdr skill](skills/002-write-xdr/SKILL.md) - Skill for creating a new XDR following this standard
|
|
155
|
-
- [_core-adr-003 - Skill standards](003-skill-standards.md)
|
|
156
|
-
- [_core-adr-004 - Article standards](004-article-standards.md)
|
|
157
|
-
- [_core-adr-006 - Research standards](006-research-standards.md)
|
|
158
|
-
- [_core-adr-008 - XDR standards - structured](008-xdr-standards-structured.md) - Extension for XDRs that expose individually referenceable rules
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 001-lint
|
|
3
|
-
description: >
|
|
4
|
-
Reviews code changes or files against applicable XDRs (Decision Records) and reports violations as structured findings.
|
|
5
|
-
Activate this skill when the user asks to review, lint, or audit code, or when you identify a need to check compliance with XDRs during implementation.
|
|
6
|
-
metadata:
|
|
7
|
-
author: flaviostutz
|
|
8
|
-
version: "1.0"
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## Overview
|
|
12
|
-
|
|
13
|
-
Performs a structured review of code changes or files against the XDRs in the repository, categorizing findings by severity and type, and reporting them without modifying any code.
|
|
14
|
-
|
|
15
|
-
## Instructions
|
|
16
|
-
|
|
17
|
-
### Phase 1: Code Gathering
|
|
18
|
-
|
|
19
|
-
1. Identify changes based on requested scope:
|
|
20
|
-
- For diffs: run and parse `git diff refs/remotes/origin/HEAD`
|
|
21
|
-
- For files: analyze file contents directly
|
|
22
|
-
|
|
23
|
-
### Phase 2: XDR Compilation
|
|
24
|
-
|
|
25
|
-
1. Gather all Decision Records from the XDR root `index.md` (default: `.xdrs/index.md`) starting from the working directory.
|
|
26
|
-
- XDR scopes are controlled by nested folders; some are broad, others domain-specific.
|
|
27
|
-
- Extract frontmatter first to decide whether each XDR should be used for the current review context.
|
|
28
|
-
- All documents present in the collection are considered active.
|
|
29
|
-
- Check `valid-from:` first. If a date is present and has not yet been reached, the decision SHOULD be adopted for new implementations but is not enforced during reviews.
|
|
30
|
-
- Check `apply-to:` second. Keep only XDRs whose stated scope fits the files, systems, or workflows under review.
|
|
31
|
-
- Check the decision text itself last for additional boundaries or exceptions that metadata does not encode.
|
|
32
|
-
2. Filter relevance based on file types, domains, and architectural patterns in scope.
|
|
33
|
-
|
|
34
|
-
### Phase 3: XDR Review
|
|
35
|
-
|
|
36
|
-
1. Cross-reference each file in scope against active, applicable XDRs.
|
|
37
|
-
- **Drop any finding that cannot be traced to a specific rule in an Accepted XDR.** General good-practice observations, personal opinions, or inferred issues without an explicit XDR backing must not be reported.
|
|
38
|
-
- Classify as ERROR (mandatory) or WARNING (advisory).
|
|
39
|
-
- Include: location, description, XDR reference (file + line), suggestion.
|
|
40
|
-
2. Reduce false positives:
|
|
41
|
-
- Evaluate ERROR findings for mandatory language in the XDR ("must", "always", "never", "required", "mandatory"). Drop or downgrade to WARNING if the language is advisory ("should", "recommended", "advised").
|
|
42
|
-
- Remove findings unrelated to actual changes.
|
|
43
|
-
- Consolidate duplicates.
|
|
44
|
-
- Consider context (existing style, legacy sections, etc.).
|
|
45
|
-
3. For related XDRs and files, lookup for the specific line number in both the XDR and the code that are related to the finding. This will be used in the reporting phase to provide precise references and actionable suggestions.
|
|
46
|
-
|
|
47
|
-
### Phase 4: Judgment
|
|
48
|
-
1. Judgment criteria (all must be true to keep a finding):
|
|
49
|
-
- Is the violation explicitly stated as a rule in an Accepted XDR using mandatory or advisory language? Templates, examples, and diagrams in XDRs are illustrative only — they do not constitute rules. If the only evidence for the violation is an implicit pattern in a code sample or template, drop it.
|
|
50
|
-
- Is there concrete evidence in the code or diff?
|
|
51
|
-
- Is the finding actionable?
|
|
52
|
-
- Would fixing it meaningfully improve compliance with the XDR?
|
|
53
|
-
|
|
54
|
-
### Phase 5: Reporting
|
|
55
|
-
|
|
56
|
-
**Report template**
|
|
57
|
-
```text
|
|
58
|
-
### Code Review Against XDRs
|
|
59
|
-
Scope: [scope identifier]
|
|
60
|
-
|
|
61
|
-
## Findings
|
|
62
|
-
### 1. [ERROR|WARNING] - [filename:line_number](filename:line_number)
|
|
63
|
-
- Title of the finding (<=15 words)
|
|
64
|
-
- XDR reference: [xdr-file:line_number](xdr-file:line_number)
|
|
65
|
-
- Why: Brief description of the issue in 20 words
|
|
66
|
-
- Fix: Specific action to fix this issue in 15 words
|
|
67
|
-
- Relevance: Why this matters / What to watch for in 15 words
|
|
68
|
-
|
|
69
|
-
### 2. [second finding etc]
|
|
70
|
-
|
|
71
|
-
## Summary
|
|
72
|
-
- Errors: [count]
|
|
73
|
-
- Warnings: [count]
|
|
74
|
-
- Outcome: [PASS|FAIL]
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
### Constraints
|
|
78
|
-
- MUST NOT include any text or explanations outside the required output format.
|
|
79
|
-
- MUST NOT edit code. Instruct the user on how to request code changes in suggestions.
|
|
80
|
-
|
|
81
|
-
## Examples
|
|
82
|
-
- An XDR mentions that "Every code MUST have a header comment with author name", if you find a codebase without the author name, report as ERROR.
|
|
83
|
-
- An XDR mentions that "Functions SHOULD be no longer than 50 lines", if you find a function with 80 lines, report as WARNING.
|
|
84
|
-
|
|
85
|
-
## Edge Cases
|
|
86
|
-
- If no XDRs apply to the scope, output "No applicable XDRs found" and skip reporting.
|
|
87
|
-
- If a potential violation is in pre-existing code outside the diff, report it as WARNING only.
|
|
88
|
-
|
|
89
|
-
## References
|
|
90
|
-
|
|
91
|
-
- [_core-adr-001 - XDRs core](../../001-xdrs-core.md)
|
|
92
|
-
- [_core-adr-002 - XDR standards](../../002-xdr-standards.md)
|
|
93
|
-
- [_core-adr-003 - Skill standards](../../003-skill-standards.md)
|
|
94
|
-
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const { copilotCmd, testPrompt } = require('xdrs-core');
|
|
5
|
-
|
|
6
|
-
const REPO_ROOT = path.resolve(__dirname, '..', '..', '..', '..', '..', '..');
|
|
7
|
-
|
|
8
|
-
jest.setTimeout(300000);
|
|
9
|
-
|
|
10
|
-
test('002-write-xdr creates a local EDR decision record', async () => {
|
|
11
|
-
const err = await testPrompt(
|
|
12
|
-
{
|
|
13
|
-
workspaceRoot: REPO_ROOT,
|
|
14
|
-
workspaceMode: 'copy',
|
|
15
|
-
...copilotCmd(REPO_ROOT),
|
|
16
|
-
},
|
|
17
|
-
'Create a very small XDR deciding to use pnpm for Node.js monorepos',
|
|
18
|
-
'Verify that an XDR markdown file was created under .xdrs/_local/edrs/devops/, that it contains "## Context and Problem Statement" and "## Decision Outcome", that it read file 002-write-xdr/SKILL.md and has the decision of using pnpm for Node.js monorepos.',
|
|
19
|
-
null,
|
|
20
|
-
true
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
expect(err).toBe('');
|
|
24
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# _core BDRs Index
|
|
2
|
-
|
|
3
|
-
Business and operational decisions about how the XDR framework operates, including policy and process rules for framework users. Owned by the platform team. Propose changes via pull request.
|
|
4
|
-
|
|
5
|
-
## Principles
|
|
6
|
-
|
|
7
|
-
Foundational business principles and policy decisions that guide all framework users.
|
|
8
|
-
|
|
9
|
-
- [_core-bdr-001](principles/001-xdr-decisions-and-skills-usage.md) - **XDR decisions and skills usage** — How agents and humans must use XDR decisions and skills, separating policy authority from execution guidance
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: _core-bdr-001-xdr-decisions-and-skills-usage
|
|
3
|
-
description: Defines how agents and humans must use XDR decisions and skills, separating policy authority from execution guidance across single-agent and multi-agent workflows.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# _core-bdr-001: XDR decisions and skills usage
|
|
7
|
-
|
|
8
|
-
## Context and Problem Statement
|
|
9
|
-
|
|
10
|
-
Repositories using the XDR framework contain both decision records (BDRs, ADRs, EDRs) and skills. In multi-agent or multi-role workflows, each actor needs to know which artifact carries policy authority and which carries execution guidance.
|
|
11
|
-
|
|
12
|
-
Question: How must agents and humans use XDR decisions and skills so policy, execution guidance, and role boundaries stay clear?
|
|
13
|
-
|
|
14
|
-
## Decision Outcome
|
|
15
|
-
|
|
16
|
-
**BDRs define compliance policy; skills operationalize it**
|
|
17
|
-
|
|
18
|
-
XDR decisions are the authoritative source of mandatory policy. Skills are execution artifacts that operationalize those decisions and must never substitute them as policy authority.
|
|
19
|
-
|
|
20
|
-
### Details
|
|
21
|
-
|
|
22
|
-
- Before treating any XDR as a current requirement, evaluate applicability in order: `valid-from`, `apply-to`, then the decision text.
|
|
23
|
-
- The set of policies that an agent or human must comply with for a given operational context must be declared in BDRs.
|
|
24
|
-
- If a policy set becomes too large or too mixed in purpose to review clearly in one record, it must be split into multiple focused BDRs.
|
|
25
|
-
- Specific work instructions that operationalize BDR policies must be structured as skills when the procedure is detailed enough to benefit from a dedicated operational document.
|
|
26
|
-
- Every skill that operationalizes or verifies BDR policies must link to the BDRs it implements or checks.
|
|
27
|
-
- If a skill conflicts with an applicable XDR, the XDR prevails. The human or agent must stop relying on the conflicting skill behavior and report the inconsistency.
|
|
28
|
-
- If an applicable BDR exists but no supporting skill exists yet, the human or agent may proceed by following the BDR directly when the decision is actionable, and must report the missing skill as an operational gap.
|
|
29
|
-
- In multi-agent graphs or staged workflows, every participating agent must remain bounded by the same applicable BDR policies even when agents have different local objectives, prompts, or skills.
|
|
30
|
-
- Each agent or human role involved in a workflow must make explicit which applicable BDRs govern its work and which skills it is following.
|
|
31
|
-
- Different documents may be consumed by different actors. For example: one agent uses skills for data acquisition, another for plan execution, and a reviewer reads BDRs directly to validate outcomes.
|
|
32
|
-
|
|
33
|
-
Allowed:
|
|
34
|
-
- using multiple skills to operationalize one BDR in different phases of a workflow;
|
|
35
|
-
- using one skill to operationalize multiple related BDRs when the skill links them clearly;
|
|
36
|
-
- having human-only, agent-only, or mixed human-agent execution for the same skill.
|
|
37
|
-
|
|
38
|
-
Disallowed:
|
|
39
|
-
- treating a skill as policy authority by itself;
|
|
40
|
-
- inventing mandatory policy rules only inside prompts, plans, or skills;
|
|
41
|
-
- allowing one agent in a workflow to bypass an applicable BDR because another agent checked a different subset of rules.
|
|
42
|
-
|
|
43
|
-
## Considered Options
|
|
44
|
-
|
|
45
|
-
- (REJECTED) **Keep policy and execution guidance mixed inside operational BDRs** — Makes decisions harder to reuse, review, and assign across humans and multiple agent roles.
|
|
46
|
-
- (CHOSEN) **Separate mandatory policy in BDRs from executable guidance in skills** — Preserves a clear source of truth while allowing different humans and agents to execute specialized procedures.
|
|
47
|
-
|
|
48
|
-
## References
|
|
49
|
-
|
|
50
|
-
- [_core-adr-001](../../adrs/principles/001-xdrs-core.md)
|
|
51
|
-
- [_core-adr-002](../../adrs/principles/002-xdr-standards.md)
|
|
52
|
-
- [_core-adr-003](../../adrs/principles/003-skill-standards.md)
|