Compare commits

...

7 Commits

Author SHA1 Message Date
Phil 165ddc0524
Merge 6caca55e43 into 903710be1b 2026-01-29 12:28:46 -05:00
Michael Pursifull 903710be1b
fix: HELP_STEP placeholder not replaced in compiled agents, fix hardcoded path, fix single quote in HELP_STEP (#1437)
* fix: correct malformed XML syntax and remove hardcoded path

- Fix missing opening quote in activation-steps.txt: `n={HELP_STEP}"` → `n="{HELP_STEP}"`
- Remove spurious hyphen: `-Let` → `Let`
- Replace hardcoded `/Users/brianmadison/...` path with relative path

Fixes #1435

* fix: add missing HELP_STEP placeholder replacement

The activation-steps.txt template includes a {HELP_STEP} placeholder,
but activation-builder.js never calculated or replaced it. This caused
the literal string "{HELP_STEP}" to appear in compiled agent files.

Added helpStep calculation between menuStep and haltStep, and adjusted
subsequent step numbers accordingly.

Fixes #1441

* Update src/bmm/workflows/2-plan-workflows/create-prd/validation-report-prd-workflow.md

---------

Co-authored-by: Alex Verkhovsky <alexey.verkhovsky@gmail.com>
2026-01-29 05:58:56 -08:00
Phil 6caca55e43
Merge branch 'main' into dir-install-flag 2026-01-26 10:12:47 -05:00
Brian 2c3285f47e
Merge branch 'main' into dir-install-flag 2026-01-25 14:11:01 -06:00
Brian c46453259f
Merge branch 'main' into dir-install-flag 2026-01-24 19:46:50 -06:00
Phil 83ed3a978d
Merge branch 'main' into dir-install-flag 2026-01-23 13:09:19 -05:00
Phil Mahncke 3dd05b0584 feat: enhance install command with directory option and update prompt logic
Added a new CLI option for specifying the target project directory, allowing users to skip the interactive prompt. Updated the installation prompt method to accept options and handle directory validation accordingly.
2026-01-22 22:31:13 -05:00
4 changed files with 29 additions and 9 deletions

View File

@ -8,7 +8,7 @@ validationStatus: COMPLETE - PRODUCTION READY
# PRD Workflow Validation Report # PRD Workflow Validation Report
**Workflow Being Validated:** /Users/brianmadison/dev/BMAD-METHOD/src/bmm/workflows/2-plan-workflows/create-prd **Workflow Being Validated:** _bmad/bmm/workflows/2-plan-workflows/create-prd
**Validation Date:** 2026-01-08 **Validation Date:** 2026-01-08
**Validator:** BMAD Workflow Validation System **Validator:** BMAD Workflow Validation System

View File

@ -9,7 +9,10 @@ const ui = new UI();
module.exports = { module.exports = {
command: 'install', command: 'install',
description: 'Install BMAD Core agents and tools', description: 'Install BMAD Core agents and tools',
options: [['-d, --debug', 'Enable debug output for manifest generation']], options: [
['-d, --debug', 'Enable debug output for manifest generation'],
['-D, --directory <path>', 'Target project directory (skips interactive prompt)'],
],
action: async (options) => { action: async (options) => {
try { try {
// Set debug flag as environment variable for all components // Set debug flag as environment variable for all components
@ -18,7 +21,7 @@ module.exports = {
console.log(chalk.cyan('Debug mode enabled\n')); console.log(chalk.cyan('Debug mode enabled\n'));
} }
const config = await ui.promptInstall(); const config = await ui.promptInstall(options);
// Handle cancel // Handle cancel
if (config.actionType === 'cancel') { if (config.actionType === 'cancel') {

View File

@ -121,9 +121,10 @@ class ActivationBuilder {
// Calculate final step numbers // Calculate final step numbers
const menuStep = currentStepNum; const menuStep = currentStepNum;
const haltStep = currentStepNum + 1; const helpStep = currentStepNum + 1;
const inputStep = currentStepNum + 2; const haltStep = currentStepNum + 2;
const executeStep = currentStepNum + 3; const inputStep = currentStepNum + 3;
const executeStep = currentStepNum + 4;
// Replace placeholders // Replace placeholders
const processed = stepsTemplate const processed = stepsTemplate
@ -131,6 +132,7 @@ class ActivationBuilder {
.replace('{{module}}', metadata.module || 'core') // Fixed to use {{module}} .replace('{{module}}', metadata.module || 'core') // Fixed to use {{module}}
.replace('{AGENT_SPECIFIC_STEPS}', agentStepsXml) .replace('{AGENT_SPECIFIC_STEPS}', agentStepsXml)
.replace('{MENU_STEP}', menuStep.toString()) .replace('{MENU_STEP}', menuStep.toString())
.replace('{HELP_STEP}', helpStep.toString())
.replace('{HALT_STEP}', haltStep.toString()) .replace('{HALT_STEP}', haltStep.toString())
.replace('{INPUT_STEP}', inputStep.toString()) .replace('{INPUT_STEP}', inputStep.toString())
.replace('{EXECUTE_STEP}', executeStep.toString()); .replace('{EXECUTE_STEP}', executeStep.toString());

View File

@ -26,9 +26,10 @@ const choiceUtils = { Separator };
class UI { class UI {
/** /**
* Prompt for installation configuration * Prompt for installation configuration
* @param {Object} options - CLI options object (may contain directory property)
* @returns {Object} Installation configuration * @returns {Object} Installation configuration
*/ */
async promptInstall() { async promptInstall(options = {}) {
CLIUtils.displayLogo(); CLIUtils.displayLogo();
// Display version-specific start message from install-messages.yaml // Display version-specific start message from install-messages.yaml
@ -36,7 +37,7 @@ class UI {
const messageLoader = new MessageLoader(); const messageLoader = new MessageLoader();
messageLoader.displayStartMessage(); messageLoader.displayStartMessage();
const confirmedDirectory = await this.getConfirmedDirectory(); const confirmedDirectory = await this.getConfirmedDirectory(options);
// Preflight: Check for legacy BMAD v4 footprints immediately after getting directory // Preflight: Check for legacy BMAD v4 footprints immediately after getting directory
const { Detector } = require('../installers/lib/core/detector'); const { Detector } = require('../installers/lib/core/detector');
@ -506,9 +507,23 @@ class UI {
/** /**
* Get confirmed directory from user * Get confirmed directory from user
* @param {Object} options - CLI options object (may contain directory property)
* @returns {string} Confirmed directory path * @returns {string} Confirmed directory path
*/ */
async getConfirmedDirectory() { async getConfirmedDirectory(options = {}) {
// If directory provided via CLI, validate and return it
if (options.directory) {
const expandedPath = this.expandUserPath(options.directory);
const validationError = this.validateDirectorySync(expandedPath);
if (validationError) {
throw new Error(`Invalid directory: ${validationError}`);
}
await this.displayDirectoryInfo(expandedPath);
// Skip confirmation for CLI-provided directories
return expandedPath;
}
// Existing interactive prompt logic
let confirmedDirectory = null; let confirmedDirectory = null;
while (!confirmedDirectory) { while (!confirmedDirectory) {
const directoryAnswer = await this.promptForDirectory(); const directoryAnswer = await this.promptForDirectory();