xdrs-core 0.54.0 → 0.56.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.
@@ -28,6 +28,7 @@ Foundational standards, principles, and guidelines.
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
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
30
30
  - [_core-adr-policy-022](principles/022-scope-activation.md) - **Scope activation** — How installed scopes are listed in the root index, activated, narrowed, or disabled, and when they become read-only
31
+ - [_core-adr-policy-023](principles/023-skill-runtime-standards.md) - **Skill runtime standards** — How skills place work files under .tmp, halt, ask for clarification, and cap generated content
31
32
 
32
33
  ## Skills
33
34
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: _core-adr-policy-003-skill-standards
3
- description: Defines skill package standards including structure, SKILL.md format, co-location with XDRS packages, and default placement of runtime work files. Use when creating or reviewing skills.
3
+ description: Defines skill package standards including structure, SKILL.md format, script standards, and co-location with XDRS packages. Use when creating or reviewing skills.
4
4
  apply-to: All skill packages
5
5
  valid-from: 2025-01-01
6
6
  ---
@@ -184,45 +184,14 @@ Rules:
184
184
  **Script standards**
185
185
 
186
186
  When a skill includes `scripts/`:
187
- - Each script MUST declare its runtime/interpreter at the top (shebang or equivalent header comment).
188
187
  - SHOULD use the language already used by the consuming project when known, rather than mandating one language repo-wide.
189
188
  - MUST avoid non-essential external dependencies, or document install steps in `SKILL.md` when unavoidable.
190
189
  - SHOULD support both human-readable and machine-readable (JSON) output when producing analysis or report output.
191
190
  - SHOULD stay single-purpose.
192
191
 
193
- **Work files**
192
+ **Runtime behavior**
194
193
 
195
- Files a skill creates while running MUST follow this default unless the skill or user sets another location:
196
- - `.tmp/[skill-name]-[YYYYMMDDHHMMSS]/` at the workspace root (local start time), created lazily, suffixed `-2`, `-3`... if taken, holds final outputs.
197
- - Its `.work/` holds intermediate files (caches, staging); `.work/scripts/` holds ad-hoc scripts generated at runtime.
198
- - Keep it after the run. Workspaces SHOULD gitignore `.tmp/`; skills MUST NOT edit `.gitignore` for it.
199
- - MUST NOT write secrets there; use environment or harness, or the OS temp dir (deleted after use) when a file is unavoidable.
200
- - On a read-only workspace, use the same layout under the OS temp dir.
201
- - When the dir was created, even on halt or failure, end the final chat message with `results-path: [dir]/`.
202
- - Skills that create files MUST restate the parts of this layout they use in their own `## Instructions`, to run standalone.
203
-
204
- **Quality gate**
205
-
206
- 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.
207
-
208
- **Clarify First**
209
-
210
- 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.
211
-
212
- **Halt behavior**
213
-
214
- 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.
215
-
216
- **Generated content caps**
217
-
218
- Every natural-language content a skill generates MUST declare a hard word cap written exactly as `<N words`, whether a human or an agent executes the skill. This covers files, templates, reports, intermediate chat messages, HITL questions, final summaries, and text posted to external systems (e.g., PR comments, commit messages).
219
- - Exempt, with no marker: code (including its comments), structured data (JSON, YAML, tracking files), verbatim copies, and frontmatter fields already limited in characters by a spec or Policy.
220
- - Caps MUST be in words; other limits MAY coexist but never replace them.
221
- - Declare each cap once: in the template placeholder (including templates in `references/` or `.assets/`), else in the Instructions step producing the content, else in its `#### Contents` bullet.
222
- - A blanket statement MAY cover a content class (e.g., all intermediate messages); a more specific cap overrides it.
223
- - Write the number inline; a Policy reference is optional.
224
- - Content whose size cannot be bounded MUST be marked `(uncapped: <reason>)`, the reason explaining why.
225
- - Caps are hard: condense, or split into another item only where the skill allows it; never split one logical item across messages. An explicit user request lifts the cap for that item only.
194
+ How a skill behaves while running (work files, quality gate, clarifying questions, halting, generated content caps) is defined in [`_core-adr-policy-023`](023-skill-runtime-standards.md).
226
195
 
