bmad-studio 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (798) hide show
  1. package/.prettierrc +8 -0
  2. package/CONTRIBUTING.md +109 -0
  3. package/LICENSE +21 -0
  4. package/README.md +110 -0
  5. package/_bmad/_config/agent-manifest.csv +11 -0
  6. package/_bmad/_config/bmad-help.csv +57 -0
  7. package/_bmad/_config/files-manifest.csv +646 -0
  8. package/_bmad/_config/ides/claude-code.yaml +5 -0
  9. package/_bmad/_config/manifest.yaml +42 -0
  10. package/_bmad/_config/skill-manifest.csv +48 -0
  11. package/_bmad/_config/task-manifest.csv +1 -0
  12. package/_bmad/_config/tool-manifest.csv +1 -0
  13. package/_bmad/_config/workflow-manifest.csv +1 -0
  14. package/_bmad/bmb/config.yaml +13 -0
  15. package/_bmad/bmb/module-help.csv +7 -0
  16. package/_bmad/bmb/skills/bmad-agent-builder/SKILL.md +65 -0
  17. package/_bmad/bmb/skills/bmad-agent-builder/assets/SKILL-template.md +97 -0
  18. package/_bmad/bmb/skills/bmad-agent-builder/assets/autonomous-wake.md +37 -0
  19. package/_bmad/bmb/skills/bmad-agent-builder/assets/init-template.md +47 -0
  20. package/_bmad/bmb/skills/bmad-agent-builder/assets/memory-system.md +129 -0
  21. package/_bmad/bmb/skills/bmad-agent-builder/assets/quality-report-template.md +282 -0
  22. package/_bmad/bmb/skills/bmad-agent-builder/assets/save-memory.md +29 -0
  23. package/_bmad/bmb/skills/bmad-agent-builder/bmad-manifest.json +24 -0
  24. package/_bmad/bmb/skills/bmad-agent-builder/bmad-skill-manifest.yaml +1 -0
  25. package/_bmad/bmb/skills/bmad-agent-builder/build-process.md +199 -0
  26. package/_bmad/bmb/skills/bmad-agent-builder/quality-optimizer.md +208 -0
  27. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-agent-cohesion.md +272 -0
  28. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-enhancement-opportunities.md +277 -0
  29. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-execution-efficiency.md +181 -0
  30. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-prompt-craft.md +245 -0
  31. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-script-opportunities.md +262 -0
  32. package/_bmad/bmb/skills/bmad-agent-builder/quality-scan-structure.md +183 -0
  33. package/_bmad/bmb/skills/bmad-agent-builder/references/metadata-reference.md +126 -0
  34. package/_bmad/bmb/skills/bmad-agent-builder/references/quality-dimensions.md +46 -0
  35. package/_bmad/bmb/skills/bmad-agent-builder/references/script-opportunities-reference.md +385 -0
  36. package/_bmad/bmb/skills/bmad-agent-builder/references/skill-best-practices.md +218 -0
  37. package/_bmad/bmb/skills/bmad-agent-builder/references/standard-fields.md +103 -0
  38. package/_bmad/bmb/skills/bmad-agent-builder/references/template-substitution-rules.md +72 -0
  39. package/_bmad/bmb/skills/bmad-agent-builder/references/universal-scan-schema.md +267 -0
  40. package/_bmad/bmb/skills/bmad-agent-builder/report-quality-scan-creator.md +138 -0
  41. package/_bmad/bmb/skills/bmad-agent-builder/scripts/bmad-manifest-schema.json +103 -0
  42. package/_bmad/bmb/skills/bmad-agent-builder/scripts/generate-html-report.py +1002 -0
  43. package/_bmad/bmb/skills/bmad-agent-builder/scripts/manifest.py +420 -0
  44. package/_bmad/bmb/skills/bmad-agent-builder/scripts/prepass-execution-deps.py +368 -0
  45. package/_bmad/bmb/skills/bmad-agent-builder/scripts/prepass-prompt-metrics.py +476 -0
  46. package/_bmad/bmb/skills/bmad-agent-builder/scripts/prepass-structure-capabilities.py +636 -0
  47. package/_bmad/bmb/skills/bmad-agent-builder/scripts/scan-path-standards.py +253 -0
  48. package/_bmad/bmb/skills/bmad-agent-builder/scripts/scan-scripts.py +745 -0
  49. package/_bmad/bmb/skills/bmad-workflow-builder/SKILL.md +65 -0
  50. package/_bmad/bmb/skills/bmad-workflow-builder/assets/SKILL-template.md +117 -0
  51. package/_bmad/bmb/skills/bmad-workflow-builder/assets/quality-report-template.md +260 -0
  52. package/_bmad/bmb/skills/bmad-workflow-builder/bmad-manifest.json +23 -0
  53. package/_bmad/bmb/skills/bmad-workflow-builder/bmad-skill-manifest.yaml +1 -0
  54. package/_bmad/bmb/skills/bmad-workflow-builder/build-process.md +208 -0
  55. package/_bmad/bmb/skills/bmad-workflow-builder/quality-optimizer.md +209 -0
  56. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-enhancement-opportunities.md +273 -0
  57. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-execution-efficiency.md +322 -0
  58. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-prompt-craft.md +328 -0
  59. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-script-opportunities.md +261 -0
  60. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-skill-cohesion.md +340 -0
  61. package/_bmad/bmb/skills/bmad-workflow-builder/quality-scan-workflow-integrity.md +280 -0
  62. package/_bmad/bmb/skills/bmad-workflow-builder/references/classification-reference.md +61 -0
  63. package/_bmad/bmb/skills/bmad-workflow-builder/references/complex-workflow-patterns.md +523 -0
  64. package/_bmad/bmb/skills/bmad-workflow-builder/references/metadata-reference.md +126 -0
  65. package/_bmad/bmb/skills/bmad-workflow-builder/references/quality-dimensions.md +45 -0
  66. package/_bmad/bmb/skills/bmad-workflow-builder/references/script-opportunities-reference.md +354 -0
  67. package/_bmad/bmb/skills/bmad-workflow-builder/references/skill-best-practices.md +218 -0
  68. package/_bmad/bmb/skills/bmad-workflow-builder/references/standard-fields.md +121 -0
  69. package/_bmad/bmb/skills/bmad-workflow-builder/references/template-substitution-rules.md +85 -0
  70. package/_bmad/bmb/skills/bmad-workflow-builder/references/universal-scan-schema.md +267 -0
  71. package/_bmad/bmb/skills/bmad-workflow-builder/report-quality-scan-creator.md +134 -0
  72. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/bmad-manifest-schema.json +103 -0
  73. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/generate-html-report.py +1002 -0
  74. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/manifest.py +420 -0
  75. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/prepass-execution-deps.py +313 -0
  76. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/prepass-prompt-metrics.py +285 -0
  77. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/prepass-workflow-integrity.py +485 -0
  78. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/scan-path-standards.py +213 -0
  79. package/_bmad/bmb/skills/bmad-workflow-builder/scripts/scan-scripts.py +745 -0
  80. package/_bmad/bmm/agents/analyst.md +69 -0
  81. package/_bmad/bmm/agents/architect.md +59 -0
  82. package/_bmad/bmm/agents/bmad-skill-manifest.yaml +39 -0
  83. package/_bmad/bmm/agents/dev.md +66 -0
  84. package/_bmad/bmm/agents/pm.md +63 -0
  85. package/_bmad/bmm/agents/qa.md +89 -0
  86. package/_bmad/bmm/agents/quick-flow-solo-dev.md +61 -0
  87. package/_bmad/bmm/agents/sm.md +67 -0
  88. package/_bmad/bmm/agents/tech-writer/bmad-skill-manifest.yaml +3 -0
  89. package/_bmad/bmm/agents/tech-writer/tech-writer.md +67 -0
  90. package/_bmad/bmm/agents/ux-designer.md +58 -0
  91. package/_bmad/bmm/config.yaml +16 -0
  92. package/_bmad/bmm/data/project-context-template.md +26 -0
  93. package/_bmad/bmm/module-help.csv +32 -0
  94. package/_bmad/bmm/teams/default-party.csv +20 -0
  95. package/_bmad/bmm/teams/team-fullstack.yaml +12 -0
  96. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/SKILL.md +6 -0
  97. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/bmad-skill-manifest.yaml +1 -0
  98. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/product-brief.template.md +10 -0
  99. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-01-init.md +170 -0
  100. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-01b-continue.md +158 -0
  101. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-02-vision.md +193 -0
  102. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-03-users.md +196 -0
  103. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-04-metrics.md +199 -0
  104. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-05-scope.md +213 -0
  105. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/steps/step-06-complete.md +159 -0
  106. package/_bmad/bmm/workflows/1-analysis/bmad-create-product-brief/workflow.md +55 -0
  107. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/SKILL.md +88 -0
  108. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/artifact-analyzer.md +60 -0
  109. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/opportunity-reviewer.md +44 -0
  110. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/skeptic-reviewer.md +44 -0
  111. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/agents/web-researcher.md +49 -0
  112. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/bmad-manifest.json +17 -0
  113. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/bmad-skill-manifest.yaml +1 -0
  114. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/contextual-discovery.md +57 -0
  115. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/draft-and-review.md +86 -0
  116. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/finalize.md +75 -0
  117. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/prompts/guided-elicitation.md +70 -0
  118. package/_bmad/bmm/workflows/1-analysis/bmad-product-brief-preview/resources/brief-template.md +60 -0
  119. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/SKILL.md +6 -0
  120. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/bmad-skill-manifest.yaml +1 -0
  121. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-01-init.md +137 -0
  122. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-02-domain-analysis.md +229 -0
  123. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-03-competitive-landscape.md +238 -0
  124. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-04-regulatory-focus.md +206 -0
  125. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-05-technical-trends.md +234 -0
  126. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/domain-steps/step-06-research-synthesis.md +444 -0
  127. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/research.template.md +29 -0
  128. package/_bmad/bmm/workflows/1-analysis/research/bmad-domain-research/workflow.md +49 -0
  129. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/SKILL.md +6 -0
  130. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/bmad-skill-manifest.yaml +1 -0
  131. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/research.template.md +29 -0
  132. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-01-init.md +184 -0
  133. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-02-customer-behavior.md +239 -0
  134. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-03-customer-pain-points.md +251 -0
  135. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-04-customer-decisions.md +261 -0
  136. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-05-competitive-analysis.md +173 -0
  137. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/steps/step-06-research-completion.md +478 -0
  138. package/_bmad/bmm/workflows/1-analysis/research/bmad-market-research/workflow.md +49 -0
  139. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/SKILL.md +6 -0
  140. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/bmad-skill-manifest.yaml +1 -0
  141. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/research.template.md +29 -0
  142. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-01-init.md +137 -0
  143. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-02-technical-overview.md +239 -0
  144. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-03-integration-patterns.md +248 -0
  145. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-04-architectural-patterns.md +202 -0
  146. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-05-implementation-research.md +233 -0
  147. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/technical-steps/step-06-research-synthesis.md +487 -0
  148. package/_bmad/bmm/workflows/1-analysis/research/bmad-technical-research/workflow.md +50 -0
  149. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-01-init.md +182 -0
  150. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-02-customer-behavior.md +237 -0
  151. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-03-customer-pain-points.md +249 -0
  152. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-04-customer-decisions.md +259 -0
  153. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-05-competitive-analysis.md +177 -0
  154. package/_bmad/bmm/workflows/1-analysis/research/market-steps/step-06-research-completion.md +476 -0
  155. package/_bmad/bmm/workflows/1-analysis/research/research.template.md +29 -0
  156. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/SKILL.md +6 -0
  157. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/bmad-skill-manifest.yaml +1 -0
  158. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-01-init.md +135 -0
  159. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-01b-continue.md +127 -0
  160. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-02-discovery.md +190 -0
  161. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-03-core-experience.md +217 -0
  162. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-04-emotional-response.md +220 -0
  163. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-05-inspiration.md +235 -0
  164. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-06-design-system.md +253 -0
  165. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-07-defining-experience.md +255 -0
  166. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-08-visual-foundation.md +225 -0
  167. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-09-design-directions.md +225 -0
  168. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-10-user-journeys.md +242 -0
  169. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-11-component-strategy.md +249 -0
  170. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-12-ux-patterns.md +238 -0
  171. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-13-responsive-accessibility.md +265 -0
  172. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/steps/step-14-complete.md +171 -0
  173. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/ux-design-template.md +13 -0
  174. package/_bmad/bmm/workflows/2-plan-workflows/bmad-create-ux-design/workflow.md +36 -0
  175. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/SKILL.md +6 -0
  176. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/bmad-skill-manifest.yaml +1 -0
  177. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01-discovery.md +242 -0
  178. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/steps-e/step-e-01b-legacy-conversion.md +204 -0
  179. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/steps-e/step-e-02-review.md +245 -0
  180. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/steps-e/step-e-03-edit.md +250 -0
  181. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/steps-e/step-e-04-complete.md +165 -0
  182. package/_bmad/bmm/workflows/2-plan-workflows/bmad-edit-prd/workflow.md +63 -0
  183. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/SKILL.md +6 -0
  184. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/bmad-skill-manifest.yaml +1 -0
  185. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/domain-complexity.csv +15 -0
  186. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/prd-purpose.md +197 -0
  187. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/data/project-types.csv +11 -0
  188. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-01-discovery.md +221 -0
  189. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-02-format-detection.md +188 -0
  190. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-02b-parity-check.md +206 -0
  191. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-03-density-validation.md +171 -0
  192. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-04-brief-coverage-validation.md +211 -0
  193. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-05-measurability-validation.md +225 -0
  194. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-06-traceability-validation.md +214 -0
  195. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-07-implementation-leakage-validation.md +202 -0
  196. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-08-domain-compliance-validation.md +240 -0
  197. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-09-project-type-validation.md +260 -0
  198. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-10-smart-validation.md +206 -0
  199. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-11-holistic-quality-validation.md +261 -0
  200. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-12-completeness-validation.md +239 -0
  201. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/steps-v/step-v-13-report-complete.md +229 -0
  202. package/_bmad/bmm/workflows/2-plan-workflows/bmad-validate-prd/workflow.md +62 -0
  203. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/domain-complexity.csv +15 -0
  204. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/prd-purpose.md +197 -0
  205. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/data/project-types.csv +11 -0
  206. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-01-discovery.md +224 -0
  207. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02-format-detection.md +191 -0
  208. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-02b-parity-check.md +209 -0
  209. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-03-density-validation.md +174 -0
  210. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-04-brief-coverage-validation.md +214 -0
  211. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-05-measurability-validation.md +228 -0
  212. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-06-traceability-validation.md +217 -0
  213. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-07-implementation-leakage-validation.md +205 -0
  214. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-08-domain-compliance-validation.md +243 -0
  215. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-09-project-type-validation.md +263 -0
  216. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-10-smart-validation.md +209 -0
  217. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-11-holistic-quality-validation.md +264 -0
  218. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-12-completeness-validation.md +242 -0
  219. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/steps-v/step-v-13-report-complete.md +232 -0
  220. package/_bmad/bmm/workflows/2-plan-workflows/create-prd/workflow-validate-prd.md +65 -0
  221. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/SKILL.md +6 -0
  222. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/bmad-skill-manifest.yaml +1 -0
  223. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-01-document-discovery.md +179 -0
  224. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-02-prd-analysis.md +168 -0
  225. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-03-epic-coverage-validation.md +169 -0
  226. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-04-ux-alignment.md +129 -0
  227. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-05-epic-quality-review.md +241 -0
  228. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/steps/step-06-final-assessment.md +126 -0
  229. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/templates/readiness-report-template.md +4 -0
  230. package/_bmad/bmm/workflows/3-solutioning/bmad-check-implementation-readiness/workflow.md +49 -0
  231. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/SKILL.md +6 -0
  232. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/architecture-decision-template.md +12 -0
  233. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/bmad-skill-manifest.yaml +1 -0
  234. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/data/domain-complexity.csv +13 -0
  235. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/data/project-types.csv +7 -0
  236. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-01-init.md +153 -0
  237. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-01b-continue.md +173 -0
  238. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-02-context.md +224 -0
  239. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-03-starter.md +329 -0
  240. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-04-decisions.md +318 -0
  241. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-05-patterns.md +359 -0
  242. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-06-structure.md +379 -0
  243. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-07-validation.md +359 -0
  244. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/steps/step-08-complete.md +76 -0
  245. package/_bmad/bmm/workflows/3-solutioning/bmad-create-architecture/workflow.md +38 -0
  246. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/SKILL.md +6 -0
  247. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/bmad-skill-manifest.yaml +1 -0
  248. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +255 -0
  249. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/steps/step-02-design-epics.md +212 -0
  250. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
  251. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/steps/step-04-final-validation.md +131 -0
  252. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/templates/epics-template.md +61 -0
  253. package/_bmad/bmm/workflows/3-solutioning/bmad-create-epics-and-stories/workflow.md +53 -0
  254. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/SKILL.md +6 -0
  255. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/bmad-skill-manifest.yaml +1 -0
  256. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/steps/step-01-gather-context.md +61 -0
  257. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/steps/step-02-review.md +41 -0
  258. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/steps/step-03-triage.md +50 -0
  259. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/steps/step-04-present.md +38 -0
  260. package/_bmad/bmm/workflows/4-implementation/bmad-code-review/workflow.md +54 -0
  261. package/_bmad/bmm/workflows/4-implementation/bmad-correct-course/SKILL.md +6 -0
  262. package/_bmad/bmm/workflows/4-implementation/bmad-correct-course/bmad-skill-manifest.yaml +1 -0
  263. package/_bmad/bmm/workflows/4-implementation/bmad-correct-course/checklist.md +288 -0
  264. package/_bmad/bmm/workflows/4-implementation/bmad-correct-course/workflow.md +267 -0
  265. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/SKILL.md +6 -0
  266. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/bmad-skill-manifest.yaml +1 -0
  267. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/checklist.md +357 -0
  268. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/discover-inputs.md +88 -0
  269. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/template.md +49 -0
  270. package/_bmad/bmm/workflows/4-implementation/bmad-create-story/workflow.md +380 -0
  271. package/_bmad/bmm/workflows/4-implementation/bmad-dev-story/SKILL.md +6 -0
  272. package/_bmad/bmm/workflows/4-implementation/bmad-dev-story/bmad-skill-manifest.yaml +1 -0
  273. package/_bmad/bmm/workflows/4-implementation/bmad-dev-story/checklist.md +80 -0
  274. package/_bmad/bmm/workflows/4-implementation/bmad-dev-story/workflow.md +450 -0
  275. package/_bmad/bmm/workflows/4-implementation/bmad-retrospective/SKILL.md +6 -0
  276. package/_bmad/bmm/workflows/4-implementation/bmad-retrospective/bmad-skill-manifest.yaml +1 -0
  277. package/_bmad/bmm/workflows/4-implementation/bmad-retrospective/workflow.md +1479 -0
  278. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/SKILL.md +6 -0
  279. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/bmad-skill-manifest.yaml +1 -0
  280. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/checklist.md +33 -0
  281. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/sprint-status-template.yaml +56 -0
  282. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-planning/workflow.md +263 -0
  283. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-status/SKILL.md +6 -0
  284. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-status/bmad-skill-manifest.yaml +1 -0
  285. package/_bmad/bmm/workflows/4-implementation/bmad-sprint-status/workflow.md +261 -0
  286. package/_bmad/bmm/workflows/bmad-document-project/SKILL.md +6 -0
  287. package/_bmad/bmm/workflows/bmad-document-project/bmad-skill-manifest.yaml +1 -0
  288. package/_bmad/bmm/workflows/bmad-document-project/checklist.md +245 -0
  289. package/_bmad/bmm/workflows/bmad-document-project/documentation-requirements.csv +12 -0
  290. package/_bmad/bmm/workflows/bmad-document-project/instructions.md +128 -0
  291. package/_bmad/bmm/workflows/bmad-document-project/templates/deep-dive-template.md +345 -0
  292. package/_bmad/bmm/workflows/bmad-document-project/templates/index-template.md +169 -0
  293. package/_bmad/bmm/workflows/bmad-document-project/templates/project-overview-template.md +103 -0
  294. package/_bmad/bmm/workflows/bmad-document-project/templates/project-scan-report-schema.json +160 -0
  295. package/_bmad/bmm/workflows/bmad-document-project/templates/source-tree-template.md +135 -0
  296. package/_bmad/bmm/workflows/bmad-document-project/workflow.md +27 -0
  297. package/_bmad/bmm/workflows/bmad-document-project/workflows/deep-dive-instructions.md +299 -0
  298. package/_bmad/bmm/workflows/bmad-document-project/workflows/deep-dive-workflow.md +34 -0
  299. package/_bmad/bmm/workflows/bmad-document-project/workflows/full-scan-instructions.md +1107 -0
  300. package/_bmad/bmm/workflows/bmad-document-project/workflows/full-scan-workflow.md +34 -0
  301. package/_bmad/bmm/workflows/bmad-generate-project-context/SKILL.md +6 -0
  302. package/_bmad/bmm/workflows/bmad-generate-project-context/bmad-skill-manifest.yaml +1 -0
  303. package/_bmad/bmm/workflows/bmad-generate-project-context/project-context-template.md +21 -0
  304. package/_bmad/bmm/workflows/bmad-generate-project-context/steps/step-01-discover.md +186 -0
  305. package/_bmad/bmm/workflows/bmad-generate-project-context/steps/step-02-generate.md +321 -0
  306. package/_bmad/bmm/workflows/bmad-generate-project-context/steps/step-03-complete.md +278 -0
  307. package/_bmad/bmm/workflows/bmad-generate-project-context/workflow.md +43 -0
  308. package/_bmad/bmm/workflows/bmad-qa-generate-e2e-tests/SKILL.md +6 -0
  309. package/_bmad/bmm/workflows/bmad-qa-generate-e2e-tests/bmad-skill-manifest.yaml +1 -0
  310. package/_bmad/bmm/workflows/bmad-qa-generate-e2e-tests/checklist.md +33 -0
  311. package/_bmad/bmm/workflows/bmad-qa-generate-e2e-tests/workflow.md +136 -0
  312. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/SKILL.md +6 -0
  313. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/bmad-skill-manifest.yaml +1 -0
  314. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-01-mode-detection.md +169 -0
  315. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-02-context-gathering.md +114 -0
  316. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-03-execute.md +107 -0
  317. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-04-self-check.md +107 -0
  318. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-05-adversarial-review.md +94 -0
  319. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/steps/step-06-resolve-findings.md +144 -0
  320. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev/workflow.md +38 -0
  321. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/SKILL.md +6 -0
  322. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/bmad-skill-manifest.yaml +1 -0
  323. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-01-clarify-and-route.md +51 -0
  324. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-02-plan.md +35 -0
  325. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-03-implement.md +33 -0
  326. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-04-review.md +50 -0
  327. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/steps/step-05-present.md +17 -0
  328. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/tech-spec-template.md +90 -0
  329. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-dev-new-preview/workflow.md +79 -0
  330. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/SKILL.md +6 -0
  331. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/bmad-skill-manifest.yaml +1 -0
  332. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/steps/step-01-understand.md +185 -0
  333. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/steps/step-02-investigate.md +140 -0
  334. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/steps/step-03-generate.md +123 -0
  335. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/steps/step-04-review.md +195 -0
  336. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/tech-spec-template.md +74 -0
  337. package/_bmad/bmm/workflows/bmad-quick-flow/bmad-quick-spec/workflow.md +73 -0
  338. package/_bmad/core/config.yaml +9 -0
  339. package/_bmad/core/module-help.csv +11 -0
  340. package/_bmad/core/skills/bmad-advanced-elicitation/SKILL.md +6 -0
  341. package/_bmad/core/skills/bmad-advanced-elicitation/bmad-skill-manifest.yaml +1 -0
  342. package/_bmad/core/skills/bmad-advanced-elicitation/methods.csv +51 -0
  343. package/_bmad/core/skills/bmad-advanced-elicitation/workflow.md +135 -0
  344. package/_bmad/core/skills/bmad-brainstorming/SKILL.md +6 -0
  345. package/_bmad/core/skills/bmad-brainstorming/bmad-skill-manifest.yaml +1 -0
  346. package/_bmad/core/skills/bmad-brainstorming/brain-methods.csv +62 -0
  347. package/_bmad/core/skills/bmad-brainstorming/steps/step-01-session-setup.md +214 -0
  348. package/_bmad/core/skills/bmad-brainstorming/steps/step-01b-continue.md +124 -0
  349. package/_bmad/core/skills/bmad-brainstorming/steps/step-02a-user-selected.md +229 -0
  350. package/_bmad/core/skills/bmad-brainstorming/steps/step-02b-ai-recommended.md +239 -0
  351. package/_bmad/core/skills/bmad-brainstorming/steps/step-02c-random-selection.md +211 -0
  352. package/_bmad/core/skills/bmad-brainstorming/steps/step-02d-progressive-flow.md +266 -0
  353. package/_bmad/core/skills/bmad-brainstorming/steps/step-03-technique-execution.md +401 -0
  354. package/_bmad/core/skills/bmad-brainstorming/steps/step-04-idea-organization.md +305 -0
  355. package/_bmad/core/skills/bmad-brainstorming/template.md +15 -0
  356. package/_bmad/core/skills/bmad-brainstorming/workflow.md +53 -0
  357. package/_bmad/core/skills/bmad-distillator/SKILL.md +178 -0
  358. package/_bmad/core/skills/bmad-distillator/agents/distillate-compressor.md +116 -0
  359. package/_bmad/core/skills/bmad-distillator/agents/round-trip-reconstructor.md +68 -0
  360. package/_bmad/core/skills/bmad-distillator/bmad-skill-manifest.yaml +15 -0
  361. package/_bmad/core/skills/bmad-distillator/resources/compression-rules.md +51 -0
  362. package/_bmad/core/skills/bmad-distillator/resources/distillate-format-reference.md +227 -0
  363. package/_bmad/core/skills/bmad-distillator/resources/splitting-strategy.md +78 -0
  364. package/_bmad/core/skills/bmad-distillator/scripts/analyze_sources.py +300 -0
  365. package/_bmad/core/skills/bmad-distillator/scripts/tests/test_analyze_sources.py +204 -0
  366. package/_bmad/core/skills/bmad-editorial-review-prose/SKILL.md +6 -0
  367. package/_bmad/core/skills/bmad-editorial-review-prose/bmad-skill-manifest.yaml +1 -0
  368. package/_bmad/core/skills/bmad-editorial-review-prose/workflow.md +81 -0
  369. package/_bmad/core/skills/bmad-editorial-review-structure/SKILL.md +6 -0
  370. package/_bmad/core/skills/bmad-editorial-review-structure/bmad-skill-manifest.yaml +1 -0
  371. package/_bmad/core/skills/bmad-editorial-review-structure/workflow.md +174 -0
  372. package/_bmad/core/skills/bmad-help/SKILL.md +6 -0
  373. package/_bmad/core/skills/bmad-help/bmad-skill-manifest.yaml +1 -0
  374. package/_bmad/core/skills/bmad-help/workflow.md +88 -0
  375. package/_bmad/core/skills/bmad-index-docs/SKILL.md +6 -0
  376. package/_bmad/core/skills/bmad-index-docs/bmad-skill-manifest.yaml +1 -0
  377. package/_bmad/core/skills/bmad-index-docs/workflow.md +61 -0
  378. package/_bmad/core/skills/bmad-party-mode/SKILL.md +6 -0
  379. package/_bmad/core/skills/bmad-party-mode/bmad-skill-manifest.yaml +1 -0
  380. package/_bmad/core/skills/bmad-party-mode/steps/step-01-agent-loading.md +138 -0
  381. package/_bmad/core/skills/bmad-party-mode/steps/step-02-discussion-orchestration.md +187 -0
  382. package/_bmad/core/skills/bmad-party-mode/steps/step-03-graceful-exit.md +167 -0
  383. package/_bmad/core/skills/bmad-party-mode/workflow.md +190 -0
  384. package/_bmad/core/skills/bmad-review-adversarial-general/SKILL.md +6 -0
  385. package/_bmad/core/skills/bmad-review-adversarial-general/bmad-skill-manifest.yaml +1 -0
  386. package/_bmad/core/skills/bmad-review-adversarial-general/workflow.md +32 -0
  387. package/_bmad/core/skills/bmad-review-edge-case-hunter/SKILL.md +6 -0
  388. package/_bmad/core/skills/bmad-review-edge-case-hunter/bmad-skill-manifest.yaml +1 -0
  389. package/_bmad/core/skills/bmad-review-edge-case-hunter/workflow.md +62 -0
  390. package/_bmad/core/skills/bmad-shard-doc/SKILL.md +6 -0
  391. package/_bmad/core/skills/bmad-shard-doc/bmad-skill-manifest.yaml +1 -0
  392. package/_bmad/core/skills/bmad-shard-doc/workflow.md +100 -0
  393. package/_bmad/core/tasks/bmad-create-prd/SKILL.md +6 -0
  394. package/_bmad/core/tasks/bmad-create-prd/bmad-skill-manifest.yaml +1 -0
  395. package/_bmad/core/tasks/bmad-create-prd/data/domain-complexity.csv +15 -0
  396. package/_bmad/core/tasks/bmad-create-prd/data/prd-purpose.md +197 -0
  397. package/_bmad/core/tasks/bmad-create-prd/data/project-types.csv +11 -0
  398. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-01-init.md +178 -0
  399. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-01b-continue.md +161 -0
  400. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-02-discovery.md +208 -0
  401. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-02b-vision.md +142 -0
  402. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-02c-executive-summary.md +158 -0
  403. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-03-success.md +214 -0
  404. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-04-journeys.md +201 -0
  405. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-05-domain.md +194 -0
  406. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-06-innovation.md +211 -0
  407. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-07-project-type.md +222 -0
  408. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-08-scoping.md +216 -0
  409. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-09-functional.md +219 -0
  410. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-10-nonfunctional.md +230 -0
  411. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-11-polish.md +221 -0
  412. package/_bmad/core/tasks/bmad-create-prd/steps-c/step-12-complete.md +115 -0
  413. package/_bmad/core/tasks/bmad-create-prd/templates/prd-template.md +10 -0
  414. package/_bmad/core/tasks/bmad-create-prd/workflow.md +62 -0
  415. package/_bmad/tea/agents/tea.md +63 -0
  416. package/_bmad/tea/config.yaml +25 -0
  417. package/_bmad/tea/module-help.csv +10 -0
  418. package/_bmad/tea/teams/default-party.csv +2 -0
  419. package/_bmad/tea/testarch/knowledge/adr-quality-readiness-checklist.md +377 -0
  420. package/_bmad/tea/testarch/knowledge/api-request.md +563 -0
  421. package/_bmad/tea/testarch/knowledge/api-testing-patterns.md +915 -0
  422. package/_bmad/tea/testarch/knowledge/auth-session.md +548 -0
  423. package/_bmad/tea/testarch/knowledge/burn-in.md +273 -0
  424. package/_bmad/tea/testarch/knowledge/ci-burn-in.md +717 -0
  425. package/_bmad/tea/testarch/knowledge/component-tdd.md +486 -0
  426. package/_bmad/tea/testarch/knowledge/contract-testing.md +1050 -0
  427. package/_bmad/tea/testarch/knowledge/data-factories.md +500 -0
  428. package/_bmad/tea/testarch/knowledge/email-auth.md +721 -0
  429. package/_bmad/tea/testarch/knowledge/error-handling.md +725 -0
  430. package/_bmad/tea/testarch/knowledge/feature-flags.md +750 -0
  431. package/_bmad/tea/testarch/knowledge/file-utils.md +456 -0
  432. package/_bmad/tea/testarch/knowledge/fixture-architecture.md +401 -0
  433. package/_bmad/tea/testarch/knowledge/fixtures-composition.md +382 -0
  434. package/_bmad/tea/testarch/knowledge/intercept-network-call.md +426 -0
  435. package/_bmad/tea/testarch/knowledge/log.md +426 -0
  436. package/_bmad/tea/testarch/knowledge/network-error-monitor.md +401 -0
  437. package/_bmad/tea/testarch/knowledge/network-first.md +486 -0
  438. package/_bmad/tea/testarch/knowledge/network-recorder.md +527 -0
  439. package/_bmad/tea/testarch/knowledge/nfr-criteria.md +670 -0
  440. package/_bmad/tea/testarch/knowledge/overview.md +286 -0
  441. package/_bmad/tea/testarch/knowledge/pact-consumer-di.md +310 -0
  442. package/_bmad/tea/testarch/knowledge/pact-consumer-framework-setup.md +635 -0
  443. package/_bmad/tea/testarch/knowledge/pact-mcp.md +204 -0
  444. package/_bmad/tea/testarch/knowledge/pactjs-utils-consumer-helpers.md +270 -0
  445. package/_bmad/tea/testarch/knowledge/pactjs-utils-overview.md +216 -0
  446. package/_bmad/tea/testarch/knowledge/pactjs-utils-provider-verifier.md +315 -0
  447. package/_bmad/tea/testarch/knowledge/pactjs-utils-request-filter.md +224 -0
  448. package/_bmad/tea/testarch/knowledge/playwright-cli.md +165 -0
  449. package/_bmad/tea/testarch/knowledge/playwright-config.md +730 -0
  450. package/_bmad/tea/testarch/knowledge/probability-impact.md +601 -0
  451. package/_bmad/tea/testarch/knowledge/recurse.md +421 -0
  452. package/_bmad/tea/testarch/knowledge/risk-governance.md +615 -0
  453. package/_bmad/tea/testarch/knowledge/selective-testing.md +732 -0
  454. package/_bmad/tea/testarch/knowledge/selector-resilience.md +527 -0
  455. package/_bmad/tea/testarch/knowledge/test-healing-patterns.md +644 -0
  456. package/_bmad/tea/testarch/knowledge/test-levels-framework.md +473 -0
  457. package/_bmad/tea/testarch/knowledge/test-priorities-matrix.md +373 -0
  458. package/_bmad/tea/testarch/knowledge/test-quality.md +664 -0
  459. package/_bmad/tea/testarch/knowledge/timing-debugging.md +372 -0
  460. package/_bmad/tea/testarch/knowledge/visual-debugging.md +524 -0
  461. package/_bmad/tea/testarch/tea-index.csv +43 -0
  462. package/_bmad/tea/workflows/testarch/README.md +74 -0
  463. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/SKILL.md +6 -0
  464. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/bmad-skill-manifest.yaml +1 -0
  465. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/checklist.md +197 -0
  466. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/data/curriculum.yaml +129 -0
  467. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/data/quiz-questions.yaml +206 -0
  468. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/data/role-paths.yaml +136 -0
  469. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/data/session-content-map.yaml +207 -0
  470. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/data/tea-resources-index.yaml +359 -0
  471. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/instructions.md +130 -0
  472. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-01-init.md +235 -0
  473. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-01b-continue.md +147 -0
  474. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-02-assess.md +258 -0
  475. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-03-session-menu.md +219 -0
  476. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-01.md +460 -0
  477. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-02.md +465 -0
  478. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-03.md +301 -0
  479. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-04.md +234 -0
  480. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-05.md +234 -0
  481. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-06.md +209 -0
  482. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-04-session-07.md +212 -0
  483. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-c/step-05-completion.md +339 -0
  484. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-01-assess-workflow.md +141 -0
  485. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-e/step-e-02-apply-edits.md +122 -0
  486. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/steps-v/step-v-01-validate.md +263 -0
  487. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/templates/certificate-template.md +86 -0
  488. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/templates/progress-template.yaml +95 -0
  489. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/templates/session-notes-template.md +83 -0
  490. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/workflow-plan-teach-me-testing.md +950 -0
  491. package/_bmad/tea/workflows/testarch/bmad-teach-me-testing/workflow.md +90 -0
  492. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/SKILL.md +6 -0
  493. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/atdd-checklist-template.md +371 -0
  494. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/bmad-skill-manifest.yaml +1 -0
  495. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/checklist.md +374 -0
  496. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/instructions.md +45 -0
  497. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-01-preflight-and-context.md +226 -0
  498. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-01b-resume.md +96 -0
  499. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-02-generation-mode.md +125 -0
  500. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-03-test-strategy.md +110 -0
  501. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-04-generate-tests.md +334 -0
  502. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-04a-subagent-api-failing.md +286 -0
  503. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-04b-subagent-e2e-failing.md +244 -0
  504. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-04c-aggregate.md +370 -0
  505. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-c/step-05-validate-and-complete.md +106 -0
  506. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-e/step-01-assess.md +65 -0
  507. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-e/step-02-apply-edit.md +60 -0
  508. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/steps-v/step-01-validate.md +67 -0
  509. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/validation-report-20260127-095021.md +73 -0
  510. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/validation-report-20260127-102401.md +116 -0
  511. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/workflow-plan.md +21 -0
  512. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/workflow.md +41 -0
  513. package/_bmad/tea/workflows/testarch/bmad-testarch-atdd/workflow.yaml +46 -0
  514. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/SKILL.md +6 -0
  515. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/bmad-skill-manifest.yaml +1 -0
  516. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/checklist.md +611 -0
  517. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/instructions.md +50 -0
  518. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-01-preflight-and-context.md +237 -0
  519. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-01b-resume.md +94 -0
  520. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-02-identify-targets.md +169 -0
  521. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-03-generate-tests.md +394 -0
  522. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-03a-subagent-api.md +263 -0
  523. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-03b-subagent-backend.md +246 -0
  524. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-03b-subagent-e2e.md +213 -0
  525. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-03c-aggregate.md +393 -0
  526. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-c/step-04-validate-and-summarize.md +106 -0
  527. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-e/step-01-assess.md +65 -0
  528. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-e/step-02-apply-edit.md +60 -0
  529. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/steps-v/step-01-validate.md +67 -0
  530. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/validation-report-20260127-095021.md +72 -0
  531. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/validation-report-20260127-102401.md +114 -0
  532. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/workflow-plan.md +20 -0
  533. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/workflow.md +41 -0
  534. package/_bmad/tea/workflows/testarch/bmad-testarch-automate/workflow.yaml +53 -0
  535. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/SKILL.md +6 -0
  536. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/azure-pipelines-template.yaml +155 -0
  537. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/bmad-skill-manifest.yaml +1 -0
  538. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/checklist.md +289 -0
  539. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/github-actions-template.yaml +328 -0
  540. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/gitlab-ci-template.yaml +158 -0
  541. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/harness-pipeline-template.yaml +159 -0
  542. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/instructions.md +45 -0
  543. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/jenkins-pipeline-template.groovy +129 -0
  544. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-c/step-01-preflight.md +158 -0
  545. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-c/step-01b-resume.md +110 -0
  546. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-c/step-02-generate-pipeline.md +279 -0
  547. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-c/step-03-configure-quality-gates.md +135 -0
  548. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-c/step-04-validate-and-summary.md +92 -0
  549. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-e/step-01-assess.md +65 -0
  550. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-e/step-02-apply-edit.md +60 -0
  551. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/steps-v/step-01-validate.md +81 -0
  552. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/validation-report-20260127-095021.md +72 -0
  553. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/validation-report-20260127-102401.md +114 -0
  554. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/workflow-plan.md +20 -0
  555. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/workflow.md +41 -0
  556. package/_bmad/tea/workflows/testarch/bmad-testarch-ci/workflow.yaml +48 -0
  557. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/SKILL.md +6 -0
  558. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/bmad-skill-manifest.yaml +1 -0
  559. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/checklist.md +345 -0
  560. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/instructions.md +45 -0
  561. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-01-preflight.md +132 -0
  562. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-01b-resume.md +116 -0
  563. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-02-select-framework.md +117 -0
  564. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-03-scaffold-framework.md +323 -0
  565. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-04-docs-and-scripts.md +105 -0
  566. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-c/step-05-validate-and-summary.md +93 -0
  567. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-e/step-01-assess.md +65 -0
  568. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-e/step-02-apply-edit.md +60 -0
  569. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/steps-v/step-01-validate.md +67 -0
  570. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/validation-report-20260127-095021.md +73 -0
  571. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/validation-report-20260127-102401.md +116 -0
  572. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/workflow-plan.md +22 -0
  573. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/workflow.md +41 -0
  574. package/_bmad/tea/workflows/testarch/bmad-testarch-framework/workflow.yaml +48 -0
  575. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/SKILL.md +6 -0
  576. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/bmad-skill-manifest.yaml +1 -0
  577. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/checklist.md +407 -0
  578. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/instructions.md +43 -0
  579. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/nfr-report-template.md +470 -0
  580. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-01-load-context.md +138 -0
  581. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-01b-resume.md +106 -0
  582. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-02-define-thresholds.md +107 -0
  583. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-03-gather-evidence.md +108 -0
  584. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04-evaluate-and-score.md +254 -0
  585. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04a-subagent-security.md +138 -0
  586. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04b-subagent-performance.md +84 -0
  587. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04c-subagent-reliability.md +85 -0
  588. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04d-subagent-scalability.md +88 -0
  589. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-04e-aggregate-nfr.md +264 -0
  590. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-c/step-05-generate-report.md +108 -0
  591. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-e/step-01-assess.md +65 -0
  592. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-e/step-02-apply-edit.md +60 -0
  593. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/steps-v/step-01-validate.md +67 -0
  594. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/validation-report-20260127-095021.md +73 -0
  595. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/validation-report-20260127-102401.md +116 -0
  596. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/workflow-plan.md +19 -0
  597. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/workflow.md +41 -0
  598. package/_bmad/tea/workflows/testarch/bmad-testarch-nfr/workflow.yaml +48 -0
  599. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/SKILL.md +6 -0
  600. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/bmad-skill-manifest.yaml +1 -0
  601. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/checklist.md +464 -0
  602. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/instructions.md +105 -0
  603. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-01-detect-mode.md +134 -0
  604. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-01b-resume.md +102 -0
  605. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-02-load-context.md +242 -0
  606. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-03-risk-and-testability.md +110 -0
  607. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-04-coverage-plan.md +123 -0
  608. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-c/step-05-generate-output.md +222 -0
  609. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-e/step-01-assess.md +65 -0
  610. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-e/step-02-apply-edit.md +60 -0
  611. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/steps-v/step-01-validate.md +67 -0
  612. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/test-design-architecture-template.md +230 -0
  613. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/test-design-handoff-template.md +70 -0
  614. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/test-design-qa-template.md +396 -0
  615. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/test-design-template.md +344 -0
  616. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/validation-report-20260127-095021.md +73 -0
  617. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/validation-report-20260127-102401.md +116 -0
  618. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/workflow-plan.md +22 -0
  619. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/workflow.md +41 -0
  620. package/_bmad/tea/workflows/testarch/bmad-testarch-test-design/workflow.yaml +77 -0
  621. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/SKILL.md +6 -0
  622. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/bmad-skill-manifest.yaml +1 -0
  623. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/checklist.md +475 -0
  624. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/instructions.md +45 -0
  625. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-01-load-context.md +197 -0
  626. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-01b-resume.md +104 -0
  627. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-02-discover-tests.md +113 -0
  628. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03-quality-evaluation.md +274 -0
  629. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03a-subagent-determinism.md +214 -0
  630. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03b-subagent-isolation.md +125 -0
  631. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03c-subagent-maintainability.md +102 -0
  632. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03e-subagent-performance.md +117 -0
  633. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-03f-aggregate-scores.md +277 -0
  634. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-c/step-04-generate-report.md +111 -0
  635. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-e/step-01-assess.md +65 -0
  636. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-e/step-02-apply-edit.md +60 -0
  637. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/steps-v/step-01-validate.md +67 -0
  638. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/test-review-template.md +387 -0
  639. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/validation-report-20260127-095021.md +72 -0
  640. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/validation-report-20260127-102401.md +114 -0
  641. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/workflow-plan.md +18 -0
  642. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/workflow.md +41 -0
  643. package/_bmad/tea/workflows/testarch/bmad-testarch-test-review/workflow.yaml +48 -0
  644. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/SKILL.md +6 -0
  645. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/bmad-skill-manifest.yaml +1 -0
  646. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/checklist.md +647 -0
  647. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/instructions.md +43 -0
  648. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-01-load-context.md +105 -0
  649. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-01b-resume.md +102 -0
  650. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-02-discover-tests.md +112 -0
  651. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-03-map-criteria.md +97 -0
  652. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-04-analyze-gaps.md +421 -0
  653. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-c/step-05-gate-decision.md +266 -0
  654. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-e/step-01-assess.md +65 -0
  655. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-e/step-02-apply-edit.md +60 -0
  656. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/steps-v/step-01-validate.md +67 -0
  657. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/trace-template.md +708 -0
  658. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/validation-report-20260127-095021.md +73 -0
  659. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/validation-report-20260127-102401.md +116 -0
  660. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/workflow-plan.md +21 -0
  661. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/workflow.md +41 -0
  662. package/_bmad/tea/workflows/testarch/bmad-testarch-trace/workflow.yaml +56 -0
  663. package/bin/bmad-studio.mjs +25 -0
  664. package/eslint.config.js +38 -0
  665. package/package.json +56 -0
  666. package/packages/client/index.html +12 -0
  667. package/packages/client/package.json +46 -0
  668. package/packages/client/src/app.tsx +57 -0
  669. package/packages/client/src/features/about/AboutPage.tsx +144 -0
  670. package/packages/client/src/features/agents/AgentCard.tsx +52 -0
  671. package/packages/client/src/features/agents/AgentDetail.tsx +338 -0
  672. package/packages/client/src/features/agents/AgentOverrideEditor.tsx +127 -0
  673. package/packages/client/src/features/agents/AgentsPage.tsx +114 -0
  674. package/packages/client/src/features/agents/EditAgentDialog.tsx +260 -0
  675. package/packages/client/src/features/agents/SkillAssignment.tsx +153 -0
  676. package/packages/client/src/features/agents/use-agent-detail.ts +17 -0
  677. package/packages/client/src/features/agents/use-agent-mutations.ts +47 -0
  678. package/packages/client/src/features/agents/use-agents.ts +17 -0
  679. package/packages/client/src/features/connections/ConnectionsPage.tsx +165 -0
  680. package/packages/client/src/features/files/FilesPage.tsx +177 -0
  681. package/packages/client/src/features/outputs/OutputsPage.tsx +190 -0
  682. package/packages/client/src/features/overview/OverviewPage.tsx +282 -0
  683. package/packages/client/src/features/packages/EditModuleDialog.tsx +118 -0
  684. package/packages/client/src/features/packages/PackagesPage.tsx +982 -0
  685. package/packages/client/src/features/settings/SettingsPage.tsx +141 -0
  686. package/packages/client/src/features/settings/use-settings.ts +34 -0
  687. package/packages/client/src/features/skills/CreateSkillDialog.tsx +328 -0
  688. package/packages/client/src/features/skills/SkillDetailSlideOver.tsx +179 -0
  689. package/packages/client/src/features/skills/SkillsPage.tsx +142 -0
  690. package/packages/client/src/features/skills/use-skills.ts +27 -0
  691. package/packages/client/src/features/teams/CreateTeamDialog.tsx +239 -0
  692. package/packages/client/src/features/teams/TeamDetailPanel.tsx +549 -0
  693. package/packages/client/src/features/teams/TeamsPage.tsx +196 -0
  694. package/packages/client/src/features/teams/use-teams.ts +39 -0
  695. package/packages/client/src/features/workflows/CreateWorkflowDialog.tsx +395 -0
  696. package/packages/client/src/features/workflows/EditWorkflowDialog.tsx +131 -0
  697. package/packages/client/src/features/workflows/WorkflowDetailPanel.tsx +503 -0
  698. package/packages/client/src/features/workflows/WorkflowGraph.tsx +108 -0
  699. package/packages/client/src/features/workflows/WorkflowsPage.tsx +277 -0
  700. package/packages/client/src/features/workflows/use-workflows.ts +27 -0
  701. package/packages/client/src/features/workspace/WorkspacePage.tsx +304 -0
  702. package/packages/client/src/globals.css +184 -0
  703. package/packages/client/src/hooks/use-detail-param.ts +31 -0
  704. package/packages/client/src/hooks/use-file-save.ts +22 -0
  705. package/packages/client/src/hooks/use-websocket.ts +38 -0
  706. package/packages/client/src/layout/AppShell.tsx +20 -0
  707. package/packages/client/src/layout/Breadcrumbs.tsx +52 -0
  708. package/packages/client/src/layout/NotificationProvider.tsx +95 -0
  709. package/packages/client/src/layout/Sidebar.tsx +176 -0
  710. package/packages/client/src/lib/theme.ts +30 -0
  711. package/packages/client/src/lib/websocket-client.ts +97 -0
  712. package/packages/client/src/main.tsx +14 -0
  713. package/packages/client/src/shared/CommandPalette.tsx +151 -0
  714. package/packages/client/src/shared/CsvViewer.tsx +120 -0
  715. package/packages/client/src/shared/EmptyState.tsx +20 -0
  716. package/packages/client/src/shared/EntityPageHeader.tsx +95 -0
  717. package/packages/client/src/shared/FilepathLink.tsx +22 -0
  718. package/packages/client/src/shared/Skeleton.tsx +31 -0
  719. package/packages/client/src/shared/SlideOver.tsx +63 -0
  720. package/packages/client/src/shared/VocabularyHelper.tsx +48 -0
  721. package/packages/client/src/shared/diff-viewer/DiffViewer.tsx +93 -0
  722. package/packages/client/src/shared/markdown-editor/CodeMirrorEditor.tsx +199 -0
  723. package/packages/client/src/shared/markdown-editor/MarkdownEditor.tsx +95 -0
  724. package/packages/client/src/stores/ui-store.ts +13 -0
  725. package/packages/client/tsconfig.json +13 -0
  726. package/packages/client/vite.config.ts +20 -0
  727. package/packages/server/package.json +30 -0
  728. package/packages/server/src/app.test.ts +89 -0
  729. package/packages/server/src/app.ts +101 -0
  730. package/packages/server/src/core/errors.test.ts +49 -0
  731. package/packages/server/src/core/errors.ts +62 -0
  732. package/packages/server/src/core/file-store.test.ts +104 -0
  733. package/packages/server/src/core/file-store.ts +209 -0
  734. package/packages/server/src/core/project-detector.test.ts +94 -0
  735. package/packages/server/src/core/project-detector.ts +97 -0
  736. package/packages/server/src/core/websocket.test.ts +80 -0
  737. package/packages/server/src/core/websocket.ts +47 -0
  738. package/packages/server/src/core/write-service.test.ts +87 -0
  739. package/packages/server/src/core/write-service.ts +75 -0
  740. package/packages/server/src/index.ts +97 -0
  741. package/packages/server/src/parsers/agent-parser.test.ts +71 -0
  742. package/packages/server/src/parsers/agent-parser.ts +83 -0
  743. package/packages/server/src/parsers/config-parser.test.ts +65 -0
  744. package/packages/server/src/parsers/config-parser.ts +51 -0
  745. package/packages/server/src/parsers/csv-parser.test.ts +53 -0
  746. package/packages/server/src/parsers/csv-parser.ts +55 -0
  747. package/packages/server/src/parsers/ide-config-parser.test.ts +35 -0
  748. package/packages/server/src/parsers/ide-config-parser.ts +37 -0
  749. package/packages/server/src/parsers/index-builder.test.ts +78 -0
  750. package/packages/server/src/parsers/index-builder.ts +195 -0
  751. package/packages/server/src/parsers/package-parser.test.ts +36 -0
  752. package/packages/server/src/parsers/package-parser.ts +34 -0
  753. package/packages/server/src/parsers/skill-parser.test.ts +51 -0
  754. package/packages/server/src/parsers/skill-parser.ts +26 -0
  755. package/packages/server/src/parsers/team-parser.test.ts +186 -0
  756. package/packages/server/src/parsers/team-parser.ts +128 -0
  757. package/packages/server/src/parsers/workflow-parser.test.ts +415 -0
  758. package/packages/server/src/parsers/workflow-parser.ts +311 -0
  759. package/packages/server/src/plugins/agents-plugin.test.ts +111 -0
  760. package/packages/server/src/plugins/agents-plugin.ts +164 -0
  761. package/packages/server/src/plugins/files-plugin.test.ts +121 -0
  762. package/packages/server/src/plugins/files-plugin.ts +93 -0
  763. package/packages/server/src/plugins/modules-plugin.test.ts +264 -0
  764. package/packages/server/src/plugins/modules-plugin.ts +386 -0
  765. package/packages/server/src/plugins/outputs-plugin.test.ts +89 -0
  766. package/packages/server/src/plugins/outputs-plugin.ts +93 -0
  767. package/packages/server/src/plugins/overview-plugin.ts +73 -0
  768. package/packages/server/src/plugins/search-plugin.ts +63 -0
  769. package/packages/server/src/plugins/settings-plugin.test.ts +82 -0
  770. package/packages/server/src/plugins/settings-plugin.ts +46 -0
  771. package/packages/server/src/plugins/skills-plugin.ts +87 -0
  772. package/packages/server/src/plugins/teams-plugin.test.ts +157 -0
  773. package/packages/server/src/plugins/teams-plugin.ts +198 -0
  774. package/packages/server/src/plugins/validation-plugin.test.ts +229 -0
  775. package/packages/server/src/plugins/validation-plugin.ts +116 -0
  776. package/packages/server/src/plugins/workflows-plugin.test.ts +145 -0
  777. package/packages/server/src/plugins/workflows-plugin.ts +270 -0
  778. package/packages/server/src/static.ts +29 -0
  779. package/packages/server/tsconfig.json +8 -0
  780. package/packages/shared/package.json +20 -0
  781. package/packages/shared/src/agents.ts +39 -0
  782. package/packages/shared/src/config.ts +33 -0
  783. package/packages/shared/src/connections.ts +28 -0
  784. package/packages/shared/src/errors.ts +17 -0
  785. package/packages/shared/src/events.ts +35 -0
  786. package/packages/shared/src/files.ts +11 -0
  787. package/packages/shared/src/index.ts +40 -0
  788. package/packages/shared/src/outputs.ts +25 -0
  789. package/packages/shared/src/packages.ts +30 -0
  790. package/packages/shared/src/skills.ts +17 -0
  791. package/packages/shared/src/teams.ts +33 -0
  792. package/packages/shared/src/types.test.ts +164 -0
  793. package/packages/shared/src/validation.ts +15 -0
  794. package/packages/shared/src/workflows.ts +47 -0
  795. package/packages/shared/src/workspace.ts +12 -0
  796. package/packages/shared/tsconfig.json +8 -0
  797. package/tsconfig.base.json +19 -0
  798. package/vitest.config.ts +7 -0
