bmad-method 6.11.1-next.36 → 6.11.1-next.38

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.
Files changed (25) hide show
  1. package/AGENTS.md +12 -0
  2. package/CLAUDE.md +1 -0
  3. package/greptile.json +52 -0
  4. package/package.json +3 -3
  5. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
  6. package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
  7. package/src/bmm-skills/ship/bmad-build-auto/step-01-clarify-and-route.md +3 -2
  8. package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +1 -1
  9. package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
  10. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
  11. package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
  12. package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
  13. package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
  14. package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
  15. package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
  16. package/tools/installer/core/shim-policy.js +1 -1
  17. package/tools/skill-validator.md +2 -26
  18. package/tools/tests/__pycache__/test_validate_skills.cpython-311.pyc +0 -0
  19. package/tools/tests/fixtures/validate-skills/bmad/SKILL.md +8 -0
  20. package/tools/tests/fixtures/validate-skills/deprecated-shim/SKILL.md +9 -0
  21. package/tools/tests/fixtures/validate-skills/missing-trigger/SKILL.md +9 -0
  22. package/tools/tests/fixtures/validate-skills/with-trigger/SKILL.md +8 -0
  23. package/tools/tests/test_validate_skills.py +476 -0
  24. package/tools/validate_skills.py +698 -0
  25. package/tools/validate-skills.js +0 -735
package/AGENTS.md CHANGED
@@ -10,3 +10,15 @@ Open source framework for structured, agent-assisted software delivery.
10
10
 
11
11
  - Skill validation rules are in `tools/skill-validator.md`.
12
12
  - Deterministic skill checks run via `npm run validate:skills` (included in `quality`).
13
+ - Documentation conventions are in `docs/_STYLE_GUIDE.md`.
14
+
15
+ ## Writing prompts
16
+
17
+ Skills, workflows, tasks, and agent definitions are prompt text that an agent reads in full on every run. Length and
18
+ ambiguity are paid on every run; a corner case is paid only when it occurs. So do not add instructions for exotic
19
+ cases — the model usually handles them from context, and the reviewing human can correct it when it does not.
20
+
21
+ ## Testing
22
+
23
+ Automated tests assert outcomes produced by deterministic code. Do not write automated tests for LLM output or for
24
+ static source text.
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
package/greptile.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "strictness": 2,
3
+ "commentTypes": ["logic", "syntax"],
4
+ "triggerOnUpdates": false,
5
+ "excludeAuthors": ["dependabot[bot]"],
6
+ "ignorePatterns": "greptile.json\neslint.config.mjs\n.claude/**\n.codex/**\n.agent/**\n.agentvibes/**\n.kiro/**\n.roo/**\n.github/chatmodes/**\ndist/**\nbuild/**\ncoverage/**\n.bundler-temp/**\n**/node_modules/**\n**/*.min.js\n**/*.generated.*\n**/*.bundle.md\npackage-lock.json\n**/*.png\n**/*.jpg\n**/*.svg\ntest/fixtures/**\ntools/tests/fixtures/**\ntest/template-test-generator/**\ntools/template-test-generator/test-scenarios/**\n_bmad*/**\nwebsite/public/**\nwebsite/diagrams/**\nz*/**\nsample-project/**\ntest-project-install/**\n**/validation-report-*.html\nCHANGELOG.md",
7
+ "instructions": "Most of this repo's source is prompt text read by agents at runtime, not executable code. Confine review of it to claims that can be checked against the repository: file paths and cross-references that do not resolve, invocation syntax that does not match the referenced skill, instructions that contradict another file, documented behavior that the code does not implement, and violations of the conventions in AGENTS.md. Do not comment on prompt wording, tone, phrasing, length, or how thorough an instruction feels \u2014 those are authoring decisions and are not yours to judge.",
8
+ "customContext": {
9
+ "files": [
10
+ {
11
+ "path": "AGENTS.md",
12
+ "description": "Repo conventions every change must satisfy"
13
+ },
14
+ {
15
+ "path": "tools/skill-validator.md",
16
+ "description": "Authoritative rule catalog for skills \u2014 SKILL.md metadata, workflow constraints, step file structure, path references, variable resolution, sequential execution, skill invocation syntax. Apply the whole catalog to changed skill files.",
17
+ "scope": ["src/bmm-skills/**", "src/core-skills/**"]
18
+ },
19
+ {
20
+ "path": "docs/_STYLE_GUIDE.md",
21
+ "description": "Documentation conventions: Google style, Diataxis structure, plus project-specific rules on headers, admonitions, and nesting",
22
+ "scope": ["docs/**"]
23
+ }
24
+ ],
25
+ "rules": [
26
+ {
27
+ "id": "docs-follow-source",
28
+ "rule": "Source changed. Check whether docs/ needs a matching update \u2014 new features, changed behavior, renamed concepts, altered CLI flags, or modified configuration options should all be reflected in the relevant doc pages. Flag missing or outdated docs.",
29
+ "scope": ["src/**"],
30
+ "severity": "medium"
31
+ },
32
+ {
33
+ "id": "agent-skill-shape",
34
+ "rule": "Agent skill. The persona is configured in customize.toml under [agent]: check that every {agent.*} placeholder the SKILL.md interpolates has a corresponding key there, and that menu entries name skills that exist in this repo.",
35
+ "scope": ["src/bmm-skills/agents/**"],
36
+ "severity": "high"
37
+ },
38
+ {
39
+ "id": "docs-links-resolve",
40
+ "rule": "Check that internal markdown links point at files that exist.",
41
+ "scope": ["docs/**/*.md"],
42
+ "severity": "medium"
43
+ },
44
+ {
45
+ "id": "tooling-exit-codes",
46
+ "rule": "Build and tooling script. Check error handling and that failures exit non-zero.",
47
+ "scope": ["tools/**", "src/scripts/**"],
48
+ "severity": "medium"
49
+ }
50
+ ]
51
+ }
52
+ }
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.36",
4
+ "version": "6.11.1-next.38",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -50,11 +50,11 @@
50
50
  "test:renderer": "uv run --python 3.11 python -m unittest src/scripts/tests/test_config_utils.py src/scripts/tests/test_resolve_config.py src/scripts/tests/test_resolve_customization.py && node test/test-build-auto-renderer.js",