227
196
  **Validation**
228
197
 
@@ -239,6 +208,7 @@ skills-ref validate .xdrs/[scope]/[type]/[subject]/skills/[skill-name]
239
208
  - [skills-ref validation library](https://github.com/agentskills/agentskills/tree/main/skills-ref)
240
209
  - [_core-adr-policy-001 - XDRS standards](001-xdrs-standards.md)
241
210
  - [_core-adr-policy-004 - Article standards](004-article-standards.md)
211
+ - [_core-adr-policy-023 - Skill runtime standards](023-skill-runtime-standards.md)
242
212
  - [_core-adr-policy-005 - Semantic versioning for XDRS packages](005-semantic-versioning-for-xdrs-packages.md)
243
213
  - [_core-adr-policy-006 - Research standards](006-research-standards.md)
244
214
  - [_core-adr-policy-021 - Skill bundling](021-skill-bundling.md)
@@ -114,7 +114,7 @@ All access control implementations MUST enforce the principle of least privilege
114
114
 
115
115
  Unless a meta-policy declares `Source storage: temporary`, fetched and selected source content (rule 13) MUST be persisted under `[type]/principles/.assets/sources/[name]/`, sibling to the governing meta-policy, where `[name]` is the source's slug from its `## Sources` bullet. This location is shared across every subject compiled under that meta-policy's type folder; it is not duplicated per subject. Persisted source content MUST be committed to version control and MUST NOT be gitignored.
116
116
 
117
- When `Source storage: temporary` is declared, bulk fetched content MUST instead be written only to the compilation execution dir's `.work/staging/` (see Work files in `_core-adr-policy-003`) and MUST NOT be persisted under `.assets/sources/`.
117
+ When `Source storage: temporary` is declared, bulk fetched content MUST instead be written only to `.tmp/compile-scope/.work/staging/[name]/` (see Work files in `_core-adr-policy-023`) and MUST NOT be persisted under `.assets/sources/`.
118
118
 
119
119
  Regardless of storage mode, a tracking file `.assets/sources/[name]/source.md` MUST always be created and kept up to date, with the following format:
120
120
 
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: _core-adr-policy-023-skill-runtime-standards
3
+ description: Defines how skills behave at runtime - where they place work files, when to halt or ask the user, quality gate before creating a skill, and word caps for generated content. Use when authoring or reviewing skill instructions.
4
+ apply-to: All skill packages
5
+ valid-from: 2026-10-08
6
+ ---
7
+
8
+ # _core-adr-policy-023: Skill runtime standards
9
+
10
+ ## Context and Problem Statement
11
+
12
+ Skills run for humans and AI agents in many workspaces. Without shared runtime rules, each skill invents its own place for generated files, its own halting behavior, and its own output sizes, which litters workspaces, risks leaking secrets, and makes skills unpredictable.
13
+
14
+ How should a skill behave while running, so that its files, questions, stops and generated content are consistent across skills?
15
+
16
+ ## Decision Outcome
17
+
18
+ **A shared runtime contract for every skill, separate from the skill package format**
19
+
20
+ Package structure, `SKILL.md` format, scripts and validation are defined in [`_core-adr-policy-003`](003-skill-standards.md). This Policy defines only what a skill does while it runs.
21
+
22
+ ### Details
23
+
24
+ **Work files**
25
+
26
+ Files a skill creates while running MUST follow this layout unless the skill or the user sets another location:
27
+ - Each skill owns `.tmp/[skill-name]/` at the workspace root, created lazily. Workspaces SHOULD gitignore `.tmp/`; skills MUST NOT edit `.gitignore` for it.
28
+ - Skills MUST NOT store files directly in `.tmp/[skill-name]/`. Final outputs go in one run folder per run, `.tmp/[skill-name]/[run-name]/`.
29
+ - `[run-name]` is a short name describing the run (e.g. `report-anthony`), using only lowercase letters, digits and hyphens. When the run has no natural name, use the local start time `[YYYYMMDDHHMMSS]`. When the name is taken, append `-2`, `-3`...
30
+ - `.tmp/[skill-name]/.work/` holds reusable intermediate files such as caches and staging. It is safe to delete at any time. Skills MUST re-check freshness before reusing its content and MUST namespace content per input (e.g. `.work/staging/[input-name]/`). Clearing and refetching an input is not safe while another run uses the same input.
31
+ - Skills that produce no final outputs use only `.work/`, with no run folder.
32
+ - Temporary scripts and other throwaway files MUST go in the OS temp dir and be deleted when the run ends. Secrets MUST NOT be written anywhere else and MUST always be deleted.
33
+ - A skill that uses another skill's output MUST receive the source run folder path as input, read it in place and never change data there. When changes are needed, it copies the files into its own run folder.
34
+ - On a read-only workspace, use the same layout under the OS temp dir.
35
+ - Keep run folders after the run. When a run folder was created, even on halt or failure, end the final chat message with `results-path: [dir]/`.
36
+ - Skills that create files MUST restate the parts of this layout they use in their own `## Instructions`, to run standalone.
37
+
38
+ **Quality gate**
39
+
40
+ 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.
41
+
42
+ **Clarify First**
43
+
44
+ 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.
45
+
46
+ **Halt behavior**
47
+
48
+ 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.
49
+
50
+ **Generated content caps**
51
+
52
+ Every natural-language content a skill generates MUST declare a hard word cap written exactly as `<N words`, whether a human or an agent executes the skill. This covers files, templates, reports, intermediate chat messages, HITL questions, final summaries, and text posted to external systems (e.g., PR comments, commit messages).
53
+ - Exempt, with no marker: code (including its comments), structured data (JSON, YAML, tracking files), verbatim copies, and frontmatter fields already limited in characters by a spec or Policy.
54
+ - Caps MUST be in words; other limits MAY coexist but never replace them.
55
+ - Declare each cap once: in the template placeholder (including templates in `references/` or `.assets/`), else in the Instructions step producing the content, else in its `#### Contents` bullet.
56
+ - A blanket statement MAY cover a content class (e.g., all intermediate messages); a more specific cap overrides it.
57
+ - Write the number inline; a Policy reference is optional.
58
+ - Content whose size cannot be bounded MUST be marked `(uncapped: <reason>)`, the reason explaining why.
59
+ - Caps are hard: condense, or split into another item only where the skill allows it; never split one logical item across messages. An explicit user request lifts the cap for that item only.
60
+
61
+ ## References
62
+
63
+ - [_core-adr-policy-003 - Skill standards](003-skill-standards.md)
@@ -4,8 +4,8 @@ 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.2.0"
8
- updated: 2026-09-30
7
+ version: "1.3.0"
8
+ updated: 2026-10-08
9
9
  ---
10
10
 
11
11
  ## Overview
@@ -76,11 +76,11 @@ Keep every question and intermediate message <100 words and the final summary <1
76
76
 
77
77
  ### Phase 2: Fetch Sources
78
78
 
79
- 1. Create the execution dir `.tmp/compile-scope-[YYYYMMDDHHMMSS]/` at the workspace root (local start time; append `-2`, `-3`... if it exists) with a `.work/staging/` folder. Put any other intermediate file in `.work/` and any ad-hoc script you generate in `.work/scripts/`; never write secrets there (pass them via environment, or use the OS temp dir and delete the file after use). If the workspace is read-only, use the same layout under the OS temp dir. Keep the dir after the run.
79
+ 1. Use `.tmp/compile-scope/.work/staging/[name]/` at the workspace root as the staging folder of each source (`[name]` is the source slug); this skill has no run folder. Delete that folder before fetching into it, so no stale content is reused. Never write secrets or ad-hoc scripts there; use the OS temp dir for them and delete them when the run ends. If the workspace is read-only, use the same layout under the OS temp dir. Keep staging after the run.
80
80
  2. For each due source (from Phase 1), fetch in the following preference order (first available wins; if all equivalent URLs are listed, try each in order):
81
- - **Git URL** (`- [git] ...`): run `git clone --depth=1 [url] .tmp/compile-scope-[ts]/.work/staging/[name]/`. If `git` is not available or the clone fails, fall back to the next option.
82
- - **Local folder** (`- [local] ...`): copy the folder contents to `.tmp/compile-scope-[ts]/.work/staging/[name]/`.
83
- - **Web URL** (`- [web] ...`): before scraping, search the workspace for a skill specialized in fetching content from this URL or website domain (e.g., a skill whose description or name references the domain, the product, or the content type). Some websites require special handling — SSO, client certificates, shadow DOM, iframes, CAPTCHAs, or other quirks. If a specialized fetch skill is found, follow it to retrieve the content. If no specialized skill exists, fall back to `npx --package=@playwright/cli@latest playwright-cli`; run with `--help` to confirm available commands and save output as `.html` file(s) in `.tmp/compile-scope-[ts]/.work/staging/[name]/`.
81
+ - **Git URL** (`- [git] ...`): run `git clone --depth=1 [url] .tmp/compile-scope/.work/staging/[name]/`. If `git` is not available or the clone fails, fall back to the next option.
82
+ - **Local folder** (`- [local] ...`): copy the folder contents to `.tmp/compile-scope/.work/staging/[name]/`.
83
+ - **Web URL** (`- [web] ...`): before scraping, search the workspace for a skill specialized in fetching content from this URL or website domain (e.g., a skill whose description or name references the domain, the product, or the content type). Some websites require special handling — SSO, client certificates, shadow DOM, iframes, CAPTCHAs, or other quirks. If a specialized fetch skill is found, follow it to retrieve the content. If no specialized skill exists, fall back to `npx --package=@playwright/cli@latest playwright-cli`; run with `--help` to confirm available commands and save output as `.html` file(s) in `.tmp/compile-scope/.work/staging/[name]/`.
84
84
  3. If any source cannot be fetched via any listed option, report the failure and continue with remaining sources. Do not abort the entire compilation for a single failed source.
85
85
  4. Immediately after a source is fetched successfully, create `.assets/sources/[name]/source.md` if absent and update its `last-fetch-timestamp` to the current time — this happens regardless of the `Source storage` setting, since the tracking file always persists per `_core-adr-policy-019` rule 12.
86
86
  5. Convert non-markdown documents found in the fetched source directories. Use only the format converters actually needed:
@@ -178,7 +178,6 @@ After writing each policy:
178
178
  - Any sources that could not be fetched.
179
179
  - Lint and review pass/fail status.
180
180
  - Sources persisted, kept temporary, or skipped as already in sync.
181
- 2. Whenever the execution dir was created, including when halting in an earlier phase, end the final message with `results-path: .tmp/compile-scope-[ts]/` (the actual dir).
182
181
 
183
182
  ## Anti-Patterns
184
183
 
@@ -205,4 +204,5 @@ After writing each policy:
205
204
  ## References
206
205
 
207
206
  - [_core-adr-policy-019 - Compiled scope type](../../019-compiled-scope-type.md)
207
+ - [_core-adr-policy-023 - Skill runtime standards](../../023-skill-runtime-standards.md)
208
208
  - [_core-adr-policy-008 - Policy structured standards](../../008-policy-structured-standards.md)
@@ -6,8 +6,8 @@ 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.2.0"
10
- updated: 2026-09-30
9
+ version: "1.3.0"
10
+ updated: 2026-10-08
11
11
  ---
12
12
 
13
13
  ## Overview
@@ -81,12 +81,12 @@ Keep every question and intermediate message <100 words.
81
81
  ### Phase 3: Diagram Validation
82
82
 
83
83
  1. For every file in scope, scan for fenced ` ```mermaid ` code blocks.
84
- 2. For each diagram found, extract the content to a `.mmd` file in `.tmp/review-[YYYYMMDDHHMMSS]/.work/` at the workspace root (local start time; create it only when the first diagram is found, append `-2`, `-3`... if it exists, and use the same layout under the OS temp dir if the workspace is read-only) and run:
84
+ 2. For each diagram found, extract the content to a `.mmd` file in a temporary folder under the OS temp dir (create it only when the first diagram is found) and run:
85
85
  ```bash
86
86
  npx -y @mermaid-js/mermaid-cli -i <file>.mmd --quiet 2>&1
87
87
  ```
88
88
  3. For each diagram that fails validation, report as ERROR: include the file path, approximate location (heading or surrounding text), and the error message from `mmdc`.
89
- 4. Keep the extracted files after the run; if this step created the dir, fill the `results-path` line of the report template.
89
+ 4. Delete the temporary folder and its `.mmd` files when the review ends, including when halting.
90
90
 
91
91
  ### Phase 4: Policy Review
92
92
 
@@ -134,8 +134,6 @@ Scope: [scope identifier]
134
134
  - Errors: [count]
135
135
  - Warnings: [count]
136
136
  - Outcome: [PASS|FAIL]
137
-
138
- results-path: [.tmp/review-[ts]/ actual dir; include this line only when Phase 3 created it]
139
137
  ```
140
138
 
141
139
  ### Constraints
@@ -170,3 +168,4 @@ results-path: [.tmp/review-[ts]/ actual dir; include this line only when Phase 3
170
168
  - [_core-adr-policy-002 - Policy standards](../../002-policy-standards.md)
171
169
  - [_core-adr-policy-003 - Skill standards](../../003-skill-standards.md)
172
170
  - [_core-adr-policy-020 - Media and asset standards](../../020-media-and-asset-standards.md)
171
+ - [_core-adr-policy-023 - Skill runtime standards](../../023-skill-runtime-standards.md)
@@ -6,13 +6,13 @@ description: >
6
6
  Activate this skill when the user asks to create, add, or write a new skill, agent skill, or SKILL.md file.
7
7
  metadata:
8
8
  author: flaviostutz
9
- version: "1.2.0"
10
- updated: 2026-09-30
9
+ version: "1.3.0"
10
+ updated: 2026-10-08
11
11
  ---
12
12
 
13
13
  ## Overview
14
14
 
15
- Guides the creation of a well-structured skill package by following `_core-adr-policy-003` skill standards, consulting `xdrs-core` for every core element definition, checking existing skills to avoid duplication, and producing a complete SKILL.md ready to activate in VS Code.
15
+ Guides the creation of a well-structured skill package by following `_core-adr-policy-003` skill standards and `_core-adr-policy-023` runtime standards, consulting `xdrs-core` for every core element definition, checking existing skills to avoid duplication, and producing a complete SKILL.md ready to activate in VS Code.
16
16
 
17
17
  ### Inputs
18
18
 
@@ -57,7 +57,7 @@ Keep every question and intermediate message <100 words and the final summary <1
57
57
 
58
58
  ### Phase 1: Understand the Skill Goal
59
59
 
60
- 1. Read `.xdrs/_core/adrs/principles/003-skill-standards.md` in full to internalize the SKILL.md format and folder layout.
60
+ 1. Read `.xdrs/_core/adrs/principles/003-skill-standards.md` and `.xdrs/_core/adrs/principles/023-skill-runtime-standards.md` in full to internalize the SKILL.md format, folder layout and runtime rules.
61
61
  2. Read `.xdrs/_core/adrs/principles/001-xdrs-standards.md` in full before defining any core element for the skill package. Treat it as the canonical source for type, scope, subject, naming constraints, and folder placement rules.
62
62
  3. Identify what the skill must do, the concrete outcome it should produce, and the exact conditions under which an agent should activate it. Do NOT proceed without a clear goal, outcome, and activation trigger.
63
63
 
@@ -170,9 +170,9 @@ Rules:
170
170
  - The `description` field must state both *what* the skill does and *when* to activate it.
171
171
  - Keep the skill task-oriented. It should have a clear starting trigger and a concrete ending result.
172
172
  - Mention tools or prerequisites when they are required to complete the task reliably.
173
- - Declare a "<N words" cap, or "(uncapped: <reason>)", exactly once for every natural-language content the skill generates, per **Generated content caps** in `_core-adr-policy-003`.
173
+ - Declare a "<N words" cap, or "(uncapped: <reason>)", exactly once for every natural-language content the skill generates, per **Generated content caps** in `_core-adr-policy-023`.
174
174
  - Do not duplicate content from referenced Policies — link instead.
175
- - If the skill creates files at runtime (outputs, intermediate files, ad-hoc scripts), restate in `## Instructions`, next to the steps writing them, the parts of **Work files** in `_core-adr-policy-003` it uses: `.tmp/[skill-name]-[YYYYMMDDHHMMSS]/`, `.work/`, `.work/scripts/`, and the final `results-path:` line. This restatement is the one exception to the no-duplication rule, so the skill runs standalone.
175
+ - If the skill creates files at runtime (outputs, intermediate files, ad-hoc scripts), restate in `## Instructions`, next to the steps writing them, the parts of **Work files** in `_core-adr-policy-023` it uses: `.tmp/[skill-name]/[run-name]/` (never files directly in `.tmp/[skill-name]/`), `.work/`, the OS temp dir for throwaway files, and the final `results-path:` line when a run folder is created. This restatement is the one exception to the no-duplication rule, so the skill runs standalone.
176
176
  - Do not present the skill itself as policy; mandatory behavior must come from referenced Policies or other policy artifacts.
177
177
  - When the skill depends on Policies, make the activation logic and instructions consistent with the Policy metadata so the skill does not operationalize inactive or out-of-scope decisions.
178
178
  - For diagrams and non-Markdown assets, follow `_core-adr-policy-020`: prefer plain Markdown tables/lists first, then ASCII art for very simple cases, then Mermaid.js (sequence, state, activity, entity diagrams) for complex ones, then draw.io when Mermaid is insufficient — save as Editable Vector (File → Save As → Editable Vector) and store as `.svg` in the sibling `.assets/` folder.
@@ -193,7 +193,7 @@ Before writing files, verify:
193
193
  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"?
194
194
  8. **Meta-policy compliance**: Run the shared module at `.xdrs/_core/adrs/principles/skills/.assets/meta-policy-compliance.md`. Substitute `[DOCUMENT]` with `skill`.
195
195
  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?
196
- 10. **Work files**: If the skill creates files at runtime, do its Instructions restate the default execution dir, `.work/`, `.work/scripts/`, and `results-path:` line from `_core-adr-policy-003`, or an explicit alternative location?
196
+ 10. **Work files**: If the skill creates files at runtime, do its Instructions restate the run folder, `.work/`, OS temp dir and `results-path:` rules from `_core-adr-policy-023`, or an explicit alternative location?
197
197
 
198
198
  If any check fails, revise before continuing.
199
199
 
@@ -261,6 +261,7 @@ Follow the lint verification steps in `.xdrs/_core/adrs/principles/skills/.asset
261
261
  ## References
262
262
 
263
263
  - [_core-adr-policy-003 - Skill standards](../../003-skill-standards.md)
264
+ - [_core-adr-policy-023 - Skill runtime standards](../../023-skill-runtime-standards.md)
264
265
  - [_core-adr-policy-001 - XDRS standards](../../001-xdrs-standards.md)
265
266
  - [_core-adr-policy-021 - Skill bundling](../../021-skill-bundling.md)
266
267
  - [write-policy skill](../write-policy/SKILL.md)
@@ -5,8 +5,8 @@ description: >
5
5
  Activate this skill when the user asks to create or write any XDRS element.
6
6
  metadata:
7
7
  author: flaviostutz
8
- version: "1.2.0"
9
- updated: 2026-09-30
8
+ version: "1.3.0"
9
+ updated: 2026-10-08
10
10
  ---
11
11
 
12
12
  ## Overview
@@ -81,12 +81,12 @@ Read the full content of the skill file for the inferred type, then follow all i
81
81
  ### Phase 3: Validate Mermaid Diagrams
82
82
 
83
83
  1. After the delegated skill completes, scan all files written in this session for fenced ` ```mermaid ` code blocks.
84
- 2. For each diagram found, extract the content to a `.mmd` file in `.tmp/write-xdrs-doc-[YYYYMMDDHHMMSS]/.work/` at the workspace root (local start time; create it only when the first diagram is found, append `-2`, `-3`... if it exists, and use the same layout under the OS temp dir if the workspace is read-only) and run:
84
+ 2. For each diagram found, extract the content to a `.mmd` file in a temporary folder under the OS temp dir (create it only when the first diagram is found) and run:
85
85
  ```bash
86
86
  npx -y @mermaid-js/mermaid-cli -i <file>.mmd --quiet 2>&1
87
87
  ```
88
88
  3. For each diagram that fails validation, report the error to the user and ask them to correct the diagram before saving.
89
- 4. Keep the extracted files after the run; if this step created the dir, end the final summary with `results-path: .tmp/write-xdrs-doc-[ts]/` (the actual dir), including when halting.
89
+ 4. Delete the temporary folder and its `.mmd` files when the run ends, including when halting.
90
90
 
91
91
  ### Constraints
92
92
 
@@ -32,7 +32,7 @@ Each artifact type has its own writing standard:
32
32
 
33
33
  - **Policy documents** follow [_core-adr-policy-002](adrs/principles/002-policy-standards.md), which defines the mandatory template, frontmatter metadata, applicability rules, conflict handling, and word limits that keep decisions concise and authoritative.
34
34
  - **Structured Policies** with individually referenceable rules follow the extension [_core-adr-policy-008](adrs/principles/008-policy-structured-standards.md), adding numbered rule blocks and a dot-notation citation syntax.
35
- - **Skills** follow [_core-adr-policy-003](adrs/principles/003-skill-standards.md), using the agentskills format so they work for both humans and AI agents on an automation gradient from fully manual to fully automated.
35
+ - **Skills** follow [_core-adr-policy-003](adrs/principles/003-skill-standards.md) and [_core-adr-policy-023](adrs/principles/023-skill-runtime-standards.md), using the agentskills format so they work for both humans and AI agents on an automation gradient from fully manual to fully automated.
36
36
  - **Articles** follow [_core-adr-policy-004](adrs/principles/004-article-standards.md), providing synthetic views that combine and link multiple Policies, research, and skills without replacing them as the source of truth.
37
37
  - **Research** follows [_core-adr-policy-006](adrs/principles/006-research-standards.md), using an IMRAD-based structure for studies that back decisions with reproducible evidence.
38
38
  - **Initiatives** follow [_core-adr-policy-007](adrs/principles/007-initiative-standards.md), capturing ephemeral execution initiatives with problem context, proposed solutions, milestones, and deliverables that are deleted after implementation.
package/lib/lint.js CHANGED
@@ -50,7 +50,6 @@ const SKILL_OPTIONAL_RUNTIME_SECTION = '### Runtime Requirements';
50
50
  const SKILL_OPTIONAL_USER_INTERACTION_SECTION = '### User Interaction';
51
51
  const SKILL_ANTI_PATTERNS_MIN_ENTRIES = 3;
52
52
  const SKILL_BUNDLING_MAKEFILE_TARGETS = ['build', 'test', 'clean'];
53
- const SCRIPT_HEADER_RE = /^(#!|#|\/\/|\/\*|<!--|--|;)/;
54
53
 
55
54
  // Subject number block ranges per _core-adr-policy-017
56
55
  const SUBJECT_NUMBER_RANGES = {
@@ -1264,10 +1263,6 @@ function lintSkillsDirectory(xdrsRoot, scopeName, skillsPath, errors, externalSc
1264
1263
  }
1265
1264
  }
1266
1265
 
1267
- if (packageEntry.name === 'scripts') {
1268
- lintSkillScriptHeaders(packageEntryPath, errors);
1269
- }
1270
-
1271
1266
  if (SKILL_PACKAGE_OPTIONAL_DIRS.has(packageEntry.name)) {
1272
1267
  continue;
1273
1268
  }
@@ -1637,24 +1632,6 @@ function lintSkillAntiPatternsCount(content, filePath, errors) {
1637
1632
  }
1638
1633
  }
1639
1634
 
1640
- /**
1641
- * Validates that each file inside a skill's scripts/ directory declares its runtime or
1642
- * interpreter at the top (shebang or header comment) per _core-adr-policy-003.
1643
- */
1644
- function lintSkillScriptHeaders(scriptsPath, errors) {
1645
- const entries = safeReadDir(scriptsPath, errors, `read scripts directory ${toDisplayPath(scriptsPath)}`);
1646
- for (const entry of entries) {
1647
- if (!entry.isFile()) {
1648
- continue;
1649
- }
1650
- const scriptPath = path.join(scriptsPath, entry.name);
1651
- const content = fs.readFileSync(scriptPath, 'utf8');
1652
- if (!SCRIPT_HEADER_RE.test(firstNonEmptyLine(content))) {
1653
- errors.push(`Script must declare its runtime/interpreter at the top (shebang or header comment): ${toDisplayPath(scriptPath)} [_core-adr-policy-003]`);
1654
- }
1655
- }
1656
- }
1657
-
1658
1635
  /**
1659
1636
  * Validates an optional skill bundling Makefile per _core-adr-policy-021: it must expose
1660
1637
  * build/test/clean targets, and its dist/ output must be covered by a .gitignore.
package/lib/lint.test.js CHANGED
@@ -866,7 +866,7 @@ test('passes when skill bundling Makefile dist output is covered by a local .git
866
866
  expect(result.errors.join('\n')).not.toContain('is not covered by any .gitignore');
867
867
  });
868
868
 
869
- test('reports scripts/ file missing a shebang or header comment', () => {
869
+ test('does not require a shebang or header comment in scripts/ files', () => {
870
870
  const workspaceRoot = createWorkspace('skill-script-missing-header', {
871
871
  '.xdrs/index.md': rootIndex(),
872
872
  '.xdrs/_local/adrs/index.md': localAdrIndex([
@@ -881,26 +881,7 @@ test('reports scripts/ file missing a shebang or header comment', () => {
881
881
 
882
882
  const result = lintWorkspace(workspaceRoot);
883
883
 
884
- expect(result.errors.join('\n')).toContain('Script must declare its runtime/interpreter at the top');
885
- });
886
-
887
- test('passes when scripts/ file declares a shebang', () => {
888
- const workspaceRoot = createWorkspace('skill-script-with-shebang', {
889
- '.xdrs/index.md': rootIndex(),
890
- '.xdrs/_local/adrs/index.md': localAdrIndex([
891
- '- [check-links](principles/skills/check-links/SKILL.md) - Check links'
892
- ]),
893
- '.xdrs/_local/adrs/principles/skills/check-links/SKILL.md': skillDocument('Test instructions.'),
894
- '.xdrs/_local/adrs/principles/skills/check-links/scripts/run.sh': [
895
- '#!/bin/bash',
896
- 'echo "has a shebang"',
897
- ''
898
- ].join('\n'),
899
- });
900
-
901
- const result = lintWorkspace(workspaceRoot);
902
-
903
- expect(result.errors.join('\n')).not.toContain('Script must declare its runtime/interpreter at the top');
884
+ expect(result.errors.join('\n')).not.toContain('scripts/run.sh');
904
885
  });
905
886
 
906
887
  test('accepts skill package names containing digits, including as a prefix', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xdrs-core",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
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",