@agent-ix/quoin 0.22.5 → 0.24.1

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 (398) hide show
  1. package/README.md +8 -258
  2. package/bin/launcher.js +138 -0
  3. package/package.json +22 -119
  4. package/.agents/plugins/marketplace.json +0 -14
  5. package/.claude-plugin/marketplace.json +0 -16
  6. package/.claude-plugin/plugin.json +0 -8
  7. package/.codex-plugin/plugin.json +0 -27
  8. package/.github/plugin/marketplace.json +0 -16
  9. package/bin/quoin.js +0 -21
  10. package/default-modules.yaml +0 -107
  11. package/dist/advisor/advise.d.ts +0 -199
  12. package/dist/advisor/advise.d.ts.map +0 -1
  13. package/dist/advisor/index.d.ts +0 -10
  14. package/dist/advisor/index.d.ts.map +0 -1
  15. package/dist/advisor/methods.d.ts +0 -60
  16. package/dist/advisor/methods.d.ts.map +0 -1
  17. package/dist/advisor-BkgwDKvQ.js +0 -63
  18. package/dist/assurance/graph.d.ts +0 -87
  19. package/dist/assurance/graph.d.ts.map +0 -1
  20. package/dist/assurance/index.d.ts +0 -9
  21. package/dist/assurance/index.d.ts.map +0 -1
  22. package/dist/assurance/render.d.ts +0 -3
  23. package/dist/assurance/render.d.ts.map +0 -1
  24. package/dist/auditor/audit.d.ts +0 -146
  25. package/dist/auditor/audit.d.ts.map +0 -1
  26. package/dist/auditor/combinatorial.d.ts +0 -53
  27. package/dist/auditor/combinatorial.d.ts.map +0 -1
  28. package/dist/auditor/index.d.ts +0 -9
  29. package/dist/auditor/index.d.ts.map +0 -1
  30. package/dist/auditor-C3bSmPD_.js +0 -340
  31. package/dist/base-CqKNs2Kd.js +0 -137
  32. package/dist/base.d.ts +0 -23
  33. package/dist/base.d.ts.map +0 -1
  34. package/dist/catalog.d.ts +0 -33
  35. package/dist/catalog.d.ts.map +0 -1
  36. package/dist/cli.d.ts +0 -61
  37. package/dist/cli.d.ts.map +0 -1
  38. package/dist/cli.js +0 -34
  39. package/dist/commands/advise.d.ts +0 -16
  40. package/dist/commands/advise.d.ts.map +0 -1
  41. package/dist/commands/advise.js +0 -234
  42. package/dist/commands/assurance.d.ts +0 -14
  43. package/dist/commands/assurance.d.ts.map +0 -1
  44. package/dist/commands/assurance.js +0 -204
  45. package/dist/commands/catalog/index.d.ts +0 -2
  46. package/dist/commands/catalog/index.d.ts.map +0 -1
  47. package/dist/commands/catalog/index.js +0 -2
  48. package/dist/commands/catalog/list.d.ts +0 -11
  49. package/dist/commands/catalog/list.d.ts.map +0 -1
  50. package/dist/commands/catalog/list.js +0 -22
  51. package/dist/commands/catalog/methods.d.ts +0 -12
  52. package/dist/commands/catalog/methods.d.ts.map +0 -1
  53. package/dist/commands/catalog/methods.js +0 -43
  54. package/dist/commands/catalog/show.d.ts +0 -13
  55. package/dist/commands/catalog/show.d.ts.map +0 -1
  56. package/dist/commands/catalog/show.js +0 -25
  57. package/dist/commands/catalog/validate.d.ts +0 -10
  58. package/dist/commands/catalog/validate.d.ts.map +0 -1
  59. package/dist/commands/catalog/validate.js +0 -27
  60. package/dist/commands/completeness.d.ts +0 -16
  61. package/dist/commands/completeness.d.ts.map +0 -1
  62. package/dist/commands/completeness.js +0 -49
  63. package/dist/commands/config/doctor.d.ts +0 -7
  64. package/dist/commands/config/doctor.d.ts.map +0 -1
  65. package/dist/commands/config/doctor.js +0 -15
  66. package/dist/commands/config/edit.d.ts +0 -7
  67. package/dist/commands/config/edit.d.ts.map +0 -1
  68. package/dist/commands/config/edit.js +0 -13
  69. package/dist/commands/config/get.d.ts +0 -11
  70. package/dist/commands/config/get.d.ts.map +0 -1
  71. package/dist/commands/config/get.js +0 -20
  72. package/dist/commands/config/index.d.ts +0 -2
  73. package/dist/commands/config/index.d.ts.map +0 -1
  74. package/dist/commands/config/index.js +0 -2
  75. package/dist/commands/config/set.d.ts +0 -12
  76. package/dist/commands/config/set.d.ts.map +0 -1
  77. package/dist/commands/config/set.js +0 -26
  78. package/dist/commands/evidence/affirm.d.ts +0 -17
  79. package/dist/commands/evidence/affirm.d.ts.map +0 -1
  80. package/dist/commands/evidence/affirm.js +0 -65
  81. package/dist/commands/evidence/audit.d.ts +0 -34
  82. package/dist/commands/evidence/audit.d.ts.map +0 -1
  83. package/dist/commands/evidence/audit.js +0 -107
  84. package/dist/commands/evidence/baseline.d.ts +0 -14
  85. package/dist/commands/evidence/baseline.d.ts.map +0 -1
  86. package/dist/commands/evidence/baseline.js +0 -89
  87. package/dist/commands/evidence/gc.d.ts +0 -13
  88. package/dist/commands/evidence/gc.d.ts.map +0 -1
  89. package/dist/commands/evidence/gc.js +0 -35
  90. package/dist/commands/evidence/index.d.ts +0 -8
  91. package/dist/commands/evidence/index.d.ts.map +0 -1
  92. package/dist/commands/evidence/index.js +0 -18
  93. package/dist/commands/evidence/inspect-mocks.d.ts +0 -16
  94. package/dist/commands/evidence/inspect-mocks.d.ts.map +0 -1
  95. package/dist/commands/evidence/inspect-mocks.js +0 -49
  96. package/dist/commands/evidence/record.d.ts +0 -22
  97. package/dist/commands/evidence/record.d.ts.map +0 -1
  98. package/dist/commands/evidence/record.js +0 -140
  99. package/dist/commands/matrix.d.ts +0 -14
  100. package/dist/commands/matrix.d.ts.map +0 -1
  101. package/dist/commands/matrix.js +0 -15
  102. package/dist/commands/measurement/index.d.ts +0 -7
  103. package/dist/commands/measurement/index.d.ts.map +0 -1
  104. package/dist/commands/measurement/index.js +0 -11
  105. package/dist/commands/measurement/record.d.ts +0 -10
  106. package/dist/commands/measurement/record.d.ts.map +0 -1
  107. package/dist/commands/measurement/record.js +0 -35
  108. package/dist/commands/module/ensure-defaults.d.ts +0 -8
  109. package/dist/commands/module/ensure-defaults.d.ts.map +0 -1
  110. package/dist/commands/module/ensure-defaults.js +0 -17
  111. package/dist/commands/module/index.d.ts +0 -2
  112. package/dist/commands/module/index.d.ts.map +0 -1
  113. package/dist/commands/module/index.js +0 -2
  114. package/dist/commands/module/install.d.ts +0 -11
  115. package/dist/commands/module/install.d.ts.map +0 -1
  116. package/dist/commands/module/install.js +0 -22
  117. package/dist/commands/module/list.d.ts +0 -8
  118. package/dist/commands/module/list.d.ts.map +0 -1
  119. package/dist/commands/module/list.js +0 -13
  120. package/dist/commands/module/remove.d.ts +0 -10
  121. package/dist/commands/module/remove.d.ts.map +0 -1
  122. package/dist/commands/module/remove.js +0 -16
  123. package/dist/commands/plugin/deprecation.d.ts +0 -10
  124. package/dist/commands/plugin/deprecation.d.ts.map +0 -1
  125. package/dist/commands/plugin/ensure-defaults.d.ts +0 -8
  126. package/dist/commands/plugin/ensure-defaults.d.ts.map +0 -1
  127. package/dist/commands/plugin/ensure-defaults.js +0 -12
  128. package/dist/commands/plugin/index.d.ts +0 -2
  129. package/dist/commands/plugin/index.d.ts.map +0 -1
  130. package/dist/commands/plugin/index.js +0 -2
  131. package/dist/commands/plugin/install.d.ts +0 -8
  132. package/dist/commands/plugin/install.d.ts.map +0 -1
  133. package/dist/commands/plugin/install.js +0 -12
  134. package/dist/commands/plugin/list.d.ts +0 -8
  135. package/dist/commands/plugin/list.d.ts.map +0 -1
  136. package/dist/commands/plugin/list.js +0 -12
  137. package/dist/commands/plugin/remove.d.ts +0 -8
  138. package/dist/commands/plugin/remove.d.ts.map +0 -1
  139. package/dist/commands/plugin/remove.js +0 -12
  140. package/dist/commands/report.d.ts +0 -15
  141. package/dist/commands/report.d.ts.map +0 -1
  142. package/dist/commands/report.js +0 -70
  143. package/dist/commands/review.d.ts +0 -14
  144. package/dist/commands/review.d.ts.map +0 -1
  145. package/dist/commands/review.js +0 -15
  146. package/dist/commands/to-plan.d.ts +0 -14
  147. package/dist/commands/to-plan.d.ts.map +0 -1
  148. package/dist/commands/to-plan.js +0 -15
  149. package/dist/commands/update.d.ts +0 -13
  150. package/dist/commands/update.d.ts.map +0 -1
  151. package/dist/commands/update.js +0 -34
  152. package/dist/commands/validate.d.ts +0 -13
  153. package/dist/commands/validate.d.ts.map +0 -1
  154. package/dist/commands/validate.js +0 -123
  155. package/dist/commands/write.d.ts +0 -16
  156. package/dist/commands/write.d.ts.map +0 -1
  157. package/dist/commands/write.js +0 -33
  158. package/dist/completeness/assess.d.ts +0 -82
  159. package/dist/completeness/assess.d.ts.map +0 -1
  160. package/dist/completeness/bundle.d.ts +0 -52
  161. package/dist/completeness/bundle.d.ts.map +0 -1
  162. package/dist/completeness/declarations.d.ts +0 -46
  163. package/dist/completeness/declarations.d.ts.map +0 -1
  164. package/dist/completeness/index.d.ts +0 -11
  165. package/dist/completeness/index.d.ts.map +0 -1
  166. package/dist/completeness/run.d.ts +0 -35
  167. package/dist/completeness/run.d.ts.map +0 -1
  168. package/dist/completeness-DamWradt.js +0 -228
  169. package/dist/config-schema-Dp-vlxuR.js +0 -13
  170. package/dist/config-schema.d.ts +0 -52
  171. package/dist/config-schema.d.ts.map +0 -1
  172. package/dist/deprecation-fRxUHoxv.js +0 -4
  173. package/dist/evidence/adapters/agent-eval.d.ts +0 -26
  174. package/dist/evidence/adapters/agent-eval.d.ts.map +0 -1
  175. package/dist/evidence/adapters/audit-script.d.ts +0 -25
  176. package/dist/evidence/adapters/audit-script.d.ts.map +0 -1
  177. package/dist/evidence/adapters/cargo-mutants.d.ts +0 -3
  178. package/dist/evidence/adapters/cargo-mutants.d.ts.map +0 -1
  179. package/dist/evidence/adapters/junit.d.ts +0 -17
  180. package/dist/evidence/adapters/junit.d.ts.map +0 -1
  181. package/dist/evidence/adapters/registry.d.ts +0 -63
  182. package/dist/evidence/adapters/registry.d.ts.map +0 -1
  183. package/dist/evidence/adapters/sarif.d.ts +0 -35
  184. package/dist/evidence/adapters/sarif.d.ts.map +0 -1
  185. package/dist/evidence/adapters/sbom.d.ts +0 -35
  186. package/dist/evidence/adapters/sbom.d.ts.map +0 -1
  187. package/dist/evidence/adapters/types.d.ts +0 -55
  188. package/dist/evidence/adapters/types.d.ts.map +0 -1
  189. package/dist/evidence/index.d.ts +0 -24
  190. package/dist/evidence/index.d.ts.map +0 -1
  191. package/dist/evidence/mock-inspection.d.ts +0 -16
  192. package/dist/evidence/mock-inspection.d.ts.map +0 -1
  193. package/dist/evidence/record.d.ts +0 -58
  194. package/dist/evidence/record.d.ts.map +0 -1
  195. package/dist/evidence/store.d.ts +0 -215
  196. package/dist/evidence/store.d.ts.map +0 -1
  197. package/dist/evidence/types.d.ts +0 -281
  198. package/dist/evidence/types.d.ts.map +0 -1
  199. package/dist/evidence-DD0CHzJ0.js +0 -533
  200. package/dist/flow-command-BfFNY0Rv.js +0 -88
  201. package/dist/flow-command.d.ts +0 -25
  202. package/dist/flow-command.d.ts.map +0 -1
  203. package/dist/flows.d.ts +0 -7
  204. package/dist/flows.d.ts.map +0 -1
  205. package/dist/hooks/command-not-found.d.ts +0 -23
  206. package/dist/hooks/command-not-found.d.ts.map +0 -1
  207. package/dist/hooks/command-not-found.js +0 -8
  208. package/dist/index.d.ts +0 -12
  209. package/dist/index.d.ts.map +0 -1
  210. package/dist/index.js +0 -10
  211. package/dist/measurement/compare.d.ts +0 -4
  212. package/dist/measurement/compare.d.ts.map +0 -1
  213. package/dist/measurement/index.d.ts +0 -9
  214. package/dist/measurement/index.d.ts.map +0 -1
  215. package/dist/measurement/plans.d.ts +0 -4
  216. package/dist/measurement/plans.d.ts.map +0 -1
  217. package/dist/measurement/portfolio.d.ts +0 -48
  218. package/dist/measurement/portfolio.d.ts.map +0 -1
  219. package/dist/measurement/profiles.d.ts +0 -9
  220. package/dist/measurement/profiles.d.ts.map +0 -1
  221. package/dist/measurement/report.d.ts +0 -44
  222. package/dist/measurement/report.d.ts.map +0 -1
  223. package/dist/measurement/store.d.ts +0 -7
  224. package/dist/measurement/store.d.ts.map +0 -1
  225. package/dist/measurement/types.d.ts +0 -83
  226. package/dist/measurement/types.d.ts.map +0 -1
  227. package/dist/measurement/validate.d.ts +0 -9
  228. package/dist/measurement/validate.d.ts.map +0 -1
  229. package/dist/measurement-CzB74Q07.js +0 -595
  230. package/dist/modules-ez9httBA.js +0 -23
  231. package/dist/modules.d.ts +0 -10
  232. package/dist/modules.d.ts.map +0 -1
  233. package/dist/org.d.ts +0 -61
  234. package/dist/org.d.ts.map +0 -1
  235. package/dist/plugins-C-ta0llj.js +0 -77
  236. package/dist/plugins.d.ts +0 -13
  237. package/dist/plugins.d.ts.map +0 -1
  238. package/dist/quire/contract.d.ts +0 -87
  239. package/dist/quire/contract.d.ts.map +0 -1
  240. package/dist/quire/exec.d.ts +0 -66
  241. package/dist/quire/exec.d.ts.map +0 -1
  242. package/dist/quire/index.d.ts +0 -12
  243. package/dist/quire/index.d.ts.map +0 -1
  244. package/dist/quire/types.d.ts +0 -415
  245. package/dist/quire/types.d.ts.map +0 -1
  246. package/dist/quire/validate.d.ts +0 -34
  247. package/dist/quire/validate.d.ts.map +0 -1
  248. package/dist/quire-D8tCpgyA.js +0 -4961
  249. package/dist/schemas/coverage-v1.schema.json +0 -1111
  250. package/dist/schemas/properties-v1.schema.json +0 -159
  251. package/dist/store--2sAv12X.js +0 -219
  252. package/dist/validators/gates.d.ts +0 -18
  253. package/dist/validators/gates.d.ts.map +0 -1
  254. package/dist/validators/index.d.ts +0 -2
  255. package/dist/validators/index.d.ts.map +0 -1
  256. package/dist/version-Dg0e6CZU.js +0 -17
  257. package/dist/version.d.ts +0 -3
  258. package/dist/version.d.ts.map +0 -1
  259. package/dist/write-DElwS9xc.js +0 -157
  260. package/dist/write.d.ts +0 -28
  261. package/dist/write.d.ts.map +0 -1
  262. package/skills/assurance-status-report/SKILL.md +0 -135
  263. package/skills/assurance-status-report/references/report-contract.md +0 -110
  264. package/skills/gap-analysis/SKILL.md +0 -111
  265. package/skills/gap-analysis/references/step-1-target-selection.md +0 -53
  266. package/skills/gap-analysis/references/step-2-plan-completion.md +0 -49
  267. package/skills/gap-analysis/references/step-3-matrix-verification.md +0 -147
  268. package/skills/gap-analysis/references/step-4-underspecified-code.md +0 -63
  269. package/skills/gap-analysis/references/step-5-semantic-review.md +0 -51
  270. package/skills/gap-analysis/references/step-6-specreview-artifact.md +0 -107
  271. package/skills/spec-app-review/SKILL.md +0 -51
  272. package/skills/spec-app-review/references/checklist.md +0 -197
  273. package/skills/spec-architecture-evaluation/SKILL.md +0 -30
  274. package/skills/spec-correctness/SKILL.md +0 -96
  275. package/skills/spec-correctness/assets/strategy-table.md +0 -101
  276. package/skills/spec-correctness/assets/templates/fast-check.ts.md +0 -169
  277. package/skills/spec-correctness/assets/templates/hypothesis.py.md +0 -156
  278. package/skills/spec-correctness/assets/templates/proptest.rs.md +0 -147
  279. package/skills/spec-correctness/references/step-0-scope-and-harness.md +0 -94
  280. package/skills/spec-correctness/references/step-1-census.md +0 -53
  281. package/skills/spec-correctness/references/step-2-clause-grounding.md +0 -159
  282. package/skills/spec-correctness/references/step-3-strategy-selection.md +0 -85
  283. package/skills/spec-correctness/references/step-4-generate-tests.md +0 -117
  284. package/skills/spec-correctness/references/step-5-second-pass.md +0 -81
  285. package/skills/spec-correctness/references/step-6-review-artifact.md +0 -134
  286. package/skills/spec-correctness/references/step-7-report-and-handoff.md +0 -102
  287. package/skills/spec-dependency-analysis/SKILL.md +0 -90
  288. package/skills/spec-ears-analysis/SKILL.md +0 -102
  289. package/skills/spec-evidence-analysis/SKILL.md +0 -156
  290. package/skills/spec-failure-domain-analysis/SKILL.md +0 -59
  291. package/skills/spec-fuzz/SKILL.md +0 -132
  292. package/skills/spec-fuzz/assets/templates/atheris.py.md +0 -74
  293. package/skills/spec-fuzz/assets/templates/cargo-fuzz.rs.md +0 -83
  294. package/skills/spec-fuzz/assets/templates/fast-check.ts.md +0 -76
  295. package/skills/spec-fuzz/references/step-0-scope-and-harness.md +0 -51
  296. package/skills/spec-fuzz/references/step-1-select-obligations.md +0 -47
  297. package/skills/spec-fuzz/references/step-2-ground-entry-point.md +0 -55
  298. package/skills/spec-fuzz/references/step-3-emit-targets.md +0 -65
  299. package/skills/spec-fuzz/references/step-4-report.md +0 -56
  300. package/skills/spec-ideation/SKILL.md +0 -46
  301. package/skills/spec-integrity-analysis/SKILL.md +0 -62
  302. package/skills/spec-matrix/SKILL.md +0 -186
  303. package/skills/spec-matrix/assets/test-cases/TC-001.md +0 -35
  304. package/skills/spec-matrix/assets/test-cases/TC-002.md +0 -37
  305. package/skills/spec-matrix/assets/test-cases/TC-006.md +0 -50
  306. package/skills/spec-matrix/assets/test-matrix-example.md +0 -104
  307. package/skills/spec-matrix/assets/test-matrix-template.md +0 -123
  308. package/skills/spec-matrix/workflow-assets/dist/index.d.ts +0 -146
  309. package/skills/spec-matrix/workflow-assets/dist/index.d.ts.map +0 -1
  310. package/skills/spec-matrix/workflow-assets/dist/index.js +0 -7525
  311. package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts +0 -6
  312. package/skills/spec-matrix/workflow-assets/dist/invariants.d.ts.map +0 -1
  313. package/skills/spec-matrix/workflow-assets/skills/matrix/SKILL.md +0 -35
  314. package/skills/spec-matrix/workflow-assets/skills/matrix/scripts/invariants.js +0 -1
  315. package/skills/spec-matrix/workflow-assets/skills/matrix/templates/report/default.md +0 -30
  316. package/skills/spec-matrix/workflow-assets/skills/matrix/workflows/matrix/def.yaml +0 -82
  317. package/skills/spec-object-review/SKILL.md +0 -125
  318. package/skills/spec-object-review/references/object-type-guide.md +0 -118
  319. package/skills/spec-review/SKILL.md +0 -92
  320. package/skills/spec-review/references/checklist.md +0 -50
  321. package/skills/spec-review/workflow-assets/dist/index.d.ts +0 -146
  322. package/skills/spec-review/workflow-assets/dist/index.d.ts.map +0 -1
  323. package/skills/spec-review/workflow-assets/dist/index.js +0 -7525
  324. package/skills/spec-review/workflow-assets/dist/invariants.d.ts +0 -6
  325. package/skills/spec-review/workflow-assets/dist/invariants.d.ts.map +0 -1
  326. package/skills/spec-review/workflow-assets/skills/review/SKILL.md +0 -96
  327. package/skills/spec-review/workflow-assets/skills/review/scripts/invariants.js +0 -61
  328. package/skills/spec-review/workflow-assets/skills/review/workflows/review/def.yaml +0 -68
  329. package/skills/spec-risk-complexity-analysis/SKILL.md +0 -92
  330. package/skills/spec-scope-boundary-analysis/SKILL.md +0 -101
  331. package/skills/spec-security-analysis/SKILL.md +0 -84
  332. package/skills/spec-security-analysis/assets/security-analysis-example.md +0 -89
  333. package/skills/spec-security-analysis/assets/security-analysis-template.md +0 -73
  334. package/skills/spec-security-analysis/references/component-type-mapping.md +0 -161
  335. package/skills/spec-security-analysis/references/gdpr/ChII-Principles.md +0 -58
  336. package/skills/spec-security-analysis/references/gdpr/ChIII-DataSubjectRights.md +0 -84
  337. package/skills/spec-security-analysis/references/gdpr/ChIV-ControllerProcessor.md +0 -83
  338. package/skills/spec-security-analysis/references/gdpr/ChV-DataTransfers.md +0 -62
  339. package/skills/spec-security-analysis/references/gdpr/index.md +0 -54
  340. package/skills/spec-security-analysis/references/iso27001/A5-OrganizationalControls.md +0 -64
  341. package/skills/spec-security-analysis/references/iso27001/A6-PeopleControls.md +0 -30
  342. package/skills/spec-security-analysis/references/iso27001/A7-PhysicalControls.md +0 -35
  343. package/skills/spec-security-analysis/references/iso27001/A8-TechnologicalControls.md +0 -66
  344. package/skills/spec-security-analysis/references/iso27001/index.md +0 -43
  345. package/skills/spec-security-analysis/references/nist-800-53/AC-AccessControl.md +0 -57
  346. package/skills/spec-security-analysis/references/nist-800-53/AU-AuditAccountability.md +0 -49
  347. package/skills/spec-security-analysis/references/nist-800-53/CM-ConfigurationManagement.md +0 -36
  348. package/skills/spec-security-analysis/references/nist-800-53/IA-IdentificationAuthentication.md +0 -44
  349. package/skills/spec-security-analysis/references/nist-800-53/SA-SystemServicesAcquisition.md +0 -50
  350. package/skills/spec-security-analysis/references/nist-800-53/SC-SystemCommunications.md +0 -53
  351. package/skills/spec-security-analysis/references/nist-800-53/SI-SystemInformationIntegrity.md +0 -52
  352. package/skills/spec-security-analysis/references/nist-800-53/index.md +0 -58
  353. package/skills/spec-security-analysis/references/owasp-asvs/V1-Architecture.md +0 -33
  354. package/skills/spec-security-analysis/references/owasp-asvs/V10-MaliciousCode.md +0 -33
  355. package/skills/spec-security-analysis/references/owasp-asvs/V11-BusinessLogic.md +0 -32
  356. package/skills/spec-security-analysis/references/owasp-asvs/V12-Files.md +0 -34
  357. package/skills/spec-security-analysis/references/owasp-asvs/V13-API.md +0 -34
  358. package/skills/spec-security-analysis/references/owasp-asvs/V14-Configuration.md +0 -35
  359. package/skills/spec-security-analysis/references/owasp-asvs/V2-Authentication.md +0 -36
  360. package/skills/spec-security-analysis/references/owasp-asvs/V3-SessionManagement.md +0 -35
  361. package/skills/spec-security-analysis/references/owasp-asvs/V4-AccessControl.md +0 -39
  362. package/skills/spec-security-analysis/references/owasp-asvs/V5-Validation.md +0 -37
  363. package/skills/spec-security-analysis/references/owasp-asvs/V6-Cryptography.md +0 -34
  364. package/skills/spec-security-analysis/references/owasp-asvs/V7-ErrorLogging.md +0 -37
  365. package/skills/spec-security-analysis/references/owasp-asvs/V8-DataProtection.md +0 -34
  366. package/skills/spec-security-analysis/references/owasp-asvs/V9-Communication.md +0 -32
  367. package/skills/spec-security-analysis/references/owasp-asvs/index.md +0 -59
  368. package/skills/spec-security-analysis/references/soc2/CC1-ControlEnvironment.md +0 -31
  369. package/skills/spec-security-analysis/references/soc2/CC2-CommunicationInformation.md +0 -27
  370. package/skills/spec-security-analysis/references/soc2/CC3-RiskAssessment.md +0 -29
  371. package/skills/spec-security-analysis/references/soc2/CC4-MonitoringActivities.md +0 -27
  372. package/skills/spec-security-analysis/references/soc2/CC5-ControlActivities.md +0 -28
  373. package/skills/spec-security-analysis/references/soc2/CC6-LogicalPhysicalAccess.md +0 -45
  374. package/skills/spec-security-analysis/references/soc2/CC7-SystemOperations.md +0 -42
  375. package/skills/spec-security-analysis/references/soc2/CC8-ChangeManagement.md +0 -32
  376. package/skills/spec-security-analysis/references/soc2/CC9-RiskMitigation.md +0 -34
  377. package/skills/spec-security-analysis/references/soc2/index.md +0 -46
  378. package/skills/spec-security-analysis/references/standards-index.md +0 -46
  379. package/skills/spec-to-plan/SKILL.md +0 -88
  380. package/skills/spec-to-plan/references/step-0-plan-selection.md +0 -121
  381. package/skills/spec-to-plan/references/step-1-analysis.md +0 -88
  382. package/skills/spec-to-plan/references/step-2-test-plan.md +0 -43
  383. package/skills/spec-to-plan/references/step-3-execution-plan.md +0 -218
  384. package/skills/spec-to-plan/workflow-assets/dist/index.d.ts +0 -146
  385. package/skills/spec-to-plan/workflow-assets/dist/index.d.ts.map +0 -1
  386. package/skills/spec-to-plan/workflow-assets/dist/index.js +0 -7525
  387. package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts +0 -6
  388. package/skills/spec-to-plan/workflow-assets/dist/invariants.d.ts.map +0 -1
  389. package/skills/spec-to-plan/workflow-assets/skills/to-plan/SKILL.md +0 -35
  390. package/skills/spec-to-plan/workflow-assets/skills/to-plan/scripts/invariants.js +0 -1
  391. package/skills/spec-to-plan/workflow-assets/skills/to-plan/templates/implementation-plan/default.md +0 -44
  392. package/skills/spec-to-plan/workflow-assets/skills/to-plan/workflows/to-plan/def.yaml +0 -85
  393. package/skills/specify/SKILL.md +0 -154
  394. package/skills/specify/assets/app-spec-template.md +0 -143
  395. package/skills/specify/assets/spec-template.md +0 -299
  396. package/skills/specify/references/integration-tests.md +0 -72
  397. package/skills/specify/references/us-to-fr.md +0 -40
  398. package/skills/specify/references/writing-good-requirements.md +0 -61
