audit-tools 0.52.0 → 0.52.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/audit/cli/auditStep.d.ts.map +1 -1
  2. package/dist/audit/cli/auditStep.js +2 -2
  3. package/dist/audit/cli/auditStep.js.map +1 -1
  4. package/dist/audit/cli/charterClarificationPrompt.d.ts +16 -8
  5. package/dist/audit/cli/charterClarificationPrompt.d.ts.map +1 -1
  6. package/dist/audit/cli/charterClarificationPrompt.js +95 -42
  7. package/dist/audit/cli/charterClarificationPrompt.js.map +1 -1
  8. package/dist/audit/cli/charterComparisonPrompt.d.ts +16 -6
  9. package/dist/audit/cli/charterComparisonPrompt.d.ts.map +1 -1
  10. package/dist/audit/cli/charterComparisonPrompt.js +76 -29
  11. package/dist/audit/cli/charterComparisonPrompt.js.map +1 -1
  12. package/dist/audit/cli/charterExtractionPrompt.d.ts +5 -4
  13. package/dist/audit/cli/charterExtractionPrompt.d.ts.map +1 -1
  14. package/dist/audit/cli/charterExtractionPrompt.js +64 -42
  15. package/dist/audit/cli/charterExtractionPrompt.js.map +1 -1
  16. package/dist/audit/cli/charterFidelityPrompt.d.ts +17 -4
  17. package/dist/audit/cli/charterFidelityPrompt.d.ts.map +1 -1
  18. package/dist/audit/cli/charterFidelityPrompt.js +72 -21
  19. package/dist/audit/cli/charterFidelityPrompt.js.map +1 -1
  20. package/dist/audit/cli/dispatch/hostHandoff.d.ts +23 -1
  21. package/dist/audit/cli/dispatch/hostHandoff.d.ts.map +1 -1
  22. package/dist/audit/cli/dispatch/hostHandoff.js +204 -41
  23. package/dist/audit/cli/dispatch/hostHandoff.js.map +1 -1
  24. package/dist/audit/cli/dispatch/packetFilter.d.ts +8 -0
  25. package/dist/audit/cli/dispatch/packetFilter.d.ts.map +1 -1
  26. package/dist/audit/cli/fanoutLanes.d.ts.map +1 -1
  27. package/dist/audit/cli/fanoutLanes.js +20 -4
  28. package/dist/audit/cli/fanoutLanes.js.map +1 -1
  29. package/dist/audit/cli/laneValidators.d.ts +19 -7
  30. package/dist/audit/cli/laneValidators.d.ts.map +1 -1
  31. package/dist/audit/cli/laneValidators.js +73 -18
  32. package/dist/audit/cli/laneValidators.js.map +1 -1
  33. package/dist/audit/cli/nextStepCommand.d.ts.map +1 -1
  34. package/dist/audit/cli/nextStepCommand.js +13 -6
  35. package/dist/audit/cli/nextStepCommand.js.map +1 -1
  36. package/dist/audit/cli/nextStepHelpers.d.ts +25 -2
  37. package/dist/audit/cli/nextStepHelpers.d.ts.map +1 -1
  38. package/dist/audit/cli/nextStepHelpers.js +105 -35
  39. package/dist/audit/cli/nextStepHelpers.js.map +1 -1
  40. package/dist/audit/cli/recoverSubmissionCommand.d.ts.map +1 -1
  41. package/dist/audit/cli/recoverSubmissionCommand.js +89 -4
  42. package/dist/audit/cli/recoverSubmissionCommand.js.map +1 -1
  43. package/dist/audit/cli/sampleRunCommand.d.ts +10 -0
  44. package/dist/audit/cli/sampleRunCommand.d.ts.map +1 -1
  45. package/dist/audit/cli/semanticReviewStep.d.ts +4 -4
  46. package/dist/audit/cli/semanticReviewStep.d.ts.map +1 -1
  47. package/dist/audit/cli/semanticReviewStep.js +35 -71
  48. package/dist/audit/cli/semanticReviewStep.js.map +1 -1
  49. package/dist/audit/contracts/findingContractPrompt.d.ts.map +1 -1
  50. package/dist/audit/contracts/findingContractPrompt.js +7 -1
  51. package/dist/audit/contracts/findingContractPrompt.js.map +1 -1
  52. package/dist/audit/contracts/workerSchemas.d.ts +280 -4
  53. package/dist/audit/contracts/workerSchemas.d.ts.map +1 -1
  54. package/dist/audit/contracts/workerSchemas.js +24 -2
  55. package/dist/audit/contracts/workerSchemas.js.map +1 -1
  56. package/dist/audit/orchestrator/charterClarificationExecutor.d.ts.map +1 -1
  57. package/dist/audit/orchestrator/charterClarificationExecutor.js +39 -0
  58. package/dist/audit/orchestrator/charterClarificationExecutor.js.map +1 -1
  59. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts +12 -5
  60. package/dist/audit/orchestrator/charterExtractionExecutor.d.ts.map +1 -1
  61. package/dist/audit/orchestrator/charterExtractionExecutor.js +39 -9
  62. package/dist/audit/orchestrator/charterExtractionExecutor.js.map +1 -1
  63. package/dist/audit/orchestrator/designReviewPrompt.d.ts +7 -0
  64. package/dist/audit/orchestrator/designReviewPrompt.d.ts.map +1 -1
  65. package/dist/audit/orchestrator/designReviewPrompt.js +174 -19
  66. package/dist/audit/orchestrator/designReviewPrompt.js.map +1 -1
  67. package/dist/audit/orchestrator/intentCheckpointGate.d.ts.map +1 -1
  68. package/dist/audit/orchestrator/intentCheckpointGate.js +1 -5
  69. package/dist/audit/orchestrator/intentCheckpointGate.js.map +1 -1
  70. package/dist/audit/orchestrator/requeueCommand.d.ts +8 -0
  71. package/dist/audit/orchestrator/requeueCommand.d.ts.map +1 -1
  72. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.d.ts.map +1 -1
  73. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js +94 -71
  74. package/dist/audit/orchestrator/selectiveDeepening/lensVerification.js.map +1 -1
  75. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts +0 -2
  76. package/dist/audit/orchestrator/selectiveDeepening/shared.d.ts.map +1 -1
  77. package/dist/audit/orchestrator/selectiveDeepening/shared.js +9 -2
  78. package/dist/audit/orchestrator/selectiveDeepening/shared.js.map +1 -1
  79. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.d.ts.map +1 -1
  80. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js +28 -4
  81. package/dist/audit/orchestrator/selectiveDeepening/stewardFollowup.js.map +1 -1
  82. package/dist/audit/reporting/synthesis.d.ts +16 -3
  83. package/dist/audit/reporting/synthesis.d.ts.map +1 -1
  84. package/dist/audit/reporting/synthesis.js +40 -11
  85. package/dist/audit/reporting/synthesis.js.map +1 -1
  86. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts +26 -1
  87. package/dist/audit/reporting/synthesisNarrativePrompt.d.ts.map +1 -1
  88. package/dist/audit/reporting/synthesisNarrativePrompt.js +53 -13
  89. package/dist/audit/reporting/synthesisNarrativePrompt.js.map +1 -1
  90. package/dist/audit/systemic/secondOrderAdversaryPrompt.d.ts.map +1 -1
  91. package/dist/audit/systemic/secondOrderAdversaryPrompt.js +67 -40
  92. package/dist/audit/systemic/secondOrderAdversaryPrompt.js.map +1 -1
  93. package/dist/audit/systemic/systemicChallengeLoop.d.ts.map +1 -1
  94. package/dist/audit/systemic/systemicChallengeLoop.js +13 -1
  95. package/dist/audit/systemic/systemicChallengeLoop.js.map +1 -1
  96. package/dist/audit/types/conceptualAdjudication.d.ts +26 -2
  97. package/dist/audit/types/conceptualAdjudication.d.ts.map +1 -1
  98. package/dist/audit/types/conceptualAdjudication.js +26 -7
  99. package/dist/audit/types/conceptualAdjudication.js.map +1 -1
  100. package/dist/audit/types.d.ts +279 -0
  101. package/dist/audit/types.d.ts.map +1 -1
  102. package/dist/audit/types.js +52 -0
  103. package/dist/audit/types.js.map +1 -1
  104. package/dist/audit/validation/auditResults.d.ts.map +1 -1
  105. package/dist/audit/validation/auditResults.js +51 -6
  106. package/dist/audit/validation/auditResults.js.map +1 -1
  107. package/dist/audit/validation/ingestIssueCodes.d.ts +3 -1
  108. package/dist/audit/validation/ingestIssueCodes.d.ts.map +1 -1
  109. package/dist/audit/validation/ingestIssueCodes.js +27 -15
  110. package/dist/audit/validation/ingestIssueCodes.js.map +1 -1
  111. package/dist/remediate/contractPipeline/sketchSource.d.ts +13 -3
  112. package/dist/remediate/contractPipeline/sketchSource.d.ts.map +1 -1
  113. package/dist/remediate/contractPipeline/sketchSource.js +14 -8
  114. package/dist/remediate/contractPipeline/sketchSource.js.map +1 -1
  115. package/dist/remediate/intake.d.ts +140 -36
  116. package/dist/remediate/intake.d.ts.map +1 -1
  117. package/dist/remediate/intake.js +159 -38
  118. package/dist/remediate/intake.js.map +1 -1
  119. package/dist/remediate/intent/checkpointFilter.d.ts +1 -2
  120. package/dist/remediate/intent/checkpointFilter.d.ts.map +1 -1
  121. package/dist/remediate/intent/checkpointFilter.js +1 -5
  122. package/dist/remediate/intent/checkpointFilter.js.map +1 -1
  123. package/dist/remediate/phases/close.d.ts.map +1 -1
  124. package/dist/remediate/phases/close.js +2 -2
  125. package/dist/remediate/phases/close.js.map +1 -1
  126. package/dist/remediate/phases/plan.d.ts +1 -1
  127. package/dist/remediate/review/reviewGate.d.ts +68 -39
  128. package/dist/remediate/review/reviewGate.d.ts.map +1 -1
  129. package/dist/remediate/review/reviewGate.js +133 -50
  130. package/dist/remediate/review/reviewGate.js.map +1 -1
  131. package/dist/remediate/state/store.d.ts +1 -2
  132. package/dist/remediate/state/store.d.ts.map +1 -1
  133. package/dist/remediate/state/store.js +124 -3
  134. package/dist/remediate/state/store.js.map +1 -1
  135. package/dist/remediate/state/types.d.ts +28 -4
  136. package/dist/remediate/state/types.d.ts.map +1 -1
  137. package/dist/remediate/state/types.js.map +1 -1
  138. package/dist/remediate/steps/contractPipeline.d.ts +17 -1
  139. package/dist/remediate/steps/contractPipeline.d.ts.map +1 -1
  140. package/dist/remediate/steps/contractPipeline.js +100 -52
  141. package/dist/remediate/steps/contractPipeline.js.map +1 -1
  142. package/dist/remediate/steps/contractPipelinePrompts.d.ts +32 -8
  143. package/dist/remediate/steps/contractPipelinePrompts.d.ts.map +1 -1
  144. package/dist/remediate/steps/contractPipelinePrompts.js +145 -131
  145. package/dist/remediate/steps/contractPipelinePrompts.js.map +1 -1
  146. package/dist/remediate/steps/dispatch/hostHandoff.d.ts +6 -4
  147. package/dist/remediate/steps/dispatch/hostHandoff.d.ts.map +1 -1
  148. package/dist/remediate/steps/dispatch/hostHandoff.js +291 -155
  149. package/dist/remediate/steps/dispatch/hostHandoff.js.map +1 -1
  150. package/dist/remediate/steps/intakeResolver.d.ts +1 -1
  151. package/dist/remediate/steps/intakeResolver.d.ts.map +1 -1
  152. package/dist/remediate/steps/intakeResolver.js +50 -49
  153. package/dist/remediate/steps/intakeResolver.js.map +1 -1
  154. package/dist/remediate/steps/nextStep.d.ts.map +1 -1
  155. package/dist/remediate/steps/nextStep.js +315 -288
  156. package/dist/remediate/steps/nextStep.js.map +1 -1
  157. package/dist/remediate/steps/prompts.d.ts +10 -3
  158. package/dist/remediate/steps/prompts.d.ts.map +1 -1
  159. package/dist/remediate/steps/prompts.js +191 -228
  160. package/dist/remediate/steps/prompts.js.map +1 -1
  161. package/dist/remediate/steps/types.d.ts +2 -2
  162. package/dist/remediate/steps/types.d.ts.map +1 -1
  163. package/dist/remediate/steps/types.js +10 -3
  164. package/dist/remediate/steps/types.js.map +1 -1
  165. package/dist/remediate/validation/artifacts.d.ts.map +1 -1
  166. package/dist/remediate/validation/artifacts.js +5 -22
  167. package/dist/remediate/validation/artifacts.js.map +1 -1
  168. package/dist/remediate/validation/contractPipeline.d.ts.map +1 -1
  169. package/dist/remediate/validation/contractPipeline.js +25 -8
  170. package/dist/remediate/validation/contractPipeline.js.map +1 -1
  171. package/dist/remediate/validation/remediationState.d.ts +0 -1
  172. package/dist/remediate/validation/remediationState.d.ts.map +1 -1
  173. package/dist/remediate/validation/remediationState.js +1 -20
  174. package/dist/remediate/validation/remediationState.js.map +1 -1
  175. package/dist/shared/decompose/charterClarification.d.ts +7 -0
  176. package/dist/shared/decompose/charterClarification.d.ts.map +1 -1
  177. package/dist/shared/decompose/charterClarification.js +8 -1
  178. package/dist/shared/decompose/charterClarification.js.map +1 -1
  179. package/dist/shared/decompose/charterExtraction.d.ts +204 -16
  180. package/dist/shared/decompose/charterExtraction.d.ts.map +1 -1
  181. package/dist/shared/decompose/charterExtraction.js +70 -13
  182. package/dist/shared/decompose/charterExtraction.js.map +1 -1
  183. package/dist/shared/decompose/systemicChallenge.d.ts +42 -1
  184. package/dist/shared/decompose/systemicChallenge.d.ts.map +1 -1
  185. package/dist/shared/decompose/systemicChallenge.js +51 -0
  186. package/dist/shared/decompose/systemicChallenge.js.map +1 -1
  187. package/dist/shared/index.d.ts +14 -11
  188. package/dist/shared/index.d.ts.map +1 -1
  189. package/dist/shared/index.js +16 -9
  190. package/dist/shared/index.js.map +1 -1
  191. package/dist/shared/io/stepContractWriter.d.ts.map +1 -1
  192. package/dist/shared/io/stepContractWriter.js +13 -4
  193. package/dist/shared/io/stepContractWriter.js.map +1 -1
  194. package/dist/shared/submission/hostHandoffCore.d.ts +7 -0
  195. package/dist/shared/submission/hostHandoffCore.d.ts.map +1 -1
  196. package/dist/shared/submission/hostHandoffCore.js +15 -2
  197. package/dist/shared/submission/hostHandoffCore.js.map +1 -1
  198. package/dist/shared/submission/hostResultOutcomes.d.ts +60 -10
  199. package/dist/shared/submission/hostResultOutcomes.d.ts.map +1 -1
  200. package/dist/shared/submission/hostResultOutcomes.js +42 -10
  201. package/dist/shared/submission/hostResultOutcomes.js.map +1 -1
  202. package/dist/shared/submission/ingestReport.d.ts +54 -0
  203. package/dist/shared/submission/ingestReport.d.ts.map +1 -0
  204. package/dist/shared/submission/ingestReport.js +44 -0
  205. package/dist/shared/submission/ingestReport.js.map +1 -0
  206. package/dist/shared/submission/ingestionChecks.d.ts +8 -13
  207. package/dist/shared/submission/ingestionChecks.d.ts.map +1 -1
  208. package/dist/shared/submission/ingestionChecks.js +9 -14
  209. package/dist/shared/submission/ingestionChecks.js.map +1 -1
  210. package/dist/shared/submission/submissionClassifier.d.ts +6 -0
  211. package/dist/shared/submission/submissionClassifier.d.ts.map +1 -1
  212. package/dist/shared/submission/submissionClassifier.js +16 -0
  213. package/dist/shared/submission/submissionClassifier.js.map +1 -1
  214. package/dist/shared/submission/workerPromptBinding.d.ts +18 -0
  215. package/dist/shared/submission/workerPromptBinding.d.ts.map +1 -0
  216. package/dist/shared/submission/workerPromptBinding.js +38 -0
  217. package/dist/shared/submission/workerPromptBinding.js.map +1 -0
  218. package/dist/shared/tooling/exec.d.ts +24 -0
  219. package/dist/shared/tooling/exec.d.ts.map +1 -1
  220. package/dist/shared/tooling/exec.js +30 -0
  221. package/dist/shared/tooling/exec.js.map +1 -1
  222. package/dist/shared/types/charter.d.ts +143 -7
  223. package/dist/shared/types/charter.d.ts.map +1 -1
  224. package/dist/shared/types/charter.js +63 -7
  225. package/dist/shared/types/charter.js.map +1 -1
  226. package/dist/shared/types/charterPacket.d.ts +13 -0
  227. package/dist/shared/types/charterPacket.d.ts.map +1 -1
  228. package/dist/shared/types/charterPacket.js.map +1 -1
  229. package/dist/shared/types/contractPipeline/obligations.d.ts +30 -11
  230. package/dist/shared/types/contractPipeline/obligations.d.ts.map +1 -1
  231. package/dist/shared/types/contractPipeline/obligations.js +6 -1
  232. package/dist/shared/types/contractPipeline/obligations.js.map +1 -1
  233. package/dist/shared/types/contractPropertyShapes.d.ts.map +1 -1
  234. package/dist/shared/types/contractPropertyShapes.js +13 -0
  235. package/dist/shared/types/contractPropertyShapes.js.map +1 -1
  236. package/dist/shared/types/finding.d.ts +154 -15
  237. package/dist/shared/types/finding.d.ts.map +1 -1
  238. package/dist/shared/types/finding.js +41 -5
  239. package/dist/shared/types/finding.js.map +1 -1
  240. package/dist/shared/types/intentCheckpoint.d.ts +26 -40
  241. package/dist/shared/types/intentCheckpoint.d.ts.map +1 -1
  242. package/dist/shared/types/intentCheckpoint.js +30 -33
  243. package/dist/shared/types/intentCheckpoint.js.map +1 -1
  244. package/dist/shared/types/remediationOutcome.d.ts +8 -8
  245. package/dist/shared/validation/citationGrounding.d.ts +29 -5
  246. package/dist/shared/validation/citationGrounding.d.ts.map +1 -1
  247. package/dist/shared/validation/citationGrounding.js +56 -9
  248. package/dist/shared/validation/citationGrounding.js.map +1 -1
  249. package/dist/shared/validation/designFindingGrounding.d.ts +30 -9
  250. package/dist/shared/validation/designFindingGrounding.d.ts.map +1 -1
  251. package/dist/shared/validation/designFindingGrounding.js +32 -12
  252. package/dist/shared/validation/designFindingGrounding.js.map +1 -1
  253. package/docs/audit-pkg/contracts.md +4 -5
  254. package/package.json +1 -1
  255. package/schemas/audit_result.schema.json +51 -0
  256. package/schemas/audit_results.schema.json +51 -0
  257. package/schemas/audit_task.schema.json +44 -0
  258. package/schemas/finding.schema.json +4 -0
