Compare commits
5 Commits
cc188dd643
...
72bc56af4f
| Author | SHA1 | Date |
|---|---|---|
|
|
72bc56af4f | |
|
|
79959e75ac | |
|
|
c46453259f | |
|
|
83ed3a978d | |
|
|
3dd05b0584 |
|
|
@ -88,11 +88,11 @@ Use holistic judgment, not mechanical keyword matching.
|
|||
|
||||
### No Escalation (simple request)
|
||||
|
||||
Display: "**Select:** [T] Plan first (tech-spec) [E] Execute directly"
|
||||
Display: "**Select:** [P] Plan first (tech-spec) [E] Execute directly"
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF T: Direct user to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF P: Direct user to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF E: Ask for any additional guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md`
|
||||
|
||||
#### EXECUTION RULES:
|
||||
|
|
@ -108,13 +108,13 @@ Present: "This looks like a focused feature with multiple components."
|
|||
|
||||
Display:
|
||||
|
||||
**[T] Create tech-spec first** (recommended)
|
||||
**[P] Plan first (tech-spec)** (recommended)
|
||||
**[W] Seems bigger than quick-dev** - Recommend the Full BMad Flow PRD Process
|
||||
**[E] Execute directly**
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF T: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF P: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF W: Direct user to run the PRD workflow instead. **EXIT Quick Dev.**
|
||||
- IF E: Ask for guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md`
|
||||
|
||||
|
|
@ -132,12 +132,12 @@ Present: "This sounds like platform/system work."
|
|||
Display:
|
||||
|
||||
**[W] Start BMad Method** (recommended)
|
||||
**[T] Create tech-spec** (lighter planning)
|
||||
**[P] Plan first (tech-spec)** (lighter planning)
|
||||
**[E] Execute directly** - feeling lucky
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF T: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF P: Direct to `{quick_spec_workflow}`. **EXIT Quick Dev.**
|
||||
- IF W: Direct user to run the PRD workflow instead. **EXIT Quick Dev.**
|
||||
- IF E: Ask for guidance, then **NEXT:** Read fully and follow: `step-02-context-gathering.md`
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ Display:
|
|||
|
||||
- Mode A (tech-spec): "**NEXT:** read fully and follow: `step-03-execute.md`"
|
||||
- Mode B (direct, [E] selected): "**NEXT:** Read fully and follow: `step-02-context-gathering.md`"
|
||||
- Escalation ([T] or [W]): "**EXITING Quick Dev.** Follow the directed workflow."
|
||||
- Escalation ([P] or [W]): "**EXITING Quick Dev.** Follow the directed workflow."
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -29,15 +29,15 @@ Present: "How would you like to handle these findings?"
|
|||
|
||||
Display:
|
||||
|
||||
**[1] Walk through** - Discuss each finding individually
|
||||
**[2] Auto-fix** - Automatically fix issues classified as "real"
|
||||
**[3] Skip** - Acknowledge and proceed to commit
|
||||
**[W] Walk through** - Discuss each finding individually
|
||||
**[F] Fix automatically** - Automatically fix issues classified as "real"
|
||||
**[S] Skip** - Acknowledge and proceed to commit
|
||||
|
||||
### Menu Handling Logic:
|
||||
|
||||
- IF 1: Execute OPTION 1 (Walk Through) below
|
||||
- IF 2: Execute OPTION 2 (Auto-fix) below
|
||||
- IF 3: Execute OPTION 3 (Skip) below
|
||||
- IF W: Execute WALK THROUGH section below
|
||||
- IF F: Execute FIX AUTOMATICALLY section below
|
||||
- IF S: Execute SKIP section below
|
||||
|
||||
### EXECUTION RULES:
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ Display:
|
|||
|
||||
---
|
||||
|
||||
## OPTION 1: WALK THROUGH
|
||||
## WALK THROUGH [W]
|
||||
|
||||
For each finding in order:
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ After all findings processed, summarize what was fixed/skipped.
|
|||
|
||||
---
|
||||
|
||||
## OPTION 2: AUTO-FIX
|
||||
## FIX AUTOMATICALLY [F]
|
||||
|
||||
1. Filter findings to only those classified as "real"
|
||||
2. Apply fixes for each real finding
|
||||
|
|
@ -78,7 +78,7 @@ Skipped (noise/uncertain): F2, F4
|
|||
|
||||
---
|
||||
|
||||
## OPTION 3: SKIP
|
||||
## SKIP [S]
|
||||
|
||||
1. Acknowledge all findings were reviewed
|
||||
2. Note that user chose to proceed without fixes
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ wipFile: '{implementation_artifacts}/tech-spec-wip.md'
|
|||
|
||||
**Present review menu:**
|
||||
|
||||
Display: "**Select:** [Y] Approve [C] Changes [Q] Questions [A] Advanced Elicitation [P] Party Mode"
|
||||
Display: "**Select:** [C] Continue [E] Edit [Q] Questions [A] Advanced Elicitation [P] Party Mode"
|
||||
|
||||
**HALT and wait for user selection.**
|
||||
|
||||
#### Menu Handling Logic:
|
||||
|
||||
- IF Y: Proceed to Section 3 (Finalize the Spec)
|
||||
- IF C: Proceed to Section 2 (Handle Review Feedback), then return here and redisplay menu
|
||||
- IF C: Proceed to Section 3 (Finalize the Spec)
|
||||
- IF E: Proceed to Section 2 (Handle Review Feedback), then return here and redisplay menu
|
||||
- IF Q: Answer questions, then redisplay this menu
|
||||
- IF A: Read fully and follow: `{advanced_elicitation}` with current spec content, process enhanced insights, ask user "Accept improvements? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu
|
||||
- IF P: Read fully and follow: `{party_mode_exec}` with current spec content, process collaborative insights, ask user "Accept changes? (y/n)", if yes update spec then redisplay menu, if no keep original then redisplay menu
|
||||
|
|
@ -59,7 +59,7 @@ Display: "**Select:** [Y] Approve [C] Changes [Q] Questions [A] Advanced Elicita
|
|||
#### EXECUTION RULES:
|
||||
|
||||
- ALWAYS halt and wait for user input after presenting menu
|
||||
- ONLY proceed to finalize when user selects 'Y'
|
||||
- ONLY proceed to finalize when user selects 'C'
|
||||
- After other menu items execution, return to this menu
|
||||
|
||||
### 2. Handle Review Feedback
|
||||
|
|
|
|||
|
|
@ -9,7 +9,10 @@ const ui = new UI();
|
|||
module.exports = {
|
||||
command: 'install',
|
||||
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) => {
|
||||
try {
|
||||
// Set debug flag as environment variable for all components
|
||||
|
|
@ -18,7 +21,7 @@ module.exports = {
|
|||
console.log(chalk.cyan('Debug mode enabled\n'));
|
||||
}
|
||||
|
||||
const config = await ui.promptInstall();
|
||||
const config = await ui.promptInstall(options);
|
||||
|
||||
// Handle cancel
|
||||
if (config.actionType === 'cancel') {
|
||||
|
|
|
|||
|
|
@ -26,9 +26,10 @@ const choiceUtils = { Separator };
|
|||
class UI {
|
||||
/**
|
||||
* Prompt for installation configuration
|
||||
* @param {Object} options - CLI options object (may contain directory property)
|
||||
* @returns {Object} Installation configuration
|
||||
*/
|
||||
async promptInstall() {
|
||||
async promptInstall(options = {}) {
|
||||
CLIUtils.displayLogo();
|
||||
|
||||
// Display version-specific start message from install-messages.yaml
|
||||
|
|
@ -36,7 +37,7 @@ class UI {
|
|||
const messageLoader = new MessageLoader();
|
||||
messageLoader.displayStartMessage();
|
||||
|
||||
const confirmedDirectory = await this.getConfirmedDirectory();
|
||||
const confirmedDirectory = await this.getConfirmedDirectory(options);
|
||||
|
||||
// Preflight: Check for legacy BMAD v4 footprints immediately after getting directory
|
||||
const { Detector } = require('../installers/lib/core/detector');
|
||||
|
|
@ -506,9 +507,23 @@ class UI {
|
|||
|
||||
/**
|
||||
* Get confirmed directory from user
|
||||
* @param {Object} options - CLI options object (may contain directory property)
|
||||
* @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;
|
||||
while (!confirmedDirectory) {
|
||||
const directoryAnswer = await this.promptForDirectory();
|
||||
|
|
|
|||
Loading…
Reference in New Issue