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
@@ -52,6 +52,12 @@ export declare const SEVERITY_ORDER: readonly ChallengeSeverity[];
52
52
  * Higher weight means greater negative impact on the overall score.
53
53
  */
54
54
  export declare const SEVERITY_WEIGHTS: Readonly<Record<ChallengeSeverity, number>>;
55
+ /**
56
+ * Weights used for minimum finding threshold calculations.
57
+ * Maps each severity to a point value for determining whether
58
+ * a review meets its minimum finding requirements.
59
+ */
60
+ export declare const MINIMUM_FINDING_WEIGHTS: Readonly<Record<ChallengeSeverity, number>>;
55
61
  /**
56
62
  * A specific challenge raised against an agent's output.
57
63
  * Each challenge documents a gap, weakness, or questionable aspect
@@ -75,6 +81,22 @@ export interface Challenge {
75
81
  /** Confidence in this challenge being valid (0-1) */
76
82
  readonly confidence: number;
77
83
  }
84
+ /**
85
+ * Justification provided when a review produces fewer findings than the
86
+ * minimum threshold. Documents what was examined and why no issues were found.
87
+ */
88
+ export interface CleanJustification {
89
+ /** Whether the target was deemed genuinely clean */
90
+ readonly isClean: boolean;
91
+ /** Specific files that were examined during the review */
92
+ readonly filesExamined: readonly string[];
93
+ /** Patterns and anti-patterns that were checked */
94
+ readonly patternsChecked: readonly string[];
95
+ /** Tools and strategies that were run */
96
+ readonly toolsRun: readonly string[];
97
+ /** Detailed reasoning for why no issues were found */
98
+ readonly reasoning: string;
99
+ }
78
100
  /**
79
101
  * Result of a Devil's Advocate review of an agent's output.
80
102
  * Aggregates all challenges found and provides an overall assessment.
@@ -94,6 +116,34 @@ export interface ChallengeResult {
94
116
  readonly timestamp: number;
95
117
  /** How long the review took (ms) */
96
118
  readonly reviewDuration: number;
119
+ /** Clean justification when findings are below minimum threshold */
120
+ readonly cleanJustification?: CleanJustification;
121
+ /** Weighted finding score based on MINIMUM_FINDING_WEIGHTS */
122
+ readonly weightedFindingScore?: number;
123
+ /** Whether the minimum finding threshold was met */
124
+ readonly minimumMet?: boolean;
125
+ }
126
+ /**
127
+ * Outcome of a Devil's Advocate review, used for learning feedback.
128
+ * Captures which challenges were accepted or dismissed by the user.
129
+ */
130
+ export interface ReviewOutcome {
131
+ /** What type of output was reviewed */
132
+ readonly targetType: ChallengeTargetType;
133
+ /** ID of the agent whose output was reviewed */
134
+ readonly targetAgentId: string;
135
+ /** Total number of challenges raised */
136
+ readonly challengeCount: number;
137
+ /** Number of challenges accepted by the user */
138
+ readonly acceptedCount: number;
139
+ /** Number of challenges dismissed by the user */
140
+ readonly dismissedCount: number;
141
+ /** Breakdown of challenges by severity */
142
+ readonly severityBreakdown: Readonly<Record<string, number>>;
143
+ /** Whether the minimum finding threshold was met */
144
+ readonly minimumMet: boolean;
145
+ /** ISO timestamp of when the outcome was recorded */
146
+ readonly timestamp: string;
97
147
  }
98
148
  /**
99
149
  * Types of challenge strategies the Devil's Advocate can employ.
@@ -135,6 +185,10 @@ export interface DevilsAdvocateConfig {
135
185
  readonly enabledStrategies: readonly ChallengeStrategyType[];
136
186
  /** Only include challenges at or above this severity. @default 'informational' */
137
187
  readonly minSeverity: ChallengeSeverity;
188
+ /** Minimum weighted finding score required for a review. @default 3 */
189
+ readonly minimumFindings: number;
190
+ /** How to evaluate minimum findings: 'weighted' uses severity weights, 'count' uses raw count. @default 'weighted' */
191
+ readonly minimumFindingsMode: 'weighted' | 'count';
138
192
  }