@@ -1,5 +1,5 @@
1
1
  import { findingLead, renderFindingBadgeBody, renderPromptCommand, } from "audit-tools/shared";
2
- import { INTAKE_CLARIFICATION_SCHEMA_VERSION, INTAKE_SOURCE_MANIFEST_SCHEMA_VERSION, INTAKE_SUMMARY_SCHEMA_VERSION, blockingIntakeQuestions, } from "../intake.js";
2
+ import { INTAKE_CLARIFICATION_SCHEMA_VERSION, INTAKE_SUMMARY_SCHEMA_VERSION, blockingIntakeQuestions, } from "../intake.js";
3
3
  export function loaderCommand(command) {
4
4
  const args = Array.isArray(command)
5
5
  ? command
@@ -9,17 +9,68 @@ export function loaderCommand(command) {
9
9
  function blockedItems(state) {
10
10
  return Object.values(state.items ?? {}).filter((item) => item.status === "blocked");
11
11
  }
12
- export function clarificationPrompt(clarifications, resolutionPath, refusal) {
13
- return `
14
- # Resolve Remediation Clarifications
15
- ${refusal
12
+ /**
13
+ * The resolution-entry rules: an example entry, the three actions as a table,
14
+ * the `scope_additions` rule, and the whole-file refusal. They state exactly
15
+ * what the one resolution parser (`readPlanClarificationResolutions`,
16
+ * nextStep.ts) accepts.
17
+ */
18
+ function resolutionEntryRules(firstId, rationaleExample) {
19
+ return `\`\`\`json
20
+ [
21
+ {
22
+ "finding_id": "${firstId}",
23
+ "action": "clarified",
24
+ "rationale": "${rationaleExample}"
25
+ }
26
+ ]
27
+ \`\`\`
28
+
29
+ The file is a JSON array with one entry per finding. Each entry has
30
+ \`finding_id\`, \`action\` and, for \`clarified\`, \`rationale\`. Use one of these
31
+ three actions:
32
+
33
+ | \`action\` | Use it when | Effect |
34
+ |---|---|---|
35
+ | \`clarified\` | The user answered, or the question was not ambiguous after all. | The fix continues. \`rationale\` is REQUIRED and must not be empty: it carries the answer to the worker. |
36
+ | \`reject_finding\` | The finding itself is not a real issue. | The finding is DROPPED. Never use it to say only that the question was not ambiguous. |
37
+ | \`defer\` | The user chose to skip this finding in this run. | The finding is not fixed in this run. Only the user decides a deferral. |
38
+
39
+ A \`clarified\` entry can also have \`scope_additions\`: a list of files that the
40
+ answer adds to the fix's write scope, such as a test the fix must create. Write
41
+ each path relative to the repository root. A path may name a new file, but its
42
+ directory must already contain a file that git tracks. Do not put
43
+ \`scope_additions\` on a \`reject_finding\` or \`defer\` entry. Never edit the
44
+ plan's \`touched_files\` by hand.
45
+
46
+ The tool refuses the WHOLE file when any entry is wrong: an unknown action, a
47
+ missing or empty \`rationale\` on \`clarified\`, a \`scope_additions\` path that
48
+ breaks the rule above, a duplicate \`finding_id\`, or an id outside the set below.
49
+ The refusal names the entry and the field. Nothing is applied, and this step
50
+ comes back.`;
51
+ }
52
+ /**
53
+ * The one refusal banner every resolution prompt shows after the tool refused
54
+ * and archived the previous file. The reason names each problem, so the banner
55
+ * does not guess which kind of problem it was.
56
+ */
57
+ function refusalBanner(refusal, outcome) {
58
+ return refusal
16
59
  ? `
17
- > ⚠ **Your previous resolution was REFUSED and archived — nothing was applied.**
60
+ > ⚠ **Your previous resolution was REFUSED and archived — nothing was ${outcome}.**
18
61
  > ${refusal}
19
- > Re-submit the WHOLE resolution with ids drawn only from the set below.
62
+ > Fix each problem named above. Then re-submit the WHOLE file.
20
63
  `
21
- : ""}
22
- Ask the user to resolve all clarifications in one batched response.
64
+ : "";
65
+ }
66
+ export function clarificationPrompt(clarifications, resolutionPath, refusal) {
67
+ const ids = clarifications.map((c) => c.finding_id);
68
+ const count = clarifications.length;
69
+ return `
70
+ # Resolve Remediation Clarifications
71
+ ${refusalBanner(refusal, "applied")}
72
+ Workers paused ${count} finding${count === 1 ? "" : "s"} because each needs an
73
+ answer from the user. Ask the user all of the questions in one message.
23
74
 
24
75
  ${clarifications
25
76
  .map((item) => `
@@ -35,35 +86,13 @@ After the user answers, write JSON to exactly:
35
86
 
36
87
  \`${resolutionPath}\`
37
88
 
38
- \`\`\`json
39
- [
40
- {
41
- "finding_id": "...",
42
- "action": "clarified",
43
- "rationale": "...",
44
- "scope_additions": ["optional — files the answer ADDS to the fix's write scope"]
45
- }
46
- ]
47
- \`\`\`
48
-
49
- Per item use \`"action": "clarified"\` (the user answered, OR there was no real
50
- ambiguity after all — proceed with the finding, put the answer/decision in
51
- \`rationale\`), \`"action": "reject_finding"\` (the FINDING itself is not a real
52
- issue — this DROPS it, so use it only to discard a finding, never just to say the
53
- question wasn't ambiguous), or \`"action": "defer"\` (the user explicitly chose to
54
- skip it this run).
55
-
56
- When the answer requires files outside the item's current write scope — a test
57
- the fix must create, the source a generated artifact mirrors, a new shared
58
- module, a manifest — list them (repo-relative) in \`scope_additions\`: the tool
59
- widens the owning block and re-mints the work item. NEVER edit the plan's
60
- \`touched_files\` by hand. An entry that does not resolve beneath the repository
61
- root, or whose directory does not exist in the tracked tree, refuses the whole
62
- resolution and re-presents this step.
89
+ ${resolutionEntryRules(ids[0] ?? "F-001", "the user's answer, in words the worker can act on")}
63
90
 
64
91
  \`finding_id\` MUST be drawn from this closed set (copy, never retype):
65
- ${clarifications.map((c) => `\`${c.finding_id}\``).join(", ") || "_(none)_"}. An id
66
- outside it refuses the whole resolution and re-presents this step.
92
+ ${ids.map((id) => `\`${id}\``).join(", ") || "_(none)_"}.
93
+
94
+ You can answer only some of the findings. A finding with no entry stays paused,
95
+ and a later step asks about it again.
67
96
 
