unspaghettit 0.2.0 → 0.4.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 (772) hide show
  1. package/README.md +56 -18
  2. package/build/client/_app/immutable/assets/0.DCOD5ne_.css +1 -0
  3. package/build/client/_app/immutable/assets/0.DCOD5ne_.css.br +0 -0
  4. package/build/client/_app/immutable/assets/0.DCOD5ne_.css.gz +0 -0
  5. package/build/client/_app/immutable/assets/12.nv0I59TU.css.gz +0 -0
  6. package/build/client/_app/immutable/assets/3.B3akUL9A.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css +1 -0
  8. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.br +0 -0
  9. package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.gz +0 -0
  10. package/build/client/_app/immutable/chunks/B3vnQs252.js +1 -0
  11. package/build/client/_app/immutable/chunks/B3vnQs252.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/B3vnQs252.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{CxyLMlpt2.js → BANF9BhQ2.js} +1 -1
  14. package/build/client/_app/immutable/chunks/BANF9BhQ2.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/BANF9BhQ2.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/BJdTO_n6.js +1 -0
  17. package/build/client/_app/immutable/chunks/BJdTO_n6.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/BJdTO_n6.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/BPl9BITm.js.gz +0 -0
  20. package/build/client/_app/immutable/chunks/BQ9GodWX2.js.gz +0 -0
  21. package/build/client/_app/immutable/chunks/Bcyn5YUg.js +4 -0
  22. package/build/client/_app/immutable/chunks/Bcyn5YUg.js.br +0 -0
  23. package/build/client/_app/immutable/chunks/Bcyn5YUg.js.gz +0 -0
  24. package/build/client/_app/immutable/chunks/Bfc9rQXP.js +1 -0
  25. package/build/client/_app/immutable/chunks/Bfc9rQXP.js.br +0 -0
  26. package/build/client/_app/immutable/chunks/Bfc9rQXP.js.gz +0 -0
  27. package/build/client/_app/immutable/chunks/{BfMYiIUi.js → BjxqhpPG.js} +1 -1
  28. package/build/client/_app/immutable/chunks/BjxqhpPG.js.br +0 -0
  29. package/build/client/_app/immutable/chunks/BjxqhpPG.js.gz +0 -0
  30. package/build/client/_app/immutable/chunks/ByaoVvNB.js +1 -0
  31. package/build/client/_app/immutable/chunks/ByaoVvNB.js.br +0 -0
  32. package/build/client/_app/immutable/chunks/ByaoVvNB.js.gz +0 -0
  33. package/build/client/_app/immutable/chunks/BzLd0mTH.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/C8b3IMj8.js +1 -0
  35. package/build/client/_app/immutable/chunks/C8b3IMj8.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/C8b3IMj8.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/CXvvf4uQ.js +1 -0
  38. package/build/client/_app/immutable/chunks/CXvvf4uQ.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/CXvvf4uQ.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/Cl7Z3e6-.js.gz +0 -0
  41. package/build/client/_app/immutable/chunks/ClC4qR7W2.js +2 -0
  42. package/build/client/_app/immutable/chunks/ClC4qR7W2.js.br +0 -0
  43. package/build/client/_app/immutable/chunks/ClC4qR7W2.js.gz +0 -0
  44. package/build/client/_app/immutable/chunks/CuGlh1c2.js +1 -0
  45. package/build/client/_app/immutable/chunks/CuGlh1c2.js.br +0 -0
  46. package/build/client/_app/immutable/chunks/CuGlh1c2.js.gz +0 -0
  47. package/build/client/_app/immutable/chunks/CwzIdrQR.js +1 -0
  48. package/build/client/_app/immutable/chunks/CwzIdrQR.js.br +0 -0
  49. package/build/client/_app/immutable/chunks/CwzIdrQR.js.gz +0 -0
  50. package/build/client/_app/immutable/chunks/D5speDV82.js +908 -0
  51. package/build/client/_app/immutable/chunks/D5speDV82.js.br +0 -0
  52. package/build/client/_app/immutable/chunks/D5speDV82.js.gz +0 -0
  53. package/build/client/_app/immutable/chunks/D64sGJRN.js +1 -0
  54. package/build/client/_app/immutable/chunks/D64sGJRN.js.br +0 -0
  55. package/build/client/_app/immutable/chunks/D64sGJRN.js.gz +0 -0
  56. package/build/client/_app/immutable/chunks/DNaA4QRO2.js +1 -0
  57. package/build/client/_app/immutable/chunks/DNaA4QRO2.js.br +0 -0
  58. package/build/client/_app/immutable/chunks/DNaA4QRO2.js.gz +0 -0
  59. package/build/client/_app/immutable/chunks/Da59TXPe.js +1 -0
  60. package/build/client/_app/immutable/chunks/Da59TXPe.js.br +2 -0
  61. package/build/client/_app/immutable/chunks/Da59TXPe.js.gz +0 -0
  62. package/build/client/_app/immutable/chunks/DhTiE3j02.js +2 -0
  63. package/build/client/_app/immutable/chunks/DhTiE3j02.js.br +0 -0
  64. package/build/client/_app/immutable/chunks/DhTiE3j02.js.gz +0 -0
  65. package/build/client/_app/immutable/chunks/Dhqg7r_2.js.gz +0 -0
  66. package/build/client/_app/immutable/chunks/DmyaDy4d2.js +1 -0
  67. package/build/client/_app/immutable/chunks/DmyaDy4d2.js.br +0 -0
  68. package/build/client/_app/immutable/chunks/DmyaDy4d2.js.gz +0 -0
  69. package/build/client/_app/immutable/chunks/DryaQyjN2.js +1 -0
  70. package/build/client/_app/immutable/chunks/DryaQyjN2.js.br +0 -0
  71. package/build/client/_app/immutable/chunks/DryaQyjN2.js.gz +0 -0
  72. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js +1 -0
  73. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.br +0 -0
  74. package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.gz +0 -0
  75. package/build/client/_app/immutable/chunks/DtblIi6X2.js +1 -0
  76. package/build/client/_app/immutable/chunks/DtblIi6X2.js.br +1 -0
  77. package/build/client/_app/immutable/chunks/DtblIi6X2.js.gz +0 -0
  78. package/build/client/_app/immutable/chunks/UkzDDeO42.js +1 -0
  79. package/build/client/_app/immutable/chunks/UkzDDeO42.js.br +0 -0
  80. package/build/client/_app/immutable/chunks/UkzDDeO42.js.gz +0 -0
  81. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js +1 -0
  82. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.br +0 -0
  83. package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.gz +0 -0
  84. package/build/client/_app/immutable/chunks/_b612aVb.js +1 -0
  85. package/build/client/_app/immutable/chunks/_b612aVb.js.br +0 -0
  86. package/build/client/_app/immutable/chunks/_b612aVb.js.gz +0 -0
  87. package/build/client/_app/immutable/chunks/aNMRV4sP2.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/cMamJTsF.js.gz +0 -0
  89. package/build/client/_app/immutable/chunks/ib21i2T_.js.gz +0 -0
  90. package/build/client/_app/immutable/chunks/kNaey6uv.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/oVMDLirx.js +1 -0
  92. package/build/client/_app/immutable/chunks/oVMDLirx.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/oVMDLirx.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/olAc024e.js +1 -0
  95. package/build/client/_app/immutable/chunks/olAc024e.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/olAc024e.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/suTxxv1t.js.gz +0 -0
  98. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js +1 -0
  99. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.br +0 -0
  100. package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.gz +0 -0
  101. package/build/client/_app/immutable/chunks/wrqalH0a.js +1 -0
  102. package/build/client/_app/immutable/chunks/wrqalH0a.js.br +0 -0
  103. package/build/client/_app/immutable/chunks/wrqalH0a.js.gz +0 -0
  104. package/build/client/_app/immutable/chunks/x60Tn5kT.js +1 -0
  105. package/build/client/_app/immutable/chunks/x60Tn5kT.js.br +0 -0
  106. package/build/client/_app/immutable/chunks/x60Tn5kT.js.gz +0 -0
  107. package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
  108. package/build/client/_app/immutable/chunks/{BOrLmFwJ.js → yShDxCNj.js} +1 -1
  109. package/build/client/_app/immutable/chunks/yShDxCNj.js.br +2 -0
  110. package/build/client/_app/immutable/chunks/yShDxCNj.js.gz +0 -0
  111. package/build/client/_app/immutable/entry/app.Etd-exTb.js +2 -0
  112. package/build/client/_app/immutable/entry/app.Etd-exTb.js.br +0 -0
  113. package/build/client/_app/immutable/entry/app.Etd-exTb.js.gz +0 -0
  114. package/build/client/_app/immutable/entry/start.DY2B3u4g.js +1 -0
  115. package/build/client/_app/immutable/entry/start.DY2B3u4g.js.br +0 -0
  116. package/build/client/_app/immutable/entry/start.DY2B3u4g.js.gz +0 -0
  117. package/build/client/_app/immutable/nodes/0.tKfYV3__.js +8 -0
  118. package/build/client/_app/immutable/nodes/0.tKfYV3__.js.br +0 -0
  119. package/build/client/_app/immutable/nodes/0.tKfYV3__.js.gz +0 -0
  120. package/build/client/_app/immutable/nodes/{1.KYdA6ppX.js → 1.CER5ICKt.js} +1 -1
  121. package/build/client/_app/immutable/nodes/1.CER5ICKt.js.br +1 -0
  122. package/build/client/_app/immutable/nodes/1.CER5ICKt.js.gz +0 -0
  123. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js +1 -0
  124. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.br +0 -0
  125. package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.gz +0 -0
  126. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js +2 -0
  127. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.br +0 -0
  128. package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.gz +0 -0
  129. package/build/client/_app/immutable/nodes/{9.CMW6a2Lg.js → 12.DCTRFMqo.js} +4 -3
  130. package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.br +0 -0
  131. package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.gz +0 -0
  132. package/build/client/_app/immutable/nodes/{2.DBz20KgG.js → 2.CF488WWF.js} +1 -1
  133. package/build/client/_app/immutable/nodes/2.CF488WWF.js.br +0 -0
  134. package/build/client/_app/immutable/nodes/2.CF488WWF.js.gz +0 -0
  135. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js +1 -0
  136. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.br +0 -0
  137. package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.gz +0 -0
  138. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js +3 -0
  139. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.br +0 -0
  140. package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.gz +0 -0
  141. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js +48 -0
  142. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.br +0 -0
  143. package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.gz +0 -0
  144. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js +1 -0
  145. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.br +0 -0
  146. package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.gz +0 -0
  147. package/build/client/_app/immutable/nodes/7.pajo8MfM.js +3 -0
  148. package/build/client/_app/immutable/nodes/7.pajo8MfM.js.br +0 -0
  149. package/build/client/_app/immutable/nodes/7.pajo8MfM.js.gz +0 -0
  150. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js +5 -0
  151. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.br +0 -0
  152. package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.gz +0 -0
  153. package/build/client/_app/immutable/nodes/{7.CemgNJfw.js → 9.D72NaL3l.js} +1 -1
  154. package/build/client/_app/immutable/nodes/9.D72NaL3l.js.br +1 -0
  155. package/build/client/_app/immutable/nodes/9.D72NaL3l.js.gz +0 -0
  156. package/build/client/_app/version.json +1 -1
  157. package/build/client/_app/version.json.br +0 -0
  158. package/build/client/_app/version.json.gz +0 -0
  159. package/build/client/lyriks_logo.svg +148 -0
  160. package/build/client/lyriks_logo.svg.br +0 -0
  161. package/build/client/lyriks_logo.svg.gz +0 -0
  162. package/build/server/chunks/0-8YZc572z.js +15 -0
  163. package/build/server/chunks/0-8YZc572z.js.map +1 -0
  164. package/build/server/chunks/1-DxkfSJLu.js +9 -0
  165. package/build/server/chunks/{1-DPpKAKXV.js.map → 1-DxkfSJLu.js.map} +1 -1
  166. package/build/server/chunks/10-DkObdGtU.js +9 -0
  167. package/build/server/chunks/10-DkObdGtU.js.map +1 -0
  168. package/build/server/chunks/11-DL94HxpZ.js +9 -0
  169. package/build/server/chunks/11-DL94HxpZ.js.map +1 -0
  170. package/build/server/chunks/12-CI74sCkt.js +9 -0
  171. package/build/server/chunks/12-CI74sCkt.js.map +1 -0
  172. package/build/server/chunks/2-qhWwQ4eL.js +9 -0
  173. package/build/server/chunks/2-qhWwQ4eL.js.map +1 -0
  174. package/build/server/chunks/3-CzoZtSTp.js +16 -0
  175. package/build/server/chunks/3-CzoZtSTp.js.map +1 -0
  176. package/build/server/chunks/4-CDa9DBsh.js +16 -0
  177. package/build/server/chunks/4-CDa9DBsh.js.map +1 -0
  178. package/build/server/chunks/5-qD2xxOrq.js +9 -0
  179. package/build/server/chunks/5-qD2xxOrq.js.map +1 -0
  180. package/build/server/chunks/6-B4mWzvDn.js +9 -0
  181. package/build/server/chunks/6-B4mWzvDn.js.map +1 -0
  182. package/build/server/chunks/7-zExv-fTN.js +9 -0
  183. package/build/server/chunks/7-zExv-fTN.js.map +1 -0
  184. package/build/server/chunks/8-BVrGdQg4.js +9 -0
  185. package/build/server/chunks/{6-QQ7r8Rd5.js.map → 8-BVrGdQg4.js.map} +1 -1
  186. package/build/server/chunks/9-BnZLRMYA.js +9 -0
  187. package/build/server/chunks/9-BnZLRMYA.js.map +1 -0
  188. package/build/server/chunks/BehaviorGraph-C-9z37Sm.js +788 -0
  189. package/build/server/chunks/BehaviorGraph-C-9z37Sm.js.map +1 -0
  190. package/build/server/chunks/Clock-BfMWQpmJ.js +5 -0
  191. package/build/server/chunks/Clock-BfMWQpmJ.js.map +1 -0
  192. package/build/server/chunks/DeleteDomain-BvHEgAyp.js +24 -0
  193. package/build/server/chunks/DeleteDomain-BvHEgAyp.js.map +1 -0
  194. package/build/server/chunks/{FeatureValidator-B8qEjAUW.js → DeleteFeature-DnK8sBJI.js} +142 -77
  195. package/build/server/chunks/DeleteFeature-DnK8sBJI.js.map +1 -0
  196. package/build/server/chunks/DeleteProject-BXZcehHZ.js +41 -0
  197. package/build/server/chunks/DeleteProject-BXZcehHZ.js.map +1 -0
  198. package/build/server/chunks/Effect-BJtLR-6l.js +46 -0
  199. package/build/server/chunks/Effect-BJtLR-6l.js.map +1 -0
  200. package/build/server/chunks/{FeatureCard-BQOY6gJQ.js → FeatureCard-Bb50FEfp.js} +4 -4
  201. package/build/server/chunks/{FeatureCard-BQOY6gJQ.js.map → FeatureCard-Bb50FEfp.js.map} +1 -1
  202. package/build/server/chunks/{FeatureJson-Bv-qiOSf.js → FeatureJson-DYvMEAub.js} +2 -2
  203. package/build/server/chunks/{FeatureJson-Bv-qiOSf.js.map → FeatureJson-DYvMEAub.js.map} +1 -1
  204. package/build/server/chunks/{FeatureTransforms-UWDHmWEg.js → FeatureTransforms-B0aI_CJD.js} +10 -3
  205. package/build/server/chunks/FeatureTransforms-B0aI_CJD.js.map +1 -0
  206. package/build/server/chunks/{ManageTagsDialog-DBxA3tM2.js → ManageTagsDialog-D5xbAVNB.js} +5 -5
  207. package/build/server/chunks/ManageTagsDialog-D5xbAVNB.js.map +1 -0
  208. package/build/server/chunks/{ProgressBar-CfhccQ83.js → ProgressBar-CUC2EZqG.js} +3 -3
  209. package/build/server/chunks/ProgressBar-CUC2EZqG.js.map +1 -0
  210. package/build/server/chunks/{ProjectsIndex-CoDrvRya.js → ProjectsIndex-FgIu9dBp.js} +135 -14
  211. package/build/server/chunks/ProjectsIndex-FgIu9dBp.js.map +1 -0
  212. package/build/server/chunks/{RenameTag-BuWLMl1m.js → RenameTag-DWIIR4Bx.js} +3 -6
  213. package/build/server/chunks/RenameTag-DWIIR4Bx.js.map +1 -0
  214. package/build/server/chunks/ScenarioApplier-YPKECfZe.js +55 -0
  215. package/build/server/chunks/ScenarioApplier-YPKECfZe.js.map +1 -0
  216. package/build/server/chunks/SimulatorEngine-DM1F9nCO.js +1391 -0
  217. package/build/server/chunks/SimulatorEngine-DM1F9nCO.js.map +1 -0
  218. package/build/server/chunks/StateValue-BBjWox8f.js +105 -0
  219. package/build/server/chunks/StateValue-BBjWox8f.js.map +1 -0
  220. package/build/server/chunks/{TagDotStrip-B1XQ0m0Y.js → TagDotStrip-0rn-IJVE.js} +4 -4
  221. package/build/server/chunks/TagDotStrip-0rn-IJVE.js.map +1 -0
  222. package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js → TagFilterSelect-Dbu-7Dg4.js} +5 -5
  223. package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js.map → TagFilterSelect-Dbu-7Dg4.js.map} +1 -1
  224. package/build/server/chunks/{TagPalette-CtMNYCmu.js → TagPalette-CpdTiC_7.js} +101 -9
  225. package/build/server/chunks/TagPalette-CpdTiC_7.js.map +1 -0
  226. package/build/server/chunks/TransitionCatalog-CYXUANy6.js +271 -0
  227. package/build/server/chunks/TransitionCatalog-CYXUANy6.js.map +1 -0
  228. package/build/server/chunks/_layout.svelte-pSSG85WT.js +1342 -0
  229. package/build/server/chunks/_layout.svelte-pSSG85WT.js.map +1 -0
  230. package/build/server/chunks/{_page.svelte-BKTveFAj.js → _page.svelte-BNH3szkk.js} +22 -17
  231. package/build/server/chunks/{_page.svelte-BKTveFAj.js.map → _page.svelte-BNH3szkk.js.map} +1 -1
  232. package/build/server/chunks/_page.svelte-BcuGvUt1.js +37 -0
  233. package/build/server/chunks/{_page.svelte-B7hT3P8E.js.map → _page.svelte-BcuGvUt1.js.map} +1 -1
  234. package/build/server/chunks/_page.svelte-BoOMG5Y0.js +37 -0
  235. package/build/server/chunks/{_page.svelte-De508ek8.js.map → _page.svelte-BoOMG5Y0.js.map} +1 -1
  236. package/build/server/chunks/{_page.svelte-BqSC-1vK.js → _page.svelte-C4PRh_wP.js} +104 -54
  237. package/build/server/chunks/_page.svelte-C4PRh_wP.js.map +1 -0
  238. package/build/server/chunks/_page.svelte-Cqn34NXy.js +74 -0
  239. package/build/server/chunks/_page.svelte-Cqn34NXy.js.map +1 -0
  240. package/build/server/chunks/{_page.svelte-B1s7jxaQ.js → _page.svelte-DSCeOGv7.js} +15 -10
  241. package/build/server/chunks/_page.svelte-DSCeOGv7.js.map +1 -0
  242. package/build/server/chunks/_page.svelte-DqWdGt48.js +182 -0
  243. package/build/server/chunks/_page.svelte-DqWdGt48.js.map +1 -0
  244. package/build/server/chunks/_page.svelte-DsQHSEl4.js +49 -0
  245. package/build/server/chunks/_page.svelte-DsQHSEl4.js.map +1 -0
  246. package/build/server/chunks/{_page.svelte-BKKCa9H5.js → _page.svelte-Uioz8hsG.js} +18 -11
  247. package/build/server/chunks/{_page.svelte-BKKCa9H5.js.map → _page.svelte-Uioz8hsG.js.map} +1 -1
  248. package/build/server/chunks/{_page.svelte-Zf9H4KOP.js → _page.svelte-p38jot9e.js} +81 -478
  249. package/build/server/chunks/_page.svelte-p38jot9e.js.map +1 -0
  250. package/build/server/chunks/{_page.svelte-BtI2zZ_Z.js → _page.svelte-yN5kzgJ9.js} +251 -447
  251. package/build/server/chunks/_page.svelte-yN5kzgJ9.js.map +1 -0
  252. package/build/server/chunks/{_server.ts-DsbbVoOn.js → _server.ts-1CtrHhte.js} +4 -4
  253. package/build/server/chunks/{_server.ts-DsbbVoOn.js.map → _server.ts-1CtrHhte.js.map} +1 -1
  254. package/build/server/chunks/{_server.ts-CWvU15tL.js → _server.ts-71Qx1lQb.js} +4 -4
  255. package/build/server/chunks/{_server.ts-CWvU15tL.js.map → _server.ts-71Qx1lQb.js.map} +1 -1
  256. package/build/server/chunks/_server.ts-BAyekGHB.js +961 -0
  257. package/build/server/chunks/_server.ts-BAyekGHB.js.map +1 -0
  258. package/build/server/chunks/{_server.ts-BihpbxOW.js → _server.ts-BLWhU22T.js} +4 -4
  259. package/build/server/chunks/{_server.ts-BihpbxOW.js.map → _server.ts-BLWhU22T.js.map} +1 -1
  260. package/build/server/chunks/{_server.ts-YnfXkeMJ.js → _server.ts-C7EVZVxv.js} +22 -13
  261. package/build/server/chunks/_server.ts-C7EVZVxv.js.map +1 -0
  262. package/build/server/chunks/{_server.ts-vcaqdwxS.js → _server.ts-CGjYuLmo.js} +12 -7
  263. package/build/server/chunks/_server.ts-CGjYuLmo.js.map +1 -0
  264. package/build/server/chunks/{_server.ts-Dy5zQHe2.js → _server.ts-CX6H8fSE.js} +8 -31
  265. package/build/server/chunks/_server.ts-CX6H8fSE.js.map +1 -0
  266. package/build/server/chunks/{_server.ts-BuoQ02BW.js → _server.ts-CyEdTCLr.js} +4 -4
  267. package/build/server/chunks/{_server.ts-BuoQ02BW.js.map → _server.ts-CyEdTCLr.js.map} +1 -1
  268. package/build/server/chunks/_server.ts-DKVTM9Pj.js +77 -0
  269. package/build/server/chunks/_server.ts-DKVTM9Pj.js.map +1 -0
  270. package/build/server/chunks/{_server.ts-0uNTZKwF.js → _server.ts-Dip65hLJ.js} +15 -9
  271. package/build/server/chunks/_server.ts-Dip65hLJ.js.map +1 -0
  272. package/build/server/chunks/{_server.ts-D4EO0VHu.js → _server.ts-Dm0tCs2i.js} +5 -5
  273. package/build/server/chunks/{_server.ts-D4EO0VHu.js.map → _server.ts-Dm0tCs2i.js.map} +1 -1
  274. package/build/server/chunks/{_server.ts-BIBWjQI-.js → _server.ts-DsYwK_uW.js} +4 -4
  275. package/build/server/chunks/{_server.ts-BIBWjQI-.js.map → _server.ts-DsYwK_uW.js.map} +1 -1
  276. package/build/server/chunks/{_server.ts-DDa0Nk_S.js → _server.ts-RCEgegYU.js} +4 -4
  277. package/build/server/chunks/{_server.ts-DDa0Nk_S.js.map → _server.ts-RCEgegYU.js.map} +1 -1
  278. package/build/server/chunks/_server.ts-XOLAT4dd.js +146 -0
  279. package/build/server/chunks/_server.ts-XOLAT4dd.js.map +1 -0
  280. package/build/server/chunks/_server.ts-afh_zLVi.js +69 -0
  281. package/build/server/chunks/_server.ts-afh_zLVi.js.map +1 -0
  282. package/build/server/chunks/{browserContainer-CNX7ANld.js → browserContainer-BdldtueJ.js} +71 -1378
  283. package/build/server/chunks/browserContainer-BdldtueJ.js.map +1 -0
  284. package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js +337 -0
  285. package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js.map +1 -0
  286. package/build/server/chunks/{builderModeStore.svelte-ihupr-3p.js → builderModeStore.svelte-BEZMQEqn.js} +223 -11
  287. package/build/server/chunks/builderModeStore.svelte-BEZMQEqn.js.map +1 -0
  288. package/build/server/chunks/client-C9Cat4DK.js +51 -0
  289. package/build/server/chunks/{client-DfpLcAZ9.js.map → client-C9Cat4DK.js.map} +1 -1
  290. package/build/server/chunks/{error.svelte-C35KOpru.js → error.svelte-CzVR_A6P.js} +5 -5
  291. package/build/server/chunks/{error.svelte-C35KOpru.js.map → error.svelte-CzVR_A6P.js.map} +1 -1
  292. package/build/server/chunks/featureQueueContext-DuXpyTdC.js +32 -0
  293. package/build/server/chunks/featureQueueContext-DuXpyTdC.js.map +1 -0
  294. package/build/server/chunks/featureStore.svelte-DHZf88gu.js +162 -0
  295. package/build/server/chunks/featureStore.svelte-DHZf88gu.js.map +1 -0
  296. package/build/server/chunks/{projectsStore.svelte-QDz5PchX.js → featuresStore.svelte-bUyQBg1-.js} +95 -3
  297. package/build/server/chunks/featuresStore.svelte-bUyQBg1-.js.map +1 -0
  298. package/build/server/chunks/{hooks.server-Rv301GTB.js → hooks.server-y3jdg_sB.js} +6 -2
  299. package/build/server/chunks/hooks.server-y3jdg_sB.js.map +1 -0
  300. package/build/server/chunks/humanize-CkCPfeWi.js +53 -0
  301. package/build/server/chunks/humanize-CkCPfeWi.js.map +1 -0
  302. package/build/server/chunks/{index-server-7H0jzj0M.js → index-server-DvBux_Gf.js} +47 -2
  303. package/build/server/chunks/{index-server-7H0jzj0M.js.map → index-server-DvBux_Gf.js.map} +1 -1
  304. package/build/server/chunks/{internal-BPKrFkK1.js → internal-BFt8yDlf.js} +5 -5
  305. package/build/server/chunks/{internal-BPKrFkK1.js.map → internal-BFt8yDlf.js.map} +1 -1
  306. package/build/server/chunks/projectBundleClient-BtvWPh87.js +168 -0
  307. package/build/server/chunks/projectBundleClient-BtvWPh87.js.map +1 -0
  308. package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js +141 -0
  309. package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js.map +1 -0
  310. package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js +87 -0
  311. package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js.map +1 -0
  312. package/build/server/chunks/projectStore.svelte-BNuLNxk_.js +230 -0
  313. package/build/server/chunks/projectStore.svelte-BNuLNxk_.js.map +1 -0
  314. package/build/server/chunks/{reconcile-Dv7jS3C8.js → reconcile-CVG2LSlW.js} +54 -267
  315. package/build/server/chunks/reconcile-CVG2LSlW.js.map +1 -0
  316. package/build/server/chunks/registry-DqAn_hVE.js +21 -0
  317. package/build/server/chunks/registry-DqAn_hVE.js.map +1 -0
  318. package/build/server/chunks/{snapshotRepository-BPXCjX92.js → snapshotRepository-8f-2wTrb.js} +30 -5
  319. package/build/server/chunks/snapshotRepository-8f-2wTrb.js.map +1 -0
  320. package/build/server/chunks/{state-CpLVNZq7.js → state-CZZtjXLE.js} +3 -3
  321. package/build/server/chunks/{state-CpLVNZq7.js.map → state-CZZtjXLE.js.map} +1 -1
  322. package/build/server/chunks/{sync-DZ3dn761.js → sync-Bn6eSUhC.js} +3 -3
  323. package/build/server/chunks/{sync-DZ3dn761.js.map → sync-Bn6eSUhC.js.map} +1 -1
  324. package/build/server/chunks/{syncBridge-BwXzPdjJ.js → syncAwareRepositories-DvUjq5Q6.js} +27 -3
  325. package/build/server/chunks/syncAwareRepositories-DvUjq5Q6.js.map +1 -0
  326. package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js → tagPaletteStore.svelte-C71bdzDl.js} +4 -4
  327. package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js.map → tagPaletteStore.svelte-C71bdzDl.js.map} +1 -1
  328. package/build/server/index.js +2 -2
  329. package/build/server/index.js.map +1 -1
  330. package/build/server/manifest.js +74 -29
  331. package/build/server/manifest.js.map +1 -1
  332. package/cli/README.md +70 -2
  333. package/cli/commands/check.ts +190 -0
  334. package/cli/commands/ci.ts +71 -0
  335. package/cli/commands/coverage-ingest.ts +112 -0
  336. package/cli/commands/dashboard.ts +14 -0
  337. package/cli/commands/init.ts +26 -0
  338. package/cli/commands/scenarios-adapter.ts +96 -0
  339. package/cli/commands/theme.ts +62 -0
  340. package/cli/scenarios/adapter-scaffold.ts +99 -0
  341. package/cli/scenarios/codegen.ts +7 -1
  342. package/cli/scenarios/results.ts +85 -0
  343. package/cli/skills/unspa-audit/SKILL.md +19 -0
  344. package/cli/skills/unspa-edit/SKILL.md +20 -3
  345. package/cli/skills/unspa-implement/SKILL.md +28 -0
  346. package/cli/unspa.ts +136 -2
  347. package/cli/util/context-files.ts +18 -2
  348. package/cli/util/theme.ts +34 -0
  349. package/mcp-server/bin.ts +104 -104
  350. package/mcp-server/migrate-defaults.ts +164 -164
  351. package/mcp-server/repo-link.ts +142 -134
  352. package/mcp-server/resources/guide.ts +24 -4
  353. package/mcp-server/resources/operations.ts +3 -0
  354. package/mcp-server/seed-snapshots.ts +22 -22
  355. package/mcp-server/server.ts +8 -4
  356. package/mcp-server/sync-aware-repos.ts +79 -79
  357. package/mcp-server/sync-notifier.ts +180 -127
  358. package/mcp-server/tools/_codegen.ts +115 -115
  359. package/mcp-server/tools/_entity_builders.ts +30 -0
  360. package/mcp-server/tools/_shared.ts +210 -210
  361. package/mcp-server/tools/action.ts +210 -210
  362. package/mcp-server/tools/batch.ts +29 -5
  363. package/mcp-server/tools/effect.ts +139 -135
  364. package/mcp-server/tools/entity.ts +132 -132
  365. package/mcp-server/tools/entityField.ts +132 -132
  366. package/mcp-server/tools/event.ts +116 -116
  367. package/mcp-server/tools/feature.ts +264 -264
  368. package/mcp-server/tools/invariant.ts +275 -275
  369. package/mcp-server/tools/persona.ts +141 -141
  370. package/mcp-server/tools/project.ts +500 -391
  371. package/mcp-server/tools/reachabilityGoal.ts +97 -0
  372. package/mcp-server/tools/read.ts +526 -483
  373. package/mcp-server/tools/reorder.ts +114 -114
  374. package/mcp-server/tools/resource.ts +194 -194
  375. package/mcp-server/tools/rule.ts +302 -302
  376. package/mcp-server/tools/scenario.ts +4 -1
  377. package/mcp-server/tools/specGaps.ts +221 -221
  378. package/mcp-server/tools/state.ts +10 -2
  379. package/mcp-server/tools/surface.ts +102 -102
  380. package/mcp-server/tools/transition.ts +96 -96
  381. package/mcp-server/tools/verification.ts +131 -0
  382. package/package.json +15 -2
  383. package/src/app.css +208 -9
  384. package/src/app.html +15 -1
  385. package/src/features/behavior-model/application/ports/FeatureRepository.ts +16 -16
  386. package/src/features/behavior-model/application/use-cases/CreateFeature.ts +24 -24
  387. package/src/features/behavior-model/application/use-cases/DeleteFeature.ts +8 -8
  388. package/src/features/behavior-model/application/use-cases/GetFeature.ts +9 -9
  389. package/src/features/behavior-model/application/use-cases/ListFeatures.ts +10 -10
  390. package/src/features/behavior-model/application/use-cases/MutateFeature.ts +90 -90
  391. package/src/features/behavior-model/application/use-cases/SaveFeature.ts +31 -31
  392. package/src/features/behavior-model/domain/entities/Entity.ts +45 -45
  393. package/src/features/behavior-model/domain/entities/EventDefinition.ts +35 -35
  394. package/src/features/behavior-model/domain/entities/Feature.ts +10 -0
  395. package/src/features/behavior-model/domain/entities/Persona.ts +33 -33
  396. package/src/features/behavior-model/domain/entities/ReachabilityGoal.ts +39 -0
  397. package/src/features/behavior-model/domain/entities/Resource.ts +54 -54
  398. package/src/features/behavior-model/domain/entities/Scenario.ts +15 -0
  399. package/src/features/behavior-model/domain/entities/StateDefinition.ts +13 -0
  400. package/src/features/behavior-model/domain/entities/Surface.ts +75 -75
  401. package/src/features/behavior-model/domain/entities/index.ts +9 -9
  402. package/src/features/behavior-model/domain/services/BehaviorGraphModel.ts +556 -0
  403. package/src/features/behavior-model/domain/services/DerivedState.ts +67 -0
  404. package/src/features/behavior-model/domain/services/EffectApplier.ts +112 -3
  405. package/src/features/behavior-model/domain/services/EffectiveEntities.ts +166 -166
  406. package/src/features/behavior-model/domain/services/EntityDeducer.ts +83 -83
  407. package/src/features/behavior-model/domain/services/EventCatalog.ts +141 -141
  408. package/src/features/behavior-model/domain/services/FeatureExpressionNormalizer.ts +43 -5
  409. package/src/features/behavior-model/domain/services/FeatureSharedStateNormalizer.ts +24 -3
  410. package/src/features/behavior-model/domain/services/FeatureTransforms.ts +33 -0
  411. package/src/features/behavior-model/domain/services/FeatureValidator.ts +124 -16
  412. package/src/features/behavior-model/domain/services/PersonaApplier.ts +39 -39
  413. package/src/features/behavior-model/domain/services/ResourceDeducer.ts +64 -64
  414. package/src/features/behavior-model/domain/services/ResourceUsage.ts +79 -79
  415. package/src/features/behavior-model/domain/services/ScenarioApplier.ts +40 -40
  416. package/src/features/behavior-model/domain/services/SharedStateDefinitions.ts +32 -32
  417. package/src/features/behavior-model/domain/services/StatePathReferences.ts +249 -217
  418. package/src/features/behavior-model/domain/services/TransitionCatalog.ts +173 -173
  419. package/src/features/behavior-model/domain/value-objects/Effect.ts +100 -3
  420. package/src/features/behavior-model/domain/value-objects/EntityFieldType.ts +57 -57
  421. package/src/features/behavior-model/domain/value-objects/Expression.ts +22 -2
  422. package/src/features/behavior-model/domain/value-objects/ParameterType.ts +57 -57
  423. package/src/features/behavior-model/domain/value-objects/Resource.ts +210 -210
  424. package/src/features/behavior-model/domain/value-objects/RuleCategory.ts +57 -57
  425. package/src/features/behavior-model/domain/value-objects/RuleCondition.ts +52 -1
  426. package/src/features/behavior-model/domain/value-objects/SimulationClock.ts +35 -0
  427. package/src/features/behavior-model/domain/value-objects/ids.ts +2 -0
  428. package/src/features/behavior-model/infrastructure/io/FeatureJson.ts +89 -89
  429. package/src/features/behavior-model/infrastructure/persistence/HttpFeatureRepository.ts +43 -43
  430. package/src/features/behavior-model/infrastructure/persistence/JsonFolderFeatureRepository.ts +10 -0
  431. package/src/features/behavior-model/infrastructure/persistence/snapshot-discovery.ts +76 -76
  432. package/src/features/behavior-model/infrastructure/seed/seedStorefront.ts +967 -967
  433. package/src/features/behavior-model/presentation/adapters/VisBehaviorGraphRenderer.ts +501 -0
  434. package/src/features/behavior-model/presentation/components/ActionEditor.svelte +683 -682
  435. package/src/features/behavior-model/presentation/components/ActionsEditor.svelte +232 -232
  436. package/src/features/behavior-model/presentation/components/BehaviorGraph.svelte +568 -0
  437. package/src/features/behavior-model/presentation/components/EffectEditor.svelte +168 -168
  438. package/src/features/behavior-model/presentation/components/EntityEditor.svelte +241 -248
  439. package/src/features/behavior-model/presentation/components/EntityFieldRow.svelte +180 -181
  440. package/src/features/behavior-model/presentation/components/EntityManager.svelte +252 -251
  441. package/src/features/behavior-model/presentation/components/EventsManager.svelte +373 -372
  442. package/src/features/behavior-model/presentation/components/FeatureEditor.svelte +396 -348
  443. package/src/features/behavior-model/presentation/components/FeatureHeader.svelte +165 -148
  444. package/src/features/behavior-model/presentation/components/FeatureHealthStrip.svelte +110 -110
  445. package/src/features/behavior-model/presentation/components/HistoryPanel.svelte +154 -154
  446. package/src/features/behavior-model/presentation/components/NewFeatureForm.svelte +66 -66
  447. package/src/features/behavior-model/presentation/components/ParameterNameSelect.svelte +84 -84
  448. package/src/features/behavior-model/presentation/components/ParametersEditor.svelte +411 -411
  449. package/src/features/behavior-model/presentation/components/PersonaEditor.svelte +244 -244
  450. package/src/features/behavior-model/presentation/components/PersonasManager.svelte +130 -130
  451. package/src/features/behavior-model/presentation/components/ReachabilityGoalEditor.svelte +230 -0
  452. package/src/features/behavior-model/presentation/components/ReachabilityGoalsEditor.svelte +86 -0
  453. package/src/features/behavior-model/presentation/components/ResourcesManager.svelte +291 -290
  454. package/src/features/behavior-model/presentation/components/ScenariosEditor.svelte +496 -496
  455. package/src/features/behavior-model/presentation/components/StateDefinitionsEditor.svelte +356 -356
  456. package/src/features/behavior-model/presentation/components/SurfaceEntitiesView.svelte +88 -88
  457. package/src/features/behavior-model/presentation/components/SurfaceInvariantsEditor.svelte +76 -76
  458. package/src/features/behavior-model/presentation/components/SurfaceList.svelte +300 -300
  459. package/src/features/behavior-model/presentation/components/SurfaceMetaEditor.svelte +158 -156
  460. package/src/features/behavior-model/presentation/components/SurfacePanel.svelte +198 -198
  461. package/src/features/behavior-model/presentation/components/SurfacePersonasView.svelte +122 -122
  462. package/src/features/behavior-model/presentation/components/SurfaceResourcesView.svelte +113 -113
  463. package/src/features/behavior-model/presentation/components/SurfaceRulesEditor.svelte +69 -69
  464. package/src/features/behavior-model/presentation/components/TransitionsManager.svelte +322 -321
  465. package/src/features/behavior-model/presentation/context/featureQueueContext.ts +78 -0
  466. package/src/features/behavior-model/presentation/stores/editorStore.svelte.ts +132 -131
  467. package/src/features/behavior-model/presentation/stores/featureStore.svelte.ts +177 -177
  468. package/src/features/behavior-model/presentation/stores/featuresStore.svelte.ts +98 -98
  469. package/src/features/behavior-model/presentation/view-models/BehaviorGraphTheme.ts +44 -0
  470. package/src/features/behavior-model/presentation/view-models/factories.ts +181 -132
  471. package/src/features/builder-mode/domain/BuilderModeDashboard.ts +7 -1
  472. package/src/features/builder-mode/presentation/components/BuilderModeDashboard.svelte +78 -16
  473. package/src/features/builder-mode/presentation/components/BuilderTagChips.svelte +25 -0
  474. package/src/features/builder-mode/presentation/stores/builderModeStore.svelte.ts +247 -3
  475. package/src/features/domains/infrastructure/persistence/JsonFolderDomainRepository.ts +9 -0
  476. package/src/features/global-search/application/use-cases/LoadSearchIndex.ts +70 -0
  477. package/src/features/global-search/domain/SearchDoc.ts +111 -0
  478. package/src/features/global-search/domain/buildSearchDocs.ts +483 -0
  479. package/src/features/global-search/domain/searchNav.ts +58 -0
  480. package/src/features/global-search/domain/searchScoring.ts +81 -0
  481. package/src/features/global-search/infrastructure/adapters/defaultSearchHost.ts +28 -0
  482. package/src/features/global-search/presentation/components/GlobalSearch.svelte +262 -0
  483. package/src/features/global-search/presentation/ports/SearchHostPorts.ts +41 -0
  484. package/src/features/global-search/presentation/searchKindMeta.ts +108 -0
  485. package/src/features/global-search/presentation/stores/globalSearchStore.svelte.ts +171 -0
  486. package/src/features/implementation-queue/presentation/components/FloatingQueueWidget.svelte +264 -0
  487. package/src/features/implementation-queue/presentation/stores/globalQueueStore.svelte.ts +172 -0
  488. package/src/features/implementation-status/application/ports/ImplementationStatusRepository.ts +8 -8
  489. package/src/features/implementation-status/application/use-cases/GetImplementationStatus.ts +8 -8
  490. package/src/features/implementation-status/domain/ApplyCapturedToSpec.ts +323 -322
  491. package/src/features/implementation-status/domain/FieldDiff.ts +238 -236
  492. package/src/features/implementation-status/infrastructure/persistence/InMemoryImplementationStatusRepository.ts +21 -21
  493. package/src/features/implementation-status/presentation/components/ImplementationStatusPanel.svelte +831 -831
  494. package/src/features/implementation-status/presentation/stores/implementationStatusStore.svelte.ts +97 -97
  495. package/src/features/library/application/use-cases/ApplyBlueprintsToFeature.ts +33 -33
  496. package/src/features/library/domain/services/BlueprintApplier.ts +94 -94
  497. package/src/features/library/infrastructure/blueprints/auth/ResetPasswordBlueprint.ts +332 -332
  498. package/src/features/library/infrastructure/blueprints/auth/SignInBlueprint.ts +281 -281
  499. package/src/features/library/infrastructure/blueprints/auth/SignUpBlueprint.ts +299 -299
  500. package/src/features/library/infrastructure/blueprints/auth/VerifyEmailBlueprint.ts +288 -288
  501. package/src/features/library/infrastructure/blueprints/auth/shared.ts +146 -146
  502. package/src/features/library/infrastructure/blueprints/commerce/CartBlueprint.ts +222 -222
  503. package/src/features/library/infrastructure/blueprints/commerce/CatalogBlueprint.ts +190 -190
  504. package/src/features/library/infrastructure/blueprints/commerce/CheckoutBlueprint.ts +322 -322
  505. package/src/features/library/infrastructure/blueprints/commerce/OrderConfirmationBlueprint.ts +172 -172
  506. package/src/features/library/infrastructure/blueprints/commerce/ProductDetailsBlueprint.ts +290 -290
  507. package/src/features/library/infrastructure/blueprints/content/ReviewsBlueprint.ts +392 -392
  508. package/src/features/library/infrastructure/blueprints/onboarding/OnboardingWizardBlueprint.ts +344 -344
  509. package/src/features/library/infrastructure/blueprints/utility/CanvasBlueprint.ts +419 -419
  510. package/src/features/library/infrastructure/blueprints/utility/CookieConsentBlueprint.ts +195 -195
  511. package/src/features/library/infrastructure/blueprints/utility/NotFoundBlueprint.ts +86 -86
  512. package/src/features/library/infrastructure/blueprints/utility/SearchPaletteBlueprint.ts +192 -192
  513. package/src/features/library/infrastructure/blueprints/utility/StoreLocatorBlueprint.ts +221 -221
  514. package/src/features/library/infrastructure/blueprints/utility/TaskBoardBlueprint.ts +196 -196
  515. package/src/features/maturity/application/use-cases/ScoreFeature.ts +7 -7
  516. package/src/features/maturity/domain/MaturityReport.ts +70 -70
  517. package/src/features/maturity/domain/MaturityScorer.ts +1001 -985
  518. package/src/features/maturity/presentation/components/MaturityPanel.svelte +376 -372
  519. package/src/features/mcp-tools/application/tools/dryRunSimulate.ts +24 -24
  520. package/src/features/mcp-tools/application/tools/findStateReferences.ts +19 -19
  521. package/src/features/mcp-tools/application/tools/generateTypes.ts +0 -1
  522. package/src/features/mcp-tools/application/tools/getAction.ts +165 -165
  523. package/src/features/mcp-tools/application/tools/getFeature.ts +5 -5
  524. package/src/features/mcp-tools/application/tools/getFeatureIndex.ts +79 -79
  525. package/src/features/mcp-tools/application/tools/getNeighborhood.ts +319 -319
  526. package/src/features/mcp-tools/application/tools/getSurface.ts +86 -86
  527. package/src/features/mcp-tools/application/tools/index.ts +56 -56
  528. package/src/features/mcp-tools/application/tools/listActions.ts +49 -49
  529. package/src/features/mcp-tools/application/tools/listFeatures.ts +7 -7
  530. package/src/features/mcp-tools/application/tools/scoreFeature.ts +153 -153
  531. package/src/features/projects/application/ports/ProjectRepository.ts +14 -14
  532. package/src/features/projects/application/use-cases/AddFeatureToProject.ts +23 -23
  533. package/src/features/projects/application/use-cases/CreateProject.ts +16 -16
  534. package/src/features/projects/application/use-cases/FindProjectContainingFeature.ts +23 -23
  535. package/src/features/projects/application/use-cases/GetProjectAggregate.ts +131 -131
  536. package/src/features/projects/application/use-cases/ImportProjectBundle.ts +45 -0
  537. package/src/features/projects/application/use-cases/MoveFeatureInProject.ts +36 -36
  538. package/src/features/projects/application/use-cases/RemoveFeatureFromProject.ts +23 -23
  539. package/src/features/projects/domain/entities/Project.ts +12 -0
  540. package/src/features/projects/domain/services/InheritedFromProject.ts +130 -130
  541. package/src/features/projects/infrastructure/persistence/JsonFolderProjectRepository.ts +9 -0
  542. package/src/features/projects/presentation/components/ProjectCard.svelte +27 -8
  543. package/src/features/projects/presentation/components/ProjectEditor.svelte +23 -19
  544. package/src/features/projects/presentation/components/ProjectFeaturesPanel.svelte +433 -433
  545. package/src/features/projects/presentation/components/ProjectsIndex.svelte +54 -10
  546. package/src/features/projects/presentation/stores/projectContextStore.svelte.ts +170 -170
  547. package/src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts +114 -114
  548. package/src/features/projects/presentation/stores/projectStore.svelte.ts +265 -266
  549. package/src/features/projects/presentation/stores/projectsStore.svelte.ts +134 -134
  550. package/src/features/simulator/application/use-cases/RunScenarios.ts +27 -1
  551. package/src/features/simulator/application/use-cases/SimulateAction.ts +47 -47
  552. package/src/features/simulator/domain/SimulationResult.ts +79 -79
  553. package/src/features/simulator/domain/SimulatorEngine.ts +43 -9
  554. package/src/features/simulator/domain/StateExplorer.ts +369 -0
  555. package/src/features/simulator/domain/SurfaceReachability.ts +130 -0
  556. package/src/features/simulator/presentation/components/ParameterInputs.svelte +277 -277
  557. package/src/features/simulator/presentation/components/PersonaPicker.svelte +52 -52
  558. package/src/features/simulator/presentation/components/ScenarioPicker.svelte +42 -45
  559. package/src/features/simulator/presentation/components/SidePanel.svelte +170 -170
  560. package/src/features/simulator/presentation/components/SimulationResultView.svelte +394 -394
  561. package/src/features/simulator/presentation/components/SimulatorPanel.svelte +293 -293
  562. package/src/features/simulator/presentation/components/StateInspector.svelte +101 -101
  563. package/src/features/simulator/presentation/stores/simulatorStore.svelte.ts +268 -268
  564. package/src/features/tutorial/presentation/components/CodeBlock.svelte +5 -1
  565. package/src/features/verification/application/ports/BehavioralIndexReader.ts +12 -0
  566. package/src/features/verification/application/use-cases/VerifyFeatures.ts +151 -0
  567. package/src/features/verification/domain/DriftReport.ts +37 -0
  568. package/src/features/verification/domain/EventCoherenceReport.ts +27 -0
  569. package/src/features/verification/domain/IndexedImplementation.ts +27 -0
  570. package/src/features/verification/domain/VerificationReport.ts +59 -0
  571. package/src/features/verification/domain/VerificationThresholds.ts +52 -0
  572. package/src/features/verification/domain/VerificationVerdict.ts +43 -0
  573. package/src/features/verification/domain/aggregateVerdict.ts +244 -0
  574. package/src/features/verification/domain/analyzeEventCoherence.ts +43 -0
  575. package/src/features/verification/domain/detectDrift.ts +166 -0
  576. package/src/features/verification/domain/verifiedCoverage.ts +37 -0
  577. package/src/features/verification/infrastructure/persistence/FileBehavioralIndexReader.ts +81 -0
  578. package/src/features/verification/infrastructure/persistence/StaticBehavioralIndexReader.ts +15 -0
  579. package/src/features/verification/presentation/components/VerifyPanel.svelte +74 -0
  580. package/src/features/verification/presentation/stores/verificationStore.svelte.ts +64 -0
  581. package/src/hooks.server.ts +11 -1
  582. package/src/lib/server/openLocalDirectory.ts +40 -0
  583. package/src/lib/server/searchIndex.ts +161 -0
  584. package/src/lib/server/snapshotRepository.ts +37 -37
  585. package/src/lib/server/sync/YDocManager.ts +391 -391
  586. package/src/lib/server/sync/historyStore.ts +276 -276
  587. package/src/lib/server/sync/wsServer.ts +1 -1
  588. package/src/lib/sync/protocol.ts +147 -147
  589. package/src/lib/sync/roomId.ts +33 -33
  590. package/src/lib/theme/registry.ts +77 -0
  591. package/src/lib/theme/themeStore.svelte.ts +64 -0
  592. package/src/routes/+layout.svelte +288 -30
  593. package/src/routes/api/domains/[id]/+server.ts +7 -3
  594. package/src/routes/api/projects/[id]/+server.ts +14 -4
  595. package/src/routes/api/projects/import/+server.ts +16 -38
  596. package/src/routes/api/search-index/+server.ts +16 -0
  597. package/src/routes/api/snapshots/[id]/+server.ts +56 -44
  598. package/src/routes/api/snapshots/[id]/implementation-status/+server.ts +13 -13
  599. package/src/routes/api/snapshots/[id]/verify/+server.ts +37 -0
  600. package/src/routes/api/sync/reload/+server.ts +157 -157
  601. package/src/routes/api/system/hub-directory/+server.ts +24 -0
  602. package/src/routes/features/+page.svelte +484 -484
  603. package/src/routes/features/[id]/+page.svelte +55 -49
  604. package/src/routes/features/[id]/graph/+page.svelte +39 -0
  605. package/src/routes/features/[id]/verify/+page.svelte +89 -0
  606. package/src/routes/mcp/+page.svelte +16 -1
  607. package/src/routes/projects/[id]/+page.svelte +70 -70
  608. package/src/routes/projects/[id]/graph/+page.svelte +79 -0
  609. package/src/routes/tutorial/+page.svelte +3 -2
  610. package/src/shared/infrastructure/browserContainer.ts +61 -61
  611. package/src/shared/presentation/components/KebabMenu.svelte +95 -0
  612. package/src/shared/presentation/components/MenuItem.svelte +29 -0
  613. package/src/shared/presentation/components/ProgressBar.svelte +1 -1
  614. package/src/shared/presentation/toast/SyncToast.svelte +14 -3
  615. package/src/shared/presentation/toast/viewLinkResolver.ts +32 -0
  616. package/static/lyriks_logo.svg +148 -0
  617. package/vite.config.ts +47 -47
  618. package/build/client/_app/immutable/assets/0.DFMDYAU9.css +0 -1
  619. package/build/client/_app/immutable/assets/0.DFMDYAU9.css.br +0 -0
  620. package/build/client/_app/immutable/assets/0.DFMDYAU9.css.gz +0 -0
  621. package/build/client/_app/immutable/assets/9.nv0I59TU.css.gz +0 -0
  622. package/build/client/_app/immutable/chunks/BO66rBOa2.js +0 -1
  623. package/build/client/_app/immutable/chunks/BO66rBOa2.js.br +0 -0
  624. package/build/client/_app/immutable/chunks/BO66rBOa2.js.gz +0 -0
  625. package/build/client/_app/immutable/chunks/BOrLmFwJ.js.br +0 -0
  626. package/build/client/_app/immutable/chunks/BOrLmFwJ.js.gz +0 -0
  627. package/build/client/_app/immutable/chunks/BfMYiIUi.js.br +0 -0
  628. package/build/client/_app/immutable/chunks/BfMYiIUi.js.gz +0 -0
  629. package/build/client/_app/immutable/chunks/Bp2_Vghh.js +0 -1
  630. package/build/client/_app/immutable/chunks/Bp2_Vghh.js.br +0 -0
  631. package/build/client/_app/immutable/chunks/Bp2_Vghh.js.gz +0 -0
  632. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js +0 -4
  633. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.br +0 -0
  634. package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.gz +0 -0
  635. package/build/client/_app/immutable/chunks/C8rRKIXT.js +0 -1
  636. package/build/client/_app/immutable/chunks/C8rRKIXT.js.br +0 -0
  637. package/build/client/_app/immutable/chunks/C8rRKIXT.js.gz +0 -0
  638. package/build/client/_app/immutable/chunks/CJjJLwzv2.js +0 -1
  639. package/build/client/_app/immutable/chunks/CJjJLwzv2.js.br +0 -0
  640. package/build/client/_app/immutable/chunks/CJjJLwzv2.js.gz +0 -0
  641. package/build/client/_app/immutable/chunks/CxyLMlpt2.js.br +0 -0
  642. package/build/client/_app/immutable/chunks/CxyLMlpt2.js.gz +0 -0
  643. package/build/client/_app/immutable/chunks/D6jhrpTg.js +0 -1
  644. package/build/client/_app/immutable/chunks/D6jhrpTg.js.br +0 -0
  645. package/build/client/_app/immutable/chunks/D6jhrpTg.js.gz +0 -0
  646. package/build/client/_app/immutable/chunks/D8YEa1po.js +0 -1
  647. package/build/client/_app/immutable/chunks/D8YEa1po.js.br +0 -0
  648. package/build/client/_app/immutable/chunks/D8YEa1po.js.gz +0 -0
  649. package/build/client/_app/immutable/chunks/D9dKmajw.js +0 -1
  650. package/build/client/_app/immutable/chunks/D9dKmajw.js.br +0 -0
  651. package/build/client/_app/immutable/chunks/D9dKmajw.js.gz +0 -0
  652. package/build/client/_app/immutable/chunks/DBJWcC6Y.js +0 -1
  653. package/build/client/_app/immutable/chunks/DBJWcC6Y.js.br +0 -0
  654. package/build/client/_app/immutable/chunks/DBJWcC6Y.js.gz +0 -0
  655. package/build/client/_app/immutable/chunks/DHoA038D.js +0 -1
  656. package/build/client/_app/immutable/chunks/DHoA038D.js.br +0 -2
  657. package/build/client/_app/immutable/chunks/DHoA038D.js.gz +0 -0
  658. package/build/client/_app/immutable/chunks/DKgYpi6_.js +0 -1
  659. package/build/client/_app/immutable/chunks/DKgYpi6_.js.br +0 -0
  660. package/build/client/_app/immutable/chunks/DKgYpi6_.js.gz +0 -0
  661. package/build/client/_app/immutable/chunks/DatGSObE.js +0 -1
  662. package/build/client/_app/immutable/chunks/DatGSObE.js.br +0 -0
  663. package/build/client/_app/immutable/chunks/DatGSObE.js.gz +0 -0
  664. package/build/client/_app/immutable/chunks/Dg0acPpT.js +0 -1
  665. package/build/client/_app/immutable/chunks/Dg0acPpT.js.br +0 -0
  666. package/build/client/_app/immutable/chunks/Dg0acPpT.js.gz +0 -0
  667. package/build/client/_app/immutable/chunks/DjWKKtqp.js +0 -1
  668. package/build/client/_app/immutable/chunks/DjWKKtqp.js.br +0 -1
  669. package/build/client/_app/immutable/chunks/DjWKKtqp.js.gz +0 -0
  670. package/build/client/_app/immutable/chunks/Dq0DUAz1.js +0 -1
  671. package/build/client/_app/immutable/chunks/Dq0DUAz1.js.br +0 -0
  672. package/build/client/_app/immutable/chunks/Dq0DUAz1.js.gz +0 -0
  673. package/build/client/_app/immutable/chunks/HKLi1Yz3.js +0 -1
  674. package/build/client/_app/immutable/chunks/HKLi1Yz3.js.br +0 -0
  675. package/build/client/_app/immutable/chunks/HKLi1Yz3.js.gz +0 -0
  676. package/build/client/_app/immutable/chunks/N7PXjlRH.js +0 -1
  677. package/build/client/_app/immutable/chunks/N7PXjlRH.js.br +0 -0
  678. package/build/client/_app/immutable/chunks/N7PXjlRH.js.gz +0 -0
  679. package/build/client/_app/immutable/chunks/hpWJNn0t2.js +0 -2
  680. package/build/client/_app/immutable/chunks/hpWJNn0t2.js.br +0 -0
  681. package/build/client/_app/immutable/chunks/hpWJNn0t2.js.gz +0 -0
  682. package/build/client/_app/immutable/chunks/iQu0D9Ux.js +0 -1
  683. package/build/client/_app/immutable/chunks/iQu0D9Ux.js.br +0 -0
  684. package/build/client/_app/immutable/chunks/iQu0D9Ux.js.gz +0 -0
  685. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js +0 -2
  686. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.br +0 -0
  687. package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.gz +0 -0
  688. package/build/client/_app/immutable/entry/start.D5GPCQZD.js +0 -1
  689. package/build/client/_app/immutable/entry/start.D5GPCQZD.js.br +0 -0
  690. package/build/client/_app/immutable/entry/start.D5GPCQZD.js.gz +0 -0
  691. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js +0 -4
  692. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.br +0 -0
  693. package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.gz +0 -0
  694. package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.br +0 -2
  695. package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.gz +0 -0
  696. package/build/client/_app/immutable/nodes/2.DBz20KgG.js.br +0 -0
  697. package/build/client/_app/immutable/nodes/2.DBz20KgG.js.gz +0 -0
  698. package/build/client/_app/immutable/nodes/3.19DIoFtw.js +0 -1
  699. package/build/client/_app/immutable/nodes/3.19DIoFtw.js.br +0 -0
  700. package/build/client/_app/immutable/nodes/3.19DIoFtw.js.gz +0 -0
  701. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js +0 -3
  702. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.br +0 -0
  703. package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.gz +0 -0
  704. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js +0 -42
  705. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.br +0 -0
  706. package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.gz +0 -0
  707. package/build/client/_app/immutable/nodes/6.BOHISqs-.js +0 -5
  708. package/build/client/_app/immutable/nodes/6.BOHISqs-.js.br +0 -0
  709. package/build/client/_app/immutable/nodes/6.BOHISqs-.js.gz +0 -0
  710. package/build/client/_app/immutable/nodes/7.CemgNJfw.js.br +0 -0
  711. package/build/client/_app/immutable/nodes/7.CemgNJfw.js.gz +0 -0
  712. package/build/client/_app/immutable/nodes/8.DejSfIYh.js +0 -5
  713. package/build/client/_app/immutable/nodes/8.DejSfIYh.js.br +0 -0
  714. package/build/client/_app/immutable/nodes/8.DejSfIYh.js.gz +0 -0
  715. package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.br +0 -0
  716. package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.gz +0 -0
  717. package/build/server/chunks/0-C_o0oz-N.js +0 -15
  718. package/build/server/chunks/0-C_o0oz-N.js.map +0 -1
  719. package/build/server/chunks/1-DPpKAKXV.js +0 -9
  720. package/build/server/chunks/2-AlfFqtL1.js +0 -9
  721. package/build/server/chunks/2-AlfFqtL1.js.map +0 -1
  722. package/build/server/chunks/3-vbjUt_51.js +0 -16
  723. package/build/server/chunks/3-vbjUt_51.js.map +0 -1
  724. package/build/server/chunks/4-BNow4x6D.js +0 -16
  725. package/build/server/chunks/4-BNow4x6D.js.map +0 -1
  726. package/build/server/chunks/5-D7OCJpxD.js +0 -9
  727. package/build/server/chunks/5-D7OCJpxD.js.map +0 -1
  728. package/build/server/chunks/6-QQ7r8Rd5.js +0 -9
  729. package/build/server/chunks/7-CbPLGaIG.js +0 -9
  730. package/build/server/chunks/7-CbPLGaIG.js.map +0 -1
  731. package/build/server/chunks/8-CVO-E-sf.js +0 -9
  732. package/build/server/chunks/8-CVO-E-sf.js.map +0 -1
  733. package/build/server/chunks/9-DxT1baO5.js +0 -9
  734. package/build/server/chunks/9-DxT1baO5.js.map +0 -1
  735. package/build/server/chunks/FeatureTransforms-UWDHmWEg.js.map +0 -1
  736. package/build/server/chunks/FeatureValidator-B8qEjAUW.js.map +0 -1
  737. package/build/server/chunks/ManageTagsDialog-DBxA3tM2.js.map +0 -1
  738. package/build/server/chunks/ProgressBar-CfhccQ83.js.map +0 -1
  739. package/build/server/chunks/ProjectsIndex-CoDrvRya.js.map +0 -1
  740. package/build/server/chunks/RenameTag-BuWLMl1m.js.map +0 -1
  741. package/build/server/chunks/TagDotStrip-B1XQ0m0Y.js.map +0 -1
  742. package/build/server/chunks/TagPalette-CtMNYCmu.js.map +0 -1
  743. package/build/server/chunks/_layout.svelte-BREws55o.js +0 -616
  744. package/build/server/chunks/_layout.svelte-BREws55o.js.map +0 -1
  745. package/build/server/chunks/_page.svelte-B1s7jxaQ.js.map +0 -1
  746. package/build/server/chunks/_page.svelte-B7hT3P8E.js +0 -29
  747. package/build/server/chunks/_page.svelte-BqSC-1vK.js.map +0 -1
  748. package/build/server/chunks/_page.svelte-BtI2zZ_Z.js.map +0 -1
  749. package/build/server/chunks/_page.svelte-De508ek8.js +0 -29
  750. package/build/server/chunks/_page.svelte-Zf9H4KOP.js.map +0 -1
  751. package/build/server/chunks/_server.ts-0uNTZKwF.js.map +0 -1
  752. package/build/server/chunks/_server.ts-DcZPhyhK.js +0 -59
  753. package/build/server/chunks/_server.ts-DcZPhyhK.js.map +0 -1
  754. package/build/server/chunks/_server.ts-Dy5zQHe2.js.map +0 -1
  755. package/build/server/chunks/_server.ts-YnfXkeMJ.js.map +0 -1
  756. package/build/server/chunks/_server.ts-vcaqdwxS.js.map +0 -1
  757. package/build/server/chunks/browserContainer-CNX7ANld.js.map +0 -1
  758. package/build/server/chunks/builderModeStore.svelte-ihupr-3p.js.map +0 -1
  759. package/build/server/chunks/client-DfpLcAZ9.js +0 -24
  760. package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js +0 -98
  761. package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js.map +0 -1
  762. package/build/server/chunks/hooks.server-Rv301GTB.js.map +0 -1
  763. package/build/server/chunks/identityStore.svelte-IIvW2_3b.js +0 -59
  764. package/build/server/chunks/identityStore.svelte-IIvW2_3b.js.map +0 -1
  765. package/build/server/chunks/projectsStore.svelte-QDz5PchX.js.map +0 -1
  766. package/build/server/chunks/reconcile-Dv7jS3C8.js.map +0 -1
  767. package/build/server/chunks/snapshotRepository-BPXCjX92.js.map +0 -1
  768. package/build/server/chunks/syncBridge-BwXzPdjJ.js.map +0 -1
  769. package/src/features/implementation-queue/presentation/components/QueuePanel.svelte +0 -204
  770. package/src/features/implementation-queue/presentation/stores/queueStore.svelte.ts +0 -143
  771. /package/build/client/_app/immutable/assets/{9.nv0I59TU.css → 12.nv0I59TU.css} +0 -0
  772. /package/build/client/_app/immutable/assets/{9.nv0I59TU.css.br → 12.nv0I59TU.css.br} +0 -0
