audit-tools 0.52.4 → 0.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/dist/audit/cli/auditStep.d.ts +1 -1
  2. package/dist/audit/cli/dispatch/hostHandoff.d.ts +2 -0
  3. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  4. package/dist/audit/cli/dispatch/hostHandoff.js +1 -1
  5. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  6. package/dist/audit/cli/dispatch/packetFilter.d.ts +1 -1
  7. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  8. package/dist/audit/cli/dispatch/packetFilter.js +1 -1
  9. package/dist/audit/cli/dispatch/packetFilter.js.map +1 -1
  10. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  11. package/dist/audit/cli/nextStepCommand.js +42 -20
  12. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  13. package/dist/audit/cli/nextStepHelpers.d.ts +3 -3
  14. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  15. package/dist/audit/cli/nextStepHelpers.js +50 -75
  16. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  17. package/dist/audit/cli/prompts.d.ts +1 -2
  18. package/dist/audit/cli/prompts.d.ts.map +1 -1
  19. package/dist/audit/cli/prompts.js +2 -12
  20. package/dist/audit/cli/prompts.js.map +1 -1
  21. package/dist/audit/cli/sampleRunCommand.d.ts +2 -2
  22. package/dist/audit/cli/semanticReviewStep.d.ts +11 -2
  23. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  24. package/dist/audit/cli/semanticReviewStep.js +14 -10
  25. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  26. package/dist/audit/contracts/workerSchemas.d.ts +14 -14
  27. package/dist/audit/contracts/wrapperResponse.d.ts +6 -6
  28. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  29. package/dist/audit/extractors/graphRoutes.js +1 -3
  30. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  31. package/dist/audit/io/artifacts.d.ts.map +1 -1
  32. package/dist/audit/io/artifacts.js +2 -3
  33. package/dist/audit/io/artifacts.js.map +1 -1
  34. package/dist/audit/orchestrator/architectureDiscovery.d.ts +11 -0
  35. package/dist/audit/orchestrator/architectureDiscovery.d.ts.map +1 -0
  36. package/dist/audit/orchestrator/architectureDiscovery.js +174 -0
  37. package/dist/audit/orchestrator/architectureDiscovery.js.map +1 -0
  38. package/dist/audit/orchestrator/designReviewProjection.d.ts +2 -6
  39. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  40. package/dist/audit/orchestrator/designReviewProjection.js +2 -6
  41. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  42. package/dist/audit/orchestrator/designReviewSnapshot.d.ts +2 -3
  43. package/dist/audit/orchestrator/designReviewSnapshot.d.ts.map +1 -1
  44. package/dist/audit/orchestrator/designReviewSnapshot.js +2 -3
  45. package/dist/audit/orchestrator/designReviewSnapshot.js.map +1 -1
  46. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  47. package/dist/audit/orchestrator/executorRunners.js +1 -22
  48. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  49. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  50. package/dist/audit/orchestrator/executors.js +1 -13
  51. package/dist/audit/orchestrator/executors.js.map +1 -1
  52. package/dist/audit/orchestrator/nextStep.d.ts +2 -28
  53. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  54. package/dist/audit/orchestrator/nextStep.js +5 -37
  55. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  56. package/dist/audit/orchestrator/obligationDerive.d.ts +2 -3
  57. package/dist/audit/orchestrator/obligationDerive.d.ts.map +1 -1
  58. package/dist/audit/orchestrator/obligationDerive.js +2 -3
  59. package/dist/audit/orchestrator/obligationDerive.js.map +1 -1
  60. package/dist/audit/orchestrator/pendingTasks.d.ts +2 -0
  61. package/dist/audit/orchestrator/pendingTasks.d.ts.map +1 -1
  62. package/dist/audit/orchestrator/pendingTasks.js +5 -1
  63. package/dist/audit/orchestrator/pendingTasks.js.map +1 -1
  64. package/dist/audit/orchestrator/planningExecutors.d.ts.map +1 -1
  65. package/dist/audit/orchestrator/planningExecutors.js +9 -0
  66. package/dist/audit/orchestrator/planningExecutors.js.map +1 -1
  67. package/dist/audit/orchestrator/requeueCommand.d.ts +1 -1
  68. package/dist/audit/orchestrator/resultBaseline.d.ts +5 -5
  69. package/dist/audit/orchestrator/resultBaseline.d.ts.map +1 -1
  70. package/dist/audit/orchestrator/resultBaseline.js +24 -47
  71. package/dist/audit/orchestrator/resultBaseline.js.map +1 -1
  72. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.d.ts.map +1 -1
  73. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js +2 -0
  74. package/dist/audit/orchestrator/selectiveDeepening/findingFollowup.js.map +1 -1
  75. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  76. package/dist/audit/orchestrator/state.js +2 -0
  77. package/dist/audit/orchestrator/state.js.map +1 -1
  78. package/dist/audit/orchestrator/synthesisExecutors.d.ts.map +1 -1
  79. package/dist/audit/orchestrator/synthesisExecutors.js +3 -0
  80. package/dist/audit/orchestrator/synthesisExecutors.js.map +1 -1
  81. package/dist/audit/types/auditState.d.ts +6 -6
  82. package/dist/audit/types/flowCoverage.d.ts +6 -6
  83. package/dist/audit/types.d.ts +12 -12
  84. package/dist/remediate/contractPipeline/executionPlan.d.ts +1908 -0
  85. package/dist/remediate/contractPipeline/executionPlan.d.ts.map +1 -0
  86. package/dist/remediate/contractPipeline/executionPlan.js +467 -0
  87. package/dist/remediate/contractPipeline/executionPlan.js.map +1 -0
  88. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts +12 -0
  89. package/dist/remediate/contractPipeline/runtimePlanAuthority.d.ts.map +1 -0
  90. package/dist/remediate/contractPipeline/runtimePlanAuthority.js +41 -0
  91. package/dist/remediate/contractPipeline/runtimePlanAuthority.js.map +1 -0
  92. package/dist/remediate/dedup/crossLensDedup.d.ts +3 -16
  93. package/dist/remediate/dedup/crossLensDedup.d.ts.map +1 -1
  94. package/dist/remediate/dedup/crossLensDedup.js +2 -32
  95. package/dist/remediate/dedup/crossLensDedup.js.map +1 -1
  96. package/dist/remediate/index.d.ts +2 -19
  97. package/dist/remediate/index.d.ts.map +1 -1
  98. package/dist/remediate/index.js +22 -138
  99. package/dist/remediate/index.js.map +1 -1
  100. package/dist/remediate/intake.d.ts +10 -10
  101. package/dist/remediate/intent/intentOrdering.d.ts +6 -8
  102. package/dist/remediate/intent/intentOrdering.d.ts.map +1 -1
  103. package/dist/remediate/intent/intentOrdering.js +24 -47
  104. package/dist/remediate/intent/intentOrdering.js.map +1 -1
  105. package/dist/remediate/phases/close.d.ts +25 -17
  106. package/dist/remediate/phases/close.d.ts.map +1 -1
  107. package/dist/remediate/phases/close.js +278 -218
  108. package/dist/remediate/phases/close.js.map +1 -1
  109. package/dist/remediate/phases/closeAcceptance.d.ts +42 -0
  110. package/dist/remediate/phases/closeAcceptance.d.ts.map +1 -0
  111. package/dist/remediate/phases/closeAcceptance.js +66 -0
  112. package/dist/remediate/phases/closeAcceptance.js.map +1 -0
  113. package/dist/remediate/phases/closeReviewProvenance.d.ts +1 -1
  114. package/dist/remediate/phases/closeReviewProvenance.d.ts.map +1 -1
  115. package/dist/remediate/phases/closeReviewProvenance.js +9 -8
  116. package/dist/remediate/phases/closeReviewProvenance.js.map +1 -1
  117. package/dist/remediate/phases/closeVerifyAnalyzerLeads.d.ts.map +1 -1
  118. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js +11 -9
  119. package/dist/remediate/phases/closeVerifyAnalyzerLeads.js.map +1 -1
  120. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +21 -86
  121. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -1
  122. package/dist/remediate/phases/closeVerifyHeadEvidence.js +30 -19
  123. package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -1
  124. package/dist/remediate/phases/plan.d.ts +3 -60
  125. package/dist/remediate/phases/plan.d.ts.map +1 -1
  126. package/dist/remediate/phases/plan.js +3 -227
  127. package/dist/remediate/phases/plan.js.map +1 -1
  128. package/dist/remediate/phases/triage.d.ts.map +1 -1
  129. package/dist/remediate/phases/triage.js +19 -30
  130. package/dist/remediate/phases/triage.js.map +1 -1
  131. package/dist/remediate/riskSignal.d.ts +9 -43
  132. package/dist/remediate/riskSignal.d.ts.map +1 -1
  133. package/dist/remediate/riskSignal.js +7 -28
  134. package/dist/remediate/riskSignal.js.map +1 -1
  135. package/dist/remediate/state/disposition.d.ts +2 -1
  136. package/dist/remediate/state/disposition.d.ts.map +1 -1
  137. package/dist/remediate/state/disposition.js +37 -1
  138. package/dist/remediate/state/disposition.js.map +1 -1
  139. package/dist/remediate/state/runIdentity.d.ts +2 -13
  140. package/dist/remediate/state/runIdentity.d.ts.map +1 -1
  141. package/dist/remediate/state/runIdentity.js +3 -13
  142. package/dist/remediate/state/runIdentity.js.map +1 -1
  143. package/dist/remediate/state/store.d.ts +12 -36
  144. package/dist/remediate/state/store.d.ts.map +1 -1
  145. package/dist/remediate/state/store.js +58 -150
  146. package/dist/remediate/state/store.js.map +1 -1
  147. package/dist/remediate/state/types.d.ts +406 -504
  148. package/dist/remediate/state/types.d.ts.map +1 -1
  149. package/dist/remediate/state/types.js +24 -104
  150. package/dist/remediate/state/types.js.map +1 -1
  151. package/dist/remediate/steps/contractPipeline.d.ts +7 -661
  152. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  153. package/dist/remediate/steps/contractPipeline.js +259 -3854
  154. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  155. package/dist/remediate/steps/contractPipelinePrompts.d.ts +20 -142
  156. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  157. package/dist/remediate/steps/contractPipelinePrompts.js +48 -581
  158. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  159. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts +4 -1
  160. package/dist/remediate/steps/dispatch/contractConformanceReview.d.ts.map +1 -1
  161. package/dist/remediate/steps/dispatch/contractConformanceReview.js +6 -3
  162. package/dist/remediate/steps/dispatch/contractConformanceReview.js.map +1 -1
  163. package/dist/remediate/steps/dispatch/hostContracts.d.ts +1 -1
  164. package/dist/remediate/steps/dispatch/hostContracts.d.ts.map +1 -1
  165. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +4 -21
  166. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  167. package/dist/remediate/steps/dispatch/hostHandoff.js +161 -383
  168. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  169. package/dist/remediate/steps/finalGate.d.ts +34 -0
  170. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  171. package/dist/remediate/steps/finalGate.js +44 -4
  172. package/dist/remediate/steps/finalGate.js.map +1 -1
  173. package/dist/remediate/steps/frictionCloseout.d.ts +1 -30
  174. package/dist/remediate/steps/frictionCloseout.d.ts.map +1 -1
  175. package/dist/remediate/steps/frictionCloseout.js +6 -99
  176. package/dist/remediate/steps/frictionCloseout.js.map +1 -1
  177. package/dist/remediate/steps/nextStep.d.ts +2 -15
  178. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  179. package/dist/remediate/steps/nextStep.js +255 -1028
  180. package/dist/remediate/steps/nextStep.js.map +1 -1
  181. package/dist/remediate/steps/prompts.js +12 -12
  182. package/dist/remediate/steps/prompts.js.map +1 -1
  183. package/dist/remediate/steps/stepUtils.d.ts +1 -1
  184. package/dist/remediate/steps/stepUtils.d.ts.map +1 -1
  185. package/dist/remediate/steps/types.d.ts +1 -1
  186. package/dist/remediate/steps/types.d.ts.map +1 -1
  187. package/dist/remediate/steps/types.js +1 -1
  188. package/dist/remediate/steps/types.js.map +1 -1
  189. package/dist/remediate/types/options.d.ts +9 -0
  190. package/dist/remediate/types/options.d.ts.map +1 -1
  191. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  192. package/dist/remediate/validation/artifacts.js +10 -56
  193. package/dist/remediate/validation/artifacts.js.map +1 -1
  194. package/dist/remediate/validation/remediationState.d.ts +2 -2
  195. package/dist/remediate/validation/remediationState.d.ts.map +1 -1
  196. package/dist/remediate/validation/remediationState.js +17 -77
  197. package/dist/remediate/validation/remediationState.js.map +1 -1
  198. package/dist/remediate/validation/verificationReport.d.ts +3 -0
  199. package/dist/remediate/validation/verificationReport.d.ts.map +1 -0
  200. package/dist/remediate/validation/verificationReport.js +28 -0
  201. package/dist/remediate/validation/verificationReport.js.map +1 -0
  202. package/dist/shared/analyzers/types.d.ts +10 -10
  203. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  204. package/dist/shared/friction/triage.d.ts +7 -28
  205. package/dist/shared/friction/triage.d.ts.map +1 -1
  206. package/dist/shared/friction/triage.js +7 -28
  207. package/dist/shared/friction/triage.js.map +1 -1
  208. package/dist/shared/graph/orderedReachability.js +1 -1
  209. package/dist/shared/graph/orderedReachability.js.map +1 -1
  210. package/dist/shared/index.d.ts +5 -6
  211. package/dist/shared/index.d.ts.map +1 -1
  212. package/dist/shared/index.js +3 -4
  213. package/dist/shared/index.js.map +1 -1
  214. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  215. package/dist/shared/loopCorePaths.js +6 -0
  216. package/dist/shared/loopCorePaths.js.map +1 -1
  217. package/dist/shared/prompts.d.ts +1 -2
  218. package/dist/shared/prompts.d.ts.map +1 -1
  219. package/dist/shared/prompts.js +1 -2
  220. package/dist/shared/prompts.js.map +1 -1
  221. package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
  222. package/dist/shared/reReview/projectionDiff.js +6 -14
  223. package/dist/shared/reReview/projectionDiff.js.map +1 -1
  224. package/dist/shared/types/executionPlan.d.ts +416 -0
  225. package/dist/shared/types/executionPlan.d.ts.map +1 -0
  226. package/dist/shared/types/executionPlan.js +132 -0
  227. package/dist/shared/types/executionPlan.js.map +1 -0
  228. package/dist/shared/types/remediationOutcome.d.ts +1378 -12
  229. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  230. package/dist/shared/types/remediationOutcome.js +29 -1
  231. package/dist/shared/types/remediationOutcome.js.map +1 -1
  232. package/dist/shared/types/{contractPipeline/verification.d.ts → verificationReport.d.ts} +9 -37
  233. package/dist/shared/types/verificationReport.d.ts.map +1 -0
  234. package/dist/shared/types/verificationReport.js +4 -0
  235. package/dist/shared/types/verificationReport.js.map +1 -0
  236. package/dist/shared/validation/findingGrounding.d.ts +3 -5
  237. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  238. package/dist/shared/validation/findingGrounding.js +4 -7
  239. package/dist/shared/validation/findingGrounding.js.map +1 -1
  240. package/package.json +1 -1
  241. package/remediate-code.mjs +16 -3
  242. package/dist/remediate/contractPipeline/artifactNames.d.ts +0 -8
  243. package/dist/remediate/contractPipeline/artifactNames.d.ts.map +0 -1
  244. package/dist/remediate/contractPipeline/artifactNames.js +0 -28
  245. package/dist/remediate/contractPipeline/artifactNames.js.map +0 -1
  246. package/dist/remediate/contractPipeline/artifactStore.d.ts +0 -219
  247. package/dist/remediate/contractPipeline/artifactStore.d.ts.map +0 -1
  248. package/dist/remediate/contractPipeline/artifactStore.js +0 -436
  249. package/dist/remediate/contractPipeline/artifactStore.js.map +0 -1
  250. package/dist/remediate/contractPipeline/changeClassification.d.ts +0 -130
  251. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +0 -1
  252. package/dist/remediate/contractPipeline/changeClassification.js +0 -446
  253. package/dist/remediate/contractPipeline/changeClassification.js.map +0 -1
  254. package/dist/remediate/contractPipeline/contractReviewBinding.d.ts +0 -28
  255. package/dist/remediate/contractPipeline/contractReviewBinding.d.ts.map +0 -1
  256. package/dist/remediate/contractPipeline/contractReviewBinding.js +0 -75
  257. package/dist/remediate/contractPipeline/contractReviewBinding.js.map +0 -1
  258. package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts +0 -27
  259. package/dist/remediate/contractPipeline/counterexampleFingerprint.d.ts.map +0 -1
  260. package/dist/remediate/contractPipeline/counterexampleFingerprint.js +0 -37
  261. package/dist/remediate/contractPipeline/counterexampleFingerprint.js.map +0 -1
  262. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts +0 -131
  263. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +0 -1
  264. package/dist/remediate/contractPipeline/cyclicSeamResolution.js +0 -257
  265. package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +0 -1
  266. package/dist/remediate/contractPipeline/derive.d.ts +0 -173
  267. package/dist/remediate/contractPipeline/derive.d.ts.map +0 -1
  268. package/dist/remediate/contractPipeline/derive.js +0 -477
  269. package/dist/remediate/contractPipeline/derive.js.map +0 -1
  270. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +0 -50
  271. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +0 -1
  272. package/dist/remediate/contractPipeline/finalizedContractFields.js +0 -77
  273. package/dist/remediate/contractPipeline/finalizedContractFields.js.map +0 -1
  274. package/dist/remediate/contractPipeline/idRegistry.d.ts +0 -144
  275. package/dist/remediate/contractPipeline/idRegistry.d.ts.map +0 -1
  276. package/dist/remediate/contractPipeline/idRegistry.js +0 -214
  277. package/dist/remediate/contractPipeline/idRegistry.js.map +0 -1
  278. package/dist/remediate/contractPipeline/obligationKinds.d.ts +0 -27
  279. package/dist/remediate/contractPipeline/obligationKinds.d.ts.map +0 -1
  280. package/dist/remediate/contractPipeline/obligationKinds.js +0 -18
  281. package/dist/remediate/contractPipeline/obligationKinds.js.map +0 -1
  282. package/dist/remediate/contractPipeline/phaseCut.d.ts +0 -125
  283. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +0 -1
  284. package/dist/remediate/contractPipeline/phaseCut.js +0 -339
  285. package/dist/remediate/contractPipeline/phaseCut.js.map +0 -1
  286. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts +0 -31
  287. package/dist/remediate/contractPipeline/phaseCutArtifact.d.ts.map +0 -1
  288. package/dist/remediate/contractPipeline/phaseCutArtifact.js +0 -48
  289. package/dist/remediate/contractPipeline/phaseCutArtifact.js.map +0 -1
  290. package/dist/remediate/contractPipeline/repairState.d.ts +0 -110
  291. package/dist/remediate/contractPipeline/repairState.d.ts.map +0 -1
  292. package/dist/remediate/contractPipeline/repairState.js +0 -185
  293. package/dist/remediate/contractPipeline/repairState.js.map +0 -1
  294. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +0 -79
  295. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +0 -1
  296. package/dist/remediate/contractPipeline/reviewSnapshot.js +0 -140
  297. package/dist/remediate/contractPipeline/reviewSnapshot.js.map +0 -1
  298. package/dist/remediate/contractPipeline/semanticProjection.d.ts +0 -64
  299. package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +0 -1
  300. package/dist/remediate/contractPipeline/semanticProjection.js +0 -136
  301. package/dist/remediate/contractPipeline/semanticProjection.js.map +0 -1
  302. package/dist/remediate/contractPipeline/sketchSource.d.ts +0 -194
  303. package/dist/remediate/contractPipeline/sketchSource.d.ts.map +0 -1
  304. package/dist/remediate/contractPipeline/sketchSource.js +0 -262
  305. package/dist/remediate/contractPipeline/sketchSource.js.map +0 -1
  306. package/dist/remediate/contractPipeline/testPlanCarry.d.ts +0 -17
  307. package/dist/remediate/contractPipeline/testPlanCarry.d.ts.map +0 -1
  308. package/dist/remediate/contractPipeline/testPlanCarry.js +0 -72
  309. package/dist/remediate/contractPipeline/testPlanCarry.js.map +0 -1
  310. package/dist/remediate/steps/dispatch/marshal.d.ts +0 -7
  311. package/dist/remediate/steps/dispatch/marshal.d.ts.map +0 -1
  312. package/dist/remediate/steps/dispatch/marshal.js +0 -11
  313. package/dist/remediate/steps/dispatch/marshal.js.map +0 -1
  314. package/dist/remediate/validation/contractPipeline.d.ts +0 -35
  315. package/dist/remediate/validation/contractPipeline.d.ts.map +0 -1
  316. package/dist/remediate/validation/contractPipeline.js +0 -613
  317. package/dist/remediate/validation/contractPipeline.js.map +0 -1
  318. package/dist/remediate/validation/contractPipelineGates.d.ts +0 -272
  319. package/dist/remediate/validation/contractPipelineGates.d.ts.map +0 -1
  320. package/dist/remediate/validation/contractPipelineGates.js +0 -1397
  321. package/dist/remediate/validation/contractPipelineGates.js.map +0 -1
  322. package/dist/shared/types/contractPipeline/design.d.ts +0 -79
  323. package/dist/shared/types/contractPipeline/design.d.ts.map +0 -1
  324. package/dist/shared/types/contractPipeline/design.js +0 -16
  325. package/dist/shared/types/contractPipeline/design.js.map +0 -1
  326. package/dist/shared/types/contractPipeline/goal.d.ts +0 -41
  327. package/dist/shared/types/contractPipeline/goal.d.ts.map +0 -1
  328. package/dist/shared/types/contractPipeline/goal.js +0 -10
  329. package/dist/shared/types/contractPipeline/goal.js.map +0 -1
  330. package/dist/shared/types/contractPipeline/implementation.d.ts +0 -118
  331. package/dist/shared/types/contractPipeline/implementation.d.ts.map +0 -1
  332. package/dist/shared/types/contractPipeline/implementation.js +0 -13
  333. package/dist/shared/types/contractPipeline/implementation.js.map +0 -1
  334. package/dist/shared/types/contractPipeline/obligations.d.ts +0 -283
  335. package/dist/shared/types/contractPipeline/obligations.d.ts.map +0 -1
  336. package/dist/shared/types/contractPipeline/obligations.js +0 -84
  337. package/dist/shared/types/contractPipeline/obligations.js.map +0 -1
  338. package/dist/shared/types/contractPipeline/verification.d.ts.map +0 -1
  339. package/dist/shared/types/contractPipeline/verification.js +0 -10
  340. package/dist/shared/types/contractPipeline/verification.js.map +0 -1
  341. package/dist/shared/types/contractPipeline.d.ts +0 -48
  342. package/dist/shared/types/contractPipeline.d.ts.map +0 -1
  343. package/dist/shared/types/contractPipeline.js +0 -32
  344. package/dist/shared/types/contractPipeline.js.map +0 -1
  345. package/dist/shared/types/obligationLedger.d.ts +0 -39
  346. package/dist/shared/types/obligationLedger.d.ts.map +0 -1
  347. package/dist/shared/types/obligationLedger.js +0 -49
  348. package/dist/shared/types/obligationLedger.js.map +0 -1