68
97
  Then run \`${loaderCommand("next-step")}\`.
69
98
  `;
@@ -80,71 +109,48 @@ Then run \`${loaderCommand("next-step")}\`.
80
109
  * host writes an empty array to proceed — no user round is forced on a clean plan.
81
110
  */
82
111
  export function ambiguityReviewPrompt(candidates, resolutionPath, validFindingIds = [], refusal) {
83
- const candidateBlock = candidates.length
84
- ? candidates
85
- .map((item) => `
112
+ const count = candidates.length;
113
+ const intro = count
114
+ ? `The tool found ${count} candidate ambigu${count === 1 ? "ity" : "ities"} in the remediation plan. A candidate is a
115
+ starting point, not a final list.`
116
+ : `The tool found no candidate ambiguity in the remediation plan. Still review
117
+ the findings in the set below yourself.`;
118
+ const candidateBlock = candidates
119
+ .map((item) => `
86
120
  ## ${item.finding_id}
87
121
 
88
122
  - Category: ${item.category}
89
- - Candidate ambiguity: ${item.description}`)
90
- .join("\n")
91
- : "_(no deterministic candidates — still review the plan's findings yourself)_";
123
+ - Candidate: ${item.description}
124
+ `)
125
+ .join("");
126
+ const firstId = candidates[0]?.finding_id ?? validFindingIds[0] ?? "F-001";
92
127
  return `
