@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
@@ -3,12 +3,12 @@ import { tmpdir } from "node:os";
3
3
  import { basename, dirname, join, relative } from "node:path";
4
4
  import { CHART_APPROXIMATION_NOTES } from "./chart-guidance.js";
5
5
  import { projectRawSnapshot } from "../../compiler/raw-snapshot.js";
6
- import { WORKFLOW_PACKAGE_DIR } from "../../project-model/interf-detect.js";
7
- import { CONTEXT_INTERFACE_FILE as WORKFLOW_SCHEMA_FILE, contextInterfaceZoneAbsolutePath as compiledZoneAbsolutePath, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveWorkflowSchemaPath, } from "../../workflow-package/context-interface.js";
8
- import { stageExecutionShellsRoot, workflowImprovementLoopRoot, workflowPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, } from "../../compiler/compiled-paths.js";
6
+ import { METHOD_PACKAGE_DIR } from "../../project-model/interf-detect.js";
7
+ import { CONTEXT_INTERFACE_FILE as METHOD_SCHEMA_FILE, contextInterfaceZoneAbsolutePath as compiledZoneAbsolutePath, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveMethodSchemaPath, } from "../../method-package/context-interface.js";
8
+ import { stageExecutionShellsRoot, methodImprovementLoopRoot, methodPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, } from "../../compiler/compiled-paths.js";
9
9
  import { ensureCompiledZoneTargets } from "../../compiler/compiled-schema.js";
10
10
  import { listFilesRecursive } from "../../shared/filesystem.js";
