@xgent-ai/skills 0.7.5 → 0.7.6

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 (717) hide show
  1. package/.claude/hooks/xgent-statusline.js +32 -18
  2. package/README.md +61 -35
  3. package/bin/phoenix-diagram.js +14 -0
  4. package/bin/xgent-skills.js +132 -240
  5. package/dist/phoenix-diagram/LICENSE +21 -0
  6. package/dist/phoenix-diagram/NOTICE.md +34 -0
  7. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/005fc765ddc5115da796cca915baa9557abae13ff35e0a47c47affc56f6c414d.txt +272 -0
  8. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/010492e490b92ec85db01daad2a290ea5959f29314a1c4ff25e7a172e223abf9.txt +18 -0
  9. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f.txt +3 -0
  10. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0218327e7a480793ffdd4eb792379a9709e5c135c7ba267f709d6f6d4d70af0a.txt +201 -0
  11. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/02bb8c3b4e70190e3986c0404ad2fd8d639b4f534252d82379cc1b502b6d1812.txt +191 -0
  12. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0444c6991eead6822f7b9102e654448d51624431119546492e8b231db42c48bb.txt +25 -0
  13. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0552c898248eadfc130df0c0e8f6f82776fcb3f1dd5a5af2fa991b5baff9367a.txt +21 -0
  14. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0ab4d106b6faac07fb6a051815fd1b4d862d730895e2d7d7358c2f13565e7a38.txt +20 -0
  15. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b28172679e0009b655da42797c03fd163a3379d5cfa67ba1f1655e974a2a1a9.txt +25 -0
  16. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0d3f7c086c6b6cf3ea4aac714e9aa3e1fb02e355ce35bd21c56acf8d04390885.txt +21 -0
  17. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7.txt +21 -0
  18. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f.txt +21 -0
  19. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/117829c3ca21efb132d81a44b55363d395ab8eea18526873bc828da4c0e5f038.txt +21 -0
  20. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/123a331b5dbf04c30097fa43b8f858bc85df671fe776de498d01f3d6b7c1f69e.txt +25 -0
  21. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df.txt +26 -0
  22. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5.txt +373 -0
  23. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f485f0d6125658861351e3d6084ea90fefe78f89450be9915044b7c56d5a75a.txt +15 -0
  24. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/209fbbe0ad52d9235e37badf9cadfe4dbdc87203179c0899e738b39ade42177b.txt +26 -0
  25. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e.txt +25 -0
  26. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20fe7b00e904ed690e3b9fd6073784d3fc428141dbd10b81c01fd143d0797f58.txt +176 -0
  27. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/219920e865eee70b7dcfc948a86b099e7f4fe2de01bcca2ca9a20c0a033f2b59.txt +7 -0
  28. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23860c2a7b5d96b21569afedf033469bab9fe14a1b24a35068b8641c578ce24d.txt +7 -0
  29. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3.txt +23 -0
  30. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5.txt +220 -0
  31. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/27995d58ad5c1145c1a8cd86244ce844886958a35eb2b78c6b772748669999ac.txt +25 -0
  32. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/28a9529c7d0bb4dc51f4bf5c116a3d16ef247a052f7591466768ddf563fd1cf5.txt +428 -0
  33. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/29e9fe5074bd27e0e5d5d110394fbbcd841baee2651a3c4b4560a632702cede4.txt +26 -0
  34. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652.txt +23 -0
  35. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3521672491a3479422d5fe1aca6645dd2984090f85da6e5205abfb18fb7a6897.txt +25 -0
  36. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/35242e7a83f69875e6edeff02291e688c97caafe2f8902e4e19b49d3e78b4cab.txt +176 -0
  37. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/36516aefdc84c5d5a1e7485425913a22dbda69eb1930c5e84d6ae4972b5194b9.txt +23 -0
  38. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/375bdbf54d6584debb4bcc5bce1c9dcfdd581f977c9a8469113dbdf208f4c927.txt +131 -0
  39. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397.txt +25 -0
  40. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/391a5396cec6230bfabd4ef4eb2350eb895bc5efce377a2218f5702ed020d3e3.txt +20 -0
  41. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/39712155836e5c10ef1b07037b606e4ad2d633e72205d162fdd7e2290aa54f15.txt +21 -0
  42. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bb1e548250b3acc43febde65a5cdba9f2e0a3288018aa41f009a3c59ffab51a.txt +390 -0
  43. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bc70e239e91272782006c638fc0452a714d384224f11f0923036b7be07cf9b5.txt +21 -0
  44. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04.txt +373 -0
  45. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f941b3b89cf7b8370ceb83cc76d2120d471b58735d8ca60238a751a48d7f72f.txt +359 -0
  46. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3fa4ca83dcc9237839b1bdeb2e6d16bdfb5ec0c5ce42b24694d8bbf0dcbef72c.txt +25 -0
  47. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/42fa16951ce7f24b5a467a40e5b449a1d41e662f97ca779864f053f39e097737.txt +26 -0
  48. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4455bf75a91154108304cb283e0fea9948c14f13e20d60887cf2552449dea3b1.txt +21 -0
  49. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/451167c55c0fa447cc2d5632714f5e3c567fe4f1e1badefab2c1333852198aca.txt +542 -0
  50. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45f522cacecb1023856e46df79ca625dfc550c94910078bd8aec6e02880b3d42.txt +25 -0
  51. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45fd05c4865e7c350b98ad7ac50e1b15462d49af4a91e9b0c9dd933dc9a69742.txt +201 -0
  52. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4789210f4df8abc03fce1cddd9c2ba517f184840687f2815d741de282c1aa93a.txt +228 -0
  53. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4cada0bd02ea3692eee6f16400d86c6508bbd3bafb2b65fed0419f36d4f83e8f.txt +25 -0
  54. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/516b24e051bf5630880ebbd55c40a25ce9552ebaf8970a53e8976eb70e522406.txt +201 -0
  55. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/553fffcd9b1cb158bc3e9edc35da85ca5c3b3d7d2e61c883ebcfa8a65814b583.txt +13 -0
  56. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5757a1f28eff735a8b5e7425478f367812d71e974530f5bedd01219480965f4a.txt +51 -0
  57. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a.txt +19 -0
  58. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5e05b024f653a5ce199e77cbbbd42fb5553562ec714b819421ed0c3e552a75d7.txt +25 -0
  59. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/60a7062291b01ba068f300612cdbdc20382ac1d4934f07bcdd7167c15299f309.txt +25 -0
  60. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3.txt +25 -0
  61. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a.txt +176 -0
  62. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb.txt +25 -0
  63. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee.txt +25 -0
  64. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6df43f6f4b5d4587f3d8d71e45532c688fd168afa5fe89d571cb32fa09c4ef51.txt +187 -0
  65. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/709e3175b4212f7b13aa93971c9f62ff8c69ec45ad8c6532a7e0c41d7a7d6f8c.txt +25 -0
  66. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/71674605ec4c087fe9eb534e3e4f9e26eb2e4aabcd76a29fd156c6a844d44b3d.txt +21 -0
  67. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7365cc8878a1d7ce155a58c4ca09c3d7a6be413efa5334a80ea842912b669349.txt +25 -0
  68. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7abd9b6960dcf7d4d0a48606a5b71bfe37d472db68d70637f3a58a56785f1621.txt +13 -0
  69. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0.txt +25 -0
  70. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7ca6700600dfa9c9497bf5556365067daa802c871ea78239f129309c7a2048f7.txt +21 -0
  71. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7cfafc877eccc46c0e346ccbaa5c51bb6b894d2b818e617d970211e232785ad4.txt +15 -0
  72. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c.txt +24 -0
  73. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e5886959f67f8c75063a9d55cd3cb08c5a8cbea9a944fa1df2d4ae038f53721.txt +21 -0
  74. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7fea0ee51a4ca5d5cea7464135fd55e8b09caf3a61da3d451ac8a22af95c033f.txt +20 -0
  75. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90.txt +201 -0
  76. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32.txt +24 -0
  77. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/86dd7f026f916daf7511e39951ad8ea8cf55a8db67ae64060dacf829761c18f3.txt +25 -0
  78. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8a35369f3ca263b3c62fbb5032947e53b6bfebc6c8a4d1bb982de1c069f6fba5.txt +21 -0
  79. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8b43ce8accd61e9d370b5ca9e9c4f953279b5c239926c62315b40e24df51b726.txt +25 -0
  80. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bb1b50b0e5c9399ae33bd35fab2769010fa6c14e8860c729a52295d84896b7a.txt +201 -0
  81. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bce3b45e49ecd1461f223b46de133d8f62cd39f745cfdaf81bee554b908bd42.txt +21 -0
  82. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8c7516d4b27b1e495be5e38b612298b63de48d05f49cdac94f70f3cd70f8864b.txt +25 -0
  83. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9046848b63a5c92bff14e4accca80bd987e0623b74adf9226ce5198d312b79d5.txt +30 -0
  84. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/90eb64f0279b0d9432accfa6023ff803bc4965212383697eee27a0f426d5f8d5.txt +12 -0
  85. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9117d922e667125508dde62b02c1f57ed22f5ad21eb536aa2e2d99e1c796e639.txt +25 -0
  86. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9387c2d197e2370a740ca457dae1662c56de56b811ee4862024343961307f9bf.txt +19 -0
  87. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/946c9835d8034d24404f8cfec5f4654cee5dad17e944afc3d06d742cf2882831.txt +240 -0
  88. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/95bd3988beee069fa2848f648dab43cc6e0b2add2ad6bcb17360caf749802bcc.txt +176 -0
  89. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411.txt +396 -0
  90. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3.txt +202 -0
  91. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba.txt +25 -0
  92. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9f2ae19ef94ba82887729a4a1617ff25eede56611dd21a4b2c6f797df30fca33.txt +2013 -0
  93. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9fa38f610a00115dd1f612bdd3559e3b381ea579538b6ff25a5899da250a5fce.txt +21 -0
  94. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a00511478c83ebb464ef19d840f061c7444adc4636bb561900e75c5808cfc6cc.txt +21 -0
  95. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499.txt +121 -0
  96. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a5dea80c1f383cb5f80a6bb0da5e55a2beb9f24adb123ce6300af2cbaaa3bf65.txt +19 -0
  97. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2.txt +201 -0
  98. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f.txt +21 -0
  99. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5.txt +201 -0
  100. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf.txt +201 -0
  101. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ae9baa7beea910273c2f384c2a6b721fb7bd02bda3436074a1072e4ee689f985.txt +25 -0
  102. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b1181a40b2a7b25cf66fd01481713bc1005df082c53ef73e851e55071b102744.txt +19 -0
  103. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b38f11f6096706e6de553dabe2a7ed142d59b6fa8c97e290c67496154745cdd5.txt +25 -0
  104. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b3d734001a94efff3579978d953391aa7115f877657d25eb54037a43875d078a.txt +9 -0
  105. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1.txt +201 -0
  106. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1.txt +27 -0
  107. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b68ad1a3367b825447089e1f8d6829b97f47a89eb78d2f4ebaef4672f5606186.txt +22 -0
  108. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b7e650f3fce5c53249d1cdc608b54df156a97edd636cf9d23498d0cfe7aec63e.txt +19 -0
  109. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c09aae9d3c77b531f56351a9947bc7446511d6b025b3255312d3e3442a9a7583.txt +21 -0
  110. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c16f8dcf1a368b83be78d826ea23de4079fe1b4469a0ab9ee20563f37ff3d44b.txt +201 -0
  111. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c2cfccb812fe482101a8f04597dfc5a9991a6b2748266c47ac91b6a5aae15383.txt +21 -0
  112. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c30152c94a6d75e021adbc52b3a52470366a46edb917e17deae3259251af244c.txt +42 -0
  113. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c394e3bda1f3b9378f30a7cab11242887eeeafc73c7bef36a0fe13e09691e18b.txt +17 -0
  114. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4.txt +201 -0
  115. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c962ee4d1d05ddc138b202b2540219ebc57893fcf97b364852094a9a94ce1365.txt +7 -0
  116. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5.txt +25 -0
  117. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30.txt +202 -0
  118. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d1fc1bc0d155df60b2e7705b6b2ae02a05c96f948e1cec6e2fb86360b09f346b.txt +29 -0
  119. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5c22aa3118d240e877ad41c5d9fa232f9c77d757d4aac0c2f943afc0a95e0ef.txt +25 -0
  120. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5fca2653c88ad02d197faead77e22b80c70636b5bec6e02f2805f389a21b86d.txt +10 -0
  121. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/db11fec9946737df39ca3898d9cd8c10ec6f6c3a884a6802b0ad0b81b4e8f23a.txt +1 -0
  122. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/dc91f8200e4b2a1f9261035d4c18c33c246911a6c0f7b543d75347e61b249cff.txt +25 -0
  123. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ddea4e94a1c35ed9826e54e13a5b50b8f81b21665a00ca07c8861f1859e56b6b.txt +14 -0
  124. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e271993808fec50ab29350b39539cdec611a9103f827e0aa26d61da70e2d33f8.txt +61 -0
  125. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e66c269d4819aaab34b49ef5220c4ddab6756f21bb5180761a4eb8561f2b7bbd.txt +438 -0
  126. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ecc269ef87fd38a1d98e30bfac9ba964a9dbd9315c3770fed98d4d7cb5882055.txt +25 -0
  127. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829.txt +22 -0
  128. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f025ccfb7dfb6bdfedc75ca0f67acc69e6fb4998143d834f7c2f38a29989680f.txt +13 -0
  129. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f367c1b8e1aa262435251e442901da4607b4650e0e63a026f5044473ecfb90f2.txt +46 -0
  130. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f51ac2c59a222f7476ce507ca879960e2b64ea64bb2786eefdbeb7b0b538d1b7.txt +25 -0
  131. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7715d38a3fa1b4ac97c5729740752505a39cb92ee83ab5b102aeb5eaa7cdea4.txt +25 -0
  132. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7db81051789b729fea528a63ec4c938fdcb93d9d61d97dc8cc2e9df6d47f2a1.txt +39 -0
  133. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d.txt +17 -0
  134. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85.txt +373 -0
  135. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fb77f0a9c53e473abe5103c8632ef9f0f2874d4fb3f17cb2d8c661aab9cee9d7.txt +25 -0
  136. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2.txt +25 -0
  137. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff92bed461f50338dd703a9ba9aee496a425957873df1d91192776e4bdf5dda7.txt +74 -0
  138. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/COPYRIGHT-library.html +29357 -0
  139. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Apache-2.0.txt +73 -0
  140. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/BSD-2-Clause.txt +9 -0
  141. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/CC-BY-SA-4.0.txt +427 -0
  142. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GCC-exception-3.1.txt +30 -0
  143. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-2.0-only.txt +133 -0
  144. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-3.0-or-later.txt +202 -0
  145. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/ISC.txt +7 -0
  146. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/LLVM-exception.txt +15 -0
  147. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/MIT.txt +9 -0
  148. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/NCSA.txt +29 -0
  149. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/OFL-1.1.txt +43 -0
  150. package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Unicode-3.0.txt +39 -0
  151. package/dist/phoenix-diagram/THIRD-PARTY-NOTICES.md +210 -0
  152. package/dist/phoenix-diagram/THIRD-PARTY.json +5459 -0
  153. package/dist/phoenix-diagram/VERSION.json +39 -0
  154. package/dist/phoenix-diagram/bundle/ENGINE.json +39 -0
  155. package/dist/phoenix-diagram/bundle/SKILL.md +109 -0
  156. package/dist/phoenix-diagram/bundle/examples/minimal.architecture.json +11 -0
  157. package/dist/phoenix-diagram/bundle/examples/minimal.class.json +23 -0
  158. package/dist/phoenix-diagram/bundle/examples/minimal.dataflow.json +11 -0
  159. package/dist/phoenix-diagram/bundle/examples/minimal.erd.json +25 -0
  160. package/dist/phoenix-diagram/bundle/examples/minimal.lifecycle.json +11 -0
  161. package/dist/phoenix-diagram/bundle/examples/minimal.sequence.json +13 -0
  162. package/dist/phoenix-diagram/bundle/examples/minimal.timeline.json +15 -0
  163. package/dist/phoenix-diagram/bundle/examples/minimal.tree.json +13 -0
  164. package/dist/phoenix-diagram/bundle/examples/minimal.waterfall.json +12 -0
  165. package/dist/phoenix-diagram/bundle/examples/minimal.workflow.json +12 -0
  166. package/dist/phoenix-diagram/bundle/manifest.json +253 -0
  167. package/dist/phoenix-diagram/bundle/references/architecture-compare.md +111 -0
  168. package/dist/phoenix-diagram/bundle/references/authoring-defaults.md +42 -0
  169. package/dist/phoenix-diagram/bundle/references/brand-marks.md +52 -0
  170. package/dist/phoenix-diagram/bundle/references/compatibility.md +22 -0
  171. package/dist/phoenix-diagram/bundle/references/delivery-contract.md +127 -0
  172. package/dist/phoenix-diagram/bundle/references/extending-types.md +14 -0
  173. package/dist/phoenix-diagram/bundle/references/migration.md +57 -0
  174. package/dist/phoenix-diagram/bundle/references/preview.md +45 -0
  175. package/dist/phoenix-diagram/bundle/references/repository-authoring.md +29 -0
  176. package/dist/phoenix-diagram/bundle/references/viewer-runtime.md +27 -0
  177. package/dist/phoenix-diagram/bundle/schemas/README.md +23 -0
  178. package/dist/phoenix-diagram/bundle/schemas/architecture.schema.json +329 -0
  179. package/dist/phoenix-diagram/bundle/schemas/class.schema.json +348 -0
  180. package/dist/phoenix-diagram/bundle/schemas/common.schema.json +358 -0
  181. package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/dataflow.schema.json +36 -8
  182. package/dist/phoenix-diagram/bundle/schemas/erd.schema.json +384 -0
  183. package/dist/phoenix-diagram/bundle/schemas/lifecycle.schema.json +202 -0
  184. package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/sequence.schema.json +41 -10
  185. package/dist/phoenix-diagram/bundle/schemas/timeline.schema.json +170 -0
  186. package/dist/phoenix-diagram/bundle/schemas/tree.schema.json +144 -0
  187. package/dist/phoenix-diagram/bundle/schemas/waterfall.schema.json +150 -0
  188. package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/workflow.schema.json +42 -10
  189. package/dist/phoenix-diagram/bundle/scripts/phoenix-bootstrap.cjs +589 -0
  190. package/dist/phoenix-diagram/bundle/scripts/phoenix-diagram +6 -0
  191. package/dist/phoenix-diagram/bundle/scripts/phoenix-launcher.cjs +10 -0
  192. package/dist/phoenix-ui/THIRD-PARTY.json +164 -158
  193. package/dist/phoenix-ui/VERSION.json +17 -17
  194. package/dist/phoenix-ui/bundle/blobs/00727f7b333a7be8ac7740aa257a3a3f691db8ae545a6afab2b787acab5e88df +46 -0
  195. package/dist/phoenix-ui/bundle/blobs/{547e3c89d5b8feeddd67e43131fd84b95253eb42bf7d730b4e471dba011f6e51 → 00f4a6a630f31eb05fbdd5725e4a294233d24574bd70f4f32f4597d8256a7c1c} +0 -4
  196. package/dist/phoenix-ui/bundle/blobs/{41400e182e2180a567923d58bfa935d2799a54f2a747b2c5813c3884c84f768b → 04057592e18ea9dd3c4edcac14cde3fa5b75239c2552d4459db8e047068f61a8} +6 -7
  197. package/dist/phoenix-ui/bundle/blobs/{34571f7d46632205d518d15cb008457494dfad745c6b483bb11d63ca3a22ac48 → 0cb3bf26e1980b0e530373fb32edbe5864a171492a04e2abe1952ffe78bff231} +6 -7
  198. package/dist/phoenix-ui/bundle/blobs/{852d2943678a76c33b2f7a090d2ca6c152cd120e9ae62775fcc91519b9289011 → 0e684572eb98d24b39cd70fa23e66c163178f5a11756dcf8a98fe2335636b33f} +6 -3
  199. package/dist/phoenix-ui/bundle/blobs/{d17b3a454146e74ef4ecf69d7b72a8fa45c4fe1c695dffb0d36690b653cd2d8f → 10553c45c7bf38e527a57a281c4365152a768b4dd7ef597ff34ae841e9ff7d41} +6 -7
  200. package/dist/phoenix-ui/bundle/blobs/{e49257c0fd32b195cccb16fbfda769c007be6b38f25aceefecd23cfff9366cec → 125bc7030d7f2ba789d7b1d5f474af34f8902b764e7bc351b98f1f6f55779929} +6 -3
  201. package/dist/phoenix-ui/bundle/blobs/{74dbcbbad6c3831e95abb38775dd488c59ae9f1d44a95f5fd4bc0051577488fa → 13cf6c054ed424e2eb639ea12d20a4aa2b1c85eeb00afa8cbd8a30c6c22aadd8} +1 -1
  202. package/dist/phoenix-ui/bundle/blobs/1832ff9624cebd30370eb0e806665c656ac879215f93d33bcc0750baa47459dc +46 -0
  203. package/dist/phoenix-ui/bundle/blobs/{8e7de5ca347036a07f5f1e9cab942d8ff378d029bc101fa6d126406f3298c9db → 1864a10c29e7062cca5e49d1790dc7d9d8ea777bfa2ab6fd941635965cd0084d} +1 -1
  204. package/dist/phoenix-ui/bundle/blobs/{784722b72224a7005a80cdcd6408dd2b25b23fd9619d0f6c8788f7ac681fad4c → 1ecc81de39d28b85b95e797bcc338d4213a50231c3315a741d14571fd22c844f} +6 -7
  205. package/dist/phoenix-ui/bundle/blobs/{b8c614dc7c2eb30ee0f864fec116dbcafb39e5a199dce66d0c1a88b13f76265a → 2079e4146039a8dadf19a39237cbdc0b8b54ea1fa16d320716c2cbf58161c835} +1 -1
  206. package/dist/phoenix-ui/bundle/blobs/{dba6e4a09c5d752e5ddebe7c2c1aefc9c4b2a84e01a3178599579778ed2d09e9 → 2813aa68c0804a7fe061d88201d8a684cac9987b48511e1e2cbfe0a869a67a82} +6 -7
  207. package/dist/phoenix-ui/bundle/blobs/{2889c2817b5079abff254bb6d13f92dbde0fabc38be4acc7d20e613eef5e5829 → 2873e340be947c83c3d03520139b73524fd166a34063d2693d3b711021ea5b87} +6 -7
  208. package/dist/phoenix-ui/bundle/blobs/{64c4aa2d1c24ae5028e987498ac544020d48600a51d9654b2df562681ba480f2 → 298ef41899acefa056eccf2345378078832db6d868d2377f471f896d5c1599f9} +6 -14
  209. package/dist/phoenix-ui/bundle/blobs/{1b7174a6f3f49a8efc8f7fa74ff84cf8960e2646b9bc976e4129a7c8ad608faa → 2b5cef2a14a5b1256ec6de9172a4f57f227948ced1921ef86e899f48524d7fb8} +1 -1
  210. package/dist/phoenix-ui/bundle/blobs/{f148f630f43f3c91cf10feeda5a3c21448ca0683ce82d0fe763c1b43dee584d6 → 2d376cbbf7ec1e262614aac4f1b200e8f60e86e940c7137a2a26788bc857e509} +6 -7
  211. package/dist/phoenix-ui/bundle/blobs/2e5985a6eb339d70cfa25f6d2b420a0ef286caa8467f0226eb841702ec438d0b +46 -0
  212. package/dist/phoenix-ui/bundle/blobs/{7e199833376de5d2b6e088ee2965b448f94da842f28ccbd707e1cc3a295147c8 → 3322d691bf7b578b38723576df6b266993b2afb9e567b0cd1ded898ffe1dc17e} +1 -1
  213. package/dist/phoenix-ui/bundle/blobs/{f82bfc4c6bc9169d4978d5e16fb925f6e152fdd21dc6a2fae719dfdc1645581f → 3625c5c2750f117021232ce81c1e39ac5ef7c21445729327b88cf54dfc937df0} +6 -3
  214. package/dist/phoenix-ui/bundle/blobs/{2ceacad745665f79fd7ad5565646426a36a1b508c0469b931d0f202fad45a80b → 36310febe3e7bd4c9b21407603f2a04afefdc87b7821758bb47098b1b2876765} +6 -3
  215. package/dist/phoenix-ui/bundle/blobs/{24d92a176573768bfffaf8f9c6483e58bceb5bf2a095d1cdf3d3a2c0bcda0707 → 3a9c2daf4ef284ca83b0e7f6fef3a5300e273c32b20769e090463cb8a8b0b06f} +1 -1
  216. package/dist/phoenix-ui/bundle/blobs/{153e377c44b162cf0074698a61716db7f664db78f5635efa926bed484de4f54c → 3ce1a44efe39b93e7a39307c6a5e5f514e938fbae818e358986b4db1b05883ca} +1 -1
  217. package/dist/phoenix-ui/bundle/blobs/{ad8ad0b7acf6c88ef9ce0ee1a640c2200da77821f0d97d605d4f1d4a10e5897a → 403fcde498d75abec7844ee31434201152ac229f7675772164d69563f0572da4} +1 -1
  218. package/dist/phoenix-ui/bundle/blobs/{e8ee6c08e94b80324173d89d6f4cdc5b4829ea6858b3a11fc186588a490cada4 → 45d0e7eff0923c40296e971318756617944c4f1c97f03126cd74c0f8c629f8a4} +3 -1
  219. package/dist/phoenix-ui/bundle/blobs/{e23dabf908842be08751fc4e7f3b586e8c6b1ca0fc30303ec5317c77f83dcf26 → 4c0f396bfa85171f61972d3f3765733318769bb53fe06d2cdcb5d7f64578b5b8} +1 -1
  220. package/dist/phoenix-ui/bundle/blobs/{a5517d32c1539c388c47c00879a0d807ed2989647bfa8c0844ef22328f75f5be → 4f6563876e0e0cc51c38a06767b8800eb3238611e9fdd11e5ff9dd487c742e74} +1 -1
  221. package/dist/phoenix-ui/bundle/blobs/{a9d2203acd45ca33a13d5c68b02b23ed512425ac15f0e8438318ed124b43729d → 4fcada229d0c689c1a493d13184145a81ff40c498e882142ae390bda8e5b2492} +15 -0
  222. package/dist/phoenix-ui/bundle/blobs/5293adc55cf66068b6df20468ad9e91433fd1c48e75d66c86f874aca951a8fb9 +46 -0
  223. package/dist/phoenix-ui/bundle/blobs/{96e2e6bd4fcf9a2c6da65fb029f96d9176308fae2efd9d8653d3b8d838960e07 → 5436f0301ec258f3badcc6842019ee29a9b870d2727dc425fbc9cc0f4f88a284} +3 -1
  224. package/dist/phoenix-ui/bundle/blobs/{d0f4939e86a62b0ca437d51a997ceba7e77d64566b7fa8ca2747487e31ca819d → 54a09a4afdffca3cc135e5007716ea684dc1ed7a78349de859225c55a2fed810} +6 -7
  225. package/dist/phoenix-ui/bundle/blobs/{d5102701d41f7c6195d410a873f742ac72c428b04196e47df5555c5ccaf80504 → 55277fa15eb4bd2f09bf7bb24c4e79df417b06654b1e10f502c7928b192fd7cc} +6 -3
  226. package/dist/phoenix-ui/bundle/blobs/{878064e46af4e4109bab405f965e4149bee40bbe8912ffede10b74cec6cff027 → 567c3f42394f9aee9b048a001016a7ba9d8773d78027f8c995c379886634e719} +6 -3
  227. package/dist/phoenix-ui/bundle/blobs/57c8f33a7401f918566b8a4883871a69ef2223438c51f158c67f69e3250be465 +46 -0
  228. package/dist/phoenix-ui/bundle/blobs/{bc29e115fd337dda2cc7fc70b868dc18e426b08ec186fd270fcfe96bb2efaa5d → 61450dbef64859e3136cd17ae3e997134d5df5721d96985c4e07367f38522129} +6 -3
  229. package/dist/phoenix-ui/bundle/blobs/{e3c1e925be0b2deb0e3765b83ab94b86560292364f275e98bb23a8bdf2c2e049 → 656bbfda3e72b40d53b5832293dc8700ad8a784e804a6246271bf0ea23527822} +1 -1
  230. package/dist/phoenix-ui/bundle/blobs/{ffcaa5c58e779ec74d18bfc3013ad8003f6e7a23f629c1a3b878618961a8b6a3 → 68b454a99ba72c3b9b93ed96c4267847297169f6a5bf321b20e60d637c271068} +6 -3
  231. package/dist/phoenix-ui/bundle/blobs/68e44832c82b873b0aeb2da56def7b1de5f612c019445e5e28238c690124cbbe +46 -0
  232. package/dist/phoenix-ui/bundle/blobs/{45bbd4a8e02ca0012216c5c68e1dcd655ae0046bd50ba4295ef1f58ec4a0957c → 6b8d4c71355429a0b16bf367163fea46103a0a99b4e34f87608a39d85b1b980a} +6 -3
  233. package/dist/phoenix-ui/bundle/blobs/{264815d0080e4862715a4f82542e66241c6563f07259d32aed4a17bbc329b9cc → 6cef874722442de7c60ea96f4221dc54cc4250a270cd05a1e818b58c5b43e232} +6 -7
  234. package/dist/phoenix-ui/bundle/blobs/{2028a857c0476324a4256faf66693e2a869275e53a88d2b182a28b62c2a17893 → 7181f1f4c452c4345695f9100f6deb610f54f4c55f126043433a65b8491fc680} +6 -7
  235. package/dist/phoenix-ui/bundle/blobs/{ccb76aabba47938d518a5d46a09d7e70c4a9222bc391e163763f2a7f12d30437 → 75850a8c9d2a8259f71ef1f86dd5d1325415227c1887e81a3467ae1ee400979f} +1 -1
  236. package/dist/phoenix-ui/bundle/blobs/{4b03cdb5b17d534b5c7e84b079c066f59e8b60b9e454671a453867c4aeb9920d → 77bcc6c2d6ac00a8bfead3b6c6b5fc69f4b60bf086ebbc89271e1b23003168c9} +1 -1
  237. package/dist/phoenix-ui/bundle/blobs/{9520e25a381c82af6f46e175b7c347d1dc513d933dd6cf8c52570c72abb4ca7f → 792552563745d208594cf4ade19110f2c811a0e1a2661ae1ef43a185ccff5a69} +1 -1
  238. package/dist/phoenix-ui/bundle/blobs/{f7c8af35acf71a96056afb6afcff6a3ea42f65561f02652d04e11ad9ece9b8e9 → 7acd9b6f2f61b509c6a518508b8b52c2f0de67cdea4fd3f3d383b3ce8b38cf5e} +6 -7
  239. package/dist/phoenix-ui/bundle/blobs/7bacc1e3da7e8b7127ca3f8f69a2422098b9b2d23fbedefc56dfe76117c1c0e3 +46 -0
  240. package/dist/phoenix-ui/bundle/blobs/{78662176c1d31cec2d640f70df203f93cc1aec604cfc31619f4d2c62ab78861b → 8078b804bea630ed9c4ea07ec2f8ac92aba4128725860a66599eda90390d98f6} +6 -3
  241. package/dist/phoenix-ui/bundle/blobs/{2291169748fe0c4c80634dff3083e7464f82d4358b9b2186759b316e612d466f → 88b150cb804bc141b80a5687a091f61b99627155c465a27adb88546ef615af92} +6 -3
  242. package/dist/phoenix-ui/bundle/blobs/{bde88bf5ac59d744440d9b65f95ceaae01c803b101d48e6afd644a06eeb5de63 → 90f8b07ec12b78e633e306322cda58415aea70d8e0f9ff85bd439361c01dabe1} +6 -3
  243. package/dist/phoenix-ui/bundle/blobs/{486145071d3445e82774f1b39b2bb15986ce52277e798a31ef7e9c27afb42af3 → 95b2944686e8258a655c3b5e6db68593e24e5199354e46aac553918ea2c0f55a} +1 -1
  244. package/dist/phoenix-ui/bundle/blobs/{a1998e37084c11f496d4970f86a85d5a6375bbeaa4797b9f42bbac2d44048d23 → 979639f0e8859d600a8db57e733566d9ad37ff8258c3e05a6f9c0f3008e92373} +1 -1
  245. package/dist/phoenix-ui/bundle/blobs/{3173293607055ea6e1a153ec6f51fb8154782157c8a61abf411da1f41be61728 → 9eaaa00049844060f842fe7fb73cc8edc4be5225cf38a96f33bda3ffc381456c} +6 -7
  246. package/dist/phoenix-ui/bundle/blobs/{69086f7cb235b35ccc230e1f2da41cbb10cea8f0636b6d4514672113a3adc2cb → a420bbda622399399a6b5c7c3614dcaebc6c62faceaf7b3c83c97db53d26b165} +1 -1
  247. package/dist/phoenix-ui/bundle/blobs/a63054b8920905045753facece83f154bf806158c6f46ef380036e7a82d4fde5 +46 -0
  248. package/dist/phoenix-ui/bundle/blobs/{e802e4f7bdc89050a9c0f2ca506e1d493a2316e6e810c0336c57aa073717ef3e → a63788c764b0e4fdcbc029d46093016310edcbcf702d62688e5aaac7ddeee6fd} +3 -1
  249. package/dist/phoenix-ui/bundle/blobs/{827a211ea03d2cb44b4ea1bc81ba1a6dc51a87fa16d6692997c4e4751241c815 → acfc4c26b135d5b27fc0930738486c9d43d379704102fab45564320180942e4b} +4 -2
  250. package/dist/phoenix-ui/bundle/blobs/{8da14f3eabac53c990a66e721387367b46cb676cc4204e8c67d6f88c95a6217f → ad243ca615349127aa422bccc1a6604ad17149735659087ca5bab3c5fae97f4e} +6 -7
  251. package/dist/phoenix-ui/bundle/blobs/b63931066e2b2623d012e1a3c1a0769cc43ed6640460c3899669b45539d6a20d +46 -0
  252. package/dist/phoenix-ui/bundle/blobs/{bb65af58ecc3e0c0093dc9a705a7ab643035e4e592c3adb93583c82d1aef1f51 → bde793ab5ad776f7e6f6d25ce2b838c1b5022054a1dad5502a873423eb0ad917} +6 -7
  253. package/dist/phoenix-ui/bundle/blobs/{8de7c97949b0bc4194b3be7645e4b13e9419767927482d01cf19476f6cbeda14 → c0a70ab2889e5c16e1f09249aefad948ce352c42cfe2b5afb758a4524e1b21b6} +6 -3
  254. package/dist/phoenix-ui/bundle/blobs/{60b2914df394800688c4e20f4eb34e117cd430df9954cf4d48574734507723f4 → c9ee9006ae6c0194a5d39a9f0cb275c52d74a71ea3f6dc2b4c1c7bd89f48a2c0} +1 -1
  255. package/dist/phoenix-ui/bundle/blobs/{6d8315e307eab11d3236935daf7267746cce6da3b51296e6999651ac97bda3a3 → cadc2daefcf238aab981fa56388381d3d5ab9c0686bb9dd8187035c9933dfcee} +6 -3
  256. package/dist/phoenix-ui/bundle/blobs/{d7b744fcc95164d96d9f811a93e2e8a374887146eb762ef775f3d3c7f27abc8d → cbea5728b90f58ff047be6ec4f14eed9d63c7148f5db99b5f147d2f17b472317} +1 -1
  257. package/dist/phoenix-ui/bundle/blobs/d408a4fea71b656aa8a5f6b5c037815a6e4229df336629ebddf4b5c85ed82fac +46 -0
  258. package/dist/phoenix-ui/bundle/blobs/{6ff950a5729ad9ea480ddf8c1b489b1c84189bbf7d6034b3b5a98e7c11a28cec → d9ae0c782d8a77787561536c0d7bc3b61175d59303f3cb8c20796f85140c6984} +1 -1
  259. package/dist/phoenix-ui/bundle/blobs/{1d53e2226465b1047faec7cda2e743e61540ea69e073a3a4057e8d86b277405f → e2932d63eb7f52a82960a19ba79bc800ef4f212164e098f96dee7a4326302f38} +1 -1
  260. package/dist/phoenix-ui/bundle/blobs/{fa576f6655b235bdea535198647305b7a3855e810180cbdf5d4c246c03c7d190 → e381bcfec42ac541d574011460600cf0818aa0e3362e8c6d205b4157890bf821} +6 -7
  261. package/dist/phoenix-ui/bundle/blobs/{8fbce5b4859e6011afa83b1c07c4436589cd7181f9cb997538f4c27f196d0d34 → e415657d8725d9b60ece42cc18581da177c42fc47cb11e501db722a5f524ecf7} +6 -7
  262. package/dist/phoenix-ui/bundle/blobs/{546a8428a2d8628bb3496fadb8c36a6dd65a33464291f214ceb581828f37081b → e46d63e5f8a6ead1d44c8b6302a0c7247af8585b975ab5715518381777622ede} +6 -3
  263. package/dist/phoenix-ui/bundle/blobs/ee63b3f9b354d69443d05ea4a338af56546897335ace7533546e10be56ea2207 +46 -0
  264. package/dist/phoenix-ui/bundle/blobs/{c23617601e9c4d97b775c175a5ce1642c40459b157d0821609fe1d253b83ced8 → ef7d57633252f4604749447608850e299c277f7dd1a32776685df0724b1051c8} +6 -7
  265. package/dist/phoenix-ui/bundle/blobs/{0581c8428246f43c5374393878a29e38f2b1865df87e6f13f2309b8eae54e76f → f0652c6ce41e6949133360178f192ea4ee9f6129a018c7a8b6652870c2330392} +1 -1
  266. package/dist/phoenix-ui/bundle/blobs/{cfac9eaf96481a8874391e5cecc6149abea1f1f19622f77f1ebb9e1876720e91 → f06c9d797ca2ac8c6a49d3dcd2e99d1b4df8bc9637a49c7e80f3161f49d06b1b} +4 -2
  267. package/dist/phoenix-ui/bundle/blobs/{d50780cb0a345051ae3fb12c5f8249a5dac9324d6a1963f04d03aaf769ffc27c → f077545caeb3ecb9f51a3f703a09736ca924869f4b4345c1b1ffbd9bf927a287} +6 -3
  268. package/dist/phoenix-ui/bundle/blobs/f781c5874bcd79ebe1b3b012275b9af7eae6c4867e9a16e29bb3d3ed3dc1940b +46 -0
  269. package/dist/phoenix-ui/bundle/blobs/fa10c0c926997387c89b7c1070e25b1b2b53ee891741e3c450a89ec6c6dcaf7d +46 -0
  270. package/dist/phoenix-ui/bundle/blobs/fb1a36ab7116b0c6709b89720cdded29d80982114c2f87cad614e01e126270dd +46 -0
  271. package/dist/phoenix-ui/bundle/blobs/fbd3214fc12ba70d9c69a995742ba73dc5365823af63afdc93c0c8a8f0c484af +46 -0
  272. package/dist/phoenix-ui/bundle/blobs/{77682e9d63b484f94a699f2c0b393e4540797d311362c384a3d643aec11d6985 → fea19b8381ec10ff8ed1923a336332974bbb552227ed215e7ddaaf0ec0112c1d} +1 -1
  273. package/dist/phoenix-ui/bundle/manifest.json +126 -126
  274. package/docs/phoenix-diagram.md +173 -0
  275. package/docs/phoenix-ui.md +40 -12
  276. package/package.json +14 -10
  277. package/skills/agi-mode/SKILL.md +3 -1
  278. package/skills/agi-mode/assets/sdlc/event.md +4 -5
  279. package/skills/agi-mode/assets/sdlc/object-status.md +1 -1
  280. package/skills/agi-mode/assets/sdlc/protocol.md +4 -2
  281. package/skills/agi-mode/evals/scenarios.md +108 -3
  282. package/skills/agi-mode/playbooks/authoring-a-skill.md +13 -2
  283. package/skills/agi-mode/playbooks/eval.md +19 -3
  284. package/skills/agi-mode/playbooks/hillclimb.md +4 -2
  285. package/skills/agi-mode/playbooks/reflection.md +1 -1
  286. package/skills/agi-mode/playbooks/sdlc.md +10 -6
  287. package/skills/agi-mode/playbooks/what-next.md +6 -2
  288. package/skills/agi-mode/references/eval-protocol.md +13 -4
  289. package/skills/agi-mode/references/interface-design.md +1 -0
  290. package/skills/agi-mode/references/remote-evolution.md +178 -0
  291. package/skills/agi-mode/references/skill-evolution.md +2 -0
  292. package/skills/agi-mode/scripts/evolution/compare.py +569 -0
  293. package/skills/agi-mode/scripts/evolution/evolution.py +2886 -0
  294. package/skills/agi-mode/scripts/evolution/examples/public-smoke.json +128 -0
  295. package/skills/agi-mode/scripts/evolution/examples/quality-calibration.json +128 -0
  296. package/skills/agi-mode/scripts/evolution/examples/quality-rubric.json +133 -0
  297. package/skills/agi-mode/scripts/evolution/protocol.py +1586 -0
  298. package/skills/agi-mode/scripts/evolution/pyproject.toml +16 -0
  299. package/skills/agi-mode/scripts/evolution/quality.py +689 -0
  300. package/skills/agi-mode/scripts/evolution/remote.py +2303 -0
  301. package/skills/agi-mode/scripts/evolution/tests/support.py +201 -0
  302. package/skills/agi-mode/scripts/evolution/tests/test_apply.py +643 -0
  303. package/skills/agi-mode/scripts/evolution/tests/test_bounded_exploration.py +236 -0
  304. package/skills/agi-mode/scripts/evolution/tests/test_bundles.py +414 -0
  305. package/skills/agi-mode/scripts/evolution/tests/test_calibration.py +460 -0
  306. package/skills/agi-mode/scripts/evolution/tests/test_compare.py +377 -0
  307. package/skills/agi-mode/scripts/evolution/tests/test_protocol.py +357 -0
  308. package/skills/agi-mode/scripts/evolution/tests/test_quality.py +647 -0
  309. package/skills/agi-mode/scripts/evolution/tests/test_remote.py +857 -0
  310. package/skills/agi-mode/scripts/evolution/tests/test_search.py +1109 -0
  311. package/skills/agi-mode/scripts/evolution/tests/test_typesafe.py +624 -0
  312. package/skills/agi-mode/scripts/evolution/tests/test_verifier_context.py +132 -0
  313. package/skills/agi-mode/scripts/evolution/typesafe_worker.py +145 -0
  314. package/skills/agi-mode/scripts/evolution/uv.lock +2548 -0
  315. package/skills/apply-code-review/SKILL.md +1 -0
  316. package/skills/apply-code-review/agents/openai.yaml +2 -0
  317. package/skills/apply-doc-review/SKILL.md +1 -0
  318. package/skills/apply-doc-review/agents/openai.yaml +2 -0
  319. package/skills/apply-ui-review/SKILL.md +1 -0
  320. package/skills/apply-ui-review/agents/openai.yaml +2 -0
  321. package/skills/autoresearch/SKILL.md +1 -0
  322. package/skills/clean-artifacts/SKILL.md +52 -0
  323. package/skills/clean-artifacts/agents/openai.yaml +4 -0
  324. package/skills/clean-artifacts/evals/scenarios.md +13 -0
  325. package/skills/clean-artifacts/references/history-cleanup.md +41 -0
  326. package/skills/crd/SKILL.md +100 -65
  327. package/skills/crd/assets/cr-template.md +15 -0
  328. package/skills/crd-respond/SKILL.md +17 -5
  329. package/skills/crd-respond/agents/openai.yaml +2 -2
  330. package/skills/crd-respond/assets/response-template.md +7 -0
  331. package/skills/crd-respond/evals/scenarios.md +7 -0
  332. package/skills/create-verification-skill/SKILL.md +1 -0
  333. package/skills/debugging/SKILL.md +1 -0
  334. package/skills/design-md/SKILL.md +1 -0
  335. package/skills/design-reference/SKILL.md +6 -2
  336. package/skills/design-reference/evals/scenarios.md +4 -0
  337. package/skills/dev-plan/SKILL.md +11 -6
  338. package/skills/dev-plan/references/execution-workflow.md +1 -1
  339. package/skills/dev-plan/references/plan-skeleton.md +234 -69
  340. package/skills/dev-plan/scripts/check_plan.py +1 -1
  341. package/skills/documentation-writer/SKILL.md +19 -14
  342. package/skills/documentation-writer/references/architecture.md +6 -2
  343. package/skills/documentation-writer/references/user-manual.md +2 -2
  344. package/skills/elintp/SKILL.md +12 -6
  345. package/skills/experience-capture/SKILL.md +1 -0
  346. package/skills/gdpr-compliant/SKILL.md +1 -0
  347. package/skills/kpi-dashboard-design/SKILL.md +1 -0
  348. package/skills/landing-page-conversion-audit/SKILL.md +1 -0
  349. package/skills/mcp-release-qa/SKILL.md +2 -1
  350. package/skills/meeting-minutes/SKILL.md +1 -0
  351. package/skills/optimize-agents-md/SKILL.md +128 -0
  352. package/skills/optimize-agents-md/assets/coding-principles.md +118 -0
  353. package/skills/phoenix-diagram/ENGINE.json +39 -0
  354. package/skills/phoenix-diagram/SKILL.md +109 -0
  355. package/skills/phoenix-diagram/examples/legacy.agent-tool-call.workflow.json +94 -0
  356. package/skills/phoenix-diagram/examples/legacy.async-job-roundtrip.sequence.json +61 -0
  357. package/skills/phoenix-diagram/examples/legacy.deployment-release.lifecycle.json +49 -0
  358. package/skills/phoenix-diagram/examples/legacy.product-analytics.dataflow.json +76 -0
  359. package/skills/{archify/test/fixtures/v1-baseline/web-app.architecture.json → phoenix-diagram/examples/legacy.web-app.architecture.json} +16 -11
  360. package/skills/phoenix-diagram/examples/minimal.architecture.json +11 -0
  361. package/skills/phoenix-diagram/examples/minimal.class.json +23 -0
  362. package/skills/phoenix-diagram/examples/minimal.dataflow.json +11 -0
  363. package/skills/phoenix-diagram/examples/minimal.erd.json +25 -0
  364. package/skills/phoenix-diagram/examples/minimal.lifecycle.json +11 -0
  365. package/skills/phoenix-diagram/examples/minimal.sequence.json +13 -0
  366. package/skills/phoenix-diagram/examples/minimal.timeline.json +15 -0
  367. package/skills/phoenix-diagram/examples/minimal.tree.json +13 -0
  368. package/skills/phoenix-diagram/examples/minimal.waterfall.json +12 -0
  369. package/skills/phoenix-diagram/examples/minimal.workflow.json +12 -0
  370. package/skills/phoenix-diagram/references/architecture-compare.md +111 -0
  371. package/skills/phoenix-diagram/references/authoring-defaults.md +42 -0
  372. package/skills/phoenix-diagram/references/brand-marks.md +52 -0
  373. package/skills/phoenix-diagram/references/compatibility.md +22 -0
  374. package/skills/phoenix-diagram/references/delivery-contract.md +127 -0
  375. package/skills/phoenix-diagram/references/extending-types.md +14 -0
  376. package/skills/phoenix-diagram/references/migration.md +57 -0
  377. package/skills/phoenix-diagram/references/preview.md +45 -0
  378. package/skills/phoenix-diagram/references/repository-authoring.md +29 -0
  379. package/skills/phoenix-diagram/references/viewer-runtime.md +27 -0
  380. package/skills/phoenix-diagram/schemas/README.md +23 -0
  381. package/skills/phoenix-diagram/schemas/architecture.schema.json +329 -0
  382. package/skills/phoenix-diagram/schemas/class.schema.json +348 -0
  383. package/skills/phoenix-diagram/schemas/common.schema.json +358 -0
  384. package/skills/{archify/schemas/lifecycle.schema.json → phoenix-diagram/schemas/dataflow.schema.json} +63 -58
  385. package/skills/phoenix-diagram/schemas/erd.schema.json +384 -0
  386. package/skills/phoenix-diagram/schemas/lifecycle.schema.json +202 -0
  387. package/skills/phoenix-diagram/schemas/sequence.schema.json +254 -0
  388. package/skills/phoenix-diagram/schemas/timeline.schema.json +170 -0
  389. package/skills/phoenix-diagram/schemas/tree.schema.json +144 -0
  390. package/skills/phoenix-diagram/schemas/waterfall.schema.json +150 -0
  391. package/skills/phoenix-diagram/schemas/workflow.schema.json +460 -0
  392. package/skills/phoenix-diagram/scripts/phoenix-bootstrap.cjs +589 -0
  393. package/skills/phoenix-diagram/scripts/phoenix-diagram +6 -0
  394. package/skills/phoenix-diagram/scripts/phoenix-launcher.cjs +10 -0
  395. package/skills/phoenix-ui/GENERATED.json +255 -240
  396. package/skills/phoenix-ui/SKILL.md +7 -4
  397. package/skills/phoenix-ui/evals/scenarios.md +8 -1
  398. package/skills/phoenix-ui/reference/craft-floor.md +3 -1
  399. package/skills/phoenix-ui/reference/critique.md +6 -14
  400. package/skills/phoenix-ui/reference/init.md +1 -1
  401. package/skills/phoenix-ui/reference/live.md +1 -1
  402. package/skills/phoenix-ui/reference/operate.md +15 -0
  403. package/skills/phoenix-ui/scripts/ENGINE.json +17 -17
  404. package/skills/phoenix-ui/scripts/phoenix-bootstrap.cjs +0 -4
  405. package/skills/portal-app-exchange/SKILL.md +1 -0
  406. package/skills/portal-dev-setup/SKILL.md +71 -12
  407. package/skills/portal-dev-setup/scripts/onebox.sh +69 -6
  408. package/skills/portal-external-app/SKILL.md +55 -16
  409. package/skills/portal-external-app/references/config-placement.md +108 -2
  410. package/skills/portal-external-app/references/registration-and-onebox.md +56 -2
  411. package/skills/portal-logging/SKILL.md +1 -0
  412. package/skills/portal-micro-app/SKILL.md +2 -1
  413. package/skills/portal-micro-app/references/sdk-reference.md +3 -1
  414. package/skills/prd/SKILL.md +238 -159
  415. package/skills/prd/evals/scenarios.md +13 -0
  416. package/skills/prd/references/prd-skeleton.md +14 -4
  417. package/skills/react/SKILL.md +1 -0
  418. package/skills/resolve-blocked/SKILL.md +46 -19
  419. package/skills/resolve-blocked/agents/openai.yaml +2 -2
  420. package/skills/resolve-blocked/evals/scenarios.md +22 -0
  421. package/skills/resolve-blocked/references/decisions-contract.md +7 -4
  422. package/skills/review-code/SKILL.md +308 -46
  423. package/skills/review-code/agents/openai.yaml +2 -0
  424. package/skills/review-dev-plan/SKILL.md +88 -33
  425. package/skills/review-dev-plan/agents/openai.yaml +2 -0
  426. package/skills/review-dev-plan/references/report-contract.md +53 -19
  427. package/skills/review-dev-plan/references/review-lenses.md +2 -1
  428. package/skills/review-prd/SKILL.md +90 -34
  429. package/skills/review-prd/agents/openai.yaml +2 -0
  430. package/skills/review-prd/references/report-contract.md +54 -18
  431. package/skills/review-prd-dev-gaps/SKILL.md +1 -0
  432. package/skills/review-prd-dev-gaps/agents/openai.yaml +2 -0
  433. package/skills/review-ui/SKILL.md +369 -71
  434. package/skills/review-ui/agents/openai.yaml +2 -0
  435. package/skills/review-ui/evals/scenarios.md +2 -0
  436. package/skills/rust/SKILL.md +76 -84
  437. package/skills/rust/references/api-design.md +97 -0
  438. package/skills/rust/references/{chapter_10.md → async-tokio.md} +42 -18
  439. package/skills/rust/references/behavioral-patterns.md +49 -0
  440. package/skills/rust/references/bevy.md +95 -0
  441. package/skills/rust/references/{chapter_02.md → clippy-and-linting.md} +26 -15
  442. package/skills/rust/references/{chapter_01.md → coding-idioms.md} +58 -7
  443. package/skills/rust/references/crates-and-dependencies.md +66 -0
  444. package/skills/rust/references/{chapter_08.md → documentation.md} +30 -3
  445. package/skills/rust/references/{chapter_04.md → error-handling.md} +32 -6
  446. package/skills/rust/references/{chapter_06.md → generics-and-dispatch.md} +28 -11
  447. package/skills/rust/references/macros.md +45 -0
  448. package/skills/rust/references/{chapter_03.md → performance.md} +25 -2
  449. package/skills/rust/references/{chapter_09.md → pointers-and-ownership.md} +37 -17
  450. package/skills/rust/references/{chapter_05.md → testing.md} +18 -2
  451. package/skills/rust/references/{chapter_07.md → type-state.md} +5 -1
  452. package/skills/rust/references/unsafe-and-ffi.md +56 -0
  453. package/skills/rust-port/SKILL.md +144 -0
  454. package/skills/rust-review/SKILL.md +177 -0
  455. package/skills/security-audit/SKILL.md +1 -0
  456. package/skills/spec-human-decision/SKILL.md +1 -0
  457. package/skills/sql-optimization/SKILL.md +1 -0
  458. package/skills/story-points/SKILL.md +1 -0
  459. package/skills/swarm/SKILL.md +1 -0
  460. package/skills/test-plan/SKILL.md +1 -0
  461. package/skills/ui-loop/SKILL.md +39 -0
  462. package/skills/ui-loop/agents/openai.yaml +3 -0
  463. package/skills/ui-pattern-research/SKILL.md +1 -0
  464. package/skills/use-llm-gateway/SKILL.md +58 -0
  465. package/skills/use-llm-gateway/agents/openai.yaml +4 -0
  466. package/skills/use-llm-gateway/references/api.md +129 -0
  467. package/skills/use-llm-gateway/references/recovery.md +86 -0
  468. package/skills/use-prompt-dsl/SKILL.md +165 -0
  469. package/skills/use-prompt-dsl/references/examples.md +726 -0
  470. package/skills/use-prompt-dsl/references/language.md +938 -0
  471. package/skills/use-rustify-docs/SKILL.md +60 -0
  472. package/skills/use-rustify-docs/agents/openai.yaml +4 -0
  473. package/skills/use-rustify-docs/references/rustify-docs.md +138 -0
  474. package/skills/use-task-gateway/SKILL.md +60 -0
  475. package/skills/use-task-gateway/agents/openai.yaml +3 -0
  476. package/skills/use-task-gateway/references/authentication.md +75 -0
  477. package/skills/use-task-gateway/references/task-api.md +121 -0
  478. package/skills/use-task-gateway/references/workers.md +85 -0
  479. package/skills/use-task-gateway/references/workflow-actions.md +66 -0
  480. package/skills/use-workflow-service/SKILL.md +57 -0
  481. package/skills/use-workflow-service/agents/openai.yaml +3 -0
  482. package/skills/use-workflow-service/references/action-provider.md +84 -0
  483. package/skills/use-workflow-service/references/authentication.md +76 -0
  484. package/skills/use-workflow-service/references/authoring.md +62 -0
  485. package/skills/use-workflow-service/references/mcp.md +47 -0
  486. package/skills/use-workflow-service/references/open-api.md +88 -0
  487. package/skills/use-workflow-service/references/orchestration-choice.md +63 -0
  488. package/skills/working-with-mbx/SKILL.md +1 -0
  489. package/skills/working-with-mise/SKILL.md +1 -0
  490. package/skills/xgent-app-release/SKILL.md +114 -16
  491. package/skills/xgent-app-release/references/build-and-package.md +2 -1
  492. package/skills/xgent-app-release/references/publish-api.md +6 -1
  493. package/skills/xgent-app-release/references/troubleshooting.md +2 -1
  494. package/skills/xgent-app-release/references/verify-preflight.mjs +21 -1
  495. package/skills/xgent-app-release/scripts/preflight.mjs +42 -3
  496. package/skills/xgent-image-push/SKILL.md +1 -0
  497. package/skills/xgent-init/SKILL.md +1 -0
  498. package/docs/claude-context-goal-guard.md +0 -124
  499. package/docs/codex-context-goal-guard.md +0 -109
  500. package/hooks/claude/context-goal-guard.js +0 -139
  501. package/hooks/claude/settings.example.json +0 -26
  502. package/hooks/codex/context-goal-guard.py +0 -189
  503. package/hooks/codex/hooks.example.json +0 -26
  504. package/skills/archify/SKILL.md +0 -137
  505. package/skills/archify/assets/template.html +0 -14937
  506. package/skills/archify/bin/archify.mjs +0 -2139
  507. package/skills/archify/bin/open-artifact.mjs +0 -86
  508. package/skills/archify/bin/preview.mjs +0 -653
  509. package/skills/archify/bin/visual-check.mjs +0 -829
  510. package/skills/archify/brand-marks/README.md +0 -31
  511. package/skills/archify/brand-marks/catalog.json +0 -131
  512. package/skills/archify/delta/architecture-delta.mjs +0 -1232
  513. package/skills/archify/examples/agent-run.lifecycle.json +0 -60
  514. package/skills/archify/examples/brand-aware-delivery.architecture.json +0 -47
  515. package/skills/archify/examples/cache-miss-request.sequence.json +0 -82
  516. package/skills/archify/examples/checkout-platform.base.architecture.json +0 -31
  517. package/skills/archify/examples/checkout-platform.head.architecture.json +0 -31
  518. package/skills/archify/examples/dataflow-product-analytics.html +0 -15048
  519. package/skills/archify/examples/event-stream.dataflow.json +0 -57
  520. package/skills/archify/examples/incident-response.workflow.json +0 -64
  521. package/skills/archify/examples/lifecycle-agent-run.html +0 -14983
  522. package/skills/archify/examples/production-deployment.architecture.json +0 -71
  523. package/skills/archify/examples/release-delivery.workflow.json +0 -62
  524. package/skills/archify/examples/sequence-cache-miss-request.html +0 -15063
  525. package/skills/archify/examples/web-app-rendered.html +0 -15012
  526. package/skills/archify/examples/workflow-agent-tool-call-rendered.html +0 -15054
  527. package/skills/archify/migrations/workflow-v2.mjs +0 -279
  528. package/skills/archify/package-lock.json +0 -149
  529. package/skills/archify/package.json +0 -39
  530. package/skills/archify/recipes/scenarios.mjs +0 -391
  531. package/skills/archify/references/authoring-contract.md +0 -247
  532. package/skills/archify/references/brand-marks.md +0 -65
  533. package/skills/archify/references/delivery-contract.md +0 -138
  534. package/skills/archify/references/viewer-runtime.md +0 -45
  535. package/skills/archify/renderers/architecture/grid.mjs +0 -62
  536. package/skills/archify/renderers/architecture/render-architecture.mjs +0 -1078
  537. package/skills/archify/renderers/dataflow/README.md +0 -104
  538. package/skills/archify/renderers/dataflow/render-dataflow.mjs +0 -483
  539. package/skills/archify/renderers/lifecycle/README.md +0 -115
  540. package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +0 -561
  541. package/skills/archify/renderers/sequence/README.md +0 -114
  542. package/skills/archify/renderers/sequence/render-sequence.mjs +0 -464
  543. package/skills/archify/renderers/shared/brand-marks.mjs +0 -563
  544. package/skills/archify/renderers/shared/cli.mjs +0 -218
  545. package/skills/archify/renderers/shared/desktop-readability.mjs +0 -26
  546. package/skills/archify/renderers/shared/diagnostics.mjs +0 -160
  547. package/skills/archify/renderers/shared/engineering-profiles.mjs +0 -157
  548. package/skills/archify/renderers/shared/generated-brand-marks.mjs +0 -2003
  549. package/skills/archify/renderers/shared/generated-validators.mjs +0 -13
  550. package/skills/archify/renderers/shared/geometry.mjs +0 -1423
  551. package/skills/archify/renderers/shared/i18n.mjs +0 -595
  552. package/skills/archify/renderers/shared/layout-report.mjs +0 -40
  553. package/skills/archify/renderers/shared/legend.mjs +0 -217
  554. package/skills/archify/renderers/shared/output-path.mjs +0 -340
  555. package/skills/archify/renderers/shared/repository-evidence.mjs +0 -239
  556. package/skills/archify/renderers/shared/repository-location.mjs +0 -58
  557. package/skills/archify/renderers/shared/text-fit.mjs +0 -49
  558. package/skills/archify/renderers/shared/utils.mjs +0 -232
  559. package/skills/archify/renderers/shared/validator.mjs +0 -86
  560. package/skills/archify/renderers/workflow/README.md +0 -223
  561. package/skills/archify/renderers/workflow/render-workflow.mjs +0 -35
  562. package/skills/archify/renderers/workflow/workflow-compiler.mjs +0 -4400
  563. package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +0 -144
  564. package/skills/archify/schemas/README.md +0 -211
  565. package/skills/archify/schemas/architecture.schema.json +0 -178
  566. package/skills/archify/schemas/common.schema.json +0 -115
  567. package/skills/archify/scripts/check-render-output.mjs +0 -916
  568. package/skills/archify/scripts/check-update.mjs +0 -1667
  569. package/skills/archify/scripts/generate-brand-marks.mjs +0 -141
  570. package/skills/archify/scripts/generate-validators.mjs +0 -66
  571. package/skills/archify/scripts/render-examples.mjs +0 -26
  572. package/skills/archify/scripts/update-contract.mjs +0 -182
  573. package/skills/archify/skill-release.json +0 -10
  574. package/skills/archify/test/adaptive-reader-layout.test.mjs +0 -86
  575. package/skills/archify/test/animation.test.mjs +0 -179
  576. package/skills/archify/test/architecture-compare-recovery.test.mjs +0 -157
  577. package/skills/archify/test/architecture-delta-markers.test.mjs +0 -137
  578. package/skills/archify/test/architecture-delta.test.mjs +0 -705
  579. package/skills/archify/test/artifact-receipt-flush.test.mjs +0 -126
  580. package/skills/archify/test/authored-reachability.test.mjs +0 -95
  581. package/skills/archify/test/authoring-safety-contract.test.mjs +0 -54
  582. package/skills/archify/test/automatic-port-spread.test.mjs +0 -376
  583. package/skills/archify/test/base-input-compatibility.test.mjs +0 -42
  584. package/skills/archify/test/brand-marks.test.mjs +0 -678
  585. package/skills/archify/test/chapter-delta-preview.test.mjs +0 -157
  586. package/skills/archify/test/chapter-handoff.test.mjs +0 -97
  587. package/skills/archify/test/chapter-rail.test.mjs +0 -86
  588. package/skills/archify/test/checkout-line-endings.test.mjs +0 -72
  589. package/skills/archify/test/ci-scope.test.mjs +0 -59
  590. package/skills/archify/test/clean-skill-staging.test.mjs +0 -440
  591. package/skills/archify/test/cli-output-types.test.mjs +0 -201
  592. package/skills/archify/test/cli.test.mjs +0 -986
  593. package/skills/archify/test/community-proof-intake.test.mjs +0 -125
  594. package/skills/archify/test/cursor-onboarding.test.mjs +0 -74
  595. package/skills/archify/test/degraded.test.mjs +0 -161
  596. package/skills/archify/test/delivery-contract.test.mjs +0 -52
  597. package/skills/archify/test/desktop-reader-browser.test.mjs +0 -80
  598. package/skills/archify/test/diagram-guide.test.mjs +0 -92
  599. package/skills/archify/test/engineering-profile.test.mjs +0 -209
  600. package/skills/archify/test/export-browser.test.mjs +0 -305
  601. package/skills/archify/test/export-cleanup-browser.test.mjs +0 -294
  602. package/skills/archify/test/finder-browser.test.mjs +0 -274
  603. package/skills/archify/test/finder.test.mjs +0 -104
  604. package/skills/archify/test/fixtures/automatic-routing-node-border-clearance.workflow.json +0 -40
  605. package/skills/archify/test/fixtures/fail-migration-cleanup.mjs +0 -17
  606. package/skills/archify/test/fixtures/issue-126/custom-widths.workflow.json +0 -18
  607. package/skills/archify/test/fixtures/issue-126/explicit-route.workflow.json +0 -28
  608. package/skills/archify/test/fixtures/issue-126/explicit-viewbox.workflow.json +0 -19
  609. package/skills/archify/test/fixtures/issue-126/labels.workflow.json +0 -18
  610. package/skills/archify/test/fixtures/v1-baseline/agent-run.lifecycle.json +0 -64
  611. package/skills/archify/test/fixtures/v1-baseline/agent-tool-call.workflow.json +0 -88
  612. package/skills/archify/test/fixtures/v1-baseline/cache-miss-request.sequence.json +0 -75
  613. package/skills/archify/test/fixtures/v1-baseline/event-stream.dataflow.json +0 -57
  614. package/skills/archify/test/fixtures/v1-baseline/product-analytics.dataflow.json +0 -70
  615. package/skills/archify/test/fixtures/v1-baseline/production-deployment.architecture.json +0 -71
  616. package/skills/archify/test/fixtures/v1-workflow-700x400.workflow.json +0 -22
  617. package/skills/archify/test/fixtures/v1-workflow-explicit-coordinates.workflow.json +0 -47
  618. package/skills/archify/test/focus-browser.test.mjs +0 -226
  619. package/skills/archify/test/gallery.test.mjs +0 -130
  620. package/skills/archify/test/generate-validators.test.mjs +0 -59
  621. package/skills/archify/test/generate-viewer.test.mjs +0 -165
  622. package/skills/archify/test/generated-artifact-xml.test.mjs +0 -88
  623. package/skills/archify/test/geometry.test.mjs +0 -739
  624. package/skills/archify/test/golden.mjs +0 -207
  625. package/skills/archify/test/grid.test.mjs +0 -47
  626. package/skills/archify/test/guide-page.test.mjs +0 -85
  627. package/skills/archify/test/guide.test.mjs +0 -81
  628. package/skills/archify/test/guided-views-browser.test.mjs +0 -460
  629. package/skills/archify/test/guided-views.test.mjs +0 -144
  630. package/skills/archify/test/helpers/desktop-browser.mjs +0 -48
  631. package/skills/archify/test/helpers/offline-fonts.mjs +0 -76
  632. package/skills/archify/test/helpers/viewer-click.mjs +0 -72
  633. package/skills/archify/test/helpers/xml.mjs +0 -37
  634. package/skills/archify/test/i18n.test.mjs +0 -422
  635. package/skills/archify/test/intent-trace-browser.test.mjs +0 -284
  636. package/skills/archify/test/intent-trace.test.mjs +0 -111
  637. package/skills/archify/test/landing.test.mjs +0 -97
  638. package/skills/archify/test/layout-rules.test.mjs +0 -1498
  639. package/skills/archify/test/legend-contract.test.mjs +0 -404
  640. package/skills/archify/test/motion-governor-browser.test.mjs +0 -342
  641. package/skills/archify/test/motion-governor.test.mjs +0 -111
  642. package/skills/archify/test/offline-font-browser.test.mjs +0 -210
  643. package/skills/archify/test/offline-self-containment.test.mjs +0 -80
  644. package/skills/archify/test/open-artifact.test.mjs +0 -118
  645. package/skills/archify/test/ordinary-model-floor.test.mjs +0 -1052
  646. package/skills/archify/test/output-path.test.mjs +0 -587
  647. package/skills/archify/test/presentation.test.mjs +0 -71
  648. package/skills/archify/test/preset-tryon.test.mjs +0 -113
  649. package/skills/archify/test/preview-contract.test.mjs +0 -40
  650. package/skills/archify/test/preview.test.mjs +0 -530
  651. package/skills/archify/test/proof-aperture.test.mjs +0 -78
  652. package/skills/archify/test/reach-share-card.test.mjs +0 -149
  653. package/skills/archify/test/reader-layout-browser.test.mjs +0 -320
  654. package/skills/archify/test/readme-showcase.test.mjs +0 -319
  655. package/skills/archify/test/real-repository-proof.test.mjs +0 -209
  656. package/skills/archify/test/relationship-direct-explorer.test.mjs +0 -115
  657. package/skills/archify/test/relationship-lens.test.mjs +0 -128
  658. package/skills/archify/test/relationship-permalink.test.mjs +0 -130
  659. package/skills/archify/test/relationship-pulse.test.mjs +0 -122
  660. package/skills/archify/test/release-identity.test.mjs +0 -476
  661. package/skills/archify/test/release-package-gates.test.mjs +0 -750
  662. package/skills/archify/test/render-output-checks.test.mjs +0 -588
  663. package/skills/archify/test/renderer-diagnostic-boundary.test.mjs +0 -107
  664. package/skills/archify/test/repair-receipt.test.mjs +0 -181
  665. package/skills/archify/test/repository-evidence-replacement.test.mjs +0 -136
  666. package/skills/archify/test/repository-evidence.test.mjs +0 -605
  667. package/skills/archify/test/repository-language-metadata.test.mjs +0 -67
  668. package/skills/archify/test/route-journey.test.mjs +0 -125
  669. package/skills/archify/test/route-probe-browser.test.mjs +0 -363
  670. package/skills/archify/test/route-probe.test.mjs +0 -114
  671. package/skills/archify/test/route-share-card.test.mjs +0 -163
  672. package/skills/archify/test/semantic-camera.test.mjs +0 -88
  673. package/skills/archify/test/semantic-flow.test.mjs +0 -90
  674. package/skills/archify/test/semantic-legend-gateway.test.mjs +0 -156
  675. package/skills/archify/test/semantic-lens-browser.test.mjs +0 -372
  676. package/skills/archify/test/semantic-lens.test.mjs +0 -103
  677. package/skills/archify/test/semantic-passport.test.mjs +0 -99
  678. package/skills/archify/test/semantic-radar.test.mjs +0 -735
  679. package/skills/archify/test/semantic-zoom.test.mjs +0 -86
  680. package/skills/archify/test/sequence-column-fit.test.mjs +0 -137
  681. package/skills/archify/test/settled-flow.test.mjs +0 -97
  682. package/skills/archify/test/share-card-export.test.mjs +0 -132
  683. package/skills/archify/test/site-language-continuity.test.mjs +0 -569
  684. package/skills/archify/test/site-language-integration.mjs +0 -9
  685. package/skills/archify/test/skill-metadata.test.mjs +0 -84
  686. package/skills/archify/test/stable-update-manifest.test.mjs +0 -167
  687. package/skills/archify/test/start-page.test.mjs +0 -312
  688. package/skills/archify/test/story-beat-navigator.test.mjs +0 -103
  689. package/skills/archify/test/story-carrier.test.mjs +0 -90
  690. package/skills/archify/test/story-director-strip.test.mjs +0 -91
  691. package/skills/archify/test/story-follow-camera.test.mjs +0 -103
  692. package/skills/archify/test/story-horizon.test.mjs +0 -91
  693. package/skills/archify/test/story-moment-link.test.mjs +0 -93
  694. package/skills/archify/test/story-shelf.test.mjs +0 -84
  695. package/skills/archify/test/story-trail.test.mjs +0 -81
  696. package/skills/archify/test/toolbar-polish.test.mjs +0 -57
  697. package/skills/archify/test/update-contract.test.mjs +0 -133
  698. package/skills/archify/test/update-notifier.test.mjs +0 -3317
  699. package/skills/archify/test/v1-compatibility.test.mjs +0 -329
  700. package/skills/archify/test/vertical-edge.test.mjs +0 -68
  701. package/skills/archify/test/viewer-camera-browser.test.mjs +0 -395
  702. package/skills/archify/test/viewer-chrome-layout.test.mjs +0 -1104
  703. package/skills/archify/test/viewer-identifiers-browser.test.mjs +0 -135
  704. package/skills/archify/test/visual-check.test.mjs +0 -400
  705. package/skills/archify/test/webm-artifact.smoke.mjs +0 -1855
  706. package/skills/archify/test/workflow-compiler-hard-contract.test.mjs +0 -2136
  707. package/skills/archify/test/workflow-compiler.test.mjs +0 -1163
  708. package/skills/archify/test/workflow-migration.test.mjs +0 -620
  709. package/skills/archify/test/workflow-semantic-contract.test.mjs +0 -131
  710. /package/{skills/archify/THIRD_PARTY_NOTICES.md → dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b7fb59365dc21c93b0f62526d74ee913aeec9ae532c112bc76afa7edcd56e14.txt} +0 -0
  711. /package/{skills/archify/LICENSE → dist/phoenix-diagram/THIRD-PARTY-LICENSES/b799ab081703e7821ae5096d2c1abdf14bbdc75e8ea1c4045998c36ed6db9706.txt} +0 -0
  712. /package/{skills/archify/assets/JetBrainsMono-OFL.txt → dist/phoenix-diagram/THIRD-PARTY-LICENSES/c1ab7c666206842a02b35b30770dac0d7a10156ed401c9defc3f02a754d89e90.txt} +0 -0
  713. /package/{skills/archify/examples/agent-tool-call.workflow.json → dist/phoenix-diagram/bundle/examples/legacy.agent-tool-call.workflow.json} +0 -0
  714. /package/{skills/archify/examples/async-job-roundtrip.sequence.json → dist/phoenix-diagram/bundle/examples/legacy.async-job-roundtrip.sequence.json} +0 -0
  715. /package/{skills/archify/examples/deployment-release.lifecycle.json → dist/phoenix-diagram/bundle/examples/legacy.deployment-release.lifecycle.json} +0 -0
  716. /package/{skills/archify/examples/product-analytics.dataflow.json → dist/phoenix-diagram/bundle/examples/legacy.product-analytics.dataflow.json} +0 -0
  717. /package/{skills/archify/examples/web-app.architecture.json → dist/phoenix-diagram/bundle/examples/legacy.web-app.architecture.json} +0 -0
