xdrs-core 0.49.0 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.xdrs/_core/adrs/index.md +1 -0
- package/.xdrs/_core/adrs/principles/003-skill-standards.md +98 -12
- package/.xdrs/_core/adrs/principles/021-skill-bundling.md +85 -0
- package/.xdrs/_core/adrs/principles/skills/compile-scope/SKILL.md +52 -1
- package/.xdrs/_core/adrs/principles/skills/review/SKILL.md +48 -2
- package/.xdrs/_core/adrs/principles/skills/write-article/SKILL.md +46 -1
- package/.xdrs/_core/adrs/principles/skills/write-initiative/SKILL.md +44 -2
- package/.xdrs/_core/adrs/principles/skills/write-policy/SKILL.md +44 -1
- package/.xdrs/_core/adrs/principles/skills/write-presentation/SKILL.md +48 -1
- package/.xdrs/_core/adrs/principles/skills/write-research/SKILL.md +54 -9
- package/.xdrs/_core/adrs/principles/skills/write-skill/SKILL.md +99 -6
- package/.xdrs/_core/adrs/principles/skills/write-xdrs-doc/SKILL.md +48 -1
- package/lib/lint.js +495 -9
- package/lib/lint.test.js +669 -31
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ Foundational standards, principles, and guidelines.
|
|
|
26
26
|
- [_core-adr-policy-018](principles/018-external-path-symlinks.md) - **External path symlinks** — How to make XDRS files accessible from paths outside the .xdrs/ root using symlinks
|
|
27
27
|
- [_core-adr-policy-019](principles/019-compiled-scope-type.md) - **compiled scope type** — Defines the `compiled` scope type: scopes whose policies are compiled from external authoritative sources with strict source traceability and no invented content
|
|
28
28
|
- [_core-adr-policy-020](principles/020-media-and-asset-standards.md) - **Media and asset standards** — Canonical diagram format preference order and non-Markdown asset rules for all XDRS document types
|
|
29
|
+
- [_core-adr-policy-021](principles/021-skill-bundling.md) - **Skill bundling** — Optional per-skill Makefile mechanism to stage a self-contained dist/ output for standalone distribution
|
|
29
30
|
|
|
30
31
|
## Skills
|
|
31
32
|
|
|
@@ -73,32 +73,73 @@ Examples:
|
|
|
73
73
|
- `.xdrs/business-x/edrs/devops/skills/ci-pipeline-debug/SKILL.md`
|
|
74
74
|
- `.xdrs/_local/adrs/principles/skills/my-nice-skill/SKILL.md`
|
|
75
75
|
|
|
76
|
+
Multiple skills under the same `[subject]/skills/` folder MAY share common instruction modules through a sibling `.assets/` directory placed directly under `skills/` (not inside any individual skill package) — for example `skills/.assets/shared-check.md`, referenced with a relative link from any skill in that folder. This keeps shared procedures DRY without duplicating instructions across skills.
|
|
77
|
+
|
|
78
|
+
A skill MAY optionally be distributed as a self-contained standalone package (for example, to share it outside this repository) using the bundling mechanism defined in [`_core-adr-policy-021`](021-skill-bundling.md). Bundling is optional; skills that are always consumed as part of the full package do not need it.
|
|
79
|
+
|
|
80
|
+
**Directory roles**
|
|
81
|
+
|
|
82
|
+
| Path | Purpose |
|
|
83
|
+
|---|---|
|
|
84
|
+
| `SKILL.md` | Required entry point: frontmatter + instructions. |
|
|
85
|
+
| `scripts/` | Optional executable scripts the agent may run. |
|
|
86
|
+
| `references/` | Optional deep reference material split out of `SKILL.md`. |
|
|
87
|
+
| `.assets/` | Optional images, templates, and other local resource files. |
|
|
88
|
+
|
|
76
89
|
**Skill naming**
|
|
77
90
|
|
|
78
|
-
Unlike Policies, Research, Articles, and Initiatives, skill packages
|
|
91
|
+
Unlike Policies, Research, Articles, and Initiatives, skill packages are not auto-numbered. A skill is identified by a descriptive name, keeping it compatible with the wider agentskills ecosystem, where clients (including this framework's own agentskills-format consumers) expect a plain descriptive identifier rather than an auto-generated sequence number. The name MAY still contain digits, including as a prefix, when that is simply part of the descriptive name (e.g., `2fa-setup`). Each skill name MUST be unique within its `scope/type/subject/skills/` namespace; check for an existing skill with the same name before creating a new one.
|
|
79
92
|
|
|
80
93
|
**SKILL.md format** (agentskills spec)
|
|
81
94
|
|
|
82
95
|
```
|
|
83
96
|
---
|
|
84
97
|
name: [skill-name] # required: matches the folder name exactly; max 64 chars
|
|
85
|
-
description: > # required: what the skill does AND when to activate it; max 1024 chars
|
|
98
|
+
description: > # required: what the skill does AND when to activate it; max 1024 chars (SHOULD stay near 250 when the trigger can be stated that tightly)
|
|
86
99
|
Concise explanation of the skill and the situations in which an agent should load it.
|
|
87
100
|
license: <license> # optional
|
|
88
|
-
metadata: #
|
|
89
|
-
author: <team-or-person>
|
|
90
|
-
version: "1.0"
|
|
91
|
-
|
|
92
|
-
allowed-tools: <tools> # optional (experimental): space-delimited pre-approved tools
|
|
101
|
+
metadata: # required
|
|
102
|
+
author: <team-or-person> # required
|
|
103
|
+
version: "1.0.0" # required: full semantic versioning
|
|
104
|
+
updated: YYYY-MM-DD # required: date of the last material content change
|
|
93
105
|
---
|
|
94
106
|
|
|
95
107
|
## Overview
|
|
96
108
|
|
|
97
109
|
Brief description of the skill goal.
|
|
98
110
|
|
|
111
|
+
### Inputs
|
|
112
|
+
|
|
113
|
+
#### Required
|
|
114
|
+
- Bare minimum the skill needs to start working, one bullet per item, or "None".
|
|
115
|
+
|
|
116
|
+
#### Optional
|
|
117
|
+
- Extra helpful context the skill can use if given, one bullet per item, or "None".
|
|
118
|
+
|
|
119
|
+
### Outputs
|
|
120
|
+
|
|
121
|
+
#### Contents
|
|
122
|
+
- Generated files or chat-delivered results, one bullet per item, or "None".
|
|
123
|
+
|
|
124
|
+
#### Changes
|
|
125
|
+
- External system mutations that are part of the skill's main objective, one bullet per item, or "None".
|
|
126
|
+
|
|
127
|
+
### Halt Conditions
|
|
128
|
+
- Specific triggers that make the skill stop before completing, one bullet per item, or "None".
|
|
129
|
+
|
|
130
|
+
### User Interaction
|
|
131
|
+
|
|
132
|
+
Optional section: human-in-the-loop (HITL) exchanges during execution — a clarifying question or
|
|
133
|
+
an approval gate — one bullet per item, or "None". Omit this section entirely when none apply.
|
|
134
|
+
|
|
135
|
+
### Runtime Requirements
|
|
136
|
+
|
|
137
|
+
Optional section: tooling, network access, or environment prerequisites beyond the LLM itself,
|
|
138
|
+
one bullet per item. Omit this section entirely when none apply.
|
|
139
|
+
|
|
99
140
|
## Instructions
|
|
100
141
|
|
|
101
|
-
Step-by-step instructions the agent should follow.
|
|
142
|
+
Step-by-step instructions the agent should follow. State one clearly recommended approach first when several are viable; note alternatives briefly afterward.
|
|
102
143
|
|
|
103
144
|
## Examples
|
|
104
145
|
|
|
@@ -107,19 +148,58 @@ Concrete input/output examples that illustrate correct behavior.
|
|
|
107
148
|
## Edge Cases
|
|
108
149
|
|
|
109
150
|
Known gotchas and how to handle them.
|
|
151
|
+
|
|
152
|
+
## Anti-Patterns
|
|
153
|
+
|
|
154
|
+
At least 3 entries, each grounded in a real observed mistake:
|
|
155
|
+
- **Mistake:** what an agent or author incorrectly did.
|
|
156
|
+
**Why it happens:** the reasoning or shortcut that leads there.
|
|
157
|
+
**Instead:** the correct approach.
|
|
110
158
|
```
|
|
111
159
|
|
|
112
160
|
Rules:
|
|
113
161
|
- The `name` field MUST match the folder name exactly (e.g., `code-review`). This keeps skill identifiers simple and aligned with the filesystem hierarchy.
|
|
114
|
-
- The directory name and the `name:` field MUST contain only lowercase alphanumeric characters and hyphens (e.g., `code-review`)
|
|
115
|
-
-
|
|
116
|
-
-
|
|
162
|
+
- The directory name and the `name:` field MUST contain only lowercase alphanumeric characters and hyphens (e.g., `code-review`, `2fa-setup`).
|
|
163
|
+
- `metadata` is REQUIRED. `metadata.version` MUST use full semantic versioning (`MAJOR.MINOR.PATCH`, e.g. `1.0.0`), consistent with [`_core-adr-policy-005`](005-semantic-versioning-for-xdrs-packages.md); `metadata.author` MUST be non-empty; `metadata.updated` MUST be an ISO `YYYY-MM-DD` date, refreshed whenever the skill's content materially changes.
|
|
164
|
+
- `description` SHOULD stay near 250 characters when the activation trigger can be stated that tightly, even though the hard cap remains 1024 characters — it is loaded into context on every activation scan.
|
|
165
|
+
- `## Overview` SHOULD state the task objective, expected outcome, and relevant prerequisites or tools when they matter, and MUST contain nested subsections, in order, for `### Inputs`, `### Outputs`, `### Halt Conditions`, then the optional `### User Interaction` and `### Runtime Requirements`.
|
|
166
|
+
- `### Inputs` MUST contain `#### Required` (the bare minimum needed to invoke the skill) then `#### Optional` (helpful extra context), in that order.
|
|
167
|
+
- `## Instructions` SHOULD state one clearly recommended approach first when multiple are viable, noting alternatives briefly afterward, and SHOULD include verification steps or acceptance criteria at the end of the task or major phases.
|
|
168
|
+
- `## Examples` SHOULD include 2-3 example prompts a user could give as input, alongside a short description of what to expect during execution and as output for each.
|
|
169
|
+
- `### Outputs` covers only end-objective results, not intermediary items, and MUST contain `#### Contents` (generated files or chat-delivered results) then `#### Changes` (external system mutations that are part of the main objective), in that order.
|
|
170
|
+
- `### Halt Conditions` MUST list this skill's specific stop-before-completing triggers, grounded in at least missing required input, dubious/ambiguous input, and insufficient agent confidence — distinct from `## Edge Cases` (activation/boundary conditions) and `## Anti-Patterns` (execution mistakes). A partial or empty result the skill still finishes and returns belongs in `### Outputs`, not `### Halt Conditions`.
|
|
171
|
+
- `### User Interaction` is OPTIONAL: documents human-in-the-loop (HITL) exchanges during execution — a clarifying question or an approval gate — distinct from `### Halt Conditions` (which stop execution rather than pause-and-resume it) and `### Runtime Requirements` (static prerequisites, not an interactive exchange); omit the section entirely when the skill has none.
|
|
172
|
+
- `### Runtime Requirements` is OPTIONAL: free-form bullets for tooling, network, or environment prerequisites beyond the LLM itself; omit the section entirely when none apply.
|
|
173
|
+
- Every bullet in `#### Required`, `#### Optional`, `#### Contents`, `#### Changes`, `### Halt Conditions`, and `### User Interaction` MUST be under 10 words, or the section MUST contain a single "None" bullet instead.
|
|
174
|
+
- `## Anti-Patterns` is REQUIRED with a minimum of 3 entries, each naming a Mistake, Why it happens, and the correct approach Instead, grounded in real observed issues rather than theoretical ones. Keep it distinct from `## Edge Cases`: Edge Cases are activation/boundary conditions, Anti-Patterns are execution mistakes.
|
|
175
|
+
- Key recommendations MAY be tagged `[PROVEN]`, `[RECOMMENDED]`, or `[EXPERIMENTAL]` when a skill offers several viable approaches at different confidence levels.
|
|
117
176
|
- For diagram format preferences and non-Markdown asset rules, see [`_core-adr-policy-020`](020-media-and-asset-standards.md).
|
|
118
|
-
-
|
|
177
|
+
- `SKILL.md` MUST stay under 7000 words. Move lengthy reference material to `references/`; each `references/*.md` file MUST stay under 4000 words, splitting further when a single file grows unwieldy.
|
|
119
178
|
- Use relative paths for all links; MUST NOT use absolute paths starting with `/`.
|
|
120
179
|
- File names MUST be lowercase.
|
|
121
180
|
- MUST NOT use emojis in skill content.
|
|
122
181
|
|
|
182
|
+
**Script standards**
|
|
183
|
+
|
|
184
|
+
When a skill includes `scripts/`:
|
|
185
|
+
- Each script MUST declare its runtime/interpreter at the top (shebang or equivalent header comment).
|
|
186
|
+
- SHOULD use the language already used by the consuming project when known, rather than mandating one language repo-wide.
|
|
187
|
+
- MUST avoid non-essential external dependencies, or document install steps in `SKILL.md` when unavoidable.
|
|
188
|
+
- SHOULD support both human-readable and machine-readable (JSON) output when producing analysis or report output.
|
|
189
|
+
- SHOULD stay single-purpose.
|
|
190
|
+
|
|
191
|
+
**Quality gate**
|
|
192
|
+
|
|
193
|
+
Before creating a skill, confirm it removes real ambiguity or repetitive effort compared to not having it. Skills that only restate a Policy, or that handle a one-off task unlikely to recur, SHOULD NOT be created.
|
|
194
|
+
|
|
195
|
+
**Clarify First**
|
|
196
|
+
|
|
197
|
+
Generative skills — those producing a deliverable document (Policy, Skill, Article, Research, Initiative, Presentation) — SHOULD list the 2-4 inputs they need confirmed (e.g., topic, scope, audience) and ask the user when any is unknown, stopping once those inputs are confirmed rather than over-interrogating. Skills that route, review, or report instead of authoring a new deliverable do not need this pattern.
|
|
198
|
+
|
|
199
|
+
**Halt behavior**
|
|
200
|
+
|
|
201
|
+
Skills MUST halt on missing required input, dubious/ambiguous input, or insufficient agent confidence, unless the user explicitly instructs the agent to proceed anyway. This override applies generally; a skill's own `## Halt Conditions` list does not need to restate it.
|
|
202
|
+
|
|
123
203
|
**Validation**
|
|
124
204
|
|
|
125
205
|
Use the [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref) CLI to validate before committing:
|
|
@@ -134,6 +214,10 @@ skills-ref validate .xdrs/[scope]/[type]/[subject]/skills/[skill-name]
|
|
|
134
214
|
* Reason: Breaks the natural association between a decision (Policy) and the skill that implements it; makes navigation harder.
|
|
135
215
|
* (CHOSEN) **agentskills-compatible packages co-located with XDRS** - Standardized format with scoped discovery and clear ownership.
|
|
136
216
|
* Reason: Reuses proven agentskills tooling, aligns with the existing XDRS scope/subject hierarchy, and keeps skills close to the decisions they implement.
|
|
217
|
+
* (REJECTED) **Fully self-contained skills, no shared assets** - Every skill package repeats any instruction shared with another skill.
|
|
218
|
+
* Reason: Duplicates maintenance burden across skills and drifts out of sync over time.
|
|
219
|
+
* (CHOSEN) **Shared `.assets/` modules plus optional bundling** - Keep shared instruction modules DRY in-repo, and offer an optional per-skill bundling mechanism for standalone distribution.
|
|
220
|
+
* Reason: Preserves DRY authoring for the common case while still allowing a single skill to be distributed as a self-contained artifact when needed ([`_core-adr-policy-021`](021-skill-bundling.md)).
|
|
137
221
|
|
|
138
222
|
## References
|
|
139
223
|
|
|
@@ -142,4 +226,6 @@ skills-ref validate .xdrs/[scope]/[type]/[subject]/skills/[skill-name]
|
|
|
142
226
|
- [skills-ref validation library](https://github.com/agentskills/agentskills/tree/main/skills-ref)
|
|
143
227
|
- [_core-adr-policy-001 - XDRS standards](001-xdrs-standards.md)
|
|
144
228
|
- [_core-adr-policy-004 - Article standards](004-article-standards.md)
|
|
229
|
+
- [_core-adr-policy-005 - Semantic versioning for XDRS packages](005-semantic-versioning-for-xdrs-packages.md)
|
|
145
230
|
- [_core-adr-policy-006 - Research standards](006-research-standards.md)
|
|
231
|
+
- [_core-adr-policy-021 - Skill bundling](021-skill-bundling.md)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: _core-adr-policy-021-skill-bundling
|
|
3
|
+
description: Defines how a skill package MAY be bundled into a self-contained standalone distributable via a per-skill Makefile, including dist/ staging, recursive dependency delegation, and selective copying. Use when packaging a skill for standalone distribution outside the full xdrs-core package.
|
|
4
|
+
apply-to: Skill packages that need standalone distribution outside the full xdrs-core package
|
|
5
|
+
valid-from: 2026-09-19
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# _core-adr-policy-021: Skill bundling
|
|
9
|
+
|
|
10
|
+
## Context and Problem Statement
|
|
11
|
+
|
|
12
|
+
Skills sometimes need to be shared or distributed as standalone artifacts outside the full `xdrs-core` package — for example, published separately or handed to a team that does not consume the whole repository. A skill that references shared `.assets/` modules (see `_core-adr-policy-003`) or embeds another skill as a dependency cannot simply be copied as a single `SKILL.md` file without breaking those references. No automated bundling utility exists yet, so each skill's own build process must resolve its dependencies; this means the same short recursive-copy pattern is duplicated across every bundling-enabled skill's `Makefile`, an accepted tradeoff until a shared build utility exists.
|
|
13
|
+
|
|
14
|
+
Question: How should a skill package that depends on shared assets or other skills be packaged into a self-contained standalone distributable?
|
|
15
|
+
|
|
16
|
+
## Decision Outcome
|
|
17
|
+
|
|
18
|
+
**Optional per-skill `Makefile` that stages a self-contained `dist/` output, recursively delegating to each dependency's own bundling `Makefile`**
|
|
19
|
+
|
|
20
|
+
A skill MAY add its own `Makefile` to become bundling-enabled. Running `make build` inside the skill's folder stages a self-contained copy of the skill and everything it needs in a local, gitignored `dist/` folder, with exactly two top-level entries: `dist/build/` (the skill's own files, ready to use standalone) and `dist/<skill-name>.zip` (a packaged archive of it) — see Details for the exact layout. Inside `dist/build/`, the skill's own resources stay flat while every bundled dependency is corralled into its own `dist/<dependency-name>/` subfolder, so it is always immediately recognizable as a separate bundled/copied skill rather than merged into the skill's own files. When the skill embeds another skill as a dependency and that dependency is itself bundling-enabled, `build` delegates to the dependency's own `make build` and copies its output wholesale, so the mechanism nests recursively without a central build utility. This is independent of the repository-level `.filedist-package.yml` distribution flow used to publish whole XDRS packages; it operates entirely within a single skill's own folder.
|
|
21
|
+
|
|
22
|
+
### Details
|
|
23
|
+
|
|
24
|
+
#### 01-bundling-is-optional
|
|
25
|
+
A skill MAY opt into standalone bundling by adding its own `Makefile` with `build`, `test`, and `clean` targets inside its own package folder (`skills/[skill-name]/Makefile`). Skills that are always consumed as part of the full `xdrs-core` package are not required to add one.
|
|
26
|
+
|
|
27
|
+
#### 02-dist-output-location
|
|
28
|
+
When present, the bundling `Makefile` MUST stage the skill's own unpacked files in `dist/build/`, relative to the root of the skill's own package (`skills/[skill-name]/dist/build/`). `dist/` MUST NOT be committed: a `.gitignore` entry covering `dist` (a bare `dist` or `**/dist` line) MUST exist in either the repository root `.gitignore` or a `.gitignore` local to the skill package. If the root `.gitignore` already covers it, no additional local entry is needed.
|
|
29
|
+
|
|
30
|
+
#### 03-works-without-bundling
|
|
31
|
+
A skill's `SKILL.md` MUST remain fully functional when consumed directly from its normal in-repo location, without ever running `make build`. The `dist/` output is an additional, optional artifact for standalone distribution; `SKILL.md` MUST NOT hard-depend on `dist/` existing.
|
|
32
|
+
|
|
33
|
+
#### 04-selective-copy
|
|
34
|
+
`make build` MUST copy only the files strictly necessary for the skill to run: its own `SKILL.md`, whichever of `scripts/`, `references/`, or `.assets/` it actually uses, and the specific shared modules or dependency skills it references. Tests, fixtures, or unrelated repository resources MUST NOT be copied into `dist/`.
|
|
35
|
+
|
|
36
|
+
#### 05-preserve-relative-paths
|
|
37
|
+
Files that belong to the skill's own package (`scripts/`, `references/`, its own `.assets/`) MUST be copied preserving their path relative to `SKILL.md` unchanged, since `SKILL.md` and its own files move into `dist/build/` together as a unit and their relative relationship to each other does not change. Links to a bundled dependency (a shared `.assets/` module elsewhere or another skill) are the one exception: `dist/build/` sits two directory levels below the original `SKILL.md`, so an unrewritten external link would no longer resolve once the target has been copied. `build` MUST rewrite such links inside the copied `SKILL.md` (and any other copied file that references them) to the flattened path defined by rule `06-recursive-delegation`, using a mechanical text substitution (for example `sed`).
|
|
38
|
+
|
|
39
|
+
#### 06-recursive-delegation
|
|
40
|
+
When a skill's `build` target embeds another skill as a dependency, `build` MUST stage that dependency under `dist/build/dist/<dependency-name>/` (a `dist/` subfolder nested inside `dist/build/` itself, not a sibling of it): if the dependency has its own bundling `Makefile`, run `$(MAKE) -C <dependency-path> build` first and copy the contents of its already-built `dist/build/` (not its whole `dist/` output, so its own zip is not carried along) into `dist/build/dist/<dependency-name>/`; if it does not, create `dist/build/dist/<dependency-name>/` and copy only its bare `SKILL.md` into it. Using the same `dist/build/dist/<dependency-name>/` shape in both cases keeps the bundle consistent regardless of whether the dependency is itself bundling-enabled, and — because the copied subtree carries its own already-rewritten links unchanged — nested transitive dependencies resolve correctly with no further rewriting. After staging, `build` MUST rewrite the original cross-package reference inside the copied `SKILL.md` (per rule `05-preserve-relative-paths`) to `dist/<dependency-name>/SKILL.md` (relative from inside `dist/build/`). A minimal illustrative pattern:
|
|
41
|
+
|
|
42
|
+
```makefile
|
|
43
|
+
DEPS := ../shared-skill ../another-skill
|
|
44
|
+
BUILD := dist/build
|
|
45
|
+
|
|
46
|
+
build: clean
|
|
47
|
+
mkdir -p $(BUILD)
|
|
48
|
+
cp SKILL.md $(BUILD)/
|
|
49
|
+
@for d in $(DEPS); do \
|
|
50
|
+
name=$$(basename $$d); \
|
|
51
|
+
mkdir -p $(BUILD)/dist/$$name; \
|
|
52
|
+
if [ -f $$d/Makefile ]; then \
|
|
53
|
+
$(MAKE) -C $$d build; \
|
|
54
|
+
cp -R $$d/dist/build/. $(BUILD)/dist/$$name/; \
|
|
55
|
+
else \
|
|
56
|
+
cp $$d/SKILL.md $(BUILD)/dist/$$name/; \
|
|
57
|
+
fi; \
|
|
58
|
+
sed -i.bak "s#$$d/SKILL.md#dist/$$name/SKILL.md#g" $(BUILD)/SKILL.md && rm -f $(BUILD)/SKILL.md.bak; \
|
|
59
|
+
done
|
|
60
|
+
|
|
61
|
+
test: build
|
|
62
|
+
clean:
|
|
63
|
+
rm -rf dist
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### 07-dependency-must-have-own-makefile
|
|
67
|
+
A skill that is itself listed as another skill's bundling dependency, and that has cross-skill references of its own, MUST have its own bundling `Makefile`. Without one, only its bare `SKILL.md` can be copied and its own references cannot be resolved automatically. This is not mechanically lint-enforceable; authors MUST self-check it when wiring a dependency into another skill's `Makefile`, and a `make test` run that exercises every resolved reference is the practical backstop for catching a violation.
|
|
68
|
+
|
|
69
|
+
#### 08-no-cycle-detection
|
|
70
|
+
The recursive delegation described in rule `06-recursive-delegation` has no cycle detection. Authors MUST NOT introduce circular bundling dependencies between skills, since that would cause unbounded recursive `make build` invocations.
|
|
71
|
+
|
|
72
|
+
#### 09-standard-targets
|
|
73
|
+
The bundling `Makefile` MUST expose `build`, `test`, and `clean` targets, mirroring the repository root `Makefile` convention. `clean` MUST remove only its own `dist/` and MUST NOT cascade into dependency skills' own `dist/` folders. `test` SHOULD cascade into each bundling-enabled dependency's own `test` target and SHOULD verify the skill still works from its bundled `dist/` output.
|
|
74
|
+
|
|
75
|
+
#### 10-zip-artifact
|
|
76
|
+
`make build` SHOULD also produce a single zip archive of the complete `dist/build/` tree (which already includes every bundled dependency folder from rule `06-recursive-delegation`) as `dist/<skill-name>.zip`. Since `dist/build/` is a subdirectory of `dist/`, the archive naturally cannot include itself: create it directly, for example with `cd dist/build && zip -rq ../<skill-name>.zip .`.
|
|
77
|
+
|
|
78
|
+
#### 11-build-depends-on-clean
|
|
79
|
+
The `build` target MUST depend on the `clean` target (`build: clean`) so every build starts from a clean `dist/`, instead of duplicating `clean`'s removal logic inline.
|
|
80
|
+
|
|
81
|
+
## References
|
|
82
|
+
|
|
83
|
+
- [_core-adr-policy-001 - XDRS standards](001-xdrs-standards.md)
|
|
84
|
+
- [_core-adr-policy-003 - Skill standards](003-skill-standards.md)
|
|
85
|
+
- [_core-adr-policy-008 - Policy structured standards](008-policy-structured-standards.md)
|
|
@@ -4,13 +4,50 @@ description: >
|
|
|
4
4
|
Compiles or updates any scope declaring `scope-type: compiled` from its configured external sources. Reads compilation meta-policies to discover sources, fetches content (git clone, local copy, or web scrape), plans policy changes, migrates policies one at a time with structured format, `## Source` sections, and `**compilation-note:**` markers, then runs lint and review. Documents source inconsistencies without inventing fixes. Activate when the user asks to compile, update, sync, refresh, or recompile a compiled scope.
|
|
5
5
|
metadata:
|
|
6
6
|
author: flaviostutz
|
|
7
|
-
version: "1.0"
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
updated: 2026-09-19
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
## Overview
|
|
11
12
|
|
|
12
13
|
Performs a full compilation cycle for any scope declaring `scope-type: compiled`: discovers compilation meta-policies across all type folders, fetches sources into a temporary directory, plans which policies to create, update, or remove, migrates them one at a time with full source traceability, runs lint and review, and documents any inconsistencies found in the source. Works for both initial compilation and re-compilation (updates). Requires `_core-adr-policy-019-compiled-scope-type` to be present in the workspace.
|
|
13
14
|
|
|
15
|
+
### Inputs
|
|
16
|
+
|
|
17
|
+
#### Required
|
|
18
|
+
|
|
19
|
+
- Name of the compiled scope to sync.
|
|
20
|
+
|
|
21
|
+
#### Optional
|
|
22
|
+
|
|
23
|
+
- None.
|
|
24
|
+
|
|
25
|
+
### Outputs
|
|
26
|
+
|
|
27
|
+
#### Contents
|
|
28
|
+
|
|
29
|
+
- Updated compiled scope, linted and reviewed.
|
|
30
|
+
|
|
31
|
+
#### Changes
|
|
32
|
+
|
|
33
|
+
- Policy files created, updated, or removed.
|
|
34
|
+
|
|
35
|
+
### Halt Conditions
|
|
36
|
+
|
|
37
|
+
- No local meta-policy found in the scope.
|
|
38
|
+
- Scope does not declare scope-type: compiled.
|
|
39
|
+
- A source cannot be fetched or converted.
|
|
40
|
+
|
|
41
|
+
### User Interaction
|
|
42
|
+
|
|
43
|
+
- Confirmation of the CREATE/UPDATE/REMOVE plan before migrating.
|
|
44
|
+
|
|
45
|
+
### Runtime Requirements
|
|
46
|
+
|
|
47
|
+
- Network/git access for remote sources.
|
|
48
|
+
- `uvx markitdown` for non-Markdown source conversion, if needed.
|
|
49
|
+
- `npx @playwright/cli` as a web-scraping fallback.
|
|
50
|
+
|
|
14
51
|
## Instructions
|
|
15
52
|
|
|
16
53
|
### Phase 0: Prerequisites Gate
|
|
@@ -119,3 +156,17 @@ After writing each policy:
|
|
|
119
156
|
- Inconsistencies documented (with file path).
|
|
120
157
|
- Any sources that could not be fetched.
|
|
121
158
|
- Lint and review pass/fail status.
|
|
159
|
+
|
|
160
|
+
## Anti-Patterns
|
|
161
|
+
|
|
162
|
+
- **Mistake:** Inventing content to fill gaps when source material is incomplete or ambiguous.
|
|
163
|
+
**Why it happens:** The agent wants to produce a "complete" policy and fills gaps with plausible-sounding text.
|
|
164
|
+
**Instead:** Transcribe faithfully, preserve ambiguities as-is, and record inconsistencies in Phase 7 instead of guessing.
|
|
165
|
+
|
|
166
|
+
- **Mistake:** Skipping the Phase 2 confirmation and migrating policies before the user approves the CREATE/UPDATE/REMOVE plan.
|
|
167
|
+
**Why it happens:** Momentum from prior compilations makes the plan feel obviously correct.
|
|
168
|
+
**Instead:** Always present the TODO list and wait for explicit confirmation before Phase 3.
|
|
169
|
+
|
|
170
|
+
- **Mistake:** Leaving the temporary `.tmp/compilation-[ts]/` directory behind after a run.
|
|
171
|
+
**Why it happens:** Phase 8 cleanup is easy to forget once the summary is reported.
|
|
172
|
+
**Instead:** Always remove the temporary directory as the first Phase 8 step, even on partial failures.
|
|
@@ -6,13 +6,46 @@ description: >
|
|
|
6
6
|
Also activate when you identify a need to check compliance with Policies during implementation.
|
|
7
7
|
metadata:
|
|
8
8
|
author: flaviostutz
|
|
9
|
-
version: "1.0"
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
updated: 2026-09-19
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
## Overview
|
|
13
14
|
|
|
14
15
|
Performs a structured review of code changes or files against the Policies in the repository, categorizing findings by severity and type, and reporting them without modifying any code.
|
|
15
16
|
|
|
17
|
+
### Inputs
|
|
18
|
+
|
|
19
|
+
#### Required
|
|
20
|
+
|
|
21
|
+
- A git diff, file set, or documents to review.
|
|
22
|
+
|
|
23
|
+
#### Optional
|
|
24
|
+
|
|
25
|
+
- Specific Policies or scope to focus on.
|
|
26
|
+
|
|
27
|
+
### Outputs
|
|
28
|
+
|
|
29
|
+
#### Contents
|
|
30
|
+
|
|
31
|
+
- Structured ERROR/WARNING findings report in chat.
|
|
32
|
+
|
|
33
|
+
#### Changes
|
|
34
|
+
|
|
35
|
+
- None.
|
|
36
|
+
|
|
37
|
+
### Halt Conditions
|
|
38
|
+
|
|
39
|
+
- A declared follows scope is missing or unreadable.
|
|
40
|
+
- A declared extends scope is missing or unreadable.
|
|
41
|
+
- A local meta-policy file exists but cannot be read.
|
|
42
|
+
- The declared scope-type has no governance policy.
|
|
43
|
+
|
|
44
|
+
### Runtime Requirements
|
|
45
|
+
|
|
46
|
+
- `git` available for diff-scoped reviews.
|
|
47
|
+
- `npx @mermaid-js/mermaid-cli` for Mermaid diagram checks.
|
|
48
|
+
|
|
16
49
|
## Instructions
|
|
17
50
|
|
|
18
51
|
### Phase 1: Code Gathering
|
|
@@ -112,10 +145,23 @@ Scope: [scope identifier]
|
|
|
112
145
|
- If no Policies apply to the scope, output "No applicable Policies found" and skip reporting.
|
|
113
146
|
- If a potential violation is in pre-existing code outside the diff, report it as WARNING only.
|
|
114
147
|
|
|
148
|
+
## Anti-Patterns
|
|
149
|
+
|
|
150
|
+
- **Mistake:** Reporting a finding based on general good-practice opinion with no specific Policy citation.
|
|
151
|
+
**Why it happens:** The reviewer conflates "seems wrong" with "violates a documented rule".
|
|
152
|
+
**Instead:** Drop any finding that cannot be traced to a specific rule in an Accepted Policy.
|
|
153
|
+
|
|
154
|
+
- **Mistake:** Skipping the prerequisites gate (follows/extends/local meta-policy checks) when the scope looks simple.
|
|
155
|
+
**Why it happens:** The gate feels like overhead for a quick review request.
|
|
156
|
+
**Instead:** Always run the full prerequisites gate first; a silent FAIL on a missing governance layer is safer than an unreliable PASS.
|
|
157
|
+
|
|
158
|
+
- **Mistake:** Editing the reviewed code directly to "just fix it" instead of only reporting findings.
|
|
159
|
+
**Why it happens:** Fixing feels faster than describing the fix.
|
|
160
|
+
**Instead:** This skill MUST NOT edit code; only report findings and suggested actions.
|
|
161
|
+
|
|
115
162
|
## References
|
|
116
163
|
|
|
117
164
|
- [_core-adr-policy-001 - XDRS standards](../../001-xdrs-standards.md)
|
|
118
165
|
- [_core-adr-policy-002 - Policy standards](../../002-policy-standards.md)
|
|
119
166
|
- [_core-adr-policy-003 - Skill standards](../../003-skill-standards.md)
|
|
120
167
|
- [_core-adr-policy-020 - Media and asset standards](../../020-media-and-asset-standards.md)
|
|
121
|
-
|
|
@@ -4,13 +4,42 @@ description: >
|
|
|
4
4
|
Creates a new article document following XDRS article standards: selects scope, type, subject, and number; then writes a focused synthetic text that combines and links multiple Policies, Research documents, and Skills around a topic. Activate this skill when the user asks to create, add, or write a new article, guide, or overview document within an XDRS project.
|
|
5
5
|
metadata:
|
|
6
6
|
author: flaviostutz
|
|
7
|
-
version: "1.0"
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
updated: 2026-09-19
|
|
8
9
|
---
|
|
9
10
|
|
|
10
11
|
## Overview
|
|
11
12
|
|
|
12
13
|
Guides the creation of a well-structured article by following `_core-adr-policy-004`, consulting `policy-standards` for every core element definition, researching the Policies, Research documents, and Skills to synthesize, and producing a concise document that serves as a navigable view without duplicating decision content.
|
|
13
14
|
|
|
15
|
+
### Inputs
|
|
16
|
+
|
|
17
|
+
#### Required
|
|
18
|
+
|
|
19
|
+
- A topic for the article.
|
|
20
|
+
|
|
21
|
+
#### Optional
|
|
22
|
+
|
|
23
|
+
- Target audience, scope, or XDRS elements to synthesize.
|
|
24
|
+
|
|
25
|
+
### Outputs
|
|
26
|
+
|
|
27
|
+
#### Contents
|
|
28
|
+
|
|
29
|
+
- A new article file.
|
|
30
|
+
|
|
31
|
+
#### Changes
|
|
32
|
+
|
|
33
|
+
- Index entry and back-references in synthesized documents.
|
|
34
|
+
|
|
35
|
+
### Halt Conditions
|
|
36
|
+
|
|
37
|
+
- No relevant Policies, Research, or Skills exist to synthesize.
|
|
38
|
+
|
|
39
|
+
### User Interaction
|
|
40
|
+
|
|
41
|
+
- Clarification of target audience when unspecified.
|
|
42
|
+
|
|
14
43
|
## Instructions
|
|
15
44
|
|
|
16
45
|
### Phase 0: Clarify Intent
|
|
@@ -151,6 +180,22 @@ Follow the lint verification steps in `.xdrs/_core/adrs/principles/skills/.asset
|
|
|
151
180
|
- MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
|
|
152
181
|
- MUST defer to active and applicable Policies when article synthesis conflicts with them.
|
|
153
182
|
|
|
183
|
+
## Anti-Patterns
|
|
184
|
+
|
|
185
|
+
- **Mistake:** Reproducing decision text verbatim from a Policy instead of summarizing and linking to it.
|
|
186
|
+
**Why it happens:** Copying feels safer/more accurate than paraphrasing.
|
|
187
|
+
**Instead:** Articles are views, not decisions; summarize and link back to the authoritative Policy.
|
|
188
|
+
|
|
189
|
+
- **Mistake:** Writing an article that spans multiple unrelated subjects without splitting it into chapters.
|
|
190
|
+
**Why it happens:** A broad topic feels easier to cover in one long document.
|
|
191
|
+
**Instead:** Once content approaches ~2000 words or covers distinct sub-topics, split into separate chapter articles per Phase 5/Edge Cases guidance.
|
|
192
|
+
|
|
193
|
+
- **Mistake:** Skipping Phase 0 clarifying questions (topic/audience/scope) because the request seems clear.
|
|
194
|
+
**Why it happens:** The request looks self-explanatory, so asking feels like unnecessary friction.
|
|
195
|
+
**Instead:** Always ask the mandatory Phase 0 questions in a single batch before reading standards; audience in particular is easy to assume wrongly.
|
|
196
|
+
|
|
197
|
+
## References
|
|
198
|
+
|
|
154
199
|
- [_core-adr-policy-004 - Article standards](../../004-article-standards.md)
|
|
155
200
|
- [_core-adr-policy-006 - Research standards](../../006-research-standards.md)
|
|
156
201
|
- [_core-adr-policy-001 - XDRS standards](../../001-xdrs-standards.md)
|
|
@@ -6,13 +6,42 @@ description: >
|
|
|
6
6
|
Activate this skill when the user asks to create, add, or write an initiative, plan, project plan, roadmap, or execution plan within an XDRS project.
|
|
7
7
|
metadata:
|
|
8
8
|
author: flaviostutz
|
|
9
|
-
version: "1.0"
|
|
9
|
+
version: "1.0.0"
|
|
10
|
+
updated: 2026-09-19
|
|
10
11
|
---
|
|
11
12
|
|
|
12
13
|
## Overview
|
|
13
14
|
|
|
14
15
|
Guides the creation of a well-structured initiative document by following `_core-adr-policy-007`, consulting `xdrs-core` for every core element definition, researching related Policies and existing initiatives, and producing a focused execution document that connects to the decisions, research, and skills it relates to.
|
|
15
16
|
|
|
17
|
+
### Inputs
|
|
18
|
+
|
|
19
|
+
#### Required
|
|
20
|
+
|
|
21
|
+
- A problem statement and proposed solution.
|
|
22
|
+
|
|
23
|
+
#### Optional
|
|
24
|
+
|
|
25
|
+
- Expected timeline or milestones.
|
|
26
|
+
|
|
27
|
+
### Outputs
|
|
28
|
+
|
|
29
|
+
#### Contents
|
|
30
|
+
|
|
31
|
+
- A new initiative file.
|
|
32
|
+
|
|
33
|
+
#### Changes
|
|
34
|
+
|
|
35
|
+
- Index entry and back-references in related documents.
|
|
36
|
+
|
|
37
|
+
### Halt Conditions
|
|
38
|
+
|
|
39
|
+
- Rejects an expected end date beyond 2 years.
|
|
40
|
+
|
|
41
|
+
### User Interaction
|
|
42
|
+
|
|
43
|
+
- Clarifying questions about stakeholders and constraints, one batch.
|
|
44
|
+
|
|
16
45
|
## Instructions
|
|
17
46
|
|
|
18
47
|
### Phase 0: Scope Placement and Prerequisites Gate — MUST complete before writing
|
|
@@ -32,7 +61,6 @@ Guides the creation of a well-structured initiative document by following `_core
|
|
|
32
61
|
- Typical questions cover: the problem being solved, the proposed solution, the expected timeline, the scope, the key stakeholders, and any known constraints or risks.
|
|
33
62
|
- Do NOT ask questions whose answers are already clear from context.
|
|
34
63
|
|
|
35
|
-
|
|
36
64
|
### Phase 2: Select Scope, Type, and Subject
|
|
37
65
|
|
|
38
66
|
Consult `001-xdrs-standards` while making each choice in this phase. The summaries below are orientation only; when any detail is unclear, the standard decides.
|
|
@@ -154,6 +182,20 @@ Follow the lint verification steps in `.xdrs/_core/adrs/principles/skills/.asset
|
|
|
154
182
|
- If an initiative is fully implemented, delete it and confirm that all lasting outputs (Decisions, Skills, Articles, etc.) are properly linked and indexed.
|
|
155
183
|
- If the user asks for an initiative that is really just a decision, guide them to create a Policy instead.
|
|
156
184
|
|
|
185
|
+
## Anti-Patterns
|
|
186
|
+
|
|
187
|
+
- **Mistake:** Writing a heavy, generic project-management document instead of focusing on problem/solution/approach.
|
|
188
|
+
**Why it happens:** Initiative templates have many optional sections, tempting the author to fill all of them.
|
|
189
|
+
**Instead:** Only fill optional sections when they add real value; keep the document focused and ephemeral.
|
|
190
|
+
|
|
191
|
+
- **Mistake:** Leaving a completed initiative in the repository indefinitely instead of deleting it after implementation.
|
|
192
|
+
**Why it happens:** Deleting a finished document feels like discarding useful history.
|
|
193
|
+
**Instead:** Initiatives are ephemeral; delete them after full implementation once outputs are linked/indexed elsewhere.
|
|
194
|
+
|
|
195
|
+
- **Mistake:** Setting an Expected end date more than 2 years out instead of splitting the initiative.
|
|
196
|
+
**Why it happens:** A large effort feels like one continuous initiative.
|
|
197
|
+
**Instead:** Break initiatives whose scope exceeds 2 years into multiple smaller, independently actionable initiatives.
|
|
198
|
+
|
|
157
199
|
## References
|
|
158
200
|
|
|
159
201
|
- [_core-adr-policy-001 - XDRS standards](../../001-xdrs-standards.md)
|
|
@@ -5,13 +5,42 @@ description: >
|
|
|
5
5
|
Activate this skill when the user asks to create, add, or write a new Policy (ADR, BDR, or EDR).
|
|
6
6
|
metadata:
|
|
7
7
|
author: flaviostutz
|
|
8
|
-
version: "1.0"
|
|
8
|
+
version: "1.0.0"
|
|
9
|
+
updated: 2026-09-19
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
## Overview
|
|
12
13
|
|
|
13
14
|
Guides the creation of a well-structured Policy by following the standards in `_core-adr-policy-001`, consulting `policy-standards` for every core element definition, researching existing policies for conflicts, checking redundancy across related artifacts, and iterating until the document is concise, decision-focused, and clear about when the decision should be used.
|
|
14
15
|
|
|
16
|
+
### Inputs
|
|
17
|
+
|
|
18
|
+
#### Required
|
|
19
|
+
|
|
20
|
+
- A decision topic to document.
|
|
21
|
+
|
|
22
|
+
#### Optional
|
|
23
|
+
|
|
24
|
+
- Preferred Policy type, if already known.
|
|
25
|
+
|
|
26
|
+
### Outputs
|
|
27
|
+
|
|
28
|
+
#### Contents
|
|
29
|
+
|
|
30
|
+
- A new Policy file.
|
|
31
|
+
|
|
32
|
+
#### Changes
|
|
33
|
+
|
|
34
|
+
- Index entries added in the relevant scope.
|
|
35
|
+
|
|
36
|
+
### Halt Conditions
|
|
37
|
+
|
|
38
|
+
- Decision conflicts with an existing Policy, unresolved.
|
|
39
|
+
|
|
40
|
+
### User Interaction
|
|
41
|
+
|
|
42
|
+
- Clarifying questions when the decision topic is ambiguous.
|
|
43
|
+
|
|
15
44
|
## Instructions
|
|
16
45
|
|
|
17
46
|
### Phase 0: Scope Placement and Prerequisites Gate — MUST complete before writing
|
|
@@ -187,6 +216,20 @@ Follow the lint verification steps in `.xdrs/_core/adrs/principles/skills/.asset
|
|
|
187
216
|
- MUST keep scope `_local` unless the user explicitly states otherwise.
|
|
188
217
|
- MUST NOT create documents in external scopes (scopes whose files appear in the workspace root `.filedist.lock`).
|
|
189
218
|
|
|
219
|
+
## Anti-Patterns
|
|
220
|
+
|
|
221
|
+
- **Mistake:** Creating a new Policy that duplicates a decision already captured elsewhere instead of extending or linking it.
|
|
222
|
+
**Why it happens:** Writing a fresh Policy feels faster than researching existing ones in Phase 4.
|
|
223
|
+
**Instead:** Always research related Policies first; extend or reference an existing decision rather than duplicating it.
|
|
224
|
+
|
|
225
|
+
- **Mistake:** Using lowercase "must"/"should" for normative requirements instead of uppercase BCP 14 keywords.
|
|
226
|
+
**Why it happens:** Natural writing style favors lowercase, and the distinction feels pedantic.
|
|
227
|
+
**Instead:** Use uppercase MUST/SHOULD/MAY for every normative statement in Details and Decision Outcome; verify in Phase 7.
|
|
228
|
+
|
|
229
|
+
- **Mistake:** Skipping the Phase 0 prerequisites gate for a scope that "obviously" has no follows/extends chain.
|
|
230
|
+
**Why it happens:** The gate feels unnecessary when the scope looks simple.
|
|
231
|
+
**Instead:** Always run the prerequisites gate before writing; a missing governance layer produces an unreliable Policy.
|
|
232
|
+
|
|
190
233
|
## References
|
|
191
234
|
|
|
192
235
|
- [_core-adr-policy-001 - XDRS standards](../../001-xdrs-standards.md)
|