@locus-forge/locus-map 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CONTRIBUTING.md +2 -2
  2. package/README.md +21 -6
  3. package/dist/assets/{abnfDiagram-VCTEODGH-BnTGKKaL.js → abnfDiagram-VCTEODGH-YtlnkH6t.js} +1 -1
  4. package/dist/assets/{ar-SA-G6X2FPQ2-LY3czoz9.js → ar-SA-G6X2FPQ2-BH5AlOAp.js} +1 -1
  5. package/dist/assets/{architectureDiagram-5GKGNRK7-BG9h9KRx.js → architectureDiagram-5GKGNRK7-DKYw7IM8.js} +1 -1
  6. package/dist/assets/{az-AZ-76LH7QW2-Brv6kuM6.js → az-AZ-76LH7QW2-DoI4xcyq.js} +1 -1
  7. package/dist/assets/{bg-BG-XCXSNQG7-tsQwwvMW.js → bg-BG-XCXSNQG7-CS9_2dp-.js} +1 -1
  8. package/dist/assets/{blockDiagram-I7D4REHJ-V9bUuR63.js → blockDiagram-I7D4REHJ-FelDwD1I.js} +1 -1
  9. package/dist/assets/{bn-BD-2XOGV67Q-0Cou5nNv.js → bn-BD-2XOGV67Q-CoIu5tTK.js} +1 -1
  10. package/dist/assets/{c4Diagram-7LVT6UL2-BmCtzbrY.js → c4Diagram-7LVT6UL2-Bh7h9IHP.js} +1 -1
  11. package/dist/assets/{ca-ES-6MX7JW3Y-pZF7WJUL.js → ca-ES-6MX7JW3Y-DAEHzf3H.js} +1 -1
  12. package/dist/assets/channel-DXsl7ag_.js +1 -0
  13. package/dist/assets/{chunk-2Q5K7J3B-D2iTDmHh.js → chunk-2Q5K7J3B-CgUOCDxa.js} +1 -1
  14. package/dist/assets/{chunk-5VM5RSS4-CTxdXZIx.js → chunk-5VM5RSS4-B97oha-s.js} +1 -1
  15. package/dist/assets/{chunk-F27PBJKO-Hic1X1pm.js → chunk-F27PBJKO-BQGqI2Ej.js} +1 -1
  16. package/dist/assets/{chunk-IMKFNOWR-DhLW1JVb.js → chunk-IMKFNOWR-C_sOeFT_.js} +1 -1
  17. package/dist/assets/{chunk-JWPE2WC7-_g5twKlC.js → chunk-JWPE2WC7-DG5n2owX.js} +1 -1
  18. package/dist/assets/{chunk-POPQ4Y6H-DMV4qmkd.js → chunk-POPQ4Y6H-Y-h3THrr.js} +1 -1
  19. package/dist/assets/{chunk-SVP7TREG-BWg83oEL.js → chunk-SVP7TREG-Dn6yBHtF.js} +1 -1
  20. package/dist/assets/{chunk-TICWLB2K-CPmkpa7J.js → chunk-TICWLB2K-Cb_yWOVI.js} +1 -1
  21. package/dist/assets/{chunk-XXDRQBXY-KnXvIZ_8.js → chunk-XXDRQBXY-QE51OqTj.js} +1 -1
  22. package/dist/assets/classDiagram-ZZMXUADV-DLyWZtYF.js +1 -0
  23. package/dist/assets/classDiagram-v2-VYDZK3BY-Cb3mb68m.js +1 -0
  24. package/dist/assets/{cose-bilkent-JH36ORCC-BChK_CGh.js → cose-bilkent-JH36ORCC-Bt7ZI9S1.js} +1 -1
  25. package/dist/assets/{cs-CZ-2BRQDIVT-CtAC2Qjy.js → cs-CZ-2BRQDIVT-BKZzkx2M.js} +1 -1
  26. package/dist/assets/{cynefin-OW5HDTMX-CdsltaMX.js → cynefin-OW5HDTMX-n6-BmECj.js} +1 -1
  27. package/dist/assets/{cynefinDiagram-5FMLGOSQ-bXvXX3Fx.js → cynefinDiagram-5FMLGOSQ-Bq2km1fZ.js} +1 -1
  28. package/dist/assets/{d3-scale-sM87TD1Z.js → d3-scale-C9oJHYFk.js} +1 -1
  29. package/dist/assets/{da-DK-5WZEPLOC-DyWwaclV.js → da-DK-5WZEPLOC-DWJm1_Yl.js} +1 -1
  30. package/dist/assets/{dagre-GXQ25YYZ-CTmiZZVO.js → dagre-GXQ25YYZ-D9EJj_nK.js} +1 -1
  31. package/dist/assets/{de-DE-XR44H4JA-BDXUBHki.js → de-DE-XR44H4JA-D-5dMJXD.js} +1 -1
  32. package/dist/assets/{diagram-S7CK7UJ4-Bm8Fy0R_.js → diagram-S7CK7UJ4-DX3qZf_H.js} +1 -1
  33. package/dist/assets/{diagram-UQ7AKVKN-BU_AmM_A.js → diagram-UQ7AKVKN-lODsxrZ9.js} +1 -1
  34. package/dist/assets/{diagram-VSXAHHWV-B78LUoXq.js → diagram-VSXAHHWV-B48xz8Xq.js} +1 -1
  35. package/dist/assets/{diagram-VX7I27RA-DNvWjMlf.js → diagram-VX7I27RA-Dms2AfBa.js} +1 -1
  36. package/dist/assets/{diagram-Z3DM3KII-DmFVt1fa.js → diagram-Z3DM3KII-BnwZBeJA.js} +1 -1
  37. package/dist/assets/{ebnfDiagram-PWID7BFC-CpDna0Jp.js → ebnfDiagram-PWID7BFC-OtcCvaIU.js} +1 -1
  38. package/dist/assets/{el-GR-BZB4AONW-CNhF7oN2.js → el-GR-BZB4AONW-BZVA3YVN.js} +1 -1
  39. package/dist/assets/{engines-a8mi_N6S.js → engines-DPbXorS1.js} +1 -1
  40. package/dist/assets/{erDiagram-RLTQ6QDP-BGD-9OAS.js → erDiagram-RLTQ6QDP-Cnh8Gn9f.js} +1 -1
  41. package/dist/assets/{es-ES-U4NZUMDT-DXMrJcKL.js → es-ES-U4NZUMDT-DKJIfS-2.js} +1 -1
  42. package/dist/assets/{eu-ES-A7QVB2H4-BTkMEwMi.js → eu-ES-A7QVB2H4-LHCF7lHc.js} +1 -1
  43. package/dist/assets/{fa-IR-HGAKTJCU-CgkknSS7.js → fa-IR-HGAKTJCU-CMtLvHxY.js} +1 -1
  44. package/dist/assets/{fi-FI-Z5N7JZ37-B1K83nId.js → fi-FI-Z5N7JZ37-CUIzm5UM.js} +1 -1
  45. package/dist/assets/{flowDiagram-HODETNUW-CjU1yR1F.js → flowDiagram-HODETNUW-lneiCvFi.js} +1 -1
  46. package/dist/assets/{fr-FR-RHASNOE6-CBFZBGMr.js → fr-FR-RHASNOE6-DTJ2WS73.js} +1 -1
  47. package/dist/assets/{ganttDiagram-EL5Y4UJY-bvb8BjSh.js → ganttDiagram-EL5Y4UJY-B2aJ2MDb.js} +1 -1
  48. package/dist/assets/{gitGraphDiagram-WWUBYQGX-DZXQ_x8t.js → gitGraphDiagram-WWUBYQGX-C74V3MFm.js} +1 -1
  49. package/dist/assets/{gl-ES-HMX3MZ6V-CON98Mma.js → gl-ES-HMX3MZ6V-BP8M0fQQ.js} +1 -1
  50. package/dist/assets/{he-IL-6SHJWFNN-CBoFaEdB.js → he-IL-6SHJWFNN-BMd-Q0PW.js} +1 -1
  51. package/dist/assets/{hi-IN-IWLTKZ5I-BJuoh3dl.js → hi-IN-IWLTKZ5I-Ct52OkX5.js} +1 -1
  52. package/dist/assets/{hu-HU-A5ZG7DT2-CQruu8XR.js → hu-HU-A5ZG7DT2-NfIL6Jfo.js} +1 -1
  53. package/dist/assets/{id-ID-SAP4L64H-VhaoENjR.js → id-ID-SAP4L64H-Osl6P1wb.js} +1 -1
  54. package/dist/assets/index-CyQSsku0.js +624 -0
  55. package/dist/assets/{index-CDNl17QJ.css → index-DR6sd54W.css} +1 -1
  56. package/dist/assets/{index-CboxqaL5.js → index-VfiAlFSM.js} +5 -5
  57. package/dist/assets/{infoDiagram-27XIBGKW-CM9Hap0f.js → infoDiagram-27XIBGKW-BjDMKD-X.js} +1 -1
  58. package/dist/assets/{ishikawaDiagram-5VMMS53U-i8pQztJI.js → ishikawaDiagram-5VMMS53U-DjrBmz8f.js} +1 -1
  59. package/dist/assets/{it-IT-JPQ66NNP-Dj9BkXfh.js → it-IT-JPQ66NNP-vT-EYZw5.js} +1 -1
  60. package/dist/assets/{ja-JP-DBVTYXUO-CB2BlfIS.js → ja-JP-DBVTYXUO-DexyPC4p.js} +1 -1
  61. package/dist/assets/{journeyDiagram-3NMN7TZE-PxcdqONT.js → journeyDiagram-3NMN7TZE-Bs5RL4Ef.js} +1 -1
  62. package/dist/assets/{kaa-6HZHGXH3-CLnR_zY5.js → kaa-6HZHGXH3-0BLUFlXY.js} +1 -1
  63. package/dist/assets/{kab-KAB-ZGHBKWFO-8TJr4nPf.js → kab-KAB-ZGHBKWFO-ByGN5_Fc.js} +1 -1
  64. package/dist/assets/{kanban-definition-UXKFOSKX-B2p5NBhO.js → kanban-definition-UXKFOSKX-DgcopnbA.js} +1 -1
  65. package/dist/assets/{kk-KZ-P5N5QNE5-5uZYjZ2e.js → kk-KZ-P5N5QNE5-DlK-wQWu.js} +1 -1
  66. package/dist/assets/{km-KH-HSX4SM5Z-D54aOpMd.js → km-KH-HSX4SM5Z-BZ75967_.js} +1 -1
  67. package/dist/assets/{ko-KR-MTYHY66A-Bnm0G6eo.js → ko-KR-MTYHY66A-C-copauZ.js} +1 -1
  68. package/dist/assets/{ku-TR-6OUDTVRD-CtGCn_eB.js → ku-TR-6OUDTVRD-CNqY-Uj4.js} +1 -1
  69. package/dist/assets/{layout-BBV3_Svw.js → layout-B8D2HGrb.js} +1 -1
  70. package/dist/assets/{lt-LT-XHIRWOB4-Bl8G0yv6.js → lt-LT-XHIRWOB4-BopE_XJX.js} +1 -1
  71. package/dist/assets/{lv-LV-5QDEKY6T-Cax93Eua.js → lv-LV-5QDEKY6T--7hU3JSZ.js} +1 -1
  72. package/dist/assets/{mindmap-definition-YA3MSWOX-CsOezwmE.js → mindmap-definition-YA3MSWOX-DYOVTEyE.js} +1 -1
  73. package/dist/assets/{mr-IN-CRQNXWMA-Br7GVyJH.js → mr-IN-CRQNXWMA-DydjVI2G.js} +1 -1
  74. package/dist/assets/{my-MM-5M5IBNSE-xC6lzTDV.js → my-MM-5M5IBNSE-D6ewM-EV.js} +1 -1
  75. package/dist/assets/{nb-NO-T6EIAALU-B0i5THqA.js → nb-NO-T6EIAALU--iqOwj15.js} +1 -1
  76. package/dist/assets/{nl-NL-IS3SIHDZ-CqYhUjP3.js → nl-NL-IS3SIHDZ-Bnhl_SmS.js} +1 -1
  77. package/dist/assets/{nn-NO-6E72VCQL-rpjr_9Z5.js → nn-NO-6E72VCQL-CIx7sLAQ.js} +1 -1
  78. package/dist/assets/{oc-FR-POXYY2M6-BlhQ99Ty.js → oc-FR-POXYY2M6-DWt5a8Ow.js} +1 -1
  79. package/dist/assets/{pa-IN-N4M65BXN-N2XbQgZ_.js → pa-IN-N4M65BXN-BW3LNure.js} +1 -1
  80. package/dist/assets/{pegDiagram-XKGWAZYB-C2iSJgYQ.js → pegDiagram-XKGWAZYB-ixSY_9-e.js} +1 -1
  81. package/dist/assets/{pica-DvYcrBvx.js → pica-Dn0N8xAP.js} +1 -1
  82. package/dist/assets/{pieDiagram-E7YTZNPT-CUjgOGBw.js → pieDiagram-E7YTZNPT-BbCRV6Qi.js} +1 -1
  83. package/dist/assets/{pl-PL-T2D74RX3-CnMxn1dA.js → pl-PL-T2D74RX3-7nXJ8SiV.js} +1 -1
  84. package/dist/assets/{pt-BR-5N22H2LF-Di-jnHb3.js → pt-BR-5N22H2LF-DKGGof4J.js} +1 -1
  85. package/dist/assets/{pt-PT-UZXXM6DQ-BaAKq8Sh.js → pt-PT-UZXXM6DQ-DCLEXuhk.js} +1 -1
  86. package/dist/assets/{quadrantDiagram-AXDQQJYC-DwwqgJXZ.js → quadrantDiagram-AXDQQJYC-Bvh_H4wg.js} +1 -1
  87. package/dist/assets/{railroadDiagram-O6MQD6OU-DyRgYGPF.js → railroadDiagram-O6MQD6OU-DHC3neQ8.js} +1 -1
  88. package/dist/assets/{requirementDiagram-BXWQKSXE-C3ixXeHJ.js → requirementDiagram-BXWQKSXE-DuCkl3u1.js} +1 -1
  89. package/dist/assets/{ro-RO-JPDTUUEW-BWrclVyo.js → ro-RO-JPDTUUEW-Cwf4k3Ou.js} +1 -1
  90. package/dist/assets/{ru-RU-B4JR7IUQ-_z0DINaG.js → ru-RU-B4JR7IUQ-sZF6fySs.js} +1 -1
  91. package/dist/assets/{sankeyDiagram-P5KCCOFB-mKpKYI_w.js → sankeyDiagram-P5KCCOFB-1ELTqwtI.js} +1 -1
  92. package/dist/assets/{sequenceDiagram-WJ2MYXX4-ZkNd0Wnj.js → sequenceDiagram-WJ2MYXX4-BK8Ou8Dz.js} +1 -1
  93. package/dist/assets/{si-LK-N5RQ5JYF-CdKOb383.js → si-LK-N5RQ5JYF-DmYhXIqO.js} +1 -1
  94. package/dist/assets/{sizeCapture-INFHLROL-hQLGO-0z.js → sizeCapture-INFHLROL-BKwx3lxX.js} +1 -1
  95. package/dist/assets/{sk-SK-C5VTKIMK-MHJC6ZIe.js → sk-SK-C5VTKIMK-BRLu35YX.js} +1 -1
  96. package/dist/assets/{sl-SI-NN7IZMDC-BF9YWbZx.js → sl-SI-NN7IZMDC-CMjfvJTr.js} +1 -1
  97. package/dist/assets/{stateDiagram-D77RDMKH-CRWj3j-B.js → stateDiagram-D77RDMKH-CDwJ9XLN.js} +1 -1
  98. package/dist/assets/stateDiagram-v2-MP3YSRHH-BZjKARGY.js +1 -0
  99. package/dist/assets/{subset-shared.chunk-DtxXjVIA.js → subset-shared.chunk-DngAvf0H.js} +1 -1
  100. package/dist/assets/{subset-worker.chunk-DONNSbUF.js → subset-worker.chunk-DkH_mqr5.js} +1 -1
  101. package/dist/assets/{sv-SE-XGPEYMSR-DkaTkfUY.js → sv-SE-XGPEYMSR-G4S06sbd.js} +1 -1
  102. package/dist/assets/{swimlanes-42K2YHIH-CFf6j7jO.js → swimlanes-42K2YHIH-Z9u8PDi-.js} +1 -1
  103. package/dist/assets/swimlanesDiagram-VR7AAH4N-D0kM5xmS.js +8 -0
  104. package/dist/assets/{ta-IN-2NMHFXQM-BfxqXEDI.js → ta-IN-2NMHFXQM-DgBbCQ8S.js} +1 -1
  105. package/dist/assets/{th-TH-HPSO5L25-DT3vLA39.js → th-TH-HPSO5L25-o9u4fVfq.js} +1 -1
  106. package/dist/assets/{timeline-definition-24CTP7MA-BGP2Dq8M.js → timeline-definition-24CTP7MA-BNgrm1r_.js} +1 -1
  107. package/dist/assets/{tr-TR-DEFEU3FU-CdfsG7py.js → tr-TR-DEFEU3FU-BqqSdzoL.js} +1 -1
  108. package/dist/assets/{uk-UA-QMV73CPH-CZrQuC1S.js → uk-UA-QMV73CPH-Dna46aia.js} +1 -1
  109. package/dist/assets/{vennDiagram-4TSXK5OY-CaxGPIab.js → vennDiagram-4TSXK5OY-CHwUI40M.js} +1 -1
  110. package/dist/assets/{vi-VN-M7AON7JQ-DQJk1_KV.js → vi-VN-M7AON7JQ-CbKRBQPB.js} +1 -1
  111. package/dist/assets/{wardleyDiagram-VM6X3IG4-DQxQ-zXH.js → wardleyDiagram-VM6X3IG4-KB0xBjXX.js} +1 -1
  112. package/dist/assets/{xychartDiagram-S5SC5T6Z-DoxdZQ6R.js → xychartDiagram-S5SC5T6Z-B3LOQLL-.js} +1 -1
  113. package/dist/assets/{zh-CN-LNUGB5OW-DRVBfkOy.js → zh-CN-LNUGB5OW-BFjA6n_2.js} +1 -1
  114. package/dist/assets/{zh-HK-E62DVLB3-BJHrltss.js → zh-HK-E62DVLB3-BoTU6iS7.js} +1 -1
  115. package/dist/assets/{zh-TW-RAJ6MFWO-DpMZ5m2x.js → zh-TW-RAJ6MFWO-DB4kdpOS.js} +1 -1
  116. package/dist/index.html +2 -2
  117. package/docs/BUNDLE-FORMAT.md +18 -5
  118. package/docs/DIAGRAM-SOURCE.md +59 -12
  119. package/docs/LOCAL-DOCUMENT.md +42 -86
  120. package/docs/MODEL-CONTRACT.md +7 -4
  121. package/docs/PLANTUML-SOURCE.md +3 -2
  122. package/docs/VIEWER-LAUNCH.md +29 -22
  123. package/docs/VIEWER.md +93 -26
  124. package/docs/adr/ADR-002-2026-12-03-project-selector/ADR-002-2026-12-03-project-selector.md +1 -1
  125. package/docs/adr/ADR-005-2026-12-04-named-libraries/ADR-005-2026-12-04-named-libraries.md +1 -1
  126. package/docs/capabilities.json +21 -3
  127. package/package.json +2 -1
  128. package/scripts/build-map.mjs +1 -1
  129. package/scripts/lib/library-directory.mjs +1 -1
  130. package/scripts/lib/map-build-invocation.mjs +5 -1
  131. package/scripts/lib/map-viewer-server.mjs +195 -43
  132. package/scripts/lib/original-materials.mjs +1 -1
  133. package/scripts/lib/original-report-server.mjs +7 -3
  134. package/scripts/lib/project-catalog.mjs +264 -97
  135. package/scripts/lib/project-map-inputs.mjs +1 -1
  136. package/scripts/lib/project-registry.mjs +151 -47
  137. package/scripts/lib/sketch-publication.mjs +1 -1
  138. package/scripts/lib/task-map-build.mjs +1 -1
  139. package/scripts/lib/view-args.mjs +163 -0
  140. package/scripts/lib/workflow/reader-surface.mjs +29 -11
  141. package/scripts/locus-map.mjs +18 -23
  142. package/scripts/open-map.mjs +96 -51
  143. package/skills/README.md +2 -1
  144. package/skills/locus-map/SKILL.md +30 -26
  145. package/skills/locus-map/assets/artifact-handoff.md +2 -1
  146. package/skills/locus-map/references/build-environment.md +11 -7
  147. package/skills/locus-map/references/checks.md +16 -4
  148. package/skills/locus-map/references/component-checkpoint.md +35 -0
  149. package/skills/locus-map/references/draw-skill.md +2 -1
  150. package/skills/locus-map/references/folder.md +2 -2
  151. package/skills/locus-map/references/selection.md +36 -13
  152. package/skills/locus-map/references/task-maps.md +5 -0
  153. package/skills/locus-map/references/visual-composition.md +69 -0
  154. package/skills/locus-map-draft/SKILL.md +95 -0
  155. package/skills/locus-map-draft/assets/chosen-direction.md +47 -0
  156. package/skills/locus-map-draft/references/divergence-and-formats.md +78 -0
  157. package/skills/locus-map-primitives/SKILL.md +11 -10
  158. package/skills/locus-map-primitives/assets/batch/README.md +2 -2
  159. package/skills/locus-map-primitives/assets/batch/build.mjs +1 -1
  160. package/skills/locus-map-primitives/assets/batch/{project.json → topic.json} +13 -20
  161. package/skills/locus-map-primitives/references/card-presentation.md +57 -3
  162. package/skills/locus-map-primitives/references/reading-files.md +1 -1
  163. package/src/adapter/areas.js +1 -0
  164. package/src/adapter/semanticAdmission.js +118 -5
  165. package/src/authoring/buildDiagram.mjs +99 -19
  166. package/src/authoring/canvas-source-worker.mjs +96 -0
  167. package/src/authoring/canvasSource.mjs +41 -0
  168. package/src/authoring/diagramChecks.js +143 -1
  169. package/src/authoring/diagramSource.js +31 -5
  170. package/src/authoring/printPlantumlSource.js +13 -2
  171. package/src/authoring/readDetailsFiles.mjs +100 -19
  172. package/src/bundle/chain.js +129 -32
  173. package/src/bundle/chainBrowser.js +26 -2
  174. package/src/bundle/localDocument.mjs +87 -22
  175. package/src/bundle/localDocumentClient.js +5 -1
  176. package/src/bundle/projectClient.js +64 -21
  177. package/src/chain/validation.js +7 -1
  178. package/src/contract/readingMaterials.js +18 -2
  179. package/src/contract/readingTable.js +66 -0
  180. package/src/main.jsx +25 -1
  181. package/src/viewer/ControlIcon.jsx +3 -0
  182. package/src/viewer/DiagramViewer.jsx +70 -30
  183. package/src/viewer/EmbeddedExcalidrawEditor.jsx +305 -0
  184. package/src/viewer/HighlightOverlay.jsx +53 -25
  185. package/src/viewer/Inspector.jsx +109 -39
  186. package/src/viewer/ProjectLocation.jsx +25 -7
  187. package/src/viewer/ProjectRail.jsx +20 -7
  188. package/src/viewer/ProjectViewChainViewer.jsx +254 -83
  189. package/src/viewer/ReadingTable.jsx +151 -0
  190. package/src/viewer/SketchCanvas.jsx +133 -84
  191. package/src/viewer/ViewChainViewer.jsx +557 -57
  192. package/src/viewer/ViewerSettings.jsx +208 -0
  193. package/src/viewer/camera.js +50 -18
  194. package/src/viewer/chainEditorSession.js +160 -35
  195. package/src/viewer/chainInstallation.js +3 -3
  196. package/src/viewer/details/CanvasPreview.jsx +303 -0
  197. package/src/viewer/details/InspectorReadingSettings.jsx +50 -13
  198. package/src/viewer/details/ReadingFiles.jsx +32 -4
  199. package/src/viewer/details/details.css +65 -26
  200. package/src/viewer/diagramControls.css +1 -1
  201. package/src/viewer/fileError.js +53 -0
  202. package/src/viewer/geometry.js +12 -0
  203. package/src/viewer/inspectorPosition.js +54 -31
  204. package/src/viewer/projectContents.js +248 -55
  205. package/src/viewer/projectNavigation.js +27 -3
  206. package/src/viewer/readingTable.css +47 -0
  207. package/src/viewer/sketchSettling.js +71 -0
  208. package/src/viewer/useInspectorPosition.js +116 -35
  209. package/src/viewer/viewChain.css +92 -5
  210. package/src/viewer/viewer.css +23 -12
  211. package/dist/assets/channel-Dx9OTBrx.js +0 -1
  212. package/dist/assets/classDiagram-ZZMXUADV-Da4s894j.js +0 -1
  213. package/dist/assets/classDiagram-v2-VYDZK3BY--H9NrCfO.js +0 -1
  214. package/dist/assets/index-DBGHN_5E.js +0 -624
  215. package/dist/assets/stateDiagram-v2-MP3YSRHH-B2DcVJGG.js +0 -1
  216. package/dist/assets/swimlanesDiagram-VR7AAH4N-DO_W2uN2.js +0 -8
