bmad-method 6.11.1-next.41 → 6.11.1-next.43
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 +1 -1
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-build/SKILL.md +1 -1
- package/src/bmm-skills/ship/bmad-build/customize.toml +2 -2
- package/src/bmm-skills/ship/bmad-build-auto/customize.toml +1 -1
- package/src/bmm-skills/ship/bmad-code-review/customize.toml +1 -1
- package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
- package/tools/skill-validator.md +83 -125
- package/tools/tests/__pycache__/test_validate_skills.cpython-311.pyc +0 -0
package/package.json
CHANGED
package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bmad-build
|
|
3
|
-
description: 'Turns
|
|
3
|
+
description: 'Turns implementation work into working code, reviewed and verified. Use when the user delegates a feature, story, bug fix, or meaningful change; a bare story or issue link counts. Skip obvious, low-risk mechanical maintenance such as small ignore-file, typo-only, formatting-only, or configuration-hygiene edits. Explicit BMAD requests always qualify. Do not volunteer for user-directed interactive edits or version-control operations that only record existing work.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Run the following command exactly once without changing the current working directory. Replace `{project-root}` with the absolute path to the project root and `{skill-root}` with the absolute path to this skill's directory:
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tools/skill-validator.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Skill Validator — Inference-Based
|
|
2
2
|
|
|
3
|
-
An LLM-readable validation prompt for skills following the Agent Skills
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
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-`,
|
|
72
|
-
- **Detection:** Regex test: `^bmad-[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
|
|
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.
|
|
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-
|
|
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-
|
|
125
|
-
- CORRECT: `./
|
|
126
|
-
- CORRECT:
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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:**
|
|
159
|
-
- **Detection:**
|
|
160
|
-
|
|
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 `./`, `../`,
|
|
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:**
|
|
183
|
-
- **Rule:**
|
|
184
|
-
- **Detection:**
|
|
185
|
-
-
|
|
186
|
-
|
|
187
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
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
|
|
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
|
|
239
|
+
### REF-01 — Variable References Must Resolve
|
|
243
240
|
|
|
244
241
|
- **Severity:** HIGH
|
|
245
242
|
- **Applies to:** all files
|
|
246
|
-
- **Rule:** Every
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
- **Detection:** Collect all
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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
|
|
270
|
-
- **Detection:** Find all references to other skills by name (typically backtick-quoted skill names like
|
|
271
|
-
- **Fix:** Replace the instruction with
|
|
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
|
|
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.
|
|
Binary file
|