xdrs-core 0.53.0 → 0.53.1
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.
|
@@ -172,7 +172,7 @@ Rules:
|
|
|
172
172
|
- `### 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`.
|
|
173
173
|
- `### 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.
|
|
174
174
|
- `### Runtime Requirements` is OPTIONAL: free-form bullets for tooling, network, or environment prerequisites beyond the LLM itself; omit the section entirely when none apply.
|
|
175
|
-
- Every bullet in `#### Required`, `#### Optional`, `#### Contents`, `#### Changes`, `### Halt Conditions`, and `### User Interaction` MUST be under
|
|
175
|
+
- Every bullet in `#### Required`, `#### Optional`, `#### Contents`, `#### Changes`, `### Halt Conditions`, and `### User Interaction` MUST be under 20 words, or the section MUST contain a single "None" bullet instead.
|
|
176
176
|
- `## 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.
|
|
177
177
|
- Key recommendations MAY be tagged `[PROVEN]`, `[RECOMMENDED]`, or `[EXPERIMENTAL]` when a skill offers several viable approaches at different confidence levels.
|
|
178
178
|
- For diagram format preferences and non-Markdown asset rules, see [`_core-adr-policy-020`](020-media-and-asset-standards.md).
|
|
@@ -111,29 +111,29 @@ metadata:
|
|
|
111
111
|
|
|
112
112
|
#### Required
|
|
113
113
|
|
|
114
|
-
[Bare-minimum bullets needed to invoke the skill, or a single "None" bullet. Each <
|
|
114
|
+
[Bare-minimum bullets needed to invoke the skill, or a single "None" bullet. Each <20 words.]
|
|
115
115
|
|
|
116
116
|
#### Optional
|
|
117
117
|
|
|
118
|
-
[Extra helpful-context bullets, or a single "None" bullet. Each <
|
|
118
|
+
[Extra helpful-context bullets, or a single "None" bullet. Each <20 words.]
|
|
119
119
|
|
|
120
120
|
### Outputs
|
|
121
121
|
|
|
122
122
|
#### Contents
|
|
123
123
|
|
|
124
|
-
[End-objective files/chat text produced, or a single "None" bullet. Each <
|
|
124
|
+
[End-objective files/chat text produced, or a single "None" bullet. Each <20 words. Append "(<N words)" or "(uncapped: <reason>)" to natural-language items not capped in a template or step, e.g. "Release notes (<300 words)". Code and structured data get no marker.]
|
|
125
125
|
|
|
126
126
|
#### Changes
|
|
127
127
|
|
|
128
|
-
[End-objective external system mutations, or a single "None" bullet. Each <
|
|
128
|
+
[End-objective external system mutations, or a single "None" bullet. Each <20 words.]
|
|
129
129
|
|
|
130
130
|
### Halt Conditions
|
|
131
131
|
|
|
132
|
-
[This skill's specific stop-before-completing triggers, or a single "None" bullet. Each <
|
|
132
|
+
[This skill's specific stop-before-completing triggers, or a single "None" bullet. Each <20 words.]
|
|
133
133
|
|
|
134
134
|
### User Interaction
|
|
135
135
|
|
|
136
|
-
[Optional. Human-in-the-loop exchanges during execution: clarifying questions or approval gates, or a single "None" bullet. Each <
|
|
136
|
+
[Optional. Human-in-the-loop exchanges during execution: clarifying questions or approval gates, or a single "None" bullet. Each <20 words. Omit the whole section if none apply.]
|
|
137
137
|
|
|
138
138
|
### Runtime Requirements
|
|
139
139
|
|
|
@@ -189,7 +189,7 @@ Before writing files, verify:
|
|
|
189
189
|
4. **Duplication**: Does this overlap an existing skill? If yes, revise.
|
|
190
190
|
5. **References**: Are all related XDRs and skills linked, including the cases where the skill operationalizes multiple XDRs?
|
|
191
191
|
6. **Anti-Patterns**: Does the skill include at least 3 genuine, domain-specific `## Anti-Patterns` entries (not generic filler)?
|
|
192
|
-
7. **Required sections**: Does `## Overview` contain nested `### Inputs` (Required/Optional bullets), `### Outputs` (Contents/Changes bullets), and `### Halt Conditions` listing this skill's specific stop triggers — each bullet under
|
|
192
|
+
7. **Required sections**: Does `## Overview` contain nested `### Inputs` (Required/Optional bullets), `### Outputs` (Contents/Changes bullets), and `### Halt Conditions` listing this skill's specific stop triggers — each bullet under 20 words or a single "None"?
|
|
193
193
|
8. **Meta-policy compliance**: Run the shared module at `.xdrs/_core/adrs/principles/skills/.assets/meta-policy-compliance.md`. Substitute `[DOCUMENT]` with `skill`.
|
|
194
194
|
9. **Output caps**: Does every natural-language content the skill generates (files, messages, questions, summaries, external posts) have exactly one "<N words" cap or "(uncapped: <reason>)" marker, with code and structured data unmarked?
|
|
195
195
|
|
package/lib/lint.js
CHANGED
|
@@ -1443,7 +1443,7 @@ function lintSkillNestedSubsections(content, filePath, errors) {
|
|
|
1443
1443
|
|
|
1444
1444
|
/**
|
|
1445
1445
|
* Validates a bullet-list section's item shape: either a single "None" bullet, or one-or-more
|
|
1446
|
-
* bullets each under
|
|
1446
|
+
* bullets each under 20 words, per _core-adr-policy-003. No-op when the range has no bullets
|
|
1447
1447
|
* at all (an empty required section is reported by other checks).
|
|
1448
1448
|
*/
|
|
1449
1449
|
function lintBulletWordCountSection(lines, ignoredLines, start, end, label, filePath, errors) {
|
|
@@ -1468,14 +1468,14 @@ function lintBulletWordCountSection(lines, ignoredLines, start, end, label, file
|
|
|
1468
1468
|
|
|
1469
1469
|
for (const bullet of bullets) {
|
|
1470
1470
|
const wordCount = countWords(bullet);
|
|
1471
|
-
if (wordCount >=
|
|
1472
|
-
errors.push(`${label} bullet must be under
|
|
1471
|
+
if (wordCount >= 20) {
|
|
1472
|
+
errors.push(`${label} bullet must be under 20 words or a single "None" (found ${wordCount}): ${toDisplayPath(filePath)} [_core-adr-policy-003]`);
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
|
|
1477
1477
|
/**
|
|
1478
|
-
* Validates the item word-count rule (single "None" bullet, or one-or-more sub-
|
|
1478
|
+
* Validates the item word-count rule (single "None" bullet, or one-or-more sub-20-word
|
|
1479
1479
|
* bullets) across "### Inputs" -> "#### Required"/"#### Optional", "### Outputs" ->
|
|
1480
1480
|
* "#### Contents"/"#### Changes", "### Halt Conditions", and "### User Interaction" (only
|
|
1481
1481
|
* when present, since it is optional). All 4 subsections live inside "## Overview", per
|
package/lib/lint.test.js
CHANGED
|
@@ -457,23 +457,23 @@ test('passes SKILL.md with valid None bullets in Inputs, Outputs, and Halt Condi
|
|
|
457
457
|
|
|
458
458
|
const result = lintWorkspace(workspaceRoot);
|
|
459
459
|
|
|
460
|
-
expect(result.errors.join('\n')).not.toContain('must be under
|
|
460
|
+
expect(result.errors.join('\n')).not.toContain('must be under 20 words or a single "None"');
|
|
461
461
|
});
|
|
462
462
|
|
|
463
|
-
test('reports SKILL.md bullet over
|
|
463
|
+
test('reports SKILL.md bullet over 20 words in #### Required', () => {
|
|
464
464
|
const workspaceRoot = createWorkspace('skill-required-bullet-too-long', {
|
|
465
465
|
'.xdrs/index.md': rootIndex(),
|
|
466
466
|
'.xdrs/_local/adrs/index.md': localAdrIndex([
|
|
467
467
|
'- [check-links](principles/skills/check-links/SKILL.md) - Check links'
|
|
468
468
|
]),
|
|
469
469
|
'.xdrs/_local/adrs/principles/skills/check-links/SKILL.md': fullSkillDocument({
|
|
470
|
-
inputsRequired: '- A file path that is way too long to fit under the
|
|
470
|
+
inputsRequired: '- A file path description that is way too long to fit under the twenty word limit because it keeps adding extra words',
|
|
471
471
|
}),
|
|
472
472
|
});
|
|
473
473
|
|
|
474
474
|
const result = lintWorkspace(workspaceRoot);
|
|
475
475
|
|
|
476
|
-
expect(result.errors.join('\n')).toContain('Skill "### Inputs" -> "#### Required" bullet must be under
|
|
476
|
+
expect(result.errors.join('\n')).toContain('Skill "### Inputs" -> "#### Required" bullet must be under 20 words');
|
|
477
477
|
});
|
|
478
478
|
|
|
479
479
|
test('passes SKILL.md when both optional sections are omitted', () => {
|
|
@@ -535,20 +535,20 @@ test('passes SKILL.md with a long free-form Runtime Requirements bullet', () =>
|
|
|
535
535
|
expect(result.errors.join('\n')).not.toContain('### Runtime Requirements');
|
|
536
536
|
});
|
|
537
537
|
|
|
538
|
-
test('reports SKILL.md User Interaction bullet over
|
|
538
|
+
test('reports SKILL.md User Interaction bullet over 20 words', () => {
|
|
539
539
|
const workspaceRoot = createWorkspace('skill-user-interaction-bullet-too-long', {
|
|
540
540
|
'.xdrs/index.md': rootIndex(),
|
|
541
541
|
'.xdrs/_local/adrs/index.md': localAdrIndex([
|
|
542
542
|
'- [check-links](principles/skills/check-links/SKILL.md) - Check links'
|
|
543
543
|
]),
|
|
544
544
|
'.xdrs/_local/adrs/principles/skills/check-links/SKILL.md': fullSkillDocument({
|
|
545
|
-
userInteraction: '- A clarifying question that is much too long to fit under the
|
|
545
|
+
userInteraction: '- A clarifying question that is much too long to fit under the twenty word limit because it keeps adding extra words',
|
|
546
546
|
}),
|
|
547
547
|
});
|
|
548
548
|
|
|
549
549
|
const result = lintWorkspace(workspaceRoot);
|
|
550
550
|
|
|
551
|
-
expect(result.errors.join('\n')).toContain('Skill "### User Interaction" bullet must be under
|
|
551
|
+
expect(result.errors.join('\n')).toContain('Skill "### User Interaction" bullet must be under 20 words');
|
|
552
552
|
});
|
|
553
553
|
|
|
554
554
|
test('reports SKILL.md top-level sections out of template order', () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xdrs-core",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.1",
|
|
4
4
|
"description": "XDRS (eXtensible Decision Record System): a framework to structure, compile and distribute Architectural (ADR), Business (BDR), and Engineering (EDR) decision records contents so that AI agents and humans can reliably find and use them with hierarchical scopes and controlled rollout in the format of distributable versioned packages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|