@@ -1,59 +1,104 @@
1
1
  #!/usr/bin/env node
2
+ import { realpathSync } from 'node:fs';
2
3
  import path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
3
5
  import { readWorkspaceRegistry } from './lib/project-registry.mjs';
4
6
  import { startMapViewer } from './lib/map-viewer-server.mjs';
5
7
 
6
- const args = process.argv.slice(2);
7
- let filePath;
8
- let projectPath;
9
- let libraryRoot;
10
- let registryRoot;
11
- let previousDocumentPath;
12
- let sourceRoot;
13
- let readOnly = false;
14
- let port;
15
- const usage = `Usage:
8
+ export const DEFAULT_SHUTDOWN_GRACE_MS = 1500;
9
+
10
+ export async function runOpenMap(args = process.argv.slice(2), { distDir, shutdownGraceMs = DEFAULT_SHUTDOWN_GRACE_MS } = {}) {
11
+ let filePath;
12
+ let topicPath;
13
+ let libraryRoot;
14
+ let registryRoot;
15
+ let previousDocumentPath;
16
+ let sourceRoot;
17
+ let readOnly = false;
18
+ let port;
19
+ const usage = `Usage:
16
20
  node scripts/open-map.mjs --document /full/path/map.locus-map.json [--previous-document /full/path/previous.locus-map.json] [--source-root DIR] [--read-only] [--port 4181]
