@interf/compiler 0.9.1 → 0.9.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 (250) hide show
  1. package/README.md +9 -9
  2. package/agent-skills/interf-actions/SKILL.md +3 -0
  3. package/agent-skills/interf-actions/references/cli.md +13 -13
  4. package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
  5. package/builtin-methods/interf-default/improve/SKILL.md +18 -0
  6. package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
  7. package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
  8. package/dist/cli/commands/check-draft.d.ts +6 -6
  9. package/dist/cli/commands/check-draft.js +5 -5
  10. package/dist/cli/commands/compile-controller.d.ts +7 -7
  11. package/dist/cli/commands/compile-controller.js +35 -38
  12. package/dist/cli/commands/compile.d.ts +3 -3
  13. package/dist/cli/commands/compile.js +23 -21
  14. package/dist/cli/commands/compiled-flow.d.ts +11 -11
  15. package/dist/cli/commands/compiled-flow.js +33 -30
  16. package/dist/cli/commands/create-method-wizard.d.ts +76 -0
  17. package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
  18. package/dist/cli/commands/create.d.ts +3 -3
  19. package/dist/cli/commands/create.js +44 -45
  20. package/dist/cli/commands/default.js +1 -1
  21. package/dist/cli/commands/executor-flow.d.ts +6 -6
  22. package/dist/cli/commands/executor-flow.js +1 -1
  23. package/dist/cli/commands/init.d.ts +2 -2
  24. package/dist/cli/commands/init.js +139 -118
  25. package/dist/cli/commands/list.js +11 -10
  26. package/dist/cli/commands/preparation-selection.d.ts +3 -3
  27. package/dist/cli/commands/source-config-wizard.d.ts +9 -9
  28. package/dist/cli/commands/source-config-wizard.js +43 -43
  29. package/dist/cli/commands/status.js +36 -9
  30. package/dist/cli/commands/test-flow.d.ts +15 -15
  31. package/dist/cli/commands/test-flow.js +29 -219
  32. package/dist/cli/commands/test.d.ts +2 -2
  33. package/dist/cli/commands/test.js +50 -51
  34. package/dist/cli/commands/verify.js +7 -7
  35. package/dist/cli/commands/web.js +41 -28
  36. package/dist/compiler-ui/404.html +1 -0
  37. package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
  38. package/dist/compiler-ui/__next._full.txt +20 -0
  39. package/dist/compiler-ui/__next._head.txt +5 -0
  40. package/dist/compiler-ui/__next._index.txt +5 -0
  41. package/dist/compiler-ui/__next._tree.txt +5 -0
  42. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
  43. package/{apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css → dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css} +1 -1
  44. package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js} +15 -21
  45. package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
  46. package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
  47. package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
  48. package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
  49. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
  50. package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
  51. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
  52. package/dist/compiler-ui/_not-found.html +1 -0
  53. package/dist/compiler-ui/_not-found.txt +15 -0
  54. package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
  55. package/dist/compiler-ui/index.txt +20 -0
  56. package/dist/index.d.ts +8 -6
  57. package/dist/index.js +5 -3
  58. package/dist/packages/agents/index.d.ts +1 -1
  59. package/dist/packages/agents/lib/args.d.ts +2 -2
  60. package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
  61. package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
  62. package/dist/packages/agents/lib/execution-profile.js +7 -6
  63. package/dist/packages/agents/lib/executors.d.ts +13 -13
  64. package/dist/packages/agents/lib/preflight.d.ts +1 -0
  65. package/dist/packages/agents/lib/preflight.js +32 -9
  66. package/dist/packages/agents/lib/shells.d.ts +25 -24
  67. package/dist/packages/agents/lib/shells.js +161 -154
  68. package/dist/packages/agents/lib/types.d.ts +2 -2
  69. package/dist/packages/compiler/artifact-counts.d.ts +1 -0
  70. package/dist/packages/compiler/artifact-counts.js +30 -0
  71. package/dist/packages/compiler/compiled-paths.d.ts +4 -7
  72. package/dist/packages/compiler/compiled-paths.js +9 -15
  73. package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
  74. package/dist/packages/compiler/compiled-pipeline.js +22 -22
  75. package/dist/packages/compiler/compiled-schema.d.ts +20 -20
  76. package/dist/packages/compiler/compiled-schema.js +29 -29
  77. package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
  78. package/dist/packages/compiler/compiled-stage-plan.js +8 -8
  79. package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
  80. package/dist/packages/compiler/compiled-stage-runner.js +7 -7
  81. package/dist/packages/compiler/compiled-target.d.ts +5 -5
  82. package/dist/packages/compiler/compiled-target.js +5 -5
  83. package/dist/packages/compiler/index.d.ts +3 -3
  84. package/dist/packages/compiler/index.js +2 -2
  85. package/dist/packages/compiler/lib/schema.d.ts +62 -247
  86. package/dist/packages/compiler/lib/schema.js +56 -174
  87. package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
  88. package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
  89. package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
  90. package/dist/packages/compiler/raw-snapshot.js +0 -1
  91. package/dist/packages/compiler/reset.js +3 -3
  92. package/dist/packages/compiler/runtime-acceptance.js +9 -16
  93. package/dist/packages/compiler/runtime-contracts.js +9 -9
  94. package/dist/packages/compiler/runtime-prompt.js +4 -4
  95. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
  96. package/dist/packages/compiler/runtime-reconcile.js +3 -3
  97. package/dist/packages/compiler/runtime-runs.js +9 -9
  98. package/dist/packages/compiler/runtime-types.d.ts +8 -7
  99. package/dist/packages/compiler/state-health.js +26 -35
  100. package/dist/packages/compiler/state-view.js +6 -6
  101. package/dist/packages/compiler/validate-compiled.d.ts +5 -5
  102. package/dist/packages/compiler/validate-compiled.js +56 -64
  103. package/dist/packages/compiler/validate.d.ts +2 -2
  104. package/dist/packages/compiler/validate.js +22 -14
  105. package/dist/packages/contracts/index.d.ts +2 -0
  106. package/dist/packages/contracts/index.js +1 -0
  107. package/dist/packages/contracts/lib/schema.d.ts +205 -0
  108. package/dist/packages/contracts/lib/schema.js +101 -0
  109. package/dist/packages/execution/index.d.ts +2 -2
  110. package/dist/packages/execution/index.js +1 -1
  111. package/dist/packages/execution/lib/schema.d.ts +80 -83
  112. package/dist/packages/execution/lib/schema.js +25 -48
  113. package/dist/packages/local-service/action-values.d.ts +0 -1
  114. package/dist/packages/local-service/action-values.js +0 -1
  115. package/dist/packages/local-service/client.d.ts +4 -4
  116. package/dist/packages/local-service/client.js +4 -4
  117. package/dist/packages/local-service/index.d.ts +3 -3
  118. package/dist/packages/local-service/index.js +2 -2
  119. package/dist/packages/local-service/lib/schema.d.ts +536 -974
  120. package/dist/packages/local-service/lib/schema.js +43 -160
  121. package/dist/packages/local-service/run-observability.d.ts +6 -0
  122. package/dist/packages/local-service/run-observability.js +592 -0
  123. package/dist/packages/local-service/runtime.d.ts +19 -23
  124. package/dist/packages/local-service/runtime.js +302 -880
  125. package/dist/packages/local-service/server.d.ts +1 -0
  126. package/dist/packages/local-service/server.js +25 -20
  127. package/dist/packages/method-authoring/index.d.ts +4 -0
  128. package/dist/packages/method-authoring/index.js +4 -0
  129. package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
  130. package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
  131. package/dist/packages/method-authoring/method-authoring.js +116 -0
  132. package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
  133. package/dist/packages/method-authoring/method-edit-session.js +125 -0
  134. package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
  135. package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
  136. package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
  137. package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
  138. package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
  139. package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
  140. package/dist/packages/method-package/index.d.ts +11 -0
  141. package/dist/packages/method-package/index.js +11 -0
  142. package/dist/packages/method-package/interf-method-package.d.ts +31 -0
  143. package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
  144. package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
  145. package/dist/packages/method-package/local-methods.d.ts +64 -0
  146. package/dist/packages/method-package/local-methods.js +466 -0
  147. package/dist/packages/method-package/method-definitions.d.ts +83 -0
  148. package/dist/packages/method-package/method-definitions.js +205 -0
  149. package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
  150. package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
  151. package/dist/packages/method-package/method-review-paths.d.ts +10 -0
  152. package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
  153. package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
  154. package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
  155. package/dist/packages/methods/index.d.ts +2 -0
  156. package/dist/packages/methods/index.js +2 -0
  157. package/dist/packages/methods/method-resolution.d.ts +6 -0
  158. package/dist/packages/methods/method-resolution.js +7 -0
  159. package/dist/packages/project-model/index.d.ts +1 -4
  160. package/dist/packages/project-model/index.js +0 -3
  161. package/dist/packages/project-model/interf-detect.d.ts +1 -5
  162. package/dist/packages/project-model/interf-detect.js +7 -18
  163. package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
  164. package/dist/packages/project-model/interf-scaffold.js +38 -39
  165. package/dist/packages/project-model/interf.d.ts +1 -2
  166. package/dist/packages/project-model/interf.js +1 -2
  167. package/dist/packages/project-model/lib/schema.d.ts +2 -66
  168. package/dist/packages/project-model/lib/schema.js +5 -23
  169. package/dist/packages/project-model/project-paths.d.ts +9 -10
  170. package/dist/packages/project-model/project-paths.js +14 -17
  171. package/dist/packages/project-model/source-config.d.ts +11 -18
  172. package/dist/packages/project-model/source-config.js +42 -60
  173. package/dist/packages/project-model/source-folders.d.ts +4 -4
  174. package/dist/packages/project-model/source-folders.js +10 -10
  175. package/dist/packages/testing/index.d.ts +2 -2
  176. package/dist/packages/testing/index.js +1 -1
  177. package/dist/packages/testing/lib/schema.d.ts +11 -11
  178. package/dist/packages/testing/lib/schema.js +8 -9
  179. package/dist/packages/testing/readiness-check-run.d.ts +67 -0
  180. package/dist/packages/testing/readiness-check-run.js +258 -0
  181. package/dist/packages/testing/test-execution.d.ts +3 -3
  182. package/dist/packages/testing/test-execution.js +5 -5
  183. package/dist/packages/testing/test-paths.js +6 -6
  184. package/dist/packages/testing/test-profile-presets.js +2 -2
  185. package/dist/packages/testing/test-sandbox.js +10 -11
  186. package/dist/packages/testing/test-targets.d.ts +1 -1
  187. package/dist/packages/testing/test-targets.js +8 -7
  188. package/dist/packages/testing/test-types.d.ts +1 -1
  189. package/package.json +16 -33
  190. package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
  191. package/builtin-workflows/interf/improve/SKILL.md +0 -18
  192. package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
  193. package/dist/packages/project-model/compiled-paths.d.ts +0 -1
  194. package/dist/packages/project-model/compiled-paths.js +0 -1
  195. package/dist/packages/project-model/compiled-raw.d.ts +0 -1
  196. package/dist/packages/project-model/compiled-raw.js +0 -1
  197. package/dist/packages/project-model/compiled-reset.d.ts +0 -1
  198. package/dist/packages/project-model/compiled-reset.js +0 -1
  199. package/dist/packages/shared/index.d.ts +0 -7
  200. package/dist/packages/shared/index.js +0 -7
  201. package/dist/packages/shared/util.d.ts +0 -3
  202. package/dist/packages/shared/util.js +0 -3
  203. package/dist/packages/testing/test-matrices.d.ts +0 -90
  204. package/dist/packages/testing/test-matrices.js +0 -96
  205. package/dist/packages/workflow-authoring/index.d.ts +0 -4
  206. package/dist/packages/workflow-authoring/index.js +0 -4
  207. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
  208. package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
  209. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
  210. package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
  211. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
  212. package/dist/packages/workflow-package/index.d.ts +0 -11
  213. package/dist/packages/workflow-package/index.js +0 -11
  214. package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
  215. package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
  216. package/dist/packages/workflow-package/local-workflows.js +0 -457
  217. package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
  218. package/dist/packages/workflow-package/workflow-definitions.js +0 -211
  219. package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
  220. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
  221. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
  222. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
  223. /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
  224. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
  225. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
  226. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
  227. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
  228. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
  229. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
  230. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
  231. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
  232. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
  233. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
  234. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
  235. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
  236. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
  237. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
  238. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
  239. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  240. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  241. /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
  242. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_buildManifest.js +0 -0
  243. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_clientMiddlewareManifest.js +0 -0
  244. /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK}/_ssgManifest.js +0 -0
  245. /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
  246. /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
  247. /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
  248. /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
  249. /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
  250. /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
