xdrs-core 0.7.0 → 0.8.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.
@@ -12,6 +12,13 @@ Foundational standards, principles, and guidelines.
12
12
  - [_core-adr-003](principles/003-skill-standards.md) - **Skill standards**
13
13
  - [_core-adr-004](principles/004-article-standards.md) - **Article standards**
14
14
  - [_core-adr-005](principles/005-semantic-versioning-for-xdr-packages.md) - **Semantic versioning for XDR packages**
15
+ - [_core-adr-006](principles/006-research-standards.md) - **Research standards**
16
+
17
+ ## Research
18
+
19
+ Exploratory documents that back decisions during their lifecycle.
20
+
21
+ - [_core-research-001](principles/researches/001-research-and-decision-lifecycle.md) - **Research and decision lifecycle** (how research supports XDRs, skills, and articles)
15
22
 
16
23
  ## Skills
17
24
 
@@ -21,9 +28,10 @@ Step-by-step procedural guides for humans and AI agents.
21
28
  - [002-write-xdr](principles/skills/002-write-xdr/SKILL.md) - **Write XDR** — create a new Decision Record
22
29
  - [003-write-skill](principles/skills/003-write-skill/SKILL.md) - **Write Skill** — create a new skill package
23
30
  - [004-write-article](principles/skills/004-write-article/SKILL.md) - **Write Article** — create a new article document
31
+ - [005-write-research](principles/skills/005-write-research/SKILL.md) - **Write Research** — create a new research document
24
32
 
25
33
  ## Articles
26
34
 
27
- Synthetic views combining XDRs and Skills around a specific topic.
35
+ Synthetic views combining XDRs, Research, and Skills around a specific topic.
28
36
 
29
37
  - [_core-article-001](principles/articles/001-xdrs-overview.md) - **XDRs Overview** (objective, structure, getting started, guidelines, extension, usage)
@@ -22,11 +22,17 @@ Provides clear ownership by scope, predictable navigation, and reusable decision
22
22
  ### Implementation Details
23
23
 
24
24
  - 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.
25
+ - 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, but they do not replace it.
26
+ - 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, approval, retirement, and updates, but the XDR remains the source of truth.
25
27
  - Make it clear if an instruction is mandatory or advisory
26
28
  - Mandatory language: "must", "always", "never", "required", "mandatory"
27
29
  - Advisory language: "should", "recommended", "advised", "preferably", "possibly", "optionally"
28
30
  - Always the following folder structure:
29
31
  `.xdrs/[scope]/[type]/[subject]/[number]-[short-title].md`
32
+ - Optional supporting artifacts under the same subject:
33
+ - `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`
34
+ - `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/SKILL.md`
35
+ - `.xdrs/[scope]/[type]/[subject]/articles/[number]-[short-title].md`
30
36
  - **Scopes:**
31
37
  - examples: `business-x`, `business-y`, `team-43`, `_core`
32
38
  - `_local` is a reserved scope for XDRs created locally to a specific project or repository. XDRs in `_local` must not be shared with or propagated to other contexts. This scope must always be placed in the lowest position in `.xdrs/index.md` so that its decisions override or extend any decisions from all higher-positioned scopes.
@@ -40,6 +46,9 @@ Provides clear ownership by scope, predictable navigation, and reusable decision
40
46
  - Types in IDs: `adr`, `bdr`, `edr`
41
47
  - 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.
42
48
  - Decisions MUST be concise and reference other XDRs to avoid duplication
49
+ - The `### Implementation Details` section SHOULD state when the decision applies, relevant boundaries or exceptions, and what a reader should do or avoid in common cases.
50
+ - Use concise rules, examples, or `Do` / `Don't` lists only when they help a reader apply the decision correctly. Keep them short and decision-specific.
51
+ - When research exists for a decision, the XDR SHOULD mention the related research documents after the `## Considered Options` list.
43
52
  - Never use emojis in contents
44
53
  - Always use file names with lowercase
45
54
  - 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.
@@ -80,7 +89,7 @@ Question: In the end, state explicitly the question that needs to be answered. E
80
89
 
81
90
  ### Implementation Details
82
91
 