17
- node scripts/open-map.mjs --project /full/path/project.json [--source-root DIR] [--read-only] [--port 4181]
18
- node scripts/open-map.mjs --library /full/path/project [--source-root DIR] [--read-only] [--port 4181]`;
19
- const seen = new Set();
20
- for (let index = 0; index < args.length; index++) {
21
- const option = args[index];
22
- if (seen.has(option)) throw new Error(usage);
23
- seen.add(option);
24
- if (option === '--local' && libraryRoot) continue;
25
- if (option === '--read-only') { readOnly = true; continue; }
26
- const value = args[++index];
27
- if (!value || value.startsWith('--')) throw new Error(usage);
28
- if (option === '--document') filePath = value;
29
- else if (option === '--project') projectPath = value;
30
- else if (option === '--user-projects') registryRoot = value;
31
- else if (option === '--library') libraryRoot = value;
32
- else if (option === '--previous-document') previousDocumentPath = value;
33
- else if (option === '--source-root') sourceRoot = path.resolve(value);
34
- else if (option === '--port' && /^[0-9]+$/.test(value)) port = Number(value);
35
- else throw new Error(usage);
36
- }
37
- if ([filePath, projectPath, libraryRoot, registryRoot].filter(Boolean).length !== 1 || (!filePath && previousDocumentPath)
38
- || [filePath, projectPath, libraryRoot, registryRoot, previousDocumentPath].some(value => value !== undefined && !path.isAbsolute(value))
39
- || (port !== undefined && (!Number.isInteger(port) || port < 0 || port > 65535))) {
40
- throw new Error(usage);
21
+ node scripts/open-map.mjs --topic /full/path/topic-dir [--source-root DIR] [--read-only] [--port 4181]
22
+ node scripts/open-map.mjs --library /full/path/project [--source-root DIR] [--read-only] [--port 4181]
23
+ node scripts/open-map.mjs --user-projects /full/path/cwd [--read-only] [--port 8181]`;
24
+ const seen = new Set();
25
+ for (let index = 0; index < args.length; index++) {
26
+ const option = args[index];
27
+ if (seen.has(option)) throw new Error(usage);
28
+ seen.add(option);
29
+ if (option === '--local' && libraryRoot) continue;
30
+ if (option === '--read-only') { readOnly = true; continue; }
31
+ const value = args[++index];
32
+ if (!value || value.startsWith('--')) throw new Error(usage);
33
+ if (option === '--document') filePath = value;
34
+ else if (option === '--topic') topicPath = value;
35
+ else if (option === '--user-projects') registryRoot = value;
36
+ else if (option === '--library') libraryRoot = value;
37
+ else if (option === '--previous-document') previousDocumentPath = value;
38
+ else if (option === '--source-root') sourceRoot = path.resolve(value);
39
+ else if (option === '--port' && /^[0-9]+$/.test(value)) port = Number(value);
40
+ else throw new Error(usage);
41
+ }
42
+ if ([filePath, topicPath, libraryRoot, registryRoot].filter(Boolean).length !== 1 || (!filePath && previousDocumentPath)
43
+ || [filePath, topicPath, libraryRoot, registryRoot, previousDocumentPath].some(value => value !== undefined && !path.isAbsolute(value))
44
+ || (port !== undefined && (!Number.isInteger(port) || port < 0 || port > 65535))) {
45
+ throw new Error(usage);
46
+ }
47
+ let viewer;
48
+ try {
49
+ const registry = registryRoot && await readWorkspaceRegistry(registryRoot);
50
+ port ??= registry ? registry.port ?? 8181 : 0;
51
+ viewer = await startMapViewer({ filePath, topicPath, libraryRoot, registry, previousDocumentPath, sourceRoot, readOnly, port, ...(distDir ? { distDir } : {}) });
52
+ if (registry?.file) console.error(`Using project registry ${registry.file}`);
53
+ if (registry?.unregisteredHint) {
54
+ const { name, folder, sourceRoot: src } = registry.unregisteredHint;
55
+ console.error(
56
+ `Current checkout is not registered in ${registry.configPath}. Add this stanza and restart the viewer, or run "locus-map view --local":\n`
57
+ + `[[projects]]\nname = ${JSON.stringify(name)}\nfolder = ${JSON.stringify(folder)}\nsource_root = ${JSON.stringify(src)}`,
58
+ );
59
+ }
60
+ } catch (error) {
61
+ console.error(error.code === 'EADDRINUSE'
62
+ ? `Port ${port} is in use. Reuse your running viewer${registryRoot ? ` at http://127.0.0.1:${port}/?cwd=${encodeURIComponent(registryRoot)}` : ''} or choose another --port.`
63
+ : error.message);
64
+ process.exit(1);
65
+ }
66
+ process.stdout.write(`${viewer.url}\n`);
67
+ const rawClose = viewer.close.bind(viewer);
68
+ const detachSignals = () => {
69
+ process.off('SIGINT', onSignal);
70
+ process.off('SIGTERM', onSignal);
71
+ };
72
+ let closePromise;
73
+ const close = options => {
74
+ const promise = rawClose(options);
75
+ if (!closePromise) closePromise = promise.finally(detachSignals);
76
+ return closePromise;
77
+ };
78
+ let closing = false;
79
+ async function onSignal() {
80
+ if (closing) {
81
+ close({ force: true }).catch(() => {});
82
+ return;
83
+ }
84
+ closing = true;
85
+ const forceTimer = setTimeout(() => {
86
+ close({ force: true }).catch(() => {});
87
+ }, shutdownGraceMs);
88
+ forceTimer.unref();
89
+ try { await close(); process.exitCode = 0; }
90
+ catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
91
+ finally { clearTimeout(forceTimer); }
92
+ }
93
+ process.on('SIGINT', onSignal);
94
+ process.on('SIGTERM', onSignal);
95
+ return { ...viewer, close };
41
96
  }
