nolzu 0.0.1 → 0.1.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 (491) hide show
  1. package/LICENSE +105 -0
  2. package/README.md +24 -7
  3. package/build/client/_app/immutable/assets/0.SPD4wYkc.css +1 -0
  4. package/build/client/_app/immutable/assets/1.BRilEoOO.css +1 -0
  5. package/build/client/_app/immutable/assets/10.DwLiBGDj.css +1 -0
  6. package/build/client/_app/immutable/assets/11.D_TtWT3D.css +1 -0
  7. package/build/client/_app/immutable/assets/12.CSVGmtUY.css +1 -0
  8. package/build/client/_app/immutable/assets/13.qTa7IHbg.css +1 -0
  9. package/build/client/_app/immutable/assets/19.CbCFXKb8.css +1 -0
  10. package/build/client/_app/immutable/assets/2.CfHhgI77.css +1 -0
  11. package/build/client/_app/immutable/assets/20.C5CSZhyT.css +1 -0
  12. package/build/client/_app/immutable/assets/21.BBpYkZcc.css +1 -0
  13. package/build/client/_app/immutable/assets/22.C9RgY9kl.css +1 -0
  14. package/build/client/_app/immutable/assets/23.B6Dp9RJO.css +1 -0
  15. package/build/client/_app/immutable/assets/24.C7g2abUW.css +1 -0
  16. package/build/client/_app/immutable/assets/26.DTMI6ROV.css +1 -0
  17. package/build/client/_app/immutable/assets/27.AxXMpDkB.css +1 -0
  18. package/build/client/_app/immutable/assets/28.939ac-98.css +1 -0
  19. package/build/client/_app/immutable/assets/3.3lqex1t-.css +1 -0
  20. package/build/client/_app/immutable/assets/4.C52MzO_d.css +1 -0
  21. package/build/client/_app/immutable/assets/5.CsfJAwvS.css +1 -0
  22. package/build/client/_app/immutable/assets/8.ByspUp-s.css +1 -0
  23. package/build/client/_app/immutable/assets/9.BCSFZmce.css +1 -0
  24. package/build/client/_app/immutable/assets/Banner.DDqfpWLD.css +1 -0
  25. package/build/client/_app/immutable/assets/BoardOff.mpX08-Be.css +1 -0
  26. package/build/client/_app/immutable/assets/Button.BlwsEgUc.css +1 -0
  27. package/build/client/_app/immutable/assets/Chip.qAAa6_e5.css +1 -0
  28. package/build/client/_app/immutable/assets/Dialog.D5Ln60a8.css +1 -0
  29. package/build/client/_app/immutable/assets/FeaturePanels.DZ_Mth5M.css +1 -0
  30. package/build/client/_app/immutable/assets/FolderBrowser.DBmRWDCH.css +1 -0
  31. package/build/client/_app/immutable/assets/Geist-Variable.Bj2R_7yk.woff2 +0 -0
  32. package/build/client/_app/immutable/assets/GeistMono-Variable.Dispecij.woff2 +0 -0
  33. package/build/client/_app/immutable/assets/HelpTip.DF6T9nns.css +1 -0
  34. package/build/client/_app/immutable/assets/InfoBox.CpavOykF.css +1 -0
  35. package/build/client/_app/immutable/assets/KeyCaps.D2t-lY-8.css +1 -0
  36. package/build/client/_app/immutable/assets/LogLine.Bu4feLn5.css +1 -0
  37. package/build/client/_app/immutable/assets/Markdown.DI6AtWAc.css +1 -0
  38. package/build/client/_app/immutable/assets/ModelPicker.DQzj7Nj8.css +1 -0
  39. package/build/client/_app/immutable/assets/OptionButtons.BYiyOXOE.css +1 -0
  40. package/build/client/_app/immutable/assets/PeekPanel.DzMdHoqg.css +1 -0
  41. package/build/client/_app/immutable/assets/ScoutPage.CVIiLy5c.css +1 -0
  42. package/build/client/_app/immutable/assets/SetupSteps.B6pZP1Bk.css +1 -0
  43. package/build/client/_app/immutable/assets/Skeleton.BC-1_U5d.css +1 -0
  44. package/build/client/_app/immutable/assets/SlotsMeter.Dq7GGYlD.css +1 -0
  45. package/build/client/_app/immutable/assets/StartConfirm.DxNN2AOb.css +1 -0
  46. package/build/client/_app/immutable/assets/StatePill.CGWFVUUg.css +1 -0
  47. package/build/client/_app/immutable/assets/Streamed.DpZ6wgO2.css +1 -0
  48. package/build/client/_app/immutable/assets/card-pulls.C5uGMuAh.css +1 -0
  49. package/build/client/_app/immutable/assets/next-step.CKg1w06J.css +1 -0
  50. package/build/client/_app/immutable/chunks/-B5EclhK.js +1 -0
  51. package/build/client/_app/immutable/chunks/-Q3zApAy.js +1 -0
  52. package/build/client/_app/immutable/chunks/6-hwN_Ik.js +3 -0
  53. package/build/client/_app/immutable/chunks/B16UF4PA.js +11 -0
  54. package/build/client/_app/immutable/chunks/B1V3h1VF.js +1 -0
  55. package/build/client/_app/immutable/chunks/B2d2Mkuz.js +68 -0
  56. package/build/client/_app/immutable/chunks/B2yzhiEa.js +1 -0
  57. package/build/client/_app/immutable/chunks/B5zDDQUU.js +2 -0
  58. package/build/client/_app/immutable/chunks/B8DHSiWf.js +1 -0
  59. package/build/client/_app/immutable/chunks/B8z33EzI.js +1 -0
  60. package/build/client/_app/immutable/chunks/BCRkrH6c.js +1 -0
  61. package/build/client/_app/immutable/chunks/BCScjOxu.js +1 -0
  62. package/build/client/_app/immutable/chunks/BMUQtCEC.js +1 -0
  63. package/build/client/_app/immutable/chunks/BNnfkvZM.js +1 -0
  64. package/build/client/_app/immutable/chunks/BelWyZaW.js +1 -0
  65. package/build/client/_app/immutable/chunks/BhZpqODT.js +1 -0
  66. package/build/client/_app/immutable/chunks/Bjy-W4x2.js +81 -0
  67. package/build/client/_app/immutable/chunks/BmafI-Bs.js +1 -0
  68. package/build/client/_app/immutable/chunks/BvRk9kiK.js +0 -0
  69. package/build/client/_app/immutable/chunks/C4i6bdQg.js +1 -0
  70. package/build/client/_app/immutable/chunks/C8u5TyIB.js +1 -0
  71. package/build/client/_app/immutable/chunks/CFs2xhoy.js +1 -0
  72. package/build/client/_app/immutable/chunks/CIm2DioU.js +1 -0
  73. package/build/client/_app/immutable/chunks/CONqGBXC.js +1 -0
  74. package/build/client/_app/immutable/chunks/CSOz40qO.js +1 -0
  75. package/build/client/_app/immutable/chunks/CXxuD1ef.js +3 -0
  76. package/build/client/_app/immutable/chunks/CarrGsZA.js +2 -0
  77. package/build/client/_app/immutable/chunks/CdrmTD44.js +1 -0
  78. package/build/client/_app/immutable/chunks/CfJRH9gh.js +2 -0
  79. package/build/client/_app/immutable/chunks/Ci7C9Cki.js +1 -0
  80. package/build/client/_app/immutable/chunks/CkOTL1vK.js +1 -0
  81. package/build/client/_app/immutable/chunks/CngTtGc_.js +1 -0
  82. package/build/client/_app/immutable/chunks/Cp3A1zR8.js +1 -0
  83. package/build/client/_app/immutable/chunks/CwtMnwNL.js +3 -0
  84. package/build/client/_app/immutable/chunks/Cy7f_oXg.js +1 -0
  85. package/build/client/_app/immutable/chunks/D-wwLm5t.js +1 -0
  86. package/build/client/_app/immutable/chunks/D2imbgaf.js +1 -0
  87. package/build/client/_app/immutable/chunks/D32mip60.js +1 -0
  88. package/build/client/_app/immutable/chunks/D46Vk19W.js +1 -0
  89. package/build/client/_app/immutable/chunks/DCUUgo-6.js +1 -0
  90. package/build/client/_app/immutable/chunks/DFjnjJjy.js +1 -0
  91. package/build/client/_app/immutable/chunks/DHMbSbMg.js +1 -0
  92. package/build/client/_app/immutable/chunks/DJOFx2wx.js +1 -0
  93. package/build/client/_app/immutable/chunks/DV4tvxHp.js +3 -0
  94. package/build/client/_app/immutable/chunks/DXk_5YEw.js +1 -0
  95. package/build/client/_app/immutable/chunks/DjgnRLJt.js +1 -0
  96. package/build/client/_app/immutable/chunks/DlWlQ_vP.js +1 -0
  97. package/build/client/_app/immutable/chunks/DpIAei2y.js +2 -0
  98. package/build/client/_app/immutable/chunks/Dt-HX3Vu.js +1 -0
  99. package/build/client/_app/immutable/chunks/DuSthUWX.js +1 -0
  100. package/build/client/_app/immutable/chunks/Ecfl8TOn.js +2 -0
  101. package/build/client/_app/immutable/chunks/ITHE99Aa.js +1 -0
  102. package/build/client/_app/immutable/chunks/Khdge0KS.js +1 -0
  103. package/build/client/_app/immutable/chunks/LMEKNlm0.js +1 -0
  104. package/build/client/_app/immutable/chunks/OnIeaiuO.js +1 -0
  105. package/build/client/_app/immutable/chunks/VFQLu55q.js +1 -0
  106. package/build/client/_app/immutable/chunks/ZsUxKnQw.js +1 -0
  107. package/build/client/_app/immutable/chunks/aWP8DVhV.js +1 -0
  108. package/build/client/_app/immutable/chunks/bB04Xp1f.js +1 -0
  109. package/build/client/_app/immutable/chunks/eylBqhv8.js +3 -0
  110. package/build/client/_app/immutable/chunks/hx0ssLL_.js +2 -0
  111. package/build/client/_app/immutable/chunks/mumDj17t.js +1 -0
  112. package/build/client/_app/immutable/chunks/pZYp3_TE.js +1 -0
  113. package/build/client/_app/immutable/chunks/tImwjqWn.js +1 -0
  114. package/build/client/_app/immutable/chunks/uBIymjUX.js +1 -0
  115. package/build/client/_app/immutable/chunks/xihTtKlq.js +1 -0
  116. package/build/client/_app/immutable/entry/app.DVZ1wE36.js +2 -0
  117. package/build/client/_app/immutable/entry/start.DluCc61B.js +1 -0
  118. package/build/client/_app/immutable/nodes/0.CwNFevXf.js +1 -0
  119. package/build/client/_app/immutable/nodes/1.BR6FYiC-.js +1 -0
  120. package/build/client/_app/immutable/nodes/10.wNwBFtom.js +2 -0
  121. package/build/client/_app/immutable/nodes/11.DpoIbMNF.js +2 -0
  122. package/build/client/_app/immutable/nodes/12.CWdUJ8l3.js +2 -0
  123. package/build/client/_app/immutable/nodes/13.CZ2uTvNS.js +1 -0
  124. package/build/client/_app/immutable/nodes/14.CzgyXuvL.js +1 -0
  125. package/build/client/_app/immutable/nodes/15.CzgyXuvL.js +1 -0
  126. package/build/client/_app/immutable/nodes/16.odL9eB2N.js +1 -0
  127. package/build/client/_app/immutable/nodes/17.B-RnUeVU.js +1 -0
  128. package/build/client/_app/immutable/nodes/18.BLYKxyq2.js +1 -0
  129. package/build/client/_app/immutable/nodes/19.CgyFfPqF.js +3 -0
  130. package/build/client/_app/immutable/nodes/2.CCWT41Qr.js +1 -0
  131. package/build/client/_app/immutable/nodes/20.BBk5-krg.js +1 -0
  132. package/build/client/_app/immutable/nodes/21.CJoU3s1A.js +2 -0
  133. package/build/client/_app/immutable/nodes/22.CoRvPh8m.js +1 -0
  134. package/build/client/_app/immutable/nodes/23.zXO3NjnM.js +3 -0
  135. package/build/client/_app/immutable/nodes/24.CmO27TED.js +1 -0
  136. package/build/client/_app/immutable/nodes/26.TVKNr_xX.js +18 -0
  137. package/build/client/_app/immutable/nodes/27.RojtGU_o.js +1 -0
  138. package/build/client/_app/immutable/nodes/28.CVTdeeSI.js +2 -0
  139. package/build/client/_app/immutable/nodes/3.Cgib7Vi6.js +1 -0
  140. package/build/client/_app/immutable/nodes/4.CnMwOCec.js +1 -0
  141. package/build/client/_app/immutable/nodes/5.-NqYtQj_.js +1 -0
  142. package/build/client/_app/immutable/nodes/6.D5xk-UBM.js +1 -0
  143. package/build/client/_app/immutable/nodes/7.IL4b-DII.js +1 -0
  144. package/build/client/_app/immutable/nodes/8.DJrguHjO.js +11 -0
  145. package/build/client/_app/immutable/nodes/9.DTUSzWiK.js +1 -0
  146. package/build/client/_app/version.json +1 -0
  147. package/build/client/favicon.svg +7 -0
  148. package/build/env.js +70 -0
  149. package/build/handler.js +26 -0
  150. package/build/index.js +149 -0
  151. package/build/server/chunks/chunks/Banner.js-D4mtxUfF.js +17 -0
  152. package/build/server/chunks/chunks/BoardOff.js-Dg5-LoR3.js +1627 -0
  153. package/build/server/chunks/chunks/Button.js-Buh9rnpu.js +43 -0
  154. package/build/server/chunks/chunks/Chip.js-xZ7vFkHx.js +12 -0
  155. package/build/server/chunks/chunks/Dialog.js-CGpwdpM-.js +60 -0
  156. package/build/server/chunks/chunks/FeaturePanels.js-B2sKozgF.js +84 -0
  157. package/build/server/chunks/chunks/FolderBrowser.js-DUHFhDaX.js +28 -0
  158. package/build/server/chunks/chunks/HelpTip.js-CzemvmjC.js +19 -0
  159. package/build/server/chunks/chunks/InfoBox.js-BJiVzZgw.js +10 -0
  160. package/build/server/chunks/chunks/KeyCaps.js-BMI2Hrh2.js +37 -0
  161. package/build/server/chunks/chunks/LogLine.js-2b7uX__H.js +35 -0
  162. package/build/server/chunks/chunks/Markdown.js-Clud88KU.js +4233 -0
  163. package/build/server/chunks/chunks/ModelPicker.js-FuBgyKIA.js +141 -0
  164. package/build/server/chunks/chunks/OptionButtons.js-LQKrAwUX.js +28 -0
  165. package/build/server/chunks/chunks/PeekPanel.js-aZ-r_v3N.js +375 -0
  166. package/build/server/chunks/chunks/ScoutPage.js-2DcNia96.js +733 -0
  167. package/build/server/chunks/chunks/SetupSteps.js-D7TAF7xa.js +66 -0
  168. package/build/server/chunks/chunks/Skeleton.js-diCP2sd5.js +30 -0
  169. package/build/server/chunks/chunks/SlotsMeter.js-BV_sAGf5.js +18 -0
  170. package/build/server/chunks/chunks/StartConfirm.js-CzEdFtbO.js +124 -0
  171. package/build/server/chunks/chunks/StatePill.js-CM7-HXNM.js +27 -0
  172. package/build/server/chunks/chunks/Streamed.js-_NgwNMMs.js +43 -0
  173. package/build/server/chunks/chunks/_page.server.js-BaGoctEY.js +1419 -0
  174. package/build/server/chunks/chunks/activity.js-CSoPUQLq.js +84 -0
  175. package/build/server/chunks/chunks/add-repo.js-DtHEobfm.js +305 -0
  176. package/build/server/chunks/chunks/app-header.js-CCflgeEQ.js +13 -0
  177. package/build/server/chunks/chunks/app.js-CuPn8jtk.js +12 -0
  178. package/build/server/chunks/chunks/bin.js-Cyb2cYLc.js +58 -0
  179. package/build/server/chunks/chunks/board-keys.js-CW3qw-MC.js +32 -0
  180. package/build/server/chunks/chunks/board-page.js-D0tdsE9J.js +860 -0
  181. package/build/server/chunks/chunks/board.js-BxL3CjB1.js +203 -0
  182. package/build/server/chunks/chunks/browser-test.js-DJEpOoVz.js +170 -0
  183. package/build/server/chunks/chunks/card-pulls.js-d_uGmBB3.js +229 -0
  184. package/build/server/chunks/chunks/card-repos.js-QaMCxiyV.js +59 -0
  185. package/build/server/chunks/chunks/chain-store.js-D42m8DUo.js +91 -0
  186. package/build/server/chunks/chunks/chain.js-CJFRywIC.js +52 -0
  187. package/build/server/chunks/chunks/changes.js-D8ITRMgU.js +513 -0
  188. package/build/server/chunks/chunks/checkout.js-Ys5L_gA4.js +319 -0
  189. package/build/server/chunks/chunks/client.js-B7jIMDuS.js +68 -0
  190. package/build/server/chunks/chunks/clipboard.js-qXskOBim.js +12 -0
  191. package/build/server/chunks/chunks/cloud-status.js-hy-9zUVX.js +95 -0
  192. package/build/server/chunks/chunks/coach.js-BhNB14rV.js +296 -0
  193. package/build/server/chunks/chunks/comments.js-1nWJQptB.js +311 -0
  194. package/build/server/chunks/chunks/commit-message.js-CMcNZUZw.js +8 -0
  195. package/build/server/chunks/chunks/create-card.js-DKtprMG6.js +498 -0
  196. package/build/server/chunks/chunks/db.js-pqoVpAzG.js +80 -0
  197. package/build/server/chunks/chunks/diff-comments.js-BSCuay_U.js +95 -0
  198. package/build/server/chunks/chunks/discussion.js-rJ5OMfvX.js +355 -0
  199. package/build/server/chunks/chunks/display.js-Bf-vGQ7Q.js +61 -0
  200. package/build/server/chunks/chunks/elapsed.js-DikkNhaD.js +27 -0
  201. package/build/server/chunks/chunks/engine.js-DS5zUwsE.js +115 -0
  202. package/build/server/chunks/chunks/env.js-l0sNRNKZ.js +2 -0
  203. package/build/server/chunks/chunks/estimate.js-BHTYVTaQ.js +2484 -0
  204. package/build/server/chunks/chunks/evidence-timeline.js-Dk0dTZIy.js +253 -0
  205. package/build/server/chunks/chunks/evidence.js-CT3tWdbB.js +257 -0
  206. package/build/server/chunks/chunks/exports.js-Hn-WQRMB.js +150 -0
  207. package/build/server/chunks/chunks/features.svelte.js-DNsFmFZb.js +10 -0
  208. package/build/server/chunks/chunks/files.js-V46lE0-6.js +46 -0
  209. package/build/server/chunks/chunks/filter.js-CsmCtJMd.js +11 -0
  210. package/build/server/chunks/chunks/forms.js-03E8qnFz.js +35 -0
  211. package/build/server/chunks/chunks/gate.js-Cbqo8Yy0.js +82 -0
  212. package/build/server/chunks/chunks/getting-started.js-DKbHofN5.js +55 -0
  213. package/build/server/chunks/chunks/git.js-l43vBHqs.js +16 -0
  214. package/build/server/chunks/chunks/home-path.js-BXgrl3TP.js +11 -0
  215. package/build/server/chunks/chunks/hub-link.js-B5kjLyyd.js +1532 -0
  216. package/build/server/chunks/chunks/internal.js-DaSBO6jY.js +1239 -0
  217. package/build/server/chunks/chunks/internal2.js-D6AKyUgY.js +27 -0
  218. package/build/server/chunks/chunks/knowledge-page.js-D2ALB3v9.js +292 -0
  219. package/build/server/chunks/chunks/knowledge-revert.js-2eyN9Lcb.js +109 -0
  220. package/build/server/chunks/chunks/knowledge.js--eAgdzNx.js +394 -0
  221. package/build/server/chunks/chunks/last-board.js-BemeiK3t.js +23 -0
  222. package/build/server/chunks/chunks/log.js-R2zUph6T.js +228 -0
  223. package/build/server/chunks/chunks/loop.js-D3guWKLp.js +4038 -0
  224. package/build/server/chunks/chunks/loop2.js-B_Qd2m4y.js +67 -0
  225. package/build/server/chunks/chunks/navigation.js-DQJMz-SM.js +2 -0
  226. package/build/server/chunks/chunks/new-project.js-DNcr9JpB.js +305 -0
  227. package/build/server/chunks/chunks/next-step.js-B8Kl0Iv9.js +522 -0
  228. package/build/server/chunks/chunks/node.js-Bz2jT5wt.js +3381 -0
  229. package/build/server/chunks/chunks/now-live.svelte.js-hIaDgjJ3.js +13 -0
  230. package/build/server/chunks/chunks/now-snapshot.js-zGKLIzox.js +207 -0
  231. package/build/server/chunks/chunks/now.js-Dfm-o0Ha.js +765 -0
  232. package/build/server/chunks/chunks/onboard.js-LBqPOxyU.js +1525 -0
  233. package/build/server/chunks/chunks/ordinal.js-Bm_9QEBD.js +12 -0
  234. package/build/server/chunks/chunks/overview.js-C32iHkXD.js +1108 -0
  235. package/build/server/chunks/chunks/page-keys.svelte.js-D8vXA_8Z.js +14 -0
  236. package/build/server/chunks/chunks/patch.js-Bl7vwsUj.js +62 -0
  237. package/build/server/chunks/chunks/paths.js-DVRjNYFW.js +19 -0
  238. package/build/server/chunks/chunks/peek.js-D9sSjT9t.js +95 -0
  239. package/build/server/chunks/chunks/plan.js-DFq5ntMM.js +143 -0
  240. package/build/server/chunks/chunks/project-files-notice.js-CcqcBgUP.js +19 -0
  241. package/build/server/chunks/chunks/project-files.js-DTC4jUxy.js +52 -0
  242. package/build/server/chunks/chunks/project-folder.js-CoKgPiM0.js +22 -0
  243. package/build/server/chunks/chunks/projects.js-bw2V11od.js +989 -0
  244. package/build/server/chunks/chunks/prs.js-CLfImauu.js +118 -0
  245. package/build/server/chunks/chunks/publish.js-D2vWpIJU.js +195 -0
  246. package/build/server/chunks/chunks/pull-list.js-BCIBJdyz.js +691 -0
  247. package/build/server/chunks/chunks/qa-ask.svelte.js-8Hf1JWW2.js +47 -0
  248. package/build/server/chunks/chunks/qa-setup.js-DFOEcNxH.js +1241 -0
  249. package/build/server/chunks/chunks/quiet.js-1GKY40Ay.js +104 -0
  250. package/build/server/chunks/chunks/rail.js-BePBwOqZ.js +135 -0
  251. package/build/server/chunks/chunks/review.js-MPqnq9Gy.js +98 -0
  252. package/build/server/chunks/chunks/routing.js-B8s1QwSP.js +265 -0
  253. package/build/server/chunks/chunks/run-log.js-CnN2jOcg.js +94 -0
  254. package/build/server/chunks/chunks/run.js-COSejjLl.js +34 -0
  255. package/build/server/chunks/chunks/scout-findings.js-CqJti10a.js +940 -0
  256. package/build/server/chunks/chunks/scout.js-Bm7wQLX2.js +62 -0
  257. package/build/server/chunks/chunks/sentinels.js-BXvpnzr3.js +13 -0
  258. package/build/server/chunks/chunks/server.js-BR0D07DR.js +3803 -0
  259. package/build/server/chunks/chunks/settings-sections.js-V70W7BkZ.js +103 -0
  260. package/build/server/chunks/chunks/shared.js-BgfCUZUJ.js +776 -0
  261. package/build/server/chunks/chunks/sign-in.js-O-pBhi19.js +14 -0
  262. package/build/server/chunks/chunks/snapshot.js-BekzL_He.js +38 -0
  263. package/build/server/chunks/chunks/spend.js-BabnR69T.js +63 -0
  264. package/build/server/chunks/chunks/src.js-Cm8RAH_q.js +609 -0
  265. package/build/server/chunks/chunks/src2.js-CV8tsClO.js +1186 -0
  266. package/build/server/chunks/chunks/src3.js-h9tTEbVb.js +11222 -0
  267. package/build/server/chunks/chunks/stack.js-CMWXhMZS.js +13 -0
  268. package/build/server/chunks/chunks/standup.js-D-qBnMx4.js +103 -0
  269. package/build/server/chunks/chunks/state.js-BTDrgu7s.js +71 -0
  270. package/build/server/chunks/chunks/stream.js-D6r6iqjD.js +66 -0
  271. package/build/server/chunks/chunks/terms.js-DPZztSEn.js +88 -0
  272. package/build/server/chunks/chunks/ticket-system.js-Dj9R3XJw.js +147 -0
  273. package/build/server/chunks/chunks/ticket.js-6sj-2ZEM.js +110 -0
  274. package/build/server/chunks/chunks/timesheet.js-DfhIokoE.js +212 -0
  275. package/build/server/chunks/chunks/timesheet2.js-Cu95ddl3.js +84 -0
  276. package/build/server/chunks/chunks/to-workspace.js-DiOJP59J.js +308 -0
  277. package/build/server/chunks/chunks/toast-stack.svelte.js-CXIg3_KT.js +10 -0
  278. package/build/server/chunks/chunks/uneval.js-VnZcgzZr.js +488 -0
  279. package/build/server/chunks/chunks/utils.js-DQTBh7_6.js +1006 -0
  280. package/build/server/chunks/chunks/when-said.js-0F9asAma.js +35 -0
  281. package/build/server/chunks/chunks/workspace.js-BBdJRon9.js +212 -0
  282. package/build/server/chunks/entries/endpoints/api/board/_server.ts.js-BlYC_lpV.js +69 -0
  283. package/build/server/chunks/entries/endpoints/api/board/minimize/_server.ts.js-Wddt9YPR.js +68 -0
  284. package/build/server/chunks/entries/endpoints/api/board/move/_server.ts.js-BwZpCKx0.js +68 -0
  285. package/build/server/chunks/entries/endpoints/api/board/promote/_server.ts.js-Cw6kvkMq.js +68 -0
  286. package/build/server/chunks/entries/endpoints/api/board/pulls/_server.ts.js-DFhpbiMo.js +71 -0
  287. package/build/server/chunks/entries/endpoints/api/board/stop/_server.ts.js-D5eylDMw.js +68 -0
  288. package/build/server/chunks/entries/endpoints/api/card/_key_/answer/_server.ts.js-CG8xh52y.js +68 -0
  289. package/build/server/chunks/entries/endpoints/api/card/_key_/branch/_server.ts.js-a5_P9voA.js +40 -0
  290. package/build/server/chunks/entries/endpoints/api/card/_key_/chain/_server.ts.js-tJvQy6RK.js +70 -0
  291. package/build/server/chunks/entries/endpoints/api/card/_key_/checkouts/_server.ts.js-B2_gx6vF.js +41 -0
  292. package/build/server/chunks/entries/endpoints/api/card/_key_/choice/_server.ts.js-pmAdIQkK.js +34 -0
  293. package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_id_/_server.ts.js-C5NxGWw3.js +68 -0
  294. package/build/server/chunks/entries/endpoints/api/card/_key_/comments/_server.ts.js-0rw7UNv8.js +64 -0
  295. package/build/server/chunks/entries/endpoints/api/card/_key_/commit/_server.ts.js-_yXWCOlQ.js +68 -0
  296. package/build/server/chunks/entries/endpoints/api/card/_key_/commit-diff/_server.ts.js-CRPV3z-g.js +61 -0
  297. package/build/server/chunks/entries/endpoints/api/card/_key_/commit-message/_server.ts.js-CO9mD3u6.js +82 -0
  298. package/build/server/chunks/entries/endpoints/api/card/_key_/context/_server.ts.js-7kzrigFz.js +42 -0
  299. package/build/server/chunks/entries/endpoints/api/card/_key_/delete/_server.ts.js-DH0nO9wG.js +516 -0
  300. package/build/server/chunks/entries/endpoints/api/card/_key_/file/_server.ts.js-D80SvJDi.js +35 -0
  301. package/build/server/chunks/entries/endpoints/api/card/_key_/files/_...path_/_server.ts.js-GxFjb2H0.js +34 -0
  302. package/build/server/chunks/entries/endpoints/api/card/_key_/fix/_server.ts.js-B-HAB050.js +68 -0
  303. package/build/server/chunks/entries/endpoints/api/card/_key_/knowledge/_server.ts.js-D4fN-j7X.js +81 -0
  304. package/build/server/chunks/entries/endpoints/api/card/_key_/link/_other_/_server.ts.js-C00pQDCu.js +42 -0
  305. package/build/server/chunks/entries/endpoints/api/card/_key_/log/_server.ts.js-BXW_tG-I.js +32 -0
  306. package/build/server/chunks/entries/endpoints/api/card/_key_/log/raw/_server.ts.js-pT8StZGR.js +32 -0
  307. package/build/server/chunks/entries/endpoints/api/card/_key_/message/_server.ts.js-ZMno2Hu6.js +68 -0
  308. package/build/server/chunks/entries/endpoints/api/card/_key_/models/_server.ts.js-DEZVpqO3.js +73 -0
  309. package/build/server/chunks/entries/endpoints/api/card/_key_/patch/_server.ts.js-BxfLi-Zs.js +61 -0
  310. package/build/server/chunks/entries/endpoints/api/card/_key_/peek/_server.ts.js-CsTKWIP_.js +169 -0
  311. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/_server.ts.js-CsOeAXkf.js +53 -0
  312. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/comments/_server.ts.js-DZ2XHOhF.js +71 -0
  313. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discuss/_server.ts.js-CO8eM0e8.js +72 -0
  314. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/discussions/_server.ts.js-Lp7l0Yqv.js +71 -0
  315. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix/_server.ts.js-CeIhjpQ4.js +68 -0
  316. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/fix-all/_server.ts.js-D-DKoCpQ.js +68 -0
  317. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/links/_server.ts.js-B_q3jUP3.js +72 -0
  318. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/qa/_server.ts.js-BulVcJY9.js +68 -0
  319. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/seen/_server.ts.js-Z06A6MS1.js +71 -0
  320. package/build/server/chunks/entries/endpoints/api/card/_key_/pr/triage/_server.ts.js-qADU4URF.js +68 -0
  321. package/build/server/chunks/entries/endpoints/api/card/_key_/pull/_server.ts.js-CHnTH9WK.js +58 -0
  322. package/build/server/chunks/entries/endpoints/api/card/_key_/push/_server.ts.js-BPdPwPo2.js +83 -0
  323. package/build/server/chunks/entries/endpoints/api/card/_key_/repos/_server.ts.js-Bjqa3Uoo.js +73 -0
  324. package/build/server/chunks/entries/endpoints/api/card/_key_/research/_server.ts.js-DzQjoHOZ.js +138 -0
  325. package/build/server/chunks/entries/endpoints/api/card/_key_/retry/_server.ts.js-CAodrXqd.js +68 -0
  326. package/build/server/chunks/entries/endpoints/api/card/_key_/send-back/_server.ts.js-CmJSnvTx.js +68 -0
  327. package/build/server/chunks/entries/endpoints/api/card/_key_/stack/_server.ts.js-DjI8S94J.js +82 -0
  328. package/build/server/chunks/entries/endpoints/api/card/_key_/tasks/_server.ts.js-BzX_nNJk.js +71 -0
  329. package/build/server/chunks/entries/endpoints/api/card/_key_/thread/_server.ts.js-Dn36Guxk.js +33 -0
  330. package/build/server/chunks/entries/endpoints/api/cards/_server.ts.js-DPMOBsvp.js +77 -0
  331. package/build/server/chunks/entries/endpoints/api/cards/context/_server.ts.js-D6y-g2O-.js +52 -0
  332. package/build/server/chunks/entries/endpoints/api/cards/next/_server.ts.js-C2se67rf.js +55 -0
  333. package/build/server/chunks/entries/endpoints/api/chain/_server.ts.js-DKO5Q8GV.js +70 -0
  334. package/build/server/chunks/entries/endpoints/api/clones/_server.ts.js-Bgcc_Beg.js +56 -0
  335. package/build/server/chunks/entries/endpoints/api/current-project/_server.ts.js-DZCtSlXs.js +81 -0
  336. package/build/server/chunks/entries/endpoints/api/evidence/timesheet/_server.ts.js-xJwzSrcl.js +32 -0
  337. package/build/server/chunks/entries/endpoints/api/folders/_server.ts.js-BdcE7k8S.js +83 -0
  338. package/build/server/chunks/entries/endpoints/api/gh/_server.ts.js-CGvM8fn7.js +66 -0
  339. package/build/server/chunks/entries/endpoints/api/gh/name/_server.ts.js-CHh3tAu7.js +36 -0
  340. package/build/server/chunks/entries/endpoints/api/health/_server.ts.js-DLUfrHo6.js +22 -0
  341. package/build/server/chunks/entries/endpoints/api/login-item/_server.ts.js-Cya7S7W6.js +77 -0
  342. package/build/server/chunks/entries/endpoints/api/notes/_server.ts.js-DaUFVqSM.js +26 -0
  343. package/build/server/chunks/entries/endpoints/api/notifications/_server.ts.js-DK6NFnII.js +76 -0
  344. package/build/server/chunks/entries/endpoints/api/now/_server.ts.js-xW0jeJdy.js +83 -0
  345. package/build/server/chunks/entries/endpoints/api/package/entry/_server.ts.js-DQyZanpo.js +35 -0
  346. package/build/server/chunks/entries/endpoints/api/projects/_server.ts.js-CzXJTj_l.js +58 -0
  347. package/build/server/chunks/entries/endpoints/api/qa-setup/_server.ts.js-DujrYbEP.js +76 -0
  348. package/build/server/chunks/entries/endpoints/api/remove-check/_server.ts.js-1KAi9LDi.js +58 -0
  349. package/build/server/chunks/entries/endpoints/api/setup/_server.ts.js-D0MKtjR7.js +69 -0
  350. package/build/server/chunks/entries/endpoints/api/tickets/jira/_server.ts.js-Z2LdOr5l.js +39 -0
  351. package/build/server/chunks/entries/endpoints/api/tickets/read/_server.ts.js-BziHtc8Y.js +68 -0
  352. package/build/server/chunks/entries/endpoints/api/tools/_server.ts.js-oyvq8i1y.js +30 -0
  353. package/build/server/chunks/entries/endpoints/api/workspace/_server.ts.js-CMGBL5cX.js +58 -0
  354. package/build/server/chunks/entries/endpoints/api/workspace/commit/_server.ts.js-BZQQJ1YG.js +66 -0
  355. package/build/server/chunks/entries/endpoints/api/workspace/patch/_server.ts.js-xrjgHECx.js +64 -0
  356. package/build/server/chunks/entries/endpoints/api/workspace/push/_server.ts.js-CTdia7Uz.js +66 -0
  357. package/build/server/chunks/entries/hooks.server.js-B0jE-ELC.js +211 -0
  358. package/build/server/chunks/entries/pages/_error.svelte.js-DPcKI5sX.js +25 -0
  359. package/build/server/chunks/entries/pages/_layout.server.ts.js-Jj3i2Th9.js +134 -0
  360. package/build/server/chunks/entries/pages/_layout.svelte.js-Cu3ghN80.js +1251 -0
  361. package/build/server/chunks/entries/pages/_page.svelte.js-DEYydBCm.js +662 -0
  362. package/build/server/chunks/entries/pages/accept/_page.server.ts.js-BF7MrA5s.js +29 -0
  363. package/build/server/chunks/entries/pages/accept/_page.svelte.js-8yPsedd-.js +54 -0
  364. package/build/server/chunks/entries/pages/b/_board_/_page.svelte.js-S9acLF3f.js +68 -0
  365. package/build/server/chunks/entries/pages/b/_board_/_page.ts.js-BcKdG_Tp.js +21 -0
  366. package/build/server/chunks/entries/pages/b/research/_page.svelte.js-FW6Hw9g5.js +68 -0
  367. package/build/server/chunks/entries/pages/b/research/_page.ts.js-Ds2AjFFK.js +13 -0
  368. package/build/server/chunks/entries/pages/evidence/_page.server.ts.js-uwu2X7bA.js +1382 -0
  369. package/build/server/chunks/entries/pages/evidence/_page.svelte.js-DBCjiT59.js +594 -0
  370. package/build/server/chunks/entries/pages/f/_...path_/_page.svelte.js-DxwJaJzh.js +58 -0
  371. package/build/server/chunks/entries/pages/knowledge/_page.server.ts.js-BAUvFEcM.js +80 -0
  372. package/build/server/chunks/entries/pages/knowledge/_page.svelte.js-D9117gHM.js +732 -0
  373. package/build/server/chunks/entries/pages/new/_page.server.ts.js-BNCQQpyw.js +110 -0
  374. package/build/server/chunks/entries/pages/new/_page.svelte.js-Ben8-N_h.js +503 -0
  375. package/build/server/chunks/entries/pages/new/idea/_page.server.ts.js-jssA29y3.js +46 -0
  376. package/build/server/chunks/entries/pages/new/idea/_page.svelte.js-XoKspqAc.js +210 -0
  377. package/build/server/chunks/entries/pages/new/task/_page.server.ts.js-CmZgfvyt.js +66 -0
  378. package/build/server/chunks/entries/pages/new/task/_page.svelte.js-BKpERKvm.js +169 -0
  379. package/build/server/chunks/entries/pages/onboard/_page.server.ts.js-pmc_pXvs.js +12 -0
  380. package/build/server/chunks/entries/pages/onboard/_page.svelte.js-C7LNK-ba.js +5 -0
  381. package/build/server/chunks/entries/pages/projects/_page.server.ts.js-BEhLRfJ_.js +12 -0
  382. package/build/server/chunks/entries/pages/projects/_page.svelte.js-OraOjsyb.js +5 -0
  383. package/build/server/chunks/entries/pages/scout/_page.server.ts.js-hQYnMHwY.js +10 -0
  384. package/build/server/chunks/entries/pages/scout/_page.svelte.js-7q4d044Z.js +40 -0
  385. package/build/server/chunks/entries/pages/scout/f/_id_/_page.server.ts.js-BN4TnSpB.js +22 -0
  386. package/build/server/chunks/entries/pages/scout/f/_id_/_page.svelte.js-GzpLhARi.js +40 -0
  387. package/build/server/chunks/entries/pages/settings/_layout.server.ts.js-B5LgqMMT.js +12 -0
  388. package/build/server/chunks/entries/pages/settings/_layout.svelte.js-CSCpV6qA.js +81 -0
  389. package/build/server/chunks/entries/pages/settings/_page.svelte.js-DNpsNFo0.js +25 -0
  390. package/build/server/chunks/entries/pages/settings/_section_/_page.server.ts.js-nRDEV3i_.js +348 -0
  391. package/build/server/chunks/entries/pages/settings/_section_/_page.svelte.js-BihUf-nY.js +1052 -0
  392. package/build/server/chunks/entries/pages/settings/integrations/_page.server.ts.js-BTuRpg8m.js +58 -0
  393. package/build/server/chunks/entries/pages/settings/integrations/_page.svelte.js-C8i8ZmZR.js +161 -0
  394. package/build/server/chunks/entries/pages/settings/mcp/_page.server.ts.js-TFISfO1a.js +925 -0
  395. package/build/server/chunks/entries/pages/settings/mcp/_page.svelte.js-D1X0TNOm.js +433 -0
  396. package/build/server/chunks/entries/pages/settings/phases/_page.server.ts.js-CgK7MTZf.js +48 -0
  397. package/build/server/chunks/entries/pages/settings/phases/_page.svelte.js-u-sTQ-ue.js +80 -0
  398. package/build/server/chunks/entries/pages/settings/project/_page.server.ts.js-CCnk9WbO.js +363 -0
  399. package/build/server/chunks/entries/pages/settings/project/_page.svelte.js-MxvNqYlQ.js +1269 -0
  400. package/build/server/chunks/entries/pages/settings/wall/_page.server.ts.js-Bt5siY_N.js +12 -0
  401. package/build/server/chunks/entries/pages/settings/wall/_page.svelte.js-CMR4zSAt.js +43 -0
  402. package/build/server/chunks/entries/pages/t/_key_/_layout.server.ts.js-W6YPvOCA.js +124 -0
  403. package/build/server/chunks/entries/pages/t/_key_/_layout.svelte.js-CK0PiWsz.js +543 -0
  404. package/build/server/chunks/entries/pages/t/_key_/_page.server.ts.js-CdB7v0WX.js +15 -0
  405. package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.server.ts.js-Bksaje8R.js +75 -0
  406. package/build/server/chunks/entries/pages/t/_key_/_tab_/_page.svelte.js-9OQ2eQxu.js +4607 -0
  407. package/build/server/chunks/entries/pages/team/_page.svelte.js-BdUSXC04.js +18 -0
  408. package/build/server/chunks/entries/pages/team/_page.ts.js-DfhJmoZI.js +20 -0
  409. package/build/server/chunks/entries/pages/workspace/_page.svelte.js-DLaWe23r.js +579 -0
  410. package/build/server/chunks/handler-Dlwmumt5.js +1735 -0
  411. package/build/server/chunks/index.js-BX0fZD5G.js +3701 -0
  412. package/build/server/chunks/manifest.js-B2Of6Dj7.js +761 -0
  413. package/build/server/chunks/nodes/0.js-DSzhdY0D.js +87 -0
  414. package/build/server/chunks/nodes/1.js-j4osL1br.js +9 -0
  415. package/build/server/chunks/nodes/10.js-jkvevEFY.js +75 -0
  416. package/build/server/chunks/nodes/11.js-plyiDP2n.js +72 -0
  417. package/build/server/chunks/nodes/12.js-DwtvDAyM.js +78 -0
  418. package/build/server/chunks/nodes/13.js-BpxwqFh4.js +72 -0
  419. package/build/server/chunks/nodes/14.js-B5iNIKGy.js +15 -0
  420. package/build/server/chunks/nodes/15.js-CXCAqUsG.js +15 -0
  421. package/build/server/chunks/nodes/16.js-oxkLEH0n.js +76 -0
  422. package/build/server/chunks/nodes/17.js-B-ZJEo9K.js +76 -0
  423. package/build/server/chunks/nodes/18.js-C0OUCEux.js +9 -0
  424. package/build/server/chunks/nodes/19.js-M8EAQJdW.js +76 -0
  425. package/build/server/chunks/nodes/2.js-ZedduK-3.js +33 -0
  426. package/build/server/chunks/nodes/20.js-BHvsLNjD.js +72 -0
  427. package/build/server/chunks/nodes/21.js-eOaW4si1.js +76 -0
  428. package/build/server/chunks/nodes/22.js-CbJ6tQSs.js +38 -0
  429. package/build/server/chunks/nodes/23.js-DXk8ejlx.js +81 -0
  430. package/build/server/chunks/nodes/24.js-C4qGJc4X.js +33 -0
  431. package/build/server/chunks/nodes/25.js-Cal8uT5V.js +21 -0
  432. package/build/server/chunks/nodes/26.js-Cp5jBcrN.js +80 -0
  433. package/build/server/chunks/nodes/27.js-Do55o_cb.js +17 -0
  434. package/build/server/chunks/nodes/28.js-SNz3QVix.js +9 -0
  435. package/build/server/chunks/nodes/3.js-DyivQ5dN.js +75 -0
  436. package/build/server/chunks/nodes/4.js-BGgTTQFR.js +9 -0
  437. package/build/server/chunks/nodes/5.js-DQYA2BBI.js +31 -0
  438. package/build/server/chunks/nodes/6.js-BVTi2KFL.js +24 -0
  439. package/build/server/chunks/nodes/7.js-CnprIn3p.js +12 -0
  440. package/build/server/chunks/nodes/8.js-Bdicn369.js +50 -0
  441. package/build/server/chunks/nodes/9.js-DVclPGXf.js +9 -0
  442. package/build/shims.js +33 -0
  443. package/dist/THIRD-PARTY-NOTICES.md +659 -0
  444. package/dist/detect-BmI_gskA.js +585 -0
  445. package/dist/fonts/OFL.txt +92 -0
  446. package/dist/nolzu.js +48 -0
  447. package/dist/package-vezZOzhD.js +181 -0
  448. package/dist/shared/finish.md +110 -0
  449. package/dist/shared/knowledge.md +72 -0
  450. package/dist/shared/verdict.md +42 -0
  451. package/dist/skills/.gitkeep +0 -0
  452. package/dist/skills/nolzu-architecture/SKILL.md +140 -0
  453. package/dist/skills/nolzu-architecture/finish.md +110 -0
  454. package/dist/skills/nolzu-assess/SKILL.md +99 -0
  455. package/dist/skills/nolzu-assess/finish.md +110 -0
  456. package/dist/skills/nolzu-design/SKILL.md +115 -0
  457. package/dist/skills/nolzu-design/finish.md +110 -0
  458. package/dist/skills/nolzu-feedback/SKILL.md +107 -0
  459. package/dist/skills/nolzu-feedback/finish.md +110 -0
  460. package/dist/skills/nolzu-implement/SKILL.md +138 -0
  461. package/dist/skills/nolzu-implement/finish.md +110 -0
  462. package/dist/skills/nolzu-investigate/SKILL.md +139 -0
  463. package/dist/skills/nolzu-investigate/finish.md +110 -0
  464. package/dist/skills/nolzu-learn-repo/SKILL.md +115 -0
  465. package/dist/skills/nolzu-learn-repo/finish.md +110 -0
  466. package/dist/skills/nolzu-learn-repo/knowledge.md +72 -0
  467. package/dist/skills/nolzu-optimize/SKILL.md +82 -0
  468. package/dist/skills/nolzu-optimize/finish.md +110 -0
  469. package/dist/skills/nolzu-optimize/knowledge.md +72 -0
  470. package/dist/skills/nolzu-orient/SKILL.md +115 -0
  471. package/dist/skills/nolzu-orient/finish.md +110 -0
  472. package/dist/skills/nolzu-orient/knowledge.md +72 -0
  473. package/dist/skills/nolzu-plan/SKILL.md +165 -0
  474. package/dist/skills/nolzu-plan/finish.md +110 -0
  475. package/dist/skills/nolzu-pr-review/SKILL.md +150 -0
  476. package/dist/skills/nolzu-pr-review/finish.md +110 -0
  477. package/dist/skills/nolzu-qa/SKILL.md +177 -0
  478. package/dist/skills/nolzu-qa/finish.md +110 -0
  479. package/dist/skills/nolzu-qa/verdict.md +42 -0
  480. package/dist/skills/nolzu-refine/SKILL.md +145 -0
  481. package/dist/skills/nolzu-refine/finish.md +110 -0
  482. package/dist/skills/nolzu-research/SKILL.md +140 -0
  483. package/dist/skills/nolzu-research/finish.md +110 -0
  484. package/dist/skills/nolzu-wrapup/SKILL.md +126 -0
  485. package/dist/skills/nolzu-wrapup/finish.md +110 -0
  486. package/dist/skills/nolzu-wrapup/knowledge.md +72 -0
  487. package/dist/src-BG8LaXLS.js +723 -0
  488. package/dist/src-DPfcvRqs.js +4 -0
  489. package/dist/start-ItZOcBtM.js +362 -0
  490. package/package.json +49 -9
  491. package/bin/nolzu.js +0 -8
