@aipper/aiws 0.0.29 → 0.0.31

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 (278) hide show
  1. package/bin/aiws.js +2 -2
  2. package/dist/aiws-package.d.ts +4 -0
  3. package/dist/aiws-package.js +11 -0
  4. package/dist/aiws-package.js.map +1 -0
  5. package/dist/aiws-paths.d.ts +48 -0
  6. package/dist/aiws-paths.js +129 -0
  7. package/dist/aiws-paths.js.map +1 -0
  8. package/dist/backup.d.ts +27 -0
  9. package/dist/backup.js +125 -0
  10. package/dist/backup.js.map +1 -0
  11. package/dist/cli.d.ts +1 -0
  12. package/dist/cli.js +773 -0
  13. package/dist/cli.js.map +1 -0
  14. package/dist/codex-prompts.d.ts +17 -0
  15. package/dist/codex-prompts.js +49 -0
  16. package/dist/codex-prompts.js.map +1 -0
  17. package/dist/codex-skills.d.ts +17 -0
  18. package/dist/codex-skills.js +75 -0
  19. package/dist/codex-skills.js.map +1 -0
  20. package/dist/commands/change-advice.d.ts +25 -0
  21. package/dist/commands/change-advice.js +197 -0
  22. package/dist/commands/change-advice.js.map +1 -0
  23. package/dist/commands/change-evidence-command.d.ts +29 -0
  24. package/dist/commands/change-evidence-command.js +213 -0
  25. package/dist/commands/change-evidence-command.js.map +1 -0
  26. package/dist/commands/change-evidence-entry.d.ts +16 -0
  27. package/dist/commands/change-evidence-entry.js +35 -0
  28. package/dist/commands/change-evidence-entry.js.map +1 -0
  29. package/dist/commands/change-evidence.d.ts +108 -0
  30. package/dist/commands/change-evidence.js +341 -0
  31. package/dist/commands/change-evidence.js.map +1 -0
  32. package/dist/commands/change-finish.d.ts +71 -0
  33. package/dist/commands/change-finish.js +387 -0
  34. package/dist/commands/change-finish.js.map +1 -0
  35. package/dist/commands/change-git-status.d.ts +22 -0
  36. package/dist/commands/change-git-status.js +50 -0
  37. package/dist/commands/change-git-status.js.map +1 -0
  38. package/dist/commands/change-lifecycle-entry.d.ts +29 -0
  39. package/{src → dist}/commands/change-lifecycle-entry.js +21 -28
  40. package/dist/commands/change-lifecycle-entry.js.map +1 -0
  41. package/dist/commands/change-lifecycle.d.ts +56 -0
  42. package/dist/commands/change-lifecycle.js +211 -0
  43. package/dist/commands/change-lifecycle.js.map +1 -0
  44. package/dist/commands/change-metrics-command.d.ts +12 -0
  45. package/dist/commands/change-metrics-command.js +110 -0
  46. package/dist/commands/change-metrics-command.js.map +1 -0
  47. package/dist/commands/change-next-command.d.ts +18 -0
  48. package/dist/commands/change-next-command.js +138 -0
  49. package/dist/commands/change-next-command.js.map +1 -0
  50. package/dist/commands/change-review-gates.d.ts +107 -0
  51. package/dist/commands/change-review-gates.js +329 -0
  52. package/dist/commands/change-review-gates.js.map +1 -0
  53. package/dist/commands/change-scope-gate.d.ts +21 -0
  54. package/dist/commands/change-scope-gate.js +32 -0
  55. package/dist/commands/change-scope-gate.js.map +1 -0
  56. package/dist/commands/change-start.d.ts +30 -0
  57. package/dist/commands/change-start.js +91 -0
  58. package/dist/commands/change-start.js.map +1 -0
  59. package/dist/commands/change-state-command.d.ts +3 -0
  60. package/dist/commands/change-state-command.js +32 -0
  61. package/dist/commands/change-state-command.js.map +1 -0
  62. package/dist/commands/change-status-command.d.ts +13 -0
  63. package/dist/commands/change-status-command.js +126 -0
  64. package/dist/commands/change-status-command.js.map +1 -0
  65. package/dist/commands/change-status-context.d.ts +58 -0
  66. package/dist/commands/change-status-context.js +166 -0
  67. package/dist/commands/change-status-context.js.map +1 -0
  68. package/dist/commands/change-task-stats.d.ts +24 -0
  69. package/dist/commands/change-task-stats.js +66 -0
  70. package/dist/commands/change-task-stats.js.map +1 -0
  71. package/dist/commands/change-validate-entry.d.ts +17 -0
  72. package/dist/commands/change-validate-entry.js +44 -0
  73. package/dist/commands/change-validate-entry.js.map +1 -0
  74. package/dist/commands/change-validate.d.ts +32 -0
  75. package/dist/commands/change-validate.js +128 -0
  76. package/dist/commands/change-validate.js.map +1 -0
  77. package/dist/commands/change.d.ts +322 -0
  78. package/dist/commands/change.js +1731 -0
  79. package/dist/commands/change.js.map +1 -0
  80. package/dist/commands/codex-install-prompts.d.ts +4 -0
  81. package/dist/commands/codex-install-prompts.js +68 -0
  82. package/dist/commands/codex-install-prompts.js.map +1 -0
  83. package/dist/commands/codex-install-skills.d.ts +4 -0
  84. package/dist/commands/codex-install-skills.js +74 -0
  85. package/dist/commands/codex-install-skills.js.map +1 -0
  86. package/dist/commands/codex-status-prompts.d.ts +4 -0
  87. package/dist/commands/codex-status-prompts.js +44 -0
  88. package/dist/commands/codex-status-prompts.js.map +1 -0
  89. package/dist/commands/codex-status-skills.d.ts +4 -0
  90. package/dist/commands/codex-status-skills.js +54 -0
  91. package/dist/commands/codex-status-skills.js.map +1 -0
  92. package/dist/commands/codex-uninstall-prompts.d.ts +4 -0
  93. package/dist/commands/codex-uninstall-prompts.js +51 -0
  94. package/dist/commands/codex-uninstall-prompts.js.map +1 -0
  95. package/dist/commands/codex-uninstall-skills.d.ts +4 -0
  96. package/dist/commands/codex-uninstall-skills.js +59 -0
  97. package/dist/commands/codex-uninstall-skills.js.map +1 -0
  98. package/dist/commands/dashboard.d.ts +222 -0
  99. package/dist/commands/dashboard.js +193 -0
  100. package/dist/commands/dashboard.js.map +1 -0
  101. package/dist/commands/hooks-install.d.ts +4 -0
  102. package/dist/commands/hooks-install.js +90 -0
  103. package/dist/commands/hooks-install.js.map +1 -0
  104. package/dist/commands/hooks-status.d.ts +4 -0
  105. package/dist/commands/hooks-status.js +89 -0
  106. package/dist/commands/hooks-status.js.map +1 -0
  107. package/dist/commands/init.d.ts +4 -0
  108. package/dist/commands/init.js +100 -0
  109. package/dist/commands/init.js.map +1 -0
  110. package/dist/commands/opencode-auto.d.ts +11 -0
  111. package/dist/commands/opencode-auto.js +158 -0
  112. package/dist/commands/opencode-auto.js.map +1 -0
  113. package/dist/commands/opencode-status.d.ts +4 -0
  114. package/dist/commands/opencode-status.js +75 -0
  115. package/dist/commands/opencode-status.js.map +1 -0
  116. package/dist/commands/opencode-supervise.d.ts +24 -0
  117. package/dist/commands/opencode-supervise.js +188 -0
  118. package/dist/commands/opencode-supervise.js.map +1 -0
  119. package/dist/commands/rollback.d.ts +4 -0
  120. package/dist/commands/rollback.js +12 -0
  121. package/dist/commands/rollback.js.map +1 -0
  122. package/dist/commands/update.d.ts +4 -0
  123. package/dist/commands/update.js +212 -0
  124. package/dist/commands/update.js.map +1 -0
  125. package/dist/commands/validate.d.ts +4 -0
  126. package/dist/commands/validate.js +222 -0
  127. package/dist/commands/validate.js.map +1 -0
  128. package/dist/commands/ws-commit.d.ts +5 -0
  129. package/dist/commands/ws-commit.js +39 -0
  130. package/dist/commands/ws-commit.js.map +1 -0
  131. package/dist/commands/ws-deliver.d.ts +5 -0
  132. package/dist/commands/ws-deliver.js +59 -0
  133. package/dist/commands/ws-deliver.js.map +1 -0
  134. package/dist/commands/ws-finish.d.ts +5 -0
  135. package/dist/commands/ws-finish.js +142 -0
  136. package/dist/commands/ws-finish.js.map +1 -0
  137. package/dist/commands/ws-handoff.d.ts +5 -0
  138. package/dist/commands/ws-handoff.js +35 -0
  139. package/dist/commands/ws-handoff.js.map +1 -0
  140. package/dist/commands/ws-migrate.d.ts +5 -0
  141. package/dist/commands/ws-migrate.js +41 -0
  142. package/dist/commands/ws-migrate.js.map +1 -0
  143. package/dist/commands/ws-plan-verify.d.ts +5 -0
  144. package/dist/commands/ws-plan-verify.js +38 -0
  145. package/dist/commands/ws-plan-verify.js.map +1 -0
  146. package/dist/commands/ws-pull.d.ts +5 -0
  147. package/dist/commands/ws-pull.js +26 -0
  148. package/dist/commands/ws-pull.js.map +1 -0
  149. package/dist/commands/ws-push.d.ts +5 -0
  150. package/dist/commands/ws-push.js +68 -0
  151. package/dist/commands/ws-push.js.map +1 -0
  152. package/dist/commands/ws-submodule-setup.d.ts +5 -0
  153. package/dist/commands/ws-submodule-setup.js +55 -0
  154. package/dist/commands/ws-submodule-setup.js.map +1 -0
  155. package/dist/commands/ws-verify-before-complete.d.ts +5 -0
  156. package/dist/commands/ws-verify-before-complete.js +35 -0
  157. package/dist/commands/ws-verify-before-complete.js.map +1 -0
  158. package/dist/dashboard/app.d.ts +1 -0
  159. package/dist/dashboard/app.js +370 -0
  160. package/dist/dashboard/app.js.map +1 -0
  161. package/dist/delegation/cli.d.ts +6 -0
  162. package/dist/delegation/cli.js +14 -0
  163. package/dist/delegation/cli.js.map +1 -0
  164. package/dist/delegation/index.d.ts +35 -0
  165. package/dist/delegation/index.js +118 -0
  166. package/dist/delegation/index.js.map +1 -0
  167. package/dist/errors.d.ts +8 -0
  168. package/dist/errors.js +11 -0
  169. package/dist/errors.js.map +1 -0
  170. package/dist/exec.d.ts +9 -0
  171. package/dist/exec.js +22 -0
  172. package/dist/exec.js.map +1 -0
  173. package/dist/fs.d.ts +9 -0
  174. package/dist/fs.js +62 -0
  175. package/dist/fs.js.map +1 -0
  176. package/dist/governance.d.ts +10 -0
  177. package/dist/governance.js +135 -0
  178. package/dist/governance.js.map +1 -0
  179. package/dist/hash.d.ts +3 -0
  180. package/dist/hash.js +13 -0
  181. package/dist/hash.js.map +1 -0
  182. package/dist/hooks/deploy-claude.d.ts +13 -0
  183. package/dist/hooks/deploy-claude.js +67 -0
  184. package/dist/hooks/deploy-claude.js.map +1 -0
  185. package/dist/journal.d.ts +22 -0
  186. package/dist/journal.js +112 -0
  187. package/dist/journal.js.map +1 -0
  188. package/dist/json-schema-lite.d.ts +22 -0
  189. package/dist/json-schema-lite.js +148 -0
  190. package/dist/json-schema-lite.js.map +1 -0
  191. package/dist/managed-blocks.d.ts +24 -0
  192. package/dist/managed-blocks.js +84 -0
  193. package/dist/managed-blocks.js.map +1 -0
  194. package/dist/manifest.d.ts +24 -0
  195. package/dist/manifest.js +145 -0
  196. package/dist/manifest.js.map +1 -0
  197. package/dist/opencode-env.d.ts +62 -0
  198. package/dist/opencode-env.js +178 -0
  199. package/dist/opencode-env.js.map +1 -0
  200. package/dist/path-utils.d.ts +2 -0
  201. package/dist/path-utils.js +8 -0
  202. package/dist/path-utils.js.map +1 -0
  203. package/dist/spec.d.ts +17 -0
  204. package/dist/spec.js +174 -0
  205. package/dist/spec.js.map +1 -0
  206. package/dist/template.d.ts +20 -0
  207. package/dist/template.js +123 -0
  208. package/dist/template.js.map +1 -0
  209. package/dist/workspace.d.ts +4 -0
  210. package/dist/workspace.js +19 -0
  211. package/dist/workspace.js.map +1 -0
  212. package/package.json +11 -3
  213. package/src/aiws-package.js +0 -15
  214. package/src/backup.js +0 -149
  215. package/src/cli.js +0 -760
  216. package/src/codex-prompts.js +0 -74
  217. package/src/codex-skills.js +0 -111
  218. package/src/commands/change-advice.js +0 -181
  219. package/src/commands/change-evidence-command.js +0 -242
  220. package/src/commands/change-evidence-entry.js +0 -40
  221. package/src/commands/change-evidence.js +0 -340
  222. package/src/commands/change-finish.js +0 -413
  223. package/src/commands/change-git-status.js +0 -53
  224. package/src/commands/change-lifecycle.js +0 -236
  225. package/src/commands/change-metrics-command.js +0 -110
  226. package/src/commands/change-next-command.js +0 -133
  227. package/src/commands/change-review-gates.js +0 -331
  228. package/src/commands/change-scope-gate.js +0 -34
  229. package/src/commands/change-start.js +0 -85
  230. package/src/commands/change-state-command.js +0 -40
  231. package/src/commands/change-status-command.js +0 -125
  232. package/src/commands/change-status-context.js +0 -173
  233. package/src/commands/change-task-stats.js +0 -64
  234. package/src/commands/change-validate-entry.js +0 -45
  235. package/src/commands/change-validate.js +0 -127
  236. package/src/commands/change.js +0 -1829
  237. package/src/commands/codex-install-prompts.js +0 -68
  238. package/src/commands/codex-install-skills.js +0 -74
  239. package/src/commands/codex-status-prompts.js +0 -55
  240. package/src/commands/codex-status-skills.js +0 -63
  241. package/src/commands/codex-uninstall-prompts.js +0 -55
  242. package/src/commands/codex-uninstall-skills.js +0 -62
  243. package/src/commands/dashboard.js +0 -205
  244. package/src/commands/hooks-install.js +0 -92
  245. package/src/commands/hooks-status.js +0 -95
  246. package/src/commands/init.js +0 -101
  247. package/src/commands/opencode-auto.js +0 -167
  248. package/src/commands/opencode-status.js +0 -103
  249. package/src/commands/opencode-supervise.js +0 -200
  250. package/src/commands/rollback.js +0 -13
  251. package/src/commands/update.js +0 -145
  252. package/src/commands/validate.js +0 -228
  253. package/src/commands/ws-commit.js +0 -44
  254. package/src/commands/ws-deliver.js +0 -67
  255. package/src/commands/ws-finish.js +0 -83
  256. package/src/commands/ws-handoff.js +0 -40
  257. package/src/commands/ws-migrate.js +0 -41
  258. package/src/commands/ws-plan-verify.js +0 -44
  259. package/src/commands/ws-pull.js +0 -30
  260. package/src/commands/ws-push.js +0 -71
  261. package/src/commands/ws-submodule-setup.js +0 -65
  262. package/src/commands/ws-verify-before-complete.js +0 -39
  263. package/src/dashboard/app.js +0 -371
  264. package/src/errors.js +0 -15
  265. package/src/exec.js +0 -34
  266. package/src/fs.js +0 -91
  267. package/src/governance.js +0 -159
  268. package/src/hash.js +0 -25
  269. package/src/json-schema-lite.js +0 -164
  270. package/src/managed-blocks.js +0 -131
  271. package/src/manifest.js +0 -177
  272. package/src/opencode-env.js +0 -208
  273. package/src/path-utils.js +0 -20
  274. package/src/spec.js +0 -195
  275. package/src/template.js +0 -187
  276. package/src/workspace.js +0 -23
  277. /package/{src → dist}/dashboard/index.html +0 -0
  278. /package/{src → dist}/dashboard/style.css +0 -0