@@ -1,283 +0,0 @@
1
- import { z } from "zod";
2
- /**
3
- * Contract-pipeline artifact: obligations phase.
4
- *
5
- * ObligationLedger — implementation obligations derived from the design.
6
- * TestValidatorPlan — pre-code test specs derived from ledger obligations.
7
- * ContractAssessmentReport — invariant/boundary/obligation assessment.
8
- * CounterexampleReport — adversarial critic output.
9
- * JudgeReport — adversarial judge verdict on counterexamples.
10
- */
11
- export declare const CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION: "remediate-code-contract-pipeline/obligation-ledger/v1alpha1";
12
- export declare const CONTRACT_PIPELINE_TEST_VALIDATOR_PLAN_VERSION: "remediate-code-contract-pipeline/test-validator-plan/v1alpha1";
13
- export declare const CONTRACT_PIPELINE_CONTRACT_ASSESSMENT_REPORT_VERSION: "remediate-code-contract-pipeline/contract-assessment-report/v1alpha1";
14
- export declare const CONTRACT_PIPELINE_COUNTEREXAMPLE_VERSION: "remediate-code-contract-pipeline/counterexample/v1alpha1";
15
- export declare const CONTRACT_PIPELINE_JUDGE_REPORT_VERSION: "remediate-code-contract-pipeline/judge-report/v1alpha1";
16
- /**
17
- * Change-vs-addition classification for one obligation (DC-5 / CE-013).
18
- *
19
- * Whether an obligation *changes existing behavior* or *adds new behavior*
20
- * decides its test burden: a behavior CHANGE must be covered by a PAIRED
21
- * positive+negative test spec whose negative is scoped to the changed
22
- * symbol/file (so a regression is caught), whereas a pure ADDITION has no prior
23
- * behavior to regress and is never forced to pair.
24
- *
25
- * The verdict is reached deterministically FIRST — `touches_existing_symbol`
26
- * means the obligation references a symbol/file that already exists in the
27
- * baseline corpus — and an LLM may then CONFIRM or OVERRIDE it. The method is
28
- * recorded on `determined_by` so the classification is never silent (the
29
- * "deterministic by default; LLM only for judgment — bounded and recorded"
30
- * invariant).
31
- */
32
- export interface ObligationChangeClassification {
33
- /** A `change` touches prior behavior (→ paired test); an `addition` does not. */
34
- change_kind: "change" | "addition";
35
- /**
36
- * Existing symbol/file tokens the change touches. These are the scope anchors
37
- * a paired negative assertion must name — an unscoped, repo-wide negative
38
- * (CE-006) is rejected because it matches none of them. Empty for an addition.
39
- */
40
- touched_symbols: string[];
41
- /**
42
- * How the verdict was reached. The deterministic heuristic runs first; an LLM
43
- * confirmation/override (when present) is recorded here, never discarded.
44
- */
45
- determined_by: "touches_existing_symbol" | "no_existing_symbol" | "llm_confirmed" | "llm_override";
46
- /** Recorded rationale when an LLM confirmed or overrode the deterministic call. */
47
- rationale?: string;
48
- }
49
- /** One implementation obligation derived from the design. */
50
- export interface ObligationEntry {
51
- id: string;
52
- description: string;
53
- kind: "invariant" | "behavioral" | "structural" | "test";
54
- /** Obligation IDs that must be satisfied before this one. */
55
- depends_on: string[];
56
- /** Current status of this obligation. */
57
- status: "pending" | "satisfied" | "failed";
58
- /** Lower value = higher priority; enables first-class scheduling. */
59
- priority?: number;
60
- /** Traceability: where this obligation originated. */
61
- source?: "design_spec" | "critique" | "counterexample" | "manual";
62
- /**
63
- * The finalized module this obligation belongs to (design_spec-sourced
64
- * obligations only). Lets the implementation-DAG scaffold group a module's
65
- * obligations into ONE node by construction — a 1-module change derives 1
66
- * node instead of N (B2) — without the host having to merge. Absent on
67
- * obligations with no module home (e.g. counterexample/critique-sourced),
68
- * which fall back to one node each.
69
- */
70
- module?: string;
71
- /**
72
- * DC-5: change-vs-addition classification. Present on testable
73
- * (invariant/behavioral) obligations the deriver classified; absent on
74
- * structural obligations (no test burden) and on obligations from sources
75
- * that predate the classifier. The paired-test gate treats an *unclassified*
76
- * testable obligation as a CHANGE (fail-closed): pairing is only relaxed when
77
- * an obligation is explicitly classified as an addition.
78
- */
79
- change_classification?: ObligationChangeClassification;
80
- }
81
- export interface ObligationLedger {
82
- contract_version: typeof CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION;
83
- goal_id: string;
84
- obligations: ObligationEntry[];
85
- /** ISO-8601 timestamp when this ledger was created. */
86
- created_at: string;
87
- }
88
- /**
89
- * One test spec derived from a ledger obligation, to be created before code.
90
- *
91
- * Two shapes. A spec that tests its obligation carries a `kind` and at least one
92
- * assertion. A spec that DISPUTES its obligation carries an `inapplicable_claim`
93
- * instead, and needs no kind and no assertions: there is no test to describe.
94
- */
95
- export type TestSpec = ApplicableTestSpec | InapplicableTestSpec;
96
- interface TestSpecIdentity {
97
- /** The obligation ID from the ObligationLedger this test spec covers. */
98
- obligation_id: string;
99
- /** Short name for this test. */
100
- name: string;
101
- }
102
- interface ApplicableTestSpec extends TestSpecIdentity {
103
- /** Kind of test. */
104
- kind: "unit" | "integration" | "schema" | "invariant" | "e2e";
105
- /** Concrete, falsifiable assertion strings for this test. Must be non-empty. */
106
- assertions: string[];
107
- inapplicable_claim?: undefined;
108
- }
109
- interface InapplicableTestSpec extends TestSpecIdentity {
110
- kind?: ApplicableTestSpec["kind"];
111
- assertions?: string[];
112
- /**
113
- * Declares this test inapplicable. The claim must cite the specific
114
- * obligation ID and provide a falsifiable reason checkable against the
115
- * ledger — bare rationale is insufficient.
116
- */
117
- inapplicable_claim: {
118
- /** The obligation ID this claim disputes (must match obligation_id above). */
119
- obligation_id: string;
120
- /** Falsifiable reason why this test is inapplicable per the ledger. */
121
- reason: string;
122
- };
123
- }
124
- /**
125
- * Pre-code test specification plan: converts ledger obligations into concrete
126
- * test specs, validators, and schemas BEFORE any implementation begins.
127
- */
128
- export interface TestValidatorPlan {
129
- contract_version: typeof CONTRACT_PIPELINE_TEST_VALIDATOR_PLAN_VERSION;
130
- goal_id: string;
131
- test_specs: TestSpec[];
132
- /** ISO-8601 timestamp when this plan was created. */
133
- created_at: string;
134
- }
135
- /** Invariant/boundary/obligation assessment of the design spec. */
136
- export interface ContractAssessmentFinding {
137
- obligation_id: string;
138
- status: "satisfied" | "violated" | "uncertain";
139
- evidence: string[];
140
- rationale: string;
141
- }
142
- export interface ContractAssessmentReport {
143
- contract_version: typeof CONTRACT_PIPELINE_CONTRACT_ASSESSMENT_REPORT_VERSION;
144
- goal_id: string;
145
- findings: ContractAssessmentFinding[];
146
- /** Overall pass/fail verdict for the contract assessment. */
147
- verdict: "passed" | "failed" | "partial";
148
- /** ISO-8601 timestamp when this report was created. */
149
- created_at: string;
150
- }
151
- /** A concrete example produced by the adversarial critic that falsifies a design claim. */
152
- export declare const CounterexampleSchema: z.ZodObject<{
153
- id: z.ZodString;
154
- claim: z.ZodString;
155
- reproduction_steps: z.ZodArray<z.ZodString, "many">;
156
- expected: z.ZodString;
157
- actual: z.ZodString;
158
- violated_obligation_ids: z.ZodArray<z.ZodString, "many">;
159
- }, "strip", z.ZodTypeAny, {
160
- expected: string;
161
- id: string;
162
- claim: string;
163
- reproduction_steps: string[];
164
- actual: string;
165
- violated_obligation_ids: string[];
166
- }, {
167
- expected: string;
168
- id: string;
169
- claim: string;
170
- reproduction_steps: string[];
171
- actual: string;
172
- violated_obligation_ids: string[];
173
- }>;
174
- export type Counterexample = z.infer<typeof CounterexampleSchema>;
175
- /** The critic phase's output artifact: all counterexamples found against the design. */
176
- export interface CounterexampleReport {
177
- contract_version: typeof CONTRACT_PIPELINE_COUNTEREXAMPLE_VERSION;
178
- goal_id: string;
179
- /** Empty when the critic found no way to falsify the design. */
180
- counterexamples: Counterexample[];
181
- /** ISO-8601 timestamp when this report was created. */
182
- created_at: string;
183
- }
184
- /** Judge classification of one counterexample. */
185
- export type CounterexampleClassification = "accepted" | "out_of_scope" | "duplicate" | "invalid" | "residual_risk";
186
- export interface JudgedCounterexample {
187
- counterexample_id: string;
188
- classification: CounterexampleClassification;
189
- rationale: string;
190
- }
191
- /**
192
- * `judge_report.repair_directive.target` — the artifacts a repair may name.
193
- *
194
- * DECLARED HERE, in `src/shared`, because this module is the base layer and the
195
- * type below derives from it: `src/shared` must not import an orchestrator, and
196
- * a declaration living in `src/remediate` was exactly that. The remediate side
197
- * re-exports these through `contractPipeline/sketchSource.ts`, so the validator
198
- * and every prompt sketch still read them from there.
199
- *
200
- * `design_spec` is the PRE-REDESIGN name for what `finalized_module_contracts`
201
- * holds, and it stays here on purpose: the validator has a named back-compat
202
- * test for it, and a judge report written by an older release must still be
203
- * admissible. It is NOT offered in the prompt sketch
204
- * ({@link CONTRACT_REPAIR_TARGETS_OFFERED}), because no new report should be
205
- * authored against a name the repair loop normalizes away — the asymmetry is
206
- * the same accept-legacy / emit-current split the store's version policy uses.
207
- *
208
- * `counterexample` is NOT a member. The judge rules on the critic's report, so
209
- * it cannot order that report rewritten, and the repair loop can regenerate only
210
- * the declared owning contract artifacts. It was admitted once and then swapped for an
211
- * inferred target in silence; the validator now refuses it with that reason.
212
- */
213
- export declare const CONTRACT_REPAIR_TARGETS: readonly ["module_decomposition", "finalized_module_contracts", "obligation_ledger", "contract_assessment_report", "design_spec"];
214
- /**
215
- * The values a validator still ACCEPTS but no sketch OFFERS — the
216
- * accept-legacy / emit-current split, declared as data.
217
- *
218
- * Why it is a declaration rather than an `offeredExclusions` entry in the drift
219
- * test. The exclusion WAS declared in the test, and that is exactly the shape
220
- * this vocabulary bans: a hand-kept list that has to be edited in lockstep with
221
- * the declaration it describes. The test's own `CONTRACT_REPAIR_TARGETS_OFFERED`
222
- * import made the drift worse — the SKETCH's offered set and the TEST's expected
223
- * offered set came from one expression, so a target quietly dropped from the
224
- * offered set would move both sides together and stay green.
225
- *
226
- * Single-sourced instead: the offered set is {@link CONTRACT_REPAIR_TARGETS}
227
- * minus THIS list, the sketch renders that set, and the drift test derives its
228
- * expectation from the same subtraction. A new legacy alias is one entry here
229
- * and nothing else moves.
230
- */
231
- export declare const CONTRACT_REPAIR_TARGETS_LEGACY: readonly ["design_spec"];
232
- /**
233
- * The subset a prompt OFFERS: everything admissible except the legacy aliases.
234
- *
235
- * Derived, not a second list — the live targets are
236
- * {@link CONTRACT_REPAIR_TARGETS_LEGACY}'s complement in
237
- * {@link CONTRACT_REPAIR_TARGETS}, so adding a target adds it to the sketch
238
- * automatically and removing one cannot leave a stale alternation behind.
239
- */
240
- export declare const CONTRACT_REPAIR_TARGETS_OFFERED: ("design_spec" | "module_decomposition" | "finalized_module_contracts" | "obligation_ledger" | "contract_assessment_report")[];
241
- /**
242
- * Contract artifacts the judge may order regenerated — DERIVED from the one
243
- * declaration above, which the validator and every prompt sketch also read.
244
- * Restating the members on the type is how it came to disagree with the
245
- * validator once already: the sketch offered three, the validator four, and the
246
- * type a third set.
247
- *
248
- * `finalized_module_contracts` is the post-redesign name for what `design_spec`
249
- * used to hold, and the three non-legacy members are exactly the artifacts a
250
- * repair can regenerate.
251
- *
252
- * A `design_spec` directive is ADMITTED by the validator (back-compat) but is
253
- * not a repair order the loop acts on: it falls through to
254
- * `inferRepairDirective` (`contractPipeline.ts`) rather than being normalized
255
- * onto `finalized_module_contracts`.
256
- */
257
- export type JudgeRepairTarget = (typeof CONTRACT_REPAIR_TARGETS)[number];
258
- /** On a failing verdict, the single targeted repair the loop performs next. */
259
- export interface JudgeRepairDirective {
260
- target: JudgeRepairTarget;
261
- /** Bounded instruction for the regeneration worker. */
262
- instruction: string;
263
- }
264
- /** Adversarial judge verdict on the critic's counterexamples. */
265
- export interface JudgeReport {
266
- contract_version: typeof CONTRACT_PIPELINE_JUDGE_REPORT_VERSION;
267
- goal_id: string;
268
- /**
269
- * `approved` when no accepted counterexample demands a contract repair
270
- * (residual risks may remain, recorded in `classifications`); `needs_repair`
271
- * when at least one accepted counterexample requires regenerating a contract
272
- * artifact before implementation planning.
273
- */
274
- verdict: "approved" | "needs_repair";
275
- /** One classification per critic counterexample. */
276
- classifications: JudgedCounterexample[];
277
- /** Required when verdict is `needs_repair`; names the artifact to regenerate. */
278
- repair_directive?: JudgeRepairDirective;
279
- /** ISO-8601 timestamp when this report was created. */
280
- created_at: string;
281
- }
282
- export {};
283
- //# sourceMappingURL=obligations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"obligations.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/contractPipeline/obligations.ts"],"names":[],"mappings":"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"}
@@ -1,84 +0,0 @@
1
- import { z } from "zod";
2
- // sites-pinned: tests/remediate/step-prompt-sketch-drift.test.ts, tests/remediate/contract-pipeline.test.ts
3
- /**
4
- * Contract-pipeline artifact: obligations phase.
5
- *
6
- * ObligationLedger — implementation obligations derived from the design.
7
- * TestValidatorPlan — pre-code test specs derived from ledger obligations.
8
- * ContractAssessmentReport — invariant/boundary/obligation assessment.
9
- * CounterexampleReport — adversarial critic output.
10
- * JudgeReport — adversarial judge verdict on counterexamples.
11
- */
12
- // ── Version constants ────────────────────────────────────────────────────────
13
- export const CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION = "remediate-code-contract-pipeline/obligation-ledger/v1alpha1";
14
- export const CONTRACT_PIPELINE_TEST_VALIDATOR_PLAN_VERSION = "remediate-code-contract-pipeline/test-validator-plan/v1alpha1";
15
- export const CONTRACT_PIPELINE_CONTRACT_ASSESSMENT_REPORT_VERSION = "remediate-code-contract-pipeline/contract-assessment-report/v1alpha1";
16
- export const CONTRACT_PIPELINE_COUNTEREXAMPLE_VERSION = "remediate-code-contract-pipeline/counterexample/v1alpha1";
17
- export const CONTRACT_PIPELINE_JUDGE_REPORT_VERSION = "remediate-code-contract-pipeline/judge-report/v1alpha1";
18
- // ── Counterexample ────────────────────────────────────────────────────────────
19
- /** A concrete example produced by the adversarial critic that falsifies a design claim. */
20
- export const CounterexampleSchema = z.object({
21
- id: z.string().min(1),
22
- claim: z.string().min(1),
23
- reproduction_steps: z.array(z.string()),
24
- expected: z.string().min(1),
25
- actual: z.string().min(1),
26
- violated_obligation_ids: z.array(z.string()),
27
- });
28
- /**
29
- * `judge_report.repair_directive.target` — the artifacts a repair may name.
30
- *
31
- * DECLARED HERE, in `src/shared`, because this module is the base layer and the
32
- * type below derives from it: `src/shared` must not import an orchestrator, and
33
- * a declaration living in `src/remediate` was exactly that. The remediate side
34
- * re-exports these through `contractPipeline/sketchSource.ts`, so the validator
35
- * and every prompt sketch still read them from there.
36
- *
37
- * `design_spec` is the PRE-REDESIGN name for what `finalized_module_contracts`
38
- * holds, and it stays here on purpose: the validator has a named back-compat
39
- * test for it, and a judge report written by an older release must still be
40
- * admissible. It is NOT offered in the prompt sketch
41
- * ({@link CONTRACT_REPAIR_TARGETS_OFFERED}), because no new report should be
42
- * authored against a name the repair loop normalizes away — the asymmetry is
43
- * the same accept-legacy / emit-current split the store's version policy uses.
44
- *
45
- * `counterexample` is NOT a member. The judge rules on the critic's report, so
46
- * it cannot order that report rewritten, and the repair loop can regenerate only
47
- * the declared owning contract artifacts. It was admitted once and then swapped for an
48
- * inferred target in silence; the validator now refuses it with that reason.
49
- */
50
- export const CONTRACT_REPAIR_TARGETS = [
51
- "module_decomposition",
52
- "finalized_module_contracts",
53
- "obligation_ledger",
54
- "contract_assessment_report",
55
- "design_spec",
56
- ];
57
- /**
58
- * The values a validator still ACCEPTS but no sketch OFFERS — the
59
- * accept-legacy / emit-current split, declared as data.
60
- *
61
- * Why it is a declaration rather than an `offeredExclusions` entry in the drift
62
- * test. The exclusion WAS declared in the test, and that is exactly the shape
63
- * this vocabulary bans: a hand-kept list that has to be edited in lockstep with
64
- * the declaration it describes. The test's own `CONTRACT_REPAIR_TARGETS_OFFERED`
65
- * import made the drift worse — the SKETCH's offered set and the TEST's expected
66
- * offered set came from one expression, so a target quietly dropped from the
67
- * offered set would move both sides together and stay green.
68
- *
69
- * Single-sourced instead: the offered set is {@link CONTRACT_REPAIR_TARGETS}
70
- * minus THIS list, the sketch renders that set, and the drift test derives its
71
- * expectation from the same subtraction. A new legacy alias is one entry here
72
- * and nothing else moves.
73
- */
74
- export const CONTRACT_REPAIR_TARGETS_LEGACY = ["design_spec"];
75
- /**
76
- * The subset a prompt OFFERS: everything admissible except the legacy aliases.
77
- *
78
- * Derived, not a second list — the live targets are
79
- * {@link CONTRACT_REPAIR_TARGETS_LEGACY}'s complement in
80
- * {@link CONTRACT_REPAIR_TARGETS}, so adding a target adds it to the sketch
81
- * automatically and removing one cannot leave a stale alternation behind.
82
- */
83
- export const CONTRACT_REPAIR_TARGETS_OFFERED = CONTRACT_REPAIR_TARGETS.filter((target) => !CONTRACT_REPAIR_TARGETS_LEGACY.includes(target));
84
- //# sourceMappingURL=obligations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"obligations.js","sourceRoot":"","sources":["../../../../src/shared/types/contractPipeline/obligations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,4GAA4G;AAC5G;;;;;;;;GAQG;AAEH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,2CAA2C,GACtD,6DAAsE,CAAC;AAEzE,MAAM,CAAC,MAAM,6CAA6C,GACxD,+DAAwE,CAAC;AAE3E,MAAM,CAAC,MAAM,oDAAoD,GAC/D,sEAA+E,CAAC;AAElF,MAAM,CAAC,MAAM,wCAAwC,GACnD,0DAAmE,CAAC;AAEtE,MAAM,CAAC,MAAM,sCAAsC,GACjD,wDAAiE,CAAC;AA6JpE,iFAAiF;AAEjF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,kBAAkB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,uBAAuB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAC7C,CAAC,CAAC;AA6BH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,sBAAsB;IACtB,4BAA4B;IAC5B,mBAAmB;IACnB,4BAA4B;IAC5B,aAAa;CACL,CAAC;AAEX;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,aAAa,CAAU,CAAC;AAEvE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,uBAAuB,CAAC,MAAM,CAC3E,CAAC,MAAM,EAAE,EAAE,CACT,CAAE,8BAAoD,CAAC,QAAQ,CAAC,MAAM,CAAC,CAC1E,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"verification.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/contractPipeline/verification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,6CAA6C,EACxD,6CAAsD,CAAC;AAEzD,eAAO,MAAM,0CAA0C,EACrD,4DAAqE,CAAC;AAIxE,sEAAsE;AACtE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EACA,aAAa,GACb,WAAW,GACX,gBAAgB,GAChB,MAAM,GACN,MAAM,GACN,SAAS,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,sBAAsB,EAAE,CAAC;IACjC,cAAc,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,EAAE,OAAO,6CAA6C,CAAC;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,QAAQ,EAAE,wBAAwB,EAAE,CAAC;IACrC,2EAA2E;IAC3E,cAAc,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACpC,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,0DAA0D;AAC1D,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;AAEpE,kEAAkE;AAClE,MAAM,WAAW,SAAS;IACxB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,IAAI,EAAE,QAAQ,CAAC;IACf,+EAA+E;IAC/E,gBAAgB,EAAE,MAAM,CAAC;IACzB,2DAA2D;IAC3D,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,qDAAqD;IACrD,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mFAAmF;IACnF,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,yEAAyE;AACzE,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,EAAE,OAAO,0CAA0C,CAAC;IACpE,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,oDAAoD;IACpD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB"}
@@ -1,10 +0,0 @@
1
- /**
2
- * Contract-pipeline artifact: verification phase.
3
- *
4
- * VerificationReport — per-finding verification traces and overall verdict.
5
- * SeamNegotiationRecord — multi-agent seam negotiation record.
6
- */
7
- // ── Version constants ────────────────────────────────────────────────────────
8
- export const CONTRACT_PIPELINE_VERIFICATION_REPORT_VERSION = "remediate-code-verification-report/v1alpha1";
9
- export const CONTRACT_PIPELINE_SEAM_NEGOTIATION_VERSION = "remediate-code-contract-pipeline/seam-negotiation/v1alpha1";
10
- //# sourceMappingURL=verification.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verification.js","sourceRoot":"","sources":["../../../../src/shared/types/contractPipeline/verification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,gFAAgF;AAEhF,MAAM,CAAC,MAAM,6CAA6C,GACxD,6CAAsD,CAAC;AAEzD,MAAM,CAAC,MAAM,0CAA0C,GACrD,4DAAqE,CAAC"}
@@ -1,48 +0,0 @@
1
- /**
2
- * Contract-pipeline artifact contracts. These represent the bounded roles of
3
- * the contract-driven implementation pipeline used by remediate-code for
4
- * free-form feature/change requests that flow through the full
5
- * goal→context→design→critique→obligations→assessment→critic→judge→
6
- * implementation DAG before producing a remediation plan.
7
- *
8
- * Each artifact carries a `contract_version` field that must match the
9
- * exported constant so callers can detect version skew without reading the
10
- * payload.
11
- *
12
- * This file is a barrel re-export. The implementation is split by pipeline
13
- * phase for navigability:
14
- *
15
- * contractPipeline/goal.ts — GoalSpec, ContextBundle
16
- * contractPipeline/design.ts — DesignSpec, ConceptualDesignCritique
17
- * contractPipeline/obligations.ts — ObligationLedger, TestValidatorPlan,
18
- * ContractAssessmentReport,
19
- * CounterexampleReport, JudgeReport
20
- * contractPipeline/implementation.ts — ImplementationDAG
21
- * contractPipeline/verification.ts — VerificationReport, SeamNegotiationRecord
22
- *
23
- * Add new artifact types to the appropriate phase file, or create a new phase
24
- * file if the artifact belongs to a new pipeline stage.
25
- */
26
- export { CONTRACT_PIPELINE_GOAL_SPEC_VERSION, CONTRACT_PIPELINE_CONTEXT_BUNDLE_VERSION, } from "./contractPipeline/goal.js";
27
- export type { GoalSpec, ContextBundleEntry, ContextBundle } from "./contractPipeline/goal.js";
28
- export { CONTRACT_PIPELINE_DESIGN_SPEC_VERSION, CONTRACT_PIPELINE_CONCEPTUAL_DESIGN_CRITIQUE_VERSION, } from "./contractPipeline/design.js";
29
- export type { DesignSpecInvariant, DesignSpecModule, DesignSpecSideEffect, DesignSpecExternalDependency, DesignSpecTrustBoundary, DesignSpec, DesignCritiqueItem, ConceptualDesignCritique, } from "./contractPipeline/design.js";
30
- export { CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION, CONTRACT_PIPELINE_TEST_VALIDATOR_PLAN_VERSION, CONTRACT_PIPELINE_CONTRACT_ASSESSMENT_REPORT_VERSION, CONTRACT_PIPELINE_COUNTEREXAMPLE_VERSION, CONTRACT_PIPELINE_JUDGE_REPORT_VERSION, } from "./contractPipeline/obligations.js";
31
- export type { ObligationChangeClassification, ObligationEntry, ObligationLedger, TestSpec, TestValidatorPlan, ContractAssessmentFinding, ContractAssessmentReport, Counterexample, CounterexampleReport, CounterexampleClassification, JudgedCounterexample, JudgeRepairTarget, JudgeRepairDirective, JudgeReport, } from "./contractPipeline/obligations.js";
32
- export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "./contractPipeline/obligations.js";
33
- export { CONTRACT_PIPELINE_IMPLEMENTATION_DAG_VERSION } from "./contractPipeline/implementation.js";
34
- import type { ImplementationDAGNode as BaseImplementationDAGNode, ImplementationDAG as BaseImplementationDAG } from "./contractPipeline/implementation.js";
35
- export type { ImplementationDAGEdge } from "./contractPipeline/implementation.js";
36
- /**
37
- * Audit-origin trace carried by Path-A DAG nodes. These ids retain canonical
38
- * report membership through planning; the DAG node id remains trace metadata.
39
- */
40
- export type ImplementationDAGNode = BaseImplementationDAGNode & {
41
- source_finding_ids?: string[];
42
- };
43
- export type ImplementationDAG = Omit<BaseImplementationDAG, "nodes"> & {
44
- nodes: ImplementationDAGNode[];
45
- };
46
- export { CONTRACT_PIPELINE_VERIFICATION_REPORT_VERSION, CONTRACT_PIPELINE_SEAM_NEGOTIATION_VERSION, } from "./contractPipeline/verification.js";
47
- export type { VerificationTraceEntry, FindingVerificationTrace, VerificationReport, SeamRole, AgentSeam, SeamNegotiationRecord, } from "./contractPipeline/verification.js";
48
- //# sourceMappingURL=contractPipeline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contractPipeline.d.ts","sourceRoot":"","sources":["../../../src/shared/types/contractPipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE9F,OAAO,EACL,qCAAqC,EACrC,oDAAoD,GACrD,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,2CAA2C,EAC3C,6CAA6C,EAC7C,oDAAoD,EACpD,wCAAwC,EACxC,sCAAsC,GACvC,MAAM,mCAAmC,CAAC;AAC3C,YAAY,EACV,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,cAAc,EACd,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,GACZ,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,4CAA4C,EAAE,MAAM,sCAAsC,CAAC;AACpG,OAAO,KAAK,EACV,qBAAqB,IAAI,yBAAyB,EAClD,iBAAiB,IAAI,qBAAqB,EAC3C,MAAM,sCAAsC,CAAC;AAC9C,YAAY,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAElF;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,yBAAyB,GAAG;IAC9D,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,GAAG;IACrE,KAAK,EAAE,qBAAqB,EAAE,CAAC;CAChC,CAAC;AAEF,OAAO,EACL,6CAA6C,EAC7C,0CAA0C,GAC3C,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,EAClB,QAAQ,EACR,SAAS,EACT,qBAAqB,GACtB,MAAM,oCAAoC,CAAC"}
@@ -1,32 +0,0 @@
1
- /**
2
- * Contract-pipeline artifact contracts. These represent the bounded roles of
3
- * the contract-driven implementation pipeline used by remediate-code for
4
- * free-form feature/change requests that flow through the full
5
- * goal→context→design→critique→obligations→assessment→critic→judge→
6
- * implementation DAG before producing a remediation plan.
7
- *
8
- * Each artifact carries a `contract_version` field that must match the
9
- * exported constant so callers can detect version skew without reading the
10
- * payload.
11
- *
12
- * This file is a barrel re-export. The implementation is split by pipeline
13
- * phase for navigability:
14
- *
15
- * contractPipeline/goal.ts — GoalSpec, ContextBundle
16
- * contractPipeline/design.ts — DesignSpec, ConceptualDesignCritique
17
- * contractPipeline/obligations.ts — ObligationLedger, TestValidatorPlan,
18
- * ContractAssessmentReport,
19
- * CounterexampleReport, JudgeReport
20
- * contractPipeline/implementation.ts — ImplementationDAG
21
- * contractPipeline/verification.ts — VerificationReport, SeamNegotiationRecord
22
- *
23
- * Add new artifact types to the appropriate phase file, or create a new phase
24
- * file if the artifact belongs to a new pipeline stage.
25
- */
26
- export { CONTRACT_PIPELINE_GOAL_SPEC_VERSION, CONTRACT_PIPELINE_CONTEXT_BUNDLE_VERSION, } from "./contractPipeline/goal.js";
27
- export { CONTRACT_PIPELINE_DESIGN_SPEC_VERSION, CONTRACT_PIPELINE_CONCEPTUAL_DESIGN_CRITIQUE_VERSION, } from "./contractPipeline/design.js";
28
- export { CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION, CONTRACT_PIPELINE_TEST_VALIDATOR_PLAN_VERSION, CONTRACT_PIPELINE_CONTRACT_ASSESSMENT_REPORT_VERSION, CONTRACT_PIPELINE_COUNTEREXAMPLE_VERSION, CONTRACT_PIPELINE_JUDGE_REPORT_VERSION, } from "./contractPipeline/obligations.js";
29
- export { CONTRACT_REPAIR_TARGETS, CONTRACT_REPAIR_TARGETS_LEGACY, CONTRACT_REPAIR_TARGETS_OFFERED, } from "./contractPipeline/obligations.js";
30
- export { CONTRACT_PIPELINE_IMPLEMENTATION_DAG_VERSION } from "./contractPipeline/implementation.js";
31
- export { CONTRACT_PIPELINE_VERIFICATION_REPORT_VERSION, CONTRACT_PIPELINE_SEAM_NEGOTIATION_VERSION, } from "./contractPipeline/verification.js";
32
- //# sourceMappingURL=contractPipeline.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"contractPipeline.js","sourceRoot":"","sources":["../../../src/shared/types/contractPipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EACL,mCAAmC,EACnC,wCAAwC,GACzC,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EACL,qCAAqC,EACrC,oDAAoD,GACrD,MAAM,8BAA8B,CAAC;AAYtC,OAAO,EACL,2CAA2C,EAC3C,6CAA6C,EAC7C,oDAAoD,EACpD,wCAAwC,EACxC,sCAAsC,GACvC,MAAM,mCAAmC,CAAC;AAiB3C,OAAO,EACL,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,GAChC,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,4CAA4C,EAAE,MAAM,sCAAsC,CAAC;AAmBpG,OAAO,EACL,6CAA6C,EAC7C,0CAA0C,GAC3C,MAAM,oCAAoC,CAAC"}
@@ -1,39 +0,0 @@
1
- /**
2
- * Obligation ledger construction utilities with cycle detection.
3
- *
4
- * INV-shared-core-07: ObligationEntry.depends_on must be cycle-checked at
5
- * construction time — not deferred to scheduling. This module provides
6
- * `buildObligationLedger()` which validates the DAG and throws immediately
7
- * if a dependency cycle is present.
8
- */
9
- import type { ObligationEntry, ObligationLedger } from "./contractPipeline.js";
10
- /**
11
- * Detect cycles in an obligation dependency graph. Returns the IDs of
12
- * obligations forming the first cycle detected as a witness path with its start
13
- * repeated at the end (`["A","B","A"]`), or null when the graph is acyclic.
14
- *
15
- * A thin draw over the shared directed-cycle core: an obligation that depends
16
- * on ITSELF is a cycle here (self-loops included), and dependencies naming an
17
- * id outside the ledger are external references the core ignores.
18
- *
19
- * INV-shared-core-07: called at construction time so a cycle is caught early
20
- * rather than causing an infinite loop or confusing error at scheduling time.
21
- */
22
- export declare function detectObligationCycle(obligations: readonly ObligationEntry[]): string[] | null;
23
- export interface BuildObligationLedgerOptions {
24
- goal_id: string;
25
- obligations: ObligationEntry[];
26
- created_at?: string;
27
- }
28
- /**
29
- * Build a validated ObligationLedger.
30
- *
31
- * Validates the dependency graph for cycles at construction time and throws
32
- * a descriptive error if any cycle is detected. This enforces
33
- * INV-shared-core-07: callers cannot produce a ledger with a cyclic
34
- * depends_on graph — the error is immediate, not deferred to scheduling.
35
- *
36
- * @throws {Error} when a depends_on cycle is detected among the obligations.
37
- */
38
- export declare function buildObligationLedger(options: BuildObligationLedgerOptions): ObligationLedger;
39
- //# sourceMappingURL=obligationLedger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"obligationLedger.d.ts","sourceRoot":"","sources":["../../../src/shared/types/obligationLedger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,eAAe,EACf,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAM/B;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,SAAS,eAAe,EAAE,GACtC,MAAM,EAAE,GAAG,IAAI,CAEjB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,4BAA4B,GACpC,gBAAgB,CAgBlB"}
@@ -1,49 +0,0 @@
1
- /**
2
- * Obligation ledger construction utilities with cycle detection.
3
- *
4
- * INV-shared-core-07: ObligationEntry.depends_on must be cycle-checked at
5
- * construction time — not deferred to scheduling. This module provides
6
- * `buildObligationLedger()` which validates the DAG and throws immediately
7
- * if a dependency cycle is present.
8
- */
9
- import { CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION, } from "./contractPipeline.js";
10
- import { findFirstCycleWitness } from "../graph/directedCycles.js";
11
- /**
12
- * Detect cycles in an obligation dependency graph. Returns the IDs of
13
- * obligations forming the first cycle detected as a witness path with its start
14
- * repeated at the end (`["A","B","A"]`), or null when the graph is acyclic.
15
- *
16
- * A thin draw over the shared directed-cycle core: an obligation that depends
17
- * on ITSELF is a cycle here (self-loops included), and dependencies naming an
18
- * id outside the ledger are external references the core ignores.
19
- *
20
- * INV-shared-core-07: called at construction time so a cycle is caught early
21
- * rather than causing an infinite loop or confusing error at scheduling time.
22
- */
23
- export function detectObligationCycle(obligations) {
24
- return findFirstCycleWitness(obligations, { includeSelfLoops: true });
25
- }
26
- /**
27
- * Build a validated ObligationLedger.
28
- *
29
- * Validates the dependency graph for cycles at construction time and throws
30
- * a descriptive error if any cycle is detected. This enforces
31
- * INV-shared-core-07: callers cannot produce a ledger with a cyclic
32
- * depends_on graph — the error is immediate, not deferred to scheduling.
33
- *
34
- * @throws {Error} when a depends_on cycle is detected among the obligations.
35
- */
36
- export function buildObligationLedger(options) {
37
- const { goal_id, obligations, created_at } = options;
38
- const cycle = detectObligationCycle(obligations);
39
- if (cycle) {
40
- throw new Error(`ObligationLedger construction rejected: dependency cycle detected among obligations: ${cycle.join(" → ")}`);
41
- }
42
- return {
43
- contract_version: CONTRACT_PIPELINE_OBLIGATION_LEDGER_VERSION,
44
- goal_id,
45
- obligations,
46
- created_at: created_at ?? new Date().toISOString(),
47
- };
48
- }
49
- //# sourceMappingURL=obligationLedger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"obligationLedger.js","sourceRoot":"","sources":["../../../src/shared/types/obligationLedger.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EACL,2CAA2C,GAC5C,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CACnC,WAAuC;IAEvC,OAAO,qBAAqB,CAAC,WAAW,EAAE,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;AACxE,CAAC;AAQD;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAqC;IAErC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,KAAK,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACjD,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,wFAAwF,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAC5G,CAAC;IACJ,CAAC;IAED,OAAO;QACL,gBAAgB,EAAE,2CAA2C;QAC7D,OAAO;QACP,WAAW;QACX,UAAU,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACnD,CAAC;AACJ,CAAC"}