83
- [Optional section with implementation specifics, rules, examples or impact. This is the answer to the question in the "Context and Problem Statement". (<100 lines)]
92
+ [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". (<100 lines)]
84
93
 
85
94
  ## Considered Options
86
95
 
@@ -92,6 +101,9 @@ Question: In the end, state explicitly the question that needs to be answered. E
92
101
  * Reason: Brief description of why this option was accepted, containing the strengths, strategical motivations and it's differential over the other options.
93
102
  * (REJECTED) **Option 3** - [same as above, if we have more than 2 options to choose from]
94
103
 
104
+ [Related research, if any]
105
+ - [Research document title](researches/001-example.md) - Brief description of what it informed
106
+
95
107
  ## Conflicts
96
108
 
97
109
  [If this XDR has conflicts with other scopes, this section is MANDATORY and needs to have an explanation why the conflict is accepted]
@@ -118,14 +130,6 @@ Question: In the end, state explicitly the question that needs to be answered. E
118
130
  - `business-x-edr-042` (not `EDR-BUSINESS-X-042`)
119
131
  - `business-x-bdr-007`
120
132
 
121
- ## Procedures
122
-
123
- 1. Choose the correct type (ADR, BDR, EDR), scope, and subject for each new XDR.
124
- 2. Create the XDR using the template in the Implementation Details section above, adapting it for the chosen type and required sections.
125
- 3. Update or create the scope `README.md` with examples if needed.
126
- 4. Add/update the new/updated XDRs to `.xdrs/[scope]/[type]/index.md` and to the main `.xdrs/index.md`
127
- 5. Keep decision texts short and link to other XDRs for shared rules
128
-
129
133
  ## Considered Options
130
134
 
131
135
  * (REJECTED) **Flat list of decisions** - Simple but becomes unmanageable as the number grows.
@@ -138,5 +142,7 @@ Question: In the end, state explicitly the question that needs to be answered. E
138
142
  ## References
139
143
 
140
144
  - [001-lint skill](skills/001-lint/SKILL.md) - Skill for reviewing code changes against XDRs
145
+ - [002-write-xdr skill](skills/002-write-xdr/SKILL.md) - Skill for creating a new XDR from this standard
141
146
  - [_core-adr-003 - Skill standards](003-skill-standards.md)
142
147
  - [_core-adr-004 - Article standards](004-article-standards.md)
148
+ - [_core-adr-006 - Research standards](006-research-standards.md)
@@ -26,9 +26,12 @@ Skills exist on a spectrum from fully manual (human-only) to fully automated (ag
26
26
 
27
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
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.
31
- Always create links back and forth between skills <-> XDRs as a reference.
29
+ **Relation with XDRs, Research, and Articles**
30
+ Skills are procedures, XDRs are guardrails and decisions, Research documents capture the explored option space and findings behind a decision, and Articles are synthetic views that combine information from multiple artifacts.
31
+ Always create links back and forth between skills <-> XDRs when the relationship is direct, and link to related Research or Articles when they provide important context.
32
+ - Skills are task-based artifacts. They should have a clear starting trigger, an expected end result, and enough detail for a human or agent to verify that the task finished correctly.
33
+ - A skill is not policy by itself. If following a skill is mandatory, that obligation must come from an XDR or another explicit policy that references the skill.
34
+ - Skills and XDRs have a many-to-many relationship: one skill may operationalize multiple XDRs, and one XDR may be executed through multiple skills in different contexts.
32
35
 
33
36
  Place a skill under the XDR type that matches the nature of the activity the skill performs:
34
37
  - **EDR skills** - engineering workflows, tool usage, coding procedures, implementation how-tos (e.g. how to design a webpage, how to run a CI pipeline, how to debug a service)
@@ -95,6 +98,8 @@ Known gotchas and how to handle them.
95
98
 
96
99
  Rules:
97
100
  - The `name` field must match the parent directory name exactly (e.g., directory `001-code-review` uses `name: 001-code-review`). This preserves agentskills spec compliance while encoding the ordering number.
101
+ - `## Overview` SHOULD state the task objective, expected outcome, and relevant prerequisites or tools when they matter.
102
+ - `## Instructions` SHOULD include verification steps or acceptance criteria at the end of the task, or at the end of major phases when partial validation matters.
98
103
  - Keep `SKILL.md` under 500 lines. Move lengthy reference material to `references/`.
99
104
  - Reference other files with relative paths from the skill root.
100
105
  - Always use lowercase file names.
@@ -122,3 +127,4 @@ skills-ref validate .xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]
122
127
  - [skills-ref validation library](https://github.com/agentskills/agentskills/tree/main/skills-ref)
123
128
  - [_core-adr-001 - XDR standards](001-xdr-standards.md)
124
129
  - [_core-adr-004 - Article standards](004-article-standards.md)
130
+ - [_core-adr-006 - Research standards](006-research-standards.md)
@@ -2,22 +2,22 @@
2
2
 
3
3
  ## Context and Problem Statement
4
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.
5
+ As the number of XDRs, Research documents, 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 and supporting evidence over time.
6
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?
7
+ How should articles be structured and organized to provide useful views over XDRs, Research, and Skills without replacing them as the source of truth?
8
8
 
9
9
  ## Decision Outcome
10
10
 
11
11
  **Subject-level synthetic documents co-located with XDRs**
12
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.
13
+ Articles are Markdown documents placed inside a subject folder alongside decision records. Placing articles within a subject keeps them close to the decisions, research, and skills they reference.
14
14
 
15
15
  ### Implementation Details
16
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.
17
+ - Articles are views, not decisions. They summarize and synthesize content from XDRs, Research, 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, Research documents, and Skills they synthesize. Never duplicate decision content; link back to the authoritative sources.
19
+ - Articles may serve as indexes, combining related artifacts on a specific topic into a single navigable document.
20
+ - Articles must remain consistent with the XDRs, Research documents, and Skills they reference. When a referenced artifact changes, the article must be reviewed and updated.
21
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
22
  - Always use lowercase file names.
23
23
  - Never use emojis in article content.
@@ -55,7 +55,7 @@ All articles MUST follow this template:
55
55
 
56
56
  ## Content
57
57
 
58
- [Synthetic text combining and explaining the topic. Use links to Decision Records and Skills
58
+ [Synthetic text combining and explaining the topic. Use links to Decision Records, Research, and Skills
59
59
  when referencing an information from those documents.]
60
60
 
61
61
  ## References
@@ -76,4 +76,5 @@ when referencing an information from those documents.]
76
76
 
77
77
  - [_core-adr-001 - XDR standards](001-xdr-standards.md)
78
78
  - [_core-adr-003 - Skill standards](003-skill-standards.md)
79
+ - [_core-adr-006 - Research standards](006-research-standards.md)
79
80
  - [004-write-article skill](skills/004-write-article/SKILL.md) - Step-by-step instructions for creating a new article
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Context and Problem Statement
4
4
 
5
- Teams consume XDR packages as reusable guidance, constraints, skills, and articles. If package versions do not reflect the real impact of a release, upgrades become risky and teams lose trust in reuse.
5
+ Teams consume XDR packages as reusable guidance, constraints, Research documents, skills, and articles. If package versions do not reflect the real impact of a release, upgrades become risky and teams lose trust in reuse.
6
6
 
7
- Question: How should semantic versioning be used when publishing or versioning a package containing XDRs, skills, and articles?
7
+ Question: How should semantic versioning be used when publishing or versioning a package containing XDRs, Research documents, skills, and articles?
8
8
 
9
9
  ## Decision Outcome
10
10
 
@@ -28,8 +28,8 @@ XDR packages must use semantic versioning so the package version communicates th
28
28
  **MINOR**
29
29
  - Use a minor bump for backward-compatible additions and new capabilities.
30
30
  - Use a minor bump for new XDRs that do not break existing guidance.
31
- - Use a minor bump for new or updated articles and skill changes that extend the package without requiring consumers to undo previous adoption work.
32
- - Typical cases: new features, new optional guidance, new articles, expanded skills, or additive non-breaking decision coverage.
31
+ - Use a minor bump for new or updated Research documents, articles, and skill changes that extend the package without requiring consumers to undo previous adoption work.
32
+ - Typical cases: new features, new optional guidance, new Research documents, new articles, expanded skills, or additive non-breaking decision coverage.
33
33
 
34
34
  **PATCH**
35
35
  - Use a patch bump for low-risk fixes and simple improvements.
@@ -43,3 +43,4 @@ XDR packages must use semantic versioning so the package version communicates th
43
43
  ## References
44
44
 
45
45
  - https://semver.org/
46
+ - [_core-adr-006 - Research standards](006-research-standards.md)
@@ -0,0 +1,119 @@
1
+ # _core-adr-006: Research standards
2
+
3
+ ## Context and Problem Statement
4
+
5
+ Teams often need more space than an XDR allows to evaluate constraints, explore options, and record findings before or after a decision changes. When that material is scattered across PR comments, docs, and chat, the reasoning behind a decision becomes hard to recover or update.
6
+
7
+ Question: How should research documents be structured and organized so they support the decision lifecycle without replacing XDRs as the source of truth?
8
+
9
+ ## Decision Outcome
10
+
11
+ **subject-level research documents co-located with XDRs**
12
+
13
+ Research documents are Markdown files placed inside a subject folder alongside decision records. They capture the explored option space, relevant constraints, findings, and proposal tradeoffs that back a decision during elaboration, discussion, approval, retirement, and updates.
14
+
15
+ ### Implementation Details
16
+
17
+ - Research is evidence and exploration, not the adopted decision. When a research document and an XDR disagree, the XDR takes precedence.
18
+ - `Research` is the artifact name. `researches/` is only the folder name used alongside `skills/` and `articles/`.
19
+ - Research documents MUST live under `researches/` inside the relevant subject folder:
20
+ `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`
21
+ - Research documents SHOULD stay focused on one problem statement or decision thread.
22
+ - Research documents MUST state clearly what problem or question is being investigated and who needs the result.
23
+ - The `## Overview` section MUST end with a line in the form `Question: [central question]?` that states the central question the research answers.
24
+ - Research constraints MAY include hard requirements, stack limitations, regulatory limits, or other conditions that narrow the option space.
25
+ - Research documents MUST summarize the problem constraints, important findings, and a small set of proposals with pros and cons for each option.
26
+ - Research proposals are the considered options for the decision thread. They are not the final policy.
27
+ - Research documents SHOULD link to the XDRs, skills, articles, discussions, and external references they informed.
28
+ - One research document MAY inform multiple XDRs, including a mix of ADRs, BDRs, and EDRs, when the same investigation produced several downstream decisions.
29
+ - Research documents SHOULD remain concise enough to read end-to-end. Target under 500 lines; hard limit 2000 lines.
30
+ - Research file names MUST be lowercase. Never use emojis.
31
+ - A research document MAY exist before the related XDR is written, or remain after the XDR changes, as long as its status and references stay clear.
32
+
33
+ **Folder layout**
34
+
35
+ ```
36
+ .xdrs/[scope]/[type]/[subject]/
37
+ researches/
38
+ [number]-[short-title].md
39
+ ```
40
+
41
+ Examples:
42
+ - `.xdrs/_core/adrs/principles/researches/001-research-and-decision-lifecycle.md`
43
+ - `.xdrs/business-x/adrs/platform/researches/003-api-gateway-options.md`
44
+ - `.xdrs/_local/edrs/ai/researches/002-model-serving-constraints.md`
45
+
46
+ **Research numbering**
47
+
48
+ - Each research document has a number unique within its `scope/type/subject/researches/` namespace.
49
+ - Determine the next number by checking the highest number already present in that namespace.
50
+ - Never reuse numbers of deleted research documents. Gaps are expected.
51
+
52
+ **Research template**
53
+
54
+ All research documents MUST follow this template:
55
+
56
+ ```markdown
57
+ # [scope]-research-[number]: [Short Title]
58
+
59
+ ## Overview
60
+
61
+ [Brief description of the problem or question being explored, who needs the result, and the decision thread(s) it supports. Under 5 lines.]
62
+
63
+ Question: [Central question of the research]?
64
+
65
+ ## Constraints
66
+
67
+ - [Constraint or requirement 1]
68
+ - [Constraint or requirement 2]
69
+
70
+ ## Findings
71
+
72
+ - [Important finding 1]
73
+ - [Important finding 2]
74
+
75
+ ## Proposals
76
+
77
+ ### Option 1: [Name]
78
+
79
+ [Short description of the option.]
80
+
81
+ **Pros**
82
+ - [Benefit 1]
83
+ - [Benefit 2]
84
+
85
+ **Cons**
86
+ - [Drawback 1]
87
+ - [Drawback 2]
88
+
89
+ ### Option 2: [Name]
90
+
91
+ [Same structure as above for each meaningful option.]
92
+
93
+ ## Recommendation
94
+
95
+ [Optional summary of the currently preferred direction, if any.]
96
+
97
+ ## References
98
+
99
+ - [Related XDR or artifact](relative/path.md) - Why it matters
100
+ - [Another related XDR if this research informed multiple decisions](relative/path.md) - Why it matters
101
+ ```
102
+
103
+ ## Considered Options
104
+
105
+ - Related research: [001-research-and-decision-lifecycle](researches/001-research-and-decision-lifecycle.md)
106
+
107
+ * (REJECTED) **Inline long-form analysis inside the XDR** - Put all research and decision text in one file.
108
+ * Reason: Makes XDRs too long, mixes evidence with the adopted rule set, and hurts fast retrieval by humans and AI agents.
109
+ * (REJECTED) **Separate top-level research area outside the subject tree** - Centralize all research in one independent folder.
110
+ * Reason: Breaks proximity with the decisions it supports and makes subject-scoped discovery weaker.
111
+ * (CHOSEN) **Subject-level research folder co-located with XDRs** - Keep exploratory material beside the decisions, skills, and articles it informs.
112
+ * Reason: Preserves lifecycle context, keeps the XDR concise, and makes the research easy to discover when revisiting or updating a decision.
113
+
114
+ ## References
115
+
116
+ - [_core-adr-001 - XDR standards](001-xdr-standards.md)
117
+ - [_core-adr-003 - Skill standards](003-skill-standards.md)
118
+ - [_core-adr-004 - Article standards](004-article-standards.md)
119
+ - [005-write-research skill](skills/005-write-research/SKILL.md) - Step-by-step instructions for creating a research document
@@ -8,88 +8,111 @@ the framework and links out to the authoritative Decision Records for full detai
8
8
 
9
9
  ## Content
10
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:
11
+ ### What the central elements are
12
+
13
+ The XDR framework is built around a small set of artifact types that play different roles in the
14
+ same decision system.
15
+
16
+ - **Decision Records (XDRs)** are the authoritative decisions. They answer a concrete question and
17
+ record the adopted direction. They are the central policy artifact of the framework for the
18
+ scope and topic they cover. Three decision record types exist: **ADR** for architectural and
19
+ technical decisions, **BDR** for business and operational decisions, and **EDR** for engineering
20
+ implementation decisions. See [_core-adr-001](../001-xdr-standards.md).
21
+ - **Research** captures exploration before or around a decision: constraints, findings, options,
22
+ pros, and cons. Research supports elaboration, discussion, approval, retirement, and updates,
23
+ but it is not the final rule. A single Research document may inform multiple downstream ADRs,
24
+ BDRs, or EDRs. If Research and an XDR disagree, the XDR wins. See
25
+ [_core-adr-006](../006-research-standards.md).
26
+ - **Skills** describe how to execute work under the constraints of the decisions. They add the
27
+ procedural detail that XDRs intentionally avoid. A Skill may be used by a human, an AI agent, or
28
+ both. Skills are task-based, should end in a verifiable outcome, and are only mandatory when a
29
+ policy such as an XDR makes them mandatory. See [_core-adr-003](../003-skill-standards.md).
30
+ - **Articles** are synthetic views, like this one. They explain a topic across multiple XDRs,
31
+ Research documents, and Skills, helping readers understand the system without making new
32
+ decisions. See [_core-adr-004](../004-article-standards.md).
33
+ - **Indexes and folder structure** are the discovery layer. They do not make decisions by
34
+ themselves, but they determine how people and agents find the right artifacts, how scopes
35
+ override one another, and how a large set of decisions remains navigable.
36
+
37
+ ### How they differ
38
+
39
+ The easiest way to distinguish the central elements is by asking what job each one performs.
40
+
41
+ - **XDR**: "What did we decide?"
42
+ - **Research**: "What did we learn while evaluating options?"
43
+ - **Skill**: "How do we carry out work under this decision?"
44
+ - **Article**: "How do these artifacts fit together for a reader?"
45
+ - **Index/Scope structure**: "Where do I look, and which decision set takes precedence?"
46
+
47
+ This separation matters because mixing these jobs into one file makes the system harder to search,
48
+ harder to update, and harder for agents to apply correctly.
49
+
50
+ ### How they relate over time
51
+
52
+ The framework is easiest to understand as a lifecycle rather than a static folder tree.
53
+
54
+ 1. **Explore** — A team starts with a problem, constraints, and uncertainty. Research is the best
55
+ place to compare options, record findings, and keep tradeoffs visible. That same research may
56
+ later support more than one decision record.
57
+ 2. **Decide** — Once a direction is chosen, an XDR captures the final answer in concise,
58
+ authoritative form. The XDR should make clear when the decision applies, and may link back to
59
+ the Research that informed its considered options.
60
+ 3. **Execute** — If the decision affects daily work, a Skill explains how to apply it in practice.
61
+ The Skill operationalizes the decision without turning the XDR into a procedure manual.
62
+ 4. **Explain** — When the topic becomes broad or cross-cutting, an Article synthesizes the XDR,
63
+ Research, and Skills into a navigable explanation for humans and agents.
64
+ 5. **Distribute and override** — Canonical indexes and scope ordering make the artifacts
65
+ discoverable across teams. Broader scopes can be reused, and more specific scopes can extend or
66
+ override them.
67
+
68
+ This gives XDRs a timeline feel:
69
+
70
+ - Research usually appears before or around a decision.
71
+ - The XDR marks the adopted outcome.
72
+ - Skills appear when the decision must be executed repeatedly.
73
+ - Articles appear when the ecosystem around the decision needs explanation or onboarding support.
74
+
75
+ ### How the structure supports the model
76
+
77
+ Every decision record lives at a fixed path:
39
78
 
40
79
  ```
41
80
  .xdrs/[scope]/[type]/[subject]/[number]-[short-title].md
42
81
  ```
43
82
 
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.
83
+ Supporting artifacts live beside it in the same subject:
55
84
 
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).
85
+ ```
86
+ researches/[number]-[short-title].md
87
+ skills/[number]-[skill-name]/SKILL.md
88
+ articles/[number]-[short-title].md
89
+ ```
63
90
 
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).
91
+ - **Scopes** represent ownership domains such as `_core`, `business-x`, or `team-43`.
92
+ - **Types** are `adrs`, `bdrs`, or `edrs`.
93
+ - **Subjects** narrow the domain further, such as `principles`, `application`, or `finance`.
94
+ - **Canonical indexes** list the artifacts for each scope+type, while the root `.xdrs/index.md`
95
+ defines precedence across scopes.
67
96
 
