@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
@@ -2,14 +2,14 @@ import { cpSync, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, re
2
2
  import { tmpdir } from "node:os";
3
3
  import { basename, dirname, join, relative, sep as pathSep } from "node:path";
4
4
  import { CHART_APPROXIMATION_NOTES } from "./chart-guidance.js";
5
- import { buildCompiledSourceFiles } from "../../compile/source-files.js";
6
- import { METHOD_PACKAGE_DIR } from "../../../project/interf-detect.js";
5
+ import { buildVerifiableContextSourceFiles } from "../../build/source-files.js";
6
+ import { BUILD_PLAN_PACKAGE_DIR } from "../../../project/interf-detect.js";
7
7
  import { CHECK_KINDS, } from "../../../contracts/lib/schema.js";
8
- import { CONTEXT_INTERFACE_FILE as METHOD_SCHEMA_FILE, contextInterfaceArtifactAbsolutePath as compiledArtifactAbsolutePath, listContextInterfaceArtifacts, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveMethodSchemaPath, } from "../../../methods/package/context-interface.js";
9
- import { stageExecutionShellsRoot, methodImprovementLoopRoot, methodPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, compiledRuntimeSourceSnapshotPath, compiledRuntimeStageInputsPath, } from "../../compile/compiled-paths.js";
10
- import { ensureCompiledArtifactTargets } from "../../compile/compiled-schema.js";
8
+ import { CONTEXT_INTERFACE_FILE as BUILD_PLAN_SCHEMA_FILE, contextInterfaceArtifactAbsolutePath as verifiableContextArtifactAbsolutePath, listContextInterfaceArtifacts, readContextInterface as readBuildPlanContextFile, resolveContextInterfacePath as resolveBuildPlanSchemaPath, } from "../../../build-plans/package/context-interface.js";
9
+ import { stageExecutionShellsRoot, buildPlanImprovementLoopRoot, buildPlanPackagePathForVerifiableContext, verifiableContextInterfConfigPath, verifiableContextRuntimeRoot, verifiableContextRuntimeSourceSnapshotPath, verifiableContextRuntimeStageInputsPath, } from "../../build/verifiable-context-paths.js";
10
+ import { ensureBuildPlanArtifactTargets } from "../../build/verifiable-context-schema.js";
11
11
  import { listFilesRecursive } from "../../../contracts/utils/filesystem.js";
12
- import { resolveMethodImprovementReviewSourcePaths } from "../../../methods/package/method-review-paths.js";
12
+ import { resolveBuildPlanImprovementReviewSourcePaths } from "../../../build-plans/package/build-plan-review-paths.js";
13
13
  const LOCAL_SKILL_ROOTS = [
14
14
  ".claude/skills",
15
15
  ".codex/skills",
@@ -24,25 +24,25 @@ export function writeNativeAgentSurface(rootPath, agentsContent, skillName, skil
24
24
  changed = writeNativeSkillCopies(rootPath, skillName, skillContent) || changed;
25
25
  return changed;
26
26
  }
27
- function compiledQuerySkillSourcePath(compiledPath) {
28
- return join(methodPackagePathForCompiled(compiledPath), "use", "query", "SKILL.md");
27
+ function verifiableContextQuerySkillSourcePath(verifiableContextPath) {
28
+ return join(buildPlanPackagePathForVerifiableContext(verifiableContextPath), "use", "query", "SKILL.md");
29
29
  }
30
- function compiledArtifactSummaryLines(compiledPath) {
31
- const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
30
+ function verifiableContextArtifactSummaryLines(verifiableContextPath) {
31
+ const schema = readBuildPlanContextFile(buildPlanPackagePathForVerifiableContext(verifiableContextPath));
32
32
  if (!schema)
33
- return ["- No Method schema is available yet."];
33
+ return ["- No Build Plan schema is available yet."];
34
34
  return listContextInterfaceArtifacts(schema)
35
35
  .filter((artifact) => artifact.kind !== "runtime")
36
36
  .map((artifact) => `- \`${artifact.id}\` -> \`${artifact.path}\` (${artifact.role} ${artifact.kind})`);
37
37
  }
38
- export function renderCompiledAgents(compiledPath, name, methodId, about, options = {}) {
39
- const methodOriginSelected = options.methodOriginSelected ?? methodId;
40
- const methodLocalDraft = options.methodLocalDraft === true;
41
- const artifactLines = compiledArtifactSummaryLines(compiledPath);
38
+ export function renderVerifiableContextAgents(verifiableContextPath, name, buildPlanId, about, options = {}) {
39
+ const buildPlanOriginSelected = options.buildPlanOriginSelected ?? buildPlanId;
40
+ const buildPlanLocalDraft = options.buildPlanLocalDraft === true;
41
+ const artifactLines = verifiableContextArtifactSummaryLines(verifiableContextPath);
42
42
  return [
43
43
  `# ${name}`,
44
44
  "",
45
- "This is portable context built by Interf.",
45
+ "This is verifiable context built by Interf.",
46
46
  "This folder gives agents prepared evidence, structure, and cross-file connections so they do not have to rediscover the full picture from source files during the job.",
47
47
  "",
48
48
  ...(about
@@ -51,78 +51,78 @@ export function renderCompiledAgents(compiledPath, name, methodId, about, option
51
51
  "",
52
52
  ]
53
53
  : []),
54
- "## How to use this portable context",
54
+ "## How to use this verifiable context",
55
55
  "",
56
- "1. Use the local native `interf-query` skill that Interf generated for this portable context.",
57
- "2. Let the Method docs and declared Artifacts guide retrieval instead of assuming a fixed note layout.",
56
+ "1. Use the local native `interf-query` skill that Interf generated for this verifiable context.",
57
+ "2. Let the Build Plan docs and declared Artifacts guide retrieval instead of assuming a fixed note layout.",
58
58
  "3. Use `.interf/runtime/source-snapshot.json` when you need to inspect the source references behind the output.",
59
59
  "",
60
- "## How this portable context works",
60
+ "## How this verifiable context works",
61
61
  "",
62
- "- The Method package defines the context interface this portable context implements on disk.",
63
- "- `.interf/interf.json` records the selected source binding and back-reference to the Interf Workspace.",
64
- `- Method seed: \`${methodOriginSelected}\`.`,
65
- ...(methodLocalDraft
66
- ? ["- This portable context now carries a local Method draft improved from that seed. Recompiling this portable context reuses the local `.interf/method/` package."]
62
+ "- The Build Plan defines the context interface this verifiable context implements on disk.",
63
+ "- `.interf/interf.json` records the selected Source binding and Preparation metadata.",
64
+ `- Build Plan seed: \`${buildPlanOriginSelected}\`.`,
65
+ ...(buildPlanLocalDraft
66
+ ? ["- This verifiable context now carries a local Build Plan draft improved from that seed. Rebuilding this verifiable context reuses the local `.interf/build-plan/` package."]
67
67
  : []),
68
- `- Active local Method id: \`${methodId}\`.`,
69
- "- `.interf/method/` is the local editable Method package for this portable context.",
70
- `- \`.interf/method/${METHOD_SCHEMA_FILE}\` is the deterministic context interface for this portable context.`,
71
- "- `.interf/method/improve/` is the editable source for Method-improvement loops.",
72
- "- `.interf/method/use/query/` is the editable source for the generated native query shell.",
73
- "- `.interf/method/compile/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
68
+ `- Selected Build Plan id: \`${buildPlanId}\`.`,
69
+ "- `.interf/build-plan/` is the local editable Build Plan package for this verifiable context.",
70
+ `- \`.interf/build-plan/${BUILD_PLAN_SCHEMA_FILE}\` is the deterministic context interface for this verifiable context.`,
71
+ "- `.interf/build-plan/improve/` is the editable source for Build Plan improvement loops.",
72
+ "- `.interf/build-plan/use/query/` is the editable source for the generated native query shell.",
73
+ "- `.interf/build-plan/build/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
74
74
  "- Native local query skills are generated under local agent skill directories such as `.claude/skills/` and `.codex/skills/`.",
75
75
  "- `.interf/runtime/source-snapshot.json` records the source files assigned to the latest runtime snapshot.",
76
- `- Method Artifacts are declared in \`.interf/method/${METHOD_SCHEMA_FILE}\`.`,
76
+ `- Build Plan Artifacts are declared in \`.interf/build-plan/${BUILD_PLAN_SCHEMA_FILE}\`.`,
77
77
  ...artifactLines,
78
78
  "- `.interf/runtime/` holds runtime artifacts written by Interf.",
79
79
  "- `.interf/tests/` mirrors the latest saved readiness-check run and keeps detailed target runs plus preserved sandboxes.",
80
- "- `.interf/tests/targets/` holds detailed source-files and compiled target runs plus preserved test sandboxes.",
80
+ "- `.interf/tests/targets/` holds detailed source-files and verifiable-context target runs plus preserved test sandboxes.",
81
81
  "",
82
82
  "## Manual query rules",
83
83
  "",
84
- "- Prefer the Method-declared context outputs before source re-checks.",
85
- "- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/method/use/query/SKILL.md`.",
86
- "- Treat `.interf/` as method/runtime metadata, not answer evidence, unless explicitly asked to inspect Method or test history.",
87
- "- Use `.interf/runtime/source-snapshot.json` to find source references for quotes, verification, ambiguity, or evidence the portable context does not expose well.",
84
+ "- Prefer the Build Plan-declared context outputs before source re-checks.",
85
+ "- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/build-plan/use/query/SKILL.md`.",
86
+ "- Treat `.interf/` as Build Plan/runtime metadata, not answer evidence, unless explicitly asked to inspect Build Plan or test history.",
87
+ "- Use `.interf/runtime/source-snapshot.json` to find source references for quotes, verification, ambiguity, or evidence the verifiable context does not expose well.",
88
88
  "- If exact chart, table, or image-derived evidence matters, inspect the source reference and say whether the answer was text-derived, table-derived, or chart-derived.",
89
89
  "",
90
90
  "## Commands",
91
91
  "",
92
92
  "```",
93
- "interf compile build this portable context",
94
- "interf verify run checks against this portable context",
93
+ "interf build <prep-id> build this verifiable context",
94
+ "interf test run readiness checks against this verifiable context",
95
95
  "interf status show deterministic health",
96
96
  "```",
97
97
  "",
98
98
  "## Rules",
99
99
  "",
100
- "- Do not modify source files while answering from this portable context.",
100
+ "- Do not modify source files while answering from this verifiable context.",
101
101
  "- Treat prepared notes as working context, not final truth.",
102
102
  "- When confidence is low, verify against the source references before answering strongly.",
103
103
  "",
104
104
  ].join("\n");
105
105
  }
106
- export function renderCompiledQuerySkill() {
106
+ export function renderVerifiableContextQuerySkill() {
107
107
  return [
108
108
  "# Manual Query Loop",
109
109
  "",
110
110
  "This file is the editable authoring source for the generated native local `interf-query` skill.",
111
111
  "",
112
112
  "Default loop:",
113
- "1. Read `.interf/method/README.md` and this file first.",
114
- `2. Use the Method Artifacts declared in \`.interf/method/${METHOD_SCHEMA_FILE}\` before consulting source references.`,
115
- "3. Use `.interf/runtime/source-snapshot.json` for direct quotes, verification, exact lookups, and cases where the portable context is missing the needed evidence or is ambiguous.",
113
+ "1. Read `.interf/build-plan/README.md` and this file first.",
114
+ `2. Use the Build Plan Artifacts declared in \`.interf/build-plan/${BUILD_PLAN_SCHEMA_FILE}\` before consulting source references.`,
115
+ "3. Use `.interf/runtime/source-snapshot.json` for direct quotes, verification, exact lookups, and cases where the verifiable context is missing the needed evidence or is ambiguous.",
116
116
  "",
117
117
  "Answering rule:",
118
118
  "- do not modify source files while answering",
119
- "- treat the Method as the portable-context contract and use its Artifacts as the working retrieval surface",
119
+ "- treat the Build Plan as the verifiable-context contract and use its Artifacts as the working retrieval surface",
120
120
  "- say explicitly when an answer depends on approximation, bounded inference, or a source re-check",
121
- "- use source references to confirm source page, metric family, provenance, or exact wording when the portable context is missing the needed evidence or is ambiguous",
122
- "- do not invent navigation or note structure beyond what this Method declares",
123
- "- when the portable context is insufficient, verify against source references and then answer",
121
+ "- use source references to confirm source page, metric family, provenance, or exact wording when the verifiable context is missing the needed evidence or is ambiguous",
122
+ "- do not invent navigation or note structure beyond what this Build Plan declares",
123
+ "- when the verifiable context is insufficient, verify against source references and then answer",
124
124
  "",
125
- "You can edit this file to bias manual question-answering behavior for this portable context.",
125
+ "You can edit this file to bias manual question-answering behavior for this verifiable context.",
126
126
  "",
127
127
  ].join("\n");
128
128
  }
@@ -132,7 +132,7 @@ function renderSourceFilesTestAgents() {
132
132
  "# Source Files Test Shell",
133
133
  "",
134
134
  "This is an isolated source-files test shell generated by Interf.",
135
- "There is no portable context in this shell.",
135
+ "There is no verifiable context in this shell.",
136
136
  "",
137
137
  "## How to use this shell",
138
138
  "",
@@ -143,7 +143,7 @@ function renderSourceFilesTestAgents() {
143
143
  "## Rules",
144
144
  "",
145
145
  "- Answer only from source files listed in `runtime/source-files.json`.",
146
- "- There is no portable context here, so do not assume any portable-context Artifacts exist.",
146
+ "- There is no verifiable context here, so do not assume any verifiable-context Artifacts exist.",
147
147
  "- Do not treat hidden runtime files or test artifacts as evidence.",
148
148
  ...chartNotes,
149
149
  "- Write the requested answer and trace files, then stop.",
@@ -168,19 +168,19 @@ function renderSourceFilesTestQuerySkill() {
168
168
  "1. Read `runtime/source-files.json`.",
169
169
  "2. Verify exact claims against the listed source locators before answering strongly.",
170
170
  ...chartNotes,
171
- "8. Do not rely on portable-context artifacts because they do not exist in this shell.",
171
+ "8. Do not rely on verifiable-context artifacts because they do not exist in this shell.",
172
172
  "",
173
173
  ].join("\n");
174
174
  }
175
- function readCompiledQuerySkillSource(compiledPath) {
176
- const filePath = compiledQuerySkillSourcePath(compiledPath);
175
+ function readVerifiableContextQuerySkillSource(verifiableContextPath) {
176
+ const filePath = verifiableContextQuerySkillSourcePath(verifiableContextPath);
177
177
  if (!existsSync(filePath)) {
178
- 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.`);
178
+ throw new Error(`Missing verifiable-context query skill source at ${filePath}. Interf build runs the local Build Plan package directly, so reseed or repair this verifiable context instead of auto-healing query docs.`);
179
179
  }
180
180
  return readFileSync(filePath, "utf8").trim();
181
181
  }
182
- function stageShellMethodRoot(shellRoot) {
183
- return join(shellRoot, METHOD_PACKAGE_DIR);
182
+ function stageShellBuildPlanRoot(shellRoot) {
183
+ return join(shellRoot, BUILD_PLAN_PACKAGE_DIR);
184
184
  }
185
185
  function shellInputArtifactPath(shellRoot, artifactId) {
186
186
  return join(shellRoot, "inputs", artifactId);
@@ -233,11 +233,11 @@ function linkRelativePath(targetPath, linkPathname) {
233
233
  mkdirSync(dirname(linkPathname), { recursive: true });
234
234
  symlinkSync(relative(dirname(linkPathname), targetPath), linkPathname);
235
235
  }
236
- function loadCompiledSchema(compiledPath) {
237
- const methodRoot = methodPackagePathForCompiled(compiledPath);
238
- const schema = readCompiledSchemaFile(methodRoot);
236
+ function loadVerifiableContextSchema(verifiableContextPath) {
237
+ const buildPlanRoot = buildPlanPackagePathForVerifiableContext(verifiableContextPath);
238
+ const schema = readBuildPlanContextFile(buildPlanRoot);
239
239
  if (!schema) {
240
- throw new Error(`Missing Method schema at ${join(methodRoot, METHOD_SCHEMA_FILE)}`);
240
+ throw new Error(`Missing Build Plan schema at ${join(buildPlanRoot, BUILD_PLAN_SCHEMA_FILE)}`);
241
241
  }
242
242
  return schema;
243
243
  }
@@ -247,7 +247,7 @@ function artifactMap(schema) {
247
247
  function artifactOrThrow(artifacts, artifactId) {
248
248
  const artifact = artifacts.get(artifactId);
249
249
  if (!artifact) {
250
- throw new Error(`Missing Method schema Artifact "${artifactId}" for stage shell projection.`);
250
+ throw new Error(`Missing Build Plan schema Artifact "${artifactId}" for stage shell projection.`);
251
251
  }
252
252
  return artifact;
253
253
  }
@@ -301,25 +301,25 @@ function ensureShellLocalProjection(sourcePath, targetPath, artifact) {
301
301
  }
302
302
  mkdirSync(targetPath, { recursive: true });
303
303
  }
304
- function ensureCompiledExecutionSurface(compiledPath) {
305
- mkdirSync(compiledRuntimeRoot(compiledPath), { recursive: true });
306
- mkdirSync(methodPackagePathForCompiled(compiledPath), { recursive: true });
307
- const schema = loadCompiledSchema(compiledPath);
308
- ensureCompiledArtifactTargets(compiledPath, schema);
304
+ function ensureBuildExecutionSurface(verifiableContextPath) {
305
+ mkdirSync(verifiableContextRuntimeRoot(verifiableContextPath), { recursive: true });
306
+ mkdirSync(buildPlanPackagePathForVerifiableContext(verifiableContextPath), { recursive: true });
307
+ const schema = loadVerifiableContextSchema(verifiableContextPath);
308
+ ensureBuildPlanArtifactTargets(verifiableContextPath, schema);
309
309
  return schema;
310
310
  }
311
- function readStageMethodDoc(compiledPath, stage) {
312
- const path = join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir, "SKILL.md");
311
+ function readStageBuildPlanDoc(verifiableContextPath, stage) {
312
+ const path = join(buildPlanPackagePathForVerifiableContext(verifiableContextPath), "build", "stages", stage.skillDir, "SKILL.md");
313
313
  if (!existsSync(path))
314
314
  return null;
315
315
  return readFileSync(path, "utf8").trim();
316
316
  }
317
- function stageMethodDocsPath(compiledPath, stage) {
318
- return join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir);
317
+ function stageBuildPlanDocsPath(verifiableContextPath, stage) {
318
+ return join(buildPlanPackagePathForVerifiableContext(verifiableContextPath), "build", "stages", stage.skillDir);
319
319
  }
320
- function renderStageExecutionAgents(compiledName, methodId, stage) {
320
+ function renderStageExecutionAgents(verifiableContextName, buildPlanId, stage) {
321
321
  return [
322
- `# ${compiledName} — ${stage.label} Execution Shell`,
322
+ `# ${verifiableContextName} — ${stage.label} Execution Shell`,
323
323
  "",
324
324
  "This is an ephemeral stage-execution shell generated by Interf.",
325
325
  "It is for automated pipeline execution only, not for manual querying.",
@@ -339,16 +339,16 @@ function renderStageExecutionAgents(compiledName, methodId, stage) {
339
339
  "- For file Artifacts, `runtime/paths.json` points to the exact file path inside those mount roots.",
340
340
  "- `runtime/source-snapshot.json` = source references captured for this run.",
341
341
  "- `runtime/stage-inputs.json` = exact source references assigned to this stage.",
342
- "- declared Artifact paths are also projected at the shell root so Method-relative contract paths stay valid.",
342
+ "- declared Artifact paths are also projected at the shell root so Build Plan-relative contract paths stay valid.",
343
343
  "- `runtime/` = stage contract and machine-readable path map for this shell.",
344
- "- `method/` = Method metadata, `method.schema.json`, and docs for the current stage only.",
344
+ "- `build-plan/` = Build Plan metadata, `build-plan.schema.json`, and docs for the current stage only.",
345
345
  "",
346
346
  "## Boundaries",
347
347
  "",
348
- `- Method: \`${methodId}\`.`,
348
+ `- Build Plan: \`${buildPlanId}\`.`,
349
349
  `- Contract type: \`${stage.contractType}\`.`,
350
- "- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the portable-context query shell.",
351
- "- The portable context root itself is not linked into this shell.",
350
+ "- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the verifiable-context query shell.",
351
+ "- The verifiable-context root itself is not linked into this shell.",
352
352
  "- Do not switch into query mode or act like a user-facing assistant.",
353
353
  "- Do not modify files under `inputs/` unless the same Artifact is also mounted under `outputs/`.",
354
354
  "",
@@ -366,7 +366,7 @@ function renderStageExecutionAgents(compiledName, methodId, stage) {
366
366
  "",
367
367
  ].join("\n");
368
368
  }
369
- function renderStageExecutionSkill(stage, stageMethodDoc) {
369
+ function renderStageExecutionSkill(stage, stageBuildPlanDoc) {
370
370
  return [
371
371
  "---",
372
372
  "name: interf-stage",
@@ -390,64 +390,64 @@ function renderStageExecutionSkill(stage, stageMethodDoc) {
390
390
  `- contract type: \`${stage.contractType}\``,
391
391
  `- reads: ${stage.reads.join(", ")}`,
392
392
  `- writes: ${stage.writes.join(", ")}`,
393
- `- editable source: \`method/compile/stages/${stage.skillDir}/SKILL.md\``,
393
+ `- editable source: \`build-plan/build/stages/${stage.skillDir}/SKILL.md\``,
394
394
  "",
395
- ...(stageMethodDoc
395
+ ...(stageBuildPlanDoc
396
396
  ? [
397
- "## Stage Method",
397
+ "## Stage Build Plan",
398
398
  "",
399
- stageMethodDoc,
399
+ stageBuildPlanDoc,
400
400
  "",
401
401
  ]
402
402
  : []),
403
403
  ].join("\n");
404
404
  }
405
- function renderCompiledQueryNativeSkill(querySkillContent) {
405
+ function renderVerifiableContextQueryNativeSkill(querySkillContent) {
406
406
  return [
407
407
  "---",
408
408
  "name: interf-query",
409
409
  "description: >",
410
- " Native local query skill for this portable context built by Interf.",
411
- " Use it for manual questions against the portable context and source references.",
410
+ " Native local query skill for verifiable context built by Interf.",
411
+ " Use it for manual questions against verifiable context and source references.",
412
412
  "---",
413
413
  "",
414
414
  "# Interf Query",
415
415
  "",
416
- "This is the native local query skill for portable context built by Interf.",
417
- "Use it when reading this portable context manually.",
418
- "Editable source: `.interf/method/use/query/SKILL.md`.",
416
+ "This is the native local query skill for verifiable context built by Interf.",
417
+ "Use it when reading this verifiable context manually.",
418
+ "Editable source: `.interf/build-plan/use/query/SKILL.md`.",
419
419
  "",
420
420
  querySkillContent.trim(),
421
421
  "",
422
422
  ].join("\n");
423
423
  }
424
- function projectMethodMetadata(compiledPath, shellRoot, stage) {
425
- const shellMethodRoot = stageShellMethodRoot(shellRoot);
426
- mkdirSync(join(shellMethodRoot, "compile", "stages"), { recursive: true });
427
- const compiledMethodRoot = methodPackagePathForCompiled(compiledPath);
428
- const methodJsonPath = join(compiledMethodRoot, "method.json");
429
- if (existsSync(methodJsonPath)) {
430
- linkPath(methodJsonPath, join(shellMethodRoot, "method.json"));
424
+ function projectBuildPlanMetadata(verifiableContextPath, shellRoot, stage) {
425
+ const shellBuildPlanRoot = stageShellBuildPlanRoot(shellRoot);
426
+ mkdirSync(join(shellBuildPlanRoot, "build", "stages"), { recursive: true });
427
+ const verifiableContextBuildPlanRoot = buildPlanPackagePathForVerifiableContext(verifiableContextPath);
428
+ const buildPlanJsonPath = join(verifiableContextBuildPlanRoot, "build-plan.json");
429
+ if (existsSync(buildPlanJsonPath)) {
430
+ linkPath(buildPlanJsonPath, join(shellBuildPlanRoot, "build-plan.json"));
431
431
  }
432
- const compiledSchemaPath = resolveMethodSchemaPath(compiledMethodRoot);
433
- if (compiledSchemaPath) {
434
- linkPath(compiledSchemaPath, join(shellMethodRoot, METHOD_SCHEMA_FILE));
432
+ const buildPlanSchemaPath = resolveBuildPlanSchemaPath(verifiableContextBuildPlanRoot);
433
+ if (buildPlanSchemaPath) {
434
+ linkPath(buildPlanSchemaPath, join(shellBuildPlanRoot, BUILD_PLAN_SCHEMA_FILE));
435
435
  }
436
- const readmePath = join(compiledMethodRoot, "README.md");
436
+ const readmePath = join(verifiableContextBuildPlanRoot, "README.md");
437
437
  if (existsSync(readmePath)) {
438
- linkPath(readmePath, join(shellMethodRoot, "README.md"));
438
+ linkPath(readmePath, join(shellBuildPlanRoot, "README.md"));
439
439
  }
440
- const stageDocsPath = stageMethodDocsPath(compiledPath, stage);
440
+ const stageDocsPath = stageBuildPlanDocsPath(verifiableContextPath, stage);
441
441
  if (existsSync(stageDocsPath)) {
442
- linkPath(stageDocsPath, join(shellMethodRoot, "compile", "stages", stage.skillDir));
442
+ linkPath(stageDocsPath, join(shellBuildPlanRoot, "build", "stages", stage.skillDir));
443
443
  }
444
444
  }
445
- function projectCompiledSchemaArtifacts(compiledPath, shellRoot, schema, artifactIds, materializedArtifactIds) {
445
+ function projectVerifiableContextSchemaArtifacts(verifiableContextPath, shellRoot, schema, artifactIds, materializedArtifactIds) {
446
446
  const allowedArtifactIds = artifactIds ? new Set(artifactIds) : null;
447
447
  for (const artifact of listContextInterfaceArtifacts(schema)) {
448
448
  if (allowedArtifactIds && !allowedArtifactIds.has(artifact.id))
449
449
  continue;
450
- const sourcePath = compiledArtifactAbsolutePath(compiledPath, artifact);
450
+ const sourcePath = verifiableContextArtifactAbsolutePath(verifiableContextPath, artifact);
451
451
  const targetPath = join(shellRoot, artifact.path);
452
452
  if (materializedArtifactIds?.has(artifact.id)) {
453
453
  ensureShellLocalProjection(sourcePath, targetPath, artifact);
@@ -456,7 +456,7 @@ function projectCompiledSchemaArtifacts(compiledPath, shellRoot, schema, artifac
456
456
  linkPath(sourcePath, targetPath);
457
457
  }
458
458
  }
459
- function buildStageArtifactMounts(compiledPath, shellRoot, stage, schema) {
459
+ function buildStageArtifactMounts(verifiableContextPath, shellRoot, stage, schema) {
460
460
  const artifacts = artifactMap(schema);
461
461
  const mountFor = (artifactId) => {
462
462
  const artifact = artifactOrThrow(artifacts, artifactId);
@@ -490,19 +490,19 @@ function projectStageArtifactMountAliases(shellRoot, stage, schema) {
490
490
  }
491
491
  }
492
492
  }
493
- function writeExecutionShellPathsFile(shellRoot, methodId, stage, mounts) {
493
+ function writeExecutionShellPathsFile(shellRoot, buildPlanId, stage, mounts) {
494
494
  const paths = {
495
495
  kind: "interf-execution-shell",
496
496
  version: 1,
497
- method: methodId,
497
+ build_plan: buildPlanId,
498
498
  stage: stage.id,
499
499
  reads: mounts.reads,
500
500
  writes: mounts.writes,
501
501
  };
502
502
  writeFileSync(shellRuntimePath(shellRoot, "paths.json"), `${JSON.stringify(paths, null, 2)}\n`);
503
503
  }
504
- export function syncStageExecutionShellWrites(compiledPath, shellRoot, stage, writeArtifacts = []) {
505
- const schema = ensureCompiledExecutionSurface(compiledPath);
504
+ export function syncStageExecutionShellWrites(verifiableContextPath, shellRoot, stage, writeArtifacts = []) {
505
+ const schema = ensureBuildExecutionSurface(verifiableContextPath);
506
506
  const artifacts = artifactMap(schema);
507
507
  const stageWriteArtifacts = Array.from(stageWriteArtifactSet(schema, stage))
508
508
  .map((artifactId) => artifactOrThrow(artifacts, artifactId));
@@ -519,25 +519,25 @@ export function syncStageExecutionShellWrites(compiledPath, shellRoot, stage, wr
519
519
  const shellArtifactStat = lstatSync(shellArtifactPath);
520
520
  if (shellArtifactStat.isSymbolicLink())
521
521
  continue;
522
- const compiledArtifactPath = compiledArtifactAbsolutePath(compiledPath, artifact);
522
+ const verifiableContextArtifactPath = verifiableContextArtifactAbsolutePath(verifiableContextPath, artifact);
523
523
  if (shellArtifactStat.isDirectory()) {
524
524
  const shellArtifactFiles = listFilesRecursive(shellArtifactPath);
525
- const compiledArtifactFiles = existsSync(compiledArtifactPath)
526
- ? listFilesRecursive(compiledArtifactPath)
525
+ const verifiableContextArtifactFiles = existsSync(verifiableContextArtifactPath)
526
+ ? listFilesRecursive(verifiableContextArtifactPath)
527
527
  : [];
528
- if (shellArtifactFiles.length === 0 && compiledArtifactFiles.length > 0) {
528
+ if (shellArtifactFiles.length === 0 && verifiableContextArtifactFiles.length > 0) {
529
529
  continue;
530
530
  }
531
- rmSync(compiledArtifactPath, { recursive: true, force: true });
532
- mkdirSync(dirname(compiledArtifactPath), { recursive: true });
533
- cpSync(shellArtifactPath, compiledArtifactPath, {
531
+ rmSync(verifiableContextArtifactPath, { recursive: true, force: true });
532
+ mkdirSync(dirname(verifiableContextArtifactPath), { recursive: true });
533
+ cpSync(shellArtifactPath, verifiableContextArtifactPath, {
534
534
  recursive: true,
535
535
  force: true,
536
536
  });
537
537
  continue;
538
538
  }
539
- mkdirSync(dirname(compiledArtifactPath), { recursive: true });
540
- copyFileSync(shellArtifactPath, compiledArtifactPath);
539
+ mkdirSync(dirname(verifiableContextArtifactPath), { recursive: true });
540
+ copyFileSync(shellArtifactPath, verifiableContextArtifactPath);
541
541
  }
542
542
  for (const artifactPath of writeArtifacts) {
543
543
  const normalizedArtifactPath = normalizeArtifactRelativePath(artifactPath);
@@ -548,21 +548,21 @@ export function syncStageExecutionShellWrites(compiledPath, shellRoot, stage, wr
548
548
  const shellArtifactPath = join(shellRoot, normalizedArtifactPath);
549
549
  if (!existsSync(shellArtifactPath))
550
550
  continue;
551
- const compiledArtifactPath = join(compiledPath, normalizedArtifactPath);
551
+ const verifiableContextArtifactPath = join(verifiableContextPath, normalizedArtifactPath);
552
552
  const shellArtifactStat = lstatSync(shellArtifactPath);
553
553
  if (shellArtifactStat.isSymbolicLink())
554
554
  continue;
555
555
  if (shellArtifactStat.isDirectory()) {
556
- rmSync(compiledArtifactPath, { recursive: true, force: true });
557
- mkdirSync(dirname(compiledArtifactPath), { recursive: true });
558
- cpSync(shellArtifactPath, compiledArtifactPath, {
556
+ rmSync(verifiableContextArtifactPath, { recursive: true, force: true });
557
+ mkdirSync(dirname(verifiableContextArtifactPath), { recursive: true });
558
+ cpSync(shellArtifactPath, verifiableContextArtifactPath, {
559
559
  recursive: true,
560
560
  force: true,
561
561
  });
562
562
  continue;
563
563
  }
564
- mkdirSync(dirname(compiledArtifactPath), { recursive: true });
565
- copyFileSync(shellArtifactPath, compiledArtifactPath);
564
+ mkdirSync(dirname(verifiableContextArtifactPath), { recursive: true });
565
+ copyFileSync(shellArtifactPath, verifiableContextArtifactPath);
566
566
  }
567
567
  }
568
568
  function preservedShellManifestPath(rootPath) {
@@ -578,14 +578,14 @@ function shouldSkipFrozenStageShellRelativePath(relativePath) {
578
578
  normalized.includes("/improvement-loops/");
579
579
  }
580
580
  /**
581
- * System path prefixes a malicious symlink in a Method package must
581
+ * System path prefixes a malicious symlink in a Build Plan package must
582
582
  * never reach. Without this, the freeze-snapshot logic could be
583
583
  * tricked into copying anything the running user has access to —
584
584
  * `/etc/passwd`, `~/.ssh/id_rsa`, etc. (CSO finding).
585
585
  *
586
586
  * We deliberately allow targets that escape the immediate freeze
587
587
  * root: legitimate execution shells contain symlinks pointing back
588
- * to the parent workspace's `interf.json`. The threat is only links
588
+ * to the parent Preparation's `interf.json`. The threat is only links
589
589
  * that resolve into truly system-level paths.
590
590
  */
591
591
  const FORBIDDEN_SYMLINK_TARGET_PREFIXES = [
@@ -637,7 +637,7 @@ function copyResolvedTree(options) {
637
637
  // Refuse symlinks resolving into system paths (CSO finding). We
638
638
  // deliberately allow links that escape the immediate freeze root
639
639
  // because legitimate execution shells contain links back to the
640
- // parent workspace's interf.json — the only thing we care about
640
+ // parent Preparation's interf.json — the only thing we care about
641
641
  // is that the realpath does not land in /etc, /sys, /proc, etc.
642
642
  ensureSymlinkTargetSafe(realTarget, options.sourcePath);
643
643
  const realStat = statSync(realTarget);
@@ -725,30 +725,30 @@ export function renderClaudeBootstrap(content) {
725
725
  "",
726
726
  ].join("\n");
727
727
  }
728
- function renderMethodAuthoringAgents(options) {
728
+ function renderBuildPlanAuthoringAgents(options) {
729
729
  return [
730
- `# ${options.label} — Method Authoring Shell`,
730
+ `# ${options.label} — Build Plan Authoring Shell`,
731
731
  "",
732
- "This is an automated Method-authoring shell generated by Interf.",
733
- "It exists to create one standalone Method package from the source data, desired portable-context outputs, and proof requirements in this task.",
732
+ "This is an automated Build Plan authoring shell generated by Interf.",
733
+ "It exists to create one standalone Build Plan package from the source data, desired verifiable-context outputs, and proof requirements in this task.",
734
734
  "",
735
735
  "## Start Here",
736
736
  "",
737
737
  "1. Read `runtime/authoring-context.json` now.",
738
- `2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
738
+ `2. Read \`build-plan/README.md\`, \`build-plan/build-plan.json\`, and \`build-plan/${BUILD_PLAN_SCHEMA_FILE}\` now.`,
739
739
  "3. Read `runtime/source-files.json` and review the listed source locators.",
740
- "4. Use the local native `interf-method-author` skill now.",
740
+ "4. Use the local native `interf-build-plan-author` skill now.",
741
741
  "",
742
742
  "## Boundaries",
743
743
  "",
744
- `- New Method package id: \`${options.methodId}\`.`,
744
+ `- New Build Plan id: \`${options.buildPlanId}\`.`,
745
745
  "- Authoring mode: from scratch.",
746
- ...(options.referenceMethodId
747
- ? [`- Reference Method package id: \`${options.referenceMethodId}\` (context only, not a seed).`]
746
+ ...(options.referenceBuildPlanId
747
+ ? [`- Reference Build Plan id: \`${options.referenceBuildPlanId}\` (context only, not a seed).`]
748
748
  : []),
749
- "- Edit only files under `method/`.",
749
+ "- Edit only files under `build-plan/`.",
750
750
  "- Do not edit source artifacts.",
751
- "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
751
+ "- Keep the Build Plan package valid for the current build API and `build-plan.schema.json`.",
752
752
  "- Use kebab-case ids everywhere: stage ids, skill_dir values, Artifact ids, reads/writes values, and package ids. Never use underscores.",
753
753
  "- Put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks.",
754
754
  "- Prefer direct file-reading and search tools over shell commands for routine file inspection.",
@@ -756,70 +756,74 @@ function renderMethodAuthoringAgents(options) {
756
756
  "",
757
757
  "## Goal",
758
758
  "",
759
- "- produce one standalone Method package tuned to the source data, desired outputs, and checks in this task",
759
+ "- produce one standalone Build Plan package tuned to the source data, desired outputs, and checks in this task",
760
760
  "- replace the neutral scaffold topology with the stage graph this agent work needs",
761
761
  "- define Artifacts and checks so Interf can show whether the data is ready",
762
762
  "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
763
+ "- otherwise draft the Build Plan Artifacts from every `requested_artifacts[]` entry; do not ignore or truncate them",
763
764
  "- preserve deterministic stage and context-interface contracts",
764
- "- stop once the Method edits are complete",
765
+ "- stop once the Build Plan edits are complete",
765
766
  "",
766
767
  ].join("\n");
767
768
  }
768
- function renderMethodAuthoringSkill() {
769
+ function renderBuildPlanAuthoringSkill() {
769
770
  return [
770
771
  "---",
771
- "name: interf-method-author",
772
+ "name: interf-build-plan-author",
772
773
  "description: >",
773
- " Native local Method-authoring skill for an automated Interf Method draft run.",
774
+ " Native local Build Plan authoring skill for an automated Interf Build Plan draft run.",
774
775
  "---",
775
776
  "",
776
- "# Interf Method Authoring",
777
+ "# Interf Build Plan Authoring",
777
778
  "",
778
779
  "Read `runtime/authoring-context.json` first.",
779
- "Then review the neutral Method package scaffold under `method/`, read `runtime/source-files.json`, and inspect the listed source locators when needed.",
780
+ "Then review the neutral Build Plan package scaffold under `build-plan/`, read `runtime/source-files.json`, and inspect the listed source locators when needed.",
780
781
  "",
781
782
  "Rules:",
782
- "- edit only `method/`",
783
- `- keep \`method.json\`, \`${METHOD_SCHEMA_FILE}\`, and any changed stage docs aligned`,
783
+ "- edit only `build-plan/`",
784
+ `- keep \`build-plan.json\`, \`${BUILD_PLAN_SCHEMA_FILE}\`, and any changed stage docs aligned`,
784
785
  "- put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks",
785
786
  "- use only CheckKind values listed in `runtime/authoring-context.json`; do not invent aliases",
786
- "- keep Artifact checks and the producing stage docs aligned",
787
+ "- keep Artifact checks aligned with produced outputs; use stage docs to describe the output contract without requiring exact source-specific phrases in the stage docs",
787
788
  "- satisfy every `artifact_requirements[]` entry from `runtime/authoring-context.json` when entries are present",
789
+ "- otherwise draft the Build Plan Artifacts from every `requested_artifacts[]` entry; do not ignore or truncate them",
788
790
  "- design the stage graph from the source data and preparation-and-evidence brief",
789
791
  "- use kebab-case ids everywhere: stage ids, skill_dir values, Artifact ids, reads/writes values, and package ids; never use underscores",
790
- "- replace the placeholder `prepare` stage unless that exact stage is truly the final method",
792
+ "- replace the placeholder `prepare` stage unless that exact stage is truly the final Build Plan",
791
793
  "- keep the package standalone; do not introduce runtime inheritance or hidden source-package assumptions",
792
- "- do not introduce wikilinks unless the Method also creates the target note by exact basename or explicit relative path",
794
+ "- do not introduce wikilinks unless the Build Plan also creates the target note by exact basename or explicit relative path",
793
795
  "- respect stage boundaries: do not make structure outputs link to notes or entrypoints first created by later stages",
794
796
  "- prefer conservative routing changes over speculative note sprawl",
795
797
  "- prefer direct file-reading and search tools over shell commands for routine file inspection",
796
798
  "- do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files",
797
- "- do not hardcode readiness-check answers into reusable Method docs",
799
+ "- do not hardcode readiness-check answers into reusable Build Plan docs",
798
800
  "- do not edit source artifacts",
799
801
  "",
800
802
  ].join("\n");
801
803
  }
802
- function improvementMethodDocsPath(compiledPath) {
803
- return join(methodPackagePathForCompiled(compiledPath), "improve");
804
+ function improvementBuildPlanDocsPath(verifiableContextPath) {
805
+ return join(buildPlanPackagePathForVerifiableContext(verifiableContextPath), "improve");
804
806
  }
805
- export function createMethodAuthoringShell(options) {
806
- const shellRoot = mkdtempSync(join(tmpdir(), `interf-method-author-${options.methodId}-`));
807
+ export function createBuildPlanAuthoringShell(options) {
808
+ const shellRoot = mkdtempSync(join(tmpdir(), `interf-build-plan-author-${options.buildPlanId}-`));
807
809
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
808
810
  mkdirSync(join(shellRoot, "artifacts"), { recursive: true });
809
811
  mkdirSync(join(shellRoot, "logs"), { recursive: true });
810
812
  const context = {
811
- kind: "interf-method-authoring",
813
+ kind: "interf-build-plan-authoring",
812
814
  version: 1,
813
815
  generated_at: new Date().toISOString(),
814
816
  authoring_mode: "from-scratch",
815
- method_id: options.methodId,
816
- method_label: options.label,
817
- ...(options.referenceMethodId ? { reference_method_id: options.referenceMethodId } : {}),
817
+ build_plan_id: options.buildPlanId,
818
+ build_plan_label: options.label,
819
+ ...(options.referenceBuildPlanId ? { reference_build_plan_id: options.referenceBuildPlanId } : {}),
818
820
  task_prompt: options.taskPrompt,
819
821
  allowed_check_kinds: CHECK_KINDS,
822
+ requested_artifacts: options.requestedArtifacts ?? [],
820
823
  artifact_requirements: options.artifactRequirements ?? [],
821
824
  preparation: {
822
825
  source_folder_path: options.sourceFolderPath,
826
+ source_profile: options.sourceProfile ?? null,
823
827
  checks: {
824
828
  count: options.checks.length,
825
829
  questions: options.checks.map((check, index) => ({
@@ -830,88 +834,88 @@ export function createMethodAuthoringShell(options) {
830
834
  },
831
835
  };
832
836
  writeFileSync(join(shellRoot, "runtime", "authoring-context.json"), `${JSON.stringify(context, null, 2)}\n`);
833
- writeFileSync(join(shellRoot, "runtime", "source-files.json"), `${JSON.stringify(buildCompiledSourceFiles(shellRoot, options.sourceFolderPath), null, 2)}\n`);
837
+ writeFileSync(join(shellRoot, "runtime", "source-files.json"), `${JSON.stringify(buildVerifiableContextSourceFiles(shellRoot, options.sourceFolderPath), null, 2)}\n`);
834
838
  copyResolvedTree({
835
- sourcePath: options.methodPath,
836
- targetPath: join(shellRoot, "method"),
837
- shellType: "method-authoring",
839
+ sourcePath: options.buildPlanPath,
840
+ targetPath: join(shellRoot, "build-plan"),
841
+ shellType: "build-plan-authoring",
838
842
  });
839
- writeNativeAgentSurface(shellRoot, renderMethodAuthoringAgents({
840
- methodId: options.methodId,
843
+ writeNativeAgentSurface(shellRoot, renderBuildPlanAuthoringAgents({
844
+ buildPlanId: options.buildPlanId,
841
845
  label: options.label,
842
- referenceMethodId: options.referenceMethodId ?? null,
843
- }), "interf-method-author", renderMethodAuthoringSkill());
846
+ referenceBuildPlanId: options.referenceBuildPlanId ?? null,
847
+ }), "interf-build-plan-author", renderBuildPlanAuthoringSkill());
844
848
  return {
845
849
  rootPath: shellRoot,
846
- methodBeforePath: join(shellRoot, "artifacts", "method-before"),
847
- methodAfterPath: join(shellRoot, "artifacts", "method-after"),
848
- promptLogPath: join(shellRoot, "logs", "method-author.prompt.txt"),
849
- eventLogPath: join(shellRoot, "logs", "method-author.events.ndjson"),
850
- statusLogPath: join(shellRoot, "logs", "method-author.status.log"),
850
+ buildPlanBeforePath: join(shellRoot, "artifacts", "build-plan-before"),
851
+ buildPlanAfterPath: join(shellRoot, "artifacts", "build-plan-after"),
852
+ promptLogPath: join(shellRoot, "logs", "build-plan-author.prompt.txt"),
853
+ eventLogPath: join(shellRoot, "logs", "build-plan-author.events.ndjson"),
854
+ statusLogPath: join(shellRoot, "logs", "build-plan-author.status.log"),
851
855
  };
852
856
  }
853
- function renderMethodImprovementAgents(compiledName, methodId, loopIndex) {
857
+ function renderBuildPlanImprovementAgents(verifiableContextName, buildPlanId, loopIndex) {
854
858
  return [
855
- `# ${compiledName} — Method Improvement Shell`,
859
+ `# ${verifiableContextName} — Build Plan Improvement Shell`,
856
860
  "",
857
- "This is an automated Method-improvement shell generated by Interf.",
858
- "It exists to review failed compile/test runs and edit the Method package for the next variation.",
861
+ "This is an automated Build Plan improvement shell generated by Interf.",
862
+ "It exists to review failed Build/check runs and edit the Build Plan package for the next variation.",
859
863
  "",
860
864
  "## Start Here",
861
865
  "",
862
866
  "1. Read `runtime/loop-context.json` now.",
863
- `2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
864
- "3. Read `method/improve/SKILL.md` now.",
865
- "4. Use the local native `interf-method-improver` skill now.",
867
+ `2. Read \`build-plan/README.md\`, \`build-plan/build-plan.json\`, and \`build-plan/${BUILD_PLAN_SCHEMA_FILE}\` now.`,
868
+ "3. Read `build-plan/improve/SKILL.md` now.",
869
+ "4. Use the local native `interf-build-plan-improver` skill now.",
866
870
  "",
867
871
  "## Boundaries",
868
872
  "",
869
- `- Method: \`${methodId}\`.`,
873
+ `- Build Plan: \`${buildPlanId}\`.`,
870
874
  `- Improvement loop: ${loopIndex}.`,
871
- "- Edit only files under `method/`.",
875
+ "- Edit only files under `build-plan/`.",
872
876
  "- Do not edit checks, test specs, source files, or generated context outputs.",
873
- "- Review context outputs under `artifacts/compiled-view/` and test/runtime evidence under `artifacts/`.",
874
- "- Keep the Method package valid for the current compiler API and `method.schema.json`.",
877
+ "- Review verifiable-context outputs under `artifacts/verifiable-context-view/` and test/runtime evidence under `artifacts/`.",
878
+ "- Keep the Build Plan package valid for the current build API and `build-plan.schema.json`.",
875
879
  "- Put deterministic validation on Artifact `checks[]`; do not add stage `acceptance` blocks.",
876
880
  "",
877
881
  "## Goal",
878
882
  "",
879
- "- create a better Method variation for this kind of agent work",
880
- "- preserve deterministic portable-context structure",
881
- "- stop after the Method edits are complete",
883
+ "- create a better Build Plan variation for this kind of agent work",
884
+ "- preserve deterministic verifiable-context structure",
885
+ "- stop after the Build Plan edits are complete",
882
886
  "",
883
887
  ].join("\n");
884
888
  }
885
- function readMethodImprovementDoc(compiledPath) {
886
- const path = join(improvementMethodDocsPath(compiledPath), "SKILL.md");
889
+ function readBuildPlanImprovementDoc(verifiableContextPath) {
890
+ const path = join(improvementBuildPlanDocsPath(verifiableContextPath), "SKILL.md");
887
891
  if (!existsSync(path))
888
892
  return null;
889
893
  return readFileSync(path, "utf8").trim();
890
894
  }
891
- function renderMethodImprovementSkill(methodId, loopIndex, improvementDoc) {
895
+ function renderBuildPlanImprovementSkill(buildPlanId, loopIndex, improvementDoc) {
892
896
  return [
893
897
  "---",
894
- "name: interf-method-improver",
898
+ "name: interf-build-plan-improver",
895
899
  "description: >",
896
- " Native local Method-improvement skill for this Interf run.",
897
- " Use it only inside an automated Method-improvement shell.",
900
+ " Native local Build Plan improvement skill for this Interf run.",
901
+ " Use it only inside an automated Build Plan improvement shell.",
898
902
  "---",
899
903
  "",
900
- `# Interf Method Improvement — ${methodId}`,
904
+ `# Interf Build Plan Improvement — ${buildPlanId}`,
901
905
  "",
902
- "This local native skill exists for automated Method-improvement loops.",
906
+ "This local native skill exists for automated Build Plan improvement loops.",
903
907
  "Read `runtime/loop-context.json` first.",
904
- "Then review the linked Method package, `artifacts/compiled-view/`, preserved stage shells, runtime logs, and saved test outputs before editing `method/`.",
908
+ "Then review the linked Build Plan package, `artifacts/verifiable-context-view/`, preserved stage shells, runtime logs, and saved test outputs before editing `build-plan/`.",
905
909
  "",
906
910
  "## Current Loop",
907
911
  "",
908
- `- method: \`${methodId}\``,
912
+ `- Build Plan: \`${buildPlanId}\``,
909
913
  `- loop index: ${loopIndex}`,
910
- "- editable source: `method/improve/SKILL.md`",
914
+ "- editable source: `build-plan/improve/SKILL.md`",
911
915
  "",
912
916
  ...(improvementDoc
913
917
  ? [
914
- "## Improvement Method",
918
+ "## Improvement Guidance",
915
919
  "",
916
920
  improvementDoc,
917
921
  "",
@@ -919,19 +923,19 @@ function renderMethodImprovementSkill(methodId, loopIndex, improvementDoc) {
919
923
  : []),
920
924
  ].join("\n");
921
925
  }
922
- function projectCompiledReviewArtifactsSnapshot(compiledPath, shellRoot, schema) {
923
- const compiledViewRoot = join(shellRoot, "artifacts", "compiled-view");
924
- mkdirSync(compiledViewRoot, { recursive: true });
926
+ function projectVerifiableContextReviewArtifactsSnapshot(verifiableContextPath, shellRoot, schema) {
927
+ const verifiableContextViewRoot = join(shellRoot, "artifacts", "verifiable-context-view");
928
+ mkdirSync(verifiableContextViewRoot, { recursive: true });
925
929
  for (const artifact of listContextInterfaceArtifacts(schema)) {
926
930
  if (artifact.kind === "runtime" || artifact.path === "source-files")
927
931
  continue;
928
- const sourcePath = compiledArtifactAbsolutePath(compiledPath, artifact);
932
+ const sourcePath = verifiableContextArtifactAbsolutePath(verifiableContextPath, artifact);
929
933
  if (!existsSync(sourcePath))
930
934
  continue;
931
935
  copyResolvedTree({
932
936
  sourcePath,
933
- targetPath: join(compiledViewRoot, artifact.path),
934
- shellType: "method-improvement",
937
+ targetPath: join(verifiableContextViewRoot, artifact.path),
938
+ shellType: "build-plan-improvement",
935
939
  });
936
940
  }
937
941
  }
@@ -944,10 +948,10 @@ function copyIfExists(sourcePath, targetPath, shellType) {
944
948
  shellType,
945
949
  });
946
950
  }
947
- function projectCompiledRuntimeArtifacts(compiledPath, shellRoot) {
948
- const runtimeTarget = join(shellRoot, "artifacts", "compiled-runtime");
951
+ function projectVerifiableContextRuntimeArtifacts(verifiableContextPath, shellRoot) {
952
+ const runtimeTarget = join(shellRoot, "artifacts", "verifiable-context-runtime");
949
953
  mkdirSync(runtimeTarget, { recursive: true });
950
- const runtimeRoot = compiledRuntimeRoot(compiledPath);
954
+ const runtimeRoot = verifiableContextRuntimeRoot(verifiableContextPath);
951
955
  const artifactNames = [
952
956
  "run.json",
953
957
  "run-history.jsonl",
@@ -960,40 +964,40 @@ function projectCompiledRuntimeArtifacts(compiledPath, shellRoot) {
960
964
  "logs",
961
965
  ];
962
966
  for (const artifactName of artifactNames) {
963
- copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "method-improvement");
967
+ copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "build-plan-improvement");
964
968
  }
965
969
  }
966
- export function pruneStageExecutionShells(compiledPath) {
967
- rmSync(stageExecutionShellsRoot(compiledPath), { recursive: true, force: true });
970
+ export function pruneStageExecutionShells(verifiableContextPath) {
971
+ rmSync(stageExecutionShellsRoot(verifiableContextPath), { recursive: true, force: true });
968
972
  }
969
- export function projectCompiledQueryShell(compiledPath, compiledName, methodId, about, options) {
970
- const agentsContent = renderCompiledAgents(compiledPath, compiledName, methodId, about, options);
971
- const querySkillContent = readCompiledQuerySkillSource(compiledPath);
972
- return writeNativeAgentSurface(compiledPath, agentsContent, "interf-query", renderCompiledQueryNativeSkill(querySkillContent));
973
+ export function projectVerifiableContextQueryShell(verifiableContextPath, verifiableContextName, buildPlanId, about, options) {
974
+ const agentsContent = renderVerifiableContextAgents(verifiableContextPath, verifiableContextName, buildPlanId, about, options);
975
+ const querySkillContent = readVerifiableContextQuerySkillSource(verifiableContextPath);
976
+ return writeNativeAgentSurface(verifiableContextPath, agentsContent, "interf-query", renderVerifiableContextQueryNativeSkill(querySkillContent));
973
977
  }
974
978
  export function projectSourceFilesTestQueryShell(rootPath) {
975
979
  return writeNativeAgentSurface(rootPath, renderSourceFilesTestAgents(), "interf-query", renderSourceFilesTestQuerySkill());
976
980
  }
977
- export function createStageExecutionShell(compiledPath, compiledName, methodId, stage, writeArtifacts = []) {
978
- const schema = ensureCompiledExecutionSurface(compiledPath);
981
+ export function createStageExecutionShell(verifiableContextPath, verifiableContextName, buildPlanId, stage, writeArtifacts = []) {
982
+ const schema = ensureBuildExecutionSurface(verifiableContextPath);
979
983
  const materializedArtifacts = stageMaterializedArtifactSet(schema, stage, writeArtifacts);
980
- const shellsRoot = stageExecutionShellsRoot(compiledPath);
984
+ const shellsRoot = stageExecutionShellsRoot(verifiableContextPath);
981
985
  const shellRoot = join(shellsRoot, `${stage.id}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`);
982
986
  mkdirSync(shellRoot, { recursive: true });
983
987
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
984
988
  mkdirSync(join(shellRoot, ".interf", "runtime"), { recursive: true });
985
989
  mkdirSync(join(shellRoot, "inputs"), { recursive: true });
986
990
  mkdirSync(join(shellRoot, "outputs"), { recursive: true });
987
- linkPath(compiledInterfConfigPath(compiledPath), join(shellRoot, "interf.json"));
988
- linkPath(join(compiledRuntimeRoot(compiledPath), "stage-contract.json"), shellRuntimePath(shellRoot, "stage-contract.json"));
989
- linkIfExists(compiledRuntimeSourceSnapshotPath(compiledPath), shellRuntimePath(shellRoot, "source-snapshot.json"));
990
- linkIfExists(compiledRuntimeStageInputsPath(compiledPath, stage.id), shellRuntimePath(shellRoot, "stage-inputs.json"));
991
- projectCompiledSchemaArtifacts(compiledPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedArtifacts);
992
- projectMethodMetadata(compiledPath, shellRoot, stage);
991
+ linkPath(verifiableContextInterfConfigPath(verifiableContextPath), join(shellRoot, "interf.json"));
992
+ linkPath(join(verifiableContextRuntimeRoot(verifiableContextPath), "stage-contract.json"), shellRuntimePath(shellRoot, "stage-contract.json"));
993
+ linkIfExists(verifiableContextRuntimeSourceSnapshotPath(verifiableContextPath), shellRuntimePath(shellRoot, "source-snapshot.json"));
994
+ linkIfExists(verifiableContextRuntimeStageInputsPath(verifiableContextPath, stage.id), shellRuntimePath(shellRoot, "stage-inputs.json"));
995
+ projectVerifiableContextSchemaArtifacts(verifiableContextPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedArtifacts);
996
+ projectBuildPlanMetadata(verifiableContextPath, shellRoot, stage);
993
997
  projectStageArtifactMountAliases(shellRoot, stage, schema);
994
- writeExecutionShellPathsFile(shellRoot, methodId, stage, buildStageArtifactMounts(compiledPath, shellRoot, stage, schema));
995
- const agentsContent = renderStageExecutionAgents(compiledName, methodId, stage);
996
- writeNativeAgentSurface(shellRoot, agentsContent, "interf-stage", renderStageExecutionSkill(stage, readStageMethodDoc(compiledPath, stage)));
998
+ writeExecutionShellPathsFile(shellRoot, buildPlanId, stage, buildStageArtifactMounts(verifiableContextPath, shellRoot, stage, schema));
999
+ const agentsContent = renderStageExecutionAgents(verifiableContextName, buildPlanId, stage);
1000
+ writeNativeAgentSurface(shellRoot, agentsContent, "interf-stage", renderStageExecutionSkill(stage, readStageBuildPlanDoc(verifiableContextPath, stage)));
997
1001
  return {
998
1002
  rootPath: shellRoot,
999
1003
  };
@@ -1001,48 +1005,48 @@ export function createStageExecutionShell(compiledPath, compiledName, methodId,
1001
1005
  export function freezeStageExecutionShell(rootPath) {
1002
1006
  return freezePreservedShell(rootPath, "stage-execution");
1003
1007
  }
1004
- export function createMethodImprovementShell(options) {
1005
- const schema = ensureCompiledExecutionSurface(options.compiledPath);
1006
- const loopRootPath = methodImprovementLoopRoot(options.compiledPath, options.runId, options.loopIndex);
1008
+ export function createBuildPlanImprovementShell(options) {
1009
+ const schema = ensureBuildExecutionSurface(options.verifiableContextPath);
1010
+ const loopRootPath = buildPlanImprovementLoopRoot(options.verifiableContextPath, options.runId, options.loopIndex);
1007
1011
  const shellRoot = join(loopRootPath, "shell");
1008
1012
  mkdirSync(shellRoot, { recursive: true });
1009
1013
  mkdirSync(join(shellRoot, "runtime"), { recursive: true });
1010
1014
  mkdirSync(join(shellRoot, "artifacts"), { recursive: true });
1011
1015
  mkdirSync(join(loopRootPath, "logs"), { recursive: true });
1012
1016
  writeFileSync(join(shellRoot, "runtime", "loop-context.json"), `${JSON.stringify(options.context, null, 2)}\n`);
1013
- projectCompiledReviewArtifactsSnapshot(options.compiledPath, shellRoot, schema);
1017
+ projectVerifiableContextReviewArtifactsSnapshot(options.verifiableContextPath, shellRoot, schema);
1014
1018
  copyResolvedTree({
1015
- sourcePath: methodPackagePathForCompiled(options.compiledPath),
1016
- targetPath: join(shellRoot, "method"),
1017
- shellType: "method-improvement",
1019
+ sourcePath: buildPlanPackagePathForVerifiableContext(options.verifiableContextPath),
1020
+ targetPath: join(shellRoot, "build-plan"),
1021
+ shellType: "build-plan-improvement",
1018
1022
  });
1019
- copyIfExists(compiledInterfConfigPath(options.compiledPath), join(shellRoot, "interf.json"), "method-improvement");
1020
- projectCompiledRuntimeArtifacts(options.compiledPath, shellRoot);
1021
- const reviewSources = resolveMethodImprovementReviewSourcePaths(options.compiledPath);
1023
+ copyIfExists(verifiableContextInterfConfigPath(options.verifiableContextPath), join(shellRoot, "interf.json"), "build-plan-improvement");
1024
+ projectVerifiableContextRuntimeArtifacts(options.verifiableContextPath, shellRoot);
1025
+ const reviewSources = resolveBuildPlanImprovementReviewSourcePaths(options.verifiableContextPath);
1022
1026
  if (reviewSources.executionShells) {
1023
- copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "method-improvement");
1027
+ copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "build-plan-improvement");
1024
1028
  }
1025
1029
  if (reviewSources.readinessRuns) {
1026
- copyIfExists(reviewSources.readinessRuns, join(shellRoot, "artifacts", "readiness-runs"), "method-improvement");
1030
+ copyIfExists(reviewSources.readinessRuns, join(shellRoot, "artifacts", "readiness-runs"), "build-plan-improvement");
1027
1031
  }
1028
1032
  if (reviewSources.targetTestRuns) {
1029
- copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "method-improvement");
1033
+ copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "build-plan-improvement");
1030
1034
  }
1031
1035
  if (reviewSources.targetTestSandboxes) {
1032
- copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "method-improvement");
1036
+ copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "build-plan-improvement");
1033
1037
  }
1034
- const agentsContent = renderMethodImprovementAgents(options.compiledName, options.methodId, options.loopIndex);
1035
- writeNativeAgentSurface(shellRoot, agentsContent, "interf-method-improver", renderMethodImprovementSkill(options.methodId, options.loopIndex, readMethodImprovementDoc(options.compiledPath)));
1038
+ const agentsContent = renderBuildPlanImprovementAgents(options.verifiableContextName, options.buildPlanId, options.loopIndex);
1039
+ writeNativeAgentSurface(shellRoot, agentsContent, "interf-build-plan-improver", renderBuildPlanImprovementSkill(options.buildPlanId, options.loopIndex, readBuildPlanImprovementDoc(options.verifiableContextPath)));
1036
1040
  return {
1037
1041
  rootPath: shellRoot,
1038
1042
  loopRootPath,
1039
- methodBeforePath: join(loopRootPath, "method-before"),
1040
- methodAfterPath: join(loopRootPath, "method-after"),
1041
- promptLogPath: join(loopRootPath, "logs", "method-improver.prompt.txt"),
1042
- eventLogPath: join(loopRootPath, "logs", "method-improver.events.ndjson"),
1043
- statusLogPath: join(loopRootPath, "logs", "method-improver.status.log"),
1043
+ buildPlanBeforePath: join(loopRootPath, "build-plan-before"),
1044
+ buildPlanAfterPath: join(loopRootPath, "build-plan-after"),
1045
+ promptLogPath: join(loopRootPath, "logs", "build-plan-improver.prompt.txt"),
1046
+ eventLogPath: join(loopRootPath, "logs", "build-plan-improver.events.ndjson"),
1047
+ statusLogPath: join(loopRootPath, "logs", "build-plan-improver.status.log"),
1044
1048
  };
1045
1049
  }
1046
- export function freezeMethodImprovementShell(rootPath) {
1047
- return freezePreservedShell(rootPath, "method-improvement");
1050
+ export function freezeBuildPlanImprovementShell(rootPath) {
1051
+ return freezePreservedShell(rootPath, "build-plan-improvement");
1048
1052
  }