audit-tools 0.51.7 → 0.51.9

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 (665) hide show
  1. package/dist/audit/clarification/blastRadius.d.ts +17 -16
  2. package/dist/audit/clarification/blastRadius.d.ts.map +1 -1
  3. package/dist/audit/clarification/blastRadius.js +48 -44
  4. package/dist/audit/clarification/blastRadius.js.map +1 -1
  5. package/dist/audit/clarification/dials.d.ts +4 -4
  6. package/dist/audit/clarification/dials.d.ts.map +1 -1
  7. package/dist/audit/clarification/dials.js +1 -0
  8. package/dist/audit/clarification/dials.js.map +1 -1
  9. package/dist/audit/clarification/partition.d.ts +12 -21
  10. package/dist/audit/clarification/partition.d.ts.map +1 -1
  11. package/dist/audit/clarification/partition.js +52 -59
  12. package/dist/audit/clarification/partition.js.map +1 -1
  13. package/dist/audit/clarification/riskGate.d.ts +2 -2
  14. package/dist/audit/clarification/riskGate.d.ts.map +1 -1
  15. package/dist/audit/clarification/riskGate.js +1 -0
  16. package/dist/audit/clarification/riskGate.js.map +1 -1
  17. package/dist/audit/clarification/voiQueue.d.ts +3 -3
  18. package/dist/audit/clarification/voiQueue.d.ts.map +1 -1
  19. package/dist/audit/clarification/voiQueue.js +1 -0
  20. package/dist/audit/clarification/voiQueue.js.map +1 -1
  21. package/dist/audit/cli/auditStep.d.ts +14 -2
  22. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  23. package/dist/audit/cli/auditStep.js +13 -5
  24. package/dist/audit/cli/auditStep.js.map +1 -1
  25. package/dist/audit/cli/charterClarificationPrompt.d.ts +6 -9
  26. package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
  27. package/dist/audit/cli/charterClarificationPrompt.js +35 -47
  28. package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
  29. package/dist/audit/cli/charterComparisonPrompt.d.ts +14 -0
  30. package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -0
  31. package/dist/audit/cli/charterComparisonPrompt.js +111 -0
  32. package/dist/audit/cli/charterComparisonPrompt.js.map +1 -0
  33. package/dist/audit/cli/charterExtractionPrompt.d.ts +14 -17
  34. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  35. package/dist/audit/cli/charterExtractionPrompt.js +81 -104
  36. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  37. package/dist/audit/cli/charterFidelityPrompt.d.ts +14 -0
  38. package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -0
  39. package/dist/audit/cli/charterFidelityPrompt.js +58 -0
  40. package/dist/audit/cli/charterFidelityPrompt.js.map +1 -0
  41. package/dist/audit/cli/conceptualDispatch.d.ts +39 -6
  42. package/dist/audit/cli/conceptualDispatch.d.ts.map +1 -1
  43. package/dist/audit/cli/conceptualDispatch.js +59 -12
  44. package/dist/audit/cli/conceptualDispatch.js.map +1 -1
  45. package/dist/audit/cli/confirmIntentStep.d.ts.map +1 -1
  46. package/dist/audit/cli/confirmIntentStep.js +46 -2
  47. package/dist/audit/cli/confirmIntentStep.js.map +1 -1
  48. package/dist/audit/cli/dispatch/hostHandoff.d.ts +18 -6
  49. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  50. package/dist/audit/cli/dispatch/hostHandoff.js +525 -67
  51. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  52. package/dist/audit/cli/fanoutLanes.d.ts +24 -0
  53. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  54. package/dist/audit/cli/fanoutLanes.js +9 -1
  55. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  56. package/dist/audit/cli/foldTransaction.d.ts.map +1 -1
  57. package/dist/audit/cli/foldTransaction.js +14 -3
  58. package/dist/audit/cli/foldTransaction.js.map +1 -1
  59. package/dist/audit/cli/forceSynthesisCommand.d.ts.map +1 -1
  60. package/dist/audit/cli/forceSynthesisCommand.js +4 -1
  61. package/dist/audit/cli/forceSynthesisCommand.js.map +1 -1
  62. package/dist/audit/cli/intakeCommand.d.ts.map +1 -1
  63. package/dist/audit/cli/intakeCommand.js +1 -0
  64. package/dist/audit/cli/intakeCommand.js.map +1 -1
  65. package/dist/audit/cli/laneSubmissions.d.ts +18 -12
  66. package/dist/audit/cli/laneSubmissions.d.ts.map +1 -1
  67. package/dist/audit/cli/laneSubmissions.js +40 -4
  68. package/dist/audit/cli/laneSubmissions.js.map +1 -1
  69. package/dist/audit/cli/laneValidators.d.ts.map +1 -1
  70. package/dist/audit/cli/laneValidators.js +14 -14
  71. package/dist/audit/cli/laneValidators.js.map +1 -1
  72. package/dist/audit/cli/nextStepCommand.d.ts +7 -0
  73. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  74. package/dist/audit/cli/nextStepCommand.js +206 -31
  75. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  76. package/dist/audit/cli/nextStepHelpers.d.ts +92 -28
  77. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  78. package/dist/audit/cli/nextStepHelpers.js +363 -126
  79. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  80. package/dist/audit/cli/prompts.d.ts +10 -0
  81. package/dist/audit/cli/prompts.d.ts.map +1 -1
  82. package/dist/audit/cli/prompts.js +3 -1
  83. package/dist/audit/cli/prompts.js.map +1 -1
  84. package/dist/audit/cli/reviewRun.d.ts +12 -0
  85. package/dist/audit/cli/reviewRun.d.ts.map +1 -1
  86. package/dist/audit/cli/reviewRun.js +242 -29
  87. package/dist/audit/cli/reviewRun.js.map +1 -1
  88. package/dist/audit/cli/sampleRunCommand.d.ts +12 -4
  89. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  90. package/dist/audit/cli/semanticReviewStep.d.ts +9 -0
  91. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  92. package/dist/audit/cli/semanticReviewStep.js +71 -30
  93. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  94. package/dist/audit/cli/statusCommand.d.ts.map +1 -1
  95. package/dist/audit/cli/statusCommand.js +29 -66
  96. package/dist/audit/cli/statusCommand.js.map +1 -1
  97. package/dist/audit/cli/stepScaffold.d.ts +43 -2
  98. package/dist/audit/cli/stepScaffold.d.ts.map +1 -1
  99. package/dist/audit/cli/stepScaffold.js +24 -10
  100. package/dist/audit/cli/stepScaffold.js.map +1 -1
  101. package/dist/audit/cli/steps.d.ts +52 -29
  102. package/dist/audit/cli/steps.d.ts.map +1 -1
  103. package/dist/audit/cli/steps.js +44 -14
  104. package/dist/audit/cli/steps.js.map +1 -1
  105. package/dist/audit/cli/synthesizeCommand.d.ts.map +1 -1
  106. package/dist/audit/cli/synthesizeCommand.js +4 -1
  107. package/dist/audit/cli/synthesizeCommand.js.map +1 -1
  108. package/dist/audit/contracts/workerSchemas.d.ts +65 -16
  109. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  110. package/dist/audit/contracts/workerSchemas.js +89 -8
  111. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  112. package/dist/audit/contracts/wrapperResponse.d.ts +14 -21
  113. package/dist/audit/contracts/wrapperResponse.d.ts.map +1 -1
  114. package/dist/audit/contracts/wrapperResponse.js +0 -1
  115. package/dist/audit/contracts/wrapperResponse.js.map +1 -1
  116. package/dist/audit/decompose/findings.d.ts.map +1 -1
  117. package/dist/audit/decompose/findings.js +10 -2
  118. package/dist/audit/decompose/findings.js.map +1 -1
  119. package/dist/audit/extractors/designAssessment.d.ts.map +1 -1
  120. package/dist/audit/extractors/designAssessment.js +13 -4
  121. package/dist/audit/extractors/designAssessment.js.map +1 -1
  122. package/dist/audit/extractors/disposition.d.ts.map +1 -1
  123. package/dist/audit/extractors/disposition.js +17 -5
  124. package/dist/audit/extractors/disposition.js.map +1 -1
  125. package/dist/audit/extractors/graph.d.ts +1 -1
  126. package/dist/audit/extractors/graph.js +1 -1
  127. package/dist/audit/extractors/graphRoutes.d.ts.map +1 -1
  128. package/dist/audit/extractors/graphRoutes.js +224 -17
  129. package/dist/audit/extractors/graphRoutes.js.map +1 -1
  130. package/dist/audit/extractors/leadLineage.d.ts +10 -0
  131. package/dist/audit/extractors/leadLineage.d.ts.map +1 -0
  132. package/dist/audit/extractors/leadLineage.js +44 -0
  133. package/dist/audit/extractors/leadLineage.js.map +1 -0
  134. package/dist/audit/io/artifacts.d.ts.map +1 -1
  135. package/dist/audit/io/artifacts.js +25 -8
  136. package/dist/audit/io/artifacts.js.map +1 -1
  137. package/dist/audit/io/runArtifacts.d.ts +76 -1
  138. package/dist/audit/io/runArtifacts.d.ts.map +1 -1
  139. package/dist/audit/io/runArtifacts.js +113 -20
  140. package/dist/audit/io/runArtifacts.js.map +1 -1
  141. package/dist/audit/io/toolingManifest.d.ts +15 -0
  142. package/dist/audit/io/toolingManifest.d.ts.map +1 -1
  143. package/dist/audit/io/toolingManifest.js +158 -11
  144. package/dist/audit/io/toolingManifest.js.map +1 -1
  145. package/dist/audit/orchestrator/advance.d.ts.map +1 -1
  146. package/dist/audit/orchestrator/advance.js +30 -4
  147. package/dist/audit/orchestrator/advance.js.map +1 -1
  148. package/dist/audit/orchestrator/advanceTypes.d.ts +28 -5
  149. package/dist/audit/orchestrator/advanceTypes.d.ts.map +1 -1
  150. package/dist/audit/orchestrator/artifactMetadata.d.ts.map +1 -1
  151. package/dist/audit/orchestrator/artifactMetadata.js +39 -1
  152. package/dist/audit/orchestrator/artifactMetadata.js.map +1 -1
  153. package/dist/audit/orchestrator/auditTaskUtils.d.ts.map +1 -1
  154. package/dist/audit/orchestrator/auditTaskUtils.js +4 -1
  155. package/dist/audit/orchestrator/auditTaskUtils.js.map +1 -1
  156. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts +11 -17
  157. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
  158. package/dist/audit/orchestrator/charterClarificationExecutor.js +61 -93
  159. package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
  160. package/dist/audit/orchestrator/charterComparisonExecutor.d.ts +24 -0
  161. package/dist/audit/orchestrator/charterComparisonExecutor.d.ts.map +1 -0
  162. package/dist/audit/orchestrator/charterComparisonExecutor.js +110 -0
  163. package/dist/audit/orchestrator/charterComparisonExecutor.js.map +1 -0
  164. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +34 -20
  165. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  166. package/dist/audit/orchestrator/charterExtractionExecutor.js +80 -106
  167. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  168. package/dist/audit/orchestrator/charterFidelityExecutor.d.ts +20 -0
  169. package/dist/audit/orchestrator/charterFidelityExecutor.d.ts.map +1 -0
  170. package/dist/audit/orchestrator/charterFidelityExecutor.js +76 -0
  171. package/dist/audit/orchestrator/charterFidelityExecutor.js.map +1 -0
  172. package/dist/audit/orchestrator/charterFidelityPacket.d.ts +7 -0
  173. package/dist/audit/orchestrator/charterFidelityPacket.d.ts.map +1 -0
  174. package/dist/audit/orchestrator/charterFidelityPacket.js +68 -0
  175. package/dist/audit/orchestrator/charterFidelityPacket.js.map +1 -0
  176. package/dist/audit/orchestrator/dependencyMap.d.ts.map +1 -1
  177. package/dist/audit/orchestrator/dependencyMap.js +9 -8
  178. package/dist/audit/orchestrator/dependencyMap.js.map +1 -1
  179. package/dist/audit/orchestrator/dependencySlices.d.ts.map +1 -1
  180. package/dist/audit/orchestrator/dependencySlices.js +7 -6
  181. package/dist/audit/orchestrator/dependencySlices.js.map +1 -1
  182. package/dist/audit/orchestrator/designReviewProjection.d.ts.map +1 -1
  183. package/dist/audit/orchestrator/designReviewProjection.js +7 -0
  184. package/dist/audit/orchestrator/designReviewProjection.js.map +1 -1
  185. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  186. package/dist/audit/orchestrator/designReviewPrompt.js +58 -19
  187. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  188. package/dist/audit/orchestrator/executorRunners.d.ts.map +1 -1
  189. package/dist/audit/orchestrator/executorRunners.js +6 -2
  190. package/dist/audit/orchestrator/executorRunners.js.map +1 -1
  191. package/dist/audit/orchestrator/executors.d.ts.map +1 -1
  192. package/dist/audit/orchestrator/executors.js +22 -8
  193. package/dist/audit/orchestrator/executors.js.map +1 -1
  194. package/dist/audit/orchestrator/hostInputPause.js +1 -0
  195. package/dist/audit/orchestrator/hostInputPause.js.map +1 -1
  196. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts +40 -0
  197. package/dist/audit/orchestrator/intentCheckpointExecutor.d.ts.map +1 -1
  198. package/dist/audit/orchestrator/intentCheckpointExecutor.js +32 -2
  199. package/dist/audit/orchestrator/intentCheckpointExecutor.js.map +1 -1
  200. package/dist/audit/orchestrator/intentCheckpointGate.d.ts +5 -3
  201. package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
  202. package/dist/audit/orchestrator/intentCheckpointGate.js +34 -5
  203. package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
  204. package/dist/audit/orchestrator/intentEquivalenceExecutor.d.ts +2 -2
  205. package/dist/audit/orchestrator/intentInterpreter.d.ts +1 -1
  206. package/dist/audit/orchestrator/intentInterpreter.js +1 -1
  207. package/dist/audit/orchestrator/nextStep.d.ts.map +1 -1
  208. package/dist/audit/orchestrator/nextStep.js +3 -1
  209. package/dist/audit/orchestrator/nextStep.js.map +1 -1
  210. package/dist/audit/orchestrator/obligationPolicy.d.ts +2 -1
  211. package/dist/audit/orchestrator/obligationPolicy.d.ts.map +1 -1
  212. package/dist/audit/orchestrator/obligationPolicy.js +19 -7
  213. package/dist/audit/orchestrator/obligationPolicy.js.map +1 -1
  214. package/dist/audit/orchestrator/partitionTaskGraph.d.ts.map +1 -1
  215. package/dist/audit/orchestrator/partitionTaskGraph.js +1 -0
  216. package/dist/audit/orchestrator/partitionTaskGraph.js.map +1 -1
  217. package/dist/audit/orchestrator/resultIngestion.d.ts.map +1 -1
  218. package/dist/audit/orchestrator/resultIngestion.js +3 -1
  219. package/dist/audit/orchestrator/resultIngestion.js.map +1 -1
  220. package/dist/audit/orchestrator/runtimeCommand.d.ts +72 -0
  221. package/dist/audit/orchestrator/runtimeCommand.d.ts.map +1 -1
  222. package/dist/audit/orchestrator/runtimeCommand.js +177 -20
  223. package/dist/audit/orchestrator/runtimeCommand.js.map +1 -1
  224. package/dist/audit/orchestrator/scopeIndexBaseline.d.ts +56 -0
  225. package/dist/audit/orchestrator/scopeIndexBaseline.d.ts.map +1 -0
  226. package/dist/audit/orchestrator/scopeIndexBaseline.js +114 -0
  227. package/dist/audit/orchestrator/scopeIndexBaseline.js.map +1 -0
  228. package/dist/audit/orchestrator/staleness.d.ts +70 -1
  229. package/dist/audit/orchestrator/staleness.d.ts.map +1 -1
  230. package/dist/audit/orchestrator/staleness.js +171 -21
  231. package/dist/audit/orchestrator/staleness.js.map +1 -1
  232. package/dist/audit/orchestrator/state.d.ts.map +1 -1
  233. package/dist/audit/orchestrator/state.js +49 -25
  234. package/dist/audit/orchestrator/state.js.map +1 -1
  235. package/dist/audit/orchestrator/structureExecutors.d.ts.map +1 -1
  236. package/dist/audit/orchestrator/structureExecutors.js +7 -5
  237. package/dist/audit/orchestrator/structureExecutors.js.map +1 -1
  238. package/dist/audit/orchestrator/syntaxResolutionExecutor.d.ts.map +1 -1
  239. package/dist/audit/orchestrator/syntaxResolutionExecutor.js +1 -0
  240. package/dist/audit/orchestrator/syntaxResolutionExecutor.js.map +1 -1
  241. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts +13 -2
  242. package/dist/audit/orchestrator/systemicChallengeExecutor.d.ts.map +1 -1
  243. package/dist/audit/orchestrator/systemicChallengeExecutor.js +166 -12
  244. package/dist/audit/orchestrator/systemicChallengeExecutor.js.map +1 -1
  245. package/dist/audit/reporting/mergeFindings.d.ts.map +1 -1
  246. package/dist/audit/reporting/mergeFindings.js +6 -5
  247. package/dist/audit/reporting/mergeFindings.js.map +1 -1
  248. package/dist/audit/reporting/synthesis.d.ts +117 -0
  249. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  250. package/dist/audit/reporting/synthesis.js +277 -10
  251. package/dist/audit/reporting/synthesis.js.map +1 -1
  252. package/dist/audit/supervisor/operatorHandoff.d.ts +0 -2
  253. package/dist/audit/supervisor/operatorHandoff.d.ts.map +1 -1
  254. package/dist/audit/supervisor/operatorHandoff.js +0 -3
  255. package/dist/audit/supervisor/operatorHandoff.js.map +1 -1
  256. package/dist/audit/systemic/coveredThemes.d.ts +28 -0
  257. package/dist/audit/systemic/coveredThemes.d.ts.map +1 -0
  258. package/dist/audit/systemic/coveredThemes.js +52 -0
  259. package/dist/audit/systemic/coveredThemes.js.map +1 -0
  260. package/dist/audit/systemic/reviewFileMap.d.ts +81 -0
  261. package/dist/audit/systemic/reviewFileMap.d.ts.map +1 -0
  262. package/dist/audit/systemic/reviewFileMap.js +169 -0
  263. package/dist/audit/systemic/reviewFileMap.js.map +1 -0
  264. package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
  265. package/dist/audit/systemic/secondOrderAdversaryPrompt.js +149 -26
  266. package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
  267. package/dist/audit/systemic/systemicChallengeLoop.d.ts +44 -4
  268. package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
  269. package/dist/audit/systemic/systemicChallengeLoop.js +114 -10
  270. package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
  271. package/dist/audit/types/auditState.d.ts +6 -6
  272. package/dist/audit/types/charterClarification.d.ts +9 -4
  273. package/dist/audit/types/charterClarification.d.ts.map +1 -1
  274. package/dist/audit/types/charterRegister.d.ts +48 -93
  275. package/dist/audit/types/charterRegister.d.ts.map +1 -1
  276. package/dist/audit/types/charterRegister.js +15 -26
  277. package/dist/audit/types/charterRegister.js.map +1 -1
  278. package/dist/audit/types/conceptualAdjudication.d.ts +88 -18
  279. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  280. package/dist/audit/types/conceptualAdjudication.js +77 -16
  281. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  282. package/dist/audit/types/designAssessment.d.ts +8 -6
  283. package/dist/audit/types/designAssessment.d.ts.map +1 -1
  284. package/dist/audit/types/reviewPlanning.d.ts +2 -2
  285. package/dist/audit/types/systemicChallenge.d.ts +43 -7
  286. package/dist/audit/types/systemicChallenge.d.ts.map +1 -1
  287. package/dist/audit/types.d.ts +71 -10
  288. package/dist/audit/types.d.ts.map +1 -1
  289. package/dist/audit/types.js +23 -2
  290. package/dist/audit/types.js.map +1 -1
  291. package/dist/audit/validation/auditResults.d.ts +30 -0
  292. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  293. package/dist/audit/validation/auditResults.js +50 -8
  294. package/dist/audit/validation/auditResults.js.map +1 -1
  295. package/dist/audit/validation/ingestIssueCodes.d.ts +1 -1
  296. package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
  297. package/dist/audit/validation/ingestIssueCodes.js +14 -0
  298. package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
  299. package/dist/remediate/contractPipeline/artifactStore.d.ts +97 -2
  300. package/dist/remediate/contractPipeline/artifactStore.d.ts.map +1 -1
  301. package/dist/remediate/contractPipeline/artifactStore.js +163 -9
  302. package/dist/remediate/contractPipeline/artifactStore.js.map +1 -1
  303. package/dist/remediate/contractPipeline/changeClassification.d.ts.map +1 -1
  304. package/dist/remediate/contractPipeline/changeClassification.js +93 -3
  305. package/dist/remediate/contractPipeline/changeClassification.js.map +1 -1
  306. package/dist/remediate/contractPipeline/cyclicSeamResolution.d.ts.map +1 -1
  307. package/dist/remediate/contractPipeline/cyclicSeamResolution.js +31 -0
  308. package/dist/remediate/contractPipeline/cyclicSeamResolution.js.map +1 -1
  309. package/dist/remediate/contractPipeline/derive.d.ts +0 -14
  310. package/dist/remediate/contractPipeline/derive.d.ts.map +1 -1
  311. package/dist/remediate/contractPipeline/derive.js +52 -24
  312. package/dist/remediate/contractPipeline/derive.js.map +1 -1
  313. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts +50 -0
  314. package/dist/remediate/contractPipeline/finalizedContractFields.d.ts.map +1 -0
  315. package/dist/remediate/contractPipeline/finalizedContractFields.js +77 -0
  316. package/dist/remediate/contractPipeline/finalizedContractFields.js.map +1 -0
  317. package/dist/remediate/contractPipeline/idRegistry.d.ts +85 -0
  318. package/dist/remediate/contractPipeline/idRegistry.d.ts.map +1 -1
  319. package/dist/remediate/contractPipeline/idRegistry.js +147 -0
  320. package/dist/remediate/contractPipeline/idRegistry.js.map +1 -1
  321. package/dist/remediate/contractPipeline/phaseCut.d.ts +13 -16
  322. package/dist/remediate/contractPipeline/phaseCut.d.ts.map +1 -1
  323. package/dist/remediate/contractPipeline/phaseCut.js +15 -30
  324. package/dist/remediate/contractPipeline/phaseCut.js.map +1 -1
  325. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts +20 -1
  326. package/dist/remediate/contractPipeline/reviewSnapshot.d.ts.map +1 -1
  327. package/dist/remediate/contractPipeline/reviewSnapshot.js +23 -7
  328. package/dist/remediate/contractPipeline/reviewSnapshot.js.map +1 -1
  329. package/dist/remediate/contractPipeline/semanticProjection.d.ts +17 -0
  330. package/dist/remediate/contractPipeline/semanticProjection.d.ts.map +1 -1
  331. package/dist/remediate/contractPipeline/semanticProjection.js +6 -9
  332. package/dist/remediate/contractPipeline/semanticProjection.js.map +1 -1
  333. package/dist/remediate/contractPipeline/sketchSource.d.ts +183 -0
  334. package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -0
  335. package/dist/remediate/contractPipeline/sketchSource.js +255 -0
  336. package/dist/remediate/contractPipeline/sketchSource.js.map +1 -0
  337. package/dist/remediate/findingFilter.d.ts.map +1 -1
  338. package/dist/remediate/findingFilter.js +1 -0
  339. package/dist/remediate/findingFilter.js.map +1 -1
  340. package/dist/remediate/index.d.ts +81 -0
  341. package/dist/remediate/index.d.ts.map +1 -1
  342. package/dist/remediate/index.js +162 -53
  343. package/dist/remediate/index.js.map +1 -1
  344. package/dist/remediate/intake.d.ts +43 -0
  345. package/dist/remediate/intake.d.ts.map +1 -1
  346. package/dist/remediate/intake.js +82 -13
  347. package/dist/remediate/intake.js.map +1 -1
  348. package/dist/remediate/phases/close.d.ts +33 -2
  349. package/dist/remediate/phases/close.d.ts.map +1 -1
  350. package/dist/remediate/phases/close.js +227 -13
  351. package/dist/remediate/phases/close.js.map +1 -1
  352. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts +154 -0
  353. package/dist/remediate/phases/closeVerifyHeadEvidence.d.ts.map +1 -0
  354. package/dist/remediate/phases/closeVerifyHeadEvidence.js +242 -0
  355. package/dist/remediate/phases/closeVerifyHeadEvidence.js.map +1 -0
  356. package/dist/remediate/state/runStatus.d.ts +35 -0
  357. package/dist/remediate/state/runStatus.d.ts.map +1 -0
  358. package/dist/remediate/state/runStatus.js +46 -0
  359. package/dist/remediate/state/runStatus.js.map +1 -0
  360. package/dist/remediate/state/store.d.ts +52 -2
  361. package/dist/remediate/state/store.d.ts.map +1 -1
  362. package/dist/remediate/state/store.js +124 -21
  363. package/dist/remediate/state/store.js.map +1 -1
  364. package/dist/remediate/state/types.d.ts +83 -13
  365. package/dist/remediate/state/types.d.ts.map +1 -1
  366. package/dist/remediate/steps/contractPipeline.d.ts +65 -1
  367. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  368. package/dist/remediate/steps/contractPipeline.js +302 -85
  369. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  370. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  371. package/dist/remediate/steps/contractPipelinePrompts.js +58 -21
  372. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  373. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +87 -2
  374. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  375. package/dist/remediate/steps/dispatch/hostHandoff.js +344 -44
  376. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  377. package/dist/remediate/steps/finalGate.d.ts +109 -5
  378. package/dist/remediate/steps/finalGate.d.ts.map +1 -1
  379. package/dist/remediate/steps/finalGate.js +135 -27
  380. package/dist/remediate/steps/finalGate.js.map +1 -1
  381. package/dist/remediate/steps/gateCommands.d.ts +167 -0
  382. package/dist/remediate/steps/gateCommands.d.ts.map +1 -1
  383. package/dist/remediate/steps/gateCommands.js +428 -1
  384. package/dist/remediate/steps/gateCommands.js.map +1 -1
  385. package/dist/remediate/steps/intakeResolver.d.ts +2 -13
  386. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  387. package/dist/remediate/steps/intakeResolver.js +22 -4
  388. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  389. package/dist/remediate/steps/nextStep.d.ts +44 -40
  390. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  391. package/dist/remediate/steps/nextStep.js +501 -106
  392. package/dist/remediate/steps/nextStep.js.map +1 -1
  393. package/dist/remediate/steps/stepWriter.d.ts +1 -1
  394. package/dist/remediate/steps/stepWriter.d.ts.map +1 -1
  395. package/dist/remediate/steps/stepWriter.js +1 -0
  396. package/dist/remediate/steps/stepWriter.js.map +1 -1
  397. package/dist/remediate/steps/types.d.ts +32 -1
  398. package/dist/remediate/steps/types.d.ts.map +1 -1
  399. package/dist/remediate/steps/types.js +1 -0
  400. package/dist/remediate/steps/types.js.map +1 -1
  401. package/dist/remediate/types/options.d.ts +8 -0
  402. package/dist/remediate/types/options.d.ts.map +1 -1
  403. package/dist/remediate/utils/fileIntegrity.d.ts +8 -0
  404. package/dist/remediate/utils/fileIntegrity.d.ts.map +1 -1
  405. package/dist/remediate/utils/fileIntegrity.js +12 -1
  406. package/dist/remediate/utils/fileIntegrity.js.map +1 -1
  407. package/dist/remediate/validation/artifacts.d.ts +1 -1
  408. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  409. package/dist/remediate/validation/artifacts.js +19 -2
  410. package/dist/remediate/validation/artifacts.js.map +1 -1
  411. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  412. package/dist/remediate/validation/contractPipeline.js +26 -39
  413. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  414. package/dist/remediate/validation/contractPipelineGates.d.ts +18 -1
  415. package/dist/remediate/validation/contractPipelineGates.d.ts.map +1 -1
  416. package/dist/remediate/validation/contractPipelineGates.js +33 -5
  417. package/dist/remediate/validation/contractPipelineGates.js.map +1 -1
  418. package/dist/shared/analyzers/acquisitionEngine.d.ts +83 -5
  419. package/dist/shared/analyzers/acquisitionEngine.d.ts.map +1 -1
  420. package/dist/shared/analyzers/acquisitionEngine.js +46 -14
  421. package/dist/shared/analyzers/acquisitionEngine.js.map +1 -1
  422. package/dist/shared/analyzers/binaryAcquisition.d.ts +35 -2
  423. package/dist/shared/analyzers/binaryAcquisition.d.ts.map +1 -1
  424. package/dist/shared/analyzers/binaryAcquisition.js +5 -5
  425. package/dist/shared/analyzers/binaryAcquisition.js.map +1 -1
  426. package/dist/shared/analyzers/candidates.d.ts.map +1 -1
  427. package/dist/shared/analyzers/candidates.js +1 -0
  428. package/dist/shared/analyzers/candidates.js.map +1 -1
  429. package/dist/shared/analyzers/clippy.d.ts +9 -1
  430. package/dist/shared/analyzers/clippy.d.ts.map +1 -1
  431. package/dist/shared/analyzers/clippy.js +10 -2
  432. package/dist/shared/analyzers/clippy.js.map +1 -1
  433. package/dist/shared/analyzers/normalizeExternal.d.ts.map +1 -1
  434. package/dist/shared/analyzers/normalizeExternal.js +1 -0
  435. package/dist/shared/analyzers/normalizeExternal.js.map +1 -1
  436. package/dist/shared/analyzers/rubocop.d.ts +7 -1
  437. package/dist/shared/analyzers/rubocop.d.ts.map +1 -1
  438. package/dist/shared/analyzers/rubocop.js +8 -2
  439. package/dist/shared/analyzers/rubocop.js.map +1 -1
  440. package/dist/shared/analyzers/types.d.ts +24 -24
  441. package/dist/shared/analyzers/types.d.ts.map +1 -1
  442. package/dist/shared/analyzers/types.js +15 -0
  443. package/dist/shared/analyzers/types.js.map +1 -1
  444. package/dist/shared/artifactFreshness.d.ts.map +1 -1
  445. package/dist/shared/artifactFreshness.js +42 -7
  446. package/dist/shared/artifactFreshness.js.map +1 -1
  447. package/dist/shared/chunkByBudget.d.ts.map +1 -1
  448. package/dist/shared/chunkByBudget.js.map +1 -1
  449. package/dist/shared/continuityScore.d.ts.map +1 -1
  450. package/dist/shared/continuityScore.js +12 -4
  451. package/dist/shared/continuityScore.js.map +1 -1
  452. package/dist/shared/decompose/charterClarification.d.ts +49 -45
  453. package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
  454. package/dist/shared/decompose/charterClarification.js +50 -57
  455. package/dist/shared/decompose/charterClarification.js.map +1 -1
  456. package/dist/shared/decompose/charterExtraction.d.ts +616 -342
  457. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  458. package/dist/shared/decompose/charterExtraction.js +590 -488
  459. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  460. package/dist/shared/decompose/contentCoherence.d.ts +36 -2
  461. package/dist/shared/decompose/contentCoherence.d.ts.map +1 -1
  462. package/dist/shared/decompose/contentCoherence.js +45 -5
  463. package/dist/shared/decompose/contentCoherence.js.map +1 -1
  464. package/dist/shared/decompose/modularity.d.ts +98 -1
  465. package/dist/shared/decompose/modularity.d.ts.map +1 -1
  466. package/dist/shared/decompose/modularity.js +89 -8
  467. package/dist/shared/decompose/modularity.js.map +1 -1
  468. package/dist/shared/decompose/systemicChallenge.d.ts +111 -0
  469. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  470. package/dist/shared/decompose/systemicChallenge.js +28 -0
  471. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  472. package/dist/shared/engine/obligationEngine.d.ts +2 -2
  473. package/dist/shared/engine/obligationEngine.d.ts.map +1 -1
  474. package/dist/shared/engine/obligationEngine.js +8 -2
  475. package/dist/shared/engine/obligationEngine.js.map +1 -1
  476. package/dist/shared/findingSimilarity.d.ts +8 -0
  477. package/dist/shared/findingSimilarity.d.ts.map +1 -1
  478. package/dist/shared/findingSimilarity.js +10 -3
  479. package/dist/shared/findingSimilarity.js.map +1 -1
  480. package/dist/shared/findings/dedupe.d.ts +15 -0
  481. package/dist/shared/findings/dedupe.d.ts.map +1 -1
  482. package/dist/shared/findings/dedupe.js +137 -1
  483. package/dist/shared/findings/dedupe.js.map +1 -1
  484. package/dist/shared/friction/frictionRecord.d.ts.map +1 -1
  485. package/dist/shared/friction/frictionRecord.js +14 -1
  486. package/dist/shared/friction/frictionRecord.js.map +1 -1
  487. package/dist/shared/friction/triage.d.ts +4 -0
  488. package/dist/shared/friction/triage.d.ts.map +1 -1
  489. package/dist/shared/friction/triage.js +41 -29
  490. package/dist/shared/friction/triage.js.map +1 -1
  491. package/dist/shared/git.d.ts +14 -0
  492. package/dist/shared/git.d.ts.map +1 -1
  493. package/dist/shared/git.js +22 -0
  494. package/dist/shared/git.js.map +1 -1
  495. package/dist/shared/index.d.ts +42 -38
  496. package/dist/shared/index.d.ts.map +1 -1
  497. package/dist/shared/index.js +35 -23
  498. package/dist/shared/index.js.map +1 -1
  499. package/dist/shared/intent/clauseBoundaries.d.ts +75 -0
  500. package/dist/shared/intent/clauseBoundaries.d.ts.map +1 -0
  501. package/dist/shared/intent/clauseBoundaries.js +134 -0
  502. package/dist/shared/intent/clauseBoundaries.js.map +1 -0
  503. package/dist/shared/intent/clauseInterpreter.d.ts +11 -5
  504. package/dist/shared/intent/clauseInterpreter.d.ts.map +1 -1
  505. package/dist/shared/intent/clauseInterpreter.js +16 -41
  506. package/dist/shared/intent/clauseInterpreter.js.map +1 -1
  507. package/dist/shared/intent/freeFormIntentInterpreter.d.ts +11 -0
  508. package/dist/shared/intent/freeFormIntentInterpreter.d.ts.map +1 -1
  509. package/dist/shared/intent/freeFormIntentInterpreter.js +31 -17
  510. package/dist/shared/intent/freeFormIntentInterpreter.js.map +1 -1
  511. package/dist/shared/io/fileLock.d.ts.map +1 -1
  512. package/dist/shared/io/fileLock.js +18 -6
  513. package/dist/shared/io/fileLock.js.map +1 -1
  514. package/dist/shared/io/frictionCapture.d.ts +25 -5
  515. package/dist/shared/io/frictionCapture.d.ts.map +1 -1
  516. package/dist/shared/io/frictionCapture.js +30 -9
  517. package/dist/shared/io/frictionCapture.js.map +1 -1
  518. package/dist/shared/io/schemaVersion.d.ts +4 -3
  519. package/dist/shared/io/schemaVersion.d.ts.map +1 -1
  520. package/dist/shared/io/schemaVersion.js +27 -4
  521. package/dist/shared/io/schemaVersion.js.map +1 -1
  522. package/dist/shared/io/stepContractWriter.d.ts +38 -4
  523. package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
  524. package/dist/shared/io/stepContractWriter.js +59 -1
  525. package/dist/shared/io/stepContractWriter.js.map +1 -1
  526. package/dist/shared/loopCorePaths.d.ts.map +1 -1
  527. package/dist/shared/loopCorePaths.js +8 -0
  528. package/dist/shared/loopCorePaths.js.map +1 -1
  529. package/dist/shared/opencodePermissions.d.ts +27 -3
  530. package/dist/shared/opencodePermissions.d.ts.map +1 -1
  531. package/dist/shared/opencodePermissions.js +77 -26
  532. package/dist/shared/opencodePermissions.js.map +1 -1
  533. package/dist/shared/prompts.d.ts +12 -1
  534. package/dist/shared/prompts.d.ts.map +1 -1
  535. package/dist/shared/prompts.js +11 -1
  536. package/dist/shared/prompts.js.map +1 -1
  537. package/dist/shared/reReview/projectionDiff.d.ts +13 -0
  538. package/dist/shared/reReview/projectionDiff.d.ts.map +1 -1
  539. package/dist/shared/reReview/projectionDiff.js +1 -1
  540. package/dist/shared/reReview/projectionDiff.js.map +1 -1
  541. package/dist/shared/reporting/findingDisplay.d.ts +7 -0
  542. package/dist/shared/reporting/findingDisplay.d.ts.map +1 -1
  543. package/dist/shared/reporting/findingDisplay.js +8 -1
  544. package/dist/shared/reporting/findingDisplay.js.map +1 -1
  545. package/dist/shared/steps/stepEmissionScaffold.d.ts +15 -3
  546. package/dist/shared/steps/stepEmissionScaffold.d.ts.map +1 -1
  547. package/dist/shared/steps/stepEmissionScaffold.js +8 -6
  548. package/dist/shared/steps/stepEmissionScaffold.js.map +1 -1
  549. package/dist/shared/submission/hostHandoffCore.d.ts +37 -12
  550. package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
  551. package/dist/shared/submission/hostHandoffCore.js +81 -18
  552. package/dist/shared/submission/hostHandoffCore.js.map +1 -1
  553. package/dist/shared/submission/hostResultOutcomes.d.ts +70 -1
  554. package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
  555. package/dist/shared/submission/hostResultOutcomes.js +66 -1
  556. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  557. package/dist/shared/submission/submissionLedger.d.ts +86 -1
  558. package/dist/shared/submission/submissionLedger.d.ts.map +1 -1
  559. package/dist/shared/submission/submissionLedger.js +108 -0
  560. package/dist/shared/submission/submissionLedger.js.map +1 -1
  561. package/dist/shared/submission/submissionScan.d.ts.map +1 -1
  562. package/dist/shared/submission/submissionScan.js +1 -0
  563. package/dist/shared/submission/submissionScan.js.map +1 -1
  564. package/dist/shared/tooling/analyzerDeps.d.ts +14 -0
  565. package/dist/shared/tooling/analyzerDeps.d.ts.map +1 -1
  566. package/dist/shared/tooling/analyzerDeps.js +23 -0
  567. package/dist/shared/tooling/analyzerDeps.js.map +1 -1
  568. package/dist/shared/tooling/commandShape.d.ts +35 -1
  569. package/dist/shared/tooling/commandShape.d.ts.map +1 -1
  570. package/dist/shared/tooling/commandShape.js +66 -4
  571. package/dist/shared/tooling/commandShape.js.map +1 -1
  572. package/dist/shared/tooling/exec.d.ts +62 -4
  573. package/dist/shared/tooling/exec.d.ts.map +1 -1
  574. package/dist/shared/tooling/exec.js +127 -8
  575. package/dist/shared/tooling/exec.js.map +1 -1
  576. package/dist/shared/types/charter.d.ts +674 -156
  577. package/dist/shared/types/charter.d.ts.map +1 -1
  578. package/dist/shared/types/charter.js +172 -118
  579. package/dist/shared/types/charter.js.map +1 -1
  580. package/dist/shared/types/closingActions.d.ts +25 -0
  581. package/dist/shared/types/closingActions.d.ts.map +1 -1
  582. package/dist/shared/types/closingActions.js +26 -0
  583. package/dist/shared/types/closingActions.js.map +1 -1
  584. package/dist/shared/types/contractPipeline/obligations.d.ts +63 -2
  585. package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
  586. package/dist/shared/types/contractPipeline/obligations.js +51 -0
  587. package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
  588. package/dist/shared/types/contractPipeline.d.ts +1 -0
  589. package/dist/shared/types/contractPipeline.d.ts.map +1 -1
  590. package/dist/shared/types/contractPipeline.js +1 -0
  591. package/dist/shared/types/contractPipeline.js.map +1 -1
  592. package/dist/shared/types/contractPropertyShapes.d.ts +34 -0
  593. package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -0
  594. package/dist/shared/types/contractPropertyShapes.js +255 -0
  595. package/dist/shared/types/contractPropertyShapes.js.map +1 -0
  596. package/dist/shared/types/finding.d.ts +376 -18
  597. package/dist/shared/types/finding.d.ts.map +1 -1
  598. package/dist/shared/types/finding.js +111 -0
  599. package/dist/shared/types/finding.js.map +1 -1
  600. package/dist/shared/types/intentCheckpoint.d.ts +214 -2
  601. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  602. package/dist/shared/types/intentCheckpoint.js +273 -0
  603. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  604. package/dist/shared/types/intentInterpretation.d.ts +1 -1
  605. package/dist/shared/types/intentInterpretation.js +1 -1
  606. package/dist/shared/types/remediationOutcome.d.ts +294 -30
  607. package/dist/shared/types/remediationOutcome.d.ts.map +1 -1
  608. package/dist/shared/types/remediationOutcome.js +96 -7
  609. package/dist/shared/types/remediationOutcome.js.map +1 -1
  610. package/dist/shared/types/stepContract.d.ts +47 -0
  611. package/dist/shared/types/stepContract.d.ts.map +1 -1
  612. package/dist/shared/types/stepContract.js +113 -0
  613. package/dist/shared/types/stepContract.js.map +1 -1
  614. package/dist/shared/validation/charterGate.d.ts +13 -28
  615. package/dist/shared/validation/charterGate.d.ts.map +1 -1
  616. package/dist/shared/validation/charterGate.js +13 -35
  617. package/dist/shared/validation/charterGate.js.map +1 -1
  618. package/dist/shared/validation/contractConstructionSites.d.ts +116 -0
  619. package/dist/shared/validation/contractConstructionSites.d.ts.map +1 -0
  620. package/dist/shared/validation/contractConstructionSites.js +277 -0
  621. package/dist/shared/validation/contractConstructionSites.js.map +1 -0
  622. package/dist/shared/validation/designFindingGrounding.d.ts +33 -4
  623. package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
  624. package/dist/shared/validation/designFindingGrounding.js +40 -6
  625. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  626. package/dist/shared/validation/findingGrounding.d.ts.map +1 -1
  627. package/dist/shared/validation/findingGrounding.js +11 -1
  628. package/dist/shared/validation/findingGrounding.js.map +1 -1
  629. package/dist/shared/validation/findingsReport.d.ts.map +1 -1
  630. package/dist/shared/validation/findingsReport.js +5 -0
  631. package/dist/shared/validation/findingsReport.js.map +1 -1
  632. package/docs/audit-pkg/contracts.md +8 -2
  633. package/opencode.json +29 -29
  634. package/package.json +16 -3
  635. package/schemas/audit-code-v1alpha1.schema.json +0 -4
  636. package/scripts/audit/postinstall.mjs +81 -96
  637. package/scripts/remediate/postinstall.mjs +43 -83
  638. package/scripts/shared/host-asset-plan.mjs +176 -0
  639. package/scripts/shared/install-host-assets.mjs +44 -1
  640. package/scripts/shared/primitives.mjs +89 -0
  641. package/skills/audit-code/SKILL.md +4 -4
  642. package/skills/audit-code/audit-code.prompt.md +14 -10
  643. package/skills/remediate-code/SKILL.md +9 -5
  644. package/skills/remediate-code/remediate-code.prompt.md +11 -4
  645. package/wrapper/audit-code-wrapper-build.mjs +6 -3
  646. package/dist/audit/cli/charterDeltaPrompt.d.ts +0 -18
  647. package/dist/audit/cli/charterDeltaPrompt.d.ts.map +0 -1
  648. package/dist/audit/cli/charterDeltaPrompt.js +0 -150
  649. package/dist/audit/cli/charterDeltaPrompt.js.map +0 -1
  650. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts +0 -24
  651. package/dist/audit/orchestrator/charterDeltaExecutor.d.ts.map +0 -1
  652. package/dist/audit/orchestrator/charterDeltaExecutor.js +0 -128
  653. package/dist/audit/orchestrator/charterDeltaExecutor.js.map +0 -1
  654. package/dist/audit/supervisor/runLedger.d.ts +0 -3
  655. package/dist/audit/supervisor/runLedger.d.ts.map +0 -1
  656. package/dist/audit/supervisor/runLedger.js +0 -69
  657. package/dist/audit/supervisor/runLedger.js.map +0 -1
  658. package/dist/shared/types/executionRecord.d.ts +0 -58
  659. package/dist/shared/types/executionRecord.d.ts.map +0 -1
  660. package/dist/shared/types/executionRecord.js +0 -26
  661. package/dist/shared/types/executionRecord.js.map +0 -1
  662. package/dist/shared/types/runLedger.d.ts +0 -17
  663. package/dist/shared/types/runLedger.d.ts.map +0 -1
  664. package/dist/shared/types/runLedger.js +0 -7
  665. package/dist/shared/types/runLedger.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ import type { Finding } from "../types.js";
