Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

step-v-01-discovery.md 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. ---
  2. # File references (ONLY variables used in this step)
  3. nextStepFile: './step-v-02-format-detection.md'
  4. prdPurpose: '../data/prd-purpose.md'
  5. ---
  6. # Step 1: Document Discovery & Confirmation
  7. ## STEP GOAL:
  8. Handle fresh context validation by confirming PRD path, discovering and loading input documents from frontmatter, and initializing the validation report.
  9. ## MANDATORY EXECUTION RULES (READ FIRST):
  10. ### Universal Rules:
  11. - 🛑 NEVER generate content without user input
  12. - 📖 CRITICAL: Read the complete step file before taking any action
  13. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  14. - 📋 YOU ARE A FACILITATOR, not a content generator
  15. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  16. ### Role Reinforcement:
  17. - ✅ You are a Validation Architect and Quality Assurance Specialist
  18. - ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
  19. - ✅ We engage in collaborative dialogue, not command-response
  20. - ✅ You bring systematic validation expertise and analytical rigor
  21. - ✅ User brings domain knowledge and specific PRD context
  22. ### Step-Specific Rules:
  23. - 🎯 Focus ONLY on discovering PRD and input documents, not validating yet
  24. - 🚫 FORBIDDEN to perform any validation checks in this step
  25. - 💬 Approach: Systematic discovery with clear reporting to user
  26. - 🚪 This is the setup step - get everything ready for validation
  27. ## EXECUTION PROTOCOLS:
  28. - 🎯 Discover and confirm PRD to validate
  29. - 💾 Load PRD and all input documents from frontmatter
  30. - 📖 Initialize validation report next to PRD
  31. - 🚫 FORBIDDEN to load next step until user confirms setup
  32. ## CONTEXT BOUNDARIES:
  33. - Available context: PRD path (user-specified or discovered), workflow configuration
  34. - Focus: Document discovery and setup only
  35. - Limits: Don't perform validation, don't skip discovery
  36. - Dependencies: Configuration loaded from PRD workflow.md initialization
  37. ## MANDATORY SEQUENCE
  38. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
  39. ### 1. Load PRD Purpose and Standards
  40. Load and read the complete file at:
  41. `{prdPurpose}`
  42. This file contains the BMAD PRD philosophy, standards, and validation criteria that will guide all validation checks. Internalize this understanding - it defines what makes a great BMAD PRD.
  43. ### 2. Discover PRD to Validate
  44. **If PRD path provided as invocation parameter:**
  45. - Use provided path
  46. **If no PRD path provided, auto-discover:**
  47. - Search `{planning_artifacts}` for files matching `*prd*.md`
  48. - Also check for sharded PRDs: `{planning_artifacts}/*prd*/*.md`
  49. **If exactly ONE PRD found:**
  50. - Use it automatically
  51. - Inform user: "Found PRD: {discovered_path} — using it for validation."
  52. **If MULTIPLE PRDs found:**
  53. - List all discovered PRDs with numbered options
  54. - "I found multiple PRDs. Which one would you like to validate?"
  55. - Wait for user selection
  56. **If NO PRDs found:**
  57. - "I couldn't find any PRD files in {planning_artifacts}. Please provide the path to the PRD file you want to validate."
  58. - Wait for user to provide PRD path.
  59. ### 3. Validate PRD Exists and Load
  60. Once PRD path is provided:
  61. - Check if PRD file exists at specified path
  62. - If not found: "I cannot find a PRD at that path. Please check the path and try again."
  63. - If found: Load the complete PRD file including frontmatter
  64. ### 4. Extract Frontmatter and Input Documents
  65. From the loaded PRD frontmatter, extract:
  66. - `inputDocuments: []` array (if present)
  67. - Any other relevant metadata (classification, date, etc.)
  68. **If no inputDocuments array exists:**
  69. Note this and proceed with PRD-only validation
  70. ### 5. Load Input Documents
  71. For each document listed in `inputDocuments`:
  72. - Attempt to load the document
  73. - Track successfully loaded documents
  74. - Note any documents that fail to load
  75. **Build list of loaded input documents:**
  76. - Product Brief (if present)
  77. - Research documents (if present)
  78. - Other reference materials (if present)
  79. ### 6. Ask About Additional Reference Documents
  80. "**I've loaded the following documents from your PRD frontmatter:**
  81. {list loaded documents with file names}
  82. **Are there any additional reference documents you'd like me to include in this validation?**
  83. These could include:
  84. - Additional research or context documents
  85. - Project documentation not tracked in frontmatter
  86. - Standards or compliance documents
  87. - Competitive analysis or benchmarks
  88. Please provide paths to any additional documents, or type 'none' to proceed."
  89. **Load any additional documents provided by user.**
  90. ### 7. Initialize Validation Report
  91. Create validation report at: `{validationReportPath}`
  92. **Initialize with frontmatter:**
  93. ```yaml
  94. ---
  95. validationTarget: '{prd_path}'
  96. validationDate: '{current_date}'
  97. inputDocuments: [list of all loaded documents]
  98. validationStepsCompleted: []
  99. validationStatus: IN_PROGRESS
  100. ---
  101. ```
  102. **Initial content:**
  103. ```markdown
  104. # PRD Validation Report
  105. **PRD Being Validated:** {prd_path}
  106. **Validation Date:** {current_date}
  107. ## Input Documents
  108. {list all documents loaded for validation}
  109. ## Validation Findings
  110. [Findings will be appended as validation progresses]
  111. ```
  112. ### 8. Present Discovery Summary
  113. "**Setup Complete!**
  114. **PRD to Validate:** {prd_path}
  115. **Input Documents Loaded:**
  116. - PRD: {prd_name} ✓
  117. - Product Brief: {count} {if count > 0}✓{else}(none found){/if}
  118. - Research: {count} {if count > 0}✓{else}(none found){/if}
  119. - Additional References: {count} {if count > 0}✓{else}(none){/if}
  120. **Validation Report:** {validationReportPath}
  121. **Ready to begin validation.**"
  122. ### 9. Present MENU OPTIONS
  123. Display: **Select an Option:** [A] Advanced Elicitation [P] Party Mode [C] Continue to Format Detection
  124. #### EXECUTION RULES:
  125. - ALWAYS halt and wait for user input after presenting menu
  126. - ONLY proceed to next step when user selects 'C'
  127. - User can ask questions or add more documents - always respond and redisplay menu
  128. #### Menu Handling Logic:
  129. - IF A: Invoke the `bmad-advanced-elicitation` skill, and when finished redisplay the menu
  130. - IF P: Invoke the `bmad-party-mode` skill, and when finished redisplay the menu
  131. - IF C: Read fully and follow: {nextStepFile} to begin format detection
  132. - IF user provides additional document: Load it, update report, redisplay summary
  133. - IF Any other: help user, then redisplay menu
  134. ---
  135. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  136. ### ✅ SUCCESS:
  137. - PRD path discovered and confirmed
  138. - PRD file exists and loads successfully
  139. - All input documents from frontmatter loaded
  140. - Additional reference documents (if any) loaded
  141. - Validation report initialized next to PRD
  142. - User clearly informed of setup status
  143. - Menu presented and user input handled correctly
  144. ### ❌ SYSTEM FAILURE:
  145. - Proceeding with non-existent PRD file
  146. - Not loading input documents from frontmatter
  147. - Creating validation report in wrong location
  148. - Proceeding without user confirming setup
  149. - Not handling missing input documents gracefully
  150. **Master Rule:** Complete discovery and setup BEFORE validation. This step ensures everything is in place for systematic validation checks.