@interf/compiler 0.5.1 → 0.6.3

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 (353) hide show
  1. package/README.md +160 -201
  2. package/builtin-workflows/interf/README.md +22 -10
  3. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +8 -5
  4. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +3 -0
  5. package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -2
  6. package/builtin-workflows/interf/improve/SKILL.md +4 -4
  7. package/builtin-workflows/interf/use/query/SKILL.md +1 -1
  8. package/builtin-workflows/interf/workflow.json +19 -5
  9. package/builtin-workflows/interf/{compiled.schema.json → workflow.schema.json} +10 -3
  10. package/dist/bin.js +2 -28
  11. package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
  12. package/dist/{commands → cli/commands}/check-draft.js +13 -13
  13. package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
  14. package/dist/{commands → cli/commands}/compile-controller.js +39 -44
  15. package/dist/cli/commands/compile.d.ts +33 -0
  16. package/dist/{commands → cli/commands}/compile.js +107 -33
  17. package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
  18. package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
  19. package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +20 -2
  20. package/dist/cli/commands/create-workflow-wizard.js +288 -0
  21. package/dist/{commands → cli/commands}/create.d.ts +2 -2
  22. package/dist/cli/commands/create.js +166 -0
  23. package/dist/cli/commands/dataset-selection.d.ts +6 -0
  24. package/dist/cli/commands/dataset-selection.js +11 -0
  25. package/dist/{commands → cli/commands}/default.js +5 -5
  26. package/dist/{commands → cli/commands}/doctor.js +12 -13
  27. package/dist/{commands → cli/commands}/executor-flow.d.ts +2 -2
  28. package/dist/{commands → cli/commands}/executor-flow.js +17 -17
  29. package/dist/cli/commands/init.d.ts +11 -0
  30. package/dist/{commands → cli/commands}/init.js +202 -109
  31. package/dist/{commands → cli/commands}/list.js +9 -6
  32. package/dist/{commands → cli/commands}/reset.js +5 -5
  33. package/dist/{commands → cli/commands}/source-config-wizard.d.ts +10 -5
  34. package/dist/{commands → cli/commands}/source-config-wizard.js +202 -95
  35. package/dist/{commands → cli/commands}/status.js +20 -11
  36. package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
  37. package/dist/{commands → cli/commands}/test-flow.js +30 -26
  38. package/dist/cli/commands/test.d.ts +14 -0
  39. package/dist/{commands → cli/commands}/test.js +48 -40
  40. package/dist/{commands → cli/commands}/verify.js +4 -4
  41. package/dist/cli/index.d.ts +21 -0
  42. package/dist/cli/index.js +33 -0
  43. package/dist/index.d.ts +22 -11
  44. package/dist/index.js +15 -6
  45. package/dist/lib/agent-args.d.ts +1 -3
  46. package/dist/lib/agent-args.js +1 -42
  47. package/dist/lib/agent-constants.d.ts +1 -5
  48. package/dist/lib/agent-constants.js +1 -28
  49. package/dist/lib/agent-detection.d.ts +1 -7
  50. package/dist/lib/agent-detection.js +1 -65
  51. package/dist/lib/agent-execution.d.ts +1 -2
  52. package/dist/lib/agent-execution.js +1 -242
  53. package/dist/lib/agent-logs.d.ts +1 -2
  54. package/dist/lib/agent-logs.js +1 -17
  55. package/dist/lib/agent-preflight.d.ts +1 -7
  56. package/dist/lib/agent-preflight.js +1 -76
  57. package/dist/lib/agent-render.d.ts +1 -8
  58. package/dist/lib/agent-render.js +1 -218
  59. package/dist/lib/agent-shells.d.ts +1 -44
  60. package/dist/lib/agent-shells.js +1 -847
  61. package/dist/lib/agent-status.d.ts +1 -3
  62. package/dist/lib/agent-status.js +1 -58
  63. package/dist/lib/agent-types.d.ts +1 -30
  64. package/dist/lib/agent-types.js +1 -1
  65. package/dist/lib/agents.d.ts +1 -6
  66. package/dist/lib/agents.js +1 -5
  67. package/dist/lib/builtin-compiled-workflow.d.ts +1 -129
  68. package/dist/lib/builtin-compiled-workflow.js +1 -153
  69. package/dist/lib/compiled-compile.d.ts +1 -52
  70. package/dist/lib/compiled-compile.js +1 -274
  71. package/dist/lib/compiled-paths.d.ts +1 -39
  72. package/dist/lib/compiled-paths.js +3 -103
  73. package/dist/lib/compiled-raw.d.ts +1 -49
  74. package/dist/lib/compiled-raw.js +3 -102
  75. package/dist/lib/compiled-reset.d.ts +1 -1
  76. package/dist/lib/compiled-reset.js +3 -44
  77. package/dist/lib/compiled-schema.d.ts +1 -27
  78. package/dist/lib/compiled-schema.js +1 -110
  79. package/dist/lib/discovery.d.ts +1 -1
  80. package/dist/lib/discovery.js +2 -2
  81. package/dist/lib/execution-profile.d.ts +1 -17
  82. package/dist/lib/execution-profile.js +1 -84
  83. package/dist/lib/executors.d.ts +1 -32
  84. package/dist/lib/executors.js +1 -43
  85. package/dist/lib/interf-bootstrap.d.ts +1 -3
  86. package/dist/lib/interf-bootstrap.js +3 -18
  87. package/dist/lib/interf-detect.d.ts +1 -33
  88. package/dist/lib/interf-detect.js +3 -176
  89. package/dist/lib/interf-scaffold.d.ts +1 -2
  90. package/dist/lib/interf-scaffold.js +3 -121
  91. package/dist/lib/interf-workflow-package.d.ts +1 -20
  92. package/dist/lib/interf-workflow-package.js +1 -276
  93. package/dist/lib/interf.d.ts +1 -5
  94. package/dist/lib/interf.js +3 -4
  95. package/dist/lib/local-workflows.d.ts +1 -53
  96. package/dist/lib/local-workflows.js +1 -399
  97. package/dist/lib/package-root.d.ts +1 -0
  98. package/dist/lib/package-root.js +1 -0
  99. package/dist/lib/project-paths.d.ts +1 -11
  100. package/dist/lib/project-paths.js +3 -32
  101. package/dist/lib/runtime-acceptance.d.ts +1 -9
  102. package/dist/lib/runtime-acceptance.js +1 -257
  103. package/dist/lib/runtime-contracts.d.ts +1 -2
  104. package/dist/lib/runtime-contracts.js +1 -47
  105. package/dist/lib/runtime-inventory.d.ts +1 -7
  106. package/dist/lib/runtime-inventory.js +1 -29
  107. package/dist/lib/runtime-paths.d.ts +1 -7
  108. package/dist/lib/runtime-paths.js +1 -23
  109. package/dist/lib/runtime-prompt.d.ts +1 -2
  110. package/dist/lib/runtime-prompt.js +1 -46
  111. package/dist/lib/runtime-reconcile.d.ts +1 -2
  112. package/dist/lib/runtime-reconcile.js +1 -156
  113. package/dist/lib/runtime-runs.d.ts +1 -11
  114. package/dist/lib/runtime-runs.js +1 -250
  115. package/dist/lib/runtime-types.d.ts +1 -43
  116. package/dist/lib/runtime-types.js +1 -1
  117. package/dist/lib/runtime.d.ts +1 -6
  118. package/dist/lib/runtime.js +1 -5
  119. package/dist/lib/schema.d.ts +4 -1016
  120. package/dist/lib/schema.js +6 -539
  121. package/dist/lib/source-config.d.ts +1 -39
  122. package/dist/lib/source-config.js +3 -293
  123. package/dist/lib/state-artifacts.d.ts +1 -8
  124. package/dist/lib/state-artifacts.js +1 -13
  125. package/dist/lib/state-health.d.ts +1 -4
  126. package/dist/lib/state-health.js +1 -132
  127. package/dist/lib/state-io.d.ts +1 -10
  128. package/dist/lib/state-io.js +1 -76
  129. package/dist/lib/state-paths.d.ts +1 -4
  130. package/dist/lib/state-paths.js +1 -13
  131. package/dist/lib/state-view.d.ts +1 -4
  132. package/dist/lib/state-view.js +1 -103
  133. package/dist/lib/state.d.ts +1 -6
  134. package/dist/lib/state.js +1 -5
  135. package/dist/lib/test-execution.d.ts +1 -14
  136. package/dist/lib/test-execution.js +3 -525
  137. package/dist/lib/test-matrices.d.ts +1 -90
  138. package/dist/lib/test-matrices.js +3 -96
  139. package/dist/lib/test-paths.d.ts +1 -12
  140. package/dist/lib/test-paths.js +3 -59
  141. package/dist/lib/test-profile-presets.d.ts +1 -57
  142. package/dist/lib/test-profile-presets.js +3 -50
  143. package/dist/lib/test-sandbox.d.ts +1 -11
  144. package/dist/lib/test-sandbox.js +3 -105
  145. package/dist/lib/test-specs.d.ts +1 -7
  146. package/dist/lib/test-specs.js +3 -114
  147. package/dist/lib/test-targets.d.ts +1 -5
  148. package/dist/lib/test-targets.js +3 -38
  149. package/dist/lib/test-types.d.ts +1 -17
  150. package/dist/lib/test-types.js +3 -1
  151. package/dist/lib/test.d.ts +1 -4
  152. package/dist/lib/test.js +3 -3
  153. package/dist/lib/validate-compiled.d.ts +1 -27
  154. package/dist/lib/validate-compiled.js +1 -238
  155. package/dist/lib/validate-helpers.d.ts +1 -12
  156. package/dist/lib/validate-helpers.js +1 -41
  157. package/dist/lib/validate.d.ts +1 -19
  158. package/dist/lib/validate.js +1 -256
  159. package/dist/lib/workflow-authoring.d.ts +1 -0
  160. package/dist/lib/workflow-authoring.js +1 -0
  161. package/dist/lib/workflow-definitions.d.ts +1 -68
  162. package/dist/lib/workflow-definitions.js +1 -206
  163. package/dist/lib/workflow-edit-session.d.ts +1 -0
  164. package/dist/lib/workflow-edit-session.js +1 -0
  165. package/dist/lib/workflow-edit-utils.d.ts +1 -0
  166. package/dist/lib/workflow-edit-utils.js +1 -0
  167. package/dist/lib/workflow-helpers.d.ts +1 -38
  168. package/dist/lib/workflow-helpers.js +1 -167
  169. package/dist/lib/workflow-improvement.d.ts +1 -22
  170. package/dist/lib/workflow-improvement.js +1 -396
  171. package/dist/lib/workflow-primitives.d.ts +1 -2
  172. package/dist/lib/workflow-primitives.js +1 -5
  173. package/dist/lib/workflow-review-paths.d.ts +1 -10
  174. package/dist/lib/workflow-review-paths.js +1 -27
  175. package/dist/lib/workflow-stage-policy.d.ts +1 -0
  176. package/dist/lib/workflow-stage-policy.js +1 -0
  177. package/dist/lib/workflow-stage-runner.d.ts +1 -41
  178. package/dist/lib/workflow-stage-runner.js +1 -109
  179. package/dist/lib/workflows.d.ts +1 -15
  180. package/dist/lib/workflows.js +1 -31
  181. package/dist/packages/agents/index.d.ts +17 -0
  182. package/dist/packages/agents/index.js +15 -0
  183. package/dist/packages/agents/lib/agents.d.ts +6 -0
  184. package/dist/packages/agents/lib/agents.js +5 -0
  185. package/dist/packages/agents/lib/args.d.ts +4 -0
  186. package/dist/packages/agents/lib/args.js +52 -0
  187. package/dist/packages/agents/lib/constants.d.ts +5 -0
  188. package/dist/packages/agents/lib/constants.js +28 -0
  189. package/dist/packages/agents/lib/detection.d.ts +7 -0
  190. package/dist/packages/agents/lib/detection.js +65 -0
  191. package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
  192. package/dist/packages/agents/lib/execution-profile.js +84 -0
  193. package/dist/packages/agents/lib/execution.d.ts +2 -0
  194. package/dist/packages/agents/lib/execution.js +243 -0
  195. package/dist/packages/agents/lib/executors.d.ts +32 -0
  196. package/dist/packages/agents/lib/executors.js +45 -0
  197. package/dist/packages/agents/lib/logs.d.ts +2 -0
  198. package/dist/packages/agents/lib/logs.js +17 -0
  199. package/dist/packages/agents/lib/preflight.d.ts +7 -0
  200. package/dist/packages/agents/lib/preflight.js +77 -0
  201. package/dist/packages/agents/lib/render.d.ts +8 -0
  202. package/dist/packages/agents/lib/render.js +218 -0
  203. package/dist/packages/agents/lib/schema.d.ts +8 -0
  204. package/dist/packages/agents/lib/schema.js +7 -0
  205. package/dist/packages/agents/lib/shells.d.ts +69 -0
  206. package/dist/packages/agents/lib/shells.js +1021 -0
  207. package/dist/packages/agents/lib/status.d.ts +3 -0
  208. package/dist/packages/agents/lib/status.js +58 -0
  209. package/dist/packages/agents/lib/types.d.ts +30 -0
  210. package/dist/packages/agents/lib/types.js +1 -0
  211. package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
  212. package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
  213. package/dist/packages/compiler/compiled-compile.d.ts +48 -0
  214. package/dist/packages/compiler/compiled-compile.js +256 -0
  215. package/dist/packages/compiler/compiled-schema.d.ts +31 -0
  216. package/dist/packages/compiler/compiled-schema.js +141 -0
  217. package/dist/packages/compiler/index.d.ts +24 -0
  218. package/dist/packages/compiler/index.js +23 -0
  219. package/dist/packages/compiler/lib/schema.d.ts +684 -0
  220. package/dist/packages/compiler/lib/schema.js +361 -0
  221. package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
  222. package/dist/packages/compiler/runtime-acceptance.js +269 -0
  223. package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
  224. package/dist/packages/compiler/runtime-contracts.js +48 -0
  225. package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
  226. package/dist/packages/compiler/runtime-inventory.js +29 -0
  227. package/dist/packages/compiler/runtime-paths.d.ts +8 -0
  228. package/dist/packages/compiler/runtime-paths.js +26 -0
  229. package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
  230. package/dist/packages/compiler/runtime-prompt.js +48 -0
  231. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
  232. package/dist/packages/compiler/runtime-reconcile.js +193 -0
  233. package/dist/packages/compiler/runtime-runs.d.ts +11 -0
  234. package/dist/packages/compiler/runtime-runs.js +262 -0
  235. package/dist/packages/compiler/runtime-types.d.ts +43 -0
  236. package/dist/packages/compiler/runtime-types.js +1 -0
  237. package/dist/packages/compiler/runtime.d.ts +6 -0
  238. package/dist/packages/compiler/runtime.js +5 -0
  239. package/dist/packages/compiler/state-artifacts.d.ts +8 -0
  240. package/dist/packages/compiler/state-artifacts.js +13 -0
  241. package/dist/packages/compiler/state-health.d.ts +4 -0
  242. package/dist/packages/compiler/state-health.js +132 -0
  243. package/dist/packages/compiler/state-io.d.ts +10 -0
  244. package/dist/packages/compiler/state-io.js +76 -0
  245. package/dist/packages/compiler/state-paths.d.ts +4 -0
  246. package/dist/packages/compiler/state-paths.js +13 -0
  247. package/dist/packages/compiler/state-view.d.ts +4 -0
  248. package/dist/packages/compiler/state-view.js +103 -0
  249. package/dist/packages/compiler/state.d.ts +7 -0
  250. package/dist/packages/compiler/state.js +12 -0
  251. package/dist/packages/compiler/validate-compiled.d.ts +27 -0
  252. package/dist/packages/compiler/validate-compiled.js +241 -0
  253. package/dist/packages/compiler/validate-helpers.d.ts +12 -0
  254. package/dist/packages/compiler/validate-helpers.js +41 -0
  255. package/dist/packages/compiler/validate.d.ts +21 -0
  256. package/dist/packages/compiler/validate.js +249 -0
  257. package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
  258. package/dist/packages/compiler/workflow-primitives.js +5 -0
  259. package/dist/packages/compiler/workflows.d.ts +15 -0
  260. package/dist/packages/compiler/workflows.js +31 -0
  261. package/dist/packages/project-model/compiled-paths.d.ts +40 -0
  262. package/dist/packages/project-model/compiled-paths.js +106 -0
  263. package/dist/packages/project-model/compiled-raw.d.ts +49 -0
  264. package/dist/packages/project-model/compiled-raw.js +102 -0
  265. package/dist/packages/project-model/compiled-reset.d.ts +2 -0
  266. package/dist/packages/project-model/compiled-reset.js +72 -0
  267. package/dist/packages/project-model/index.d.ts +11 -0
  268. package/dist/packages/project-model/index.js +10 -0
  269. package/dist/packages/project-model/interf-bootstrap.d.ts +3 -0
  270. package/dist/packages/project-model/interf-bootstrap.js +18 -0
  271. package/dist/packages/project-model/interf-detect.d.ts +33 -0
  272. package/dist/packages/project-model/interf-detect.js +176 -0
  273. package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
  274. package/dist/packages/project-model/interf-scaffold.js +124 -0
  275. package/dist/packages/project-model/interf.d.ts +5 -0
  276. package/dist/packages/project-model/interf.js +4 -0
  277. package/dist/packages/project-model/lib/schema.d.ts +125 -0
  278. package/dist/packages/project-model/lib/schema.js +62 -0
  279. package/dist/packages/project-model/project-paths.d.ts +11 -0
  280. package/dist/packages/project-model/project-paths.js +32 -0
  281. package/dist/packages/project-model/source-config.d.ts +38 -0
  282. package/dist/packages/project-model/source-config.js +297 -0
  283. package/dist/packages/testing/index.d.ts +13 -0
  284. package/dist/packages/testing/index.js +10 -0
  285. package/dist/packages/testing/lib/schema.d.ts +261 -0
  286. package/dist/packages/testing/lib/schema.js +119 -0
  287. package/dist/packages/testing/test-execution.d.ts +14 -0
  288. package/dist/packages/testing/test-execution.js +525 -0
  289. package/dist/packages/testing/test-matrices.d.ts +90 -0
  290. package/dist/packages/testing/test-matrices.js +96 -0
  291. package/dist/packages/testing/test-paths.d.ts +12 -0
  292. package/dist/packages/testing/test-paths.js +59 -0
  293. package/dist/packages/testing/test-profile-presets.d.ts +57 -0
  294. package/dist/packages/testing/test-profile-presets.js +50 -0
  295. package/dist/packages/testing/test-sandbox.d.ts +11 -0
  296. package/dist/packages/testing/test-sandbox.js +105 -0
  297. package/dist/packages/testing/test-specs.d.ts +7 -0
  298. package/dist/packages/testing/test-specs.js +114 -0
  299. package/dist/packages/testing/test-targets.d.ts +5 -0
  300. package/dist/packages/testing/test-targets.js +38 -0
  301. package/dist/packages/testing/test-types.d.ts +16 -0
  302. package/dist/packages/testing/test-types.js +1 -0
  303. package/dist/packages/testing/test.d.ts +4 -0
  304. package/dist/packages/testing/test.js +3 -0
  305. package/dist/packages/workflow-authoring/index.d.ts +4 -0
  306. package/dist/packages/workflow-authoring/index.js +4 -0
  307. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
  308. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
  309. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
  310. package/dist/packages/workflow-authoring/workflow-authoring.js +120 -0
  311. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
  312. package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
  313. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
  314. package/dist/packages/workflow-authoring/workflow-improvement.js +209 -0
  315. package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
  316. package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
  317. package/dist/packages/workflow-package/index.d.ts +9 -0
  318. package/dist/packages/workflow-package/index.js +9 -0
  319. package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
  320. package/dist/packages/workflow-package/interf-workflow-package.js +342 -0
  321. package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
  322. package/dist/packages/workflow-package/lib/package-root.js +6 -0
  323. package/dist/packages/workflow-package/local-workflows.d.ts +54 -0
  324. package/dist/packages/workflow-package/local-workflows.js +422 -0
  325. package/dist/packages/workflow-package/workflow-definitions.d.ts +78 -0
  326. package/dist/packages/workflow-package/workflow-definitions.js +203 -0
  327. package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
  328. package/dist/packages/workflow-package/workflow-helpers.js +167 -0
  329. package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
  330. package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
  331. package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
  332. package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
  333. package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
  334. package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
  335. package/package.json +44 -21
  336. package/dist/commands/compile.d.ts +0 -15
  337. package/dist/commands/create-workflow-wizard.js +0 -125
  338. package/dist/commands/create.js +0 -162
  339. package/dist/commands/init.d.ts +0 -3
  340. package/dist/commands/test.d.ts +0 -9
  341. package/dist/lib/compiled-home.d.ts +0 -5
  342. package/dist/lib/compiled-home.js +0 -32
  343. package/dist/lib/config.js +0 -9
  344. package/dist/lib/obsidian.d.ts +0 -1
  345. package/dist/lib/obsidian.js +0 -15
  346. package/dist/lib/summarize-plan.d.ts +0 -17
  347. package/dist/lib/summarize-plan.js +0 -120
  348. /package/dist/{commands → cli/commands}/default.d.ts +0 -0
  349. /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
  350. /package/dist/{commands → cli/commands}/list.d.ts +0 -0
  351. /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
  352. /package/dist/{commands → cli/commands}/status.d.ts +0 -0
  353. /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
