@hyperdrive.bot/bmad-workflow 1.0.19 → 1.0.21

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.
@@ -26,6 +26,8 @@ export default class Workflow extends Command {
26
26
  static flags: {
27
27
  'auto-fix': import("@oclif/core/interfaces").BooleanFlag<boolean>;
28
28
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
+ 'dev-agent': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
30
+ 'sm-agent': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
31
  'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
30
32
  'epic-interval': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
31
33
  parallel: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
@@ -57,6 +57,12 @@ export default class Workflow extends Command {
57
57
  cwd: Flags.string({
58
58
  description: 'Working directory path to pass to AI agents. Agents will operate in this directory.',
59
59
  }),
60
+ 'dev-agent': Flags.string({
61
+ description: 'Absolute path to a custom dev agent file (default: .bmad-core/agents/dev.md)',
62
+ }),
63
+ 'sm-agent': Flags.string({
64
+ description: 'Absolute path to a custom SM (scrum master) agent file (default: .bmad-core/agents/sm.md)',
65
+ }),
60
66
  'dry-run': Flags.boolean({
61
67
  default: false,
62
68
  description: 'Preview actions without execution',
@@ -253,6 +259,7 @@ export default class Workflow extends Command {
253
259
  const config = {
254
260
  autoFix: flags['auto-fix'],
255
261
  cwd: flags.cwd,
262
+ devAgent: flags['dev-agent'],
256
263
  dryRun: flags['dry-run'],
257
264
  epicInterval: flags['epic-interval'],
258
265
  input: args.input,
@@ -277,6 +284,7 @@ export default class Workflow extends Command {
277
284
  reviewScanners: flags['review-scanners'],
278
285
  reviewTimeout: flags['review-timeout'],
279
286
  skipDev: flags['skip-dev'],
287
+ smAgent: flags['sm-agent'],
280
288
  skipEpics: flags['skip-epics'],
281
289
  skipStories: flags['skip-stories'],
282
290
  storyInterval: flags['story-interval'],
@@ -15,6 +15,22 @@ export interface WorkflowConfig {
15
15
  * @default false
16
16
  */
17
17
  autoFix?: boolean;
18
+ /**
19
+ * Absolute path to a custom dev agent file
20
+ *
21
+ * When specified, this file is used instead of the default `.bmad-core/agents/dev.md`
22
+ * in dev phase prompts.
23
+ * @example '/Users/marcelo/Developer/ds/super-repo/_bmad/bmm/agents/ibra.md'
24
+ */
25
+ devAgent?: string;
26
+ /**
27
+ * Absolute path to a custom SM (scrum master) agent file
28
+ *
29
+ * When specified, this file is used instead of the default `.bmad-core/agents/sm.md`
30
+ * in epic and story phase prompts.
31
+ * @example '/Users/marcelo/Developer/ds/super-repo/_bmad/bmm/agents/sm-custom.md'
32
+ */
33
+ smAgent?: string;
18
34
  /**
19
35
  * Working directory for agent execution
20
36
  *
@@ -118,6 +118,8 @@ export interface EpicPromptOptions {
118
118
  prefix: string;
119
119
  /** Reference file paths */
120
120
  references: string[];
121
+ /** Absolute path to a custom SM agent file (optional) */
122
+ smAgent?: string;
121
123
  }
122
124
  /**
123
125
  * Options for building a story creation prompt
@@ -133,6 +135,8 @@ export interface StoryPromptOptions {
133
135
  prefix: string;
134
136
  /** Reference file paths */
135
137
  references: string[];
138
+ /** Absolute path to a custom SM agent file (optional) */
139
+ smAgent?: string;
136
140
  }
137
141
  /**
138
142
  * WorkflowOrchestrator service for coordinating multi-phase workflows
@@ -170,10 +170,11 @@ export class WorkflowOrchestrator {
170
170
  * @private
171
171
  */
172
172
  buildEpicPrompt(epic, options) {
173
- const { cwd, outputPath, prdPath, references } = options;
173
+ const { cwd, outputPath, prdPath, references, smAgent } = options;
174
174
  const referencesText = references.length > 0 ? `\nReferences: ${references.join(', ')}` : '';
175
175
  const cwdText = cwd ? `\n\nWorking directory: ${cwd}` : '';
176
- return `@.bmad-core/agents/sm.md${cwdText}
176
+ const agentRef = smAgent ? `@${smAgent}` : `@.bmad-core/agents/sm.md`;
177
+ return `${agentRef}${cwdText}
177
178
 
178
179
  Create epic '${epic.number}: ${epic.title}' for PRD '${prdPath}'.${referencesText}.
179
180
 
@@ -216,10 +217,11 @@ Write output to: '${outputPath}'`;
216
217
  * @private
217
218
  */
218
219
  buildStoryPrompt(story, options) {
219
- const { cwd, epicPath, outputPath, references } = options;
220
+ const { cwd, epicPath, outputPath, references, smAgent } = options;
220
221
  const referencesText = references.length > 0 ? `\nReferences: ${references.join(', ')}` : '';
221
222
  const cwdText = cwd ? `\n\nWorking directory: ${cwd}` : '';
222
- return `@.bmad-core/agents/sm.md${cwdText}
223
+ const agentRef = smAgent ? `@${smAgent}` : `@.bmad-core/agents/sm.md`;
224
+ return `${agentRef}${cwdText}
223
225
 
224
226
  Create story '${story.fullNumber}: ${story.title}' for epic '${epicPath}'. ${referencesText}
225
227
 
@@ -624,7 +626,7 @@ Write output to: ${outputPath}`;
624
626
  // Build prompt with auto-detected references
625
627
  const mcpPrefix = await this.getMcpPromptPrefix('dev', 'dev', config);
626
628
  let prompt = mcpPrefix ? `${mcpPrefix}\n\n` : '';
627
- prompt += `@.bmad-core/agents/dev.md\n\n`;
629
+ prompt += config.devAgent ? `@${config.devAgent}\n\n` : `@.bmad-core/agents/dev.md\n\n`;
628
630
  // Add working directory instruction if specified
629
631
  if (config.cwd) {
630
632
  prompt += `Working directory: ${config.cwd}\n\n`;
@@ -899,7 +901,7 @@ Write output to: ${outputPath}`;
899
901
  // Build prompt with auto-detected references
900
902
  const mcpPrefix = await this.getMcpPromptPrefix('dev', 'dev', config);
901
903
  let prompt = mcpPrefix ? `${mcpPrefix}\n\n` : '';
902
- prompt += `@.bmad-core/agents/dev.md\n\n`;
904
+ prompt += config.devAgent ? `@${config.devAgent}\n\n` : `@.bmad-core/agents/dev.md\n\n`;
903
905
  // Add working directory instruction if specified
904
906
  if (config.cwd) {
905
907
  prompt += `Working directory: ${config.cwd}\n\n`;
@@ -1241,6 +1243,7 @@ Write output to: ${outputPath}`;
1241
1243
  prdPath: prdFilePath,
1242
1244
  prefix,
1243
1245
  references: config.references,
1246
+ smAgent: config.smAgent,
1244
1247
  });
1245
1248
  const prompt = mcpPrefix ? `${mcpPrefix}\n\n${basePrompt}` : basePrompt;
1246
1249
  // Log prompt if verbose
@@ -2232,6 +2235,7 @@ Write output to: ${outputPath}`;
2232
2235
  outputPath: storyFilePath,
2233
2236
  prefix,
2234
2237
  references: config.references,
2238
+ smAgent: config.smAgent,
2235
2239
  });
2236
2240
  const prompt = mcpPrefix ? `${mcpPrefix}\n\n${basePrompt}` : basePrompt;
2237
2241
  // Log prompt if verbose
@@ -2556,6 +2560,7 @@ Write output to: ${outputPath}`;
2556
2560
  outputPath: storyFilePath,
2557
2561
  prefix,
2558
2562
  references: config.references,
2563
+ smAgent: config.smAgent,
2559
2564
  });
2560
2565
  const prompt = mcpPrefix ? `${mcpPrefix}\n\n${basePrompt}` : basePrompt;
2561
2566
  // Log prompt if verbose
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hyperdrive.bot/bmad-workflow",
3
3
  "description": "AI-driven development workflow orchestration CLI for BMAD projects",
4
- "version": "1.0.19",
4
+ "version": "1.0.21",
5
5
  "author": {
6
6
  "name": "DevSquad",
7
7
  "email": "marcelo@devsquad.email",