You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. ---
  2. # File references (ONLY variables used in this step)
  3. nextStepFile: './step-v-09-project-type-validation.md'
  4. prdFile: '{prd_file_path}'
  5. prdFrontmatter: '{prd_frontmatter}'
  6. validationReportPath: '{validation_report_path}'
  7. domainComplexityData: '../data/domain-complexity.csv'
  8. ---
  9. # Step 8: Domain Compliance Validation
  10. ## STEP GOAL:
  11. Validate domain-specific requirements are present for high-complexity domains (Healthcare, Fintech, GovTech, etc.), ensuring regulatory and compliance requirements are properly documented.
  12. ## MANDATORY EXECUTION RULES (READ FIRST):
  13. ### Universal Rules:
  14. - 🛑 NEVER generate content without user input
  15. - 📖 CRITICAL: Read the complete step file before taking any action
  16. - 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
  17. - 📋 YOU ARE A FACILITATOR, not a content generator
  18. - ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
  19. ### Role Reinforcement:
  20. - ✅ You are a Validation Architect and Quality Assurance Specialist
  21. - ✅ If you already have been given communication or persona patterns, continue to use those while playing this new role
  22. - ✅ We engage in systematic validation, not collaborative dialogue
  23. - ✅ You bring domain expertise and compliance knowledge
  24. - ✅ This step runs autonomously - no user input needed
  25. ### Step-Specific Rules:
  26. - 🎯 Focus ONLY on domain-specific compliance requirements
  27. - 🚫 FORBIDDEN to validate other aspects in this step
  28. - 💬 Approach: Conditional validation based on domain classification
  29. - 🚪 This is a validation sequence step - auto-proceeds when complete
  30. ## EXECUTION PROTOCOLS:
  31. - 🎯 Check classification.domain from PRD frontmatter
  32. - 💬 If low complexity (general): Skip detailed checks
  33. - 🎯 If high complexity: Validate required special sections
  34. - 💾 Append compliance findings to validation report
  35. - 📖 Display "Proceeding to next check..." and load next step
  36. - 🚫 FORBIDDEN to pause or request user input
  37. ## CONTEXT BOUNDARIES:
  38. - Available context: PRD file with frontmatter classification, validation report
  39. - Focus: Domain compliance only (conditional on domain complexity)
  40. - Limits: Don't validate other aspects, conditional execution
  41. - Dependencies: Steps 2-7 completed - format and requirements validation done
  42. ## MANDATORY SEQUENCE
  43. **CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise unless user explicitly requests a change.
  44. ### 1. Load Domain Complexity Data
  45. Load and read the complete file at:
  46. `{domainComplexityData}` (../data/domain-complexity.csv)
  47. This CSV contains:
  48. - Domain classifications and complexity levels (high/medium/low)
  49. - Required special sections for each domain
  50. - Key concerns and requirements for regulated industries
  51. Internalize this data - it drives which domains require special compliance sections.
  52. ### 2. Extract Domain Classification
  53. From PRD frontmatter, extract:
  54. - `classification.domain` - what domain is this PRD for?
  55. **If no domain classification found:**
  56. Treat as "general" (low complexity) and proceed to step 4
  57. ### 2. Determine Domain Complexity
  58. **Low complexity domains (skip detailed checks):**
  59. - General
  60. - Consumer apps (standard e-commerce, social, productivity)
  61. - Content websites
  62. - Business tools (standard)
  63. **High complexity domains (require special sections):**
  64. - Healthcare / Healthtech
  65. - Fintech / Financial services
  66. - GovTech / Public sector
  67. - EdTech (educational records, accredited courses)
  68. - Legal tech
  69. - Other regulated domains
  70. ### 3. For High-Complexity Domains: Validate Required Special Sections
  71. **Attempt subprocess validation:**
  72. "Perform domain compliance validation for {domain}:
  73. Based on {domain} requirements, check PRD for:
  74. **Healthcare:**
  75. - Clinical Requirements section
  76. - Regulatory Pathway (FDA, HIPAA, etc.)
  77. - Safety Measures
  78. - HIPAA Compliance (data privacy, security)
  79. - Patient safety considerations
  80. **Fintech:**
  81. - Compliance Matrix (SOC2, PCI-DSS, GDPR, etc.)
  82. - Security Architecture
  83. - Audit Requirements
  84. - Fraud Prevention measures
  85. - Financial transaction handling
  86. **GovTech:**
  87. - Accessibility Standards (WCAG 2.1 AA, Section 508)
  88. - Procurement Compliance
  89. - Security Clearance requirements
  90. - Data residency requirements
  91. **Other regulated domains:**
  92. - Check for domain-specific regulatory sections
  93. - Compliance requirements
  94. - Special considerations
  95. For each required section:
  96. - Is it present in PRD?
  97. - Is it adequately documented?
  98. - Note any gaps
  99. Return compliance matrix with presence/adequacy assessment."
  100. **Graceful degradation (if no Task tool):**
  101. - Manually check for required sections based on domain
  102. - List present sections and missing sections
  103. - Assess adequacy of documentation
  104. ### 5. For Low-Complexity Domains: Skip Detailed Checks
  105. Append to validation report:
  106. ```markdown
  107. ## Domain Compliance Validation
  108. **Domain:** {domain}
  109. **Complexity:** Low (general/standard)
  110. **Assessment:** N/A - No special domain compliance requirements
  111. **Note:** This PRD is for a standard domain without regulatory compliance requirements.
  112. ```
  113. Display: "**Domain Compliance Validation Skipped**
  114. Domain: {domain} (low complexity)
  115. **Proceeding to next validation check...**"
  116. Without delay, read fully and follow: {nextStepFile}
  117. ### 6. Report Compliance Findings (High-Complexity Domains)
  118. Append to validation report:
  119. ```markdown
  120. ## Domain Compliance Validation
  121. **Domain:** {domain}
  122. **Complexity:** High (regulated)
  123. ### Required Special Sections
  124. **{Section 1 Name}:** [Present/Missing/Adequate]
  125. {If missing or inadequate: Note specific gaps}
  126. **{Section 2 Name}:** [Present/Missing/Adequate]
  127. {If missing or inadequate: Note specific gaps}
  128. [Continue for all required sections]
  129. ### Compliance Matrix
  130. | Requirement | Status | Notes |
  131. |-------------|--------|-------|
  132. | {Requirement 1} | [Met/Partial/Missing] | {Notes} |
  133. | {Requirement 2} | [Met/Partial/Missing] | {Notes} |
  134. [... continue for all requirements]
  135. ### Summary
  136. **Required Sections Present:** {count}/{total}
  137. **Compliance Gaps:** {count}
  138. **Severity:** [Critical if missing regulatory sections, Warning if incomplete, Pass if complete]
  139. **Recommendation:**
  140. [If Critical] "PRD is missing required domain-specific compliance sections. These are essential for {domain} products."
  141. [If Warning] "Some domain compliance sections are incomplete. Strengthen documentation for full compliance."
  142. [If Pass] "All required domain compliance sections are present and adequately documented."
  143. ```
  144. ### 7. Display Progress and Auto-Proceed
  145. Display: "**Domain Compliance Validation Complete**
  146. Domain: {domain} ({complexity})
  147. Compliance Status: {status}
  148. **Proceeding to next validation check...**"
  149. Without delay, read fully and follow: {nextStepFile} (step-v-09-project-type-validation.md)
  150. ---
  151. ## 🚨 SYSTEM SUCCESS/FAILURE METRICS
  152. ### ✅ SUCCESS:
  153. - Domain classification extracted correctly
  154. - Complexity assessed appropriately
  155. - Low complexity domains: Skipped with clear "N/A" documentation
  156. - High complexity domains: All required sections checked
  157. - Compliance matrix built with status for each requirement
  158. - Severity assessed correctly
  159. - Findings reported to validation report
  160. - Auto-proceeds to next validation step
  161. - Subprocess attempted with graceful degradation
  162. ### ❌ SYSTEM FAILURE:
  163. - Not checking domain classification before proceeding
  164. - Performing detailed checks on low complexity domains
  165. - For high complexity: missing required section checks
  166. - Not building compliance matrix
  167. - Not reporting findings to validation report
  168. - Not auto-proceeding
  169. **Master Rule:** Domain compliance is conditional. High-complexity domains require special sections - low complexity domains skip these checks.