42
- let viewer;
43
- try {
44
- const registry = registryRoot && await readWorkspaceRegistry(registryRoot);
45
- port ??= registry ? registry.port ?? 8181 : 0;
46
- viewer = await startMapViewer({ filePath, projectPath, libraryRoot, registry, previousDocumentPath, sourceRoot, readOnly, port });
47
- if (registry?.file) console.error(`Using project registry ${registry.file}`);
48
- } catch (error) {
49
- console.error(error.code === 'EADDRINUSE' ? `Port ${port} is in use. Reuse your running viewer or choose another --port.` : error.message);
50
- process.exit(1);
97
+
98
+ function isMainModule() {
99
+ if (!process.argv[1]) return false;
100
+ try { return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url)); }
101
+ catch { return false; }
51
102
  }
52
- process.stdout.write(`${viewer.url}\n`);
53
- let closing = false;
54
- for (const signal of ['SIGINT', 'SIGTERM']) process.on(signal, async () => {
55
- if (closing) return;
56
- closing = true;
57
- try { await viewer.close(); process.exitCode = 0; }
58
- catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
59
- });
103
+
104
+ if (isMainModule()) await runOpenMap();
package/skills/README.md CHANGED
@@ -4,7 +4,8 @@ Start with the result the user wants. A request to revise a map uses the same en
4
4
 
5
5
  | User request | Start here | What it delivers |
6
6
  | --- | --- | --- |
7
- | “Show how checkout works.” “Fix the unreadable return arrow on this map.” | [locus-map](locus-map/SKILL.md) | The coordinator finds the source, chooses a supported view, builds or revises the editable map and checks what the reader can see. It owns diagram feedback and project drawing preferences. |
7
+ | “Show how checkout works.” “Visualize this ML experiment with charts and notes.” “Fix the unreadable return arrow on this map.” | [locus-map](locus-map/SKILL.md) | The main coordinator chooses a fitting visual structure (Draw visual board/chart, connected semantic map, or architecture view), builds or revises it in Locus Map, and owns feedback and project drawing preferences. |
8
+ | “I'm not sure how to lay out this experiment — show me 3 visual drafts first.” | [locus-map-draft](locus-map-draft/SKILL.md) | Formalizes an open-ended request, builds 1–4 quick draft options (`.mjs`, `.puml`, or `.map.json`) for early component feedback in Locus Map, and hands the chosen visual reference off to authoring or research. |
8
9
  | “How do I link this card to a second map?” “Which file owns a foldable tree?” | [locus-map-primitives](locus-map-primitives/SKILL.md) | A reference for canvas operations, files, links and runnable examples. An author can consult it during a map revision. |
