xdrs-core 0.13.0 → 0.14.2

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.
Files changed (29) hide show
  1. package/.xdrs/_core/adrs/index.md +2 -6
  2. package/.xdrs/_core/adrs/principles/001-xdrs-core.md +9 -1
  3. package/.xdrs/_core/adrs/principles/002-xdr-standards.md +12 -17
  4. package/.xdrs/_core/adrs/principles/003-skill-standards.md +1 -1
  5. package/.xdrs/_core/adrs/principles/004-article-standards.md +1 -1
  6. package/.xdrs/_core/adrs/principles/006-research-standards.md +2 -2
  7. package/.xdrs/_core/adrs/principles/007-plan-standards.md +132 -0
  8. package/.xdrs/_core/adrs/principles/articles/001-xdrs-overview.md +19 -7
  9. package/.xdrs/_core/adrs/principles/skills/001-lint/001-lint.test.int.js +40 -0
  10. package/.xdrs/_core/adrs/principles/skills/001-lint/001-lint.test.int.report +23 -0
  11. package/.xdrs/_core/adrs/principles/skills/001-lint/SKILL.md +3 -3
  12. package/.xdrs/_core/adrs/principles/skills/002-write-xdr/002-write-xdr.test.int.js +24 -0
  13. package/.xdrs/_core/adrs/principles/skills/002-write-xdr/002-write-xdr.test.int.report +14 -0
  14. package/.xdrs/_core/adrs/principles/skills/002-write-xdr/SKILL.md +15 -7
  15. package/.xdrs/_core/adrs/principles/skills/003-write-skill/003-write-skill.test.int.js +24 -0
  16. package/.xdrs/_core/adrs/principles/skills/003-write-skill/003-write-skill.test.int.report +14 -0
  17. package/.xdrs/_core/adrs/principles/skills/003-write-skill/SKILL.md +1 -1
  18. package/.xdrs/_core/adrs/principles/skills/004-write-article/004-write-article.test.int.js +24 -0
  19. package/.xdrs/_core/adrs/principles/skills/004-write-article/004-write-article.test.int.report +17 -0
  20. package/.xdrs/_core/adrs/principles/skills/004-write-article/SKILL.md +1 -1
  21. package/.xdrs/_core/adrs/principles/skills/005-write-research/005-write-research.test.int.js +3 -19
  22. package/.xdrs/_core/adrs/principles/skills/005-write-research/005-write-research.test.int.report +5 -12
  23. package/.xdrs/_core/adrs/principles/skills/005-write-research/SKILL.md +1 -1
  24. package/.xdrs/_core/adrs/principles/skills/006-write-plan/SKILL.md +151 -0
  25. package/README.md +10 -3
  26. package/lib/lint.js +86 -38
  27. package/lib/testPrompt.js +1 -0
  28. package/package.json +1 -1
  29. package/.xdrs/_core/adrs/principles/researches/001-research-and-decision-lifecycle.md +0 -99
@@ -12,12 +12,7 @@ Foundational standards, principles, and guidelines.
12
12
  - [_core-adr-004](principles/004-article-standards.md) - **Article standards** — How to write synthetic views combining XDRs, research, and skills
13
13
  - [_core-adr-005](principles/005-semantic-versioning-for-xdr-packages.md) - **Semantic versioning for XDR packages** — How to version XDR packages to communicate upgrade impact
14
14
  - [_core-adr-006](principles/006-research-standards.md) - **Research standards** — How to structure research documents backing XDR decisions
15
-
16
- ## Research
17
-
18
- Exploratory documents that back decisions during their lifecycle.
19
-
20
- - [_core-research-001](principles/researches/001-research-and-decision-lifecycle.md) - **Research and decision lifecycle** (how research supports XDRs, skills, and articles)
15
+ - [_core-adr-007](principles/007-plan-standards.md) - **Plan standards** — How to structure ephemeral execution plans that implement decisions
21
16
 
22
17
  ## Skills
23
18
 
@@ -28,6 +23,7 @@ Step-by-step procedural guides for humans and AI agents.
28
23
  - [003-write-skill](principles/skills/003-write-skill/SKILL.md) - **Write Skill** — create a new skill package
29
24
  - [004-write-article](principles/skills/004-write-article/SKILL.md) - **Write Article** — create a new article document
30
25
  - [005-write-research](principles/skills/005-write-research/SKILL.md) - **Write Research** — create a new research document
26
+ - [006-write-plan](principles/skills/006-write-plan/SKILL.md) - **Write Plan** — create a new plan document
31
27
 
32
28
  ## Articles
33
29
 
@@ -24,20 +24,24 @@ Collectively, these are referred to as XDRs.
24
24
  #### General framework standards
25
25
 
26
26
  - The main document type in the collection of XDRs is the XDR document, which contains a decision. Other documents are normally related to this decision and shouldn't go against its contents.
27
+ - All documents in the framework should be removed when they are no longer necessary. The latest version of the collection always represents the active set of documents. Historical versions are available via versioned packages or git history. There is no status field on documents; if a document is present, it is considered active and valid. This keeps the document base clean and avoids confusion about which documents are current. REJECT any indication in the Decisions that contradicts this rule to avoid confusion and complexity.
27
28
  - Make it clear if an instruction is mandatory or advisory.
28
29
  - Mandatory language: "must", "always", "never", "required", "mandatory"
29
30
  - Advisory language: "should", "recommended", "advised", "preferably", "possibly", "optionally"