@@ -1,1232 +0,0 @@
1
- import { parseRepositoryRemote } from '../renderers/shared/repository-location.mjs';
2
-
3
- const COMPARATOR_VERSION = 1;
4
- const CANONICAL_VERSION = 1;
5
-
6
- export class ArchitectureDeltaError extends Error {
7
- constructor(code, message, details = {}) {
8
- super(message);
9
- this.name = 'ArchitectureDeltaError';
10
- this.code = code;
11
- this.details = details;
12
- }
13
- }
14
-
15
- const codepointOrder = (left, right) => (left < right ? -1 : left > right ? 1 : 0);
16
- const sorted = (values) => [...values].sort((left, right) => codepointOrder(String(left), String(right)));
17
-
18
- function canonical(value) {
19
- if (Array.isArray(value)) return `[${value.map(canonical).join(',')}]`;
20
- if (value && typeof value === 'object') {
21
- return `{${Object.keys(value).sort(codepointOrder).map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`).join(',')}}`;
22
- }
23
- return JSON.stringify(value);
24
- }
25
-
26
- const equal = (left, right) => canonical(left) === canonical(right);
27
-
28
- function sortedObjects(values) {
29
- return [...values].sort((left, right) => codepointOrder(canonical(left), canonical(right)));
30
- }
31
-
32
- function sortedBy(values, keyFor) {
33
- return [...values].sort((left, right) => codepointOrder(String(keyFor(left)), String(keyFor(right))));
34
- }
35
-
36
- function normalizeRepository(repository) {
37
- if (!repository) return undefined;
38
- const location = parseRepositoryRemote(repository.url, { authored: true });
39
- const url = location?.url || String(repository.url || '');
40
- return {
41
- url: location?.provider === 'github' ? url.toLowerCase() : url,
42
- revision: String(repository.revision || '').toLowerCase(),
43
- ...(repository.provider !== undefined ? { provider: repository.provider } : {}),
44
- ...(repository.link_mode !== undefined ? { link_mode: repository.link_mode } : {}),
45
- };
46
- }
47
-
48
- function normalizeComponent(component) {
49
- return {
50
- ...component,
51
- ...(Array.isArray(component.sources) ? { sources: sortedObjects(component.sources) } : {}),
52
- };
53
- }
54
-
55
- function normalizeBoundary(boundary) {
56
- return { ...boundary, wraps: sorted(boundary.wraps || []) };
57
- }
58
-
59
- export function canonicalArchitecture(diagram) {
60
- const meta = { ...(diagram.meta || {}) };
61
- delete meta.output;
62
- if (meta.repository) meta.repository = normalizeRepository(meta.repository);
63
- return {
64
- schema_version: diagram.schema_version,
65
- diagram_type: diagram.diagram_type,
66
- meta,
67
- ...(diagram.layout ? { layout: diagram.layout } : {}),
68
- components: sortedBy((diagram.components || []).map(normalizeComponent), (component) => component.id),
69
- boundaries: sortedBy((diagram.boundaries || []).map(normalizeBoundary), boundaryKey),
70
- connections: sortedBy(diagram.connections || [], (connection) => connection.id || ''),
71
- ...(diagram.cards ? { cards: diagram.cards } : {}),
72
- };
73
- }
74
-
75
- export function canonicalArchitectureJson(diagram) {
76
- return canonical(canonicalArchitecture(diagram));
77
- }
78
-
79
- function fail(code, message, details) {
80
- throw new ArchitectureDeltaError(code, message, details);
81
- }
82
-
83
- function requireComparableShape(diagram, side) {
84
- if (diagram?.schema_version !== 1) {
85
- fail('delta/schema-version-mismatch', `${side} must use schema_version 1.`, { side, path: '/schema_version', actual: diagram?.schema_version });
86
- }
87
- if (diagram?.diagram_type !== 'architecture') {
88
- fail('delta/type-mismatch', `${side} must use diagram_type architecture.`, { side, path: '/diagram_type', actual: diagram?.diagram_type });
89
- }
90
- }
91
-
92
- function stableIndex(items, collection, side, missingCode = 'delta/stable-id-required') {
93
- const index = new Map();
94
- const missing = [];
95
- const duplicates = [];
96
- (items || []).forEach((item, itemIndex) => {
97
- if (!item?.id) missing.push(`/${collection}/${itemIndex}/id`);
98
- else if (index.has(item.id)) duplicates.push(item.id);
99
- else index.set(item.id, item);
100
- });
101
- if (missing.length) {
102
- fail(missingCode, `${side} ${collection} require authored stable ids for comparison.`, {
103
- side,
104
- paths: sorted(missing),
105
- supportedFixes: [`add a unique id to every ${collection} item`],
106
- });
107
- }
108
- if (duplicates.length) {
109
- fail('delta/duplicate-stable-id', `${side} ${collection} contain duplicate ids.`, {
110
- side,
111
- collection,
112
- ids: sorted(new Set(duplicates)),
113
- supportedFixes: [`make every ${collection} id unique`],
114
- });
115
- }
116
- return index;
117
- }
118
-
119
- const boundaryKey = (boundary) => `${boundary.kind}\u001f${boundary.label}`;
120
-
121
- function boundaryIndex(boundaries, side) {
122
- const index = new Map();
123
- const ambiguous = [];
124
- for (const boundary of boundaries || []) {
125
- const key = boundaryKey(boundary);
126
- if (index.has(key)) ambiguous.push(`${boundary.kind}:${boundary.label}`);
127
- else index.set(key, boundary);
128
- }
129
- if (ambiguous.length) {
130
- fail('delta/boundary-key-ambiguous', `${side} boundary kind + label keys must be unique.`, {
131
- side,
132
- boundaries: sorted(new Set(ambiguous)),
133
- supportedFixes: ['rename one duplicate boundary or add stable boundary ids in a future schema version'],
134
- });
135
- }
136
- return index;
137
- }
138
-
139
- function normalizedField(item, field) {
140
- const value = item?.[field];
141
- if (field === 'sources' && Array.isArray(value)) return sortedObjects(value);
142
- if (field === 'wraps' && Array.isArray(value)) return sorted(value);
143
- return value;
144
- }
145
-
146
- function fieldChanges(before, after, groups) {
147
- const classifications = [];
148
- const changedFields = [];
149
- for (const [classification, fields] of Object.entries(groups)) {
150
- const changed = fields.filter((field) => !equal(normalizedField(before, field), normalizedField(after, field)));
151
- if (changed.length) classifications.push(classification);
152
- changedFields.push(...changed.map((field) => `/${field}`));
153
- }
154
- return { classifications: sorted(classifications), changedFields: sorted(changedFields) };
155
- }
156
-
157
- const COMPONENT_FIELDS = {
158
- semantic: ['type', 'label', 'sublabel', 'tag', 'brand'],
159
- evidence: ['sources'],
160
- geometry: ['row', 'col', 'pos', 'size'],
161
- };
162
- const CONNECTION_FIELDS = {
163
- topology: ['from', 'to'],
164
- semantic: ['label', 'variant'],
165
- geometry: ['fromSide', 'toSide', 'route', 'via', 'labelAt', 'labelDx', 'labelDy', 'labelSegment', 'width'],
166
- };
167
- const BOUNDARY_FIELDS = { scope: ['wraps'], geometry: ['pad'] };
168
-
169
- function statusFor(classifications, kind) {
170
- if (classifications.some((value) => ['topology', 'semantic', 'scope'].includes(value))) return 'changed';
171
- if (classifications.includes('evidence')) return 'evidence-changed';
172
- if (classifications.includes('geometry')) return kind === 'connection' ? 'rerouted' : kind === 'component' ? 'moved' : 'geometry-changed';
173
- return 'same';
174
- }
175
-
176
- function compareEntities(baseIndex, headIndex, kind, groups, describe) {
177
- const changes = [];
178
- const identityClassification = kind === 'connection' ? 'topology' : kind === 'boundary' ? 'scope' : 'semantic';
179
- for (const id of sorted(new Set([...baseIndex.keys(), ...headIndex.keys()]))) {
180
- const base = baseIndex.get(id);
181
- const head = headIndex.get(id);
182
- if (!base) changes.push({ ...describe(id, undefined, head), status: 'added', classifications: [identityClassification], changedFields: [] });
183
- else if (!head) changes.push({ ...describe(id, base, undefined), status: 'removed', classifications: [identityClassification], changedFields: [] });
184
- else {
185
- const fields = fieldChanges(base, head, groups);
186
- const status = statusFor(fields.classifications, kind);
187
- if (status !== 'same') changes.push({ ...describe(id, base, head), status, ...fields });
188
- }
189
- }
190
- return changes;
191
- }
192
-
193
- function summaryFor(changes, shape) {
194
- const summary = Object.fromEntries(shape.map((key) => [key, 0]));
195
- for (const change of changes) {
196
- const key = change.status.replace(/-([a-z])/g, (_all, letter) => letter.toUpperCase());
197
- if (Object.hasOwn(summary, key)) summary[key] += 1;
198
- }
199
- return summary;
200
- }
201
-
202
- function presentationChanged(base, head) {
203
- const basePresentation = {
204
- title: base.meta?.title,
205
- locale: base.meta?.locale,
206
- subtitle: base.meta?.subtitle,
207
- animation: base.meta?.animation,
208
- visual_preset: base.meta?.visual_preset,
209
- quality_profile: base.meta?.quality_profile,
210
- engineering_profile: base.meta?.engineering_profile,
211
- legend: base.meta?.legend,
212
- views: base.meta?.views,
213
- viewBox: base.meta?.viewBox,
214
- layout: base.layout,
215
- cards: base.cards,
216
- };
217
- const headPresentation = {
218
- title: head.meta?.title,
219
- locale: head.meta?.locale,
220
- subtitle: head.meta?.subtitle,
221
- animation: head.meta?.animation,
222
- visual_preset: head.meta?.visual_preset,
223
- quality_profile: head.meta?.quality_profile,
224
- engineering_profile: head.meta?.engineering_profile,
225
- legend: head.meta?.legend,
226
- views: head.meta?.views,
227
- viewBox: head.meta?.viewBox,
228
- layout: head.layout,
229
- cards: head.cards,
230
- };
231
- return !equal(basePresentation, headPresentation);
232
- }
233
-
234
- export function compareArchitecture(base, head, evidence = {}) {
235
- requireComparableShape(base, 'base');
236
- requireComparableShape(head, 'head');
237
- const baseComponents = stableIndex(base.components, 'components', 'base');
238
- const headComponents = stableIndex(head.components, 'components', 'head');
239
- const shared = sorted([...baseComponents.keys()].filter((id) => headComponents.has(id)));
240
- if (!shared.length) {
241
- fail('delta/no-shared-component-id', 'The snapshots share no component id, so Archify cannot prove that they describe the same system.', {
242
- supportedFixes: ['preserve at least one authored component id across snapshots'],
243
- });
244
- }
245
-
246
- const baseConnections = stableIndex(base.connections, 'connections', 'base', 'delta/relationship-id-required');
247
- const headConnections = stableIndex(head.connections, 'connections', 'head', 'delta/relationship-id-required');
248
- const baseBoundaries = boundaryIndex(base.boundaries, 'base');
249
- const headBoundaries = boundaryIndex(head.boundaries, 'head');
250
-
251
- const baseRepository = normalizeRepository(base.meta?.repository);
252
- const headRepository = normalizeRepository(head.meta?.repository);
253
- const identity = (repository) => parseRepositoryRemote(repository.url, { authored: true })?.identity || repository.url;
254
- if (baseRepository && headRepository && identity(baseRepository) !== identity(headRepository)) {
255
- fail('delta/repository-mismatch', 'The snapshots name different repositories.', {
256
- baseRepository: baseRepository.url,
257
- headRepository: headRepository.url,
258
- supportedFixes: ['compare snapshots from the same repository or remove repository evidence from both inputs'],
259
- });
260
- }
261
- const proofLevel = baseRepository && headRepository
262
- && evidence.baseVerified && evidence.headVerified
263
- && /^[a-f0-9]{40}$/.test(baseRepository.revision)
264
- && /^[a-f0-9]{40}$/.test(headRepository.revision)
265
- ? 'revision-pinned'
266
- : 'authored';
267
-
268
- const components = compareEntities(baseComponents, headComponents, 'component', COMPONENT_FIELDS, (id, before, after) => ({
269
- id,
270
- baseLabel: before?.label,
271
- headLabel: after?.label,
272
- }));
273
- const connections = compareEntities(baseConnections, headConnections, 'connection', CONNECTION_FIELDS, (id, before, after) => ({
274
- id,
275
- ...(before ? { base: { from: before.from, to: before.to, label: before.label || '' } } : {}),
276
- ...(after ? { head: { from: after.from, to: after.to, label: after.label || '' } } : {}),
277
- }));
278
- const boundaries = compareEntities(baseBoundaries, headBoundaries, 'boundary', BOUNDARY_FIELDS, (_key, before, after) => ({
279
- key: `${(after || before).kind}:${(after || before).label}`,
280
- kind: (after || before).kind,
281
- label: (after || before).label,
282
- }));
283
- const provenanceChanged = !equal(baseRepository, headRepository);
284
-
285
- return {
286
- schemaVersion: 1,
287
- ok: true,
288
- command: 'compare',
289
- type: 'architecture',
290
- comparatorVersion: COMPARATOR_VERSION,
291
- canonicalVersion: CANONICAL_VERSION,
292
- completeness: 'complete',
293
- proofLevel,
294
- base: {
295
- title: base.meta?.title || '',
296
- ...(evidence.baseRawSha256 ? { rawSha256: evidence.baseRawSha256 } : {}),
297
- ...(evidence.baseSemanticSha256 ? { semanticSha256: evidence.baseSemanticSha256 } : {}),
298
- ...(Number.isInteger(evidence.baseBytes) ? { bytes: evidence.baseBytes } : {}),
299
- ...(baseRepository?.revision ? { revision: baseRepository.revision } : {}),
300
- },
301
- head: {
302
- title: head.meta?.title || '',
303
- ...(evidence.headRawSha256 ? { rawSha256: evidence.headRawSha256 } : {}),
304
- ...(evidence.headSemanticSha256 ? { semanticSha256: evidence.headSemanticSha256 } : {}),
305
- ...(Number.isInteger(evidence.headBytes) ? { bytes: evidence.headBytes } : {}),
306
- ...(headRepository?.revision ? { revision: headRepository.revision } : {}),
307
- },
308
- summary: {
309
- components: summaryFor(components, ['added', 'changed', 'evidenceChanged', 'removed', 'moved']),
310
- connections: summaryFor(connections, ['added', 'changed', 'removed', 'rerouted']),
311
- boundaries: summaryFor(boundaries, ['added', 'changed', 'removed', 'geometryChanged']),
312
- presentationChanged: presentationChanged(base, head),
313
- provenanceChanged,
314
- },
315
- changes: { components, connections, boundaries },
316
- identity: {
317
- components: 'components[].id',
318
- connections: 'connections[].id (required)',
319
- boundaries: 'boundaries[].kind + boundaries[].label (derived)',
320
- },
321
- view: { visualPreset: head.meta?.visual_preset || 'classic' },
322
- limitations: [
323
- 'Authored Architecture IR only; no runtime impact, causality, risk, or mergeability is inferred.',
324
- 'Boundary identity is conservatively derived from kind + label.',
325
- ],
326
- };
327
- }
328
-
329
- function esc(value) {
330
- return String(value ?? '').replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;').replaceAll("'", '&#39;');
331
- }
332
-
333
- const safeJson = (value) => JSON.stringify(value, null, 2).replaceAll('<', '\\u003c').replaceAll('>', '\\u003e').replaceAll('&', '\\u0026');
334
-
335
- export function extractArchitectureSvg(html) {
336
- const match = html.match(/<svg viewBox="0 0 [^"]+" role="img"[\s\S]*?<\/svg>/);
337
- if (!match) fail('delta/svg-missing', 'A validated Architecture artifact did not contain its primary SVG.');
338
- return match[0];
339
- }
340
-
341
- export function extractArtifactCss(html) {
342
- const match = html.match(/<style>([\s\S]*?)<\/style>/);
343
- if (!match) fail('delta/css-missing', 'A validated Architecture artifact did not contain its stylesheet.');
344
- return match[1];
345
- }
346
-
347
- function changeMap(changes) {
348
- return new Map(changes.map((change) => [change.id, change]));
349
- }
350
-
351
- function boundaryChangeMap(changes) {
352
- return new Map(changes.map((change) => [`${change.kind}:${esc(change.label)}`, change]));
353
- }
354
-
355
- function addState(tag, change, side, forcedState) {
356
- const append = (attributes) => tag.endsWith('/>')
357
- ? tag.replace(/\/>$/, `${attributes}/>`)
358
- : tag.replace(/>$/, `${attributes}>`);
359
- if (!change && !forcedState) return append(' data-delta-state="same"');
360
- let state = forcedState || change.status;
361
- if (change?.status === 'added' && side === 'base') state = 'same';
362
- if (change?.status === 'removed' && side === 'head') state = 'same';
363
- const classes = change?.classifications?.join(',') || '';
364
- return append(` data-delta-state="${esc(state)}"${classes ? ` data-delta-classifications="${esc(classes)}"` : ''}`);
365
- }
366
-
367
- function markerFor(state) {
368
- return ({ added: '+', removed: '−', changed: '~', moved: '↔', 'moved-from': '↔', rerouted: '↔', 'geometry-changed': '↔', 'evidence-changed': 'E' })[state] || '';
369
- }
370
-
371
- function addNodeMarker(group, state) {
372
- const symbol = markerFor(state);
373
- if (!symbol) return group;
374
- const box = group.match(/<rect x="([^"]+)" y="([^"]+)" width="([^"]+)"/);
375
- if (!box) return group;
376
- const x = Number(box[1]) + Number(box[3]) - 9;
377
- const y = Number(box[2]) + 9;
378
- return group.replace(/<\/g>$/, `\n <g class="delta-node-marker" aria-hidden="true"><circle cx="${x}" cy="${y}" r="8"/><text x="${x}" y="${y + 3}" text-anchor="middle">${symbol}</text></g>\n </g>`);
379
- }
380
-
381
- function prefixSvgIds(svg, prefix) {
382
- const ids = [...svg.matchAll(/\sid="([^"]+)"/g)].map((match) => match[1]);
383
- let result = svg.replace(/(\s)id="([^"]+)"/g, (_match, space, id) => `${space}id="${prefix}-${id}"`);
384
- for (const id of ids) {
385
- result = result.replaceAll(`url(#${id})`, `url(#${prefix}-${id})`).replaceAll(`href="#${id}"`, `href="#${prefix}-${id}"`);
386
- }
387
- result = result.replace(/aria-labelledby="([^"]+)"/g, (_match, value) => `aria-labelledby="${value.split(/\s+/).map((id) => `${prefix}-${id}`).join(' ')}"`);
388
- return result;
389
- }
390
-
391
- function staticize(svg) {
392
- return svg.replaceAll('tabindex="0" role="button"', 'role="group"').replaceAll(' aria-pressed="false"', '').replaceAll('aria-label="Focus ', 'aria-label="');
393
- }
394
-
395
- function nodeGroupRanges(svg) {
396
- const ranges = [];
397
- const opener = /<g\s+[^>]*\bdata-node-id="([^"]+)"[^>]*>/g;
398
- let open;
399
- while ((open = opener.exec(svg))) {
400
- const tags = /<\/?g\b[^>]*>/g;
401
- tags.lastIndex = open.index;
402
- let depth = 0;
403
- let tag;
404
- while ((tag = tags.exec(svg))) {
405
- depth += tag[0].startsWith('</') ? -1 : 1;
406
- if (depth === 0) {
407
- ranges.push({ id: open[1], start: open.index, end: tags.lastIndex });
408
- opener.lastIndex = tags.lastIndex;
409
- break;
410
- }
411
- }
412
- }
413
- return ranges;
414
- }
415
-
416
- function transformNodeGroups(svg, transform) {
417
- const ranges = nodeGroupRanges(svg);
418
- let cursor = 0;
419
- const parts = [];
420
- for (const range of ranges) {
421
- parts.push(svg.slice(cursor, range.start));
422
- parts.push(transform(svg.slice(range.start, range.end), range.id));
423
- cursor = range.end;
424
- }
425
- parts.push(svg.slice(cursor));
426
- return parts.join('');
427
- }
428
-
429
- const BOUNDARY_FRAME_RE = /<rect data-graph-role="structural-frame"[^>]*data-composition-frame-kind="([^"]+)"[^>]*data-composition-frame-label="([^"]+)"[^>]*\/>/g;
430
- const BOUNDARY_LABEL_RE = /<g data-graph-role="structural-frame-label"[^>]*data-composition-frame-kind="([^"]+)"[^>]*data-composition-frame-label="([^"]+)"[^>]*>[\s\S]*?<\/g>/g;
431
-
432
- function boundaryElements(svg) {
433
- const collect = (pattern, part) => [...svg.matchAll(pattern)].map((match) => ({
434
- start: match.index,
435
- end: match.index + match[0].length,
436
- markup: match[0],
437
- key: `${match[1]}:${match[2]}`,
438
- part,
439
- }));
440
- return [
441
- ...collect(BOUNDARY_FRAME_RE, 'frame'),
442
- ...collect(BOUNDARY_LABEL_RE, 'label'),
443
- ].sort((left, right) => left.start - right.start);
444
- }
445
-
446
- function transformBoundaryElements(svg, transform) {
447
- let cursor = 0;
448
- const parts = [];
449
- for (const element of boundaryElements(svg)) {
450
- parts.push(svg.slice(cursor, element.start));
451
- parts.push(transform(element.markup, element.key, element.part));
452
- cursor = element.end;
453
- }
454
- parts.push(svg.slice(cursor));
455
- return parts.join('');
456
- }
457
-
458
- export function annotateArchitectureSideSvg(svg, receipt, side) {
459
- const nodes = changeMap(receipt.changes.components);
460
- const edges = changeMap(receipt.changes.connections);
461
- const boundaries = boundaryChangeMap(receipt.changes.boundaries);
462
- let result = transformBoundaryElements(svg, (markup, key, part) => {
463
- const change = boundaries.get(key);
464
- if (!change) return markup;
465
- if (part === 'frame') {
466
- return addState(markup, change, side)
467
- .replace(/\/>$/, ` data-delta-boundary-key="${esc(change.key)}"/>`);
468
- }
469
- return markup.replace(
470
- /<text[^>]*>/,
471
- (tag) => tag.replace(/>$/, ` data-delta-state="${change.status}" data-delta-boundary-state="${change.status}" data-delta-boundary-key="${esc(change.key)}">`),
472
- );
473
- });
474
- result = transformNodeGroups(result, (group, id) => {
475
- const change = nodes.get(id);
476
- if ((side === 'base' && change?.status === 'added') || (side === 'head' && change?.status === 'removed')) return group;
477
- const tagged = group.replace(/^<g[^>]+>/, (tag) => addState(tag, change, side));
478
- return addNodeMarker(tagged, change?.status);
479
- });
480
- result = result.replace(/<(?:path|g)\s+[^>]*\bdata-edge-id="([^"]+)"[^>]*>/g, (tag, id) => addState(tag, edges.get(id), side));
481
- return prefixSvgIds(staticize(result), side);
482
- }
483
-
484
- function elementById(svg, kind, id) {
485
- const safe = id.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
486
- if (kind === 'node') {
487
- const range = nodeGroupRanges(svg).find((candidate) => candidate.id === id);
488
- return range ? svg.slice(range.start, range.end) : '';
489
- }
490
- const path = svg.match(new RegExp(`<path\\s+[^>]*\\bdata-edge-id="${safe}"[^>]*/>`))?.[0] || '';
491
- const label = svg.match(new RegExp(`<g\\s+[^>]*\\bdata-edge-id="${safe}"[^>]*>[\\s\\S]*?<\\/g>`))?.[0] || '';
492
- return [path, label].filter(Boolean).join('\n');
493
- }
494
-
495
- function forceElementState(markup, state, classifications = []) {
496
- let result;
497
- if (markup.includes('data-node-id=')) {
498
- result = markup.replace(/^<g\s+[^>]*>/, (tag) => addState(tag, { classifications }, 'delta', state));
499
- } else {
500
- result = markup
501
- .replace(/<path\s+[^>]*\bdata-edge-id="[^"]+"[^>]*\/>/g, (tag) => addState(tag, { classifications }, 'delta', state))
502
- .replace(/<g\s+[^>]*\bdata-edge-id="[^"]+"[^>]*>/g, (tag) => addState(tag, { classifications }, 'delta', state));
503
- }
504
- result = result.replace(/\bid="node-/, 'id="base-node-');
505
- if (markup.includes('data-node-id=')) result = addNodeMarker(result, state);
506
- return result;
507
- }
508
-
509
- function boundaryMarkupByKey(svg, key) {
510
- return boundaryElements(svg)
511
- .filter((element) => element.key === key)
512
- .map((element) => element.markup)
513
- .join('\n');
514
- }
515
-
516
- function boundaryMarkupParts(markup) {
517
- const parts = { frame: '', label: '' };
518
- for (const element of boundaryElements(markup)) parts[element.part] = element.markup;
519
- return parts;
520
- }
521
-
522
- function forceBoundaryState(markup, state, key, classifications = []) {
523
- return markup
524
- .replace(/^<rect[^>]+\/>/, (tag) => addState(tag, { classifications }, 'delta', state).replace(/\/>$/, ` data-delta-boundary-key="${esc(key)}"/>`))
525
- .replace(
526
- /<rect data-graph-role="structural-frame-label-mask"[^>]*\/>/,
527
- (tag) => addState(tag, { classifications }, 'delta', state)
528
- .replace(/\/>$/, ` data-delta-boundary-state="${state}" data-delta-boundary-mask-key="${esc(key)}"/>`),
529
- )
530
- .replace(/<text[^>]*>/, (tag) => tag.replace(/>$/, ` data-delta-state="${state}" data-delta-boundary-state="${state}" data-delta-boundary-key="${esc(key)}">`));
531
- }
532
-
533
- function viewBoxSize(svg) {
534
- const match = svg.match(/viewBox="0 0 ([\d.]+) ([\d.]+)"/);
535
- return match ? [Number(match[1]), Number(match[2])] : [0, 0];
536
- }
537
-
538
- function edgeSymbolMarkup(markup, state) {
539
- const symbol = markerFor(state);
540
- const point = markup.match(/data-composition-points="([\d.-]+),([\d.-]+)/);
541
- const edgeId = markup.match(/\bdata-edge-id="([^"]+)"/)?.[1];
542
- if (!symbol || !point) return '';
543
- return `<text class="delta-edge-marker" data-delta-state="${state}"${edgeId ? ` data-edge-id="${esc(edgeId)}"` : ''} x="${Number(point[1]) + 9}" y="${Number(point[2]) - 7}" aria-hidden="true">${symbol}</text>`;
544
- }
545
-
546
- function boundarySymbolMarkup(markup, state) {
547
- const symbol = markerFor(state);
548
- const frame = markup.match(/<rect[^>]*\bx="([\d.-]+)"\s+y="([\d.-]+)"\s+width="([\d.-]+)"/);
549
- if (!symbol || !frame) return '';
550
- const x = Number(frame[1]) + Number(frame[3]) - 12;
551
- const y = Number(frame[2]) + 16;
552
- return `<text class="delta-boundary-marker" data-delta-state="${state}" x="${x}" y="${y}" text-anchor="middle" aria-hidden="true">${symbol}</text>`;
553
- }
554
-
555
- export function buildDeltaSvg(baseSvg, headSvg, receipt) {
556
- const [baseW, baseH] = viewBoxSize(baseSvg);
557
- const [headW, headH] = viewBoxSize(headSvg);
558
- // Baseline paths and their definitions must travel together in a namespace
559
- // distinct from the current snapshot before the final Delta prefix is added.
560
- const baseRelationshipsSvg = prefixSvgIds(baseSvg, 'base');
561
- const nodes = changeMap(receipt.changes.components);
562
- const edges = changeMap(receipt.changes.connections);
563
- const boundaries = boundaryChangeMap(receipt.changes.boundaries);
564
- const baseNodePhantoms = [];
565
- const baseEdgePhantoms = [];
566
- const baseBoundaryFramePhantoms = [];
567
- const baseBoundaryLabelPhantoms = [];
568
- const edgeMarkers = [];
569
- const boundaryMarkers = [];
570
-
571
- for (const change of nodes.values()) {
572
- if (change.status === 'removed') baseNodePhantoms.push(forceElementState(elementById(baseSvg, 'node', change.id), 'removed', change.classifications));
573
- else if (change.classifications.includes('geometry')) baseNodePhantoms.push(forceElementState(elementById(baseSvg, 'node', change.id), 'moved-from', change.classifications));
574
- }
575
- for (const change of edges.values()) {
576
- if (change.status === 'removed' || change.classifications.includes('topology')) {
577
- const phantom = forceElementState(elementById(baseRelationshipsSvg, 'edge', change.id), 'removed', change.classifications);
578
- baseEdgePhantoms.push(phantom);
579
- edgeMarkers.push(edgeSymbolMarkup(phantom, 'removed'));
580
- } else if (change.classifications.includes('geometry')) {
581
- const phantom = forceElementState(elementById(baseRelationshipsSvg, 'edge', change.id), 'moved-from', change.classifications);
582
- baseEdgePhantoms.push(phantom);
583
- edgeMarkers.push(edgeSymbolMarkup(phantom, 'moved-from'));
584
- }
585
- }
586
- for (const change of boundaries.values()) {
587
- const renderedKey = `${change.kind}:${esc(change.label)}`;
588
- if (change.status === 'removed') {
589
- const phantom = forceBoundaryState(boundaryMarkupByKey(baseSvg, renderedKey), 'removed', change.key, change.classifications);
590
- const parts = boundaryMarkupParts(phantom);
591
- baseBoundaryFramePhantoms.push(parts.frame);
592
- baseBoundaryLabelPhantoms.push(parts.label);
593
- boundaryMarkers.push(boundarySymbolMarkup(phantom, 'removed'));
594
- }
595
- else if (change.status === 'changed' || change.status === 'geometry-changed') {
596
- const phantom = forceBoundaryState(boundaryMarkupByKey(baseSvg, renderedKey), 'moved-from', change.key, change.classifications);
597
- const parts = boundaryMarkupParts(phantom);
598
- baseBoundaryFramePhantoms.push(parts.frame);
599
- baseBoundaryLabelPhantoms.push(parts.label);
600
- }
601
- }
602
-
603
- let delta = annotateArchitectureSideSvg(headSvg, receipt, 'head');
604
- if (baseEdgePhantoms.length) {
605
- const baseDefinitions = baseRelationshipsSvg.match(/<defs>([\s\S]*?)<\/defs>/)?.[1] || '';
606
- delta = delta.replace('</defs>', `${baseDefinitions}</defs>`);
607
- }
608
- delta = delta.replace(/^<svg[^>]+>/, (tag) => tag.replace(/viewBox="[^"]+"/, `viewBox="0 0 ${Math.max(baseW, headW) + 24} ${Math.max(baseH, headH) + 24}"`));
609
- delta = delta.replace(' <!-- Boundaries (behind everything) -->', ` <!-- Baseline boundary frame phantoms -->\n${baseBoundaryFramePhantoms.filter(Boolean).join('\n')}\n\n <!-- Boundaries (behind everything) -->`);
610
- delta = delta.replace(' <!-- Connection paths (before components for correct z-order) -->', ` <!-- Baseline relationship phantoms -->\n${baseEdgePhantoms.join('\n')}\n\n <!-- Connection paths (before components for correct z-order) -->`);
611
- delta = delta.replace(' <!-- Components -->', ` <!-- Baseline boundary label phantoms (below current components) -->\n${baseBoundaryLabelPhantoms.filter(Boolean).join('\n')}\n\n <!-- Baseline removed and move-from component phantoms -->\n${baseNodePhantoms.join('\n')}\n\n <!-- Components -->`);
612
-
613
- for (const change of edges.values()) {
614
- if (change.status === 'added' || change.status === 'changed' || change.status === 'rerouted') {
615
- const current = elementById(delta, 'edge', change.id);
616
- edgeMarkers.push(edgeSymbolMarkup(current, change.status === 'changed' && change.classifications.includes('topology') ? 'added' : change.status));
617
- }
618
- }
619
- for (const change of boundaries.values()) {
620
- if (!['added', 'changed', 'geometry-changed'].includes(change.status)) continue;
621
- const renderedKey = `${change.kind}:${esc(change.label)}`;
622
- boundaryMarkers.push(boundarySymbolMarkup(boundaryMarkupByKey(delta, renderedKey), change.status));
623
- }
624
- delta = delta.replace(' <!-- Legend -->', ` <!-- Delta relationship symbols -->\n${edgeMarkers.filter(Boolean).join('\n')}\n\n <!-- Delta boundary symbols -->\n${boundaryMarkers.filter(Boolean).join('\n')}\n\n <!-- Legend -->`);
625
- return prefixSvgIds(staticize(delta), 'delta');
626
- }
627
-
628
- export function architectureDeltaChangeRows(receipt) {
629
- const rows = [];
630
- for (const change of receipt.changes.components) rows.push({ ...change, kind: 'Component', kindKey: 'component', key: `component:${change.id}`, id: change.id });
631
- for (const change of receipt.changes.connections) rows.push({ ...change, kind: 'Relationship', kindKey: 'relationship', key: `relationship:${change.id}`, id: change.id });
632
- for (const change of receipt.changes.boundaries) rows.push({ ...change, kind: 'Boundary', kindKey: 'boundary', key: `boundary:${change.key}`, id: change.key });
633
- return rows.sort((left, right) => codepointOrder(`${left.status}:${left.kind}:${left.id}`, `${right.status}:${right.kind}:${right.id}`));
634
- }
635
-
636
- function reviewPrimaryStates(row) {
637
- if (row.kindKey === 'component' && row.classifications.includes('geometry')) return [row.status, 'moved-from'];
638
- if (row.kindKey === 'relationship' && row.status === 'changed' && row.classifications.includes('topology')) return ['changed', 'removed'];
639
- if (row.kindKey === 'relationship' && row.classifications.includes('geometry')) return ['moved-from', row.status];
640
- if (row.kindKey === 'boundary' && ['changed', 'geometry-changed'].includes(row.status)) return [row.status, 'moved-from'].sort();
641
- return [row.status];
642
- }
643
-
644
- function reviewIdentity(row) {
645
- const attribute = row.kindKey === 'component' ? 'data-node-id' : row.kindKey === 'relationship' ? 'data-edge-id' : 'data-delta-boundary-key';
646
- return { attribute, value: esc(row.id) };
647
- }
648
-
649
- function reviewTargetTags(deltaMarkup, row) {
650
- const { attribute, value } = reviewIdentity(row);
651
- const safeValue = value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
652
- const identity = new RegExp(`\\b${attribute}="${safeValue}"`);
653
- return [...deltaMarkup.matchAll(/<([a-z][\w:-]*)\s+[^>]*>/g)]
654
- .map((match) => ({ name: match[1], tag: match[0] }))
655
- .filter(({ tag }) => identity.test(tag));
656
- }
657
-
658
- function primaryReviewTags(deltaMarkup, row) {
659
- const tagName = row.kindKey === 'component' ? 'g' : row.kindKey === 'relationship' ? 'path' : 'rect';
660
- return reviewTargetTags(deltaMarkup, row).filter(({ name }) => name === tagName).map(({ tag }) => tag);
661
- }
662
-
663
- function reviewTargetSignature(tags) {
664
- return tags.map(({ name, tag }) => {
665
- const state = tag.match(/\bdata-delta-state="([^"]+)"/)?.[1] || '';
666
- const classifications = tag.match(/\bdata-delta-classifications="([^"]*)"/)?.[1] || '';
667
- return `${name}:${state}:${classifications}`;
668
- }).sort(codepointOrder).join('|');
669
- }
670
-
671
- function expectedReviewTargetSignature(row) {
672
- const classifications = row.classifications.join(',');
673
- const descriptors = [];
674
- if (row.kindKey === 'component') {
675
- for (const state of reviewPrimaryStates(row)) descriptors.push(`g:${state}:${classifications}`);
676
- } else if (row.kindKey === 'boundary') {
677
- for (const state of reviewPrimaryStates(row)) {
678
- descriptors.push(`rect:${state}:${classifications}`, `text:${state}:`);
679
- }
680
- } else {
681
- const forms = row.status === 'added'
682
- ? [{ state: 'added', marker: 'added', label: row.head?.label }]
683
- : row.status === 'removed'
684
- ? [{ state: 'removed', marker: 'removed', label: row.base?.label }]
685
- : row.classifications.includes('topology')
686
- ? [
687
- { state: 'removed', marker: 'removed', label: row.base?.label },
688
- { state: 'changed', marker: 'added', label: row.head?.label },
689
- ]
690
- : row.classifications.includes('geometry')
691
- ? [
692
- { state: 'moved-from', marker: 'moved-from', label: row.base?.label },
693
- { state: row.status, marker: row.status, label: row.head?.label },
694
- ]
695
- : [{ state: 'changed', marker: 'changed', label: row.head?.label }];
696
- for (const form of forms) {
697
- descriptors.push(`path:${form.state}:${classifications}`, `text:${form.marker}:`);
698
- if (form.label) descriptors.push(`g:${form.state}:${classifications}`);
699
- }
700
- }
701
- return descriptors.sort(codepointOrder).join('|');
702
- }
703
-
704
- const total = (summary, key) => summary.components[key] + summary.connections[key] + summary.boundaries[key];
705
-
706
- export function renderArchitectureDeltaHtml({ receipt, baseSvg, deltaSvg, headSvg, baseHtml = '', headHtml = '', artifactCss }) {
707
- const rows = architectureDeltaChangeRows(receipt);
708
- const changed = total(receipt.summary, 'changed');
709
- const proof = receipt.proofLevel === 'revision-pinned' ? 'REVISION-PINNED INPUTS' : 'AUTHORED SNAPSHOTS';
710
- const rowHtml = rows.length ? rows.map((row, index) => {
711
- const label = row.headLabel || row.baseLabel || row.head?.label || row.base?.label || row.label || row.id;
712
- const targetSignature = expectedReviewTargetSignature(row);
713
- return `<li data-change-status="${esc(row.status)}"><button class="change-row" type="button" data-change-index="${index}" data-change-key="${esc(row.key)}" data-change-kind="${esc(row.kindKey)}" data-change-id="${esc(row.id)}" data-change-label="${esc(label)}" data-change-status="${esc(row.status)}" data-change-classifications="${esc(row.classifications.join(', '))}" data-change-target-signature="${esc(targetSignature)}"><span class="token">${esc(markerFor(row.status) || '~')}</span><span>${esc(row.kind)}</span><strong>${esc(label)}</strong><code>${esc(row.id)}</code><span>${esc(row.classifications.join(', '))}</span><span>${esc(row.changedFields.join(', ') || 'identity')}</span></button></li>`;
714
- }).join('\n') : '<li class="empty">No authored architecture changes.</li>';
715
- const baseView = baseHtml
716
- ? `<iframe class="snapshot-frame" title="Before architecture explorer" srcdoc="${esc(baseHtml)}"></iframe>`
717
- : baseSvg;
718
- const headView = headHtml
719
- ? `<iframe class="snapshot-frame" title="After architecture explorer" srcdoc="${esc(headHtml)}"></iframe>`
720
- : headSvg;
721
- const html = `<!doctype html>
722
- <html lang="en" data-theme="dark" data-preset="${esc(receipt.view.visualPreset)}">
723
- <head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${esc(receipt.head.title)} Architecture Delta</title>
724
- <style>
725
- ${artifactCss}
726
- :root{color-scheme:dark;--d-add:#34d399;--d-remove:#fb7185;--d-change:#fbbf24;--d-move:#7dd3fc;--d-focus:#7dd3fc;--d-ink:#e6edf5;--d-muted:#8aa0b5;--d-line:#25384a}
727
- *{box-sizing:border-box}body{margin:0;overflow-x:hidden;background:#071019;color:var(--d-ink);font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace}.proof-page{width:min(1600px,calc(100vw - 64px));margin:auto;padding:30px 0 42px}.proof-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:28px;align-items:end;padding-bottom:20px;border-bottom:1px solid var(--d-line)}.eyebrow{margin:0 0 8px;color:#7dd3fc;font:700 11px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.14em}.proof-head h1{margin:0;font-size:clamp(32px,4vw,56px);line-height:.96;letter-spacing:-.04em}.subtitle{margin:12px 0 0;color:var(--d-muted);font-size:14px}.metrics{display:flex;gap:9px}.metric{min-width:86px;padding:11px 13px;border:1px solid var(--d-line);border-radius:8px;background:#0b1722}.metric strong{display:block;font:700 23px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.metric span{display:block;margin-top:6px;color:var(--d-muted);font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;letter-spacing:.1em}.add strong{color:var(--d-add)}.remove strong{color:var(--d-remove)}.change strong{color:var(--d-change)}
728
- .proof-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:16px 0 10px}.view-switch{display:inline-flex;padding:3px;border:1px solid var(--d-line);border-radius:8px;background:#0a141e}.view-switch button,.utility,.review-step{border:0;border-radius:6px;background:transparent;color:var(--d-muted);padding:8px 14px;font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace;cursor:pointer}.view-switch button[aria-selected="true"]{background:#173047;color:#fff}.utility{border:1px solid var(--d-line)}.view-switch button:focus-visible,.utility:focus-visible,.review-step:focus-visible,.change-row:focus-visible{outline:2px solid var(--d-focus);outline-offset:2px}.utility:disabled,.review-step:disabled{cursor:not-allowed;opacity:.45}.legend{display:flex;gap:16px;color:var(--d-muted);font:650 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.legend span{display:inline-flex;align-items:center;gap:6px}.legend i{width:22px;border-top:3px solid currentColor}.legend .add{color:var(--d-add)}.legend .remove{color:var(--d-remove)}.legend .remove i{border-top-style:dashed}.legend .change{color:var(--d-change)}.legend .change i{border-top-style:dotted}.legend .move{color:var(--d-move)}.legend .move i{border-top-style:double}
729
- .review-strip{display:grid;grid-template-columns:auto auto auto auto minmax(0,1fr);align-items:center;gap:5px;margin:0 0 10px;padding:7px 8px;border-block:1px solid var(--d-line);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.review-step{min-height:34px;border:1px solid var(--d-line);padding-inline:11px}.review-step[aria-pressed="true"]{border-color:var(--d-focus);color:var(--d-ink)}.review-status{min-width:0;padding-left:9px;color:var(--d-muted);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.review-status strong{color:var(--d-ink);font-weight:750}.review-status[data-state="unavailable"]{color:var(--d-remove)}
730
- .canvas{overflow:hidden;border:1px solid var(--d-line);border-radius:10px;background:#09141e;padding:12px;min-height:520px}.canvas svg{display:block;width:100%;height:auto;max-height:72vh}.canvas[hidden]{display:none}.snapshot-frame{display:block;width:100%;height:min(76vh,920px);min-height:620px;border:0;border-radius:6px;background:#071019}.canvas[data-view="base"],.canvas[data-view="head"]{padding:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:.38}.canvas[data-delta-review-active]{--review-same-opacity:.14;--review-change-opacity:.28}.canvas[data-delta-review-active] [data-delta-state="same"]{opacity:var(--review-same-opacity)!important}.canvas[data-delta-review-active] [data-delta-state]:not([data-delta-state="same"]):not([data-delta-review-current]){opacity:var(--review-change-opacity)!important}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:opacity .16s ease-out}g[data-node-id][data-delta-state="added"]>rect:last-of-type{stroke:var(--d-add)!important;stroke-width:3!important}g[data-node-id][data-delta-state="removed"]>rect:last-of-type{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5}g[data-node-id][data-delta-state="changed"]>rect:last-of-type{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3}g[data-node-id][data-delta-state="moved"]>rect:last-of-type,g[data-node-id][data-delta-state="moved-from"]>rect:last-of-type{stroke:var(--d-move)!important;stroke-width:3!important;stroke-dasharray:8 3 2 3}g[data-node-id][data-delta-state="moved-from"],path[data-delta-state="moved-from"]{opacity:.42}path[data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:3!important}path[data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:3!important;stroke-dasharray:7 5!important}path[data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:3!important;stroke-dasharray:2 3!important}path[data-delta-state="rerouted"],path[data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2.5!important;stroke-dasharray:8 3 2 3!important}.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}[data-delta-state="added"] .delta-node-marker,.delta-edge-marker[data-delta-state="added"],.delta-boundary-marker[data-delta-state="added"]{color:var(--d-add)}[data-delta-state="removed"] .delta-node-marker,.delta-edge-marker[data-delta-state="removed"],.delta-boundary-marker[data-delta-state="removed"]{color:var(--d-remove)}[data-delta-state="changed"] .delta-node-marker,.delta-edge-marker[data-delta-state="changed"],.delta-boundary-marker[data-delta-state="changed"]{color:var(--d-change)}[data-delta-state="moved"] .delta-node-marker,[data-delta-state="moved-from"] .delta-node-marker,.delta-edge-marker[data-delta-state="moved-from"],.delta-edge-marker[data-delta-state="rerouted"],.delta-boundary-marker[data-delta-state="geometry-changed"]{color:var(--d-move)}.delta-edge-marker,.delta-boundary-marker{paint-order:stroke;stroke:#071019;stroke-width:3px}
731
- rect[data-graph-role="structural-frame"][data-delta-state="added"]{stroke:var(--d-add)!important;stroke-width:2.5!important}rect[data-graph-role="structural-frame"][data-delta-state="removed"]{stroke:var(--d-remove)!important;stroke-width:2.5!important;stroke-dasharray:7 5!important}rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke:var(--d-change)!important;stroke-width:2.5!important;stroke-dasharray:2 3!important}rect[data-graph-role="structural-frame"][data-delta-state="moved-from"]{stroke:var(--d-move)!important;stroke-width:2!important;stroke-dasharray:8 3 2 3!important;opacity:.42}text[data-delta-boundary-state="added"]{fill:var(--d-add)!important}text[data-delta-boundary-state="removed"]{fill:var(--d-remove)!important}text[data-delta-boundary-state="changed"]{fill:var(--d-change)!important}text[data-delta-boundary-state="moved-from"]{fill:var(--d-move)!important;opacity:.55}
732
- details{margin-top:12px;border:1px solid var(--d-line);border-radius:9px;background:#0a141e}summary{padding:13px 15px;cursor:pointer;font-weight:700}.changes{list-style:none;margin:0;padding:0 8px 8px}.changes li{border-top:1px solid rgba(138,160,181,.16)}.change-row{display:grid;grid-template-columns:30px 90px minmax(140px,1fr) minmax(100px,.7fr) minmax(120px,.8fr) minmax(140px,1.2fr);gap:10px;width:100%;margin:0;padding:9px 7px;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:11px;text-align:left;align-items:baseline;cursor:pointer}.change-row:hover{background:rgba(125,211,252,.06)}.change-row[aria-current="step"]{background:rgba(125,211,252,.1);box-shadow:inset 0 0 0 1px var(--d-focus)}.change-row:disabled{cursor:default}.token{font:800 13px/1 ui-monospace,SFMono-Regular,Menlo,monospace}.changes code,.change-row>span:last-child{color:var(--d-muted)}.proof-foot{display:flex;justify-content:space-between;gap:24px;margin-top:14px;color:var(--d-muted);font:650 10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}
733
- html[data-theme="dark"] body{background:#071019!important;background-image:none!important}html[data-theme="light"]{color-scheme:light;--d-ink:#10283c;--d-muted:#587187;--d-line:#c8d6e2;--d-focus:#006b8f}html[data-theme="light"] body{background:#eef3f7!important;background-image:none!important;color:var(--d-ink)}html[data-theme="light"] .metric,html[data-theme="light"] .view-switch,html[data-theme="light"] details{background:#fff}html[data-theme="light"] .canvas{background:#f8fbfd}html[data-theme="light"] .view-switch button[aria-selected="true"]{background:#dbeaf5;color:#10283c}html[data-theme="light"] .delta-node-marker circle{fill:#fff}html[data-preset="blueprint"] body{background-image:none!important}
734
- @media(max-width:760px){.proof-page{width:100%;padding:12px}.proof-head{grid-template-columns:1fr;gap:14px;align-items:start}.proof-head h1{font-size:32px}.metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.metric{min-width:0}.proof-tools{align-items:stretch;flex-wrap:wrap;gap:8px}.view-switch{display:flex;flex:1 1 100%}.view-switch button{flex:1;padding-inline:8px}.legend{flex-wrap:wrap;gap:8px}.proof-tools>div:last-child{margin-left:auto}.review-strip{grid-template-columns:auto auto auto auto}.review-status{grid-column:1/-1;padding:4px 2px 0}.canvas{min-height:0;padding:6px;overflow:auto}.canvas svg{min-width:720px;max-height:none}.snapshot-frame{min-width:720px}.changes{overflow-x:auto}.change-row{min-width:820px}.proof-foot{flex-direction:column;gap:4px}}
735
- @media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.canvas[data-delta-review-active] [data-delta-review-current]{transition:none!important}}@media print{body{min-width:0;background:#fff;color:#111}.proof-page{width:100%;padding:0}.proof-tools,.review-strip,details{display:none!important}.canvas{display:none!important}.canvas[data-view="delta"]{display:block!important;border:0}.canvas[data-view="delta"] [data-delta-state="same"]{opacity:1!important;transition:none!important}.canvas[data-delta-review-active]{--review-same-opacity:1;--review-change-opacity:1}.canvas[data-delta-review-active] [data-delta-review-current]{opacity:1!important;transition:none!important}.proof-foot{color:#444}}
736
- </style></head>
737
- <body><main class="proof-page"><header class="proof-head"><div><p class="eyebrow">ARCHITECTURE DELTA · ${proof}</p><h1>See what changed<br>before you merge.</h1><p class="subtitle">${esc(receipt.base.title)} → ${esc(receipt.head.title)}</p></div><div class="metrics"><div class="metric add"><strong>${total(receipt.summary, 'added')}</strong><span>ADDED</span></div><div class="metric remove"><strong>${total(receipt.summary, 'removed')}</strong><span>REMOVED</span></div><div class="metric change"><strong>${changed}</strong><span>CHANGED</span></div></div></header>
738
- <div class="proof-tools"><div class="view-switch" role="tablist" aria-label="Architecture snapshot"><button role="tab" data-target="base" aria-selected="false">Before</button><button role="tab" data-target="delta" aria-selected="true">Delta</button><button role="tab" data-target="head" aria-selected="false">After</button></div><div class="legend"><span class="add"><i></i>+ ADD</span><span class="remove"><i></i>− DEL</span><span class="change"><i></i>~ MOD</span><span class="move"><i></i>↔ MOVE</span></div><div><button class="utility" id="export-svg" type="button">Export SVG</button> <button class="utility" id="share-card" type="button">Share Card</button> <button class="utility" id="preset" type="button">Preset</button> <button class="utility" id="theme" type="button">Theme</button></div></div>
739
- <nav class="review-strip" aria-label="Authored change review"><button class="review-step" id="review-overview" type="button" disabled>Overview</button><button class="review-step" id="review-previous" type="button" aria-label="Previous authored change" disabled>←</button><button class="review-step" id="review-play" type="button" aria-pressed="false"${rows.length ? '' : ' disabled'}>Review</button><button class="review-step" id="review-next" type="button" aria-label="Next authored change" disabled>→</button><div class="review-status" id="review-status" role="status" aria-live="polite">Overview · ${rows.length} authored changes</div></nav>
740
- <section class="canvas" data-view="base" hidden>${baseView}</section><section class="canvas" data-view="delta">${deltaSvg}</section><section class="canvas" data-view="head" hidden>${headView}</section>
741
- <details${rows.length <= 10 ? ' open' : ''}><summary>Exact authored changes · ${rows.length}</summary><ul class="changes">${rowHtml}</ul></details>
742
- <footer class="proof-foot"><span>Stable IDs only · completeness: complete · ${proof}</span><span>Authored IR only · no risk or mergeability inference</span></footer></main>
743
- <script id="archify-compare-receipt" type="application/json">${safeJson(receipt)}</script>
744
- <script>(()=>{
745
- const REVIEW_DWELL_MS = 1400;
746
- const tabs = [...document.querySelectorAll('[role="tab"]')];
747
- const views = [...document.querySelectorAll('[data-view]')];
748
- const deltaCanvas = document.querySelector('[data-view="delta"]');
749
- const rowButtons = [...document.querySelectorAll('.change-row')];
750
- const overviewButton = document.querySelector('#review-overview');
751
- const previousButton = document.querySelector('#review-previous');
752
- const playButton = document.querySelector('#review-play');
753
- const nextButton = document.querySelector('#review-next');
754
- const status = document.querySelector('#review-status');
755
- const receiptNode = document.querySelector('#archify-compare-receipt');
756
- const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)');
757
- const exportCss = ${safeJson(artifactCss)};
758
- let activeIndex = -1;
759
- let playbackToken = 0;
760
- let playbackTimer = 0;
761
- let playing = false;
762
- let reviewAvailable = false;
763
- let reviewSources = [];
764
-
765
- function show(id) {
766
- tabs.forEach((tab) => tab.setAttribute('aria-selected', String(tab.dataset.target === id)));
767
- views.forEach((view) => { view.hidden = view.dataset.view !== id; });
768
- }
769
-
770
- function stopPlayback() {
771
- playbackToken += 1;
772
- if (playbackTimer) window.clearTimeout(playbackTimer);
773
- playbackTimer = 0;
774
- playing = false;
775
- playButton.setAttribute('aria-pressed', 'false');
776
- playButton.textContent = activeIndex === rowButtons.length - 1 && rowButtons.length ? 'Replay' : 'Review';
777
- status.setAttribute('aria-live', 'polite');
778
- }
779
-
780
- function failReview() {
781
- stopPlayback();
782
- reviewAvailable = false;
783
- activeIndex = -1;
784
- deltaCanvas?.removeAttribute('data-delta-review-active');
785
- deltaCanvas?.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
786
- rowButtons.forEach((row) => {
787
- row.disabled = true;
788
- row.tabIndex = -1;
789
- row.removeAttribute('aria-current');
790
- });
791
- [overviewButton, previousButton, playButton, nextButton].forEach((button) => { button.disabled = true; });
792
- status.dataset.state = 'unavailable';
793
- status.textContent = 'Review unavailable · compare identity mismatch';
794
- }
795
-
796
- function receiptRows(receipt) {
797
- const definitions = [
798
- { collection: 'components', kind: 'component', id: 'id', statuses: ['added', 'changed', 'evidence-changed', 'removed', 'moved'] },
799
- { collection: 'connections', kind: 'relationship', id: 'id', statuses: ['added', 'changed', 'removed', 'rerouted'] },
800
- { collection: 'boundaries', kind: 'boundary', id: 'key', statuses: ['added', 'changed', 'removed', 'geometry-changed'] },
801
- ];
802
- const rows = [];
803
- for (const definition of definitions) {
804
- const changes = receipt.changes[definition.collection];
805
- if (!Array.isArray(changes)) return null;
806
- for (const change of changes) {
807
- if (!change || typeof change !== 'object' || Array.isArray(change)) return null;
808
- const id = change[definition.id];
809
- if (typeof id !== 'string' || !id || !definition.statuses.includes(change.status)) return null;
810
- if (!Array.isArray(change.classifications) || !change.classifications.length || change.classifications.some((value) => typeof value !== 'string')) return null;
811
- if (new Set(change.classifications).size !== change.classifications.length) return null;
812
- if (!Array.isArray(change.changedFields) || change.changedFields.some((value) => typeof value !== 'string')) return null;
813
- rows.push({ ...change, kind: definition.kind, key: definition.kind + ':' + id, id });
814
- }
815
- }
816
- return rows;
817
- }
818
-
819
- function exactTargets(row) {
820
- const attribute = row.dataset.changeKind === 'component'
821
- ? 'data-node-id'
822
- : row.dataset.changeKind === 'relationship'
823
- ? 'data-edge-id'
824
- : 'data-delta-boundary-key';
825
- return [...deltaCanvas.querySelectorAll('[' + attribute + ']')]
826
- .filter((element) => element.getAttribute(attribute) === row.dataset.changeId);
827
- }
828
-
829
- function targetSignature(matches) {
830
- return matches.map((element) => {
831
- const tag = element.tagName.toLowerCase();
832
- const state = element.dataset.deltaState || '';
833
- const classifications = element.dataset.deltaClassifications || '';
834
- return tag + ':' + state + ':' + classifications;
835
- }).sort().join('|');
836
- }
837
-
838
- function targetsMatch(source, row, matches) {
839
- if (!source || !matches.length || !row.dataset.changeTargetSignature) return false;
840
- if (row.dataset.changeKind !== source.kind || row.dataset.changeId !== source.id || row.dataset.changeStatus !== source.status) return false;
841
- if (row.dataset.changeClassifications !== source.classifications.join(', ')) return false;
842
- return row.dataset.changeTargetSignature === targetSignature(matches);
843
- }
844
-
845
- function validateReview() {
846
- try {
847
- if (document.querySelectorAll('#archify-compare-receipt').length !== 1 || !receiptNode) return false;
848
- if (!deltaCanvas || !['base', 'delta', 'head'].every((id) => document.querySelectorAll('[data-view="' + id + '"]').length === 1)) return false;
849
- if (deltaCanvas.children.length !== 1 || deltaCanvas.firstElementChild?.tagName.toLowerCase() !== 'svg') return false;
850
- const receipt = JSON.parse(receiptNode.textContent);
851
- if (!receipt || receipt.schemaVersion !== 1 || receipt.command !== 'compare' || receipt.completeness !== 'complete' || !receipt.changes) return false;
852
- const sources = receiptRows(receipt);
853
- if (!sources || sources.length !== rowButtons.length) return false;
854
- const sourceByKey = new Map(sources.map((source) => [source.key, source]));
855
- if (sourceByKey.size !== sources.length) return false;
856
- const seen = new Set();
857
- const orderedSources = [];
858
- for (let index = 0; index < rowButtons.length; index += 1) {
859
- const row = rowButtons[index];
860
- const source = sourceByKey.get(row.dataset.changeKey);
861
- if (!source || seen.has(source.key) || row.dataset.changeIndex !== String(index)) return false;
862
- const matches = exactTargets(row);
863
- if (!targetsMatch(source, row, matches)) return false;
864
- seen.add(source.key);
865
- orderedSources.push(source);
866
- }
867
- if (seen.size !== sourceByKey.size) return false;
868
- reviewSources = orderedSources;
869
- return true;
870
- } catch {
871
- return false;
872
- }
873
- }
874
-
875
- function updateControls() {
876
- overviewButton.disabled = !reviewAvailable || activeIndex < 0;
877
- previousButton.disabled = !reviewAvailable || activeIndex <= 0;
878
- nextButton.disabled = !reviewAvailable || activeIndex < 0 || activeIndex >= rowButtons.length - 1;
879
- }
880
-
881
- function selectChange(index, fromPlayback = false) {
882
- if (!reviewAvailable || index < 0 || index >= rowButtons.length) return false;
883
- const row = rowButtons[index];
884
- const matches = exactTargets(row);
885
- if (!targetsMatch(reviewSources[index], row, matches)) { failReview(); return false; }
886
- show('delta');
887
- deltaCanvas.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
888
- matches.forEach((element) => element.setAttribute('data-delta-review-current', 'true'));
889
- deltaCanvas.setAttribute('data-delta-review-active', 'true');
890
- rowButtons.forEach((button, rowIndex) => {
891
- button.tabIndex = rowIndex === index ? 0 : -1;
892
- if (rowIndex === index) button.setAttribute('aria-current', 'step');
893
- else button.removeAttribute('aria-current');
894
- });
895
- activeIndex = index;
896
- updateControls();
897
- const kind = row.dataset.changeKind.charAt(0).toUpperCase() + row.dataset.changeKind.slice(1);
898
- status.textContent = String(index + 1).padStart(2, '0') + ' / ' + String(rowButtons.length).padStart(2, '0') + ' · ' + kind + ' · ' + row.dataset.changeLabel + ' [' + row.dataset.changeId + '] · ' + row.dataset.changeClassifications;
899
- if (fromPlayback) status.setAttribute('aria-live', 'off');
900
- return true;
901
- }
902
-
903
- function overview() {
904
- if (!reviewAvailable) { failReview(); return; }
905
- stopPlayback();
906
- activeIndex = -1;
907
- deltaCanvas.removeAttribute('data-delta-review-active');
908
- deltaCanvas.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
909
- rowButtons.forEach((row, index) => {
910
- row.tabIndex = index === 0 ? 0 : -1;
911
- row.removeAttribute('aria-current');
912
- });
913
- show('delta');
914
- status.removeAttribute('data-state');
915
- status.textContent = 'Overview · ' + rowButtons.length + ' authored changes';
916
- updateControls();
917
- }
918
-
919
- function schedulePlayback(token) {
920
- if (!playing || token !== playbackToken || activeIndex >= rowButtons.length - 1) {
921
- if (activeIndex >= rowButtons.length - 1) stopPlayback();
922
- return;
923
- }
924
- playbackTimer = window.setTimeout(() => {
925
- if (!playing || token !== playbackToken) return;
926
- if (!selectChange(activeIndex + 1, true)) return;
927
- schedulePlayback(token);
928
- }, REVIEW_DWELL_MS);
929
- }
930
-
931
- function startReview() {
932
- if (!reviewAvailable) return;
933
- if (playing) { stopPlayback(); return; }
934
- stopPlayback();
935
- if (!selectChange(0, false)) return;
936
- if (reducedMotion.matches || rowButtons.length < 2) return;
937
- playing = true;
938
- const token = ++playbackToken;
939
- playButton.textContent = 'Pause';
940
- playButton.setAttribute('aria-pressed', 'true');
941
- status.setAttribute('aria-live', 'off');
942
- schedulePlayback(token);
943
- }
944
-
945
- function canonicalDeltaSvg() {
946
- const source = deltaCanvas?.querySelector(':scope > svg');
947
- if (!source) throw new Error('Canonical Delta SVG is unavailable.');
948
- const clone = source.cloneNode(true);
949
- clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
950
- clone.removeAttribute('style');
951
- clone.querySelectorAll('[data-delta-review-current]').forEach((element) => element.removeAttribute('data-delta-review-current'));
952
- const style = document.createElementNS('http://www.w3.org/2000/svg', 'style');
953
- style.textContent = exportCss + '\\n' +
954
- '[data-delta-state="same"]{opacity:.38}' +
955
- '[data-delta-state="added"]{--delta:#34d399}' +
956
- '[data-delta-state="removed"]{--delta:#fb7185}' +
957
- '[data-delta-state="changed"]{--delta:#fbbf24}' +
958
- '[data-delta-state="moved"],[data-delta-state="moved-from"],[data-delta-state="rerouted"],[data-delta-state="geometry-changed"]{--delta:#7dd3fc}' +
959
- 'g[data-node-id][data-delta-state]:not([data-delta-state="same"])>rect:last-of-type{stroke:var(--delta)!important;stroke-width:3!important}' +
960
- 'path[data-delta-state]:not([data-delta-state="same"]){stroke:var(--delta)!important;stroke-width:3!important}' +
961
- 'rect[data-graph-role="structural-frame"][data-delta-state]:not([data-delta-state="same"]){stroke:var(--delta)!important;stroke-width:2.5!important}' +
962
- 'rect[data-graph-role="structural-frame"][data-delta-state="changed"]{stroke-dasharray:2 3!important}' +
963
- '[data-delta-state="removed"],[data-delta-state="moved-from"]{stroke-dasharray:7 5!important}' +
964
- '[data-delta-state="moved-from"]{opacity:.42}' +
965
- '[data-delta-state]:not([data-delta-state="same"]) .delta-node-marker,.delta-edge-marker[data-delta-state],.delta-boundary-marker[data-delta-state]{color:var(--delta)}' +
966
- 'text[data-delta-boundary-state="added"]{fill:#34d399!important}text[data-delta-boundary-state="removed"]{fill:#fb7185!important}text[data-delta-boundary-state="changed"]{fill:#fbbf24!important}text[data-delta-boundary-state="moved-from"]{fill:#7dd3fc!important;opacity:.55}' +
967
- '.delta-node-marker circle{fill:#071019;stroke:currentColor;stroke-width:1.5}.delta-node-marker text,.delta-edge-marker,.delta-boundary-marker{fill:currentColor;font:800 9px ui-monospace,SFMono-Regular,Menlo,monospace}';
968
- clone.insertBefore(style, clone.firstChild);
969
- // The XML declaration pins UTF-8: without it, consumers that guess an
970
- // encoding instead of defaulting to UTF-8 mangle non-ASCII text.
971
- return '<?xml version="1.0" encoding="UTF-8"?>\\n' + new XMLSerializer().serializeToString(clone);
972
- }
973
-
974
- function artifactName(suffix) {
975
- const title = String(JSON.parse(receiptNode.textContent).head.title || 'architecture-delta')
976
- .toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '') || 'architecture-delta';
977
- return title + suffix;
978
- }
979
-
980
- function downloadBlob(blob, name) {
981
- const url = URL.createObjectURL(blob);
982
- const link = document.createElement('a');
983
- link.href = url;
984
- link.download = name;
985
- document.body.appendChild(link);
986
- link.click();
987
- link.remove();
988
- window.setTimeout(() => URL.revokeObjectURL(url), 1000);
989
- }
990
-
991
- function recordExport(format, blob, dimensions) {
992
- document.documentElement.dataset.archifyDeltaExport = JSON.stringify({
993
- ok: true,
994
- format,
995
- bytes: blob.size,
996
- mime: blob.type,
997
- ...(dimensions || {}),
998
- });
999
- }
1000
-
1001
- function exportCanonicalSvg() {
1002
- const blob = new Blob([canonicalDeltaSvg()], { type: 'image/svg+xml;charset=utf-8' });
1003
- downloadBlob(blob, artifactName('-architecture-delta.svg'));
1004
- recordExport('svg', blob);
1005
- return blob;
1006
- }
1007
-
1008
- function loadSvgImage(blob) {
1009
- return new Promise((resolve, reject) => {
1010
- const url = URL.createObjectURL(blob);
1011
- const image = new Image();
1012
- image.onload = () => { URL.revokeObjectURL(url); resolve(image); };
1013
- image.onerror = () => { URL.revokeObjectURL(url); reject(new Error('Could not rasterize canonical Delta SVG.')); };
1014
- image.src = url;
1015
- });
1016
- }
1017
-
1018
- function pngBlob(canvas) {
1019
- return new Promise((resolve, reject) => canvas.toBlob((blob) => {
1020
- if (blob) resolve(blob);
1021
- else reject(new Error('Canvas returned no Share Card PNG.'));
1022
- }, 'image/png'));
1023
- }
1024
-
1025
- async function shareCard() {
1026
- const receipt = JSON.parse(receiptNode.textContent);
1027
- const canvas = document.createElement('canvas');
1028
- canvas.width = 1200;
1029
- canvas.height = 630;
1030
- const ctx = canvas.getContext('2d');
1031
- if (!ctx) throw new Error('2D canvas context unavailable for Architecture Delta Share Card.');
1032
- ctx.fillStyle = '#071019';
1033
- ctx.fillRect(0, 0, 1200, 630);
1034
- ctx.fillStyle = '#0b1722';
1035
- ctx.fillRect(34, 28, 1132, 574);
1036
- ctx.strokeStyle = '#25384a';
1037
- ctx.lineWidth = 2;
1038
- ctx.strokeRect(34, 28, 1132, 574);
1039
- ctx.font = '700 18px ui-monospace, SFMono-Regular, Menlo, monospace';
1040
- ctx.fillStyle = '#7dd3fc';
1041
- ctx.fillText('ARCHITECTURE DELTA', 66, 68);
1042
- ctx.font = '700 34px ui-monospace, SFMono-Regular, Menlo, monospace';
1043
- ctx.fillStyle = '#e6edf5';
1044
- const title = String(receipt.head.title || 'Architecture').slice(0, 46) + ' Architecture Delta';
1045
- ctx.fillText(title.slice(0, 58), 66, 112);
1046
- ctx.font = '700 17px ui-monospace, SFMono-Regular, Menlo, monospace';
1047
- ctx.fillStyle = '#8aa0b5';
1048
- const componentLine = 'COMPONENTS +' + receipt.summary.components.added + ' ~' + receipt.summary.components.changed + ' −' + receipt.summary.components.removed;
1049
- const connectionLine = 'CONNECTIONS +' + receipt.summary.connections.added + ' ~' + receipt.summary.connections.changed + ' −' + receipt.summary.connections.removed;
1050
- const boundaryLine = 'BOUNDARY SCOPE +' + receipt.summary.boundaries.added + ' ~' + receipt.summary.boundaries.changed + ' −' + receipt.summary.boundaries.removed;
1051
- ctx.fillText(componentLine, 66, 151);
1052
- ctx.fillText(connectionLine, 420, 151);
1053
- ctx.fillText(boundaryLine, 786, 151);
1054
- ctx.font = '650 14px ui-monospace, SFMono-Regular, Menlo, monospace';
1055
- const authoredChanges = ['components', 'connections', 'boundaries'].reduce((sum, collection) => {
1056
- const summary = receipt.summary[collection];
1057
- return sum + summary.added + summary.changed + summary.removed;
1058
- }, 0);
1059
- const movementSummary = '↔ moved ' + receipt.summary.components.moved + ' · rerouted ' + receipt.summary.connections.rerouted + ' · presentation ' + (receipt.summary.presentationChanged ? 'changed' : 'unchanged');
1060
- const secondary = authoredChanges === 0
1061
- ? 'No authored architecture changes · ' + movementSummary
1062
- : movementSummary;
1063
- ctx.fillText(secondary, 66, 181);
1064
- const proofLine = receipt.proofLevel === 'revision-pinned'
1065
- ? 'REV ' + String(receipt.base.revision).slice(0, 8) + ' → ' + String(receipt.head.revision).slice(0, 8) + ' · REVISION-PINNED INPUTS'
1066
- : 'AUTHORED SNAPSHOTS';
1067
- ctx.textAlign = 'right';
1068
- ctx.fillText(proofLine, 1134, 181);
1069
- ctx.textAlign = 'left';
1070
- ctx.fillStyle = '#09141e';
1071
- ctx.fillRect(66, 206, 1068, 358);
1072
- ctx.strokeStyle = '#25384a';
1073
- ctx.strokeRect(66, 206, 1068, 358);
1074
- const svgBlob = new Blob([canonicalDeltaSvg()], { type: 'image/svg+xml;charset=utf-8' });
1075
- const image = await loadSvgImage(svgBlob);
1076
- const ratio = Math.min(1024 / image.width, 322 / image.height);
1077
- const width = image.width * ratio;
1078
- const height = image.height * ratio;
1079
- ctx.drawImage(image, 600 - width / 2, 385 - height / 2, width, height);
1080
- ctx.font = '650 12px ui-monospace, SFMono-Regular, Menlo, monospace';
1081
- ctx.fillStyle = '#8aa0b5';
1082
- ctx.fillText('Stable authored IDs · static complete Delta · no risk or mergeability inference', 66, 588);
1083
- return pngBlob(canvas);
1084
- }
1085
-
1086
- async function downloadShareCard() {
1087
- const blob = await shareCard();
1088
- downloadBlob(blob, artifactName('-architecture-delta-share-card.png'));
1089
- recordExport('share-card', blob, { width: 1200, height: 630 });
1090
- return blob;
1091
- }
1092
-
1093
- window.Archify = window.Archify || {};
1094
- window.Archify.deltaExport = { canonicalSvg: canonicalDeltaSvg, shareCard, exportSvg: exportCanonicalSvg, downloadShareCard };
1095
- window.Archify.exportMenu = {
1096
- shareCard,
1097
- run(format) {
1098
- if (format === 'svg') return exportCanonicalSvg();
1099
- if (format === 'share-card') return downloadShareCard();
1100
- throw new Error('Unknown Architecture Delta export format: ' + format);
1101
- },
1102
- };
1103
-
1104
- tabs.forEach((tab, index) => {
1105
- tab.addEventListener('click', () => { stopPlayback(); show(tab.dataset.target); });
1106
- tab.addEventListener('keydown', (event) => {
1107
- if (!['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) return;
1108
- event.preventDefault();
1109
- stopPlayback();
1110
- const next = event.key === 'Home' ? 0 : event.key === 'End' ? tabs.length - 1 : (index + (event.key === 'ArrowRight' ? 1 : -1) + tabs.length) % tabs.length;
1111
- tabs[next].focus();
1112
- show(tabs[next].dataset.target);
1113
- });
1114
- });
1115
-
1116
- rowButtons.forEach((row, index) => {
1117
- row.tabIndex = index === 0 ? 0 : -1;
1118
- row.addEventListener('click', () => { stopPlayback(); selectChange(index); });
1119
- row.addEventListener('keydown', (event) => {
1120
- if (event.key === 'Enter' || event.key === ' ') {
1121
- event.preventDefault();
1122
- stopPlayback();
1123
- selectChange(index);
1124
- return;
1125
- }
1126
- if (!['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) return;
1127
- event.preventDefault();
1128
- stopPlayback();
1129
- const next = event.key === 'Home' ? 0 : event.key === 'End' ? rowButtons.length - 1 : (index + (event.key === 'ArrowDown' ? 1 : -1) + rowButtons.length) % rowButtons.length;
1130
- rowButtons.forEach((button, rowIndex) => { button.tabIndex = rowIndex === next ? 0 : -1; });
1131
- rowButtons[next].focus();
1132
- });
1133
- });
1134
-
1135
- overviewButton.addEventListener('click', overview);
1136
- previousButton.addEventListener('click', () => { stopPlayback(); selectChange(activeIndex - 1); });
1137
- nextButton.addEventListener('click', () => { stopPlayback(); selectChange(activeIndex + 1); });
1138
- playButton.addEventListener('click', startReview);
1139
- document.addEventListener('focusin', (event) => {
1140
- if (playing && event.target.closest('button')) stopPlayback();
1141
- });
1142
- document.addEventListener('visibilitychange', () => { if (document.hidden) stopPlayback(); });
1143
- window.addEventListener('beforeprint', overview);
1144
- reducedMotion.addEventListener('change', () => { if (reducedMotion.matches) stopPlayback(); });
1145
- document.addEventListener('keydown', (event) => {
1146
- if (event.key === 'Escape' && activeIndex >= 0) {
1147
- event.preventDefault();
1148
- overview();
1149
- playButton.focus();
1150
- }
1151
- });
1152
-
1153
- document.querySelector('#theme').addEventListener('click', () => { document.documentElement.dataset.theme = document.documentElement.dataset.theme === 'dark' ? 'light' : 'dark'; });
1154
- const presets = ['classic', 'signal-flow', 'blueprint'];
1155
- document.querySelector('#preset').addEventListener('click', () => { const now = document.documentElement.dataset.preset; document.documentElement.dataset.preset = presets[(presets.indexOf(now) + 1) % presets.length]; });
1156
- document.querySelector('#export-svg').addEventListener('click', exportCanonicalSvg);
1157
- document.querySelector('#share-card').addEventListener('click', () => { downloadShareCard().catch((error) => window.alert(error.message)); });
1158
-
1159
- reviewAvailable = validateReview();
1160
- if (!reviewAvailable) failReview();
1161
- else {
1162
- status.removeAttribute('data-state');
1163
- updateControls();
1164
- }
1165
- })();</script></body></html>`;
1166
- return html.replace(/[ \t]+$/gm, '');
1167
- }
1168
-
1169
- export function validateArchitectureDeltaHtml(html, receipt) {
1170
- const failures = [];
1171
- const rows = architectureDeltaChangeRows(receipt);
1172
- const deltaMarkup = html.match(/<section class="canvas" data-view="delta">([\s\S]*?)<\/section>/)?.[1] || '';
1173
- const svgTags = [...deltaMarkup.matchAll(/<\/?svg\b[^>]*>/g)];
1174
- let svgDepth = 0;
1175
- let svgRoots = 0;
1176
- let rootStart = -1;
1177
- let rootEnd = -1;
1178
- let svgBalanced = true;
1179
- for (const match of svgTags) {
1180
- if (match[0].startsWith('</')) {
1181
- svgDepth -= 1;
1182
- if (svgDepth < 0) svgBalanced = false;
1183
- if (svgDepth === 0) rootEnd = match.index + match[0].length;
1184
- } else {
1185
- if (svgDepth === 0) {
1186
- svgRoots += 1;
1187
- if (rootStart < 0) rootStart = match.index;
1188
- }
1189
- svgDepth += 1;
1190
- }
1191
- }
1192
- if (!['base', 'delta', 'head'].every((id) => (html.match(new RegExp(`<section class="canvas" data-view="${id}"`, 'g')) || []).length === 1)) failures.push('expected one Before, Delta, and After canvas');
1193
- if ((html.match(/class="snapshot-frame" title="Before architecture explorer"/g) || []).length !== 1
1194
- || (html.match(/class="snapshot-frame" title="After architecture explorer"/g) || []).length !== 1) {
1195
- failures.push('Before and After must preserve one complete architecture explorer each');
1196
- }
1197
- if (!svgBalanced || svgDepth !== 0 || svgRoots !== 1 || deltaMarkup.slice(0, rootStart).trim() || deltaMarkup.slice(rootEnd).trim()) failures.push('expected exactly one root SVG in the Delta canvas');
1198
- if ((html.match(/id="archify-compare-receipt"/g) || []).length !== 1) failures.push('expected exactly one embedded compare receipt');
1199
- if (!html.includes('aria-label="Authored change review"')) failures.push('missing exact-ID change navigator');
1200
- if ((html.match(/class="change-row"/g) || []).length !== rows.length) failures.push('change navigator row count does not match the receipt');
1201
- if (!html.includes('id="export-svg"') || !html.includes('id="share-card"')
1202
- || !html.includes('window.Archify.deltaExport = { canonicalSvg: canonicalDeltaSvg, shareCard')) {
1203
- failures.push('missing canonical Delta SVG or Share Card export contract');
1204
- }
1205
- for (const [index, row] of rows.entries()) {
1206
- const safeKey = esc(row.key).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
1207
- const rowMatches = [...html.matchAll(new RegExp(`<button class="change-row"[^>]*data-change-key="${safeKey}"[^>]*>`, 'g'))].map((match) => match[0]);
1208
- if (rowMatches.length !== 1) failures.push(`expected exactly one change row ${row.key}`);
1209
- const targets = reviewTargetTags(deltaMarkup, row);
1210
- if (!targets.length) failures.push(`missing Delta identity ${row.key}`);
1211
- if (targets.some(({ tag }) => !/\bdata-delta-state="[^"]+"/.test(tag))) failures.push(`missing Delta target state ${row.key}`);
1212
- const signature = reviewTargetSignature(targets);
1213
- const expectedSignature = expectedReviewTargetSignature(row);
1214
- const storedSignature = rowMatches[0]?.match(/\bdata-change-target-signature="([^"]*)"/)?.[1];
1215
- if (!signature || signature !== expectedSignature || storedSignature !== expectedSignature) failures.push(`ambiguous Delta target signature ${row.key}`);
1216
- if (rowMatches[0]?.match(/\bdata-change-index="([^"]+)"/)?.[1] !== String(index)) failures.push(`incorrect change row order ${row.key}`);
1217
- const primary = primaryReviewTags(deltaMarkup, row);
1218
- const states = primary.map((tag) => tag.match(/\bdata-delta-state="([^"]+)"/)?.[1]).filter(Boolean).sort();
1219
- if (JSON.stringify(states) !== JSON.stringify(reviewPrimaryStates(row).sort())) failures.push(`ambiguous Delta identity ${row.key}`);
1220
- const classifications = row.classifications.join(',');
1221
- if (primary.some((tag) => tag.match(/\bdata-delta-classifications="([^"]*)"/)?.[1] !== classifications)) failures.push(`conflicting Delta classification ${row.key}`);
1222
- }
1223
- // Before/After embed the complete existing explorer runtime. Validate claims
1224
- // made by the Delta shell itself, not implementation vocabulary inside an
1225
- // escaped srcdoc script (for example, "safe scale" in image export code).
1226
- const deltaShell = html.replace(/<iframe\b[^>]*><\/iframe>/g, '');
1227
- if (/\b(?:SAFE|LOW RISK|MERGEABLE|NO IMPACT|VERIFIED PR)\b/i.test(deltaShell)) failures.push('contains a forbidden risk or mergeability claim');
1228
- if (/\b(?:NaN|Infinity)\b/.test(html)) failures.push('contains non-finite output');
1229
- if (receipt.completeness !== 'complete') failures.push('receipt is not complete');
1230
- if (failures.length) fail('delta/artifact-invalid', `Architecture Delta artifact failed validation: ${failures.join('; ')}.`, { failures });
1231
- return { ok: true, checksPassed: 10, checkCount: 10 };
1232
- }