93
- # Resolve scoping/judgment ambiguity BEFORE implementing
94
- ${refusal
95
- ? `
96
- > ⚠ **Your previous resolution was REFUSED and archived — nothing was applied.**
97
- > ${refusal}
98
- > Re-submit the WHOLE resolution with ids drawn only from the valid set below.
99
- `
100
- : ""}
101
- Below are deterministic **candidate** ambiguities in the remediation plan. They
102
- are starting points, not a final list.
103
-
104
- 1. **Review each candidate against the code** (read the cited files / repo). Drop
105
- any that are not genuinely ambiguous.
106
- 2. **Add any ambiguity you find** that the heuristics missed — anything where the
107
- right scope, the intended behavior, or whether to act at all is unclear.
108
- 3. **Batch every genuine ambiguity into ONE round** of user questions. Resolve
109
- them all now; do not let any scoping/judgment question slip to mid-run triage.
110
-
128
+ # Resolve ambiguity in the plan before implementation
129
+ ${refusalBanner(refusal, "applied")}
130
+ ${intro}
111
131
  ${candidateBlock}
132
+ Do these steps:
112
133
 
113
- After the user answers (or if you determined there is nothing genuinely
114
- ambiguous), write JSON to exactly:
134
+ 1. Read the cited files for each candidate. Drop a candidate that is not a real
135
+ ambiguity.
136
+ 2. Add each real ambiguity that the candidates missed: an unclear scope, an
137
+ unclear intended behavior, or an unclear choice to fix at all. It can be about
138
+ any finding in the set below.
139
+ 3. Ask the user all of the remaining questions in one message. Do not leave a
140
+ scope question for a later step.
141
+
142
+ After the user answers, write JSON to exactly:
115
143
 