51
51
  "test:retrospective": "uv run --python 3.11 src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_git_evidence.py && uv run --python 3.11 src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_sprint_status.py",
52
52
  "test:site-url": "node test/test-site-url.mjs",
53
- "test:skills": "node test/test-validate-skills.js",
53
+ "test:skills": "uv run --python 3.11 python -m unittest tools/tests/test_validate_skills.py",
54
54
  "test:sprint-planning": "uv run --python 3.11 src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/test_sprint_plan.py && node test/test-template-sync.js",
55
55
  "test:urls": "node test/test-parse-source-urls.js",
56
56
  "validate:refs": "node tools/validate-file-refs.js --strict",
57
- "validate:skills": "node tools/validate-skills.js --strict"
57
+ "validate:skills": "uv run --python 3.11 tools/validate_skills.py --strict"
58
58
  },
59
59
  "lint-staged": {
60
60
  "*.{js,cjs,mjs}": [
@@ -2,6 +2,7 @@
2
2
  spec_file: '' # set at runtime once a route resolves it; some HALT branches exit before it is set
3
3
  spec_folder: '' # set at runtime under folder+id dispatch only
4
4
  story_id: '' # set at runtime under folder+id dispatch only
5
+ followup_pass: '' # set at runtime when a `done` spec is re-dispatched for a follow-up review pass; empty on a first pass
5
6
  ---
6
7
 
7
8
  # Step 1: Clarify and Route
@@ -21,7 +22,7 @@ If the invocation prompt explicitly points to an existing spec file with recogni
21
22
  - `ready-for-dev` or `in-progress` → `[[bmad-snapshot:step-03-implement.md]]`
22
23
  - `in-review` → `[[bmad-snapshot:step-04-review.md]]`
23
24
  - `blocked` → HALT with status `blocked` and blocking condition `blocked spec supplied`.
24
- - `done` → set `review_loop_iteration` to `0` in the frontmatter, then **EARLY EXIT** to `[[bmad-snapshot:step-04-review.md]]` for a fresh review pass. (A `done` spec is a completed run, so this starts a follow-up review, not a resumption.)
25
+ - `done` → set `review_loop_iteration` to `0` in the frontmatter and set `followup_pass` to `true`, then **EARLY EXIT** to `[[bmad-snapshot:step-04-review.md]]` for a fresh review pass. (A `done` spec is a completed run, so this starts a follow-up review, not a resumption.)
25
26
 
26
27
  If the invocation prompt instead supplies a spec folder and a story id, with no specific spec file path, this is a **folder+id dispatch**: set `spec_folder` (a `{project-root}`-relative or absolute path) and `story_id` from the prompt. Any further prompt text (e.g. `invoke_dev_with` guidance the caller appended) is additional planning context to carry into step-02 — not a competing description of what to implement.
27
28
 
@@ -31,7 +32,7 @@ Look for files matching `{spec_folder}/stories/{story_id}-*.md` (id-prefix match
31
32
  - **If more than one matches**, HALT with status `blocked` and blocking condition `ambiguous story file match`.
32
33
  - **If exactly one matches**, set `spec_file` to that path.
33
34
  - `draft` (planning was interrupted mid-flight): accumulate cross-story context before resuming — load every other file matching `{spec_folder}/stories/*.md` (every match except `{spec_file}` itself), regardless of `status`, and carry forward each one's **Code Map**, **Design Notes**, **Spec Change Log**, **Tasks & Acceptance** checklist state, and **Auto Run Result** details, where present, as additional planning context for step-02. Then **EARLY EXIT** to `[[bmad-snapshot:step-02-plan.md]]`.
34
- - Any other recognized `status`: **EARLY EXIT** using the same routing as above, including the `review_loop_iteration` reset for `done`. One difference: a `blocked` story HALTs with blocking condition `story already blocked`, not `blocked spec supplied` — the caller did not supply this file; build-auto found it by id.
35
+ - Any other recognized `status`: **EARLY EXIT** using the same routing as above, including the `review_loop_iteration` reset and `followup_pass` for `done`. One difference: a `blocked` story HALTs with blocking condition `story already blocked`, not `blocked spec supplied` — the caller did not supply this file; build-auto found it by id.
35
36
  - `status` missing or unrecognized: HALT with status `blocked` and blocking condition `unrecognized status in existing story file`.
36
37
  - **If none matches**, this is the first dispatch for `{story_id}`. The entry's `title` and `description` are the resolved intent. If `{spec_folder}/SPEC.md` does not exist, HALT with status `blocked` and blocking condition `no epic spec found`. Otherwise load it and the files listed in its `companions:` frontmatter as planning context, then accumulate cross-story context the same way as the `draft` case above — load every file matching `{spec_folder}/stories/*.md` (none yet exists for `{story_id}` at this point, so nothing is excluded), regardless of `status`, carrying forward the same fields, where present, as additional planning context for step-02. Then continue to INSTRUCTIONS item 3 below — not `step-03-implement.md`, item 3 of the numbered list in this file (items 1 and 2 do not apply — context and intent are already resolved; item 1.A.5's previous-story continuity scan in particular never runs here, since folder+id dispatch already skips items 1 and 2 entirely — the cross-story accumulation above is its replacement for this dispatch mode).
37
38
 
@@ -87,7 +87,7 @@ Write the following details to `{spec_file}` under `## Auto Run Result`:
87
87
  - Summary of implemented change
88
88
  - Files changed with one-line descriptions
89
89
  - Review findings breakdown: patches applied, items deferred, and every rejected finding with its recorded reason
90
- - Follow-up review recommendation: count only this pass's entries triaged `patch`, at entry verdict — never deferred or `false` ones. `true` if any patched entry was `high`, or if two or more `medium` entries were patched; otherwise `false`. Record the patched counts by verdict.
90
+ - Follow-up review recommendation: default `false`. Count only this pass's entries triaged `patch`, at entry verdict — never deferred or `false` ones. On a first pass, `true` if any patched entry was `high`, or if two or more `medium` entries were patched. On a follow-up pass (`{followup_pass}` = `true`), `true` only if this pass patched a `high` — otherwise the work has converged; patch volume is never grounds. A `true` names the specific unverified risk under `## Auto Run Result`; if none can be named, it is `false`. Record the patched counts by verdict.
91
91
  - Verification performed, including command outcomes or manual inspection notes
92
92
  - Any residual risks
93
93
 
@@ -79,7 +79,7 @@ async function readInstalledSkillIds(bmadDir) {
79
79
 
80
80
  // The installed manifest carries no lifecycle column, so the description
81
81
  // prefix every shim ships with is the only record of what was a shim. This
82
- // is the same signal validate-skills.js uses to exempt them.
82
+ // is the same signal validate_skills.py uses to exempt them.
83
83
  async function readInstalledShims(bmadDir) {
84
84
  const shims = [];
85
85
  for (const record of await readSkillManifest(bmadDir)) {
@@ -7,10 +7,10 @@ An LLM-readable validation prompt for skills following the Agent Skills open sta
7
7
  Before running inference-based validation, run the deterministic validator:
8
8
 
9
9
  ```bash
10
- node tools/validate-skills.js --json path/to/skill-dir
10
+ uv run --python 3.11 tools/validate_skills.py --json path/to/skill-dir
11
11
  ```
12
12
 
13
- This checks 13 rules deterministically: SKILL-01, SKILL-02, SKILL-03, SKILL-04, SKILL-05, SKILL-06, SKILL-07, PATH-02, STEP-01, STEP-06, STEP-07, SEQ-02, TPL-01.
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
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).
16
16
 
@@ -176,14 +176,6 @@ If no findings are generated (from either pass), the skill passes validation.
176
176
 
177
177
  ---
178
178
 
179
- ### STEP-01 — Step File Naming
180
-
181
- - **Severity:** MEDIUM
182
- - **Applies to:** files in `steps/` directory
183
- - **Rule:** Step files must be named `step-NN-description.md` where NN is a zero-padded two-digit number. An optional single-letter variant suffix is allowed for branching steps (e.g., `step-01b-continue.md`).
184
- - **Detection:** Regex: `^step-\d{2}[a-z]?-[a-z0-9-]+\.md$`
185
- - **Fix:** Rename to match the pattern.
186
-
187
179
  ### STEP-02 — Step Must Have a Goal Section
188
180
 
189
181
  - **Severity:** HIGH
@@ -217,22 +209,6 @@ If no findings are generated (from either pass), the skill passes validation.
217
209
  - **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.
218
210
  - **Fix:** Remove premature step loading. Ensure only the current step is active.
219
211
 
220
- ### STEP-06 — Step File Frontmatter: No `name` or `description`
221
-
222
- - **Severity:** MEDIUM
223
- - **Applies to:** step files
224
- - **Rule:** Step files should not have `name:` or `description:` in their YAML frontmatter. These are metadata noise — the step's purpose is conveyed by its goal section and filename.
225
- - **Detection:** Parse step file frontmatter for `name:` or `description:` keys.
226
- - **Fix:** Remove `name:` and `description:` from step file frontmatter.
227
-
228
- ### STEP-07 — Step Count
229
-
230
- - **Severity:** LOW
231
- - **Applies to:** workflow as a whole
232
- - **Rule:** A sharded workflow should have between 2 and 10 step files. More than 10 risks LLM context degradation.
233
- - **Detection:** Count files matching `step-*.md` in the `steps/` directory.
234
- - **Fix:** Consider consolidating steps if over 10.
235
-
236
212
  ---
237
213
 
238
214
  ### SEQ-01 — No Skip Instructions
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: bmad
3
+ description: 'Provides the canonical BMad entrypoint. Use when the root BMad skill needs validation.'
4
+ ---
5
+
6
+ # BMad
7
+
8
+ Canonical root-skill validation fixture.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: deprecated-shim
3
+ description: 'DEPRECATED — consolidated into bmad-foo; this skill will be removed in v7 in favor of `bmad-foo`.'
4
+ ---
5
+
6
+ # DEPRECATED — forwards to bmad-foo
7
+
8
+ This skill was consolidated into `bmad-foo` and is retained as a thin compatibility
9
+ shim so existing invocations keep working. New work should invoke `bmad-foo` directly.
@@ -0,0 +1,9 @@
1
+ ---
2
+ name: missing-trigger
3
+ description: 'Generates a thing and writes it to disk for the user.'
4
+ ---
5
+
6
+ # Missing Trigger
7
+
8
+ An active (non-deprecated) skill whose description omits a "Use when" trigger phrase.
9
+ This fixture guards against regressions: SKILL-06 must still flag it.
@@ -0,0 +1,8 @@
1
+ ---
2
+ name: with-trigger
3
+ description: 'Generates a thing and writes it to disk. Use when the user asks to scaffold a thing.'
4
+ ---
5
+
6
+ # With Trigger
7
+
8
+ An active skill whose description includes a "Use when" trigger phrase.