bmad-method 6.11.1-next.41 → 6.11.1-next.42

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "bmad-method",
4
- "version": "6.11.1-next.41",
4
+ "version": "6.11.1-next.42",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -97,7 +97,7 @@ Launch a context-free subagent with this prompt:
97
97
 
98
98
  Conduct a review of CONTENT.
99
99
  Look for what's missing, not only what's wrong.
100
- Find at least ten issues to fix or improve.
100
+ Compute your finding floor N from the diff file's size: N = min(floor(sqrt(kB) + 1), 10), where kB is the file's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
101
101
  Output a Markdown list of findings only — no severity, priority, or ranking.
102
102
  If the content is empty, stop and say so.
103
103
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
@@ -148,7 +148,7 @@ Launch a context-free subagent with this prompt:
148
148
 
149
149
  Conduct a review of CONTENT.
150
150
  Look for what's missing, not only what's wrong.
151
- Find at least ten issues to fix or improve.
151
+ Compute your finding floor N from the size of the changes: N = min(floor(sqrt(kB) + 1), 10), where kB is the changed content's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
152
152
  Output a Markdown list of findings only — no severity, priority, or ranking.
153
153
  If the content is empty, stop and say so.
154
154
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
@@ -59,7 +59,7 @@ Launch a context-free subagent with this prompt:
59
59
 
60
60
  Conduct a review of CONTENT.
61
61
  Look for what's missing, not only what's wrong.
62
- Find at least ten issues to fix or improve.
62
+ Compute your finding floor N from the diff file's size: N = min(floor(sqrt(kB) + 1), 10), where kB is the file's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
63
63
  Output a Markdown list of findings only — no severity, priority, or ranking.
64
64
  If the content is empty, stop and say so.
65
65
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
@@ -53,7 +53,7 @@ Launch a context-free subagent with this prompt:
53
53
 
54
54
  Conduct a review of CONTENT.
55
55
  Look for what's missing, not only what's wrong.
56
- Find at least ten issues to fix or improve.
56
+ Compute your finding floor N from the diff file's size: N = min(floor(sqrt(kB) + 1), 10), where kB is the file's size in kilobytes. State the arithmetic in one line, then find at least N issues to fix or improve.
57
57
  Output a Markdown list of findings only — no severity, priority, or ranking.
58
58
  If the content is empty, stop and say so.
59
59
  If you have zero findings, re-check and keep thinking; do not stop with an empty list.
@@ -1,6 +1,6 @@
1
1
  # Skill Validator — Inference-Based
2
2
 
