@interf/compiler 0.18.0 → 0.22.0

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 (369) hide show
  1. package/dist/cli/commands/build-plan.d.ts +2 -0
  2. package/dist/cli/commands/build-plan.js +376 -0
  3. package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
  4. package/dist/cli/commands/{compile.js → build.js} +18 -18
  5. package/dist/cli/commands/doctor.js +2 -2
  6. package/dist/cli/commands/mcp.d.ts +0 -34
  7. package/dist/cli/commands/mcp.js +261 -60
  8. package/dist/cli/commands/prep.js +67 -35
  9. package/dist/cli/commands/reset.d.ts +1 -1
  10. package/dist/cli/commands/reset.js +6 -6
  11. package/dist/cli/commands/runs.js +105 -33
  12. package/dist/cli/commands/status.js +4 -2
  13. package/dist/cli/commands/test.d.ts +10 -0
  14. package/dist/cli/commands/{verify.js → test.js} +19 -21
  15. package/dist/cli/commands/web.js +82 -8
  16. package/dist/cli/commands/wizard.js +63 -64
  17. package/dist/cli/index.d.ts +4 -4
  18. package/dist/cli/index.js +7 -7
  19. package/dist/interf-ui/404.html +1 -0
  20. package/dist/interf-ui/__next.__PAGE__.txt +10 -0
  21. package/dist/{compiler-ui → interf-ui}/__next._full.txt +12 -12
  22. package/dist/interf-ui/__next._head.txt +5 -0
  23. package/dist/{compiler-ui → interf-ui}/__next._index.txt +4 -4
  24. package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -3
  25. package/dist/interf-ui/_next/static/chunks/0.tjb6f4golw..css +3 -0
  26. package/dist/interf-ui/_next/static/chunks/085-n_jv2ng_q.css +1 -0
  27. package/dist/{compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js → interf-ui/_next/static/chunks/0dn41fa_zvgsl.js} +1 -1
  28. package/dist/interf-ui/_next/static/chunks/0g-ea0zj5d-0k.js +1 -0
  29. package/dist/interf-ui/_next/static/chunks/0gwqglc4iz583.js +1 -0
  30. package/dist/interf-ui/_next/static/chunks/0haldgm65ve6l.js +1 -0
  31. package/dist/{compiler-ui/_next/static/chunks/08g7lvje.te.u.js → interf-ui/_next/static/chunks/0nv3am99vjzn4.js} +1 -1
  32. package/dist/{compiler-ui/_next/static/chunks/0n51hrfoufc7g.js → interf-ui/_next/static/chunks/0s77gt_o4jwtx.js} +1 -1
  33. package/dist/interf-ui/_next/static/chunks/0~a36ujuzpaz..js +116 -0
  34. package/dist/interf-ui/_next/static/chunks/10jeodxe4nkgj.js +31 -0
  35. package/dist/interf-ui/_next/static/chunks/119h2rouych2t.js +1 -0
  36. package/dist/interf-ui/_next/static/chunks/13c8b~m8knjsf.js +1 -0
  37. package/dist/{compiler-ui/_next/static/chunks/08m7vf5asqlsm.js → interf-ui/_next/static/chunks/14dznb2qpt-ho.js} +5 -5
  38. package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
  39. package/dist/{compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.js → interf-ui/_next/static/chunks/turbopack-0p.pvcjrtq-jh.js} +1 -1
  40. package/dist/interf-ui/_next/static/chunks/turbopack-0usj_75.8frlw.js +1 -0
  41. package/dist/{compiler-ui → interf-ui}/_not-found/__next._full.txt +9 -9
  42. package/dist/interf-ui/_not-found/__next._head.txt +5 -0
  43. package/dist/{compiler-ui → interf-ui}/_not-found/__next._index.txt +4 -4
  44. package/dist/{compiler-ui → interf-ui}/_not-found/__next._not-found.__PAGE__.txt +2 -2
  45. package/dist/interf-ui/_not-found/__next._not-found.txt +5 -0
  46. package/dist/{compiler-ui → interf-ui}/_not-found/__next._tree.txt +2 -2
  47. package/dist/interf-ui/_not-found.html +1 -0
  48. package/dist/{compiler-ui → interf-ui}/_not-found.txt +9 -9
  49. package/dist/interf-ui/index.html +1 -0
  50. package/dist/{compiler-ui → interf-ui}/index.txt +12 -12
  51. package/dist/packages/build-plans/authoring/build-plan-authoring.d.ts +36 -0
  52. package/dist/packages/{methods/authoring/method-authoring.js → build-plans/authoring/build-plan-authoring.js} +57 -88
  53. package/dist/packages/build-plans/authoring/build-plan-edit-session.d.ts +18 -0
  54. package/dist/packages/{methods/authoring/method-edit-session.js → build-plans/authoring/build-plan-edit-session.js} +34 -34
  55. package/dist/packages/build-plans/authoring/build-plan-improvement.d.ts +23 -0
  56. package/dist/packages/build-plans/authoring/build-plan-improvement.js +216 -0
  57. package/dist/packages/build-plans/authoring/index.d.ts +4 -0
  58. package/dist/packages/build-plans/authoring/index.js +4 -0
  59. package/dist/packages/{methods/authoring/lib/method-edit-utils.d.ts → build-plans/authoring/lib/build-plan-edit-utils.d.ts} +3 -3
  60. package/dist/packages/build-plans/build-plan-resolution.d.ts +6 -0
  61. package/dist/packages/build-plans/build-plan-resolution.js +7 -0
  62. package/dist/packages/build-plans/index.d.ts +2 -0
  63. package/dist/packages/build-plans/index.js +2 -0
  64. package/dist/packages/build-plans/package/build-plan-definitions.d.ts +61 -0
  65. package/dist/packages/build-plans/package/build-plan-definitions.js +214 -0
  66. package/dist/packages/{methods/package/method-helpers.d.ts → build-plans/package/build-plan-helpers.d.ts} +7 -7
  67. package/dist/packages/{methods/package/method-helpers.js → build-plans/package/build-plan-helpers.js} +20 -20
  68. package/dist/packages/build-plans/package/build-plan-review-paths.d.ts +10 -0
  69. package/dist/packages/build-plans/package/build-plan-review-paths.js +31 -0
  70. package/dist/packages/{methods/package/method-stage-runner.d.ts → build-plans/package/build-plan-stage-runner.d.ts} +12 -12
  71. package/dist/packages/{methods/package/method-stage-runner.js → build-plans/package/build-plan-stage-runner.js} +10 -10
  72. package/dist/packages/build-plans/package/builtin-build-plan.d.ts +37 -0
  73. package/dist/packages/build-plans/package/builtin-build-plan.js +91 -0
  74. package/dist/packages/{methods → build-plans}/package/context-interface.d.ts +11 -11
  75. package/dist/packages/{methods → build-plans}/package/context-interface.js +23 -23
  76. package/dist/packages/build-plans/package/interf-build-plan-package.d.ts +31 -0
  77. package/dist/packages/build-plans/package/interf-build-plan-package.js +466 -0
  78. package/dist/packages/{methods → build-plans}/package/lib/package-root.js +1 -1
  79. package/dist/packages/build-plans/package/local-build-plans.d.ts +74 -0
  80. package/dist/packages/build-plans/package/local-build-plans.js +472 -0
  81. package/dist/packages/build-plans/package/user-build-plans.d.ts +17 -0
  82. package/dist/packages/build-plans/package/user-build-plans.js +77 -0
  83. package/dist/packages/contracts/index.d.ts +1 -1
  84. package/dist/packages/contracts/lib/preparation-paths.d.ts +37 -37
  85. package/dist/packages/contracts/lib/preparation-paths.js +43 -43
  86. package/dist/packages/contracts/lib/schema.d.ts +38 -41
  87. package/dist/packages/contracts/lib/schema.js +44 -35
  88. package/dist/packages/engine/action-definitions.d.ts +228 -67
  89. package/dist/packages/engine/action-definitions.js +277 -273
  90. package/dist/packages/engine/action-planner.d.ts +2 -2
  91. package/dist/packages/engine/action-planner.js +8 -15
  92. package/dist/packages/engine/action-values.d.ts +1 -1
  93. package/dist/packages/engine/action-values.js +1 -1
  94. package/dist/packages/engine/agents/index.d.ts +2 -2
  95. package/dist/packages/engine/agents/index.js +1 -1
  96. package/dist/packages/engine/agents/lib/args.d.ts +2 -2
  97. package/dist/packages/engine/agents/lib/args.js +1 -1
  98. package/dist/packages/engine/agents/lib/constants.js +1 -1
  99. package/dist/packages/engine/agents/lib/execution-profile.d.ts +5 -5
  100. package/dist/packages/engine/agents/lib/execution-profile.js +3 -3
  101. package/dist/packages/engine/agents/lib/executors.d.ts +11 -11
  102. package/dist/packages/engine/agents/lib/render.js +4 -4
  103. package/dist/packages/engine/agents/lib/shells.d.ts +33 -31
  104. package/dist/packages/engine/agents/lib/shells.js +254 -250
  105. package/dist/packages/engine/agents/lib/types.d.ts +2 -2
  106. package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.d.ts +3 -0
  107. package/dist/packages/engine/agents/lib/verifiable-context-bootstrap.js +19 -0
  108. package/dist/packages/engine/agents/role-executors.d.ts +7 -7
  109. package/dist/packages/engine/agents/role-executors.js +2 -2
  110. package/dist/packages/engine/agents/role-router.d.ts +2 -2
  111. package/dist/packages/engine/agents/role-router.js +1 -1
  112. package/dist/packages/engine/build/artifact-counts.d.ts +1 -0
  113. package/dist/packages/engine/{compile → build}/artifact-counts.js +7 -7
  114. package/dist/packages/engine/{compile → build}/artifact-status.d.ts +8 -8
  115. package/dist/packages/engine/{compile → build}/artifact-status.js +19 -19
  116. package/dist/packages/engine/{compile → build}/billing-events.d.ts +4 -4
  117. package/dist/packages/engine/{compile → build}/billing-events.js +4 -4
  118. package/dist/packages/engine/build/build-execution.d.ts +4 -0
  119. package/dist/packages/engine/build/build-execution.js +4 -0
  120. package/dist/packages/engine/build/build-pipeline.d.ts +56 -0
  121. package/dist/packages/engine/{compile/compiled-pipeline.js → build/build-pipeline.js} +55 -55
  122. package/dist/packages/engine/build/build-plan-primitives.d.ts +2 -0
  123. package/dist/packages/engine/{compile/method-primitives.js → build/build-plan-primitives.js} +1 -1
  124. package/dist/packages/engine/build/build-plan-runs.d.ts +14 -0
  125. package/dist/packages/engine/build/build-plan-runs.js +31 -0
  126. package/dist/packages/engine/build/build-stage-plan.d.ts +16 -0
  127. package/dist/packages/engine/build/build-stage-plan.js +100 -0
  128. package/dist/packages/engine/build/build-stage-runner.d.ts +15 -0
  129. package/dist/packages/engine/{compile/compiled-stage-runner.js → build/build-stage-runner.js} +21 -21
  130. package/dist/packages/engine/build/build-target.d.ts +11 -0
  131. package/dist/packages/engine/build/build-target.js +16 -0
  132. package/dist/packages/engine/{compile → build}/check-evaluator.d.ts +4 -4
  133. package/dist/packages/engine/{compile → build}/check-evaluator.js +1 -1
  134. package/dist/packages/engine/{compile → build}/discovery.d.ts +2 -2
  135. package/dist/packages/engine/{compile → build}/discovery.js +4 -4
  136. package/dist/packages/engine/{compile → build}/index.d.ts +6 -6
  137. package/dist/packages/engine/{compile → build}/index.js +5 -5
  138. package/dist/packages/engine/{compile → build}/lib/schema.d.ts +79 -79
  139. package/dist/packages/engine/{compile → build}/lib/schema.js +71 -71
  140. package/dist/packages/engine/build/reset.d.ts +2 -0
  141. package/dist/packages/engine/build/reset.js +74 -0
  142. package/dist/packages/engine/{compile → build}/runtime-contracts.js +8 -8
  143. package/dist/packages/engine/build/runtime-inventory.d.ts +7 -0
  144. package/dist/packages/engine/{compile → build}/runtime-inventory.js +8 -8
  145. package/dist/packages/engine/{compile → build}/runtime-paths.js +6 -6
  146. package/dist/packages/engine/{compile → build}/runtime-prompt.js +11 -11
  147. package/dist/packages/engine/build/runtime-reconcile.d.ts +2 -0
  148. package/dist/packages/engine/{compile → build}/runtime-reconcile.js +18 -18
  149. package/dist/packages/engine/{compile → build}/runtime-runs.js +27 -27
  150. package/dist/packages/engine/{compile → build}/runtime-types.d.ts +10 -10
  151. package/dist/packages/engine/build/source-files.d.ts +46 -0
  152. package/dist/packages/engine/{compile → build}/source-files.js +32 -32
  153. package/dist/packages/engine/build/state-artifacts.d.ts +9 -0
  154. package/dist/packages/engine/build/state-artifacts.js +14 -0
  155. package/dist/packages/engine/build/state-health.d.ts +4 -0
  156. package/dist/packages/engine/{compile → build}/state-health.js +40 -40
  157. package/dist/packages/engine/build/state-io.d.ts +11 -0
  158. package/dist/packages/engine/{compile → build}/state-io.js +22 -22
  159. package/dist/packages/engine/build/state-paths.js +16 -0
  160. package/dist/packages/engine/build/state-view.d.ts +5 -0
  161. package/dist/packages/engine/{compile → build}/state-view.js +29 -29
  162. package/dist/packages/engine/build/state.d.ts +7 -0
  163. package/dist/packages/engine/build/state.js +12 -0
  164. package/dist/packages/engine/build/validate-verifiable-context.d.ts +27 -0
  165. package/dist/packages/engine/{compile/validate-compiled.js → build/validate-verifiable-context.js} +73 -73
  166. package/dist/packages/engine/{compile → build}/validate.d.ts +4 -4
  167. package/dist/packages/engine/{compile → build}/validate.js +27 -27
  168. package/dist/packages/engine/build/verifiable-context-paths.d.ts +47 -0
  169. package/dist/packages/engine/build/verifiable-context-paths.js +121 -0
  170. package/dist/packages/engine/build/verifiable-context-schema.d.ts +21 -0
  171. package/dist/packages/engine/build/verifiable-context-schema.js +126 -0
  172. package/dist/packages/engine/client.d.ts +16 -16
  173. package/dist/packages/engine/client.js +21 -21
  174. package/dist/packages/engine/cloud-seams.d.ts +3 -3
  175. package/dist/packages/engine/connection-config.js +1 -1
  176. package/dist/packages/engine/execution/index.d.ts +2 -2
  177. package/dist/packages/engine/execution/index.js +1 -1
  178. package/dist/packages/engine/execution/lib/schema.d.ts +100 -95
  179. package/dist/packages/engine/execution/lib/schema.js +31 -31
  180. package/dist/packages/engine/index.d.ts +7 -7
  181. package/dist/packages/engine/index.js +3 -3
  182. package/dist/packages/engine/instance-paths.d.ts +45 -39
  183. package/dist/packages/engine/instance-paths.js +54 -48
  184. package/dist/packages/engine/lib/schema.d.ts +1568 -484
  185. package/dist/packages/engine/lib/schema.js +172 -161
  186. package/dist/packages/engine/native-run-handlers.d.ts +12 -12
  187. package/dist/packages/engine/native-run-handlers.js +138 -136
  188. package/dist/packages/engine/preparation-store.d.ts +31 -36
  189. package/dist/packages/engine/preparation-store.js +42 -31
  190. package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
  191. package/dist/packages/engine/readiness-check-draft.js +1 -1
  192. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  193. package/dist/packages/engine/requested-artifacts.js +36 -0
  194. package/dist/packages/engine/routes.d.ts +18 -17
  195. package/dist/packages/engine/routes.js +20 -19
  196. package/dist/packages/engine/run-observability.d.ts +5 -3
  197. package/dist/packages/engine/run-observability.js +103 -90
  198. package/dist/packages/engine/runtime-caches.d.ts +16 -16
  199. package/dist/packages/engine/runtime-caches.js +26 -26
  200. package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
  201. package/dist/packages/engine/runtime-event-applier.js +1 -1
  202. package/dist/packages/engine/runtime-persistence.d.ts +9 -9
  203. package/dist/packages/engine/runtime-persistence.js +16 -16
  204. package/dist/packages/engine/runtime-proposal-helpers.d.ts +15 -15
  205. package/dist/packages/engine/runtime-proposal-helpers.js +81 -85
  206. package/dist/packages/engine/runtime-resource-builders.d.ts +16 -11
  207. package/dist/packages/engine/runtime-resource-builders.js +32 -21
  208. package/dist/packages/engine/runtime.d.ts +53 -60
  209. package/dist/packages/engine/runtime.js +555 -453
  210. package/dist/packages/engine/server.d.ts +2 -2
  211. package/dist/packages/engine/server.js +226 -143
  212. package/dist/packages/engine/service-registry.d.ts +5 -17
  213. package/dist/packages/engine/service-registry.js +5 -20
  214. package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
  215. package/dist/packages/engine/verify/lib/schema.js +36 -8
  216. package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
  217. package/dist/packages/engine/verify/readiness-check-run.js +46 -46
  218. package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
  219. package/dist/packages/engine/verify/verify-execution.js +10 -10
  220. package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
  221. package/dist/packages/engine/verify/verify-paths.js +17 -17
  222. package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
  223. package/dist/packages/engine/verify/verify-sandbox.js +26 -26
  224. package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
  225. package/dist/packages/engine/verify/verify-targets.js +17 -17
  226. package/dist/packages/engine/verify/verify-types.d.ts +2 -2
  227. package/dist/packages/engine/verify/verify.d.ts +1 -1
  228. package/dist/packages/engine/verify/verify.js +1 -1
  229. package/dist/packages/engine/wire-schemas.d.ts +42 -40
  230. package/dist/packages/engine/wire-schemas.js +13 -13
  231. package/dist/packages/project/index.d.ts +1 -1
  232. package/dist/packages/project/interf-bootstrap.d.ts +1 -1
  233. package/dist/packages/project/interf-bootstrap.js +1 -1
  234. package/dist/packages/project/interf-detect.d.ts +11 -11
  235. package/dist/packages/project/interf-detect.js +36 -36
  236. package/dist/packages/project/interf-scaffold.d.ts +3 -3
  237. package/dist/packages/project/interf-scaffold.js +72 -72
  238. package/dist/packages/project/interf.d.ts +4 -4
  239. package/dist/packages/project/interf.js +3 -3
  240. package/dist/packages/project/lib/schema.d.ts +205 -12
  241. package/dist/packages/project/lib/schema.js +59 -14
  242. package/dist/packages/project/preparation-entries.d.ts +3 -3
  243. package/dist/packages/project/preparation-entries.js +19 -19
  244. package/dist/packages/project/source-config.d.ts +10 -10
  245. package/dist/packages/project/source-config.js +62 -58
  246. package/dist/packages/project/source-folders.js +1 -1
  247. package/package.json +14 -17
  248. package/public-repo/CONTRIBUTING.md +47 -0
  249. package/public-repo/README.md +327 -0
  250. package/public-repo/SECURITY.md +67 -0
  251. package/public-repo/build-plans/interf-default/README.md +33 -0
  252. package/public-repo/build-plans/interf-default/build/stages/shape/SKILL.md +27 -0
  253. package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
  254. package/{builtin-methods/interf-default/compile → public-repo/build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
  255. package/{builtin-methods/interf-default/method.json → public-repo/build-plans/interf-default/build-plan.json} +16 -16
  256. package/{builtin-methods/interf-default/method.schema.json → public-repo/build-plans/interf-default/build-plan.schema.json} +4 -4
  257. package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
  258. package/public-repo/build-plans/interf-default/use/query/SKILL.md +23 -0
  259. package/public-repo/plugins/README.md +9 -0
  260. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  261. package/public-repo/plugins/interf/.mcp.json +12 -0
  262. package/public-repo/plugins/interf/README.md +32 -0
  263. package/public-repo/plugins/interf/skills/interf/SKILL.md +376 -0
  264. package/public-repo/skills/interf/SKILL.md +376 -0
  265. package/README.md +0 -311
  266. package/agent-skills/interf-actions/SKILL.md +0 -185
  267. package/agent-skills/interf-actions/references/cli.md +0 -243
  268. package/builtin-methods/interf-default/README.md +0 -29
  269. package/builtin-methods/interf-default/compile/stages/shape/SKILL.md +0 -31
  270. package/builtin-methods/interf-default/improve/SKILL.md +0 -18
  271. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  272. package/dist/cli/commands/method.d.ts +0 -2
  273. package/dist/cli/commands/method.js +0 -113
  274. package/dist/cli/commands/verify.d.ts +0 -10
  275. package/dist/compiler-ui/404.html +0 -1
  276. package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
  277. package/dist/compiler-ui/__next._head.txt +0 -5
  278. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  279. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  280. package/dist/compiler-ui/_next/static/chunks/0_c_tvh-cukjz.css +0 -3
  281. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  282. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  283. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +0 -114
  284. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  285. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  286. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  287. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  288. package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +0 -1
  289. package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
  290. package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
  291. package/dist/compiler-ui/_not-found.html +0 -1
  292. package/dist/compiler-ui/index.html +0 -1
  293. package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
  294. package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
  295. package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
  296. package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
  297. package/dist/packages/engine/compile/compiled-compile.js +0 -4
  298. package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
  299. package/dist/packages/engine/compile/compiled-paths.js +0 -121
  300. package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
  301. package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
  302. package/dist/packages/engine/compile/compiled-schema.js +0 -126
  303. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
  304. package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
  305. package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
  306. package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
  307. package/dist/packages/engine/compile/compiled-target.js +0 -16
  308. package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
  309. package/dist/packages/engine/compile/method-runs.d.ts +0 -14
  310. package/dist/packages/engine/compile/method-runs.js +0 -31
  311. package/dist/packages/engine/compile/reset.d.ts +0 -2
  312. package/dist/packages/engine/compile/reset.js +0 -74
  313. package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
  314. package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
  315. package/dist/packages/engine/compile/source-files.d.ts +0 -46
  316. package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
  317. package/dist/packages/engine/compile/state-artifacts.js +0 -14
  318. package/dist/packages/engine/compile/state-health.d.ts +0 -4
  319. package/dist/packages/engine/compile/state-io.d.ts +0 -11
  320. package/dist/packages/engine/compile/state-paths.js +0 -16
  321. package/dist/packages/engine/compile/state-view.d.ts +0 -5
  322. package/dist/packages/engine/compile/state.d.ts +0 -7
  323. package/dist/packages/engine/compile/state.js +0 -12
  324. package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
  325. package/dist/packages/methods/authoring/index.d.ts +0 -4
  326. package/dist/packages/methods/authoring/index.js +0 -4
  327. package/dist/packages/methods/authoring/method-authoring.d.ts +0 -34
  328. package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
  329. package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
  330. package/dist/packages/methods/authoring/method-improvement.js +0 -217
  331. package/dist/packages/methods/index.d.ts +0 -2
  332. package/dist/packages/methods/index.js +0 -2
  333. package/dist/packages/methods/method-resolution.d.ts +0 -6
  334. package/dist/packages/methods/method-resolution.js +0 -7
  335. package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
  336. package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
  337. package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
  338. package/dist/packages/methods/package/interf-method-package.js +0 -466
  339. package/dist/packages/methods/package/local-methods.d.ts +0 -73
  340. package/dist/packages/methods/package/local-methods.js +0 -457
  341. package/dist/packages/methods/package/method-definitions.d.ts +0 -61
  342. package/dist/packages/methods/package/method-definitions.js +0 -214
  343. package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
  344. package/dist/packages/methods/package/method-review-paths.js +0 -31
  345. package/dist/packages/methods/package/user-methods.d.ts +0 -17
  346. package/dist/packages/methods/package/user-methods.js +0 -77
  347. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_buildManifest.js +0 -0
  348. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_clientMiddlewareManifest.js +0 -0
  349. /package/dist/{compiler-ui/_next/static/6qyE1u9m_oBUkvAhhoCmO → interf-ui/_next/static/_qJKnA0dammQ306MG_zMq}/_ssgManifest.js +0 -0
  350. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/03~yq9q893hmn.js +0 -0
  351. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
  352. /package/dist/{compiler-ui → interf-ui}/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
  353. /package/dist/{compiler-ui → interf-ui}/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
  354. /package/dist/{compiler-ui → interf-ui}/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
  355. /package/dist/{compiler-ui → interf-ui}/_next/static/media/worker.102zas1s52_pf.js +0 -0
  356. /package/dist/packages/{methods/authoring/lib/method-edit-utils.js → build-plans/authoring/lib/build-plan-edit-utils.js} +0 -0
  357. /package/dist/packages/{methods → build-plans}/package/lib/package-root.d.ts +0 -0
  358. /package/dist/packages/engine/{compile → build}/runtime-contracts.d.ts +0 -0
  359. /package/dist/packages/engine/{compile → build}/runtime-paths.d.ts +0 -0
  360. /package/dist/packages/engine/{compile → build}/runtime-prompt.d.ts +0 -0
  361. /package/dist/packages/engine/{compile → build}/runtime-runs.d.ts +0 -0
  362. /package/dist/packages/engine/{compile → build}/runtime-types.js +0 -0
  363. /package/dist/packages/engine/{compile → build}/runtime.d.ts +0 -0
  364. /package/dist/packages/engine/{compile → build}/runtime.js +0 -0
  365. /package/dist/packages/engine/{compile → build}/state-paths.d.ts +0 -0
  366. /package/dist/packages/engine/{compile → build}/validate-helpers.d.ts +0 -0
  367. /package/dist/packages/engine/{compile → build}/validate-helpers.js +0 -0
  368. /package/{LICENSE.md → public-repo/LICENSE.md} +0 -0
  369. /package/{TRADEMARKS.md → public-repo/TRADEMARKS.md} +0 -0
@@ -1,4 +1,6 @@
1
1
  import { z } from "zod";
2
+ import { RequestedArtifactSchema, SourceProfileSchema, } from "../project/lib/schema.js";
3
+ import { artifactRequirementsFromRequestedArtifacts, formatRequestedArtifactsForPrompt, } from "./requested-artifacts.js";
2
4
  export const ActionValueIdPattern = /^[a-z0-9][a-z0-9-]{0,79}$/;
3
5
  export const ActionValueIdSchema = z.string().trim().regex(ActionValueIdPattern, "Use lowercase letters, numbers, and dashes.");
4
6
  export const OptionalActionValueIdSchema = z.string().trim().refine((value) => value === "" || ActionValueIdPattern.test(value), "Use lowercase letters, numbers, and dashes.");
@@ -6,26 +8,32 @@ export const SourceReadinessCheckActionValueSchema = z.object({
6
8
  question: z.string().trim().min(1),
7
9
  answer: z.string().trim().optional(),
8
10
  }).strict();
11
+ export const RequestedArtifactActionValueSchema = RequestedArtifactSchema;
12
+ export const SourceProfileActionValueSchema = SourceProfileSchema;
9
13
  export const PreparationSetupActionValuesSchema = z.object({
10
14
  name: ActionValueIdSchema,
11
15
  path: z.string().trim().min(1, "Source Folder is required."),
12
16
  about: z.string().trim().min(1, "Agent work is required."),
13
- method: OptionalActionValueIdSchema.optional(),
17
+ build_plan: OptionalActionValueIdSchema.optional(),
14
18
  checks: z.array(SourceReadinessCheckActionValueSchema).optional(),
19
+ requested_artifacts: z.array(RequestedArtifactActionValueSchema).optional(),
20
+ source_profile: SourceProfileActionValueSchema.optional(),
15
21
  max_attempts: z.number().int().min(1).max(5).optional(),
16
22
  max_loops: z.number().int().min(1).max(3).optional(),
17
23
  readiness_notes: z.string().trim().optional(),
18
- prepare_after_setup: z.boolean().optional(),
19
- setup_mode: z.enum(["create", "select-method"]).optional(),
24
+ build_after_setup: z.boolean().optional(),
25
+ setup_mode: z.enum(["create", "select-build-plan"]).optional(),
20
26
  }).strict();
21
- export const MethodAuthoringActionValuesSchema = z.object({
22
- method_id: ActionValueIdSchema.optional(),
23
- base_method_id: ActionValueIdSchema.optional(),
24
- reference_method_id: ActionValueIdSchema.optional(),
27
+ export const BuildPlanAuthoringActionValuesSchema = z.object({
28
+ build_plan_id: ActionValueIdSchema.optional(),
29
+ base_build_plan_id: ActionValueIdSchema.optional(),
30
+ reference_build_plan_id: ActionValueIdSchema.optional(),
25
31
  label: z.string().trim().optional(),
26
32
  hint: z.string().trim().optional(),
27
33
  task_prompt: z.string().trim().min(1, "Agent work is required."),
28
- portable_output: z.string().trim().optional(),
34
+ requested_artifacts_description: z.string().trim().optional(),
35
+ requested_artifacts: z.array(RequestedArtifactActionValueSchema).optional(),
36
+ source_profile: SourceProfileActionValueSchema.nullable().optional(),
29
37
  readiness_notes: z.string().trim().optional(),
30
38
  }).strict();
31
39
  export const INTERF_SERVICE_ACTIONS = {
@@ -33,31 +41,31 @@ export const INTERF_SERVICE_ACTIONS = {
33
41
  id: "create-preparation",
34
42
  serviceAction: "preparation-setup",
35
43
  title: "Create Preparation",
36
- description: "Save a Source Folder + Method binding so future runs can be invoked by name.",
44
+ description: "Save a Source, requested Artifacts, Build Plan, and run history under one Preparation.",
37
45
  },
38
- compileRun: {
39
- id: "compile-run",
40
- serviceAction: "compile",
41
- title: "Compile Method",
42
- description: "Run the chosen Method against this Source Folder and write portable context.",
46
+ buildRun: {
47
+ id: "build-run",
48
+ serviceAction: "build",
49
+ title: "Build Artifacts",
50
+ description: "Run the saved Build Plan against this Source and write verifiable context.",
43
51
  },
44
- selectMethod: {
45
- id: "select-method",
52
+ selectBuildPlan: {
53
+ id: "select-build-plan",
46
54
  serviceAction: "preparation-setup",
47
- title: "Select Method",
48
- description: "Choose which Method this saved binding should use for future runs.",
55
+ title: "Select Build Plan",
56
+ description: "Choose the Build Plan that will build this Preparation's requested Artifacts.",
49
57
  },
50
- createMethod: {
51
- id: "create-method",
52
- serviceAction: "method-authoring",
53
- title: "Draft Method",
54
- description: "Draft a reusable local Method that captures a repeatable agent-work pattern.",
58
+ createBuildPlan: {
59
+ id: "build-plan-draft",
60
+ serviceAction: "build-plan-draft",
61
+ title: "Draft Build Plan",
62
+ description: "Draft a Build Plan for the Artifacts this Preparation should build.",
55
63
  },
56
- methodChange: {
57
- id: "method-change",
58
- serviceAction: "method-change",
59
- title: "Method Change",
60
- description: "Modify, duplicate, or remove an existing Method.",
64
+ buildPlanChange: {
65
+ id: "build-plan-change",
66
+ serviceAction: "build-plan-change",
67
+ title: "Build Plan Change",
68
+ description: "Modify, duplicate, or remove an existing Build Plan.",
61
69
  },
62
70
  preparationChange: {
63
71
  id: "preparation-change",
@@ -85,19 +93,23 @@ export const INTERF_SERVICE_ACTIONS = {
85
93
  },
86
94
  improvePreparation: {
87
95
  id: "improve-preparation",
88
- serviceAction: "method-improvement",
89
- title: "Improve Method",
90
- description: "Use readiness evidence to refine the Method this saved binding uses.",
96
+ serviceAction: "build-plan-improvement",
97
+ title: "Improve Build Plan",
98
+ description: "Use readiness evidence to refine the Build Plan this Preparation uses.",
91
99
  },
92
100
  };
93
101
  function optionalLine(label, value) {
94
102
  const trimmed = value?.trim();
95
103
  return trimmed ? `${label}: ${trimmed}` : null;
96
104
  }
97
- export function methodAuthoringTaskPrompt(values) {
105
+ export function buildPlanAuthoringTaskPrompt(values) {
106
+ const requestedArtifacts = values.requested_artifacts?.length
107
+ ? formatRequestedArtifactsForPrompt(values.requested_artifacts)
108
+ : null;
98
109
  return [
99
110
  `Agent work: ${values.task_prompt}`,
100
- optionalLine("Portable-context output", values.portable_output),
111
+ requestedArtifacts ? `Requested Artifacts:\n${requestedArtifacts}` : null,
112
+ optionalLine("Requested Artifacts", values.requested_artifacts_description),
101
113
  optionalLine("Readiness checks", values.readiness_notes),
102
114
  ].filter((line) => Boolean(line)).join("\n");
103
115
  }
@@ -151,27 +163,27 @@ export function maybeActionValue(value) {
151
163
  function inputValue(values, key) {
152
164
  return values[key] ?? "";
153
165
  }
154
- export function methodChoiceOptions(methods) {
166
+ export function buildPlanChoiceOptions(buildPlans) {
155
167
  const seen = new Set();
156
168
  const options = [];
157
- for (const method of [{ id: "interf-default", label: "interf-default" }, ...methods]) {
158
- if (seen.has(method.id))
169
+ for (const buildPlan of [{ id: "interf-default", label: "interf-default" }, ...buildPlans]) {
170
+ if (seen.has(buildPlan.id))
159
171
  continue;
160
- seen.add(method.id);
161
- options.push({ label: method.label ?? method.id, value: method.id });
172
+ seen.add(buildPlan.id);
173
+ options.push({ label: buildPlan.label ?? buildPlan.id, value: buildPlan.id });
162
174
  }
163
175
  return options;
164
176
  }
165
- export function methodTaskPromptFromInput(values) {
166
- const parsed = MethodAuthoringActionValuesSchema.safeParse(values);
177
+ export function buildPlanTaskPromptFromInput(values) {
178
+ const parsed = BuildPlanAuthoringActionValuesSchema.safeParse(values);
167
179
  if (parsed.success)
168
- return methodAuthoringTaskPrompt(parsed.data);
180
+ return buildPlanAuthoringTaskPrompt(parsed.data);
169
181
  const taskPrompt = inputValue(values, "task_prompt");
170
- const portableOutput = inputValue(values, "portable_output");
182
+ const requestedArtifactsDescription = inputValue(values, "requested_artifacts_description");
171
183
  const readinessNotes = inputValue(values, "readiness_notes");
172
184
  return [
173
185
  `Agent work: ${taskPrompt}`,
174
- maybeActionValue(portableOutput) ? `Portable-context output: ${portableOutput}` : null,
186
+ maybeActionValue(requestedArtifactsDescription) ? `Requested Artifacts: ${requestedArtifactsDescription}` : null,
175
187
  maybeActionValue(readinessNotes) ? `Readiness checks: ${readinessNotes}` : null,
176
188
  ].filter((line) => Boolean(line)).join("\n");
177
189
  }
@@ -180,7 +192,7 @@ function createPreparationSchema(existingNames) {
180
192
  name: actionIdField("Preparation name"),
181
193
  path: requiredActionText("Source Folder"),
182
194
  about: requiredActionText("Agent work"),
183
- method: optionalActionIdField("Method"),
195
+ build_plan: optionalActionIdField("Build Plan"),
184
196
  readiness_notes: optionalActionText,
185
197
  }).strict().superRefine((values, ctx) => {
186
198
  if (existingNames.has(values.name)) {
@@ -195,43 +207,43 @@ function createPreparationSchema(existingNames) {
195
207
  function prepareRunSchema() {
196
208
  return z.object({
197
209
  preparation: actionIdField("Preparation"),
198
- method: optionalActionIdField("Method"),
210
+ build_plan: optionalActionIdField("Build Plan"),
199
211
  about: optionalActionText,
200
212
  source_folder_path: optionalActionText,
201
213
  }).strict();
202
214
  }
203
- function selectMethodSchema() {
215
+ function selectBuildPlanSchema() {
204
216
  return z.object({
205
217
  name: actionIdField("Preparation"),
206
218
  path: requiredActionText("Source Folder"),
207
219
  about: requiredActionText("Agent work"),
208
- current_method: optionalActionIdField("Current Method"),
209
- method: optionalActionIdField("Method"),
220
+ current_build_plan: optionalActionIdField("Current Build Plan"),
221
+ build_plan: actionIdField("Build Plan"),
210
222
  }).strict();
211
223
  }
212
- function methodAuthoringSchema(existingMethodIds) {
224
+ function buildPlanAuthoringSchema(existingBuildPlanIds) {
213
225
  return z.object({
214
- method_id: optionalActionIdField("Method id"),
226
+ build_plan_id: optionalActionIdField("Build Plan id"),
215
227
  label: optionalActionText,
216
228
  hint: optionalActionText,
217
229
  task_prompt: requiredActionText("Agent work"),
218
- portable_output: optionalActionText,
230
+ requested_artifacts_description: optionalActionText,
219
231
  readiness_notes: optionalActionText,
220
232
  }).strict().superRefine((values, ctx) => {
221
- const explicitMethodId = maybeActionValue(values.method_id ?? "");
222
- if (explicitMethodId && existingMethodIds.has(explicitMethodId)) {
233
+ const explicitBuildPlanId = maybeActionValue(values.build_plan_id ?? "");
234
+ if (explicitBuildPlanId && existingBuildPlanIds.has(explicitBuildPlanId)) {
223
235
  ctx.addIssue({
224
236
  code: z.ZodIssueCode.custom,
225
- path: ["method_id"],
226
- message: "A Method with this id already exists.",
237
+ path: ["build_plan_id"],
238
+ message: "A Build Plan with this id already exists.",
227
239
  });
228
240
  }
229
241
  });
230
242
  }
231
- function methodChangeSchema(action, methodId, existingMethodIds) {
243
+ function buildPlanChangeSchema(action, buildPlanId, existingBuildPlanIds) {
232
244
  const base = {
233
245
  action: requiredActionText("Action"),
234
- method: actionIdField("Method"),
246
+ build_plan: actionIdField("Build Plan"),
235
247
  preparation: optionalActionIdField("Preparation"),
236
248
  };
237
249
  if (action === "modify") {
@@ -245,20 +257,20 @@ function methodChangeSchema(action, methodId, existingMethodIds) {
245
257
  if (action === "duplicate") {
246
258
  return z.object({
247
259
  ...base,
248
- new_method_id: actionIdField("New Method id"),
260
+ new_build_plan_id: actionIdField("New Build Plan id"),
249
261
  }).strict().superRefine((values, ctx) => {
250
- if (existingMethodIds.has(values.new_method_id)) {
262
+ if (existingBuildPlanIds.has(values.new_build_plan_id)) {
251
263
  ctx.addIssue({
252
264
  code: z.ZodIssueCode.custom,
253
- path: ["new_method_id"],
254
- message: "A Method with this id already exists.",
265
+ path: ["new_build_plan_id"],
266
+ message: "A Build Plan with this id already exists.",
255
267
  });
256
268
  }
257
269
  });
258
270
  }
259
271
  return z.object({
260
272
  ...base,
261
- confirmation: requiredActionText("Confirmation").refine((value) => value === methodId, `Type ${methodId} to confirm.`),
273
+ confirmation: requiredActionText("Confirmation").refine((value) => value === buildPlanId, `Type ${buildPlanId} to confirm.`),
262
274
  }).strict();
263
275
  }
264
276
  function preparationChangeSchema(action, preparation, existingNames) {
@@ -272,7 +284,7 @@ function preparationChangeSchema(action, preparation, existingNames) {
272
284
  name: actionIdField("Preparation id"),
273
285
  path: requiredActionText("Source Folder"),
274
286
  about: requiredActionText("Agent work"),
275
- method: optionalActionIdField("Method"),
287
+ build_plan: optionalActionIdField("Build Plan"),
276
288
  }).strict().superRefine((values, ctx) => {
277
289
  if (values.name !== preparation && existingNames.has(values.name)) {
278
290
  ctx.addIssue({
@@ -289,7 +301,7 @@ function preparationChangeSchema(action, preparation, existingNames) {
289
301
  name: actionIdField("New Preparation id"),
290
302
  path: requiredActionText("Source Folder"),
291
303
  about: requiredActionText("Agent work"),
292
- method: optionalActionIdField("Method"),
304
+ build_plan: optionalActionIdField("Build Plan"),
293
305
  }).strict().superRefine((values, ctx) => {
294
306
  if (existingNames.has(values.name)) {
295
307
  ctx.addIssue({
@@ -312,146 +324,154 @@ function conciseSummary(value, fallback) {
312
324
  const sentence = normalized.match(/^.{24,180}?(?:[.!?](?:\s|$)|$)/)?.[0]?.trim() ?? normalized;
313
325
  return sentence.length > 180 ? `${sentence.slice(0, 177).trim()}...` : sentence;
314
326
  }
315
- function normalizedMethodActionValues(values, existingMethodIds, defaultSeed) {
316
- const explicitMethodId = maybeActionValue(inputValue(values, "method_id"));
327
+ function normalizedBuildPlanActionValues(values, existingBuildPlanIds, defaultSeed) {
328
+ const explicitBuildPlanId = maybeActionValue(inputValue(values, "build_plan_id"));
317
329
  const taskPrompt = inputValue(values, "task_prompt").trim();
318
- const methodId = explicitMethodId ?? uniqueActionId(taskPrompt || defaultSeed || "custom-method", existingMethodIds);
319
- const output = maybeActionValue(inputValue(values, "portable_output"));
330
+ const buildPlanId = explicitBuildPlanId ?? uniqueActionId(taskPrompt || defaultSeed || "custom-build-plan", existingBuildPlanIds);
331
+ const output = maybeActionValue(inputValue(values, "requested_artifacts_description"));
320
332
  return {
321
333
  ...values,
322
- method_id: methodId,
323
- label: maybeActionValue(inputValue(values, "label")) ?? titleFromActionId(methodId),
324
- hint: maybeActionValue(inputValue(values, "hint")) ?? conciseSummary(output ?? taskPrompt, "Reusable Method for preparing source files."),
334
+ build_plan_id: buildPlanId,
335
+ label: maybeActionValue(inputValue(values, "label")) ?? titleFromActionId(buildPlanId),
336
+ hint: maybeActionValue(inputValue(values, "hint")) ?? conciseSummary(output ?? taskPrompt, "Reusable Build Plan for building Artifacts."),
325
337
  task_prompt: taskPrompt,
326
338
  };
327
339
  }
328
340
  function createPreparationActionValues(values) {
329
- const method = inputValue(values, "method");
341
+ const buildPlan = inputValue(values, "build_plan");
330
342
  const readinessNotes = inputValue(values, "readiness_notes");
331
343
  return {
332
344
  name: inputValue(values, "name"),
333
345
  path: inputValue(values, "path"),
334
346
  about: inputValue(values, "about"),
335
- prepare_after_setup: true,
336
- ...(maybeActionValue(method) ? { method } : {}),
347
+ build_after_setup: false,
348
+ ...(maybeActionValue(buildPlan) ? { build_plan: buildPlan } : {}),
337
349
  ...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
338
350
  };
339
351
  }
340
- function selectMethodActionValues(values) {
352
+ function selectBuildPlanActionValues(values) {
341
353
  return {
342
354
  name: inputValue(values, "name"),
343
355
  path: inputValue(values, "path"),
344
356
  about: inputValue(values, "about"),
345
- method: maybeActionValue(inputValue(values, "method")) ?? "interf-default",
346
- prepare_after_setup: false,
347
- setup_mode: "select-method",
357
+ build_plan: inputValue(values, "build_plan"),
358
+ build_after_setup: false,
359
+ setup_mode: "select-build-plan",
348
360
  };
349
361
  }
350
362
  export function preparationSetupRequestFromActionValues(input) {
351
363
  const values = PreparationSetupActionValuesSchema.parse(input);
364
+ const buildPlan = values.build_plan;
352
365
  return {
353
- prepare_after_setup: values.prepare_after_setup ?? false,
354
- setup_mode: values.setup_mode === "select-method" ? "select-method" : "create",
366
+ build_after_setup: values.build_after_setup ?? false,
367
+ setup_mode: values.setup_mode === "select-build-plan" ? "select-build-plan" : "create",
355
368
  preparation: {
356
369
  name: values.name,
357
370
  path: values.path,
358
371
  about: values.about,
359
- method: values.method && values.method.length > 0 ? values.method : "interf-default",
372
+ ...(buildPlan && buildPlan.length > 0 ? { build_plan: buildPlan } : {}),
360
373
  checks: values.checks ?? [],
374
+ ...(values.requested_artifacts ? { requested_artifacts: values.requested_artifacts } : {}),
375
+ ...(values.source_profile ? { source_profile: values.source_profile } : {}),
361
376
  ...(typeof values.max_attempts === "number" ? { max_attempts: values.max_attempts } : {}),
362
377
  ...(typeof values.max_loops === "number" ? { max_loops: values.max_loops } : {}),
363
378
  },
364
379
  };
365
380
  }
366
- export function methodAuthoringRequestFromActionValues(input, context) {
367
- const values = MethodAuthoringActionValuesSchema.parse(input);
368
- const methodId = values.method_id;
369
- if (!methodId) {
370
- throw new Error("Method id is required.");
381
+ export function buildPlanAuthoringRequestFromActionValues(input, context) {
382
+ const values = BuildPlanAuthoringActionValuesSchema.parse(input);
383
+ const buildPlanId = values.build_plan_id ?? values.build_plan_id;
384
+ if (!buildPlanId) {
385
+ throw new Error("Build Plan id is required.");
371
386
  }
372
- const taskPrompt = methodAuthoringTaskPrompt(values);
387
+ const taskPrompt = buildPlanAuthoringTaskPrompt(values);
388
+ const requestedArtifacts = values.requested_artifacts ?? context.requestedArtifacts ?? [];
389
+ const sourceProfile = values.source_profile ?? context.sourceProfile ?? null;
373
390
  return {
374
391
  ...(context.preparation ? { preparation: context.preparation } : {}),
375
392
  source_folder_path: context.sourceFolderPath,
376
- ...(values.base_method_id ? { base_method_id: values.base_method_id } : {}),
377
- ...(values.reference_method_id ? { reference_method_id: values.reference_method_id } : {}),
378
- method_id: methodId,
379
- label: values.label ?? titleFromActionId(methodId),
380
- hint: values.hint ?? conciseSummary(values.portable_output ?? values.task_prompt, "Reusable Method for preparing source files."),
393
+ ...(values.base_build_plan_id ?? values.base_build_plan_id ? { base_build_plan_id: values.base_build_plan_id ?? values.base_build_plan_id } : {}),
394
+ ...(values.reference_build_plan_id ?? values.reference_build_plan_id ? { reference_build_plan_id: values.reference_build_plan_id ?? values.reference_build_plan_id } : {}),
395
+ build_plan_id: buildPlanId,
396
+ label: values.label ?? titleFromActionId(buildPlanId),
397
+ hint: values.hint ?? conciseSummary(values.requested_artifacts_description ?? values.task_prompt, "Reusable Build Plan for building Artifacts."),
381
398
  task_prompt: taskPrompt,
382
399
  checks: context.checks ?? [],
400
+ requested_artifacts: requestedArtifacts,
401
+ source_profile: sourceProfile,
402
+ artifact_requirements: artifactRequirementsFromRequestedArtifacts(requestedArtifacts),
383
403
  };
384
404
  }
385
- export function methodImprovementActionValues(options) {
405
+ export function buildPlanImprovementActionValues(options) {
386
406
  const readinessNotes = (options.checks ?? [])
387
407
  .map((check) => check.question)
388
408
  .filter((question) => question.trim().length > 0)
389
409
  .join("\n");
390
410
  return {
391
- method_id: options.methodId,
392
- reference_method_id: options.methodId,
411
+ build_plan_id: options.buildPlanId,
412
+ reference_build_plan_id: options.buildPlanId,
393
413
  ...(maybeActionValue(options.label ?? "") ? { label: options.label } : {}),
394
414
  ...(maybeActionValue(options.hint ?? "") ? { hint: options.hint } : {}),
395
- task_prompt: `Improve Method ${options.methodId} using the latest readiness evidence for Preparation ${options.preparationName}.`,
415
+ task_prompt: `Improve Build Plan ${options.buildPlanId} using the latest readiness evidence for Preparation ${options.preparationName}.`,
396
416
  ...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
397
417
  };
398
418
  }
399
- function methodAuthoringActionValues(values) {
400
- const methodId = inputValue(values, "method_id");
419
+ function buildPlanAuthoringActionValues(values) {
420
+ const buildPlanId = inputValue(values, "build_plan_id");
401
421
  const label = inputValue(values, "label");
402
422
  const hint = inputValue(values, "hint");
403
- const portableOutput = inputValue(values, "portable_output");
423
+ const requestedArtifactsDescription = inputValue(values, "requested_artifacts_description");
404
424
  const readinessNotes = inputValue(values, "readiness_notes");
405
425
  return {
406
- ...(maybeActionValue(methodId) ? { method_id: methodId } : {}),
426
+ ...(maybeActionValue(buildPlanId) ? { build_plan_id: buildPlanId } : {}),
407
427
  ...(maybeActionValue(label) ? { label } : {}),
408
428
  ...(maybeActionValue(hint) ? { hint } : {}),
409
429
  task_prompt: inputValue(values, "task_prompt"),
410
- ...(maybeActionValue(portableOutput) ? { portable_output: portableOutput } : {}),
430
+ ...(maybeActionValue(requestedArtifactsDescription) ? { requested_artifacts_description: requestedArtifactsDescription } : {}),
411
431
  ...(maybeActionValue(readinessNotes) ? { readiness_notes: readinessNotes } : {}),
412
432
  };
413
433
  }
414
- function methodChangeActionValues(action, values) {
434
+ function buildPlanChangeActionValues(action, values) {
415
435
  if (action === "modify") {
416
- const methodId = inputValue(values, "method");
436
+ const buildPlanId = inputValue(values, "build_plan");
417
437
  return {
418
- method_id: methodId,
419
- reference_method_id: methodId,
438
+ build_plan_id: buildPlanId,
439
+ reference_build_plan_id: buildPlanId,
420
440
  ...(maybeActionValue(inputValue(values, "label")) ? { label: inputValue(values, "label") } : {}),
421
441
  ...(maybeActionValue(inputValue(values, "hint")) ? { hint: inputValue(values, "hint") } : {}),
422
442
  task_prompt: [
423
- `Modify Method ${methodId}.`,
443
+ `Modify Build Plan ${buildPlanId}.`,
424
444
  inputValue(values, "change_request"),
425
445
  ].filter(Boolean).join("\n"),
426
446
  };
427
447
  }
428
448
  if (action === "duplicate") {
429
- const newMethodId = inputValue(values, "new_method_id");
449
+ const newBuildPlanId = inputValue(values, "new_build_plan_id");
430
450
  return {
431
- action_type: "method-change",
451
+ action_type: "build-plan-change",
432
452
  operation: "duplicate",
433
- method: inputValue(values, "method"),
434
- new_method_id: newMethodId,
435
- label: titleFromActionId(newMethodId),
436
- hint: `Duplicate of ${inputValue(values, "method")}`,
453
+ build_plan: inputValue(values, "build_plan"),
454
+ new_build_plan_id: newBuildPlanId,
455
+ label: titleFromActionId(newBuildPlanId),
456
+ hint: `Duplicate of ${inputValue(values, "build_plan")}`,
437
457
  };
438
458
  }
439
459
  return {
440
- action_type: "method-change",
460
+ action_type: "build-plan-change",
441
461
  operation: "remove",
442
- method: inputValue(values, "method"),
462
+ build_plan: inputValue(values, "build_plan"),
443
463
  confirmation: inputValue(values, "confirmation"),
444
464
  };
445
465
  }
446
466
  function duplicatePreparationActionValues(values) {
447
- const method = inputValue(values, "method");
467
+ const buildPlan = inputValue(values, "build_plan");
448
468
  return {
449
469
  name: inputValue(values, "name"),
450
470
  path: inputValue(values, "path"),
451
471
  about: inputValue(values, "about"),
452
- prepare_after_setup: false,
472
+ build_after_setup: false,
453
473
  setup_mode: "create",
454
- ...(maybeActionValue(method) ? { method } : {}),
474
+ ...(maybeActionValue(buildPlan) ? { build_plan: buildPlan } : {}),
455
475
  };
456
476
  }
457
477
  function preparationChangeActionValues(action, values) {
@@ -470,13 +490,12 @@ export function buildCreatePreparationActionDefinition(context) {
470
490
  return {
471
491
  id: INTERF_SERVICE_ACTIONS.createPreparation.id,
472
492
  title: INTERF_SERVICE_ACTIONS.createPreparation.title,
473
- description: "Describe the agent job. Interf saves the Preparation through the local service and starts its first compile run.",
474
- submitLabel: "Confirm",
493
+ description: "Describe the Source and agent job. Interf saves a Preparation so a Build Plan can be drafted and reviewed before build.",
494
+ submitLabel: "Create",
475
495
  initialValues: {
476
496
  name,
477
497
  path: context.prepDataDir,
478
498
  about: "",
479
- method: "interf-default",
480
499
  readiness_notes: "",
481
500
  },
482
501
  schema: createPreparationSchema(existingNames),
@@ -484,12 +503,11 @@ export function buildCreatePreparationActionDefinition(context) {
484
503
  name: "name",
485
504
  path: "path",
486
505
  about: "about",
487
- method: "method",
506
+ build_plan: "build_plan",
488
507
  }),
489
508
  valuesPreview: createPreparationActionValues,
490
509
  buildDraft: (values) => {
491
510
  const actionValues = createPreparationActionValues(values);
492
- const method = inputValue(values, "method");
493
511
  const readinessNotes = inputValue(values, "readiness_notes");
494
512
  return {
495
513
  preparation: inputValue(values, "name"),
@@ -497,9 +515,9 @@ export function buildCreatePreparationActionDefinition(context) {
497
515
  message: [
498
516
  `Create Preparation ${inputValue(values, "name")}.`,
499
517
  `Agent work: ${inputValue(values, "about")}`,
500
- maybeActionValue(method) ? `Method: ${method}` : null,
501
- maybeActionValue(readinessNotes) ? `Readiness checks: ${readinessNotes}` : null,
518
+ maybeActionValue(readinessNotes) ? `Requested Artifacts and readiness: ${readinessNotes}` : null,
502
519
  `Source folder: ${inputValue(values, "path")}`,
520
+ "Draft or select the Build Plan after this Preparation exists. Do not build yet.",
503
521
  "Use the attached typed action input as the source of truth.",
504
522
  ].filter((line) => Boolean(line)).join("\n"),
505
523
  };
@@ -518,70 +536,54 @@ export function buildCreatePreparationActionDefinition(context) {
518
536
  label: "Agent job",
519
537
  type: "textarea",
520
538
  rows: 4,
521
- help: "The concrete work this prepared folder should enable.",
539
+ help: "The concrete work this Preparation should enable.",
522
540
  context: "Saved as the Preparation intent and sent as typed action input.",
523
541
  placeholder: "Example: Analyze every report chart, extract annual take-up by location, and produce a source data file plus markdown summary.",
524
542
  },
525
- {
526
- name: "method",
527
- label: "Method",
528
- type: "select",
529
- help: "How Interf should build portable context for this Preparation.",
530
- context: "Saved as the Method selected for this Preparation.",
531
- options: methodChoiceOptions(context.methods),
532
- },
533
543
  {
534
544
  name: "readiness_notes",
535
- label: "Ready when",
545
+ label: "Requested Artifacts",
536
546
  type: "textarea",
537
547
  rows: 3,
538
- help: "Concrete checks that prove the prepared context is good enough.",
539
- context: "Used as guidance when Interf proposes Preparation-level readiness checks.",
540
- placeholder: "Example: Every output is source-backed, complete for the requested locations, and precise enough to verify.",
541
- },
542
- {
543
- name: "name",
544
- label: "Preparation id",
545
- type: "text",
546
- advanced: true,
547
- help: "Auto-generated for the CLI and portable-context folder. Change only if needed.",
548
- context: "Used in the CLI, saved on the Preparation, and used for the portable-context folder name.",
549
- placeholder: name,
548
+ help: "Artifacts, coverage, and proof the agent needs before it can trust the Source.",
549
+ context: "Used as guidance when Interf drafts the Build Plan and readiness checks for review.",
550
+ placeholder: "Example: Extract every chart, produce a source data file, write a markdown summary, and show evidence for every location.",
550
551
  },
551
552
  ],
552
553
  };
553
554
  }
554
- export function buildCompileRunActionDefinition(context) {
555
+ export function buildBuildRunActionDefinition(context) {
555
556
  return {
556
- id: INTERF_SERVICE_ACTIONS.compileRun.id,
557
- title: INTERF_SERVICE_ACTIONS.compileRun.title,
558
- description: "Build portable context for this Preparation. Interf will run the saved Method against the source folder and record a visible run.",
557
+ id: INTERF_SERVICE_ACTIONS.buildRun.id,
558
+ title: INTERF_SERVICE_ACTIONS.buildRun.title,
559
+ description: "Build verifiable context for this Preparation. Interf will run the saved Build Plan against the Source and record a visible run.",
559
560
  submitLabel: "Run",
560
561
  initialValues: {
561
562
  preparation: context.name,
562
- method: context.methodId,
563
+ build_plan: context.buildPlanId,
563
564
  about: context.about,
564
565
  source_folder_path: context.sourceFolderPath,
565
566
  },
566
567
  schema: prepareRunSchema(),
567
568
  valuesPreview: (values) => ({
568
- action_type: INTERF_SERVICE_ACTIONS.compileRun.serviceAction,
569
+ action_type: INTERF_SERVICE_ACTIONS.buildRun.serviceAction,
569
570
  preparation: inputValue(values, "preparation"),
570
- method: inputValue(values, "method"),
571
+ build_plan: inputValue(values, "build_plan"),
571
572
  source_folder_path: inputValue(values, "source_folder_path"),
572
573
  about: inputValue(values, "about"),
573
574
  }),
574
575
  buildDraft: (values) => ({
575
576
  preparation: inputValue(values, "preparation"),
576
577
  values: {
577
- action_type: INTERF_SERVICE_ACTIONS.compileRun.serviceAction,
578
+ action_type: INTERF_SERVICE_ACTIONS.buildRun.serviceAction,
578
579
  preparation: inputValue(values, "preparation"),
579
- ...(maybeActionValue(inputValue(values, "method")) ? { method: inputValue(values, "method") } : {}),
580
+ ...(maybeActionValue(inputValue(values, "build_plan")) ? { build_plan: inputValue(values, "build_plan") } : {}),
580
581
  },
581
582
  message: [
582
- `Compile Method ${inputValue(values, "method") || "(saved selection)"} for Preparation ${inputValue(values, "preparation")}.`,
583
+ `Build Artifacts for Preparation ${inputValue(values, "preparation")}.`,
583
584
  maybeActionValue(inputValue(values, "about")) ? `Agent work: ${inputValue(values, "about")}` : null,
584
- "Build portable context from the saved Source Folder and selected Method.",
585
+ `Build Plan: ${inputValue(values, "build_plan") || "(saved selection)"}.`,
586
+ "Build verifiable context from the saved Source and requested Artifacts.",
585
587
  "Use the attached typed action input as the source of truth.",
586
588
  ].filter((line) => Boolean(line)).join("\n"),
587
589
  }),
@@ -592,15 +594,15 @@ export function buildCompileRunActionDefinition(context) {
592
594
  type: "text",
593
595
  readOnly: true,
594
596
  help: "The saved Preparation that will be built.",
595
- context: "Sent as the compile target.",
597
+ context: "Sent as the build target.",
596
598
  },
597
599
  {
598
- name: "method",
599
- label: "Method",
600
+ name: "build_plan",
601
+ label: "Build Plan",
600
602
  type: "text",
601
603
  readOnly: true,
602
- help: "The Method Interf will run for this Preparation.",
603
- context: "Sent as the compile Method override.",
604
+ help: "The Build Plan Interf will run to build the requested Artifacts.",
605
+ context: "Sent as the Build Plan override.",
604
606
  },
605
607
  {
606
608
  name: "about",
@@ -609,7 +611,7 @@ export function buildCompileRunActionDefinition(context) {
609
611
  readOnly: true,
610
612
  advanced: true,
611
613
  help: "The work this Preparation is meant to support.",
612
- context: "Preserved as context for the compile-run proposal.",
614
+ context: "Preserved as context for the Build run proposal.",
613
615
  placeholder: "No saved job description.",
614
616
  },
615
617
  {
@@ -624,61 +626,63 @@ export function buildCompileRunActionDefinition(context) {
624
626
  ],
625
627
  };
626
628
  }
627
- export function buildCompileRunActionDraft(context) {
628
- const definition = buildCompileRunActionDefinition(context);
629
+ export function buildBuildRunActionDraft(context) {
630
+ const definition = buildBuildRunActionDefinition(context);
629
631
  return definition.buildDraft(definition.initialValues);
630
632
  }
631
- export function buildSelectMethodActionDefinition(context) {
633
+ export function buildSelectBuildPlanActionDefinition(context) {
632
634
  const actionValues = (values) => ({
633
- ...selectMethodActionValues(values),
635
+ ...selectBuildPlanActionValues(values),
634
636
  checks: context.checks ?? [],
637
+ requested_artifacts: context.requestedArtifacts ?? [],
638
+ ...(context.sourceProfile ? { source_profile: context.sourceProfile } : {}),
635
639
  ...(typeof context.maxAttempts === "number" ? { max_attempts: context.maxAttempts } : {}),
636
640
  ...(typeof context.maxLoops === "number" ? { max_loops: context.maxLoops } : {}),
637
641
  });
638
642
  return {
639
- id: INTERF_SERVICE_ACTIONS.selectMethod.id,
640
- title: INTERF_SERVICE_ACTIONS.selectMethod.title,
641
- description: "Choose which Method this Preparation uses for future compile runs. This saves the selection without running prepare.",
643
+ id: INTERF_SERVICE_ACTIONS.selectBuildPlan.id,
644
+ title: INTERF_SERVICE_ACTIONS.selectBuildPlan.title,
645
+ description: "Choose the Build Plan that builds this Preparation's requested Artifacts. This saves the selection without running a Build run.",
642
646
  submitLabel: "Confirm",
643
647
  initialValues: {
644
648
  name: context.name,
645
649
  path: context.sourceFolderPath,
646
650
  about: context.about,
647
- current_method: context.currentMethodId,
648
- method: context.currentMethodId || "interf-default",
651
+ current_build_plan: context.currentBuildPlanId ?? "",
652
+ build_plan: context.currentBuildPlanId ?? "",
649
653
  },
650
- schema: selectMethodSchema(),
654
+ schema: selectBuildPlanSchema(),
651
655
  validateRequest: (values) => packageSchemaFieldErrors(PreparationSetupActionValuesSchema.safeParse(actionValues(values)), {
652
656
  name: "name",
653
657
  path: "path",
654
658
  about: "about",
655
- method: "method",
659
+ build_plan: "build_plan",
656
660
  }),
657
661
  valuesPreview: actionValues,
658
662
  buildDraft: (values) => ({
659
663
  preparation: inputValue(values, "name"),
660
664
  values: actionValues(values),
661
665
  message: [
662
- `Select Method ${inputValue(values, "method") || "interf-default"} for Preparation ${inputValue(values, "name")}.`,
663
- "Save the selected Method. Do not run prepare yet.",
666
+ `Select Build Plan ${inputValue(values, "build_plan")} for Preparation ${inputValue(values, "name")}.`,
667
+ "Save the selected Build Plan. Do not build yet.",
664
668
  "Use the attached typed action input as the source of truth.",
665
669
  ].join("\n"),
666
670
  }),
667
671
  fields: [
668
672
  {
669
- name: "method",
670
- label: "Method",
673
+ name: "build_plan",
674
+ label: "Build Plan",
671
675
  type: "select",
672
- help: "The Method future compile runs should use.",
676
+ help: "The Build Plan future Build runs should use to build requested Artifacts.",
673
677
  context: "Saved on the existing Preparation.",
674
- options: methodChoiceOptions(context.methods),
678
+ options: buildPlanChoiceOptions(context.buildPlans),
675
679
  },
676
680
  {
677
- name: "current_method",
678
- label: "Current Method",
681
+ name: "current_build_plan",
682
+ label: "Current Build Plan",
679
683
  type: "text",
680
684
  readOnly: true,
681
- help: "The Method currently saved for this Preparation.",
685
+ help: "The Build Plan currently saved for this Preparation.",
682
686
  context: "Shown so the change is explicit before approval.",
683
687
  },
684
688
  {
@@ -687,7 +691,7 @@ export function buildSelectMethodActionDefinition(context) {
687
691
  type: "text",
688
692
  readOnly: true,
689
693
  advanced: true,
690
- help: "The Preparation whose Method selection will be updated.",
694
+ help: "The Preparation whose Build Plan selection will be updated.",
691
695
  context: "Sent with the setup action.",
692
696
  },
693
697
  {
@@ -697,7 +701,7 @@ export function buildSelectMethodActionDefinition(context) {
697
701
  readOnly: true,
698
702
  advanced: true,
699
703
  help: "The saved job intent for this Preparation.",
700
- context: "Preserved while updating the selected Method.",
704
+ context: "Preserved while updating the selected Build Plan.",
701
705
  },
702
706
  {
703
707
  name: "path",
@@ -706,54 +710,54 @@ export function buildSelectMethodActionDefinition(context) {
706
710
  readOnly: true,
707
711
  advanced: true,
708
712
  help: "The saved Source Folder path.",
709
- context: "Preserved while updating the selected Method.",
713
+ context: "Preserved while updating the selected Build Plan.",
710
714
  },
711
715
  ],
712
716
  };
713
717
  }
714
- export function buildCreateMethodActionDefinition(context) {
715
- const existingMethodIds = new Set(context.existingMethodIds);
716
- const defaultSeed = context.defaultPreparation ? `${context.defaultPreparation}-method` : context.suggestedMethodId;
717
- const methodId = uniqueActionId(defaultSeed, existingMethodIds);
718
- const label = titleFromActionId(methodId);
718
+ export function buildCreateBuildPlanActionDefinition(context) {
719
+ const existingBuildPlanIds = new Set(context.existingBuildPlanIds);
720
+ const defaultSeed = context.defaultPreparation ? `${context.defaultPreparation}-build-plan` : context.suggestedBuildPlanId;
721
+ const buildPlanId = uniqueActionId(defaultSeed, existingBuildPlanIds);
722
+ const label = titleFromActionId(buildPlanId);
719
723
  return {
720
- id: INTERF_SERVICE_ACTIONS.createMethod.id,
721
- title: INTERF_SERVICE_ACTIONS.createMethod.title,
722
- description: "Describe the reusable job this Method should make possible. Interf will generate the stable Method metadata unless you override it.",
724
+ id: INTERF_SERVICE_ACTIONS.createBuildPlan.id,
725
+ title: INTERF_SERVICE_ACTIONS.createBuildPlan.title,
726
+ description: "Describe the Artifacts the agent needs. Interf drafts the Build Plan from this description; the Build run later proves source coverage.",
723
727
  submitLabel: "Send Request",
724
728
  initialValues: {
725
- method_id: "",
729
+ build_plan_id: "",
726
730
  label: "",
727
731
  hint: "",
728
732
  task_prompt: "",
729
- portable_output: "",
733
+ requested_artifacts_description: "",
730
734
  readiness_notes: "",
731
735
  },
732
- normalizeValues: (values) => normalizedMethodActionValues(values, existingMethodIds, defaultSeed),
733
- schema: methodAuthoringSchema(existingMethodIds),
734
- validateRequest: (values) => packageSchemaFieldErrors(MethodAuthoringActionValuesSchema.safeParse(methodAuthoringActionValues(values)), {
735
- method_id: "method_id",
736
+ normalizeValues: (values) => normalizedBuildPlanActionValues(values, existingBuildPlanIds, defaultSeed),
737
+ schema: buildPlanAuthoringSchema(existingBuildPlanIds),
738
+ validateRequest: (values) => packageSchemaFieldErrors(BuildPlanAuthoringActionValuesSchema.safeParse(buildPlanAuthoringActionValues(values)), {
739
+ build_plan_id: "build_plan_id",
736
740
  label: "label",
737
741
  hint: "hint",
738
742
  task_prompt: "task_prompt",
739
- portable_output: "portable_output",
743
+ requested_artifacts_description: "requested_artifacts_description",
740
744
  readiness_notes: "readiness_notes",
741
745
  }),
742
746
  valuesPreview: (values) => ({
743
- method_id: inputValue(values, "method_id"),
747
+ build_plan_id: inputValue(values, "build_plan_id"),
744
748
  label: inputValue(values, "label"),
745
749
  hint: inputValue(values, "hint"),
746
- task_prompt: methodTaskPromptFromInput(values),
750
+ task_prompt: buildPlanTaskPromptFromInput(values),
747
751
  }),
748
752
  buildDraft: (values) => ({
749
753
  preparation: context.defaultPreparation,
750
- values: methodAuthoringActionValues(values),
754
+ values: buildPlanAuthoringActionValues(values),
751
755
  message: [
752
- `Create Method ${inputValue(values, "method_id")}${context.defaultPreparation ? ` for Preparation ${context.defaultPreparation}` : ""}.`,
756
+ `Draft Build Plan ${inputValue(values, "build_plan_id")}${context.defaultPreparation ? ` for Preparation ${context.defaultPreparation}` : ""}.`,
753
757
  `Label: ${inputValue(values, "label")}`,
754
758
  `Summary: ${inputValue(values, "hint")}`,
755
- methodTaskPromptFromInput(values),
756
- "Use the attached typed action input as the Method authoring request.",
759
+ buildPlanTaskPromptFromInput(values),
760
+ "Use the attached typed action input as the Build Plan authoring request.",
757
761
  ].join("\n"),
758
762
  }),
759
763
  fields: [
@@ -762,17 +766,17 @@ export function buildCreateMethodActionDefinition(context) {
762
766
  label: "Agent work",
763
767
  type: "textarea",
764
768
  rows: 4,
765
- help: "The reusable job this Method should make possible for agents.",
766
- context: "Used as the main Method-authoring instruction.",
769
+ help: "The agent task this Preparation should unlock.",
770
+ context: "Used as the main Build Plan authoring instruction.",
767
771
  placeholder: "Example: Analyze every report chart, extract annual take-up by location, and produce a source data file plus markdown summary.",
768
772
  },
769
773
  {
770
- name: "portable_output",
771
- label: "Portable-context output",
774
+ name: "requested_artifacts_description",
775
+ label: "Requested Artifacts",
772
776
  type: "textarea",
773
777
  rows: 3,
774
- help: "Files, sections, or evidence agents should receive in portable context.",
775
- context: "Guides the Method output shape and stage artifact plan.",
778
+ help: "Files, sections, or evidence agents should receive in verifiable context.",
779
+ context: "Guides the requested Artifact shape and Build Plan stages before a Build run proves source coverage.",
776
780
  placeholder: "Describe the files or sections agents should receive.",
777
781
  },
778
782
  {
@@ -780,18 +784,18 @@ export function buildCreateMethodActionDefinition(context) {
780
784
  label: "Readiness guidance",
781
785
  type: "textarea",
782
786
  rows: 3,
783
- help: "What this Method output should be able to prove.",
784
- context: "Guides readiness checks. Method Artifact checks stay separate.",
785
- placeholder: "Describe the evidence that should make this Method output ready.",
787
+ help: "What these Artifacts should be able to prove.",
788
+ context: "Guides readiness checks. Artifact contract checks stay separate.",
789
+ placeholder: "Describe the evidence that should make these Artifacts ready.",
786
790
  },
787
791
  {
788
- name: "method_id",
789
- label: "Method id",
792
+ name: "build_plan_id",
793
+ label: "Build Plan id",
790
794
  type: "text",
791
795
  advanced: true,
792
796
  help: "Optional. Leave blank and Interf generates a stable id from the job.",
793
- context: "Saved under the Workspace methods folder and referenced by Preparations.",
794
- placeholder: methodId,
797
+ context: "Saved as the Build Plan id and referenced by Preparations.",
798
+ placeholder: buildPlanId,
795
799
  },
796
800
  {
797
801
  name: "label",
@@ -799,7 +803,7 @@ export function buildCreateMethodActionDefinition(context) {
799
803
  type: "text",
800
804
  advanced: true,
801
805
  help: "Optional readable name people can choose later.",
802
- context: "Shown in the UI and sent to the local agent while drafting the Method.",
806
+ context: "Shown in the UI and sent to the local agent while drafting the Build Plan.",
803
807
  placeholder: label,
804
808
  },
805
809
  {
@@ -815,49 +819,49 @@ export function buildCreateMethodActionDefinition(context) {
815
819
  ],
816
820
  };
817
821
  }
818
- export function buildMethodChangeActionDefinition(context) {
819
- const existingMethodIds = new Set(context.existingMethodIds);
822
+ export function buildBuildPlanChangeActionDefinition(context) {
823
+ const existingBuildPlanIds = new Set(context.existingBuildPlanIds);
820
824
  const actionLabel = titleFromActionId(context.action);
821
- const newMethodId = context.action === "duplicate"
822
- ? uniqueActionId(`${context.methodId}-copy`, existingMethodIds)
825
+ const newBuildPlanId = context.action === "duplicate"
826
+ ? uniqueActionId(`${context.buildPlanId}-copy`, existingBuildPlanIds)
823
827
  : "";
824
828
  const initialValues = {
825
- action: `method-${context.action}`,
826
- method: context.methodId,
829
+ action: `build-plan-${context.action}`,
830
+ build_plan: context.buildPlanId,
827
831
  preparation: context.preparation,
828
832
  ...(context.action === "modify" ? { change_request: "", label: context.label ?? "", hint: context.hint ?? "" } : {}),
829
- ...(context.action === "duplicate" ? { new_method_id: newMethodId } : {}),
833
+ ...(context.action === "duplicate" ? { new_build_plan_id: newBuildPlanId } : {}),
830
834
  ...(context.action === "remove" ? { confirmation: "" } : {}),
831
835
  };
832
- const actionValues = (values) => methodChangeActionValues(context.action, values);
836
+ const actionValues = (values) => buildPlanChangeActionValues(context.action, values);
833
837
  const messageFor = (values) => {
834
838
  if (context.action === "modify") {
835
839
  return [
836
- `Modify Method ${inputValue(values, "method")}.`,
840
+ `Modify Build Plan ${inputValue(values, "build_plan")}.`,
837
841
  `Requested change: ${inputValue(values, "change_request")}`,
838
- "Use the attached typed Method-authoring input as the source of truth.",
842
+ "Use the attached typed Build Plan authoring input as the source of truth.",
839
843
  ].join("\n");
840
844
  }
841
845
  if (context.action === "duplicate") {
842
846
  return [
843
- `Duplicate Method ${inputValue(values, "method")} as ${inputValue(values, "new_method_id")}.`,
844
- "Use the attached typed Method change input as the source of truth.",
847
+ `Duplicate Build Plan ${inputValue(values, "build_plan")} as ${inputValue(values, "new_build_plan_id")}.`,
848
+ "Use the attached typed Build Plan change input as the source of truth.",
845
849
  ].join("\n");
846
850
  }
847
851
  return [
848
- `Remove Method ${inputValue(values, "method")}.`,
849
- "The user typed the Method id to confirm removal.",
850
- "Use the attached typed Method change input as the source of truth.",
852
+ `Remove Build Plan ${inputValue(values, "build_plan")}.`,
853
+ "The user typed the Build Plan id to confirm removal.",
854
+ "Use the attached typed Build Plan change input as the source of truth.",
851
855
  ].join("\n");
852
856
  };
853
857
  const fields = [
854
858
  {
855
- name: "method",
856
- label: "Method",
859
+ name: "build_plan",
860
+ label: "Build Plan",
857
861
  type: "text",
858
862
  readOnly: true,
859
- help: "The Method this request targets.",
860
- context: "Sent as the Method change target.",
863
+ help: "The Build Plan this request targets.",
864
+ context: "Sent as the Build Plan change target.",
861
865
  },
862
866
  {
863
867
  name: "change_request",
@@ -866,37 +870,37 @@ export function buildMethodChangeActionDefinition(context) {
866
870
  rows: 4,
867
871
  advanced: context.action === "remove",
868
872
  help: context.action === "duplicate"
869
- ? "What should be different in the duplicate Method."
870
- : "What should change in the existing Method.",
871
- context: "Sent as the human-authored Method change request.",
873
+ ? "What should be different in the duplicate Build Plan."
874
+ : "What should change in the existing Build Plan.",
875
+ context: "Sent as the human-authored Build Plan change request.",
872
876
  placeholder: "Describe the concrete change Interf should make.",
873
877
  },
874
878
  {
875
- name: "new_method_id",
876
- label: "New Method id",
879
+ name: "new_build_plan_id",
880
+ label: "New Build Plan id",
877
881
  type: "text",
878
882
  advanced: context.action !== "duplicate",
879
- help: "Stable id for the duplicated Method.",
880
- context: "Used as the target Method id for the duplicate request.",
881
- placeholder: newMethodId,
883
+ help: "Stable id for the duplicated Build Plan.",
884
+ context: "Used as the target Build Plan id for the duplicate request.",
885
+ placeholder: newBuildPlanId,
882
886
  },
883
887
  {
884
888
  name: "confirmation",
885
889
  label: "Confirm removal",
886
890
  type: "text",
887
891
  advanced: context.action !== "remove",
888
- help: `Type ${context.methodId} to confirm this removal request.`,
889
- context: "Prevents accidental destructive Method requests.",
890
- placeholder: context.methodId,
892
+ help: `Type ${context.buildPlanId} to confirm this removal request.`,
893
+ context: "Prevents accidental destructive Build Plan requests.",
894
+ placeholder: context.buildPlanId,
891
895
  },
892
896
  {
893
897
  name: "label",
894
898
  label: "Label",
895
899
  type: "text",
896
900
  advanced: true,
897
- help: "Readable Method name to keep while modifying this Method.",
898
- context: "Sent to the Method-authoring run.",
899
- placeholder: context.label ?? context.methodId,
901
+ help: "Readable Build Plan name to keep while modifying this Build Plan.",
902
+ context: "Sent to the Build Plan authoring run.",
903
+ placeholder: context.label ?? context.buildPlanId,
900
904
  },
901
905
  {
902
906
  name: "hint",
@@ -904,9 +908,9 @@ export function buildMethodChangeActionDefinition(context) {
904
908
  type: "textarea",
905
909
  rows: 2,
906
910
  advanced: true,
907
- help: "Short Method summary to keep while modifying this Method.",
908
- context: "Sent to the Method-authoring run.",
909
- placeholder: context.hint ?? "Reusable Method for preparing source folders.",
911
+ help: "Short Build Plan summary to keep while modifying this Build Plan.",
912
+ context: "Sent to the Build Plan authoring run.",
913
+ placeholder: context.hint ?? "Reusable Build Plan for compiling Artifacts.",
910
914
  },
911
915
  {
912
916
  name: "preparation",
@@ -920,16 +924,16 @@ export function buildMethodChangeActionDefinition(context) {
920
924
  },
921
925
  ];
922
926
  return {
923
- id: `${INTERF_SERVICE_ACTIONS.methodChange.id}-${context.action}`,
924
- title: `${actionLabel} Method`,
927
+ id: `${INTERF_SERVICE_ACTIONS.buildPlanChange.id}-${context.action}`,
928
+ title: `${actionLabel} Build Plan`,
925
929
  description: context.action === "remove"
926
- ? "Confirm the Method removal request. Interf will reject removal while any saved Preparation still uses it."
930
+ ? "Confirm the Build Plan removal request. Interf will reject removal while any saved Preparation still uses it."
927
931
  : context.action === "duplicate"
928
- ? "Duplicate this Method through the local Interf service."
929
- : "Describe the change and Interf will run a visible Method draft job.",
932
+ ? "Duplicate this Build Plan through the local Interf service."
933
+ : "Describe the change and Interf will run a visible Build Plan draft job.",
930
934
  submitLabel: context.action === "modify" ? "Send Request" : "Confirm",
931
935
  initialValues,
932
- schema: methodChangeSchema(context.action, context.methodId, existingMethodIds),
936
+ schema: buildPlanChangeSchema(context.action, context.buildPlanId, existingBuildPlanIds),
933
937
  valuesPreview: actionValues,
934
938
  buildDraft: (values) => ({
935
939
  preparation: inputValue(values, "preparation"),
@@ -939,7 +943,7 @@ export function buildMethodChangeActionDefinition(context) {
939
943
  fields: fields.filter((field) => {
940
944
  if (field.name === "change_request")
941
945
  return context.action === "modify";
942
- if (field.name === "new_method_id")
946
+ if (field.name === "new_build_plan_id")
943
947
  return context.action === "duplicate";
944
948
  if (field.name === "confirmation")
945
949
  return context.action === "remove";
@@ -963,7 +967,7 @@ export function buildPreparationChangeActionDefinition(context) {
963
967
  name: context.action === "duplicate" ? duplicateName : context.preparation,
964
968
  path: context.sourceFolderPath,
965
969
  about: context.about ?? "",
966
- method: context.methodId ?? "interf-default",
970
+ build_plan: context.buildPlanId ?? "",
967
971
  }
968
972
  : {}),
969
973
  ...(context.action === "remove" ? { confirmation: "" } : {}),
@@ -974,7 +978,7 @@ export function buildPreparationChangeActionDefinition(context) {
974
978
  return [
975
979
  `Modify Preparation ${inputValue(values, "preparation")}.`,
976
980
  `Agent work: ${inputValue(values, "about")}`,
977
- maybeActionValue(inputValue(values, "method")) ? `Method: ${inputValue(values, "method")}` : null,
981
+ maybeActionValue(inputValue(values, "build_plan")) ? `Build Plan: ${inputValue(values, "build_plan")}` : null,
978
982
  `Source folder: ${inputValue(values, "path")}`,
979
983
  "Use the attached typed Preparation setup input as the source of truth.",
980
984
  ].filter((line) => Boolean(line)).join("\n");
@@ -983,7 +987,7 @@ export function buildPreparationChangeActionDefinition(context) {
983
987
  return [
984
988
  `Duplicate Preparation ${inputValue(values, "preparation")} as ${inputValue(values, "name")}.`,
985
989
  `Agent work: ${inputValue(values, "about")}`,
986
- maybeActionValue(inputValue(values, "method")) ? `Method: ${inputValue(values, "method")}` : null,
990
+ maybeActionValue(inputValue(values, "build_plan")) ? `Build Plan: ${inputValue(values, "build_plan")}` : null,
987
991
  `Source folder: ${inputValue(values, "path")}`,
988
992
  "Use the attached typed Preparation setup input as the source of truth.",
989
993
  ].filter((line) => Boolean(line)).join("\n");
@@ -1024,10 +1028,10 @@ export function buildPreparationChangeActionDefinition(context) {
1024
1028
  placeholder: "Describe the agent job.",
1025
1029
  },
1026
1030
  {
1027
- name: "method",
1028
- label: "Method",
1031
+ name: "build_plan",
1032
+ label: "Build Plan",
1029
1033
  type: "text",
1030
- help: "The Method future compile runs should use.",
1034
+ help: "The Build Plan future Build runs should use.",
1031
1035
  context: "Saved on this Preparation.",
1032
1036
  placeholder: "interf-default",
1033
1037
  },
@@ -1065,7 +1069,7 @@ export function buildPreparationChangeActionDefinition(context) {
1065
1069
  name: "name",
1066
1070
  path: "path",
1067
1071
  about: "about",
1068
- method: "method",
1072
+ build_plan: "build_plan",
1069
1073
  })
1070
1074
  : undefined,
1071
1075
  valuesPreview: actionValues,
@@ -1075,7 +1079,7 @@ export function buildPreparationChangeActionDefinition(context) {
1075
1079
  message: messageFor(values),
1076
1080
  }),
1077
1081
  fields: fields.filter((field) => {
1078
- if (field.name === "name" || field.name === "about" || field.name === "method" || field.name === "path")
1082
+ if (field.name === "name" || field.name === "about" || field.name === "build_plan" || field.name === "path")
1079
1083
  return context.action === "modify" || context.action === "duplicate";
1080
1084
  if (field.name === "confirmation")
1081
1085
  return context.action === "remove";
@@ -1147,7 +1151,7 @@ export function buildReadinessActionDraft(options) {
1147
1151
  message: `Improve ${options.preparation} using the latest readiness evidence.`,
1148
1152
  values: {
1149
1153
  action_type: INTERF_SERVICE_ACTIONS.improvePreparation.serviceAction,
1150
- ...(options.methodId ? { method: options.methodId } : {}),
1154
+ ...(options.buildPlanId ? { build_plan: options.buildPlanId } : {}),
1151
1155
  preparation: options.preparation,
1152
1156
  },
1153
1157
  };