116
144
  \`${resolutionPath}\`
117
145
 
118
- \`\`\`json
119
- [
120
- {
121
- "finding_id": "...",
122
- "action": "clarified",
123
- "rationale": "the user's answer / decided scope",
124
- "scope_additions": ["optional — files the answer ADDS to the fix's write scope"]
125
- }
126
- ]
127
- \`\`\`
146
+ If no real ambiguity remains, write \`[]\`. The plan then continues unchanged.
147
+
148
+ ${resolutionEntryRules(firstId, "the user's answer: the scope the fix must have")}
149
+
150
+ \`finding_id\` MUST be drawn from this closed set (copy, never retype):
151
+ ${validFindingIds.map((id) => `\`${id}\``).join(", ") || "_(none)_"}.
128
152
 
129
- Per item: \`"action": "clarified"\` (answered, OR you decided it was not genuinely
130
- ambiguous — proceed with the finding, put the answer/decision in \`rationale\`),
131
- \`"action": "reject_finding"\` (the FINDING itself is not a real issue — this DROPS
132
- it; never use it merely to say a question wasn't ambiguous, or you will lose a
133
- finding the review gate approved), or \`"action": "defer"\` (the user explicitly
134
- chose to skip it this run). Deferral is the **user's** call — never decide it
135
- unilaterally. Write \`[]\` if nothing is genuinely ambiguous.
136
-
137
- When an answer requires files outside the finding's current write scope — a test
138
- the fix must create, the source a generated artifact mirrors, a new shared
139
- module, a manifest — list them (repo-relative) in \`scope_additions\`: the tool
140
- widens the owning block's write scope in-band. NEVER edit the plan's
141
- \`touched_files\` by hand. An entry that does not resolve beneath the repository
142
- root, or whose directory does not exist in the tracked tree, refuses the whole
143
- resolution and re-presents this step.
144
-
145
- \`finding_id\` MUST be drawn from the plan's closed id set (copy, never retype):
146
- ${validFindingIds.map((id) => `\`${id}\``).join(", ") || "_(none)_"}. An id outside
147
- it refuses the whole resolution and re-presents this step.
153
+ A finding with no entry continues as planned.
148
154
 
149
155
  Then run \`${loaderCommand("next-step")}\`.
150
156
  `;
@@ -154,13 +160,13 @@ Then run \`${loaderCommand("next-step")}\`.
154
160
  * deterministic work — bucketed every original finding by review-necessity,
155
161
  * with a rationale and a coarse implementation cost. The host's job is the
156
162
  * semantic slot the tool cannot fill: present each item to the user with the
157
- * pros/cons of acting vs. not, and collect approve/disapprove. The gate exists
163
+ * pros/cons of acting vs. not, and collect approve/decline. The gate exists
158
164
  * because design-review (strategic) findings were previously swept to a terminal
159
165
  * disposition inside quality-tail blocks without ever being shown — so the
160
166
  * strategic tier MUST be presented item-by-item, never rubber-stamped.
161
167
  *
162
168
  * Default is approve-all: an empty/absent resolution proceeds with every
163
- * finding. Disapproved items are RECORDED with a reason, never silently closed.
169
+ * finding. Declined items are RECORDED with a reason, never silently closed.
164
170
  */
165
171
  export function reviewApprovalPrompt(request, resolutionPath, refusal) {
166
172
  const tierSections = request.tiers
@@ -183,28 +189,19 @@ export function reviewApprovalPrompt(request, resolutionPath, refusal) {
183
189
  badge,
184
190
  `- Why this tier: ${item.rationale}`,
185
191
  `- Implementation cost (blast radius): \`${item.implementation_cost}\``,
186
- "- **Present to the user with the pros/cons of acting vs. not acting, then record their decision.**",
187
192
  ].join("\n");
188
193
  })
189
194
  .join("\n\n");
190
- return `## ${tier.label} — ${tier.items.length} item(s)\n\n${tier.description}\n${items}`;
195
+ return `## ${tier.label} — ${tier.items.length} item(s)\n\n${tier.description}\n\n${items}`;
191
196
  })
192
197
  .join("\n\n");
193
198
  const validIds = request.tiers.flatMap((t) => t.items.map((i) => i.finding_id));