11
- import { resolveWorkflowImprovementReviewSourcePaths } from "../../workflow-package/workflow-review-paths.js";
11
+ import { resolveMethodImprovementReviewSourcePaths } from "../../method-package/method-review-paths.js";
12
12
  const LOCAL_SKILL_ROOTS = [
13
13
  ".claude/skills",
14
14
  ".codex/skills",
@@ -24,19 +24,19 @@ export function writeNativeAgentSurface(rootPath, agentsContent, skillName, skil
24
24
  return changed;
25
25
  }
26
26
  function compiledQuerySkillSourcePath(compiledPath) {
27
- return join(workflowPackagePathForCompiled(compiledPath), "use", "query", "SKILL.md");
27
+ return join(methodPackagePathForCompiled(compiledPath), "use", "query", "SKILL.md");
28
28
  }
29
29
  function compiledZoneSummaryLines(compiledPath) {
30
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
30
+ const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
31
31
  if (!schema)
32
- return ["- No workflow schema is available yet."];
32
+ return ["- No Method schema is available yet."];
33
33
  return schema.zones
34
34
  .filter((zone) => zone.kind !== "runtime")
35
35
  .map((zone) => `- \`${zone.id}\` -> \`${zone.path}\` (${zone.role} ${zone.kind})`);
36
36
  }
37
- export function renderCompiledAgents(compiledPath, name, workflowId, about, options = {}) {
38
- const workflowOriginSelected = options.workflowOriginSelected ?? workflowId;
39
- const workflowLocalDraft = options.workflowLocalDraft === true;
37
+ export function renderCompiledAgents(compiledPath, name, methodId, about, options = {}) {
38
+ const methodOriginSelected = options.methodOriginSelected ?? methodId;
39
+ const methodLocalDraft = options.methodLocalDraft === true;
40
40
  const zoneLines = compiledZoneSummaryLines(compiledPath);
41
41
  return [
42
42
  `# ${name}`,
@@ -53,36 +53,36 @@ export function renderCompiledAgents(compiledPath, name, workflowId, about, opti
53
53
  "## How to use this portable context",
54
54
  "",
55
55
  "1. Use the local native `interf-query` skill that Interf generated for this portable context.",
56
- "2. Let the workflow docs and declared output zones guide retrieval instead of assuming a fixed note layout.",
56
+ "2. Let the Method docs and declared output zones guide retrieval instead of assuming a fixed note layout.",
57
57
  "3. Use `raw/` when you need direct quotes, exact chart values, table lookups, or verification.",
58
58
  "",
59
59
  "## How this portable context works",
60
60
  "",
61
- "- The workflow package defines the context interface this portable context implements on disk.",
62
- "- `.interf/interf.json` points to the local `raw/` snapshot via `source.path` and back to the project root via `source.control_path`.",
63
- `- Workflow seed: \`${workflowOriginSelected}\`.`,
64
- ...(workflowLocalDraft
65
- ? ["- This portable context now carries a local workflow draft improved from that seed. Recompiling this portable context reuses the local `.interf/workflow/` package."]
61
+ "- The Method package defines the context interface this portable context implements on disk.",
62
+ "- `.interf/interf.json` points to the local `raw/` snapshot via `source.path` and back to the Interf Workspace via `source.control_path`.",
63
+ `- Method seed: \`${methodOriginSelected}\`.`,
64
+ ...(methodLocalDraft
65
+ ? ["- This portable context now carries a local Method draft improved from that seed. Recompiling this portable context reuses the local `.interf/method/` package."]
66
66
  : []),
67
- `- Active local workflow id: \`${workflowId}\`.`,
68
- "- `.interf/workflow/` is the local editable method package for this portable context.",
69
- `- \`.interf/workflow/${WORKFLOW_SCHEMA_FILE}\` is the deterministic context interface for this portable context.`,
70
- "- `.interf/workflow/improve/` is the editable source for workflow-improvement loops.",
71
- "- `.interf/workflow/use/query/` is the editable source for the generated native query shell.",
72
- "- `.interf/workflow/compile/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
67
+ `- Active local Method id: \`${methodId}\`.`,
68
+ "- `.interf/method/` is the local editable Method package for this portable context.",
69
+ `- \`.interf/method/${METHOD_SCHEMA_FILE}\` is the deterministic context interface for this portable context.`,
70
+ "- `.interf/method/improve/` is the editable source for Method-improvement loops.",
71
+ "- `.interf/method/use/query/` is the editable source for the generated native query shell.",
72
+ "- `.interf/method/compile/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
73
73
  "- Native local query skills are generated under local agent skill directories such as `.claude/skills/` and `.codex/skills/`.",
74
74
  "- `raw/` contains the local raw snapshot used for evidence and verification.",
75
- `- Workflow zones are declared in \`.interf/workflow/${WORKFLOW_SCHEMA_FILE}\`.`,
75
+ `- Method zones are declared in \`.interf/method/${METHOD_SCHEMA_FILE}\`.`,
76
76
  ...zoneLines,
77
77
  "- `.interf/runtime/` holds runtime artifacts written by Interf.",
78
- "- `.interf/tests/` mirrors the latest saved comparison and keeps detailed target runs plus preserved sandboxes.",
78
+ "- `.interf/tests/` mirrors the latest saved readiness-check run and keeps detailed target runs plus preserved sandboxes.",
79
79
  "- `.interf/tests/targets/` holds detailed raw and compiled target runs plus preserved test sandboxes.",
80
80
  "",
81
81
  "## Manual query rules",
82
82
  "",
83
- "- Prefer the workflow-declared context outputs before `raw/`.",
84
- "- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/workflow/use/query/SKILL.md`.",
85
- "- Treat `.interf/` as method/runtime metadata, not answer evidence, unless explicitly asked to inspect workflow or test history.",
83
+ "- Prefer the Method-declared context outputs before `raw/`.",
84
+ "- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/method/use/query/SKILL.md`.",
85
+ "- Treat `.interf/` as method/runtime metadata, not answer evidence, unless explicitly asked to inspect Method or test history.",
86
86
  "- Use `raw/` for quotes, verification, ambiguity, or evidence the portable context does not expose well.",
87
87
  "- If exact chart, table, or image-derived evidence matters, inspect the raw source and say whether the answer was text-derived, table-derived, or chart-derived.",
88
88
  "",
@@ -91,8 +91,8 @@ export function renderCompiledAgents(compiledPath, name, workflowId, about, opti
91
91
  "```",
92
92
  "interf compile build this portable context",
93
93
  "interf test run checks against this portable context",
94
- "interf verify stage <id> verify one workflow stage",
95
- "interf verify compiled verify the full portable context output",
94
+ "interf verify stage <id> verify one Method stage",
95
+ "interf verify portable-context verify the full portable context output",
96
96
  "interf status show deterministic health",
97
97
  "```",
98
98
  "",
@@ -111,16 +111,16 @@ export function renderCompiledQuerySkill() {
111
111
  "This file is the editable authoring source for the generated native local `interf-query` skill.",
112
112
  "",
113
113
  "Default loop:",
114
- "1. Read `workflow/README.md` and this file first.",
115
- `2. Use the workflow zones declared in \`workflow/${WORKFLOW_SCHEMA_FILE}\` before falling back to \`raw/\`.`,
114
+ "1. Read `.interf/method/README.md` and this file first.",
115
+ `2. Use the Method zones declared in \`.interf/method/${METHOD_SCHEMA_FILE}\` before consulting \`raw/\`.`,
116
116
  "3. Use `raw/` for direct quotes, verification, exact lookups, and cases where the portable context is missing the needed evidence or is ambiguous.",
117
117
  "",
118
118
  "Answering rule:",
119
119
  "- do not modify files under `raw/`",
120
- "- treat the workflow as the method layer and the portable-context zones as the working retrieval surface",
120
+ "- treat the Method as the portable-context contract and use its zones as the working retrieval surface",
121
121
  "- say explicitly when an answer depends on approximation, bounded inference, or a raw-source re-check",
122
122
  "- use `raw/` to confirm source page, metric family, provenance, or exact wording when the portable context is missing the needed evidence or is ambiguous",
123
- "- do not invent navigation or note structure beyond what this workflow declares",
123
+ "- do not invent navigation or note structure beyond what this Method declares",
124
124
  "- when the portable context is insufficient, verify in `raw/` and then answer",
125
125
  "",
126
126
  "You can edit this file to bias manual question-answering behavior for this portable context.",
@@ -133,7 +133,7 @@ function renderRawTestAgents() {
133
133
  "# Raw Test Shell",
134
134
  "",
135
135
  "This is an isolated raw-files test shell generated by Interf.",
136
- "There is no compiled context in this shell.",
136
+ "There is no portable context in this shell.",
137
137
  "",
138
138
  "## How to use this shell",
139
139
  "",
@@ -144,7 +144,7 @@ function renderRawTestAgents() {
144
144
  "## Rules",
145
145
  "",
146
146
  "- Answer only from the files under `raw/`.",
147
- "- There is no compiled context here, so do not assume any compiled-context output zones exist.",
147
+ "- There is no portable context here, so do not assume any portable-context output zones exist.",
148
148
  "- Do not treat hidden runtime files or test artifacts as evidence.",
149
149
  ...chartNotes,
150
150
  "- Write the requested answer and trace files, then stop.",
@@ -158,7 +158,7 @@ function renderRawTestQuerySkill() {
158
158
  "name: interf-query",
159
159
  "description: >",
160
160
  " Native local query skill for an Interf raw test shell. Use it only",
161
- " to answer baseline questions directly from `raw/`.",
161
+ " to answer source-files readiness checks directly from `raw/`.",
162
162
  "---",
163
163
  "",
164
164
  "# Interf Raw Test Query",
@@ -169,19 +169,19 @@ function renderRawTestQuerySkill() {
169
169
  "1. Read `raw/` directly.",
170
170
  "2. Verify exact claims against the raw files before answering strongly.",
171
171
  ...chartNotes,
172
- "8. Do not rely on compiled context artifacts because they do not exist in this shell.",
172
+ "8. Do not rely on portable-context artifacts because they do not exist in this shell.",
173
173
  "",
174
174
  ].join("\n");
175
175
  }
176
176
  function readCompiledQuerySkillSource(compiledPath) {
177
177
  const filePath = compiledQuerySkillSourcePath(compiledPath);
178
178
  if (!existsSync(filePath)) {
179
- throw new Error(`Missing compiled query skill source at ${filePath}. Interf compile runs the local workflow package directly, so reseed or repair this compiled context instead of auto-healing query docs.`);
179
+ throw new Error(`Missing compiled query skill source at ${filePath}. Interf compile runs the local Method package directly, so reseed or repair this portable context instead of auto-healing query docs.`);
180
180
  }
181
181
  return readFileSync(filePath, "utf8").trim();
182
182
  }
183
- function stageShellWorkflowRoot(shellRoot) {
184
- return join(shellRoot, WORKFLOW_PACKAGE_DIR);
183
+ function stageShellMethodRoot(shellRoot) {
184
+ return join(shellRoot, METHOD_PACKAGE_DIR);
185
185
  }
186
186
  function shellInputZonePath(shellRoot, zoneId) {
187
187
  return join(shellRoot, "inputs", zoneId);
@@ -230,10 +230,10 @@ function linkRelativePath(targetPath, linkPathname) {
230
230
  symlinkSync(relative(dirname(linkPathname), targetPath), linkPathname);
231
231
  }
232
232
  function loadCompiledSchema(compiledPath) {
233
- const workflowRoot = workflowPackagePathForCompiled(compiledPath);
234
- const schema = readCompiledSchemaFile(workflowRoot);
233
+ const methodRoot = methodPackagePathForCompiled(compiledPath);
234
+ const schema = readCompiledSchemaFile(methodRoot);
235
235
  if (!schema) {
236
- throw new Error(`Missing workflow schema at ${join(workflowRoot, WORKFLOW_SCHEMA_FILE)}`);
236
+ throw new Error(`Missing Method schema at ${join(methodRoot, METHOD_SCHEMA_FILE)}`);
237
237
  }
238
238
  return schema;
239
239
  }
@@ -243,7 +243,7 @@ function zoneMap(schema) {
243
243
  function zoneOrThrow(zones, zoneId) {
244
244
  const zone = zones.get(zoneId);
245
245
  if (!zone) {
246
- throw new Error(`Missing workflow schema zone "${zoneId}" for stage shell projection.`);
246
+ throw new Error(`Missing Method schema zone "${zoneId}" for stage shell projection.`);
247
247
  }
248
248
  return zone;
249
249
  }
@@ -298,21 +298,21 @@ function ensureShellLocalProjection(sourcePath, targetPath, zone) {
298
298
  }
299
299
  function ensureCompiledExecutionSurface(compiledPath) {
300
300
  mkdirSync(compiledRuntimeRoot(compiledPath), { recursive: true });
301
- mkdirSync(workflowPackagePathForCompiled(compiledPath), { recursive: true });
301
+ mkdirSync(methodPackagePathForCompiled(compiledPath), { recursive: true });
302
302
  const schema = loadCompiledSchema(compiledPath);
303
303
  ensureCompiledZoneTargets(compiledPath, schema);
304
304
  return schema;
305
305
  }
306
306
  function readStageMethodDoc(compiledPath, stage) {
307
- const path = join(workflowPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir, "SKILL.md");
307
+ const path = join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir, "SKILL.md");
308
308
  if (!existsSync(path))
309
309
  return null;
310
310
  return readFileSync(path, "utf8").trim();
311
311
  }
312
- function stageWorkflowDocsPath(compiledPath, stage) {
313
- return join(workflowPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir);
312
+ function stageMethodDocsPath(compiledPath, stage) {
313
+ return join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir);
314
314
  }
315
- function renderStageExecutionAgents(compiledName, workflowId, stage) {
315
+ function renderStageExecutionAgents(compiledName, methodId, stage) {
316
316
  return [
317
317
  `# ${compiledName} — ${stage.label} Execution Shell`,
318
318
  "",
@@ -331,16 +331,16 @@ function renderStageExecutionAgents(compiledName, workflowId, stage) {
331
331
  "- `inputs/<zone-id>/` = read mounts for the current stage.",
332
332
  "- `outputs/<zone-id>/` = write mounts for the current stage.",
333
333
  "- For file zones, `runtime/paths.json` points to the exact file path inside those mount roots.",
334
- "- declared compiled zone paths are also projected at the shell root so workflow-relative contract paths stay valid.",
334
+ "- declared compiled zone paths are also projected at the shell root so Method-relative contract paths stay valid.",
335
335
  "- `runtime/` = stage contract and machine-readable path map for this shell.",
336
- "- `workflow/` = workflow metadata, workflow schema, and docs for the current stage only.",
336
+ "- `method/` = Method metadata, `method.schema.json`, and docs for the current stage only.",
337
337
  "",
338
338
  "## Boundaries",
339
339
  "",
340
- `- Workflow: \`${workflowId}\`.`,
340
+ `- Method: \`${methodId}\`.`,
341
341
  `- Contract type: \`${stage.contractType}\`.`,
342
- "- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the compiled-context query shell.",
343
- "- The compiled context root itself is not linked into this shell.",
342
+ "- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the portable-context query shell.",
343
+ "- The portable context root itself is not linked into this shell.",
344
344
  "- Do not switch into query mode or act like a user-facing assistant.",
345
345
  "- Do not modify files under `inputs/` unless the same zone is also mounted under `outputs/`.",
346
346
  "",
@@ -381,7 +381,7 @@ function renderStageExecutionSkill(stage, stageMethodDoc) {
381
381
  `- contract type: \`${stage.contractType}\``,
382
382
  `- reads: ${stage.reads.join(", ")}`,
383
383
  `- writes: ${stage.writes.join(", ")}`,
384
- `- editable source: \`workflow/compile/stages/${stage.skillDir}/SKILL.md\``,
384
+ `- editable source: \`method/compile/stages/${stage.skillDir}/SKILL.md\``,
385
385
  "",
386
386
  ...(stageMethodDoc
387
387
  ? [
@@ -399,38 +399,38 @@ function renderCompiledQueryNativeSkill(querySkillContent) {
399
399
  "name: interf-query",
400
400
  "description: >",
401
401
  " Native local query skill for this portable context built by Interf.",
402
- " Use it for manual questions against the portable context and raw fallback.",
402
+ " Use it for manual questions against the portable context and source files under raw/.",
403
403
  "---",
404
404
  "",
405
405
  "# Interf Query",
406
406
  "",
407
407
  "This is the native local query skill for portable context built by Interf.",
408
408
  "Use it when reading this portable context manually.",
409
- "Editable source: `.interf/workflow/use/query/SKILL.md`.",
409
+ "Editable source: `.interf/method/use/query/SKILL.md`.",
410
410
  "",
411
411
  querySkillContent.trim(),
412
412
  "",
413
413
  ].join("\n");
414
414
  }
415
- function projectWorkflowMetadata(compiledPath, shellRoot, stage) {
416
- const shellWorkflowRoot = stageShellWorkflowRoot(shellRoot);
417
- mkdirSync(join(shellWorkflowRoot, "compile", "stages"), { recursive: true });
418
- const compiledWorkflowRoot = workflowPackagePathForCompiled(compiledPath);
419
- const workflowJsonPath = join(compiledWorkflowRoot, "workflow.json");
420
- if (existsSync(workflowJsonPath)) {
421
- linkPath(workflowJsonPath, join(shellWorkflowRoot, "workflow.json"));
415
+ function projectMethodMetadata(compiledPath, shellRoot, stage) {
416
+ const shellMethodRoot = stageShellMethodRoot(shellRoot);
417
+ mkdirSync(join(shellMethodRoot, "compile", "stages"), { recursive: true });
418
+ const compiledMethodRoot = methodPackagePathForCompiled(compiledPath);
419
+ const methodJsonPath = join(compiledMethodRoot, "method.json");
420
+ if (existsSync(methodJsonPath)) {
421
+ linkPath(methodJsonPath, join(shellMethodRoot, "method.json"));
422
422
  }
423
- const compiledSchemaPath = resolveWorkflowSchemaPath(compiledWorkflowRoot);
423
+ const compiledSchemaPath = resolveMethodSchemaPath(compiledMethodRoot);
424
424
  if (compiledSchemaPath) {
425
- linkPath(compiledSchemaPath, join(shellWorkflowRoot, WORKFLOW_SCHEMA_FILE));
425
+ linkPath(compiledSchemaPath, join(shellMethodRoot, METHOD_SCHEMA_FILE));
426
426
  }
427
- const readmePath = join(compiledWorkflowRoot, "README.md");
427
+ const readmePath = join(compiledMethodRoot, "README.md");
428
428
  if (existsSync(readmePath)) {
429
- linkPath(readmePath, join(shellWorkflowRoot, "README.md"));
429
+ linkPath(readmePath, join(shellMethodRoot, "README.md"));
430
430
  }
431
- const stageDocsPath = stageWorkflowDocsPath(compiledPath, stage);
431
+ const stageDocsPath = stageMethodDocsPath(compiledPath, stage);
432
432
  if (existsSync(stageDocsPath)) {
433
- linkPath(stageDocsPath, join(shellWorkflowRoot, "compile", "stages", stage.skillDir));
433
+ linkPath(stageDocsPath, join(shellMethodRoot, "compile", "stages", stage.skillDir));
434
434
  }
435
435
  }
436
436
  function projectCompiledSchemaZones(compiledPath, shellRoot, schema, zoneIds, materializedZoneIds) {
@@ -481,11 +481,11 @@ function projectStageZoneMountAliases(shellRoot, stage, schema) {
481
481
  }
482
482
  }
483
483
  }
484
- function writeExecutionShellPathsFile(shellRoot, workflowId, stage, mounts) {
484
+ function writeExecutionShellPathsFile(shellRoot, methodId, stage, mounts) {
485
485
  const paths = {
486
486
  kind: "interf-execution-shell",
487
487
  version: 1,
488
- workflow: workflowId,
488
+ method: methodId,
489
489
  stage: stage.id,
490
490
  reads: mounts.reads,
491
491
  writes: mounts.writes,
@@ -655,135 +655,103 @@ function freezePreservedShell(rootPath, shellType) {
655
655
  }
656
656
  export function renderClaudeBootstrap(content) {
657
657
  return [
658
- "<!-- Generated compatibility mirror of AGENTS.md. Interf may rewrite this file. -->",
658
+ "<!-- Generated mirror of AGENTS.md. Interf may rewrite this file. -->",
659
659
  "",
660
660
  content.trimEnd(),
661
661
  "",
662
662
  ].join("\n");
663
663
  }
664
- function renderWorkflowAuthoringAgents(options) {
664
+ function renderMethodAuthoringAgents(options) {
665
665
  return [
666
- `# ${options.label} — Workflow Authoring Shell`,
666
+ `# ${options.label} — Method Authoring Shell`,
667
667
  "",
668
- "This is an automated workflow-authoring shell generated by Interf.",
669
- "It exists to create or refine one standalone workflow from the source data, desired portable-context outputs, and proof requirements in this task.",
668
+ "This is an automated Method-authoring shell generated by Interf.",
669
+ "It exists to create one standalone Method package from the source data, desired portable-context outputs, and proof requirements in this task.",
670
670
  "",
671
671
  "## Start Here",
672
672
  "",
673
673
  "1. Read `runtime/authoring-context.json` now.",
674
- `2. Read \`workflow/README.md\`, \`workflow/workflow.json\`, and \`workflow/${WORKFLOW_SCHEMA_FILE}\` now.`,
675
- "3. Review `artifacts/source-dataset/raw/` and `artifacts/preview-compiled/` if present.",
676
- "4. Use the local native `interf-workflow-author` skill now.",
674
+ `2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
675
+ "3. Review `artifacts/source-folder/raw/`.",
676
+ "4. Use the local native `interf-method-author` skill now.",
677
677
  "",
678
678
  "## Boundaries",
679
679
  "",
680
- `- New workflow id: \`${options.workflowId}\`.`,
681
- `- Seed workflow: \`${options.baseWorkflowId}\`.`,
682
- "- Edit only files under `workflow/`.",
683
- "- Do not edit raw files or preview artifacts.",
684
- "- Keep the workflow valid for the current compiler API and workflow schema.",
685
- "- For acceptance rules, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
680
+ `- New Method package id: \`${options.methodId}\`.`,
681
+ "- Authoring mode: from scratch.",
682
+ ...(options.referenceMethodId
683
+ ? [`- Reference Method package id: \`${options.referenceMethodId}\` (context only, not a seed).`]
684
+ : []),
685
+ "- Edit only files under `method/`.",
686
+ "- Do not edit source artifacts.",
687
+ "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
688
+ "- Use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids. Never use underscores.",
689
+ "- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
690
+ "- For file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`.",
686
691
  "- Prefer direct file-reading and search tools over shell commands for routine file inspection.",
687
692
  "- Do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files.",
688
693
  "",
689
694
  "## Goal",
690
695
  "",
691
- "- produce one standalone workflow tuned to the source data, desired outputs, and checks in this task",
696
+ "- produce one standalone Method package tuned to the source data, desired outputs, and checks in this task",
697
+ "- replace the neutral scaffold topology with the stage graph this agent work needs",
692
698
  "- define output zones and stage proof so Interf can show whether the data is ready",
693
699
  "- preserve deterministic stage and context-interface contracts",
694
- "- stop once the workflow edits are complete",
700
+ "- stop once the Method edits are complete",
695
701
  "",
696
702
  ].join("\n");
697
703
  }
698
- function renderWorkflowAuthoringSkill() {
704
+ function renderMethodAuthoringSkill() {
699
705
  return [
700
706
  "---",
701
- "name: interf-workflow-author",
707
+ "name: interf-method-author",
702
708
  "description: >",
703
- " Native local workflow-authoring skill for an automated Interf workflow draft run.",
709
+ " Native local Method-authoring skill for an automated Interf Method draft run.",
704
710
  "---",
705
711
  "",
706
- "# Interf Workflow Authoring",
712
+ "# Interf Method Authoring",
707
713
  "",
708
714
  "Read `runtime/authoring-context.json` first.",
709
- "Then review the seeded package under `workflow/`, the raw snapshot under `artifacts/source-dataset/raw/`, and any preview context outputs under `artifacts/preview-compiled/`.",
715
+ "Then review the neutral Method package scaffold under `method/` and the raw snapshot under `artifacts/source-folder/raw/`.",
710
716
  "",
711
717
  "Rules:",
712
- "- edit only `workflow/`",
713
- `- keep \`workflow.json\`, \`${WORKFLOW_SCHEMA_FILE}\`, and any changed stage docs aligned`,
718
+ "- edit only `method/`",
719
+ `- keep \`method.json\`, \`${METHOD_SCHEMA_FILE}\`, and any changed stage docs aligned`,
714
720
  "- use `zone_counts_at_least` for numeric fixed minimums; use `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`",
715
- "- prefer small, defensible package edits over random churn",
716
- "- keep the package standalone; do not introduce runtime inheritance or fallback assumptions",
717
- "- do not introduce wikilinks unless the workflow also creates the target note by exact basename or explicit relative path",
721
+ "- for file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`",
722
+ "- design the stage graph from the source data and preparation-and-evidence brief",
723
+ "- use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids; never use underscores",
724
+ "- replace the placeholder `prepare` stage unless that exact stage is truly the final method",
725
+ "- keep the package standalone; do not introduce runtime inheritance or hidden source-package assumptions",
726
+ "- do not introduce wikilinks unless the Method also creates the target note by exact basename or explicit relative path",
718
727
  "- respect stage boundaries: do not make structure outputs link to notes or entrypoints first created by later stages",
719
728
  "- prefer conservative routing changes over speculative note sprawl",
720
729
  "- prefer direct file-reading and search tools over shell commands for routine file inspection",
721
730
  "- do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files",
722
- "- do not hardcode benchmark answers into workflow docs",
723
- "- do not edit raw files or preview artifacts",
731
+ "- do not hardcode readiness-check answers into Method docs",
732
+ "- do not edit source artifacts",
724
733
  "",
725
734
  ].join("\n");
726
735
  }
727
- function authoringCopyIfExists(sourcePath, targetPath) {
728
- if (!existsSync(sourcePath))
729
- return;
730
- mkdirSync(dirname(targetPath), { recursive: true });
731
- cpSync(sourcePath, targetPath, {
732
- recursive: true,
733
- force: true,
734
- errorOnExist: false,
735
- preserveTimestamps: true,
736
- });
737
- }
738
- function projectCompiledPreviewSnapshot(previewCompiledPath, shellRoot) {
739
- const previewRoot = join(shellRoot, "artifacts", "preview-compiled");
740
- mkdirSync(previewRoot, { recursive: true });
741
- authoringCopyIfExists(join(previewCompiledPath, "AGENTS.md"), join(previewRoot, "AGENTS.md"));
742
- authoringCopyIfExists(join(previewCompiledPath, "CLAUDE.md"), join(previewRoot, "CLAUDE.md"));
743
- const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(previewCompiledPath));
744
- for (const zone of schema?.zones ?? []) {
745
- if (zone.kind === "runtime" || zone.role === "input")
746
- continue;
747
- const absolutePath = compiledZoneAbsolutePath(previewCompiledPath, zone);
748
- if (!existsSync(absolutePath))
749
- continue;
750
- authoringCopyIfExists(absolutePath, join(previewRoot, zone.path));
751
- }
736
+ function improvementMethodDocsPath(compiledPath) {
737
+ return join(methodPackagePathForCompiled(compiledPath), "improve");
752
738
  }
753
- function projectCompiledPreviewRuntime(previewCompiledPath, shellRoot) {
754
- const targetRoot = join(shellRoot, "artifacts", "preview-runtime");
755
- mkdirSync(targetRoot, { recursive: true });
756
- const runtimeRoot = compiledRuntimeRoot(previewCompiledPath);
757
- for (const artifactName of [
758
- "run.json",
759
- "state.json",
760
- "health.json",
761
- "view-spec.json",
762
- "raw-snapshot.json",
763
- "execution-shells",
764
- "logs",
765
- ]) {
766
- authoringCopyIfExists(join(runtimeRoot, artifactName), join(targetRoot, artifactName));
767
- }
768
- }
769
- function improvementWorkflowDocsPath(compiledPath) {
770
- return join(workflowPackagePathForCompiled(compiledPath), "improve");
771
- }
772
- export function createWorkflowAuthoringShell(options) {
773
- const shellRoot = mkdtempSync(join(tmpdir(), `interf-workflow-author-${options.workflowId}-`));
739
+ export function createMethodAuthoringShell(options) {
740
+ const shellRoot = mkdtempSync(join(tmpdir(), `interf-method-author-${options.methodId}-`));
774
741
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
775
742
  mkdirSync(join(shellRoot, "artifacts"), { recursive: true });
776
743
  mkdirSync(join(shellRoot, "logs"), { recursive: true });
777
744
  const context = {
778
- kind: "interf-workflow-authoring",
745
+ kind: "interf-method-authoring",
779
746
  version: 1,
780
747
  generated_at: new Date().toISOString(),
781
- workflow_id: options.workflowId,
782
- workflow_label: options.label,
783
- seed_workflow_id: options.baseWorkflowId,
748
+ authoring_mode: "from-scratch",
749
+ method_id: options.methodId,
750
+ method_label: options.label,
751
+ ...(options.referenceMethodId ? { reference_method_id: options.referenceMethodId } : {}),
784
752
  task_prompt: options.taskPrompt,
785
- dataset: {
786
- source_path: options.datasetPath,
753
+ preparation: {
754
+ source_folder_path: options.sourceFolderPath,
787
755
  checks: {
788
756
  count: options.checks.length,
789
757
  questions: options.checks.map((check, index) => ({
@@ -792,104 +760,93 @@ export function createWorkflowAuthoringShell(options) {
792
760
  })),
793
761
  },
794
762
  },
795
- preview: options.preview
796
- ? {
797
- prepared: true,
798
- compile_ok: options.preview.compileResult.ok,
799
- failed_stage: options.preview.compileResult.failedStage,
800
- }
801
- : {
802
- prepared: false,
803
- compile_ok: null,
804
- failed_stage: null,
805
- },
806
763
  };
807
764
  writeFileSync(join(shellRoot, "runtime", "authoring-context.json"), `${JSON.stringify(context, null, 2)}\n`);
808
765
  projectRawSnapshot({
809
- sourcePath: options.datasetPath,
810
- destinationPath: join(shellRoot, "artifacts", "source-dataset", "raw"),
766
+ sourcePath: options.sourceFolderPath,
767
+ destinationPath: join(shellRoot, "artifacts", "source-folder", "raw"),
811
768
  compiledPath: shellRoot,
812
769
  mode: "copy",
813
770
  prune: true,
814
771
  preserveTimestamps: true,
815
772
  });
816
- if (options.preview) {
817
- projectCompiledPreviewSnapshot(options.preview.compiledPath, shellRoot);
818
- projectCompiledPreviewRuntime(options.preview.compiledPath, shellRoot);
819
- }
820
- linkPath(options.workflowPath, join(shellRoot, "workflow"));
821
- writeNativeAgentSurface(shellRoot, renderWorkflowAuthoringAgents({
822
- workflowId: options.workflowId,
773
+ copyResolvedTree({
774
+ sourcePath: options.methodPath,
775
+ targetPath: join(shellRoot, "method"),
776
+ shellType: "method-authoring",
777
+ });
778
+ writeNativeAgentSurface(shellRoot, renderMethodAuthoringAgents({
779
+ methodId: options.methodId,
823
780
  label: options.label,
824
- baseWorkflowId: options.baseWorkflowId,
825
- }), "interf-workflow-author", renderWorkflowAuthoringSkill());
781
+ referenceMethodId: options.referenceMethodId ?? null,
782
+ }), "interf-method-author", renderMethodAuthoringSkill());
826
783
  return {
827
784
  rootPath: shellRoot,
828
- workflowBeforePath: join(shellRoot, "artifacts", "workflow-before"),
829
- workflowAfterPath: join(shellRoot, "artifacts", "workflow-after"),
830
- promptLogPath: join(shellRoot, "logs", "workflow-author.prompt.txt"),
831
- eventLogPath: join(shellRoot, "logs", "workflow-author.events.ndjson"),
832
- statusLogPath: join(shellRoot, "logs", "workflow-author.status.log"),
785
+ methodBeforePath: join(shellRoot, "artifacts", "method-before"),
786
+ methodAfterPath: join(shellRoot, "artifacts", "method-after"),
787
+ promptLogPath: join(shellRoot, "logs", "method-author.prompt.txt"),
788
+ eventLogPath: join(shellRoot, "logs", "method-author.events.ndjson"),
789
+ statusLogPath: join(shellRoot, "logs", "method-author.status.log"),
833
790
  };
834
791
  }
835
- function renderWorkflowImprovementAgents(compiledName, workflowId, loopIndex) {
792
+ function renderMethodImprovementAgents(compiledName, methodId, loopIndex) {
836
793
  return [
837
- `# ${compiledName} — Workflow Improvement Shell`,
794
+ `# ${compiledName} — Method Improvement Shell`,
838
795
  "",
839
- "This is an automated workflow-improvement shell generated by Interf.",
840
- "It exists to review failed compile/test runs and edit the workflow package for the next variation.",
796
+ "This is an automated Method-improvement shell generated by Interf.",
797
+ "It exists to review failed compile/test runs and edit the Method package for the next variation.",
841
798
  "",
842
799
  "## Start Here",
843
800
  "",
844
801
  "1. Read `runtime/loop-context.json` now.",
845
- `2. Read \`workflow/README.md\`, \`workflow/workflow.json\`, and \`workflow/${WORKFLOW_SCHEMA_FILE}\` now.`,
846
- "3. Read `workflow/improve/SKILL.md` now.",
847
- "4. Use the local native `interf-workflow-improver` skill now.",
802
+ `2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
803
+ "3. Read `method/improve/SKILL.md` now.",
804
+ "4. Use the local native `interf-method-improver` skill now.",
848
805
  "",
849
806
  "## Boundaries",
850
807
  "",
851
- `- Workflow: \`${workflowId}\`.`,
808
+ `- Method: \`${methodId}\`.`,
852
809
  `- Improvement loop: ${loopIndex}.`,
853
- "- Edit only files under `workflow/`.",
810
+ "- Edit only files under `method/`.",
854
811
  "- Do not edit checks, test specs, raw files, or generated context outputs.",
855
812
  "- Review context outputs under `artifacts/compiled-view/` and test/runtime evidence under `artifacts/`.",
856
- "- Keep the workflow valid for the current compiler API and workflow schema.",
857
- "- For acceptance rules, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
813
+ "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
814
+ "- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
858
815
  "",
859
816
  "## Goal",
860
817
  "",
861
- "- create a better workflow variation for this kind of work",
862
- "- preserve deterministic compiled-context structure",
863
- "- stop after the workflow edits are complete",
818
+ "- create a better Method variation for this kind of agent work",
819
+ "- preserve deterministic portable-context structure",
820
+ "- stop after the Method edits are complete",
864
821
  "",
865
822
  ].join("\n");
866
823
  }
867
- function readWorkflowImprovementDoc(compiledPath) {
868
- const path = join(improvementWorkflowDocsPath(compiledPath), "SKILL.md");
824
+ function readMethodImprovementDoc(compiledPath) {
825
+ const path = join(improvementMethodDocsPath(compiledPath), "SKILL.md");
869
826
  if (!existsSync(path))
870
827
  return null;
871
828
  return readFileSync(path, "utf8").trim();
872
829
  }
873
- function renderWorkflowImprovementSkill(workflowId, loopIndex, improvementDoc) {
830
+ function renderMethodImprovementSkill(methodId, loopIndex, improvementDoc) {
874
831
  return [
875
832
  "---",
876
- "name: interf-workflow-improver",
833
+ "name: interf-method-improver",
877
834
  "description: >",
878
- " Native local workflow-improvement skill for this Interf run.",
879
- " Use it only inside an automated workflow-improvement shell.",
835
+ " Native local Method-improvement skill for this Interf run.",
836
+ " Use it only inside an automated Method-improvement shell.",
880
837
  "---",
881
838
  "",
882
- `# Interf Workflow Improvement — ${workflowId}`,
839
+ `# Interf Method Improvement — ${methodId}`,
883
840
  "",
884
- "This local native skill exists for automated workflow-improvement loops.",
841
+ "This local native skill exists for automated Method-improvement loops.",
885
842
  "Read `runtime/loop-context.json` first.",
886
- "Then review the linked workflow package, `artifacts/compiled-view/`, preserved stage shells, runtime logs, and saved test outputs before editing `workflow/`.",
843
+ "Then review the linked Method package, `artifacts/compiled-view/`, preserved stage shells, runtime logs, and saved test outputs before editing `method/`.",
887
844
  "",
888
845
  "## Current Loop",
889
846
  "",
890
- `- workflow: \`${workflowId}\``,
847
+ `- method: \`${methodId}\``,
891
848
  `- loop index: ${loopIndex}`,
892
- "- editable source: `workflow/improve/SKILL.md`",
849
+ "- editable source: `method/improve/SKILL.md`",
893
850
  "",
894
851
  ...(improvementDoc
895
852
  ? [
@@ -913,15 +870,10 @@ function projectCompiledReviewArtifactsSnapshot(compiledPath, shellRoot, schema)
913
870
  copyResolvedTree({
914
871
  sourcePath,
915
872
  targetPath: join(compiledViewRoot, zone.path),
916
- shellType: "workflow-improvement",
873
+ shellType: "method-improvement",
917
874
  });
918
875
  }
919
876
  }
920
- function linkIfExists(targetPath, linkPathname) {
921
- if (!existsSync(targetPath))
922
- return;
923
- linkPath(targetPath, linkPathname);
924
- }
925
877
  function copyIfExists(sourcePath, targetPath, shellType) {
926
878
  if (!existsSync(sourcePath))
927
879
  return;
@@ -945,21 +897,21 @@ function projectCompiledRuntimeArtifacts(compiledPath, shellRoot) {
945
897
  "logs",
946
898
  ];
947
899
  for (const artifactName of artifactNames) {
948
- copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "workflow-improvement");
900
+ copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "method-improvement");
949
901
  }
950
902
  }
951
903
  export function pruneStageExecutionShells(compiledPath) {
952
904
  rmSync(stageExecutionShellsRoot(compiledPath), { recursive: true, force: true });
953
905
  }
954
- export function projectCompiledQueryShell(compiledPath, compiledName, workflowId, about, options) {
955
- const agentsContent = renderCompiledAgents(compiledPath, compiledName, workflowId, about, options);
906
+ export function projectCompiledQueryShell(compiledPath, compiledName, methodId, about, options) {
907
+ const agentsContent = renderCompiledAgents(compiledPath, compiledName, methodId, about, options);
956
908
  const querySkillContent = readCompiledQuerySkillSource(compiledPath);
957
909
  return writeNativeAgentSurface(compiledPath, agentsContent, "interf-query", renderCompiledQueryNativeSkill(querySkillContent));
958
910
  }
959
911
  export function projectRawTestQueryShell(rootPath) {
960
912
  return writeNativeAgentSurface(rootPath, renderRawTestAgents(), "interf-query", renderRawTestQuerySkill());
961
913
  }
962
- export function createStageExecutionShell(compiledPath, compiledName, workflowId, stage, writeArtifacts = []) {
914
+ export function createStageExecutionShell(compiledPath, compiledName, methodId, stage, writeArtifacts = []) {
963
915
  const schema = ensureCompiledExecutionSurface(compiledPath);
964
916
  const materializedZones = stageMaterializedZoneSet(schema, stage, writeArtifacts);
965
917
  const shellsRoot = stageExecutionShellsRoot(compiledPath);
@@ -971,10 +923,10 @@ export function createStageExecutionShell(compiledPath, compiledName, workflowId
971
923
  linkPath(compiledInterfConfigPath(compiledPath), join(shellRoot, "interf.json"));
972
924
  linkPath(join(compiledRuntimeRoot(compiledPath), "stage-contract.json"), shellRuntimePath(shellRoot, "stage-contract.json"));
973
925
  projectCompiledSchemaZones(compiledPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedZones);
974
- projectWorkflowMetadata(compiledPath, shellRoot, stage);
926
+ projectMethodMetadata(compiledPath, shellRoot, stage);
975
927
  projectStageZoneMountAliases(shellRoot, stage, schema);
976
- writeExecutionShellPathsFile(shellRoot, workflowId, stage, buildStageZoneMounts(compiledPath, shellRoot, stage, schema));
977
- const agentsContent = renderStageExecutionAgents(compiledName, workflowId, stage);
928
+ writeExecutionShellPathsFile(shellRoot, methodId, stage, buildStageZoneMounts(compiledPath, shellRoot, stage, schema));
929
+ const agentsContent = renderStageExecutionAgents(compiledName, methodId, stage);
978
930
  writeNativeAgentSurface(shellRoot, agentsContent, "interf-stage", renderStageExecutionSkill(stage, readStageMethodDoc(compiledPath, stage)));
979
931
  return {
980
932
  rootPath: shellRoot,
@@ -983,9 +935,9 @@ export function createStageExecutionShell(compiledPath, compiledName, workflowId
983
935
  export function freezeStageExecutionShell(rootPath) {
984
936
  return freezePreservedShell(rootPath, "stage-execution");
985
937
  }
986
- export function createWorkflowImprovementShell(options) {
938
+ export function createMethodImprovementShell(options) {
987
939
  const schema = ensureCompiledExecutionSurface(options.compiledPath);
988
- const loopRootPath = workflowImprovementLoopRoot(options.compiledPath, options.runId, options.loopIndex);
940
+ const loopRootPath = methodImprovementLoopRoot(options.compiledPath, options.runId, options.loopIndex);
989
941
  const shellRoot = join(loopRootPath, "shell");
990
942
  mkdirSync(shellRoot, { recursive: true });
991
943
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
@@ -993,34 +945,38 @@ export function createWorkflowImprovementShell(options) {
993
945
  mkdirSync(join(loopRootPath, "logs"), { recursive: true });
994
946
  writeFileSync(join(shellRoot, "runtime", "loop-context.json"), `${JSON.stringify(options.context, null, 2)}\n`);
995
947
  projectCompiledReviewArtifactsSnapshot(options.compiledPath, shellRoot, schema);
996
- linkPath(workflowPackagePathForCompiled(options.compiledPath), join(shellRoot, "workflow"));
997
- copyIfExists(compiledInterfConfigPath(options.compiledPath), join(shellRoot, "interf.json"), "workflow-improvement");
948
+ copyResolvedTree({
949
+ sourcePath: methodPackagePathForCompiled(options.compiledPath),
950
+ targetPath: join(shellRoot, "method"),
951
+ shellType: "method-improvement",
952
+ });
953
+ copyIfExists(compiledInterfConfigPath(options.compiledPath), join(shellRoot, "interf.json"), "method-improvement");
998
954
  projectCompiledRuntimeArtifacts(options.compiledPath, shellRoot);
999
- const reviewSources = resolveWorkflowImprovementReviewSourcePaths(options.compiledPath);
955
+ const reviewSources = resolveMethodImprovementReviewSourcePaths(options.compiledPath);
1000
956
  if (reviewSources.executionShells) {
1001
- copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "workflow-improvement");
957
+ copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "method-improvement");
1002
958
  }
1003
959
  if (reviewSources.testComparisons) {
1004
- copyIfExists(reviewSources.testComparisons, join(shellRoot, "artifacts", "test-comparisons"), "workflow-improvement");
960
+ copyIfExists(reviewSources.testComparisons, join(shellRoot, "artifacts", "test-comparisons"), "method-improvement");
1005
961
  }
1006
962
  if (reviewSources.targetTestRuns) {
1007
- copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "workflow-improvement");
963
+ copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "method-improvement");
1008
964
  }
1009
965
  if (reviewSources.targetTestSandboxes) {
1010
- copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "workflow-improvement");
966
+ copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "method-improvement");
1011
967
  }
1012
- const agentsContent = renderWorkflowImprovementAgents(options.compiledName, options.workflowId, options.loopIndex);
1013
- writeNativeAgentSurface(shellRoot, agentsContent, "interf-workflow-improver", renderWorkflowImprovementSkill(options.workflowId, options.loopIndex, readWorkflowImprovementDoc(options.compiledPath)));
968
+ const agentsContent = renderMethodImprovementAgents(options.compiledName, options.methodId, options.loopIndex);
969
+ writeNativeAgentSurface(shellRoot, agentsContent, "interf-method-improver", renderMethodImprovementSkill(options.methodId, options.loopIndex, readMethodImprovementDoc(options.compiledPath)));
1014
970
  return {
1015
971
  rootPath: shellRoot,
1016
972
  loopRootPath,
1017
- workflowBeforePath: join(loopRootPath, "workflow-before"),
1018
- workflowAfterPath: join(loopRootPath, "workflow-after"),
1019
- promptLogPath: join(loopRootPath, "logs", "workflow-improver.prompt.txt"),
1020
- eventLogPath: join(loopRootPath, "logs", "workflow-improver.events.ndjson"),
1021
- statusLogPath: join(loopRootPath, "logs", "workflow-improver.status.log"),
973
+ methodBeforePath: join(loopRootPath, "method-before"),
974
+ methodAfterPath: join(loopRootPath, "method-after"),
975
+ promptLogPath: join(loopRootPath, "logs", "method-improver.prompt.txt"),
976
+ eventLogPath: join(loopRootPath, "logs", "method-improver.events.ndjson"),
977
+ statusLogPath: join(loopRootPath, "logs", "method-improver.status.log"),
1022
978
  };
1023
979
  }
1024
- export function freezeWorkflowImprovementShell(rootPath) {
1025
- return freezePreservedShell(rootPath, "workflow-improvement");
980
+ export function freezeMethodImprovementShell(rootPath) {
981
+ return freezePreservedShell(rootPath, "method-improvement");
1026
982
  }