trybeacon 0.1.65 → 0.1.66

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 (381) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.next/BUILD_ID +1 -1
  3. package/.next/app-path-routes-manifest.json +19 -12
  4. package/.next/build-manifest.json +2 -2
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/routes-manifest.json +42 -0
  7. package/.next/server/app/_global-error/page.js +2 -2
  8. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next/server/app/_global-error.html +1 -1
  10. package/.next/server/app/_global-error.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/server/app/_not-found/page.js +2 -2
  18. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/_not-found.html +1 -1
  20. package/.next/server/app/_not-found.rsc +11 -11
  21. package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
  22. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
  24. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  27. package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
  28. package/.next/server/app/api/board-annotations/route.js +1 -1
  29. package/.next/server/app/api/board-layout/route.js +1 -1
  30. package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
  31. package/.next/server/app/api/bug-flags/route.js +1 -1
  32. package/.next/server/app/api/code-graph/position/route.js +1 -1
  33. package/.next/server/app/api/code-graph/route.js +1 -1
  34. package/.next/server/app/api/context/feature/route.js +1 -1
  35. package/.next/server/app/api/context/file/route.js +1 -1
  36. package/.next/server/app/api/context/route.js +1 -1
  37. package/.next/server/app/api/db/arrange/route.js +1 -1
  38. package/.next/server/app/api/db/backfill-access/route.js +1 -1
  39. package/.next/server/app/api/db/position/route.js +1 -1
  40. package/.next/server/app/api/db/prune-planned/route.js +1 -1
  41. package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
  42. package/.next/server/app/api/db/relations/[id]/route.js +1 -1
  43. package/.next/server/app/api/db/tables/[id]/route.js +1 -1
  44. package/.next/server/app/api/draft/approve/route.js +1 -1
  45. package/.next/server/app/api/draft/route.js +1 -1
  46. package/.next/server/app/api/draft/status/route.js +1 -1
  47. package/.next/server/app/api/edges/[id]/route.js +1 -1
  48. package/.next/server/app/api/edges/route.js +1 -1
  49. package/.next/server/app/api/endpoints/[id]/route.js +1 -1
  50. package/.next/server/app/api/entities/route.js +1 -1
  51. package/.next/server/app/api/feedback/[id]/route.js +1 -1
  52. package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
  53. package/.next/server/app/api/feedback/route.js +1 -1
  54. package/.next/server/app/api/flags/route.js +1 -1
  55. package/.next/server/app/api/ingest/route.js +2 -2
  56. package/.next/server/app/api/init/route.js +2 -2
  57. package/.next/server/app/api/lesson/close/route.js +1 -0
  58. package/.next/server/app/api/lesson/close/route.js.nft.json +1 -0
  59. package/.next/server/app/api/lesson/close/route_client-reference-manifest.js +1 -0
  60. package/.next/server/app/api/lesson/presence/route.js +1 -0
  61. package/.next/server/app/api/lesson/presence/route.js.nft.json +1 -0
  62. package/.next/server/app/api/lesson/presence/route_client-reference-manifest.js +1 -0
  63. package/.next/server/app/api/lesson/questions/route.js +1 -0
  64. package/.next/server/app/api/lesson/questions/route.js.nft.json +1 -0
  65. package/.next/server/app/api/lesson/questions/route_client-reference-manifest.js +1 -0
  66. package/.next/server/app/api/lesson/route.js +1 -0
  67. package/.next/server/app/api/lesson/route.js.nft.json +1 -0
  68. package/.next/server/app/api/lesson/route_client-reference-manifest.js +1 -0
  69. package/.next/server/app/api/lesson/save/route.js +1 -0
  70. package/.next/server/app/api/lesson/save/route.js.nft.json +1 -0
  71. package/.next/server/app/api/lesson/save/route_client-reference-manifest.js +1 -0
  72. package/.next/server/app/api/lesson/verdict/route.js +1 -0
  73. package/.next/server/app/api/lesson/verdict/route.js.nft.json +1 -0
  74. package/.next/server/app/api/lesson/verdict/route_client-reference-manifest.js +1 -0
  75. package/.next/server/app/api/map/describe/route.js +2 -2
  76. package/.next/server/app/api/map/files/route.js +1 -1
  77. package/.next/server/app/api/map/finish/route.js +1 -1
  78. package/.next/server/app/api/map/route.js +1 -1
  79. package/.next/server/app/api/map/start/route.js +1 -1
  80. package/.next/server/app/api/map/touch-active/route.js +1 -1
  81. package/.next/server/app/api/mention-search/route.js +1 -1
  82. package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
  83. package/.next/server/app/api/nodes/[id]/route.js +1 -1
  84. package/.next/server/app/api/nodes/positions/route.js +1 -1
  85. package/.next/server/app/api/nodes/route.js +1 -1
  86. package/.next/server/app/api/nodes/subtasks/route.js +1 -1
  87. package/.next/server/app/api/notes/[id]/route.js +1 -1
  88. package/.next/server/app/api/notes/route.js +1 -1
  89. package/.next/server/app/api/open/route.js +1 -1
  90. package/.next/server/app/api/plan/annotations/route.js +3 -3
  91. package/.next/server/app/api/plan/approve/route.js +2 -2
  92. package/.next/server/app/api/plan/history/route.js +1 -1
  93. package/.next/server/app/api/plan/markdown/route.js +1 -1
  94. package/.next/server/app/api/plan/presence/route.js +1 -1
  95. package/.next/server/app/api/plan/route.js +1 -1
  96. package/.next/server/app/api/plan/verdict/route.js +1 -1
  97. package/.next/server/app/api/preferences/route.js +1 -1
  98. package/.next/server/app/api/project-meta/route.js +1 -1
  99. package/.next/server/app/api/reset/route.js +1 -1
  100. package/.next/server/app/api/scope-guard/check/route.js +1 -1
  101. package/.next/server/app/api/share/create/route.js +1 -1
  102. package/.next/server/app/api/share/route.js +1 -1
  103. package/.next/server/app/api/stream/route.js +2 -2
  104. package/.next/server/app/api/tab/nav/route.js +1 -1
  105. package/.next/server/app/api/tab/presence/route.js +1 -1
  106. package/.next/server/app/api/telemetry/route.js +1 -1
  107. package/.next/server/app/api/telemetry/stats/route.js +1 -1
  108. package/.next/server/app/api/version/route.js +1 -1
  109. package/.next/server/app/api/workspace/activate/route.js +1 -1
  110. package/.next/server/app/api/workspace/route.js +1 -1
  111. package/.next/server/app/apple-icon.png/route.js +1 -1
  112. package/.next/server/app/docs/page.js +2 -2
  113. package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  114. package/.next/server/app/docs.html +1 -1
  115. package/.next/server/app/docs.rsc +11 -11
  116. package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
  117. package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  118. package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
  119. package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  120. package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  121. package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  122. package/.next/server/app/feedback/page.js +2 -2
  123. package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
  124. package/.next/server/app/feedback.html +1 -1
  125. package/.next/server/app/feedback.rsc +11 -11
  126. package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
  127. package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
  128. package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
  129. package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
  130. package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
  131. package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
  132. package/.next/server/app/help/page.js +2 -2
  133. package/.next/server/app/help/page_client-reference-manifest.js +1 -1
  134. package/.next/server/app/help.html +1 -1
  135. package/.next/server/app/help.rsc +11 -11
  136. package/.next/server/app/help.segments/_full.segment.rsc +11 -11
  137. package/.next/server/app/help.segments/_head.segment.rsc +1 -1
  138. package/.next/server/app/help.segments/_index.segment.rsc +11 -11
  139. package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
  140. package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
  141. package/.next/server/app/help.segments/help.segment.rsc +1 -1
  142. package/.next/server/app/icon.svg/route.js +1 -1
  143. package/.next/server/app/index.html +1 -1
  144. package/.next/server/app/index.rsc +12 -12
  145. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  146. package/.next/server/app/index.segments/_full.segment.rsc +12 -12
  147. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  148. package/.next/server/app/index.segments/_index.segment.rsc +11 -11
  149. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  150. package/.next/server/app/learn/page.js +6 -0
  151. package/.next/server/app/learn/page.js.nft.json +1 -0
  152. package/.next/server/app/learn/page_client-reference-manifest.js +1 -0
  153. package/.next/server/app/map/page.js +2 -2
  154. package/.next/server/app/map/page.js.nft.json +1 -1
  155. package/.next/server/app/map/page_client-reference-manifest.js +1 -1
  156. package/.next/server/app/page.js +2 -2
  157. package/.next/server/app/page.js.nft.json +1 -1
  158. package/.next/server/app/page_client-reference-manifest.js +1 -1
  159. package/.next/server/app/plan/page.js +2 -2
  160. package/.next/server/app/plan/page.js.nft.json +1 -1
  161. package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
  162. package/.next/server/app/s/[token]/page.js +2 -2
  163. package/.next/server/app/s/[token]/page.js.nft.json +1 -1
  164. package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
  165. package/.next/server/app/settings/page.js +2 -2
  166. package/.next/server/app/settings/page.js.nft.json +1 -1
  167. package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  168. package/.next/server/app-paths-manifest.json +19 -12
  169. package/.next/server/chunks/2050.js +1 -1
  170. package/.next/server/chunks/3584.js +154 -0
  171. package/.next/server/chunks/4307.js +1 -1
  172. package/.next/server/chunks/6024.js +2 -0
  173. package/.next/server/chunks/{2813.js → 7187.js} +1 -1
  174. package/.next/server/chunks/8035.js +1 -0
  175. package/.next/server/chunks/9338.js +8 -8
  176. package/.next/server/middleware-build-manifest.js +1 -1
  177. package/.next/server/pages/404.html +1 -1
  178. package/.next/server/pages/500.html +1 -1
  179. package/.next/server/server-reference-manifest.js +1 -1
  180. package/.next/server/server-reference-manifest.json +1 -1
  181. package/.next/static/P3uXQySdS-m6_bxuiezYe/_buildManifest.js +1 -0
  182. package/.next/static/chunks/1936-7fea5225b5bfcfda.js +1 -0
  183. package/.next/static/chunks/2019-3be80edc82176878.js +1 -0
  184. package/.next/static/chunks/4549-591415d55ca009a3.js +62 -0
  185. package/.next/static/chunks/6638-4e53879181b1df75.js +1 -0
  186. package/.next/static/chunks/{4888-911c0da3c2d785d2.js → 7043-254590cf9891391f.js} +1 -1
  187. package/.next/static/chunks/7643-6c7ff4b9400f68fc.js +1 -0
  188. package/.next/static/chunks/app/_global-error/page-2390ea0e69e5991f.js +1 -0
  189. package/.next/static/chunks/app/api/board-annotations/[id]/route-2390ea0e69e5991f.js +1 -0
  190. package/.next/static/chunks/app/api/board-annotations/route-2390ea0e69e5991f.js +1 -0
  191. package/.next/static/chunks/app/api/board-layout/route-2390ea0e69e5991f.js +1 -0
  192. package/.next/static/chunks/app/api/bug-flags/[id]/route-2390ea0e69e5991f.js +1 -0
  193. package/.next/static/chunks/app/api/bug-flags/route-2390ea0e69e5991f.js +1 -0
  194. package/.next/static/chunks/app/api/code-graph/position/route-2390ea0e69e5991f.js +1 -0
  195. package/.next/static/chunks/app/api/code-graph/route-2390ea0e69e5991f.js +1 -0
  196. package/.next/static/chunks/app/api/context/feature/route-2390ea0e69e5991f.js +1 -0
  197. package/.next/static/chunks/app/api/context/file/route-2390ea0e69e5991f.js +1 -0
  198. package/.next/static/chunks/app/api/context/route-2390ea0e69e5991f.js +1 -0
  199. package/.next/static/chunks/app/api/db/arrange/route-2390ea0e69e5991f.js +1 -0
  200. package/.next/static/chunks/app/api/db/backfill-access/route-2390ea0e69e5991f.js +1 -0
  201. package/.next/static/chunks/app/api/db/position/route-2390ea0e69e5991f.js +1 -0
  202. package/.next/static/chunks/app/api/db/prune-planned/route-2390ea0e69e5991f.js +1 -0
  203. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-2390ea0e69e5991f.js +1 -0
  204. package/.next/static/chunks/app/api/db/relations/[id]/route-2390ea0e69e5991f.js +1 -0
  205. package/.next/static/chunks/app/api/db/tables/[id]/route-2390ea0e69e5991f.js +1 -0
  206. package/.next/static/chunks/app/api/draft/approve/route-2390ea0e69e5991f.js +1 -0
  207. package/.next/static/chunks/app/api/draft/route-2390ea0e69e5991f.js +1 -0
  208. package/.next/static/chunks/app/api/draft/status/route-2390ea0e69e5991f.js +1 -0
  209. package/.next/static/chunks/app/api/edges/[id]/route-2390ea0e69e5991f.js +1 -0
  210. package/.next/static/chunks/app/api/edges/route-2390ea0e69e5991f.js +1 -0
  211. package/.next/static/chunks/app/api/endpoints/[id]/route-2390ea0e69e5991f.js +1 -0
  212. package/.next/static/chunks/app/api/entities/route-2390ea0e69e5991f.js +1 -0
  213. package/.next/static/chunks/app/api/feedback/[id]/route-2390ea0e69e5991f.js +1 -0
  214. package/.next/static/chunks/app/api/feedback/[id]/vote/route-2390ea0e69e5991f.js +1 -0
  215. package/.next/static/chunks/app/api/feedback/route-2390ea0e69e5991f.js +1 -0
  216. package/.next/static/chunks/app/api/flags/route-2390ea0e69e5991f.js +1 -0
  217. package/.next/static/chunks/app/api/ingest/route-2390ea0e69e5991f.js +1 -0
  218. package/.next/static/chunks/app/api/init/route-2390ea0e69e5991f.js +1 -0
  219. package/.next/static/chunks/app/api/lesson/close/route-2390ea0e69e5991f.js +1 -0
  220. package/.next/static/chunks/app/api/lesson/presence/route-2390ea0e69e5991f.js +1 -0
  221. package/.next/static/chunks/app/api/lesson/questions/route-2390ea0e69e5991f.js +1 -0
  222. package/.next/static/chunks/app/api/lesson/route-2390ea0e69e5991f.js +1 -0
  223. package/.next/static/chunks/app/api/lesson/save/route-2390ea0e69e5991f.js +1 -0
  224. package/.next/static/chunks/app/api/lesson/verdict/route-2390ea0e69e5991f.js +1 -0
  225. package/.next/static/chunks/app/api/map/describe/route-2390ea0e69e5991f.js +1 -0
  226. package/.next/static/chunks/app/api/map/files/route-2390ea0e69e5991f.js +1 -0
  227. package/.next/static/chunks/app/api/map/finish/route-2390ea0e69e5991f.js +1 -0
  228. package/.next/static/chunks/app/api/map/route-2390ea0e69e5991f.js +1 -0
  229. package/.next/static/chunks/app/api/map/start/route-2390ea0e69e5991f.js +1 -0
  230. package/.next/static/chunks/app/api/map/touch-active/route-2390ea0e69e5991f.js +1 -0
  231. package/.next/static/chunks/app/api/mention-search/route-2390ea0e69e5991f.js +1 -0
  232. package/.next/static/chunks/app/api/nodes/[id]/position/route-2390ea0e69e5991f.js +1 -0
  233. package/.next/static/chunks/app/api/nodes/[id]/route-2390ea0e69e5991f.js +1 -0
  234. package/.next/static/chunks/app/api/nodes/positions/route-2390ea0e69e5991f.js +1 -0
  235. package/.next/static/chunks/app/api/nodes/route-2390ea0e69e5991f.js +1 -0
  236. package/.next/static/chunks/app/api/nodes/subtasks/route-2390ea0e69e5991f.js +1 -0
  237. package/.next/static/chunks/app/api/notes/[id]/route-2390ea0e69e5991f.js +1 -0
  238. package/.next/static/chunks/app/api/notes/route-2390ea0e69e5991f.js +1 -0
  239. package/.next/static/chunks/app/api/open/route-2390ea0e69e5991f.js +1 -0
  240. package/.next/static/chunks/app/api/plan/annotations/route-2390ea0e69e5991f.js +1 -0
  241. package/.next/static/chunks/app/api/plan/approve/route-2390ea0e69e5991f.js +1 -0
  242. package/.next/static/chunks/app/api/plan/history/route-2390ea0e69e5991f.js +1 -0
  243. package/.next/static/chunks/app/api/plan/markdown/route-2390ea0e69e5991f.js +1 -0
  244. package/.next/static/chunks/app/api/plan/presence/route-2390ea0e69e5991f.js +1 -0
  245. package/.next/static/chunks/app/api/plan/route-2390ea0e69e5991f.js +1 -0
  246. package/.next/static/chunks/app/api/plan/verdict/route-2390ea0e69e5991f.js +1 -0
  247. package/.next/static/chunks/app/api/preferences/route-2390ea0e69e5991f.js +1 -0
  248. package/.next/static/chunks/app/api/project-meta/route-2390ea0e69e5991f.js +1 -0
  249. package/.next/static/chunks/app/api/reset/route-2390ea0e69e5991f.js +1 -0
  250. package/.next/static/chunks/app/api/scope-guard/check/route-2390ea0e69e5991f.js +1 -0
  251. package/.next/static/chunks/app/api/share/create/route-2390ea0e69e5991f.js +1 -0
  252. package/.next/static/chunks/app/api/share/route-2390ea0e69e5991f.js +1 -0
  253. package/.next/static/chunks/app/api/stream/route-2390ea0e69e5991f.js +1 -0
  254. package/.next/static/chunks/app/api/tab/nav/route-2390ea0e69e5991f.js +1 -0
  255. package/.next/static/chunks/app/api/tab/presence/route-2390ea0e69e5991f.js +1 -0
  256. package/.next/static/chunks/app/api/telemetry/route-2390ea0e69e5991f.js +1 -0
  257. package/.next/static/chunks/app/api/telemetry/stats/route-2390ea0e69e5991f.js +1 -0
  258. package/.next/static/chunks/app/api/version/route-2390ea0e69e5991f.js +1 -0
  259. package/.next/static/chunks/app/api/workspace/activate/route-2390ea0e69e5991f.js +1 -0
  260. package/.next/static/chunks/app/api/workspace/route-2390ea0e69e5991f.js +1 -0
  261. package/.next/static/chunks/app/layout-0c993f55d3a798f4.js +1 -0
  262. package/.next/static/chunks/app/learn/page-797d74e02b98fa88.js +5 -0
  263. package/.next/static/chunks/app/map/page-634b6d5d98e921b3.js +1 -0
  264. package/.next/static/chunks/app/page-84dc684d45002cfb.js +1 -0
  265. package/.next/static/chunks/app/plan/page-df829b2054c40611.js +1 -0
  266. package/.next/static/chunks/app/s/[token]/page-f97dec75856a7952.js +1 -0
  267. package/.next/static/chunks/app/settings/page-59d90685cd17fc1f.js +1 -0
  268. package/.next/static/chunks/next/dist/client/components/builtin/app-error-2390ea0e69e5991f.js +1 -0
  269. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2390ea0e69e5991f.js +1 -0
  270. package/.next/static/chunks/next/dist/client/components/builtin/not-found-2390ea0e69e5991f.js +1 -0
  271. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2390ea0e69e5991f.js +1 -0
  272. package/.next/static/css/b3d3212da726bbfb.css +1 -0
  273. package/.next/trace +43 -42
  274. package/.next/trace-build +1 -1
  275. package/.next/types/app/api/lesson/close/route.ts +351 -0
  276. package/.next/types/app/api/lesson/presence/route.ts +351 -0
  277. package/.next/types/app/api/lesson/questions/route.ts +351 -0
  278. package/.next/types/app/api/lesson/route.ts +351 -0
  279. package/.next/types/app/api/lesson/save/route.ts +351 -0
  280. package/.next/types/app/api/lesson/verdict/route.ts +351 -0
  281. package/.next/types/app/learn/page.ts +87 -0
  282. package/.next/types/routes.d.ts +9 -2
  283. package/.next/types/validator.ts +63 -0
  284. package/dist/bin/doctor.js +88 -22
  285. package/dist/bin/hook.js +87 -21
  286. package/dist/bin/mcp.js +103 -35
  287. package/dist/bin/plan.js +88 -22
  288. package/dist/bin/uninstall.js +91 -25
  289. package/dist/lib/assets.js +77 -14
  290. package/dist/lib/codex-install.js +88 -22
  291. package/dist/lib/global-install.js +89 -23
  292. package/package.json +1 -1
  293. package/plugin/skills/beacon-explain/SKILL.md +63 -0
  294. package/.next/server/chunks/2994.js +0 -2
  295. package/.next/server/chunks/3284.js +0 -154
  296. package/.next/server/chunks/5719.js +0 -1
  297. package/.next/static/chunks/4491-0cd79f4195f4b111.js +0 -1
  298. package/.next/static/chunks/5957-83f611fcd5a08b45.js +0 -1
  299. package/.next/static/chunks/766-242213d211df0afd.js +0 -1
  300. package/.next/static/chunks/8915-fa61a860c63a7c85.js +0 -62
  301. package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
  302. package/.next/static/chunks/app/_global-error/page-548a84d85e061550.js +0 -1
  303. package/.next/static/chunks/app/api/board-annotations/[id]/route-548a84d85e061550.js +0 -1
  304. package/.next/static/chunks/app/api/board-annotations/route-548a84d85e061550.js +0 -1
  305. package/.next/static/chunks/app/api/board-layout/route-548a84d85e061550.js +0 -1
  306. package/.next/static/chunks/app/api/bug-flags/[id]/route-548a84d85e061550.js +0 -1
  307. package/.next/static/chunks/app/api/bug-flags/route-548a84d85e061550.js +0 -1
  308. package/.next/static/chunks/app/api/code-graph/position/route-548a84d85e061550.js +0 -1
  309. package/.next/static/chunks/app/api/code-graph/route-548a84d85e061550.js +0 -1
  310. package/.next/static/chunks/app/api/context/feature/route-548a84d85e061550.js +0 -1
  311. package/.next/static/chunks/app/api/context/file/route-548a84d85e061550.js +0 -1
  312. package/.next/static/chunks/app/api/context/route-548a84d85e061550.js +0 -1
  313. package/.next/static/chunks/app/api/db/arrange/route-548a84d85e061550.js +0 -1
  314. package/.next/static/chunks/app/api/db/backfill-access/route-548a84d85e061550.js +0 -1
  315. package/.next/static/chunks/app/api/db/position/route-548a84d85e061550.js +0 -1
  316. package/.next/static/chunks/app/api/db/prune-planned/route-548a84d85e061550.js +0 -1
  317. package/.next/static/chunks/app/api/db/reconcile-endpoints/route-548a84d85e061550.js +0 -1
  318. package/.next/static/chunks/app/api/db/relations/[id]/route-548a84d85e061550.js +0 -1
  319. package/.next/static/chunks/app/api/db/tables/[id]/route-548a84d85e061550.js +0 -1
  320. package/.next/static/chunks/app/api/draft/approve/route-548a84d85e061550.js +0 -1
  321. package/.next/static/chunks/app/api/draft/route-548a84d85e061550.js +0 -1
  322. package/.next/static/chunks/app/api/draft/status/route-548a84d85e061550.js +0 -1
  323. package/.next/static/chunks/app/api/edges/[id]/route-548a84d85e061550.js +0 -1
  324. package/.next/static/chunks/app/api/edges/route-548a84d85e061550.js +0 -1
  325. package/.next/static/chunks/app/api/endpoints/[id]/route-548a84d85e061550.js +0 -1
  326. package/.next/static/chunks/app/api/entities/route-548a84d85e061550.js +0 -1
  327. package/.next/static/chunks/app/api/feedback/[id]/route-548a84d85e061550.js +0 -1
  328. package/.next/static/chunks/app/api/feedback/[id]/vote/route-548a84d85e061550.js +0 -1
  329. package/.next/static/chunks/app/api/feedback/route-548a84d85e061550.js +0 -1
  330. package/.next/static/chunks/app/api/flags/route-548a84d85e061550.js +0 -1
  331. package/.next/static/chunks/app/api/ingest/route-548a84d85e061550.js +0 -1
  332. package/.next/static/chunks/app/api/init/route-548a84d85e061550.js +0 -1
  333. package/.next/static/chunks/app/api/map/describe/route-548a84d85e061550.js +0 -1
  334. package/.next/static/chunks/app/api/map/files/route-548a84d85e061550.js +0 -1
  335. package/.next/static/chunks/app/api/map/finish/route-548a84d85e061550.js +0 -1
  336. package/.next/static/chunks/app/api/map/route-548a84d85e061550.js +0 -1
  337. package/.next/static/chunks/app/api/map/start/route-548a84d85e061550.js +0 -1
  338. package/.next/static/chunks/app/api/map/touch-active/route-548a84d85e061550.js +0 -1
  339. package/.next/static/chunks/app/api/mention-search/route-548a84d85e061550.js +0 -1
  340. package/.next/static/chunks/app/api/nodes/[id]/position/route-548a84d85e061550.js +0 -1
  341. package/.next/static/chunks/app/api/nodes/[id]/route-548a84d85e061550.js +0 -1
  342. package/.next/static/chunks/app/api/nodes/positions/route-548a84d85e061550.js +0 -1
  343. package/.next/static/chunks/app/api/nodes/route-548a84d85e061550.js +0 -1
  344. package/.next/static/chunks/app/api/nodes/subtasks/route-548a84d85e061550.js +0 -1
  345. package/.next/static/chunks/app/api/notes/[id]/route-548a84d85e061550.js +0 -1
  346. package/.next/static/chunks/app/api/notes/route-548a84d85e061550.js +0 -1
  347. package/.next/static/chunks/app/api/open/route-548a84d85e061550.js +0 -1
  348. package/.next/static/chunks/app/api/plan/annotations/route-548a84d85e061550.js +0 -1
  349. package/.next/static/chunks/app/api/plan/approve/route-548a84d85e061550.js +0 -1
  350. package/.next/static/chunks/app/api/plan/history/route-548a84d85e061550.js +0 -1
  351. package/.next/static/chunks/app/api/plan/markdown/route-548a84d85e061550.js +0 -1
  352. package/.next/static/chunks/app/api/plan/presence/route-548a84d85e061550.js +0 -1
  353. package/.next/static/chunks/app/api/plan/route-548a84d85e061550.js +0 -1
  354. package/.next/static/chunks/app/api/plan/verdict/route-548a84d85e061550.js +0 -1
  355. package/.next/static/chunks/app/api/preferences/route-548a84d85e061550.js +0 -1
  356. package/.next/static/chunks/app/api/project-meta/route-548a84d85e061550.js +0 -1
  357. package/.next/static/chunks/app/api/reset/route-548a84d85e061550.js +0 -1
  358. package/.next/static/chunks/app/api/scope-guard/check/route-548a84d85e061550.js +0 -1
  359. package/.next/static/chunks/app/api/share/create/route-548a84d85e061550.js +0 -1
  360. package/.next/static/chunks/app/api/share/route-548a84d85e061550.js +0 -1
  361. package/.next/static/chunks/app/api/stream/route-548a84d85e061550.js +0 -1
  362. package/.next/static/chunks/app/api/tab/nav/route-548a84d85e061550.js +0 -1
  363. package/.next/static/chunks/app/api/tab/presence/route-548a84d85e061550.js +0 -1
  364. package/.next/static/chunks/app/api/telemetry/route-548a84d85e061550.js +0 -1
  365. package/.next/static/chunks/app/api/telemetry/stats/route-548a84d85e061550.js +0 -1
  366. package/.next/static/chunks/app/api/version/route-548a84d85e061550.js +0 -1
  367. package/.next/static/chunks/app/api/workspace/activate/route-548a84d85e061550.js +0 -1
  368. package/.next/static/chunks/app/api/workspace/route-548a84d85e061550.js +0 -1
  369. package/.next/static/chunks/app/layout-3115f8503ff00902.js +0 -1
  370. package/.next/static/chunks/app/map/page-66ec4b62a4153de8.js +0 -1
  371. package/.next/static/chunks/app/page-d08947a671077569.js +0 -1
  372. package/.next/static/chunks/app/plan/page-008565f9049d55c9.js +0 -1
  373. package/.next/static/chunks/app/s/[token]/page-1c10b26b300faffc.js +0 -1
  374. package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +0 -1
  375. package/.next/static/chunks/next/dist/client/components/builtin/app-error-548a84d85e061550.js +0 -1
  376. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-548a84d85e061550.js +0 -1
  377. package/.next/static/chunks/next/dist/client/components/builtin/not-found-548a84d85e061550.js +0 -1
  378. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-548a84d85e061550.js +0 -1
  379. package/.next/static/css/f871d81e526502c1.css +0 -1
  380. package/.next/static/fwNWsob4GcVUD5_xV0f1h/_buildManifest.js +0 -1
  381. /package/.next/static/{fwNWsob4GcVUD5_xV0f1h → P3uXQySdS-m6_bxuiezYe}/_ssgManifest.js +0 -0
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- var uq=Object.defineProperty;var wq=(q)=>q;function bq(q,z){this[q]=wq.bind(null,z)}var d=(q,z)=>{for(var J in z)uq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:bq.bind(z,J)})};var x=(q,z)=>()=>(q&&(z=q(q=0)),z);var dq=1500,cq=480000,tq=1800000,g=3600000,nq=3000;var c=()=>{};var r={};d(r,{removeRepoAssets:()=>Iq,installRefreshSkill:()=>gq,installPlanSkill:()=>Kq,installInitSkill:()=>jq,installCodexRepoSkills:()=>Nq,ensureWorkflowDoc:()=>Mq,ensureMcp:()=>Rq,auditRepo:()=>fq,REFRESH_SKILL:()=>O,PLAN_SKILL:()=>n,INIT_SKILL:()=>L});import{existsSync as X,mkdirSync as C,readFileSync as B,rmSync as K,writeFileSync as W}from"fs";import{join as $}from"path";function jq(q){let z=$(q,".claude","skills","beacon-init");C(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,L),J}function gq(q){let z=$(q,".claude","skills","beacon-refresh");C(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,O),J}function Kq(q){let z=$(q,".claude","skills","beacon-plan");C(z,{recursive:!0});let J=$(z,"SKILL.md");return W(J,n),J}function Nq(q){let z=[];for(let J of Cq){let Q=$(q,".agents","skills",J.name);C(Q,{recursive:!0});let V=$(Q,"SKILL.md");W(V,J.body()),z.push(V)}return z}function Mq(q){let z=$(q,"AGENTS.md"),J="";try{J=B(z,"utf8")}catch{}let Q=new RegExp(`${N}[\\s\\S]*?${y}`);J=Q.test(J)?J.replace(Q,t):`${J.trim()}
2
+ var bq=Object.defineProperty;var wq=(q)=>q;function gq(q,z){this[q]=wq.bind(null,z)}var d=(q,z)=>{for(var J in z)bq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:gq.bind(z,J)})};var x=(q,z)=>()=>(q&&(z=q(q=0)),z);var tq=1500,nq=480000,rq=1800000,C=3600000,oq=3000;var c=()=>{};var o={};d(o,{removeRepoAssets:()=>Aq,installRefreshSkill:()=>Cq,installPlanSkill:()=>Kq,installInitSkill:()=>jq,installExplainSkill:()=>Nq,installCodexRepoSkills:()=>Rq,ensureWorkflowDoc:()=>fq,ensureMcp:()=>Dq,auditRepo:()=>Tq,REFRESH_SKILL:()=>L,PLAN_SKILL:()=>n,INIT_SKILL:()=>O,EXPLAIN_SKILL:()=>r});import{existsSync as G,mkdirSync as u,readFileSync as B,rmSync as K,writeFileSync as H}from"fs";import{join as Z}from"path";function jq(q){let z=Z(q,".claude","skills","beacon-init");u(z,{recursive:!0});let J=Z(z,"SKILL.md");return H(J,O),J}function Cq(q){let z=Z(q,".claude","skills","beacon-refresh");u(z,{recursive:!0});let J=Z(z,"SKILL.md");return H(J,L),J}function Kq(q){let z=Z(q,".claude","skills","beacon-plan");u(z,{recursive:!0});let J=Z(z,"SKILL.md");return H(J,n),J}function Nq(q){let z=Z(q,".claude","skills","beacon-explain");u(z,{recursive:!0});let J=Z(z,"SKILL.md");return H(J,r),J}function Rq(q){let z=[];for(let J of Mq){let Q=Z(q,".agents","skills",J.name);u(Q,{recursive:!0});let V=Z(Q,"SKILL.md");H(V,J.body()),z.push(V)}return z}function fq(q){let z=Z(q,"AGENTS.md"),J="";try{J=B(z,"utf8")}catch{}let Q=new RegExp(`${N}[\\s\\S]*?${y}`);J=Q.test(J)?J.replace(Q,t):`${J.trim()}
3
3
 
4
4
  ${t}
5
- `.trimStart(),W(z,J.endsWith(`
5
+ `.trimStart(),H(z,J.endsWith(`
6
6
  `)?J:`${J}
7
- `);let V=$(q,"CLAUDE.md"),Y="";try{Y=B(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))W(V,`${Y?`${Y.trim()}
7
+ `);let V=Z(q,"CLAUDE.md"),Y="";try{Y=B(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))H(V,`${Y?`${Y.trim()}
8
8
 
9
9
  `:""}@AGENTS.md
10
- `)}function Rq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(B(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<g)return Q.timeout=g,W(z,JSON.stringify(J,null,2)+`
11
- `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:g},W(z,JSON.stringify(J,null,2)+`
12
- `),{path:z,added:!0,updated:!1}}function fq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(B(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=B($(q,"AGENTS.md"),"utf8").includes(N)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(B($(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":X($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":X($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":X($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":X($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Iq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let P=$(q,".claude","skills",Z);if(X(P))K(P,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let P=$(q,".agents","skills",Z);if(X(P))K(P,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(B(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)K(Q,{force:!0});else W(Q,JSON.stringify(Z,null,2)+`
13
- `)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=B(Y,"utf8"),P=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);if(P.test(Z)){let E=Z.replace(P,`
10
+ `)}function Dq(q){let z=Z(q,".mcp.json"),J={};try{J=JSON.parse(B(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<C)return Q.timeout=C,H(z,JSON.stringify(J,null,2)+`
11
+ `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},H(z,JSON.stringify(J,null,2)+`
12
+ `),{path:z,added:!0,updated:!1}}function Tq(q){let z=Z(q,".mcp.json"),J=!1;try{J=!!JSON.parse(B(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=B(Z(q,"AGENTS.md"),"utf8").includes(N)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(B(Z(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":G(Z(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":G(Z(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":G(Z(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function Aq(q){let z=[];for(let $ of["beacon-init","beacon-refresh","beacon-db-design"]){let U=Z(q,".claude","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),z.push($)}for(let $ of["beacon-init","beacon-refresh"]){let U=Z(q,".agents","skills",$);if(G(U))K(U,{recursive:!0,force:!0}),z.push(`codex:${$}`)}let J=!1,Q=Z(q,".mcp.json");try{let $=JSON.parse(B(Q,"utf8"));if($.mcpServers?.beacon){if(delete $.mcpServers.beacon,J=!0,$.mcpServers&&Object.keys($.mcpServers).length===0)delete $.mcpServers;if(Object.keys($).length===0)K(Q,{force:!0});else H(Q,JSON.stringify($,null,2)+`
13
+ `)}}catch{}let V=!1,Y=Z(q,"AGENTS.md");try{let $=B(Y,"utf8"),U=new RegExp(`\\n?${N}[\\s\\S]*?${y}\\n?`);if(U.test($)){let E=$.replace(U,`
14
14
  `).replace(/\n{3,}/g,`
15
15
 
16
- `).trimStart();W(Y,E.endsWith(`
16
+ `).trimStart();H(Y,E.endsWith(`
17
17
  `)?E:`${E}
18
- `),V=!0}}catch{}let U=!1,H=$(q,"CLAUDE.md");try{let Z=B(H,"utf8"),P=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(P!==Z){if(!P.trim())K(H,{force:!0});else W(H,P);U=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:U}}var L=`---
18
+ `),V=!0}}catch{}let W=!1,P=Z(q,"CLAUDE.md");try{let $=B(P,"utf8"),U=$.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(U!==$){if(!U.trim())K(P,{force:!0});else H(P,U);W=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:W}}var O=`---
19
19
  name: beacon-init
20
20
  description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
21
21
  ---
@@ -62,7 +62,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
62
62
  That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
63
63
 
64
64
  After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
65
- `,O=`---
65
+ `,L=`---
66
66
  name: beacon-refresh
67
67
  description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
68
68
  ---
@@ -157,7 +157,70 @@ If it returns feedback, revise and call it again.
157
157
  If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
158
158
  with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
159
159
  run \`beacon\` in this repo once.
160
- `,Cq,N="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",t;var o=x(()=>{c();Cq=[{name:"beacon-init",body:()=>L},{name:"beacon-refresh",body:()=>O}];t=`${N}
160
+ `,r=`---
161
+ name: beacon-explain
162
+ description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
163
+ ---
164
+
165
+ # Explain the codebase visually (/beacon-explain)
166
+
167
+ When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
168
+ terminal and don't open a plan \u2014 plans are for building. Author an interactive **Lesson** and push it
169
+ with the \`beacon_explain\` MCP tool: a curated concept map (boxes + labeled arrows) beside a
170
+ plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
171
+ to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
172
+ until they Save the lesson. There is NO approve/discard \u2014 understanding, not building.
173
+
174
+ ## 1. Load context first \u2014 don't explain blind
175
+
176
+ Before writing, call \`beacon_context_for_feature\` / \`beacon_map\` and read the relevant files so the
177
+ lesson is accurate. Name real files, functions, tables, and endpoints \u2014 never vague descriptions.
178
+
179
+ ## 2. Write like a great teacher \u2014 the house style (this is the whole point)
180
+
181
+ Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
182
+
183
+ - **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
184
+ wall of nouns.
185
+ - **Problem-first.** Open each component with the PROBLEM it solves \u2014 a concrete human scenario, the
186
+ tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
187
+ confirms an order it must also land in the ERP \u2014 but the ERP can be slow or down, and you do *not*
188
+ want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
189
+ happens in the background, with retries.")
190
+ - **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
191
+ action and names the real identifier in backticks \u2014 file (\`order-placed-sync-erp.ts\`), function
192
+ (\`syncOrderToErpWorkflow\`), event (\`order.placed\`), column (\`erp_sync_record\`), value
193
+ (\`requires_human_action\`). Enumerate the cases (success / retryable / rejected / \u2026) with the plain
194
+ meaning of each.
195
+ - **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
196
+ reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
197
+ explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
198
+ failure could cause a duplicate order later").
199
+ - **A worked example with real data.** Show the mechanism running on one concrete case \u2014 ideally a
200
+ small markdown table of state transitions \u2014 and land the insight ("that's 8 rows for one order, and
201
+ that's the point").
202
+ - **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
203
+ \`inline code\` around every real identifier \u2014 on /learn, backticked real file paths become clickable
204
+ to open in the user's editor.
205
+
206
+ ## 3. Map the prose to the board
207
+
208
+ Every component/flow you NAME in the narrative becomes a \`node\` (title + a one-line \`summary\` for its
209
+ face + a fuller \`detail\` + the real \`files\` it maps to). Every "A does X to B" becomes an \`edge\` with
210
+ a relationship VERB \u2014 one of: imports, calls, persists to, reads from, writes to, routes to, depends
211
+ on, emits, returns, contains, extends \u2014 never a bare line. Keep the resting set small (~4\u20137 nodes);
212
+ push depth into \`detail\`, not the node face. Supply \`steps\` for the guided walkthrough: the first step
213
+ is the overview (empty \`focusIds\`), then teach one node (or a few) per step in order, each with its
214
+ \`focusIds\`.
215
+
216
+ ## 4. Answer in the loop \u2014 don't stop after one round
217
+
218
+ \`beacon_explain\` returns the user's questions, each tagged \`[q:ID]\`. Answer EACH by calling
219
+ \`beacon_explain\` AGAIN with the SAME lesson plus \`answers: [{ questionId, answer }]\` (keyed by the id).
220
+ Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
221
+ the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
222
+ the lesson.
223
+ `,Mq,N="<!-- beacon:workflow:start -->",y="<!-- beacon:workflow:end -->",t;var i=x(()=>{c();Mq=[{name:"beacon-init",body:()=>O},{name:"beacon-refresh",body:()=>L}];t=`${N}
161
224
  ## Beacon \u2014 feature workflow
162
225
 
163
226
  This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
@@ -229,18 +292,18 @@ Register them all in that single batched call. If a plan added five features, th
229
292
  If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
230
293
 
231
294
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
232
- ${y}`});import{existsSync as M,mkdirSync as h,readdirSync as Aq,readFileSync as u,rmSync as Dq,writeFileSync as R}from"fs";import{dirname as i,join as v}from"path";function Jz(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Tq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=v(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let U=v(Y,".claude-plugin","plugin.json");try{if(M(U)&&JSON.parse(u(U,"utf8")).name==="beacon")return Y}catch{}try{for(let H of Aq(Y,{withFileTypes:!0}))if(H.isDirectory())V.push(v(Y,H.name))}catch{}}J=V}return null}function Qz(q){return Tq(q)!==null}function _(q){try{return JSON.parse(u(q,"utf8"))}catch{return{}}}function qq(q,z){h(i(q),{recursive:!0}),R(q,JSON.stringify(z,null,2)+`
233
- `)}function zq(q,z){let J=_(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((U)=>U.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),qq(q,J),!0}function Jq(q,z){return(_(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function Qq(q,z){let J=_(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((U)=>{let H=U.hooks?.length??0,Z=(U.hooks??[]).filter((P)=>P.command!==z.command);if(Z.length!==H)V=!0;return{...U,hooks:Z}}).filter((U)=>(U.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return qq(q,J),!0}function Vq(q,z,J,Q){let V=`${z}
295
+ ${y}`});import{existsSync as M,mkdirSync as h,readdirSync as Iq,readFileSync as b,rmSync as kq,writeFileSync as R}from"fs";import{dirname as e,join as v}from"path";function Vz(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Fq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=v(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let W=v(Y,".claude-plugin","plugin.json");try{if(M(W)&&JSON.parse(b(W,"utf8")).name==="beacon")return Y}catch{}try{for(let P of Iq(Y,{withFileTypes:!0}))if(P.isDirectory())V.push(v(Y,P.name))}catch{}}J=V}return null}function Yz(q){return Fq(q)!==null}function _(q){try{return JSON.parse(b(q,"utf8"))}catch{return{}}}function zq(q,z){h(e(q),{recursive:!0}),R(q,JSON.stringify(z,null,2)+`
296
+ `)}function Jq(q,z){let J=_(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((W)=>W.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),zq(q,J),!0}function Qq(q,z){return(_(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function Vq(q,z){let J=_(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((W)=>{let P=W.hooks?.length??0,$=(W.hooks??[]).filter((U)=>U.command!==z.command);if($.length!==P)V=!0;return{...W,hooks:$}}).filter((W)=>(W.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return zq(q,J),!0}function Yq(q,z,J,Q){let V=`${z}
234
297
  ${Q.trim()}
235
- ${J}`,Y="";try{Y=u(q,"utf8")}catch{}let U=new RegExp(`${z}[\\s\\S]*?${J}`);Y=U.test(Y)?Y.replace(U,V):Y.trim()?`${Y.trim()}
298
+ ${J}`,Y="";try{Y=b(q,"utf8")}catch{}let W=new RegExp(`${z}[\\s\\S]*?${J}`);Y=W.test(Y)?Y.replace(W,V):Y.trim()?`${Y.trim()}
236
299
 
237
300
  ${V}
238
301
  `:`${V}
239
- `,h(i(q),{recursive:!0}),R(q,Y.endsWith(`
302
+ `,h(e(q),{recursive:!0}),R(q,Y.endsWith(`
240
303
  `)?Y:`${Y}
241
- `)}function m(q,z){try{return u(q,"utf8").includes(z)}catch{return!1}}function Yq(q,z,J){let Q="";try{Q=u(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
304
+ `)}function m(q,z){try{return b(q,"utf8").includes(z)}catch{return!1}}function Zq(q,z,J){let Q="";try{Q=b(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
242
305
 
243
- `).trimStart();return R(q,Y),!0}function Zq(q,z,J){let Q=v(q,z);h(Q,{recursive:!0});let V=v(Q,"SKILL.md");return R(V,J),V}function S(q,z){return M(v(q,z,"SKILL.md"))}function $q(q,z){let J=v(q,z);if(!M(J))return!1;return Dq(J,{recursive:!0,force:!0}),!0}var f,e=`## Beacon (visual planning panel)
306
+ `).trimStart();return R(q,Y),!0}function $q(q,z,J){let Q=v(q,z);h(Q,{recursive:!0});let V=v(Q,"SKILL.md");return R(V,J),V}function S(q,z){return M(v(q,z,"SKILL.md"))}function Uq(q,z){let J=v(q,z);if(!M(J))return!1;return kq(J,{recursive:!0,force:!0}),!0}var f,qq=`## Beacon (visual planning panel)
244
307
 
245
308
  This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
246
309
  agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
@@ -254,6 +317,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
254
317
  - User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
255
318
  the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
256
319
  preserving anything the user added by hand.
320
+ - User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
321
+ \`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
322
+ plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
257
323
  - Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
258
324
 
259
325
  **The plan feedback loop**
@@ -261,17 +327,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
261
327
  Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
262
328
  on the /map and /db boards (added features, attached subtasks, edited columns, new
263
329
  endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
264
- verbatim. Do NOT implement until the tool returns approval.`;var Uq=x(()=>{f=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as kq,renameSync as Fq,rmSync as Eq,writeFileSync as Lq}from"fs";import{dirname as Oq}from"path";function I(q,z){kq(Oq(q),{recursive:!0});let J=`${q}.tmp`;try{Lq(J,z),Fq(J,q)}catch(Q){throw Eq(J,{force:!0}),Q}}function $z(q,z,J=!1){I(q,JSON.stringify(z,null,J?2:void 0))}var Pq=()=>{};var aq={};d(aq,{setupCodexAssets:()=>mq,removeCodexMcp:()=>xq,removeCodexArtifacts:()=>pq,hasCodexMcp:()=>s,ensureCodexMcp:()=>Gq,codexMcpProblem:()=>_q,codexDetected:()=>Bq,auditCodex:()=>Sq,CODEX_HOOKS:()=>F});import{readFileSync as k}from"fs";import{homedir as yq}from"os";import{join as j}from"path";function Wq(){return process.env.HOME||process.env.USERPROFILE||yq()}function Bq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(p===void 0)p=Bun.which("codex")!==null;return p}function b(q){try{return Bun.TOML.parse(q)}catch{return null}}function s(){try{return Boolean(b(k(G(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function _q(){let q="";try{q=k(G(),"utf8")}catch{return null}let z=b(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${w}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${w}`;return null}function Gq(){let q="",z=!1;try{q=k(G(),"utf8"),z=!0}catch{}if(z){let Y=b(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${w}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${w}`}}let J=!q?"":q.endsWith(`
330
+ verbatim. Do NOT implement until the tool returns approval.`;var Wq=x(()=>{f=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as Eq,renameSync as Oq,rmSync as Lq,writeFileSync as yq}from"fs";import{dirname as hq}from"path";function D(q,z){Eq(hq(q),{recursive:!0});let J=`${q}.tmp`;try{yq(J,z),Oq(J,q)}catch(Q){throw Lq(J,{force:!0}),Q}}function Wz(q,z,J=!1){D(q,JSON.stringify(z,null,J?2:void 0))}var Hq=()=>{};var sq={};d(sq,{setupCodexAssets:()=>pq,removeCodexMcp:()=>uq,removeCodexArtifacts:()=>lq,hasCodexMcp:()=>s,ensureCodexMcp:()=>xq,codexMcpProblem:()=>Sq,codexDetected:()=>vq,auditCodex:()=>aq,CODEX_HOOKS:()=>F});import{readFileSync as k}from"fs";import{homedir as _q}from"os";import{join as j}from"path";function Pq(){return process.env.HOME||process.env.USERPROFILE||_q()}function vq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(p===void 0)p=Bun.which("codex")!==null;return p}function g(q){try{return Bun.TOML.parse(q)}catch{return null}}function s(){try{return Boolean(g(k(X(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function Sq(){let q="";try{q=k(X(),"utf8")}catch{return null}let z=g(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${w}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${w}`;return null}function xq(){let q="",z=!1;try{q=k(X(),"utf8"),z=!0}catch{}if(z){let Y=g(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${w}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${w}`}}let J=!q?"":q.endsWith(`
265
331
  `)?`
266
332
  `:`
267
333
 
268
- `,Q=q+J+hq;if(b(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${w}`};return I(G(),Q),{added:!0}}function xq(){let q="";try{q=k(G(),"utf8")}catch{return{removed:!1}}let z=q.split(`
269
- `),J=z.indexOf(vq);if(J===-1)return{removed:!1,skipped:s()};let Q=z.indexOf(Xq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
334
+ `,Q=q+J+mq;if(g(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${w}`};return D(X(),Q),{added:!0}}function uq(){let q="";try{q=k(X(),"utf8")}catch{return{removed:!1}}let z=q.split(`
335
+ `),J=z.indexOf(Gq);if(J===-1)return{removed:!1,skipped:s()};let Q=z.indexOf(Xq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
270
336
  `).replace(/\n{3,}/g,`
271
337
 
272
- `).replace(/^\n+/,"");if(b(V)===null)return{removed:!1,skipped:!0};return I(G(),V),{removed:!0}}async function mq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (o(),r)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let Z of f){if(!S(D(),Z))V.push(Z);Zq(D(),Z,Q[Z])}let Y=0;for(let Z of F)if(zq(l(),{event:Z.event,matcher:Z.matcher,command:Z.command}))Y++;let U=m(A(),T);Vq(A(),T,Hq,e);let H=Gq();return{skillsAdded:V,hooksAdded:Y,agentsMdBlockTouched:!U,mcp:H}}function Sq(){let q={};for(let J of f)q[J]=S(D(),J);let z={};for(let J of F)z[J.event]=Jq(l(),{event:J.event,command:J.command});return{detected:Bq(),skills:q,hooks:z,agentsMdBlock:m(A(),T),mcp:s()}}function pq(){let q=[];for(let V of f)if($q(D(),V))q.push(V);let z=0;for(let V of F)if(Qq(l(),{event:V.event,command:V.command}))z++;let J=Yq(A(),T,Hq),Q=xq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var a=()=>j(Wq(),".codex"),l=()=>j(a(),"hooks.json"),G=()=>j(a(),"config.toml"),A=()=>j(a(),"AGENTS.md"),D=()=>j(Wq(),".agents","skills"),T="<!-- beacon:global:start -->",Hq="<!-- beacon:global:end -->",F,p,vq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Xq="# beacon:end",hq,w="add it manually: codex mcp add beacon -- beacon mcp";var lq=x(()=>{Uq();Pq();F=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];hq=`${vq}
338
+ `).replace(/^\n+/,"");if(g(V)===null)return{removed:!1,skipped:!0};return D(X(),V),{removed:!0}}async function pq(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),o)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let U of f){if(!S(A(),U))Y.push(U);$q(A(),U,V[U])}let W=0;for(let U of F)if(Jq(l(),{event:U.event,matcher:U.matcher,command:U.command}))W++;let P=m(T(),I);Yq(T(),I,Bq,qq);let $=xq();return{skillsAdded:Y,hooksAdded:W,agentsMdBlockTouched:!P,mcp:$}}function aq(){let q={};for(let J of f)q[J]=S(A(),J);let z={};for(let J of F)z[J.event]=Qq(l(),{event:J.event,command:J.command});return{detected:vq(),skills:q,hooks:z,agentsMdBlock:m(T(),I),mcp:s()}}function lq(){let q=[];for(let V of f)if(Uq(A(),V))q.push(V);let z=0;for(let V of F)if(Vq(l(),{event:V.event,command:V.command}))z++;let J=Zq(T(),I,Bq),Q=uq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var a=()=>j(Pq(),".codex"),l=()=>j(a(),"hooks.json"),X=()=>j(a(),"config.toml"),T=()=>j(a(),"AGENTS.md"),A=()=>j(Pq(),".agents","skills"),I="<!-- beacon:global:start -->",Bq="<!-- beacon:global:end -->",F,p,Gq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Xq="# beacon:end",mq,w="add it manually: codex mcp add beacon -- beacon mcp";var dq=x(()=>{Wq();Hq();F=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];mq=`${Gq}
273
339
  [mcp_servers.beacon]
274
340
  command = "beacon"
275
341
  args = ["mcp"]
276
342
  ${Xq}
277
- `});lq();export{mq as setupCodexAssets,xq as removeCodexMcp,pq as removeCodexArtifacts,s as hasCodexMcp,Gq as ensureCodexMcp,_q as codexMcpProblem,Bq as codexDetected,Sq as auditCodex,F as CODEX_HOOKS};
343
+ `});dq();export{pq as setupCodexAssets,uq as removeCodexMcp,lq as removeCodexArtifacts,s as hasCodexMcp,xq as ensureCodexMcp,Sq as codexMcpProblem,vq as codexDetected,aq as auditCodex,F as CODEX_HOOKS};
@@ -1,21 +1,21 @@
1
1
  // @bun
2
- var yq=Object.defineProperty;var Aq=(q)=>q;function Dq(q,z){this[q]=Aq.bind(null,z)}var Xq=(q,z)=>{for(var J in z)yq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:Dq.bind(z,J)})};var B=(q,z)=>()=>(q&&(z=q(q=0)),z);var Bz=1500,gz=480000,Nz=1800000,C=3600000,Gz=3000;var Uq=()=>{};var l={};Xq(l,{removeRepoAssets:()=>cq,installRefreshSkill:()=>kq,installPlanSkill:()=>hq,installInitSkill:()=>Oq,installCodexRepoSkills:()=>_q,ensureWorkflowDoc:()=>pq,ensureMcp:()=>mq,auditRepo:()=>Sq,REFRESH_SKILL:()=>n,PLAN_SKILL:()=>wq,INIT_SKILL:()=>r});import{existsSync as v,mkdirSync as F,readFileSync as H,rmSync as f,writeFileSync as U}from"fs";import{join as $}from"path";function Oq(q){let z=$(q,".claude","skills","beacon-init");F(z,{recursive:!0});let J=$(z,"SKILL.md");return U(J,r),J}function kq(q){let z=$(q,".claude","skills","beacon-refresh");F(z,{recursive:!0});let J=$(z,"SKILL.md");return U(J,n),J}function hq(q){let z=$(q,".claude","skills","beacon-plan");F(z,{recursive:!0});let J=$(z,"SKILL.md");return U(J,wq),J}function _q(q){let z=[];for(let J of Lq){let Q=$(q,".agents","skills",J.name);F(Q,{recursive:!0});let V=$(Q,"SKILL.md");U(V,J.body()),z.push(V)}return z}function pq(q){let z=$(q,"AGENTS.md"),J="";try{J=H(z,"utf8")}catch{}let Q=new RegExp(`${R}[\\s\\S]*?${s}`);J=Q.test(J)?J.replace(Q,Hq):`${J.trim()}
2
+ var Iq=Object.defineProperty;var Aq=(q)=>q;function Oq(q,z){this[q]=Aq.bind(null,z)}var Pq=(q,z)=>{for(var J in z)Iq(q,J,{get:z[J],enumerable:!0,configurable:!0,set:Oq.bind(z,J)})};var B=(q,z)=>()=>(q&&(z=q(q=0)),z);var Gz=1500,Nz=480000,bz=1800000,f=3600000,uz=3000;var Xq=()=>{};var l={};Pq(l,{removeRepoAssets:()=>tq,installRefreshSkill:()=>hq,installPlanSkill:()=>Lq,installInitSkill:()=>kq,installExplainSkill:()=>_q,installCodexRepoSkills:()=>pq,ensureWorkflowDoc:()=>Sq,ensureMcp:()=>cq,auditRepo:()=>aq,REFRESH_SKILL:()=>s,PLAN_SKILL:()=>wq,INIT_SKILL:()=>r,EXPLAIN_SKILL:()=>xq});import{existsSync as v,mkdirSync as g,readFileSync as H,rmSync as F,writeFileSync as X}from"fs";import{join as $}from"path";function kq(q){let z=$(q,".claude","skills","beacon-init");g(z,{recursive:!0});let J=$(z,"SKILL.md");return X(J,r),J}function hq(q){let z=$(q,".claude","skills","beacon-refresh");g(z,{recursive:!0});let J=$(z,"SKILL.md");return X(J,s),J}function Lq(q){let z=$(q,".claude","skills","beacon-plan");g(z,{recursive:!0});let J=$(z,"SKILL.md");return X(J,wq),J}function _q(q){let z=$(q,".claude","skills","beacon-explain");g(z,{recursive:!0});let J=$(z,"SKILL.md");return X(J,xq),J}function pq(q){let z=[];for(let J of mq){let Q=$(q,".agents","skills",J.name);g(Q,{recursive:!0});let V=$(Q,"SKILL.md");X(V,J.body()),z.push(V)}return z}function Sq(q){let z=$(q,"AGENTS.md"),J="";try{J=H(z,"utf8")}catch{}let Q=new RegExp(`${R}[\\s\\S]*?${n}`);J=Q.test(J)?J.replace(Q,Hq):`${J.trim()}
3
3
 
4
4
  ${Hq}
5
- `.trimStart(),U(z,J.endsWith(`
5
+ `.trimStart(),X(z,J.endsWith(`
6
6
  `)?J:`${J}
7
- `);let V=$(q,"CLAUDE.md"),Y="";try{Y=H(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))U(V,`${Y?`${Y.trim()}
7
+ `);let V=$(q,"CLAUDE.md"),Y="";try{Y=H(V,"utf8")}catch{}if(!/@AGENTS\.md/.test(Y))X(V,`${Y?`${Y.trim()}
8
8
 
9
9
  `:""}@AGENTS.md
10
- `)}function mq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(H(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<C)return Q.timeout=C,U(z,JSON.stringify(J,null,2)+`
11
- `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:C},U(z,JSON.stringify(J,null,2)+`
12
- `),{path:z,added:!0,updated:!1}}function Sq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(H(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=H($(q,"AGENTS.md"),"utf8").includes(R)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(H($(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":v($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":v($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function cq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let X=$(q,".claude","skills",Z);if(v(X))f(X,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let X=$(q,".agents","skills",Z);if(v(X))f(X,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(H(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)f(Q,{force:!0});else U(Q,JSON.stringify(Z,null,2)+`
13
- `)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=H(Y,"utf8"),X=new RegExp(`\\n?${R}[\\s\\S]*?${s}\\n?`);if(X.test(Z)){let d=Z.replace(X,`
10
+ `)}function cq(q){let z=$(q,".mcp.json"),J={};try{J=JSON.parse(H(z,"utf8"))}catch{}J.mcpServers=J.mcpServers??{};let Q=J.mcpServers.beacon;if(Q){if(!Q.timeout||Q.timeout<f)return Q.timeout=f,X(z,JSON.stringify(J,null,2)+`
11
+ `),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:f},X(z,JSON.stringify(J,null,2)+`
12
+ `),{path:z,added:!0,updated:!1}}function aq(q){let z=$(q,".mcp.json"),J=!1;try{J=!!JSON.parse(H(z,"utf8")).mcpServers?.beacon}catch{}let Q=!1;try{Q=H($(q,"AGENTS.md"),"utf8").includes(R)}catch{}let V=!1;try{V=/@AGENTS\.md/.test(H($(q,"CLAUDE.md"),"utf8"))}catch{}return{repo:q,mcpRegistered:J,agentsMdBlock:Q,claudeMdImport:V,skills:{"beacon-init":v($(q,".claude","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".claude","skills","beacon-refresh","SKILL.md"))},codexSkills:{"beacon-init":v($(q,".agents","skills","beacon-init","SKILL.md")),"beacon-refresh":v($(q,".agents","skills","beacon-refresh","SKILL.md"))}}}function tq(q){let z=[];for(let Z of["beacon-init","beacon-refresh","beacon-db-design"]){let W=$(q,".claude","skills",Z);if(v(W))F(W,{recursive:!0,force:!0}),z.push(Z)}for(let Z of["beacon-init","beacon-refresh"]){let W=$(q,".agents","skills",Z);if(v(W))F(W,{recursive:!0,force:!0}),z.push(`codex:${Z}`)}let J=!1,Q=$(q,".mcp.json");try{let Z=JSON.parse(H(Q,"utf8"));if(Z.mcpServers?.beacon){if(delete Z.mcpServers.beacon,J=!0,Z.mcpServers&&Object.keys(Z.mcpServers).length===0)delete Z.mcpServers;if(Object.keys(Z).length===0)F(Q,{force:!0});else X(Q,JSON.stringify(Z,null,2)+`
13
+ `)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=H(Y,"utf8"),W=new RegExp(`\\n?${R}[\\s\\S]*?${n}\\n?`);if(W.test(Z)){let d=Z.replace(W,`
14
14
  `).replace(/\n{3,}/g,`
15
15
 
16
- `).trimStart();U(Y,d.endsWith(`
16
+ `).trimStart();X(Y,d.endsWith(`
17
17
  `)?d:`${d}
18
- `),V=!0}}catch{}let W=!1,P=$(q,"CLAUDE.md");try{let Z=H(P,"utf8"),X=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(X!==Z){if(!X.trim())f(P,{force:!0});else U(P,X);W=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:W}}var r=`---
18
+ `),V=!0}}catch{}let U=!1,P=$(q,"CLAUDE.md");try{let Z=H(P,"utf8"),W=Z.replace(/^[ \t]*@AGENTS\.md[ \t]*\n?/m,"");if(W!==Z){if(!W.trim())F(P,{force:!0});else X(P,W);U=!0}}catch{}return{skillsRemoved:z,mcpUnregistered:J,agentsBlockRemoved:V,claudeImportRemoved:U}}var r=`---
19
19
  name: beacon-init
20
20
  description: Read this repository and map its architecture, schema, and roadmap into Beacon (the local visual planning panel). Use when the user runs /beacon-init, asks to "set up Beacon for this repo", or asks to initialize/bootstrap Beacon's map of this codebase.
21
21
  ---
@@ -62,7 +62,7 @@ beacon init-persist /tmp/beacon-init.json # or: beacon init-persist < /tmp/bea
62
62
  That one command wires the repo (writes \`.mcp.json\` + skills so your NEXT session gets the \`beacon_*\` tools natively, heals the global install), starts the Beacon daemon if it isn't running, registers + provisions this workspace, and POSTs your analysis to the same \`/api/init\` endpoint the MCP tool uses \u2014 so init completes in THIS session. Read the counts it prints and report them.
63
63
 
64
64
  After the tool (or \`beacon init-persist\`) returns, tell the user the counts (components / roadmap / tables / endpoints) and point them at the running Beacon panel.
65
- `,n=`---
65
+ `,s=`---
66
66
  name: beacon-refresh
67
67
  description: Re-survey the repo and update Beacon's architecture / schema / endpoints map after /beacon-init was already run \u2014 picks up new components, removed ones, schema changes, and new routes. Use when the user runs /beacon-refresh or asks to "refresh", "update", "re-sync", or "bring Beacon up to date" with the current code.
68
68
  ---
@@ -157,7 +157,70 @@ If it returns feedback, revise and call it again.
157
157
  If \`beacon_present_plan\` isn't available, the panel isn't wired here \u2014 fall back to ExitPlanMode
158
158
  with the same \`\`\`beacon block (Claude Code only; Codex has no ExitPlanMode), or tell the user to
159
159
  run \`beacon\` in this repo once.
160
- `,Lq,R="<!-- beacon:workflow:start -->",s="<!-- beacon:workflow:end -->",Hq;var i=B(()=>{Uq();Lq=[{name:"beacon-init",body:()=>r},{name:"beacon-refresh",body:()=>n}];Hq=`${R}
160
+ `,xq=`---
161
+ name: beacon-explain
162
+ description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page \u2014 a concept map + plain-English narrative they can question \u2014 instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
163
+ ---
164
+
165
+ # Explain the codebase visually (/beacon-explain)
166
+
167
+ When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
168
+ terminal and don't open a plan \u2014 plans are for building. Author an interactive **Lesson** and push it
169
+ with the \`beacon_explain\` MCP tool: a curated concept map (boxes + labeled arrows) beside a
170
+ plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
171
+ to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
172
+ until they Save the lesson. There is NO approve/discard \u2014 understanding, not building.
173
+
174
+ ## 1. Load context first \u2014 don't explain blind
175
+
176
+ Before writing, call \`beacon_context_for_feature\` / \`beacon_map\` and read the relevant files so the
177
+ lesson is accurate. Name real files, functions, tables, and endpoints \u2014 never vague descriptions.
178
+
179
+ ## 2. Write like a great teacher \u2014 the house style (this is the whole point)
180
+
181
+ Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
182
+
183
+ - **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
184
+ wall of nouns.
185
+ - **Problem-first.** Open each component with the PROBLEM it solves \u2014 a concrete human scenario, the
186
+ tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
187
+ confirms an order it must also land in the ERP \u2014 but the ERP can be slow or down, and you do *not*
188
+ want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
189
+ happens in the background, with retries.")
190
+ - **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
191
+ action and names the real identifier in backticks \u2014 file (\`order-placed-sync-erp.ts\`), function
192
+ (\`syncOrderToErpWorkflow\`), event (\`order.placed\`), column (\`erp_sync_record\`), value
193
+ (\`requires_human_action\`). Enumerate the cases (success / retryable / rejected / \u2026) with the plain
194
+ meaning of each.
195
+ - **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
196
+ reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
197
+ explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
198
+ failure could cause a duplicate order later").
199
+ - **A worked example with real data.** Show the mechanism running on one concrete case \u2014 ideally a
200
+ small markdown table of state transitions \u2014 and land the insight ("that's 8 rows for one order, and
201
+ that's the point").
202
+ - **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
203
+ \`inline code\` around every real identifier \u2014 on /learn, backticked real file paths become clickable
204
+ to open in the user's editor.
205
+
206
+ ## 3. Map the prose to the board
207
+
208
+ Every component/flow you NAME in the narrative becomes a \`node\` (title + a one-line \`summary\` for its
209
+ face + a fuller \`detail\` + the real \`files\` it maps to). Every "A does X to B" becomes an \`edge\` with
210
+ a relationship VERB \u2014 one of: imports, calls, persists to, reads from, writes to, routes to, depends
211
+ on, emits, returns, contains, extends \u2014 never a bare line. Keep the resting set small (~4\u20137 nodes);
212
+ push depth into \`detail\`, not the node face. Supply \`steps\` for the guided walkthrough: the first step
213
+ is the overview (empty \`focusIds\`), then teach one node (or a few) per step in order, each with its
214
+ \`focusIds\`.
215
+
216
+ ## 4. Answer in the loop \u2014 don't stop after one round
217
+
218
+ \`beacon_explain\` returns the user's questions, each tagged \`[q:ID]\`. Answer EACH by calling
219
+ \`beacon_explain\` AGAIN with the SAME lesson plus \`answers: [{ questionId, answer }]\` (keyed by the id).
220
+ Every answer must ADD understanding (rationale, trade-off) \u2014 never just restate the question. Expand
221
+ the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
222
+ the lesson.
223
+ `,mq,R="<!-- beacon:workflow:start -->",n="<!-- beacon:workflow:end -->",Hq;var i=B(()=>{Xq();mq=[{name:"beacon-init",body:()=>r},{name:"beacon-refresh",body:()=>s}];Hq=`${R}
161
224
  ## Beacon \u2014 feature workflow
162
225
 
163
226
  This project uses Beacon (a local planning/visualization panel; run \`beacon\` to open it). When you start work on a FEATURE \u2014 whether referenced via an \`@beacon:feature://\u2026\` mention, an \`@beacon:note://\u2026\` note the user wrote in the Notes panel (treat its checkbox \`- [ ]\` todos as subtasks and order features by their dependencies), or just described in chat \u2014 follow these steps in order:
@@ -229,18 +292,18 @@ Register them all in that single batched call. If a plan added five features, th
229
292
  If the feature added or materially changed a REAL architectural component (a subsystem \u2014 NOT a file), also pass \`architecture: [{ title, domain, role, \u2026 }]\` so the Architecture map stays accurate. It upserts curated components by title; never list files as components. If you found a bug or something worth investigating in a component's code, add \`bugs: [{ note }]\` to its architecture entry \u2014 it renders as a bug flag on the node (attributed to the agent); identical open flags are not duplicated. Only flag what you actually saw in the code.
230
293
 
231
294
  Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
232
- ${s}`});import{existsSync as M,mkdirSync as o,readdirSync as aq,readFileSync as g,rmSync as tq,writeFileSync as T}from"fs";import{dirname as xq,join as x}from"path";function vq(){return!!process.env.CLAUDE_PLUGIN_ROOT}function jq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=x(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let W=x(Y,".claude-plugin","plugin.json");try{if(M(W)&&JSON.parse(g(W,"utf8")).name==="beacon")return Y}catch{}try{for(let P of aq(Y,{withFileTypes:!0}))if(P.isDirectory())V.push(x(Y,P.name))}catch{}}J=V}return null}function Bq(q){return jq(q)!==null}function e(q){try{return JSON.parse(g(q,"utf8"))}catch{return{}}}function gq(q,z){o(xq(q),{recursive:!0}),T(q,JSON.stringify(z,null,2)+`
233
- `)}function E(q,z){let J=e(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((W)=>W.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),gq(q,J),!0}function y(q,z){return(e(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function A(q,z){let J=e(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((W)=>{let P=W.hooks?.length??0,Z=(W.hooks??[]).filter((X)=>X.command!==z.command);if(Z.length!==P)V=!0;return{...W,hooks:Z}}).filter((W)=>(W.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return gq(q,J),!0}function D(q,z,J,Q){let V=`${z}
295
+ ${n}`});import{existsSync as M,mkdirSync as o,readdirSync as dq,readFileSync as G,rmSync as rq,writeFileSync as T}from"fs";import{dirname as vq,join as x}from"path";function jq(){return!!process.env.CLAUDE_PLUGIN_ROOT}function Bq(q=process.env.HOME||process.env.USERPROFILE||""){if(!q)return null;let z=x(q,".claude","plugins");if(!M(z))return null;let J=[z];for(let Q=0;Q<3&&J.length;Q++){let V=[];for(let Y of J){let U=x(Y,".claude-plugin","plugin.json");try{if(M(U)&&JSON.parse(G(U,"utf8")).name==="beacon")return Y}catch{}try{for(let P of dq(Y,{withFileTypes:!0}))if(P.isDirectory())V.push(x(Y,P.name))}catch{}}J=V}return null}function gq(q){return Bq(q)!==null}function e(q){try{return JSON.parse(G(q,"utf8"))}catch{return{}}}function Gq(q,z){o(vq(q),{recursive:!0}),T(q,JSON.stringify(z,null,2)+`
296
+ `)}function y(q,z){let J=e(q);J.hooks=J.hooks??{},J.hooks[z.event]=J.hooks[z.event]??[];let Q=J.hooks[z.event];if(Q.some((Y)=>Y.matcher===z.matcher&&Y.hooks?.some((U)=>U.command===z.command)))return!1;return Q.push({matcher:z.matcher,hooks:[{type:"command",command:z.command}]}),Gq(q,J),!0}function E(q,z){return(e(q).hooks?.[z.event]??[]).some((V)=>V.hooks?.some((Y)=>Y.command===z.command))}function I(q,z){let J=e(q),Q=J.hooks?.[z.event];if(!Q)return!1;let V=!1,Y=Q.map((U)=>{let P=U.hooks?.length??0,Z=(U.hooks??[]).filter((W)=>W.command!==z.command);if(Z.length!==P)V=!0;return{...U,hooks:Z}}).filter((U)=>(U.hooks??[]).length>0);if(!V)return!1;if(Y.length)J.hooks[z.event]=Y;else delete J.hooks[z.event];if(J.hooks&&Object.keys(J.hooks).length===0)delete J.hooks;return Gq(q,J),!0}function A(q,z,J,Q){let V=`${z}
234
297
  ${Q.trim()}
235
- ${J}`,Y="";try{Y=g(q,"utf8")}catch{}let W=new RegExp(`${z}[\\s\\S]*?${J}`);Y=W.test(Y)?Y.replace(W,V):Y.trim()?`${Y.trim()}
298
+ ${J}`,Y="";try{Y=G(q,"utf8")}catch{}let U=new RegExp(`${z}[\\s\\S]*?${J}`);Y=U.test(Y)?Y.replace(U,V):Y.trim()?`${Y.trim()}
236
299
 
237
300
  ${V}
238
301
  `:`${V}
239
- `,o(xq(q),{recursive:!0}),T(q,Y.endsWith(`
302
+ `,o(vq(q),{recursive:!0}),T(q,Y.endsWith(`
240
303
  `)?Y:`${Y}
241
- `)}function N(q,z){try{return g(q,"utf8").includes(z)}catch{return!1}}function O(q,z,J){let Q="";try{Q=g(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
304
+ `)}function N(q,z){try{return G(q,"utf8").includes(z)}catch{return!1}}function O(q,z,J){let Q="";try{Q=G(q,"utf8")}catch{return!1}let V=new RegExp(`${z}[\\s\\S]*?${J}\\n?`);if(!V.test(Q))return!1;let Y=Q.replace(V,"").replace(/\n{3,}/g,`
242
305
 
243
- `).trimStart();return T(q,Y),!0}function k(q,z,J){let Q=x(q,z);o(Q,{recursive:!0});let V=x(Q,"SKILL.md");return T(V,J),V}function G(q,z){return M(x(q,z,"SKILL.md"))}function h(q,z){let J=x(q,z);if(!M(J))return!1;return tq(J,{recursive:!0,force:!0}),!0}var w,I=`## Beacon (visual planning panel)
306
+ `).trimStart();return T(q,Y),!0}function k(q,z,J){let Q=x(q,z);o(Q,{recursive:!0});let V=x(Q,"SKILL.md");return T(V,J),V}function b(q,z){return M(x(q,z,"SKILL.md"))}function h(q,z){let J=x(q,z);if(!M(J))return!1;return rq(J,{recursive:!0,force:!0}),!0}var w,D=`## Beacon (visual planning panel)
244
307
 
245
308
  This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
246
309
  agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
@@ -254,6 +317,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
254
317
  - User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
255
318
  the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
256
319
  preserving anything the user added by hand.
320
+ - User asks to "explain" / "teach me" / "walk me through" / "how does X work" \u2192 if the
321
+ \`beacon_explain\` MCP tool is available, author an interactive Lesson (a concept map +
322
+ plain-English narrative on /learn the user questions back) via the \`beacon-explain\` skill.
257
323
  - Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
258
324
 
259
325
  **The plan feedback loop**
@@ -261,17 +327,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
261
327
  Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
262
328
  on the /map and /db boards (added features, attached subtasks, edited columns, new
263
329
  endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
264
- verbatim. Do NOT implement until the tool returns approval.`;var qq=B(()=>{w=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as dq,renameSync as rq,rmSync as nq,writeFileSync as sq}from"fs";import{dirname as lq}from"path";function L(q,z){dq(lq(q),{recursive:!0});let J=`${q}.tmp`;try{sq(J,z),rq(J,q)}catch(Q){throw nq(J,{force:!0}),Q}}function Iz(q,z,J=!1){L(q,JSON.stringify(z,null,J?2:void 0))}var Nq=()=>{};var Rq={};Xq(Rq,{setupCodexAssets:()=>qz,removeCodexMcp:()=>Fq,removeCodexArtifacts:()=>Jz,hasCodexMcp:()=>Vq,ensureCodexMcp:()=>fq,codexMcpProblem:()=>eq,codexDetected:()=>uq,auditCodex:()=>zz,CODEX_HOOKS:()=>c});import{readFileSync as S}from"fs";import{homedir as iq}from"os";import{join as K}from"path";function Gq(){return process.env.HOME||process.env.USERPROFILE||iq()}function uq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(zq===void 0)zq=Bun.which("codex")!==null;return zq}function u(q){try{return Bun.TOML.parse(q)}catch{return null}}function Vq(){try{return Boolean(u(S(j(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function eq(){let q="";try{q=S(j(),"utf8")}catch{return null}let z=u(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${b}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${b}`;return null}function fq(){let q="",z=!1;try{q=S(j(),"utf8"),z=!0}catch{}if(z){let Y=u(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${b}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${b}`}}let J=!q?"":q.endsWith(`
330
+ verbatim. Do NOT implement until the tool returns approval.`;var qq=B(()=>{w=["beacon-init","beacon-refresh","beacon-plan","beacon-explain"]});import{mkdirSync as sq,renameSync as nq,rmSync as lq,writeFileSync as iq}from"fs";import{dirname as oq}from"path";function L(q,z){sq(oq(q),{recursive:!0});let J=`${q}.tmp`;try{iq(J,z),nq(J,q)}catch(Q){throw lq(J,{force:!0}),Q}}function Ez(q,z,J=!1){L(q,JSON.stringify(z,null,J?2:void 0))}var Nq=()=>{};var Mq={};Pq(Mq,{setupCodexAssets:()=>Jz,removeCodexMcp:()=>Rq,removeCodexArtifacts:()=>Vz,hasCodexMcp:()=>Vq,ensureCodexMcp:()=>Fq,codexMcpProblem:()=>zz,codexDetected:()=>Kq,auditCodex:()=>Qz,CODEX_HOOKS:()=>c});import{readFileSync as S}from"fs";import{homedir as eq}from"os";import{join as C}from"path";function bq(){return process.env.HOME||process.env.USERPROFILE||eq()}function Kq(){if(process.env.BEACON_CODEX==="1")return!0;if(process.env.BEACON_CODEX==="0")return!1;if(zq===void 0)zq=Bun.which("codex")!==null;return zq}function K(q){try{return Bun.TOML.parse(q)}catch{return null}}function Vq(){try{return Boolean(K(S(j(),"utf8"))?.mcp_servers?.beacon)}catch{return!1}}function zz(){let q="";try{q=S(j(),"utf8")}catch{return null}let z=K(q);if(!z)return`~/.codex/config.toml does not parse \u2014 ${u}`;if(z.mcp_servers?.beacon)return null;if(/^\s*mcp_servers\s*=/m.test(q))return`mcp_servers is an inline table \u2014 ${u}`;return null}function Fq(){let q="",z=!1;try{q=S(j(),"utf8"),z=!0}catch{}if(z){let Y=K(q);if(!Y)return{added:!1,error:`~/.codex/config.toml does not parse \u2014 ${u}`};if(Y.mcp_servers?.beacon)return{added:!1};if(/^\s*mcp_servers\s*=/m.test(q))return{added:!1,error:`mcp_servers is an inline table \u2014 ${u}`}}let J=!q?"":q.endsWith(`
265
331
  `)?`
266
332
  `:`
267
333
 
268
- `,Q=q+J+oq;if(u(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${b}`};return L(j(),Q),{added:!0}}function Fq(){let q="";try{q=S(j(),"utf8")}catch{return{removed:!1}}let z=q.split(`
269
- `),J=z.indexOf(Kq);if(J===-1)return{removed:!1,skipped:Vq()};let Q=z.indexOf(Cq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
334
+ `,Q=q+J+qz;if(K(Q)?.mcp_servers?.beacon?.command!=="beacon")return{added:!1,error:`could not safely append [mcp_servers.beacon] \u2014 ${u}`};return L(j(),Q),{added:!0}}function Rq(){let q="";try{q=S(j(),"utf8")}catch{return{removed:!1}}let z=q.split(`
335
+ `),J=z.indexOf(Cq);if(J===-1)return{removed:!1,skipped:Vq()};let Q=z.indexOf(fq,J);if(Q===-1)return{removed:!1,skipped:!0};z.splice(J,Q-J+1);let V=z.join(`
270
336
  `).replace(/\n{3,}/g,`
271
337
 
272
- `).replace(/^\n+/,"");if(u(V)===null)return{removed:!1,skipped:!0};return L(j(),V),{removed:!0}}async function qz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (i(),l)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let Z of w){if(!G(p(),Z))V.push(Z);k(p(),Z,Q[Z])}let Y=0;for(let Z of c)if(E(Qq(),{event:Z.event,matcher:Z.matcher,command:Z.command}))Y++;let W=N(_(),m);D(_(),m,bq,I);let P=fq();return{skillsAdded:V,hooksAdded:Y,agentsMdBlockTouched:!W,mcp:P}}function zz(){let q={};for(let J of w)q[J]=G(p(),J);let z={};for(let J of c)z[J.event]=y(Qq(),{event:J.event,command:J.command});return{detected:uq(),skills:q,hooks:z,agentsMdBlock:N(_(),m),mcp:Vq()}}function Jz(){let q=[];for(let V of w)if(h(p(),V))q.push(V);let z=0;for(let V of c)if(A(Qq(),{event:V.event,command:V.command}))z++;let J=O(_(),m,bq),Q=Fq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var Jq=()=>K(Gq(),".codex"),Qq=()=>K(Jq(),"hooks.json"),j=()=>K(Jq(),"config.toml"),_=()=>K(Jq(),"AGENTS.md"),p=()=>K(Gq(),".agents","skills"),m="<!-- beacon:global:start -->",bq="<!-- beacon:global:end -->",c,zq,Kq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",Cq="# beacon:end",oq,b="add it manually: codex mcp add beacon -- beacon mcp";var Mq=B(()=>{qq();Nq();c=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];oq=`${Kq}
338
+ `).replace(/^\n+/,"");if(K(V)===null)return{removed:!1,skipped:!0};return L(j(),V),{removed:!0}}async function Jz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),l)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let W of w){if(!b(m(),W))Y.push(W);k(m(),W,V[W])}let U=0;for(let W of c)if(y(Qq(),{event:W.event,matcher:W.matcher,command:W.command}))U++;let P=N(_(),p);A(_(),p,uq,D);let Z=Fq();return{skillsAdded:Y,hooksAdded:U,agentsMdBlockTouched:!P,mcp:Z}}function Qz(){let q={};for(let J of w)q[J]=b(m(),J);let z={};for(let J of c)z[J.event]=E(Qq(),{event:J.event,command:J.command});return{detected:Kq(),skills:q,hooks:z,agentsMdBlock:N(_(),p),mcp:Vq()}}function Vz(){let q=[];for(let V of w)if(h(m(),V))q.push(V);let z=0;for(let V of c)if(I(Qq(),{event:V.event,command:V.command}))z++;let J=O(_(),p,uq),Q=Rq();return{skillsRemoved:q,hooksRemoved:z,agentsMdBlockRemoved:J,mcpRemoved:Q.removed,mcpSkipped:Q.skipped}}var Jq=()=>C(bq(),".codex"),Qq=()=>C(Jq(),"hooks.json"),j=()=>C(Jq(),"config.toml"),_=()=>C(Jq(),"AGENTS.md"),m=()=>C(bq(),".agents","skills"),p="<!-- beacon:global:start -->",uq="<!-- beacon:global:end -->",c,zq,Cq="# beacon:start (managed by Beacon \u2014 `beacon uninstall` removes this block)",fq="# beacon:end",qz,u="add it manually: codex mcp add beacon -- beacon mcp";var Tq=B(()=>{qq();Nq();c=[{event:"PostToolUse",matcher:"apply_patch",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose, nudge it to present the plan on Beacon's /plan canvas."}];qz=`${Cq}
273
339
  [mcp_servers.beacon]
274
340
  command = "beacon"
275
341
  args = ["mcp"]
276
- ${Cq}
277
- `});qq();import{existsSync as Qz}from"fs";import{homedir as Vz}from"os";import{join as a}from"path";function Yz(){return process.env.HOME||process.env.USERPROFILE||Vz()}var t=()=>a(Yz(),".claude"),Yq=()=>a(t(),"skills"),Zq=()=>a(t(),"settings.json"),$q=()=>a(t(),"CLAUDE.md"),Wq="<!-- beacon:global:start -->",Tq="<!-- beacon:global:end -->";var Zz=I,Pq=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract (when the scope-guard flag is on): in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. No-op + fail-open otherwise."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function $z(q,z){return k(Yq(),q,z)}function Iq(q){return G(Yq(),q)}function Wz(q){return h(Yq(),q)}function Pz(q){return E(Zq(),q)}function Xz(q){return y(Zq(),q)}function Uz(q){return A(Zq(),q)}function Hz(q){D($q(),Wq,Tq,q)}function Eq(){return N($q(),Wq)}function wz(){return O($q(),Wq,Tq)}function mz(){let q={};for(let J of w)q[J]=Iq(J);let z={};for(let J of Pq)z[J.event]=Xz({event:J.event,command:J.command});return{homeExists:Qz(t()),skills:q,hooks:z,claudeMdBlock:Eq()}}async function xz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J}=await Promise.resolve().then(() => (i(),l)),Q={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J},V=[];for(let P of w){if(!Iq(P))V.push(P);$z(P,Q[P])}let Y=0;for(let P of Pq)if(Pz({event:P.event,matcher:P.matcher,command:P.command}))Y++;let W=Eq();return Hz(Zz),{skillsAdded:V,hooksAdded:Y,claudeMdBlockTouched:!W}}async function Sz(){if(vq())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let q;if(Bq()){try{vz()}catch{}q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{q={ok:!0,...await xz()}}catch(z){q={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let z=await Promise.resolve().then(() => (Mq(),Rq));if(z.codexDetected())q.codex={ok:!0,...await z.setupCodexAssets()}}catch(z){q.codex={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,agentsMdBlockTouched:!1,mcp:{added:!1}}}return q}function vz(){let q=[];for(let Q of w)if(Wz(Q))q.push(Q);let z=0;for(let Q of Pq)if(Uz(Q))z++;let J=wz();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}export{xz as setupGlobalAssets,Sz as selfHealGlobal,Wz as removeGlobalSkill,Uz as removeGlobalHook,wz as removeGlobalClaudeMdBlock,vz as removeBeaconArtifacts,vq as isPluginManaged,Iq as isGlobalSkillInstalled,$z as installGlobalSkill,Xz as hasGlobalHook,Eq as hasGlobalClaudeMdBlock,jq as findBeaconPluginDir,Pz as ensureGlobalHook,Hz as ensureGlobalClaudeMdBlock,Bq as beaconPluginInstalled,mz as auditGlobal,w as GLOBAL_SKILLS,Pq as GLOBAL_HOOKS,Zz as GLOBAL_CLAUDE_MD_BLOCK};
342
+ ${fq}
343
+ `});qq();import{existsSync as Yz}from"fs";import{homedir as Zz}from"os";import{join as a}from"path";function $z(){return process.env.HOME||process.env.USERPROFILE||Zz()}var t=()=>a($z(),".claude"),Yq=()=>a(t(),"skills"),Zq=()=>a(t(),"settings.json"),$q=()=>a(t(),"CLAUDE.md"),Wq="<!-- beacon:global:start -->",Dq="<!-- beacon:global:end -->";var Wz=D,Uq=[{event:"PreToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon guard",description:"Gate edits against the active plan's scope contract (when the scope-guard flag is on): in-scope \u2192 allow, off-scope \u2192 ask the user to authorize. No-op + fail-open otherwise."},{event:"PostToolUse",matcher:"Edit|Write|MultiEdit",command:"beacon hook",description:"Report file edits to Beacon's active feature so the map stays fresh."},{event:"PermissionRequest",matcher:"ExitPlanMode",command:"beacon plan",description:"Pipe the agent's plan markdown into Beacon's /plan canvas for review."},{event:"UserPromptSubmit",matcher:"*",command:"beacon prompt",description:"On feature-y prompts in a Beacon-wired repo, remind the agent to run the context\u2192propose\u2192describe loop (no-op otherwise)."},{event:"Stop",matcher:"*",command:"beacon stop-hook",description:"When the agent ends a turn asking for plan approval in prose (instead of presenting it), nudge it to present the plan on Beacon's /plan canvas. Bounded by stop_hook_active \u2014 at most one nudge."}];function Uz(q,z){return k(Yq(),q,z)}function yq(q){return b(Yq(),q)}function Pz(q){return h(Yq(),q)}function Xz(q){return y(Zq(),q)}function Hz(q){return E(Zq(),q)}function wz(q){return I(Zq(),q)}function xz(q){A($q(),Wq,Dq,q)}function Eq(){return N($q(),Wq)}function vz(){return O($q(),Wq,Dq)}function cz(){let q={};for(let J of w)q[J]=yq(J);let z={};for(let J of Uq)z[J.event]=Hz({event:J.event,command:J.command});return{homeExists:Yz(t()),skills:q,hooks:z,claudeMdBlock:Eq()}}async function jz(){let{INIT_SKILL:q,REFRESH_SKILL:z,PLAN_SKILL:J,EXPLAIN_SKILL:Q}=await Promise.resolve().then(() => (i(),l)),V={"beacon-init":q,"beacon-refresh":z,"beacon-plan":J,"beacon-explain":Q},Y=[];for(let Z of w){if(!yq(Z))Y.push(Z);Uz(Z,V[Z])}let U=0;for(let Z of Uq)if(Xz({event:Z.event,matcher:Z.matcher,command:Z.command}))U++;let P=Eq();return xz(Wz),{skillsAdded:Y,hooksAdded:U,claudeMdBlockTouched:!P}}async function az(){if(jq())return{ok:!0,skipped:"plugin",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1};let q;if(gq()){try{Bz()}catch{}q={ok:!0,skipped:"plugin-present",skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}else try{q={ok:!0,...await jz()}}catch(z){q={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,claudeMdBlockTouched:!1}}try{let z=await Promise.resolve().then(() => (Tq(),Mq));if(z.codexDetected())q.codex={ok:!0,...await z.setupCodexAssets()}}catch(z){q.codex={ok:!1,error:z instanceof Error?z.message:String(z),skillsAdded:[],hooksAdded:0,agentsMdBlockTouched:!1,mcp:{added:!1}}}return q}function Bz(){let q=[];for(let Q of w)if(Pz(Q))q.push(Q);let z=0;for(let Q of Uq)if(wz(Q))z++;let J=vz();return{skillsRemoved:q,hooksRemoved:z,claudeMdBlockRemoved:J}}export{jz as setupGlobalAssets,az as selfHealGlobal,Pz as removeGlobalSkill,wz as removeGlobalHook,vz as removeGlobalClaudeMdBlock,Bz as removeBeaconArtifacts,jq as isPluginManaged,yq as isGlobalSkillInstalled,Uz as installGlobalSkill,Hz as hasGlobalHook,Eq as hasGlobalClaudeMdBlock,Bq as findBeaconPluginDir,Xz as ensureGlobalHook,xz as ensureGlobalClaudeMdBlock,gq as beaconPluginInstalled,cz as auditGlobal,w as GLOBAL_SKILLS,Uq as GLOBAL_HOOKS,Wz as GLOBAL_CLAUDE_MD_BLOCK};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trybeacon",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
4
4
  "description": "The visual planning surface for the coding agent in your terminal.",
5
5
  "homepage": "https://trybeacon.sh",
6
6
  "license": "Apache-2.0",
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: beacon-explain
3
+ description: Teach the user part of THIS codebase as an interactive visual lesson on Beacon's /learn page — a concept map + plain-English narrative they can question — instead of a wall of text. Use when the user says "explain", "teach me", "walk me through", "how does X work", or "help me understand the Y category".
4
+ ---
5
+
6
+ # Explain the codebase visually (/beacon-explain)
7
+
8
+ When the user wants to UNDERSTAND part of the code (not build something), don't dump prose in the
9
+ terminal and don't open a plan — plans are for building. Author an interactive **Lesson** and push it
10
+ with the `beacon_explain` MCP tool: a curated concept map (boxes + labeled arrows) beside a
11
+ plain-English narrative on Beacon's /learn page. The tool BLOCKS while the user reads, highlights text
12
+ to ask questions, and drops question notes; it returns their questions, you ANSWER and re-push, looping
13
+ until they Save the lesson. There is NO approve/discard — understanding, not building.
14
+
15
+ ## 1. Load context first — don't explain blind
16
+
17
+ Before writing, call `beacon_context_for_feature` / `beacon_map` and read the relevant files so the
18
+ lesson is accurate. Name real files, functions, tables, and endpoints — never vague descriptions.
19
+
20
+ ## 2. Write like a great teacher — the house style (this is the whole point)
21
+
22
+ Every lesson must read like a patient senior engineer explaining to a sharp newcomer:
23
+
24
+ - **Plain English, always.** Define any term the first time it appears. No unexplained jargon, no
25
+ wall of nouns.
26
+ - **Problem-first.** Open each component with the PROBLEM it solves — a concrete human scenario, the
27
+ tension that forced the design, then the decision and what it means. (e.g. "When a salesperson
28
+ confirms an order it must also land in the ERP — but the ERP can be slow or down, and you do *not*
29
+ want confirmation to hang. So the sync is *decoupled*: confirming succeeds immediately and the push
30
+ happens in the background, with retries.")
31
+ - **Concrete step-by-step flow.** Walk the real path as a numbered list. Each step is ONE clear
32
+ action and names the real identifier in backticks — file (`order-placed-sync-erp.ts`), function
33
+ (`syncOrderToErpWorkflow`), event (`order.placed`), column (`erp_sync_record`), value
34
+ (`requires_human_action`). Enumerate the cases (success / retryable / rejected / …) with the plain
35
+ meaning of each.
36
+ - **Anticipate-and-answer "Why X?".** After the flow, add short sections that answer the confusions a
37
+ reader will actually have ("Why two status columns?", "Why is the ledger append-only?"). ALWAYS
38
+ explain why the alternative is worse ("claiming success could hide a real failure; claiming hard
39
+ failure could cause a duplicate order later").
40
+ - **A worked example with real data.** Show the mechanism running on one concrete case — ideally a
41
+ small markdown table of state transitions — and land the insight ("that's 8 rows for one order, and
42
+ that's the point").
43
+ - **Typographic discipline.** **Bold** the decisions, *italic* the concepts being introduced, and put
44
+ `inline code` around every real identifier — on /learn, backticked real file paths become clickable
45
+ to open in the user's editor.
46
+
47
+ ## 3. Map the prose to the board
48
+
49
+ Every component/flow you NAME in the narrative becomes a `node` (title + a one-line `summary` for its
50
+ face + a fuller `detail` + the real `files` it maps to). Every "A does X to B" becomes an `edge` with
51
+ a relationship VERB — one of: imports, calls, persists to, reads from, writes to, routes to, depends
52
+ on, emits, returns, contains, extends — never a bare line. Keep the resting set small (~4–7 nodes);
53
+ push depth into `detail`, not the node face. Supply `steps` for the guided walkthrough: the first step
54
+ is the overview (empty `focusIds`), then teach one node (or a few) per step in order, each with its
55
+ `focusIds`.
56
+
57
+ ## 4. Answer in the loop — don't stop after one round
58
+
59
+ `beacon_explain` returns the user's questions, each tagged `[q:ID]`. Answer EACH by calling
60
+ `beacon_explain` AGAIN with the SAME lesson plus `answers: [{ questionId, answer }]` (keyed by the id).
61
+ Every answer must ADD understanding (rationale, trade-off) — never just restate the question. Expand
62
+ the narrative or add nodes where it helps. Keep looping until the tool reports the user saved or closed
63
+ the lesson.