agentic-qe 3.7.15 → 3.7.17

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 (301) hide show
  1. package/.claude/agents/v3/qe-devils-advocate.md +20 -0
  2. package/.claude/agents/v3/qe-gap-detector.md +25 -0
  3. package/.claude/agents/v3/qe-quality-gate.md +8 -0
  4. package/.claude/agents/v3/qe-requirements-validator.md +25 -0
  5. package/.claude/agents/v3/subagents/qe-code-reviewer.md +11 -0
  6. package/.claude/agents/v3/subagents/qe-integration-reviewer.md +11 -0
  7. package/.claude/agents/v3/subagents/qe-performance-reviewer.md +11 -0
  8. package/.claude/agents/v3/subagents/qe-security-reviewer.md +11 -0
  9. package/.claude/helpers/adr-compliance.sh +10 -10
  10. package/.claude/helpers/auto-memory-hook.mjs +24 -9
  11. package/.claude/helpers/brain-checkpoint.cjs +55 -134
  12. package/.claude/helpers/ddd-tracker.sh +2 -2
  13. package/.claude/helpers/guidance-hooks.sh +2 -2
  14. package/.claude/helpers/hook-handler.cjs +57 -18
  15. package/.claude/helpers/statusline.cjs +414 -595
  16. package/.claude/helpers/v3/quality-criteria/evidence-classification.md +116 -116
  17. package/.claude/helpers/v3/quality-criteria/htsm-categories.md +139 -139
  18. package/.claude/skills/README.md +8 -11
  19. package/.claude/skills/brutal-honesty-review/SKILL.md +3 -0
  20. package/.claude/skills/code-review-quality/SKILL.md +3 -0
  21. package/.claude/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
  22. package/.claude/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
  23. package/.claude/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
  24. package/.claude/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
  25. package/.claude/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
  26. package/.claude/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
  27. package/.claude/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
  28. package/.claude/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
  29. package/.claude/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
  30. package/.claude/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
  31. package/.claude/skills/qcsd-development-swarm/SKILL.md +79 -2027
  32. package/.claude/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
  33. package/.claude/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
  34. package/.claude/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
  35. package/.claude/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
  36. package/.claude/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
  37. package/.claude/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
  38. package/.claude/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
  39. package/.claude/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
  40. package/.claude/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
  41. package/.claude/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
  42. package/.claude/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  43. package/.claude/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  44. package/.claude/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  45. package/.claude/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  46. package/.claude/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  47. package/.claude/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  48. package/.claude/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  49. package/.claude/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  50. package/.claude/skills/qcsd-production-swarm/SKILL.md +88 -2663
  51. package/.claude/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
  52. package/.claude/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
  53. package/.claude/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
  54. package/.claude/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
  55. package/.claude/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
  56. package/.claude/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
  57. package/.claude/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
  58. package/.claude/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
  59. package/.claude/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
  60. package/.claude/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
  61. package/.claude/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
  62. package/.claude/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
  63. package/.claude/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
  64. package/.claude/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
  65. package/.claude/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
  66. package/.claude/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
  67. package/.claude/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
  68. package/.claude/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
  69. package/.claude/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
  70. package/.claude/skills/sherlock-review/SKILL.md +3 -0
  71. package/.claude/skills/skill-builder/SKILL.md +103 -0
  72. package/.claude/skills/skills-manifest.json +1 -1
  73. package/CHANGELOG.md +44 -0
  74. package/assets/agents/v3/qe-devils-advocate.md +20 -0
  75. package/assets/agents/v3/qe-gap-detector.md +25 -0
  76. package/assets/agents/v3/qe-quality-gate.md +8 -0
  77. package/assets/agents/v3/qe-requirements-validator.md +25 -0
  78. package/assets/agents/v3/subagents/qe-code-reviewer.md +11 -0
  79. package/assets/agents/v3/subagents/qe-integration-reviewer.md +11 -0
  80. package/assets/agents/v3/subagents/qe-performance-reviewer.md +11 -0
  81. package/assets/agents/v3/subagents/qe-security-reviewer.md +11 -0
  82. package/assets/helpers/statusline-v3.cjs +693 -0
  83. package/assets/skills/brutal-honesty-review/SKILL.md +3 -0
  84. package/assets/skills/code-review-quality/SKILL.md +3 -0
  85. package/assets/skills/qcsd-cicd-swarm/SKILL.md +79 -2075
  86. package/assets/skills/qcsd-cicd-swarm/steps/01-flag-detection.md +62 -0
  87. package/assets/skills/qcsd-cicd-swarm/steps/02-core-agents.md +33 -0
  88. package/assets/skills/qcsd-cicd-swarm/steps/03-batch1-results.md +21 -0
  89. package/assets/skills/qcsd-cicd-swarm/steps/04-conditional-agents.md +23 -0
  90. package/assets/skills/qcsd-cicd-swarm/steps/05-decision-synthesis.md +30 -0
  91. package/assets/skills/qcsd-cicd-swarm/steps/06-report-generation.md +17 -0
  92. package/assets/skills/qcsd-cicd-swarm/steps/07-learning-persistence.md +27 -0
  93. package/assets/skills/qcsd-cicd-swarm/steps/08-deployment-advisor.md +25 -0
  94. package/assets/skills/qcsd-cicd-swarm/steps/09-final-output.md +16 -0
  95. package/assets/skills/qcsd-development-swarm/SKILL.md +79 -2027
  96. package/assets/skills/qcsd-development-swarm/steps/01-flag-detection.md +50 -0
  97. package/assets/skills/qcsd-development-swarm/steps/02-core-agents.md +29 -0
  98. package/assets/skills/qcsd-development-swarm/steps/03-batch1-results.md +14 -0
  99. package/assets/skills/qcsd-development-swarm/steps/04-conditional-agents.md +23 -0
  100. package/assets/skills/qcsd-development-swarm/steps/05-decision-synthesis.md +30 -0
  101. package/assets/skills/qcsd-development-swarm/steps/06-report-generation.md +16 -0
  102. package/assets/skills/qcsd-development-swarm/steps/07-learning-persistence.md +25 -0
  103. package/assets/skills/qcsd-development-swarm/steps/08-defect-predictor.md +25 -0
  104. package/assets/skills/qcsd-development-swarm/steps/09-final-output.md +16 -0
  105. package/assets/skills/qcsd-ideation-swarm/SKILL.md +94 -1894
  106. package/assets/skills/qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  107. package/assets/skills/qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  108. package/assets/skills/qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  109. package/assets/skills/qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  110. package/assets/skills/qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  111. package/assets/skills/qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  112. package/assets/skills/qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  113. package/assets/skills/qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  114. package/assets/skills/qcsd-production-swarm/SKILL.md +88 -2663
  115. package/assets/skills/qcsd-production-swarm/steps/01-flag-detection.md +206 -0
  116. package/assets/skills/qcsd-production-swarm/steps/02-core-agents.md +428 -0
  117. package/assets/skills/qcsd-production-swarm/steps/03-batch1-results.md +101 -0
  118. package/assets/skills/qcsd-production-swarm/steps/04-conditional-agents.md +125 -0
  119. package/assets/skills/qcsd-production-swarm/steps/05-decision-synthesis.md +136 -0
  120. package/assets/skills/qcsd-production-swarm/steps/06-report-generation.md +181 -0
  121. package/assets/skills/qcsd-production-swarm/steps/07-learning-persistence.md +185 -0
  122. package/assets/skills/qcsd-production-swarm/steps/08-feedback-loop.md +122 -0
  123. package/assets/skills/qcsd-production-swarm/steps/09-final-output.md +140 -0
  124. package/assets/skills/qcsd-refinement-swarm/SKILL.md +59 -2312
  125. package/assets/skills/qcsd-refinement-swarm/steps/01-flag-detection.md +91 -0
  126. package/assets/skills/qcsd-refinement-swarm/steps/02-core-agents.md +40 -0
  127. package/assets/skills/qcsd-refinement-swarm/steps/03-batch1-results.md +40 -0
  128. package/assets/skills/qcsd-refinement-swarm/steps/04-conditional-agents.md +35 -0
  129. package/assets/skills/qcsd-refinement-swarm/steps/05-decision-synthesis.md +43 -0
  130. package/assets/skills/qcsd-refinement-swarm/steps/06-report-generation.md +42 -0
  131. package/assets/skills/qcsd-refinement-swarm/steps/07-learning-persistence.md +53 -0
  132. package/assets/skills/qcsd-refinement-swarm/steps/08-transformation.md +36 -0
  133. package/assets/skills/qcsd-refinement-swarm/steps/09-final-output.md +46 -0
  134. package/assets/skills/sherlock-review/SKILL.md +3 -0
  135. package/assets/templates/agent-override-example.yaml +39 -0
  136. package/dist/agents/devils-advocate/agent.d.ts +25 -1
  137. package/dist/agents/devils-advocate/agent.js +108 -4
  138. package/dist/agents/devils-advocate/types.d.ts +54 -0
  139. package/dist/agents/devils-advocate/types.js +14 -0
  140. package/dist/agents/overlay-loader.d.ts +28 -0
  141. package/dist/agents/overlay-loader.js +232 -0
  142. package/dist/agents/overlay-schema.d.ts +56 -0
  143. package/dist/agents/overlay-schema.js +77 -0
  144. package/dist/analysis/branch-enumerator.d.ts +68 -0
  145. package/dist/analysis/branch-enumerator.js +393 -0
  146. package/dist/analysis/index.d.ts +2 -0
  147. package/dist/analysis/index.js +2 -0
  148. package/dist/cli/bundle.js +2469 -634
  149. package/dist/cli/commands/coverage.js +50 -0
  150. package/dist/cli/handlers/brain-handler.js +2 -1
  151. package/dist/context/compiler.d.ts +62 -0
  152. package/dist/context/compiler.js +143 -0
  153. package/dist/context/index.d.ts +8 -0
  154. package/dist/context/index.js +6 -0
  155. package/dist/context/sources/coverage-source.d.ts +15 -0
  156. package/dist/context/sources/coverage-source.js +77 -0
  157. package/dist/context/sources/git-source.d.ts +12 -0
  158. package/dist/context/sources/git-source.js +33 -0
  159. package/dist/context/sources/index.d.ts +6 -0
  160. package/dist/context/sources/index.js +5 -0
  161. package/dist/context/sources/memory-source.d.ts +17 -0
  162. package/dist/context/sources/memory-source.js +94 -0
  163. package/dist/context/sources/test-source.d.ts +13 -0
  164. package/dist/context/sources/test-source.js +53 -0
  165. package/dist/context/sources/types.d.ts +42 -0
  166. package/dist/context/sources/types.js +5 -0
  167. package/dist/domains/test-generation/coordinator.js +6 -4
  168. package/dist/feedback/feedback-loop.d.ts +5 -0
  169. package/dist/feedback/feedback-loop.js +12 -0
  170. package/dist/feedback/index.d.ts +1 -1
  171. package/dist/feedback/index.js +1 -1
  172. package/dist/init/agents-installer.d.ts +9 -0
  173. package/dist/init/agents-installer.js +72 -0
  174. package/dist/init/phases/07-hooks.d.ts +11 -0
  175. package/dist/init/phases/07-hooks.js +67 -0
  176. package/dist/init/phases/09-assets.js +3 -0
  177. package/dist/init/settings-merge.js +1 -1
  178. package/dist/kernel/hnsw-adapter.d.ts +3 -0
  179. package/dist/kernel/hnsw-adapter.js +11 -1
  180. package/dist/kernel/unified-memory-schemas.d.ts +1 -1
  181. package/dist/kernel/unified-memory-schemas.js +2 -0
  182. package/dist/kernel/unified-memory.js +25 -0
  183. package/dist/learning/experience-capture-middleware.js +24 -0
  184. package/dist/learning/sqlite-persistence.d.ts +3 -0
  185. package/dist/learning/sqlite-persistence.js +9 -0
  186. package/dist/learning/token-tracker.js +4 -0
  187. package/dist/mcp/bundle.js +3694 -3101
  188. package/dist/mcp/handlers/handler-factory.js +92 -11
  189. package/dist/mcp/services/task-router.d.ts +11 -0
  190. package/dist/mcp/services/task-router.js +26 -0
  191. package/dist/routing/qe-agent-registry.d.ts +11 -0
  192. package/dist/routing/qe-agent-registry.js +34 -0
  193. package/dist/routing/qe-task-router.d.ts +1 -0
  194. package/dist/routing/qe-task-router.js +34 -2
  195. package/dist/routing/routing-feedback.d.ts +5 -0
  196. package/dist/routing/routing-feedback.js +29 -3
  197. package/dist/routing/types.d.ts +2 -0
  198. package/dist/sync/pull-agent.js +2 -1
  199. package/dist/test-scheduling/pipeline.d.ts +7 -0
  200. package/dist/test-scheduling/pipeline.js +9 -0
  201. package/dist/validation/index.d.ts +3 -0
  202. package/dist/validation/index.js +10 -0
  203. package/dist/validation/pipeline.d.ts +80 -0
  204. package/dist/validation/pipeline.js +173 -0
  205. package/dist/validation/steps/requirements.d.ts +32 -0
  206. package/dist/validation/steps/requirements.js +596 -0
  207. package/package.json +6 -6
  208. package/.claude/agents/consensus/README.md +0 -253
  209. package/.claude/agents/deprecated/qe-api-contract-validator.md.v2 +0 -162
  210. package/.claude/agents/deprecated/qe-coverage-analyzer.md.v2 +0 -208
  211. package/.claude/agents/deprecated/qe-test-generator.md.v2 +0 -212
  212. package/.claude/agents/deprecated/qe-visual-tester.md.v2 +0 -216
  213. package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -130
  214. package/.claude/agents/hive-mind/queen-coordinator.md +0 -203
  215. package/.claude/agents/hive-mind/scout-explorer.md +0 -242
  216. package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -193
  217. package/.claude/agents/hive-mind/worker-specialist.md +0 -217
  218. package/.claude/agents/neural/safla-neural.md +0 -74
  219. package/.claude/agents/optimization/README.md +0 -250
  220. package/.claude/agents/reasoning/agent.md +0 -816
  221. package/.claude/agents/reasoning/goal-planner.md +0 -73
  222. package/.claude/agents/subagents/qe-code-reviewer.md +0 -76
  223. package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +0 -76
  224. package/.claude/agents/subagents/qe-data-generator.md +0 -77
  225. package/.claude/agents/subagents/qe-flaky-investigator.md +0 -91
  226. package/.claude/agents/subagents/qe-integration-tester.md +0 -90
  227. package/.claude/agents/subagents/qe-performance-validator.md +0 -92
  228. package/.claude/agents/subagents/qe-security-auditor.md +0 -94
  229. package/.claude/agents/subagents/qe-test-data-architect-sub.md +0 -93
  230. package/.claude/agents/subagents/qe-test-implementer.md +0 -106
  231. package/.claude/agents/subagents/qe-test-refactorer.md +0 -117
  232. package/.claude/agents/subagents/qe-test-writer.md +0 -112
  233. package/.claude/agents/swarm/README.md +0 -190
  234. package/.claude/agents/templates/migration-plan.md +0 -746
  235. package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -244
  236. package/.claude/agents/testing/validation/production-validator.md +0 -395
  237. package/.claude/agents/v3/README.md +0 -39
  238. package/.claude/agents/v3/typescript-specialist.yaml +0 -21
  239. package/.claude/agents/v3/v3-memory-specialist.md +0 -318
  240. package/.claude/agents/v3/v3-performance-engineer.md +0 -397
  241. package/.claude/agents/v3/v3-queen-coordinator.md +0 -98
  242. package/.claude/agents/v3/v3-security-architect.md +0 -174
  243. package/.claude/commands/README.md +0 -106
  244. package/.claude/commands/agents/README.md +0 -10
  245. package/.claude/commands/agents/agent-capabilities.md +0 -21
  246. package/.claude/commands/agents/agent-coordination.md +0 -28
  247. package/.claude/commands/agents/agent-spawning.md +0 -28
  248. package/.claude/commands/agents/agent-types.md +0 -26
  249. package/.claude/commands/coordination/README.md +0 -9
  250. package/.claude/commands/coordination/agent-spawn.md +0 -25
  251. package/.claude/commands/coordination/init.md +0 -44
  252. package/.claude/commands/coordination/orchestrate.md +0 -43
  253. package/.claude/commands/coordination/spawn.md +0 -45
  254. package/.claude/commands/coordination/swarm-init.md +0 -85
  255. package/.claude/commands/coordination/task-orchestrate.md +0 -25
  256. package/.claude/commands/hive-mind/README.md +0 -17
  257. package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -8
  258. package/.claude/commands/hive-mind/hive-mind-init.md +0 -18
  259. package/.claude/commands/hive-mind/hive-mind-memory.md +0 -8
  260. package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
  261. package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
  262. package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
  263. package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -21
  264. package/.claude/commands/hive-mind/hive-mind-status.md +0 -8
  265. package/.claude/commands/hive-mind/hive-mind-stop.md +0 -8
  266. package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
  267. package/.claude/commands/hive-mind/hive-mind.md +0 -27
  268. package/.claude/commands/memory/README.md +0 -9
  269. package/.claude/commands/memory/memory-persist.md +0 -25
  270. package/.claude/commands/memory/memory-search.md +0 -25
  271. package/.claude/commands/memory/memory-usage.md +0 -25
  272. package/.claude/commands/memory/neural.md +0 -47
  273. package/.claude/commands/swarm/README.md +0 -15
  274. package/.claude/commands/swarm/swarm-analysis.md +0 -8
  275. package/.claude/commands/swarm/swarm-background.md +0 -8
  276. package/.claude/commands/swarm/swarm-init.md +0 -19
  277. package/.claude/commands/swarm/swarm-modes.md +0 -8
  278. package/.claude/commands/swarm/swarm-monitor.md +0 -8
  279. package/.claude/commands/swarm/swarm-spawn.md +0 -19
  280. package/.claude/commands/swarm/swarm-status.md +0 -8
  281. package/.claude/commands/swarm/swarm-strategies.md +0 -8
  282. package/.claude/commands/swarm/swarm.md +0 -27
  283. package/.claude/commands/training/README.md +0 -9
  284. package/.claude/commands/training/model-update.md +0 -25
  285. package/.claude/commands/training/neural-patterns.md +0 -74
  286. package/.claude/commands/training/neural-train.md +0 -25
  287. package/.claude/commands/training/pattern-learn.md +0 -25
  288. package/.claude/commands/training/specialization.md +0 -63
  289. package/.claude/commands/workflows/README.md +0 -9
  290. package/.claude/commands/workflows/development.md +0 -78
  291. package/.claude/commands/workflows/research.md +0 -63
  292. package/.claude/commands/workflows/workflow-create.md +0 -25
  293. package/.claude/commands/workflows/workflow-execute.md +0 -25
  294. package/.claude/commands/workflows/workflow-export.md +0 -25
  295. package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
  296. package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
  297. package/.claude/skills/iterative-loop/SKILL.md +0 -371
  298. package/.claude/skills/performance-analysis/SKILL.md +0 -569
  299. package/.claude/skills/performance-analysis/evals/performance-analysis.yaml +0 -144
  300. package/.claude/skills/performance-analysis/schemas/output.json +0 -588
  301. package/.claude/skills/performance-analysis/scripts/validate-config.json +0 -36
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Structured Validation Pipeline Framework (BMAD-003)
3
+ *
4
+ * Generic pipeline runner that executes validation steps sequentially,
5
+ * enforcing gates and producing structured reports.
6
+ */
7
+ const DEFAULT_CATEGORY_WEIGHTS = {
8
+ format: 0.10,
9
+ content: 0.30,
10
+ quality: 0.25,
11
+ traceability: 0.20,
12
+ compliance: 0.15,
13
+ };
14
+ /**
15
+ * Execute a validation pipeline.
16
+ */
17
+ export async function runPipeline(config, content, filePath, metadata) {
18
+ const startTime = Date.now();
19
+ const weights = config.categoryWeights || DEFAULT_CATEGORY_WEIGHTS;
20
+ const context = {
21
+ content,
22
+ filePath,
23
+ metadata,
24
+ previousResults: [],
25
+ };
26
+ const stepResults = [];
27
+ const blockers = [];
28
+ let halted = false;
29
+ let haltedAt;
30
+ // Filter steps if specified
31
+ const stepsToRun = config.stepFilter
32
+ ? config.steps.filter(s => config.stepFilter.includes(s.id))
33
+ : config.steps;
34
+ for (const step of stepsToRun) {
35
+ const stepStart = Date.now();
36
+ let result;
37
+ try {
38
+ result = await step.execute(context);
39
+ }
40
+ catch (err) {
41
+ result = {
42
+ stepId: step.id,
43
+ stepName: step.name,
44
+ status: 'fail',
45
+ score: 0,
46
+ findings: [{
47
+ id: `${step.id}-error`,
48
+ stepId: step.id,
49
+ severity: 'critical',
50
+ title: `Step execution failed: ${step.name}`,
51
+ description: err.message,
52
+ }],
53
+ evidence: ['Step threw an exception during execution'],
54
+ duration: Date.now() - stepStart,
55
+ };
56
+ }
57
+ // Ensure duration is set
58
+ if (!result.duration) {
59
+ result.duration = Date.now() - stepStart;
60
+ }
61
+ stepResults.push(result);
62
+ context.previousResults.push(result);
63
+ // Check for blocking failure
64
+ if (step.severity === 'blocking' && result.status === 'fail') {
65
+ blockers.push(...result.findings);
66
+ if (!config.continueOnFailure) {
67
+ halted = true;
68
+ haltedAt = step.id;
69
+ break;
70
+ }
71
+ }
72
+ }
73
+ // Calculate overall score (weighted average by category)
74
+ const categoryScores = {};
75
+ for (const result of stepResults) {
76
+ const step = config.steps.find(s => s.id === result.stepId);
77
+ if (!step)
78
+ continue;
79
+ if (!categoryScores[step.category]) {
80
+ categoryScores[step.category] = { total: 0, count: 0 };
81
+ }
82
+ categoryScores[step.category].total += result.score;
83
+ categoryScores[step.category].count += 1;
84
+ }
85
+ let weightedScore = 0;
86
+ let totalWeight = 0;
87
+ for (const [category, { total, count }] of Object.entries(categoryScores)) {
88
+ const avgScore = count > 0 ? total / count : 0;
89
+ const weight = weights[category] || 0.1;
90
+ weightedScore += avgScore * weight;
91
+ totalWeight += weight;
92
+ }
93
+ const finalScore = totalWeight > 0 ? Math.round(weightedScore / totalWeight) : 0;
94
+ // Determine overall status
95
+ let overall;
96
+ if (blockers.length > 0) {
97
+ overall = 'fail';
98
+ }
99
+ else if (stepResults.some(r => r.status === 'warn')) {
100
+ overall = 'warn';
101
+ }
102
+ else if (finalScore >= 70) {
103
+ overall = 'pass';
104
+ }
105
+ else {
106
+ overall = 'warn';
107
+ }
108
+ return {
109
+ pipelineId: config.id,
110
+ pipelineName: config.name,
111
+ overall,
112
+ score: finalScore,
113
+ steps: stepResults,
114
+ blockers,
115
+ halted,
116
+ haltedAt,
117
+ totalDuration: Date.now() - startTime,
118
+ timestamp: new Date().toISOString(),
119
+ };
120
+ }
121
+ /**
122
+ * Format pipeline result as markdown report.
123
+ */
124
+ export function formatPipelineReport(result) {
125
+ const lines = [];
126
+ const statusLabel = result.overall === 'pass' ? 'PASS' : result.overall === 'fail' ? 'FAIL' : 'WARN';
127
+ lines.push(`# Validation Report: ${result.pipelineName}`);
128
+ lines.push('');
129
+ lines.push(`**Overall**: ${statusLabel} | **Score**: ${result.score}/100 | **Duration**: ${result.totalDuration}ms`);
130
+ if (result.halted) {
131
+ lines.push(`**Halted at**: ${result.haltedAt} (blocking failure)`);
132
+ }
133
+ lines.push('');
134
+ // Step results table
135
+ lines.push('## Step Results');
136
+ lines.push('');
137
+ lines.push('| # | Step | Status | Score | Findings | Duration |');
138
+ lines.push('|---|------|--------|-------|----------|----------|');
139
+ for (let i = 0; i < result.steps.length; i++) {
140
+ const step = result.steps[i];
141
+ lines.push(`| ${i + 1} | ${step.stepName} | ${step.status.toUpperCase()} | ${step.score} | ${step.findings.length} | ${step.duration}ms |`);
142
+ }
143
+ lines.push('');
144
+ // Blockers
145
+ if (result.blockers.length > 0) {
146
+ lines.push('## Blockers');
147
+ lines.push('');
148
+ for (const blocker of result.blockers) {
149
+ lines.push(`- **${blocker.title}** (${blocker.severity}): ${blocker.description}`);
150
+ if (blocker.suggestion) {
151
+ lines.push(` - Suggestion: ${blocker.suggestion}`);
152
+ }
153
+ }
154
+ lines.push('');
155
+ }
156
+ // Detailed findings
157
+ const allFindings = result.steps.flatMap(s => s.findings);
158
+ if (allFindings.length > 0) {
159
+ lines.push('## All Findings');
160
+ lines.push('');
161
+ for (const finding of allFindings) {
162
+ lines.push(`- [${finding.severity.toUpperCase()}] **${finding.title}**: ${finding.description}`);
163
+ if (finding.location)
164
+ lines.push(` - Location: ${finding.location}`);
165
+ if (finding.suggestion)
166
+ lines.push(` - Fix: ${finding.suggestion}`);
167
+ }
168
+ }
169
+ lines.push('');
170
+ lines.push(`_Generated: ${result.timestamp}_`);
171
+ return lines.join('\n');
172
+ }
173
+ //# sourceMappingURL=pipeline.js.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Requirements Validation Steps (BMAD-003)
3
+ *
4
+ * 13 structured validation steps for requirements documents,
5
+ * inspired by BMAD-METHOD's PRD validation.
6
+ */
7
+ import type { ValidationStep } from '../pipeline.js';
8
+ export declare const formatCheckStep: ValidationStep;
9
+ export declare const completenessCheckStep: ValidationStep;
10
+ export declare const investCriteriaStep: ValidationStep;
11
+ export declare const smartAcceptanceStep: ValidationStep;
12
+ export declare const testabilityScoreStep: ValidationStep;
13
+ export declare const vagueTermStep: ValidationStep;
14
+ export declare const informationDensityStep: ValidationStep;
15
+ export declare const traceabilityCheckStep: ValidationStep;
16
+ export declare const implementationLeakageStep: ValidationStep;
17
+ export declare const domainComplianceStep: ValidationStep;
18
+ export declare const dependencyAnalysisStep: ValidationStep;
19
+ export declare const bddScenarioStep: ValidationStep;
20
+ export declare const holisticQualityStep: ValidationStep;
21
+ /**
22
+ * All 13 requirements validation steps in order.
23
+ */
24
+ export declare const REQUIREMENTS_VALIDATION_STEPS: ValidationStep[];
25
+ /**
26
+ * Create a requirements validation pipeline config.
27
+ */
28
+ export declare function createRequirementsPipeline(options?: {
29
+ continueOnFailure?: boolean;
30
+ stepFilter?: string[];
31
+ }): import('../pipeline.js').PipelineConfig;
32
+ //# sourceMappingURL=requirements.d.ts.map