@hyperdrive.bot/bmad-workflow 1.0.8 → 1.0.9

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.
@@ -35,6 +35,7 @@ export default class Decompose extends Command {
35
35
  execute: import("@oclif/core/interfaces").BooleanFlag<boolean>;
36
36
  'file-pattern': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
37
37
  'max-parallel': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
38
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
38
39
  'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
39
40
  'per-file': import("@oclif/core/interfaces").BooleanFlag<boolean>;
40
41
  'plan-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -73,6 +73,9 @@ export default class Decompose extends Command {
73
73
  default: 3,
74
74
  description: 'Maximum number of tasks to run in parallel',
75
75
  }),
76
+ model: Flags.string({
77
+ description: 'Model to use for AI provider. Format varies by provider: Claude (claude-opus-4-5-20251101), Gemini (gemini-2.5-pro), OpenCode (anthropic/claude-3-5-sonnet)',
78
+ }),
76
79
  'output-dir': Flags.string({
77
80
  default: 'docs/decompose-sessions',
78
81
  description: 'Directory for session outputs',
@@ -37,6 +37,7 @@ export default class EpicsCreate extends Command {
37
37
  start: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
38
38
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
39
39
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
41
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
41
42
  task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
42
43
  };
@@ -26,6 +26,7 @@ export default class PrdFix extends Command {
26
26
  static description: string;
27
27
  static examples: string[];
28
28
  static flags: {
29
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
29
30
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
30
31
  reference: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
31
32
  };
@@ -40,6 +40,9 @@ export default class PrdFix extends Command {
40
40
  '<%= config.bin %> <%= command.id %> docs/PRD-feature.md --provider gemini',
41
41
  ];
42
42
  static flags = {
43
+ model: Flags.string({
44
+ description: 'Model to use for AI provider. Format varies by provider: Claude (claude-opus-4-5-20251101), Gemini (gemini-2.5-pro), OpenCode (anthropic/claude-3-5-sonnet)',
45
+ }),
43
46
  provider: Flags.string({
44
47
  default: 'claude',
45
48
  description: 'AI provider to use (claude, gemini, or opencode)',
@@ -35,6 +35,7 @@ export default class StoriesCreateCommand extends Command {
35
35
  start: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
36
36
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
37
37
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
38
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
38
39
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
39
40
  task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
41
  };
@@ -37,6 +37,7 @@ export default class StoriesDevelopCommand extends Command {
37
37
  reference: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
38
38
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
39
39
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
40
41
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
41
42
  task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
42
43
  };
@@ -32,6 +32,7 @@ export default class StoriesQaCommand extends Command {
32
32
  'dev-prompt': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
33
33
  interval: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
34
34
  'max-retries': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
35
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
35
36
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
36
37
  'qa-prompt': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
37
38
  reference: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -73,6 +73,9 @@ export default class StoriesQaCommand extends Command {
73
73
  default: 2,
74
74
  description: 'Maximum QA → Dev fix cycles before giving up (0 = QA only, no fix-forward)',
75
75
  }),
76
+ model: Flags.string({
77
+ description: 'Model to use for AI provider. Format varies by provider: Claude (claude-opus-4-5-20251101), Gemini (gemini-2.5-pro), OpenCode (anthropic/claude-3-5-sonnet)',
78
+ }),
76
79
  provider: Flags.string({
77
80
  default: 'claude',
78
81
  description: 'AI provider to use (claude, gemini, or opencode)',
@@ -31,6 +31,7 @@ export default class Workflow extends Command {
31
31
  parallel: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
32
32
  pipeline: import("@oclif/core/interfaces").BooleanFlag<boolean>;
33
33
  'prd-interval': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
34
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
34
35
  prefix: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
35
36
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
36
37
  qa: import("@oclif/core/interfaces").BooleanFlag<boolean>;
@@ -72,6 +72,9 @@ export default class Workflow extends Command {
72
72
  default: 60,
73
73
  description: 'Seconds between epic creation batches',
74
74
  }),
75
+ model: Flags.string({
76
+ description: 'Model to use for AI provider. Format varies by provider: Claude (claude-opus-4-5-20251101), Gemini (gemini-2.5-pro), OpenCode (anthropic/claude-3-5-sonnet)',
77
+ }),
75
78
  prefix: Flags.string({
76
79
  default: '',
77
80
  description: 'Filename prefix for generated files',
@@ -151,6 +154,7 @@ export default class Workflow extends Command {
151
154
  dryRun: flags['dry-run'],
152
155
  epicInterval: flags['epic-interval'],
153
156
  input: args.input,
157
+ model: flags.model,
154
158
  parallel: flags.parallel,
155
159
  pipeline: flags.pipeline,
156
160
  prdInterval: flags['prd-interval'],
@@ -27,6 +27,13 @@ export interface AgentOptions {
27
27
  * Additional CLI flags to pass to the Claude executable
28
28
  */
29
29
  flags?: string[];
30
+ /**
31
+ * Model to use for this agent execution (provider-specific format)
32
+ * - Claude: e.g., 'claude-opus-4-5-20251101', 'claude-sonnet-4-5-20250929'
33
+ * - Gemini: e.g., 'gemini-2.5-pro', 'gemini-2.5-flash'
34
+ * - OpenCode: e.g., 'anthropic/claude-3-5-sonnet', 'openai/gpt-4o'
35
+ */
36
+ model?: string;
30
37
  /**
31
38
  * Callback invoked when prompt is sent (for logging)
32
39
  */
@@ -17,6 +17,10 @@ export interface ProviderConfig {
17
17
  * Default flags to pass to the CLI
18
18
  */
19
19
  flags: string[];
20
+ /**
21
+ * Flag used to specify model selection (e.g., '--model')
22
+ */
23
+ modelFlag: string;
20
24
  /**
21
25
  * Whether this provider supports @file references natively
22
26
  */
@@ -8,16 +8,19 @@ export const PROVIDER_CONFIGS = {
8
8
  claude: {
9
9
  command: 'claude',
10
10
  flags: ['--dangerously-skip-permissions', '--print'],
11
+ modelFlag: '--model',
11
12
  supportsFileReferences: true,
12
13
  },
13
14
  gemini: {
14
15
  command: 'gemini',
15
16
  flags: ['-p', '--yolo'],
17
+ modelFlag: '--model',
16
18
  supportsFileReferences: false,
17
19
  },
18
20
  opencode: {
19
21
  command: 'opencode',
20
22
  flags: ['run', '--format', 'json'],
23
+ modelFlag: '--model',
21
24
  supportsFileReferences: true,
22
25
  },
23
26
  };
@@ -68,6 +68,15 @@ export interface WorkflowConfig {
68
68
  * @default 60
69
69
  */
70
70
  prdInterval: number;
71
+ /**
72
+ * Model to use for AI provider
73
+ *
74
+ * Format varies by provider:
75
+ * - Claude: claude-opus-4-5-20251101, claude-sonnet-4-5-20250929
76
+ * - Gemini: gemini-2.5-pro, gemini-2.5-flash
77
+ * - OpenCode: anthropic/claude-3-5-sonnet, openai/gpt-4o
78
+ */
79
+ model?: string;
71
80
  /**
72
81
  * Filename prefix for generated files
73
82
  *
@@ -157,7 +157,8 @@ export class ClaudeAgentRunner {
157
157
  await writeFile(tempFile, prompt, 'utf8');
158
158
  // Build command with temp file
159
159
  const flags = this.config.flags.join(' ');
160
- const command = `${this.config.command} ${flags} < "${tempFile}"`;
160
+ const modelArg = options.model ? `${this.config.modelFlag} ${options.model}` : '';
161
+ const command = `${this.config.command} ${flags} ${modelArg} < "${tempFile}"`.replace(/\s+/g, ' ').trim();
161
162
  // Log the command being executed
162
163
  this.logger.info({
163
164
  promptLength: prompt.length,
@@ -150,7 +150,8 @@ export class GeminiAgentRunner {
150
150
  .replaceAll('$', String.raw `\$`);
151
151
  // Build command with provider config flags
152
152
  // Gemini uses -p flag which expects the prompt as the next argument
153
- const command = `${this.config.command} -p "${escapedPrompt}" --yolo < /dev/null`;
153
+ const modelArg = options.model ? `${this.config.modelFlag} ${options.model}` : '';
154
+ const command = `${this.config.command} -p "${escapedPrompt}" --yolo ${modelArg} < /dev/null`.replace(/\s+/g, ' ').trim();
154
155
  // Log the command being executed (truncated for readability)
155
156
  this.logger.info({
156
157
  commandLength: command.length,
@@ -156,9 +156,10 @@ export class OpenCodeAgentRunner {
156
156
  tempFile = join(tempDir, 'prompt.txt');
157
157
  await writeFile(tempFile, prompt, 'utf8');
158
158
  // Build command with --file flag (Open Code specific)
159
- // Format: opencode run --format json --file "${tempFile}"
159
+ // Format: opencode run --format json [--model provider/model] --file "${tempFile}"
160
160
  const flags = this.config.flags.join(' ');
161
- const command = `${this.config.command} ${flags} --file "${tempFile}"`;
161
+ const modelArg = options.model ? `${this.config.modelFlag} ${options.model}` : '';
162
+ const command = `${this.config.command} ${flags} ${modelArg} --file "${tempFile}"`.replace(/\s+/g, ' ').trim();
162
163
  // Log the command being executed
163
164
  this.logger.info({
164
165
  command,
@@ -23,6 +23,7 @@
23
23
  export declare const agentFlags: {
24
24
  agent: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
25
  cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ model: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
27
  provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
27
28
  task: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
29
  };
@@ -30,6 +30,10 @@ export const agentFlags = {
30
30
  description: 'Working directory path to pass to AI agents. Agents will operate in this directory.',
31
31
  helpGroup: 'Agent Customization',
32
32
  }),
33
+ model: Flags.string({
34
+ description: 'Model to use for AI provider. Format varies by provider: Claude (claude-opus-4-5-20251101), Gemini (gemini-2.5-pro), OpenCode (anthropic/claude-3-5-sonnet)',
35
+ helpGroup: 'Agent Customization',
36
+ }),
33
37
  provider: Flags.string({
34
38
  default: 'claude',
35
39
  description: 'AI provider to use (claude, gemini, or opencode). Defaults to claude.',
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.8",
4
+ "version": "1.0.9",
5
5
  "author": {
6
6
  "name": "DevSquad",
7
7
  "email": "marcelo@devsquad.email",