30
- - Always use the following folder structure for XDR documents:
31
+ - ALWAYS use the following folder structure for XDR documents:
31
32
  `.xdrs/[scope]/[type]/[subject]/[number]-[short-title].md`
33
+ - ALWAYS ignore symlinks paths. NEVER create or update documents inside symlinked folders.
32
34
  - Optional supporting artifacts under the same subject:
33
35
  - `.xdrs/[scope]/[type]/[subject]/researches/[number]-[short-title].md`
34
36
  - `.xdrs/[scope]/[type]/[subject]/skills/[number]-[skill-name]/SKILL.md`
35
37
  - `.xdrs/[scope]/[type]/[subject]/articles/[number]-[short-title].md`
38
+ - `.xdrs/[scope]/[type]/[subject]/plans/[number]-[short-title].md`
36
39
  - Research, skills, and articles are part of the framework, but each has its own concept-specific standards in dedicated XDRs. This XDR defines the shared framework baseline; `_core-adr-002` defines the XDR document writing standard.
37
40
  - `_core-adr-002` defines XDR standards (document writing)
38
41
  - `_core-adr-003` defines skill standards
39
42
  - `_core-adr-004` defines article standards
40
43
  - `_core-adr-006` defines research standards
44
+ - `_core-adr-007` defines plan standards
41
45
  - For simple structure, flow, layout, or relationship indications, documents SHOULD prefer plain Markdown, tables, or ASCII art instead of external assets.
42
46
  - Images and other supporting files SHOULD be used only when they are materially necessary to preserve clarity, fidelity, or evidence. When used, they SHOULD live in a sibling `assets/` folder next to the document.
43
47
  - XDRs in the subject root use `.xdrs/[scope]/[type]/[subject]/assets/`
@@ -119,6 +123,9 @@ subject/
119
123
  |-- articles/
120
124
  | |-- 001-article.md
121
125
  | `-- assets/
126
+ |-- plans/
127
+ | |-- 001-plan.md
128
+ | `-- assets/
122
129
  |-- researches/
123
130
  | |-- 001-study.md
124
131
  | `-- assets/
@@ -136,3 +143,4 @@ subject/
136
143
  - [_core-adr-003 - Skill standards](003-skill-standards.md)
137
144
  - [_core-adr-004 - Article standards](004-article-standards.md)
138
145
  - [_core-adr-006 - Research standards](006-research-standards.md)
146
+ - [_core-adr-007 - Plan standards](007-plan-standards.md)
@@ -6,9 +6,9 @@ XDR framework elements (types, scopes, subjects, folder structure) are defined i
6
6
 
7
7
  ## Decision Outcome
8
8
 
9
- **Structured decision records with a mandatory template, lifecycle metadata, and clear conflict rules**
9
+ **Structured decision records with a mandatory template, applicability metadata, and clear conflict rules**
10
10
 
11
- XDR documents are the authoritative policy for their scope, type, and subject. They must be concise, template-compliant, and lifecycle-aware so that humans and AI agents can reliably determine whether and how to apply any decision.
11
+ 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.
12
12
 
13
13
  ### Implementation Details
14
14
 
@@ -16,25 +16,23 @@ XDR documents are the authoritative policy for their scope, type, and subject. T
16
16
  - 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.
17
17
  - XDRs MAY include a `## Metadata` section, but only when at least one supported metadata field is present. When used, `## Metadata` MUST appear immediately before `## Context and Problem Statement`.
18
18
  - Supported XDR metadata fields are:
19
- - `Status:` Optional. Defines the lifecycle state of the decision. Allowed values are `Draft`, `Active`, and `Deprecated`. If omitted, the decision is treated as `Active`. Only `Active` decisions may be treated as current policy.
20
- - `Valid:` Optional. Defines the time window in which an active decision may be treated as current. Use ISO dates only: `from YYYY-MM-DD`, `until YYYY-MM-DD`, or `from YYYY-MM-DD until YYYY-MM-DD`. If `from` is omitted, the decision takes effect immediately. If `until` is omitted, the decision remains valid indefinitely.
19
+ - `Valid:` Optional. Defines a convergence date after which the decision is expected to be fully adopted. Use ISO date format: `from YYYY-MM-DD`. New implementations SHOULD adopt the decision immediately, but compliance is not enforced during reviews until the convergence date.
21
20
  - `Applied to:` Optional. A short description of the contexts in which the decision is applicable. Keep it under 40 words. If omitted, the decision should be interpreted as applying to all logically applicable elements according to the decision text itself. Examples: `Only frontend code`, `JavaScript projects`, `Performance-sensitive codebases`
21
+ - 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.
22
22
  - 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.
23
- - Check `Status:` first to determine whether the XDR is eligible to be used now. If `Status:` is omitted, treat it as `Active`. `Draft` and `Deprecated` decisions are background or history, not current policy.
24
- - Check `Valid:` next to determine whether the current moment falls inside the decision's active date window. Not-yet-active and expired windows are not current policy.
25
- - Check `Applied to:` next to determine whether the active, currently valid decision fits the current codebase, system, workflow, or audience.
23
+ - Check `Valid:` first. If a convergence date is present and has not yet been reached, the decision SHOULD be adopted for new implementations but is not enforced during reviews.
24
+ - Check `Applied to:` next to determine whether the decision fits the current codebase, system, workflow, or audience.
26
25
  - Check the decision context and implementation details last to determine any additional boundaries, exceptions, or qualifiers that metadata alone cannot express.