9
10
  | “Verify who owns each component before drawing it.” | [locus-map-research](locus-map-research/SKILL.md) | A source-backed, independently reviewed research packet for the author. Use it for verified claims, component, sequence or decision families and the supported ArchiMate subset. The coordinator still owns delivery. |
10
11
 
@@ -1,19 +1,20 @@
1
1
  ---
2
2
  name: locus-map
3
- description: "Creates or revises a connected editable diagram from project sources, records diagram feedback and reuses the project’s drawing preferences."
3
+ description: "Creates or revises Draw visual boards, connected semantic maps, or researched architecture views in Locus Map, records feedback and reuses preferences."
4
4
  ---
5
5
 
6
6
  # locus-map
7
7
 
8
- Answer the reader's question with one diagram. Draw owns its language and geometry.
9
- Canvas operations: `skills/locus-map-primitives/SKILL.md`. In Pi use only assigned methods.
10
- Use installed `MAP_BIN` or `<checkout>/scripts/locus-map.mjs`. Resolve Map paths from `productRoot` in `"$MAP_BIN" doctor --json`.
11
- Prebuilt npm viewer: [setup](references/build-environment.md), `docs/VIEWER-LAUNCH.md`.
8
+ Answer the reader's question with the fitting visual structure in Locus Map. Draw owns genres and geometry.
9
+ Draft options: `skills/locus-map-draft/SKILL.md`. Primitives: `skills/locus-map-primitives/SKILL.md`. Pi: assigned methods only.
10
+ Use `locus-map` (`MAP_BIN`), `npx @locus-forge/locus-map`, or `scripts/locus-map.mjs`. Resolve paths via `productRoot` in `"$MAP_BIN" doctor --json`.
11
+ Viewer setup: [setup](references/build-environment.md), `docs/VIEWER-LAUNCH.md`.
12
12
 
13
13
  ## Create or revise
14
14
 
15
- Outside Pi duties, read the project's optional `.locus-map/preferences.md`. To revise a map, open its sibling
16
- `<name>.feedback.md` and follow [Revise a diagram from feedback](references/revise.md).
15
+ Outside Pi, pick structure first via [visual composition](references/visual-composition.md):
16
+ draft 1–4 options (`locus-map-draft`), build a Draw `.excalidraw` board, or follow sections 1–6 for `.locus-map.json`.
17
+ Read `.locus-map/preferences.md`; to revise, use `<name>.feedback.md` and [Revise a diagram from feedback](references/revise.md).
17
18
  In Pi, Build reads preferences only if assigned. The current request takes precedence.
18
19
 
19
20
  ## 1. Frame one diagram
@@ -30,7 +31,7 @@ hand-offs, decisions, stores. A request that names nothing specific needs no lis
30
31
  requested diagram type. Dropping an item, merging requested steps or replacing the subject is a narrowing: return it
31
32
  to the user with the options. A brief that delegates the diagram passes this frame unchanged.
32
33
 
33
- For a standalone source draft, trace the caller and its handoffs using [one connected diagram](references/connected-diagram.md). Read its destination rules before adding ↘.
34
+ For a standalone source draft, trace caller/handoffs via [one connected diagram](references/connected-diagram.md) and its ↘ destination rules.
34
35
  Use the [diagram folder and source checkout](references/folder.md).
35
36
 
36
37
  ## 2. Choose the family and route from the registry
@@ -48,15 +49,16 @@ An unsupported notation needs an explicit limit, a bounded alternative and agree
48
49
  - **Source draft (default when sufficient):** `source` admits only `semantic`, including `.puml` C4 Component
49
50
  vocabulary and reading areas. Read sources/callers; keep each planned node/relation, `path:line` evidence and
50
51
  unresolved claims in `facts.md`. Imports, citations and rendering do not establish truth. Continue with sections 3–6.
51
- - **Research route:** verified claims, component/sequence/decision families, the ArchiMate application subset,
52
- or the full author/reviewer/reader flow, subject to registry and profile admission.
53
- Use `skills/locus-map-research/SKILL.md` and the [research authoring order](references/authoring-order.md):
54
- question → mechanism → independent source review → build/open → reader understanding. For an authorized Pi run,
55
- read [the Pi handoff](references/pi-handoff.md); for reuse after a stopped run, follow `docs/PI-WORKFLOW.md`.
52
+ - **Research route:** verified claims, component/sequence/decision, ArchiMate subset,
53
+ or author/reviewer/reader flow, per registry admission.
54
+ Use `skills/locus-map-research/SKILL.md` and [research authoring order](references/authoring-order.md):
55
+ question → mechanism → source review → build/open → reader trial. Authorized Pi runs:
56
+ [Pi handoff](references/pi-handoff.md); stopped-run reuse: `docs/PI-WORKFLOW.md`.
56
57
 
57
- The route sets evidence requirements, not the subject: it can depict research or Pi without executing it.
58
- An instruction not to run Pi limits the method only.
59
- Do not combine research flags with `--source` or silently promote a source draft to a verified result.
58
+ Route sets evidence rules, not subject: it can depict research/Pi without running it.
59
+ Not running Pi limits method only.
60
+ Never mix research flags with `--source` or promote a draft to verified.
61
+ Outside Pi duties, check [component checkpoint](references/component-checkpoint.md) before authoring when its triggers apply.
60
62
 
61
63
  ## 3. Author the selected source view through Draw
62
64
 
@@ -67,7 +69,7 @@ Keep the selected family, route and `Must show` on the agreed surface; Draw refi
67
69
  Budgets cannot remove required content. A semantic conflict returns to selection and its source owner.
68
70
 
69
71
  For a source draft choose direction before placement using the main reading path guidance in `docs/DIAGRAM-SOURCE.md`.
70
- Keep the authored `.puml` with its preview stub, or retain the schema-v1 input and generator for JSON-only features such as a foldable tree.
72
+ Keep the `.puml` and preview stub, or keep schema-v1 input and generator for JSON-only features (such as a foldable tree).
71
73
  Before building, reconcile each shown responsibility, relation, guard and boundary with the actual sources.
72
74
  A semantic correction returns to the source/facts and, on the research route, its required review. A geometry-only
73
75
  repair stays in the authoring/build loop. Moving a card in the viewer cannot establish a new semantic claim.
@@ -80,21 +82,23 @@ repair stays in the authoring/build loop. Moving a card in the viewer cannot est
80
82
 
81
83
  See [build environment](references/build-environment.md) for browser/outputs/preflight. Run preflight before building; include it in build briefs.
82
84
 