@@ -0,0 +1,1002 @@
1
+ # /// script
2
+ # requires-python = ">=3.9"
3
+ # ///
4
+
5
+ #!/usr/bin/env python3
6
+ """
7
+ Generate an interactive HTML quality report from scanner temp JSON files.
8
+
9
+ Reads all *-temp.json and *-prepass.json files from a quality scan output
10
+ directory, normalizes findings into a unified data model, and produces a
11
+ self-contained HTML report with:
12
+ - Collapsible sections with severity filter badges
13
+ - Per-item copy-prompt buttons
14
+ - Multi-select batch prompt generator
15
+ - Executive summary with severity counts
16
+
17
+ Usage:
18
+ python3 generate-html-report.py {quality-report-dir} [--open] [--skill-path /path/to/skill]
19
+
20
+ The --skill-path is embedded in the prompt context so generated prompts
21
+ reference the correct location. If omitted, it is read from the first
22
+ temp JSON that contains a skill_path field.
23
+ """
24
+
25
+ from __future__ import annotations
26
+
27
+ import argparse
28
+ import json
29
+ import platform
30
+ import subprocess
31
+ import sys
32
+ from datetime import datetime, timezone
33
+ from pathlib import Path
34
+
35
+
36
+ # =============================================================================
37
+ # Normalization — diverse scanner JSONs → unified item model
38
+ # =============================================================================
39
+
40
+ SEVERITY_RANK = {
41
+ 'critical': 0, 'high': 1, 'medium': 2, 'low': 3,
42
+ 'high-opportunity': 1, 'medium-opportunity': 2, 'low-opportunity': 3,
43
+ 'note': 4, 'strength': 5, 'suggestion': 4, 'info': 5,
44
+ }
45
+
46
+ # Map scanner names to report sections
47
+ SCANNER_SECTIONS = {
48
+ 'workflow-integrity': 'structural',
49
+ 'structure': 'structure-capabilities',
50
+ 'prompt-craft': 'prompt-craft',
51
+ 'execution-efficiency': 'efficiency',
52
+ 'skill-cohesion': 'cohesion',
53
+ 'agent-cohesion': 'cohesion',
54
+ 'path-standards': 'quality',
55
+ 'scripts': 'scripts',
56
+ 'script-opportunities': 'script-opportunities',
57
+ 'enhancement-opportunities': 'creative',
58
+ }
59
+
60
+ SECTION_LABELS = {
61
+ 'structural': 'Structural',
62
+ 'structure-capabilities': 'Structure & Capabilities',
63
+ 'prompt-craft': 'Prompt Craft',
64
+ 'efficiency': 'Efficiency',
65
+ 'cohesion': 'Cohesion',
66
+ 'quality': 'Path & Script Standards',
67
+ 'scripts': 'Scripts',
68
+ 'script-opportunities': 'Script Opportunities',
69
+ 'creative': 'Creative & Enhancements',
70
+ }
71
+
72
+
73
+ def _coalesce(*values) -> str:
74
+ """Return the first truthy string value, or empty string."""
75
+ for v in values:
76
+ if v and isinstance(v, str) and v.strip() and v.strip() not in ('N/A', 'n/a', 'None'):
77
+ return v.strip()
78
+ return ''
79
+
80
+
81
+ def _norm_severity(sev: str) -> str:
82
+ """Normalize severity to lowercase, handle variants."""
83
+ if not sev:
84
+ return 'low'
85
+ s = sev.strip().lower()
86
+ # Map common variants
87
+ return {
88
+ 'high-opportunity': 'high-opportunity',
89
+ 'medium-opportunity': 'medium-opportunity',
90
+ 'low-opportunity': 'low-opportunity',
91
+ }.get(s, s)
92
+
93
+
94
+ def normalize_finding(f: dict, scanner: str, idx: int) -> dict:
95
+ """
96
+ Normalize a single finding/issue dict into the unified item model.
97
+
98
+ Handles all known field name variants across scanners:
99
+ Title: issue | title | description (fallback)
100
+ Desc: description | rationale | observation | insight | scenario |
101
+ current_behavior | current_pattern | context | nuance
102
+ Action: fix | recommendation | suggestion | suggested_approach |
103
+ efficient_alternative | script_alternative
104
+ File: file | location | current_location
105
+ Line: line | lines
106
+ Cat: category | dimension
107
+ Impact: user_impact | impact | estimated_savings | estimated_token_savings
108
+ """
109
+ sev = _norm_severity(f.get('severity', 'low'))
110
+ section = SCANNER_SECTIONS.get(scanner, 'other')
111
+
112
+ # Determine item type from severity
113
+ if sev in ('strength', 'note') or f.get('category') == 'strength':
114
+ item_type = 'strength'
115
+ action_type = 'none'
116
+ selectable = False
117
+ elif sev.endswith('-opportunity'):
118
+ item_type = 'enhancement'
119
+ action_type = 'enhance'
120
+ selectable = True
121
+ elif f.get('category') == 'suggestion' or sev == 'suggestion':
122
+ item_type = 'suggestion'
123
+ action_type = 'refactor'
124
+ selectable = True
125
+ else:
126
+ item_type = 'issue'
127
+ action_type = 'fix'
128
+ selectable = True
129
+
130
+ # --- Title: prefer 'title', fall back to old field names ---
131
+ title = _coalesce(
132
+ f.get('title'),
133
+ f.get('issue'),
134
+ _truncate(f.get('scenario', ''), 150),
135
+ _truncate(f.get('current_behavior', ''), 150),
136
+ _truncate(f.get('description', ''), 150),
137
+ f.get('observation', ''),
138
+ )
139
+ if not title:
140
+ title = f.get('id', 'Finding')
141
+
142
+ # --- Detail/description: prefer 'detail', fall back to old field names ---
143
+ description = _coalesce(f.get('detail'))
144
+ if not description:
145
+ # Backward compat: coalesce old field names
146
+ desc_candidates = []
147
+ for key in ('description', 'rationale', 'observation', 'insight', 'scenario',
148
+ 'current_behavior', 'current_pattern', 'context', 'nuance',
149
+ 'assessment'):
150
+ v = f.get(key)
151
+ if v and isinstance(v, str) and v.strip() and v != title:
152
+ desc_candidates.append(v.strip())
153
+ description = ' '.join(desc_candidates) if desc_candidates else ''
154
+
155
+ # --- Action: prefer 'action', fall back to old field names ---
156
+ action = _coalesce(
157
+ f.get('action'),
158
+ f.get('fix'),
159
+ f.get('recommendation'),
160
+ f.get('suggestion'),
161
+ f.get('suggested_approach'),
162
+ f.get('efficient_alternative'),
163
+ f.get('script_alternative'),
164
+ )
165
+
166
+ # --- File reference ---
167
+ file_ref = _coalesce(
168
+ f.get('file'),
169
+ f.get('location'),
170
+ f.get('current_location'),
171
+ )
172
+
173
+ # --- Line reference ---
174
+ line = f.get('line')
175
+ if line is None:
176
+ lines_str = f.get('lines')
177
+ if lines_str:
178
+ line = str(lines_str)
179
+
180
+ # --- Category ---
181
+ category = _coalesce(
182
+ f.get('category'),
183
+ f.get('dimension'),
184
+ )
185
+
186
+ # --- Impact (backward compat only - new schema folds into detail) ---
187
+ impact = _coalesce(
188
+ f.get('user_impact'),
189
+ f.get('impact'),
190
+ f.get('estimated_savings'),
191
+ str(f.get('estimated_token_savings', '')) if f.get('estimated_token_savings') else '',
192
+ )
193
+
194
+ # --- Extra fields for specific scanners ---
195
+ extra = {}
196
+ if scanner == 'script-opportunities':
197
+ action_type = 'create-script'
198
+ for k in ('determinism_confidence', 'implementation_complexity',
199
+ 'language', 'could_be_prepass', 'reusable_across_skills'):
200
+ if k in f:
201
+ extra[k] = f[k]
202
+
203
+ # Use scanner-provided id if available
204
+ item_id = f.get('id', f'{scanner}-{idx:03d}')
205
+
206
+ return {
207
+ 'id': item_id,
208
+ 'scanner': scanner,
209
+ 'section': section,
210
+ 'type': item_type,
211
+ 'severity': sev,
212
+ 'rank': SEVERITY_RANK.get(sev, 3),
213
+ 'category': category,
214
+ 'file': file_ref,
215
+ 'line': line,
216
+ 'title': title,
217
+ 'description': description,
218
+ 'action': action,
219
+ 'impact': impact,
220
+ 'extra': extra,
221
+ 'selectable': selectable,
222
+ 'action_type': action_type,
223
+ }
224
+
225
+
226
+ def _truncate(text: str, max_len: int) -> str:
227
+ """Truncate text to max_len, breaking at sentence boundary if possible."""
228
+ if not text:
229
+ return ''
230
+ text = text.strip()
231
+ if len(text) <= max_len:
232
+ return text
233
+ # Try to break at sentence boundary
234
+ for end in ('. ', '.\n', ' — ', '; '):
235
+ pos = text.find(end)
236
+ if 0 < pos < max_len:
237
+ return text[:pos + 1].strip()
238
+ return text[:max_len].strip() + '...'
239
+
240
+
241
+ def normalize_scanner(data: dict) -> tuple[list[dict], dict]:
242
+ """
243
+ Normalize a full scanner JSON into (items, meta).
244
+ Returns list of normalized items + dict of meta/assessment data.
245
+ Handles all known scanner output variants.
246
+ """
247
+ scanner = data.get('scanner', 'unknown')
248
+ items = []
249
+ meta = {}
250
+
251
+ # New schema: findings[]. Backward compat: issues[] or findings[]
252
+ findings = data.get('findings') or data.get('issues') or []
253
+ for idx, f in enumerate(findings):
254
+ items.append(normalize_finding(f, scanner, idx))
255
+
256
+ # Backward compat: opportunities[] (execution-efficiency had separate array)
257
+ for idx, opp in enumerate(data.get('opportunities', []), start=len(findings)):
258
+ opp_item = normalize_finding(opp, scanner, idx)
259
+ opp_item['type'] = 'enhancement'
260
+ opp_item['action_type'] = 'enhance'
261
+ opp_item['selectable'] = True
262
+ items.append(opp_item)
263
+
264
+ # Backward compat: strengths[] (old cohesion scanners — plain strings)
265
+ for idx, s in enumerate(data.get('strengths', [])):
266
+ text = s if isinstance(s, str) else (s.get('title', '') if isinstance(s, dict) else str(s))
267
+ desc = '' if isinstance(s, str) else (s.get('description', s.get('detail', '')) if isinstance(s, dict) else '')
268
+ items.append({
269
+ 'id': f'{scanner}-str-{idx:03d}',
270
+ 'scanner': scanner,
271
+ 'section': SCANNER_SECTIONS.get(scanner, 'cohesion'),
272
+ 'type': 'strength',
273
+ 'severity': 'strength',
274
+ 'rank': 5,
275
+ 'category': 'strength',
276
+ 'file': '',
277
+ 'line': None,
278
+ 'title': text,
279
+ 'description': desc,
280
+ 'action': '',
281
+ 'impact': '',
282
+ 'extra': {},
283
+ 'selectable': False,
284
+ 'action_type': 'none',
285
+ })
286
+
287
+ # Backward compat: creative_suggestions[] (old cohesion scanners)
288
+ for idx, cs in enumerate(data.get('creative_suggestions', [])):
289
+ if isinstance(cs, str):
290
+ cs_title, cs_desc = cs, ''
291
+ else:
292
+ cs_title = _coalesce(cs.get('title'), cs.get('idea'), '')
293
+ cs_desc = _coalesce(cs.get('description'), cs.get('detail'), cs.get('rationale'), '')
294
+ items.append({
295
+ 'id': cs.get('id', f'{scanner}-cs-{idx:03d}') if isinstance(cs, dict) else f'{scanner}-cs-{idx:03d}',
296
+ 'scanner': scanner,
297
+ 'section': SCANNER_SECTIONS.get(scanner, 'cohesion'),
298
+ 'type': 'suggestion',
299
+ 'severity': 'suggestion',
300
+ 'rank': 4,
301
+ 'category': cs.get('type', 'suggestion') if isinstance(cs, dict) else 'suggestion',
302
+ 'file': '',
303
+ 'line': None,
304
+ 'title': cs_title,
305
+ 'description': cs_desc,
306
+ 'action': cs_title,
307
+ 'impact': cs.get('estimated_impact', '') if isinstance(cs, dict) else '',
308
+ 'extra': {},
309
+ 'selectable': True,
310
+ 'action_type': 'refactor',
311
+ })
312
+
313
+ # New schema: assessments{} contains all structured analysis
314
+ # Backward compat: also collect from top-level keys
315
+ if 'assessments' in data:
316
+ meta.update(data['assessments'])
317
+
318
+ # Backward compat: collect meta from top-level keys
319
+ skip_keys = {'scanner', 'script', 'version', 'skill_path', 'agent_path',
320
+ 'timestamp', 'scan_date', 'status', 'issues', 'findings',
321
+ 'strengths', 'creative_suggestions', 'opportunities', 'assessments'}
322
+ for key, val in data.items():
323
+ if key not in skip_keys and key not in meta:
324
+ meta[key] = val
325
+
326
+ return items, meta
327
+
328
+
329
+ def build_journeys(data: dict) -> list[dict]:
330
+ """
331
+ Extract user journey data from enhancement-opportunities scanner.
332
+ Handles two formats:
333
+ - Array of objects: [{archetype, journey_summary, friction_points, bright_spots}]
334
+ - Object keyed by persona: {first_timer: {entry_friction, mid_flow_resilience, exit_satisfaction}}
335
+ """
336
+ journeys_raw = data.get('user_journeys')
337
+ if not journeys_raw:
338
+ return []
339
+
340
+ # Format 1: already a list — normalize field names
341
+ if isinstance(journeys_raw, list):
342
+ normalized = []
343
+ for j in journeys_raw:
344
+ if isinstance(j, dict):
345
+ normalized.append({
346
+ 'archetype': j.get('archetype', 'unknown'),
347
+ 'journey_summary': j.get('summary', j.get('journey_summary', '')),
348
+ 'friction_points': j.get('friction_points', []),
349
+ 'bright_spots': j.get('bright_spots', []),
350
+ })
351
+ else:
352
+ normalized.append(j)
353
+ return normalized
354
+
355
+ # Format 2: object keyed by persona name
356
+ if isinstance(journeys_raw, dict):
357
+ result = []
358
+ for persona, details in journeys_raw.items():
359
+ if isinstance(details, dict):
360
+ # Convert the dict-based format to the expected format
361
+ journey = {
362
+ 'archetype': persona.replace('_', ' ').title(),
363
+ 'journey_summary': '',
364
+ 'friction_points': [],
365
+ 'bright_spots': [],
366
+ }
367
+ # Map known sub-keys to friction/bright spots
368
+ for key, val in details.items():
369
+ if isinstance(val, str):
370
+ # Heuristic: negative-sounding keys → friction, positive → bright
371
+ if any(neg in key.lower() for neg in ('friction', 'issue', 'problem', 'gap', 'pain')):
372
+ journey['friction_points'].append(val)
373
+ elif any(pos in key.lower() for pos in ('bright', 'strength', 'satisfaction', 'delight')):
374
+ journey['bright_spots'].append(val)
375
+ else:
376
+ # Neutral keys — include as summary parts
377
+ if journey['journey_summary']:
378
+ journey['journey_summary'] += f' | {key}: {val}'
379
+ else:
380
+ journey['journey_summary'] = f'{key}: {val}'
381
+ elif isinstance(val, list):
382
+ for item in val:
383
+ if isinstance(item, str):
384
+ journey['friction_points'].append(item)
385
+ # Build summary from all fields if not yet set
386
+ if not journey['journey_summary']:
387
+ parts = []
388
+ for k, v in details.items():
389
+ if isinstance(v, str):
390
+ parts.append(f'**{k.replace("_", " ").title()}:** {v}')
391
+ journey['journey_summary'] = ' | '.join(parts) if parts else str(details)
392
+ result.append(journey)
393
+ elif isinstance(details, str):
394
+ result.append({
395
+ 'archetype': persona.replace('_', ' ').title(),
396
+ 'journey_summary': details,
397
+ 'friction_points': [],
398
+ 'bright_spots': [],
399
+ })
400
+ return result
401
+
402
+ return []
403
+
404
+
405
+ # =============================================================================
406
+ # Report Data Assembly
407
+ # =============================================================================
408
+
409
+ def load_report_data(report_dir: Path, skill_path: str | None) -> dict:
410
+ """Load all temp/prepass JSONs and assemble normalized report data."""
411
+ all_items = []
412
+ all_meta = {}
413
+ journeys = []
414
+ detected_skill_path = skill_path
415
+
416
+ # Read all JSON files
417
+ json_files = sorted(report_dir.glob('*.json'))
418
+ for jf in json_files:
419
+ try:
420
+ data = json.loads(jf.read_text(encoding='utf-8'))
421
+ except (json.JSONDecodeError, OSError):
422
+ continue
423
+
424
+ if not isinstance(data, dict):
425
+ continue
426
+
427
+ scanner = data.get('scanner', jf.stem.replace('-temp', '').replace('-prepass', ''))
428
+
429
+ # Detect skill path from scanner data
430
+ if not detected_skill_path:
431
+ detected_skill_path = data.get('skill_path') or data.get('agent_path')
432
+
433
+ # Only normalize temp files (not prepass)
434
+ if '-temp' in jf.name or jf.name in ('path-standards-temp.json', 'scripts-temp.json'):
435
+ items, meta = normalize_scanner(data)
436
+ all_items.extend(items)
437
+ all_meta[scanner] = meta
438
+
439
+ if scanner == 'enhancement-opportunities':
440
+ journeys = build_journeys(data)
441
+ elif '-prepass' in jf.name:
442
+ all_meta[f'prepass-{scanner}'] = data
443
+
444
+ # Sort items: severity rank first, then section
445
+ all_items.sort(key=lambda x: (x['rank'], x['section']))
446
+
447
+ # Build severity counts
448
+ counts = {'critical': 0, 'high': 0, 'medium': 0, 'low': 0}
449
+ for item in all_items:
450
+ if item['type'] == 'issue' and item['severity'] in counts:
451
+ counts[item['severity']] += 1
452
+
453
+ enhancement_count = sum(1 for i in all_items if i['type'] == 'enhancement')
454
+ strength_count = sum(1 for i in all_items if i['type'] == 'strength')
455
+ total_issues = sum(counts.values())
456
+
457
+ # Quality grade
458
+ if counts['critical'] > 0:
459
+ grade = 'Poor'
460
+ elif counts['high'] > 2:
461
+ grade = 'Fair'
462
+ elif counts['high'] > 0 or counts['medium'] > 5:
463
+ grade = 'Good'
464
+ else:
465
+ grade = 'Excellent'
466
+
467
+ # Extract assessments for display
468
+ assessments = {}
469
+ for scanner_key, meta in all_meta.items():
470
+ for akey in ('cohesion_analysis', 'autonomous_assessment', 'skill_understanding',
471
+ 'agent_identity', 'skill_identity', 'prompt_health',
472
+ 'skillmd_assessment', 'top_insights'):
473
+ if akey in meta:
474
+ assessments[akey] = meta[akey]
475
+ if 'summary' in meta:
476
+ s = meta['summary']
477
+ if 'craft_assessment' in s:
478
+ assessments['craft_assessment'] = s['craft_assessment']
479
+ if 'overall_cohesion' in s:
480
+ assessments['overall_cohesion'] = s['overall_cohesion']
481
+
482
+ # Skill name from path
483
+ sp = detected_skill_path or str(report_dir)
484
+ skill_name = Path(sp).name
485
+
486
+ return {
487
+ 'meta': {
488
+ 'skill_name': skill_name,
489
+ 'skill_path': detected_skill_path or '',
490
+ 'timestamp': datetime.now(timezone.utc).isoformat(),
491
+ 'scanner_count': len([f for f in json_files if '-temp' in f.name]),
492
+ 'report_dir': str(report_dir),
493
+ },
494
+ 'executive_summary': {
495
+ 'total_issues': total_issues,
496
+ 'counts': counts,
497
+ 'enhancement_count': enhancement_count,
498
+ 'strength_count': strength_count,
499
+ 'grade': grade,
500
+ 'craft_assessment': assessments.get('craft_assessment', ''),
501
+ 'overall_cohesion': assessments.get('overall_cohesion', ''),
502
+ },
503
+ 'items': all_items,
504
+ 'journeys': journeys,
505
+ 'assessments': assessments,
506
+ 'section_labels': SECTION_LABELS,
507
+ }
508
+
509
+
510
+ # =============================================================================
511
+ # HTML Generation
512
+ # =============================================================================
513
+
514
+ HTML_TEMPLATE = r"""<!DOCTYPE html>
515
+ <html lang="en">
516
+ <head>
517
+ <meta charset="utf-8">
518
+ <meta name="viewport" content="width=device-width, initial-scale=1">
519
+ <title>Quality Report: SKILL_NAME_PLACEHOLDER</title>
520
+ <style>
521
+ :root {
522
+ --bg: #0d1117; --surface: #161b22; --surface2: #21262d; --border: #30363d;
523
+ --text: #e6edf3; --text-muted: #8b949e; --text-dim: #6e7681;
524
+ --critical: #f85149; --high: #f0883e; --medium: #d29922; --low: #58a6ff;
525
+ --strength: #3fb950; --suggestion: #a371f7; --info: #8b949e;
526
+ --accent: #58a6ff; --accent-hover: #79c0ff;
527
+ --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
528
+ --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
529
+ }
530
+ @media (prefers-color-scheme: light) {
531
+ :root {
532
+ --bg: #ffffff; --surface: #f6f8fa; --surface2: #eaeef2; --border: #d0d7de;
533
+ --text: #1f2328; --text-muted: #656d76; --text-dim: #8c959f;
534
+ --critical: #cf222e; --high: #bc4c00; --medium: #9a6700; --low: #0969da;
535
+ --strength: #1a7f37; --suggestion: #8250df; --info: #656d76;
536
+ --accent: #0969da; --accent-hover: #0550ae;
537
+ }
538
+ }
539
+ * { margin: 0; padding: 0; box-sizing: border-box; }
540
+ body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; padding: 2rem; max-width: 960px; margin: 0 auto; padding-bottom: 6rem; }
541
+ h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
542
+ .subtitle { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.5rem; }
543
+ .badge { display: inline-flex; align-items: center; padding: 0.15rem 0.5rem; border-radius: 2rem; font-size: 0.75rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; user-select: none; }
544
+ .badge:hover { filter: brightness(1.2); }
545
+ .badge.active { border-color: currentColor; }
546
+ .badge-critical { background: color-mix(in srgb, var(--critical) 20%, transparent); color: var(--critical); }
547
+ .badge-high { background: color-mix(in srgb, var(--high) 20%, transparent); color: var(--high); }
548
+ .badge-medium { background: color-mix(in srgb, var(--medium) 20%, transparent); color: var(--medium); }
549
+ .badge-low { background: color-mix(in srgb, var(--low) 20%, transparent); color: var(--low); }
550
+ .badge-strength { background: color-mix(in srgb, var(--strength) 20%, transparent); color: var(--strength); }
551
+ .badge-suggestion, .badge-note { background: color-mix(in srgb, var(--suggestion) 20%, transparent); color: var(--suggestion); }
552
+ .badge-high-opportunity { background: color-mix(in srgb, var(--high) 20%, transparent); color: var(--high); }
553
+ .badge-medium-opportunity { background: color-mix(in srgb, var(--medium) 20%, transparent); color: var(--medium); }
554
+ .badge-low-opportunity { background: color-mix(in srgb, var(--low) 20%, transparent); color: var(--low); }
555
+ .badge-info { background: color-mix(in srgb, var(--info) 20%, transparent); color: var(--info); }
556
+ .grade { font-size: 2rem; font-weight: 700; }
557
+ .grade-Excellent { color: var(--strength); }
558
+ .grade-Good { color: var(--low); }
559
+ .grade-Fair { color: var(--medium); }
560
+ .grade-Poor { color: var(--critical); }
561
+ .summary-grid { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem 2rem; margin: 1rem 0; align-items: baseline; }
562
+ .summary-grid dt { color: var(--text-muted); font-size: 0.85rem; }
563
+ .summary-grid dd { font-size: 0.95rem; }
564
+ .filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; }
565
+ .section { border: 1px solid var(--border); border-radius: 0.5rem; margin: 0.75rem 0; overflow: hidden; }
566
+ .section-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--surface); cursor: pointer; user-select: none; }
567
+ .section-header:hover { background: var(--surface2); }
568
+ .section-header .arrow { font-size: 0.7rem; transition: transform 0.15s; color: var(--text-muted); width: 1rem; }
569
+ .section-header.open .arrow { transform: rotate(90deg); }
570
+ .section-header .label { font-weight: 600; flex: 1; }
571
+ .section-header .count { font-size: 0.8rem; color: var(--text-muted); }
572
+ .section-body { display: none; }
573
+ .section-body.open { display: block; }
574
+ .item { display: flex; gap: 0.75rem; padding: 0.75rem 1rem; border-top: 1px solid var(--border); align-items: flex-start; }
575
+ .item:hover { background: var(--surface); }
576
+ .item-check { margin-top: 0.2rem; accent-color: var(--accent); flex-shrink: 0; }
577
+ .item-body { flex: 1; min-width: 0; }
578
+ .item-title { font-weight: 600; font-size: 0.9rem; }
579
+ .item-file { font-family: var(--mono); font-size: 0.75rem; color: var(--text-muted); }
580
+ .item-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }
581
+ .item-action { font-size: 0.85rem; margin-top: 0.25rem; }
582
+ .item-action strong { color: var(--strength); }
583
+ .item-impact { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.2rem; font-style: italic; }
584
+ .item-actions { flex-shrink: 0; display: flex; gap: 0.25rem; }
585
+ .copy-btn { background: none; border: 1px solid var(--border); border-radius: 0.25rem; padding: 0.2rem 0.4rem; cursor: pointer; color: var(--text-muted); font-size: 0.75rem; transition: all 0.15s; }
586
+ .copy-btn:hover { border-color: var(--accent); color: var(--accent); }
587
+ .copy-btn.copied { border-color: var(--strength); color: var(--strength); }
588
+ .journey { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
589
+ .journey h4 { font-size: 0.9rem; text-transform: capitalize; }
590
+ .journey p { font-size: 0.85rem; color: var(--text-muted); margin: 0.25rem 0; }
591
+ .journey ul { font-size: 0.85rem; padding-left: 1.25rem; margin: 0.25rem 0; }
592
+ .journey .friction { color: var(--high); }
593
+ .journey .bright { color: var(--strength); }
594
+ .assessment { padding: 0.75rem 1rem; border-top: 1px solid var(--border); }
595
+ .assessment table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.5rem; }
596
+ .assessment th, .assessment td { text-align: left; padding: 0.3rem 0.5rem; border-bottom: 1px solid var(--border); }
597
+ .assessment th { color: var(--text-muted); font-weight: 600; }
598
+ .sticky-footer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 0.75rem 2rem; display: flex; align-items: center; justify-content: center; gap: 1rem; z-index: 100; transition: transform 0.2s; }
599
+ .sticky-footer.hidden { transform: translateY(100%); }
600
+ .gen-btn { background: var(--accent); color: #fff; border: none; padding: 0.5rem 1.25rem; border-radius: 0.375rem; cursor: pointer; font-weight: 600; font-size: 0.9rem; }
601
+ .gen-btn:hover { background: var(--accent-hover); }
602
+ .sel-count { font-size: 0.9rem; color: var(--text-muted); }
603
+ .modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; align-items: center; justify-content: center; }
604
+ .modal-overlay.visible { display: flex; }
605
+ .modal { background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.5rem; width: 90%; max-width: 700px; max-height: 80vh; overflow-y: auto; }
606
+ .modal h3 { margin-bottom: 0.75rem; }
607
+ .modal pre { background: var(--bg); border: 1px solid var(--border); border-radius: 0.375rem; padding: 1rem; font-family: var(--mono); font-size: 0.8rem; white-space: pre-wrap; word-wrap: break-word; max-height: 50vh; overflow-y: auto; }
608
+ .modal-actions { display: flex; gap: 0.75rem; margin-top: 1rem; justify-content: flex-end; }
609
+ .modal-actions button { padding: 0.4rem 1rem; border-radius: 0.375rem; cursor: pointer; font-size: 0.85rem; }
610
+ .modal-close { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
611
+ .modal-copy { background: var(--accent); border: none; color: #fff; font-weight: 600; }
612
+ .empty-msg { color: var(--text-dim); font-size: 0.85rem; padding: 1rem; font-style: italic; }
613
+ </style>
614
+ </head>
615
+ <body>
616
+
617
+ <h1>Quality Report: <span id="skill-name"></span></h1>
618
+ <div class="subtitle" id="subtitle"></div>
619
+
620
+ <div id="exec-summary"></div>
621
+
622
+ <div class="filters" id="filters"></div>
623
+
624
+ <div id="sections"></div>
625
+
626
+ <div class="sticky-footer hidden" id="footer">
627
+ <span class="sel-count"><span id="sel-count">0</span> selected</span>
628
+ <button class="gen-btn" onclick="showBatchPrompt()">Generate Prompt</button>
629
+ </div>
630
+
631
+ <div class="modal-overlay" id="modal" onclick="if(event.target===this)closeModal()">
632
+ <div class="modal">
633
+ <h3 id="modal-title">Generated Prompt</h3>
634
+ <pre id="modal-content"></pre>
635
+ <div class="modal-actions">
636
+ <button class="modal-close" onclick="closeModal()">Close</button>
637
+ <button class="modal-copy" onclick="copyModal()">Copy to Clipboard</button>
638
+ </div>
639
+ </div>
640
+ </div>
641
+
642
+ <script>
643
+ const DATA = JSON.parse(document.getElementById('report-data').textContent);
644
+ const selected = new Set();
645
+
646
+ function init() {
647
+ const m = DATA.meta;
648
+ const es = DATA.executive_summary;
649
+ document.getElementById('skill-name').textContent = m.skill_name;
650
+ document.getElementById('subtitle').textContent = `${m.skill_path} \u2022 ${m.timestamp.split('T')[0]} \u2022 ${m.scanner_count} scanners`;
651
+
652
+ // Executive summary
653
+ let html = `<div class="grade grade-${es.grade}">${es.grade}</div>`;
654
+ html += `<dl class="summary-grid">`;
655
+ html += `<dt>Issues</dt><dd>${es.total_issues} total \u2014 ${es.counts.critical} critical, ${es.counts.high} high, ${es.counts.medium} medium, ${es.counts.low} low</dd>`;
656
+ if (es.enhancement_count) html += `<dt>Enhancements</dt><dd>${es.enhancement_count} opportunities identified</dd>`;
657
+ if (es.strength_count) html += `<dt>Strengths</dt><dd>${es.strength_count} noted</dd>`;
658
+ if (es.craft_assessment) html += `<dt>Craft</dt><dd>${esc(es.craft_assessment)}</dd>`;
659
+ if (es.overall_cohesion) html += `<dt>Cohesion</dt><dd>${esc(es.overall_cohesion)}</dd>`;
660
+ html += `</dl>`;
661
+ document.getElementById('exec-summary').innerHTML = html;
662
+
663
+ // Severity filters
664
+ renderFilters();
665
+
666
+ // Sections
667
+ renderSections();
668
+ }
669
+
670
+ // --- Severity filters ---
671
+ const activeFilters = new Set(['critical','high','medium','low','high-opportunity','medium-opportunity','low-opportunity','strength','suggestion','note','info']);
672
+
673
+ function renderFilters() {
674
+ const counts = {};
675
+ DATA.items.forEach(i => { counts[i.severity] = (counts[i.severity]||0) + 1; });
676
+ const order = ['critical','high','medium','low','high-opportunity','medium-opportunity','low-opportunity','strength','suggestion','note'];
677
+ let html = '';
678
+ order.forEach(s => {
679
+ if (!counts[s]) return;
680
+ const active = activeFilters.has(s) ? 'active' : '';
681
+ html += `<span class="badge badge-${s} ${active}" data-sev="${s}" onclick="toggleFilter('${s}')">${s.replace('-',' ')} ${counts[s]}</span>`;
682
+ });
683
+ document.getElementById('filters').innerHTML = html;
684
+ }
685
+
686
+ function toggleFilter(sev) {
687
+ if (activeFilters.has(sev)) activeFilters.delete(sev); else activeFilters.add(sev);
688
+ renderFilters();
689
+ renderSections();
690
+ }
691
+
692
+ // --- Sections ---
693
+ function renderSections() {
694
+ const groups = {};
695
+ const sectionOrder = ['structural','structure-capabilities','prompt-craft','cohesion','efficiency','quality','scripts','script-opportunities','creative'];
696
+
697
+ DATA.items.forEach(i => {
698
+ if (!activeFilters.has(i.severity)) return;
699
+ const s = i.section;
700
+ if (!groups[s]) groups[s] = [];
701
+ groups[s].push(i);
702
+ });
703
+
704
+ // Truly broken (always first, always open)
705
+ const broken = DATA.items.filter(i => i.type === 'issue' && (i.severity === 'critical' || i.severity === 'high'));
706
+ const brokenIds = new Set(broken.map(i => i.id));
707
+ // Strengths
708
+ const strengths = DATA.items.filter(i => i.type === 'strength' && activeFilters.has(i.severity));
709
+
710
+ let html = '';
711
+
712
+ if (broken.length) {
713
+ html += renderSection('truly-broken', `Truly Broken / Missing (${broken.length})`, broken, true);
714
+ }
715
+ if (strengths.length) {
716
+ html += renderSection('strengths', `Strengths (${strengths.length})`, strengths, false);
717
+ }
718
+
719
+ sectionOrder.forEach(sec => {
720
+ // Exclude strengths (shown above) and items already in Truly Broken
721
+ const items = (groups[sec] || []).filter(i => i.type !== 'strength' && !brokenIds.has(i.id));
722
+ if (!items.length) return;
723
+ const label = DATA.section_labels[sec] || sec;
724
+ html += renderSection(sec, `${label} (${items.length})`, items, false);
725
+ });
726
+
727
+ // User journeys
728
+ if (DATA.journeys.length) {
729
+ html += renderJourneysSection();
730
+ }
731
+
732
+ // Assessments
733
+ if (Object.keys(DATA.assessments).length) {
734
+ html += renderAssessmentsSection();
735
+ }
736
+
737
+ document.getElementById('sections').innerHTML = html;
738
+ }
739
+
740
+ function renderSection(id, label, items, startOpen) {
741
+ const openCls = startOpen ? 'open' : '';
742
+ let html = `<div class="section"><div class="section-header ${openCls}" onclick="toggleSection(this)">`;
743
+ html += `<span class="arrow">\u25B6</span><span class="label">${label}</span>`;
744
+ html += `</div><div class="section-body ${openCls}">`;
745
+ items.forEach(i => { html += renderItem(i); });
746
+ html += `</div></div>`;
747
+ return html;
748
+ }
749
+
750
+ function renderItem(item) {
751
+ const isStrength = item.type === 'strength';
752
+ const chk = item.selectable ? `<input type="checkbox" class="item-check" data-id="${item.id}" ${selected.has(item.id)?'checked':''} onchange="toggleSelect('${item.id}', this.checked)">` : '';
753
+ const sev = `<span class="badge badge-${item.severity}">${item.severity.replace('-',' ')}</span>`;
754
+ const file = item.file ? `<span class="item-file">${esc(item.file)}${item.line ? ':'+item.line : ''}</span>` : '';
755
+ const desc = item.description && item.description !== item.title ? `<div class="item-desc">${esc(item.description)}</div>` : '';
756
+ // Suppress action/impact for strengths — "N/A" is noise
757
+ const actionText = item.action && !isStrength && item.action !== 'N/A' ? item.action : '';
758
+ const action = actionText ? `<div class="item-action"><strong>${item.action_type === 'fix' ? 'Fix' : item.action_type === 'create-script' ? 'Script' : 'Suggestion'}:</strong> ${esc(actionText)}</div>` : '';
759
+ const impactText = item.impact && !isStrength && item.impact !== 'N/A' ? item.impact : '';
760
+ const impact = impactText ? `<div class="item-impact">Impact: ${esc(impactText)}</div>` : '';
761
+ const copyBtn = item.selectable ? `<button class="copy-btn" onclick="copySinglePrompt('${item.id}')" title="Copy prompt for this item">\u2398</button>` : '';
762
+
763
+ return `<div class="item">${chk}<div class="item-body">${sev} ${file}<div class="item-title">${esc(item.title)}</div>${desc}${action}${impact}</div><div class="item-actions">${copyBtn}</div></div>`;
764
+ }
765
+
766
+ function renderJourneysSection() {
767
+ let html = `<div class="section"><div class="section-header" onclick="toggleSection(this)">`;
768
+ html += `<span class="arrow">\u25B6</span><span class="label">User Journeys (${DATA.journeys.length})</span>`;
769
+ html += `</div><div class="section-body">`;
770
+ DATA.journeys.forEach(j => {
771
+ html += `<div class="journey"><h4>${esc(j.archetype)}</h4>`;
772
+ html += `<p>${esc(j.journey_summary)}</p>`;
773
+ if (j.friction_points && j.friction_points.length) {
774
+ html += `<ul class="friction">`;
775
+ j.friction_points.forEach(fp => { html += `<li>${esc(fp)}</li>`; });
776
+ html += `</ul>`;
777
+ }
778
+ if (j.bright_spots && j.bright_spots.length) {
779
+ html += `<ul class="bright">`;
780
+ j.bright_spots.forEach(bs => { html += `<li>${esc(bs)}</li>`; });
781
+ html += `</ul>`;
782
+ }
783
+ html += `</div>`;
784
+ });
785
+ html += `</div></div>`;
786
+ return html;
787
+ }
788
+
789
+ function renderAssessmentsSection() {
790
+ let html = `<div class="section"><div class="section-header" onclick="toggleSection(this)">`;
791
+ html += `<span class="arrow">\u25B6</span><span class="label">Assessments & Analysis</span>`;
792
+ html += `</div><div class="section-body">`;
793
+
794
+ const ca = DATA.assessments.cohesion_analysis;
795
+ if (ca) {
796
+ html += `<div class="assessment"><h4>Cohesion Analysis</h4><table><tr><th>Dimension</th><th>Score</th><th>Notes</th></tr>`;
797
+ Object.entries(ca).forEach(([dim, val]) => {
798
+ if (typeof val === 'object' && val.score) {
799
+ html += `<tr><td>${esc(dim.replace(/_/g, ' '))}</td><td>${esc(val.score)}</td><td>${esc(val.notes || '')}</td></tr>`;
800
+ }
801
+ });
802
+ html += `</table></div>`;
803
+ }
804
+
805
+ const aa = DATA.assessments.autonomous_assessment;
806
+ if (aa) {
807
+ html += `<div class="assessment"><h4>Autonomous Readiness</h4><table>`;
808
+ html += `<tr><td>Overall Potential</td><td>${esc(aa.potential||aa.overall_potential||'')}</td></tr>`;
809
+ html += `<tr><td>HITL Points</td><td>${aa.hitl_points||aa.hitl_interaction_points||0}</td></tr>`;
810
+ html += `<tr><td>Auto-Resolvable</td><td>${aa.auto_resolvable||0}</td></tr>`;
811
+ html += `<tr><td>Needs Input</td><td>${aa.needs_input||0}</td></tr>`;
812
+ if (aa.notes) html += `<tr><td>Notes</td><td>${esc(aa.notes)}</td></tr>`;
813
+ html += `</table></div>`;
814
+ }
815
+
816
+ const ti = DATA.assessments.top_insights;
817
+ if (ti && ti.length) {
818
+ html += `<div class="assessment"><h4>Top Insights</h4>`;
819
+ ti.forEach(t => {
820
+ const tiTitle = t.title || t.insight || '';
821
+ const tiDetail = t.detail || t.why_it_matters || '';
822
+ const tiAction = t.action || t.suggestion || '';
823
+ html += `<div style="margin:0.5rem 0"><strong>${esc(tiTitle)}</strong>`;
824
+ if (tiDetail) html += `<br><em>Context:</em> ${esc(tiDetail)}`;
825
+ if (tiAction) html += `<br><em>Suggestion:</em> ${esc(tiAction)}`;
826
+ html += `</div>`;
827
+ });
828
+ html += `</div>`;
829
+ }
830
+
831
+ html += `</div></div>`;
832
+ return html;
833
+ }
834
+
835
+ // --- Interactions ---
836
+ function toggleSection(el) {
837
+ el.classList.toggle('open');
838
+ el.nextElementSibling.classList.toggle('open');
839
+ }
840
+
841
+ function toggleSelect(id, checked) {
842
+ if (checked) selected.add(id); else selected.delete(id);
843
+ document.getElementById('sel-count').textContent = selected.size;
844
+ document.getElementById('footer').classList.toggle('hidden', selected.size === 0);
845
+ }
846
+
847
+ // --- Prompt Generation ---
848
+ function itemById(id) { return DATA.items.find(i => i.id === id); }
849
+
850
+ function buildPromptForItem(item) {
851
+ let p = '';
852
+ const sev = item.severity.replace('-', ' ').toUpperCase();
853
+ const loc = item.file ? `${item.file}${item.line ? ':'+item.line : ''}` : '';
854
+ p += `**[${sev}] ${item.title}**\n`;
855
+ if (loc) p += `- File: ${loc}\n`;
856
+ if (item.description && item.description !== item.title) p += `- Context: ${item.description}\n`;
857
+ if (item.action) {
858
+ const label = item.action_type === 'fix' ? 'Fix' : item.action_type === 'create-script' ? 'Create script' : 'Suggestion';
859
+ p += `- ${label}: ${item.action}\n`;
860
+ }
861
+ if (item.impact) p += `- Impact: ${item.impact}\n`;
862
+ return p;
863
+ }
864
+
865
+ function buildPrompt(ids) {
866
+ const items = ids.map(itemById).filter(Boolean);
867
+ const fixes = items.filter(i => i.action_type === 'fix');
868
+ const scripts = items.filter(i => i.action_type === 'create-script');
869
+ const enhancements = items.filter(i => i.action_type === 'enhance' || i.action_type === 'refactor');
870
+
871
+ let prompt = `## Task: Quality Improvements for ${DATA.meta.skill_name}\nSkill path: ${DATA.meta.skill_path}\n\n`;
872
+
873
+ if (fixes.length) {
874
+ prompt += `### Fix These Issues (${fixes.length})\n\n`;
875
+ fixes.forEach((item, i) => { prompt += `${i+1}. ${buildPromptForItem(item)}\n`; });
876
+ }
877
+ if (scripts.length) {
878
+ prompt += `### Create These Scripts (${scripts.length})\n\n`;
879
+ scripts.forEach((item, i) => { prompt += `${i+1}. ${buildPromptForItem(item)}\n`; });
880
+ }
881
+ if (enhancements.length) {
882
+ prompt += `### Implement These Enhancements (${enhancements.length})\n\n`;
883
+ enhancements.forEach((item, i) => { prompt += `${i+1}. ${buildPromptForItem(item)}\n`; });
884
+ }
885
+ return prompt.trim();
886
+ }
887
+
888
+ function copySinglePrompt(id) {
889
+ const item = itemById(id);
890
+ if (!item) return;
891
+ let prompt = `## Task: Quality Fix for ${DATA.meta.skill_name}\nSkill path: ${DATA.meta.skill_path}\n\n`;
892
+ prompt += buildPromptForItem(item);
893
+ navigator.clipboard.writeText(prompt).then(() => {
894
+ const btn = document.querySelector(`[onclick="copySinglePrompt('${id}')"]`);
895
+ if (btn) { btn.classList.add('copied'); btn.textContent = '\u2713'; setTimeout(() => { btn.classList.remove('copied'); btn.textContent = '\u2398'; }, 1500); }
896
+ });
897
+ }
898
+
899
+ function showBatchPrompt() {
900
+ const prompt = buildPrompt([...selected]);
901
+ document.getElementById('modal-content').textContent = prompt;
902
+ document.getElementById('modal').classList.add('visible');
903
+ }
904
+
905
+ function closeModal() { document.getElementById('modal').classList.remove('visible'); }
906
+
907
+ function copyModal() {
908
+ const text = document.getElementById('modal-content').textContent;
909
+ navigator.clipboard.writeText(text).then(() => {
910
+ const btn = document.querySelector('.modal-copy');
911
+ btn.textContent = 'Copied!';
912
+ setTimeout(() => { btn.textContent = 'Copy to Clipboard'; }, 1500);
913
+ });
914
+ }
915
+
916
+ function esc(s) {
917
+ if (!s) return '';
918
+ const d = document.createElement('div');
919
+ d.textContent = String(s);
920
+ return d.innerHTML;
921
+ }
922
+
923
+ init();
924
+ </script>
925
+ </body>
926
+ </html>"""
927
+
928
+
929
+ def generate_html(report_data: dict) -> str:
930
+ """Inject report data into the HTML template."""
931
+ data_json = json.dumps(report_data, indent=None, ensure_ascii=False)
932
+ # Embed the JSON as a script tag before the main script
933
+ data_tag = f'<script id="report-data" type="application/json">{data_json}</script>'
934
+ # Insert before the main <script> tag
935
+ html = HTML_TEMPLATE.replace('<script>\nconst DATA', f'{data_tag}\n<script>\nconst DATA')
936
+ html = html.replace('SKILL_NAME_PLACEHOLDER', report_data['meta']['skill_name'])
937
+ return html
938
+
939
+
940
+ # =============================================================================
941
+ # CLI
942
+ # =============================================================================
943
+
944
+ def main() -> int:
945
+ parser = argparse.ArgumentParser(
946
+ description='Generate interactive HTML quality report from scanner JSON files',
947
+ )
948
+ parser.add_argument(
949
+ 'report_dir',
950
+ type=Path,
951
+ help='Directory containing *-temp.json and *-prepass.json files',
952
+ )
953
+ parser.add_argument(
954
+ '--skill-path',
955
+ help='Path to the skill being scanned (auto-detected from JSON if omitted)',
956
+ )
957
+ parser.add_argument(
958
+ '--open',
959
+ action='store_true',
960
+ help='Open the HTML report in the default browser',
961
+ )
962
+ parser.add_argument(
963
+ '--output', '-o',
964
+ type=Path,
965
+ help='Output HTML file path (default: {report_dir}/quality-report.html)',
966
+ )
967
+ args = parser.parse_args()
968
+
969
+ if not args.report_dir.is_dir():
970
+ print(f'Error: {args.report_dir} is not a directory', file=sys.stderr)
971
+ return 2
972
+
973
+ report_data = load_report_data(args.report_dir, args.skill_path)
974
+
975
+ if not report_data['items']:
976
+ print('Warning: No scanner data found in directory', file=sys.stderr)
977
+
978
+ html = generate_html(report_data)
979
+
980
+ output_path = args.output or (args.report_dir / 'quality-report.html')
981
+ output_path.write_text(html, encoding='utf-8')
982
+ print(json.dumps({
983
+ 'html_report': str(output_path),
984
+ 'items': len(report_data['items']),
985
+ 'issues': report_data['executive_summary']['total_issues'],
986
+ 'grade': report_data['executive_summary']['grade'],
987
+ }))
988
+
989
+ if args.open:
990
+ system = platform.system()
991
+ if system == 'Darwin':
992
+ subprocess.run(['open', str(output_path)])
993
+ elif system == 'Linux':
994
+ subprocess.run(['xdg-open', str(output_path)])
995
+ elif system == 'Windows':
996
+ subprocess.run(['start', str(output_path)], shell=True)
997
+
998
+ return 0
999
+
1000
+
1001
+ if __name__ == '__main__':
1002
+ sys.exit(main())