fix: auto-discover PRD in validate-prd instead of always asking (#1619)

When only one PRD exists in planning_artifacts, use it automatically
instead of prompting the user for its path. Still asks when multiple
PRDs are found or falls back to manual input when none are discovered.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Verkhovsky 2026-02-10 17:02:23 -07:00 committed by GitHub
parent 0659aac02c
commit 3e35057b89
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 7 deletions

View File

@ -70,14 +70,22 @@ This file contains the BMAD PRD philosophy, standards, and validation criteria t
**If PRD path provided as invocation parameter:**
- Use provided path
**If no PRD path provided:**
"**PRD Validation Workflow**
**If no PRD path provided, auto-discover:**
- Search `{planning_artifacts}` for files matching `*prd*.md`
- Also check for sharded PRDs: `{planning_artifacts}/*prd*/*.md`
Which PRD would you like to validate?
**If exactly ONE PRD found:**
- Use it automatically
- Inform user: "Found PRD: {discovered_path} — using it for validation."
Please provide the path to the PRD file you want to validate."
**If MULTIPLE PRDs found:**
- List all discovered PRDs with numbered options
- "I found multiple PRDs. Which one would you like to validate?"
- Wait for user selection
**Wait for user to provide PRD path.**
**If NO PRDs found:**
- "I couldn't find any PRD files in {planning_artifacts}. Please provide the path to the PRD file you want to validate."
- Wait for user to provide PRD path.
### 3. Validate PRD Exists and Load

View File

@ -60,6 +60,4 @@ Load and read full config from {main_config} and resolve:
"**Validate Mode: Validating an existing PRD against BMAD standards.**"
Prompt for PRD path: "Which PRD would you like to validate? Please provide the path to the PRD.md file."
Then read fully and follow: `{validateWorkflow}` (steps-v/step-v-01-discovery.md)