bmad-method 6.2.1-next.16 → 6.2.1-next.17

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.2.1-next.16",
4
+ "version": "6.2.1-next.17",
5
5
  "description": "Breakthrough Method of Agile AI-driven Development",
6
6
  "keywords": [
7
7
  "agile",
@@ -50,6 +50,29 @@ class ManifestGenerator {
50
50
  return getInstallToBmadShared(manifest, filename);
51
51
  }
52
52
 
53
+ /**
54
+ * Native SKILL.md entrypoints can be packaged as either skills or agents.
55
+ * Both need verbatim installation for skill-format IDEs.
56
+ * @param {string|null} artifactType - Manifest type resolved for SKILL.md
57
+ * @returns {boolean} True when the directory should be installed verbatim
58
+ */
59
+ isNativeSkillDirType(artifactType) {
60
+ return artifactType === 'skill' || artifactType === 'agent';
61
+ }
62
+
63
+ /**
64
+ * Check whether a loaded bmad-skill-manifest.yaml declares a native
65
+ * SKILL.md entrypoint, either as a single-entry manifest or a multi-entry map.
66
+ * @param {Object|null} manifest - Loaded manifest
67
+ * @returns {boolean} True when the manifest contains a native skill/agent entrypoint
68
+ */
69
+ hasNativeSkillManifest(manifest) {
70
+ if (!manifest) return false;
71
+ if (manifest.__single) return this.isNativeSkillDirType(manifest.__single.type);
72
+
73
+ return Object.values(manifest).some((entry) => this.isNativeSkillDirType(entry?.type));
74
+ }
75
+
53
76
  /**
54
77
  * Clean text for CSV output by normalizing whitespace.
55
78
  * Note: Quote escaping is handled by escapeCsv() at write time.
@@ -146,9 +169,10 @@ class ManifestGenerator {
146
169
  }
147
170
 
148
171
  /**
149
- * Recursively walk a module directory tree, collecting skill directories.
150
- * A skill directory is one that contains both a bmad-skill-manifest.yaml with
151
- * type: skill AND a SKILL.md file with name/description frontmatter.
172
+ * Recursively walk a module directory tree, collecting native SKILL.md entrypoints.
173
+ * A native entrypoint directory is one that contains both a
174
+ * bmad-skill-manifest.yaml with type: skill or type: agent AND a SKILL.md file
175
+ * with name/description frontmatter.
152
176
  * Populates this.skills[] and this.skillClaimedDirs (Set of absolute paths).
153
177
  */
154
178
  async collectSkills() {
@@ -172,11 +196,11 @@ class ManifestGenerator {
172
196
  // Check this directory for skill manifest
173
197
  const manifest = await this.loadSkillManifest(dir);
174
198
 
175
- // Determine if this directory is a skill (type: skill in manifest)
199
+ // Determine if this directory is a native SKILL.md entrypoint
176
200
  const skillFile = 'SKILL.md';
177
201
  const artifactType = this.getArtifactType(manifest, skillFile);
178
202
 
179
- if (artifactType === 'skill' || artifactType === 'agent') {
203
+ if (this.isNativeSkillDirType(artifactType)) {
180
204
  const skillMdPath = path.join(dir, 'SKILL.md');
181
205
  const dirName = path.basename(dir);
182
206
 
@@ -190,11 +214,12 @@ class ManifestGenerator {
190
214
  ? `${this.bmadFolderName}/${moduleName}/${relativePath}/${skillFile}`
191
215
  : `${this.bmadFolderName}/${moduleName}/${skillFile}`;
192
216
 
193
- // Skills derive canonicalId from directory name — never from manifest
194
- // (agent-type skills legitimately use canonicalId for agent-manifest mapping, so skip warning)
217
+ // Native SKILL.md entrypoints derive canonicalId from directory name.
218
+ // Agent entrypoints may keep canonicalId metadata for compatibility, so
219
+ // only warn for non-agent SKILL.md directories.
195
220
  if (manifest && manifest.__single && manifest.__single.canonicalId && artifactType !== 'agent') {
196
221
  console.warn(
197
- `Warning: Skill manifest at ${dir}/bmad-skill-manifest.yaml contains canonicalId — this field is ignored for skills (directory name is the canonical ID)`,
222
+ `Warning: Native entrypoint manifest at ${dir}/bmad-skill-manifest.yaml contains canonicalId — this field is ignored for SKILL.md directories (directory name is the canonical ID)`,
198
223
  );
199
224
  }
200
225
  const canonicalId = dirName;
@@ -224,21 +249,21 @@ class ManifestGenerator {
224
249
  }
225
250
  }
226
251
 
227
- // Warn if manifest says type:skill but directory was not claimed
252
+ // Warn if manifest says this is a native entrypoint but the directory was not claimed
228
253
  if (manifest && !this.skillClaimedDirs.has(dir)) {
229
- let hasSkillType = false;
254
+ let hasNativeSkillType = false;
230
255
  if (manifest.__single) {
231
- hasSkillType = manifest.__single.type === 'skill' || manifest.__single.type === 'agent';
256
+ hasNativeSkillType = this.isNativeSkillDirType(manifest.__single.type);
232
257
  } else {
233
258
  for (const key of Object.keys(manifest)) {
234
- if (manifest[key]?.type === 'skill' || manifest[key]?.type === 'agent') {
235
- hasSkillType = true;
259
+ if (this.isNativeSkillDirType(manifest[key]?.type)) {
260
+ hasNativeSkillType = true;
236
261
  break;
237
262
  }
238
263
  }
239
264
  }
240
- if (hasSkillType && debug) {
241
- console.log(`[DEBUG] collectSkills: dir has type:skill manifest but failed validation: ${dir}`);
265
+ if (hasNativeSkillType && debug) {
266
+ console.log(`[DEBUG] collectSkills: dir has native SKILL.md manifest but failed validation: ${dir}`);
242
267
  }
243
268
  }
244
269
 
@@ -1359,7 +1384,8 @@ class ManifestGenerator {
1359
1384
  const hasTasks = await fs.pathExists(path.join(modulePath, 'tasks'));
1360
1385
  const hasTools = await fs.pathExists(path.join(modulePath, 'tools'));
1361
1386
 
1362
- // Check for skill-only modules: recursive scan for bmad-skill-manifest.yaml with type: skill
1387
+ // Check for native-entrypoint-only modules: recursive scan for
1388
+ // bmad-skill-manifest.yaml with type: skill or type: agent
1363
1389
  let hasSkills = false;
1364
1390
  if (!hasAgents && !hasWorkflows && !hasTasks && !hasTools) {
1365
1391
  hasSkills = await this._hasSkillManifestRecursive(modulePath);
@@ -1378,7 +1404,8 @@ class ManifestGenerator {
1378
1404
  }
1379
1405
 
1380
1406
  /**
1381
- * Recursively check if a directory tree contains a bmad-skill-manifest.yaml with type: skill.
1407
+ * Recursively check if a directory tree contains a bmad-skill-manifest.yaml that
1408
+ * declares a native SKILL.md entrypoint (type: skill or type: agent).
1382
1409
  * Skips directories starting with . or _.
1383
1410
  * @param {string} dir - Directory to search
1384
1411
  * @returns {boolean} True if a skill manifest is found
@@ -1393,10 +1420,7 @@ class ManifestGenerator {
1393
1420
 
1394
1421
  // Check for manifest in this directory
1395
1422
  const manifest = await this.loadSkillManifest(dir);
1396
- if (manifest) {
1397
- const type = this.getArtifactType(manifest, 'workflow.md');
1398
- if (type === 'skill') return true;
1399
- }
1423
+ if (this.hasNativeSkillManifest(manifest)) return true;
1400
1424
 
1401
1425
  // Recurse into subdirectories
1402
1426
  for (const entry of entries) {
@@ -630,7 +630,7 @@ LOAD and execute from: {project-root}/{{bmadFolderName}}/{{path}}
630
630
  }
631
631
 
632
632
  /**
633
- * Install verbatim skill directories (type: skill entries from skill-manifest.csv).
633
+ * Install verbatim native SKILL.md directories from skill-manifest.csv.
634
634
  * Copies the entire source directory as-is into the IDE skill directory.
635
635
  * The source SKILL.md is used directly — no frontmatter transformation or file generation.
636
636
  * @param {string} projectDir - Project directory