68
- ### Why it is implemented this way
97
+ This organization keeps the authoritative decision, the supporting evidence, the implementation
98
+ guidance, and the explanatory overview close together without collapsing them into one document.
69
99
 
70
- Key design choices and their rationale:
100
+ ### Why this separation works
71
101
 
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.
102
+ - **Small focused files** keep decisions readable and agent-friendly.
103
+ - **Research beside the XDR** preserves why options were accepted or rejected.
104
+ - **Skills beside the XDR** reduce drift between decisions and execution.
105
+ - **Articles above the artifacts** help readers understand the whole topic without replacing the
106
+ source of truth.
107
+ - **Indexes and scopes** let the framework scale across teams while preserving override behavior.
84
108
 
85
109
  ### Getting started
86
110
 
87
111
  1. Create or open a project workspace.
88
112
  2. Run `npx xdrs-core` in the workspace root. This installs:
89
113
  - `AGENTS.md` — instructs AI agents to always consult XDRs.
90
- - `AGENTS.local.md` — project-specific agent instructions (editable).
91
114
  - `.xdrs/index.md` — root index (editable, `keepExisting` mode).
92
- - `_core` XDRs and skills under `.xdrs/_core/`.
115
+ - `_core` XDRs, Research documents, and skills under `.xdrs/_core/`.
93
116
  3. Start a conversation with your AI agent:
94
117
  > Create an ADR about our decision to use Python for AI projects.
95
118
 
@@ -100,6 +123,7 @@ Follow [_core-adr-001](../001-xdr-standards.md) strictly. Key rules:
100
123
  - Use **mandatory language** (`must`, `never`, `required`) for non-negotiable rules and
101
124
  **advisory language** (`should`, `recommended`) for guidance.
102
125
  - Keep XDRs under 100 lines. Move procedural detail to a co-located Skill.
126
+ - Keep exploratory option analysis in a co-located Research document instead of bloating the XDR.
103
127
  - Always update the scope+type index and the root index after adding or changing an XDR.
104
128
  - Use `_local` scope when a decision is project-specific and must not be shared.
105
129
  - Never reuse a number once it has been assigned, even if the XDR is deleted.
@@ -109,6 +133,8 @@ Follow [_core-adr-001](../001-xdr-standards.md) strictly. Key rules:
109
133
  - **New scope** — create `.xdrs/[scope]/[type]/index.md` and add it to `.xdrs/index.md`.
110
134
  - **New subject** — create the subject folder under the existing scope+type path. Add an
111
135
  allowed subject or use `principles` if none fits (propose a new subject via a `_core` ADR).
136
+ - **New research** — add a `researches/[number]-[short-title].md` inside the relevant subject
137
+ folder, following [_core-adr-006](../006-research-standards.md).
112
138
  - **New skill** — add a `skills/[number]-[skill-name]/SKILL.md` inside the relevant subject
113
139
  folder, following [_core-adr-003](../003-skill-standards.md).
114
140
  - **New article** — add an `articles/[number]-[short-title].md` inside the relevant subject
@@ -120,7 +146,7 @@ Follow [_core-adr-001](../001-xdr-standards.md) strictly. Key rules:
120
146
  `pnpm exec xdrs-core extract`) to unpack XDR files into `.xdrs/` in your workspace.
121
147
  2. **Pins and upgrades** — update the npm dependency version to pull in the latest decisions
122
148
  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.
149
+ `.xdrs/index.md` in `keepExisting` mode so local edits are preserved.
124
150
  3. **Multi-scope** — list multiple scope packages as dependencies. Edit `.xdrs/index.md` to
125
151
  add each scope's canonical index link; place more specific scopes below broader ones.
126
152
  4. **Verify** — run `npx xdrs-core check` to confirm all managed files are in sync with the
@@ -133,6 +159,8 @@ Follow [_core-adr-001](../001-xdr-standards.md) strictly. Key rules:
133
159
  - [_core-adr-001](../001-xdr-standards.md) - XDR standards and mandatory template
134
160
  - [_core-adr-003](../003-skill-standards.md) - Skill standards and co-location rules
135
161
  - [_core-adr-004](../004-article-standards.md) - Article standards
162
+ - [_core-adr-006](../006-research-standards.md) - Research standards
136
163
  - [001-lint skill](../skills/001-lint/SKILL.md) - Linting code against XDRs
137
164
  - [002-write-xdr skill](../skills/002-write-xdr/SKILL.md) - Writing a new XDR
138
165
  - [003-write-skill skill](../skills/003-write-skill/SKILL.md) - Writing a new skill