194
199
  return `
195
- # Review-Approval Gate — approve or disapprove before implementation
196
- ${refusal
197
- ? `
198
- > **Your previous resolution was REFUSED and archived nothing was recorded.**
199
- > ${refusal}
200
- > Re-submit the WHOLE resolution below with ids drawn only from the valid set.
201
- `
202
- : ""}
203
- Before any code changes, every audit finding is presented below, bucketed by how
204
- much of **your** judgment it needs. This gate exists so that strategic
205
- (design/architecture) findings are never quietly closed without your sight — so
206
- walk the user through them, especially the **Strategic** tier, with the trade-offs
207
- of acting vs. leaving each as-is.
200
+ # Review-Approval Gate — the user approves or declines each finding
201
+ ${refusalBanner(refusal, "recorded")}
202
+ The user decides which findings to fix before any code changes. Present every
203
+ finding below to the user. For each Strategic finding, state the benefit and the
204
+ cost of a fix and of no fix, and get a separate decision from the user.
208
205
 
209
206
  - Total findings: **${request.total}**
210
207
  - Strategic: **${request.counts.strategic}** · Concrete: **${request.counts.concrete}** · Mechanical: **${request.counts.mechanical}**
@@ -215,26 +212,32 @@ ${tierSections}
215
212
 
216
213
  ## Record the user's decision
217
214
 
218
- The default is to **proceed with every finding**. You only need to record the
219
- items the user wants to **disapprove** (skip). Write JSON to exactly:
215
+ Every finding is fixed unless the user declines it. Write JSON to exactly:
220
216
 
221
217
  \`${resolutionPath}\`
222
218
 
223
219
  \`\`\`json
224
220
  {
225
- "disapproved_findings": ["FINDING-ID-the-user-declined"],
226
- "disapproved_tiers": []
221
+ "declined_findings": [],
222
+ "declined_tiers": []
227
223
  }
228
224
  \`\`\`
229
225
 
230
- - Leave \`disapproved_findings\` empty (\`[]\`) to approve everything.
231
- - Use \`disapproved_tiers\` (e.g. \`["mechanical"]\`) to decline an entire tier at once.
232
- - Disapproved findings are recorded as a declined disposition with a reason —
233
- they are not acted on, and they are not silently dropped.
234
- - \`disapproved_findings\` entries MUST be drawn from this closed set (copy, never
235
- retype): ${validIds.map((id) => `\`${id}\``).join(", ")}. \`disapproved_tiers\`
236
- entries MUST be one of \`strategic\`, \`concrete\`, \`mechanical\`. An id outside
237
- these sets refuses the whole resolution and re-presents this gate.
226
+ The file above approves every finding.
227
+
228
+ - To decline one finding, add \`{ "finding_id": "<id>", "reason": "<the user's
229
+ reason, in their words>" }\` to \`declined_findings\`. \`reason\` is optional; leave
230
+ it out when the user gave none.
231
+ - To decline a whole tier, add its name to \`declined_tiers\`: \`strategic\`,
232
+ \`concrete\` or \`mechanical\`.
233
+ - A declined finding is not fixed. The final report lists it with the user's
234
+ reason.
235
+ - \`finding_id\` MUST be drawn from this closed set (copy, never retype):
236
+ ${validIds.map((id) => `\`${id}\``).join(", ")}.
237
+
238
+ The tool refuses the WHOLE file when it is not valid JSON, has a field not shown
239
+ above, has a wrong type, or names an id or tier outside the sets above. The
240
+ refusal names each problem. Nothing is recorded, and this step comes back.
238
241
 
239
242
  Then run \`${loaderCommand("next-step")}\`.
240
243
  `;
@@ -358,63 +361,47 @@ Checked default input locations:
358
361
  ${checkedPaths.map((candidate) => `- \`${candidate}\``).join("\n")}
359
362
  ${missing}
360
363
 
361
- If the user provides document paths, write JSON to exactly:
364
+ Give the starting point to the tool with command flags. The tool records the
365
+ sources itself: do not write a source manifest, and do not edit source files.
362
366
 
363
- \`${paths.sourceManifest}\`
364
-
365
- \`\`\`json
366
- {
367
- "schema_version": "${INTAKE_SOURCE_MANIFEST_SCHEMA_VERSION}",
368
- "created_from": "conversation",
369
- "sources": [
370
- { "type": "document", "path": "path/from/user-or-absolute-path", "label": "input-01" }
371
- ]
372
- }
373
- \`\`\`
367
+ - **Documents.** Pass each path with \`--input\`. Repeat \`--input\` once for each
368
+ document. An \`audit-findings.json\` report is read as structured findings.
374
369
 
375
- If the user provides conversational feedback, write their full feedback to
376
- exactly:
370
+ \`${loaderCommand("next-step --input <path> --input <path>")}\`
377
371
 
378
- \`${paths.conversationStart}\`
372
+ - **Conversational feedback.** Write the user's full feedback, in their words,
373
+ to exactly:
379
374
 
380
- Then include that file in the source manifest:
375
+ \`${paths.conversationStart}\`
381
376
 
382
- \`\`\`json
383
- {
384
- "schema_version": "${INTAKE_SOURCE_MANIFEST_SCHEMA_VERSION}",
385
- "created_from": "conversation",
386
- "sources": [
387
- { "type": "conversation", "path": ${JSON.stringify(paths.conversationStart)}, "label": "conversation-start" }
388
- ]
389
- }
390
- \`\`\`
377
+ Then pass that file with \`--guidance-file\`:
391
378
 
392
- If the user provides both, include both source types in the same manifest. Do
393
- not edit source files.
379
+ \`${loaderCommand(["next-step", "--guidance-file", paths.conversationStart])}\`
394
380
 
395
- Then run:
381
+ - **Both.** Write the feedback file as above. Then pass both flags in one command:
396
382
 
397
- \`${loaderCommand("next-step")}\`
383
+ \`${loaderCommand(["next-step", "--input", "<path>", "--guidance-file", paths.conversationStart])}\`
398
384
  `;
399
385
  }
