@interf/compiler 0.21.0 → 0.22.2

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 (367) hide show
  1. package/README.md +65 -63
  2. package/dist/cli/commands/build-plan.d.ts +2 -0
  3. package/dist/cli/commands/{method.js → build-plan.js} +89 -72
  4. package/dist/cli/commands/{compile.d.ts → build.d.ts} +2 -2
  5. package/dist/cli/commands/{compile.js → build.js} +18 -18
  6. package/dist/cli/commands/doctor.js +2 -2
  7. package/dist/cli/commands/mcp.js +48 -48
  8. package/dist/cli/commands/prep.js +16 -29
  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 +6 -28
  12. package/dist/cli/commands/status.js +1 -1
  13. package/dist/cli/commands/test.d.ts +1 -1
  14. package/dist/cli/commands/test.js +8 -8
  15. package/dist/cli/commands/web.js +3 -3
  16. package/dist/cli/commands/wizard.js +38 -38
  17. package/dist/cli/index.d.ts +3 -3
  18. package/dist/cli/index.js +5 -5
  19. package/dist/interf-ui/404.html +1 -0
  20. package/dist/interf-ui/__next.__PAGE__.txt +10 -0
  21. package/dist/interf-ui/__next._full.txt +20 -0
  22. package/dist/interf-ui/__next._head.txt +5 -0
  23. package/dist/interf-ui/__next._index.txt +5 -0
  24. package/dist/{compiler-ui → interf-ui}/__next._tree.txt +3 -4
  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/interf-ui/_next/static/chunks/0dn41fa_zvgsl.js +1 -0
  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/interf-ui/_next/static/chunks/0nv3am99vjzn4.js +1 -0
  32. package/dist/{compiler-ui/_next/static/chunks/02f_.8.ebn556.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/interf-ui/_next/static/chunks/14dznb2qpt-ho.js +91 -0
  38. package/dist/interf-ui/_next/static/chunks/15z_en80lrq-3.js +5 -0
  39. package/dist/{compiler-ui/_next/static/chunks/turbopack-0apv8vb-nczuy.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/interf-ui/_not-found/__next._full.txt +15 -0
  42. package/dist/interf-ui/_not-found/__next._head.txt +5 -0
  43. package/dist/interf-ui/_not-found/__next._index.txt +5 -0
  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 -3
  47. package/dist/interf-ui/_not-found.html +1 -0
  48. package/dist/interf-ui/_not-found.txt +15 -0
  49. package/dist/interf-ui/index.html +1 -0
  50. package/dist/interf-ui/index.txt +20 -0
  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} +52 -52
  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/{methods/package/local-methods.js → build-plans/package/local-build-plans.js} +152 -152
  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 +34 -41
  87. package/dist/packages/contracts/lib/schema.js +42 -34
  88. package/dist/packages/engine/action-definitions.d.ts +60 -60
  89. package/dist/packages/engine/action-definitions.js +198 -197
  90. package/dist/packages/engine/action-planner.d.ts +2 -2
  91. package/dist/packages/engine/action-planner.js +5 -5
  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 +30 -30
  104. package/dist/packages/engine/agents/lib/shells.js +248 -248
  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/execution/index.d.ts +2 -2
  176. package/dist/packages/engine/execution/index.js +1 -1
  177. package/dist/packages/engine/execution/lib/schema.d.ts +90 -95
  178. package/dist/packages/engine/execution/lib/schema.js +31 -31
  179. package/dist/packages/engine/index.d.ts +7 -7
  180. package/dist/packages/engine/index.js +3 -3
  181. package/dist/packages/engine/instance-paths.d.ts +39 -39
  182. package/dist/packages/engine/instance-paths.js +48 -48
  183. package/dist/packages/engine/lib/schema.d.ts +900 -472
  184. package/dist/packages/engine/lib/schema.js +137 -153
  185. package/dist/packages/engine/native-run-handlers.d.ts +12 -12
  186. package/dist/packages/engine/native-run-handlers.js +135 -135
  187. package/dist/packages/engine/preparation-store.d.ts +22 -23
  188. package/dist/packages/engine/preparation-store.js +30 -31
  189. package/dist/packages/engine/readiness-check-draft.d.ts +2 -2
  190. package/dist/packages/engine/readiness-check-draft.js +1 -1
  191. package/dist/packages/engine/requested-artifacts.d.ts +2 -2
  192. package/dist/packages/engine/routes.d.ts +18 -17
  193. package/dist/packages/engine/routes.js +20 -19
  194. package/dist/packages/engine/run-observability.d.ts +5 -3
  195. package/dist/packages/engine/run-observability.js +101 -89
  196. package/dist/packages/engine/runtime-caches.d.ts +16 -16
  197. package/dist/packages/engine/runtime-caches.js +26 -26
  198. package/dist/packages/engine/runtime-event-applier.d.ts +2 -2
  199. package/dist/packages/engine/runtime-event-applier.js +1 -1
  200. package/dist/packages/engine/runtime-persistence.d.ts +9 -9
  201. package/dist/packages/engine/runtime-persistence.js +16 -16
  202. package/dist/packages/engine/runtime-proposal-helpers.d.ts +14 -14
  203. package/dist/packages/engine/runtime-proposal-helpers.js +78 -80
  204. package/dist/packages/engine/runtime-resource-builders.d.ts +12 -12
  205. package/dist/packages/engine/runtime-resource-builders.js +19 -19
  206. package/dist/packages/engine/runtime.d.ts +52 -61
  207. package/dist/packages/engine/runtime.js +440 -463
  208. package/dist/packages/engine/server.d.ts +2 -2
  209. package/dist/packages/engine/server.js +147 -116
  210. package/dist/packages/engine/service-registry.d.ts +5 -17
  211. package/dist/packages/engine/service-registry.js +5 -20
  212. package/dist/packages/engine/verify/lib/schema.d.ts +19 -19
  213. package/dist/packages/engine/verify/lib/schema.js +36 -8
  214. package/dist/packages/engine/verify/readiness-check-run.d.ts +15 -16
  215. package/dist/packages/engine/verify/readiness-check-run.js +46 -46
  216. package/dist/packages/engine/verify/verify-execution.d.ts +3 -3
  217. package/dist/packages/engine/verify/verify-execution.js +10 -10
  218. package/dist/packages/engine/verify/verify-paths.d.ts +4 -4
  219. package/dist/packages/engine/verify/verify-paths.js +17 -17
  220. package/dist/packages/engine/verify/verify-sandbox.d.ts +1 -1
  221. package/dist/packages/engine/verify/verify-sandbox.js +26 -26
  222. package/dist/packages/engine/verify/verify-targets.d.ts +2 -2
  223. package/dist/packages/engine/verify/verify-targets.js +17 -17
  224. package/dist/packages/engine/verify/verify-types.d.ts +2 -2
  225. package/dist/packages/engine/verify/verify.d.ts +1 -1
  226. package/dist/packages/engine/verify/verify.js +1 -1
  227. package/dist/packages/engine/wire-schemas.d.ts +38 -40
  228. package/dist/packages/engine/wire-schemas.js +13 -13
  229. package/dist/packages/project/index.d.ts +1 -1
  230. package/dist/packages/project/interf-bootstrap.d.ts +1 -1
  231. package/dist/packages/project/interf-bootstrap.js +1 -1
  232. package/dist/packages/project/interf-detect.d.ts +11 -11
  233. package/dist/packages/project/interf-detect.js +30 -30
  234. package/dist/packages/project/interf-scaffold.d.ts +3 -3
  235. package/dist/packages/project/interf-scaffold.js +72 -72
  236. package/dist/packages/project/interf.d.ts +4 -4
  237. package/dist/packages/project/interf.js +3 -3
  238. package/dist/packages/project/lib/schema.d.ts +12 -12
  239. package/dist/packages/project/lib/schema.js +14 -14
  240. package/dist/packages/project/preparation-entries.d.ts +3 -3
  241. package/dist/packages/project/preparation-entries.js +19 -19
  242. package/dist/packages/project/source-config.d.ts +10 -10
  243. package/dist/packages/project/source-config.js +58 -58
  244. package/package.json +15 -15
  245. package/public-repo/CONTRIBUTING.md +12 -12
  246. package/public-repo/README.md +65 -63
  247. package/public-repo/SECURITY.md +3 -3
  248. package/public-repo/build-plans/interf-default/README.md +33 -0
  249. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/shape/SKILL.md +10 -10
  250. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/structure/SKILL.md +2 -2
  251. package/public-repo/{methods/interf-default/compile → build-plans/interf-default/build}/stages/summarize/SKILL.md +1 -1
  252. package/public-repo/{methods/interf-default/method.json → build-plans/interf-default/build-plan.json} +15 -15
  253. package/public-repo/{methods/interf-default/method.schema.json → build-plans/interf-default/build-plan.schema.json} +4 -4
  254. package/public-repo/build-plans/interf-default/improve/SKILL.md +18 -0
  255. package/public-repo/{methods → build-plans}/interf-default/use/query/SKILL.md +6 -6
  256. package/public-repo/plugins/README.md +1 -1
  257. package/public-repo/plugins/interf/.claude-plugin/plugin.json +3 -3
  258. package/public-repo/plugins/interf/README.md +4 -1
  259. package/public-repo/plugins/interf/skills/interf/SKILL.md +189 -290
  260. package/public-repo/skills/interf/SKILL.md +189 -290
  261. package/LICENSE.md +0 -1
  262. package/TRADEMARKS.md +0 -8
  263. package/dist/cli/commands/method.d.ts +0 -2
  264. package/dist/compiler-ui/404.html +0 -1
  265. package/dist/compiler-ui/__next.__PAGE__.txt +0 -10
  266. package/dist/compiler-ui/__next._full.txt +0 -21
  267. package/dist/compiler-ui/__next._head.txt +0 -5
  268. package/dist/compiler-ui/__next._index.txt +0 -6
  269. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +0 -1
  270. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +0 -1
  271. package/dist/compiler-ui/_next/static/chunks/04d0ly-7xb~-j.js +0 -91
  272. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +0 -1
  273. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +0 -2
  274. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +0 -116
  275. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +0 -31
  276. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +0 -1
  277. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +0 -1
  278. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +0 -1
  279. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +0 -1
  280. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +0 -1
  281. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +0 -5
  282. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +0 -1
  283. package/dist/compiler-ui/_next/static/chunks/turbopack-02-3e_c-yz~5g.js +0 -1
  284. package/dist/compiler-ui/_not-found/__next._full.txt +0 -16
  285. package/dist/compiler-ui/_not-found/__next._head.txt +0 -5
  286. package/dist/compiler-ui/_not-found/__next._index.txt +0 -6
  287. package/dist/compiler-ui/_not-found/__next._not-found.txt +0 -5
  288. package/dist/compiler-ui/_not-found.html +0 -1
  289. package/dist/compiler-ui/_not-found.txt +0 -16
  290. package/dist/compiler-ui/index.html +0 -1
  291. package/dist/compiler-ui/index.txt +0 -21
  292. package/dist/packages/engine/agents/lib/compiled-bootstrap.d.ts +0 -3
  293. package/dist/packages/engine/agents/lib/compiled-bootstrap.js +0 -19
  294. package/dist/packages/engine/compile/artifact-counts.d.ts +0 -1
  295. package/dist/packages/engine/compile/compiled-compile.d.ts +0 -4
  296. package/dist/packages/engine/compile/compiled-compile.js +0 -4
  297. package/dist/packages/engine/compile/compiled-paths.d.ts +0 -47
  298. package/dist/packages/engine/compile/compiled-paths.js +0 -121
  299. package/dist/packages/engine/compile/compiled-pipeline.d.ts +0 -56
  300. package/dist/packages/engine/compile/compiled-schema.d.ts +0 -21
  301. package/dist/packages/engine/compile/compiled-schema.js +0 -126
  302. package/dist/packages/engine/compile/compiled-stage-plan.d.ts +0 -16
  303. package/dist/packages/engine/compile/compiled-stage-plan.js +0 -100
  304. package/dist/packages/engine/compile/compiled-stage-runner.d.ts +0 -15
  305. package/dist/packages/engine/compile/compiled-target.d.ts +0 -11
  306. package/dist/packages/engine/compile/compiled-target.js +0 -16
  307. package/dist/packages/engine/compile/method-primitives.d.ts +0 -2
  308. package/dist/packages/engine/compile/method-runs.d.ts +0 -14
  309. package/dist/packages/engine/compile/method-runs.js +0 -31
  310. package/dist/packages/engine/compile/reset.d.ts +0 -2
  311. package/dist/packages/engine/compile/reset.js +0 -74
  312. package/dist/packages/engine/compile/runtime-inventory.d.ts +0 -7
  313. package/dist/packages/engine/compile/runtime-reconcile.d.ts +0 -2
  314. package/dist/packages/engine/compile/source-files.d.ts +0 -46
  315. package/dist/packages/engine/compile/state-artifacts.d.ts +0 -9
  316. package/dist/packages/engine/compile/state-artifacts.js +0 -14
  317. package/dist/packages/engine/compile/state-health.d.ts +0 -4
  318. package/dist/packages/engine/compile/state-io.d.ts +0 -11
  319. package/dist/packages/engine/compile/state-paths.js +0 -16
  320. package/dist/packages/engine/compile/state-view.d.ts +0 -5
  321. package/dist/packages/engine/compile/state.d.ts +0 -7
  322. package/dist/packages/engine/compile/state.js +0 -12
  323. package/dist/packages/engine/compile/validate-compiled.d.ts +0 -27
  324. package/dist/packages/methods/authoring/index.d.ts +0 -4
  325. package/dist/packages/methods/authoring/index.js +0 -4
  326. package/dist/packages/methods/authoring/method-authoring.d.ts +0 -36
  327. package/dist/packages/methods/authoring/method-edit-session.d.ts +0 -18
  328. package/dist/packages/methods/authoring/method-improvement.d.ts +0 -23
  329. package/dist/packages/methods/authoring/method-improvement.js +0 -217
  330. package/dist/packages/methods/index.d.ts +0 -2
  331. package/dist/packages/methods/index.js +0 -2
  332. package/dist/packages/methods/method-resolution.d.ts +0 -6
  333. package/dist/packages/methods/method-resolution.js +0 -7
  334. package/dist/packages/methods/package/builtin-compiled-method.d.ts +0 -37
  335. package/dist/packages/methods/package/builtin-compiled-method.js +0 -91
  336. package/dist/packages/methods/package/interf-method-package.d.ts +0 -31
  337. package/dist/packages/methods/package/interf-method-package.js +0 -466
  338. package/dist/packages/methods/package/local-methods.d.ts +0 -74
  339. package/dist/packages/methods/package/method-definitions.d.ts +0 -61
  340. package/dist/packages/methods/package/method-definitions.js +0 -214
  341. package/dist/packages/methods/package/method-review-paths.d.ts +0 -10
  342. package/dist/packages/methods/package/method-review-paths.js +0 -31
  343. package/dist/packages/methods/package/user-methods.d.ts +0 -17
  344. package/dist/packages/methods/package/user-methods.js +0 -77
  345. package/public-repo/methods/interf-default/README.md +0 -33
  346. package/public-repo/methods/interf-default/improve/SKILL.md +0 -18
  347. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_buildManifest.js +0 -0
  348. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_clientMiddlewareManifest.js +0 -0
  349. /package/dist/{compiler-ui/_next/static/tYHMLL9oKds1yDoNYgkPV → interf-ui/_next/static/--reS3xBzM5zc6QxNjZd6}/_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
@@ -1,15 +1,15 @@
1
1
  import { z } from "zod";
2
- import { COMPILED_ARTIFACT_KINDS, } from "../method-primitives.js";
3
- import { ArtifactIdSchema, ArtifactSchema, CheckSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
4
- // `ArtifactSchema` is used internally below in `MethodSchemaSchema`'s
2
+ import { BUILD_PLAN_ARTIFACT_KINDS, } from "../build-plan-primitives.js";
3
+ import { ArtifactIdSchema, ArtifactSchema, CheckSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
4
+ // `ArtifactSchema` is used internally below in `BuildPlanContextRawSchema`'s
5
5
  // `artifacts[]` field. The other Artifact* schemas/types are NOT
6
6
  // re-exported through this module — callers import them directly
7
7
  // from `contracts/lib/schema.js`. The 0.17 PR cross-check pruned
8
8
  // re-exports that had zero consumers.
9
- export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceCompiledMaxAttemptsSchema, SourceCompiledMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, MethodIdSchema, } from "../../../contracts/lib/schema.js";
9
+ export { GateStatusSchema, ReadinessGateSchema, ReadinessSchema, ReadinessStatusSchema, VerifyTargetResultSchema, RuntimeContractTypeSchema, RuntimeExecutorInfoSchema, RuntimeStageSchema, RuntimeTargetTypeSchema, SourceFilesSchema, SourceFileSchema, SourceKindSchema, SourceSchema, SourceSnapshotSchema, StageInputSchema, StageInputsSchema, SourceBuildMaxAttemptsSchema, SourceBuildMaxLoopsSchema, TestCaseExpectSchema, TestTargetTypeSchema, InterfIdPattern, BuildPlanIdSchema, } from "../../../contracts/lib/schema.js";
10
10
  const JsonRecordSchema = z.record(z.string(), z.unknown());
11
11
  const COMPILED_RELATIVE_PATH_SEGMENT = /^(?!\.{1,2}$)[^/\\]+$/;
12
- function isCompiledRelativePath(value) {
12
+ function isVerifiableContextRelativePath(value) {
13
13
  if (value.length === 0)
14
14
  return false;
15
15
  if (value.startsWith("/") || value.startsWith("\\"))
@@ -18,13 +18,13 @@ function isCompiledRelativePath(value) {
18
18
  .split(/[\\/]+/)
19
19
  .every((segment) => COMPILED_RELATIVE_PATH_SEGMENT.test(segment));
20
20
  }
21
- export const MethodArtifactIdSchema = z.string().regex(InterfIdPattern);
22
- export const MethodCompiledArtifactKindSchema = z.enum(COMPILED_ARTIFACT_KINDS);
23
- export const MethodArtifactRoleSchema = z.enum(["input", "working", "output", "runtime"]);
24
- export const CompiledStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
25
- export const CompiledStageStateSchema = z.object({
21
+ export const BuildPlanArtifactIdSchema = z.string().regex(InterfIdPattern);
22
+ export const BuildPlanArtifactKindSchema = z.enum(BUILD_PLAN_ARTIFACT_KINDS);
23
+ export const BuildPlanArtifactRoleSchema = z.enum(["input", "working", "output", "runtime"]);
24
+ export const BuildStageStatusSchema = z.enum(["idle", "running", "succeeded", "failed"]);
25
+ export const VerifiableContextStageStateSchema = z.object({
26
26
  contract_type: RuntimeContractTypeSchema.optional(),
27
- status: CompiledStageStatusSchema.optional(),
27
+ status: BuildStageStatusSchema.optional(),
28
28
  started_at: z.string().nullable().optional(),
29
29
  finished_at: z.string().nullable().optional(),
30
30
  counts: z.record(z.string(), z.number()).optional(),
@@ -33,12 +33,12 @@ export const CompiledStageStateSchema = z.object({
33
33
  summary: z.string().nullable().optional(),
34
34
  run_id: z.string().nullable().optional(),
35
35
  });
36
- export const CompiledStateSchema = z.object({
36
+ export const VerifiableContextStateSchema = z.object({
37
37
  version: z.number().int().min(1),
38
38
  pending: z.array(z.string()),
39
- stages: z.record(z.string().regex(InterfIdPattern), CompiledStageStateSchema).optional(),
39
+ stages: z.record(z.string().regex(InterfIdPattern), VerifiableContextStageStateSchema).optional(),
40
40
  last_add: z.string().nullable().optional(),
41
- last_compile: z.string().nullable().optional(),
41
+ last_build: z.string().nullable().optional(),
42
42
  warning_count: z.number().optional(),
43
43
  error_count: z.number().optional(),
44
44
  }).strict();
@@ -56,22 +56,22 @@ export const ViewCardSchema = z.object({
56
56
  denominator_metric: z.string().optional(),
57
57
  format: z.enum(["number", "fraction", "timestamp"]),
58
58
  });
59
- export const CompiledHealthSchema = z.object({
60
- kind: z.literal("compiled-health"),
59
+ export const VerifiableContextHealthSchema = z.object({
60
+ kind: z.literal("verifiable-context-health"),
61
61
  version: z.number().int().min(1),
62
62
  generated_at: z.string(),
63
63
  target_name: z.string(),
64
- status: z.enum(["idle", "running", "compiled", "stale", "failed"]),
64
+ status: z.enum(["idle", "running", "built", "stale", "failed"]),
65
65
  stage: z.union([
66
- z.enum(["idle", "compiled", "failed"]),
66
+ z.enum(["idle", "built", "failed"]),
67
67
  RuntimeStageSchema,
68
68
  ]),
69
69
  summary: z.string(),
70
70
  metrics: z.record(z.string(), z.number()),
71
71
  checks: z.record(z.string(), z.boolean()),
72
72
  });
73
- export const CompiledViewSpecSchema = z.object({
74
- kind: z.literal("compiled-view-spec"),
73
+ export const VerifiableContextViewSpecSchema = z.object({
74
+ kind: z.literal("verifiable-context-view-spec"),
75
75
  version: z.number().int().min(1),
76
76
  generated_at: z.string(),
77
77
  target_name: z.string(),
@@ -82,38 +82,38 @@ export const CompiledViewSpecSchema = z.object({
82
82
  cards: z.array(ViewCardSchema),
83
83
  sections: z.array(ViewSectionSchema),
84
84
  });
85
- export const MethodPurposeSchema = z.object({
85
+ export const BuildPlanPurposeSchema = z.object({
86
86
  label: z.string().min(1),
87
87
  task_hint: z.string().min(1),
88
88
  }).strict();
89
- export const MethodCompiledArtifactProjectionSchema = z.object({
90
- id: MethodArtifactIdSchema,
91
- role: MethodArtifactRoleSchema,
92
- path: z.string().min(1).refine(isCompiledRelativePath, {
93
- message: "Artifact paths must stay inside the compiled root",
89
+ export const BuildPlanArtifactProjectionSchema = z.object({
90
+ id: BuildPlanArtifactIdSchema,
91
+ role: BuildPlanArtifactRoleSchema,
92
+ path: z.string().min(1).refine(isVerifiableContextRelativePath, {
93
+ message: "Artifact paths must stay inside the verifiable context root",
94
94
  }),
95
- kind: MethodCompiledArtifactKindSchema,
95
+ kind: BuildPlanArtifactKindSchema,
96
96
  required: z.boolean(),
97
97
  owned_by: z.array(z.string().regex(InterfIdPattern)),
98
98
  description: z.string().min(1),
99
99
  });
100
- export const MethodCompiledArtifactSchema = MethodCompiledArtifactProjectionSchema;
101
- // Persisted schema for the method-defined artifact interface that one
102
- // portable context must implement on disk.
103
- export const MethodSchemaSchema = z.object({
104
- kind: z.literal("method-schema"),
100
+ export const BuildPlanArtifactSchema = BuildPlanArtifactProjectionSchema;
101
+ // Persisted schema for the Build Plan-defined artifact interface that one
102
+ // verifiable context must implement on disk.
103
+ export const BuildPlanContextRawSchema = z.object({
104
+ kind: z.literal("build-plan-schema"),
105
105
  version: z.literal(1),
106
- target_type: z.literal("compiled"),
106
+ target_type: z.literal("verifiable-context"),
107
107
  label: z.string().min(1),
108
108
  artifacts: z.array(ArtifactSchema).min(1),
109
109
  }).strict();
110
- export const MethodCompiledSchemaSchema = MethodSchemaSchema;
111
- export const MethodCompilerApiSchema = z.object({
112
- kind: z.literal("compiled"),
110
+ export const BuildPlanContextSchemaSchema = BuildPlanContextRawSchema;
111
+ export const BuildPlanEngineApiSchema = z.object({
112
+ kind: z.literal("build"),
113
113
  version: z.literal(1),
114
114
  });
115
- export const MethodStageArtifactReadAccessSchema = z.array(ArtifactIdSchema);
116
- export const MethodStageArtifactWriteAccessSchema = z.array(ArtifactIdSchema).min(1);
115
+ export const BuildPlanStageArtifactReadAccessSchema = z.array(ArtifactIdSchema);
116
+ export const BuildPlanStageArtifactWriteAccessSchema = z.array(ArtifactIdSchema).min(1);
117
117
  export const ExecutionShellArtifactMountSchema = z.object({
118
118
  artifact_id: ArtifactIdSchema,
119
119
  artifact_path: z.string(),
@@ -124,7 +124,7 @@ export const ExecutionShellArtifactMountSchema = z.object({
124
124
  export const ExecutionShellPathsSchema = z.object({
125
125
  kind: z.literal("interf-execution-shell"),
126
126
  version: z.literal(1),
127
- method: MethodIdSchema,
127
+ build_plan: BuildPlanIdSchema,
128
128
  stage: RuntimeStageSchema,
129
129
  reads: z.array(ExecutionShellArtifactMountSchema),
130
130
  writes: z.array(ExecutionShellArtifactMountSchema),
@@ -143,8 +143,8 @@ export const RuntimeStageContractSchema = z.object({
143
143
  run_id: z.string(),
144
144
  target_type: RuntimeTargetTypeSchema,
145
145
  target_name: z.string(),
146
- method: z.object({
147
- id: MethodIdSchema,
146
+ build_plan: z.object({
147
+ id: BuildPlanIdSchema,
148
148
  stage_index: z.number().nullable(),
149
149
  stage_total: z.number(),
150
150
  stages: z.array(RuntimeStageSchema),
@@ -184,7 +184,7 @@ export const RuntimeRunSchema = z.object({
184
184
  run_id: z.string(),
185
185
  target_type: RuntimeTargetTypeSchema,
186
186
  target_name: z.string(),
187
- method: MethodIdSchema,
187
+ build_plan: BuildPlanIdSchema,
188
188
  stage: RuntimeStageSchema,
189
189
  stage_label: z.string(),
190
190
  contract_type: RuntimeContractTypeSchema,
@@ -206,7 +206,7 @@ export const RuntimeRunSchema = z.object({
206
206
  exit_code: z.number().nullable(),
207
207
  error: z.string().nullable(),
208
208
  });
209
- export const CompiledInventoryEntrySchema = z.object({
209
+ export const RuntimeInventoryEntrySchema = z.object({
210
210
  input_artifact: ArtifactIdSchema.optional(),
211
211
  input_path: z.string().min(1).optional(),
212
212
  output_artifact: ArtifactIdSchema,
@@ -214,14 +214,14 @@ export const CompiledInventoryEntrySchema = z.object({
214
214
  state: z.string().min(1).optional(),
215
215
  metadata: JsonRecordSchema.optional(),
216
216
  }).strict();
217
- export const CompiledInventorySchema = z.object({
218
- kind: z.literal("compiled-runtime-ledger").optional(),
217
+ export const RuntimeInventorySchema = z.object({
218
+ kind: z.literal("verifiable-context-runtime-ledger").optional(),
219
219
  version: z.number().int().min(1).optional(),
220
220
  stage: RuntimeStageSchema.optional(),
221
- entries: z.array(CompiledInventoryEntrySchema),
221
+ entries: z.array(RuntimeInventoryEntrySchema),
222
222
  total: z.number().int().nonnegative(),
223
223
  });
224
- export const MethodImprovementLoopSummarySchema = z.object({
224
+ export const BuildPlanImprovementLoopSummarySchema = z.object({
225
225
  variation: z.number().int().min(1),
226
226
  kind: z.enum(["baseline", "edited"]),
227
227
  attempts_run: z.number().int().min(1),
@@ -233,18 +233,18 @@ export const MethodImprovementLoopSummarySchema = z.object({
233
233
  test_sandbox_path: z.string().nullable().optional(),
234
234
  summary: z.string().min(1),
235
235
  });
236
- export const MethodImprovementContextSchema = z.object({
237
- kind: z.literal("interf-method-improvement-loop"),
236
+ export const BuildPlanImprovementContextSchema = z.object({
237
+ kind: z.literal("interf-build-plan-improvement-loop"),
238
238
  version: z.literal(1),
239
239
  generated_at: z.string(),
240
240
  target_name: z.string(),
241
- method_id: MethodIdSchema,
241
+ build_plan_id: BuildPlanIdSchema,
242
242
  loop_index: z.number().int().min(1),
243
- max_loops: SourceCompiledMaxLoopsSchema,
244
- max_attempts: SourceCompiledMaxAttemptsSchema,
243
+ max_loops: SourceBuildMaxLoopsSchema,
244
+ max_attempts: SourceBuildMaxAttemptsSchema,
245
245
  review_paths: z.object({
246
- method_root: z.string(),
247
- compiled_runtime: z.string().nullable(),
246
+ build_plan_root: z.string(),
247
+ verifiable_context_runtime: z.string().nullable(),
248
248
  readiness_runs: z.string().nullable(),
249
249
  execution_shells: z.string().nullable(),
250
250
  test_runs: z.string().nullable(),
@@ -257,13 +257,13 @@ export const MethodImprovementContextSchema = z.object({
257
257
  question: z.string(),
258
258
  })),
259
259
  }),
260
- previous_variations: z.array(MethodImprovementLoopSummarySchema),
261
- latest_failure: MethodImprovementLoopSummarySchema.nullable(),
260
+ previous_variations: z.array(BuildPlanImprovementLoopSummarySchema),
261
+ latest_failure: BuildPlanImprovementLoopSummarySchema.nullable(),
262
262
  });
263
263
  export const PreservedShellTypeSchema = z.enum([
264
264
  "stage-execution",
265
- "method-authoring",
266
- "method-improvement",
265
+ "build-plan-authoring",
266
+ "build-plan-improvement",
267
267
  ]);
268
268
  export const PreservedShellSnapshotSchema = z.object({
269
269
  kind: z.literal("interf-preserved-shell"),
@@ -273,20 +273,20 @@ export const PreservedShellSnapshotSchema = z.object({
273
273
  root_path: z.string(),
274
274
  materialized_symlinks: z.number().int().min(0),
275
275
  });
276
- export const MethodPackageValidationSchema = z.object({
276
+ export const BuildPlanPackageValidationSchema = z.object({
277
277
  ok: z.boolean(),
278
278
  summary: z.string(),
279
279
  errors: z.array(z.string()),
280
280
  counts: z.record(z.string(), z.number()),
281
281
  });
282
- export const MethodImprovementLoopRecordSchema = z.object({
283
- kind: z.literal("interf-method-improvement-loop-record"),
282
+ export const BuildPlanImprovementLoopRecordSchema = z.object({
283
+ kind: z.literal("interf-build-plan-improvement-loop-record"),
284
284
  version: z.literal(1),
285
285
  recorded_at: z.string(),
286
286
  run_id: z.string(),
287
287
  loop_index: z.number().int().min(1),
288
288
  target_name: z.string(),
289
- method_id: MethodIdSchema,
289
+ build_plan_id: BuildPlanIdSchema,
290
290
  result: z.enum(["updated", "no-change", "invalid", "executor-failed"]),
291
291
  changed: z.boolean(),
292
292
  applied: z.boolean(),
@@ -294,23 +294,23 @@ export const MethodImprovementLoopRecordSchema = z.object({
294
294
  shell_path: z.string(),
295
295
  loop_root_path: z.string(),
296
296
  context_path: z.string(),
297
- method_before_path: z.string(),
298
- method_after_path: z.string(),
297
+ build_plan_before_path: z.string(),
298
+ build_plan_after_path: z.string(),
299
299
  prompt_log_path: z.string(),
300
300
  event_log_path: z.string(),
301
301
  status_log_path: z.string(),
302
302
  preserved_shell_manifest_path: z.string().nullable(),
303
- validation: MethodPackageValidationSchema.nullable(),
303
+ validation: BuildPlanPackageValidationSchema.nullable(),
304
304
  });
305
- export const MethodImprovementRunLedgerSchema = z.object({
306
- kind: z.literal("interf-method-improvement-run"),
305
+ export const BuildPlanImprovementRunLedgerSchema = z.object({
306
+ kind: z.literal("interf-build-plan-improvement-run"),
307
307
  version: z.literal(1),
308
308
  generated_at: z.string(),
309
309
  updated_at: z.string(),
310
310
  run_id: z.string(),
311
311
  target_name: z.string(),
312
- method_id: MethodIdSchema,
313
- max_loops: SourceCompiledMaxLoopsSchema,
314
- max_attempts: SourceCompiledMaxAttemptsSchema,
315
- loops: z.array(MethodImprovementLoopRecordSchema),
312
+ build_plan_id: BuildPlanIdSchema,
313
+ max_loops: SourceBuildMaxLoopsSchema,
314
+ max_attempts: SourceBuildMaxAttemptsSchema,
315
+ loops: z.array(BuildPlanImprovementLoopRecordSchema),
316
316
  });
@@ -0,0 +1,2 @@
1
+ export declare function clearBuildRuntimeDerivedArtifacts(verifiableContextPath: string): void;
2
+ export declare function resetBuildGeneratedState(verifiableContextPath: string, scope?: "build" | "all"): void;
@@ -0,0 +1,74 @@
1
+ import { existsSync, readdirSync, rmSync } from "node:fs";
2
+ import { join } from "node:path";
3
+ import { listBuildPlanContextArtifacts, readBuildPlanContextFile } from "./verifiable-context-schema.js";
4
+ import { initializeBuildRuntimeState } from "./state.js";
5
+ import { stageExecutionShellsRoot, testRootForVerifiableContext, testTargetsRootForVerifiableContext, buildPlanImprovementLoopsRoot, verifiableContextQueryAcceptanceRoot, verifiableContextRuntimeRoot, verifiableContextRuntimeLogsRoot, buildPlanPackagePathForVerifiableContext, } from "./verifiable-context-paths.js";
6
+ function removeIfExists(path) {
7
+ if (existsSync(path)) {
8
+ rmSync(path, { recursive: true, force: true });
9
+ }
10
+ }
11
+ const BUILD_RUNTIME_RESET_ENTRIES = [
12
+ "state.json",
13
+ "health.json",
14
+ "view-spec.json",
15
+ "inventory.json",
16
+ "run.json",
17
+ "source-files.json",
18
+ "source-snapshot.json",
19
+ "stage-contract.json",
20
+ "stages",
21
+ ];
22
+ const PRESERVED_COMPILED_ROOTS = new Set([
23
+ ".agents",
24
+ ".claude",
25
+ ".codex",
26
+ ".cursor",
27
+ ".gitignore",
28
+ ".interf",
29
+ ".interfignore",
30
+ "AGENTS.md",
31
+ "CLAUDE.md",
32
+ ]);
33
+ export function clearBuildRuntimeDerivedArtifacts(verifiableContextPath) {
34
+ const runtimeRoot = verifiableContextRuntimeRoot(verifiableContextPath);
35
+ for (const entry of BUILD_RUNTIME_RESET_ENTRIES) {
36
+ removeIfExists(join(runtimeRoot, entry));
37
+ }
38
+ removeIfExists(verifiableContextQueryAcceptanceRoot(verifiableContextPath));
39
+ }
40
+ function activeBuildInputRoots(verifiableContextPath) {
41
+ const schema = readBuildPlanContextFile(buildPlanPackagePathForVerifiableContext(verifiableContextPath));
42
+ const roots = new Set();
43
+ for (const artifact of schema ? listBuildPlanContextArtifacts(schema) : []) {
44
+ if (artifact.role !== "input")
45
+ continue;
46
+ const root = artifact.path.split("/")[0]?.trim();
47
+ if (root)
48
+ roots.add(root);
49
+ }
50
+ return roots;
51
+ }
52
+ function resetBuildGeneratedOutputs(verifiableContextPath) {
53
+ const preservedInputRoots = activeBuildInputRoots(verifiableContextPath);
54
+ for (const entry of readdirSync(verifiableContextPath)) {
55
+ if (PRESERVED_COMPILED_ROOTS.has(entry))
56
+ continue;
57
+ if (preservedInputRoots.has(entry))
58
+ continue;
59
+ removeIfExists(join(verifiableContextPath, entry));
60
+ }
61
+ }
62
+ export function resetBuildGeneratedState(verifiableContextPath, scope = "build") {
63
+ resetBuildGeneratedOutputs(verifiableContextPath);
64
+ clearBuildRuntimeDerivedArtifacts(verifiableContextPath);
65
+ initializeBuildRuntimeState(verifiableContextPath);
66
+ if (scope === "all") {
67
+ removeIfExists(stageExecutionShellsRoot(verifiableContextPath));
68
+ removeIfExists(buildPlanImprovementLoopsRoot(verifiableContextPath));
69
+ removeIfExists(verifiableContextRuntimeLogsRoot(verifiableContextPath));
70
+ removeIfExists(join(verifiableContextRuntimeRoot(verifiableContextPath), "run-history.jsonl"));
71
+ removeIfExists(testRootForVerifiableContext(verifiableContextPath));
72
+ removeIfExists(testTargetsRootForVerifiableContext(verifiableContextPath));
73
+ }
74
+ }
@@ -1,7 +1,7 @@
1
- import { METHOD_SCHEMA_FILE } from "./compiled-schema.js";
1
+ import { BUILD_PLAN_SCHEMA_FILE } from "./verifiable-context-schema.js";
2
2
  export function buildRuntimeStageContract(options) {
3
3
  const localSkillDocs = options.localSkillDocs ?? [];
4
- const methodNotes = options.methodNotes ?? [];
4
+ const buildPlanNotes = options.buildPlanNotes ?? [];
5
5
  return {
6
6
  instructions: options.instructions,
7
7
  counts: {
@@ -11,7 +11,7 @@ export function buildRuntimeStageContract(options) {
11
11
  artifacts: {
12
12
  reads: [
13
13
  "interf.json",
14
- `method/${METHOD_SCHEMA_FILE}`,
14
+ `build-plan/${BUILD_PLAN_SCHEMA_FILE}`,
15
15
  ...(options.extraReadArtifacts ?? []),
16
16
  ...options.stageReadArtifacts,
17
17
  ...localSkillDocs,
@@ -23,20 +23,20 @@ export function buildRuntimeStageContract(options) {
23
23
  execution_mode: "deterministic",
24
24
  status_prefixes: ["STATUS:", "DONE:", "BLOCKED:", "ERROR:"],
25
25
  notes: [
26
- `This is the "${options.stageLabel}" stage for the portable context "${options.compiledName}".`,
27
- "The Method package is the authoritative method layer for this run.",
28
- `Use \`method/${METHOD_SCHEMA_FILE}\` as the deterministic context-interface reference for this portable context.`,
26
+ `This is the "${options.stageLabel}" stage for the verifiable context "${options.verifiableContextName}".`,
27
+ "The Build Plan is the authoritative plan layer for this run.",
28
+ `Use \`build-plan/${BUILD_PLAN_SCHEMA_FILE}\` as the deterministic context-interface reference for this verifiable context.`,
29
29
  "Honor the declared read and write artifacts instead of inventing a parallel process.",
30
30
  "Only create or update files that fall under the declared write targets for this stage.",
31
31
  "Before emitting DONE, satisfy every check listed under `artifacts.write_contracts[]` for the write Artifacts this stage owns.",
32
32
  "Interf writes `.interf/runtime/` ledgers such as run, state, health, and view-spec files. Read them if needed, but do not create, edit, or replace them in this stage unless the contract explicitly marks a runtime artifact as stage-owned.",
33
33
  "Keep scratch extraction commands single-purpose and non-destructive. Avoid wildcard cleanup and multi-command chains.",
34
- ...methodNotes,
34
+ ...buildPlanNotes,
35
35
  ...(localSkillDocs.length > 0
36
36
  ? [
37
37
  "Read any local instruction docs listed in the contract before you write artifacts or declare the stage complete.",
38
38
  options.instructions.effective_mode === "override"
39
- ? "Local stage docs replace the default method guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
39
+ ? "Local stage docs replace the default Build Plan guidance for this run, but they still do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation."
40
40
  : "Local stage docs can refine the stage behavior, but they do not bypass required writes, declared proof artifacts, or deterministic runtime reconciliation.",
41
41
  ]
42
42
  : []),
@@ -0,0 +1,7 @@
1
+ import { type RuntimeInventory, type RuntimeInventoryEntry } from "./lib/schema.js";
2
+ export declare function emptyRuntimeInventory(): RuntimeInventory;
3
+ export declare function buildInventoryFromEntries(entries: RuntimeInventoryEntry[], stage?: string): RuntimeInventory;
4
+ export declare function buildInventoryEntryCount(inventory: RuntimeInventory | null): number;
5
+ export declare function buildInventoryTotal(inventory: RuntimeInventory | null): number;
6
+ export declare function buildInventoryFrontmatterScannedCount(inventory: RuntimeInventory | null): number;
7
+ export declare function buildInventoryAbstractCoverageCount(inventory: RuntimeInventory | null): number;
@@ -1,29 +1,29 @@
1
- export function emptyCompiledInventory() {
1
+ export function emptyRuntimeInventory() {
2
2
  return {
3
- kind: "compiled-runtime-ledger",
3
+ kind: "verifiable-context-runtime-ledger",
4
4
  version: 1,
5
5
  entries: [],
6
6
  total: 0,
7
7
  };
8
8
  }
9
- export function compiledInventoryFromEntries(entries, stage) {
9
+ export function buildInventoryFromEntries(entries, stage) {
10
10
  return {
11
- kind: "compiled-runtime-ledger",
11
+ kind: "verifiable-context-runtime-ledger",
12
12
  version: 1,
13
13
  ...(stage ? { stage } : {}),
14
14
  entries,
15
15
  total: entries.length,
16
16
  };
17
17
  }
18
- export function compiledInventoryEntryCount(inventory) {
18
+ export function buildInventoryEntryCount(inventory) {
19
19
  return inventory?.entries.length ?? 0;
20
20
  }
21
- export function compiledInventoryTotal(inventory) {
21
+ export function buildInventoryTotal(inventory) {
22
22
  return inventory?.total ?? 0;
23
23
  }
24
- export function compiledInventoryFrontmatterScannedCount(inventory) {
24
+ export function buildInventoryFrontmatterScannedCount(inventory) {
25
25
  return (inventory?.entries ?? []).filter((entry) => entry.metadata?.frontmatter_scanned === true).length;
26
26
  }
27
- export function compiledInventoryAbstractCoverageCount(inventory) {
27
+ export function buildInventoryAbstractCoverageCount(inventory) {
28
28
  return (inventory?.entries ?? []).filter((entry) => entry.metadata?.abstract_read === true || typeof entry.metadata?.abstract === "string").length;
29
29
  }
@@ -1,19 +1,19 @@
1
1
  import { join } from "node:path";
2
- import { compiledRuntimeArchivedStageContractPath, compiledRuntimeLogsRoot, compiledRuntimeRunHistoryPath, compiledRuntimeRunPath, compiledRuntimeStageContractPath, } from "./compiled-paths.js";
2
+ import { verifiableContextRuntimeArchivedStageContractPath, verifiableContextRuntimeLogsRoot, verifiableContextRuntimeRunHistoryPath, verifiableContextRuntimeRunPath, verifiableContextRuntimeStageContractPath, } from "./verifiable-context-paths.js";
3
3
  export function runPath(dirPath) {
4
- return compiledRuntimeRunPath(dirPath);
4
+ return verifiableContextRuntimeRunPath(dirPath);
5
5
  }
6
6
  export function runHistoryPath(dirPath) {
7
- return compiledRuntimeRunHistoryPath(dirPath);
7
+ return verifiableContextRuntimeRunHistoryPath(dirPath);
8
8
  }
9
9
  export function stageContractPath(dirPath) {
10
- return compiledRuntimeStageContractPath(dirPath);
10
+ return verifiableContextRuntimeStageContractPath(dirPath);
11
11
  }
12
12
  export function archivedStageContractPath(dirPath, runId) {
13
- return compiledRuntimeArchivedStageContractPath(dirPath, runId);
13
+ return verifiableContextRuntimeArchivedStageContractPath(dirPath, runId);
14
14
  }
15
15
  export function logsDirPath(dirPath) {
16
- return compiledRuntimeLogsRoot(dirPath);
16
+ return verifiableContextRuntimeLogsRoot(dirPath);
17
17
  }
18
18
  export function promptLogPath(dirPath, runId) {
19
19
  return join(logsDirPath(dirPath), `${runId}.prompt.txt`);
@@ -3,45 +3,45 @@ export function buildStagePrompt(instructions, contractPath, statusLines) {
3
3
  const modeNotes = instructions.effective_mode === "override"
4
4
  ? [
5
5
  "Local stage instruction docs are authoritative for this run.",
6
- "Use bundled Method heuristics only when the stage contract explicitly permits them.",
6
+ "Use bundled Build Plan heuristics only when the stage contract explicitly permits them.",
7
7
  "Interf still enforces the same required reads, writes, verifier outputs, and runtime reconciliation at stage close.",
8
8
  ]
9
9
  : instructions.effective_mode === "extend"
10
10
  ? [
11
- "Use the current compiled Method docs as the default Method for this run.",
11
+ "Use the current Build Plan docs as the default plan for this run.",
12
12
  "Then apply any additional local stage instruction docs referenced by the contract as stage-specific extensions.",
13
13
  ]
14
14
  : [
15
- "Use the current compiled Method docs as the default Method for this run.",
15
+ "Use the current Build Plan stage docs as the default behavior for this run.",
16
16
  ];
17
17
  return [
18
- `Interf Method stage docs: method/compile/stages/${stageSkillDir}/`,
18
+ `Interf Build Plan stage docs: build-plan/build/stages/${stageSkillDir}/`,
19
19
  "",
20
20
  "This is an automated Interf stage run, not an open-ended chat session.",
21
21
  "The user has already invoked this stage through the Interf CLI. Execute it now.",
22
22
  "Do not ask what the user wants, offer help, list tools, or wait for another instruction.",
23
23
  `Read \`${contractPath}\` first. It is the authoritative contract for this stage.`,
24
- "If `runtime/paths.json` exists in this shell, read it next. It maps Method Artifact ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
24
+ "If `runtime/paths.json` exists in this shell, read it next. It maps Build Plan Artifact ids onto the shell-local `inputs/` and `outputs/` mounts for this stage.",
25
25
  "For file Artifact mounts, `runtime/paths.json` also gives the exact file path inside the `inputs/` or `outputs/` mount root.",
26
- "Honor the contract's counts, artifact paths, and policies instead of inventing another Method.",
26
+ "Honor the contract's counts, artifact paths, and policies instead of inventing another Build Plan.",
27
27
  "The contract's `artifacts.write_contracts[]` lists the checks Interf will run against the Artifacts this stage writes. Treat those checks as required output constraints.",
28
28
  "Read only the files named by the contract's `artifacts.reads` list plus any paths they explicitly direct you to open.",
29
29
  "Prefer direct file-reading and search tools over shell commands when you inspect inputs, docs, or generated outputs.",
30
30
  "Do not use shell helpers like `cat`, `sed`, `ls`, or `find` for routine file inspection if a native read/search tool can do the same job.",
31
31
  "If the contract lists `instructions.local_docs`, open every one of those files before you write artifacts or declare the stage complete.",
32
- "If `AGENTS.md` is listed in the contract, use it only for portable-context routing that is directly relevant to this stage.",
32
+ "If `AGENTS.md` is listed in the contract, use it only for verifiable-context routing that is directly relevant to this stage.",
33
33
  "`.interf/runtime/run.json`, `.interf/runtime/state.json`, `.interf/runtime/health.json`, and `.interf/runtime/view-spec.json` are runtime artifacts written by Interf. You may read them, but do not create, edit, or replace them unless the contract explicitly marks a different proof artifact as stage-owned.",
34
34
  "If a contract-listed output file does not exist yet, create it in one whole-file write. Do not attempt patch-style edits against a missing runtime path.",
35
- "Stay inside the current portable context. Do not try to open repo docs, repo source files, or other paths outside the portable context unless the stage contract explicitly requires them.",
35
+ "Stay inside the current verifiable context. Do not try to open repo docs, repo source files, or other paths outside this context unless the stage contract explicitly requires them.",
36
36
  instructions.effective_mode === "override"
37
- ? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Method layer for this run."
38
- : "Do not depend on any repo-root or globally installed skill cache for this run. Use the current compiled Method docs and the contract as the default behavior.",
37
+ ? "Do not depend on any repo-root or globally installed skill cache for this run. Local stage instruction docs are the primary Build Plan layer for this run."
38
+ : "Do not depend on any repo-root or globally installed skill cache for this run. Use the current Build Plan stage docs and the contract as the default behavior.",
39
39
  ...modeNotes,
40
40
  "Do not narrate intentions, plans, or reasoning to the user.",
41
41
  "Only emit user-visible updates that begin with STATUS:, DONE:, BLOCKED:, or ERROR:.",
42
42
  "Those status lines are progress hints for the operator. The CLI decides stage completion from artifacts, validation, and reconcile checks rather than trusting status text alone.",
43
43
  "Before any long-running source inspection or shell-based helper step, emit a STATUS: line that names the current subtask.",
44
- "If work stays in progress, do not remain silent for more than about one minute. Emit another STATUS: line when you switch files, page groups, targets, or extraction methods.",
44
+ "If work stays in progress, do not remain silent for more than about one minute. Emit another STATUS: line when you switch files, page groups, targets, or extraction passes.",
45
45
  "If you respond conversationally instead of executing the stage, the run will be treated as failed.",
46
46
  "As soon as the required proof artifacts are complete, stop. Do not keep browsing or auditing after the contract is satisfied.",
47
47
  ...statusLines,
@@ -0,0 +1,2 @@
1
+ import { type BuildPlanStageDefinition } from "../../build-plans/package/build-plan-definitions.js";
2
+ export declare function reconcileBuildStageRun(dirPath: string, stage: Pick<BuildPlanStageDefinition, "id" | "contractType" | "reads" | "writes">): boolean;