3
- An LLM-readable validation prompt for skills following the Agent Skills open standard.
3
+ An LLM-readable validation prompt for skills following the [Agent Skills specification](https://agentskills.io/specification).
4
4
 
5
5
  ## First Pass — Deterministic Checks
6
6
 
@@ -12,14 +12,14 @@ uv run --python 3.11 tools/validate_skills.py --json path/to/skill-dir
12
12
 
13
13
  This checks 10 rules deterministically: SKILL-01, SKILL-02, SKILL-03, SKILL-04, SKILL-05, SKILL-06, SKILL-07, PATH-02, SEQ-02, TPL-01.
14
14
 
15
- Review its JSON output. For any rule that produced **zero findings** in the first pass, **skip it** during inference-based validation below — it has already been verified. If a rule produced any findings, the inference validator should still review that rule (some rules like SKILL-04 and SKILL-06 have sub-checks that benefit from judgment). Focus your inference effort on the remaining rules that require judgment (PATH-01, PATH-03, PATH-04, PATH-05, WF-03, STEP-02, STEP-03, STEP-04, STEP-05, SEQ-01, REF-01, REF-02, REF-03).
15
+ Review its JSON output. Skip any rule that produced zero findings — it is already verified. A rule that produced findings still gets reviewed (SKILL-06's what-and-when check benefits from judgment). The 10 rules that need judgment are PATH-01, PATH-03, PATH-04, PATH-05, STEP-04, STEP-05, SEQ-01, REF-01, REF-02, REF-03.
16
16
 
17
17
  ## How to Use
18
18
 
19
19
  1. You are given a **skill directory path** to validate.
20
20
  2. Run the deterministic first pass (see above) and note which rules passed.
21
21
  3. Read every file in the skill directory recursively.
22
- 4. Apply every rule in the catalog below to every applicable file, **skipping rules that passed the deterministic first pass**.
22
+ 4. Apply every remaining rule in the catalog below to every applicable file.
23
23
  5. Produce a findings report using the report template at the end, including any deterministic findings from the first pass.
24
24
 
25
25
  If no findings are generated (from either pass), the skill passes validation.
@@ -32,9 +32,40 @@ If no findings are generated (from either pass), the skill passes validation.
32
32
  - **Internal reference**: a file path from one file in the skill to another file in the same skill.
33
33
  - **External reference**: a file path from a skill file to a file outside the skill directory.
34
34
  - **Originating file**: the file that contains the reference (path resolution is relative to this file's location).
35
- - **Config variable**: a name-value pair whose value comes from the project config file (e.g., `planning_artifacts`, `implementation_artifacts`, `communication_language`).
35
+ - **Config value**: a key declared with a `prompt:` in `src/core-skills/module.yaml` or `src/bmm-skills/module.yaml`. The installer writes these to `{project-root}/_bmad/config.toml` (team scope) and `config.user.toml` (user scope); `_bmad/custom/` may override either. Examples: `project_name`, `output_folder`, `communication_language`, `planning_artifacts`, `project_knowledge`.
36
+ - **Customization value**: a key from the skill's own `customize.toml`, in its `[workflow]` table (most skills) or `[agent]` table (agent skills), layered with `_bmad/custom/<skill-name>.toml` and `.user.toml`.
36
37
  - **Runtime variable**: a name-value pair whose value is set during workflow execution (e.g., `spec_file`, `date`, `status`).
37
- - **Intra-skill path variable**: a frontmatter variable whose value is a path to another file within the same skill — this is an anti-pattern.
38
+ - **Intra-skill path variable**: a variable whose value is a path to another file within the same skill — this is an anti-pattern.
39
+ - **Rendered skill**: a skill whose `SKILL.md` invokes `render_skill.py`, which renders the skill's Markdown files (entry point `workflow.md`; `SKILL.md` excluded) into an immutable snapshot before execution. Only rendered skills may use compile-time tokens. Every other skill interpolates customization values itself at runtime.
40
+
41
+ ---
42
+
43
+ ## Skill Layouts
44
+
45
+ Three layouts coexist. None is preferred, and the validator does not enforce a choice between them:
46
+
47
+ - **Single-file** — all instructions inline in `SKILL.md`, with optional supporting files (`references/`, `templates/`, `checklist.md`). The common case.
48
+ - **Flat step files** — `step-NN-name.md` beside `SKILL.md` at the skill root.
49
+ - **`steps/` subdirectory** — `steps/step-NN-name.md`.
50
+
51
+ Path resolution differs between the last two; see PATH-01.
52
+
53
+ ---
54
+
55
+ ## Token Forms
56
+
57
+ | Form | Resolved by | Valid where |
58
+ | -------------------------------- | ------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
59
+ | `{name}` | the agent, at runtime | anywhere |
60
+ | `{project-root}`, `{skill-root}` | the agent, at runtime — the project working directory and the skill's own directory | anywhere |
61
+ | `{workflow.key}` | `render_skill.py` at render time, or the agent from `resolve_customization.py` JSON output | any skill with a `[workflow]` table in `customize.toml` |
62
+ | `{agent.key}` | the agent, from `resolve_customization.py` JSON output | agent skills |
63
+ | `{{.key}}` | `render_skill.py`, at render time | rendered skills only |
64
+ | `{{config.key}}` | `render_skill.py`, at render time | rendered skills only |
65
+ | `{{name}}` (no leading dot) | nothing — survives verbatim into the generated artifact | templates and the artifacts they seed |
66
+ | `[[bmad-snapshot:file.md]]` | `render_skill.py`, at render time | rendered skills only |
67
+
68
+ The distinction between `{{name}}` and `{{.name}}` matters: the first is an artifact placeholder the consumer of the generated document fills in later; the second is a substitution baked in at render time. See REF-01 and TPL-01.
38
69
 
39
70
  ---
40
71
 
@@ -68,15 +99,15 @@ If no findings are generated (from either pass), the skill passes validation.
68
99
 
69
100
  - **Severity:** HIGH
70
101
  - **Applies to:** `SKILL.md`
71
- - **Rule:** The `name` value must start with `bmad-`, use only lowercase letters, numbers, and single hyphens between segments.
72
- - **Detection:** Regex test: `^bmad-[a-z0-9]+(-[a-z0-9]+)*$`.
102
+ - **Rule:** The `name` value must be `bmad` or start with `bmad-`, using only lowercase letters, numbers, and single hyphens between segments.
103
+ - **Detection:** Regex test: `^(?:bmad|bmad-[a-z0-9]+(?:-[a-z0-9]+)*)$`.
73
104
  - **Fix:** Rename to comply with the format (e.g., `bmad-my-skill`).
74
105
 
75
106
  ### SKILL-05 — `name` Must Match Directory Name
76
107
 
77
108
  - **Severity:** HIGH
78
109
  - **Applies to:** `SKILL.md`
79
- - **Rule:** The `name` value in SKILL.md frontmatter must exactly match the skill directory name. The directory name is the canonical identifier used by installers, manifests, and `skill:` references throughout the project.
110
+ - **Rule:** The `name` value in SKILL.md frontmatter must exactly match the skill directory name. The directory name is the canonical identifier used by installers, manifests, and skill references throughout the project.
80
111
  - **Detection:** Compare the `name:` frontmatter value against the basename of the skill directory (i.e., the immediate parent directory of `SKILL.md`).
81
112
  - **Fix:** Change the `name:` value to match the directory name, or rename the directory to match — prefer changing `name:` unless other references depend on the current value.
82
113
 
@@ -92,42 +123,25 @@ If no findings are generated (from either pass), the skill passes validation.
92
123
 
93
124
  - **Severity:** HIGH
94
125
  - **Applies to:** `SKILL.md`
95
- - **Rule:** SKILL.md must have non-empty markdown body content after the frontmatter. The body provides L2 instructions — a SKILL.md with only frontmatter is incomplete.
126
+ - **Rule:** SKILL.md must have non-empty markdown body content after the frontmatter. A SKILL.md with only frontmatter is incomplete.
96
127
  - **Detection:** Extract content after the closing `---` frontmatter delimiter and check it is non-empty after trimming whitespace.
97
128
  - **Fix:** Add markdown body with skill instructions after the closing `---`.
98
129
 
99
130
  ---
100
131
 
101
- ### WF-03 — workflow.md Frontmatter Variables Must Be Config or Runtime Only
102
-
103
- - **Severity:** HIGH
104
- - **Applies to:** `workflow.md` frontmatter
105
- - **Rule:** Every variable defined in workflow.md frontmatter must be either:
106
- - A config variable (value references `{project-root}` or a config-derived variable like `{planning_artifacts}`)
107
- - A runtime variable (value is empty, a placeholder, or set during execution)
108
- - A legitimate external path expression (must not violate PATH-05 — no paths into another skill's directory)
109
-
110
- It must NOT be a path to a file within the skill directory (see PATH-04), nor a path into another skill's directory (see PATH-05).
111
-
112
- - **Detection:** For each frontmatter variable, check if its value resolves to a file inside the skill (e.g., starts with `./`, `{installed_path}`, or is a bare relative path to a sibling file). If so, it is an intra-skill path variable. Also check if the value is a path into another skill's directory — if so, it violates PATH-05 and is not a legitimate external path.
113
- - **Fix:** Remove the variable. Use a hardcoded relative path inline where the file is referenced.
114
-
115
- ---
116
-
117
132
  ### PATH-01 — Internal References Must Be Relative From Originating File
118
133
 
119
134
  - **Severity:** CRITICAL
120
135
  - **Applies to:** all files in the skill
121
136
  - **Rule:** Any reference from one file in the skill to another file in the same skill must be a relative path resolved from the directory of the originating file. Use `./` prefix for siblings or children, `../` for parent traversal. Bare relative filenames in markdown links (e.g., `[text](sibling.md)`) are also acceptable.
122
- - **Detection:** Scan for file path references (in markdown links, frontmatter values, inline backtick paths, and prose instructions like "Read fully and follow"). Verify each internal reference uses relative notation (`./`, `../`, or bare filename). Always resolve the path from the originating file's directory — a reference to `./steps/step-01.md` from a file already inside `steps/` would resolve to `steps/steps/step-01.md`, which is wrong.
137
+ - **Detection:** Scan for file path references (in markdown links, frontmatter values, inline backtick paths, and prose instructions like "Read fully and follow"). Verify each internal reference uses relative notation (`./`, `../`, or bare filename). Always resolve the path from the originating file's directory — a reference to `./steps/step-02-review.md` from a file already inside `steps/` would resolve to `steps/steps/step-02-review.md`, which is wrong.
123
138
  - **Examples:**
124
- - CORRECT: `./steps/step-01-init.md` (from workflow.md at skill root to a step)
125
- - CORRECT: `./template.md` (from workflow.md to a sibling)
126
- - CORRECT: `../template.md` (from steps/step-01.md to a skill-root file)
139
+ - CORRECT: `./steps/step-01-gather-context.md` (from a skill-root file into a `steps/` subdirectory)
140
+ - CORRECT: `./step-02-plan.md` (sibling, in the flat step layout or from inside `steps/`)
141
+ - CORRECT: `./template.md` (from SKILL.md to a sibling)
142
+ - CORRECT: `../spec-template.md` (from `steps/step-01.md` to a skill-root file)
127
143
  - CORRECT: `workflow.md` (bare relative filename for sibling)
128
- - CORRECT: `./step-02-plan.md` (from steps/step-01.md to a sibling step)
129
- - WRONG: `./steps/step-02-plan.md` (from a file already inside steps/ — resolves to steps/steps/)
130
- - WRONG: `{installed_path}/template.md`
144
+ - WRONG: `./steps/step-02-review.md` (from a file already inside `steps/` resolves to `steps/steps/`)
131
145
  - WRONG: `{project-root}/.claude/skills/my-skill/template.md`
132
146
  - WRONG: `/Users/someone/.claude/skills/my-skill/steps/step-01.md`
133
147
  - WRONG: `~/.claude/skills/my-skill/file.md`
@@ -136,67 +150,50 @@ If no findings are generated (from either pass), the skill passes validation.
136
150
 
137
151
  - **Severity:** HIGH
138
152
  - **Applies to:** all files in the skill
139
- - **Rule:** The `installed_path` variable is an anti-pattern from the pre-skill workflow era. It must not be defined in any frontmatter, and `{installed_path}` must not appear anywhere in any file.
153
+ - **Rule:** The `installed_path` variable is a leftover from pre-skill workflows. It must not be defined in any frontmatter, and `{installed_path}` must not appear anywhere in any file.
140
154
  - **Detection:** Search all files for:
141
155
  - Frontmatter key `installed_path:`
142
156
  - String `{installed_path}` anywhere in content
143
157
  - Markdown/prose assigning `installed_path` (e.g., `` `installed_path` = `.` ``)
144
158
  - **Fix:** Remove all `installed_path` definitions. Replace every `{installed_path}/path` with `./path` (relative from the file that contains the reference). If the reference is in a step file and points to a skill-root file, use `../path` instead.
145
159
 
146
- ### PATH-03 — External References Must Use `{project-root}` or Config Variables
147
-
148
- - **Severity:** HIGH
149
- - **Applies to:** all files in the skill
150
- - **Rule:** References to files outside the skill directory must use `{project-root}/...` or a config-derived variable path (e.g., `{planning_artifacts}/...`, `{implementation_artifacts}/...`).
151
- - **Detection:** Identify file references that point outside the skill. Verify they start with `{project-root}` or a known config variable. Flag absolute paths, home-relative paths (`~/`), or bare paths that resolve outside the skill.
152
- - **Fix:** Replace with `{project-root}/...` or the appropriate config variable.
153
-
154
- ### PATH-05 — No File Path References Into Another Skill
160
+ ### PATH-03 — External References Must Use `{project-root}` or Config Values
155
161
 
156
162
  - **Severity:** HIGH
157
163
  - **Applies to:** all files in the skill
158
- - **Rule:** A skill must never reference any file inside another skill's directory by file path. Skill directories are encapsulated — their internal files (steps, templates, checklists, data files, workflow.md) are private implementation details. The only valid way to reference another skill is via `skill:skill-name` syntax, which invokes the skill as a unit. Reaching into another skill to cherry-pick an internal file (e.g., a template, a step, or even its workflow.md) breaks encapsulation and creates fragile coupling that breaks when the target skill is moved or reorganized.
159
- - **Detection:** For each external file reference (frontmatter values, markdown links, inline paths), check whether the resolved path points into a directory that is or contains a skill (has a `SKILL.md`). Patterns to flag:
160
- - `{project-root}/_bmad/.../other-skill/anything.md`
161
- - `{project-root}/_bmad/.../other-skill/steps/...`
162
- - `{project-root}/_bmad/.../other-skill/templates/...`
163
- - References to old pre-conversion locations that were skill directories (e.g., `core/workflows/skill-name/` when the skill has since moved to `core/skills/skill-name/`)
164
- - **Fix:**
165
- - If the intent is to invoke the other skill: replace with `skill:skill-name`.
166
- - If the intent is to use a shared resource (template, data file): the resource should be extracted to a shared location outside both skills (e.g., `core/data/`, `bmm/data/`, or a config-referenced path) — not reached into from across skill boundaries.
164
+ - **Rule:** References to files outside the skill directory must use `{project-root}/...` or a config-derived path (e.g., `{planning_artifacts}/...`, `{implementation_artifacts}/...`, `{project_knowledge}/...`).
165
+ - **Detection:** Identify file references that point outside the skill. Verify they start with `{project-root}` or a known config key. Flag absolute paths, home-relative paths (`~/`), or bare paths that resolve outside the skill.
166
+ - **Fix:** Replace with `{project-root}/...` or the appropriate config value.
167
167
 
168
168
  ### PATH-04 — No Intra-Skill Path Variables
169
169
 
170
170
  - **Severity:** MEDIUM
171
171
  - **Applies to:** all files (frontmatter AND body content)
172
172
  - **Rule:** Variables must not store paths to files within the same skill. These paths should be hardcoded as relative paths inline where used. This applies to YAML frontmatter variables AND markdown body variable assignments (e.g., `` `template` = `./template.md` `` under a `### Paths` section).
173
- - **Detection:** For each variable with a path-like value — whether defined in frontmatter or in body text — determine if the target is inside the skill directory. Indicators: value starts with `./`, `../`, `{installed_path}`, or is a bare filename of a file that exists in the skill. Exclude variables whose values are prefixed with a config variable like `{planning_artifacts}`, `{implementation_artifacts}`, `{project-root}`, or other config-derived paths — these are external references and are legitimate.
173
+ - **Detection:** For each variable with a path-like value — whether defined in frontmatter or in body text — determine if the target is inside the skill directory. Indicators: value starts with `./`, `../`, or is a bare filename of a file that exists in the skill. Exclude variables whose values are prefixed with a config key like `{planning_artifacts}`, `{implementation_artifacts}`, or `{project-root}` — these are external references and are legitimate.
174
174
  - **Fix:** Remove the variable. Replace each `{variable_name}` usage with the direct relative path.
175
175
  - **Exception:** If a path variable is used in 4+ locations across multiple files and the path is non-trivial, a variable MAY be acceptable. Flag it as LOW instead and note the exception.
176
176
 
177
- ---
178
-
179
- ### STEP-02 — Step Must Have a Goal Section
177
+ ### PATH-05 — No File Path References Into Another Skill
180
178
 
181
179
  - **Severity:** HIGH
182
- - **Applies to:** step files
183
- - **Rule:** Each step must clearly state its goal. Look for a heading like `## YOUR TASK`, `## STEP GOAL`, `## INSTRUCTIONS`, `## INITIALIZATION`, `## EXECUTION`, `# Step N:`, or a frontmatter `goal:` field.
184
- - **Detection:** Scan for goal-indicating headings (including `# Step N: Title` as a top-level heading that names the step's purpose) or frontmatter.
185
- - **Fix:** Add a clear goal section.
186
-
187
- ### STEP-03 — Step Must Reference Next Step
180
+ - **Applies to:** all files in the skill
181
+ - **Rule:** A skill must never reference a file inside another skill's directory by path. A skill's files are private to it, and a path into another skill breaks when that skill is moved or reorganized.
182
+ - **Detection:** For each external file reference (frontmatter values, markdown links, inline paths), check whether the resolved path points into a directory that is or contains a skill (has a `SKILL.md`). Patterns to flag:
183
+ - `{project-root}/_bmad/.../other-skill/anything.md`
184
+ - `{project-root}/_bmad/.../other-skill/steps/...`
185
+ - `{project-root}/_bmad/.../other-skill/templates/...`
186
+ - References to pre-conversion locations that were skill directories, where the skill has since moved
187
+ - **Fix:**
188
+ - If the intent is to invoke the other skill: use invoke language in prose — ``Invoke the `skill-name` skill`` (see REF-03).
189
+ - If the intent is to use a shared resource (template, data file): extract it to a location outside both skills — a config-referenced path such as `{project_knowledge}/...`, or a `file:`-prefixed entry in `customize.toml` — rather than reaching across a skill boundary.
188
190
 
189
- - **Severity:** MEDIUM
190
- - **Applies to:** step files (except the final step)
191
- - **Rule:** Each non-terminal step must contain a reference to the next step file for sequential execution.
192
- - **Detection:** Look for `## NEXT` section or inline reference to a next step file. Remember to resolve the reference from the originating file's directory (PATH-01 applies here too).
193
- - **Fix:** Add a `## NEXT` section with the relative path to the next step.
194
- - **Note:** A terminal step is one that has no next-step reference and either contains completion/finalization language or is the highest-numbered step. If a workflow branches, there may be multiple terminal steps.
191
+ ---
195
192
 
196
193
  ### STEP-04 — Halt Before Menu
197
194
 
198
195
  - **Severity:** HIGH
199
- - **Applies to:** step files
196
+ - **Applies to:** step files and any file presenting a menu
200
197
  - **Rule:** Any step that presents a user menu (e.g., `[C] Continue`, `[A] Approve`, `[S] Split`) must explicitly HALT and wait for user response before proceeding.
201
198
  - **Detection:** Find menu patterns (bracketed letter options). Check that text within the same section (under the same heading) includes "HALT", "wait", "stop", "FORBIDDEN to proceed", or equivalent.
202
199
  - **Fix:** Add an explicit HALT instruction before or after the menu.
@@ -205,7 +202,7 @@ If no findings are generated (from either pass), the skill passes validation.
205
202
 
206
203
  - **Severity:** HIGH
207
204
  - **Applies to:** step files
208
- - **Rule:** A step must not load or read future step files until the current step is complete. Just-in-time loading only.
205
+ - **Rule:** A step must not load or read future step files until the current step is complete. Load each step when it is reached.
209
206
  - **Detection:** Look for instructions to read multiple step files simultaneously, or unconditional references to step files with higher numbers than the current step. Exempt locations: `## NEXT` sections, navigation/dispatch sections that list valid resumption targets, and conditional routing branches.
210
207
  - **Fix:** Remove premature step loading. Ensure only the current step is active.
211
208
 
@@ -233,42 +230,43 @@ If no findings are generated (from either pass), the skill passes validation.
233
230
 
234
231
  - **Severity:** HIGH
235
232
  - **Applies to:** `.md` files whose name contains `template` (case-insensitive)
236
- - **Rule:** Template files seed durable, version-controlled artifacts (e.g. spec files) that execute on other machines. A `{{.var}}` compile-time substitution would be baked at render time and freeze a machine-local value into every artifact produced from the template.
233
+ - **Rule:** Template files become artifacts (for example spec files) that are committed and used on other machines. `render_skill.py` would replace a `{{.var}}` with a value from the rendering machine's config, and every artifact produced from the template would carry it.
237
234
  - **Detection:** Regex `\{\{\.\w+\}\}` match anywhere in a file whose basename matches `/template/i`.
238
- - **Fix:** Remove the `{{.var}}` reference. Use single-curly `{var}` if the value should be resolved at LLM runtime by the consumer of the generated artifact.
235
+ - **Fix:** Remove the `{{.var}}` reference. Use single-curly `{var}` if the value should be resolved at runtime by the consumer of the generated artifact, or plain double-curly `{{var}}` if it is a placeholder the consumer fills in.
239
236
 
240
237
  ---
241
238
 
242
- ### REF-01 — Variable References Must Be Defined
239
+ ### REF-01 — Variable References Must Resolve
243
240
 
244
241
  - **Severity:** HIGH
245
242
  - **Applies to:** all files
246
- - **Rule:** Every `{variable_name}` reference in any file (body text, frontmatter values, inline instructions) must resolve to a defined source. Valid sources are:
247
- 1. A frontmatter variable in the same file
248
- 2. A frontmatter variable in the skill's `workflow.md` (workflow-level variables are available to all steps)
249
- 3. A known config variable from the project config (e.g., `project-root`, `planning_artifacts`, `implementation_artifacts`, `communication_language`)
250
- 4. A known runtime variable set during execution (e.g., `date`, `status`, `project_name`, user-provided input variables)
251
- - **Detection:** Collect all `{...}` tokens in the file. For each, check whether it is defined in the file's own frontmatter, in `workflow.md` frontmatter, or is a recognized config/runtime variable. Flag any token that cannot be traced to a source. Use the config variable list from the project's `config.yaml` as the reference for recognized config variables. Runtime variables are those explicitly described as user-provided or set during execution in the workflow instructions.
243
+ - **Rule:** Every token must resolve to a defined source, per the Token Forms table above:
244
+ - `{name}` — a frontmatter variable in the same file, a config key, a runtime variable set during execution, or the path anchors `{project-root}` and `{skill-root}`.
245
+ - `{workflow.key}` must name a key in the `[workflow]` table of the skill's own `customize.toml`.
246
+ - `{agent.key}` must name a key in the `[agent]` table of the skill's own `customize.toml`.
247
+ - `{{.key}}`, `{{config.key}}`, `[[bmad-snapshot:file.md]]` only in a rendered skill (one whose SKILL.md invokes `render_skill.py`). In any other skill nothing will substitute them and they reach the agent verbatim. A `[[bmad-snapshot:file.md]]` target must name a Markdown file in the skill other than `SKILL.md`, which the renderer excludes from its source set.
248
+ - **Detection:** Collect all tokens in the file and classify them by form. Resolve config keys against the `prompt:` keys in `module.yaml`; resolve `{workflow.*}` and `{agent.*}` against the skill's `customize.toml`. Before flagging a compile-time token, grep the skill's `SKILL.md` for `render_skill.py` if it is a rendered skill, the token is legitimate. Flag any token that cannot be traced to a source.
252
249
  - **Exceptions:**
253
- - Double-curly `{{variable}}` — these are template placeholders intended to survive into generated output (e.g., `{{project_name}}` in a template file). Do not flag these.
250
+ - Plain double-curly `{{name}}` with **no** leading dot an artifact placeholder that survives rendering into the generated document, to be filled in by whoever consumes it (e.g. `{{story_key}}` in a story template). Do not flag these. Dotted `{{.key}}` and `{{config.key}}` are **not** covered by this exception; they are compile-time substitutions governed by the rule above and by TPL-01.
254
251
  - Variables inside fenced code blocks that are clearly illustrative examples.
255
- - **Fix:** Either define the variable in the appropriate frontmatter, or replace the reference with a literal value. If the variable is a config variable that was misspelled, correct the spelling.
252
+ - **Fix:** Either define the variable in the appropriate `customize.toml` table or frontmatter, or replace the reference with a literal value. If a config key was misspelled, correct the spelling.
256
253
 
257
254
  ### REF-02 — File References Must Resolve
258
255
 
259
256
  - **Severity:** HIGH
260
257
  - **Applies to:** all files
261
258
  - **Rule:** All file path references within the skill (markdown links, backtick paths, frontmatter values) should point to files that plausibly exist.
262
- - **Detection:** For internal references, verify the target file exists in the skill directory. For external references using config variables, verify the path structure is plausible (you cannot resolve config variables, but you can check that the path after the variable looks reasonable — e.g., `{planning_artifacts}/*.md` is plausible, `{planning_artifacts}/../../etc/passwd` is not).
259
+ - **Detection:** For internal references, verify the target file exists in the skill directory. For external references using config keys, verify the path structure is plausible (you cannot resolve config keys, but you can check that the path after the key looks reasonable — e.g., `{planning_artifacts}/*.md` is plausible, `{planning_artifacts}/../../etc/passwd` is not).
263
260
  - **Fix:** Correct the path or remove the dead reference.
264
261
 
265
262
  ### REF-03 — Skill Invocation Must Use "Invoke" Language
266
263
 
267
264
  - **Severity:** HIGH
268
265
  - **Applies to:** all files
269
- - **Rule:** When a skill references another skill by name, the surrounding instruction must use the word "invoke". The canonical form is `Invoke the \`skill-name\` skill`. Phrases like "Read fully and follow", "Execute", "Run", "Load", "Open", or "Follow" are invalid — they imply file-level operations on a document, not skill invocation. A skill is a unit that is invoked, not a file that is read.
270
- - **Detection:** Find all references to other skills by name (typically backtick-quoted skill names like \`bmad-foo\`). Check the surrounding instruction text (same sentence or directive) for file-oriented verbs: "read", "follow", "load", "execute", "run", "open". Flag any that do not use "invoke" (or a close synonym like "activate" or "launch").
271
- - **Fix:** Replace the instruction with `Invoke the \`skill-name\` skill`. Remove any "read fully and follow" or similar file-oriented phrasing. Do NOT add a `skill:` prefix to the name — use natural language.
266
+ - **Rule:** When a skill references another skill by name in prose, the surrounding instruction must use the word "invoke". The canonical form is ``Invoke the `skill-name` skill``. Phrases like "Read fully and follow", "Execute", "Run", "Load", "Open", or "Follow" are invalid — they imply file-level operations on a document, not skill invocation.
267
+ - **Detection:** Find all references to other skills by name (typically backtick-quoted skill names like `bmad-foo`). Check the surrounding instruction text (same sentence or directive) for file-oriented verbs: "read", "follow", "load", "execute", "run", "open". Flag any that do not use "invoke" (or a close synonym like "activate" or "launch").
268
+ - **Fix:** Replace the instruction with ``Invoke the `skill-name` skill``. Remove any "read fully and follow" or similar file-oriented phrasing. Do NOT add a `skill:` prefix in prose — use natural language.
269
+ - **Exception:** `skill:skill-name` is the correct form inside `customize.toml` values (for example a `persistent_facts` entry, or a directive such as `skill:bmad-review lenses=<code>`), where the string is data consumed by a resolver rather than an instruction to the agent. Do not flag it there.
272
270
 
273
271
  ---
274
272
 
@@ -311,44 +309,4 @@ When reporting findings, use this format:
311
309
  (list rule IDs that produced no findings)
312
310
  ```
313
311
 
314
- If zero findings: report "All {N} rules passed. No findings." and list all passed rule IDs.
315
-
316
- ---
317
-
318
- ## Skill Spec Cheatsheet
319
-
320
- Quick-reference for the Agent Skills open standard.
321
- For the full standard, see: [Agent Skills specification](https://agentskills.io/specification)
322
-
323
- ### Structure
324
-
325
- - Every skill is a directory with `SKILL.md` as the required entrypoint
326
- - YAML frontmatter between `---` markers provides metadata; markdown body provides instructions
327
- - Supporting files (scripts, templates, references) live alongside SKILL.md
328
-
329
- ### Path resolution
330
-
331
- - Relative file references resolve from the directory of the file that contains the reference, not from the skill root
332
- - Example: from `branch-a/deep/next.md`, `./deeper/final.md` resolves to `branch-a/deep/deeper/final.md`
333
- - Example: from `branch-a/deep/next.md`, `./branch-b/alt/leaf.md` incorrectly resolves to `branch-a/deep/branch-b/alt/leaf.md`
334
-
335
- ### Frontmatter fields (standard)
336
-
337
- - `name`: lowercase letters, numbers, hyphens only; max 64 chars; no "anthropic" or "claude"
338
- - `description`: required, max 1024 chars; should state what the skill does AND when to use it
339
-
340
- ### Progressive disclosure — three loading levels
341
-
342
- - **L1 Metadata** (~100 tokens): `name` + `description` loaded at startup into system prompt
343
- - **L2 Instructions** (<5k tokens): SKILL.md body loaded only when skill is triggered
344
- - **L3 Resources** (unlimited): additional files + scripts loaded/executed on demand; script output enters context, script code does not
345
-
346
- ### Key design principle
347
-
348
- - Skills are filesystem-based directories, not API payloads — Claude reads them via bash/file tools
349
- - Keep SKILL.md focused; offload detailed reference to separate files
350
-
351
- ### Practical tips
352
-
353
- - Keep SKILL.md under 500 lines
354
- - `description` drives auto-discovery — use keywords users would naturally say
312
+ If zero findings: report "All 20 rules passed. No findings." and list all passed rule IDs.