@plebeiantech/lat.md 0.12.3-fork.9 → 0.13.4-fork.1
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/README.md +27 -3
- package/dist/src/cli/agent-invocation.d.ts +6 -0
- package/dist/src/cli/agent-invocation.js +23 -0
- package/dist/src/cli/checklist-menu.d.ts +2 -1
- package/dist/src/cli/checklist-menu.js +3 -2
- package/dist/src/cli/fork-instructions.d.ts +1 -0
- package/dist/src/cli/fork-instructions.js +8 -32
- package/dist/src/cli/fork-scaffold.js +2 -2
- package/dist/src/cli/graph.d.ts +1 -1
- package/dist/src/cli/hook.d.ts +26 -0
- package/dist/src/cli/hook.js +115 -64
- package/dist/src/cli/index.js +147 -70
- package/dist/src/cli/init-preferences.d.ts +4 -0
- package/dist/src/cli/init-preferences.js +36 -0
- package/dist/src/cli/init.d.ts +2 -1
- package/dist/src/cli/init.js +100 -60
- package/dist/src/cli/reindex.d.ts +1 -1
- package/dist/src/cli/reindex.js +7 -10
- package/dist/src/cli/search.d.ts +14 -4
- package/dist/src/cli/search.js +115 -101
- package/dist/src/cli/ui-build-server.d.ts +12 -0
- package/dist/src/cli/ui-build-server.js +26 -0
- package/dist/src/cli/ui-build.d.ts +1 -1
- package/dist/src/cli/ui-build.js +1 -1
- package/dist/src/cli/ui.d.ts +1 -1
- package/dist/src/cli/ui.js +1 -1
- package/dist/src/fork/antigravity-hook.d.ts +47 -0
- package/dist/src/fork/antigravity-hook.js +424 -0
- package/dist/src/fork/antigravity-init.d.ts +17 -0
- package/dist/src/fork/antigravity-init.js +124 -0
- package/dist/src/fork/upstream-drift.js +1 -1
- package/dist/src/fork/upstream-guard.d.ts +1 -1
- package/dist/src/fork/upstream-guard.js +8 -7
- package/dist/src/graph-export.js +7 -7
- package/dist/src/knowledge/index.js +2 -2
- package/dist/src/mcp/server.js +34 -18
- package/dist/src/search/cache.d.ts +3 -0
- package/dist/src/search/cache.js +104 -0
- package/dist/src/search/chunks.d.ts +23 -0
- package/dist/src/search/chunks.js +200 -0
- package/dist/src/search/db.d.ts +28 -16
- package/dist/src/search/db.js +100 -40
- package/dist/src/search/embedder.d.ts +2 -1
- package/dist/src/search/embedder.js +7 -6
- package/dist/src/search/index.d.ts +6 -2
- package/dist/src/search/index.js +176 -70
- package/dist/src/search/lexical.d.ts +6 -0
- package/dist/src/search/lexical.js +36 -0
- package/dist/src/search/lock.d.ts +5 -0
- package/dist/src/search/lock.js +45 -0
- package/dist/src/search/query.d.ts +26 -0
- package/dist/src/search/query.js +103 -0
- package/dist/src/search/search.d.ts +16 -7
- package/dist/src/search/search.js +165 -21
- package/dist/src/search/types.d.ts +15 -0
- package/dist/src/view/client/assets/GraphView-D_xnk0bP.js +456 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/src/view/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/src/view/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/src/view/client/assets/MarkdownEditor-bjqt_FoF.js +28 -0
- package/dist/src/view/client/assets/OrbitControls-DwcpQNja.js +1 -0
- package/dist/src/view/client/assets/STLLoader-CLWTKt5i.js +1 -0
- package/dist/src/view/client/assets/_commonjsHelpers-CqkleIqs.js +1 -0
- package/dist/src/view/client/assets/abnfDiagram-VCTEODGH-kWGvtRnL.js +1 -0
- package/dist/src/view/client/assets/arc-BPAFd7cP.js +1 -0
- package/dist/src/view/client/assets/architectureDiagram-5GKGNRK7-CsY39oIR.js +36 -0
- package/dist/src/view/client/assets/blockDiagram-I7D4REHJ-DHGBG7BJ.js +129 -0
- package/dist/src/view/client/assets/c4Diagram-7LVT6UL2-vywK4eb7.js +38 -0
- package/dist/src/view/client/assets/channel-CX71L_qV.js +1 -0
- package/dist/src/view/client/assets/chunk-2Q5K7J3B-Do3Hz_ci.js +1 -0
- package/dist/src/view/client/assets/chunk-5VM5RSS4-B5R1lSeY.js +15 -0
- package/dist/src/view/client/assets/chunk-F27PBJKO-Dm55FM_W.js +1 -0
- package/dist/src/view/client/assets/chunk-IMKFNOWR-ChptrvvM.js +231 -0
- package/dist/src/view/client/assets/chunk-JWPE2WC7-BRQBjrKS.js +1 -0
- package/dist/src/view/client/assets/chunk-POPQ4Y6H-CainVZIL.js +1 -0
- package/dist/src/view/client/assets/chunk-SVP7TREG-DsKsNGmM.js +88 -0
- package/dist/src/view/client/assets/chunk-TICWLB2K-BctkMcJc.js +206 -0
- package/dist/src/view/client/assets/chunk-XXDRQBXY-BN7SgOUT.js +1 -0
- package/dist/src/view/client/assets/classDiagram-ZZMXUADV-B1VyU6zO.js +1 -0
- package/dist/src/view/client/assets/classDiagram-v2-VYDZK3BY-B1VyU6zO.js +1 -0
- package/dist/src/view/client/assets/cose-bilkent-JH36ORCC-BszzwrMe.js +1 -0
- package/dist/src/view/client/assets/cynefin-OW5HDTMX-CdRyAkPs.js +166 -0
- package/dist/src/view/client/assets/cynefinDiagram-5FMLGOSQ-BLvKPZ1u.js +62 -0
- package/dist/src/view/client/assets/cytoscape.esm-DzSz-X2X.js +321 -0
- package/dist/src/view/client/assets/dagre-GXQ25YYZ-V68w_l65.js +4 -0
- package/dist/src/view/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/src/view/client/assets/diagram-S7CK7UJ4-C2i4eEMg.js +30 -0
- package/dist/src/view/client/assets/diagram-UQ7AKVKN-BiwWh5jC.js +41 -0
- package/dist/src/view/client/assets/diagram-VSXAHHWV-hkKR_vyS.js +3 -0
- package/dist/src/view/client/assets/diagram-VX7I27RA-DzRCSMAc.js +24 -0
- package/dist/src/view/client/assets/diagram-Z3DM3KII-fhSFPxyK.js +24 -0
- package/dist/src/view/client/assets/ebnfDiagram-PWID7BFC-CCEUDKSA.js +1 -0
- package/dist/src/view/client/assets/erDiagram-RLTQ6QDP-FJ2IMyTi.js +99 -0
- package/dist/src/view/client/assets/flowDiagram-HODETNUW-BvasdLeK.js +168 -0
- package/dist/src/view/client/assets/ganttDiagram-EL5Y4UJY-CiwkBZvY.js +292 -0
- package/dist/src/view/client/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/src/view/client/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/src/view/client/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/src/view/client/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/src/view/client/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/src/view/client/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/src/view/client/assets/gitGraphDiagram-WWUBYQGX-DYlP2_js.js +106 -0
- package/dist/src/view/client/assets/index-BnENo9bV.js +1 -0
- package/dist/src/view/client/assets/index-CQ7EOox7.css +1 -0
- package/dist/src/view/client/assets/index-CynNDkxt.js +13 -0
- package/dist/src/view/client/assets/infoDiagram-27XIBGKW-DRPB2c48.js +2 -0
- package/dist/src/view/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/src/view/client/assets/ishikawaDiagram-5VMMS53U-8VV429Cv.js +70 -0
- package/dist/src/view/client/assets/journeyDiagram-3NMN7TZE-Dzmwnf83.js +139 -0
- package/dist/src/view/client/assets/kanban-definition-UXKFOSKX-pYyZZ1i-.js +89 -0
- package/dist/src/view/client/assets/katex-HP8lGamR.js +257 -0
- package/dist/src/view/client/assets/layout-GF9k6yGo.js +1 -0
- package/dist/src/view/client/assets/linear-Yt2sSOYV.js +1 -0
- package/dist/src/view/client/assets/logo-RR_KBOAT.svg +149 -0
- package/dist/src/view/client/assets/maplibre-gl-CDX6Zuow.js +800 -0
- package/dist/src/view/client/assets/mermaid.core-ChWYCHN0.js +310 -0
- package/dist/src/view/client/assets/mindmap-definition-YA3MSWOX-Cc4fQvf1.js +96 -0
- package/dist/src/view/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/src/view/client/assets/pegDiagram-XKGWAZYB-C0SsB8bZ.js +1 -0
- package/dist/src/view/client/assets/pieDiagram-E7YTZNPT-DIJpqERZ.js +39 -0
- package/dist/src/view/client/assets/quadrantDiagram-AXDQQJYC--d-gl6j-.js +7 -0
- package/dist/src/view/client/assets/railroadDiagram-O6MQD6OU-BQxwTt7z.js +1 -0
- package/dist/src/view/client/assets/requirementDiagram-BXWQKSXE-B_oTeD2A.js +84 -0
- package/dist/src/view/client/assets/sankeyDiagram-P5KCCOFB-DLukmE8X.js +40 -0
- package/dist/src/view/client/assets/sequenceDiagram-WJ2MYXX4-BNjVB2sc.js +162 -0
- package/dist/src/view/client/assets/sizeCapture-INFHLROL-BZecQTOw.js +1 -0
- package/dist/src/view/client/assets/stateDiagram-D77RDMKH-Bu1urvXC.js +1 -0
- package/dist/src/view/client/assets/stateDiagram-v2-MP3YSRHH-5pc_697G.js +1 -0
- package/dist/src/view/client/assets/swimlanes-42K2YHIH-bLAlcepB.js +1 -0
- package/dist/src/view/client/assets/swimlanesDiagram-VR7AAH4N-BbOpZjpp.js +8 -0
- package/dist/src/view/client/assets/three.module-PDSP0dbZ.js +4108 -0
- package/dist/src/view/client/assets/timeline-definition-24CTP7MA-tbwCNvcA.js +120 -0
- package/dist/src/view/client/assets/vennDiagram-4TSXK5OY-D8U8Fk0N.js +34 -0
- package/dist/src/view/client/assets/wardleyDiagram-VM6X3IG4-LHBVIeNb.js +78 -0
- package/dist/src/view/client/assets/xychartDiagram-S5SC5T6Z-CN4tfaFV.js +7 -0
- package/dist/src/view/client/index.html +2 -2
- package/dist/src/view/client-shell.d.ts +2 -0
- package/dist/src/view/client-shell.js +5 -0
- package/dist/src/view/diagnostics.d.ts +3 -2
- package/dist/src/view/diagnostics.js +49 -58
- package/dist/src/view/document-edit.d.ts +8 -0
- package/dist/src/view/document-edit.js +25 -0
- package/dist/src/view/document-route.d.ts +14 -0
- package/dist/src/view/document-route.js +137 -0
- package/dist/src/view/document-tree.d.ts +18 -0
- package/dist/src/view/document-tree.js +139 -0
- package/dist/src/view/external-document-tree.d.ts +3 -0
- package/dist/src/view/external-document-tree.js +674 -0
- package/dist/src/view/git-diff.js +202 -2
- package/dist/src/view/git.js +1 -1
- package/dist/src/view/graph.d.ts +4 -3
- package/dist/src/view/graph.js +100 -9
- package/dist/src/view/highlight.d.ts +10 -2
- package/dist/src/view/highlight.js +50648 -3166
- package/dist/src/view/markdown.d.ts +3 -2
- package/dist/src/view/markdown.js +256 -54
- package/dist/src/view/preindexed-search.d.ts +15 -0
- package/dist/src/view/preindexed-search.js +25 -0
- package/dist/src/view/protocol.d.ts +53 -7
- package/dist/src/view/publication.d.ts +2 -0
- package/dist/src/view/publication.js +78 -0
- package/dist/src/view/references.d.ts +11 -26
- package/dist/src/view/references.js +121 -112
- package/dist/src/view/repository.d.ts +14 -4
- package/dist/src/view/repository.js +260 -19
- package/dist/src/view/request-security.d.ts +5 -0
- package/dist/src/view/request-security.js +46 -0
- package/dist/src/view/search-result.d.ts +4 -0
- package/dist/src/view/search-result.js +25 -0
- package/dist/src/view/search.d.ts +7 -2
- package/dist/src/view/search.js +23 -34
- package/dist/src/view/server-build.d.ts +21 -0
- package/dist/src/view/server-build.js +145 -0
- package/dist/src/view/server-deployment.d.ts +31 -0
- package/dist/src/view/server-deployment.js +123 -0
- package/dist/src/view/server-index-worker.d.ts +6 -0
- package/dist/src/view/server-index-worker.js +14 -0
- package/dist/src/view/server.d.ts +11 -2
- package/dist/src/view/server.js +245 -73
- package/dist/src/view/source-target.d.ts +2 -0
- package/dist/src/view/source-target.js +49 -8
- package/dist/src/view/static-build.d.ts +18 -2
- package/dist/src/view/static-build.js +449 -110
- package/dist/src/view/static-protocol.d.ts +26 -2
- package/dist/src/view/static-protocol.js +5 -0
- package/dist/src/view/store.d.ts +20 -3
- package/dist/src/view/store.js +304 -48
- package/dist/src/view/table-of-contents.d.ts +2 -2
- package/dist/src/view/table-of-contents.js +2 -22
- package/dist/src/view/vercel-build.d.ts +24 -0
- package/dist/src/view/vercel-build.js +152 -0
- package/dist/src/view/vercel-server-build.d.ts +10 -0
- package/dist/src/view/vercel-server-build.js +61 -0
- package/dist/vendor/lat.md-server/cli.d.ts +2 -0
- package/dist/vendor/lat.md-server/cli.js +12 -0
- package/dist/vendor/lat.md-server/index.d.ts +38 -0
- package/dist/vendor/lat.md-server/index.js +128 -0
- package/package.json +68 -22
- package/plugins/lat-md/README.md +61 -0
- package/plugins/lat-md/hooks.json +38 -0
- package/plugins/lat-md/plugin.json +9 -0
- package/plugins/lat-md/rules/AGENTS.md +344 -0
- package/plugins/lat-md/skills/lat-md/SKILL.md +210 -0
- package/plugins/lat-md/skills/lat-md-conventions/SKILL.md +226 -0
- package/templates/AGENTS.md +26 -7
- package/templates/cursor-rules.md +23 -7
- package/templates/fork/conventions.md +133 -11
- package/templates/opencode-plugin.ts +9 -9
- package/templates/pi-extension.ts +11 -11
- package/templates/skill/SKILL.md +35 -3
- package/dist/src/cli/check-coverage.d.ts +0 -2
- package/dist/src/cli/check-coverage.js +0 -71
- package/dist/src/cli/check-frontmatter.d.ts +0 -12
- package/dist/src/cli/check-frontmatter.js +0 -44
- package/dist/src/cli/check-mode.d.ts +0 -21
- package/dist/src/cli/check-mode.js +0 -364
- package/dist/src/cli/check-status.d.ts +0 -74
- package/dist/src/cli/check-status.js +0 -217
- package/dist/src/cli/check.d.ts +0 -45
- package/dist/src/cli/check.js +0 -781
- package/dist/src/cli/context.d.ts +0 -11
- package/dist/src/cli/context.js +0 -58
- package/dist/src/cli/expand.d.ts +0 -8
- package/dist/src/cli/expand.js +0 -94
- package/dist/src/cli/gen-index.d.ts +0 -45
- package/dist/src/cli/gen-index.js +0 -235
- package/dist/src/cli/link-scheme.d.ts +0 -54
- package/dist/src/cli/link-scheme.js +0 -101
- package/dist/src/cli/locate.d.ts +0 -2
- package/dist/src/cli/locate.js +0 -17
- package/dist/src/cli/refs.d.ts +0 -22
- package/dist/src/cli/refs.js +0 -229
- package/dist/src/cli/section.d.ts +0 -43
- package/dist/src/cli/section.js +0 -252
- package/dist/src/cli/select-menu.d.ts +0 -13
- package/dist/src/cli/select-menu.js +0 -100
- package/dist/src/code-refs.d.ts +0 -17
- package/dist/src/code-refs.js +0 -298
- package/dist/src/config.d.ts +0 -29
- package/dist/src/config.js +0 -83
- package/dist/src/context.d.ts +0 -23
- package/dist/src/context.js +0 -11
- package/dist/src/extensions/wiki-link/from-markdown.d.ts +0 -5
- package/dist/src/extensions/wiki-link/from-markdown.js +0 -34
- package/dist/src/extensions/wiki-link/index.d.ts +0 -4
- package/dist/src/extensions/wiki-link/index.js +0 -3
- package/dist/src/extensions/wiki-link/syntax.d.ts +0 -14
- package/dist/src/extensions/wiki-link/syntax.js +0 -121
- package/dist/src/extensions/wiki-link/to-markdown.d.ts +0 -5
- package/dist/src/extensions/wiki-link/to-markdown.js +0 -28
- package/dist/src/extensions/wiki-link/types.d.ts +0 -34
- package/dist/src/format.d.ts +0 -8
- package/dist/src/format.js +0 -43
- package/dist/src/init-version.d.ts +0 -10
- package/dist/src/init-version.js +0 -49
- package/dist/src/lattice.d.ts +0 -109
- package/dist/src/lattice.js +0 -817
- package/dist/src/parser.d.ts +0 -3
- package/dist/src/parser.js +0 -18
- package/dist/src/source-parser.d.ts +0 -27
- package/dist/src/source-parser.js +0 -916
- package/dist/src/untrusted.d.ts +0 -18
- package/dist/src/untrusted.js +0 -93
- package/dist/src/view/client/assets/index-C3iaZyYT.css +0 -1
- package/dist/src/view/client/assets/index-KWi67IMz.js +0 -334
- package/dist/src/view/client/assets/logo-CNF8zs47.svg +0 -182
- package/dist/src/walk.d.ts +0 -18
- package/dist/src/walk.js +0 -27
- /package/dist/src/{extensions/wiki-link → search}/types.js +0 -0
|
@@ -30,12 +30,12 @@ function collapsibleResult(
|
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
const LAT =
|
|
33
|
+
/** Executable and prefix arguments, injected by `lat init`. */
|
|
34
|
+
const LAT = __LAT_INVOCATION__;
|
|
35
35
|
|
|
36
36
|
function run(args: string[], cwd?: string): string {
|
|
37
|
-
const {
|
|
38
|
-
return
|
|
37
|
+
const { execFileSync } = require("child_process") as typeof import('child_process');
|
|
38
|
+
return execFileSync(LAT.command, [...LAT.args, ...args], {
|
|
39
39
|
cwd: cwd ?? process.cwd(),
|
|
40
40
|
encoding: "utf-8",
|
|
41
41
|
timeout: 30_000,
|
|
@@ -69,7 +69,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
69
69
|
),
|
|
70
70
|
}),
|
|
71
71
|
async execute(_id, params) {
|
|
72
|
-
const args = ["search",
|
|
72
|
+
const args = ["search", params.query];
|
|
73
73
|
if (params.limit) args.push("--limit", String(params.limit));
|
|
74
74
|
const output = tryRun(args);
|
|
75
75
|
return {
|
|
@@ -99,7 +99,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
99
99
|
}),
|
|
100
100
|
}),
|
|
101
101
|
async execute(_id, params) {
|
|
102
|
-
const output = tryRun(["section",
|
|
102
|
+
const output = tryRun(["section", params.query]);
|
|
103
103
|
return {
|
|
104
104
|
content: [
|
|
105
105
|
{ type: "text", text: output || "Section not found." },
|
|
@@ -126,7 +126,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
126
126
|
query: Type.String({ description: "Section name to locate" }),
|
|
127
127
|
}),
|
|
128
128
|
async execute(_id, params) {
|
|
129
|
-
const output = tryRun(["locate",
|
|
129
|
+
const output = tryRun(["locate", params.query]);
|
|
130
130
|
return {
|
|
131
131
|
content: [
|
|
132
132
|
{ type: "text", text: output || "No sections matching query." },
|
|
@@ -179,7 +179,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
179
179
|
text: Type.String({ description: "Text containing [[refs]] to expand" }),
|
|
180
180
|
}),
|
|
181
181
|
async execute(_id, params) {
|
|
182
|
-
const output = tryRun(["expand",
|
|
182
|
+
const output = tryRun(["expand", params.text]);
|
|
183
183
|
return {
|
|
184
184
|
content: [{ type: "text", text: output || params.text }],
|
|
185
185
|
};
|
|
@@ -205,7 +205,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
205
205
|
}),
|
|
206
206
|
}),
|
|
207
207
|
async execute(_id, params) {
|
|
208
|
-
const output = tryRun(["refs",
|
|
208
|
+
const output = tryRun(["refs", params.query]);
|
|
209
209
|
return {
|
|
210
210
|
content: [{ type: "text", text: output || "No references found." }],
|
|
211
211
|
};
|
|
@@ -276,7 +276,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
276
276
|
"Use `lat_section` to read the full content of relevant matches.",
|
|
277
277
|
"Do not read files, write code, or run commands until you have searched.",
|
|
278
278
|
"",
|
|
279
|
-
"Remember: `lat.md/` must stay in sync with meaningful codebase state. If you change behavior, architecture,
|
|
279
|
+
"Remember: `lat.md/` must stay in sync with meaningful codebase state. If you change implemented behavior, architecture, or tests, update the relevant current-state sections and run `lat_check` before finishing. Plans may be drafted in `lat.md/` alongside implementation, with the intent that by commit time they describe what was implemented. Otherwise, keep proposals, hypothetical designs, and future work outside `lat.md/` unless the user explicitly requests them there. Do not use `lat.md/` as a journal/changelog or add notes for insignificant details.",
|
|
280
280
|
].join("\n");
|
|
281
281
|
|
|
282
282
|
return {
|
|
@@ -307,7 +307,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
307
307
|
let needsSync = false;
|
|
308
308
|
let codeLines = 0;
|
|
309
309
|
try {
|
|
310
|
-
const { execSync } = require("child_process") as typeof import(
|
|
310
|
+
const { execSync } = require("child_process") as typeof import('child_process');
|
|
311
311
|
const numstat = execSync("git diff HEAD --numstat", {
|
|
312
312
|
encoding: "utf-8",
|
|
313
313
|
cwd: process.cwd(),
|
package/templates/skill/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Project-specific lat documentation belongs in `lat.md/`. Do not modify this gene
|
|
|
16
16
|
|
|
17
17
|
`lat.md/` files describe **what** the project does and **why** — domain concepts, key design decisions, business logic, and test specifications. They do NOT duplicate source code. Think of each section as an anchor that source code references back to.
|
|
18
18
|
|
|
19
|
-
Treat `lat.md/` as a focused snapshot of the current state
|
|
19
|
+
Treat `lat.md/` as a focused snapshot of the current implemented state. Plans may be drafted in `lat.md/` alongside implementation, with the intent that by commit time they describe what was implemented. Otherwise, keep proposals, hypothetical designs, and future work outside `lat.md/` unless the user explicitly requests them there. A planning-only task does not require a knowledge-graph update. Do not use it as a journal or changelog, and do not grow it just to record insignificant implementation details.
|
|
20
20
|
|
|
21
21
|
Good candidates for sections:
|
|
22
22
|
- Architecture decisions and their rationale
|
|
@@ -29,6 +29,7 @@ Bad candidates:
|
|
|
29
29
|
- Step-by-step code walkthroughs (the code itself is the walkthrough)
|
|
30
30
|
- Auto-generated API docs (use tools for that)
|
|
31
31
|
- Journal/changelog entries for each change
|
|
32
|
+
- Proposals, planned features, hypothetical designs, or promises of future behavior, unless explicitly requested by the user or drafted alongside implementation to describe implemented behavior by commit time
|
|
32
33
|
- Temporary notes or TODOs
|
|
33
34
|
- Insignificant implementation details that do not change the current-state model
|
|
34
35
|
|
|
@@ -60,6 +61,14 @@ This is invalid — "Bad Section" has no leading paragraph.
|
|
|
60
61
|
|
|
61
62
|
`lat check` enforces this rule.
|
|
62
63
|
|
|
64
|
+
## Diagrams
|
|
65
|
+
|
|
66
|
+
Default to prose. Reserve Mermaid diagrams for concepts involving more than seven interacting subjects (such as components, states, or stages) with complex sequencing, branching, or dependencies that prose alone makes hard to follow.
|
|
67
|
+
|
|
68
|
+
The subject count alone does not justify a diagram; omit diagrams for simple sequences or relationships that a short paragraph or list explains clearly. A diagram should give users and later agents an overview of the interactions.
|
|
69
|
+
|
|
70
|
+
Keep each diagram focused on one process, use readable labels, and explain the important decisions in surrounding prose with precise source-symbol links. Prefer a small overview or several focused diagrams over one dense diagram. Use fenced `mermaid` blocks and run `lat check` to validate syntax and readability.
|
|
71
|
+
|
|
63
72
|
## Section IDs
|
|
64
73
|
|
|
65
74
|
Sections are addressed by file path and heading chain:
|
|
@@ -69,17 +78,38 @@ Sections are addressed by file path and heading chain:
|
|
|
69
78
|
|
|
70
79
|
Examples: `lat.md/tests/search#RAG Replay Tests`, `cli#init`, `parser#Wiki Links`.
|
|
71
80
|
|
|
81
|
+
Configured external sources use `[[handle:path/to/file.md#Heading]]` for
|
|
82
|
+
Markdown headings and `[[handle:path/to/file.ts#symbol]]` for supported code
|
|
83
|
+
symbols. Run `lat external show <handle>` before cloning an external source;
|
|
84
|
+
its output includes the pinned commit and safe checkout suggestions.
|
|
85
|
+
|
|
72
86
|
## Wiki links
|
|
73
87
|
|
|
74
88
|
Cross-reference other sections or source code with `[[target]]` or `[[target|alias]]`.
|
|
75
89
|
|
|
90
|
+
When documenting implemented behavior, prefer the narrowest relevant source-symbol link over a whole-file link. Use whole-file or directory links when discussing the module or resource as a whole, or when no supported symbol represents the target. If prose names a symbol, link that symbol directly.
|
|
91
|
+
|
|
76
92
|
### Section links
|
|
77
93
|
|
|
94
|
+
Section links connect related concepts while keeping their stable graph identities explicit.
|
|
95
|
+
|
|
78
96
|
```markdown
|
|
79
97
|
See [[cli#init]] for setup details.
|
|
80
98
|
The parser validates [[parser#Wiki Links|wiki link syntax]].
|
|
81
99
|
```
|
|
82
100
|
|
|
101
|
+
### Repository path links
|
|
102
|
+
|
|
103
|
+
Reference any existing file or directory beneath the project root without a fragment:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
[[schema.sql]]
|
|
107
|
+
[[CHANGELOG]]
|
|
108
|
+
[[src/components]]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Unsupported formats validate as references but cannot be opened by Lat. A `#fragment` requires a `lat.md/` section or a supported source file.
|
|
112
|
+
|
|
83
113
|
### Source code links
|
|
84
114
|
|
|
85
115
|
Reference functions, classes, constants, and methods in source files:
|
|
@@ -93,6 +123,8 @@ Reference functions, classes, constants, and methods in source files:
|
|
|
93
123
|
[[src/app.h#Greeter]] — C struct
|
|
94
124
|
```
|
|
95
125
|
|
|
126
|
+
When prose names an implementation symbol or a behavior governed by one, link the symbol instead of using a bare code span or copying its literal value. Prefer `[[src/config.ts#DEFAULT_TIMEOUT]]` (or `[[src/config.ts#DEFAULT_TIMEOUT|the default timeout]]`) over a bare identifier or copied value. Keep the behavioral explanation in prose; the link makes its implementation binding navigable and validated.
|
|
127
|
+
|
|
96
128
|
`lat check` validates that all targets exist.
|
|
97
129
|
|
|
98
130
|
## Code refs
|
|
@@ -110,7 +142,7 @@ def init():
|
|
|
110
142
|
...
|
|
111
143
|
```
|
|
112
144
|
|
|
113
|
-
Supported comment styles: `//` (JS/TS/Rust/Go/C) and `#` (Python).
|
|
145
|
+
Supported comment styles: `//` (JS/TS/Rust/Go/C/PHP) and `#` (Python/PHP).
|
|
114
146
|
|
|
115
147
|
Place one `@lat:` comment per section, at the relevant code — not at the top of the file.
|
|
116
148
|
|
|
@@ -169,7 +201,7 @@ Currently the only supported field is `require-code-mention` for test spec enfor
|
|
|
169
201
|
## Validation
|
|
170
202
|
|
|
171
203
|
Always run `lat check` after editing `lat.md/` files. It validates:
|
|
172
|
-
- All wiki links point to existing sections or source code symbols
|
|
204
|
+
- All wiki links point to existing sections, repository paths, or source code symbols
|
|
173
205
|
- All relative markdown links point to existing files
|
|
174
206
|
- Full and collapsed reference-style links have definitions
|
|
175
207
|
- All `@lat:` code refs point to existing sections
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { relative } from 'node:path';
|
|
3
|
-
import { scanCodeRefs } from '../code-refs.js';
|
|
4
|
-
import { listLatticeFiles } from '../lattice.js';
|
|
5
|
-
import { indexNameFor } from './check-mode.js';
|
|
6
|
-
import { toPosix } from '../walk.js';
|
|
7
|
-
import { basename, dirname } from 'node:path';
|
|
8
|
-
/**
|
|
9
|
-
* Fail a `lat.md/` tree that has documents and no `@lat:` ref pointing into it
|
|
10
|
-
* from anywhere in the codebase.
|
|
11
|
-
*
|
|
12
|
-
* `require-code-mention` was the only thing asking for refs, and it is opt-in
|
|
13
|
-
* frontmatter: an agent setting up a tree can simply not write it, and every
|
|
14
|
-
* check still passes. One did. Its reasons were both ordinary — it read a list
|
|
15
|
-
* of example comment markers as an exclusive language list and concluded its
|
|
16
|
-
* language was unsupported, and it was optimising for a green check rather
|
|
17
|
-
* than a correct one, so the option that could not fail was the one it took.
|
|
18
|
-
*
|
|
19
|
-
* A graph nothing points at cannot be reached from the code, which is the only
|
|
20
|
-
* reason it exists. So the floor is one ref, and the message says where to put
|
|
21
|
-
* the first one.
|
|
22
|
-
*
|
|
23
|
-
* Deliberately a floor and not a coverage ratio. Half this repository's own
|
|
24
|
-
* documents have no incoming ref and should not have one — a per-document rule
|
|
25
|
-
* would have to be either wrong here or watered down everywhere.
|
|
26
|
-
*/
|
|
27
|
-
/** Nothing to anchor: a tree of pure navigation, or a project with no code. */
|
|
28
|
-
function isIndex(latticeDir, file) {
|
|
29
|
-
const holder = basename(dirname(file));
|
|
30
|
-
return (basename(file) ===
|
|
31
|
-
indexNameFor(holder === '' ? basename(latticeDir) : holder));
|
|
32
|
-
}
|
|
33
|
-
export async function checkCoverage(latticeDir, projectRoot = dirname(latticeDir)) {
|
|
34
|
-
const files = await listLatticeFiles(latticeDir);
|
|
35
|
-
const documents = files.filter((f) => !isIndex(latticeDir, f));
|
|
36
|
-
if (documents.length === 0)
|
|
37
|
-
return [];
|
|
38
|
-
const scan = await scanCodeRefs(projectRoot);
|
|
39
|
-
if (scan.files.length === 0)
|
|
40
|
-
return [];
|
|
41
|
-
if (scan.refs.length > 0)
|
|
42
|
-
return [];
|
|
43
|
-
const rootIndexPath = `${latticeDir}/${indexNameFor(basename(latticeDir))}`;
|
|
44
|
-
const rootIndexRel = toPosix(relative(process.cwd(), rootIndexPath));
|
|
45
|
-
// Quote the ref the reader should actually paste. A generic placeholder gets
|
|
46
|
-
// pasted verbatim and then fails `lat check code-refs`, which turns one
|
|
47
|
-
// error into two.
|
|
48
|
-
const stem = basename(latticeDir).replace(/\.md$/, '');
|
|
49
|
-
let anchor = `${stem}#Your Project`;
|
|
50
|
-
try {
|
|
51
|
-
const heading = (await readFile(rootIndexPath, 'utf-8')).match(/^#\s+(.+)$/m);
|
|
52
|
-
if (heading)
|
|
53
|
-
anchor = `${stem}#${heading[1].trim()}`;
|
|
54
|
-
}
|
|
55
|
-
catch {
|
|
56
|
-
// No root index, or unreadable — the placeholder still names the shape.
|
|
57
|
-
}
|
|
58
|
-
return [
|
|
59
|
-
{
|
|
60
|
-
file: rootIndexRel,
|
|
61
|
-
line: 1,
|
|
62
|
-
target: toPosix(relative(projectRoot, latticeDir)),
|
|
63
|
-
message: `${documents.length} document(s) here and no \`@lat:\` code ref anywhere in the project — nothing in the codebase can reach this graph.\n` +
|
|
64
|
-
' Start at the application entrypoint (config/application.rb, src/index.ts, main.go, manage.py) and point it at the root index:\n' +
|
|
65
|
-
` # @lat: [[${anchor}]]\n` +
|
|
66
|
-
' Then add one ref per section that source code implements, at that code.\n' +
|
|
67
|
-
' The marker is a comment syntax, not a language allowlist: `//` for C-family, `#` for Ruby, Python, shell, Elixir and the rest. The scan is textual and reads every non-markdown file.\n' +
|
|
68
|
-
' An `@lat:` line is a machine directive, like a magic comment or a linter pragma. A project convention that minimises comments does not reach it.',
|
|
69
|
-
},
|
|
70
|
-
];
|
|
71
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { CheckError } from './check.js';
|
|
2
|
-
/**
|
|
3
|
-
* Report frontmatter that parses to nothing useful, or that puts a lat field
|
|
4
|
-
* somewhere the parser will not look.
|
|
5
|
-
*
|
|
6
|
-
* Both failures are quiet by nature, and both fail OPEN. A misplaced or
|
|
7
|
-
* unparseable `require-code-mention` turns a validation off, and `lat check`
|
|
8
|
-
* then reports success on a file whose leaf sections are no longer required to
|
|
9
|
-
* carry `@lat:` coverage. Nothing else in the output says the rule stopped
|
|
10
|
-
* applying, which is precisely why it has to be said here.
|
|
11
|
-
*/
|
|
12
|
-
export declare function checkFrontmatter(latticeDir: string, projectRoot?: string): Promise<CheckError[]>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { dirname, relative } from 'node:path';
|
|
3
|
-
import { listLatticeFiles, parseFrontmatter } from '../lattice.js';
|
|
4
|
-
import { toPosix } from '../walk.js';
|
|
5
|
-
/**
|
|
6
|
-
* Report frontmatter that parses to nothing useful, or that puts a lat field
|
|
7
|
-
* somewhere the parser will not look.
|
|
8
|
-
*
|
|
9
|
-
* Both failures are quiet by nature, and both fail OPEN. A misplaced or
|
|
10
|
-
* unparseable `require-code-mention` turns a validation off, and `lat check`
|
|
11
|
-
* then reports success on a file whose leaf sections are no longer required to
|
|
12
|
-
* carry `@lat:` coverage. Nothing else in the output says the rule stopped
|
|
13
|
-
* applying, which is precisely why it has to be said here.
|
|
14
|
-
*/
|
|
15
|
-
export async function checkFrontmatter(latticeDir, projectRoot = dirname(latticeDir)) {
|
|
16
|
-
const files = await listLatticeFiles(latticeDir);
|
|
17
|
-
const errors = [];
|
|
18
|
-
for (const file of files) {
|
|
19
|
-
const content = await readFile(file, 'utf-8');
|
|
20
|
-
const problems = parseFrontmatter(content).problems;
|
|
21
|
-
if (!problems)
|
|
22
|
-
continue;
|
|
23
|
-
const relPath = relative(process.cwd(), file);
|
|
24
|
-
const target = toPosix(relative(projectRoot, file)).replace(/\.md$/, '');
|
|
25
|
-
for (const problem of problems) {
|
|
26
|
-
if (problem.kind === 'root-level-field') {
|
|
27
|
-
errors.push({
|
|
28
|
-
file: relPath,
|
|
29
|
-
line: 1,
|
|
30
|
-
target,
|
|
31
|
-
message: `frontmatter sets "${problem.field}" at the document root, where it is ignored — nest it under "lat:" instead:\n ---\n lat:\n ${problem.field}: ...\n ---`,
|
|
32
|
-
});
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
errors.push({
|
|
36
|
-
file: relPath,
|
|
37
|
-
line: 1,
|
|
38
|
-
target,
|
|
39
|
-
message: `frontmatter is not valid YAML (${problem.message}) — every lat field in this document is being ignored, including any that turn a check on`,
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return errors;
|
|
44
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { CheckError } from './check.js';
|
|
2
|
-
export declare const DIATAXIS_MODES: readonly ["tutorial", "how-to", "reference", "explanation"];
|
|
3
|
-
export type DiataxisMode = (typeof DIATAXIS_MODES)[number];
|
|
4
|
-
/** Directory below lat.md/ that holds each mode. */
|
|
5
|
-
export declare const MODE_DIRS: Record<DiataxisMode, string>;
|
|
6
|
-
/**
|
|
7
|
-
* The index file a directory is required to carry, e.g. `lat.md` for the root
|
|
8
|
-
* and `reference.md` for `reference/`. An index is navigation rather than
|
|
9
|
-
* content, so the `require-mode` gate below never asks one to declare a mode.
|
|
10
|
-
*/
|
|
11
|
-
export declare function indexNameFor(dirName: string): string;
|
|
12
|
-
export type CheckModeOptions = {
|
|
13
|
-
/**
|
|
14
|
-
* Enforce as if the root index said this, whatever it actually says. Used to
|
|
15
|
-
* price adoption — running once each way and taking the difference is what
|
|
16
|
-
* the offer in `lat init` reports, and it keeps that number defined by this
|
|
17
|
-
* checker rather than by a second copy of its rules.
|
|
18
|
-
*/
|
|
19
|
-
requireMode?: boolean;
|
|
20
|
-
};
|
|
21
|
-
export declare function checkMode(latticeDir: string, projectRoot?: string, options?: CheckModeOptions): Promise<CheckError[]>;
|