@@ -0,0 +1,128 @@
1
+ function parseChangeCheckerOutput(stdout, stderr) {
2
+ const text = [String(stdout || ""), String(stderr || "")].filter(Boolean).join("\n");
3
+ /** @type {string[]} */
4
+ const errors = [];
5
+ /** @type {string[]} */
6
+ const warnings = [];
7
+ for (const raw of text.split("\n")) {
8
+ const line = raw.trim();
9
+ if (!line)
10
+ continue;
11
+ if (line.startsWith("error: "))
12
+ errors.push(line.replace(/^error:\s*/, ""));
13
+ else if (line.startsWith("warn: "))
14
+ warnings.push(line.replace(/^warn:\s*/, ""));
15
+ }
16
+ return { errors, warnings, raw: text.trim() };
17
+ }
18
+ function classifyCheckMessage(msg) {
19
+ const s = String(msg || "");
20
+ if (s.includes("truth file") || s.includes("truth drift") || s.includes("allow-truth-drift"))
21
+ return "truth_drift";
22
+ if (s.includes("WS:TODO") || s.includes("unrendered template placeholders"))
23
+ return "placeholders";
24
+ if (s.includes("missing:") || s.includes("empty:") || s.includes("Missing change dir"))
25
+ return "missing_files";
26
+ if (s.includes("Change_ID") ||
27
+ s.includes("Req_ID") ||
28
+ s.includes("Problem_ID") ||
29
+ s.includes("Contract_Row") ||
30
+ s.includes("Plan_File") ||
31
+ s.includes("Evidence_Path")) {
32
+ return "bindings";
33
+ }
34
+ if (s.includes("scope check") || s.includes("out-of-scope"))
35
+ return "scope_gate";
36
+ if (s.includes("finish gate") ||
37
+ s.includes("validate stamp") ||
38
+ s.includes("verify-before-complete") ||
39
+ s.includes("spec review") ||
40
+ s.includes("quality review")) {
41
+ return "finish_gate";
42
+ }
43
+ if (s.includes("missing required sections") ||
44
+ s.includes("has empty sections") ||
45
+ s.includes("Plan section") ||
46
+ s.includes("Verify section") ||
47
+ s.includes("scope is too broad") ||
48
+ s.includes("too abstract")) {
49
+ return "plan_quality";
50
+ }
51
+ return "other";
52
+ }
53
+ function groupCheckMessages(errors, warnings) {
54
+ const groups = {
55
+ truth_drift: { errors: [], warnings: [] },
56
+ missing_files: { errors: [], warnings: [] },
57
+ placeholders: { errors: [], warnings: [] },
58
+ bindings: { errors: [], warnings: [] },
59
+ scope_gate: { errors: [], warnings: [] },
60
+ finish_gate: { errors: [], warnings: [] },
61
+ plan_quality: { errors: [], warnings: [] },
62
+ other: { errors: [], warnings: [] },
63
+ };
64
+ for (const message of errors || []) {
65
+ const group = classifyCheckMessage(message);
66
+ groups[group].errors.push(message);
67
+ }
68
+ for (const message of warnings || []) {
69
+ const group = classifyCheckMessage(message);
70
+ groups[group].warnings.push(message);
71
+ }
72
+ return groups;
73
+ }
74
+ /**
75
+ * @param {string} gitRoot
76
+ * @param {string} changeId
77
+ * @param {{ strict: boolean, allowTruthDrift: boolean, checkEvidence?: boolean, checkScope?: boolean }} options
78
+ * @param {{
79
+ * assertValidChangeId: (changeId: string) => void,
80
+ * collectFinishGateErrors: (changeId: string, reviewGates: any) => string[],
81
+ * computeChangeStatus: (gitRoot: string, changeId: string) => Promise<any>,
82
+ * ensureTruthFiles: (gitRoot: string) => Promise<void>,
83
+ * resolveWsChangeChecker: (gitRoot: string) => Promise<{ args: string[] }>,
84
+ * runPython: (cwd: string, args: string[]) => Promise<{ code: number, stdout: string, stderr: string }>
85
+ * }} deps
86
+ */
87
+ export async function validateChangeArtifacts(gitRoot, changeId, options, deps) {
88
+ deps.assertValidChangeId(changeId);
89
+ await deps.ensureTruthFiles(gitRoot);
90
+ const checker = await deps.resolveWsChangeChecker(gitRoot);
91
+ const args = [...checker.args, "--workspace-root", gitRoot, "--change-id", changeId];
92
+ if (options.strict)
93
+ args.push("--strict");
94
+ if (options.allowTruthDrift)
95
+ args.push("--allow-truth-drift");
96
+ if (options.checkEvidence)
97
+ args.push("--check-evidence");
98
+ if (options.checkScope)
99
+ args.push("--check-scope");
100
+ const res = await deps.runPython(gitRoot, ["-u", ...args]);
101
+ const parsed = parseChangeCheckerOutput(res.stdout, res.stderr);
102
+ const errors = [...parsed.errors];
103
+ const warnings = [...parsed.warnings];
104
+ if (options.checkEvidence === true) {
105
+ const status = await deps.computeChangeStatus(gitRoot, changeId);
106
+ errors.push(...deps.collectFinishGateErrors(changeId, status.reviewGates));
107
+ }
108
+ const rawLines = [];
109
+ if (parsed.raw)
110
+ rawLines.push(parsed.raw);
111
+ for (const message of errors.slice(parsed.errors.length))
112
+ rawLines.push(`error: ${message}`);
113
+ for (const message of warnings.slice(parsed.warnings.length))
114
+ rawLines.push(`warn: ${message}`);
115
+ const exitCode = res.code === 0 && errors.length > 0 ? 1 : res.code;
116
+ return {
117
+ ok: exitCode === 0,
118
+ changeId,
119
+ strict: options.strict === true,
120
+ allowTruthDrift: options.allowTruthDrift === true,
121
+ exitCode,
122
+ errors,
123
+ warnings,
124
+ groups: groupCheckMessages(errors, warnings),
125
+ raw: rawLines.filter(Boolean).join("\n").trim(),
126
+ };
127
+ }
128
+ //# sourceMappingURL=change-validate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change-validate.js","sourceRoot":"","sources":["../../src/commands/change-validate.ts"],"names":[],"mappings":"AAAA,SAAS,wBAAwB,CAAC,MAAc,EAAE,MAAc;IAC9D,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrF,uBAAuB;IACvB,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,uBAAuB;IACvB,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC;YAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;aACvE,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,oBAAoB,CAAC,GAAW;IACvC,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;IAC5B,IAAI,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,C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
2
+ * @param {string} changeId
3
+ */
4
+ export declare function assertValidChangeId(changeId: string): void;
5
+ export declare function computeChangeStatus(gitRoot: any, changeId: any): Promise<{
6
+ governance: {
7
+ warning: string;
8
+ phase: string;
9
+ currentStage: string;
10
+ recommendedStage: string;
11
+ rationale: string;
12
+ ruleId: string;
13
+ source: string;
14
+ };
15
+ ok: boolean;
16
+ changeId: any;
17
+ dir: string;
18
+ phase: string;
19
+ context: {
20
+ worktree: string;
21
+ branch: any;
22
+ branchMatchesChange: boolean;
23
+ source: string;
24
+ warning: string;
25
+ currentWorktree: string;
26
+ currentBranch: any;
27
+ changeWorktree: string;
28
+ };
29
+ metaState: string;
30
+ reqId: string;
31
+ probId: string;
32
+ bindings: {
33
+ contractRow: string;
34
+ planFile: string;
35
+ evidencePaths: string[];
36
+ };
37
+ scopeGate: {
38
+ checked: boolean;
39
+ ready: boolean;
40
+ status: string;
41
+ source: string;
42
+ lastRunAt: string;
43
+ errors: number;
44
+ warnings: number;
45
+ };
46
+ evidence: {
47
+ entries: {
48
+ rel: string;
49
+ abs: string;
50
+ exists: boolean;
51
+ kind: string;
52
+ isAbsolute: boolean;
53
+ }[];
54
+ counts: {
55
+ total: number;
56
+ exists: number;
57
+ missing: number;
58
+ tmp: number;
59
+ persistent: number;
60
+ other: number;
61
+ absolute: number;
62
+ };
63
+ missing: string[];
64
+ };
65
+ collaboration: {
66
+ dirs: Record<string, {
67
+ label: string;
68
+ dir: string;
69
+ exists: boolean;
70
+ count: number;
71
+ files: string[];
72
+ truncated: boolean;
73
+ }>;
74
+ counts: Record<string, number>;
75
+ };
76
+ reviewSignals: {
77
+ persistentCount: number;
78
+ tmpFallbackExists: boolean;
79
+ tmpFallbackCount: number;
80
+ tmpFallbackPath: string;
81
+ tmpFallbackPaths: string[];
82
+ effectiveCount: number;
83
+ source: string;
84
+ };
85
+ reviewGates: {
86
+ source: any;
87
+ specVersion: any;
88
+ version: any;
89
+ gates: {
90
+ id: any;
91
+ name: any;
92
+ stage: any;
93
+ focus: any;
94
+ next: any;
95
+ ready: boolean;
96
+ status: string;
97
+ primaryPath: string;
98
+ fallbackPath: string;
99
+ foundPath: string;
100
+ }[];
101
+ specReview: {
102
+ id: any;
103
+ name: any;
104
+ stage: any;
105
+ focus: any;
106
+ next: any;
107
+ ready: boolean;
108
+ status: string;
109
+ primaryPath: string;
110
+ fallbackPath: string;
111
+ foundPath: string;
112
+ } | null;
113
+ qualityReview: {
114
+ id: any;
115
+ name: any;
116
+ stage: any;
117
+ focus: any;
118
+ next: any;
119
+ ready: boolean;
120
+ status: string;
121
+ primaryPath: string;
122
+ fallbackPath: string;
123
+ foundPath: string;
124
+ } | null;
125
+ verifyBeforeComplete: {
126
+ id: any;
127
+ name: any;
128
+ stage: any;
129
+ focus: any;
130
+ next: any;
131
+ ready: boolean;
132
+ status: string;
133
+ primaryPath: string;
134
+ fallbackPath: string;
135
+ foundPath: string;
136
+ } | null;
137
+ validateStamp: {
138
+ id: string;
139
+ name: string;
140
+ ready: boolean;
141
+ status: string;
142
+ dir: string;
143
+ foundPath: string;
144
+ };
145
+ summary: {
146
+ gateCount: number;
147
+ gateReadyCount: number;
148
+ genericReviewOnly: boolean;
149
+ dualReviewPending: boolean;
150
+ dualReviewReady: boolean;
151
+ dualReviewMissingIds: any[];
152
+ dualReviewMissingCount: number;
153
+ finishGateReady: boolean;
154
+ finishGateMissingIds: string[];
155
+ finishGateMissingCount: number;
156
+ };
157
+ };
158
+ git: {
159
+ clean: boolean;
160
+ total: number;
161
+ staged: number;
162
+ unstaged: number;
163
+ untracked: number;
164
+ conflicted: number;
165
+ };
166
+ repo: {
167
+ submodules: number;
168
+ };
169
+ lifecycle: {
170
+ metricsState: string;
171
+ latestEventType: string;
172
+ eventCounts: Record<string, number>;
173
+ evidenceRuns: number;
174
+ finishRuns: number;
175
+ finishCleanupPendingReason: string;
176
+ finishState: string;
177
+ finishStateReason: string;
178
+ finishStateEventType: string;
179
+ archiveRuns: number;
180
+ strictValidatePass: boolean;
181
+ strictScopeValidateRuns: any;
182
+ strictScopeValidatePass: boolean;
183
+ strictScopeValidateAt: string;
184
+ strictScopeValidateErrors: number;
185
+ strictScopeValidateWarnings: number;
186
+ };
187
+ tasks: {
188
+ total: number;
189
+ done: number;
190
+ unchecked: number;
191
+ hasCheckboxes: boolean;
192
+ totalAll: number;
193
+ doneAll: number;
194
+ uncheckedAll: number;
195
+ optionalTotal: number;
196
+ optionalUnchecked: number;
197
+ naCount: number;
198
+ };
199
+ baselineLabel: string;
200
+ baselineAt: string;
201
+ driftFiles: string[];
202
+ blockersStrict: string[];
203
+ blockersArchive: string[];
204
+ terminatedReuse: {
205
+ kind: string;
206
+ message: string;
207
+ } | null;
208
+ hints: {
209
+ planVerify: string;
210
+ dev: string;
211
+ };
212
+ }>;
213
+ export declare function validateChangeArtifacts(gitRoot: any, changeId: any, options: any): Promise<{
214
+ ok: boolean;
215
+ changeId: string;
216
+ strict: boolean;
217
+ allowTruthDrift: boolean;
218
+ exitCode: any;
219
+ errors: string[];
220
+ warnings: string[];
221
+ groups: Record<string, {
222
+ errors: string[];
223
+ warnings: string[];
224
+ }>;
225
+ raw: string;
226
+ }>;
227
+ /**
228
+ * aiws change list
229
+ */
230
+ export declare function changeListCommand(): Promise<void>;
231
+ /**
232
+ * aiws change templates which
233
+ */
234
+ export declare function changeTemplatesWhichCommand(): Promise<void>;
235
+ /**
236
+ * aiws change templates init
237
+ */
238
+ export declare function changeTemplatesInitCommand(): Promise<void>;
239
+ /**
240
+ * aiws change new
241
+ *
242
+ * @param {{ changeId: string, title?: string, noDesign: boolean }} options
243
+ */
244
+ export declare function changeNewCommand(options: any): Promise<void>;
245
+ /**
246
+ * aiws change start
247
+ *
248
+ * @param {{ changeId: string, title?: string, noDesign: boolean, enableHooks: boolean, noSwitch: boolean, forceSwitch: boolean, allowDirty?: boolean }} options
249
+ */
250
+ export declare function changeStartCommand(options: any): Promise<void>;
251
+ /**
252
+ * aiws change finish
253
+ *
254
+ * @param {{ changeId?: string, into?: string, base?: string, push?: boolean, remote?: string }} options
255
+ */
256
+ export declare function changeFinishCommand(options: any): Promise<void>;
257
+ /**
258
+ * aiws change status
259
+ *
260
+ * @param {{ changeId?: string }} options
261
+ */
262
+ export declare function changeStatusCommand(options: any): Promise<void>;
263
+ /**
264
+ * aiws change next
265
+ *
266
+ * @param {{ changeId?: string }} options
267
+ */
268
+ export declare function changeNextCommand(options: any): Promise<void>;
269
+ /**
270
+ * @param {string} gitRoot
271
+ * @param {string} changeId
272
+ */
273
+ export declare function computeChangeNextAdvice(gitRoot: string, changeId: string): Promise<{
274
+ changeId: string;
275
+ branch: string;
276
+ inferredChangeId: string;
277
+ phase: any;
278
+ governance: any;
279
+ scopeGate: any;
280
+ blockersStrict: any;
281
+ evidence: any;
282
+ collaboration: any;
283
+ actions: string[];
284
+ prohibitions: string[];
285
+ recommended: string[];
286
+ }>;
287
+ /**
288
+ * aiws change state
289
+ *
290
+ * @param {{ changeId?: string, write: boolean }} options
291
+ */
292
+ export declare function changeStateCommand(options: any): Promise<void>;
293
+ /**
294
+ * aiws metrics summary
295
+ *
296
+ * @param {{ since?: string }} options
297
+ */
298
+ export declare function metricsSummaryCommand(options: any): Promise<void>;
299
+ /**
300
+ * aiws change evidence
301
+ *
302
+ * @param {{ changeId?: string, noValidate: boolean, allowFail: boolean }} options
303
+ */
304
+ export declare function changeEvidenceCommand(options: any): Promise<void>;
305
+ /**
306
+ * aiws change validate
307
+ *
308
+ * @param {{ changeId?: string, strict: boolean, allowTruthDrift: boolean, checkEvidence: boolean, checkScope: boolean, allowFinishedUnarchived?: boolean }} options
309
+ */
310
+ export declare function changeValidateCommand(options: any): Promise<void>;
311
+ /**
312
+ * aiws change sync
313
+ *
314
+ * @param {{ changeId?: string }} options
315
+ */
316
+ export declare function changeSyncCommand(options: any): Promise<void>;
317
+ /**
318
+ * aiws change archive
319
+ *
320
+ * @param {{ changeId?: string, datePrefix?: string, force: boolean }} options
321
+ */
322
+ export declare function changeArchiveCommand(options: any): Promise<void>;