trybeacon 0.1.64 → 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.
- package/.claude-plugin/plugin.json +1 -1
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +15 -8
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +42 -0
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +2 -2
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +11 -11
- package/.next/server/app/_not-found.segments/_full.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +11 -11
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/board-annotations/[id]/route.js +1 -1
- package/.next/server/app/api/board-annotations/route.js +1 -1
- package/.next/server/app/api/board-layout/route.js +1 -1
- package/.next/server/app/api/bug-flags/[id]/route.js +1 -1
- package/.next/server/app/api/bug-flags/route.js +1 -1
- package/.next/server/app/api/code-graph/position/route.js +1 -1
- package/.next/server/app/api/code-graph/route.js +1 -1
- package/.next/server/app/api/context/feature/route.js +1 -1
- package/.next/server/app/api/context/file/route.js +1 -1
- package/.next/server/app/api/context/route.js +1 -1
- package/.next/server/app/api/db/arrange/route.js +1 -1
- package/.next/server/app/api/db/backfill-access/route.js +1 -1
- package/.next/server/app/api/db/position/route.js +1 -1
- package/.next/server/app/api/db/prune-planned/route.js +1 -1
- package/.next/server/app/api/db/reconcile-endpoints/route.js +1 -1
- package/.next/server/app/api/db/relations/[id]/route.js +1 -1
- package/.next/server/app/api/db/tables/[id]/route.js +1 -1
- package/.next/server/app/api/draft/approve/route.js +1 -1
- package/.next/server/app/api/draft/route.js +1 -1
- package/.next/server/app/api/draft/status/route.js +1 -1
- package/.next/server/app/api/edges/[id]/route.js +1 -1
- package/.next/server/app/api/edges/route.js +1 -1
- package/.next/server/app/api/endpoints/[id]/route.js +1 -1
- package/.next/server/app/api/entities/route.js +1 -1
- package/.next/server/app/api/feedback/[id]/route.js +1 -1
- package/.next/server/app/api/feedback/[id]/vote/route.js +1 -1
- package/.next/server/app/api/feedback/route.js +1 -1
- package/.next/server/app/api/flags/route.js +1 -1
- package/.next/server/app/api/ingest/route.js +2 -2
- package/.next/server/app/api/init/route.js +2 -2
- package/.next/server/app/api/lesson/close/route.js +1 -0
- package/.next/server/app/api/lesson/close/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/close/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/presence/route.js +1 -0
- package/.next/server/app/api/lesson/presence/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/presence/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/questions/route.js +1 -0
- package/.next/server/app/api/lesson/questions/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/questions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/route.js +1 -0
- package/.next/server/app/api/lesson/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/save/route.js +1 -0
- package/.next/server/app/api/lesson/save/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/save/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/lesson/verdict/route.js +1 -0
- package/.next/server/app/api/lesson/verdict/route.js.nft.json +1 -0
- package/.next/server/app/api/lesson/verdict/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/map/describe/route.js +2 -2
- package/.next/server/app/api/map/files/route.js +1 -1
- package/.next/server/app/api/map/finish/route.js +1 -1
- package/.next/server/app/api/map/route.js +1 -1
- package/.next/server/app/api/map/start/route.js +1 -1
- package/.next/server/app/api/map/touch-active/route.js +1 -1
- package/.next/server/app/api/mention-search/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/position/route.js +1 -1
- package/.next/server/app/api/nodes/[id]/route.js +1 -1
- package/.next/server/app/api/nodes/positions/route.js +1 -1
- package/.next/server/app/api/nodes/route.js +1 -1
- package/.next/server/app/api/nodes/subtasks/route.js +1 -1
- package/.next/server/app/api/notes/[id]/route.js +1 -1
- package/.next/server/app/api/notes/route.js +1 -1
- package/.next/server/app/api/open/route.js +1 -1
- package/.next/server/app/api/plan/annotations/route.js +3 -3
- package/.next/server/app/api/plan/approve/route.js +2 -2
- package/.next/server/app/api/plan/history/route.js +1 -1
- package/.next/server/app/api/plan/markdown/route.js +1 -1
- package/.next/server/app/api/plan/presence/route.js +1 -1
- package/.next/server/app/api/plan/route.js +1 -1
- package/.next/server/app/api/plan/verdict/route.js +1 -1
- package/.next/server/app/api/preferences/route.js +1 -1
- package/.next/server/app/api/project-meta/route.js +1 -1
- package/.next/server/app/api/reset/route.js +1 -1
- package/.next/server/app/api/scope-guard/check/route.js +1 -1
- package/.next/server/app/api/share/create/route.js +1 -1
- package/.next/server/app/api/share/route.js +1 -1
- package/.next/server/app/api/stream/route.js +2 -2
- package/.next/server/app/api/tab/nav/route.js +1 -1
- package/.next/server/app/api/tab/presence/route.js +1 -1
- package/.next/server/app/api/telemetry/route.js +1 -1
- package/.next/server/app/api/telemetry/stats/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/workspace/activate/route.js +1 -1
- package/.next/server/app/api/workspace/route.js +1 -1
- package/.next/server/app/apple-icon.png/route.js +1 -1
- package/.next/server/app/docs/page.js +2 -2
- package/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/docs.html +1 -1
- package/.next/server/app/docs.rsc +11 -11
- package/.next/server/app/docs.segments/_full.segment.rsc +11 -11
- package/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs.segments/_index.segment.rsc +11 -11
- package/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/.next/server/app/feedback/page.js +2 -2
- package/.next/server/app/feedback/page_client-reference-manifest.js +1 -1
- package/.next/server/app/feedback.html +1 -1
- package/.next/server/app/feedback.rsc +11 -11
- package/.next/server/app/feedback.segments/_full.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_head.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/_index.segment.rsc +11 -11
- package/.next/server/app/feedback.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/feedback.segments/feedback/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/feedback.segments/feedback.segment.rsc +1 -1
- package/.next/server/app/help/page.js +2 -2
- package/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/.next/server/app/help.html +1 -1
- package/.next/server/app/help.rsc +11 -11
- package/.next/server/app/help.segments/_full.segment.rsc +11 -11
- package/.next/server/app/help.segments/_head.segment.rsc +1 -1
- package/.next/server/app/help.segments/_index.segment.rsc +11 -11
- package/.next/server/app/help.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/help.segments/help/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/help.segments/help.segment.rsc +1 -1
- package/.next/server/app/icon.svg/route.js +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +12 -12
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +12 -12
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +11 -11
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/learn/page.js +6 -0
- package/.next/server/app/learn/page.js.nft.json +1 -0
- package/.next/server/app/learn/page_client-reference-manifest.js +1 -0
- package/.next/server/app/map/page.js +2 -2
- package/.next/server/app/map/page.js.nft.json +1 -1
- package/.next/server/app/map/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +2 -2
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/plan/page.js +2 -2
- package/.next/server/app/plan/page.js.nft.json +1 -1
- package/.next/server/app/plan/page_client-reference-manifest.js +1 -1
- package/.next/server/app/s/[token]/page.js +2 -2
- package/.next/server/app/s/[token]/page.js.nft.json +1 -1
- package/.next/server/app/s/[token]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +2 -2
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +15 -8
- package/.next/server/chunks/2050.js +1 -1
- package/.next/server/chunks/3174.js +1 -0
- package/.next/server/chunks/3584.js +154 -0
- package/.next/server/chunks/4307.js +1 -1
- package/.next/server/chunks/6024.js +2 -0
- package/.next/server/chunks/{4384.js → 7187.js} +1 -1
- package/.next/server/chunks/8035.js +1 -0
- package/.next/server/chunks/9338.js +8 -8
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/P3uXQySdS-m6_bxuiezYe/_buildManifest.js +1 -0
- package/.next/static/chunks/1909-98243a0473be2aae.js +1 -0
- package/.next/static/chunks/1936-7fea5225b5bfcfda.js +1 -0
- package/.next/static/chunks/2019-3be80edc82176878.js +1 -0
- package/.next/static/chunks/4549-591415d55ca009a3.js +62 -0
- package/.next/static/chunks/6638-4e53879181b1df75.js +1 -0
- package/.next/static/chunks/{4888-911c0da3c2d785d2.js → 7043-254590cf9891391f.js} +1 -1
- package/.next/static/chunks/7643-6c7ff4b9400f68fc.js +1 -0
- package/.next/static/chunks/app/_global-error/page-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-annotations/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/board-layout/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/bug-flags/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/code-graph/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/code-graph/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/feature/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/file/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/context/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/arrange/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/backfill-access/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/prune-planned/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/relations/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/db/tables/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/approve/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/draft/status/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/edges/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/edges/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/endpoints/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/entities/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/feedback/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/flags/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/ingest/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/init/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/close/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/questions/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/save/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/lesson/verdict/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/describe/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/files/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/finish/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/start/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/map/touch-active/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/mention-search/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/position/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/positions/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/nodes/subtasks/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/notes/[id]/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/notes/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/open/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/annotations/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/approve/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/history/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/markdown/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/plan/verdict/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/preferences/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/project-meta/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/reset/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/scope-guard/check/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/share/create/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/share/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/stream/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/tab/nav/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/tab/presence/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/telemetry/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/telemetry/stats/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/version/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/workspace/activate/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/api/workspace/route-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/app/layout-0c993f55d3a798f4.js +1 -0
- package/.next/static/chunks/app/learn/page-797d74e02b98fa88.js +5 -0
- package/.next/static/chunks/app/map/page-634b6d5d98e921b3.js +1 -0
- package/.next/static/chunks/app/page-84dc684d45002cfb.js +1 -0
- package/.next/static/chunks/app/plan/page-df829b2054c40611.js +1 -0
- package/.next/static/chunks/app/s/[token]/page-f97dec75856a7952.js +1 -0
- package/.next/static/chunks/app/settings/page-59d90685cd17fc1f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-2390ea0e69e5991f.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-2390ea0e69e5991f.js +1 -0
- package/.next/static/css/b3d3212da726bbfb.css +1 -0
- package/.next/trace +43 -42
- package/.next/trace-build +1 -1
- package/.next/types/app/api/lesson/close/route.ts +351 -0
- package/.next/types/app/api/lesson/presence/route.ts +351 -0
- package/.next/types/app/api/lesson/questions/route.ts +351 -0
- package/.next/types/app/api/lesson/route.ts +351 -0
- package/.next/types/app/api/lesson/save/route.ts +351 -0
- package/.next/types/app/api/lesson/verdict/route.ts +351 -0
- package/.next/types/app/learn/page.ts +87 -0
- package/.next/types/routes.d.ts +9 -2
- package/.next/types/validator.ts +63 -0
- package/README.md +2 -1
- package/dist/bin/doctor.js +92 -22
- package/dist/bin/hook.js +91 -21
- package/dist/bin/mcp.js +107 -35
- package/dist/bin/plan.js +92 -22
- package/dist/bin/uninstall.js +95 -25
- package/dist/lib/assets.js +81 -14
- package/dist/lib/codex-install.js +92 -22
- package/dist/lib/global-install.js +93 -23
- package/package.json +1 -1
- package/plugin/skills/beacon-explain/SKILL.md +63 -0
- package/.next/server/chunks/2942.js +0 -1
- package/.next/server/chunks/2994.js +0 -2
- package/.next/server/chunks/3284.js +0 -154
- package/.next/server/chunks/5719.js +0 -1
- package/.next/static/chunks/3415-05007c2bd98125c7.js +0 -1
- package/.next/static/chunks/5957-83f611fcd5a08b45.js +0 -1
- package/.next/static/chunks/766-242213d211df0afd.js +0 -1
- package/.next/static/chunks/874-c750840a8644deb1.js +0 -1
- package/.next/static/chunks/8915-fa61a860c63a7c85.js +0 -62
- package/.next/static/chunks/8997-78a359d0d238622e.js +0 -1
- package/.next/static/chunks/app/_global-error/page-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-annotations/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/board-layout/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/bug-flags/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/code-graph/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/code-graph/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/feature/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/file/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/context/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/arrange/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/backfill-access/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/prune-planned/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/reconcile-endpoints/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/relations/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/db/tables/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/approve/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/draft/status/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/edges/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/edges/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/endpoints/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/entities/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/[id]/vote/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/feedback/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/flags/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/ingest/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/init/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/describe/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/files/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/finish/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/start/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/map/touch-active/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/mention-search/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/position/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/positions/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/nodes/subtasks/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/notes/[id]/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/notes/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/open/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/annotations/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/approve/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/history/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/markdown/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/presence/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/plan/verdict/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/preferences/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/project-meta/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/reset/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/scope-guard/check/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/share/create/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/share/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/stream/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/tab/nav/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/tab/presence/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/telemetry/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/telemetry/stats/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/version/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/workspace/activate/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/api/workspace/route-548a84d85e061550.js +0 -1
- package/.next/static/chunks/app/layout-3115f8503ff00902.js +0 -1
- package/.next/static/chunks/app/map/page-491d4767dbc4e954.js +0 -1
- package/.next/static/chunks/app/page-d08947a671077569.js +0 -1
- package/.next/static/chunks/app/plan/page-a90e0981499546e3.js +0 -1
- package/.next/static/chunks/app/s/[token]/page-5c8f260e75758b02.js +0 -1
- package/.next/static/chunks/app/settings/page-7e176d120b1effa9.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-548a84d85e061550.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-548a84d85e061550.js +0 -1
- package/.next/static/css/490566ec68a48e1a.css +0 -1
- package/.next/static/qoq7TibU72duRZATxeVnT/_buildManifest.js +0 -1
- /package/.next/static/{qoq7TibU72duRZATxeVnT → P3uXQySdS-m6_bxuiezYe}/_ssgManifest.js +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var
|
|
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(),
|
|
5
|
+
`.trimStart(),H(z,J.endsWith(`
|
|
6
6
|
`)?J:`${J}
|
|
7
|
-
`);let V
|
|
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
|
|
11
|
-
`),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:
|
|
12
|
-
`),{path:z,added:!0,updated:!1}}function
|
|
13
|
-
`)}}catch{}let V=!1,Y
|
|
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();
|
|
16
|
+
`).trimStart();H(Y,E.endsWith(`
|
|
17
17
|
`)?E:`${E}
|
|
18
|
-
`),V=!0}}catch{}let
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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:
|
|
@@ -214,6 +277,10 @@ Beacon extracts it deterministically and **strips the block from the prose** (it
|
|
|
214
277
|
|
|
215
278
|
**The board is built ONLY from the block \u2014 prose is NOT parsed.** If your plan describes ANY database models/tables/columns in the prose (e.g. "Model \`legal_precedent.py\` \u2014 natural key (court, \u2026)"), you MUST also put them in the block's \`tables\` array (with \`columns\`), or the /db tab will be empty for that plan. Same for endpoints (\`endpoints\` with \`uses:[{table,access}]\`) and features (\`features\`). A plan that lists five tables in prose but ships a block with only \`features\` renders an empty database board \u2014 exactly the "I described models but the DB tab is empty" failure. Mirror every DB entity you mention into the block.
|
|
216
279
|
|
|
280
|
+
### 2c. Mark the files you mention \u2014 write repo-relative paths in backticks
|
|
281
|
+
|
|
282
|
+
When a plan, feature, or architecture-component description mentions a source file, write its **repo-relative path inside backticks** \u2014 \`app/api/plan/route.ts\`, not "the plan route". On the /plan canvas Beacon turns every backticked token that matches a REAL repo file into a clickable mention that opens it in the user's editor; a bare filename matching several files (e.g. \`route.ts\`) opens a pick-one dropdown of the same-named candidates. The match is deterministic against the live code graph, so a path that isn't a real file just stays plain text \u2014 there's no special syntax to learn and no downside to over-marking: always name files by their real path so the reader can jump straight to the code.
|
|
283
|
+
|
|
217
284
|
### 3. At the end, register the work \u2014 in ONE call
|
|
218
285
|
|
|
219
286
|
Call \`beacon_feature({ action: "done" })\` **ONCE** with a \`features\` array \u2014 one entry per feature the plan created \u2014 each with the files you touched and a short markdown description. This flips each one to **Done** \u2014 including its sub-tasks (the cascade completes every PENDING/IN_PROGRESS child; a sub-task you did NOT finish must be set BLOCKED or CANCELLED before registering, so it survives visibly) \u2014 and keeps \`beacon_context_for_feature\` accurate for the next session.
|
|
@@ -225,18 +292,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
225
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.
|
|
226
293
|
|
|
227
294
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
228
|
-
${y}`});import{existsSync as M,mkdirSync as h,readdirSync as
|
|
229
|
-
`)}function
|
|
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}
|
|
230
297
|
${Q.trim()}
|
|
231
|
-
${J}`,Y="";try{Y=
|
|
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()}
|
|
232
299
|
|
|
233
300
|
${V}
|
|
234
301
|
`:`${V}
|
|
235
|
-
`,h(
|
|
302
|
+
`,h(e(q),{recursive:!0}),R(q,Y.endsWith(`
|
|
236
303
|
`)?Y:`${Y}
|
|
237
|
-
`)}function m(q,z){try{return
|
|
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,`
|
|
238
305
|
|
|
239
|
-
`).trimStart();return R(q,Y),!0}function
|
|
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)
|
|
240
307
|
|
|
241
308
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
242
309
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -250,6 +317,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
250
317
|
- User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
|
|
251
318
|
the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
|
|
252
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.
|
|
253
323
|
- Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
|
|
254
324
|
|
|
255
325
|
**The plan feedback loop**
|
|
@@ -257,17 +327,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
257
327
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
258
328
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
259
329
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
260
|
-
verbatim. Do NOT implement until the tool returns approval.`;var
|
|
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(`
|
|
261
331
|
`)?`
|
|
262
332
|
`:`
|
|
263
333
|
|
|
264
|
-
`,Q=q+J+
|
|
265
|
-
`),J=z.indexOf(
|
|
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(`
|
|
266
336
|
`).replace(/\n{3,}/g,`
|
|
267
337
|
|
|
268
|
-
`).replace(/^\n+/,"");if(
|
|
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}
|
|
269
339
|
[mcp_servers.beacon]
|
|
270
340
|
command = "beacon"
|
|
271
341
|
args = ["mcp"]
|
|
272
342
|
${Xq}
|
|
273
|
-
`});
|
|
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
|
|
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(),
|
|
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))
|
|
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
|
|
11
|
-
`),{path:z,added:!1,updated:!0};return{path:z,added:!1,updated:!1}}return J.mcpServers.beacon={command:"beacon",args:["mcp"],timeout:
|
|
12
|
-
`),{path:z,added:!0,updated:!1}}function
|
|
13
|
-
`)}}catch{}let V=!1,Y=$(q,"AGENTS.md");try{let Z=H(Y,"utf8"),
|
|
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();
|
|
16
|
+
`).trimStart();X(Y,d.endsWith(`
|
|
17
17
|
`)?d:`${d}
|
|
18
|
-
`),V=!0}}catch{}let
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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:
|
|
@@ -214,6 +277,10 @@ Beacon extracts it deterministically and **strips the block from the prose** (it
|
|
|
214
277
|
|
|
215
278
|
**The board is built ONLY from the block \u2014 prose is NOT parsed.** If your plan describes ANY database models/tables/columns in the prose (e.g. "Model \`legal_precedent.py\` \u2014 natural key (court, \u2026)"), you MUST also put them in the block's \`tables\` array (with \`columns\`), or the /db tab will be empty for that plan. Same for endpoints (\`endpoints\` with \`uses:[{table,access}]\`) and features (\`features\`). A plan that lists five tables in prose but ships a block with only \`features\` renders an empty database board \u2014 exactly the "I described models but the DB tab is empty" failure. Mirror every DB entity you mention into the block.
|
|
216
279
|
|
|
280
|
+
### 2c. Mark the files you mention \u2014 write repo-relative paths in backticks
|
|
281
|
+
|
|
282
|
+
When a plan, feature, or architecture-component description mentions a source file, write its **repo-relative path inside backticks** \u2014 \`app/api/plan/route.ts\`, not "the plan route". On the /plan canvas Beacon turns every backticked token that matches a REAL repo file into a clickable mention that opens it in the user's editor; a bare filename matching several files (e.g. \`route.ts\`) opens a pick-one dropdown of the same-named candidates. The match is deterministic against the live code graph, so a path that isn't a real file just stays plain text \u2014 there's no special syntax to learn and no downside to over-marking: always name files by their real path so the reader can jump straight to the code.
|
|
283
|
+
|
|
217
284
|
### 3. At the end, register the work \u2014 in ONE call
|
|
218
285
|
|
|
219
286
|
Call \`beacon_feature({ action: "done" })\` **ONCE** with a \`features\` array \u2014 one entry per feature the plan created \u2014 each with the files you touched and a short markdown description. This flips each one to **Done** \u2014 including its sub-tasks (the cascade completes every PENDING/IN_PROGRESS child; a sub-task you did NOT finish must be set BLOCKED or CANCELLED before registering, so it survives visibly) \u2014 and keeps \`beacon_context_for_feature\` accurate for the next session.
|
|
@@ -225,18 +292,18 @@ Register them all in that single batched call. If a plan added five features, th
|
|
|
225
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.
|
|
226
293
|
|
|
227
294
|
Pull raw planning data anytime with \`beacon_entities\` (features / architecture / tables / endpoints).
|
|
228
|
-
${
|
|
229
|
-
`)}function
|
|
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}
|
|
230
297
|
${Q.trim()}
|
|
231
|
-
${J}`,Y="";try{Y=
|
|
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()}
|
|
232
299
|
|
|
233
300
|
${V}
|
|
234
301
|
`:`${V}
|
|
235
|
-
`,o(
|
|
302
|
+
`,o(vq(q),{recursive:!0}),T(q,Y.endsWith(`
|
|
236
303
|
`)?Y:`${Y}
|
|
237
|
-
`)}function N(q,z){try{return
|
|
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,`
|
|
238
305
|
|
|
239
|
-
`).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
|
|
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)
|
|
240
307
|
|
|
241
308
|
This machine has Beacon installed \u2014 a local visual planning surface for the terminal-side
|
|
242
309
|
agent. Beacon proposes feature plans (roadmap features + DB schema + endpoints) via MCP,
|
|
@@ -250,6 +317,9 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
250
317
|
- User asks to "refresh Beacon" / "update the map" / "bring Beacon up to date" \u2192 invoke
|
|
251
318
|
the \`beacon-refresh\` skill. Re-surveys the repo and updates init-derived nodes while
|
|
252
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.
|
|
253
323
|
- Run \`beacon doctor\` to audit what's wired (global hooks, repo's .mcp.json, AGENTS.md block).
|
|
254
324
|
|
|
255
325
|
**The plan feedback loop**
|
|
@@ -257,17 +327,17 @@ the user reviews on a canvas at /plan, and feedback flows back as the next round
|
|
|
257
327
|
Feedback bundles inline annotations on the markdown PLUS any edits the user made directly
|
|
258
328
|
on the /map and /db boards (added features, attached subtasks, edited columns, new
|
|
259
329
|
endpoints). Treat board edits as the user's revision intent \u2014 re-propose matching them
|
|
260
|
-
verbatim. Do NOT implement until the tool returns approval.`;var qq=B(()=>{w=["beacon-init","beacon-refresh","beacon-plan"]});import{mkdirSync as
|
|
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(`
|
|
261
331
|
`)?`
|
|
262
332
|
`:`
|
|
263
333
|
|
|
264
|
-
`,Q=q+J+
|
|
265
|
-
`),J=z.indexOf(
|
|
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(`
|
|
266
336
|
`).replace(/\n{3,}/g,`
|
|
267
337
|
|
|
268
|
-
`).replace(/^\n+/,"");if(
|
|
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}
|
|
269
339
|
[mcp_servers.beacon]
|
|
270
340
|
command = "beacon"
|
|
271
341
|
args = ["mcp"]
|
|
272
|
-
${
|
|
273
|
-
`});qq();import{existsSync as
|
|
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
|
@@ -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.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=2942,exports.ids=[2942],exports.modules={2942:(a,b,c)=>{c.d(b,{F8:()=>s,NG:()=>o,QH:()=>p,Vq:()=>r,aM:()=>v,cV:()=>x,kz:()=>u,n$:()=>m,pO:()=>g,vB:()=>t});var d=c(48249),e=c(67484),f=c(33191);function g({markdown:a,className:b,variant:c="reading"}){let h=(0,e.useMemo)(()=>m(a),[a]),i="reading"===c;return(0,d.jsx)("div",{className:(0,f.cn)("min-w-0 [overflow-wrap:anywhere]",i?"mx-auto w-full max-w-[66ch] space-y-4 text-[15px] leading-[1.6]":"space-y-3.5 text-[13px] leading-relaxed",b),children:h.map((a,b)=>(0,d.jsx)(w,{block:a,variant:c},b))})}function h(a){let b=a.trim();return b.includes("|")&&b.includes("-")&&/^[\s|:-]+$/.test(b)}function i(a){return""!==a.trim()&&a.includes("|")}function j(a){let b=a.trim();return b.startsWith("|")&&(b=b.slice(1)),b.endsWith("|")&&(b=b.slice(0,-1)),b.split("|").map(a=>a.trim())}function k(a){let b=a.trim(),c=b.startsWith(":"),d=b.endsWith(":");return c&&d?"center":d?"right":c?"left":null}let l=/^\s*```[^\s`]*\s*$/;function m(a){let b=a.split("\n"),c=[],d=[],e=()=>{d.length&&(c.push({kind:"p",text:d.join("\n")}),d=[])},f=null,g=()=>{null!==f&&(c.push({kind:"quote",text:f.join("\n")}),f=null)},m=a=>Math.min(6,Math.floor(a.length/2)),n=null,o=null;for(let a=0;a<b.length;a++){let p=b[a];if(null!==n){l.test(p)?(c.push({kind:"code",text:n.join("\n")}),n=null):n.push(p);continue}let q=p.match(/^>\s?(.*)$/);if(q){e(),o=null,(f??=[]).push(q[1]);continue}if(g(),l.test(p)){e(),o=null,n=[];continue}if(/^\s*$/.test(p)){e(),o=null;continue}let r=p.match(/^#### +(.+)$/);if(r){e(),o=null,c.push({kind:"h4",text:r[1]});continue}let s=p.match(/^### +(.+)$/);if(s){e(),o=null,c.push({kind:"h3",text:s[1]});continue}let t=p.match(/^## +(.+)$/);if(t){e(),o=null,c.push({kind:"h2",text:t[1]});continue}let u=p.match(/^# +(.+)$/);if(u){e(),o=null,c.push({kind:"h1",text:u[1]});continue}if(i(p)&&a+1<b.length&&h(b[a+1])){e(),o=null;let d=[j(p)],f=j(b[a+1]).map(k),g=a+2;for(;g<b.length&&i(b[g])&&!h(b[g]);)d.push(j(b[g])),g++;c.push({kind:"table",text:b.slice(a,g).join("\n"),rows:d,align:f}),a=g-1;continue}let v=p.match(/^(\s*)(\d+)\. +(.+)$/);if(v){e(),c.push({kind:"ol",text:v[3],depth:m(v[1]),marker:v[2]}),o=c.length-1;continue}let w=p.match(/^(\s*)- +(.+)$/);if(w){e(),c.push({kind:"ul",text:w[2],depth:m(w[1])}),o=c.length-1;continue}if(null!==o&&0===d.length){c[o].text+=" "+p.trim();continue}d.push(p)}return e(),g(),null!==n&&c.push({kind:"code",text:n.join("\n")}),c}let n=/("(?:\\.|[^"\\])*")(\s*:)?|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g;function o({text:a}){let b=function(a){let b=a.trim();if(!b||"{"!==b[0]&&"["!==b[0])return null;try{return JSON.stringify(JSON.parse(b),null,2)}catch{return null}}(a);return(0,d.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-white/10 bg-white/[0.06] p-3 text-[12px] leading-relaxed",children:(0,d.jsx)("code",{className:"whitespace-pre font-mono [overflow-wrap:normal]",children:b?function(a){let b,c=[],e=0,f=0,g=a=>(0,d.jsx)("span",{className:"text-foreground/45",children:a},f++);for(n.lastIndex=0;null!==(b=n.exec(a));){if(b.index>e&&c.push(g(a.slice(e,b.index))),void 0!==b[1]){let a=void 0!==b[2];c.push((0,d.jsx)("span",{className:a?"text-sky-300":"text-emerald-300/90",children:b[1]},f++)),a&&b[2]&&c.push(g(b[2]))}else void 0!==b[3]?c.push((0,d.jsx)("span",{className:"text-purple-300",children:b[3]},f++)):void 0!==b[4]&&c.push((0,d.jsx)("span",{className:"text-amber-300",children:b[4]},f++));e=n.lastIndex}return e<a.length&&c.push(g(a.slice(e))),c}(b):(0,d.jsx)("span",{className:"text-foreground/85",children:a})})})}function p({block:a}){let b=a.rows??[];if(0===b.length)return null;let[c,...e]=b,g=a.align??[],h=a=>"center"===g[a]?"text-center":"right"===g[a]?"text-right":"text-left";return(0,d.jsx)("div",{className:"overflow-x-auto rounded-lg border border-white/10",children:(0,d.jsxs)("table",{className:"w-full border-collapse text-[13px] [overflow-wrap:normal]",children:[(0,d.jsx)("thead",{children:(0,d.jsx)("tr",{className:"border-b border-white/15 bg-white/[0.04]",children:c.map((a,b)=>(0,d.jsx)("th",{className:(0,f.cn)("whitespace-nowrap px-3 py-1.5 font-semibold text-foreground",h(b)),children:(0,d.jsx)(x,{text:a})},b))})}),(0,d.jsx)("tbody",{children:e.map((a,b)=>(0,d.jsx)("tr",{className:"border-b border-white/5 last:border-0",children:a.map((a,b)=>(0,d.jsx)("td",{className:(0,f.cn)("px-3 py-1.5 align-top text-foreground/90",h(b)),children:(0,d.jsx)(x,{text:a})},b))},b))})]})})}let q=["h1","h2","h3","h4"];function r(a){return q.includes(a)}function s(a){let b=q.indexOf(a);return b<0?0:b}function t(a){return`plan-h-${a}`}function u(a){return a.replace(/[`*]/g,"").trim()}function v(a,b,c,e){let g="reading"===c;switch(a.kind){case"h1":return(0,d.jsx)("h1",{id:e,className:g?"scroll-mt-24 text-xl font-semibold tracking-tight text-foreground":"text-base font-semibold text-foreground",children:b});case"h2":return(0,d.jsx)("h2",{id:e,className:g?"mt-6 scroll-mt-24 border-b border-white/10 pb-1 text-lg font-semibold text-foreground":"mt-3 text-sm font-semibold text-muted-foreground",children:b});case"h3":return(0,d.jsx)("h3",{id:e,className:g?"mt-4 scroll-mt-24 text-base font-semibold text-foreground":"mt-2 text-[13px] font-semibold text-foreground",children:b});case"h4":return(0,d.jsx)("h4",{id:e,className:g?"mt-3 scroll-mt-24 text-sm font-semibold text-muted-foreground":"mt-2 text-[13px] font-semibold text-muted-foreground",children:b});case"ul":case"ol":{let c=a.depth??0;return(0,d.jsxs)("div",{className:(0,f.cn)("flex gap-2",g?"text-foreground/95":"text-foreground/90"),style:{marginLeft:`${.75+1.25*c}rem`},children:[(0,d.jsx)("span",{className:"shrink-0 select-none text-muted-foreground tabular-nums",children:"ol"===a.kind?`${a.marker}.`:"•"}),(0,d.jsx)("span",{className:"min-w-0 flex-1",children:b})]})}case"quote":return(0,d.jsx)("blockquote",{className:(0,f.cn)("whitespace-pre-wrap border-l-2 pl-3 italic",g?"border-white/15 text-foreground/80":"border-white/10 text-foreground/75"),children:b});default:return(0,d.jsx)("p",{className:(0,f.cn)("whitespace-pre-wrap",g?"text-foreground/95":"text-foreground/90"),children:b})}}function w({block:a,variant:b}){return"code"===a.kind?(0,d.jsx)(o,{text:a.text}):"table"===a.kind?(0,d.jsx)(p,{block:a}):(0,d.jsx)(d.Fragment,{children:v(a,(0,d.jsx)(x,{text:a.text}),b)})}function x({text:a}){let b=a.split(/(`[^`]+`|\*\*[\s\S]+?\*\*|\*[^*]+\*)/g);return(0,d.jsx)(d.Fragment,{children:b.map((a,b)=>/^`[^`]+`$/.test(a)?(0,d.jsx)("code",{className:"rounded bg-white/5 px-1 font-mono text-[12px]",children:a.slice(1,-1)},b):/^\*\*[\s\S]+\*\*$/.test(a)?(0,d.jsx)("strong",{className:"font-semibold text-foreground",children:(0,d.jsx)(x,{text:a.slice(2,-2)})},b):/^\*[^*]+\*$/.test(a)?(0,d.jsx)("em",{className:"text-muted-foreground",children:(0,d.jsx)(x,{text:a.slice(1,-1)})},b):(0,d.jsx)("span",{children:a},b))})}}};
|