27
- - If any check fails, the XDR MAY still be read as background, history, or context, but it MUST NOT be treated as a current requirement for that case.
28
- - 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 of xdrs, but the XDR document remains the source of truth.
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, and updates of XDRs, but the XDR document remains the source of truth.
29
27
  - **XDR Id:** [scope]-[type]-[xdr number] (numbers are scoped per type+scope combination and must not be reused within that combination; always use lowercase)
30
28
  - Types in IDs: `adr`, `bdr`, `edr`
31
29
  - 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.
32
30
  - Decisions MUST be concise and reference other XDRs to avoid duplication.
33
- - The `### Implementation Details` section SHOULD state relevant boundaries or exceptions and what a reader should do or avoid in common cases. Use `## Metadata` as the first-pass filter for whether the decision should be used at all, then keep nuanced boundaries in the decision text.
31
+ - The `### Implementation Details` section SHOULD state relevant boundaries or exceptions and what a reader should do or avoid in common cases. Use `## Metadata` as the first-pass filter for applicability, then keep nuanced boundaries in the decision text.
34
32
  - 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.
35
33
  - Conflict handling applies to XDR documents:
36
34
  - For cross-scope overrides, document the decision conflict in the XDR `## Conflicts` section of the XDR that overrides another scope.
37
- - **Within-scope conflicts:** XDRs within the same type+scope must not conflict. If two XDRs appear to conflict, one should be updated, deprecated, or the conflict resolved through a new XDR.
35
+ - **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.
38
36
  - When research exists for a decision, the XDR SHOULD mention the related research documents after the `## Considered Options` list.
39
37
  - Never use emojis in contents.
40
38
  - Always use file names with lowercase.
@@ -53,9 +51,8 @@ All XDRs MUST follow this template
53
51
 
54
52
  ## Metadata
55
53
 
56
- [Optional section. Omit the entire section when none of `Status:`, `Valid:`, or `Applied to:` is defined. Readers decide whether to use the XDR by checking `Status:` first, treating omission as `Active`, then `Valid:`, then `Applied to:`, and finally the decision text itself.]
57
- Status: [Optional. Use `Draft`, `Active`, or `Deprecated`. Defaults to `Active` when omitted]
58
- Valid: [Optional. Use `from YYYY-MM-DD`, `until YYYY-MM-DD`, or `from YYYY-MM-DD until YYYY-MM-DD`]
54
+ [Optional section. Omit the entire section when none of `Valid:` or `Applied to:` is defined. Readers decide whether to use the XDR by checking `Valid:` first, then `Applied to:`, and finally the decision text itself.]
55
+ Valid: [Optional. Use `from YYYY-MM-DD` to set a convergence date for adoption]
59
56
  Applied to: [Optional short applicability scope, under 40 words]
60
57
 
61
58
  ## Context and Problem Statement
@@ -97,9 +94,7 @@ Question: In the end, state explicitly the question that needs to be answered. E
97
94
 
98
95
  **Examples:**
99
96
  - Metadata examples:
100
- - `Status: Draft`
101
- - `Status: Active`
102
- - `Valid: from 2026-03-01 until 2026-12-31`
97
+ - `Valid: from 2026-03-01`
103
98
  - `Applied to: JavaScript projects`
104
99
 
105
100
  **XDR ID Examples:**
@@ -31,7 +31,7 @@ Skills are procedures, XDRs are guardrails and decisions, Research documents cap
31
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
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
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
- - When a skill reads, operationalizes, or enforces XDRs, it MUST evaluate the XDR metadata first. `Status:` determines whether the decision is eligible to be used, and an omitted `Status:` must be treated as `Active`. `Valid:` determines whether that active decision is currently in force by date, `Applied to:` determines whether it fits the current task context, and the decision text itself determines any remaining boundaries. Skills must not treat inactive, out-of-window, or out-of-scope XDRs as current requirements.
34
+ - When a skill reads, operationalizes, or enforces XDRs, it MUST evaluate the XDR metadata first. `Valid:` determines the convergence date for adoption, `Applied to:` determines whether the decision fits the current task context, and the decision text itself determines any remaining boundaries. All documents present in the collection are considered active. Skills must not treat out-of-window or out-of-scope XDRs as current requirements.
35
35
  - 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.
36
36
 
37
37
  Place a skill under the XDR type that matches the nature of the activity the skill performs:
@@ -19,7 +19,7 @@ Articles are Markdown documents placed inside a subject folder alongside decisio
19
19
  - Articles must reference the XDRs, Research documents, and Skills they synthesize. Never duplicate decision content; link back to the authoritative sources.
20
20
  - Articles may serve as indexes, combining related artifacts on a specific topic into a single navigable document.
21
21
  - In more complex cases, an article may be an index of links to other articles, grouping related documentation into a single entry point that guides readers across a set of related topics.
22
- - When an article tells readers which decisions to follow, it SHOULD distinguish currently usable XDRs from background-only ones by checking `Status:` first, treating omission as `Active`, `Valid:` second, `Applied to:` third, and the decision text itself last. Articles must not present Draft, Deprecated, inactive-date, out-of-window, or out-of-scope XDRs as current rules for the discussed context.
22
+ - When an article tells readers which decisions to follow, it SHOULD check `Valid:` first to determine the convergence date, `Applied to:` second to determine context fit, and the decision text itself last. All documents present in the collection are considered active; articles must not present out-of-window or out-of-scope XDRs as current rules for the discussed context.
23
23
  - 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.