@@ -5,8 +5,12 @@
5
5
  "kind": "compiled",
6
6
  "version": 1
7
7
  },
8
- "label": "Interf Compiler (Recommended)",
9
- "hint": "Interf Compiler's default methodology: summarize source-grounded evidence, structure the cross-file layer, then shape the final compiled dataset around its focus and saved truth checks.",
8
+ "purpose": {
9
+ "label": "General compiled context workflow for agent use",
10
+ "task_hint": "Compile mixed raw files into evidence-backed summaries, cross-file structure, and a usable entrypoint for agents answering the questions this task depends on."
11
+ },
12
+ "label": "Interf (Built-in)",
13
+ "hint": "Interf's built-in workflow: summarize source-grounded evidence, structure the cross-file layer, then shape the final context folder around its task focus and checks.",
10
14
  "stages": [
11
15
  {
12
16
  "id": "summarize",
@@ -31,6 +35,15 @@
31
35
  "markdown_frontmatter_valid_zones": [
32
36
  "summaries"
33
37
  ],
38
+ "frontmatter_required_keys_in_zones": {
39
+ "summaries": [
40
+ "source",
41
+ "source_kind",
42
+ "evidence_tier",
43
+ "truth_mode",
44
+ "state"
45
+ ]
46
+ },
34
47
  "markdown_abstract_valid_zones": [
35
48
  "summaries"
36
49
  ]
@@ -69,7 +82,7 @@
69
82
  {
70
83
  "id": "shape",
71
84
  "label": "Shape",
72
- "description": "Shape the final compiled dataset around the saved focus and truth checks.",
85
+ "description": "Shape the final context folder around the saved task focus and checks.",
73
86
  "contract_type": "compiled-query-shape",
74
87
  "skill_dir": "shape",
75
88
  "reads": [
@@ -118,11 +131,12 @@
118
131
  "Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.",
119
132
  "For small datasets, prefer a minimal stable substrate over exhaustive graph sprawl.",
120
133
  "When you add wikilinks, target real compiled notes by exact basename or explicit relative path. Do not invent title-style links unless that exact title is also a declared note label or alias.",
134
+ "Do not add wikilinks in structure outputs to files that the shape stage creates later. If a route belongs in `home.md` or a later shaped note, leave plain text now and let the later stage add the link.",
121
135
  "For summary references, prefer explicit links like `[[summaries/<file-stem>]]` or plain code paths. For knowledge notes, prefer the final filename stem under `knowledge/`."
122
136
  ],
123
137
  "shape": [
124
- "Use the dataset focus and saved truth checks to bias the final compiled dataset toward the job it should be especially good at.",
125
- "Do not copy expected answers into the final compiled dataset just because the checks imply them.",
138
+ "Use the saved task focus and checks to bias the final context folder toward the job it should be especially good at.",
139
+ "Do not copy expected answers into the final context folder just because the checks imply them.",
126
140
  "If a saved truth check depends on chart-derived or table-derived values, verify the needed evidence in `raw/` while shaping and write focused notes that preserve bounded values plus provenance.",
127
141
  "Prefer better routing, prioritization, and focused navigation over speculative synthesis.",
128
142
  "Any wikilinks you add to `home.md` or indexes must resolve to real compiled note basenames or explicit relative paths."
@@ -1,11 +1,12 @@
1
1
  {
2
- "kind": "compiled-schema",
2
+ "kind": "workflow-schema",
3
3
  "version": 1,
4
4
  "target_type": "compiled",
5
- "label": "Interf Compiler (Recommended) compiled dataset schema",
5
+ "label": "Interf built-in workflow schema",
6
6
  "zones": [
7
7
  {
8
8
  "id": "raw",
9
+ "role": "input",
9
10
  "path": "raw",
10
11
  "kind": "directory",
11
12
  "required": true,
@@ -14,6 +15,7 @@
14
15
  },
15
16
  {
16
17
  "id": "summaries",
18
+ "role": "working",
17
19
  "path": "summaries",
18
20
  "kind": "directory",
19
21
  "required": true,
@@ -24,6 +26,7 @@
24
26
  },
25
27
  {
26
28
  "id": "knowledge-entities",
29
+ "role": "output",
27
30
  "path": "knowledge/entities",
28
31
  "kind": "directory",
29
32
  "required": true,
@@ -34,6 +37,7 @@
34
37
  },
35
38
  {
36
39
  "id": "knowledge-claims",
40
+ "role": "output",
37
41
  "path": "knowledge/claims",
38
42
  "kind": "directory",
39
43
  "required": true,
@@ -44,6 +48,7 @@
44
48
  },
45
49
  {
46
50
  "id": "knowledge-indexes",
51
+ "role": "output",
47
52
  "path": "knowledge/indexes",
48
53
  "kind": "directory",
49
54
  "required": true,
@@ -55,16 +60,18 @@
55
60
  },
56
61
  {
57
62
  "id": "home",
63
+ "role": "output",
58
64
  "path": "home.md",
59
65
  "kind": "file",
60
66
  "required": true,
61
67
  "owned_by": [
62
68
  "shape"
63
69
  ],
64
- "description": "Primary entrypoint note for agents using the compiled dataset."
70
+ "description": "Primary entrypoint note for agents using the context folder."
65
71
  },
66
72
  {
67
73
  "id": "runtime",
74
+ "role": "runtime",
68
75
  "path": ".interf/runtime",
69
76
  "kind": "runtime",
70
77
  "required": true,
package/dist/bin.js CHANGED
@@ -1,29 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import yargs from "yargs";
3
- import { hideBin } from "yargs/helpers";
4
- import { initCommand } from "./commands/init.js";
5
- import { createCommand } from "./commands/create.js";
6
- import { compileCommand } from "./commands/compile.js";
7
- import { testCommand } from "./commands/test.js";
8
- import { doctorCommand } from "./commands/doctor.js";
9
- import { listCommand } from "./commands/list.js";
10
- import { statusCommand } from "./commands/status.js";
11
- import { resetCommand } from "./commands/reset.js";
12
- import { defaultCommand } from "./commands/default.js";
13
- import { verifyCommand } from "./commands/verify.js";
14
- yargs(hideBin(process.argv))
15
- .scriptName("interf")
16
- .command(defaultCommand)
17
- .command(initCommand)
18
- .command(compileCommand)
19
- .command(testCommand)
20
- .command(createCommand)
21
- .command(doctorCommand)
22
- .command(listCommand)
23
- .command(statusCommand)
24
- .command(verifyCommand)
25
- .command(resetCommand)
26
- .strict()
27
- .help()
28
- .version()
29
- .parse();
2
+ import { runCli } from "./cli/index.js";
3
+ await runCli();
@@ -1,5 +1,5 @@
1
- import type { WorkflowExecutor } from "../lib/executors.js";
2
- import type { SourceTruthCheck } from "../lib/schema.js";
1
+ import type { WorkflowExecutor } from "../../packages/agents/lib/executors.js";
2
+ import type { SourceTruthCheck } from "../../packages/project-model/lib/schema.js";
3
3
  export declare function buildTruthCheckDraftPrompt(options: {
4
4
  datasetName: string;
5
5
  datasetPath: string;
@@ -12,27 +12,27 @@ export function buildTruthCheckDraftPrompt(options) {
12
12
  const taskLines = normalizedAbout
13
13
  ? [
14
14
  `Primary task: ${normalizedAbout}`,
15
- "Draft checks that directly measure whether a local agent would be accurate on that task.",
15
+ "Draft checks that directly measure whether a local agent can answer the key questions from the data behind that task.",
16
16
  "Prefer checks that would make a human confident the dataset is useful for that exact job.",
17
17
  ]
18
18
  : [
19
19
  "No primary task was provided.",
20
- "Prefer broad, representative checks that reflect the most useful questions this dataset should answer.",
20
+ "Prefer broad, representative checks that reflect the most useful questions a human would verify from this source folder.",
21
21
  ];
22
22
  return [
23
- "You are drafting Interf truth checks for a local dataset.",
23
+ "You are drafting Interf checks for a local source folder.",
24
24
  "Read the files in this folder and draft a small set of checks that a human can verify from the source material.",
25
25
  "Do not ask follow-up questions.",
26
- "Keep the checks concrete, explicit, and useful for measuring agent accuracy on this dataset.",
26
+ "Keep the checks concrete, explicit, and useful for measuring whether an agent can reason correctly over the files in this source folder.",
27
27
  "",
28
- `Dataset id: ${options.datasetName}`,
29
- `Dataset folder: ${options.datasetPath}`,
28
+ `Setup id: ${options.datasetName}`,
29
+ `Source folder: ${options.datasetPath}`,
30
30
  ...taskLines,
31
31
  "",
32
32
  `Write exactly one JSON array to ${JSON.stringify(options.outputPath)}.`,
33
- `Draft ${options.targetCount} checks unless the dataset is too small; in that case write fewer.`,
33
+ `Draft ${options.targetCount} checks unless the source folder is too small; in that case write fewer.`,
34
34
  "Each array item must be an object with exactly these keys:",
35
- '- "question": a plain-English question answerable from this dataset',
35
+ '- "question": a plain-English question answerable from this source folder',
36
36
  '- "answer": the expected correct answer in plain English',
37
37
  "",
38
38
  "Quality bar:",
@@ -72,8 +72,8 @@ export async function draftTruthChecks(options) {
72
72
  return {
73
73
  checks: null,
74
74
  error: code === 0
75
- ? "The local agent finished without writing draft truth checks."
76
- : "The local agent did not produce draft truth checks.",
75
+ ? "The local agent finished without writing draft checks."
76
+ : "The local agent did not produce draft checks.",
77
77
  };
78
78
  }
79
79
  let parsed;
@@ -83,15 +83,15 @@ export async function draftTruthChecks(options) {
83
83
  catch (error) {
84
84
  return {
85
85
  checks: null,
86
- error: `Draft truth checks were not valid JSON: ${error instanceof Error ? error.message : String(error)}`,
86
+ error: `Draft checks were not valid JSON: ${error instanceof Error ? error.message : String(error)}`,
87
87
  };
88
88
  }
89
89
  const validated = DraftTruthChecksSchema.safeParse(parsed);
90
90
  if (!validated.success) {
91
- const detail = validated.error.issues[0]?.message ?? "invalid draft truth checks";
91
+ const detail = validated.error.issues[0]?.message ?? "invalid draft checks";
92
92
  return {
93
93
  checks: null,
94
- error: `Draft truth checks did not match the required shape: ${detail}`,
94
+ error: `Draft checks did not match the required shape: ${detail}`,
95
95
  };
96
96
  }
97
97
  return {
@@ -1,6 +1,6 @@
1
- import type { WorkflowExecutionProfile, WorkflowExecutor } from "../lib/executors.js";
2
- import type { SourceDatasetConfig } from "../lib/schema.js";
3
- import type { StageShellRetentionMode } from "../lib/workflows.js";
1
+ import type { WorkflowExecutionProfile, WorkflowExecutor } from "../../packages/agents/lib/executors.js";
2
+ import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
3
+ import type { StageShellRetentionMode } from "../../packages/compiler/workflows.js";
4
4
  export declare function runConfiguredCompiledCompile(options: {
5
5
  executor: WorkflowExecutor;
6
6
  testExecutor?: WorkflowExecutor | null;
@@ -2,13 +2,14 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
2
2
  import { tmpdir } from "node:os";
3
3
  import { dirname, join } from "node:path";
4
4
  import chalk from "chalk";
5
- import { readInterfConfig } from "../lib/interf.js";
6
- import { resetCompiledGeneratedState } from "../lib/compiled-reset.js";
7
- import { formatActiveCompiledWorkflowStageStep, resolveRequiredCompiledWorkflowFromConfig, } from "../lib/workflow-definitions.js";
8
- import { resolveDatasetCompileMaxAttempts, resolveDatasetCompileMaxLoops, } from "../lib/source-config.js";
9
- import { runWorkflowImprovementLoop } from "../lib/workflow-improvement.js";
10
- import { stageExecutionShellsRoot, workflowPackagePathForCompiled, } from "../lib/compiled-paths.js";
11
- import { readCompiledSchemaFile } from "../lib/compiled-schema.js";
5
+ import { readInterfConfig } from "../../packages/project-model/interf.js";
6
+ import { clearCompiledRuntimeDerivedArtifacts, resetCompiledGeneratedState, } from "../../packages/project-model/compiled-reset.js";
7
+ import { formatActiveCompiledWorkflowStageStep, resolveRequiredCompiledWorkflowFromConfig, } from "../../packages/workflow-package/workflow-definitions.js";
8
+ import { loadCompiledDatasetConfig, resolveDatasetCompileMaxAttempts, resolveDatasetCompileMaxLoops, } from "../../packages/project-model/source-config.js";
9
+ import { runWorkflowImprovementLoop } from "../../packages/workflow-authoring/workflow-improvement.js";
10
+ import { stageExecutionShellsRoot, workflowPackagePathForCompiled, } from "../../packages/project-model/compiled-paths.js";
11
+ import { readCompiledSchemaFile } from "../../packages/compiler/compiled-schema.js";
12
+ import { initializeCompiledRuntimeState } from "../../packages/compiler/state.js";
12
13
  import { compileCompiledWithReporter } from "./compiled-flow.js";
13
14
  import { printSavedTestOutcome, questionPassRate, runSavedCompiledTest, } from "./test-flow.js";
14
15
  function printCompileFailure(compiledPath, failedStage) {
@@ -19,14 +20,6 @@ function printCompileFailure(compiledPath, failedStage) {
19
20
  function testScore(outcome) {
20
21
  return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
21
22
  }
22
- const BEST_VARIATION_RUNTIME_RESTORE_PATHS = [
23
- ".interf/runtime/state.json",
24
- ".interf/runtime/health.json",
25
- ".interf/runtime/view-spec.json",
26
- ".interf/runtime/inventory.json",
27
- ".interf/runtime/run.json",
28
- ".interf/runtime/raw-snapshot.json",
29
- ];
30
23
  function bestVariationRestorePaths(compiledPath) {
31
24
  const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
32
25
  const zonePaths = (schema?.zones ?? [])
@@ -39,10 +32,8 @@ function bestVariationRestorePaths(compiledPath) {
39
32
  ".codex",
40
33
  ".agents",
41
34
  ".cursor",
42
- ".obsidian",
43
35
  ".interf/interf.json",
44
36
  ".interf/workflow",
45
- ...BEST_VARIATION_RUNTIME_RESTORE_PATHS,
46
37
  ...zonePaths,
47
38
  ];
48
39
  }
@@ -71,6 +62,8 @@ function restoreCompiledBestState(snapshotPath, compiledPath) {
71
62
  rmSync(join(compiledPath, relativePath), { recursive: true, force: true });
72
63
  copyRelativePathIfPresent(snapshotPath, compiledPath, relativePath);
73
64
  }
65
+ clearCompiledRuntimeDerivedArtifacts(compiledPath);
66
+ initializeCompiledRuntimeState(compiledPath);
74
67
  }
75
68
  async function runWorkflowVariation(options) {
76
69
  let bestOutcome = null;
@@ -85,16 +78,16 @@ async function runWorkflowVariation(options) {
85
78
  const resetTarget = attempt > 1
86
79
  ? `attempt ${attempt}/${options.maxAttempts}`
87
80
  : options.variationLabel;
88
- console.log(chalk.dim(` Resetting generated compiled state before ${resetTarget}...`));
81
+ console.log(chalk.dim(` Resetting generated compiled-context state before ${resetTarget}...`));
89
82
  resetCompiledGeneratedState(options.compiledPath, "compile");
90
83
  }
91
84
  const result = await compileCompiledWithReporter(options.executor, options.compiledPath, {
92
85
  heading: options.maxAttempts > 1
93
- ? `Building compiled dataset (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
94
- : `Building compiled dataset (${options.variationLabel})...`,
86
+ ? `Building compiled context (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
87
+ : `Building compiled context (${options.variationLabel})...`,
95
88
  successMessage: options.maxAttempts > 1
96
- ? `Compiled dataset ready for ${options.variationLabel}, attempt ${attempt}.`
97
- : `Compiled dataset ready for ${options.variationLabel}.`,
89
+ ? `Compiled context ready for ${options.variationLabel}, attempt ${attempt}.`
90
+ : `Compiled context ready for ${options.variationLabel}.`,
98
91
  preserveStageShells: options.preserveStageShells,
99
92
  });
100
93
  if (!result.ok) {
@@ -130,7 +123,7 @@ async function runWorkflowVariation(options) {
130
123
  bestOutcome,
131
124
  bestSnapshotPath,
132
125
  bestAttempt,
133
- fatalError: "Could not run the saved compiled-dataset test after compile.",
126
+ fatalError: "Could not run the saved compiled-context check after compile.",
134
127
  };
135
128
  }
136
129
  console.log();
@@ -145,7 +138,7 @@ async function runWorkflowVariation(options) {
145
138
  }
146
139
  if (outcome.result.ok) {
147
140
  console.log();
148
- console.log(chalk.green(` Compiled passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
141
+ console.log(chalk.green(` Compiled context passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
149
142
  printStageShellReviewHint(options.compiledPath, options.preserveStageShells, "success");
150
143
  return {
151
144
  passed: true,
@@ -188,9 +181,9 @@ function summarizeWorkflowVariation(options) {
188
181
  const passedQuestions = options.result.bestOutcome?.result.passedCases ?? 0;
189
182
  const totalQuestions = options.result.bestOutcome?.result.totalCases ?? options.defaultTotalQuestions;
190
183
  const summary = options.result.passed
191
- ? `Passed ${passedQuestions}/${totalQuestions} truth checks.`
184
+ ? `Passed ${passedQuestions}/${totalQuestions} checks.`
192
185
  : options.result.bestOutcome
193
- ? `Best result: ${passedQuestions}/${totalQuestions} truth checks passed.`
186
+ ? `Best result: ${passedQuestions}/${totalQuestions} checks passed.`
194
187
  : options.result.failedStage
195
188
  ? `Compile failed at stage ${options.result.failedStage} before any test result.`
196
189
  : "Workflow variation did not produce a passing result.";
@@ -220,16 +213,16 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
220
213
  }
221
214
  }
222
215
  function printPostCompileNextStep(options) {
223
- console.log(chalk.dim(` Compiled dataset: ${options.compiledPath}`));
216
+ console.log(chalk.dim(` Context folder: ${options.compiledPath}`));
224
217
  if (options.checks === 0) {
225
- console.log(chalk.dim(" Next: run `interf` to add truth checks, then `interf test`."));
218
+ console.log(chalk.dim(" Next: run `interf` to add checks, then `interf test`."));
226
219
  return;
227
220
  }
228
221
  if (options.testedDuringCompile) {
229
- console.log(chalk.dim(" Next: inspect the compiled dataset or rerun `interf test` for a fresh comparison."));
222
+ console.log(chalk.dim(" Next: inspect the compiled context, or run `interf test` if you also want a raw-versus-compiled-context comparison."));
230
223
  return;
231
224
  }
232
- console.log(chalk.dim(" Next: run `interf test` to compare the raw files and the compiled dataset."));
225
+ console.log(chalk.dim(" Next: run `interf test` to compare the raw files and the compiled context."));
233
226
  }
234
227
  function formatVariationQuestionSummary(summary) {
235
228
  return `${summary.passed_questions}/${summary.total_questions}`;
@@ -240,7 +233,7 @@ function printWorkflowVariationSummary(summaries) {
240
233
  console.log();
241
234
  console.log(chalk.bold(" Workflow variation summary"));
242
235
  console.log();
243
- console.log(" | Variation | Kind | Truth checks | Result |");
236
+ console.log(" | Variation | Kind | Checks | Result |");
244
237
  console.log(" | --- | --- | --- | --- |");
245
238
  for (const summary of summaries) {
246
239
  console.log(` | ${summary.variation} | ${summary.kind} | \`${formatVariationQuestionSummary(summary)}\` | ${summary.passed ? "pass" : "fail"} |`);
@@ -252,7 +245,7 @@ function printCompiledLocalWorkflowOwnership(compiledPath, bestVariation) {
252
245
  console.log();
253
246
  console.log(chalk.dim(` Best workflow variation now lives in: ${workflowPackagePathForCompiled(compiledPath)}`));
254
247
  console.log(chalk.dim(" The project-level workflow selection was not changed automatically."));
255
- console.log(chalk.dim(" Recompiling this existing compiled dataset reuses that local workflow draft."));
248
+ console.log(chalk.dim(" Recompiling this existing compiled context reuses that local workflow draft."));
256
249
  }
257
250
  export async function runConfiguredCompiledCompile(options) {
258
251
  const preserveStageShells = options.preserveStageShells ?? "on-failure";
@@ -262,19 +255,19 @@ export async function runConfiguredCompiledCompile(options) {
262
255
  const loopEnabled = maxAttempts != null;
263
256
  const checks = options.compiledConfig?.checks ?? [];
264
257
  if (loopEnabled && checks.length === 0) {
265
- console.log(chalk.yellow(" Retry and self-improving modes need saved truth checks. Building once without those loops."));
258
+ console.log(chalk.yellow(" Retry and self-improving modes need checks. Building once without those loops."));
266
259
  }
267
260
  else if (loopEnabled) {
268
261
  if (maxAttempts > 1) {
269
262
  console.log(chalk.dim(` Retry mode: up to ${maxAttempts} compile attempts.`));
270
- console.log(chalk.dim(" Interf Compiler will rerun the same workflow variation, test the compiled dataset, and stop early if it passes."));
263
+ console.log(chalk.dim(" Interf will rerun the same workflow variation, test the compiled context, and stop early if it passes."));
271
264
  }
272
265
  else {
273
266
  console.log(chalk.dim(" Compile mode: 1 attempt per workflow variation."));
274
267
  }
275
268
  if (maxLoops != null) {
276
269
  console.log(chalk.dim(` Self-improving loops: up to ${maxLoops} workflow edits after retries fail.`));
277
- console.log(chalk.dim(" Interf Compiler will review failed runs, edit the workflow package, and test new workflow variations."));
270
+ console.log(chalk.dim(" Interf will review failed runs, edit the workflow, and test new workflow variations."));
278
271
  }
279
272
  }
280
273
  if (!loopEnabled || checks.length === 0) {
@@ -302,11 +295,13 @@ export async function runConfiguredCompiledCompile(options) {
302
295
  const previousVariations = [];
303
296
  const improvementRunId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
304
297
  try {
305
- const compiledConfig = options.compiledConfig ?? {
306
- name: readInterfConfig(options.compiledPath)?.name ?? "compiled",
307
- path: ".",
308
- checks: [],
309
- };
298
+ const compiledConfig = options.compiledConfig
299
+ ?? loadCompiledDatasetConfig(options.compiledPath)
300
+ ?? {
301
+ name: readInterfConfig(options.compiledPath)?.name ?? "compiled",
302
+ path: "./dataset",
303
+ checks: [],
304
+ };
310
305
  const adoptVariationBest = (variation, result) => {
311
306
  if (result.bestOutcome && result.bestSnapshotPath && (!bestOutcome || testScore(result.bestOutcome) > testScore(bestOutcome))) {
312
307
  if (bestSnapshotPath) {
@@ -419,20 +414,20 @@ export async function runConfiguredCompiledCompile(options) {
419
414
  if (bestSnapshotPath && bestVariation > 0) {
420
415
  restoreCompiledBestState(bestSnapshotPath, options.compiledPath);
421
416
  console.log();
422
- console.log(chalk.dim(` Restored the best-performing compiled dataset from variation ${bestVariation}, attempt ${bestAttempt}.`));
417
+ console.log(chalk.dim(` Restored the best-performing compiled context from variation ${bestVariation}, attempt ${bestAttempt}.`));
423
418
  }
424
419
  process.exitCode = 1;
425
420
  console.log();
426
421
  printWorkflowVariationSummary(previousVariations);
427
422
  printCompiledLocalWorkflowOwnership(options.compiledPath, bestVariation);
428
423
  if (maxLoops != null) {
429
- console.log(chalk.red(` Compiled did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} workflow-improvement loop${maxLoops === 1 ? "" : "s"}.`));
424
+ console.log(chalk.red(` Compiled context did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} workflow-improvement loop${maxLoops === 1 ? "" : "s"}.`));
430
425
  }
431
426
  else {
432
- console.log(chalk.red(` Compiled did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
427
+ console.log(chalk.red(` Compiled context did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
433
428
  }
434
429
  if (bestOutcome) {
435
- console.log(chalk.dim(` Best attempt truth-check pass rate: ${questionPassRate(bestOutcome)}%.`));
430
+ console.log(chalk.dim(` Best attempt check pass rate: ${questionPassRate(bestOutcome)}%.`));
436
431
  }
437
432
  printStageShellReviewHint(options.compiledPath, preserveStageShells, "failure");
438
433
  return false;
@@ -0,0 +1,33 @@
1
+ import * as p from "@clack/prompts";
2
+ import { detectInterf } from "../../packages/project-model/interf.js";
3
+ import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
4
+ import type { CommandModule } from "yargs";
5
+ import { chooseCompiledConfigToBuild, ensureCompiledFromConfig } from "./compiled-flow.js";
6
+ import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
7
+ import { runConfiguredCompiledCompile } from "./compile-controller.js";
8
+ export { runConfiguredCompiledCompile } from "./compile-controller.js";
9
+ export declare const compileCommand: CommandModule;
10
+ interface CompileCommandDeps {
11
+ chooseCompiledConfigToBuild: typeof chooseCompiledConfigToBuild;
12
+ confirm: typeof p.confirm;
13
+ detectInterf: typeof detectInterf;
14
+ ensureCompiledFromConfig: typeof ensureCompiledFromConfig;
15
+ resolveInteractiveCompileLoopOverrides: typeof resolveInteractiveCompileLoopOverrides;
16
+ resolveOrConfigureLocalExecutor: typeof resolveOrConfigureLocalExecutor;
17
+ runConfiguredCompiledCompile: typeof runConfiguredCompiledCompile;
18
+ }
19
+ export interface CompileCommandResult {
20
+ compiledPath: string;
21
+ testedDuringCompile: boolean;
22
+ }
23
+ export declare function runCompileCommand(argv?: Record<string, unknown>, deps?: Partial<CompileCommandDeps>): Promise<CompileCommandResult | null>;
24
+ export declare function resolveInteractiveCompileLoopOverrides(options: {
25
+ compiledPath: string;
26
+ compiledConfig: SourceDatasetConfig | null;
27
+ maxAttemptsOverride: number | null;
28
+ maxLoopsOverride: number | null;
29
+ }): Promise<{
30
+ compiledConfig: SourceDatasetConfig | null;
31
+ maxAttemptsOverride: number | null;
32
+ maxLoopsOverride: number | null;
33
+ } | null>;