2
+ /** One counted value in the digest — an abstract label plus how often it occurs. */
3
+ export interface CoveredThemeCount {
4
+ value: string;
5
+ count: number;
6
+ }
7
+ /**
8
+ * What the banked improvements already cover, in aggregate. Recorded on the
9
+ * register and rendered into the next round's prompt as the variation bar's
10
+ * factual half.
11
+ */
12
+ export interface SystemicCoveredThemes {
13
+ /** Distinct lenses the banked set already occupies, path-sorted. */
14
+ by_lens: CoveredThemeCount[];
15
+ /** Distinct categories the banked set already occupies, path-sorted. */
16
+ by_category: CoveredThemeCount[];
17
+ /** Every component a banked improvement already implicates, path-sorted. */
18
+ files: string[];
19
+ /** How many distinct improvements are banked (the digest's own denominator). */
20
+ finding_count: number;
21
+ }
22
+ /**
23
+ * Summarize the banked findings into the covered-themes digest. An empty bank
24
+ * yields an empty digest, never a fabricated one — the first round has covered
25
+ * nothing and the prompt says so.
26
+ */
27
+ export declare function summarizeCoveredThemes(findings: readonly Finding[]): SystemicCoveredThemes;
28
+ //# sourceMappingURL=coveredThemes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coveredThemes.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/coveredThemes.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,oFAAoF;AACpF,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,oEAAoE;IACpE,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,wEAAwE;IACxE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IACjC,4EAA4E;IAC5E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;CACvB;AAiBD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,qBAAqB,CAiBvB"}
@@ -0,0 +1,52 @@
1
+ // Phase E — the COVERED-THEMES digest of the adversary loop.
2
+ //
3
+ // The loop's round prompt renders every banked improvement in full (an adversary
4
+ // cannot avoid repeating what it cannot see), but a flat list answers "what was
5
+ // said", not "what has been covered". Round 3 of the 2026-08-21 lap re-raised
6
+ // round 2's `mapWithConcurrency` item under a fresh id — the list was there and
7
+ // the lane still could not see the GROUND it had already walked. This digest is
8
+ // that ground, stated in aggregate: which lenses and categories the banked set
9
+ // already occupies, and which components it already implicates. A round that
10
+ // wants to be new can name the axis it is departing on.
11
+ //
12
+ // Deterministic and content-derived: every array is ordered by a stable key, so
13
+ // the digest never churns the register's content hash on iteration order (the
14
+ // repo's extractor-ordering invariant). PURE: no IO, no LLM.
15
+ import { compareCodeUnits } from "audit-tools/shared";
16
+ function countBy(findings, select) {
17
+ const counts = new Map();
18
+ for (const finding of findings) {
19
+ const value = select(finding)?.trim();
20
+ if (!value)
21
+ continue;
22
+ counts.set(value, (counts.get(value) ?? 0) + 1);
23
+ }
24
+ return [...counts.entries()]
25
+ .map(([value, count]) => ({ value, count }))
26
+ .sort((a, b) => compareCodeUnits(a.value, b.value));
27
+ }
28
+ /**
29
+ * Summarize the banked findings into the covered-themes digest. An empty bank
30
+ * yields an empty digest, never a fabricated one — the first round has covered
31
+ * nothing and the prompt says so.
32
+ */
33
+ export function summarizeCoveredThemes(findings) {
34
+ if (findings.length === 0) {
35
+ return { by_lens: [], by_category: [], files: [], finding_count: 0 };
36
+ }
37
+ const files = new Set();
38
+ for (const finding of findings) {
39
+ for (const file of finding.affected_files ?? []) {
40
+ const path = file?.path?.trim();
41
+ if (path)
42
+ files.add(path);
43
+ }
44
+ }
45
+ return {
46
+ by_lens: countBy(findings, (finding) => finding.lens),
47
+ by_category: countBy(findings, (finding) => finding.category),
48
+ files: [...files].sort(compareCodeUnits),
49
+ finding_count: findings.length,
50
+ };
51
+ }
52
+ //# sourceMappingURL=coveredThemes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coveredThemes.js","sourceRoot":"","sources":["../../../src/audit/systemic/coveredThemes.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,6EAA6E;AAC7E,wDAAwD;AACxD,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,6DAA6D;AAG7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAwBtD,SAAS,OAAO,CACd,QAA4B,EAC5B,MAAgD;IAEhD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;QACtC,IAAI,CAAC,KAAK;YAAE,SAAS;QACrB,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClD,CAAC;IACD,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SAC3C,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACxD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAA4B;IAE5B,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC;IACvE,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,cAAc,IAAI,EAAE,EAAE,CAAC;YAChD,MAAM,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAChC,IAAI,IAAI;gBAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;QACrD,WAAW,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC7D,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC;QACxC,aAAa,EAAE,QAAQ,CAAC,MAAM;KAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The VERIFIED CALL-SITE MAP a design-review round receives as a read-only,
3
+ * provenanced input.
4
+ *
5
+ * A 2026-07-19 design-check step ran four adversarial rounds; each spawned a
6
+ * FRESH agent that re-grepped the same call-site map from scratch — roughly
7
+ * 135k subagent tokens a round, nearly all of it identical recon. The instinct
8
+ * that this buys independence is wrong in one specific way: it conflates
9
+ * independence of VERDICT with independence of INPUT. What a round must not do
10
+ * is judge work it authored. Being handed a factual map it did not produce
11
+ * leaves the verdict entirely its own.
12
+ *
13
+ * So the map is derived ONCE, by the tool, from artifacts the round did not
14
+ * produce either (the repository manifest and the dependency graph the audit
15
+ * pipeline already extracted), and handed over labelled as prior verified recon.
16
+ * It is a lane ASSET, not a submission: it is RENDERED into the round's prompt
17
+ * (`renderReviewFileMap`), never written to a path any lane's write scope covers,
18
+ * and no submission schema has a field for it — a round has no route by which to
19
+ * write back, because the only thing it hands over is its own findings. Updates
20
+ * go through a separate recon pass (the graph builder), which is the only thing
21
+ * that can change what the next round receives. Otherwise the map quietly
22
+ * absorbs one reviewer's assumption and reaches the next reviewer as fact.
23
+ *
24
+ * Deterministic and content-derived: every array is ordered by a stable key, so
25
+ * the file does not churn between emissions of an unchanged round. A cap that
26
+ * drops entries STATES the drop — a silently truncated map reads as a complete
27
+ * one, which is the failure mode this whole artefact exists to avoid.
28
+ */
29
+ import type { ArtifactBundle } from "../io/artifacts.js";
30
+ export interface ReviewFileMapAnchor {
31
+ /** The repo-relative file the call sites below target. */
32
+ path: string;
33
+ /** Files that reference it (path-sorted), capped — see `callers_omitted`. */
34
+ callers: string[];
35
+ /** How many callers were dropped by the cap (0 when none were). */
36
+ callers_omitted: number;
37
+ /** Files it references (path-sorted), capped — see `callees_omitted`. */
38
+ callees: string[];
39
+ /** How many callees were dropped by the cap (0 when none were). */
40
+ callees_omitted: number;
41
+ }
42
+ export interface ReviewFileMap {
43
+ /** What produced this map — the provenance the reading lane is told to trust. */
44
+ provenance: {
45
+ /** `tool` — the map is machine-derived, never authored by a reviewer. */
46
+ author: "tool";
47
+ /** The artifacts the edges were read from. */
48
+ sources: string[];
49
+ /** Edges consulted, so a thin map is visibly thin rather than silently so. */
50
+ edge_count: number;
51
+ /** Whether an edge category was present at all in the graph. */
52
+ graph_present: boolean;
53
+ };
54
+ /** The anchors, path-sorted. */
55
+ anchors: ReviewFileMapAnchor[];
56
+ /** Anchors dropped by the top-level cap, if any. */
57
+ anchors_omitted: number;
58
+ /**
59
+ * Authored files the graph records NO edge for, so no anchor could be built.
60
+ * Always stated: an omission the reading lane has to infer is the silent
61
+ * truncation this artefact exists to avoid, and these are exactly the files
62
+ * whose absence a round must not read as "nothing depends on it".
63
+ */
64
+ files_without_edges: number;
65
+ }
66
+ /**
67
+ * Build the map from the dependency graph the audit already extracted. Edges are
68
+ * read in both directions per anchor — callers and callees — because the review
69
+ * questions this feeds ("what does this change ripple into") need both and a
70
+ * round that re-derives one direction has re-derived the whole thing.
71
+ */
72
+ export declare function buildReviewFileMap(bundle: ArtifactBundle, options?: {
73
+ maxAnchors?: number;
74
+ }): ReviewFileMap;
75
+ /**
76
+ * Render the map for a prompt. Returned as text rather than JSON so a lane reads
77
+ * it as data-that-was-handed-over; the `provenance` block is stated FIRST and in
78
+ * prose, because the whole point is that this lane did not author it.
79
+ */
80
+ export declare function renderReviewFileMap(map: ReviewFileMap): string[];
81
+ //# sourceMappingURL=reviewFileMap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewFileMap.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAKzD,MAAM,WAAW,mBAAmB;IAClC,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mEAAmE;IACnE,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,mEAAmE;IACnE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,UAAU,EAAE;QACV,yEAAyE;QACzE,MAAM,EAAE,MAAM,CAAC;QACf,8CAA8C;QAC9C,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,8EAA8E;QAC9E,UAAU,EAAE,MAAM,CAAC;QACnB,gEAAgE;QAChE,aAAa,EAAE,OAAO,CAAC;KACxB,CAAC;IACF,gCAAgC;IAChC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,oDAAoD;IACpD,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAKD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,CAAA;CAAO,GACpC,aAAa,CAmEf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,EAAE,CAwEhE"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * The VERIFIED CALL-SITE MAP a design-review round receives as a read-only,
3
+ * provenanced input.
4
+ *
5
+ * A 2026-07-19 design-check step ran four adversarial rounds; each spawned a
6
+ * FRESH agent that re-grepped the same call-site map from scratch — roughly
7
+ * 135k subagent tokens a round, nearly all of it identical recon. The instinct
8
+ * that this buys independence is wrong in one specific way: it conflates
9
+ * independence of VERDICT with independence of INPUT. What a round must not do
10
+ * is judge work it authored. Being handed a factual map it did not produce
11
+ * leaves the verdict entirely its own.
12
+ *
13
+ * So the map is derived ONCE, by the tool, from artifacts the round did not
14
+ * produce either (the repository manifest and the dependency graph the audit
15
+ * pipeline already extracted), and handed over labelled as prior verified recon.
16
+ * It is a lane ASSET, not a submission: it is RENDERED into the round's prompt
17
+ * (`renderReviewFileMap`), never written to a path any lane's write scope covers,
18
+ * and no submission schema has a field for it — a round has no route by which to
19
+ * write back, because the only thing it hands over is its own findings. Updates
20
+ * go through a separate recon pass (the graph builder), which is the only thing
21
+ * that can change what the next round receives. Otherwise the map quietly
22
+ * absorbs one reviewer's assumption and reaches the next reviewer as fact.
23
+ *
24
+ * Deterministic and content-derived: every array is ordered by a stable key, so
25
+ * the file does not churn between emissions of an unchanged round. A cap that
26
+ * drops entries STATES the drop — a silently truncated map reads as a complete
27
+ * one, which is the failure mode this whole artefact exists to avoid.
28
+ */
29
+ import { compareCodeUnits } from "audit-tools/shared";
30
+ /** How many call sites per anchor are listed before the drop is stated. */
31
+ const MAX_CALLERS_PER_ANCHOR = 25;
32
+ /** How many authored files are mapped before the drop is stated. */
33
+ const MAX_ANCHORS = 60;
34
+ /**
35
+ * Build the map from the dependency graph the audit already extracted. Edges are
36
+ * read in both directions per anchor — callers and callees — because the review
37
+ * questions this feeds ("what does this change ripple into") need both and a
38
+ * round that re-derives one direction has re-derived the whole thing.
39
+ */
40
+ export function buildReviewFileMap(bundle, options = {}) {
41
+ const maxAnchors = options.maxAnchors ?? MAX_ANCHORS;
42
+ const graphs = bundle.graph_bundle?.graphs;
43
+ const sources = [];
44
+ const outgoing = new Map();
45
+ const incoming = new Map();
46
+ let edgeCount = 0;
47
+ for (const [kind, edges] of Object.entries(graphs ?? {})) {
48
+ if (!Array.isArray(edges))
49
+ continue;
50
+ let kindCount = 0;
51
+ for (const edge of edges) {
52
+ if (typeof edge !== "object" ||
53
+ edge === null ||
54
+ typeof edge.from !== "string" ||
55
+ typeof edge.to !== "string") {
56
+ continue;
57
+ }
58
+ const { from, to } = edge;
59
+ if (from === to)
60
+ continue;
61
+ (outgoing.get(from) ?? outgoing.set(from, new Set()).get(from)).add(to);
62
+ (incoming.get(to) ?? incoming.set(to, new Set()).get(to)).add(from);
63
+ kindCount += 1;
64
+ }
65
+ if (kindCount > 0)
66
+ sources.push(`${kind} (${kindCount} edge(s))`);
67
+ edgeCount += kindCount;
68
+ }
69
+ sources.sort(compareCodeUnits);
70
+ // Anchors are the files this repository actually authored — the manifest is the
71
+ // authority on that, not the graph's node vocabulary, which may include
72
+ // synthetic roots and external specifiers.
73
+ const authored = (bundle.repo_manifest?.files ?? [])
74
+ .map((file) => file.path)
75
+ .sort(compareCodeUnits);
76
+ const anchors = [];
77
+ let filesWithoutEdges = 0;
78
+ for (const path of authored) {
79
+ const callers = [...(incoming.get(path) ?? [])].sort(compareCodeUnits);
80
+ const callees = [...(outgoing.get(path) ?? [])].sort(compareCodeUnits);
81
+ if (callers.length === 0 && callees.length === 0) {
82
+ filesWithoutEdges += 1;
83
+ continue;
84
+ }
85
+ anchors.push({
86
+ path,
87
+ callers: callers.slice(0, MAX_CALLERS_PER_ANCHOR),
88
+ callers_omitted: Math.max(0, callers.length - MAX_CALLERS_PER_ANCHOR),
89
+ callees: callees.slice(0, MAX_CALLERS_PER_ANCHOR),
90
+ callees_omitted: Math.max(0, callees.length - MAX_CALLERS_PER_ANCHOR),
91
+ });
92
+ }
93
+ return {
94
+ provenance: {
95
+ author: "tool",
96
+ sources,
97
+ edge_count: edgeCount,
98
+ graph_present: graphs !== undefined,
99
+ },
100
+ anchors: anchors.slice(0, maxAnchors),
101
+ anchors_omitted: Math.max(0, anchors.length - maxAnchors),
102
+ files_without_edges: filesWithoutEdges,
103
+ };
104
+ }
105
+ /**
106
+ * Render the map for a prompt. Returned as text rather than JSON so a lane reads
107
+ * it as data-that-was-handed-over; the `provenance` block is stated FIRST and in
108
+ * prose, because the whole point is that this lane did not author it.
109
+ */
110
+ export function renderReviewFileMap(map) {
111
+ const lines = [
112
+ "### Verified call-site map (provenance: machine-derived prior recon — you did NOT author this)",
113
+ "",
114
+ "This map was produced by the audit tool from the dependency graph and the repository manifest " +
115
+ "extracted earlier in this run. It is a factual input, handed to you so this round spends its " +
116
+ "budget on judgment instead of re-deriving the same call-site map from scratch. You are " +
117
+ "expected to TRUST it as a starting point, not to reproduce it.",
118
+ "",
119
+ "**You cannot write back to it.** It is not part of your submission and nothing you return " +
120
+ "modifies it; a correction reaches the next round only through a fresh extraction pass. So if " +
121
+ "it disagrees with what you find in the source, say so explicitly in your finding — name the " +
122
+ "file and the symbol that contradicts the map. Silence would let a wrong map stand as an " +
123
+ "unchallenged premise for the next round. Your VERDICT remains entirely your own; only the " +
124
+ "recon is shared.",
125
+ "",
126
+ `Edges consulted: ${map.provenance.edge_count}` +
127
+ (map.provenance.sources.length > 0
128
+ ? ` — from ${map.provenance.sources.join(", ")}.`
129
+ : map.provenance.graph_present
130
+ ? " — the dependency graph carried no edges."
131
+ : " — no dependency graph was available."),
132
+ "",
133
+ ];
134
+ const noEdgeLine = (count) => `${count} authored file(s) carry no graph edge and are NOT listed — their absence is a gap ` +
135
+ "in this extraction, not a finding that nothing depends on them.";
136
+ if (map.anchors.length === 0) {
137
+ lines.push("No call sites are mapped (no graph edges connect the authored files). Treat this as NO " +
138
+ "RECON rather than as a map showing everything is unconnected — the absence of an edge in " +
139
+ "this repository's extraction is not evidence that no caller exists.", "");
140
+ if (map.files_without_edges > 0) {
141
+ lines.push(noEdgeLine(map.files_without_edges), "");
142
+ }
143
+ return lines;
144
+ }
145
+ for (const anchor of map.anchors) {
146
+ lines.push(`- **${anchor.path}**`);
147
+ lines.push(` - referenced by: ${anchor.callers.join(", ") || "(none recorded)"}` +
148
+ (anchor.callers_omitted > 0
149
+ ? ` — and ${anchor.callers_omitted} more not listed`
150
+ : ""));
151
+ lines.push(` - references: ${anchor.callees.join(", ") || "(none recorded)"}` +
152
+ (anchor.callees_omitted > 0
153
+ ? ` — and ${anchor.callees_omitted} more not listed`
154
+ : ""));
155
+ }
156
+ if (map.anchors_omitted > 0) {
157
+ lines.push("", `⚠ ${map.anchors_omitted} further file(s) with call sites are NOT listed above (this map is ` +
158
+ "capped). Their absence is a cap, not a finding — do not report an unlisted file as having " +
159
+ "no connections.");
160
+ }
161
+ if (map.files_without_edges > 0) {
162
+ // Distinct from the cap above: these are not omitted by a budget, they are
163
+ // files the graph has no edge for at all. Both are drops, so both are stated.
164
+ lines.push("", `⚠ ${noEdgeLine(map.files_without_edges)}`);
165
+ }
166
+ lines.push("");
167
+ return lines;
168
+ }
169
+ //# sourceMappingURL=reviewFileMap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reviewFileMap.js","sourceRoot":"","sources":["../../../src/audit/systemic/reviewFileMap.ts"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"secondOrderAdversaryPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAiG1E;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,sBAAsB,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GAAG,MAAM,CAsFT"}
1
+ {"version":3,"file":"secondOrderAdversaryPrompt.d.ts","sourceRoot":"","sources":["../../../src/audit/systemic/secondOrderAdversaryPrompt.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAwK1E;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,IAAI,EAAE;IACrD,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,sBAAsB,CAAC;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC,GAAG,MAAM,CA+IT"}
@@ -1,9 +1,13 @@
1
+ // sites-pinned: tests/audit/systemic-evidence-projection.test.ts
1
2
  // Phase E — SECOND-ORDER ADVERSARY prompt (host_delegation).
2
3
  //
3
4
  // The adversary is a SEPARATE agent and receives the evidence the earlier
4
5
  // design-review contributors actually produced. Aggregate metrics remain leads,
5
6
  // never a substitute for charters, candidate dispositions, prior findings, and
6
7
  // direct repository/source verification.
8
+ import { summarizeCoveredThemes, } from "./coveredThemes.js";
9
+ import { buildReviewFileMap, renderReviewFileMap } from "./reviewFileMap.js";
10
+ import { SYSTEMIC_FINDING_ID_PREFIX } from "./systemicChallengeLoop.js";
7
11
  function priorFindings(bundle) {
8
12
  const candidates = [
9
13
  ...(bundle.design_assessment?.contract_findings ?? []),
@@ -28,37 +32,70 @@ function renderPriorFindings(findings) {
28
32
  return `- **${finding.id} — ${finding.title}** (${finding.lens}/${finding.severity}): ${finding.summary} [${files || "no files"}]`;
29
33
  });
30
34
  }
35
+ /**
36
+ * The COVERED-THEMES digest — the variation bar's factual half.
37
+ *
38
+ * The banked set is already rendered in full below, and that alone did not stop
39
+ * the loop from re-treading the same ground: round 3 of the 2026-08-21 lap
40
+ * re-raised round 2's item under a fresh id. A flat list answers "what was
41
+ * said"; this answers "what ground is taken", so a round can name the axis it is
42
+ * departing on instead of inferring it from a wall of prose.
43
+ */
44
+ function renderCoveredThemes(themes) {
45
+ if (themes.finding_count === 0) {
46
+ return [
47
+ "Nothing is banked yet — this round SETS the coverage rather than departing from it.",
48
+ ];
49
+ }
50
+ const counts = (entries) => entries.map((entry) => `${entry.value} (${entry.count})`).join(", ") || "none";
51
+ return [
52
+ `${themes.finding_count} improvement(s) are banked, covering:`,
53
+ "",
54
+ `- **Lenses already used:** ${counts(themes.by_lens)}`,
55
+ `- **Categories already used:** ${counts(themes.by_category)}`,
56
+ `- **Components already implicated:** ${themes.files.join(", ") || "none"}`,
57
+ "",
58
+ "That is COVERED GROUND. Re-raising any of it — in the same words or in different ones — " +
59
+ "is not a new finding and will not keep this loop open. This round owes a DEPARTURE: a " +
60
+ "different axis, a different component, or a categorically better approach to something " +
61
+ "the list above does not already name.",
62
+ ];
63
+ }
31
64
  function renderCharterProjection(bundle) {
32
65
  const register = bundle.charter_register;
33
66
  if (!register || register.status === "omitted") {
34
67
  return ["No charter register was produced for this run."];
35
68
  }
69
+ // The three lane goal DAGs unmerged, the correspondences between them, and the
70
+ // verified differences — the accounts stand side by side (never a unified telos).
36
71
  const projection = {
37
- subsystems: register.subsystems.map((subsystem) => ({
38
- node_id: subsystem.node_id,
39
- members: subsystem.members,
40
- charters: subsystem.charters.map((charter) => ({
41
- charter_id: charter.charter_id,
42
- kind: charter.kind,
43
- purpose: charter.purpose,
44
- confidence: charter.confidence,
45
- provenance: charter.provenance,
46
- nominated_alternative: charter.nominated_alternative,
47
- nominated_cost: charter.nominated_cost,
72
+ lanes: register.lanes.map((lane) => ({
73
+ kind: lane.kind,
74
+ nodes: lane.nodes.map((n) => ({
75
+ node_id: n.node_id,
76
+ purpose: n.purpose,
77
+ premise_height: n.premise_height,
78
+ files: n.files,
79
+ confidence: n.confidence,
48
80
  })),
81
+ edges: lane.edges.map((e) => ({ from: e.from, to: e.to })),
49
82
  })),
50
- goal_graph: register.goal_graph,
51
- deltas: register.deltas.map((delta) => ({
52
- delta_id: delta.delta_id,
53
- node_id: delta.node_id,
54
- goal_node_id: delta.goal_node_id,
55
- pair: delta.pair,
56
- kind: delta.kind,
57
- routed_to: delta.routed_to,
58
- summary: delta.summary,
83
+ correspondences: register.correspondences.map((c) => ({
84
+ correspondence_id: c.correspondence_id,
85
+ members: c.members,
86
+ basis: c.basis,
87
+ })),
88
+ differences: register.differences.map((d) => ({
89
+ difference_id: d.difference_id,
90
+ correspondence_id: d.correspondence_id,
91
+ dimension: d.dimension,
92
+ relation: d.relation,
93
+ split: d.split,
94
+ accounts: d.accounts.map((a) => ({ kind: a.kind, claim: a.claim })),
95
+ gap: d.gap,
96
+ routed_to: d.routed_to,
97
+ fidelity: d.fidelity?.verdict,
59
98
  })),
60
- triangulated: register.triangulated,
61
- disagreement: register.disagreement,
62
99
  validation_issues: register.validation_issues,
63
100
  };
64
101
  return ["```json", JSON.stringify(projection, null, 2), "```"];
@@ -89,6 +126,35 @@ function renderAdjudication(bundle) {
89
126
  "```",
90
127
  ];
91
128
  }
129
+ /**
130
+ * WHO the reading lane is — stated to the LANE, not only to the host dispatching it.
131
+ *
132
+ * The adversary's whole value is that it is not the agent that drove the audit:
133
+ * the one voice with no sunk cost in the design the audit just produced. Every
134
+ * other design-review lane says so in its own body (`renderConceptualReviewPrompt`
135
+ * and the perspective/judge prompts open by naming who the reader is and what they
136
+ * must NOT have authored). This lane's constraint lived only in the dispatch
137
+ * envelope (`nextStepCommand.ts`, "must NOT be the agent that drove this audit"),
138
+ * which the HOST reads — so a host that executed the lane inline in its own session
139
+ * satisfied the envelope's letter while breaking its point, and the round's
140
+ * findings were self-review with nothing on any surface recording that. A
141
+ * constraint the worker must obey belongs in the worker's prompt; the
142
+ * auditor-agnostic rule does not let it rest on the dispatcher relaying it.
143
+ */
144
+ function adversaryIdentityLines() {
145
+ return [
146
+ "## Who you are (this is not optional)",
147
+ "",
148
+ "You are a SEPARATE agent from the one that drove this audit. You did not author the audit's " +
149
+ "findings, its charters, its adjudication, or any prior round's improvements — they are all " +
150
+ "inputs handed to you, and you are free to challenge every one of them.",
151
+ "",
152
+ "If you ARE the agent that drove this audit, stop and say so instead of answering: a " +
153
+ "self-review reports this lane compliant while delivering the opposite of what it exists " +
154
+ "for, and nothing downstream can tell the difference from your output alone.",
155
+ "",
156
+ ];
157
+ }
92
158
  /**
93
159
  * Render one systemic challenge round. `evidencePaths` are also granted in the
94
160
  * host step's read set; the prompt names them so the adversary can inspect the
@@ -100,12 +166,14 @@ export function renderSecondOrderAdversaryPrompt(opts) {
100
166
  metricLines.push(`- Max fan-out (out-degree): ${opts.metrics.max_fan_out}`);
101
167
  const bankedFindings = priorFindings(opts.bundle);
102
168
  const evidencePaths = [...new Set(opts.evidencePaths)].sort();
169
+ const fileMap = buildReviewFileMap(opts.bundle);
103
170
  return [
104
171
  "# Design review — systemic improvement-seeking challenge (second-order adversary)",
105
172
  "",
106
173
  `You are a SEPARATE second-order adversary. This is challenge round ${opts.round}.`,
107
174
  `The audit already banked ${bankedFindings.length} distinct finding(s). Push HARDER for what those findings and their contributors missed.`,
108
175
  "",
176
+ ...adversaryIdentityLines(),
109
177
  "## Mandate — optimization / better-way, NOT defect-finding",
110
178
  "",
111
179
  "Do NOT hunt ordinary bugs (other lenses own that). Re-interrogate the system with human-grade pressure for SUPERIOR ALTERNATIVES to things that currently work:",
@@ -121,6 +189,9 @@ export function renderSecondOrderAdversaryPrompt(opts) {
121
189
  "Read these full artifacts before concluding the round. They include the charter register, persisted conceptual judge/adjudication record, and every current-round perspective result:",
122
190
  ...evidencePaths.map((path) => `- \`${path}\``),
123
191
  "",
192
+ "## Prior verified recon — read this BEFORE re-deriving anything",
193
+ "",
194
+ ...renderReviewFileMap(fileMap),
124
195
  "## Stated-purpose / goal / delta projection",
125
196
  "",
126
197
  "This projection comes from `charter_register.json`, not `docs_digest.json`. Treat triangulated telos as a lead, preserve disagreement, and inspect the full artifact when the projection raises a question:",
@@ -134,9 +205,28 @@ export function renderSecondOrderAdversaryPrompt(opts) {
134
205
  "",
135
206
  ...renderPriorFindings(bankedFindings),
136
207
  "",
208
+ "## Covered themes — what this round must depart from",
209
+ "",
210
+ ...renderCoveredThemes(summarizeCoveredThemes(bankedFindings)),
211
+ "",
212
+ "## Variation bar (required)",
213
+ "",
214
+ "For every finding you submit, you must be able to state — in its `summary` — which axis it " +
215
+ "departs on relative to the covered themes above: a component no banked finding names, a " +
216
+ "mechanism class none of them addresses, or a categorically different approach to something " +
217
+ "they only patch. A finding that cannot name its axis is a restatement, and this loop closes " +
218
+ "on restatements rather than counting them as progress.",
219
+ "",
137
220
  "## Repository/source verification (required)",
138
221
  "",
139
- "Use the repository and the strongest structural tools available. For every proposed improvement, inspect exact source sites, trace relevant callers and callees in both directions, and verify the affected paths. Before any negative or exhaustive claim, check structural-index coverage/freshness and directly read every reported gap. If equivalent symbol search, bidirectional tracing, exact snippets, or coverage accounting is unavailable, state that limitation and do not present the claim as comprehensive. Aggregate counts and prior-review consensus are never proof.",
222
+ "Use the repository and the strongest structural tools available. The call-site map above is " +
223
+ "your starting recon — verify the sites it names and the claims you build on them, rather " +
224
+ "than rebuilding it. For every proposed improvement, inspect exact source sites, trace " +
225
+ "relevant callers and callees in both directions, and verify the affected paths. Before any " +
226
+ "negative or exhaustive claim, check structural-index coverage/freshness and directly read " +
227
+ "every reported gap. If equivalent symbol search, bidirectional tracing, exact snippets, or " +
228
+ "coverage accounting is unavailable, state that limitation and do not present the claim as " +
229
+ "comprehensive. Aggregate counts and prior-review consensus are never proof.",
140
230
  "",
141
231
  "## Aggregate metrics (supporting evidence — necessary, NOT sufficient)",
142
232
  "",
@@ -155,7 +245,30 @@ export function renderSecondOrderAdversaryPrompt(opts) {
155
245
  "",
156
246
  "## Loop-until-dry",
157
247
  "",
158
- "The review is done only when consecutive rounds yield NOTHING NEW. If genuine source-backed pressure finds no new improvement this round, submit an empty `findings` array. Otherwise submit only new improvements, each anchored to at least one real component.",
248
+ "The review is done only when consecutive rounds yield NOTHING NEW. If genuine source-backed " +
249
+ "pressure finds no new improvement this round, submit an empty `findings` array — that is a " +
250
+ "QUIET round, and quiet rounds are how this loop ends. Do NOT manufacture a finding to look " +
251
+ "productive, and do NOT withhold a real one to end the loop sooner: either turns the dry " +
252
+ "signal into noise, and the dry signal is the loop's only evidence that the work is done. " +
253
+ "Otherwise submit only new improvements, each anchored to at least one real component.",
254
+ "",
255
+ "The tool also bounds this loop at a fixed number of rounds, so the loop ends whether or not " +
256
+ "it is dry. Stopping early by hand is still yours to do, and it is RECORDED as yours:",
257
+ "",
258
+ "- **If this round reaches nothing new** — submit `\"findings\": []` and stop normally.",
259
+ "- **If you are stopping before the loop is dry** (budget spent, no further yield available, " +
260
+ "the remaining ground genuinely exhausted by judgment) — say so explicitly with a top-level " +
261
+ "`stop` object (see Output below) and state the reason. That ending is recorded as a " +
262
+ "HOST-FORCED stop, distinct from convergence. Never submit an empty `findings` array to " +
263
+ "mean \"I am stopping\": an empty array asserts the round found nothing new, and if that is " +
264
+ "not true you have corrupted the loop's only convergence evidence.",
265
+ "",
266
+ "## Finding ids",
267
+ "",
268
+ "Finding ids are MINTED BY THE TOOL, not by you: whatever you write is namespaced into " +
269
+ `\`${SYSTEMIC_FINDING_ID_PREFIX}<round>-<your id>\`, so the same id in two different rounds ` +
270
+ "can never stand for two different findings. Supply a short, stable id of your own only to " +
271
+ "keep your own submission legible; it will be prefixed.",
159
272
  "",
160
273
  "## Output",
161
274
  "",
@@ -164,19 +277,29 @@ export function renderSecondOrderAdversaryPrompt(opts) {
164
277
  "```json",
165
278
  "{",
166
279
  ' "findings": [{',
167
- ' "id": "<stable id>",',
280
+ ' "id": "<your short id; the tool prefixes it with the round>",',
168
281
  ' "title": "<the improvement>",',
169
282
  ' "category": "systemic_improvement",',
170
283
  ' "severity": "low|medium|high",',
171
284
  ' "confidence": "low|medium|high",',
172
285
  ' "lens": "<the TRUE lens: tests|performance|operability|...>",',
173
- ' "summary": "<what to do, why it is better, and source verification>",',
286
+ ' "summary": "<what to do, why it is better, which axis it departs on, and source verification>",',
174
287
  ' "evidence": ["<symbol you read, the file holding it, and what you found there>"],',
175
288
  ' "affected_files": [{ "path": "<a real repo path>" }]',
176
289
  " }]",
177
290
  "}",
178
291
  "```",
179
292
  "",
293
+ "To stop the loop early — include this ALONGSIDE any findings you are submitting, so the work " +
294
+ "you did deliver is still banked:",
295
+ "",
296
+ "```json",
297
+ "{",
298
+ ' "findings": [ /* ... */ ],',
299
+ ' "stop": { "forced": true, "reason": "<why the loop is being stopped before it is dry>" }',
300
+ "}",
301
+ "```",
302
+ "",
180
303
  ].join("\n");
181
304
  }
182
305
  //# sourceMappingURL=secondOrderAdversaryPrompt.js.map