@@ -1,19 +1,34 @@
1
1
  import chalk from "chalk";
2
2
  import * as p from "@clack/prompts";
3
3
  import { existsSync, statSync } from "node:fs";
4
+ import { homedir } from "node:os";
4
5
  import { basename, isAbsolute, relative, resolve } from "node:path";
5
6
  import { assertCompiledContainer, detectInterf, ensurePortableContextScaffold, readInterfConfig, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
6
- import { SOURCE_FOLDER_CONFIG_PATH, configuredSourceFolderPath, loadSourceFolderConfig, resolveConfiguredSourceFolderPath, saveSourceFolderConfig, syncCompiledInterfConfigFromSourceDatasetConfig, upsertSourceDatasetConfig, } from "../../packages/project-model/source-config.js";
7
- import { defaultDatasetNameForPath, } from "../../packages/project-model/source-folders.js";
8
- import { DEFAULT_COMPILED_NAME, describeCompileLoopSelection, listDatasetFolderChoices, promptSingleCompiledConfig, } from "./source-config-wizard.js";
9
- import { chooseOrCreateCompiledWorkflowForDataset, createWorkflowWizard, } from "./create-workflow-wizard.js";
10
- import { seedLocalDefaultWorkflow } from "../../packages/workflow-package/local-workflows.js";
11
- import { findBuiltCompiledPath, findSavedCompiledConfig, listSavedCompiledEntries, } from "./compiled-flow.js";
7
+ import { SOURCE_FOLDER_CONFIG_PATH, configuredSourceFolderPath, loadSourceFolderConfig, resolveConfiguredSourceFolderPath, saveSourceFolderConfig, syncCompiledInterfConfigFromSourcePreparationConfig, upsertSourcePreparationConfig, } from "../../packages/project-model/source-config.js";
8
+ import { defaultPreparationNameForPath, } from "../../packages/project-model/source-folders.js";
9
+ import { DEFAULT_PREPARATION_NAME, describeCompileLoopSelection, listSourceFolderChoices, promptSingleCompiledConfig, } from "./source-config-wizard.js";
10
+ import { chooseOrCreateCompiledMethodForPreparation, createMethodWizard, } from "./create-method-wizard.js";
11
+ import { seedLocalDefaultMethod } from "../../packages/method-package/local-methods.js";
12
+ import { findBuiltCompiledPath, findSavedCompiledConfig, listSavedPreparationEntries, } from "./compiled-flow.js";
12
13
  import { readCurrentSavedTestComparison, } from "./test-flow.js";
13
14
  import { runCompileCommand } from "./compile.js";
14
15
  import { runTestCommand } from "./test.js";
15
16
  import { defaultInterfInstanceRoot, relativeSourceFolderPath, resolveInterfInstanceContext, } from "./control-path.js";
16
17
  import { runWebCommand } from "./web.js";
18
+ function displayPath(path) {
19
+ const resolvedPath = resolve(path);
20
+ const cwd = process.cwd();
21
+ if (resolvedPath === cwd)
22
+ return ".";
23
+ if (isPathInside(cwd, resolvedPath))
24
+ return `./${relative(cwd, resolvedPath)}`;
25
+ const home = homedir();
26
+ if (resolvedPath === home)
27
+ return "~";
28
+ if (isPathInside(home, resolvedPath))
29
+ return `~/${relative(home, resolvedPath)}`;
30
+ return resolvedPath;
31
+ }
17
32
  function isPathInside(parentPath, childPath) {
18
33
  const relativePath = relative(parentPath, childPath);
19
34
  return relativePath === "" || (!relativePath.startsWith("..") && !isAbsolute(relativePath));
@@ -45,7 +60,7 @@ function normalizeInterfInstanceFolderInput(cwd, sourceFolderPath, input) {
45
60
  return controlPath;
46
61
  }
47
62
  async function promptSourceFolderForInstance(cwd) {
48
- const folderChoices = listDatasetFolderChoices(cwd);
63
+ const folderChoices = listSourceFolderChoices(cwd);
49
64
  const selected = await p.select({
50
65
  message: "Which Source Folder should Interf prepare?",
51
66
  options: [
@@ -119,13 +134,11 @@ async function setupInterfInstance(cwd) {
119
134
  source_folder: { path: sourceFolderConfigPath },
120
135
  preparations: [],
121
136
  });
122
- const seeded = seedLocalDefaultWorkflow({ sourcePath: controlPath });
123
- p.log.info(`Source Folder: ${sourceFolderPath}`);
124
- p.log.info(`Interf Workspace: ${controlPath}`);
125
- p.log.info(`Source Folder path in Interf config: ${sourceFolderConfigPath}`);
126
- if (!seeded.alreadyExisted) {
127
- p.log.info(`Copied built-in Method package to interf/methods/${seeded.workflowId}/. Inspect or fork it anytime.`);
128
- }
137
+ const seeded = seedLocalDefaultMethod({ sourcePath: controlPath });
138
+ p.log.info(`Source Folder: ${displayPath(sourceFolderPath)}`);
139
+ p.log.info(`Interf Workspace: ${displayPath(controlPath)}`);
140
+ if (!seeded.alreadyExisted)
141
+ p.log.info(`Method: ${seeded.methodId}`);
129
142
  return {
130
143
  sourceFolderPath,
131
144
  controlPath,
@@ -134,7 +147,7 @@ async function setupInterfInstance(cwd) {
134
147
  }
135
148
  async function promptEmptyInstanceAction() {
136
149
  const selected = await p.select({
137
- message: "What do you want to do next?",
150
+ message: "What next?",
138
151
  options: [
139
152
  {
140
153
  value: "web",
@@ -175,29 +188,30 @@ export function currentRunTargetStatus(rows, target) {
175
188
  return "mixed";
176
189
  return "fail";
177
190
  }
178
- function describeSavedReadinessChecks(dataset) {
179
- const count = dataset.checks.length;
191
+ function describeSavedReadinessChecks(preparation) {
192
+ const count = preparation.checks.length;
180
193
  if (count === 0)
181
- return "No readiness checks yet";
194
+ return "no checks";
182
195
  return `${count} readiness check${count === 1 ? "" : "s"}`;
183
196
  }
184
- function printDatasetSummary(options) {
197
+ function printPreparationSummary(options) {
185
198
  const compiledConfig = options.builtCompiledPath
186
199
  ? readInterfConfig(options.builtCompiledPath)
187
200
  : null;
188
- const workflowLabel = `${options.dataset.method ?? options.dataset.workflow ?? "interf-default"}${compiledConfig?.workflow_origin?.local_draft === true ? " (local draft)" : ""}`;
189
- p.log.info(`Preparation: ${options.dataset.name}`);
190
- p.log.info(`Source folder: ${options.dataset.path}`);
191
- if (options.dataset.about) {
192
- p.log.info(`About: ${options.dataset.about}`);
193
- }
194
- p.log.info(`Method: ${workflowLabel}`);
195
- p.log.info(describeCompileLoopSelection({
196
- maxAttempts: options.dataset.max_attempts,
197
- maxLoops: options.dataset.max_loops,
198
- }));
199
- p.log.info(describeSavedReadinessChecks(options.dataset));
200
- p.log.info(options.built ? "Portable Context is available." : "Portable Context has not been built yet.");
201
+ const methodLabel = `${options.preparation.method ?? "interf-default"}${compiledConfig?.method_origin?.local_draft === true ? " (local draft)" : ""}`;
202
+ const sourceFolderPath = resolve(options.sourcePath, options.preparation.path);
203
+ p.log.info(`Preparation: ${options.preparation.name} · Method: ${methodLabel}`);
204
+ if (options.preparation.about) {
205
+ p.log.info(`Agent work: ${options.preparation.about}`);
206
+ }
207
+ p.log.info(`Source Folder: ${displayPath(sourceFolderPath)}`);
208
+ p.log.info(`Portable Context: ${options.built ? "built" : "not built"} · Readiness: ${describeSavedReadinessChecks(options.preparation)}`);
209
+ const prepareMode = describeCompileLoopSelection({
210
+ maxAttempts: options.preparation.max_attempts,
211
+ maxLoops: options.preparation.max_loops,
212
+ });
213
+ if (prepareMode !== "Prepare once.")
214
+ p.log.info(`Prepare mode: ${prepareMode}`);
201
215
  if (options.latestComparison?.raw && options.latestComparison?.compiled) {
202
216
  p.log.info(`Latest saved comparison: source files ${options.latestComparison.raw.passed_cases}/${options.latestComparison.raw.total_cases}, Portable Context ${options.latestComparison.compiled.passed_cases}/${options.latestComparison.compiled.total_cases}.`);
203
217
  }
@@ -211,37 +225,45 @@ function printDatasetSummary(options) {
211
225
  p.log.info("Saved readiness results are stale for the current checks.");
212
226
  }
213
227
  if (options.sourcePath !== process.cwd()) {
214
- p.log.info(`Interf Workspace: ${options.sourcePath}`);
228
+ p.log.info(`Interf Workspace: ${displayPath(options.sourcePath)}`);
215
229
  }
216
230
  }
217
- async function promptDatasetAction(dataset, built, latestComparison) {
231
+ async function promptPreparationAction(preparation, built, latestComparison) {
218
232
  const options = [];
219
233
  const hasSavedRawBaseline = Boolean(latestComparison?.raw);
220
234
  const latestRawPasses = latestComparison?.raw &&
221
235
  latestComparison.raw.passed_cases === latestComparison.raw.total_cases;
222
236
  const compileOption = {
223
237
  value: "compile",
224
- label: built ? "Prepare again and refresh Portable Context" : "Prepare files and write Portable Context (Recommended)",
238
+ label: built ? "Prepare again" : "Prepare files",
225
239
  hint: built
226
- ? "Refresh it from the current source files"
227
- : dataset.checks.length > 0
240
+ ? "Refresh Portable Context"
241
+ : preparation.checks.length > 0
228
242
  ? latestRawPasses
229
- ? "Prepare files for a side-by-side comparison with the latest saved source-files run"
243
+ ? "Use the latest source-files baseline"
230
244
  : hasSavedRawBaseline
231
- ? "Some readiness checks still fail on the source files. Prepare files and run the same checks"
232
- : "Run the selected Method and write the output folder agents can use"
233
- : "Run the selected Method and create the output folder agents can use",
245
+ ? "Run the same readiness checks after prepare"
246
+ : "Write Portable Context"
247
+ : "Write Portable Context",
234
248
  };
235
- if (dataset.checks.length > 0) {
249
+ const webOption = {
250
+ value: "web",
251
+ label: "Open Interf UI",
252
+ hint: "Start the local UI and API for this Interf Workspace",
253
+ };
254
+ if (built) {
255
+ options.push(webOption);
256
+ }
257
+ if (preparation.checks.length > 0) {
236
258
  const testOption = {
237
259
  value: "test",
238
260
  label: built
239
- ? "Run readiness checks on source files and Portable Context (Recommended)"
261
+ ? "Run readiness checks"
240
262
  : hasSavedRawBaseline
241
263
  ? "Rerun the source-files baseline"
242
264
  : "Measure the source-files baseline",
243
265
  hint: built
244
- ? "See whether the Portable Context is ready for your agents on the saved checks"
266
+ ? "Check source files and Portable Context"
245
267
  : hasSavedRawBaseline
246
268
  ? "Refresh the saved source-files baseline on the current readiness checks"
247
269
  : "Optional source-files readiness baseline before Interf builds Portable Context",
@@ -257,33 +279,32 @@ async function promptDatasetAction(dataset, built, latestComparison) {
257
279
  options.push(compileOption);
258
280
  }
259
281
  options.push({
260
- value: "dataset",
282
+ value: "preparation",
261
283
  label: "Add another Preparation",
262
- hint: "Add a separate folder, focus, or readiness-check set",
284
+ hint: "Separate source, focus, or checks",
263
285
  }, {
264
286
  value: "edit",
265
- label: "Edit readiness checks and settings",
266
- hint: "Update readiness checks, focus, Method, or prepare mode",
287
+ label: preparation.checks.length === 0 ? "Add readiness checks" : "Edit checks and settings",
288
+ hint: "Checks, focus, Method, or mode",
267
289
  }, {
268
- value: "workflow",
290
+ value: "method",
269
291
  label: "Create Method",
270
- hint: "Advanced: customize how Interf prepares files",
292
+ hint: "Custom file processing",
271
293
  }, {
272
294
  value: "done",
273
295
  label: "Done",
274
296
  hint: "Exit the wizard",
275
297
  });
276
298
  const selected = await p.select({
277
- message: "What do you want to do next?",
299
+ message: "What next?",
278
300
  options,
279
301
  });
280
302
  if (p.isCancel(selected))
281
303
  return null;
282
304
  return selected;
283
305
  }
284
- function printDatasetRecommendation(dataset, built, latestComparison) {
285
- if (dataset.checks.length === 0) {
286
- p.log.info("No readiness checks yet. You can prepare files first, then add checks when you know what evidence matters.");
306
+ function printPreparationRecommendation(preparation, built, latestComparison) {
307
+ if (preparation.checks.length === 0) {
287
308
  return;
288
309
  }
289
310
  if (!built) {
@@ -312,7 +333,7 @@ async function promptPostBaselineAction(rows) {
312
333
  }
313
334
  const compileRecommended = status !== "pass";
314
335
  const selected = await p.select({
315
- message: "What do you want to do next?",
336
+ message: "What next?",
316
337
  options: [
317
338
  {
318
339
  value: "compile",
@@ -350,7 +371,7 @@ async function chooseCompiledForWizard(options) {
350
371
  if (options.fixedCompiledName) {
351
372
  return findSavedCompiledConfig(options.sourcePath, options.fixedCompiledName);
352
373
  }
353
- const savedEntries = listSavedCompiledEntries(options.sourcePath);
374
+ const savedEntries = listSavedPreparationEntries(options.sourcePath);
354
375
  if (savedEntries.length === 0)
355
376
  return null;
356
377
  if (savedEntries.length === 1)
@@ -364,7 +385,7 @@ async function chooseCompiledForWizard(options) {
364
385
  hint: [
365
386
  `path ${entry.config.path}`,
366
387
  entry.config.about ?? describeSavedReadinessChecks(entry.config),
367
- `Method ${entry.config.method ?? entry.config.workflow ?? "interf-default"}${entry.localDraft ? " (local draft)" : ""}`,
388
+ `Method ${entry.config.method ?? "interf-default"}${entry.localDraft ? " (local draft)" : ""}`,
368
389
  entry.path ? "Portable Context available" : "Portable Context not built yet",
369
390
  ].join(" · "),
370
391
  })),
@@ -394,105 +415,107 @@ async function promptCompiledSetup(options) {
394
415
  });
395
416
  if (!compiledConfig)
396
417
  return null;
397
- const workflowChoice = await chooseOrCreateCompiledWorkflowForDataset(options.sourcePath, compiledConfig, {
398
- currentWorkflowId: options.initial?.workflow ?? "interf-default",
418
+ const methodChoice = await chooseOrCreateCompiledMethodForPreparation(options.sourcePath, compiledConfig, {
419
+ currentMethodId: options.initial?.method ?? "interf-default",
399
420
  executionProfile: options.executionProfile,
400
421
  });
401
- if (!workflowChoice || p.isCancel(workflowChoice))
422
+ if (!methodChoice || p.isCancel(methodChoice))
402
423
  return null;
403
- const workflowId = String(workflowChoice);
404
- const compiledConfigWithWorkflow = {
424
+ const methodId = String(methodChoice);
425
+ const compiledConfigWithMethod = {
405
426
  ...compiledConfig,
406
- method: workflowId,
407
- workflow: workflowId,
427
+ method: methodId,
408
428
  };
409
- upsertSourceDatasetConfig(options.sourcePath, compiledConfigWithWorkflow, {
429
+ upsertSourcePreparationConfig(options.sourcePath, compiledConfigWithMethod, {
410
430
  ...(options.fixedName ? { matchName: options.fixedName } : {}),
411
431
  });
412
- const builtCompiledPath = findBuiltCompiledPath(options.sourcePath, compiledConfigWithWorkflow.name);
432
+ const builtCompiledPath = findBuiltCompiledPath(options.sourcePath, compiledConfigWithMethod.name);
413
433
  if (builtCompiledPath) {
414
- syncCompiledInterfConfigFromSourceDatasetConfig(builtCompiledPath, compiledConfigWithWorkflow);
434
+ syncCompiledInterfConfigFromSourcePreparationConfig(builtCompiledPath, compiledConfigWithMethod);
415
435
  }
416
436
  else {
417
- ensurePortableContextScaffold(options.sourcePath, compiledConfigWithWorkflow.name, compiledConfigWithWorkflow.workflow ?? "interf-default");
437
+ ensurePortableContextScaffold(options.sourcePath, compiledConfigWithMethod.name, compiledConfigWithMethod.method ?? "interf-default");
418
438
  }
419
439
  console.log();
420
440
  console.log(chalk.green(` ✓ Saved Preparation in ${SOURCE_FOLDER_CONFIG_PATH}`));
421
441
  console.log(chalk.dim(` Interf Workspace: ${options.sourcePath}`));
422
- console.log(chalk.dim(` Preparation: ${compiledConfigWithWorkflow.name}`));
423
- console.log(chalk.dim(` Source folder: ${compiledConfigWithWorkflow.path}`));
424
- console.log(chalk.dim(` Method: ${workflowId} · interf/methods/${workflowId}/`));
442
+ console.log(chalk.dim(` Preparation: ${compiledConfigWithMethod.name}`));
443
+ console.log(chalk.dim(` Source folder: ${compiledConfigWithMethod.path}`));
444
+ console.log(chalk.dim(` Method: ${methodId} · interf/methods/${methodId}/`));
425
445
  console.log(chalk.dim(` Prepare mode: ${describeCompileLoopSelection({
426
- maxAttempts: compiledConfigWithWorkflow.max_attempts,
427
- maxLoops: compiledConfigWithWorkflow.max_loops,
446
+ maxAttempts: compiledConfigWithMethod.max_attempts,
447
+ maxLoops: compiledConfigWithMethod.max_loops,
428
448
  })}`));
429
- return compiledConfigWithWorkflow;
449
+ return compiledConfigWithMethod;
430
450
  }
431
451
  export async function compileSelectedCompiled(sourcePath, compiledConfig, deps = {}) {
432
452
  return (deps.runCompileCommand ?? runCompileCommand)({
433
453
  sourcePath,
434
- dataset: compiledConfig.name,
435
- datasetConfig: compiledConfig,
454
+ preparation: compiledConfig.name,
455
+ preparationConfig: compiledConfig,
436
456
  skipConfirm: true,
437
- skipDatasetBanner: true,
457
+ skipPreparationBanner: true,
438
458
  });
439
459
  }
440
460
  async function runCompiledActionMenu(sourcePath, compiledConfig, options = {}) {
441
461
  const builtCompiledPath = findBuiltCompiledPath(sourcePath, compiledConfig.name);
442
462
  const { comparison: latestComparison, stale: latestComparisonStale, } = readCurrentSavedTestComparison({
443
463
  projectPath: sourcePath,
444
- datasetName: compiledConfig.name,
464
+ preparationName: compiledConfig.name,
445
465
  checks: compiledConfig.checks,
446
466
  });
447
- printDatasetSummary({
467
+ printPreparationSummary({
448
468
  sourcePath,
449
- dataset: compiledConfig,
469
+ preparation: compiledConfig,
450
470
  built: Boolean(builtCompiledPath),
451
471
  builtCompiledPath,
452
472
  latestComparison,
453
473
  latestComparisonStale,
454
474
  });
455
- printDatasetRecommendation(compiledConfig, Boolean(builtCompiledPath), latestComparison);
456
- const action = await promptDatasetAction(compiledConfig, Boolean(builtCompiledPath), latestComparison);
475
+ printPreparationRecommendation(compiledConfig, Boolean(builtCompiledPath), latestComparison);
476
+ const action = await promptPreparationAction(compiledConfig, Boolean(builtCompiledPath), latestComparison);
457
477
  if (!action)
458
478
  return;
459
479
  if (action === "done") {
460
480
  p.outro(options.justConfigured ? "Saved Preparation." : "Nothing changed.");
461
481
  return;
462
482
  }
463
- if (action === "workflow") {
464
- const workflowId = await createWorkflowWizard({
483
+ if (action === "method") {
484
+ const methodId = await createMethodWizard({
465
485
  sourcePath,
466
- datasetContext: {
486
+ preparationContext: {
467
487
  config: compiledConfig,
468
- datasetPath: resolve(sourcePath, compiledConfig.path),
488
+ sourceFolderPath: resolve(sourcePath, compiledConfig.path),
469
489
  },
470
490
  });
471
- if (typeof workflowId === "string") {
491
+ if (typeof methodId === "string") {
472
492
  const nextConfig = {
473
493
  ...compiledConfig,
474
- method: workflowId,
475
- workflow: workflowId,
494
+ method: methodId,
476
495
  };
477
- upsertSourceDatasetConfig(sourcePath, nextConfig, {
496
+ upsertSourcePreparationConfig(sourcePath, nextConfig, {
478
497
  matchName: compiledConfig.name,
479
498
  });
480
499
  const builtCompiledPath = findBuiltCompiledPath(sourcePath, compiledConfig.name);
481
500
  if (builtCompiledPath) {
482
- syncCompiledInterfConfigFromSourceDatasetConfig(builtCompiledPath, nextConfig);
501
+ syncCompiledInterfConfigFromSourcePreparationConfig(builtCompiledPath, nextConfig);
483
502
  }
484
503
  else {
485
- ensurePortableContextScaffold(sourcePath, nextConfig.name, nextConfig.workflow ?? "interf-default");
504
+ ensurePortableContextScaffold(sourcePath, nextConfig.name, nextConfig.method ?? "interf-default");
486
505
  }
487
- p.log.info(`Assigned Method "${workflowId}" to Preparation "${compiledConfig.name}".`);
506
+ p.log.info(`Assigned Method "${methodId}" to Preparation "${compiledConfig.name}".`);
488
507
  p.log.info("Next: run `interf compile`, then `interf test`.");
489
508
  }
490
509
  return;
491
510
  }
492
- if (action === "dataset") {
511
+ if (action === "web") {
512
+ await runWebCommand({ "control-path": sourcePath });
513
+ return;
514
+ }
515
+ if (action === "preparation") {
493
516
  const nextCompiled = await promptCompiledSetup({
494
517
  sourcePath,
495
- initial: { name: DEFAULT_COMPILED_NAME },
518
+ initial: { name: DEFAULT_PREPARATION_NAME },
496
519
  introStyle: "additional",
497
520
  });
498
521
  if (!nextCompiled)
@@ -523,8 +546,8 @@ async function runCompiledActionMenu(sourcePath, compiledConfig, options = {}) {
523
546
  if (builtCompiledPath) {
524
547
  const baselineRan = await runTestCommand({
525
548
  sourcePath,
526
- dataset: compiledConfig.name,
527
- datasetConfig: compiledConfig,
549
+ preparation: compiledConfig.name,
550
+ preparationConfig: compiledConfig,
528
551
  target: "both",
529
552
  });
530
553
  if (!baselineRan) {
@@ -536,9 +559,9 @@ async function runCompiledActionMenu(sourcePath, compiledConfig, options = {}) {
536
559
  const baselineCapture = { result: null };
537
560
  const baselineRan = await runTestCommand({
538
561
  sourcePath,
539
- dataset: compiledConfig.name,
540
- datasetConfig: compiledConfig,
541
- target: "raw",
562
+ preparation: compiledConfig.name,
563
+ preparationConfig: compiledConfig,
564
+ target: "source-files",
542
565
  onComplete(result) {
543
566
  baselineCapture.result = result;
544
567
  },
@@ -580,8 +603,8 @@ async function runCompiledActionMenu(sourcePath, compiledConfig, options = {}) {
580
603
  }
581
604
  await runTestCommand({
582
605
  sourcePath,
583
- dataset: compiledConfig.name,
584
- datasetConfig: compiledConfig,
606
+ preparation: compiledConfig.name,
607
+ preparationConfig: compiledConfig,
585
608
  target: "both",
586
609
  });
587
610
  return;
@@ -607,8 +630,8 @@ async function runCompiledActionMenu(sourcePath, compiledConfig, options = {}) {
607
630
  return;
608
631
  await runTestCommand({
609
632
  sourcePath,
610
- dataset: compiledConfig.name,
611
- datasetConfig: compiledConfig,
633
+ preparation: compiledConfig.name,
634
+ preparationConfig: compiledConfig,
612
635
  target: "both",
613
636
  });
614
637
  return;
@@ -623,8 +646,6 @@ export const initCommand = {
623
646
  };
624
647
  export async function runInitCommand() {
625
648
  p.intro(chalk.bold("Interf"));
626
- p.log.info("Interf prepares data for agent work.");
627
- p.log.info("It runs locally to process files, show evidence that your data is ready, and write verifiable outputs as Portable Context for agents.");
628
649
  const cwd = process.cwd();
629
650
  const detected = detectInterf(cwd);
630
651
  let initContext = detected
@@ -636,7 +657,7 @@ export async function runInitCommand() {
636
657
  : resolveInterfInstanceContext(cwd);
637
658
  let sourcePath = initContext.controlPath;
638
659
  if (detected) {
639
- p.log.info(`Working from Interf Workspace: ${sourcePath}`);
660
+ p.log.info(`Interf Workspace: ${displayPath(sourcePath)}`);
640
661
  }
641
662
  const hasConfig = Boolean(loadSourceFolderConfig(sourcePath));
642
663
  let initialSourceFolderPath = initContext.defaultSourceFolderPath;
@@ -655,14 +676,14 @@ export async function runInitCommand() {
655
676
  };
656
677
  }
657
678
  else {
658
- const seeded = seedLocalDefaultWorkflow({ sourcePath });
679
+ const seeded = seedLocalDefaultMethod({ sourcePath });
659
680
  if (!seeded.alreadyExisted) {
660
- p.log.info(`Copied built-in Method package to interf/methods/${seeded.workflowId}/. Inspect or fork it anytime.`);
681
+ p.log.info(`Method: ${seeded.methodId}`);
661
682
  }
662
683
  }
663
684
  let currentConfig = loadSourceFolderConfig(sourcePath);
664
685
  if (!currentConfig?.source_folder && !detected) {
665
- const currentEntries = currentConfig?.preparations ?? currentConfig?.datasets ?? [];
686
+ const currentEntries = currentConfig?.preparations ?? [];
666
687
  if (initialSourceFolderPath && initialSourceFolderConfigPath) {
667
688
  saveSourceFolderConfig(sourcePath, {
668
689
  source_folder: { path: initialSourceFolderConfigPath },
@@ -701,7 +722,7 @@ export async function runInitCommand() {
701
722
  initialSourceFolderPath = configuredSourcePath;
702
723
  initialSourceFolderConfigPath = configuredSourceConfigPath;
703
724
  }
704
- const savedEntries = listSavedCompiledEntries(sourcePath);
725
+ const savedEntries = listSavedPreparationEntries(sourcePath);
705
726
  if (savedEntries.length === 0) {
706
727
  p.log.info("No Preparations yet. Create one when you are ready to describe the agent work.");
707
728
  const action = await promptEmptyInstanceAction();
@@ -714,9 +735,9 @@ export async function runInitCommand() {
714
735
  return;
715
736
  }
716
737
  if (action === "method") {
717
- const workflowId = await createWorkflowWizard({ sourcePath });
718
- if (typeof workflowId === "string") {
719
- p.outro(`Saved Method "${workflowId}". Next: create a Preparation and assign this Method.`);
738
+ const methodId = await createMethodWizard({ sourcePath });
739
+ if (typeof methodId === "string") {
740
+ p.outro(`Saved Method "${methodId}". Next: create a Preparation and assign this Method.`);
720
741
  }
721
742
  return;
722
743
  }
@@ -724,10 +745,10 @@ export async function runInitCommand() {
724
745
  sourcePath,
725
746
  initial: initialSourceFolderPath && initialSourceFolderConfigPath
726
747
  ? {
727
- name: defaultDatasetNameForPath(initialSourceFolderPath),
748
+ name: defaultPreparationNameForPath(initialSourceFolderPath),
728
749
  path: initialSourceFolderConfigPath,
729
750
  }
730
- : { name: DEFAULT_COMPILED_NAME },
751
+ : { name: DEFAULT_PREPARATION_NAME },
731
752
  ...(initialSourceFolderConfigPath ? { fixedPath: initialSourceFolderConfigPath } : {}),
732
753
  introStyle: "first",
733
754
  });
@@ -747,10 +768,10 @@ export async function runInitCommand() {
747
768
  sourcePath,
748
769
  initial: initialSourceFolderPath && initialSourceFolderConfigPath
749
770
  ? {
750
- name: defaultDatasetNameForPath(initialSourceFolderPath),
771
+ name: defaultPreparationNameForPath(initialSourceFolderPath),
751
772
  path: initialSourceFolderConfigPath,
752
773
  }
753
- : { name: DEFAULT_COMPILED_NAME },
774
+ : { name: DEFAULT_PREPARATION_NAME },
754
775
  ...(initialSourceFolderConfigPath ? { fixedPath: initialSourceFolderConfigPath } : {}),
755
776
  introStyle: "additional",
756
777
  });
@@ -1,29 +1,30 @@
1
1
  import chalk from "chalk";
2
2
  import { detectInterf, resolveSourceControlPath, } from "../../packages/project-model/interf.js";
3
- import { listSavedCompiledEntries } from "./compiled-flow.js";
3
+ import { listSavedPreparationEntries } from "./compiled-flow.js";
4
4
  import { resolveCommandControlPath } from "./control-path.js";
5
+ import { resolveMethodId } from "../../packages/methods/method-resolution.js";
5
6
  export const listCommand = {
6
7
  command: "list",
7
8
  describe: "List saved Preparations in this Source Folder",
8
9
  handler: async () => {
9
10
  const detected = detectInterf(process.cwd());
10
11
  const sourcePath = detected ? resolveSourceControlPath(detected.path) : resolveCommandControlPath();
11
- const datasets = listSavedCompiledEntries(sourcePath);
12
- if (datasets.length === 0) {
12
+ const preparations = listSavedPreparationEntries(sourcePath);
13
+ if (preparations.length === 0) {
13
14
  console.log(chalk.dim(" Nothing found. Start with `interf` or `interf init` to define a Preparation and save readiness checks."));
14
15
  return;
15
16
  }
16
17
  console.log();
17
18
  console.log(chalk.bold(" Saved Preparations"));
18
19
  console.log();
19
- for (const dataset of datasets) {
20
- console.log(` ${dataset.config.name}`);
21
- if (dataset.config.about) {
22
- console.log(chalk.dim(` task: ${dataset.config.about}`));
20
+ for (const preparation of preparations) {
21
+ console.log(` ${preparation.config.name}`);
22
+ if (preparation.config.about) {
23
+ console.log(chalk.dim(` task: ${preparation.config.about}`));
23
24
  }
24
- console.log(chalk.dim(` ${dataset.path ? "Portable Context available" : "Portable Context not built yet"} · Source Folder: ${dataset.config.path}`));
25
- console.log(chalk.dim(` Method: ${dataset.config.method ?? dataset.config.workflow ?? "interf-default"}${dataset.localDraft ? " (local draft)" : ""}`));
26
- console.log(chalk.dim(` readiness checks: ${dataset.config.checks.length}`));
25
+ console.log(chalk.dim(` ${preparation.path ? "Portable Context available" : "Portable Context not built yet"} · Source Folder: ${preparation.config.path}`));
26
+ console.log(chalk.dim(` Method: ${resolveMethodId(preparation.config)}${preparation.localDraft ? " (local draft)" : ""}`));
27
+ console.log(chalk.dim(` readiness checks: ${preparation.config.checks.length}`));
27
28
  }
28
29
  },
29
30
  };
@@ -1,6 +1,6 @@
1
- import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
1
+ import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
2
2
  export declare function resolveConfiguredPreparationSelection(options: {
3
3
  sourcePath: string;
4
4
  requestedPreparationName?: string | null;
5
- hintedPreparationConfig?: SourceDatasetConfig | null;
6
- }): SourceDatasetConfig | null;
5
+ hintedPreparationConfig?: SourcePreparationConfig | null;
6
+ }): SourcePreparationConfig | null;
@@ -1,9 +1,9 @@
1
- import { type SourceDatasetConfig, type SourceReadinessCheck } from "../../packages/project-model/index.js";
2
- export declare const DEFAULT_COMPILED_NAME = "dataset1";
1
+ import { type SourcePreparationConfig, type SourceReadinessCheck } from "../../packages/project-model/index.js";
2
+ export declare const DEFAULT_PREPARATION_NAME = "default";
3
3
  export declare const DEFAULT_COMPILED_CHECK_QUESTION_PLACEHOLDER = "An agent-work-critical check you can already verify from this Source Folder";
4
4
  export declare const DEFAULT_COMPILED_CHECK_ANSWER_PLACEHOLDER = "The expected answer in plain English";
5
5
  export declare const DEFAULT_COMPILED_ABOUT_PLACEHOLDER = "Example: board prep from these files, chart reads from this report, or tax review from these exports.";
6
- export declare const DEFAULT_DATASET_PATH_PLACEHOLDER = "./dataset1";
6
+ export declare const DEFAULT_SOURCE_FOLDER_PATH_PLACEHOLDER = "./source-files";
7
7
  export declare const DEFAULT_COMPILE_RETRY_ATTEMPTS = 3;
8
8
  export declare const DEFAULT_SELF_IMPROVING_LOOPS = 3;
9
9
  export type CompileLoopMode = "once" | "retry" | "self-improving";
@@ -11,14 +11,14 @@ export interface CompileLoopSelection {
11
11
  max_attempts?: number;
12
12
  max_loops?: number;
13
13
  }
14
- export declare function normalizeDatasetPathForConfig(projectPath: string, value: string): string;
15
- export declare function listDatasetFolderChoices(cwd?: string): Array<{
14
+ export declare function normalizeSourceFolderPathForConfig(projectPath: string, value: string): string;
15
+ export declare function listSourceFolderChoices(cwd?: string): Array<{
16
16
  value: string;
17
17
  label: string;
18
18
  hint: string;
19
19
  }>;
20
- export declare function defaultDatasetPathForPrompt(name: string, introStyle: "first" | "additional" | "edit", cwd?: string): string;
21
- export declare function datasetAboutPromptMessage(introStyle: "first" | "additional" | "edit"): string;
20
+ export declare function defaultSourceFolderPathForPrompt(name: string, introStyle: "first" | "additional" | "edit", cwd?: string): string;
21
+ export declare function preparationAboutPromptMessage(introStyle: "first" | "additional" | "edit"): string;
22
22
  export declare function resolveCompileLoopMode(maxAttempts?: number | null, maxLoops?: number | null): CompileLoopMode;
23
23
  export declare function describeCompileLoopSelection(options: {
24
24
  maxAttempts?: number | null;
@@ -44,9 +44,9 @@ export declare function promptCompileLoopSelection(options: {
44
44
  }): Promise<CompileLoopSelection | null>;
45
45
  export declare function promptSingleCompiledConfig(options?: {
46
46
  projectPath?: string;
47
- initial?: Partial<Pick<SourceDatasetConfig, "name" | "path" | "about" | "checks" | "max_attempts" | "max_loops">>;
47
+ initial?: Partial<Pick<SourcePreparationConfig, "name" | "path" | "about" | "checks" | "max_attempts" | "max_loops">>;
48
48
  fixedName?: string;
49
49
  fixedPath?: string;
50
50
  skipAboutPrompt?: boolean;
51
51
  introStyle?: "first" | "additional" | "edit";
52
- }): Promise<SourceDatasetConfig | null>;
52
+ }): Promise<SourcePreparationConfig | null>;