139
193
  /**
140
194
  * Default configuration for the Devil's Advocate agent.
@@ -42,6 +42,18 @@ export const SEVERITY_WEIGHTS = {
42
42
  low: 0.03,
43
43
  informational: 0.01,
44
44
  };
45
+ /**
46
+ * Weights used for minimum finding threshold calculations.
47
+ * Maps each severity to a point value for determining whether
48
+ * a review meets its minimum finding requirements.
49
+ */
50
+ export const MINIMUM_FINDING_WEIGHTS = {
51
+ critical: 3,
52
+ high: 2,
53
+ medium: 1,
54
+ low: 0.5,
55
+ informational: 0.25,
56
+ };
45
57
  /**
46
58
  * All valid challenge strategy types, for runtime validation.
47
59
  */
@@ -62,6 +74,8 @@ export const DEFAULT_DEVILS_ADVOCATE_CONFIG = {
62
74
  maxChallengesPerReview: 20,
63
75
  enabledStrategies: ALL_CHALLENGE_STRATEGY_TYPES,
64
76
  minSeverity: 'informational',
77
+ minimumFindings: 3,
78
+ minimumFindingsMode: 'weighted',
65
79
  };
66
80
  // ============================================================================
67
81
  // Type Guards
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Agent Overlay Loader (BMAD-002)
3
+ *
4
+ * Discovers, validates, and applies agent customization overlays from
5
+ * .claude/agent-overrides/*.yaml files.
6
+ */
7
+ import { AgentOverlay, OverlayLoadResult, AppliedOverlay } from './overlay-schema.js';
8
+ /**
9
+ * Load all overlay files from the overrides directory.
10
+ */
11
+ export declare function loadOverlays(projectRoot: string): OverlayLoadResult;
12
+ /**
13
+ * Apply an overlay to agent markdown content.
14
+ * Returns the modified content and a record of what was applied.
15
+ */
16
+ export declare function applyOverlayToContent(agentContent: string, overlay: AgentOverlay): {
17
+ content: string;
18
+ applied: AppliedOverlay;
19
+ };
20
+ /**
21
+ * Get overlay for a specific agent by name.
22
+ */
23
+ export declare function getOverlayForAgent(overlays: AgentOverlay[], agentName: string): AgentOverlay | undefined;
24
+ /**
25
+ * Get config overrides for a specific agent.
26
+ */
27
+ export declare function getAgentConfigOverrides(overlays: AgentOverlay[], agentName: string): AgentOverlay['config'] | undefined;
28
+ //# sourceMappingURL=overlay-loader.d.ts.map
@@ -0,0 +1,232 @@
1
+ /**
2
+ * Agent Overlay Loader (BMAD-002)
3
+ *
4
+ * Discovers, validates, and applies agent customization overlays from
5
+ * .claude/agent-overrides/*.yaml files.
6
+ */
7
+ import { readFileSync, existsSync, readdirSync } from 'fs';
8
+ import { join, basename } from 'path';
9
+ import { validateOverlay } from './overlay-schema.js';
10
+ const OVERRIDES_DIR = '.claude/agent-overrides';
11
+ /**
12
+ * Parse YAML-like overlay files.
13
+ * Uses a simple parser to avoid adding a yaml dependency.
14
+ * Supports basic key-value pairs and nested objects.
15
+ */
16
+ function parseSimpleYaml(content) {
17
+ const result = {};
18
+ const lines = content.split('\n');
19
+ let currentSection = null;
20
+ let currentSubSection = null;
21
+ let currentArray = null;
22
+ let currentArrayKey = null;
23
+ for (const rawLine of lines) {
24
+ const line = rawLine.replace(/\r$/, '');
25
+ // Skip comments and empty lines
26
+ if (line.trim().startsWith('#') || line.trim() === '')
27
+ continue;
28
+ const indent = line.length - line.trimStart().length;
29
+ const trimmed = line.trim();
30
+ // Array item
31
+ if (trimmed.startsWith('- ')) {
32
+ const value = trimmed.slice(2).trim().replace(/^["']|["']$/g, '');
33
+ if (currentArray) {
34
+ currentArray.push(value);
35
+ }
36
+ continue;
37
+ }
38
+ // Flush any pending array
39
+ if (currentArray && currentArrayKey) {
40
+ if (currentSubSection && currentSection) {
41
+ const section = result[currentSection] || {};
42
+ section[currentArrayKey] = currentArray;
43
+ result[currentSection] = section;
44
+ }
45
+ else if (currentSection) {
46
+ const section = result[currentSection] || {};
47
+ section[currentArrayKey] = currentArray;
48
+ result[currentSection] = section;
49
+ }
50
+ currentArray = null;
51
+ currentArrayKey = null;
52
+ }
53
+ // Key-value pair
54
+ const match = trimmed.match(/^(\w[\w.-]*)\s*:\s*(.*)$/);
55
+ if (!match)
56
+ continue;
57
+ const [, key, rawValue] = match;
58
+ const value = rawValue.trim().replace(/^["']|["']$/g, '');
59
+ if (indent === 0) {
60
+ // Top-level key
61
+ if (value === '' || value === undefined) {
62
+ currentSection = key;
63
+ currentSubSection = null;
64
+ if (!result[key])
65
+ result[key] = {};
66
+ }
67
+ else {
68
+ result[key] = parseValue(value);
69
+ currentSection = null;
70
+ currentSubSection = null;
71
+ }
72
+ }
73
+ else if (indent <= 4 && currentSection) {
74
+ if (value === '' || value === undefined) {
75
+ // Sub-section or array start
76
+ currentSubSection = key;
77
+ currentArray = [];
78
+ currentArrayKey = key;
79
+ }
80
+ else {
81
+ const section = result[currentSection] || {};
82
+ section[key] = parseValue(value);
83
+ result[currentSection] = section;
84
+ }
85
+ }
86
+ }
87
+ // Flush final array
88
+ if (currentArray && currentArrayKey && currentSection) {
89
+ const section = result[currentSection] || {};
90
+ section[currentArrayKey] = currentArray;
91
+ result[currentSection] = section;
92
+ }
93
+ return result;
94
+ }
95
+ function parseValue(value) {
96
+ if (value === 'true')
97
+ return true;
98
+ if (value === 'false')
99
+ return false;
100
+ if (value === 'null')
101
+ return null;
102
+ const num = Number(value);
103
+ if (!isNaN(num) && value !== '')
104
+ return num;
105
+ return value;
106
+ }
107
+ /**
108
+ * Load all overlay files from the overrides directory.
109
+ */
110
+ export function loadOverlays(projectRoot) {
111
+ const overlaysDir = join(projectRoot, OVERRIDES_DIR);
112
+ const result = {
113
+ overlays: [],
114
+ warnings: [],
115
+ errors: [],
116
+ };
117
+ if (!existsSync(overlaysDir)) {
118
+ return result;
119
+ }
120
+ let files;
121
+ try {
122
+ files = readdirSync(overlaysDir).filter(f => (f.endsWith('.yaml') || f.endsWith('.yml')) && !f.startsWith('_'));
123
+ }
124
+ catch (err) {
125
+ result.errors.push(`Failed to read overrides directory: ${err.message}`);
126
+ return result;
127
+ }
128
+ for (const file of files) {
129
+ const filePath = join(overlaysDir, file);
130
+ try {
131
+ const content = readFileSync(filePath, 'utf-8');
132
+ const parsed = parseSimpleYaml(content);
133
+ // Infer agent name from filename if not specified
134
+ if (!parsed.agent) {
135
+ const agentName = basename(file).replace(/\.(override|customize)\.(yaml|yml)$/, '');
136
+ parsed.agent = agentName;
137
+ }
138
+ const validationErrors = validateOverlay(parsed);
139
+ if (validationErrors.length > 0) {
140
+ result.warnings.push(`Overlay ${file} has validation issues: ${validationErrors.join('; ')}. Loading without overlay.`);
141
+ continue;
142
+ }
143
+ result.overlays.push(parsed);
144
+ }
145
+ catch (err) {
146
+ result.warnings.push(`Failed to parse overlay ${file}: ${err.message}. Agent loads without overlay.`);
147
+ }
148
+ }
149
+ return result;
150
+ }
151
+ /**
152
+ * Apply an overlay to agent markdown content.
153
+ * Returns the modified content and a record of what was applied.
154
+ */
155
+ export function applyOverlayToContent(agentContent, overlay) {
156
+ let content = agentContent;
157
+ const applied = {
158
+ agentName: overlay.agent,
159
+ overlayFile: `${overlay.agent}.override.yaml`,
160
+ replacedFields: [],
161
+ appendedFields: [],
162
+ configOverrides: [],
163
+ };
164
+ // Apply replacements in frontmatter-like sections
165
+ if (overlay.replace) {
166
+ if (overlay.replace.description) {
167
+ // Replace description in markdown metadata comment or first paragraph
168
+ const descRegex = /^(description:\s*).+$/m;
169
+ if (descRegex.test(content)) {
170
+ content = content.replace(descRegex, `$1${overlay.replace.description}`);
171
+ applied.replacedFields.push('description');
172
+ }
173
+ }
174
+ if (overlay.replace.domains) {
175
+ const domainRegex = /^(domain:\s*).+$/m;
176
+ if (domainRegex.test(content)) {
177
+ content = content.replace(domainRegex, `$1${overlay.replace.domains.join(', ')}`);
178
+ applied.replacedFields.push('domains');
179
+ }
180
+ }
181
+ if (overlay.replace.complexity) {
182
+ const complexityRegex = /^(complexity:\s*).+$/m;
183
+ if (complexityRegex.test(content)) {
184
+ content = content.replace(complexityRegex, `$1${overlay.replace.complexity}`);
185
+ applied.replacedFields.push('complexity');
186
+ }
187
+ }
188
+ }
189
+ // Append additional content
190
+ if (overlay.append) {
191
+ if (overlay.append.instructions) {
192
+ content += `\n\n## Custom Instructions (User Override)\n\n${overlay.append.instructions}\n`;
193
+ applied.appendedFields.push('instructions');
194
+ }
195
+ if (overlay.append.capabilities && overlay.append.capabilities.length > 0) {
196
+ const capsSection = overlay.append.capabilities.map(c => `- ${c}`).join('\n');
197
+ content += `\n\n### Additional Capabilities (User Override)\n\n${capsSection}\n`;
198
+ applied.appendedFields.push('capabilities');
199
+ }
200
+ if (overlay.append.tags && overlay.append.tags.length > 0) {
201
+ // Append tags to existing tags line or add new
202
+ const tagsRegex = /^(tags:\s*).+$/m;
203
+ if (tagsRegex.test(content)) {
204
+ content = content.replace(tagsRegex, (match) => {
205
+ const existing = match.replace(/^tags:\s*/, '').split(',').map(t => t.trim());
206
+ const merged = [...new Set([...existing, ...overlay.append.tags])];
207
+ return `tags: ${merged.join(', ')}`;
208
+ });
209
+ }
210
+ applied.appendedFields.push('tags');
211
+ }
212
+ }
213
+ // Track config overrides
214
+ if (overlay.config) {
215
+ applied.configOverrides = Object.keys(overlay.config);
216
+ }
217
+ return { content, applied };
218
+ }
219
+ /**
220
+ * Get overlay for a specific agent by name.
221
+ */
222
+ export function getOverlayForAgent(overlays, agentName) {
223
+ return overlays.find(o => o.agent === agentName);
224
+ }
225
+ /**
226
+ * Get config overrides for a specific agent.
227
+ */
228
+ export function getAgentConfigOverrides(overlays, agentName) {
229
+ const overlay = getOverlayForAgent(overlays, agentName);
230
+ return overlay?.config;
231
+ }
232
+ //# sourceMappingURL=overlay-loader.js.map
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Agent Customization Overlay Schema (BMAD-002)
3
+ *
4
+ * Allows users to customize agent behavior via .claude/agent-overrides/*.yaml
5
+ * files that survive `aqe init` reinstalls.
6
+ */
7
+ export interface AgentOverlay {
8
+ /** Agent identifier, e.g. "qe-test-architect" */
9
+ agent: string;
10
+ /** Fields that REPLACE base agent content */
11
+ replace?: {
12
+ description?: string;
13
+ domains?: string[];
14
+ complexity?: string;
15
+ };
16
+ /** Fields that APPEND to base agent content */
17
+ append?: {
18
+ /** Additional instructions appended to agent .md body */
19
+ instructions?: string;
20
+ /** Additional capabilities */
21
+ capabilities?: string[];
22
+ /** Additional tags */
23
+ tags?: string[];
24
+ };
25
+ /** Runtime configuration overrides */
26
+ config?: {
27
+ /** For review agents - minimum weighted findings */
28
+ minimumFindings?: number;
29
+ /** Maximum parallel agents for orchestrators */
30
+ maxParallelAgents?: number;
31
+ /** Preferred test frameworks */
32
+ preferredFrameworks?: string[];
33
+ /** Severity thresholds per category */
34
+ severityThresholds?: Record<string, number>;
35
+ /** Context compilation opt-out */
36
+ needsContext?: boolean;
37
+ };
38
+ }
39
+ export interface OverlayLoadResult {
40
+ overlays: AgentOverlay[];
41
+ warnings: string[];
42
+ errors: string[];
43
+ }
44
+ export interface AppliedOverlay {
45
+ agentName: string;
46
+ overlayFile: string;
47
+ replacedFields: string[];
48
+ appendedFields: string[];
49
+ configOverrides: string[];
50
+ }
51
+ /**
52
+ * Validates an overlay object against the schema.
53
+ * Returns validation errors (empty array = valid).
54
+ */
55
+ export declare function validateOverlay(overlay: unknown): string[];
56
+ //# sourceMappingURL=overlay-schema.d.ts.map
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Agent Customization Overlay Schema (BMAD-002)
3
+ *
4
+ * Allows users to customize agent behavior via .claude/agent-overrides/*.yaml
5
+ * files that survive `aqe init` reinstalls.
6
+ */
7
+ /**
8
+ * Validates an overlay object against the schema.
9
+ * Returns validation errors (empty array = valid).
10
+ */
11
+ export function validateOverlay(overlay) {
12
+ const errors = [];
13
+ if (!overlay || typeof overlay !== 'object') {
14
+ errors.push('Overlay must be a non-null object');
15
+ return errors;
16
+ }
17
+ const obj = overlay;
18
+ if (!obj.agent || typeof obj.agent !== 'string') {
19
+ errors.push('Overlay must have a string "agent" field');
20
+ }
21
+ if (obj.replace !== undefined) {
22
+ if (typeof obj.replace !== 'object' || obj.replace === null) {
23
+ errors.push('"replace" must be an object');
24
+ }
25
+ else {
26
+ const replace = obj.replace;
27
+ if (replace.description !== undefined && typeof replace.description !== 'string') {
28
+ errors.push('"replace.description" must be a string');
29
+ }
30
+ if (replace.domains !== undefined && !Array.isArray(replace.domains)) {
31
+ errors.push('"replace.domains" must be an array');
32
+ }
33
+ if (replace.complexity !== undefined && typeof replace.complexity !== 'string') {
34
+ errors.push('"replace.complexity" must be a string');
35
+ }
36
+ }
37
+ }
38
+ if (obj.append !== undefined) {
39
+ if (typeof obj.append !== 'object' || obj.append === null) {
40
+ errors.push('"append" must be an object');
41
+ }
42
+ else {
43
+ const append = obj.append;
44
+ if (append.instructions !== undefined && typeof append.instructions !== 'string') {
45
+ errors.push('"append.instructions" must be a string');
46
+ }
47
+ if (append.capabilities !== undefined && !Array.isArray(append.capabilities)) {
48
+ errors.push('"append.capabilities" must be an array');
49
+ }
50
+ if (append.tags !== undefined && !Array.isArray(append.tags)) {
51
+ errors.push('"append.tags" must be an array');
52
+ }
53
+ }
54
+ }
55
+ if (obj.config !== undefined) {
56
+ if (typeof obj.config !== 'object' || obj.config === null) {
57
+ errors.push('"config" must be an object');
58
+ }
59
+ else {
60
+ const config = obj.config;
61
+ if (config.minimumFindings !== undefined && typeof config.minimumFindings !== 'number') {
62
+ errors.push('"config.minimumFindings" must be a number');
63
+ }
64
+ if (config.maxParallelAgents !== undefined && typeof config.maxParallelAgents !== 'number') {
65
+ errors.push('"config.maxParallelAgents" must be a number');
66
+ }
67
+ if (config.preferredFrameworks !== undefined && !Array.isArray(config.preferredFrameworks)) {
68
+ errors.push('"config.preferredFrameworks" must be an array');
69
+ }
70
+ if (config.needsContext !== undefined && typeof config.needsContext !== 'boolean') {
71
+ errors.push('"config.needsContext" must be a boolean');
72
+ }
73
+ }
74
+ }
75
+ return errors;
76
+ }
77
+ //# sourceMappingURL=overlay-schema.js.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Branch Enumerator Utility (BMAD-004)
3
+ *
4
+ * Mechanically enumerates all branching constructs in TypeScript/JavaScript files
5
+ * without subjective risk scoring. Reports every unhandled path for completeness.
6
+ *
7
+ * Design: Strategy pattern (BranchEnumerator interface) for future multi-language support.
8
+ * Uses regex-based pattern matching (NOT AST parsing) to keep the utility lightweight
9
+ * and avoid parser version issues (Gap 5).
10
+ */
11
+ export type SupportedLanguage = 'typescript' | 'javascript';
12
+ export type ConstructType = 'if-without-else' | 'switch-no-default' | 'switch-missing-break' | 'try-empty-catch' | 'try-no-finally' | 'optional-chaining-null-path' | 'nullish-coalescing-fallback' | 'logical-or-falsy' | 'logical-and-short-circuit' | 'promise-no-catch' | 'array-callback-empty' | 'ternary-complex' | 'type-guard-unhandled';
13
+ export interface UnhandledBranch {
14
+ file: string;
15
+ line: number;
16
+ column: number;
17
+ language: SupportedLanguage;
18
+ construct: ConstructType;
19
+ triggerCondition: string;
20
+ currentHandling: string;
21
+ suggestedGuard: string;
22
+ severity: 'high' | 'medium' | 'low';
23
+ }
24
+ export interface BranchEnumerator {
25
+ /** Enumerate all unhandled branches in source code. */
26
+ enumerate(sourceCode: string, filePath: string): UnhandledBranch[];
27
+ /** Supported language */
28
+ readonly language: SupportedLanguage;
29
+ }
30
+ export interface EnumerationResult {
31
+ file: string;
32
+ language: SupportedLanguage;
33
+ branches: UnhandledBranch[];
34
+ totalConstructs: number;
35
+ unhandledCount: number;
36
+ duration: number;
37
+ }
38
+ /**
39
+ * TypeScript/JavaScript branch enumerator.
40
+ * Uses line-by-line pattern matching for reliability.
41
+ */
42
+ export declare class TSBranchEnumerator implements BranchEnumerator {
43
+ readonly language: SupportedLanguage;
44
+ constructor(language?: SupportedLanguage);
45
+ enumerate(sourceCode: string, filePath: string): UnhandledBranch[];
46
+ /**
47
+ * Check if an if-statement has a matching else.
48
+ * Simple heuristic: look for 'else' at same or lower indentation within ~30 lines.
49
+ */
50
+ private findMatchingElse;
51
+ /**
52
+ * Extract the block (curly braces content) starting near a line.
53
+ */
54
+ private extractBlock;
55
+ }
56
+ /**
57
+ * Enumerate branches in a source file.
58
+ */
59
+ export declare function enumerateBranches(sourceCode: string, filePath: string, language?: SupportedLanguage): EnumerationResult;
60
+ /**
61
+ * Format enumeration result as markdown.
62
+ */
63
+ export declare function formatBranchReport(result: EnumerationResult): string;
64
+ /**
65
+ * Format enumeration result as JSON.
66
+ */
67
+ export declare function formatBranchJSON(result: EnumerationResult): string;
68
+ //# sourceMappingURL=branch-enumerator.d.ts.map