@@ -1,146 +0,0 @@
1
- import { Obligation } from '../quire/index.js';
2
- import { Binding, FindingRecord, MockInjection, RunRecord } from '../evidence/index.js';
3
- import { MethodCatalog } from '../advisor/index.js';
4
- /** Severity of one finding. Matches the SpecReview vocabulary. */
5
- export type Severity = "low" | "medium" | "high";
6
- /** One thing wrong with the evidence for one obligation. */
7
- export interface Finding {
8
- kind: "suspect-link" | "stale-evidence" | "vacuous-evidence" | "combinatorial-gap" | "undischarged" | "method-conformance" | "unknown-method" | "insufficient-multiplicity" | "insufficient-mutation-score" | "unmeasured-mutation-score" | "mocked-confirmation";
9
- obligation: string;
10
- severity: Severity;
11
- summary: string;
12
- /** Repo-relative source locus when the producer names one. */
13
- path?: string;
14
- line?: number;
15
- symbol?: string;
16
- /** Structured action fields are additive; only producers with sufficient
17
- * evidence populate them. The JSON finding contract requires a target and
18
- * exactly one remedy or safe diagnostic step when subject is present. */
19
- subject?: string;
20
- changeTarget?: string;
21
- remedy?: string;
22
- nextDiagnosticStep?: string;
23
- }
24
- /** What the auditor was given to read. */
25
- export interface AuditInput {
26
- /** Obligations as quire derives them today. */
27
- obligations: Obligation[];
28
- /** The binding graph from the store. */
29
- bindings: Binding[];
30
- /** Every run record the store holds, newest per suite. */
31
- runs: RunRecord[];
32
- /**
33
- * What each suite's tests INJECT in place of real behaviour (#204).
34
- *
35
- * Supplied by the caller because the auditor reads the store, not source —
36
- * and #204 asked to extend `evidence audit`, not to build a second system.
37
- * An absent list means "nobody looked", never "nothing was mocked": the
38
- * result is recorded under `unevaluated`, not counted as healthy.
39
- */
40
- injections?: MockInjection[];
41
- /** Suites with a current completed inspection, including clean inspections. */
42
- mockInspectionSuites?: string[];
43
- /**
44
- * Every finding-shaped scan record the store holds, newest per suite
45
- * (FR-034).
46
- *
47
- * Separate from `runs` because the two answer different questions. A scan
48
- * has no symbols and no pass/fail, so every check that reasons over
49
- * `entries` is meaningless against it — and silently folding them together
50
- * is how a scan would start reading as a run that skipped everything.
51
- */
52
- scans?: FindingRecord[];
53
- /** The merged verification-method catalog, for method conformance. */
54
- catalog?: MethodCatalog;
55
- /** Commit being audited, for freshness. */
56
- headCommit?: string;
57
- /** Criticality values that demand two independent methods. */
58
- multiplicityRequires?: string[];
59
- /**
60
- * Criticality value → the mutation score its obligations must reach.
61
- *
62
- * **Unset by default**, for the reason CR-008 removed the hardcoded
63
- * `multiplicityRequires: ["P0"]`: a built-in floor is a rule that fires on
64
- * everything the moment a criticality column appears, and nobody chose it.
65
- *
66
- * A score is a ratio in `[0, 1]` — killed mutants over viable ones, as the
67
- * `cargo-mutants` adapter computes it. Unviable mutants are in neither side.
68
- */
69
- mutationFloor?: Record<string, number>;
70
- }
71
- /** The audit result, ordered so the same input yields the same report. */
72
- export interface AuditReport {
73
- findings: Finding[];
74
- /** Obligations with a binding whose hash still matches. */
75
- healthy: string[];
76
- /** Checks that could not run, separate from both findings and clean results. */
77
- unevaluated: UnevaluatedCheck[];
78
- }
79
- export interface UnevaluatedCheck {
80
- check: "mocked-confirmation";
81
- obligation: string;
82
- suites: string[];
83
- reason: string;
84
- }
85
- /**
86
- * Audit the store against the obligations of the day.
87
- *
88
- * Every check is deterministic and reads only what it was handed. There is no
89
- * clock, no filesystem walk and no subprocess in here — the caller assembles
90
- * the inputs, which is what makes the whole thing testable without a repository.
91
- */
92
- export declare function audit(input: AuditInput): AuditReport;
93
- /**
94
- * Fault-detection scores among the runs bound to this obligation.
95
- *
96
- * **Filtered on the entry's own `metric`, never on the tool name.**
97
- * `RunEntry.score` is deliberately generic — its own contract says "a mutation
98
- * score, a coverage percentage, a measured latency" — so reading every scored
99
- * entry would compare a p95 latency in milliseconds against a floor of `0.8`
100
- * and report the obligation as failing. The first draft did exactly that; the
101
- * first fix scoped by tool name against the catalog's
102
- * `mutation-testing.tooling`, which named a method id in the engine, was a
103
- * tool allowlist by another name, and did not generalize. The adapter now
104
- * names what it measured at the point of recording (agent-ix/quoin#138), and
105
- * an entry without a `metric` is not a mutation score — no fallback read of
106
- * the tool string.
107
- *
108
- * Exported for the advisor (agent-ix/quoin#158), which needs the same answer
109
- * to decide whether anything has measured that the tests discriminate. One
110
- * definition, so the auditor's finding and the advisor's recommendation cannot
111
- * disagree about what a score is.
112
- */
113
- /**
114
- * How much of an injected identifier must overlap the statement's own words
115
- * before the injection is read as standing in for the verified behaviour.
116
- *
117
- * Deliberately high. A test legitimately mocks a clock, a filesystem, a
118
- * network — all of which share nothing with the statement. What this is
119
- * looking for is the narrow case where the mock's NAME is the statement's
120
- * subject, which is what `Confirmation::allow` against a trusted-UI
121
- * confirmation criterion looks like.
122
- */
123
- export declare const MOCK_SUBJECT_FLOOR = 0.5;
124
- export declare function scoresFor(bindings: Binding[], runs: RunRecord[]): number[];
125
- /** The baseline key for one finding. */
126
- export declare function findingKey(finding: Finding): string;
127
- /**
128
- * Findings not present in the baseline — what a ratchet fails on.
129
- *
130
- * The baseline is a flat set of `<kind>:<obligation>` keys covering **every**
131
- * finding kind. It used to be two named buckets, `undischarged` and `suspect`,
132
- * so `stale-evidence`, `vacuous-evidence`, `method-conformance`,
133
- * `unknown-method` and `insufficient-multiplicity` could never be baselined and
134
- * `--ratchet` reported the whole existing backlog for all five — which is the
135
- * outcome this function's own comment says ratchet mode exists to prevent
136
- * (agent-ix/quoin#105).
137
- */
138
- export declare function ratchet(report: AuditReport, baseline: {
139
- accepted: string[];
140
- }): Finding[];
141
- /** What changed between two audits — the per-PR delta. */
142
- export declare function delta(before: AuditReport, after: AuditReport): {
143
- added: Finding[];
144
- resolved: Finding[];
145
- };
146
- //# sourceMappingURL=audit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/auditor/audit.ts"],"names":[],"mappings":"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"}
@@ -1,53 +0,0 @@
1
- /**
2
- * t-way coverage over a declared configuration space (FR-035).
3
- *
4
- * quire mints the obligation — *"2-way over these dimensions"* — and states the
5
- * space in the obligation's own statement (quire-rs FR-061). This computes what
6
- * a run actually reached, and names what it did not.
7
- *
8
- * **quoin computes; it neither declares nor generates.** The dimensions come
9
- * from the spec, the executed configurations come from the consumer's CI, and
10
- * the covering array itself is nobody's job here (ADR-0011 invariant 1).
11
- */
12
- /** One dimension parsed back out of an obligation statement. */
13
- export interface Dimension {
14
- name: string;
15
- values: string[];
16
- }
17
- /** A forbidden combination: assignments that cannot co-occur. */
18
- export interface Exclusion {
19
- assignments: Array<[string, string]>;
20
- }
21
- export interface ConfigurationSpace {
22
- strength: number;
23
- dimensions: Dimension[];
24
- exclusions: Exclusion[];
25
- }
26
- /**
27
- * Parse the space out of a combinatorial obligation's statement.
28
- *
29
- * Returns `null` for any statement that is not one, which is how a caller tells
30
- * a combinatorial obligation from every other kind without a second flag to
31
- * keep in agreement with the first.
32
- */
33
- export declare function parseSpace(statement: string): ConfigurationSpace | null;
34
- /** Every t-way tuple the space demands, as stable keys. */
35
- export declare function demandedTuples(space: ConfigurationSpace): Set<string>;
36
- /** Every t-way tuple one executed configuration covers. */
37
- export declare function coveredBy(space: ConfigurationSpace, config: Record<string, string>): Set<string>;
38
- export interface CoverageResult {
39
- strength: number;
40
- demanded: number;
41
- covered: number;
42
- /** Tuples no executed configuration reached, in stable order. */
43
- gaps: string[];
44
- }
45
- /**
46
- * What a set of executed configurations reached, and what it did not.
47
- *
48
- * The gap list is the point. A percentage tells someone how much is missing;
49
- * the list tells them *which combinations to run*, which is the difference
50
- * between a number and an action.
51
- */
52
- export declare function twayCoverage(space: ConfigurationSpace, configs: Array<Record<string, string>>): CoverageResult;
53
- //# sourceMappingURL=combinatorial.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"combinatorial.d.ts","sourceRoot":"","sources":["../../src/auditor/combinatorial.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,gEAAgE;AAChE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,iEAAiE;AACjE,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB;AAMD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI,CAuCvE;AAyCD,2DAA2D;AAC3D,wBAAgB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,MAAM,CAAC,CAkBrE;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CACvB,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,GAAG,CAAC,MAAM,CAAC,CAWb;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,iEAAiE;IACjE,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,kBAAkB,EACzB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACrC,cAAc,CAkBhB"}
@@ -1,9 +0,0 @@
1
- /**
2
- * The evidence auditor (FR-032) — suspect links, stale evidence, vacuity.
3
- *
4
- * Reads the store and reports. Runs nothing (ADR-0011 invariant 1): an auditor
5
- * that could re-run a suite could also make a finding disappear by re-running it.
6
- */
7
- export { audit, delta, findingKey, ratchet, scoresFor, type AuditInput, type AuditReport, type Finding, type Severity, type UnevaluatedCheck, } from './audit.js';
8
- export type { MockInjection } from '../evidence/index.js';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,gBAAgB,GACtB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,340 +0,0 @@
1
- import { m as e } from "./store--2sAv12X.js";
2
- import "./evidence-DD0CHzJ0.js";
3
- //#region src/auditor/combinatorial.ts
4
- var t = /^(\d+)-way over\s/, n = /([^\s(]+)\(([^)]*)\)/g, r = /excluding\[([^\]]*)\]/g;
5
- function i(e) {
6
- let i = t.exec(e);
7
- if (!i) return null;
8
- let a = Number.parseInt(i[1], 10);
9
- if (!Number.isFinite(a) || a < 1) return null;
10
- let o = e.split("excluding[")[0], s = [];
11
- for (let e of o.matchAll(n)) {
12
- let t = e[2].split("|").map((e) => e.trim()).filter((e) => e !== "");
13
- t.length < 2 || s.push({
14
- name: e[1],
15
- values: t
16
- });
17
- }
18
- if (s.length < 2) return null;
19
- let c = [];
20
- for (let t of e.matchAll(r)) {
21
- let e = t[1].split(",").map((e) => e.trim()).filter((e) => e !== "").map((e) => {
22
- let t = e.indexOf("=");
23
- return t === -1 ? null : [e.slice(0, t).trim(), e.slice(t + 1).trim()];
24
- }).filter((e) => e !== null);
25
- e.length >= 2 && c.push({ assignments: e });
26
- }
27
- return {
28
- strength: a,
29
- dimensions: s,
30
- exclusions: c
31
- };
32
- }
33
- function a(e, t) {
34
- if (t > e || t < 1) return [];
35
- let n = [], r = [], i = (a) => {
36
- if (r.length === t) {
37
- n.push([...r]);
38
- return;
39
- }
40
- for (let t = a; t < e; t += 1) r.push(t), i(t + 1), r.pop();
41
- };
42
- return i(0), n;
43
- }
44
- function o(e) {
45
- return [...e].sort((e, t) => e[0] < t[0] ? -1 : +(e[0] > t[0])).map(([e, t]) => `${e}=${t}`).join(" & ");
46
- }
47
- function s(e, t) {
48
- return e.exclusions.some((e) => e.assignments.every(([e, n]) => t.some(([t, r]) => t === e && r === n)));
49
- }
50
- function c(e) {
51
- let t = /* @__PURE__ */ new Set();
52
- for (let n of a(e.dimensions.length, e.strength)) {
53
- let r = (i, a) => {
54
- if (i === n.length) {
55
- s(e, a) || t.add(o(a));
56
- return;
57
- }
58
- let c = e.dimensions[n[i]];
59
- for (let e of c.values) a.push([c.name, e]), r(i + 1, a), a.pop();
60
- };
61
- r(0, []);
62
- }
63
- return t;
64
- }
65
- function l(e, t) {
66
- let n = e.dimensions.filter((e) => t[e.name] !== void 0 && e.values.includes(t[e.name])), r = /* @__PURE__ */ new Set();
67
- for (let i of a(n.length, e.strength)) r.add(o(i.map((e) => [n[e].name, t[n[e].name]])));
68
- return r;
69
- }
70
- function u(e, t) {
71
- let n = c(e), r = /* @__PURE__ */ new Set();
72
- for (let i of t) for (let t of l(e, i)) n.has(t) && r.add(t);
73
- let i = [...n].filter((e) => !r.has(e)).sort();
74
- return {
75
- strength: e.strength,
76
- demanded: n.size,
77
- covered: r.size,
78
- gaps: i
79
- };
80
- }
81
- //#endregion
82
- //#region src/auditor/audit.ts
83
- function d(t) {
84
- let n = [], r = [], a = [], o = /* @__PURE__ */ new Map();
85
- for (let e of t.bindings) {
86
- let t = o.get(e.obligation) ?? [];
87
- t.push(e), o.set(e.obligation, t);
88
- }
89
- let s = new Map(t.runs.map((e) => [e.suite, e])), c = new Map((t.scans ?? []).map((e) => [e.suite, e])), l = t.injections ?? [], d = new Set(t.mockInspectionSuites ?? l.map((e) => e.suite));
90
- for (let h of [...t.obligations].sort(p)) {
91
- let p = n.length, y = a.length, x = (o.get(h.id) ?? []).slice().sort((e, t) => f(e.suite, t.suite)), S = m(h, t.catalog);
92
- if (S && n.push(S), x.length === 0) {
93
- n.push({
94
- kind: "undischarged",
95
- obligation: h.id,
96
- severity: "medium",
97
- summary: `no evidence is bound to ${h.id}`
98
- });
99
- continue;
100
- }
101
- let C = x.filter((e) => e.statementHashAtBinding !== h.statement_hash);
102
- if (C.length > 0) {
103
- n.push({
104
- kind: "suspect-link",
105
- obligation: h.id,
106
- severity: "high",
107
- summary: `${h.id} was reworded after its evidence was bound in ${C.map((e) => e.suite).join(", ")} (bound against ${C[0].statementHashAtBinding.slice(0, 12)}…, now ${h.statement_hash.slice(0, 12)}…). Re-affirm or re-verify.`
108
- });
109
- continue;
110
- }
111
- let w = x.filter((e) => !s.has(e.suite) && !c.has(e.suite));
112
- if (w.length > 0) {
113
- n.push({
114
- kind: "stale-evidence",
115
- obligation: h.id,
116
- severity: "high",
117
- summary: `${h.id} is bound to ${w.map((e) => e.suite).join(", ")}, which ${w.length === 1 ? "has" : "have"} no recorded run. The binding claims evidence that is not in the store.`
118
- });
119
- continue;
120
- }
121
- let T = b(h, x, l), E = [...new Set(x.filter((e) => s.has(e.suite)).map((e) => e.suite).filter((e) => !d.has(e)))].sort(f);
122
- if (E.length > 0 && a.push({
123
- check: "mocked-confirmation",
124
- obligation: h.id,
125
- suites: E,
126
- reason: `no current mock inspection exists for ${E.join(", ")}. Run quoin evidence inspect-mocks for each suite at HEAD.`
127
- }), T.length > 0 && T.length === x.length) {
128
- let e = [...T].sort((e, t) => f(e.path ?? "", t.path ?? "") || (e.line ?? 0) - (t.line ?? 0) || f(e.symbol, t.symbol))[0];
129
- n.push({
130
- kind: "mocked-confirmation",
131
- obligation: h.id,
132
- severity: "medium",
133
- ...e.path ? { path: e.path } : {},
134
- ...e.line ? { line: e.line } : {},
135
- symbol: e.symbol,
136
- subject: `${h.id} evidence`,
137
- changeTarget: e.path && e.line ? `${e.path}:${e.line} in ${e.symbol}` : e.path ? `${e.path} in ${e.symbol}` : e.symbol,
138
- nextDiagnosticStep: `inspect whether the real behaviour for ${h.id} exists; add or bind an independent test that exercises it without substituting the behaviour under verification`,
139
- summary: `${h.id} is discharged only by tests that inject a stand-in for the behaviour it verifies: ` + T.map((e) => `${e.path ? `${e.path}${e.line ? `:${e.line}` : ""} ` : ""}${e.symbol} injects ${e.injects.join(", ")}`).sort(f).join("; ") + ". A test that substitutes the behaviour under verification passes whether or not that behaviour exists."
140
- });
141
- continue;
142
- }
143
- let D = x.map((e) => c.get(e.suite)).filter((e) => e !== void 0).filter((t) => e(t) === !0);
144
- if (D.length > 0) {
145
- n.push({
146
- kind: "vacuous-evidence",
147
- obligation: h.id,
148
- severity: "high",
149
- summary: `${h.id} rests on a scan that evaluated no rules: ` + D.map((e) => `${e.suite} (${e.tool})`).sort(f).join(", ") + ". It reported no finding because it looked for nothing."
150
- });
151
- continue;
152
- }
153
- let O = x.filter((e) => s.has(e.suite));
154
- if (O.length === 0) continue;
155
- let k = O.map((e) => s.get(e.suite));
156
- if (t.headCommit) {
157
- let e = x.filter((e, n) => k[n].commit !== t.headCommit);
158
- e.length > 0 && n.push({
159
- kind: "stale-evidence",
160
- obligation: h.id,
161
- severity: "medium",
162
- summary: `${h.id} rests on ` + e.map((e) => `a ${e.suite} run at ${s.get(e.suite).commit.slice(0, 12)}`).join(" and ") + `, not at HEAD (${t.headCommit.slice(0, 12)}).`
163
- });
164
- }
165
- let A = O.flatMap((e, t) => e.symbols.filter((e) => {
166
- let n = k[t].entries.find((t) => t.symbol === e);
167
- return !n || n.outcome === "skip";
168
- }).map((t) => `${e.suite}:${t}`)), j = O.reduce((e, t) => e + t.symbols.length, 0);
169
- if (A.length > 0 && A.length === j) {
170
- n.push({
171
- kind: "vacuous-evidence",
172
- obligation: h.id,
173
- severity: "high",
174
- summary: `every symbol bound to ${h.id} was skipped or absent from its run: ${A.sort(f).join(", ")}. The row reads as covered and nothing was verified.`
175
- });
176
- continue;
177
- }
178
- let M = i(h.statement ?? "");
179
- if (M) {
180
- let e = u(M, k.flatMap((e) => e.entries.map((e) => e.config).filter((e) => !!e)));
181
- if (e.covered < e.demanded) {
182
- n.push({
183
- kind: "combinatorial-gap",
184
- obligation: h.id,
185
- severity: "medium",
186
- summary: `${h.id} demands ${e.demanded} ${e.strength}-way combinations and its runs reached ${e.covered}. Never run: ${e.gaps.slice(0, 10).join("; ")}` + (e.gaps.length > 10 ? ` (and ${e.gaps.length - 10} more)` : "")
187
- });
188
- continue;
189
- }
190
- }
191
- let N = g(h, O, k, t.catalog);
192
- if (N) {
193
- n.push(N);
194
- continue;
195
- }
196
- let P = _(h, x, t);
197
- if (P) {
198
- n.push(P);
199
- continue;
200
- }
201
- let F = v(h, O, k, t);
202
- if (F) {
203
- n.push(F);
204
- continue;
205
- }
206
- n.length === p && a.length === y && r.push(h.id);
207
- }
208
- return n.sort((e, t) => f(e.obligation, t.obligation) || f(e.kind, t.kind)), a.sort((e, t) => f(e.obligation, t.obligation) || f(e.check, t.check)), {
209
- findings: n,
210
- healthy: r.sort(f),
211
- unevaluated: a
212
- };
213
- }
214
- function f(e, t) {
215
- return e === t ? 0 : e < t ? -1 : 1;
216
- }
217
- function p(e, t) {
218
- return f(e.id, t.id);
219
- }
220
- function m(e, t) {
221
- return !t || !e.method || h(e.method, t).length > 0 ? null : {
222
- kind: "unknown-method",
223
- obligation: e.id,
224
- severity: "medium",
225
- summary: `${e.id} declares \`${e.method}\`, which is neither a catalog method id nor a catalog class. Nothing can say what discharging it means, so no conformance check can run against it.`
226
- };
227
- }
228
- function h(e, t) {
229
- let n = e.trim().toLowerCase();
230
- return t.methods.filter((e) => e.id.toLowerCase() === n || e.class.toLowerCase() === n);
231
- }
232
- function g(e, t, n, r) {
233
- if (!r || !e.method) return null;
234
- let i = h(e.method, r);
235
- if (i.length === 0) return null;
236
- let a = new Set(i.map((e) => e.evidenceKind).filter((e) => typeof e == "string" && e.length > 0));
237
- if (a.size === 0) return null;
238
- let o = t.filter((e, t) => {
239
- let r = n[t].evidenceKind;
240
- return typeof r == "string" && r.length > 0 && !a.has(r);
241
- });
242
- return o.length === 0 ? null : {
243
- kind: "method-conformance",
244
- obligation: e.id,
245
- severity: "medium",
246
- summary: `${e.id} declares \`${e.method}\`, whose evidence kind is ${[...a].sort(f).join("/")}, but is discharged by ` + o.map((e) => `a ${n[t.indexOf(e)].evidenceKind} run in ${e.suite}`).join(" and ") + ". A method is not discharged by evidence of another kind."
247
- };
248
- }
249
- function _(e, t, n) {
250
- let r = n.multiplicityRequires ?? [];
251
- if (r.length === 0 || !e.criticality || !r.includes(e.criticality)) return null;
252
- let i = new Set(t.map((e) => e.suite));
253
- return i.size >= 2 ? null : {
254
- kind: "insufficient-multiplicity",
255
- obligation: e.id,
256
- severity: "medium",
257
- summary: `${e.id} is criticality ${e.criticality}, which requires two independent methods, but all its evidence comes from ${[...i].join(", ")}.`
258
- };
259
- }
260
- function v(e, t, n, r) {
261
- let i = r.mutationFloor ?? {};
262
- if (!e.criticality) return null;
263
- let a = i[e.criticality];
264
- if (a === void 0) return null;
265
- let o = C(t, n);
266
- if (o.length === 0) return {
267
- kind: "unmeasured-mutation-score",
268
- obligation: e.id,
269
- severity: "medium",
270
- summary: `${e.id} is criticality ${e.criticality}, which demands a mutation score of at least ${a}, and no run bound to it records one.`
271
- };
272
- let s = Math.min(...o);
273
- return s >= a ? null : {
274
- kind: "insufficient-mutation-score",
275
- obligation: e.id,
276
- severity: "medium",
277
- summary: `${e.id} is criticality ${e.criticality}, which demands a mutation score of at least ${a}; its weakest bound symbol scores ${s}.`
278
- };
279
- }
280
- var y = .5;
281
- function b(e, t, n) {
282
- if (n.length === 0) return [];
283
- let r = S(e.statement);
284
- if (r.size === 0) return [];
285
- let i = [];
286
- for (let e of t) {
287
- let t = n.filter((t) => t.suite === e.suite && e.symbols.some((e) => x(e, t.symbol))).find((e) => e.injects.some((e) => {
288
- let t = S(e);
289
- if (t.size === 0) return !1;
290
- let n = 0;
291
- for (let e of t) r.has(e) && (n += 1);
292
- return n / t.size >= y;
293
- }));
294
- t && i.push(t);
295
- }
296
- return i;
297
- }
298
- function x(e, t) {
299
- return e === t || e.endsWith(`::${t}`) || t.endsWith(`::${e}`);
300
- }
301
- function S(e) {
302
- let t = /* @__PURE__ */ new Set([
303
- "the",
304
- "a",
305
- "an",
306
- "and",
307
- "or",
308
- "of",
309
- "to",
310
- "for",
311
- "in",
312
- "is",
313
- "be",
314
- "shall",
315
- "with",
316
- "that",
317
- "it",
318
- "its",
319
- "on",
320
- "by",
321
- "as",
322
- "not",
323
- "new"
324
- ]);
325
- return new Set(e.split(/[^A-Za-z0-9]+/).map((e) => e.toLowerCase()).filter((e) => e.length > 2 && !t.has(e)));
326
- }
327
- function C(e, t) {
328
- let n = new Set(e.map((e) => e.suite)), r = [];
329
- for (let e of t) if (n.has(e.suite)) for (let t of e.entries) t.metric === "mutation-score" && t.score !== void 0 && t.outcome !== "skip" && r.push(t.score);
330
- return r;
331
- }
332
- function w(e) {
333
- return `${e.kind}:${e.obligation}`;
334
- }
335
- function T(e, t) {
336
- let n = new Set(t.accepted);
337
- return e.findings.filter((e) => !n.has(w(e)));
338
- }
339
- //#endregion
340
- export { i as a, C as i, w as n, T as r, d as t };