@hyperdrive.bot/bmad-workflow 1.0.2
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/LICENSE +21 -0
- package/README.md +1017 -0
- package/bin/dev +5 -0
- package/bin/dev.cmd +3 -0
- package/bin/dev.js +5 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/bin/run.js +5 -0
- package/dist/commands/config/show.d.ts +34 -0
- package/dist/commands/config/show.js +108 -0
- package/dist/commands/config/validate.d.ts +29 -0
- package/dist/commands/config/validate.js +131 -0
- package/dist/commands/decompose.d.ts +79 -0
- package/dist/commands/decompose.js +327 -0
- package/dist/commands/demo.d.ts +18 -0
- package/dist/commands/demo.js +107 -0
- package/dist/commands/epics/create.d.ts +123 -0
- package/dist/commands/epics/create.js +459 -0
- package/dist/commands/epics/list.d.ts +120 -0
- package/dist/commands/epics/list.js +280 -0
- package/dist/commands/hello/index.d.ts +12 -0
- package/dist/commands/hello/index.js +34 -0
- package/dist/commands/hello/world.d.ts +8 -0
- package/dist/commands/hello/world.js +24 -0
- package/dist/commands/prd/fix.d.ts +39 -0
- package/dist/commands/prd/fix.js +140 -0
- package/dist/commands/prd/validate.d.ts +112 -0
- package/dist/commands/prd/validate.js +302 -0
- package/dist/commands/stories/create.d.ts +95 -0
- package/dist/commands/stories/create.js +431 -0
- package/dist/commands/stories/develop.d.ts +91 -0
- package/dist/commands/stories/develop.js +460 -0
- package/dist/commands/stories/list.d.ts +84 -0
- package/dist/commands/stories/list.js +291 -0
- package/dist/commands/stories/move.d.ts +66 -0
- package/dist/commands/stories/move.js +273 -0
- package/dist/commands/stories/qa.d.ts +99 -0
- package/dist/commands/stories/qa.js +530 -0
- package/dist/commands/workflow.d.ts +97 -0
- package/dist/commands/workflow.js +390 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/agent-options.d.ts +50 -0
- package/dist/models/agent-options.js +1 -0
- package/dist/models/agent-result.d.ts +29 -0
- package/dist/models/agent-result.js +1 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/dist/models/phase-result.d.ts +65 -0
- package/dist/models/phase-result.js +7 -0
- package/dist/models/provider.d.ts +28 -0
- package/dist/models/provider.js +18 -0
- package/dist/models/story.d.ts +154 -0
- package/dist/models/story.js +18 -0
- package/dist/models/workflow-config.d.ts +148 -0
- package/dist/models/workflow-config.js +1 -0
- package/dist/models/workflow-result.d.ts +164 -0
- package/dist/models/workflow-result.js +7 -0
- package/dist/services/agents/agent-runner-factory.d.ts +31 -0
- package/dist/services/agents/agent-runner-factory.js +44 -0
- package/dist/services/agents/agent-runner.d.ts +46 -0
- package/dist/services/agents/agent-runner.js +29 -0
- package/dist/services/agents/claude-agent-runner.d.ts +81 -0
- package/dist/services/agents/claude-agent-runner.js +332 -0
- package/dist/services/agents/gemini-agent-runner.d.ts +82 -0
- package/dist/services/agents/gemini-agent-runner.js +350 -0
- package/dist/services/agents/index.d.ts +7 -0
- package/dist/services/agents/index.js +7 -0
- package/dist/services/file-system/file-manager.d.ts +110 -0
- package/dist/services/file-system/file-manager.js +223 -0
- package/dist/services/file-system/glob-matcher.d.ts +75 -0
- package/dist/services/file-system/glob-matcher.js +126 -0
- package/dist/services/file-system/path-resolver.d.ts +183 -0
- package/dist/services/file-system/path-resolver.js +400 -0
- package/dist/services/logging/workflow-logger.d.ts +232 -0
- package/dist/services/logging/workflow-logger.js +552 -0
- package/dist/services/orchestration/batch-processor.d.ts +113 -0
- package/dist/services/orchestration/batch-processor.js +187 -0
- package/dist/services/orchestration/dependency-graph-executor.d.ts +60 -0
- package/dist/services/orchestration/dependency-graph-executor.js +447 -0
- package/dist/services/orchestration/index.d.ts +10 -0
- package/dist/services/orchestration/index.js +8 -0
- package/dist/services/orchestration/input-detector.d.ts +125 -0
- package/dist/services/orchestration/input-detector.js +381 -0
- package/dist/services/orchestration/story-queue.d.ts +94 -0
- package/dist/services/orchestration/story-queue.js +170 -0
- package/dist/services/orchestration/story-type-detector.d.ts +80 -0
- package/dist/services/orchestration/story-type-detector.js +258 -0
- package/dist/services/orchestration/task-decomposition-service.d.ts +67 -0
- package/dist/services/orchestration/task-decomposition-service.js +607 -0
- package/dist/services/orchestration/workflow-orchestrator.d.ts +659 -0
- package/dist/services/orchestration/workflow-orchestrator.js +2201 -0
- package/dist/services/parsers/epic-parser.d.ts +117 -0
- package/dist/services/parsers/epic-parser.js +264 -0
- package/dist/services/parsers/prd-fixer.d.ts +86 -0
- package/dist/services/parsers/prd-fixer.js +194 -0
- package/dist/services/parsers/prd-parser.d.ts +123 -0
- package/dist/services/parsers/prd-parser.js +286 -0
- package/dist/services/parsers/standalone-story-parser.d.ts +114 -0
- package/dist/services/parsers/standalone-story-parser.js +255 -0
- package/dist/services/parsers/story-parser-factory.d.ts +81 -0
- package/dist/services/parsers/story-parser-factory.js +108 -0
- package/dist/services/parsers/story-parser.d.ts +122 -0
- package/dist/services/parsers/story-parser.js +262 -0
- package/dist/services/scaffolding/decompose-session-scaffolder.d.ts +74 -0
- package/dist/services/scaffolding/decompose-session-scaffolder.js +315 -0
- package/dist/services/scaffolding/file-scaffolder.d.ts +94 -0
- package/dist/services/scaffolding/file-scaffolder.js +314 -0
- package/dist/services/validation/config-validator.d.ts +88 -0
- package/dist/services/validation/config-validator.js +167 -0
- package/dist/types/task-graph.d.ts +142 -0
- package/dist/types/task-graph.js +5 -0
- package/dist/utils/colors.d.ts +49 -0
- package/dist/utils/colors.js +50 -0
- package/dist/utils/error-formatter.d.ts +64 -0
- package/dist/utils/error-formatter.js +279 -0
- package/dist/utils/errors.d.ts +170 -0
- package/dist/utils/errors.js +233 -0
- package/dist/utils/formatters.d.ts +84 -0
- package/dist/utils/formatters.js +162 -0
- package/dist/utils/logger.d.ts +63 -0
- package/dist/utils/logger.js +78 -0
- package/dist/utils/progress.d.ts +104 -0
- package/dist/utils/progress.js +161 -0
- package/dist/utils/retry.d.ts +114 -0
- package/dist/utils/retry.js +160 -0
- package/dist/utils/shared-flags.d.ts +28 -0
- package/dist/utils/shared-flags.js +43 -0
- package/package.json +119 -0
package/bin/dev
ADDED
package/bin/dev.cmd
ADDED
package/bin/dev.js
ADDED
package/bin/run
ADDED
package/bin/run.cmd
ADDED
package/bin/run.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Show Command
|
|
3
|
+
*
|
|
4
|
+
* Displays current BMAD configuration from .bmad-core/core-config.yaml
|
|
5
|
+
* Supports both human-readable YAML and machine-readable JSON output.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
|
+
/**
|
|
9
|
+
* Show Command - Displays current BMAD configuration
|
|
10
|
+
*
|
|
11
|
+
* Reads .bmad-core/core-config.yaml and displays its contents in either
|
|
12
|
+
* YAML format (default) or JSON format (with --json flag).
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // Display config in YAML format
|
|
16
|
+
* bmad-workflow config show
|
|
17
|
+
*
|
|
18
|
+
* // Display config as JSON
|
|
19
|
+
* bmad-workflow config show --json
|
|
20
|
+
*/
|
|
21
|
+
export default class Show extends Command {
|
|
22
|
+
static description: string;
|
|
23
|
+
static examples: string[];
|
|
24
|
+
static flags: {
|
|
25
|
+
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Execute the show command
|
|
29
|
+
*
|
|
30
|
+
* Loads configuration file, parses YAML, and displays in requested format.
|
|
31
|
+
* Handles missing file and parse errors gracefully with user-friendly messages.
|
|
32
|
+
*/
|
|
33
|
+
run(): Promise<void>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Show Command
|
|
3
|
+
*
|
|
4
|
+
* Displays current BMAD configuration from .bmad-core/core-config.yaml
|
|
5
|
+
* Supports both human-readable YAML and machine-readable JSON output.
|
|
6
|
+
*/
|
|
7
|
+
import { Command, Flags } from '@oclif/core';
|
|
8
|
+
import { dump, load } from 'js-yaml';
|
|
9
|
+
import { FileManager } from '../../services/file-system/file-manager.js';
|
|
10
|
+
import * as colors from '../../utils/colors.js';
|
|
11
|
+
import { ConfigurationError, FileSystemError } from '../../utils/errors.js';
|
|
12
|
+
import { createLogger } from '../../utils/logger.js';
|
|
13
|
+
const logger = createLogger({ namespace: 'commands:config:show' });
|
|
14
|
+
/**
|
|
15
|
+
* Default path to configuration file relative to project root
|
|
16
|
+
*/
|
|
17
|
+
const CONFIG_FILE_PATH = '.bmad-core/core-config.yaml';
|
|
18
|
+
/**
|
|
19
|
+
* Show Command - Displays current BMAD configuration
|
|
20
|
+
*
|
|
21
|
+
* Reads .bmad-core/core-config.yaml and displays its contents in either
|
|
22
|
+
* YAML format (default) or JSON format (with --json flag).
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Display config in YAML format
|
|
26
|
+
* bmad-workflow config show
|
|
27
|
+
*
|
|
28
|
+
* // Display config as JSON
|
|
29
|
+
* bmad-workflow config show --json
|
|
30
|
+
*/
|
|
31
|
+
export default class Show extends Command {
|
|
32
|
+
static description = 'Display current BMAD configuration from .bmad-core/core-config.yaml';
|
|
33
|
+
static examples = ['<%= config.bin %> <%= command.id %>', '<%= config.bin %> <%= command.id %> --json'];
|
|
34
|
+
static flags = {
|
|
35
|
+
json: Flags.boolean({
|
|
36
|
+
default: false,
|
|
37
|
+
description: 'Output configuration as JSON instead of YAML',
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Execute the show command
|
|
42
|
+
*
|
|
43
|
+
* Loads configuration file, parses YAML, and displays in requested format.
|
|
44
|
+
* Handles missing file and parse errors gracefully with user-friendly messages.
|
|
45
|
+
*/
|
|
46
|
+
async run() {
|
|
47
|
+
const { flags } = await this.parse(Show);
|
|
48
|
+
logger.info('Running config show command with flags: %O', flags);
|
|
49
|
+
// Initialize FileManager
|
|
50
|
+
const fileManager = new FileManager(logger);
|
|
51
|
+
try {
|
|
52
|
+
// Resolve config file path (relative to current working directory)
|
|
53
|
+
const configPath = `${process.cwd()}/${CONFIG_FILE_PATH}`;
|
|
54
|
+
logger.info('Loading configuration from: %s', configPath);
|
|
55
|
+
// Check if config file exists
|
|
56
|
+
const exists = await fileManager.fileExists(configPath);
|
|
57
|
+
if (!exists) {
|
|
58
|
+
const errorMsg = `Configuration file not found at '${CONFIG_FILE_PATH}'. Ensure you're running this command from the project root directory.`;
|
|
59
|
+
this.error(colors.error(errorMsg), { exit: 1 });
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Read configuration file
|
|
63
|
+
const fileContent = await fileManager.readFile(configPath);
|
|
64
|
+
logger.debug('Configuration file read successfully');
|
|
65
|
+
// Parse YAML
|
|
66
|
+
let config;
|
|
67
|
+
try {
|
|
68
|
+
config = load(fileContent);
|
|
69
|
+
logger.debug('YAML parsed successfully');
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
// YAML syntax error - extract line information if available
|
|
73
|
+
const yamlError = error;
|
|
74
|
+
const lineInfo = yamlError.mark ? ` at line ${yamlError.mark.line + 1}` : '';
|
|
75
|
+
const errorMsg = `Invalid YAML syntax in '${CONFIG_FILE_PATH}'${lineInfo}: ${yamlError.message}`;
|
|
76
|
+
this.error(colors.error(errorMsg), { exit: 1 });
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// Display configuration in requested format
|
|
80
|
+
if (flags.json) {
|
|
81
|
+
// JSON output - machine-readable
|
|
82
|
+
this.log(JSON.stringify(config, null, 2));
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
// YAML output - human-readable with formatting
|
|
86
|
+
this.log(colors.bold('Configuration (.bmad-core/core-config.yaml):'));
|
|
87
|
+
this.log('');
|
|
88
|
+
this.log(dump(config, { indent: 2, lineWidth: 120 }));
|
|
89
|
+
}
|
|
90
|
+
logger.info('Configuration displayed successfully');
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
// Handle FileSystemError and other unexpected errors
|
|
94
|
+
if (error instanceof FileSystemError) {
|
|
95
|
+
this.error(colors.error(error.message), { exit: 1 });
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (error instanceof ConfigurationError) {
|
|
99
|
+
this.error(colors.error(error.message), { exit: 1 });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
// Unexpected error
|
|
103
|
+
const err = error;
|
|
104
|
+
logger.error('Unexpected error: %O', err);
|
|
105
|
+
this.error(colors.error(`Unexpected error: ${err.message}`), { exit: 1 });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Validate Command
|
|
3
|
+
*
|
|
4
|
+
* Validates BMAD configuration from .bmad-core/core-config.yaml
|
|
5
|
+
* Reports specific validation errors with field names and expected types.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
|
+
/**
|
|
9
|
+
* Validate Command - Validates BMAD configuration
|
|
10
|
+
*
|
|
11
|
+
* Reads .bmad-core/core-config.yaml, validates structure and types,
|
|
12
|
+
* and reports any errors with specific field information.
|
|
13
|
+
* Exits with code 0 for valid configuration, 1 for invalid.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* // Validate configuration
|
|
17
|
+
* bmad-workflow config validate
|
|
18
|
+
*/
|
|
19
|
+
export default class Validate extends Command {
|
|
20
|
+
static description: string;
|
|
21
|
+
static examples: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Execute the validate command
|
|
24
|
+
*
|
|
25
|
+
* Loads configuration file, parses YAML, validates structure,
|
|
26
|
+
* and reports validation status with detailed errors if invalid.
|
|
27
|
+
*/
|
|
28
|
+
run(): Promise<void>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Validate Command
|
|
3
|
+
*
|
|
4
|
+
* Validates BMAD configuration from .bmad-core/core-config.yaml
|
|
5
|
+
* Reports specific validation errors with field names and expected types.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
|
+
import { load as yamlLoad } from 'js-yaml';
|
|
9
|
+
import { FileManager } from '../../services/file-system/file-manager.js';
|
|
10
|
+
import { ConfigValidator } from '../../services/validation/config-validator.js';
|
|
11
|
+
import * as colors from '../../utils/colors.js';
|
|
12
|
+
import { FileSystemError, ValidationError } from '../../utils/errors.js';
|
|
13
|
+
import { createLogger } from '../../utils/logger.js';
|
|
14
|
+
const logger = createLogger({ namespace: 'commands:config:validate' });
|
|
15
|
+
/**
|
|
16
|
+
* Default path to configuration file relative to project root
|
|
17
|
+
*/
|
|
18
|
+
const CONFIG_FILE_PATH = '.bmad-core/core-config.yaml';
|
|
19
|
+
/**
|
|
20
|
+
* Validate Command - Validates BMAD configuration
|
|
21
|
+
*
|
|
22
|
+
* Reads .bmad-core/core-config.yaml, validates structure and types,
|
|
23
|
+
* and reports any errors with specific field information.
|
|
24
|
+
* Exits with code 0 for valid configuration, 1 for invalid.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Validate configuration
|
|
28
|
+
* bmad-workflow config validate
|
|
29
|
+
*/
|
|
30
|
+
export default class Validate extends Command {
|
|
31
|
+
static description = 'Validate BMAD configuration from .bmad-core/core-config.yaml';
|
|
32
|
+
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
33
|
+
/**
|
|
34
|
+
* Execute the validate command
|
|
35
|
+
*
|
|
36
|
+
* Loads configuration file, parses YAML, validates structure,
|
|
37
|
+
* and reports validation status with detailed errors if invalid.
|
|
38
|
+
*/
|
|
39
|
+
async run() {
|
|
40
|
+
logger.info('Running config validate command');
|
|
41
|
+
// Initialize services
|
|
42
|
+
const fileManager = new FileManager(logger);
|
|
43
|
+
const configValidator = new ConfigValidator(fileManager, logger);
|
|
44
|
+
try {
|
|
45
|
+
// Resolve config file path (relative to current working directory)
|
|
46
|
+
const configPath = `${process.cwd()}/${CONFIG_FILE_PATH}`;
|
|
47
|
+
logger.info('Loading configuration from: %s', configPath);
|
|
48
|
+
// Check if config file exists
|
|
49
|
+
const exists = await fileManager.fileExists(configPath);
|
|
50
|
+
if (!exists) {
|
|
51
|
+
const errorMsg = `Configuration file not found at '${CONFIG_FILE_PATH}'. Ensure you're running this command from the project root directory.`;
|
|
52
|
+
this.log(colors.error(errorMsg));
|
|
53
|
+
this.exit(1);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
// Read configuration file
|
|
57
|
+
const fileContent = await fileManager.readFile(configPath);
|
|
58
|
+
logger.debug('Configuration file read successfully');
|
|
59
|
+
// Parse YAML
|
|
60
|
+
let config;
|
|
61
|
+
try {
|
|
62
|
+
config = yamlLoad(fileContent);
|
|
63
|
+
logger.debug('YAML parsed successfully');
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
// YAML syntax error - extract line information if available
|
|
67
|
+
const yamlError = error;
|
|
68
|
+
const lineInfo = yamlError.mark ? ` at line ${yamlError.mark.line + 1}` : '';
|
|
69
|
+
this.log(colors.error('Configuration validation failed:'));
|
|
70
|
+
this.log('');
|
|
71
|
+
this.log(` ${colors.bold('YAML Syntax Error')}`);
|
|
72
|
+
this.log(` Location: ${CONFIG_FILE_PATH}${lineInfo}`);
|
|
73
|
+
this.log(` Error: ${yamlError.message}`);
|
|
74
|
+
if (yamlError.mark) {
|
|
75
|
+
this.log('');
|
|
76
|
+
this.log(` Problematic line ${yamlError.mark.line + 1}:`);
|
|
77
|
+
const lines = fileContent.split('\n');
|
|
78
|
+
const problematicLine = lines[yamlError.mark.line];
|
|
79
|
+
if (problematicLine !== undefined) {
|
|
80
|
+
this.log(` ${colors.dim(problematicLine)}`);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
this.exit(1);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
// Validate configuration against schema
|
|
87
|
+
try {
|
|
88
|
+
await configValidator.validate(config);
|
|
89
|
+
// Validation successful
|
|
90
|
+
this.log(colors.success('Configuration is valid'));
|
|
91
|
+
logger.info('Configuration validation successful');
|
|
92
|
+
this.exit(0);
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
// Validation failed - display detailed error information
|
|
96
|
+
if (error instanceof ValidationError) {
|
|
97
|
+
this.log(colors.error('Configuration validation failed:'));
|
|
98
|
+
this.log('');
|
|
99
|
+
// Parse error message to extract field and details
|
|
100
|
+
const errorMsg = error.message;
|
|
101
|
+
const context = error.context;
|
|
102
|
+
if (context?.field) {
|
|
103
|
+
this.log(` ${colors.bold('Field:')} ${context.field}`);
|
|
104
|
+
}
|
|
105
|
+
this.log(` ${colors.bold('Error:')} ${errorMsg}`);
|
|
106
|
+
if (context?.received !== undefined) {
|
|
107
|
+
this.log(` ${colors.bold('Received:')} ${JSON.stringify(context.received)}`);
|
|
108
|
+
}
|
|
109
|
+
logger.error('Configuration validation failed: %s', errorMsg);
|
|
110
|
+
this.exit(1);
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
// Re-throw unexpected errors
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
// Handle FileSystemError and other unexpected errors
|
|
119
|
+
if (error instanceof FileSystemError) {
|
|
120
|
+
this.log(colors.error(error.message));
|
|
121
|
+
this.exit(1);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
// Unexpected error
|
|
125
|
+
const err = error;
|
|
126
|
+
logger.error('Unexpected error: %O', err);
|
|
127
|
+
this.log(colors.error(`Unexpected error: ${err.message}`));
|
|
128
|
+
this.exit(1);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decompose Command
|
|
3
|
+
*
|
|
4
|
+
* Decomposes large goals into executable task graphs with dependency management.
|
|
5
|
+
* Supports per-file task generation, parallel execution, and intelligent dependency resolution.
|
|
6
|
+
*/
|
|
7
|
+
import { Command } from '@oclif/core';
|
|
8
|
+
/**
|
|
9
|
+
* Decompose Command
|
|
10
|
+
*
|
|
11
|
+
* Breaks down large goals into small, executable tasks with dependency management.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```bash
|
|
15
|
+
* # Decompose a goal with per-file mode
|
|
16
|
+
* bmad-cli decompose "Migrate project to TypeScript" --per-file --file-pattern "src/*.js"
|
|
17
|
+
*
|
|
18
|
+
* # Plan only without execution
|
|
19
|
+
* bmad-cli decompose "Add authentication" --plan-only
|
|
20
|
+
*
|
|
21
|
+
* # Execute with custom context
|
|
22
|
+
* bmad-cli decompose "Refactor API layer" --context package.json --context tsconfig.json --execute
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export default class Decompose extends Command {
|
|
26
|
+
static args: {
|
|
27
|
+
goal: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
28
|
+
};
|
|
29
|
+
static description: string;
|
|
30
|
+
static examples: string[];
|
|
31
|
+
static flags: {
|
|
32
|
+
agent: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
33
|
+
context: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
34
|
+
cwd: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
35
|
+
execute: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
36
|
+
'file-pattern': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
37
|
+
'max-parallel': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
38
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
39
|
+
'per-file': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
40
|
+
'plan-only': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
41
|
+
provider: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
42
|
+
'story-format': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
43
|
+
'story-prefix': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
44
|
+
'task-timeout': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
45
|
+
verbose: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
46
|
+
};
|
|
47
|
+
private cancelled;
|
|
48
|
+
private fileManager;
|
|
49
|
+
private logger;
|
|
50
|
+
private scaffolder;
|
|
51
|
+
/**
|
|
52
|
+
* Main command execution
|
|
53
|
+
*/
|
|
54
|
+
run(): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Confirm execution with user
|
|
57
|
+
*/
|
|
58
|
+
private confirmExecution;
|
|
59
|
+
/**
|
|
60
|
+
* Display execution results
|
|
61
|
+
*/
|
|
62
|
+
private displayExecutionResults;
|
|
63
|
+
/**
|
|
64
|
+
* Display command header
|
|
65
|
+
*/
|
|
66
|
+
private displayHeader;
|
|
67
|
+
/**
|
|
68
|
+
* Display task graph summary
|
|
69
|
+
*/
|
|
70
|
+
private displayTaskGraphSummary;
|
|
71
|
+
/**
|
|
72
|
+
* Initialize services
|
|
73
|
+
*/
|
|
74
|
+
private initializeServices;
|
|
75
|
+
/**
|
|
76
|
+
* Register signal handlers for graceful cancellation
|
|
77
|
+
*/
|
|
78
|
+
private registerSignalHandlers;
|
|
79
|
+
}
|