166
+ - [005-write-research skill](../skills/005-write-research/SKILL.md) - Writing a new research document
@@ -0,0 +1,69 @@
1
+ # _core-research-001: Research and decision lifecycle
2
+
3
+ ## Overview
4
+
5
+ This research evaluates how Research should fit into the XDR model so maintainers can evolve it as a supporting artifact without weakening XDRs as the source of truth. It provides the context behind the decision captured in [_core-adr-006](../006-research-standards.md).
6
+
7
+ Question: How should a Research artifact fit into the XDR model so it supports the decision lifecycle without diluting the role of XDRs as the source of truth?
8
+
9
+ ## Constraints
10
+
11
+ - XDRs must stay concise and decision-focused.
12
+ - Supporting analysis must be easy to discover from the same subject folder.
13
+ - The new artifact must help during elaboration, discussion, approval, retirement, and updates.
14
+ - The structure must remain simple enough for humans and AI agents to navigate.
15
+
16
+ ## Findings
17
+
18
+ - Long-form option analysis does not fit well inside XDRs because it mixes evidence gathering with the adopted decision.
19
+ - Articles are useful for synthesis, but they are optimized for understanding and navigation rather than preserving the full option tradeoff study.
20
+ - Skills are procedures, not evidence. They explain how to do something, not why an option was evaluated or rejected.
21
+ - Subject-level co-location is the strongest predictor of discoverability in the current XDR model.
22
+
23
+ ## Proposals
24
+
25
+ ### Option 1: Keep research inside XDRs
26
+
27
+ Use larger XDRs and keep all exploratory analysis in the same file as the final decision.
28
+
29
+ **Pros**
30
+ - One file per decision thread.
31
+ - No new folder type to teach.
32
+
33
+ **Cons**
34
+ - Bloats XDRs and makes the adopted rule set harder to scan.
35
+ - Weakens the under-100-line guidance for decision records.
36
+
37
+ ### Option 2: Create a top-level shared research area
38
+
39
+ Store all research under a global `researches/` tree detached from subjects.
40
+
41
+ **Pros**
42
+ - Centralized catalog of studies.
43
+ - Easy to browse all research at once.
44
+
45
+ **Cons**
46
+ - Loses proximity to the decisions it informed.
47
+ - Makes subject-scoped discovery and maintenance harder.
48
+
49
+ ### Option 3: Add `researches/` beside `skills/` and `articles/`
50
+
51
+ Keep research documents under the same subject as the XDR they support.
52
+
53
+ **Pros**
54
+ - Preserves context and keeps evidence close to the decision.
55
+ - Lets XDRs stay concise while retaining detailed tradeoff history.
56
+
57
+ **Cons**
58
+ - Adds one more artifact type to explain and maintain.
59
+ - Requires linting and indexes to recognize another optional folder.
60
+
61
+ ## Recommendation
62
+
63
+ Option 3 is the best fit because it preserves the existing navigation model while separating evidence gathering from the adopted decision text.
64
+
65
+ ## References
66
+
67
+ - [_core-adr-006](../006-research-standards.md) - Decision that adopts research as a first-class artifact
68
+ - [_core-adr-001](../001-xdr-standards.md) - Base XDR structure and references
69
+ - [_core-adr-004](../004-article-standards.md) - Distinction between research and synthesis
@@ -50,7 +50,8 @@ Choose a title that clearly states the question this XDR answers, not the answer
50
50
  1. Read all existing XDRs relevant to the topic across all scopes listed in `.xdrs/index.md`.
51
51
  2. Identify decisions that already address the topic (full or partial overlap).
52
52
  3. Note decisions that might conflict with the intended outcome.
53
- 4. Collect XDR IDs and file paths for cross-references.
53
+ 4. Read related `researches/` documents when they exist, especially if they contain constraints, findings, or option tradeoffs that should influence the decision.
54
+ 5. Collect XDR IDs and file paths for cross-references.
54
55
 
55
56
  ### Phase 5: Write the First Draft
56
57
 
@@ -68,7 +69,7 @@ Use the mandatory template from `001-xdr-standards`:
68
69
  [One sentence: what is the decision]
69
70
 
70
71
  ### Implementation Details