@@ -0,0 +1,961 @@
1
+ import { h as getSnapshotRepository } from './snapshotRepository-8f-2wTrb.js';
2
+ import { g as simulate, f as fillDefaults, e as evaluateCondition, s as scoreFeature, i as isEvolution, c as collectDerivedDefs, r as recomputeDerived, b as buildInitialSnapshot } from './SimulatorEngine-DM1F9nCO.js';
3
+ import { a as advanceClock } from './StateValue-BBjWox8f.js';
4
+ import { b as applyPersonaToSnapshot, a as applyPersonaToParameters, d as applyScenarioToSnapshot, c as applyScenarioToParameters } from './ScenarioApplier-YPKECfZe.js';
5
+ import { j as json } from './index-CLnuRv4X.js';
6
+ import { existsSync, readFileSync } from 'node:fs';
7
+ import { join, resolve, parse } from 'node:path';
8
+ import './TagPalette-CpdTiC_7.js';
9
+ import './FeatureJson-DYvMEAub.js';
10
+ import './ImplementationStatus-7CfVZQtq.js';
11
+ import 'write-file-atomic';
12
+ import 'node:os';
13
+ import './humanize-CkCPfeWi.js';
14
+ import './index-DBqjc0Yf.js';
15
+
16
+ //#region src/features/simulator/application/use-cases/RunScenarios.ts
17
+ /**
18
+ * Evaluate a scenario's expectedAssertions against a post-simulation snapshot.
19
+ * Shared by the subject action and by each multi-step step. On a `blocked`
20
+ * status every assertion is reported `held: null, skipped: true`: comparing
21
+ * "state after success" to a snapshot where no success effects ran is
22
+ * meaningless, so the runner skips explicitly instead of silently evaluating
23
+ * against the untouched snapshot.
24
+ */
25
+ var evaluateAssertions = (assertions, status, snapshot, params) => assertions.map((a) => {
26
+ if (status === "blocked") return {
27
+ path: String(a.path),
28
+ operator: a.operator,
29
+ held: null,
30
+ skipped: true,
31
+ ...a.description ? { description: a.description } : {}
32
+ };
33
+ const rawPath = a.path;
34
+ if (typeof rawPath !== "string" || rawPath.length === 0) return {
35
+ path: String(a.path),
36
+ operator: a.operator,
37
+ held: false,
38
+ ...a.description ? { description: a.description } : {}
39
+ };
40
+ const held = evaluateCondition({
41
+ left: a.path,
42
+ operator: a.operator,
43
+ right: a.value
44
+ }, snapshot, params);
45
+ return {
46
+ path: rawPath,
47
+ operator: a.operator,
48
+ held,
49
+ ...a.description ? { description: a.description } : {}
50
+ };
51
+ });
52
+ var runOne = (surface, action, scenario, feature, projectFeatures) => {
53
+ const persona = scenario.personaId !== void 0 ? feature.personas.find((p) => p.id === scenario.personaId) ?? null : null;
54
+ if (scenario.personaId !== void 0 && persona === null) throw new Error(`Scenario ${scenario.id} references unknown personaId "${String(scenario.personaId)}"`);
55
+ const personaSnapshot = persona ? applyPersonaToSnapshot(persona, {}) : {};
56
+ const personaParams = persona ? applyPersonaToParameters(persona, action, {}) : {};
57
+ const baseSnapshot = applyScenarioToSnapshot(scenario, personaSnapshot);
58
+ const stepResults = [];
59
+ let snapshot = baseSnapshot;
60
+ for (const [index, step] of (scenario.steps ?? []).entries()) {
61
+ const stepSurface = step.surfaceId === void 0 ? surface : feature.surfaces.find((s) => s.id === step.surfaceId);
62
+ const stepAction = stepSurface?.actions.find((a) => a.id === step.actionId);
63
+ if (!stepSurface || !stepAction) throw new Error(`Scenario ${scenario.id} step ${index} references unknown ${!stepSurface ? `surfaceId "${String(step.surfaceId)}"` : `actionId "${String(step.actionId)}"`}`);
64
+ const stepPersonaParams = persona ? applyPersonaToParameters(persona, stepAction, {}) : {};
65
+ const stepParamNames = new Set(stepAction.parameters.map((p) => p.name));
66
+ const stepOverrideParams = {};
67
+ for (const ov of step.parameterOverrides) if (stepParamNames.has(ov.parameterName)) stepOverrideParams[ov.parameterName] = ov.value;
68
+ const stepParams = {
69
+ ...stepPersonaParams,
70
+ ...stepOverrideParams
71
+ };
72
+ if (step.timeAdvance !== void 0 && step.timeAdvance !== 0) snapshot = advanceClock(snapshot, step.timeAdvance);
73
+ const stepResult = simulate({
74
+ surface: stepSurface,
75
+ action: stepAction,
76
+ snapshot,
77
+ parameters: stepParams,
78
+ featureInvariants: feature.featureInvariants,
79
+ feature,
80
+ ...projectFeatures ? { projectFeatures } : {}
81
+ });
82
+ snapshot = stepResult.nextState;
83
+ const stepStatus = stepResult.status === "blocked" ? "blocked" : "success";
84
+ const stepExpected = step.expectedStatus ?? "success";
85
+ const stepStatusMatches = stepStatus === stepExpected;
86
+ const stepFilled = fillDefaults(stepAction.parameters, stepParams);
87
+ const stepAssertions = evaluateAssertions(step.expectedAssertions ?? [], stepStatus, stepResult.nextState, stepFilled);
88
+ const stepAssertionsHold = stepAssertions.every((a) => a.skipped || a.held);
89
+ const stepPass = stepStatusMatches && stepAssertionsHold;
90
+ const stepFailedAssertions = stepAssertions.filter((a) => !a.skipped && !a.held).length;
91
+ stepResults.push({
92
+ index,
93
+ surfaceId: stepSurface.id,
94
+ actionId: stepAction.id,
95
+ actionName: stepAction.name,
96
+ description: step.description ?? null,
97
+ actualStatus: stepStatus,
98
+ expectedStatus: stepExpected,
99
+ statusMatches: stepStatusMatches,
100
+ assertions: stepAssertions,
101
+ parameterErrors: stepResult.parameterErrors,
102
+ invariantViolations: stepResult.invariantViolations,
103
+ pass: stepPass,
104
+ summary: stepPass ? `pass. ${stepStatus}` : !stepStatusMatches ? `status was ${stepStatus} but expected ${stepExpected}` : `${stepFailedAssertions} assertion${stepFailedAssertions === 1 ? "" : "s"} did not hold`
105
+ });
106
+ }
107
+ const scenarioParams = applyScenarioToParameters(scenario, action, {});
108
+ const baseParams = {
109
+ ...personaParams,
110
+ ...scenarioParams
111
+ };
112
+ if (scenario.timeAdvance !== void 0 && scenario.timeAdvance !== 0) snapshot = advanceClock(snapshot, scenario.timeAdvance);
113
+ const result = simulate({
114
+ surface,
115
+ action,
116
+ snapshot,
117
+ parameters: baseParams,
118
+ featureInvariants: feature.featureInvariants,
119
+ feature,
120
+ ...projectFeatures ? { projectFeatures } : {}
121
+ });
122
+ const filledParams = fillDefaults(action.parameters, baseParams);
123
+ const finalSnapshot = result.nextState;
124
+ const actualStatus = result.status === "blocked" ? "blocked" : "success";
125
+ const assertions = evaluateAssertions(scenario.expectedAssertions ?? [], actualStatus, finalSnapshot, filledParams);
126
+ const expectedStatus = scenario.expectedStatus ?? null;
127
+ const statusMatches = expectedStatus === null || expectedStatus === actualStatus;
128
+ const assertionsHold = assertions.every((a) => a.skipped || a.held);
129
+ const silentSkipFail = assertions.length > 0 && assertions.every((a) => a.skipped) && expectedStatus !== "blocked";
130
+ const transitionCheck = scenario.expectedTransition === void 0 ? null : actualStatus === "blocked" ? {
131
+ expected: scenario.expectedTransition,
132
+ actual: result.transition,
133
+ matches: true
134
+ } : {
135
+ expected: scenario.expectedTransition,
136
+ actual: result.transition,
137
+ matches: scenario.expectedTransition === result.transition
138
+ };
139
+ const transitionOk = transitionCheck === null || transitionCheck.matches;
140
+ const stepsPass = stepResults.every((s) => s.pass);
141
+ const firstFailedStep = stepResults.find((s) => !s.pass);
142
+ const pass = stepsPass && statusMatches && assertionsHold && transitionOk && !silentSkipFail;
143
+ const failedAssertionCount = assertions.filter((a) => !a.skipped && !a.held).length;
144
+ const paramErrorBlurb = result.parameterErrors.length > 0 ? ` (parameter validation rejected: ${result.parameterErrors.map((e) => `${e.parameterName}. ${e.reason}`).join("; ")})` : "";
145
+ const invariantBlurb = result.invariantViolations.length > 0 ? ` (invariant violations: ${result.invariantViolations.map((v) => v.invariantName).join(", ")})` : "";
146
+ const evaluatedAssertionCount = assertions.filter((a) => !a.skipped).length;
147
+ const skippedAssertionCount = assertions.length - evaluatedAssertionCount;
148
+ const skippedBlurb = skippedAssertionCount > 0 ? `, ${skippedAssertionCount} skipped (action was blocked)` : "";
149
+ const transitionBlurb = transitionCheck && !transitionCheck.matches ? ` (transition went to ${String(transitionCheck.actual)} but expected ${String(transitionCheck.expected)})` : "";
150
+ const stepPrefix = stepResults.length > 0 ? `${stepResults.length} step${stepResults.length === 1 ? "" : "s"} ok, ` : "";
151
+ const summary = pass ? `pass. ${stepPrefix}${actualStatus}${evaluatedAssertionCount > 0 ? `, ${evaluatedAssertionCount} assertion${evaluatedAssertionCount === 1 ? "" : "s"} held` : ""}${skippedBlurb}` : `fail. ${!stepsPass && firstFailedStep ? `step ${firstFailedStep.index} (${firstFailedStep.actionName}): ${firstFailedStep.summary}` : !statusMatches ? `status was ${actualStatus} but expected ${expectedStatus}${paramErrorBlurb}${invariantBlurb}` : !transitionOk ? `transition mismatch${transitionBlurb}` : silentSkipFail ? `action was blocked so all ${assertions.length} assertion${assertions.length === 1 ? "" : "s"} skipped. Set expectedStatus:"blocked" if the block is intentional; otherwise fix the scenario so the action runs.${paramErrorBlurb}${invariantBlurb}` : `${failedAssertionCount}/${evaluatedAssertionCount} assertion${evaluatedAssertionCount === 1 ? "" : "s"} did not hold${invariantBlurb}`}`;
152
+ return {
153
+ surfaceId: surface.id,
154
+ actionId: action.id,
155
+ actionName: action.name,
156
+ scenarioId: scenario.id,
157
+ scenarioName: scenario.name,
158
+ personaId: persona ? String(persona.id) : null,
159
+ personaName: persona?.name ?? null,
160
+ pass,
161
+ actualStatus,
162
+ expectedStatus,
163
+ statusMatches,
164
+ assertions,
165
+ steps: stepResults,
166
+ transitionCheck,
167
+ parameterErrors: result.parameterErrors,
168
+ invariantViolations: result.invariantViolations,
169
+ summary
170
+ };
171
+ };
172
+ /**
173
+ * Walk the feature, optionally filtered to one surface or one action,
174
+ * and execute every scenario through the deterministic simulator. Reports
175
+ * pass/fail per scenario so scenarios become executable specs (the report's
176
+ * "scenarios are decorative" complaint).
177
+ */
178
+ var runScenariosUseCase = () => {
179
+ return (input) => {
180
+ const results = [];
181
+ for (const surface of input.feature.surfaces) {
182
+ if (input.surfaceId && surface.id !== input.surfaceId) continue;
183
+ for (const action of surface.actions) {
184
+ if (input.actionId && action.id !== input.actionId) continue;
185
+ const scenarios = action.scenarios ?? [];
186
+ for (const scenario of scenarios) results.push(runOne(surface, action, scenario, input.feature, input.projectFeatures));
187
+ }
188
+ }
189
+ const passed = results.filter((r) => r.pass).length;
190
+ return {
191
+ featureId: String(input.feature.id),
192
+ featureName: input.feature.name,
193
+ total: results.length,
194
+ passed,
195
+ failed: results.length - passed,
196
+ results
197
+ };
198
+ };
199
+ };
200
+
201
+ //#region src/features/simulator/domain/StateExplorer.ts
202
+ var DEFAULT_MAX_DEPTH = 6;
203
+ var DEFAULT_MAX_STATES = 2e3;
204
+ /**
205
+ * Order-stable canonical serialization for the visited set: object keys sorted,
206
+ * array order preserved (order is semantically meaningful for lists).
207
+ */
208
+ var canonical = (v) => {
209
+ if (v === void 0) return "undefined";
210
+ if (v === null || typeof v !== "object") return JSON.stringify(v);
211
+ if (Array.isArray(v)) return `[${v.map(canonical).join(",")}]`;
212
+ const obj = v;
213
+ return `{${Object.keys(obj).sort().map((k) => `${JSON.stringify(k)}:${canonical(obj[k])}`).join(",")}}`;
214
+ };
215
+ var requiresUnsuppliableParam = (action) => action.parameters.some((p) => p.required && p.defaultValue === void 0);
216
+ var exploreStateSpace = (feature, options = {}, projectFeatures) => {
217
+ const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
218
+ const maxStates = options.maxStates ?? DEFAULT_MAX_STATES;
219
+ const allDefs = [...feature.surfaces.flatMap((s) => s.stateDefinitions), ...options.seedStateDefs ?? []];
220
+ const derivedDefs = collectDerivedDefs(allDefs);
221
+ const checkedInvariants = [...feature.featureInvariants ?? [], ...options.extraInvariants ?? []];
222
+ const moves = [];
223
+ const skippedActions = [];
224
+ for (const surface of feature.surfaces) for (const action of surface.actions) {
225
+ if (isEvolution(action)) continue;
226
+ if (requiresUnsuppliableParam(action)) {
227
+ skippedActions.push({
228
+ surfaceId: String(surface.id),
229
+ actionId: String(action.id),
230
+ actionName: action.name,
231
+ reason: "has a required parameter with no default; the explorer cannot invent a value"
232
+ });
233
+ continue;
234
+ }
235
+ moves.push({
236
+ surface,
237
+ action
238
+ });
239
+ }
240
+ const goals = feature.reachabilityGoals ?? [];
241
+ const trackGoals = goals.length > 0;
242
+ const initial = recomputeDerived(buildInitialSnapshot(allDefs), derivedDefs);
243
+ const initialKey = canonical(initial);
244
+ const queue = [{
245
+ snapshot: initial,
246
+ path: [],
247
+ key: initialKey
248
+ }];
249
+ const visited = new Set([initialKey]);
250
+ const firedActions = /* @__PURE__ */ new Set();
251
+ const violations = [];
252
+ const violationSeen = /* @__PURE__ */ new Set();
253
+ let statesExplored = 0;
254
+ let depthReached = 0;
255
+ let deadlockStates = 0;
256
+ let truncated = false;
257
+ const forwardEdges = /* @__PURE__ */ new Map();
258
+ const expandedPath = /* @__PURE__ */ new Map();
259
+ const goalSatisfyingKeys = /* @__PURE__ */ new Map();
260
+ const goalEvaluated = /* @__PURE__ */ new Set();
261
+ for (const goal of goals) goalSatisfyingKeys.set(String(goal.id), /* @__PURE__ */ new Set());
262
+ const recordGoalSatisfaction = (snapshot, key) => {
263
+ if (goalEvaluated.has(key)) return;
264
+ goalEvaluated.add(key);
265
+ for (const goal of goals) if (evaluateCondition(goal.condition, snapshot)) goalSatisfyingKeys.get(String(goal.id)).add(key);
266
+ };
267
+ if (trackGoals) recordGoalSatisfaction(initial, initialKey);
268
+ while (queue.length > 0) {
269
+ const node = queue.shift();
270
+ if (statesExplored >= maxStates) {
271
+ truncated = true;
272
+ break;
273
+ }
274
+ statesExplored += 1;
275
+ depthReached = Math.max(depthReached, node.path.length);
276
+ if (trackGoals) expandedPath.set(node.key, node.path);
277
+ let anySuccess = false;
278
+ for (const move of moves) {
279
+ const params = fillDefaults(move.action.parameters, {});
280
+ const result = simulate({
281
+ surface: move.surface,
282
+ action: move.action,
283
+ snapshot: node.snapshot,
284
+ parameters: params,
285
+ featureInvariants: checkedInvariants,
286
+ feature,
287
+ ...projectFeatures ? { projectFeatures } : {}
288
+ });
289
+ if (result.invariantViolations.length > 0) {
290
+ for (const v of result.invariantViolations) {
291
+ const key = `${v.invariantId}@${move.action.id}`;
292
+ if (violationSeen.has(key)) continue;
293
+ violationSeen.add(key);
294
+ violations.push({
295
+ invariantId: String(v.invariantId),
296
+ invariantName: v.invariantName,
297
+ surfaceId: String(move.surface.id),
298
+ actionId: String(move.action.id),
299
+ actionName: move.action.name,
300
+ path: [...node.path, move.action.name]
301
+ });
302
+ }
303
+ continue;
304
+ }
305
+ if (result.status === "success") {
306
+ firedActions.add(String(move.action.id));
307
+ anySuccess = true;
308
+ const key = canonical(result.nextState);
309
+ if (trackGoals) {
310
+ let succ = forwardEdges.get(node.key);
311
+ if (!succ) {
312
+ succ = /* @__PURE__ */ new Set();
313
+ forwardEdges.set(node.key, succ);
314
+ }
315
+ succ.add(key);
316
+ recordGoalSatisfaction(result.nextState, key);
317
+ }
318
+ if (!visited.has(key) && node.path.length < maxDepth) {
319
+ visited.add(key);
320
+ queue.push({
321
+ snapshot: result.nextState,
322
+ path: [...node.path, move.action.name],
323
+ key
324
+ });
325
+ }
326
+ }
327
+ }
328
+ if (!anySuccess) deadlockStates += 1;
329
+ }
330
+ const deadActions = moves.filter((m) => !firedActions.has(String(m.action.id))).map((m) => ({
331
+ surfaceId: String(m.surface.id),
332
+ actionId: String(m.action.id),
333
+ actionName: m.action.name
334
+ }));
335
+ const goalResults = goals.map((goal) => {
336
+ const satisfyingKeys = goalSatisfyingKeys.get(String(goal.id));
337
+ if (goal.kind === "reachable") return {
338
+ goalId: String(goal.id),
339
+ goalName: goal.name,
340
+ kind: goal.kind,
341
+ satisfied: satisfyingKeys.size > 0
342
+ };
343
+ const reachesGoal = reverseReachable(satisfyingKeys, forwardEdges);
344
+ let trapPath = null;
345
+ for (const [key, path] of expandedPath) if (!reachesGoal.has(key) && (trapPath === null || path.length < trapPath.length)) trapPath = path;
346
+ return {
347
+ goalId: String(goal.id),
348
+ goalName: goal.name,
349
+ kind: goal.kind,
350
+ satisfied: trapPath === null,
351
+ ...trapPath ? { counterexamplePath: trapPath } : {}
352
+ };
353
+ });
354
+ return {
355
+ statesExplored,
356
+ depthReached,
357
+ truncated,
358
+ invariantViolations: violations,
359
+ deadActions,
360
+ deadlockStates,
361
+ skippedActions,
362
+ goalResults
363
+ };
364
+ };
365
+ /**
366
+ * The set of state keys that can reach any key in `targets` by following the
367
+ * transition graph forward — computed by walking the graph BACKWARD from the
368
+ * targets. Used for `always_reachable`: a state outside this set is one from
369
+ * which the goal can no longer be reached (a liveness trap).
370
+ */
371
+ var reverseReachable = (targets, forwardEdges) => {
372
+ const reverse = /* @__PURE__ */ new Map();
373
+ for (const [from, tos] of forwardEdges) for (const to of tos) {
374
+ const preds = reverse.get(to);
375
+ if (preds) preds.push(from);
376
+ else reverse.set(to, [from]);
377
+ }
378
+ const reached = new Set(targets);
379
+ const stack = [...targets];
380
+ while (stack.length > 0) {
381
+ const current = stack.pop();
382
+ for (const pred of reverse.get(current) ?? []) if (!reached.has(pred)) {
383
+ reached.add(pred);
384
+ stack.push(pred);
385
+ }
386
+ }
387
+ return reached;
388
+ };
389
+ //#endregion
390
+ //#region src/features/simulator/domain/SurfaceReachability.ts
391
+ var collectTransitionTarget = (effect, into) => {
392
+ if (effect.type === "transition_surface") into.push(String(effect.target));
393
+ };
394
+ /** Every surface id this surface can navigate to, declared edges + effect edges. */
395
+ var outgoingTargets = (surface) => {
396
+ const targets = [];
397
+ for (const transition of surface.transitions) targets.push(String(transition.target));
398
+ for (const action of surface.actions) collectActionTargets(action, targets);
399
+ for (const rule of surface.rules) collectTransitionTarget(rule.effect, targets);
400
+ return targets;
401
+ };
402
+ var collectActionTargets = (action, into) => {
403
+ for (const effect of action.effects) collectTransitionTarget(effect, into);
404
+ for (const effect of action.onBlockedEffects ?? []) collectTransitionTarget(effect, into);
405
+ for (const rule of action.rules) collectTransitionTarget(rule.effect, into);
406
+ };
407
+ var analyzeSurfaceReachability = (feature) => {
408
+ const surfaces = feature.surfaces;
409
+ if (surfaces.length === 0) return {
410
+ entrySurfaceId: null,
411
+ reachableSurfaceIds: [],
412
+ unreachableSurfaces: [],
413
+ terminalSurfaces: []
414
+ };
415
+ const surfaceIds = new Set(surfaces.map((s) => String(s.id)));
416
+ const edges = /* @__PURE__ */ new Map();
417
+ for (const surface of surfaces) edges.set(String(surface.id), outgoingTargets(surface).filter((t) => surfaceIds.has(t)));
418
+ const entry = String(surfaces[0].id);
419
+ const reachable = new Set([entry]);
420
+ const queue = [entry];
421
+ while (queue.length > 0) {
422
+ const current = queue.shift();
423
+ for (const next of edges.get(current) ?? []) if (!reachable.has(next)) {
424
+ reachable.add(next);
425
+ queue.push(next);
426
+ }
427
+ }
428
+ const unreachableSurfaces = [];
429
+ const terminalSurfaces = [];
430
+ for (const surface of surfaces) {
431
+ const id = String(surface.id);
432
+ if (!reachable.has(id)) unreachableSurfaces.push({
433
+ surfaceId: id,
434
+ surfaceName: surface.name
435
+ });
436
+ if ((edges.get(id) ?? []).length === 0) terminalSurfaces.push({
437
+ surfaceId: id,
438
+ surfaceName: surface.name
439
+ });
440
+ }
441
+ return {
442
+ entrySurfaceId: entry,
443
+ reachableSurfaceIds: [...reachable],
444
+ unreachableSurfaces,
445
+ terminalSurfaces
446
+ };
447
+ };
448
+ //#endregion
449
+ //#region src/features/verification/domain/VerificationVerdict.ts
450
+ var verdictPassed = (checks) => checks.every((c) => c.status !== "fail");
451
+ //#endregion
452
+ //#region src/features/verification/domain/aggregateVerdict.ts
453
+ var scenariosCheck = (scenarios, thresholds) => {
454
+ if (scenarios.total === 0) return thresholds.requireScenarios ? {
455
+ id: "scenarios",
456
+ label: "Scenarios",
457
+ status: "fail",
458
+ detail: "no scenarios authored (required)"
459
+ } : {
460
+ id: "scenarios",
461
+ label: "Scenarios",
462
+ status: "warn",
463
+ detail: "no scenarios authored"
464
+ };
465
+ if (scenarios.failed > thresholds.maxScenarioFailures) return {
466
+ id: "scenarios",
467
+ label: "Scenarios",
468
+ status: "fail",
469
+ detail: `${scenarios.failed}/${scenarios.total} failing (max ${thresholds.maxScenarioFailures})`,
470
+ items: scenarios.results.filter((r) => !r.pass).map((r) => `${r.actionName} › ${r.scenarioName}`)
471
+ };
472
+ return {
473
+ id: "scenarios",
474
+ label: "Scenarios",
475
+ status: "pass",
476
+ detail: `${scenarios.passed}/${scenarios.total} passing`
477
+ };
478
+ };
479
+ var invariantsCheck = (exploration, thresholds) => {
480
+ if (exploration.invariantViolations.length === 0) return {
481
+ id: "invariants",
482
+ label: "Invariants",
483
+ status: "pass",
484
+ detail: "no reachable violation within bounds"
485
+ };
486
+ return {
487
+ id: "invariants",
488
+ label: "Invariants",
489
+ status: thresholds.allowInvariantViolations ? "warn" : "fail",
490
+ detail: `${exploration.invariantViolations.length} reachable violation(s)`,
491
+ items: exploration.invariantViolations.map((v) => `${v.invariantName} via [${v.path.join(" → ")}]`),
492
+ traces: exploration.invariantViolations.map((v) => ({
493
+ label: v.invariantName,
494
+ path: v.path,
495
+ surfaceId: v.surfaceId,
496
+ actionId: v.actionId
497
+ }))
498
+ };
499
+ };
500
+ var maturityCheck = (maturity, thresholds) => {
501
+ if (thresholds.minMaturity <= 0) return {
502
+ id: "maturity",
503
+ label: "Maturity",
504
+ status: "pass",
505
+ detail: `${maturity.percentage}% (no gate)`
506
+ };
507
+ const passed = maturity.percentage >= thresholds.minMaturity;
508
+ return {
509
+ id: "maturity",
510
+ label: "Maturity",
511
+ status: passed ? "pass" : "fail",
512
+ detail: `${maturity.percentage}% (min ${thresholds.minMaturity}%)`,
513
+ ...passed ? {} : { items: maturity.criticalIssues.slice(0, 10).map((i) => `${i.area}: ${i.message}`) }
514
+ };
515
+ };
516
+ var verifiedCheck = (coverage, thresholds) => {
517
+ const pct = coverage.total === 0 ? 100 : Math.round(coverage.verified / coverage.total * 100);
518
+ if (thresholds.minVerified <= 0) return {
519
+ id: "verified",
520
+ label: "Verified",
521
+ status: "pass",
522
+ detail: `${coverage.verified}/${coverage.total} action(s) proven against code (${pct}%, no gate)`
523
+ };
524
+ return {
525
+ id: "verified",
526
+ label: "Verified",
527
+ status: pct >= thresholds.minVerified ? "pass" : "fail",
528
+ detail: `${pct}% of actions proven against code (${coverage.verified}/${coverage.total}, min ${thresholds.minVerified}%)`
529
+ };
530
+ };
531
+ var reachabilityCheck = (reachability) => {
532
+ if (reachability.unreachableSurfaces.length === 0) return {
533
+ id: "reachability",
534
+ label: "Reachability",
535
+ status: "pass",
536
+ detail: "every surface is reachable"
537
+ };
538
+ return {
539
+ id: "reachability",
540
+ label: "Reachability",
541
+ status: "warn",
542
+ detail: `${reachability.unreachableSurfaces.length} surface(s) unreachable by navigation`,
543
+ items: reachability.unreachableSurfaces.map((s) => s.surfaceName)
544
+ };
545
+ };
546
+ var livenessCheck = (exploration, thresholds) => {
547
+ const unmet = exploration.goalResults.filter((g) => !g.satisfied);
548
+ if (unmet.length === 0) return {
549
+ id: "liveness",
550
+ label: "Liveness",
551
+ status: "pass",
552
+ detail: `${exploration.goalResults.length} reachability goal(s) hold within bounds`
553
+ };
554
+ return {
555
+ id: "liveness",
556
+ label: "Liveness",
557
+ status: thresholds.failOnUnmetGoals ? "fail" : "warn",
558
+ detail: `${unmet.length} reachability goal(s) unmet`,
559
+ items: unmet.map((g) => g.counterexamplePath && g.counterexamplePath.length > 0 ? `${g.goalName} (${g.kind}) — trap via [${g.counterexamplePath.join(" → ")}]` : `${g.goalName} (${g.kind}) — never reached within bounds`),
560
+ traces: unmet.filter((g) => g.counterexamplePath && g.counterexamplePath.length > 0).map((g) => ({
561
+ label: `${g.goalName} (${g.kind})`,
562
+ path: g.counterexamplePath ?? []
563
+ }))
564
+ };
565
+ };
566
+ var deadActionsCheck = (exploration, thresholds) => {
567
+ if (exploration.deadActions.length === 0) return {
568
+ id: "dead-actions",
569
+ label: "Dead actions",
570
+ status: "pass",
571
+ detail: "none within bounds"
572
+ };
573
+ return {
574
+ id: "dead-actions",
575
+ label: "Dead actions",
576
+ status: thresholds.failOnDeadActions ? "fail" : "warn",
577
+ detail: `${exploration.deadActions.length} action(s) never fired within bounds`,
578
+ items: exploration.deadActions.map((a) => a.actionName)
579
+ };
580
+ };
581
+ var aggregateChecks = (input) => {
582
+ const { scenarios, maturity, exploration, reachability, drift, deadHandlers, verifiedCoverage, thresholds } = input;
583
+ const checks = [scenariosCheck(scenarios, thresholds)];
584
+ if (exploration) {
585
+ checks.push(invariantsCheck(exploration, thresholds));
586
+ if (exploration.goalResults.length > 0) checks.push(livenessCheck(exploration, thresholds));
587
+ checks.push(deadActionsCheck(exploration, thresholds));
588
+ if (exploration.deadlockStates > 0) checks.push({
589
+ id: "deadlocks",
590
+ label: "Deadlocks",
591
+ status: "warn",
592
+ detail: `${exploration.deadlockStates} reachable state(s) with no enabled action (may be legitimate terminals)`
593
+ });
594
+ if (exploration.truncated) checks.push({
595
+ id: "bounds",
596
+ label: "Search bounds",
597
+ status: "warn",
598
+ detail: "model check truncated — findings are \"within bounds\", not a proof. Raise maxDepth/maxStates to widen."
599
+ });
600
+ }
601
+ checks.push(maturityCheck(maturity, thresholds));
602
+ if (verifiedCoverage) checks.push(verifiedCheck(verifiedCoverage, thresholds));
603
+ if (reachability) checks.push(reachabilityCheck(reachability));
604
+ if (drift.length > 0) checks.push({
605
+ id: "drift",
606
+ label: "Drift",
607
+ status: thresholds.allowDrift ? "warn" : "fail",
608
+ detail: `${drift.length} implementation(s) audited against an older spec`,
609
+ items: drift.map((d) => `${d.key} (audited ${d.auditedSpecVersion}, now ${d.currentSpecVersion})`)
610
+ });
611
+ if (deadHandlers && deadHandlers.length > 0) checks.push({
612
+ id: "events",
613
+ label: "Event wiring",
614
+ status: "warn",
615
+ detail: `${deadHandlers.length} handler(s) triggered by an event nothing in the project emits`,
616
+ items: deadHandlers.map((h) => `${h.actionName} ← "${h.event}"`)
617
+ });
618
+ return checks;
619
+ };
620
+ var aggregateFeatureVerdict = (input) => {
621
+ const checks = aggregateChecks(input);
622
+ return {
623
+ featureId: input.featureId,
624
+ featureName: input.featureName,
625
+ passed: verdictPassed(checks),
626
+ checks
627
+ };
628
+ };
629
+ //#endregion
630
+ //#region src/features/verification/domain/analyzeEventCoherence.ts
631
+ /**
632
+ * Pure cross-feature event-coherence analysis. Collects every event emitted
633
+ * anywhere in the cohort, then flags every handler whose triggering event is in
634
+ * nobody's emit set. Evolution placeholders (empty bodies) are ignored on both
635
+ * sides — they aren't committed behavior yet.
636
+ */
637
+ var analyzeEventCoherence = (features) => {
638
+ const emitted = /* @__PURE__ */ new Set();
639
+ for (const feature of features) for (const surface of feature.surfaces) for (const action of surface.actions) {
640
+ if (isEvolution(action)) continue;
641
+ for (const event of action.emittedEvents) emitted.add(String(event));
642
+ }
643
+ const deadHandlers = [];
644
+ for (const feature of features) for (const surface of feature.surfaces) for (const action of surface.actions) {
645
+ if (isEvolution(action)) continue;
646
+ const trigger = action.triggeredByEvent;
647
+ if (trigger && !emitted.has(String(trigger))) deadHandlers.push({
648
+ featureId: String(feature.id),
649
+ featureName: feature.name,
650
+ surfaceId: String(surface.id),
651
+ actionId: String(action.id),
652
+ actionName: action.name,
653
+ event: String(trigger)
654
+ });
655
+ }
656
+ return { deadHandlers };
657
+ };
658
+ //#endregion
659
+ //#region src/features/verification/domain/detectDrift.ts
660
+ var buildIdentifierSets = (feature) => {
661
+ const surfaceIds = /* @__PURE__ */ new Set();
662
+ const actionIds = /* @__PURE__ */ new Set();
663
+ const statePaths = /* @__PURE__ */ new Set();
664
+ const ruleIds = /* @__PURE__ */ new Set();
665
+ const invariantIds = /* @__PURE__ */ new Set();
666
+ const transitionIds = /* @__PURE__ */ new Set();
667
+ const eventNames = /* @__PURE__ */ new Set();
668
+ const otherIds = /* @__PURE__ */ new Set();
669
+ for (const inv of feature.featureInvariants ?? []) invariantIds.add(String(inv.id));
670
+ for (const event of feature.events ?? []) eventNames.add(String(event.name));
671
+ for (const vs of feature.valueSets ?? []) otherIds.add(String(vs.id));
672
+ for (const persona of feature.personas ?? []) otherIds.add(String(persona.id));
673
+ for (const resource of feature.resources ?? []) otherIds.add(String(resource.id));
674
+ for (const entity of feature.entities ?? []) otherIds.add(String(entity.id));
675
+ for (const surface of feature.surfaces) {
676
+ surfaceIds.add(String(surface.id));
677
+ for (const transition of surface.transitions) transitionIds.add(String(transition.id));
678
+ for (const rule of surface.rules) ruleIds.add(String(rule.id));
679
+ for (const inv of surface.invariants) invariantIds.add(String(inv.id));
680
+ for (const def of surface.stateDefinitions) statePaths.add(String(def.path));
681
+ for (const action of surface.actions) {
682
+ actionIds.add(String(action.id));
683
+ for (const rule of action.rules) ruleIds.add(String(rule.id));
684
+ for (const inv of action.invariants) invariantIds.add(String(inv.id));
685
+ for (const transition of action.transitions) transitionIds.add(String(transition.id));
686
+ }
687
+ }
688
+ return {
689
+ surfaceIds,
690
+ actionIds,
691
+ statePaths,
692
+ ruleIds,
693
+ invariantIds,
694
+ transitionIds,
695
+ eventNames,
696
+ otherIds
697
+ };
698
+ };
699
+ /** Whether `suffix` names an entity of `type` in this feature. Unknown types fall back to any-kind. */
700
+ var owns = (sets, type, suffix) => {
701
+ switch (type) {
702
+ case "surface": return sets.surfaceIds.has(suffix);
703
+ case "action": return sets.actionIds.has(suffix);
704
+ case "state": return sets.statePaths.has(suffix);
705
+ case "event": return sets.eventNames.has(suffix);
706
+ case "rule":
707
+ case "surface_rule": return sets.ruleIds.has(suffix);
708
+ case "invariant":
709
+ case "surface_invariant": return sets.invariantIds.has(suffix);
710
+ case "transition": return sets.transitionIds.has(suffix);
711
+ default: return sets.surfaceIds.has(suffix) || sets.actionIds.has(suffix) || sets.statePaths.has(suffix) || sets.eventNames.has(suffix) || sets.ruleIds.has(suffix) || sets.invariantIds.has(suffix) || sets.transitionIds.has(suffix) || sets.otherIds.has(suffix);
712
+ }
713
+ };
714
+ var detectDrift = (features, index) => {
715
+ const owners = features.map((feature) => ({
716
+ feature,
717
+ sets: buildIdentifierSets(feature)
718
+ }));
719
+ const stale = [];
720
+ const unversioned = [];
721
+ const orphans = [];
722
+ let checked = 0;
723
+ for (const entry of index) {
724
+ if (entry.status === "missing") continue;
725
+ const sep = entry.key.indexOf(":");
726
+ if (sep < 0) {
727
+ orphans.push({
728
+ key: entry.key,
729
+ reason: "malformed key (expected \"<type>:<id-or-path>\")"
730
+ });
731
+ continue;
732
+ }
733
+ const type = entry.key.slice(0, sep);
734
+ const suffix = entry.key.slice(sep + 1);
735
+ const owner = owners.find((o) => owns(o.sets, type, suffix));
736
+ if (!owner) {
737
+ orphans.push({
738
+ key: entry.key,
739
+ reason: "no spec entity matches this key (renamed or removed?)"
740
+ });
741
+ continue;
742
+ }
743
+ checked += 1;
744
+ if (!entry.auditedSpecVersion) {
745
+ unversioned.push(entry.key);
746
+ continue;
747
+ }
748
+ const audited = Date.parse(entry.auditedSpecVersion);
749
+ const current = Date.parse(String(owner.feature.updatedAt));
750
+ if (Number.isNaN(audited) || Number.isNaN(current)) {
751
+ unversioned.push(entry.key);
752
+ continue;
753
+ }
754
+ if (current > audited) stale.push({
755
+ key: entry.key,
756
+ entitySuffix: suffix,
757
+ featureId: String(owner.feature.id),
758
+ featureName: owner.feature.name,
759
+ status: entry.status,
760
+ auditedSpecVersion: entry.auditedSpecVersion,
761
+ currentSpecVersion: String(owner.feature.updatedAt)
762
+ });
763
+ }
764
+ return {
765
+ stale,
766
+ unversioned,
767
+ orphans,
768
+ checked
769
+ };
770
+ };
771
+ //#endregion
772
+ //#region src/features/verification/domain/verifiedCoverage.ts
773
+ var verifiedCoverageForFeature = (feature, index) => {
774
+ const verifiedActionIds = /* @__PURE__ */ new Set();
775
+ for (const entry of index) if (entry.verifiedAt && entry.key.startsWith("action:")) verifiedActionIds.add(entry.key.slice(7));
776
+ let verified = 0;
777
+ let total = 0;
778
+ for (const surface of feature.surfaces) for (const action of surface.actions) {
779
+ if (isEvolution(action)) continue;
780
+ total += 1;
781
+ if (verifiedActionIds.has(String(action.id))) verified += 1;
782
+ }
783
+ return {
784
+ verified,
785
+ total
786
+ };
787
+ };
788
+ //#endregion
789
+ //#region src/features/verification/domain/VerificationThresholds.ts
790
+ var defaultThresholds = () => ({
791
+ minMaturity: 0,
792
+ maxScenarioFailures: 0,
793
+ allowInvariantViolations: false,
794
+ failOnDeadActions: false,
795
+ allowDrift: true,
796
+ requireScenarios: false,
797
+ failOnUnmetGoals: false,
798
+ minVerified: 0
799
+ });
800
+ var withThresholdDefaults = (partial = {}) => ({
801
+ ...defaultThresholds(),
802
+ ...partial
803
+ });
804
+ //#endregion
805
+ //#region src/features/verification/application/use-cases/VerifyFeatures.ts
806
+ /**
807
+ * The verification spine as one composable use case: load the cohort, detect
808
+ * spec→code drift across it once, then for each feature run the scenario suite,
809
+ * score maturity, analyze navigation reachability, optionally model-check the
810
+ * state space, and fold it all into a gated verdict.
811
+ *
812
+ * Pure orchestration — it composes deterministic domain functions and returns
813
+ * data. No console, no process exit, no clock: the driving adapters (CLI / MCP)
814
+ * own presentation and the exit code, which keeps this testable with fakes.
815
+ */
816
+ var verifyFeaturesUseCase = (deps) => {
817
+ const runScenarios = runScenariosUseCase();
818
+ return async (input = {}) => {
819
+ const thresholds = withThresholdDefaults(input.thresholds);
820
+ const ids = input.featureIds && input.featureIds.length > 0 ? [...input.featureIds] : (await deps.features.list()).map((s) => s.id);
821
+ const loaded = [];
822
+ for (const id of ids) {
823
+ const feature = await deps.features.get(id);
824
+ if (feature) loaded.push(feature);
825
+ }
826
+ const indexEntries = await deps.index.read();
827
+ const drift = detectDrift(loaded, indexEntries);
828
+ const eventCoherence = analyzeEventCoherence(loaded);
829
+ const explorerOptions = input.modelCheck === true ? {} : typeof input.modelCheck === "object" ? input.modelCheck : null;
830
+ const projectInvariants = input.projectInvariants ?? [];
831
+ const perFeature = loaded.map((feature) => {
832
+ const siblings = loaded.filter((f) => f.id !== feature.id);
833
+ const scenarios = runScenarios({
834
+ feature,
835
+ projectFeatures: siblings
836
+ });
837
+ const maturity = scoreFeature(feature);
838
+ const reachability = analyzeSurfaceReachability(feature);
839
+ const exploration = explorerOptions !== null ? exploreStateSpace(feature, projectInvariants.length > 0 ? {
840
+ ...explorerOptions,
841
+ extraInvariants: projectInvariants,
842
+ seedStateDefs: siblings.flatMap((f) => f.surfaces.flatMap((s) => s.stateDefinitions))
843
+ } : explorerOptions, siblings) : void 0;
844
+ const featureDrift = drift.stale.filter((d) => d.featureId === String(feature.id));
845
+ const featureDeadHandlers = eventCoherence.deadHandlers.filter((h) => h.featureId === String(feature.id));
846
+ return {
847
+ scenarios,
848
+ exploration,
849
+ verdict: aggregateFeatureVerdict({
850
+ featureId: String(feature.id),
851
+ featureName: feature.name,
852
+ scenarios,
853
+ maturity,
854
+ reachability,
855
+ ...exploration ? { exploration } : {},
856
+ drift: featureDrift,
857
+ deadHandlers: featureDeadHandlers,
858
+ verifiedCoverage: verifiedCoverageForFeature(feature, indexEntries),
859
+ thresholds
860
+ })
861
+ };
862
+ });
863
+ const verdicts = perFeature.map((p) => p.verdict);
864
+ return {
865
+ passed: verdicts.every((v) => v.passed),
866
+ features: verdicts,
867
+ drift,
868
+ eventCoherence,
869
+ summary: {
870
+ featuresChecked: verdicts.length,
871
+ featuresPassed: verdicts.filter((v) => v.passed).length,
872
+ featuresFailed: verdicts.filter((v) => !v.passed).length,
873
+ scenariosRun: perFeature.reduce((acc, p) => acc + p.scenarios.total, 0),
874
+ scenariosFailed: perFeature.reduce((acc, p) => acc + p.scenarios.failed, 0),
875
+ invariantViolations: perFeature.reduce((acc, p) => acc + (p.exploration?.invariantViolations.length ?? 0), 0)
876
+ }
877
+ };
878
+ };
879
+ };
880
+ //#endregion
881
+ //#region src/features/verification/infrastructure/persistence/FileBehavioralIndexReader.ts
882
+ var LINK_FILENAME = ".unspa.json";
883
+ var VALID_STATUS = new Set([
884
+ "implemented",
885
+ "partial",
886
+ "missing"
887
+ ]);
888
+ /** Walk up from `cwd` to the nearest `.unspa.json`, mirroring the MCP/CLI link discovery. */
889
+ var discover = (cwd) => {
890
+ let current = resolve(cwd);
891
+ const { root } = parse(current);
892
+ for (;;) {
893
+ const candidate = join(current, LINK_FILENAME);
894
+ if (existsSync(candidate)) return candidate;
895
+ if (current === root) break;
896
+ const parent = resolve(current, "..");
897
+ if (parent === current) break;
898
+ current = parent;
899
+ }
900
+ return null;
901
+ };
902
+ /**
903
+ * Reads the audited entries out of a repo's `.unspa.json`. A missing or
904
+ * malformed file is treated as "no index" (empty), never an error — a repo that
905
+ * has never run an implementation audit should still verify cleanly. Maps the
906
+ * on-disk entry onto the domain's {@link IndexedImplementation}, dropping the
907
+ * fields drift doesn't need.
908
+ */
909
+ var fileBehavioralIndexReader = (options = {}) => ({ async read() {
910
+ const cwd = options.cwd ?? process.cwd();
911
+ const filePath = (options.path ? options.path.endsWith(LINK_FILENAME) ? options.path : join(options.path, LINK_FILENAME) : null) ?? discover(cwd);
912
+ if (!filePath || !existsSync(filePath)) return [];
913
+ let link;
914
+ try {
915
+ link = JSON.parse(readFileSync(filePath, "utf8"));
916
+ } catch {
917
+ return [];
918
+ }
919
+ const index = link.index ?? {};
920
+ return Object.entries(index).map(([key, raw]) => {
921
+ return {
922
+ key,
923
+ status: raw?.status && VALID_STATUS.has(raw.status) ? raw.status : "missing",
924
+ ...typeof raw?.specVersion === "string" ? { auditedSpecVersion: raw.specVersion } : {},
925
+ ...typeof raw?.verifiedAt === "string" ? { verifiedAt: raw.verifiedAt } : {}
926
+ };
927
+ });
928
+ } });
929
+ //#endregion
930
+ //#region src/routes/api/snapshots/[id]/verify/+server.ts
931
+ var prerender = false;
932
+ /**
933
+ * Run the verification spine for one feature and return the report. The cohort
934
+ * is scoped to the feature's project (when it belongs to one) so the
935
+ * cross-feature checks — event coherence, cascade resolution — see the siblings
936
+ * they need; otherwise it's just this feature. Model checking is on by default
937
+ * (so the view can show counterexamples); pass `?modelCheck=0` to skip the
938
+ * heavier state-space exploration.
939
+ */
940
+ var GET = async ({ params, url }) => {
941
+ const id = params.id;
942
+ const { repo, projectRepo } = getSnapshotRepository();
943
+ let cohort = [id];
944
+ for (const summary of await projectRepo.list()) {
945
+ const project = await projectRepo.get(summary.id);
946
+ if (project?.featureIds.some((f) => String(f) === String(id))) {
947
+ cohort = project.featureIds;
948
+ break;
949
+ }
950
+ }
951
+ return json(await verifyFeaturesUseCase({
952
+ features: repo,
953
+ index: fileBehavioralIndexReader({})
954
+ })({
955
+ featureIds: cohort,
956
+ modelCheck: url.searchParams.get("modelCheck") !== "0"
957
+ }));
958
+ };
959
+
960
+ export { GET, prerender };
961
+ //# sourceMappingURL=_server.ts-BAyekGHB.js.map