@@ -0,0 +1,1186 @@
1
+ import { C as CONFIG_DIR_VAR } from './engine.js-DS5zUwsE.js';
2
+ import { D as DELIVERY_PHASES, p as phaseLabel, b as isPass } from './board.js-BxL3CjB1.js';
3
+ import { s as spendOf } from './spend.js-BabnR69T.js';
4
+ import { t as isFolderName, u as stackCommands, w as lockfileOf, S as START_SCRIPTS, x as scriptCommand } from './estimate.js-BHTYVTaQ.js';
5
+ import { p as parseRound, R as ROUND_LABELS, i as isBlocking, d as refinedCriteria, e as refinedQuestions } from './src.js-Cm8RAH_q.js';
6
+
7
+ //#region ../../packages/protocol/src/knowledge.ts
8
+ /**
9
+ * The key a knowledge run that belongs to no card carries.
10
+ *
11
+ * `PROJECT.md` section 7 reserves it. The runner writes it on the rows of a maintenance run, such
12
+ * as Optimize, and the Knowledge screen reads it to show "maintenance" where a card's row shows a
13
+ * link. It lives here because a second copy of the string would let the two sides drift apart.
14
+ */
15
+ var KB_MAINTENANCE_KEY = "kb-maintenance";
16
+ var LEARN_REPO_PREFIX = "kb-learn-";
17
+ var learnRepoKey = (repo) => `${LEARN_REPO_PREFIX}${repo}`;
18
+ /** The repository a Learn your repositories key is about, or null when the key is not one. */
19
+ var repoOfLearnKey = (key) => key.startsWith(LEARN_REPO_PREFIX) && key.length > 9 ? key.slice(9) : null;
20
+ var isMaintenanceKey = (key) => key === "kb-maintenance" || key != null && repoOfLearnKey(key) !== null;
21
+ function frontmatterEnd(lines) {
22
+ if (lines[0]?.trim() !== "---") return -1;
23
+ return lines.findIndex((line, index) => index > 0 && line.trim() === "---");
24
+ }
25
+ var frontmatter = (text) => {
26
+ const lines = text.split("\n");
27
+ const end = frontmatterEnd(lines);
28
+ return end === -1 ? null : lines.slice(1, end);
29
+ };
30
+ /**
31
+ * The description a knowledge file carries in its frontmatter: the line the knowledge index shows a
32
+ * run, and the Knowledge screen shows beside the file.
33
+ *
34
+ * Only a `description:` key of its own inside that block. Quotes around the value come off, because
35
+ * they belong to the file format and not to the sentence.
36
+ */
37
+ function frontmatterDescription(text) {
38
+ for (const line of frontmatter(text) ?? []) {
39
+ const found = /^description:\s*(.*)$/.exec(line);
40
+ if (found === null) continue;
41
+ const value = found[1]?.trim() ?? "";
42
+ const bare = /^(['"])(.*)\1$/.exec(value);
43
+ const said = (bare === null ? value : bare[2] ?? "").trim();
44
+ return said === "" ? null : said;
45
+ }
46
+ return null;
47
+ }
48
+ /**
49
+ * The paths a knowledge file says it depends on, from its `paths:` key: a comma list, a bracket list,
50
+ * or `- ` lines under the key. The Knowledge screen checks each one against the base branch.
51
+ *
52
+ * Quotes, backticks, a leading `./`, a line number and a folder's last slash come off, because the
53
+ * file is what the note depends on. Each path once, because the screen keys its list by path. Empty
54
+ * for a file with no key, which is every file from before the entry shape.
55
+ */
56
+ function frontmatterPaths(text) {
57
+ const lines = frontmatter(text) ?? [];
58
+ const at = lines.findIndex((line) => /^paths:/.test(line));
59
+ if (at === -1) return [];
60
+ const inline = (lines[at] ?? "").slice(6).trim().replace(/^\[(.*)\]$/, "$1");
61
+ const rest = lines.slice(at + 1);
62
+ const stop = rest.findIndex((line) => !/^\s*- /.test(line));
63
+ const paths = (inline !== "" ? inline.split(",") : rest.slice(0, stop === -1 ? void 0 : stop).map((line) => line.replace(/^\s*- /, ""))).map((one) => one.trim().replace(/^(['"`])(.*)\1$/, "$2").replace(/^\.\//, "").replace(/:\d+(-\d+)?$/, "").replace(/\/+$/, "")).filter((one) => one !== "" && one.toLowerCase() !== "none");
64
+ return [...new Set(paths)];
65
+ }
66
+ //#endregion
67
+ //#region ../../packages/core/src/tabs.ts
68
+ var DELIVERY = [
69
+ {
70
+ id: "overview",
71
+ label: "Overview"
72
+ },
73
+ {
74
+ id: "files",
75
+ label: "Files"
76
+ },
77
+ {
78
+ id: "changes",
79
+ label: "Changes"
80
+ },
81
+ {
82
+ id: "discussion",
83
+ label: "Discussion"
84
+ },
85
+ {
86
+ id: "prs",
87
+ label: "PRs"
88
+ },
89
+ {
90
+ id: "log",
91
+ label: "Log"
92
+ },
93
+ {
94
+ id: "settings",
95
+ label: "Settings"
96
+ }
97
+ ];
98
+ var PR_STAGES = /* @__PURE__ */ new Set([
99
+ "pr-watch",
100
+ "wrapup",
101
+ "closed"
102
+ ]);
103
+ var OVERVIEW_ONLY = [{
104
+ id: "overview",
105
+ label: "Overview"
106
+ }];
107
+ var NO_CHANGES = DELIVERY.filter((tab) => tab.id !== "changes" && tab.id !== "prs");
108
+ var BOARD_TABS = {
109
+ delivery: DELIVERY,
110
+ epics: NO_CHANGES,
111
+ investigations: NO_CHANGES,
112
+ questions: NO_CHANGES,
113
+ prreview: [
114
+ ...NO_CHANGES.slice(0, 1),
115
+ {
116
+ id: "review",
117
+ label: "Review"
118
+ },
119
+ ...NO_CHANGES.slice(1)
120
+ ]
121
+ };
122
+ function tabsFor(kind, stage, pulled = false) {
123
+ const tabs = BOARD_TABS[kind] ?? OVERVIEW_ONLY;
124
+ return stage === void 0 || kind !== "delivery" || pulled || PR_STAGES.has(stage) ? tabs : tabs.filter((tab) => tab.id !== "prs");
125
+ }
126
+ function tabAnywhere(id) {
127
+ return Object.values(BOARD_TABS).flat().find((tab) => tab.id === id);
128
+ }
129
+ var threadLabel = (id) => id === "ask" ? "Ask" : isAskThread(id) ? `Ask ${askNumber(id)}` : phaseLabel(id);
130
+ var isAskThread = (id) => id === "ask" || /^ask-(?:[2-9]|[1-9]\d+)$/.test(id);
131
+ var isFeedbackRef = (id) => /^T[1-9]\d*$/.test(id);
132
+ var askNumber = (id) => id === "ask" ? 1 : Number(id.slice(4));
133
+ /**
134
+ * The ask discussions of one card, newest first, and the id a new one takes.
135
+ *
136
+ * `stored` is every thread id the card has messages in. A discussion exists once something is
137
+ * written in it, so the next one is listed only while the URL opens it, and an empty one left
138
+ * behind costs nothing. The first one is always there, as it was before there could be more.
139
+ */
140
+ function askThreads(stored, wanted) {
141
+ const numbers = /* @__PURE__ */ new Set([1, ...stored.filter(isAskThread).map(askNumber)]);
142
+ const next = Math.max(...numbers) + 1;
143
+ if (wanted !== null && isAskThread(wanted) && askNumber(wanted) === next) numbers.add(next);
144
+ return {
145
+ ids: [...numbers].sort((one, two) => two - one).map((n) => n === 1 ? "ask" : `ask-${n}`),
146
+ next: `ask-${next}`
147
+ };
148
+ }
149
+ /**
150
+ * The threads for one card, newest run per phase.
151
+ *
152
+ * A phase that ran more than once keeps the newest run's session, because that is the
153
+ * conversation a person is looking at. The rows come newest first. `askRuns` is the run each ask
154
+ * discussion goes on in, by its id, which the caller reads off the run rows. `feedback` is the pull
155
+ * request comment refs a Discuss opened, and each goes on in its Ask run the same way.
156
+ */
157
+ function threadsFor(runs, reviewRefs = [], asks = ["ask"], askRuns = {}, feedback = []) {
158
+ const byPhase = /* @__PURE__ */ new Map();
159
+ for (const run of runs) {
160
+ if (isPass(run.phase) || run.phase === "ask" || run.phase === "feedback") continue;
161
+ if (!byPhase.has(run.phase)) byPhase.set(run.phase, run);
162
+ }
163
+ const phases = [...byPhase.values()].map((run) => ({
164
+ id: run.phase,
165
+ kind: "phase",
166
+ label: threadLabel(run.phase),
167
+ sessionId: run.sessionId,
168
+ engine: run.engine,
169
+ runId: run.id
170
+ }));
171
+ const reviews = reviewRefs.map((ref) => ({
172
+ id: ref,
173
+ kind: "review",
174
+ label: ref,
175
+ sessionId: null,
176
+ engine: null,
177
+ runId: null
178
+ }));
179
+ const own = asks.map((id) => {
180
+ const run = askRuns[id];
181
+ return {
182
+ id,
183
+ kind: "ask",
184
+ label: threadLabel(id),
185
+ sessionId: run?.sessionId ?? null,
186
+ engine: run?.engine ?? null,
187
+ runId: run?.id ?? null
188
+ };
189
+ });
190
+ const comments = feedback.map((ref) => {
191
+ const run = askRuns[ref];
192
+ return {
193
+ id: ref,
194
+ kind: "feedback",
195
+ label: ref,
196
+ sessionId: run?.sessionId ?? null,
197
+ engine: run?.engine ?? null,
198
+ runId: run?.id ?? null
199
+ };
200
+ });
201
+ return [
202
+ ...phases,
203
+ ...reviews,
204
+ ...comments,
205
+ ...own
206
+ ];
207
+ }
208
+ /**
209
+ * Whether a message can be sent to a thread.
210
+ *
211
+ * An ask discussion, and the discussion of a pull request comment, always takes one: it goes on in
212
+ * its read-only session, or starts one. Every
213
+ * other thread continues its phase's own session, and one whose phase never kept a session refuses
214
+ * rather than offering a box that cannot send.
215
+ */
216
+ function canSend(threads, threadId, text) {
217
+ const thread = threads.find((one) => one.id === threadId);
218
+ if (thread === void 0) return {
219
+ ok: false,
220
+ reason: `There is no ${threadId} thread on this card.`
221
+ };
222
+ if (text.trim() === "") return {
223
+ ok: false,
224
+ reason: "The message is empty."
225
+ };
226
+ if (thread.kind !== "ask" && thread.kind !== "feedback" && thread.sessionId === null) return {
227
+ ok: false,
228
+ reason: `The ${thread.label} thread has no session to continue. Move the card forward to start one.`
229
+ };
230
+ return {
231
+ ok: true,
232
+ thread
233
+ };
234
+ }
235
+ var isDeliveryPhase = (id) => DELIVERY_PHASES.includes(id);
236
+ var RESUME = {
237
+ "claude-code": "claude --resume",
238
+ codex: "codex resume",
239
+ cursor: "cursor-agent --resume"
240
+ };
241
+ var shellWord = (value) => `'${value.replaceAll("'", `'\\''`)}'`;
242
+ /**
243
+ * The command that continues a phase's session at a terminal.
244
+ *
245
+ * It starts in the folder the run started in, because Claude Code files a session under that
246
+ * folder, and it names the profile's config folder when the profile has one, because a session
247
+ * lives inside one login. No token is in it: the login stays where the vendor keeps it.
248
+ */
249
+ function resumeCommand(at) {
250
+ const variable = CONFIG_DIR_VAR[at.vendor];
251
+ const login = at.configDir !== null ? `${variable}=${shellWord(at.configDir)} ` : "";
252
+ return `cd ${shellWord(at.folder)} && ${login}${RESUME[at.vendor]} ${shellWord(at.sessionId)}`;
253
+ }
254
+ //#endregion
255
+ //#region ../../packages/core/src/strip.ts
256
+ /**
257
+ * One segment per phase an agent stage of this board runs, in board order.
258
+ *
259
+ * Every agent stage of the five boards that ship names a phase, so the fallback to the stage id is
260
+ * for a board somebody builds later: an agent stage with no phase still gets a segment, rather than
261
+ * dropping out of the trail with nothing saying why. The label is the stage's own, because a stage
262
+ * id such as `running` reads as a state and not as a phase.
263
+ *
264
+ * Two stages of one phase share a segment, because drawing that phase twice would say a card had two
265
+ * different phases when both are the same method over the same run rows. Such a segment takes the
266
+ * phase's own name, because neither stage's name is true of both. No board that ships has two such
267
+ * stages since Agent pre-review runs every PR review round, so this is for a board built later.
268
+ */
269
+ function phaseStrip(board, runs) {
270
+ const agent = board.stages.filter((stage) => stage.role === "agent");
271
+ const phaseOf = (stage) => stage.phase ?? stage.id;
272
+ const drawn = /* @__PURE__ */ new Set();
273
+ return agent.flatMap((stage) => {
274
+ const phase = phaseOf(stage);
275
+ if (drawn.has(phase)) return [];
276
+ drawn.add(phase);
277
+ const mine = runs.filter((run) => run.phase === phase);
278
+ const newest = mine.reduce((best, run) => best === null || run.id > best.id ? run : best, null);
279
+ return [{
280
+ phase,
281
+ label: agent.filter((one) => phaseOf(one) === phase).length > 1 ? phaseLabel(phase) : stage.label,
282
+ run: newest,
283
+ count: mine.length,
284
+ spend: spendOf(mine)
285
+ }];
286
+ });
287
+ }
288
+ //#endregion
289
+ //#region ../../packages/core/src/knowledge.ts
290
+ /**
291
+ * Where this project's knowledge lives.
292
+ *
293
+ * The folder the person picked, else `.nolzu/knowledge` in the project. `PROJECT.md` section 7
294
+ * gives the default that shape so knowledge is versioned with the project and a teammate who
295
+ * clones it has it too. The default is worked out here and never stored: a stored copy would stay
296
+ * behind when the project moves.
297
+ *
298
+ * Null when there is no project path, because there is then nothing to be relative to. A caller
299
+ * that gets null says the project folder is missing, which is the thing the person can fix.
300
+ *
301
+ * Nothing is made here, and nothing is checked. The code that writes knowledge makes the folder
302
+ * before the first wrap-up writes into it, and `checkKnowledgeDir` in the runner holds the rules for
303
+ * a path a person typed.
304
+ */
305
+ function resolveKnowledgeDir(settings) {
306
+ if (settings.knowledgeDir !== null) return settings.knowledgeDir;
307
+ if (settings.projectPath === null) return null;
308
+ return `${settings.projectPath}/.nolzu/knowledge`;
309
+ }
310
+ var REPO_FILE = "repository.md";
311
+ /**
312
+ * The folder of the knowledge folder that holds one repository's file and notes, with a trailing
313
+ * slash, or empty for the project folder's repository, which uses the knowledge folder itself. So a
314
+ * project of one repository at its root stays flat. Anything else must be one folder name, because
315
+ * a slash would put the files in another folder.
316
+ */
317
+ function repoKnowledgeFolder(path) {
318
+ if (path === ".") return "";
319
+ if (!isFolderName(path)) throw new Error(`The repository folder ${JSON.stringify(path)} is not one folder name, so it has no knowledge folder.`);
320
+ return `${path}/`;
321
+ }
322
+ /** Where a repository's own knowledge file sits, relative to the knowledge folder. */
323
+ var repoKnowledgePath = (path) => `${repoKnowledgeFolder(path)}${REPO_FILE}`;
324
+ var SHARED_FOLDER = "shared";
325
+ function repoOfPath(path, repos) {
326
+ const first = path.replace(/^\.\//, "").split("/")[0] ?? "";
327
+ if (first !== "." && repos.includes(first)) return first;
328
+ return repos.includes(".") ? "." : null;
329
+ }
330
+ /**
331
+ * The folder a note belongs in, from the paths its frontmatter names: the folder of their one
332
+ * repository, `shared/` when they span several, or null when it names none or one outside every
333
+ * listed repository, which leaves the note where it is.
334
+ */
335
+ function noteFolder(paths, repos) {
336
+ const owners = new Set(paths.map((path) => repoOfPath(path, repos)));
337
+ if (owners.size === 0 || owners.has(null)) return null;
338
+ const [one] = owners;
339
+ return owners.size > 1 ? `${SHARED_FOLDER}/` : repoKnowledgeFolder(one ?? ".");
340
+ }
341
+ /**
342
+ * How a knowledge folder of the older layout moves into the one grouped by repository:
343
+ * `repositories/<repo>.md` to `<repo>/repository.md` (`project-root.md` to the top), and each note at
344
+ * the top to the folder its paths name. Empty when the folder has the new layout already.
345
+ *
346
+ * `files` is the whole folder, with the text of each note at the top, which the paths are read from.
347
+ */
348
+ function planKnowledgeMoves(files, repos) {
349
+ const plan = {
350
+ moves: [],
351
+ left: [],
352
+ taken: []
353
+ };
354
+ const there = new Set(files.map((file) => file.path));
355
+ for (const { path, text } of files) {
356
+ const old = /^repositories\/([^/]+)\.md$/.exec(path)?.[1];
357
+ let to = null;
358
+ if (old === "project-root") to = REPO_FILE;
359
+ else if (old !== void 0 && isFolderName(old)) to = `${old}/${REPO_FILE}`;
360
+ else if (!path.includes("/") && path.endsWith(".md") && path !== "run-recipe.md" && path !== "repository.md") {
361
+ const folder = noteFolder(frontmatterPaths(text), repos);
362
+ if (folder === null) plan.left.push(path);
363
+ else if (folder !== "") to = `${folder}${path}`;
364
+ }
365
+ if (to === null) continue;
366
+ if (there.has(to)) plan.taken.push(path);
367
+ else {
368
+ plan.moves.push({
369
+ from: path,
370
+ to
371
+ });
372
+ there.add(to);
373
+ }
374
+ }
375
+ return plan;
376
+ }
377
+ var REPO_STUB_LINE = "Nobody has written what this repository is for yet. A run that learns it writes it here.";
378
+ var isRepoStub = (text) => text.includes(REPO_STUB_LINE);
379
+ function placeLines(path) {
380
+ const root = path === ".";
381
+ return [
382
+ `description: Read before you change ${root ? "the project folder" : `the ${path} repository`}. Where it sits, the branch it starts from and what it is for.`,
383
+ `# ${root ? "The project folder" : `The ${path} repository`}`,
384
+ `- Folder: ${root ? "the project folder itself" : `\`${path}\` in the project folder`}.`
385
+ ];
386
+ }
387
+ /**
388
+ * The first knowledge file of one repository: where it sits and the branch it starts from.
389
+ *
390
+ * No stack and no top folders: an agent reads those live, and a copy here goes stale. A guess at
391
+ * what the repository is for would read as knowledge, so that line is left for a run that learns it.
392
+ */
393
+ function repoKnowledge(facts) {
394
+ const [description, heading, folder] = placeLines(facts.path);
395
+ return [
396
+ "---",
397
+ description,
398
+ "---",
399
+ "",
400
+ heading,
401
+ "",
402
+ folder,
403
+ `- Base branch: \`${facts.base}\`.`,
404
+ "",
405
+ REPO_STUB_LINE,
406
+ ""
407
+ ].join("\n");
408
+ }
409
+ function repoMoved(text, folder) {
410
+ const was = placeLines(".");
411
+ const now = placeLines(folder);
412
+ return text.split("\n").map((line) => now[was.indexOf(line)] ?? line).join("\n");
413
+ }
414
+ var RUN_RECIPE_FILE = "run-recipe.md";
415
+ var recipeHeading = (path) => path === "." ? "## The project folder" : `## The ${path} repository`;
416
+ var runIn = (path) => path === "." ? "Run these in the project folder." : `Run these in the \`${path}\` folder of the project.`;
417
+ var RECIPE_STEPS = [
418
+ ["Install", []],
419
+ ["Test", ["test"]],
420
+ ["Lint", ["lint"]],
421
+ ["Type-check", ["typecheck", "type-check"]],
422
+ ["Build", ["build"]],
423
+ ["Start", START_SCRIPTS]
424
+ ];
425
+ function recipeSection(repo) {
426
+ const where = runIn(repo.path);
427
+ const stacks = stackCommands(repo.files);
428
+ if (repo.scripts === null && stacks.length === 0) return `${recipeHeading(repo.path)}\n\n${where} Not read: Nolzu found no \`package.json\` and no other file it knows at its top. Write how to install, test, lint, type-check, build and start it here, each with where it comes from, such as the CI file or the README.\n`;
429
+ const scripts = repo.scripts;
430
+ const lock = lockfileOf(repo.files);
431
+ const manager = lock?.[1] ?? "npm";
432
+ const names = Object.keys(scripts ?? {});
433
+ const lines = RECIPE_STEPS.flatMap(([label, wanted]) => {
434
+ const guessed = stacks.filter(({ step }) => step === label).map(({ command, file }) => `- ${label}: \`${command}\`, a first guess from \`${file}\`.`);
435
+ const node = [];
436
+ if (scripts !== null && label === "Install") node.push(`- Install: \`${manager} install\`, because ${lock === void 0 ? "`package.json` is at its top and no lockfile names another tool" : `\`${lock[0]}\` is at its top`}.`);
437
+ else if (scripts !== null) {
438
+ const script = wanted.find((name) => names.includes(name));
439
+ if (script !== void 0) node.push(`- ${label}: \`${scriptCommand(manager, script)}\`, the \`${script}\` script in \`package.json\`.`);
440
+ else if (guessed.length === 0) node.push(`- ${label}: Not read. \`package.json\` has no \`${wanted[0]}\` script. Write the command and where it comes from here.`);
441
+ } else if (guessed.length === 0 && label !== "Type-check") node.push(`- ${label}: Not read. No file at its top names one. Write the command and where it comes from here.`);
442
+ return [...node, ...guessed];
443
+ });
444
+ lines.push("- Catches: None written yet. A run that finds one adds it here.");
445
+ return `${recipeHeading(repo.path)}\n\n${where}\n\n${lines.join("\n")}\n`;
446
+ }
447
+ function sectionBounds(lines, path) {
448
+ const start = lines.findIndex((line) => line.trim() === recipeHeading(path));
449
+ if (start === -1) return null;
450
+ const next = lines.findIndex((line, index) => index > start && line.startsWith("## "));
451
+ return [start, next === -1 ? lines.length : next];
452
+ }
453
+ /** One repository's section of the run recipe, with no blank lines after it, or null. */
454
+ function recipeSectionOf(text, path) {
455
+ const lines = text.split("\n");
456
+ const bounds = sectionBounds(lines, path);
457
+ return bounds === null ? null : lines.slice(bounds[0], bounds[1]).join("\n").trimEnd();
458
+ }
459
+ /**
460
+ * The run recipe with one repository's section in place of the one it had, or added at the end.
461
+ *
462
+ * Learn your repositories writes one section per run, and each run's change waits for review on its
463
+ * own, so Apply puts in that section alone. Writing the whole kept file would drop the section an
464
+ * earlier run of another repository added.
465
+ */
466
+ function withRecipeSection(text, path, section) {
467
+ const lines = text.split("\n");
468
+ const bounds = sectionBounds(lines, path);
469
+ const body = section.trimEnd();
470
+ if (bounds === null) return `${text.trimEnd()}\n\n${body}\n`;
471
+ const before = bounds[0] === 0 ? "" : `${lines.slice(0, bounds[0]).join("\n")}\n`;
472
+ const after = lines.slice(bounds[1]).join("\n");
473
+ return `${before}${body}\n${after === "" ? "" : `\n${after}`}`;
474
+ }
475
+ var recipeMoved = (text, folder) => text.replace(`${recipeHeading(".")}\n\nRun these in the project folder.`, `${recipeHeading(folder)}\n\n${runIn(folder)}`);
476
+ /**
477
+ * The run recipe with a section for each repository, from its `package.json` and lockfile, and from
478
+ * the stack table the allowed commands use for every other stack.
479
+ *
480
+ * A stack command is a first guess from a file name and its line says so. A step no file names
481
+ * stays a line that says Not read, because a made-up command would run the wrong thing. A file
482
+ * already there keeps every line it has, and gets a section only for a repository it names no
483
+ * heading for. Null when there is nothing to add.
484
+ */
485
+ function runRecipe(repos, existing) {
486
+ const headings = new Set((existing ?? "").split("\n").map((line) => line.trim()));
487
+ const added = repos.filter((repo) => !headings.has(recipeHeading(repo.path))).map(recipeSection);
488
+ if (added.length === 0) return null;
489
+ const top = [
490
+ "---",
491
+ "description: Read before you install, test, lint, type-check, build or start a repository. The command for each, where it comes from and its catch.",
492
+ "---",
493
+ "",
494
+ "# How to run each repository",
495
+ "",
496
+ "Nolzu wrote the first lines from each `package.json` and the other files it knows at the top of each repository. Correct a command that is wrong, and add the catch a run met, such as a service it needs or a flag it takes.",
497
+ "",
498
+ ""
499
+ ].join("\n");
500
+ return `${existing === null ? top : existing.endsWith("\n") ? existing : `${existing}\n`}${existing === null ? "" : "\n"}${added.join("\n")}`;
501
+ }
502
+ //#endregion
503
+ //#region ../../packages/core/src/output-check.ts
504
+ var MAIN_FILE_LINES = 300;
505
+ var REVIEW_BLOCK = "## Before you approve";
506
+ var REVIEW_BLOCK_LINES = 15;
507
+ var sameHeading = (line, heading) => line.trim().replace(/\s+/g, " ").toLowerCase() === heading.toLowerCase();
508
+ function section(text, heading) {
509
+ const lines = text.split("\n");
510
+ const start = lines.findIndex((line) => sameHeading(line, heading));
511
+ if (start === -1) return null;
512
+ const end = lines.findIndex((line, at) => at > start && /^#{1,2} /.test(line));
513
+ return lines.slice(start + 1, end === -1 ? void 0 : end).join("\n");
514
+ }
515
+ var secondLevel = (text) => text.split("\n").filter((line) => line.startsWith("## ")).map((line) => line.trimEnd());
516
+ var items = (body) => body.split("\n").filter((line) => /^([-*]|\d+\.) /.test(line));
517
+ var criteria = (refined) => refined === void 0 ? null : idsIn(section(refined, "## Acceptance checks") ?? "", "AC");
518
+ function idsIn(body, prefix) {
519
+ const pattern = new RegExp(`^(?:[-*]|\\d+\\.) (${prefix}\\d+)\\b`);
520
+ return items(body).flatMap((line) => pattern.exec(line)?.[1] ?? []);
521
+ }
522
+ var cites = (text) => [...new Set(text.match(/(?<![A-Z][A-Z0-9]*-\d+:? )\bAC\d+\b/g) ?? [])];
523
+ var usedTwice = (ids) => [...new Set(ids.filter((id, at) => ids.indexOf(id) !== at))].map((id) => `The id ${id} is used twice.`);
524
+ var idRule = (heading, prefix) => (text) => {
525
+ const body = section(text, heading);
526
+ if (body === null) return [];
527
+ const pattern = new RegExp(`^(?:[-*]|\\d+\\.) ${prefix}\\d+\\b`);
528
+ return [...items(body).filter((line) => !pattern.test(line)).map((line) => `A line under "${heading}" does not start with its id (${prefix}1, ${prefix}2 and on): "${line}"`), ...usedTwice(idsIn(body, prefix))];
529
+ };
530
+ var criterionParts = (text) => refinedCriteria(text).flatMap((one) => [...one.level === null ? [`${one.id} has no level after its id, (must) or (should).`] : [], ...one.check === null ? [`${one.id} has no "Check:" line under it.`] : []]);
531
+ var MAX_QUESTIONS = 3;
532
+ var questionParts = (heading) => (text) => askedWell(refinedQuestions(text, heading));
533
+ function askedWell(questions, max = MAX_QUESTIONS) {
534
+ const problems = questions.length > max ? [`There are ${questions.length} open questions, more than ${max}. A fourth becomes an assumption with its default.`] : [];
535
+ for (const one of questions) {
536
+ const name = one.id ?? `"${one.question}"`;
537
+ if (one.answer === null) problems.push(`The question ${name} names no "Default:".`);
538
+ if (one.blocks === null) problems.push(`The question ${name} does not end with "blocks: yes" or "blocks: no".`);
539
+ }
540
+ return problems;
541
+ }
542
+ var readAt = (heading) => (text) => (section(text, heading) ?? "").split("\n").some((line) => /^read at:/i.test(line.trim())) ? [] : [`"${heading}" has no "Read at:" line.`];
543
+ var turnedDown = (text) => items(section(text, "## The decisions") ?? "").flatMap((line) => {
544
+ const id = /^[-*] (D\d+)\b/.exec(line)?.[1];
545
+ return id === void 0 || /\bNot:/.test(line) ? [] : [`The decision ${id} names no option turned down, "Not:".`];
546
+ });
547
+ var ARCHITECTURE_OPEN = "## What is still open";
548
+ function freshIds(ids, files, earlier) {
549
+ return ids.flatMap((id) => {
550
+ const held = earlier.find(([path, heading]) => refinedQuestions(files[path] ?? "", heading).some((one) => one.id === id));
551
+ return id === null || held === void 0 ? [] : [`The question ${id} has an id the ${held[2]} already gives a question. Go on from its last Q id.`];
552
+ });
553
+ }
554
+ var BRIEF_QUESTIONS = [
555
+ "refine/refined.md",
556
+ "## Open questions",
557
+ "brief"
558
+ ];
559
+ var architectureFresh = (text, files) => freshIds(refinedQuestions(text, ARCHITECTURE_OPEN).map((one) => one.id), files, [BRIEF_QUESTIONS]);
560
+ function knownCriteria(text, files) {
561
+ const known = criteria(files["refine/refined.md"]);
562
+ return known === null ? [] : cites(text).filter((id) => !known.includes(id)).map((id) => `${id} is cited, and the brief has no such criterion.`);
563
+ }
564
+ function screenParts(text) {
565
+ return (section(text, "## Screens") ?? "").split(/^(?=### )/m).filter((part) => part.startsWith("### ")).flatMap((part) => {
566
+ const name = part.split("\n")[0]?.slice(4).trim();
567
+ const lines = part.split("\n");
568
+ const field = (label) => lines.findIndex((line) => new RegExp(`^${label}\\s*:`, "i").test(line.trim()));
569
+ const states = field("States");
570
+ const problems = [
571
+ "Address",
572
+ "States",
573
+ "Data"
574
+ ].filter((label) => field(label) === -1).map((label) => `The screen ${name} has no "${label}:" line.`);
575
+ const first = lines.slice(states + 1).find((line) => line.trim() !== "");
576
+ if (states !== -1 && !/^[-*] .+?\(.*?\)\s*:/.test(first?.trim() ?? "")) problems.push(`The screen ${name} names no state as a "- <state> (<ids>): ..." line under "States:".`);
577
+ return problems;
578
+ });
579
+ }
580
+ function screenQuestions(text) {
581
+ const asked = text.split("\n").flatMap((line) => /^question\s*:\s*(.*)$/i.exec(line.trim())?.[1] ?? []).filter((one) => !/^none\b/i.test(one));
582
+ return refinedQuestions(`## Open questions\n${asked.map((one) => `- ${one}`).join("\n")}`);
583
+ }
584
+ function designQuestions(text, files) {
585
+ const questions = screenQuestions(text);
586
+ const noId = questions.filter((one) => one.id === null).map((one) => `A screen's question has no Q id: "${one.question}"`);
587
+ const earlier = [BRIEF_QUESTIONS, [
588
+ "architecture/architecture.md",
589
+ ARCHITECTURE_OPEN,
590
+ "architecture"
591
+ ]];
592
+ const ids = questions.flatMap((one) => one.id ?? []);
593
+ return [
594
+ ...noId,
595
+ ...usedTwice(ids),
596
+ ...askedWell(questions.filter((one) => one.id !== null), Infinity),
597
+ ...freshIds(ids, files, earlier)
598
+ ];
599
+ }
600
+ function freshDecisions(text, files) {
601
+ const held = idsIn(section(files["architecture/architecture.md"] ?? "", "## The decisions") ?? "", "D");
602
+ return idsIn(section(text, "## Decisions") ?? "", "D").filter((id) => held.includes(id)).map((id) => `The decision ${id} has an id the architecture already gives a decision. Go on from its last D id.`);
603
+ }
604
+ function planCovers(text, files) {
605
+ const known = criteria(files["refine/refined.md"]);
606
+ if (known === null) return [];
607
+ const steps = section(text, "## Steps") ?? "";
608
+ const covered = /* @__PURE__ */ new Set();
609
+ const problems = [];
610
+ let step = 0;
611
+ for (const line of steps.split("\n")) {
612
+ const numbered = /^(\d+)\. /.exec(line);
613
+ if (numbered !== null) step = Number(numbered[1]);
614
+ const covers = /^\s+Covers:(.*)$/.exec(line);
615
+ if (covers === null) continue;
616
+ for (const id of cites(covers[1] ?? "")) {
617
+ covered.add(id);
618
+ if (!known.includes(id)) problems.push(`Step ${step} covers ${id}, which the brief does not have.`);
619
+ }
620
+ }
621
+ const notDoing = new Set(cites(section(text, "## Not doing") ?? ""));
622
+ return [...problems, ...known.filter((id) => !covered.has(id) && !notDoing.has(id)).map((id) => `No step covers ${id}, and "## Not doing" does not name it.`)];
623
+ }
624
+ function stepChecks(text) {
625
+ return (section(text, "## Steps") ?? "").split(/^(?=\d+\. )/m).filter((part) => /^\d+\. /.test(part)).filter((step) => !/^[ \t]+check\s*:/im.test(step)).map((step) => `Step ${/^\d+/.exec(step)?.[0]} has no "Check:" line.`);
626
+ }
627
+ function planNumbered(text) {
628
+ const steps = section(text, "## Steps") ?? "";
629
+ const inSteps = new Set(steps.split("\n"));
630
+ return text.split("\n").filter((line) => /^\d+\. /.test(line) && !inSteps.has(line)).map((line) => `A numbered line outside "## Steps" reads as a step: "${line}"`);
631
+ }
632
+ function checkLevels(text, files) {
633
+ const levels = new Map(refinedCriteria(files["refine/refined.md"] ?? "").map((one) => [one.id, one.level]));
634
+ return items(text).flatMap((line) => {
635
+ const found = /^\d+\. (AC\d+)\b(?: *\((\w+)\))?/i.exec(line);
636
+ const id = found?.[1]?.toUpperCase();
637
+ const level = id === void 0 ? null : levels.get(id) ?? null;
638
+ if (level === null || found?.[2]?.toLowerCase() === level) return [];
639
+ return [`The check for ${id} does not carry its level from the brief, "${id} (${level}):".`];
640
+ });
641
+ }
642
+ function checksCover(text, files) {
643
+ const known = criteria(files["refine/refined.md"]);
644
+ if (known === null) return [];
645
+ const named = cites(text);
646
+ return [...known.filter((id) => !named.includes(id)).map((id) => `No check names ${id}.`), ...named.filter((id) => !known.includes(id)).map((id) => `A check names ${id}, which the brief does not have.`)];
647
+ }
648
+ var ROW = /^\d+\. +(pass|fail|not reached) *: *(.*)$/i;
649
+ var ROW_AC = /^(AC\d+)(?: *\((must|should)\))? *:/i;
650
+ var ROW_FIELDS = {
651
+ pass: ["How", "Evidence"],
652
+ fail: [
653
+ "Reason",
654
+ "Expected",
655
+ "Actual",
656
+ "How",
657
+ "Evidence"
658
+ ],
659
+ "not reached": ["Reason"]
660
+ };
661
+ function reportRows(text, files) {
662
+ const body = section(text, "## 2. What QA checked") ?? "";
663
+ const rows = items(body);
664
+ const problems = rows.filter((row) => !ROW.test(row)).map((row) => `A row does not start with pass, fail or not reached: "${row}"`);
665
+ const checks = files["qa/checks.md"];
666
+ const asked = checks === void 0 ? 0 : items(checks).length;
667
+ if (asked > rows.length) problems.push(`qa/checks.md has ${asked} checks and the report has ${rows.length} rows.`);
668
+ const read = body.split(/^(?=\d+\. )/m).filter((part) => ROW.test(part.split("\n")[0] ?? "")).map((part) => {
669
+ const [first = "", ...under] = part.trimEnd().split("\n");
670
+ const row = ROW.exec(first);
671
+ const ac = ROW_AC.exec(row?.[2] ?? "");
672
+ return {
673
+ number: Number(/^\d+/.exec(first)?.[0]),
674
+ result: row?.[1]?.toLowerCase() ?? "",
675
+ id: ac?.[1]?.toUpperCase(),
676
+ level: ac?.[2]?.toLowerCase(),
677
+ under
678
+ };
679
+ });
680
+ for (const row of read) for (const field of ROW_FIELDS[row.result] ?? []) if (!row.under.some((line) => new RegExp(`^\\s+${field}\\s*:`, "i").test(line))) problems.push(`Row ${row.number} has no "${field}:" line.`);
681
+ for (const path of new Set(body.match(/qa\/evidence\/[^\s,;)`"']+/g) ?? [])) if (path !== path.toLowerCase()) problems.push(`The evidence file ${path} has capital letters. Name it in lower case, because a disk that ignores case keeps one of two such names.`);
682
+ if (/\b(PASS|FAIL|BLOCKED)\b/.exec(section(text, "## 1. Verdict") ?? "")?.[1] !== "PASS") return problems;
683
+ const levels = new Map(refinedCriteria(files["refine/refined.md"] ?? "").map((one) => [one.id, one.level]));
684
+ const must = (id, own) => (levels.get(id) ?? own ?? "must") === "must";
685
+ const missed = [...new Set(read.filter((row) => row.id !== void 0 && row.result !== "pass" && must(row.id, row.level)).map((row) => row.id))];
686
+ if (missed.length > 0) problems.push(`The verdict is PASS, but the must ${missed.length === 1 ? "check" : "checks"} ${missed.join(", ")} did not pass.`);
687
+ for (const [id] of [...levels].filter(([id]) => must(id) && !read.some((row) => row.id === id))) problems.push(`The verdict is PASS, but no row checks the must criterion ${id}.`);
688
+ for (const row of read.filter((one) => one.id === void 0 && one.result === "fail")) problems.push(`The verdict is PASS, but row ${row.number} failed.`);
689
+ return problems;
690
+ }
691
+ var base = (text) => /^base:/i.test(text.trimStart()) ? [] : ["The file does not open with a \"Base:\" line, the commit the work started from."];
692
+ var recordLabels = (text) => {
693
+ const block = section(text, REVIEW_BLOCK);
694
+ if (block === null) return [];
695
+ return ["Deviations", "Tests"].filter((label) => !block.split("\n").some((line) => line.toLowerCase().startsWith(`- ${label.toLowerCase()}:`))).map((label) => `The review block has no "- ${label}:" line.`);
696
+ };
697
+ var STEP_LINE = /^(?:\d{1,3}\. |(?:[-*] *)?step *\d{1,3}\b)/i;
698
+ function stepProof(text) {
699
+ return (section(text, "## Steps done") ?? "").split(/^(?=\d+\. |[-*] |step *\d)/im).filter((part) => STEP_LINE.test(part) || /^[-*] /.test(part)).flatMap((part) => {
700
+ const [first = "", ...rest] = part.trimEnd().split("\n");
701
+ const label = STEP_LINE.test(first) ? `Step ${/\d+/.exec(first)?.[0]}` : `"${first}"`;
702
+ const has = (field) => rest.some((line) => new RegExp(`^\\s+${field}\\s*:`, "i").test(line));
703
+ if (has("red") && !has("green")) return [`${label} has a "Red:" line and no "Green:" line.`];
704
+ return has("check") || has("green") ? [] : [`${label} has no "Check:" or "Green:" line with the command that proved it.`];
705
+ });
706
+ }
707
+ var READS_AS_STEP = /^(?:[-*]\s*)?(?:step\s*)?\d{1,3}\b/i;
708
+ function readsAsStep(text) {
709
+ const steps = section(text, "## Steps done");
710
+ if (steps === null) return [];
711
+ const skip = /* @__PURE__ */ new Set([...steps.split("\n").filter((line) => STEP_LINE.test(line)), ...(section(text, REVIEW_BLOCK) ?? "").split("\n").filter((line) => /^- \d/.test(line))]);
712
+ return text.split("\n").filter((line) => READS_AS_STEP.test(line.trim()) && !skip.has(line)).map((line) => `A line starts with a number, and the next run reads it as a finished step: "${line}"`);
713
+ }
714
+ var rulings = (text) => items(text).filter((line) => /^[-*] /.test(line) && !(/\bWhy:/i.test(line) && /\bIf wrong:/i.test(line))).map((line) => `A deviation has no "Why:" or no "If wrong:": "${line}"`);
715
+ function roundLabels(text) {
716
+ const read = parseRound(text);
717
+ return read.ok ? [] : [read.problem];
718
+ }
719
+ var sourcesLast = (text) => secondLevel(text).at(-1) === "## Sources" ? [] : ["\"## Sources\" is not the last section."];
720
+ var CONFIDENCE = /^confidence: *(high|medium|low)\b/i;
721
+ var NO_CONFIDENCE = "There is no \"Confidence:\" line (high, medium or low) under the answer.";
722
+ function answerFirst(text) {
723
+ const lines = text.split("\n");
724
+ const heading = lines.findIndex((line) => /^#{1,6} /.test(line));
725
+ const head = lines.slice(0, heading === -1 ? void 0 : heading).map((line) => line.trim()).filter((line) => line !== "");
726
+ return [...head[0] === void 0 || /^([-*]|\d+\.) /.test(head[0]) ? ["The file does not open with the answer in one sentence."] : [], ...head.some((line) => CONFIDENCE.test(line)) ? [] : [NO_CONFIDENCE]];
727
+ }
728
+ var HYPOTHESES = "## Hypotheses tried";
729
+ var SEARCHED = "## Searched and not found";
730
+ var tried = (text) => items(section(text, HYPOTHESES) ?? "").filter((line) => !/\bResult: *(held|ruled out|not settled)\b/i.test(line)).map((line) => `A hypothesis has no "Result:" (held, ruled out or not settled): "${line}"`);
731
+ var CARD_DRAFT = "## If this becomes a card";
732
+ function cardDraft(text) {
733
+ const body = section(text, CARD_DRAFT);
734
+ if (body === null) return [];
735
+ const has = (field) => body.split("\n").some((line) => line.trim().toLowerCase().startsWith(`${field}:`));
736
+ const asChecks = `## Acceptance checks\n${body}`;
737
+ return [
738
+ ...has("problem") ? [] : [`"${CARD_DRAFT}" has no "Problem:" line.`],
739
+ ...has("change") ? [] : [`"${CARD_DRAFT}" has no "Change:" line with the places to change.`],
740
+ ...refinedCriteria(asChecks).length === 0 ? [`"${CARD_DRAFT}" has no criterion, as "- AC1 (must): ..." with a "Check:" line.`] : criterionParts(asChecks),
741
+ ...askedWell(refinedQuestions(text, CARD_DRAFT).filter((one) => one.id !== null))
742
+ ];
743
+ }
744
+ var ASSESSMENT_CAUSE = "## The likely cause";
745
+ var ASSESSMENT_HEADINGS = [
746
+ "## The evidence",
747
+ ASSESSMENT_CAUSE,
748
+ "## The proposal",
749
+ "## The effort",
750
+ "## The risks"
751
+ ];
752
+ function causeCall(text) {
753
+ const body = section(text, ASSESSMENT_CAUSE);
754
+ if (body === null) return [];
755
+ const lines = body.split("\n").map((line) => line.trim());
756
+ return [...lines.some((line) => CONFIDENCE.test(line)) ? [] : [`"${ASSESSMENT_CAUSE}" has no "Confidence:" line (high, medium or low).`], ...lines.some((line) => /^what would change it:/i.test(line)) ? [] : [`"${ASSESSMENT_CAUSE}" has no "What would change it:" line.`]];
757
+ }
758
+ var subHeadings = (text) => text.split("\n").filter((line) => /^#{2,6} /.test(line) && !ASSESSMENT_HEADINGS.some((heading) => sameHeading(line.replace(/^#+/, "##"), heading))).map((line) => `The heading "${line.trim()}" splits a section, because the screen starts a new section at every heading.`);
759
+ var ROUND_FILE = /^pr-review\/round(?:-(\d+))?\.md$/;
760
+ var roundsOf = (files) => Object.keys(files).flatMap((path) => {
761
+ const found = ROUND_FILE.exec(path);
762
+ return found === null ? [] : [{
763
+ number: Number(found[1] ?? 1),
764
+ text: files[path] ?? ""
765
+ }];
766
+ }).sort((a, b) => a.number - b.number);
767
+ var blocksOf = (text) => {
768
+ const read = parseRound(text);
769
+ return read.ok ? read.blocks : [];
770
+ };
771
+ function reviewSummary(text, files) {
772
+ const rounds = roundsOf(files);
773
+ const newest = rounds.at(-1);
774
+ if (newest === void 0) return [];
775
+ const line = (name) => text.split("\n").map((one) => one.trim()).find((one) => one.toLowerCase().startsWith(`${name}:`)) ?? null;
776
+ const read = parseRound(newest.text);
777
+ if (!read.ok) return [];
778
+ const blocks = read.blocks;
779
+ const counts = ROUND_LABELS.map((label) => ({
780
+ label,
781
+ count: blocks.filter((block) => block.label === label).length
782
+ }));
783
+ const blocking = blocks.filter(isBlocking).length;
784
+ const questions = blocks.filter((block) => block.label === "question").length;
785
+ const expected = blocking > 0 ? "changes needed" : questions > 0 ? "questions first" : "ready to merge";
786
+ const problems = [];
787
+ const verdict = line("verdict");
788
+ if (verdict === null) problems.push("There is no \"Verdict:\" line (changes needed, questions first or ready to merge).");
789
+ else if (!verdict.toLowerCase().startsWith(`verdict: ${expected}`)) problems.push(`The verdict does not follow the round: with ${blocking} blocking and ${questions} question blocks it is "${expected}".`);
790
+ const findings = line("findings");
791
+ if (findings === null) problems.push("There is no \"Findings:\" line with the count of blocks by label.");
792
+ else if (counts.some(({ label, count }) => Number(new RegExp(`(\\d+) ${label}`, "i").exec(findings)?.[1] ?? 0) !== count)) problems.push(`"Findings:" does not match the round, which has ${counts.filter((one) => one.count > 0).map((one) => `${one.count} ${one.label}`).join(", ") || "no block"}.`);
793
+ if (rounds.slice(0, -1).some((round) => blocksOf(round.text).some((block) => block.label === "issue")) && line("earlier issues") === null) problems.push("This is a re-review and there is no \"Earlier issues:\" line, which says how many issues of the earlier rounds are fixed.");
794
+ if (line("not reviewed") === null) problems.push("There is no \"Not reviewed:\" line, which says what the round did not read.");
795
+ return problems;
796
+ }
797
+ var SHARE_FILES = ["share/SUMMARY.md", "share/TESTING.md"];
798
+ var OUTPUT_RULES = {
799
+ refine: { files: [{
800
+ file: "refine/refined.md",
801
+ headings: [
802
+ REVIEW_BLOCK,
803
+ "## Problem",
804
+ "## Scope",
805
+ "## Assumptions",
806
+ "## Acceptance checks",
807
+ "## Open questions",
808
+ "## What the code does today",
809
+ "## Rules that apply",
810
+ "## Out of scope",
811
+ "## Read first"
812
+ ],
813
+ checks: [
814
+ idRule("## Assumptions", "A"),
815
+ idRule("## Acceptance checks", "AC"),
816
+ idRule("## Open questions", "Q"),
817
+ criterionParts,
818
+ questionParts("## Open questions"),
819
+ readAt("## What the code does today")
820
+ ]
821
+ }] },
822
+ architecture: {
823
+ files: [{
824
+ file: "architecture/architecture.md",
825
+ headings: [
826
+ REVIEW_BLOCK,
827
+ "## The shape",
828
+ "## The pieces",
829
+ "## Where they meet",
830
+ "## Interfaces",
831
+ "## The data",
832
+ "## The decisions",
833
+ ARCHITECTURE_OPEN,
834
+ "## Touch points",
835
+ "## Test surfaces",
836
+ "## Not doing",
837
+ "## Read first"
838
+ ],
839
+ checks: [
840
+ readAt("## The shape"),
841
+ idRule("## The decisions", "D"),
842
+ turnedDown,
843
+ idRule(ARCHITECTURE_OPEN, "Q"),
844
+ questionParts(ARCHITECTURE_OPEN),
845
+ architectureFresh,
846
+ knownCriteria
847
+ ]
848
+ }],
849
+ reads: ["refine/refined.md"]
850
+ },
851
+ design: {
852
+ files: [{
853
+ file: "design/design.md",
854
+ headings: [
855
+ REVIEW_BLOCK,
856
+ "## Screens",
857
+ "## Not doing",
858
+ "## Read first"
859
+ ],
860
+ checks: [
861
+ readAt("## Screens"),
862
+ screenParts,
863
+ designQuestions,
864
+ knownCriteria
865
+ ]
866
+ }],
867
+ reads: ["refine/refined.md", "architecture/architecture.md"]
868
+ },
869
+ plan: {
870
+ files: [
871
+ {
872
+ file: "plan/plan.md",
873
+ headings: [
874
+ REVIEW_BLOCK,
875
+ "## Approach",
876
+ "## Decisions",
877
+ "## Steps",
878
+ "## Risks",
879
+ "## Order",
880
+ "## Settled questions",
881
+ "## Rules that apply",
882
+ "## Not doing",
883
+ "## Read first"
884
+ ],
885
+ checks: [
886
+ planCovers,
887
+ planNumbered,
888
+ stepChecks,
889
+ idRule("## Decisions", "D"),
890
+ freshDecisions,
891
+ readAt("## Approach")
892
+ ]
893
+ },
894
+ {
895
+ file: "qa/checks.md",
896
+ checks: [checksCover, checkLevels]
897
+ },
898
+ {
899
+ file: "share/PLAN.md",
900
+ headings: ["## Tasks"],
901
+ board: "epics"
902
+ }
903
+ ],
904
+ reads: ["refine/refined.md", "architecture/architecture.md"]
905
+ },
906
+ implement: { files: [
907
+ {
908
+ file: "implement/progress.md",
909
+ headings: [REVIEW_BLOCK, "## Steps done"],
910
+ checks: [
911
+ base,
912
+ recordLabels,
913
+ stepProof,
914
+ readsAsStep
915
+ ]
916
+ },
917
+ {
918
+ file: "implement/pr.md",
919
+ headings: ["## What changed", "## How to test"]
920
+ },
921
+ {
922
+ file: "implement/deviations.md",
923
+ checks: [rulings]
924
+ },
925
+ ...SHARE_FILES.map((file) => ({ file }))
926
+ ] },
927
+ qa: {
928
+ files: [{
929
+ file: "qa/report.md",
930
+ block: "## 1. Verdict",
931
+ headings: [
932
+ "## 1. Verdict",
933
+ "## 2. What QA checked",
934
+ "## 3. What was not checked"
935
+ ],
936
+ checks: [reportRows]
937
+ }],
938
+ reads: ["qa/checks.md", "refine/refined.md"]
939
+ },
940
+ research: { files: [{
941
+ file: "research/answer.md",
942
+ headings: [
943
+ "## Why",
944
+ SEARCHED,
945
+ "## Sources"
946
+ ],
947
+ checks: [
948
+ answerFirst,
949
+ cardDraft,
950
+ sourcesLast
951
+ ]
952
+ }] },
953
+ investigate: { files: [{
954
+ file: "investigate/report.md",
955
+ headings: [
956
+ "## What was reported",
957
+ "## What was found",
958
+ HYPOTHESES,
959
+ "## The fix or next step",
960
+ SEARCHED,
961
+ "## Sources"
962
+ ],
963
+ checks: [
964
+ answerFirst,
965
+ tried,
966
+ cardDraft,
967
+ sourcesLast
968
+ ]
969
+ }] },
970
+ assess: { files: [{
971
+ file: "assess/assessment.md",
972
+ headings: ASSESSMENT_HEADINGS,
973
+ checks: [causeCall, subHeadings]
974
+ }] },
975
+ "pr-review": { files: [{
976
+ file: "pr-review/round.md",
977
+ match: ROUND_FILE,
978
+ checks: [roundLabels]
979
+ }, {
980
+ file: "pr-review/summary.md",
981
+ checks: [reviewSummary]
982
+ }] },
983
+ wrapup: {
984
+ files: [{ file: "wrapup/changes.md" }],
985
+ knowledge: true
986
+ },
987
+ optimize: {
988
+ files: [{ file: "optimize/changes.md" }],
989
+ knowledge: true
990
+ },
991
+ orient: {
992
+ files: [{
993
+ file: "orient/changes.md",
994
+ checks: [orientSize]
995
+ }],
996
+ knowledge: true,
997
+ notes: orientSources
998
+ },
999
+ "learn-repo": {
1000
+ files: [{ file: "learn-repo/changes.md" }],
1001
+ knowledge: true
1002
+ }
1003
+ };
1004
+ var KNOWLEDGE_PREFIX = "knowledge/";
1005
+ function noteProblems(files, repos, created) {
1006
+ return Object.entries(files).filter(([path]) => path.startsWith(KNOWLEDGE_PREFIX) && path.endsWith(".md")).flatMap(([file, text]) => [
1007
+ ...frontmatterDescription(text) === null ? ["The note has no \"description:\" in its frontmatter, which the knowledge index shows every run as the line that says when to read it."] : [],
1008
+ ...frontmatterPaths(text).filter((path) => /^(\/|~|\.tasks(\/|$))/.test(path) || path.split("/").includes("..")).map((path) => `The path "${path}" is one git does not keep. Name only paths git tracks on the base branch, never the card folder.`),
1009
+ ...created === null || created.includes(file) ? misplaced(file.slice(10), text, repos) : []
1010
+ ].map((problem) => ({
1011
+ file,
1012
+ problem
1013
+ })));
1014
+ }
1015
+ function misplaced(path, text, repos) {
1016
+ const name = path.split("/").at(-1) ?? path;
1017
+ if (repos.length === 0 || path === "run-recipe.md" || name === "repository.md") return [];
1018
+ const wanted = noteFolder(frontmatterPaths(text), repos);
1019
+ const folder = path.slice(0, path.length - name.length);
1020
+ if (wanted === null || wanted === folder) return [];
1021
+ const where = (one) => one === "" ? "the top of the knowledge folder" : one;
1022
+ return [`The note sits in ${where(folder)}, but its paths belong in ${where(wanted)}. Move it to ${wanted}${name}.`];
1023
+ }
1024
+ var ORIENT_NOTES = 3;
1025
+ var ORIENT_LINES = 60;
1026
+ var SOURCED = /\((?:from [^()]+|told by the person)\)\.?$/;
1027
+ var ownNotes = (files) => Object.entries(files).filter(([path]) => path.startsWith(KNOWLEDGE_PREFIX) && path.endsWith(".md") && path !== `${KNOWLEDGE_PREFIX}run-recipe.md` && path.split("/").at(-1) !== "repository.md");
1028
+ var noteLines = (text) => {
1029
+ const lines = text.split("\n");
1030
+ return lines.slice(frontmatterEnd(lines) + 1).filter((line) => line.trim() !== "" && !line.startsWith("#"));
1031
+ };
1032
+ function orientSize(_text, files) {
1033
+ const notes = Object.keys(files).filter((path) => path.startsWith(KNOWLEDGE_PREFIX) && path.endsWith(".md"));
1034
+ const lines = ownNotes(files).reduce((sum, [, text]) => sum + noteLines(text).length, 0);
1035
+ return [...notes.length > ORIENT_NOTES ? [`The run wrote ${notes.length} knowledge files, more than ${ORIENT_NOTES}.`] : [], ...lines > ORIENT_LINES ? [`The knowledge files hold ${lines} lines, more than about ${ORIENT_LINES}.`] : []];
1036
+ }
1037
+ function orientSources(files) {
1038
+ return ownNotes(files).flatMap(([file, text]) => noteLines(text).filter((line) => !SOURCED.test(line.trim())).map((line) => ({
1039
+ file,
1040
+ problem: `The line "${line.trim()}" names no source. End it with (from <the file>) or (told by the person).`
1041
+ })));
1042
+ }
1043
+ var rulesOf = (phase, board) => {
1044
+ const rules = OUTPUT_RULES[phase];
1045
+ if (rules === void 0) return null;
1046
+ const summary = `${phase}/summary.md`;
1047
+ const files = rules.files.filter((rule) => rule.board === void 0 || rule.board === board);
1048
+ return files.some((rule) => rule.file === summary) ? files : [...files, { file: summary }];
1049
+ };
1050
+ function checkedPaths(phase, board) {
1051
+ const rules = rulesOf(phase, board);
1052
+ return rules === null ? [] : [...rules.map((rule) => rule.file), ...OUTPUT_RULES[phase]?.reads ?? []];
1053
+ }
1054
+ function placeholders(text) {
1055
+ const prose = text.replace(/```[\s\S]*?```/g, "").replace(/`[^`\n]*`/g, "");
1056
+ return [...new Set(prose.match(/<(?:KEY|[a-z][a-z0-9',]*(?: [a-z0-9',]+)+)>/g) ?? [])];
1057
+ }
1058
+ function reviewBlock(text, heading = REVIEW_BLOCK) {
1059
+ const body = section(text, heading);
1060
+ if (body === null) return [];
1061
+ const lines = body.split("\n").filter((line) => line.trim() !== "");
1062
+ const problems = lines.length > REVIEW_BLOCK_LINES ? [`The review block has ${lines.length} lines, more than ${REVIEW_BLOCK_LINES}.`] : [];
1063
+ for (const line of lines) if (!line.startsWith("- ")) problems.push(`A review block line is not a bullet: "${line}"`);
1064
+ else if (/^- \d/.test(line)) problems.push(`A review block line starts with a digit, which reads as a step: "${line}"`);
1065
+ return problems;
1066
+ }
1067
+ function pick(rule, files) {
1068
+ if (rule.match === void 0) return files[rule.file] === void 0 ? null : {
1069
+ path: rule.file,
1070
+ text: files[rule.file] ?? ""
1071
+ };
1072
+ const found = Object.keys(files).map((path) => ({
1073
+ path,
1074
+ round: rule.match?.exec(path)
1075
+ })).filter((one) => one.round != null).sort((a, b) => Number(a.round?.[1] ?? 1) - Number(b.round?.[1] ?? 1)).at(-1);
1076
+ return found === void 0 ? null : {
1077
+ path: found.path,
1078
+ text: files[found.path] ?? ""
1079
+ };
1080
+ }
1081
+ function checkOutputs(phase, files, board, repos = [], created = null) {
1082
+ const rules = rulesOf(phase, board);
1083
+ if (rules === null) return null;
1084
+ const notes = OUTPUT_RULES[phase]?.knowledge === true ? [...noteProblems(files, repos, created), ...OUTPUT_RULES[phase]?.notes?.(files) ?? []] : [];
1085
+ return [...rules.flatMap((rule, at) => {
1086
+ const found = pick(rule, files);
1087
+ if (found === null) return [{
1088
+ file: rule.file,
1089
+ problem: "The file is missing."
1090
+ }];
1091
+ const { path, text } = found;
1092
+ if (text.trim() === "") return [{
1093
+ file: path,
1094
+ problem: "The file is empty."
1095
+ }];
1096
+ const main = at === 0;
1097
+ const lines = text.trimEnd().split("\n").length;
1098
+ const left = placeholders(text);
1099
+ return [
1100
+ ...(rule.headings ?? []).map((heading) => {
1101
+ const body = section(text, heading);
1102
+ if (body === null) return `The heading "${heading}" is missing.`;
1103
+ return body.trim() === "" ? `The section "${heading}" is empty.` : null;
1104
+ }),
1105
+ ...(rule.checks ?? []).flatMap((check) => check(text, files)),
1106
+ main ? reviewBlock(text, rule.block) : [],
1107
+ main && lines > MAIN_FILE_LINES ? `The file has ${lines} lines, more than about ${MAIN_FILE_LINES} a person reads at a gate.` : null,
1108
+ left.length > 0 ? `Placeholder text is left in: ${left.map((one) => `"${one}"`).join(", ")}.` : null
1109
+ ].flat().filter((problem) => problem !== null).map((problem) => ({
1110
+ file: path,
1111
+ problem
1112
+ }));
1113
+ }), ...notes];
1114
+ }
1115
+ function outputCheck(phase, files, instructionsFile, board, repos = [], created = null) {
1116
+ const problems = checkOutputs(phase, files, board, repos, created);
1117
+ if (problems === null) return null;
1118
+ return {
1119
+ problems,
1120
+ note: problems.length > 0 && instructionsFile !== null ? `This phase ran with the project instructions in ${instructionsFile}. They may have changed what it wrote, so look there first.` : null
1121
+ };
1122
+ }
1123
+ function gateFile(phase) {
1124
+ const main = OUTPUT_RULES[phase]?.files[0];
1125
+ return main !== void 0 && (main.block !== void 0 || main.headings?.includes(REVIEW_BLOCK) === true) ? main.file : null;
1126
+ }
1127
+ var OPEN_QUESTIONS = {
1128
+ refine: (text) => refinedQuestions(text),
1129
+ architecture: (text) => refinedQuestions(text, ARCHITECTURE_OPEN),
1130
+ design: screenQuestions
1131
+ };
1132
+ function gateOf(phase, text) {
1133
+ const main = OUTPUT_RULES[phase]?.files[0];
1134
+ const body = gateFile(phase) === null ? null : section(text, main?.block ?? REVIEW_BLOCK);
1135
+ const lines = body === null ? null : body.split("\n").filter((line) => line.trim() !== "");
1136
+ const blocking = (OPEN_QUESTIONS[phase]?.(text) ?? []).filter((one) => one.id !== null && one.blocks === true).filter((one, at, all) => all.findIndex((other) => other.id === one.id) === at);
1137
+ return {
1138
+ lines: lines === null || lines.length === 0 ? null : lines,
1139
+ blocking
1140
+ };
1141
+ }
1142
+ //#endregion
1143
+ //#region ../../packages/core/src/attribution.ts
1144
+ var NAME = String.raw`(?:claude(?:\s+code)?|anthropic|(?:openai\s+)?codex|chatgpt|cursor(?:\s+agent|\.com)|gemini|(?:github\s+)?copilot|nolzu|an?\s+ai(?:\s+(?:assistant|agent|model|tool))?|ai\s+(?:assistant|agent|model|tool))(?![a-z0-9])`;
1145
+ var MADE = new RegExp(String.raw`^(?:(?:this|the)\s+(?:pr|pull request|change|commit|summary|description|text|file|document|patch|code)\s+(?:was|is|has been)\s+)?(?:auto-?)?(?:generated|created|written|made|built|authored|drafted|prepared|produced)\s+(?:with|by|using|via)\s+(?:the\s+)?[[*_\x60]*${NAME}`, "i");
1146
+ var CO_AUTHOR = /^co-authored[-]by:.*(?:claude|anthropic|codex|openai|chatgpt|cursor|gemini|copilot|nolzu)/i;
1147
+ var NAMED = new RegExp(NAME, "i");
1148
+ var ROBOT = "🤖";
1149
+ var OPENING = /^(?:>\s*|<(?:sub|sup|small|em|i|b|strong|p|span)\b[^>]*>|[*_~\x60]+|\u{1F916}|\s+)+/iu;
1150
+ var CLOSING = /(?:<\/[a-z]+>|[*_~\x60]+|\s+)+$/i;
1151
+ var RULE = /^\s*(?:-{3,}|\*{3,}|_{3,})\s*$/;
1152
+ function isAttributionLine(line) {
1153
+ const bare = line.replace(OPENING, "").replace(CLOSING, "");
1154
+ if (bare === "") return false;
1155
+ if (MADE.test(bare) || CO_AUTHOR.test(bare)) return true;
1156
+ return line.replace(/^(?:>\s*|<[a-z]+[^>]*>|[*_~\x60]+|\s+)+/i, "").startsWith(ROBOT) && NAMED.test(bare);
1157
+ }
1158
+ function withoutAttribution(text) {
1159
+ const lines = text.split("\n");
1160
+ if (!lines.some(isAttributionLine)) return text;
1161
+ const kept = [];
1162
+ let dropBlank = false;
1163
+ let endedOnFooter = false;
1164
+ for (const line of lines) {
1165
+ if (isAttributionLine(line)) {
1166
+ if (kept.length > 0 && kept.at(-1)?.trim() === "") kept.pop();
1167
+ else if (kept.length === 0) dropBlank = true;
1168
+ endedOnFooter = true;
1169
+ continue;
1170
+ }
1171
+ if (dropBlank && line.trim() === "") continue;
1172
+ dropBlank = false;
1173
+ if (line.trim() !== "") endedOnFooter = false;
1174
+ kept.push(line);
1175
+ }
1176
+ if (endedOnFooter) {
1177
+ while (kept.length > 0 && kept.at(-1)?.trim() === "") kept.pop();
1178
+ if (RULE.test(kept.at(-1) ?? "")) kept.pop();
1179
+ while (kept.length > 0 && kept.at(-1)?.trim() === "") kept.pop();
1180
+ }
1181
+ const out = kept.join("\n");
1182
+ return text.endsWith("\n") && !out.endsWith("\n") ? `${out}\n` : out;
1183
+ }
1184
+
1185
+ export { isRepoStub as A, learnRepoKey as B, recipeSectionOf as C, tabsFor as D, checkedPaths as E, outputCheck as F, tabAnywhere as G, repoKnowledgeFolder as H, recipeMoved as I, repoMoved as J, KB_MAINTENANCE_KEY as K, RUN_RECIPE_FILE as R, SHARE_FILES as S, recipeHeading as a, repoOfLearnKey as b, SHARED_FOLDER as c, REPO_STUB_LINE as d, withRecipeSection as e, REPO_FILE as f, frontmatterEnd as g, frontmatterDescription as h, isMaintenanceKey as i, frontmatterPaths as j, resolveKnowledgeDir as k, repoKnowledge as l, runRecipe as m, isDeliveryPhase as n, isAskThread as o, planKnowledgeMoves as p, canSend as q, repoKnowledgePath as r, askThreads as s, isFeedbackRef as t, threadsFor as u, resumeCommand as v, withoutAttribution as w, gateFile as x, gateOf as y, phaseStrip as z };
1186
+ //# sourceMappingURL=src2.js-CV8tsClO.js.map