400
- export function synthesizeIntakePrompt(manifestPath, sources, paths, hasClarificationResolution, intentCheckpointPath) {
386
+ /**
387
+ * The host writes ONE file here: the intake summary. It is the single source
388
+ * the tool reads — the tool renders `remediation-brief.md` from it
389
+ * (`writeRemediationBrief`), and the confirm step builds its scope proposal
390
+ * from it. The host once also wrote the brief and a "draft" intent checkpoint,
391
+ * which put the same facts in three files that could disagree.
392
+ */
393
+ export function synthesizeIntakePrompt(sources, paths, hasClarificationResolution) {
401
394
  const clarificationText = hasClarificationResolution
402
- ? `\nAlso read the clarification answers at:\n\n\`${paths.clarificationResolution}\`\n`
395
+ ? `\nAlso read the user's answers to the earlier questions:\n\n- \`${paths.clarificationResolution}\`\n`
403
396
  : "";
404
- const checkpointPath = intentCheckpointPath ?? paths.intentCheckpoint;
405
397
  return `
406
- # Synthesize Remediation Intake
398
+ # Synthesize the remediation intake
407
399
 
408
- Read the source manifest:
409
-
410
- \`${manifestPath}\`
411
-
412
- Then read only the listed source files:
400
+ Read these source files:
413
401
 
414
402
  ${formatIntakeSources(sources)}
415
403
  ${clarificationText}
416
- Create a launch brief for the remediation workflow. The goal is to eliminate
417
- ambiguity before the normal remediation planner turns this into findings.
404
+ Do not edit any file except the one below.
418
405
 
419
406
  Write JSON to exactly:
420
407
 
@@ -425,92 +412,58 @@ Write JSON to exactly:
425
412
  "schema_version": "${INTAKE_SUMMARY_SCHEMA_VERSION}",
426
413
  "ready": false,
427
414
  "source_type": "documents",
428
- "goals": ["specific remediation goal"],
429
- "non_goals": ["explicitly out-of-scope change"],
430
- "constraints": ["compatibility, dependency, testing, timing, or style constraint"],
431
- "affected_files": [{ "path": "relative/path.ts", "reason": "why this file is implicated" }],
415
+ "source_summary": "What the sources ask for, in two or three sentences.",
416
+ "goals": ["a specific remediation goal"],
417
+ "non_goals": ["a change that is out of scope"],
418
+ "constraints": ["a compatibility, dependency, test, timing or style constraint"],
419
+ "affected_files": [{ "path": "src/router.ts", "reason": "why this file is part of the fix" }],
420
+ "acceptance_criteria": ["an observable result that shows the goal is met"],
421
+ "scope_summary": "One sentence: the files and areas in scope.",
422
+ "intent_summary": "One sentence: the purpose of this run.",
423
+ "filters": {},
432
424
  "open_questions": [
433
425
  {
434
426
  "id": "Q-001",
435
427
  "category": "scope_of_fix",
436
- "question": "What needs to be clarified before code changes?",
428
+ "question": "Does the refactor include the CLI package, or only the server?",
437
429
  "blocking": true
438
430
  }
439
431
  ]
440
432
  }
441
433
  \`\`\`
442
434
 
443
- Set \`ready\` to \`true\` only when the goals, non-goals, affected areas, and
444
- success criteria are clear enough that implementation choices will not depend
445
- on another user decision. If any blocking ambiguity remains, set \`ready\` to
446
- \`false\` and list the questions.
435
+ Rules:
447
436
 
448
- Use \`source_type\` of \`structured_audit\`, \`documents\`, \`conversation\`,
449
- or \`mixed\`.
437
+ - \`source_type\` is one of \`structured_audit\`, \`documents\`, \`conversation\`, \`mixed\`.
438
+ - Set \`ready\` to \`true\` only when no implementation choice depends on another
439
+ user decision. Then \`goals\` must not be empty, and \`affected_files\` must not be
440
+ empty unless \`source_type\` is \`structured_audit\`.
441
+ - Set \`ready\` to \`false\` when the user must decide something first. Then add each
442
+ question to \`open_questions\` with \`"blocking": true\`. \`ready: false\` with no
443
+ blocking question is refused.
444
+ - A question without \`"blocking": true\` is information only. The user sees it at
445
+ confirmation, and it does not stop the run.
446
+ - \`filters\` stays \`{}\` unless the sources clearly limit the run. Its keys are
447
+ \`severity\`, \`lenses\`, \`packages\` and \`themes\`, each a list of strings.
448
+ - \`intent_interpretation\` (optional): when a conversation source states the
449
+ user's intent in free words, write one sentence on how you read it.
450
450
 
451
- Also write a Markdown launch brief to exactly:
451
+ The tool refuses the file when a field is missing, has a wrong type, or breaks a
452
+ rule above. The refusal names each problem, and this step comes back.
452
453
 
453
- \`${paths.brief}\`
454
+ The tool writes the Markdown brief and the scope proposal from this file. Do not
455
+ write them.
454
456
 
455
- The brief must include:
456
-
457
- - source summary
458
- - goals
459
- - non-goals
460
- - constraints
461
- - affected files or discovery targets
462
- - acceptance criteria
463
- - open questions, if any
464
-
465
- Also write a preliminary intent checkpoint to exactly:
466
-
467
- \`${checkpointPath}\`
468
-
469
- \`\`\`json
470
- {
471
- "schema_version": "intent-checkpoint/v1",
472
- "confirmed_at": "<ISO-8601 timestamp for when this draft was created>",
473
- "confirmed_by": "draft",
474
- "scope_summary": "<pre-populated scope derived from the goals and affected_files above>",
475
- "intent_summary": "<pre-populated intent derived from the goals and source_type above>",
476
- "filters": {},
477
- "pre_draft_questions": [
478
- {
479
- "id": "Q-001",
480
- "question": "<question text from open_questions above>",
481
- "blocking": true
482
- }
483
- ]
484
- }
485
- \`\`\`
486
-
487
- Rules for the preliminary checkpoint:
488
- - \`confirmed_by\` MUST be \`"draft"\` (sentinel for unconfirmed state).
489
- - Pre-populate \`scope_summary\` from the goals and affected areas; pre-populate
490
- \`intent_summary\` from the overall purpose (e.g. "full remediation of security
491
- findings from the audit report").
492
- - Copy ALL open_questions into \`pre_draft_questions\`, preserving their ids and
493
- blocking flags. Non-blocking questions are included as FYI context.
494
- - Do NOT write a \`closing_action\`: the tool detects the candidates from the
495
- repository's shape and the host chooses one at confirmation.
496
- - If a \`free_form_intent\` was interpreted (e.g. "prioritizing security
497
- findings"), record a brief explanation in \`intent_interpretation\`.
498
- - Leave \`filters\` empty (\`{}\`) unless the source clearly implies specific
499
- severity/lens/package scope.
500
-
501
- Do not edit source files.
502
-
503
- Then run:
504
-
505
- \`${loaderCommand("next-step")}\`
457
+ Then run \`${loaderCommand("next-step")}\`.
506
458
  `;
507
459
  }
508
460
  export function collectIntakeClarificationsPrompt(summary, paths) {
509
461
  const questions = blockingIntakeQuestions(summary);
462
+ const ids = questions.map((question) => question.id);
510
463
  return `
511
464
  # Resolve Remediation Intake Questions
512
465
 
513
- Ask the user to answer all blocking intake questions in one response.
466
+ Ask the user all of the blocking intake questions below in one message.
514
467
 
515
468
  ${questions
516
469
  .map((question) => `
@@ -530,14 +483,24 @@ After the user answers, write JSON to exactly:
530
483
  "schema_version": "${INTAKE_CLARIFICATION_SCHEMA_VERSION}",
531
484
  "answers": [
532
485
  {
533
- "question_id": "Q-001",
534
- "answer": "User's answer",
535
- "rationale": "Optional short note about how the answer resolves ambiguity"
486
+ "question_id": "${ids[0] ?? "Q-001"}",
487
+ "answer": "the user's answer, in their words"
536
488
  }
537
489
  ]
538
490
  }
539
491
  \`\`\`
540
492
 
493
+ Write one entry in \`answers\` for each question the user answered. \`answer\` is
494
+ required and must not be blank. You can add an optional \`rationale\`: a short
495
+ note on how the answer removes the ambiguity.
496
+
497
+ \`question_id\` MUST be drawn from this closed set (copy, never retype):
498
+ ${ids.map((id) => `\`${id}\``).join(", ") || "_(none)_"}.
499
+
500
+ The tool refuses the file when an entry has an unknown \`question_id\` or a blank
501
+ \`answer\`, or when no entry answers a question above. The refusal names each
502
+ problem, and this step comes back.
503
+
541
504
  Then run:
542
505
 
543
506
  \`${loaderCommand("next-step")}\`
@@ -1 +1 @@
1
- {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../../src/remediate/steps/prompts.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mCAAmC,EACnC,qCAAqC,EACrC,6BAA6B,EAC7B,uBAAuB,GAIxB,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,aAAa,CAAC,OAA0B;IACtD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QACjC,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjD,OAAO,mBAAmB,CAAC,CAAC,gBAAgB,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,YAAY,CAAC,KAAuB;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC;AACtF,CAAC;AAED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,EAAE,EAAE,CAAC;KACb,QAAQ,CAAC,EAAE;;cAEF,QAAQ,CAAC,QAAQ,IAAI,OAAO;cAC5B,QAAQ,CAAC,QAAQ;CAC9B,CACE;SACA,IAAI,CAAC,IAAI,CAAC;;;;IAIT,KAAK,CAAC,uBAAuB;;;;uBAIV,mCAAmC;;;wBAGlC,GAAG,CAAC,CAAC,CAAC,IAAI,OAAO;;;;;;;;;;;;EAYvC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU;;;;;;;;IAQnD,aAAa,CAAC,WAAW,CAAC;CAC7B,CAAC;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export declare const REMEDIATION_STEP_CONTRACT_VERSION: "remediate-code-step/v1alpha1";
2
- export declare const REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION: "remediation-host-workload/v1alpha2";
3
- export declare const REMEDIATION_HOST_RESULT_CONTRACT_VERSION: "remediation-host-result/v1alpha2";
2
+ export declare const REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION: "remediation-host-workload/v1alpha3";
3
+ export declare const REMEDIATION_HOST_RESULT_CONTRACT_VERSION: "remediation-host-result/v1alpha3";
4
4
  export declare const REMEDIATION_HOST_DECISION_CONTRACT_VERSION: "remediation-host-decision/v1alpha1";
5
5
  export type RemediationStepKind = "confirm_intent" | "confirm_auto_discovered_input" | "confirm_resume_or_restart" | "locate_input" | "collect_starting_point" | "synthesize_intake" | "collect_intake_clarifications" | "contract_pipeline" | "collect_review_approval" | "collect_clarifications" | "dispatch_implement" | "phase_busy" | "collect_triage" | "close_run" | "present_report" | "input_conflict" | "unhandled_state" | "zero_documentable_findings" | "final_gate_red" | "blocked" | "fold_did_not_converge" | "extracted_plan_discarded";
6
6
  import type { StepStatus, AccessDeclaration } from "audit-tools/shared";
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceR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W,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE,iBAAiB,CAAC;CAC5B;AAED,eAAO,MAAM,2CAA2C,EACtD,wCAAiD,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC9B,wDAAwD;IACxD,QAAQ,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,uFAAuF;IACvF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB;;;;;;;;OAQG;IACH,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
@@ -10,9 +10,16 @@ export const REMEDIATION_STEP_CONTRACT_VERSION = "remediate-code-step/v1alpha1";
10
10
  // v1alpha2 (obligation evidence-coverage floor): the work item BINDS the
11
11
  // block's contract obligation ids (`obligation_ids`), and the result must cite
12
12
  // evidence per bound obligation (`obligation_evidence`), coverage-validated at
13
- // ingestion. A v1alpha1 document refuses closed as stale — re-prepare.
14
- export const REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION = "remediation-host-workload/v1alpha2";
15
- export const REMEDIATION_HOST_RESULT_CONTRACT_VERSION = "remediation-host-result/v1alpha2";
13
+ // ingestion.
14
+ //
15
+ // v1alpha3 (owner review of prompt 20, 2026-09-18): each worker prompt ends
16
+ // with the result template the tool fills in, and the landed result carries
17
+ // only `landed_commit` and `obligation_evidence` beside its identity — the tool
18
+ // derives the changed files from git and reruns the required tests itself. A
19
+ // persisted workload of an earlier version is reported `workload_stale`, and
20
+ // the next prepare re-mints its digest under the same binding.
21
+ export const REMEDIATION_HOST_WORKLOAD_CONTRACT_VERSION = "remediation-host-workload/v1alpha3";
22
+ export const REMEDIATION_HOST_RESULT_CONTRACT_VERSION = "remediation-host-result/v1alpha3";
16
23
  export const REMEDIATION_HOST_DECISION_CONTRACT_VERSION = "remediation-host-decision/v1alpha1";
17
24
  export const REMEDIATION_CLOSING_RESULT_CONTRACT_VERSION = "remediate-code-closing-result/v1alpha1";
18
25
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/remediate/steps/types.ts"],"names":[],"mappings":"AAAA,oKAAoK;AACpK,MAAM,CAAC,MAAM,iCAAiC,GAC5C,8BAAuC,CAAC;AAE1C,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,yCAAyC;AAEzC,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAEhD,MAAM,CAAC,MAAM,wCAAwC,GACnD,kCAA2C,CAAC;AAE9C,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAoGhD,MAAM,CAAC,MAAM,2CAA2C,GACtD,wCAAiD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/remediate/steps/types.ts"],"names":[],"mappings":"AAAA,oKAAoK;AACpK,MAAM,CAAC,MAAM,iCAAiC,GAC5C,8BAAuC,CAAC;AAE1C,+EAA+E;AAC/E,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,yCAAyC;AAEzC,yEAAyE;AACzE,+EAA+E;AAC/E,+EAA+E;AAC/E,aAAa;AACb,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,+DAA+D;AAC/D,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAEhD,MAAM,CAAC,MAAM,wCAAwC,GACnD,kCAA2C,CAAC;AAE9C,MAAM,CAAC,MAAM,0CAA0C,GACrD,oCAA6C,CAAC;AAoGhD,MAAM,CAAC,MAAM,2CAA2C,GACtD,wCAAiD,CAAC"}