24
24
  - Place an article in the subject folder that best matches its topic. If an article spans more than one subject, place it in `principles`.
25
25
  - For simple structure, flow, layout, or relationship indications, articles SHOULD prefer plain Markdown, tables, or ASCII art instead of external assets.
@@ -59,7 +59,7 @@ Research documents are Markdown files placed inside a subject folder alongside d
59
59
  ```
60
60
 
61
61
  Examples:
62
- - `.xdrs/_core/adrs/principles/researches/001-research-and-decision-lifecycle.md`
62
+ - `.xdrs/_local/adrs/principles/researches/001-research-and-decision-lifecycle.md`
63
63
  - `.xdrs/business-x/adrs/platform/researches/003-api-gateway-options.md`
64
64
  - `.xdrs/_local/edrs/application/researches/002-model-serving-constraints.md`
65
65
 
@@ -115,7 +115,7 @@ Prefer tables, bullets, or ASCII art for simple comparisons. Use external figure
115
115
 
116
116
  ## Considered Options
117
117
 
118
- - Related research: [001-research-and-decision-lifecycle](researches/001-research-and-decision-lifecycle.md)
118
+ - Related research: [001-research-and-decision-lifecycle](../../../_local/adrs/principles/researches/001-research-and-decision-lifecycle.md)
119
119
 
120
120
  * (REJECTED) **Inline long-form analysis inside the XDR** - Put all research and decision text in one file.
121
121
  * Reason: Makes XDRs too long, mixes evidence with the adopted rule set, and hurts fast retrieval by humans and AI agents.
@@ -0,0 +1,132 @@
1
+ # _core-adr-007: Plan standards
2
+
3
+ ## Context and Problem Statement
4
+
5
+ Teams need a structured way to describe a problem, propose a solution, and lay out the approach and activities needed to solve it. Without a standard format, planning documents drift in structure and completeness, making it hard to assess scope, track progress, and verify that a plan was fully implemented.
6
+
7
+ How should plans be structured and organized so they provide clear guidance for execution while remaining connected to the decisions, research, and skills they relate to?
8
+
9
+ ## Decision Outcome
10
+
11
+ **Subject-level ephemeral plan documents co-located with XDRs**
12
+
13
+ Plans are Markdown documents placed inside a subject folder alongside decision records. They describe a problem, a proposed solution, and the approach to solve it. Plans have a clear start and end and a well-defined scope.
14
+
15
+ ### Implementation Details
16
+
17
+ - Plans describe a problem (why), what we will do to solve the problem, and the approach and activities needed to solve it (how).
18
+ - Plans are NOT the source of truth. When a plan and an XDR disagree, the XDR takes precedence.
19
+ - Plans are ephemeral. They MUST be deleted after full implementation. The lasting outputs of a plan are actual actions or Decisions, Skills, Articles, Research documents, and other artifacts that result from execution.
20
+ - Plans may be used to implement a certain Decision. They may also use Research documents to help with the planning process. Articles may be written on top of a plan to give more context and connect more details present in other decisions and research to people involved in the plan.
21
+ - During the implementation of a plan, new Decisions, Articles, Skills, Research documents, and even other Plans may be created. Always link all related elements to each other.
22
+ - A plan can be high level, describing only one milestone, or more complex, describing a WBS (work breakdown structure) along with owners, multiple milestones in a tactical sequence, and checklists to verify completeness. Actual tasks performed by actors should normally be tracked in specialized software such as GitHub or Azure DevOps.
23
+ - The total time to deliver a plan should not be more than 2 years. If more time is needed, create a new plan later with what was learned.
24
+ - Plans MUST live under `plans/` inside the relevant subject folder: `.xdrs/[scope]/[type]/[subject]/plans/[number]-[short-title].md`
25
+ - Plans MUST include an `Expected end date:` field in ISO format (YYYY-MM-DD).
26
+ - Always use lowercase file names.
27
+ - Never use emojis in plan content.
28
+ - Images and other local resource files referenced by a plan SHOULD live in `plans/assets/` next to the plan files.
29
+
30
+ **Folder layout**
31
+
32
+ ```
33
+ .xdrs/
34
+ [scope]/
35
+ [type]/
36
+ [subject]/
37
+ plans/
38
+ [number]-[short-title].md
39
+ assets/
40
+ ```
41
+
42
+ Examples:
43
+ - `.xdrs/_local/adrs/principles/plans/001-checkout-performance.md`
44
+ - `.xdrs/business-x/bdrs/product/plans/002-onboarding-redesign.md`
45
+
46
+ **Plan numbering**
47
+
48
+ - Each plan has a number unique within its `scope/type/subject/plans/` namespace.
49
+ - Determine the next number by checking the highest number already present in that namespace.
50
+ - Never reuse numbers of deleted plans. Gaps in the sequence are expected and allowed.
51
+
52
+ **Plan template**
53
+
54
+ All plans MUST follow this template:
55
+
56
+ ```markdown
57
+ # [scope]-plan-[number]: [Short Title]
58
+
59
+ ## Executive Summary
60
+
61
+ [Required. A summary of all sections below using bullet points, focused on the most important items. Under 500 words.]
62
+
63
+ ## Context and Problem Statement
64
+
65
+ [Required. Describe clearly why we are executing this plan. What is the impact? Who is impacted? Why is this important? Under 200 words.
66
+ E.g.: Our checkout abandon rate is 50%, and it's increasing over time.]
67
+
68
+ ## Proposed Solution
69
+
70
+ [Required. What we expect to achieve to solve the problem described above. Under 200 words.
71
+ E.g.: Reduce payment time in our App by 30% and fix the 3 most impactful bugs.]
72
+
73
+ ## Acceptance Criteria
74
+
75
+ [Optional. Used to make it clear what the expected result is and to create a way to verify when the goal is achieved. May include a short checklist. Under 100 words.]
76
+
77
+ Expected end date: YYYY-MM-DD
78
+
79
+ ## Approach
80
+
81
+ [Optional. High level description about how to achieve the result and the strategy used, including how to engage people, projects, organize the work, how to learn unknowns, deal with risks, and distribute workload. May include a WBS with the hierarchy of the work. Under 300 words.]
82
+
83
+ ## Key Deliverables
84
+
85
+ [Optional. List of the main features, goods, artifacts, data, articles, skills, decisions, training, programs, events etc that will be important to achieve the expected result. Under 300 words.]
86
+
87
+ ## Key Resources
88
+
89
+ [Optional. List of equipment, people, other project results, budget, areas or dependencies that need to be engaged or allocated for this plan to be implemented. Under 100 words.]
90
+
91
+ ## Milestones
92
+
93
+ [Optional. List of goals to be followed along with an optional acceptance criteria, owner and due date. Each milestone may have a checklist used as acceptance criteria verification. Key tasks and risks can be listed as part of a milestone. Under 1000 words per milestone.]
94
+
95
+ ### Milestone 1: [Title]
96
+ Owner: [name or team]
97
+ Due date: YYYY-MM-DD
98
+
99
+ [Description of the milestone goal.]
100
+
101
+ **Acceptance checklist:** [optional]
102
+ - [ ] [Criterion 1]
103
+ - [ ] [Criterion 2]
104
+
105
+ **Key tasks:**
106
+ - [Task description]
107
+
108
+ **Risks:** [optional]
109
+ - [Risk description] — Mitigation: [strategy]
110
+
111
+ ## Risks Identified
112
+
113
+ [Optional. List of risks along with a short description and mitigation strategy. Under 1000 words.]
114
+
115
+ ## References
116
+
117
+ - [Related XDR or artifact](relative/path.md) - Brief description of relevance
118
+ ```
119
+
120
+ ## Considered Options
121
+
122
+ * (REJECTED) **Inline planning in XDRs** — Embed planning details inside decision records.
123
+ * Reason: Plans are ephemeral execution documents while XDRs are lasting decisions. Mixing them bloats XDRs and creates confusion about what to delete after execution.
124
+ * (CHOSEN) **Subject-level plans folder co-located with XDRs** — Keeps plans alongside the decisions they implement, with clear lifecycle expectations.
125
+ * Reason: Consistent with how skills, articles, and research are organized. The explicit deletion requirement after implementation keeps the document base clean.
126
+
127
+ ## References
128
+
129
+ - [_core-adr-001 - XDRs core](001-xdrs-core.md) - Framework elements: types, scopes, subjects, folder structure
130
+ - [_core-adr-004 - Article standards](004-article-standards.md) - Companion artifact type for synthetic views
131
+ - [_core-adr-006 - Research standards](006-research-standards.md) - Companion artifact type for exploratory evidence
132
+ - [006-write-plan skill](skills/006-write-plan/SKILL.md) - Step-by-step instructions for creating a new plan
@@ -19,7 +19,7 @@ same decision system.
19
19
  technical decisions, **BDR** for business and operational decisions, and **EDR** for engineering
20
20
  implementation decisions. See [_core-adr-001](../001-xdrs-core.md).
21
21
  - **Research** captures exploration before or around a decision: constraints, findings, options,
22
- pros, and cons. Research supports elaboration, discussion, approval, retirement, and updates,
22
+ pros, and cons. Research supports elaboration, discussion, and updates,
23
23
  but it is not the final rule. A single Research document may inform multiple downstream ADRs,
24
24
  BDRs, or EDRs. If Research and an XDR disagree, the XDR wins. See
25
25
  [_core-adr-006](../006-research-standards.md).
@@ -30,6 +30,10 @@ same decision system.
30
30
  - **Articles** are synthetic views, like this one. They explain a topic across multiple XDRs,
31
31
  Research documents, and Skills, helping readers understand the system without making new
32
32
  decisions. See [_core-adr-004](../004-article-standards.md).
33
+ - **Plans** describe a problem, a proposed solution, and the approach and activities needed to
34
+ solve it. They have a clear start and end and a well-defined scope. Plans are ephemeral: they
35
+ must be deleted after full implementation, with lasting outputs captured as Decisions, Skills,
36
+ Articles, or other artifacts. See [_core-adr-007](../007-plan-standards.md).
33
37
  - **Indexes and folder structure** are the discovery layer. They do not make decisions by
34
38
  themselves, but they determine how people and agents find the right artifacts, how scopes
35
39
  override one another, and how a large set of decisions remains navigable.
@@ -42,6 +46,7 @@ The easiest way to distinguish the central elements is by asking what job each o
42
46
  - **Research**: "What did we learn while evaluating options?"
43
47
  - **Skill**: "How do we carry out work under this decision?"
44
48
  - **Article**: "How do these artifacts fit together for a reader?"
49
+ - **Plan**: "What are we going to do, why, and how?"
45
50
  - **Index/Scope structure**: "Where do I look, and which decision set takes precedence?"
46
51
 
47
52
  This separation matters because mixing these jobs into one file makes the system harder to search,
@@ -49,13 +54,14 @@ harder to update, and harder for agents to apply correctly.
49
54
 
50
55
  ### How to decide whether an XDR should be used
51
56
 
52
- Before treating an XDR as a rule for the current case, check its metadata first.
57
+ Before treating an XDR as a rule for the current case, check its metadata first. All documents present in the collection are considered active — if a document exists, it is current.
53
58
 
54
- - **Status first**: only `Active` decisions can be current policy, and omitted `Status` is treated as `Active`. `Draft` and `Deprecated` are background or historical context.
55
- - **Valid second**: if present, the current moment must fall inside the decision's date window.
56
- - **Applied to third**: if present, the current codebase, workflow, system, or audience must fit that scope.
59
+ - **Valid first**: if present, the convergence date indicates when full adoption is expected. New implementations SHOULD adopt the decision immediately; compliance is not enforced during reviews until the date.
60
+ - **Applied to second**: if present, the current codebase, workflow, system, or audience must fit that scope.
57
61
  - **Decision text last**: the XDR's own context and implementation details still determine the final boundaries and exceptions.
58
- - **Then enforce**: only decisions that pass those checks should be used as active requirements. The rest may still be useful background or historical context.
62
+ - **Then enforce**: only decisions that pass those checks should be used as active requirements. The rest may still be useful context.
63
+
64
+ Documents that are no longer relevant should be removed from the collection. Historical versions are available via versioned packages or git history.
59
65
 
60
66
  ### How they relate over time
61
67
 
@@ -99,6 +105,8 @@ Every decision record and its supporting artifacts live at a fixed path:
99
105
  SKILL.md
100
106
  articles/
101
107
  [number]-[short-title].md
108
+ plans/
109
+ [number]-[short-title].md
102
110
  ```
103
111
 
104
112
  - **Scopes** represent ownership domains such as `_core`, `business-x`, or `team-43`.
@@ -135,7 +143,8 @@ Follow [_core-adr-001](../001-xdrs-core.md) and [_core-adr-002](../002-xdr-stand
135
143
 
136
144
  - Use **mandatory language** (`must`, `never`, `required`) for non-negotiable rules and
137
145
  **advisory language** (`should`, `recommended`) for guidance.
138
- - Before citing an XDR as a requirement, check `Status` first, treating omission as `Active`, then `Valid`, then `Applied to`, and finally the decision text to confirm the decision is active and in scope for the current case.
146
+ - Before citing an XDR as a requirement, check `Valid` first, then `Applied to`, and finally the decision text to confirm the decision is in scope for the current case.
147
+ - All documents present in the collection are considered active. Remove documents that are no longer relevant.
139
148
  - Keep XDRs under 1300 words as a rule of thumb (exceptions up to 2600 words for templates or more elaborate decisions). Move procedural detail to a co-located Skill.
140
149
  - Keep exploratory option analysis in a co-located Research document instead of bloating the XDR.
141
150
  - Always update the scope+type index and the root index after adding or changing an XDR.
@@ -153,6 +162,8 @@ Follow [_core-adr-001](../001-xdrs-core.md) and [_core-adr-002](../002-xdr-stand
153
162
  folder, following [_core-adr-003](../003-skill-standards.md).
154
163
  - **New article** — add an `articles/[number]-[short-title].md` inside the relevant subject
155
164
  folder, following [_core-adr-004](../004-article-standards.md).
165
+ - **New plan** — add a `plans/[number]-[short-title].md` inside the relevant subject
166
+ folder, following [_core-adr-007](../007-plan-standards.md).
156
167
 
157
168
  ### Using XDRs in your own project
158
169
 
@@ -175,6 +186,7 @@ Follow [_core-adr-001](../001-xdrs-core.md) and [_core-adr-002](../002-xdr-stand
175
186
  - [_core-adr-003](../003-skill-standards.md) - Skill standards and co-location rules
176
187
  - [_core-adr-004](../004-article-standards.md) - Article standards
177
188
  - [_core-adr-006](../006-research-standards.md) - Research standards
189
+ - [_core-adr-007](../007-plan-standards.md) - Plan standards
178
190
  - [001-lint skill](../skills/001-lint/SKILL.md) - Linting code against XDRs
179
191
  - [002-write-xdr skill](../skills/002-write-xdr/SKILL.md) - Writing a new XDR
180
192
  - [003-write-skill skill](../skills/003-write-skill/SKILL.md) - Writing a new skill
@@ -0,0 +1,40 @@
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('smoke test', async () => {
11
+ const err = await testPrompt(
12
+ {
13
+ workspaceRoot: REPO_ROOT,
14
+ workspaceMode: 'in-place',
15
+ ...copilotCmd(REPO_ROOT),
16
+ },
17
+ 'Reply ONLY with "READY" after checking if SKILL 001 has any contents',
18
+ 'Verify that the final output is ONLY "READY" and that it read file 001-lint/SKILL.md',
19
+ null,
20
+ true
21
+ );
22
+
23
+ expect(err).toBe('');
24
+ });
25
+
26
+ test('001-lint outputs the required review template', async () => {
27
+ const err = await testPrompt(
28
+ {
29
+ workspaceRoot: REPO_ROOT,
30
+ workspaceMode: 'copy',
31
+ ...copilotCmd(REPO_ROOT),
32
+ },
33
+ 'Review xdr 001-xdrs-core',
34
+ 'Verify that the skill 001-lint was used, contains "## Findings", and "## Summary", includes an "Outcome: PASS", and that it read file 001-lint/SKILL.md and 001-xdrs-core.md.',
35
+ null,
36
+ true
37
+ );
38
+
39
+ expect(err).toBe('');
40
+ });
@@ -0,0 +1,23 @@
1
+ {
2
+ "Review xdr 001-xdrs-core-ac1c8339": {
3
+ "result": "success",
4
+ "contextFiles": [
5
+ ".xdrs/_core/adrs/index.md",
6
+ ".xdrs/_core/adrs/principles/001-xdrs-core.md",
7
+ ".xdrs/_core/adrs/principles/002-xdr-standards.md",
8
+ ".xdrs/_core/adrs/principles/skills/001-lint/SKILL.md",
9
+ ".xdrs/_local/bdrs/index.md",
10
+ ".xdrs/index.md",
11
+ "AGENTS.md"
12
+ ],
13
+ "contextHash": "98562e9ef1410e8976d719391a098ab3"
14
+ },
15
+ "Reply ONLY with \"READY\" after checking i-a61b0904": {
16
+ "result": "success",
17
+ "contextFiles": [
18
+ ".xdrs/_core/adrs/principles/skills/001-lint/SKILL.md",
19
+ "AGENTS.md"
20
+ ],
21
+ "contextHash": "dc167dc47aab0f4de26ddbcd4fa979b4"
22
+ }
23
+ }
@@ -25,9 +25,9 @@ Performs a structured review of code changes or files against the XDRs in the re
25
25
  1. Gather all Decision Records from `.xdrs/index.md` starting from the working directory.
26
26
  - XDR scopes are controlled by nested folders; some are broad, others domain-specific.
27
27
  - Extract metadata first to decide whether each XDR should be used for the current review context.
28
- - Check `Status:` first. Treat an omitted `Status:` as `Active`, and treat `Draft` and `Deprecated` XDRs as background only, not active policy.
29
- - Check `Valid:` second. Keep only `Active` XDRs whose date window covers the current review moment.
30
- - Check `Applied to:` third. Keep only active, in-window XDRs whose stated scope fits the files, systems, or workflows under review.
28
+ - All documents present in the collection are considered active.
29
+ - Check `Valid:` first. If a convergence 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 `Applied to:` second. Keep only XDRs whose stated scope fits the files, systems, or workflows under review.
31
31
  - Check the decision text itself last for additional boundaries or exceptions that metadata does not encode.
32
32
  2. Filter relevance based on file types, domains, and architectural patterns in scope.
33
33
 
@@ -0,0 +1,24 @@
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
+ });
@@ -0,0 +1,14 @@
1
+ {
2
+ "Create a very small XDR deciding to use -8b1a2ddd": {
3
+ "result": "success",
4
+ "contextFiles": [
5
+ ".xdrs/_core/adrs/principles/001-xdrs-core.md",
6
+ ".xdrs/_core/adrs/principles/002-xdr-standards.md",
7
+ ".xdrs/_local/bdrs/index.md",
8
+ ".xdrs/_local/bdrs/operations/001-agent-behavior-validation-procedure.md",
9
+ ".xdrs/index.md",
10
+ "AGENTS.md"
11
+ ],
12
+ "contextHash": "5ceaa69409aa5eff1728d3a4212865a0"
13
+ }
14
+ }
@@ -52,7 +52,7 @@ Choose a title that clearly states the question this XDR answers, not the answer
52
52
  ### Phase 4: Research Related XDRs
53
53
 
54
54
  1. Read all existing XDRs relevant to the topic across all scopes listed in `.xdrs/index.md`.
55
- 2. Evaluate XDR metadata before treating any decision as a current constraint. `Status:` decides whether a decision is eligible to be used, and omitted `Status:` means `Active`; `Valid:` decides whether that active decision is currently in force, `Applied to:` decides whether it fits the current topic, and the decision text defines any remaining boundaries. Treat inactive, out-of-window, or out-of-scope XDRs as background only when assessing overlaps and conflicts.
55
+ 2. Evaluate XDR metadata before treating any decision as a current constraint. All documents present in the collection are considered active. `Valid:` determines the convergence date for adoption, `Applied to:` determines whether it fits the current topic, and the decision text defines any remaining boundaries. Treat out-of-window or out-of-scope XDRs as background only when assessing overlaps and conflicts.
56
56
  3. Identify decisions that already address the topic (full or partial overlap).
57
57
  4. Note decisions that might conflict with the intended outcome.
58
58
  5. Read related `researches/` documents when they exist, especially if they contain constraints, findings, or option tradeoffs that should influence the decision.
@@ -76,8 +76,7 @@ Use the mandatory template from `002-xdr-standards`:
76
76
 
77
77
  ## Metadata
78
78
  [Optional. Include only when at least one metadata field is present]
79
- Status: [Optional. Use Draft, Active, or Deprecated. Defaults to Active when omitted]
80
- Valid: [Optional. Use from YYYY-MM-DD, until YYYY-MM-DD, or from YYYY-MM-DD until YYYY-MM-DD]
79
+ Valid: [Optional. Use from YYYY-MM-DD to set a convergence date for adoption]
81
80
  Applied to: [Optional short applicability scope, under 40 words]
82
81
 
83
82
  ## Context and Problem Statement
@@ -99,10 +98,10 @@ Applied to: [Optional short applicability scope, under 40 words]
99
98
  ```
100
99
 
101
100
  Mandatory rules to apply while drafting:
102
- - Include `## Metadata` only when `Status:`, `Valid:`, and/or `Applied to:` adds value; omit the whole section when none of those fields is defined.
101
+ - Include `## Metadata` only when `Valid:` and/or `Applied to:` adds value; omit the whole section when none of those fields is defined.
103
102
  - When present, place `## Metadata` immediately before `## Context and Problem Statement`.
104
- - Keep `Applied to:` under 40 words, use `Status:` only with `Draft`, `Active`, or `Deprecated`, remember that omitted `Status:` means `Active`, and use `Valid:` only with ISO date ranges.
105
- - When metadata is present, write it so a reader can decide whether the XDR should be used for the current case without guessing. `Status:` controls lifecycle state, omitted `Status:` means `Active`, `Valid:` controls the active time window, `Applied to:` narrows the contexts where that active decision applies, and the decision text defines any remaining boundaries.
103
+ - Keep `Applied to:` under 40 words and use `Valid:` only with `from YYYY-MM-DD` format.
104
+ - When metadata is present, write it so a reader can decide whether the XDR should be used for the current case without guessing. `Valid:` sets a convergence date for adoption, `Applied to:` narrows the contexts where the decision applies, and the decision text defines any remaining boundaries.
106
105
  - Use mandatory language ("must", "always", "never") only for hard requirements; use advisory language ("should", "recommended") for guidance.
107
106
  - Do not duplicate content already in referenced XDRs — link instead.
108
107
  - Keep the decision itself authoritative in the XDR. Supporting artifacts may elaborate, but they should not restate the full decision when a short reference is enough.
@@ -118,7 +117,7 @@ Mandatory rules to apply while drafting:
118
117
  Check every item before finalizing:
119
118
 
120
119
  1. **Length**: Is it under 1300 words? Trim verbose explanations. Move detailed skills to a separate file and link.
121
- 2. **Metadata**: If metadata exists, is it directly before Context, limited to `Status:` / `Valid:` / `Applied to:`, omitted entirely when all three are absent, and specific enough for a reader to decide whether the XDR is active, currently valid, and applicable?
120
+ 2. **Metadata**: If metadata exists, is it directly before Context, limited to `Valid:` / `Applied to:`, omitted entirely when both are absent, and specific enough for a reader to decide whether the XDR is currently valid and applicable?
122
121
  3. **Originality**: Does every sentence add value that cannot be found in a generic web search? Remove obvious advice. Keep only the project-specific decision.
123
122
  4. **Clarity**: Is the chosen option unambiguous? Is the "why" clear in one reading?
124
123
  5. **Redundancy**: Is the XDR the primary source for the decision itself, with related documents linked instead of duplicated wherever possible?
@@ -135,6 +134,15 @@ If any check fails, revise and re-run this phase before proceeding.
135
134
  4. If significant research was produced or already exists, link it from the XDR `## Considered Options` section.
136
135
  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.
137
136
 
137
+ ### Phase 9: Verify Package structure with Lint
138
+
139
+ 1. Run the CLI lint utility from the repository root:
140
+ ```
141
+ npx -y xdrs-core lint .
142
+ ```
143
+ 2. Fix all reported errors before considering the task complete.
144
+ 3. Review warnings; fix straightforward ones and note intentional deviations explicitly.
145
+
138
146
  ### Constraints
139
147
 
140
148
  - MUST follow the XDR template from `002-xdr-standards` exactly.
@@ -0,0 +1,24 @@
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('003-write-skill creates a devops skill package', async () => {
11
+ const err = await testPrompt(
12
+ {
13
+ workspaceRoot: REPO_ROOT,
14
+ workspaceMode: 'copy',
15
+ ...copilotCmd(REPO_ROOT),
16
+ },
17
+ 'Create a skill with instructions on how to do a call to a customer during a marketing campaign: - look for the phone number in the CRM opportunity, - read the proposal to be offered, - make the call, - maintain a friendly and professional tone, - report the outcome on CRM, - say "Thank you for your time".',
18
+ 'Verify that SKILL.md was created under .xdrs/_local/bdrs/marketing/skills and has instructions about calling a customer, especifically about the tone of voice',
19
+ null,
20
+ true
21
+ );
22
+
23
+ expect(err).toBe('');
24
+ });
@@ -0,0 +1,14 @@
1
+ {
2
+ "Create a skill with instructions on how -a7079882": {
3
+ "result": "success",
4
+ "contextFiles": [
5
+ ".xdrs/_core/adrs/principles/001-xdrs-core.md",
6
+ ".xdrs/_core/adrs/principles/003-skill-standards.md",
7
+ ".xdrs/_local/bdrs/index.md",
8
+ ".xdrs/_local/bdrs/operations/001-agent-behavior-validation-procedure.md",
9
+ ".xdrs/index.md",
10
+ "AGENTS.md"
11
+ ],
12
+ "contextHash": "738b99bad5adfe36fa14191c6c31ddab"
13
+ }
14
+ }