@interf/compiler 0.7.3 → 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 (418) hide show
  1. package/README.md +124 -90
  2. package/TRADEMARKS.md +1 -1
  3. package/agent-skills/interf-actions/SKILL.md +74 -0
  4. package/agent-skills/interf-actions/references/cli.md +190 -0
  5. package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +9 -9
  6. package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +4 -4
  7. package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +1 -1
  8. package/builtin-methods/interf-default/improve/SKILL.md +18 -0
  9. package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +9 -9
  10. package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +3 -3
  11. package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +1 -1
  12. package/dist/cli/commands/check-draft.d.ts +11 -10
  13. package/dist/cli/commands/check-draft.js +21 -20
  14. package/dist/cli/commands/compile-controller.d.ts +10 -7
  15. package/dist/cli/commands/compile-controller.js +84 -79
  16. package/dist/cli/commands/compile.d.ts +3 -3
  17. package/dist/cli/commands/compile.js +101 -43
  18. package/dist/cli/commands/compiled-flow.d.ts +14 -11
  19. package/dist/cli/commands/compiled-flow.js +38 -33
  20. package/dist/cli/commands/control-path.d.ts +11 -0
  21. package/dist/cli/commands/control-path.js +72 -0
  22. package/dist/cli/commands/create-method-wizard.d.ts +76 -0
  23. package/dist/cli/commands/create-method-wizard.js +465 -0
  24. package/dist/cli/commands/create.d.ts +3 -3
  25. package/dist/cli/commands/create.js +81 -68
  26. package/dist/cli/commands/default.js +4 -3
  27. package/dist/cli/commands/doctor.js +5 -5
  28. package/dist/cli/commands/executor-flow.d.ts +6 -6
  29. package/dist/cli/commands/executor-flow.js +2 -2
  30. package/dist/cli/commands/init.d.ts +2 -2
  31. package/dist/cli/commands/init.js +415 -144
  32. package/dist/cli/commands/list.js +16 -14
  33. package/dist/cli/commands/preparation-selection.d.ts +6 -0
  34. package/dist/cli/commands/preparation-selection.js +11 -0
  35. package/dist/cli/commands/reset.js +3 -3
  36. package/dist/cli/commands/source-config-wizard.d.ts +12 -11
  37. package/dist/cli/commands/source-config-wizard.js +206 -228
  38. package/dist/cli/commands/status.js +152 -17
  39. package/dist/cli/commands/test-flow.d.ts +16 -16
  40. package/dist/cli/commands/test-flow.js +53 -243
  41. package/dist/cli/commands/test.d.ts +6 -2
  42. package/dist/cli/commands/test.js +136 -100
  43. package/dist/cli/commands/verify.js +13 -13
  44. package/dist/cli/commands/web.d.ts +11 -0
  45. package/dist/cli/commands/web.js +386 -0
  46. package/dist/cli/index.d.ts +2 -1
  47. package/dist/cli/index.js +3 -1
  48. package/dist/compiler-ui/404.html +1 -0
  49. package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
  50. package/dist/compiler-ui/__next._full.txt +20 -0
  51. package/dist/compiler-ui/__next._head.txt +5 -0
  52. package/dist/compiler-ui/__next._index.txt +5 -0
  53. package/dist/compiler-ui/__next._tree.txt +5 -0
  54. package/dist/compiler-ui/_next/static/chunks/03~yq9q893hmn.js +1 -0
  55. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
  56. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +1 -0
  57. package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +1 -0
  58. package/dist/compiler-ui/_next/static/chunks/08m7vf5asqlsm.js +91 -0
  59. package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +1 -0
  60. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +1 -0
  61. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +1 -0
  62. package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +3 -0
  63. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +31 -0
  64. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +1 -0
  65. package/dist/compiler-ui/_next/static/chunks/0n51hrfoufc7g.js +1 -0
  66. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +1 -0
  67. package/dist/compiler-ui/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
  68. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +1 -0
  69. package/dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js +118 -0
  70. package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +1 -0
  71. package/dist/compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
  72. package/dist/compiler-ui/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
  73. package/dist/compiler-ui/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  74. package/dist/compiler-ui/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  75. package/dist/compiler-ui/_next/static/media/worker.102zas1s52_pf.js +109 -0
  76. package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_buildManifest.js +11 -0
  77. package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_clientMiddlewareManifest.js +1 -0
  78. package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_ssgManifest.js +1 -0
  79. package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
  80. package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
  81. package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
  82. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
  83. package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
  84. package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
  85. package/dist/compiler-ui/_not-found.html +1 -0
  86. package/dist/compiler-ui/_not-found.txt +15 -0
  87. package/dist/compiler-ui/index.html +1 -0
  88. package/dist/compiler-ui/index.txt +20 -0
  89. package/dist/index.d.ts +11 -7
  90. package/dist/index.js +8 -4
  91. package/dist/packages/agents/index.d.ts +1 -1
  92. package/dist/packages/agents/lib/args.d.ts +2 -2
  93. package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
  94. package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
  95. package/dist/packages/agents/lib/execution-profile.js +7 -6
  96. package/dist/packages/agents/lib/execution.js +4 -2
  97. package/dist/packages/agents/lib/executors.d.ts +14 -13
  98. package/dist/packages/agents/lib/executors.js +1 -0
  99. package/dist/packages/agents/lib/preflight.d.ts +1 -0
  100. package/dist/packages/agents/lib/preflight.js +32 -9
  101. package/dist/packages/agents/lib/render.d.ts +2 -2
  102. package/dist/packages/agents/lib/render.js +10 -9
  103. package/dist/packages/agents/lib/shells.d.ts +27 -34
  104. package/dist/packages/agents/lib/shells.js +191 -235
  105. package/dist/packages/agents/lib/types.d.ts +3 -2
  106. package/dist/packages/compiler/artifact-counts.d.ts +1 -0
  107. package/dist/packages/compiler/artifact-counts.js +30 -0
  108. package/dist/packages/compiler/compiled-paths.d.ts +5 -5
  109. package/dist/packages/compiler/compiled-paths.js +10 -10
  110. package/dist/packages/compiler/compiled-pipeline.d.ts +18 -12
  111. package/dist/packages/compiler/compiled-pipeline.js +34 -23
  112. package/dist/packages/compiler/compiled-schema.d.ts +20 -20
  113. package/dist/packages/compiler/compiled-schema.js +29 -29
  114. package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
  115. package/dist/packages/compiler/compiled-stage-plan.js +11 -11
  116. package/dist/packages/compiler/compiled-stage-runner.d.ts +10 -5
  117. package/dist/packages/compiler/compiled-stage-runner.js +56 -8
  118. package/dist/packages/compiler/compiled-target.d.ts +5 -5
  119. package/dist/packages/compiler/compiled-target.js +5 -5
  120. package/dist/packages/compiler/index.d.ts +3 -3
  121. package/dist/packages/compiler/index.js +2 -2
  122. package/dist/packages/compiler/lib/schema.d.ts +68 -93
  123. package/dist/packages/compiler/lib/schema.js +57 -89
  124. package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
  125. package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
  126. package/dist/packages/compiler/raw-snapshot.d.ts +3 -3
  127. package/dist/packages/compiler/raw-snapshot.js +0 -1
  128. package/dist/packages/compiler/reset.js +3 -3
  129. package/dist/packages/compiler/runtime-acceptance.js +9 -16
  130. package/dist/packages/compiler/runtime-contracts.js +9 -9
  131. package/dist/packages/compiler/runtime-prompt.js +9 -9
  132. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
  133. package/dist/packages/compiler/runtime-reconcile.js +3 -3
  134. package/dist/packages/compiler/runtime-runs.js +12 -9
  135. package/dist/packages/compiler/runtime-types.d.ts +9 -7
  136. package/dist/packages/compiler/state-health.js +26 -35
  137. package/dist/packages/compiler/state-view.js +6 -6
  138. package/dist/packages/compiler/validate-compiled.d.ts +5 -5
  139. package/dist/packages/compiler/validate-compiled.js +56 -62
  140. package/dist/packages/compiler/validate.d.ts +2 -2
  141. package/dist/packages/compiler/validate.js +22 -14
  142. package/dist/packages/contracts/index.d.ts +2 -0
  143. package/dist/packages/contracts/index.js +1 -0
  144. package/dist/packages/contracts/lib/schema.d.ts +205 -0
  145. package/dist/packages/contracts/lib/schema.js +101 -0
  146. package/dist/packages/execution/adapters.d.ts +15 -0
  147. package/dist/packages/execution/adapters.js +1 -0
  148. package/dist/packages/execution/events.d.ts +8 -0
  149. package/dist/packages/execution/events.js +16 -0
  150. package/dist/packages/execution/index.d.ts +9 -0
  151. package/dist/packages/execution/index.js +6 -0
  152. package/dist/packages/execution/lib/schema.d.ts +1551 -0
  153. package/dist/packages/execution/lib/schema.js +296 -0
  154. package/dist/packages/local-service/action-values.d.ts +22 -0
  155. package/dist/packages/local-service/action-values.js +30 -0
  156. package/dist/packages/local-service/client.d.ts +119 -0
  157. package/dist/packages/local-service/client.js +356 -0
  158. package/dist/packages/local-service/index.d.ts +15 -0
  159. package/dist/packages/local-service/index.js +11 -0
  160. package/dist/packages/local-service/lib/schema.d.ts +6917 -0
  161. package/dist/packages/local-service/lib/schema.js +519 -0
  162. package/dist/packages/local-service/routes.d.ts +27 -0
  163. package/dist/packages/local-service/routes.js +32 -0
  164. package/dist/packages/local-service/run-observability.d.ts +6 -0
  165. package/dist/packages/local-service/run-observability.js +592 -0
  166. package/dist/packages/local-service/runtime.d.ts +130 -0
  167. package/dist/packages/local-service/runtime.js +2263 -0
  168. package/dist/packages/local-service/server.d.ts +18 -0
  169. package/dist/packages/local-service/server.js +577 -0
  170. package/dist/packages/method-authoring/index.d.ts +4 -0
  171. package/dist/packages/method-authoring/index.js +4 -0
  172. package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
  173. package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
  174. package/dist/packages/method-authoring/method-authoring.js +116 -0
  175. package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
  176. package/dist/packages/method-authoring/method-edit-session.js +125 -0
  177. package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
  178. package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +65 -64
  179. package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
  180. package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
  181. package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
  182. package/dist/packages/{workflow-package → method-package}/context-interface.js +20 -20
  183. package/dist/packages/method-package/index.d.ts +11 -0
  184. package/dist/packages/method-package/index.js +11 -0
  185. package/dist/packages/method-package/interf-method-package.d.ts +31 -0
  186. package/dist/packages/method-package/interf-method-package.js +496 -0
  187. package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
  188. package/dist/packages/method-package/local-methods.d.ts +64 -0
  189. package/dist/packages/method-package/local-methods.js +466 -0
  190. package/dist/packages/method-package/method-definitions.d.ts +83 -0
  191. package/dist/packages/method-package/method-definitions.js +205 -0
  192. package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
  193. package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +27 -27
  194. package/dist/packages/method-package/method-review-paths.d.ts +10 -0
  195. package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
  196. package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +13 -11
  197. package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +8 -6
  198. package/dist/packages/methods/index.d.ts +2 -0
  199. package/dist/packages/methods/index.js +2 -0
  200. package/dist/packages/methods/method-resolution.d.ts +6 -0
  201. package/dist/packages/methods/method-resolution.js +7 -0
  202. package/dist/packages/project-model/index.d.ts +2 -4
  203. package/dist/packages/project-model/index.js +1 -3
  204. package/dist/packages/project-model/interf-detect.d.ts +3 -3
  205. package/dist/packages/project-model/interf-detect.js +18 -14
  206. package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
  207. package/dist/packages/project-model/interf-scaffold.js +40 -38
  208. package/dist/packages/project-model/interf.d.ts +1 -2
  209. package/dist/packages/project-model/interf.js +1 -2
  210. package/dist/packages/project-model/lib/schema.d.ts +24 -14
  211. package/dist/packages/project-model/lib/schema.js +22 -30
  212. package/dist/packages/project-model/project-paths.d.ts +9 -10
  213. package/dist/packages/project-model/project-paths.js +14 -17
  214. package/dist/packages/project-model/source-config.d.ts +19 -17
  215. package/dist/packages/project-model/source-config.js +144 -145
  216. package/dist/packages/project-model/source-folders.d.ts +11 -0
  217. package/dist/packages/project-model/source-folders.js +110 -0
  218. package/dist/packages/testing/index.d.ts +2 -2
  219. package/dist/packages/testing/index.js +1 -1
  220. package/dist/packages/testing/lib/schema.d.ts +11 -11
  221. package/dist/packages/testing/lib/schema.js +8 -9
  222. package/dist/packages/testing/readiness-check-run.d.ts +67 -0
  223. package/dist/packages/testing/readiness-check-run.js +258 -0
  224. package/dist/packages/testing/test-execution.d.ts +3 -3
  225. package/dist/packages/testing/test-execution.js +8 -8
  226. package/dist/packages/testing/test-paths.js +7 -9
  227. package/dist/packages/testing/test-profile-presets.js +2 -2
  228. package/dist/packages/testing/test-sandbox.js +10 -11
  229. package/dist/packages/testing/test-targets.d.ts +1 -1
  230. package/dist/packages/testing/test-targets.js +8 -7
  231. package/dist/packages/testing/test-types.d.ts +1 -1
  232. package/package.json +29 -30
  233. package/builtin-workflows/interf/improve/SKILL.md +0 -18
  234. package/dist/cli/commands/create-workflow-wizard.d.ts +0 -70
  235. package/dist/cli/commands/create-workflow-wizard.js +0 -361
  236. package/dist/cli/commands/dataset-selection.d.ts +0 -6
  237. package/dist/cli/commands/dataset-selection.js +0 -11
  238. package/dist/lib/agent-args.d.ts +0 -1
  239. package/dist/lib/agent-args.js +0 -1
  240. package/dist/lib/agent-constants.d.ts +0 -1
  241. package/dist/lib/agent-constants.js +0 -1
  242. package/dist/lib/agent-detection.d.ts +0 -1
  243. package/dist/lib/agent-detection.js +0 -1
  244. package/dist/lib/agent-execution.d.ts +0 -1
  245. package/dist/lib/agent-execution.js +0 -1
  246. package/dist/lib/agent-logs.d.ts +0 -1
  247. package/dist/lib/agent-logs.js +0 -1
  248. package/dist/lib/agent-preflight.d.ts +0 -1
  249. package/dist/lib/agent-preflight.js +0 -1
  250. package/dist/lib/agent-render.d.ts +0 -1
  251. package/dist/lib/agent-render.js +0 -1
  252. package/dist/lib/agent-shells.d.ts +0 -1
  253. package/dist/lib/agent-shells.js +0 -1
  254. package/dist/lib/agent-status.d.ts +0 -1
  255. package/dist/lib/agent-status.js +0 -1
  256. package/dist/lib/agent-types.d.ts +0 -1
  257. package/dist/lib/agent-types.js +0 -1
  258. package/dist/lib/agents.d.ts +0 -1
  259. package/dist/lib/agents.js +0 -1
  260. package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
  261. package/dist/lib/builtin-compiled-workflow.js +0 -1
  262. package/dist/lib/chart-guidance.d.ts +0 -1
  263. package/dist/lib/chart-guidance.js +0 -1
  264. package/dist/lib/compiled-compile.d.ts +0 -1
  265. package/dist/lib/compiled-compile.js +0 -1
  266. package/dist/lib/compiled-paths.d.ts +0 -1
  267. package/dist/lib/compiled-paths.js +0 -3
  268. package/dist/lib/compiled-raw.d.ts +0 -1
  269. package/dist/lib/compiled-raw.js +0 -3
  270. package/dist/lib/compiled-reset.d.ts +0 -1
  271. package/dist/lib/compiled-reset.js +0 -3
  272. package/dist/lib/compiled-schema.d.ts +0 -1
  273. package/dist/lib/compiled-schema.js +0 -1
  274. package/dist/lib/discovery.d.ts +0 -1
  275. package/dist/lib/discovery.js +0 -1
  276. package/dist/lib/execution-profile.d.ts +0 -1
  277. package/dist/lib/execution-profile.js +0 -1
  278. package/dist/lib/executors.d.ts +0 -1
  279. package/dist/lib/executors.js +0 -1
  280. package/dist/lib/filesystem.d.ts +0 -1
  281. package/dist/lib/filesystem.js +0 -1
  282. package/dist/lib/interf-bootstrap.d.ts +0 -1
  283. package/dist/lib/interf-bootstrap.js +0 -3
  284. package/dist/lib/interf-detect.d.ts +0 -1
  285. package/dist/lib/interf-detect.js +0 -3
  286. package/dist/lib/interf-scaffold.d.ts +0 -1
  287. package/dist/lib/interf-scaffold.js +0 -3
  288. package/dist/lib/interf-workflow-package.d.ts +0 -1
  289. package/dist/lib/interf-workflow-package.js +0 -1
  290. package/dist/lib/interf.d.ts +0 -1
  291. package/dist/lib/interf.js +0 -3
  292. package/dist/lib/local-workflows.d.ts +0 -1
  293. package/dist/lib/local-workflows.js +0 -1
  294. package/dist/lib/logger.d.ts +0 -1
  295. package/dist/lib/logger.js +0 -1
  296. package/dist/lib/package-root.d.ts +0 -1
  297. package/dist/lib/package-root.js +0 -1
  298. package/dist/lib/parse.d.ts +0 -1
  299. package/dist/lib/parse.js +0 -1
  300. package/dist/lib/project-paths.d.ts +0 -1
  301. package/dist/lib/project-paths.js +0 -3
  302. package/dist/lib/runtime-acceptance.d.ts +0 -1
  303. package/dist/lib/runtime-acceptance.js +0 -1
  304. package/dist/lib/runtime-contracts.d.ts +0 -1
  305. package/dist/lib/runtime-contracts.js +0 -1
  306. package/dist/lib/runtime-inventory.d.ts +0 -1
  307. package/dist/lib/runtime-inventory.js +0 -1
  308. package/dist/lib/runtime-paths.d.ts +0 -1
  309. package/dist/lib/runtime-paths.js +0 -1
  310. package/dist/lib/runtime-prompt.d.ts +0 -1
  311. package/dist/lib/runtime-prompt.js +0 -1
  312. package/dist/lib/runtime-reconcile.d.ts +0 -1
  313. package/dist/lib/runtime-reconcile.js +0 -1
  314. package/dist/lib/runtime-runs.d.ts +0 -1
  315. package/dist/lib/runtime-runs.js +0 -1
  316. package/dist/lib/runtime-types.d.ts +0 -1
  317. package/dist/lib/runtime-types.js +0 -1
  318. package/dist/lib/runtime.d.ts +0 -1
  319. package/dist/lib/runtime.js +0 -1
  320. package/dist/lib/schema.d.ts +0 -4
  321. package/dist/lib/schema.js +0 -6
  322. package/dist/lib/source-config.d.ts +0 -1
  323. package/dist/lib/source-config.js +0 -3
  324. package/dist/lib/state-artifacts.d.ts +0 -1
  325. package/dist/lib/state-artifacts.js +0 -1
  326. package/dist/lib/state-health.d.ts +0 -1
  327. package/dist/lib/state-health.js +0 -1
  328. package/dist/lib/state-io.d.ts +0 -1
  329. package/dist/lib/state-io.js +0 -1
  330. package/dist/lib/state-paths.d.ts +0 -1
  331. package/dist/lib/state-paths.js +0 -1
  332. package/dist/lib/state-view.d.ts +0 -1
  333. package/dist/lib/state-view.js +0 -1
  334. package/dist/lib/state.d.ts +0 -1
  335. package/dist/lib/state.js +0 -1
  336. package/dist/lib/test-execution.d.ts +0 -1
  337. package/dist/lib/test-execution.js +0 -3
  338. package/dist/lib/test-matrices.d.ts +0 -1
  339. package/dist/lib/test-matrices.js +0 -3
  340. package/dist/lib/test-paths.d.ts +0 -1
  341. package/dist/lib/test-paths.js +0 -3
  342. package/dist/lib/test-profile-presets.d.ts +0 -1
  343. package/dist/lib/test-profile-presets.js +0 -3
  344. package/dist/lib/test-sandbox.d.ts +0 -1
  345. package/dist/lib/test-sandbox.js +0 -3
  346. package/dist/lib/test-specs.d.ts +0 -1
  347. package/dist/lib/test-specs.js +0 -3
  348. package/dist/lib/test-targets.d.ts +0 -1
  349. package/dist/lib/test-targets.js +0 -3
  350. package/dist/lib/test-types.d.ts +0 -1
  351. package/dist/lib/test-types.js +0 -3
  352. package/dist/lib/test.d.ts +0 -1
  353. package/dist/lib/test.js +0 -3
  354. package/dist/lib/util.d.ts +0 -1
  355. package/dist/lib/util.js +0 -1
  356. package/dist/lib/validate-compiled.d.ts +0 -1
  357. package/dist/lib/validate-compiled.js +0 -1
  358. package/dist/lib/validate-helpers.d.ts +0 -1
  359. package/dist/lib/validate-helpers.js +0 -1
  360. package/dist/lib/validate.d.ts +0 -1
  361. package/dist/lib/validate.js +0 -1
  362. package/dist/lib/workflow-authoring.d.ts +0 -1
  363. package/dist/lib/workflow-authoring.js +0 -1
  364. package/dist/lib/workflow-definitions.d.ts +0 -1
  365. package/dist/lib/workflow-definitions.js +0 -1
  366. package/dist/lib/workflow-edit-session.d.ts +0 -1
  367. package/dist/lib/workflow-edit-session.js +0 -1
  368. package/dist/lib/workflow-edit-utils.d.ts +0 -1
  369. package/dist/lib/workflow-edit-utils.js +0 -1
  370. package/dist/lib/workflow-helpers.d.ts +0 -1
  371. package/dist/lib/workflow-helpers.js +0 -1
  372. package/dist/lib/workflow-improvement.d.ts +0 -1
  373. package/dist/lib/workflow-improvement.js +0 -1
  374. package/dist/lib/workflow-primitives.d.ts +0 -1
  375. package/dist/lib/workflow-primitives.js +0 -1
  376. package/dist/lib/workflow-review-paths.d.ts +0 -1
  377. package/dist/lib/workflow-review-paths.js +0 -1
  378. package/dist/lib/workflow-stage-policy.d.ts +0 -1
  379. package/dist/lib/workflow-stage-policy.js +0 -1
  380. package/dist/lib/workflow-stage-runner.d.ts +0 -1
  381. package/dist/lib/workflow-stage-runner.js +0 -1
  382. package/dist/lib/workflows.d.ts +0 -1
  383. package/dist/lib/workflows.js +0 -1
  384. package/dist/packages/project-model/compiled-paths.d.ts +0 -1
  385. package/dist/packages/project-model/compiled-paths.js +0 -1
  386. package/dist/packages/project-model/compiled-raw.d.ts +0 -1
  387. package/dist/packages/project-model/compiled-raw.js +0 -1
  388. package/dist/packages/project-model/compiled-reset.d.ts +0 -1
  389. package/dist/packages/project-model/compiled-reset.js +0 -1
  390. package/dist/packages/shared/index.d.ts +0 -7
  391. package/dist/packages/shared/index.js +0 -7
  392. package/dist/packages/shared/util.d.ts +0 -3
  393. package/dist/packages/shared/util.js +0 -3
  394. package/dist/packages/testing/test-matrices.d.ts +0 -90
  395. package/dist/packages/testing/test-matrices.js +0 -96
  396. package/dist/packages/workflow-authoring/index.d.ts +0 -4
  397. package/dist/packages/workflow-authoring/index.js +0 -4
  398. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -26
  399. package/dist/packages/workflow-authoring/workflow-authoring.js +0 -123
  400. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -16
  401. package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -60
  402. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
  403. package/dist/packages/workflow-package/index.d.ts +0 -11
  404. package/dist/packages/workflow-package/index.js +0 -11
  405. package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -25
  406. package/dist/packages/workflow-package/interf-workflow-package.js +0 -389
  407. package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
  408. package/dist/packages/workflow-package/local-workflows.js +0 -441
  409. package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
  410. package/dist/packages/workflow-package/workflow-definitions.js +0 -210
  411. package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
  412. /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
  413. /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
  414. /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
  415. /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
  416. /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
  417. /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
  418. /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