83
- Inspect the build's PNG and check report. Compare the starting action, real handoffs and final outcome with the verbatim request and `Must show`.
84
- Keep inputs near their consumers. Use `--multi-screen` when the flow needs more space at reading zoom. Whole-map Fit gives orientation.
85
- Repair the authored source and build into the next directory. Follow [checks and repairs](references/checks.md) and [deliverable updates](references/folder.md#updates).
85
+ Inspect the build's PNG and check report against the request, real handoffs and `Must show`.
86
+ Keep inputs near consumers; use `--multi-screen` if reading zoom needs space. Whole-map Fit gives orientation.
87
+ Repair source into the next build directory via [checks and repairs](references/checks.md) and [deliverable updates](references/folder.md#updates).
86
88
 
87
89
  ## 5. Open, edit and reopen
88
90
 
89
- Checkout: `npm run build` once; npm: use the included viewer:
91
+ Checkout: `npm run build` once; npm includes the viewer.
92
+ Standard launch (port `8181`, `~/.locus-map/projects.toml`, selects current tab):
90
93
 
91
94
  ```sh
92
- "$MAP_BIN" view /ABSOLUTE/DIR/<diagram>.locus-map.json
95
+ "$MAP_BIN" view
93
96
  ```
94
97
 
95
- Reopen by absolute path. Never save the printed address (`#write=` grants Save).
96
- Open the printed address in the selected browser. `docs/LOCAL-DOCUMENT.md` owns Open, Save and regeneration.
97
- On a copy outside the folder root, check that it opens, a complete card moves, Save succeeds and reopening keeps it.
98
+ Running `8181`: open `http://127.0.0.1:8181/?cwd=<dir>` or **Refresh library**.
99
+ Isolated topic: `"$MAP_BIN" view <diagram>`. Never save `#write=`.
100
+ See `docs/VIEWER-LAUNCH.md` and `docs/LOCAL-DOCUMENT.md`.
101
+ On a copy outside folder root, check open, whole-card move, Save and reopen.
98
102
  Presentation edits may be retained; changes to labels, identity or relation direction are refused by design.
99
103
  A build proves no viewer opening, saved change or reader understanding; record those separately.
100
104
 
@@ -113,4 +117,4 @@ Return the folder (`.puml`, document, `README.md` with the verified reopen comma
113
117
  inspected PNG and check report; show the PNG itself where the reply can display images. State the source revision, claims
114
118
  state, remaining warnings, checks actually performed and any `Must show` item not shown, with who decided it.
115
119
  A source build is `claims: "unverified"` even when it renders and saves correctly. Human acceptance remains separate.
116
- For a neutral source reproduction, read the [library examples](assets/examples/README.md); research-family examples stay with the research skill.
120
+ Neutral examples: [library examples](assets/examples/README.md); research examples stay with research.
@@ -11,6 +11,7 @@ audience:
11
11
  outputLanguage:
12
12
  Must show: each item the request names -> where the reader sees it; or omitted, and who decided
13
13
  View choice: type/profile and composition, and why; each rejected real alternative and what it hides
14
+ Component checkpoint: approved (<specimen>) | skipped — <reason> | n/a (Pi)
14
15
  Orientation: TB | LR; prefer TB for directed graphs with no required orientation; reason
15
16
  Main path and roles: ordered IDs; entry, steps, result, helpers, records (also in facts.md);
16
17
  or none — <reason> when the view has no ordered stages and no single flow
@@ -26,7 +27,7 @@ Unknowns kept visible:
26
27
  Claims: unverified | accepted research evidence: <link>
27
28
  Open/edit/save/reopen: actual result, or not checked
28
29
  Reader understanding: first answers and separate assessment, or untested
29
- - Reopen: `locus-map view DIAGRAM_FILE` from the target project. For a development checkout, record the working directory and the exact `node scripts/open-map.mjs --document ABSOLUTE_FILE` invocation.
30
+ - Reopen: `locus-map view DIAGRAM_NAME` (or `npx @locus-forge/locus-map view DIAGRAM_NAME`) from the target project root when delivered under `.locus-map/`; for custom destinations outside `.locus-map/`, record the working directory and delivered file path (`locus-map view DELIVERED_FILE`). For an unpublished Map checkout, record `node <checkout>/scripts/locus-map.mjs view ...` with the same target.
30
31
  Next action:
31
32
  ```
32
33
 
@@ -1,13 +1,17 @@
1
1
  # Build environment, side effects and preflight
2
2
 
3
3
  Read this before the first build in a session and before writing a brief that asks
4
- another executor to build. For an installed Map, run `locus-map doctor --json`
5
- from the target project and read `productRoot` and `drawSkillPath` from it.
6
- Resolve resources against `productRoot`. Keep the target project as the
7
- working directory. Use `locus-map build` with the same arguments as the source
8
- build and `locus-map view FILE` for the built document. The installer prepares
9
- the viewer. For the smoke test, resolve the example next to the reported Draw
10
- skill. The Node and npm examples below run in a Map development checkout.
4
+ another executor to build. Prefer installed `locus-map` (global or
5
+ `./node_modules/.bin/locus-map`) or `npx @locus-forge/locus-map`, and run
6
+ `locus-map doctor --json` from the target project to read `productRoot` and
7
+ `drawSkillPath`. Resolve resources against `productRoot`. Keep the target
8
+ project as the working directory. Use `locus-map build` with the same arguments
9
+ as the source build and `locus-map view TARGET` (topic name or relative path)
10
+ for the built document or project catalog (`--source-root` defaults
11
+ automatically under `.locus-map/`). The package and installer prepare the
12
+ viewer. For the smoke test, resolve the example next to the reported Draw
13
+ skill. The Node and npm examples below run in an unpublished Map development
14
+ checkout.
11
15
 
12
16
  Use `--style handwritten` for hand-lettered text, or `--style default` to override a saved Draw preference for this build. Both build routes support it.
13
17
 
@@ -3,6 +3,7 @@
3
3
  A build that reaches rendering writes `check.json`: `status` (`draft` or `failed`), `claims` (always `unverified` for a source build),
4
4
  `render`, `fit` (the zoom a reader gets at 1600×1000 and the smallest rendered text per role) and `checks`.
5
5
  Each check has a `code`, `severity`, `passed`, the offending `ids`, its `value` and `limit`.
6
+ `render: "passed"` and `diagnostics: []` are NOT sufficient for readiness: inspect every row in `checks[]` with `passed: false`, including warnings.
6
7
  A failed error check means no document was published; the diagnostic PNG beside it, when the render got that
7
8
  far, shows what went wrong. Invalid source fails earlier: no directory is created and stderr names the field.
8
9
 
@@ -14,8 +15,17 @@ collisions and semantic checks still gate the build. Check the delivered image a
14
15
  its intended size when it is itself a reading surface.
15
16
 
16
17
  Read the longest short titles at 100% before settling on a profile. A wide
17
- `c4-reference-v1` card is 320 scene units. For `editorial-v2`, use the explicit `extra-wide`
18
- size (420 units) when a title wraps unnecessarily. Keep the intended font size. On a research
18
+ `c4-reference-v1` card is 320 scene units (`c4-modern-v2` wide is 360). For
19
+ `editorial-v2` through `editorial-v4`, use `size: "extra-wide"` (420 units,
20
+ PlantUML `$tags="extra-wide"`) whenever titles wrap unnecessarily—especially on
21
+ Russian or descriptive research maps where words are longer (at `extra-wide`, a
22
+ single title line fits roughly 31–34 Cyrillic characters). Keep the intended
23
+ font size; if a title still wraps onto an awkward trailing word at `extra-wide`,
24
+ move parenthetical detail or series/model qualifiers into `technology` (or
25
+ `badge` on profiles that admit node appearance overrides; on canonical
26
+ `c4-reference-v1`, shorten the title, use `technology` for a technology
27
+ qualifier, or move detail to Inspector `details`), and inspect
28
+ `TITLE_WRAP_WARNING` in `check.json`. On a research
19
29
  history, state in the legend when an arrow means chronological order. Label
20
30
  branching or causal relations with the observation or condition that explains
21
31
  the next step. Put supporting evidence in the relationship Inspector.
@@ -26,7 +36,7 @@ Open the delivered project in Locus Map. Follow the route from the contents to a
26
36
 
27
37
  State the comparator and result on the card. Use a negative tone for every observed deterioration, including multiple on a page. Label an unstable gain, an unchanged result, uncertain economics and future work in words. A page with no losses can have zero red cards. Declare representative samples in the exported legend. Check both themes and reopen the saved scene.
28
38
 
29
- Give a named experiment one place under its question and family in the explicit project contents. Attach the protocol and report to its node. If two results fed the experiment, draw and source both labeled relations to the same card in an ordinary view. Reserve foldable reading trees for single-parent canvases. See the project contents example in `docs/LOCAL-DOCUMENT.md`.
39
+ Keep topic contents (`topic.json` `navigation`) focused on diagram pages (saved maps and views, optionally grouped), or omit `navigation` when the default nested folder hierarchy is enough. Add in-page card or experiment anchors (`node`) to `navigation` only when the reader explicitly requests sidebar jumps to individual cards; keep cross-canvas drilldowns in `links` and attach the protocol and report to each node. If two results fed the experiment, draw and source both labeled relations to the same card in an ordinary view. Reserve foldable reading trees for single-parent canvases. See the topic contents guidance in `docs/LOCAL-DOCUMENT.md`.
30
40
  For requested soft lines, keep rounded or curved routing while adjusting
31
41
  spacing, side ports and lanes. Inspect crossings and detours on the final scene.
32
42
  For long notes and reports with figures, see “Package reading files with the
@@ -64,11 +74,13 @@ supporting cards beside the steps that use them.
64
74
  | Code | Means | What to do |
65
75
  |---|---|---|
66
76
  | `FIT_ZOOM_WARNING` | Overview zoom below 0.70 | Inspect the overview and the intended reading region |
77
+ | `TITLE_WRAP_WARNING` | One or more card titles wrapped awkwardly (`many-lines`: 3+ lines, `wider-size-fits`: a wider profile card size fits the title on one line, or `orphan-wrap`: an unbalanced single leftover word or short stub on line 2); `details[]` lists each node's `extraWidthPx` deficit and `suggestedSize` | Set `size: "extra-wide"` on `editorial-v2`–`editorial-v4` (`size: "wide"` on C4 profiles) when `suggestedSize` is reported, or trim/move parenthetical detail into `technology` (or `badge` only on profiles that admit node appearance overrides; on canonical `c4-reference-v1`, shorten the title, use `technology`, or move detail to Inspector `details`) to eliminate orphan wraps. Keep balanced two-line titles when shortening would lose meaning |
67
78
  | `FIT_ZOOM_MIN`, `RENDERED_TEXT_MIN` (multi-screen) | Whole-map overview falls below the single-screen limits | Retain the overview as an orientation aid and verify each continuation at 100% |
68
79
  | `DETAILS_MISSING`, `SOURCES_MISSING` | Inspector text or citations are missing | Check each flagged element against its source. Add a note for a real condition, payload or consequence. A clear label can stand alone; record the warning instead of adding filler. See [connected diagrams](connected-diagram.md) and the [installed Draw skill](draw-skill.md). |
69
80
  | `CONDITION_NOT_VISIBLE` | A reminder for every relation with a `condition`: the field shows only in the Inspector | Check that the label words or a note show the guard; then the warning may stay |
70
81
  | `LEGEND_STYLE_MISSING` | A declared legend leaves out a style that is used | Add the item, or accept it for card kinds the tags already explain |
71
- | `EDGE_ROUTE_DETOUR`, `AREA_ROUTE_OUTSIDE`, `AREA_LABEL_BOUNDARY`, `EDGE_CROSSING_WARNING`, `COLLINEAR_SHARED_RUN` | The layout reads worse than it could | Use the layout reference in the [installed Draw skill](draw-skill.md) |
82
+ | `EDGE_ROUTE_DETOUR`, `ADJACENT_EDGE_DETOUR` | A relation path exceeds 4× the direct card-to-card distance, or an unobstructed neighbour pair detours >2.5× its gap or leaves facing sides | Inspect the rendered route even when `render: "passed"` (failing detour checks are also surfaced in `diagnostics` and stderr) — an outer-perimeter or header-jog detour signals a corridor or area-header obstacle to fix via ports, layout, or Draw routing fixes |
83
+ | `AREA_ROUTE_OUTSIDE`, `AREA_LABEL_BOUNDARY`, `EDGE_CROSSING_WARNING`, `COLLINEAR_SHARED_RUN` | The layout reads worse than it could | Use the layout reference in the [installed Draw skill](draw-skill.md) |
72
84
  | `AREA_NONMEMBER_INSIDE` | A card sits inside an area it does not belong to | Move it out, or add it to the area if it really belongs |
73
85
 
74
86
  Source errors occur before rendering. PlantUML errors name a source path, line and column; JSON errors name a
@@ -0,0 +1,35 @@
1
+ # Two-step component checkpoint (outside Pi duties)
2
+
3
+ Complete this two-step gate before authoring full diagrams whenever an interactive request risks style, card-anatomy, or diagram-type mismatch. Autonomous Pi duties (`authorBuild` and R0–R7) keep their own `Narrative Decision` and review gates and do not pause for this checkpoint.
4
+
5
+ ## When this checkpoint is mandatory
6
+
7
+ Require Step 1 approval before building the full deliverable whenever any of the following holds:
8
+
9
+ - The request calls for **2 or more connected canvases** or a multi-document topic (`topic.json`).
10
+ - The request covers broad scope across system architecture, workflows, tasks, and roadmap together.
11
+ - The diagram family, presentation profile, or sequence-vs-workflow boundary is open (see [selection](selection.md)).
12
+ - It is the **first diagram in a project** with no approved `.locus-map/preferences.md` visual defaults.
13
+
14
+ You may skip Step 1 when none of the triggers above apply, for a targeted revision to an already-approved canvas, when the user explicitly opts out, or when a non-interactive / delegated one-shot brief cannot pause for human approval. When skipping a triggered workflow, record `Component checkpoint: skipped — <reason>` in `handoff.md`.
15
+
16
+ ## Step 1: Diagram plan and real Draw specimens (wait for approval)
17
+
18
+ Before writing full diagram sources or `topic.json`:
19
+
20
+ 1. **Present the diagram plan:** list every planned canvas, its Map family (`semantic`, `component`, `sequence`, `decision`), authoring route (`--source`, `research --single-diagram`, or standalone Draw if an unverified sketch is explicitly agreed), Draw profile (strict canonical `c4-reference-v1` with standard C4 roles/palette and no ad-hoc pastel color overrides as default for architecture overviews; `editorial-v4` for workflows; `task-card-v1` for `--tasks-dir`; `c4-modern-v2` only when explicitly chosen), and what each candidate shows or loses. State explicitly when an option falls outside Map admission: standalone Draw `.excalidraw` files cannot be linked in `topic.json` `links` or `models` and carry no Inspector `details` or `sources`.
21
+ 2. **Build 2–4 real specimen cards/components:** author a minimal specimen source file at `<diagram>/artifacts/checkpoint/specimen.puml` (or `.map.json`) and build it to a separate build subdirectory `--out-dir <diagram>/artifacts/checkpoint/builds/1` (never put the specimen source inside `--out-dir` or the published project root so output checks and project discovery stay clean). When `sequence` vs workflow is the open decision, include a small participant pair with ordered messages rather than isolated cards alone. Populate profile-accurate slots:
22
+ - **Standard C4 architecture (`c4-reference-v1`):** keep canonical C4 roles and low-chroma palette without ad-hoc pastel color overrides, decorative badges, or extra icons (`«role»` → `Title` → optional `[Technology]` → `body`).
23
+ - **Code-backed workflows (`editorial-v4` / editorial profiles):** for code-backed workflow steps, follow the 3-slot workflow card pattern — Line 1 (`label`): `Step N · <action>` (or localized `Шаг N · <действие>`), Line 2 (`technology`): compact code anchor `Code: :module → File :: fn()` (or localized `Код: :module → File :: fn()`), Line 3+ (`body`): 2–3 concise bullets using Unicode `• ` (literal UTF-8 `• ` in `.puml`, where `\u` escapes fail with `TEXT_ESCAPE_UNSUPPORTED`; literal `• ` or `\u2022 ` in `.map.json` / `.mjs`) — never leading `- `, which `locus-draw`'s `MARKUP` regex (`src/source/diagramSource.ts`) rejects with `INVALID_TEXT`. On grouped task grids or non-code editorial boards, keep the appropriate 3-slot editorial layout (for example `T-xxx · Title` + single status subline in `technology`).
24
+ - **Card-anatomy reading guide:** on non-trivial workflow diagrams, include a small left-side or top-left card-anatomy breakdown note/block (for example `Card anatomy (how to read slots)` / localized `Разбор карточки (как читать слоты)`) via `page.notes` (`LM_Note`) on non-`readingTree` canvases — in `grid` mode via an unoccupied row cell such as `page.notes[].cell: [0, 0]` (`LM_Note(..., $place="cell:0,0")`) inside a node-occupied column `0` (dedicated note-only columns fail with `LAYOUT_COVERAGE`), or in `auto`/`explicit` mode via `below: "<leftmostNodeId>"` (`$place="below:<node>"`) or `page.footer` (since `cell` fails with `GRID_CELL_CONFLICT` and unattached `page.notes` render at the bottom) — keeping it clear of area contours (or setting matching `area`) to avoid `AREA_NOTE_BOUNDARY`, and using `• ` bullets rather than `- `. Check area clearance on the rendered specimen. On foldable `readingTree` views, put the reading guide in `page.footer` alongside `page.legend` (never `page.notes`, which disables folding). Follow `skills/locus-map-primitives/references/card-presentation.md` and [draw skill](draw-skill.md).
25
+ 3. **Show the specimen PNG inline and stop:** inspect the rendered specimen PNG and ask the user for explicit approval (`approve`) or adjustments before authoring full canvases.
26
+
27
+ ## Step 2: Full build and delivery (only after approval)
28
+
29
+ 1. Apply any adjustments requested on the specimens, then author and build every planned canvas using the selected route's delivery flow (`artifacts/builds/<n>/` + `check.json` for `--source`; `build.json`, metrics, and saved-scene checks for `research`).
30
+ 2. Inspect every route report (`checks[]`, including warnings such as `EDGE_ROUTE_DETOUR`, `ADJACENT_EDGE_DETOUR`, and `MAIN_PATH_MISSING`; see [checks](checks.md)) and every rendered PNG. On revisions to existing documents, follow the replacement guard in [deliverable updates](folder.md#updates) (`cmp` against the last published build before replacing the canvas root; keep a candidate when the root differs or its origin is unknown so saved viewer edits are never overwritten) before updating `topic.json`.
31
+ 3. Verify the viewer opens cleanly and offer to save reusable visual defaults into `.locus-map/preferences.md`.
32
+
33
+ ## Evidence firewall
34
+
35
+ Approving Step 1 specimens approves **visual grammar, profile, and card anatomy only**. It never verifies architectural or factual claims: `--source` outputs remain `status: "draft"` and `claims: "unverified"`, and `research` maps still execute full R0–R7 source verification independently.
@@ -42,6 +42,7 @@ For visual choices, read `new URL('references/presentation-profiles.md', doctor.
42
42
  where `doctor` is the parsed output of `locus-map doctor --json`. Follow its catalog and
43
43
  specimen links within that installed skill.
44
44
 
45
- The chooser links PlantUML, editable scenes and PNG specimens for `c4-modern-v2` and `editorial-v4`.
45
+ The chooser compares the installed profiles and links PlantUML, editable scenes and PNG specimens for the editorial and modern C4 profiles (`assets/examples/c4.puml` / `c4.png` illustrates `c4-reference-v1`; `skills/locus-map/assets/task-map.mjs` illustrates `task-card-v1`).
46
+ Default to `c4-reference-v1` for standard C4 architecture overviews and `editorial-v4` for workflows; use `c4-modern-v2` only when modern colored C4 cards are explicitly selected.
46
47
  Set `iconId` only when it literally disambiguates sibling nodes of the same role, up to 3–5 explicit icons per view.
47
48
  Leave `iconId` unset to use the profile's default glyph otherwise.
@@ -27,9 +27,9 @@ links it.
27
27
 
28
28
  Feedback lives beside the delivered document. Follow [Revise a diagram from feedback](revise.md) for the editing workflow and older handoffs.
29
29
 
30
- ## Deliver project pages
30
+ ## Deliver nested topic maps
31
31
 
32
- When the reader requests separate maps, use `skills/locus-map-primitives/SKILL.md` for the project catalog, trigger and target addresses. Use [the destination rule](connected-diagram.md#choose-what-a-card-opens) to choose what opens. Hand over the catalog, its member folders and the verified launch command. Test edits on a copy of the catalog and member files together.
32
+ When the reader requests separate maps, place subtopics directly under `.locus-map/<topic>/<subtopic>/<subtopic>.locus-map.json` (no `pages/` folder). Use `skills/locus-map-primitives/SKILL.md` and `docs/LOCAL-DOCUMENT.md` for optional `topic.json` links, ordering, and navigation. Use [the destination rule](connected-diagram.md#choose-what-a-card-opens) to choose what opens. Hand over the topic folder, its member files, and the verified open URL (`docs/VIEWER-LAUNCH.md`). Test edits on a copy of the topic folder together.
33
33
 
34
34
  ## What stays out
35
35
 
@@ -14,16 +14,23 @@ Paths here and in `docs/capabilities.json` start at the explicitly selected Map
14
14
  `evidenceMeaning`. It describes existing capabilities; runtime admission remains with the linked owners.
15
15
  Read the selected family/route docs, plus shared-limit docs relevant to the requested meaning.
16
16
  3. Select for the reader's needed inference, not a keyword. Use `component` for real physical ownership/nesting,
17
- `sequence` for an actual common ordered message list, and `decision` for choices, guards and outcomes.
18
- `semantic` can explain structure, processes, qualitative data flow and independent parallel steps.
19
- "Boundaries" need not mean physical containment; "step by step" need not mean a total message order.
20
- Do not invent order between independent branches. A barrier can be explained in text and conditions,
21
- but this gives no typed concurrency or checked full-barrier guarantee, in any family.
17
+ `sequence` for an actual common ordered message/reply list across participant lifelines, and `decision` for
18
+ choices, guards and outcomes. `semantic` explains structure, step-by-step workflows, branching pipelines,
19
+ qualitative data flow and independent parallel steps. Keep **Sequence vs Workflow** explicit: a step-by-step
20
+ processing pipeline with branching decisions and stage areas is a workflow graph (`semantic` on `--source`
21
+ with an editorial profile), not a UML sequence diagram. "Boundaries" need not mean physical containment;
22
+ "step by step" need not mean a total message order. Do not invent order between independent branches. A
23
+ barrier can be explained in text and conditions, but this gives no typed concurrency or checked full-barrier
24
+ guarantee, in any family.
22
25
  4. Check family and route in both directions in the registry, then check the source subset and profile separately.
23
- Ordinary `.puml`/schema-v1 `.map.json` use `source` and produce `semantic` only. C4 Component vocabulary and
24
- reading areas are not canonical `contains` ownership. Source profiles belong to Draw; resolve them through
25
- `docs/PLANTUML-SOURCE.md` and the installed Draw skill. `docs/DIAGRAM-SOURCE.md` owns Map source admission.
26
- Other families and verified claims use `research`; the ArchiMate application subset also keeps that workflow.
26
+ Ordinary `.puml`/schema-v1 `.map.json` use `source` and produce `semantic` only (`sequence` is admitted on
27
+ the `research` route via `--single-diagram`, not `--source`; never silently substitute one for the other —
28
+ clarify the tradeoff during the component checkpoint, or use standalone Draw `.excalidraw` if an unverified
29
+ sequence sketch is explicitly agreed, noting that `.excalidraw` files cannot be linked in `topic.json`
30
+ `links` or `models` and carry no Inspector `details` or `sources`). C4 Component vocabulary and reading areas are not canonical `contains`
31
+ ownership. Source profiles belong to Draw; resolve them through `docs/PLANTUML-SOURCE.md` and the installed
32
+ Draw skill. `docs/DIAGRAM-SOURCE.md` owns Map source admission. Other families and verified claims use
33
+ `research`; the ArchiMate application subset also keeps that workflow.
27
34
  Check `docs/DSL-AUTHORING.md`, `docs/MODEL-CONTRACT.md` and `docs/LANGUAGE-COMPATIBILITY.md` for the actual
28
35
  combination. A scenario profile admits semantic/decision; the ArchiMate subset admits semantic only.
29
36
  Registry `canonical-model` is a low-level API for caller-supplied models, not another ordinary CLI or a way
@@ -60,8 +67,24 @@ changed research meaning requires renewed independent acceptance. Geometry alone
60
67
 
61
68
  Run `locus-map doctor --json`. Resolve `references/presentation-profiles.md` relative to
62
69
  `drawSkillPath` to compare the installed Draw specimens before selecting the profile and node
63
- overrides. See [locating the Draw skill](draw-skill.md).
70
+ overrides. See [locating the Draw skill](draw-skill.md) and `skills/locus-map-primitives/references/card-presentation.md`.
64
71
 
65
- Choose `c4-modern-v2` to explain architecture responsibilities and `editorial-v4` to show what each action does.
66
- Set `iconId` only when it literally disambiguates sibling nodes of the same role, up to 3–5 explicit icons per view.
67
- Leave `iconId` unset to use the profile's default glyph otherwise.
72
+ - **Standard C4 architecture overviews (default):** strictly use canonical **`c4-reference-v1`** for Context, Container and
73
+ Component diagrams. Keep its standard C4 roles and built-in low-chroma palette (blue family for owned
74
+ systems/containers/components, cylinder for data stores, muted grey for external systems, dashed system boundaries)
75
+ with no ad-hoc pastel color overrides, decorative badges or extra icons.
76
+ - **Workflows, pipelines and grouped overviews:** choose **`editorial-v4`** (or another Map-admitted editorial
77
+ profile listed in `docs/capabilities.json` and Draw's `references/presentation-profiles.md`). Keep cards neutral by
78
+ default and reserve `accent` or `tone` for 1–3 explicit semantic signals. For code-backed workflow steps, follow the
79
+ 3-slot workflow card pattern (action title, code anchor, `• ` plain-text bullets) with a card-anatomy reading guide
80
+ on non-trivial flows; for grouped task boards, keep `T-xxx · Title` and a single status slot in `technology`.
81
+ - **Colored modern C4 cards (opt-in only):** use **`c4-modern-v2`** only when the user explicitly selects modern
82
+ colored presentation cards over canonical `c4-reference-v1`.
83
+ - **Canonical local task lists:** use **`task-card-v1`** on `locus-map build --tasks-dir` (see [task maps](task-maps.md)).
84
+
85
+ On profiles that admit node appearance overrides (`editorial-v2`–`editorial-v4`, `c4-modern-v1`–`c4-modern-v2`;
86
+ `c4-reference-v1` rejects node `iconId`, `shape`, `badge`, `tone` and root `source.accent` with `PROFILE_KIND` and
87
+ ignores PlantUML style overrides with `PLANTUML_STYLE_IGNORED`), set `iconId` only when it literally disambiguates
88
+ sibling nodes of the same role, up to 3–5 explicit icons per view. Leave `iconId` unset to use the profile's default
89
+ glyph otherwise. Follow `skills/locus-map-primitives/references/card-presentation.md` for minimalist 3-slot card
90
+ anatomy, code-backed workflow card slots (`• ` plain-text bullets), and card-anatomy reading guides.
@@ -14,3 +14,8 @@ locus-map view .tasks/map.locus-map.json
14
14
  ```
15
15
 
16
16
  Inspect the rendered canvas, a directed relationship and its original. When changing an existing view, verify that the authored edit appears after the build. The registry and viewer launch instructions live in `docs/VIEWER-LAUNCH.md` under the product root reported by `locus-map doctor --json`.
17
+
18
+ ## Task card discipline (single-column vs grouped overview)
19
+
20
+ - **Canonical single-column task map (`locus-map build --tasks-dir`, `task-card-v1`)**: use one vertical column; place the task ID in `tag`, normalized status via `primitives.taskCardStatus(task.status, task.archived)` in `technology`, the full canonical title in `label`, a concise summary in `body`, and an optional expected result in `outcome`. Never repeat status in `tag` or `body`.
21
+ - **Grouped multi-column task overview board (simplified `editorial-v4` or newer editorial profile)**: put the task ID directly in `label` (for example, `T-264 · Markdown grounding corpus` or `T-257/258 · Markdown-first import`), state status/priority/progress in **one** metadata slot only (`technology`), and keep `tag` empty unless needed for a single orthogonal axis. Never duplicate status across `badge`, `technology`, and `tag`, and avoid `badge` pills on mixed-length grid titles where row-1 vs row-2 wrapping breaks visual alignment.