71
- [Rules, specifics, examples — under 100 lines]
72
+ [Rules, applicability boundaries, concise examples, and optional do/don't guidance — under 100 lines]
72
73
 
73
74
  ## Considered Options (if meaningful options exist)
74
75
 
@@ -80,6 +81,8 @@ Use the mandatory template from `001-xdr-standards`:
80
81
  Mandatory rules to apply while drafting:
81
82
  - Use mandatory language ("must", "always", "never") only for hard requirements; use advisory language ("should", "recommended") for guidance.
82
83
  - Do not duplicate content already in referenced XDRs — link instead.
84
+ - Make clear when the decision applies and any important exception boundaries.
85
+ - Keep exploratory option analysis in a related Research document when it would distract from the final decision text.
83
86
  - No emojis. Lowercase filenames.
84
87
  - Target under 100 lines total; 200 lines max for complex decisions.
85
88
 
@@ -100,6 +103,8 @@ If any check fails, revise and re-run this phase before proceeding.
100
103
  1. Create the XDR file at `.xdrs/[scope]/[type]/[subject]/[number]-[short-title].md`.
101
104
  2. Add an entry to `.xdrs/[scope]/[type]/index.md` (create the file if it does not exist).
102
105
  3. Add or verify the scope entry in `.xdrs/index.md`.
106
+ 4. If significant research was produced or already exists, link it from the XDR `## Considered Options` section.
107
+ 5. If concise rules, examples, or do/don't bullets help readers apply the decision correctly, add them inside `### Implementation Details` without turning the XDR into a long procedure.
103
108
 
104
109
  ### Constraints
105
110
 
@@ -18,7 +18,7 @@ Guides the creation of a well-structured skill package by following `_core-adr-0
18
18
  ### Phase 1: Understand the Skill Goal
19
19
 
20
20
  1. Read `.xdrs/_core/adrs/principles/003-skill-standards.md` in full to internalize the SKILL.md format, folder layout, and numbering rules.
21
- 2. Identify what the skill must do and the exact conditions under which an agent should activate it. Do NOT proceed without a clear goal and activation trigger.
21
+ 2. Identify what the skill must do, the concrete outcome it should produce, and the exact conditions under which an agent should activate it. Do NOT proceed without a clear goal, outcome, and activation trigger.
22
22
 
23
23
  ### Phase 2: Select Type, Scope, Subject, and Number
24
24
 
@@ -47,6 +47,7 @@ Quick test:
47
47
 
48
48
  1. List `.xdrs/[scope]/[type]/[subject]/skills/` for existing skills. If one already covers the goal, extend or reference it instead of creating a duplicate.
49
49
  2. Read all XDRs relevant to the skill's domain to collect rules and cross-references.
50
+ 3. Decide whether the skill is merely guidance or is being referenced by an XDR as a mandatory procedure. Do not encode policy in the skill unless it comes from a referenced XDR.
50
51
 
51
52
  ### Phase 4: Write the SKILL.md
52
53
 
@@ -64,12 +65,12 @@ metadata:
64
65
 
65
66
  ## Overview
66
67
 
67
- [1–3 sentence goal statement.]
68
+ [1–3 sentence goal statement with the task objective, expected outcome, and relevant prerequisites or tools when they matter.]
68
69
 
69
70
  ## Instructions
70
71
 
71
72
  ### Phase 1: …
72
- [Step-by-step agent instructions organized into named phases. Use imperative language.]
73
+ [Step-by-step agent instructions organized into named phases. Use imperative language and include verification or acceptance criteria at the end of the task or major phases.]
73
74
 
74
75
  ## Examples
75
76
 
@@ -87,7 +88,10 @@ metadata:
87
88
  Rules:
88
89
  - Use imperative language ("Read …", "Ask …", "Create …").
89
90
  - The `description` field must state both *what* the skill does and *when* to activate it.
91
+ - Keep the skill task-oriented. It should have a clear starting trigger and a concrete ending result.
92
+ - Mention tools or prerequisites when they are required to complete the task reliably.
90
93
  - Do not duplicate content from referenced XDRs — link instead.
94
+ - Do not present the skill itself as policy; mandatory behavior must come from referenced XDRs or other policy artifacts.
91
95
  - No emojis. Lowercase filenames. Target under 500 lines.
92
96
 
93
97
  ### Phase 5: Review the Draft
@@ -98,7 +102,7 @@ Before writing files, verify:
98
102
  2. **Completeness**: Does every phase have actionable steps?
99
103
  3. **Length**: Under 500 lines? Trim verbose explanations.
100
104
  4. **Duplication**: Does this overlap an existing skill? If yes, revise.
101
- 5. **References**: Are all related XDRs and skills linked?
105
+ 5. **References**: Are all related XDRs and skills linked, including the cases where the skill operationalizes multiple XDRs?
102
106
 
103
107
  If any check fails, revise before continuing.
104
108
 
@@ -1,8 +1,9 @@
1
1
  ---
2
2
  name: 004-write-article
3
3
  description: >
4
- Creates a new article document following XDR article standards: selects scope, type, subject, and number;
5
- then writes a focused synthetic text that combines and links multiple XDRs and Skills around a topic.
4
+ Creates a new article document following XDR article standards: selects scope, type, subject, and number;
5
+ then writes a focused synthetic text that combines and links multiple XDRs, Research documents,
6
+ and Skills around a topic.
6
7
  Activate this skill when the user asks to create, add, or write a new article, guide, or overview document
7
8
  within an XDR project.
8
9
  metadata:
@@ -12,8 +13,8 @@ metadata:
12
13
 
13
14
  ## Overview
14
15
 
15
- Guides the creation of a well-structured article by following `_core-adr-004`, researching the XDRs and
16
- Skills to synthesize, and producing a concise document that serves as a navigable view without duplicating
16
+ Guides the creation of a well-structured article by following `_core-adr-004`, researching the XDRs,
17
+ Research documents, and Skills to synthesize, and producing a concise document that serves as a navigable view without duplicating
17
18
  decision content.
18
19
 
19
20
  ## Instructions
@@ -45,7 +46,7 @@ If the article spans more than one subject, place it in `principles`.
45
46
 
46
47
  ### Phase 4: Research XDRs and Skills to Synthesize
47
48
 
48
- 1. Read all XDRs and Skills relevant to the article topic across all scopes listed in `.xdrs/index.md`.
49
+ 1. Read all XDRs, Research documents, and Skills relevant to the article topic across all scopes listed in `.xdrs/index.md`.
49
50
  2. Identify the key points a reader needs to understand the topic end-to-end.
50
51
  3. Collect XDR IDs and file paths for cross-references. Never copy decision text verbatim; link to it.
51
52
 
@@ -62,7 +63,7 @@ Use the mandatory template from `004-article-standards`:
62
63
 
63
64
  ## Content
64
65
 
65
- [Synthetic text combining and explaining the topic. Use links to Decision Records and Skills
66
+ [Synthetic text combining and explaining the topic. Use links to Decision Records, Research documents, and Skills
66
67
  when referencing information from those documents. Keep under 150 lines total.]
67
68
 
68
69
  ## References
@@ -83,7 +84,7 @@ Rules to apply while drafting:
83
84
 
84
85
  1. Save the file at `.xdrs/[scope]/[type]/[subject]/articles/[number]-[short-title].md`.
85
86
  2. Add a link to the article in the canonical index for that scope+type (`.xdrs/[scope]/[type]/index.md`).
86
- 3. Add back-references in the XDRs and Skills that the article synthesizes, under their `## References`
87
+ 3. Add back-references in the XDRs, Research documents, and Skills that the article synthesizes, under their `## References`
87
88
  section.
88
89
 
89
90
  ## Examples
@@ -95,7 +96,7 @@ Rules to apply while drafting:
95
96
  2. Topic: how skills work. Audience: developers new to the project.
96
97
  3. Scope: `_local`, type: `adrs`, subject: `principles`.
97
98
  4. Scan `.xdrs/_local/adrs/principles/articles/` — no articles exist → number is `001`.
98
- 5. Research `_core-adr-003` and all existing skill SKILL.md files.
99
+ 5. Research `_core-adr-003`, `_core-adr-006`, and the existing skill SKILL.md files.
99
100
  6. Write `.xdrs/_local/adrs/principles/articles/001-skills-overview.md` following the template, linking
100
101
  to `_core-adr-003` and the individual skill files.
101
102
  7. Update `.xdrs/_local/adrs/index.md` with a link to the new article.
@@ -108,4 +109,10 @@ Rules to apply while drafting:
108
109
  - **Cross-subject topic** — place the article in `principles`, not in any single subject folder.
109
110
  - **No existing articles folder** — create it; it is optional in the folder layout.
110
111
  - **Conflicting information found** — note the conflict in the article and always defer to the XDR.
111
- - **Article would exceed 150 lines** — move detailed content to a new Skills or XDR and link back.
112
+ - **Article would exceed 150 lines** — move detailed content to a new Research, Skill, or XDR and link back.
113
+
114
+ ## References
115
+
116
+ - [_core-adr-004 - Article standards](../../004-article-standards.md)
117
+ - [_core-adr-006 - Research standards](../../006-research-standards.md)
118
+ - [_core-adr-001 - XDR standards](../../001-xdr-standards.md)
@@ -0,0 +1,132 @@
1
+ ---
2
+ name: 005-write-research
3
+ description: >
4
+ Creates a new research document following XDR research standards: selects scope, type, subject, and number;
5
+ then writes a focused study of constraints, findings, and option proposals with pros and cons.
6
+ Activate this skill when the user asks to create, add, or write a research document that backs a decision.
7
+ metadata:
8
+ author: flaviostutz
9
+ version: "1.0"
10
+ ---
11
+
12
+ ## Overview
13
+
14
+ Guides the creation of a well-structured research document by following `_core-adr-006`, checking related XDRs and existing research to avoid duplication, and producing a concise study that supports a decision lifecycle without replacing the XDR.
15
+
16
+ ## Instructions
17
+
18
+ ### Phase 1: Understand the Research Goal
19
+
20
+ 1. Read `.xdrs/_core/adrs/principles/006-research-standards.md` in full to internalize the folder layout, numbering rules, and mandatory template.
21
+ 2. Identify the problem or question being explored, the main constraints or requirements, and which decision or decision threads this research supports.
22
+ 3. Do NOT proceed without a clear problem statement and at least one concrete constraint or requirement.
23
+
24
+ ### Phase 2: Select Scope, Type, Subject, and Number
25
+
26
+ **Scope** — use `_local` unless the user explicitly names another scope.
27
+
28
+ **Type** — match the type of decision this research supports (`adrs`, `bdrs`, or `edrs`).
29
+
30
+ **Subject** — pick the most specific subject that matches the problem domain.
31
+
32
+ **Research number** — scan `.xdrs/[scope]/[type]/[subject]/researches/` for the highest existing number and increment by 1. Never reuse numbers from deleted research documents.
33
+
34
+ ### Phase 3: Research Existing Artifacts
35
+
36
+ 1. Read relevant XDRs across all scopes listed in `.xdrs/index.md`.
37
+ 2. Read existing research documents in the same or overlapping subjects to avoid duplicating the same study.
38
+ 3. Read related skills or articles if they contain context, implementation limits, or terminology that must be reflected.
39
+ 4. Collect links that should appear in the final `## References` section.
40
+
41
+ ### Phase 4: Write the Research Document
42
+
43
+ Use the mandatory template from `006-research-standards`:
44
+
45
+ ```markdown
46
+ # [scope]-research-[number]: [Short Title]
47
+
48
+ ## Overview
49
+
50
+ [Brief description of the problem or question, audience, and decision thread(s) it supports.]
51
+
52
+ Question: [Central question of the research]?
53
+
54
+ ## Constraints
55
+
56
+ - [Constraint 1]
57
+
58
+ ## Findings
59
+
60
+ - [Finding 1]
61
+
62
+ ## Proposals
63
+
64
+ ### Option 1: [Name]
65
+
66
+ [Short description]
67
+
68
+ **Pros**
69
+ - [Benefit]
70
+
71
+ **Cons**
72
+ - [Drawback]
73
+
74
+ ## Recommendation
75
+
76
+ [Optional preferred direction]
77
+
78
+ ## References
79
+ ```
80
+
81
+ Rules:
82
+ - Focus on exploring options under stated constraints; do not turn the document into the final decision.
83
+ - End the `## Overview` section with `Question: [central question]?` so the main research question is explicit.
84
+ - Make it explicit when the same research may feed multiple downstream XDRs.
85
+ - Include a few meaningful proposals and summarize pros and cons for each.
86
+ - Keep findings concrete and useful for later discussion or revision.
87
+ - Keep the document under 2000 lines. Prefer much shorter when possible.
88
+ - Treat `Research` as the artifact name; `researches/` is only the folder name.
89
+ - Use lowercase file names. Never use emojis.
90
+
91
+ ### Phase 5: Review the Draft
92
+
93
+ Before writing files, verify:
94
+
95
+ 1. **Problem clarity**: Is the research question explicit?
96
+ 2. **Constraints**: Are the most important constraints stated clearly?
97
+ 3. **Option quality**: Do the proposals represent real alternatives with non-trivial pros and cons?
98
+ 4. **Decision boundary**: Does the text support a decision without pretending to be the XDR itself?
99
+ 5. **References**: Are all related XDRs, research docs, skills, or articles linked, including multiple decisions when applicable?
100
+
101
+ If any check fails, revise before continuing.
102
+
103
+ ### Phase 6: Write Files
104
+
105
+ 1. Create the research file at `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`.
106
+ 2. Add an entry to `.xdrs/[scope]/[type]/index.md`.
107
+ 3. Add back-references from the related XDR, article, or skill when the relationship is important for discovery.
108
+
109
+ ## Examples
110
+
111
+ **Input**: "Create research comparing package distribution options for our XDR scopes"
112
+
113
+ **Expected actions:**
114
+ 1. Read `006-research-standards.md`.
115
+ 2. Choose type `adrs` and subject `principles`.
116
+ 3. Scan `.xdrs/_local/adrs/principles/researches/` for the next number.
117
+ 4. Read related XDRs about packaging and versioning.
118
+ 5. Write a research document with constraints, findings, and options such as npm package, git submodule, and copy-paste distribution.
119
+ 6. Add references to the resulting XDR if a decision is later created.
120
+
121
+ ## Edge Cases
122
+
123
+ - If the user is really asking for a final decision, write an XDR instead of research.
124
+ - If only one viable option exists, still record why alternatives were excluded or unavailable.
125
+ - If the document grows too large, split independent problem threads into separate research files.
126
+ - If the supported decision does not exist yet, reference the decision topic or planned XDR title in the overview.
127
+
128
+ ## References
129
+
130
+ - [_core-adr-006 - Research standards](../../006-research-standards.md)
131
+ - [_core-adr-001 - XDR standards](../../001-xdr-standards.md)
132
+ - [002-write-xdr skill](../002-write-xdr/SKILL.md)
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
- [View local ADRs Index](_local/adrs/index.md)
24
+
package/AGENTS.md CHANGED
@@ -19,6 +19,4 @@
19
19
  5. **Do not perform git operations unless explicitelly asked**
20
20
  - The developer should be in control of possible destructive operations on the workspace
21
21
 
22
- Check for additional instructions on [AGENTS.local.md](AGENTS.local.md).
23
-
24
22
  **This AGENTS.md file was created with xdrs-core and shouldn't be changed**
package/README.md CHANGED
@@ -12,11 +12,12 @@ This project defines a standard for organizing XDRs that satisfies the following
12
12
 
13
13
  ## XDR elements
14
14
 
15
- Every XDR package contains three types of documents:
15
+ Every XDR package contains four types of documents:
16
16
 
17
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.
18
+ - **Research** — Exploratory documents that capture the problem being investigated, constraints or requirements, findings, and option tradeoffs that back a decision during its lifecycle. One research document may inform multiple downstream decisions, but it is not a replacement for the Decision Record.
19
+ - **Skills** — Step-by-step procedural guides that can be followed by humans, AI agents, or both. Skills are task-based artifacts with a concrete outcome and should include enough detail to verify the task was completed correctly. 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.
20
+ - **Articles** — Synthetic explanatory texts that combine information from multiple XDRs, Research documents, and Skills around a specific topic or audience. They never replace XDRs as source of truth.
20
21
 
21
22
  ## Getting started
22
23
 
@@ -51,6 +52,7 @@ The `lint` command reads `./.xdrs/**` from the given workspace path and checks c
51
52
  - XDR numbering uniqueness per `scope/type`
52
53
  - skill numbering uniqueness per `scope/type/subject/skills`
53
54
  - article numbering uniqueness per `scope/type/subject/articles`
55
+ - research numbering uniqueness per `scope/type/subject/researches`
54
56
  - canonical index presence and link consistency
55
57
  - root index coverage for all discovered canonical indexes
56
58
 
@@ -106,10 +108,12 @@ This is especially important for BDRs: because business rules govern decisions t
106
108
  index.md # canonical index for this scope+type
107
109
  [subject]/
108
110
  [number]-[short-title].md # individual decision record
111
+ researches/ # optional decision-backing research documents
112
+ [number]-[short-title].md
109
113
  skills/ # optional skill packages for humans and AI agents
110
114
  [number]-[skill-name]/
111
115
  SKILL.md
112
- articles/ # optional synthetic views over XDRs and Skills
116
+ articles/ # optional synthetic views over XDRs, Research, and Skills
113
117
  [number]-[short-title].md
114
118
  ```
115
119
 
@@ -118,31 +122,32 @@ Document types:
118
122
  - **ADR** - Architectural Decision Record: architectural and technical decisions
119
123
  - **BDR** - Business Decision Record: business process and strategy decisions
120
124
  - **EDR** - Engineering Decision Record: engineering workflow and tooling decisions
121
- - **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.
122
- - **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.
125
+ - **Research** - Exploratory support material used while evaluating or updating a decision. Research captures constraints, findings, options, and proposal tradeoffs, but it is not the source of truth.
126
+ - **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. Skills are not mandatory by themselves unless referenced by an XDR or another policy artifact. 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.
127
+ - **Articles** - Synthetic views that explain concepts or combine information from multiple Decision Records, Research documents, 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 artifacts around a specific aspect.
123
128
 
124
129
  See [.xdrs/index.md](.xdrs/index.md) for the full list of active decision records.
125
130
 
126
131
  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](.xdrs/_local/adrs/principles/articles/001-create-your-own-xdrs-extension-package.md), then compare [examples/basic-usage](examples/basic-usage) and [examples/mydevkit](examples/mydevkit).
132
+ For packaging guidance on publishing your own reusable scope with DRs, Research documents, 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
133
 
129
134
  ## Flow: Decision -> Distribution -> Usage
130
135
 
131
- XDRs and skills follow a three-stage lifecycle that keeps decision-making decentralized while allowing controlled adoption across projects.
136
+ XDRs, Research documents, and skills follow a three-stage lifecycle that keeps decision-making decentralized while allowing controlled adoption across projects.
132
137
 
133
138
  ### Decision
134
139
 
135
- Each scope manages its own set of XDRs independently. Scope owners discuss and evolve decisions through whatever process fits their team, such as RFCs, pull requests, or architecture review boards. XDRs and skills are authored, reviewed, and merged within the scope's folder in the repository.
140
+ Each scope manages its own set of XDR artifacts independently. Scope owners discuss and evolve decisions through whatever process fits their team, such as RFCs, pull requests, or architecture review boards. Research documents, XDRs, and skills are authored, reviewed, and merged within the scope's folder in the repository.
136
141
 
137
142
  ### Distribution
138
143
 
139
144
  Once a set of decisions is ready to share, scope owners pack the relevant `.xdrs/[scope]/` folder into a versioned npm package using a tool such as [filedist](https://github.com/flaviostutz/filedist) and publish it to an npm registry, either public or a company-internal one. Versioning gives consumers explicit control over which revision of a scope's decisions they adopt, avoiding situations where a single breaking policy change is forced on all consumers at once.
140
145
 
141
- The same applies to skills: because they live alongside XDRs inside the scope folder, they are included in the same package and published together.
146
+ The same applies to Research documents and skills: because they live alongside XDRs inside the scope folder, they are included in the same package and published together.
142
147
 
143
148
  ### Usage
144
149
 
145
- A project that wants to follow a scope's decisions adds the corresponding npm package as a regular dependency. Using a tool such as [filedist](https://github.com/flaviostutz/filedist), the package contents are unpacked into the project's `.xdrs/` folder at install or update time. Updating the dependency version pulls in the latest XDRs and skills for that scope, keeping the project aligned with the scope owners' current decisions.
150
+ A project that wants to follow a scope's decisions adds the corresponding npm package as a regular dependency. Using a tool such as [filedist](https://github.com/flaviostutz/filedist), the package contents are unpacked into the project's `.xdrs/` folder at install or update time. Updating the dependency version pulls in the latest XDRs, Research documents, and skills for that scope, keeping the project aligned with the scope owners' current decisions.
146
151
 
147
152
  Multiple scope packages can be combined in the same workspace by listing them as separate dependencies. Scope precedence (defined in `.xdrs/index.md`) determines which decisions take effect when scopes overlap.
148
153
 
@@ -152,6 +157,7 @@ Multiple scope packages can be combined in the same workspace by listing them as
152
157
  adrs/ bdrs/ edrs/ adrs/ bdrs/ edrs/
153
158
  [subject]/ [subject]/
154
159
  *.md *.md
160
+ researches/ researches/
155
161
  skills/ skills/
156
162
  articles/ articles/
157
163
  ```
package/lib/lint.js CHANGED
@@ -21,6 +21,7 @@ const RESERVED_SCOPES = new Set(['_core', '_local']);
21
21
  const NUMBERED_FILE_RE = /^(\d{3,})-([a-z0-9-]+)\.md$/;
22
22
  const NUMBERED_DIR_RE = /^(\d{3,})-([a-z0-9-]+)$/;
23
23
  const REQUIRED_ROOT_INDEX_TEXT = 'XDRs in scopes listed last override the ones listed first';
24
+ const SUBJECT_ARTIFACT_DIRS = new Set(['skills', 'articles', 'researches']);
24
25
 
25
26
  function runLintCli(args) {
26
27
  if (args.includes('--help') || args.includes('-h')) {
@@ -198,6 +199,10 @@ function lintSubjectDirectory(xdrsRoot, scopeName, typeName, subjectName, xdrNum
198
199
  artifacts.push(...lintArticlesDirectory(xdrsRoot, scopeName, typeName, subjectName, entryPath, errors));
199
200
  continue;
200
201
  }
202
+ if (entry.name === 'researches') {
203
+ artifacts.push(...lintResearchDirectory(xdrsRoot, scopeName, typeName, subjectName, entryPath, errors));
204
+ continue;
205
+ }
201
206
 
202
207
  errors.push(`Unexpected directory under ${scopeName}/${typeName}/${subjectName}: ${toDisplayPath(entryPath)}`);
203
208
  continue;
@@ -335,6 +340,49 @@ function lintArticlesDirectory(xdrsRoot, scopeName, typeName, subjectName, artic
335
340
  return artifacts;
336
341
  }
337
342
 
343
+ function lintResearchDirectory(xdrsRoot, scopeName, typeName, subjectName, researchPath, errors) {
344
+ const artifacts = [];
345
+ const researchNumbers = new Map();
346
+ const entries = safeReadDir(researchPath, errors, `read research directory ${scopeName}/${typeName}/${subjectName}/researches`);
347
+
348
+ for (const entry of entries) {
349
+ const entryPath = path.join(researchPath, entry.name);
350
+ if (!entry.isFile()) {
351
+ errors.push(`Unexpected directory in researches folder: ${toDisplayPath(entryPath)}`);
352
+ continue;
353
+ }
354
+
355
+ const match = entry.name.match(NUMBERED_FILE_RE);
356
+ if (!match) {
357
+ errors.push(`Invalid research file name: ${toDisplayPath(entryPath)}`);
358
+ continue;
359
+ }
360
+
361
+ artifacts.push(entryPath);
362
+
363
+ const number = match[1];
364
+ const previous = researchNumbers.get(number);
365
+ if (previous) {
366
+ errors.push(`Duplicate research number ${number} in ${scopeName}/${typeName}/${subjectName}/researches: ${toDisplayPath(previous)} and ${toDisplayPath(entryPath)}`);
367
+ } else {
368
+ researchNumbers.set(number, entryPath);
369
+ }
370
+
371
+ if (entry.name !== entry.name.toLowerCase()) {
372
+ errors.push(`Research file name must be lowercase: ${toDisplayPath(entryPath)}`);
373
+ }
374
+
375
+ const content = fs.readFileSync(entryPath, 'utf8');
376
+ const expectedHeader = `# ${scopeName}-research-${number}:`;
377
+ const firstLine = firstNonEmptyLine(content);
378
+ if (!firstLine.startsWith(expectedHeader)) {
379
+ errors.push(`Research title must start with "${expectedHeader}": ${toDisplayPath(entryPath)}`);
380
+ }
381
+ }
382
+
383
+ return artifacts;
384
+ }
385
+
338
386
  function lintTypeIndex(indexPath, xdrsRoot, artifacts, errors) {
339
387
  const content = fs.readFileSync(indexPath, 'utf8');
340
388
  const localLinks = parseLocalLinks(content, path.dirname(indexPath));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xdrs-core",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
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",
@@ -17,7 +17,6 @@
17
17
  ".xdrs/**",
18
18
  "package.json",
19
19
  "AGENTS.md",
20
- "AGENTS.local.md",
21
20
  "bin/filedist.js",
22
21
  "lib/**/*.js"
23
22
  ],
@@ -30,10 +29,7 @@
30
29
  "selector": {
31
30
  "files": [
32
31
  "AGENTS.md",
33
- ".xdrs/**"
34
- ],
35
- "exclude": [
36
- ".xdrs/index.md"
32
+ ".xdrs/_core/**"
37
33
  ]
38
34
  },
39
35
  "output": {
@@ -50,8 +46,7 @@
50
46
  {
51
47
  "selector": {
52
48
  "files": [
53
- ".xdrs/index.md",
54
- "AGENTS.local.md"
49
+ ".xdrs/index.md"
55
50
  ]
56
51
  },
57
52
  "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
package/AGENTS.local.md DELETED
@@ -1,3 +0,0 @@
1
- # AGENTS.local.md
2
-
3
- No repository specific instructions available. Focus on XDRS instructions only.