- import { COMPILED_ZONE_KINDS, } from "../workflow-primitives.js";
2
+ import { COMPILED_ZONE_KINDS, } from "../method-primitives.js";
3
+ import { RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
4
+ export { ReadinessCheckSchema, ReadinessGateSchema, ReadinessStateSchema, ReadinessStatusSchema, ReadinessTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../contracts/lib/schema.js";
3
5
  const JsonRecordSchema = z.record(z.string(), z.unknown());
4
6
  const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
5
7
  function isCompiledRelativePath(value) {
@@ -11,18 +13,10 @@ function isCompiledRelativePath(value) {
11
13
  .split(/[\\/]+/)
12
14
  .every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
13
15
  }
14
- export const RuntimeTargetTypeSchema = z.enum(["compiled"]);
15
- export const TestTargetTypeSchema = z.enum(["compiled", "raw"]);
16
- export const WorkflowIdPattern = /^[a-z0-9][a-z0-9-]{0,79}$/;
17
- export const RuntimeStageSchema = z.string().regex(WorkflowIdPattern);
18
- export const RuntimeContractTypeSchema = z.string().regex(WorkflowIdPattern);
19
- export const WorkflowIdSchema = z.string().regex(WorkflowIdPattern);
20
- export const WorkflowZoneIdSchema = z.string().regex(WorkflowIdPattern);
21
- export const WorkflowCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
22
- export const WorkflowZoneRoleSchema = z.enum(["input", "working", "output", "runtime"]);
16
+ export const MethodZoneIdSchema = z.string().regex(InterfIdPattern);
17
+ export const MethodCompiledZoneKindSchema = z.enum(COMPILED_ZONE_KINDS);
18
+ export const MethodZoneRoleSchema = z.enum(["input", "working", "output", "runtime"]);
23
19
  export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
24
- export const SourceCompiledMaxAttemptsSchema = z.number().int().min(1).max(5);
25
- export const SourceCompiledMaxLoopsSchema = z.number().int().min(1).max(3);
26
20
  export const CompiledStageStateSchema = z.object({
27
21
  contract_type: RuntimeContractTypeSchema.optional(),
28
22
  status: CompiledStageStatusSchema.optional(),
@@ -37,7 +31,7 @@ export const CompiledStageStateSchema = z.object({
37
31
  export const CompiledStateSchema = z.object({
38
32
  version: z.number().int().min(1),
39
33
  pending: z.array(z.string()),
40
- stages: z.record(z.string().regex(WorkflowIdPattern), CompiledStageStateSchema).optional(),
34
+ stages: z.record(z.string().regex(InterfIdPattern), CompiledStageStateSchema).optional(),
41
35
  last_add: z.string().nullable().optional(),
42
36
  last_compile: z.string().nullable().optional(),
43
37
  warning_count: z.number().optional(),
@@ -93,39 +87,39 @@ export const CompiledRawSnapshotSchema = z.object({
93
87
  source_total: z.number(),
94
88
  sample_files: z.array(z.string()),
95
89
  });
96
- export const WorkflowPurposeSchema = z.object({
90
+ export const MethodPurposeSchema = z.object({
97
91
  label: z.string().min(1),
98
92
  task_hint: z.string().min(1),
99
93
  }).strict();
100
- export const WorkflowZoneSchema = z.object({
101
- id: WorkflowZoneIdSchema,
102
- role: WorkflowZoneRoleSchema,
94
+ export const MethodZoneSchema = z.object({
95
+ id: MethodZoneIdSchema,
96
+ role: MethodZoneRoleSchema,
103
97
  path: z.string().min(1).refine(isCompiledRelativePath, {
104
98
  message: "Zone paths must stay inside the compiled root",
105
99
  }),
106
- kind: WorkflowCompiledZoneKindSchema,
100
+ kind: MethodCompiledZoneKindSchema,
107
101
  required: z.boolean(),
108
- owned_by: z.array(z.string().regex(WorkflowIdPattern)),
102
+ owned_by: z.array(z.string().regex(InterfIdPattern)),
109
103
  description: z.string().min(1),
110
104
  });
111
- export const WorkflowCompiledZoneSchema = WorkflowZoneSchema;
112
- // Persisted schema for the workflow-defined context interface that one
113
- // compiled context must implement on disk.
114
- export const WorkflowSchemaSchema = z.object({
115
- kind: z.literal("workflow-schema"),
105
+ export const MethodCompiledZoneSchema = MethodZoneSchema;
106
+ // Persisted schema for the method-defined context interface that one
107
+ // portable context must implement on disk.
108
+ export const MethodSchemaSchema = z.object({
109
+ kind: z.literal("method-schema"),
116
110
  version: z.literal(1),
117
111
  target_type: z.literal("compiled"),
118
112
  label: z.string().min(1),
119
- zones: z.array(WorkflowZoneSchema).min(1),
113
+ zones: z.array(MethodZoneSchema).min(1),
120
114
  });
121
- export const WorkflowCompiledSchemaSchema = WorkflowSchemaSchema;
122
- export const WorkflowCompilerApiSchema = z.object({
115
+ export const MethodCompiledSchemaSchema = MethodSchemaSchema;
116
+ export const MethodCompilerApiSchema = z.object({
123
117
  kind: z.literal("compiled"),
124
118
  version: z.literal(1),
125
119
  });
126
- export const WorkflowStageZoneAccessSchema = z.array(WorkflowZoneIdSchema).min(1);
120
+ export const MethodStageZoneAccessSchema = z.array(MethodZoneIdSchema).min(1);
127
121
  export const ExecutionShellZoneMountSchema = z.object({
128
- zone_id: WorkflowZoneIdSchema,
122
+ zone_id: MethodZoneIdSchema,
129
123
  compiled_path: z.string(),
130
124
  shell_root_path: z.string(),
131
125
  input_mount_path: z.string().nullable(),
@@ -134,23 +128,13 @@ export const ExecutionShellZoneMountSchema = z.object({
134
128
  export const ExecutionShellPathsSchema = z.object({
135
129
  kind: z.literal("interf-execution-shell"),
136
130
  version: z.literal(1),
137
- workflow: WorkflowIdSchema,
131
+ method: MethodIdSchema,
138
132
  stage: RuntimeStageSchema,
139
133
  reads: z.array(ExecutionShellZoneMountSchema),
140
134
  writes: z.array(ExecutionShellZoneMountSchema),
141
135
  });
142
- export const RuntimeExecutorInfoSchema = z.object({
143
- kind: z.enum(["local-agent", "connected-provider", "managed"]),
144
- name: z.string(),
145
- display_name: z.string(),
146
- command: z.string().nullable(),
147
- model: z.string().nullable().optional(),
148
- effort: z.string().nullable().optional(),
149
- profile: z.string().nullable().optional(),
150
- timeout_ms: z.number().nullable().optional(),
151
- });
152
136
  export const RuntimeStageInstructionsSchema = z.object({
153
- stage_skill_dir: z.string().regex(WorkflowIdPattern),
137
+ stage_skill_dir: z.string().regex(InterfIdPattern),
154
138
  effective_mode: z.enum(["builtin", "extend", "override"]),
155
139
  local_mode: z.enum(["extend", "override"]).nullable(),
156
140
  local_docs: z.array(z.string()),
@@ -162,12 +146,12 @@ export const RuntimeStageAcceptanceSchema = z.object({
162
146
  stage_equals_counts: z.record(z.string(), z.string()).optional(),
163
147
  stage_at_least: z.record(z.string(), z.number()).optional(),
164
148
  stage_at_least_counts: z.record(z.string(), z.string()).optional(),
165
- zone_counts_at_least: z.record(z.string().regex(WorkflowIdPattern), z.number()).optional(),
166
- zone_counts_at_least_counts: z.record(z.string().regex(WorkflowIdPattern), z.string()).optional(),
167
- markdown_frontmatter_valid_zones: z.array(WorkflowZoneIdSchema).optional(),
168
- frontmatter_required_keys_in_zones: z.record(WorkflowZoneIdSchema, z.array(z.string().min(1)).min(1)).optional(),
169
- markdown_abstract_valid_zones: z.array(WorkflowZoneIdSchema).optional(),
170
- wikilinks_valid_in_zones: z.array(WorkflowZoneIdSchema).optional(),
149
+ zone_counts_at_least: z.record(z.string().regex(InterfIdPattern), z.number()).optional(),
150
+ zone_counts_at_least_counts: z.record(z.string().regex(InterfIdPattern), z.string()).optional(),
151
+ markdown_frontmatter_valid_zones: z.array(MethodZoneIdSchema).optional(),
152
+ frontmatter_required_keys_in_zones: z.record(MethodZoneIdSchema, z.array(z.string().min(1)).min(1)).optional(),
153
+ markdown_abstract_valid_zones: z.array(MethodZoneIdSchema).optional(),
154
+ wikilinks_valid_in_zones: z.array(MethodZoneIdSchema).optional(),
171
155
  artifacts_must_not_contain: z.record(z.string(), z.array(z.string().min(1))).optional(),
172
156
  }).strict();
173
157
  export const RuntimeStageContractSchema = z.object({
@@ -177,8 +161,8 @@ export const RuntimeStageContractSchema = z.object({
177
161
  run_id: z.string(),
178
162
  target_type: RuntimeTargetTypeSchema,
179
163
  target_name: z.string(),
180
- workflow: z.object({
181
- id: WorkflowIdSchema,
164
+ method: z.object({
165
+ id: MethodIdSchema,
182
166
  stage_index: z.number().nullable(),
183
167
  stage_total: z.number(),
184
168
  stages: z.array(RuntimeStageSchema),
@@ -215,7 +199,7 @@ export const RuntimeRunSchema = z.object({
215
199
  run_id: z.string(),
216
200
  target_type: RuntimeTargetTypeSchema,
217
201
  target_name: z.string(),
218
- workflow: WorkflowIdSchema,
202
+ method: MethodIdSchema,
219
203
  stage: RuntimeStageSchema,
220
204
  stage_label: z.string(),
221
205
  contract_type: RuntimeContractTypeSchema,
@@ -238,9 +222,9 @@ export const RuntimeRunSchema = z.object({
238
222
  error: z.string().nullable(),
239
223
  });
240
224
  export const CompiledInventoryEntrySchema = z.object({
241
- input_zone: WorkflowZoneIdSchema.optional(),
225
+ input_zone: MethodZoneIdSchema.optional(),
242
226
  input_path: z.string().min(1).optional(),
243
- output_zone: WorkflowZoneIdSchema,
227
+ output_zone: MethodZoneIdSchema,
244
228
  output_path: z.string().min(1),
245
229
  state: z.string().min(1).optional(),
246
230
  metadata: JsonRecordSchema.optional(),
@@ -252,24 +236,7 @@ export const CompiledInventorySchema = z.object({
252
236
  entries: z.array(CompiledInventoryEntrySchema),
253
237
  total: z.number().int().nonnegative(),
254
238
  });
255
- export const TestCaseExpectSchema = z.object({
256
- must_include: z.array(z.string().min(1)).optional(),
257
- must_include_one_of: z.array(z.array(z.string().min(1)).min(1)).optional(),
258
- must_not_include: z.array(z.string().min(1)).optional(),
259
- min_words: z.number().int().nonnegative().optional(),
260
- max_words: z.number().int().nonnegative().optional(),
261
- }).refine((value) => value.min_words === undefined ||
262
- value.max_words === undefined ||
263
- value.max_words >= value.min_words, {
264
- message: "max_words must be greater than or equal to min_words",
265
- }).refine((value) => (value.must_include?.length ?? 0) > 0 ||
266
- (value.must_include_one_of?.length ?? 0) > 0 ||
267
- (value.must_not_include?.length ?? 0) > 0 ||
268
- value.min_words !== undefined ||
269
- value.max_words !== undefined, {
270
- message: "Test expectations must include at least one check",
271
- });
272
- export const WorkflowImprovementLoopSummarySchema = z.object({
239
+ export const MethodImprovementLoopSummarySchema = z.object({
273
240
  variation: z.number().int().min(1),
274
241
  kind: z.enum(["baseline", "edited"]),
275
242
  attempts_run: z.number().int().min(1),
@@ -281,36 +248,37 @@ export const WorkflowImprovementLoopSummarySchema = z.object({
281
248
  test_sandbox_path: z.string().nullable().optional(),
282
249
  summary: z.string().min(1),
283
250
  });
284
- export const WorkflowImprovementContextSchema = z.object({
285
- kind: z.literal("interf-workflow-improvement-loop"),
251
+ export const MethodImprovementContextSchema = z.object({
252
+ kind: z.literal("interf-method-improvement-loop"),
286
253
  version: z.literal(1),
287
254
  generated_at: z.string(),
288
255
  target_name: z.string(),
289
- workflow_id: WorkflowIdSchema,
256
+ method_id: MethodIdSchema,
290
257
  loop_index: z.number().int().min(1),
291
258
  max_loops: SourceCompiledMaxLoopsSchema,
292
259
  max_attempts: SourceCompiledMaxAttemptsSchema,
293
260
  review_paths: z.object({
294
- workflow_root: z.string(),
261
+ method_root: z.string(),
295
262
  compiled_runtime: z.string().nullable(),
296
263
  test_comparisons: z.string().nullable(),
297
264
  execution_shells: z.string().nullable(),
298
265
  test_runs: z.string().nullable(),
299
266
  test_sandboxes: z.string().nullable(),
300
267
  }),
301
- truth_checks: z.object({
268
+ readiness_checks: z.object({
302
269
  count: z.number().int().min(0),
303
270
  questions: z.array(z.object({
304
271
  id: z.string(),
305
272
  question: z.string(),
306
273
  })),
307
274
  }),
308
- previous_variations: z.array(WorkflowImprovementLoopSummarySchema),
309
- latest_failure: WorkflowImprovementLoopSummarySchema.nullable(),
275
+ previous_variations: z.array(MethodImprovementLoopSummarySchema),
276
+ latest_failure: MethodImprovementLoopSummarySchema.nullable(),
310
277
  });
311
278
  export const PreservedShellTypeSchema = z.enum([
312
279
  "stage-execution",
313
- "workflow-improvement",
280
+ "method-authoring",
281
+ "method-improvement",
314
282
  ]);
315
283
  export const PreservedShellSnapshotSchema = z.object({
316
284
  kind: z.literal("interf-preserved-shell"),
@@ -320,20 +288,20 @@ export const PreservedShellSnapshotSchema = z.object({
320
288
  root_path: z.string(),
321
289
  materialized_symlinks: z.number().int().min(0),
322
290
  });
323
- export const WorkflowPackageValidationSchema = z.object({
291
+ export const MethodPackageValidationSchema = z.object({
324
292
  ok: z.boolean(),
325
293
  summary: z.string(),
326
294
  errors: z.array(z.string()),
327
295
  counts: z.record(z.string(), z.number()),
328
296
  });
329
- export const WorkflowImprovementLoopRecordSchema = z.object({
330
- kind: z.literal("interf-workflow-improvement-loop-record"),
297
+ export const MethodImprovementLoopRecordSchema = z.object({
298
+ kind: z.literal("interf-method-improvement-loop-record"),
331
299
  version: z.literal(1),
332
300
  recorded_at: z.string(),
333
301
  run_id: z.string(),
334
302
  loop_index: z.number().int().min(1),
335
303
  target_name: z.string(),
336
- workflow_id: WorkflowIdSchema,
304
+ method_id: MethodIdSchema,
337
305
  result: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
338
306
  changed: z.boolean(),
339
307
  applied: z.boolean(),
@@ -341,23 +309,23 @@ export const WorkflowImprovementLoopRecordSchema = z.object({
341
309
  shell_path: z.string(),
342
310
  loop_root_path: z.string(),
343
311
  context_path: z.string(),
344
- workflow_before_path: z.string(),
345
- workflow_after_path: z.string(),
312
+ method_before_path: z.string(),
313
+ method_after_path: z.string(),
346
314
  prompt_log_path: z.string(),
347
315
  event_log_path: z.string(),
348
316
  status_log_path: z.string(),
349
317
  preserved_shell_manifest_path: z.string().nullable(),
350
- validation: WorkflowPackageValidationSchema.nullable(),
318
+ validation: MethodPackageValidationSchema.nullable(),
351
319
  });
352
- export const WorkflowImprovementRunLedgerSchema = z.object({
353
- kind: z.literal("interf-workflow-improvement-run"),
320
+ export const MethodImprovementRunLedgerSchema = z.object({
321
+ kind: z.literal("interf-method-improvement-run"),
354
322
  version: z.literal(1),
355
323
  generated_at: z.string(),
356
324
  updated_at: z.string(),
357
325
  run_id: z.string(),
358
326
  target_name: z.string(),
359
- workflow_id: WorkflowIdSchema,
327
+ method_id: MethodIdSchema,
360
328
  max_loops: SourceCompiledMaxLoopsSchema,
361
329
  max_attempts: SourceCompiledMaxAttemptsSchema,
362
- loops: z.array(WorkflowImprovementLoopRecordSchema),
330
+ loops: z.array(MethodImprovementLoopRecordSchema),
363
331
  });
@@ -1,6 +1,6 @@
1
1
  import { type InterfConfig } from "../project-model/interf-detect.js";
2
- export type { WorkflowReporter, WorkflowStageResult, LocalSkillContractExtension } from "../workflow-package/workflow-helpers.js";
3
- export { workflowQueryDirectory, workflowImproveDirectory, workflowCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../workflow-package/workflow-helpers.js";
2
+ export type { MethodReporter, MethodStageResult, LocalSkillContractExtension } from "../method-package/method-helpers.js";
3
+ export { methodQueryDirectory, methodImproveDirectory, methodCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../method-package/method-helpers.js";
4
4
  export type CompiledCheck = "compiled" | "stage";
5
5
  export interface DetectedInterfTarget {
6
6
  path: string;
@@ -9,7 +9,7 @@ export interface DetectedInterfTarget {
9
9
  config: InterfConfig;
10
10
  }
11
11
  export declare function detectCompiled(cwd: string): DetectedInterfTarget | null;
12
- export declare function createCompiled(name: string, sourcePath: string, workflowId?: string, about?: string, datasetPath?: string): string;
13
- export declare function verifyCompiledCheck(check: CompiledCheck, compiledPath: string): import("./validate-compiled.js").CompiledWorkflowValidation;
12
+ export declare function createCompiled(name: string, sourcePath: string, methodId?: string, about?: string, sourceFolderPath?: string): string;
13
+ export declare function verifyCompiledCheck(check: CompiledCheck, compiledPath: string): import("./validate-compiled.js").CompiledMethodValidation;
14
14
  export { runCompiledSummarize, runCompiledCompile, compileCompiled, resolveCompiledContext, compiledExecutionStages, } from "./compiled-compile.js";
15
15
  export type { CompiledSummarizeResult, CompiledCompileResult, CompiledStageExecutionDefinition, StageShellRetentionMode, } from "./compiled-compile.js";
@@ -1,7 +1,8 @@
1
1
  import { createCompiled as createCompiledScaffold, } from "../project-model/interf-scaffold.js";
2
2
  import { detectInterf } from "../project-model/interf-detect.js";
3
3
  import { validateCompiledCompile, } from "./validate.js";
4
- export { workflowQueryDirectory, workflowImproveDirectory, workflowCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../workflow-package/workflow-helpers.js";
4
+ import { DEFAULT_METHOD_ID } from "../methods/method-resolution.js";
5
+ export { methodQueryDirectory, methodImproveDirectory, methodCompileStageDirectory, emptyLocalSkillContractExtension, buildLocalSkillContractExtension, buildLocalSkillContractExtensionRelativeTo, mergeLocalSkillContractExtensions, buildStageInstructions, reportLine, reportBlankLine, reportValidationFailure, resolveStageAcceptance, validateStageOutcome, } from "../method-package/method-helpers.js";
5
6
  export function detectCompiled(cwd) {
6
7
  const detected = detectInterf(cwd);
7
8
  if (!detected)
@@ -13,8 +14,8 @@ export function detectCompiled(cwd) {
13
14
  config: detected.config,
14
15
  };
15
16
  }
16
- export function createCompiled(name, sourcePath, workflowId = "interf", about, datasetPath = sourcePath) {
17
- return createCompiledScaffold(name, sourcePath, workflowId, about, datasetPath);
17
+ export function createCompiled(name, sourcePath, methodId = DEFAULT_METHOD_ID, about, sourceFolderPath = sourcePath) {
18
+ return createCompiledScaffold(name, sourcePath, methodId, about, sourceFolderPath);
18
19
  }
19
20
  export function verifyCompiledCheck(check, compiledPath) {
20
21
  switch (check) {
@@ -9,7 +9,7 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
9
9
  [x: string]: unknown;
10
10
  type: "compiled";
11
11
  name: string;
12
- workflow: string;
12
+ method: string;
13
13
  checks: {
14
14
  question: string;
15
15
  id?: string | undefined;
@@ -25,13 +25,13 @@ export declare function resolveCompiledRawPath(compiledPath: string, config?: {
25
25
  }[];
26
26
  source: {
27
27
  path: string;
28
- dataset_path: string;
29
28
  control_path?: string | undefined;
29
+ preparation_path?: string | undefined;
30
30
  };
31
31
  about?: string | undefined;
32
32
  max_attempts?: number | undefined;
33
33
  max_loops?: number | undefined;
34
- workflow_origin?: {
34
+ method_origin?: {
35
35
  selected: string;
36
36
  local_draft?: boolean | undefined;
37
37
  } | undefined;
@@ -36,7 +36,6 @@ export function ensureCompiledRawBinding(compiledPath) {
36
36
  ...(config.source ?? {}),
37
37
  path: "./raw",
38
38
  control_path: config.source?.control_path ?? defaultControlPathForCompiled(compiledPath),
39
- ...(config.source?.dataset_path ? { dataset_path: config.source.dataset_path } : {}),
40
39
  },
41
40
  };
42
41
  return saveCompiledInterfConfig(compiledPath, nextConfig);
@@ -2,7 +2,7 @@ import { existsSync, readdirSync, rmSync } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { readCompiledSchemaFile } from "./compiled-schema.js";
4
4
  import { initializeCompiledRuntimeState } from "./state.js";
5
- import { stageExecutionShellsRoot, testRootForCompiled, testTargetsRootForCompiled, workflowImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeRoot, compiledRuntimeLogsRoot, workflowPackagePathForCompiled, } from "./compiled-paths.js";
5
+ import { stageExecutionShellsRoot, testRootForCompiled, testTargetsRootForCompiled, methodImprovementLoopsRoot, compiledQueryAcceptanceRoot, compiledRuntimeRoot, compiledRuntimeLogsRoot, methodPackagePathForCompiled, } from "./compiled-paths.js";
6
6
  function removeIfExists(path) {
7
7
  if (existsSync(path)) {
8
8
  rmSync(path, { recursive: true, force: true });
@@ -36,7 +36,7 @@ export function clearCompiledRuntimeDerivedArtifacts(compiledPath) {
36
36
  removeIfExists(compiledQueryAcceptanceRoot(compiledPath));
37
37
  }
38
38
  function activeCompiledInputRoots(compiledPath) {
39
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
39
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
40
40
  const roots = new Set();
41
41
  for (const zone of schema?.zones ?? []) {
42
42
  if (zone.role !== "input")
@@ -63,7 +63,7 @@ export function resetCompiledGeneratedState(compiledPath, scope = "compile") {
63
63
  initializeCompiledRuntimeState(compiledPath);
64
64
  if (scope === "all") {
65
65
  removeIfExists(stageExecutionShellsRoot(compiledPath));
66
- removeIfExists(workflowImprovementLoopsRoot(compiledPath));
66
+ removeIfExists(methodImprovementLoopsRoot(compiledPath));
67
67
  removeIfExists(compiledRuntimeLogsRoot(compiledPath));
68
68
  removeIfExists(join(compiledRuntimeRoot(compiledPath), "run-history.jsonl"));
69
69
  removeIfExists(testRootForCompiled(compiledPath));
@@ -2,12 +2,13 @@ import { existsSync, } from "node:fs";
2
2
  import { join } from "node:path";
3
3
  import { listFilesRecursive } from "../shared/filesystem.js";
4
4
  import { readJsonFileWithSchema } from "../shared/parse.js";
5
- import { WORKFLOW_SCHEMA_FILE, compiledZoneAbsolutePath, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
5
+ import { METHOD_SCHEMA_FILE, compiledZoneAbsolutePath, findCompiledSchemaZone, readCompiledSchemaFile, } from "./compiled-schema.js";
6
6
  import { RuntimeStageContractSchema, } from "./lib/schema.js";
7
7
  import { stageContractPath } from "./runtime-paths.js";
8
- import { workflowPackagePathForCompiled } from "./compiled-paths.js";
8
+ import { methodPackagePathForCompiled } from "./compiled-paths.js";
9
9
  import { loadState } from "./state-io.js";
10
10
  import { countBrokenWikilinks, isOutputMarkdownFile, safeReadText, validateSynthFiles } from "./validate.js";
11
+ import { countCompiledZoneArtifacts } from "./artifact-counts.js";
11
12
  function toFiniteNumber(value) {
12
13
  if (typeof value !== "number" || !Number.isFinite(value))
13
14
  return null;
@@ -41,14 +42,6 @@ function readPathValue(record, keyPath) {
41
42
  return current[segment];
42
43
  }, record);
43
44
  }
44
- function countZoneArtifacts(compiledPath, zonePath, kind) {
45
- const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
46
- if (!existsSync(absolutePath))
47
- return 0;
48
- if (kind === "file")
49
- return 1;
50
- return listFilesRecursive(absolutePath).length;
51
- }
52
45
  function markdownFilesForZone(compiledPath, zonePath, kind) {
53
46
  const absolutePath = compiledZoneAbsolutePath(compiledPath, { path: zonePath });
54
47
  if (!existsSync(absolutePath))
@@ -59,7 +52,7 @@ function markdownFilesForZone(compiledPath, zonePath, kind) {
59
52
  return listFilesRecursive(absolutePath, isOutputMarkdownFile);
60
53
  }
61
54
  function zoneRoots(compiledPath, acceptanceZones) {
62
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
55
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
63
56
  if (!schema)
64
57
  return [];
65
58
  return acceptanceZones
@@ -103,12 +96,12 @@ export function validateResolvedStageAcceptance(dirPath, options) {
103
96
  failures: [],
104
97
  };
105
98
  }
106
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(dirPath));
99
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
107
100
  if (!schema) {
108
101
  return {
109
102
  ok: false,
110
- summary: `Stage acceptance failed for ${options.stageId}: missing workflow schema.`,
111
- failures: [`Missing workflow/${WORKFLOW_SCHEMA_FILE}.`],
103
+ summary: `Stage acceptance failed for ${options.stageId}: missing Method schema.`,
104
+ failures: [`Missing method/${METHOD_SCHEMA_FILE}.`],
112
105
  };
113
106
  }
114
107
  const failures = [];
@@ -159,7 +152,7 @@ export function validateResolvedStageAcceptance(dirPath, options) {
159
152
  failures.push(`Acceptance references unknown zone "${zoneId}".`);
160
153
  continue;
161
154
  }
162
- const actual = countZoneArtifacts(dirPath, zone.path, zone.kind);
155
+ const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
163
156
  if (actual < minimum) {
164
157
  failures.push(`Expected zone "${zoneId}" to contain at least ${minimum} artifact(s), got ${actual}.`);
165
158
  }
@@ -175,7 +168,7 @@ export function validateResolvedStageAcceptance(dirPath, options) {
175
168
  failures.push(`Acceptance references missing count "${countKey}" for zone "${zoneId}".`);
176
169
  continue;
177
170
  }
178
- const actual = countZoneArtifacts(dirPath, zone.path, zone.kind);
171
+ const actual = countCompiledZoneArtifacts(dirPath, zone.path, zone.kind);
179
172
  if (actual < expected) {
180
173
  failures.push(`Expected zone "${zoneId}" to contain at least count "${countKey}" (${expected}) artifact(s), got ${actual}.`);
181
174
  }
@@ -1,7 +1,7 @@
1
- import { WORKFLOW_SCHEMA_FILE } from "./compiled-schema.js";
1
+ import { METHOD_SCHEMA_FILE } from "./compiled-schema.js";
2
2
  export function buildRuntimeStageContract(options) {
3
3
  const localSkillDocs = options.localSkillDocs ?? [];
4
- const workflowNotes = options.workflowNotes ?? [];
4
+ const methodNotes = options.methodNotes ?? [];
5
5
  return {
6
6
  instructions: options.instructions,
7
7
  counts: {
@@ -12,7 +12,7 @@ export function buildRuntimeStageContract(options) {
12
12
  artifacts: {
13
13
  reads: [
14
14
  "interf.json",
15
- `workflow/${WORKFLOW_SCHEMA_FILE}`,
15
+ `method/${METHOD_SCHEMA_FILE}`,
16
16
  ...(options.extraReadArtifacts ?? []),
17
17
  ...options.stageReadArtifacts,
18
18
  ...localSkillDocs,
@@ -26,19 +26,19 @@ export function buildRuntimeStageContract(options) {
26
26
  execution_mode: "deterministic",
27
27
  status_prefixes: ["STATUS:", "DONE:", "BLOCKED:", "ERROR:"],
28
28
  notes: [
29
- `This is the "${options.stageLabel}" stage for the compiled context "${options.compiledName}".`,
30
- "The workflow package is the authoritative method layer for this run.",
31
- `Use \`workflow/${WORKFLOW_SCHEMA_FILE}\` as the deterministic context-interface reference for this compiled context.`,
32
- "Honor the declared read and write artifacts instead of inventing a parallel workflow.",
29
+ `This is the "${options.stageLabel}" stage for the portable context "${options.compiledName}".`,
30
+ "The Method package is the authoritative method layer for this run.",
31
+ `Use \`method/${METHOD_SCHEMA_FILE}\` as the deterministic context-interface reference for this portable context.`,
32
+ "Honor the declared read and write artifacts instead of inventing a parallel process.",
33
33
  "Only create or update files that fall under the declared write targets for this stage.",
34
34
  "Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
35
35
  "Keep scratch extraction commands single-purpose and non-destructive. Avoid wildcard cleanup and multi-command chains.",
36
- ...workflowNotes,
36
+ ...methodNotes,
37
37
  ...(localSkillDocs.length > 0
38
38
  ? [
39
39
  "Read any local instruction docs listed in the contract before you write artifacts or declare the stage complete.",
40
40
  options.instructions.effective_mode === "override"
41
- ? "Local stage docs replace the default workflow guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
41
+ ? "Local stage docs replace the default method guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
42
42
  : "Local stage docs can refine the stage behavior, but they do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation.",
43
43
  ]
44
44
  : []),
@@ -3,27 +3,27 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
3
3
  const modeNotes = instructions.effective_mode === "override"
4
4
  ? [
5
5
  "Local stage instruction docs are authoritative for this run.",
6
- "Do not fall back to bundled workflow heuristics unless the stage contract explicitly leaves room for them.",
6
+ "Use bundled Method heuristics only when the stage contract explicitly permits them.",
7
7
  "Interf still enforces the same required reads, writes, verifier outputs, and runtime reconciliation at stage close.",
8
8
  ]
9
9
  : instructions.effective_mode === "extend"
10
10
  ? [
11
- "Use the current compiled workflow docs as the default workflow for this run.",
11
+ "Use the current compiled Method docs as the default Method for this run.",
12
12
  "Then apply any additional local stage instruction docs referenced by the contract as stage-specific extensions.",
13
13
  ]
14
14
  : [
15
- "Use the current compiled workflow docs as the default workflow for this run.",
15
+ "Use the current compiled Method docs as the default Method for this run.",
16
16
  ];
17
17
  return [
18
- `Interf workflow stage docs: workflow/compile/stages/${stageSkillDir}/`,
18
+ `Interf Method stage docs: method/compile/stages/${stageSkillDir}/`,
19
19
  "",
20
20
  "This is an automated Interf stage run, not an open-ended chat session.",
21
21
  "The user has already invoked this stage through the Interf CLI. Execute it now.",
22
22
  "Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
23
23
  `Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
24
- "If `runtime/paths.json` exists in this shell, read it next. It maps workflow zone ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
24
+ "If `runtime/paths.json` exists in this shell, read it next. It maps Method zone ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
25
25
  "For file-zone mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
26
- "Honor the contract's counts, artifact paths, and policies instead of inventing another workflow.",
26
+ "Honor the contract's counts, artifact paths, and policies instead of inventing another Method.",
27
27
  "Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
28
28
  "Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
29
29
  "Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",
@@ -31,10 +31,10 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
31
31
  "If `AGENTS.md` is listed in the contract, use it only for portable-context routing that is directly relevant to this stage.",
32
32
  "`.interf/runtime/run.json`, `.interf/runtime/state.json`, `.interf/runtime/health.json`, and `.interf/runtime/view-spec.json` are runtime artifacts written by Interf. You may read them, but do not create, edit, or replace them unless the contract explicitly marks a different proof artifact as stage-owned.",
33
33
  "If a contract-listed output file does not exist yet, create it in one whole-file write. Do not attempt patch-style edits against a missing runtime path.",
34
- "Stay inside the current compiled context. Do not try to open repo docs, repo source files, or other paths outside the compiled context unless the stage contract explicitly requires them.",
34
+ "Stay inside the current portable context. Do not try to open repo docs, repo source files, or other paths outside the portable context unless the stage contract explicitly requires them.",
35
35
  instructions.effective_mode === "override"
36
- ? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary workflow layer for this run."
37
- : "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled workflow docs and the contract as the default behavior.",
36
+ ? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Method layer for this run."
37
+ : "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled Method docs and the contract as the default behavior.",
38
38
  ...modeNotes,
39
39
  "Do not narrate intentions, plans, or reasoning to the user.",
40
40
  "Only emit user-visible updates that begin with STATUS:, DONE:, BLOCKED:, or ERROR:.",
@@ -1,2 +1,2 @@
1
- import { type WorkflowStageDefinition } from "../workflow-package/workflow-definitions.js";
2
- export declare function reconcileCompiledStageRun(dirPath: string, stage: Pick<WorkflowStageDefinition, "id" | "contractType" | "reads" | "writes">): boolean;
1
+ import { type MethodStageDefinition } from "../method-package/method-definitions.js";
2
+ export declare function reconcileCompiledStageRun(dirPath: string, stage: Pick<MethodStageDefinition, "id" | "contractType" | "reads" | "writes">): boolean;
@@ -6,7 +6,7 @@ import { parseJsonFrontmatter } from "../shared/parse.js";
6
6
  import { loadRuntimeRun } from "./runtime.js";
7
7
  import { initCompiledState, loadState, refreshCompiledArtifacts, saveState, } from "./state.js";
8
8
  import { compiledInventoryFromEntries } from "./runtime-inventory.js";
9
- import { compiledRuntimeRoot } from "./compiled-paths.js";
9
+ import { compiledRuntimeRoot, methodPackagePathForCompiled } from "./compiled-paths.js";
10
10
  import { extractSynthAbstract, isOutputMarkdownFile } from "./validate.js";
11
11
  function readActiveRunStartedAtMs(dirPath) {
12
12
  const run = loadRuntimeRun(dirPath);
@@ -93,7 +93,7 @@ function buildInventoryMetadata(options) {
93
93
  return metadata;
94
94
  }
95
95
  function buildStageInventoryEntries(dirPath, stage) {
96
- const schema = readCompiledSchemaFile(join(dirPath, ".interf", "workflow"));
96
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
97
97
  if (!schema)
98
98
  return [];
99
99
  const readableInputZones = stage.reads
@@ -155,7 +155,7 @@ export function reconcileCompiledStageRun(dirPath, stage) {
155
155
  const startedAtMs = readActiveRunStartedAtMs(dirPath);
156
156
  if (startedAtMs === null)
157
157
  return false;
158
- const schema = readCompiledSchemaFile(join(dirPath, ".interf", "workflow"));
158
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(dirPath));
159
159
  if (!schema)
160
160
  return false;
161
161
  const writeZones = stage.writes