@xgent-ai/skills 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (631) hide show
  1. package/README.md +117 -11
  2. package/bin/xgent-skills.js +269 -9
  3. package/docs/claude-context-goal-guard.md +125 -0
  4. package/docs/codex-context-goal-guard.md +110 -0
  5. package/hooks/claude/context-goal-guard.js +139 -0
  6. package/hooks/claude/settings.example.json +26 -0
  7. package/hooks/codex/context-goal-guard.py +189 -0
  8. package/hooks/codex/hooks.example.json +26 -0
  9. package/package.json +7 -1
  10. package/skills/agi-mode/SKILL.md +225 -0
  11. package/skills/agi-mode/evals/baseline-coverage.md +96 -0
  12. package/skills/agi-mode/evals/scenarios.md +331 -0
  13. package/skills/agi-mode/evals/test_check_evidence.py +141 -0
  14. package/skills/agi-mode/playbooks/arena.md +47 -0
  15. package/skills/agi-mode/playbooks/authoring-a-skill.md +26 -0
  16. package/skills/agi-mode/playbooks/autonomous-run.md +39 -0
  17. package/skills/agi-mode/playbooks/bug-fix.md +27 -0
  18. package/skills/agi-mode/playbooks/design-prototype.md +41 -0
  19. package/skills/agi-mode/playbooks/eval.md +72 -0
  20. package/skills/agi-mode/playbooks/feature.md +26 -0
  21. package/skills/agi-mode/playbooks/forensics.md +31 -0
  22. package/skills/agi-mode/playbooks/hillclimb.md +73 -0
  23. package/skills/agi-mode/playbooks/investigation.md +29 -0
  24. package/skills/agi-mode/playbooks/migration-refactoring.md +27 -0
  25. package/skills/agi-mode/playbooks/optimization.md +27 -0
  26. package/skills/agi-mode/playbooks/pr-lifecycle.md +38 -0
  27. package/skills/agi-mode/playbooks/program.md +57 -0
  28. package/skills/agi-mode/playbooks/reflection.md +41 -0
  29. package/skills/agi-mode/playbooks/resource-cleanup.md +24 -0
  30. package/skills/agi-mode/playbooks/review.md +27 -0
  31. package/skills/agi-mode/playbooks/session-handoff.md +37 -0
  32. package/skills/agi-mode/playbooks/shipping.md +35 -0
  33. package/skills/agi-mode/playbooks/ui-delivery.md +34 -0
  34. package/skills/agi-mode/playbooks/unblock.md +54 -0
  35. package/skills/agi-mode/principles/autonomous-decisions.md +21 -0
  36. package/skills/agi-mode/principles/behavioral-tests.md +21 -0
  37. package/skills/agi-mode/principles/boundary-discipline.md +21 -0
  38. package/skills/agi-mode/principles/bounded-convergence.md +21 -0
  39. package/skills/agi-mode/principles/build-leverage.md +21 -0
  40. package/skills/agi-mode/principles/challenge-premises.md +21 -0
  41. package/skills/agi-mode/principles/complete-migrations.md +21 -0
  42. package/skills/agi-mode/principles/context-as-state.md +21 -0
  43. package/skills/agi-mode/principles/critical-path-throughput.md +21 -0
  44. package/skills/agi-mode/principles/domain-models-and-types.md +23 -0
  45. package/skills/agi-mode/principles/evidence-lifetime.md +21 -0
  46. package/skills/agi-mode/principles/experience-first.md +21 -0
  47. package/skills/agi-mode/principles/explore-alternatives.md +21 -0
  48. package/skills/agi-mode/principles/falsifiable-verification.md +21 -0
  49. package/skills/agi-mode/principles/foundations-first.md +21 -0
  50. package/skills/agi-mode/principles/idempotent-effects.md +21 -0
  51. package/skills/agi-mode/principles/information-first.md +21 -0
  52. package/skills/agi-mode/principles/minimize-complexity.md +21 -0
  53. package/skills/agi-mode/principles/outcome-ownership.md +21 -0
  54. package/skills/agi-mode/principles/prove-real-outcomes.md +21 -0
  55. package/skills/agi-mode/principles/redesign-from-constraints.md +21 -0
  56. package/skills/agi-mode/principles/root-cause.md +21 -0
  57. package/skills/agi-mode/principles/state-ownership.md +21 -0
  58. package/skills/agi-mode/principles/structural-learning.md +21 -0
  59. package/skills/agi-mode/principles/verifiable-units.md +21 -0
  60. package/skills/agi-mode/references/continuity.md +75 -0
  61. package/skills/agi-mode/references/eval-protocol.md +71 -0
  62. package/skills/agi-mode/references/evidence-contract.md +57 -0
  63. package/skills/agi-mode/references/evolution-evidence.md +71 -0
  64. package/skills/agi-mode/references/experiments.md +82 -0
  65. package/skills/agi-mode/references/reflection/divergent-reviewer.md +45 -0
  66. package/skills/agi-mode/references/reflection/judgment-reviewer.md +44 -0
  67. package/skills/agi-mode/references/reflection/synthesizer.md +39 -0
  68. package/skills/agi-mode/references/reflection/tooling-reviewer.md +57 -0
  69. package/skills/agi-mode/references/skill-evolution.md +50 -0
  70. package/skills/agi-mode/scripts/check_evidence.py +147 -0
  71. package/skills/apply-code-review/SKILL.md +53 -0
  72. package/skills/apply-code-review/agents/openai.yaml +4 -0
  73. package/skills/apply-code-review/references/record-contract.md +77 -0
  74. package/skills/apply-doc-review/SKILL.md +79 -0
  75. package/skills/apply-doc-review/agents/openai.yaml +4 -0
  76. package/skills/apply-doc-review/references/disposition-contract.md +57 -0
  77. package/skills/archify/LICENSE +22 -0
  78. package/skills/archify/SKILL.md +137 -0
  79. package/skills/archify/THIRD_PARTY_NOTICES.md +69 -0
  80. package/skills/archify/assets/JetBrainsMono-OFL.txt +93 -0
  81. package/skills/archify/assets/template.html +14937 -0
  82. package/skills/archify/bin/archify.mjs +2139 -0
  83. package/skills/archify/bin/open-artifact.mjs +86 -0
  84. package/skills/archify/bin/preview.mjs +653 -0
  85. package/skills/archify/bin/visual-check.mjs +829 -0
  86. package/skills/archify/brand-marks/README.md +31 -0
  87. package/skills/archify/brand-marks/catalog.json +131 -0
  88. package/skills/archify/delta/architecture-delta.mjs +1232 -0
  89. package/skills/archify/examples/agent-run.lifecycle.json +60 -0
  90. package/skills/archify/examples/agent-tool-call.workflow.json +94 -0
  91. package/skills/archify/examples/async-job-roundtrip.sequence.json +61 -0
  92. package/skills/archify/examples/brand-aware-delivery.architecture.json +47 -0
  93. package/skills/archify/examples/cache-miss-request.sequence.json +82 -0
  94. package/skills/archify/examples/checkout-platform.base.architecture.json +31 -0
  95. package/skills/archify/examples/checkout-platform.head.architecture.json +31 -0
  96. package/skills/archify/examples/dataflow-product-analytics.html +15048 -0
  97. package/skills/archify/examples/deployment-release.lifecycle.json +49 -0
  98. package/skills/archify/examples/event-stream.dataflow.json +57 -0
  99. package/skills/archify/examples/incident-response.workflow.json +64 -0
  100. package/skills/archify/examples/lifecycle-agent-run.html +14983 -0
  101. package/skills/archify/examples/product-analytics.dataflow.json +76 -0
  102. package/skills/archify/examples/production-deployment.architecture.json +71 -0
  103. package/skills/archify/examples/release-delivery.workflow.json +62 -0
  104. package/skills/archify/examples/sequence-cache-miss-request.html +15063 -0
  105. package/skills/archify/examples/web-app-rendered.html +15012 -0
  106. package/skills/archify/examples/web-app.architecture.json +46 -0
  107. package/skills/archify/examples/workflow-agent-tool-call-rendered.html +15054 -0
  108. package/skills/archify/migrations/workflow-v2.mjs +279 -0
  109. package/skills/archify/package-lock.json +149 -0
  110. package/skills/archify/package.json +39 -0
  111. package/skills/archify/recipes/scenarios.mjs +391 -0
  112. package/skills/archify/references/authoring-contract.md +247 -0
  113. package/skills/archify/references/brand-marks.md +65 -0
  114. package/skills/archify/references/delivery-contract.md +138 -0
  115. package/skills/archify/references/viewer-runtime.md +45 -0
  116. package/skills/archify/renderers/architecture/grid.mjs +62 -0
  117. package/skills/archify/renderers/architecture/render-architecture.mjs +1078 -0
  118. package/skills/archify/renderers/dataflow/README.md +104 -0
  119. package/skills/archify/renderers/dataflow/render-dataflow.mjs +483 -0
  120. package/skills/archify/renderers/lifecycle/README.md +115 -0
  121. package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +561 -0
  122. package/skills/archify/renderers/sequence/README.md +114 -0
  123. package/skills/archify/renderers/sequence/render-sequence.mjs +464 -0
  124. package/skills/archify/renderers/shared/brand-marks.mjs +563 -0
  125. package/skills/archify/renderers/shared/cli.mjs +218 -0
  126. package/skills/archify/renderers/shared/desktop-readability.mjs +26 -0
  127. package/skills/archify/renderers/shared/diagnostics.mjs +160 -0
  128. package/skills/archify/renderers/shared/engineering-profiles.mjs +157 -0
  129. package/skills/archify/renderers/shared/generated-brand-marks.mjs +2003 -0
  130. package/skills/archify/renderers/shared/generated-validators.mjs +13 -0
  131. package/skills/archify/renderers/shared/geometry.mjs +1423 -0
  132. package/skills/archify/renderers/shared/i18n.mjs +595 -0
  133. package/skills/archify/renderers/shared/layout-report.mjs +40 -0
  134. package/skills/archify/renderers/shared/legend.mjs +217 -0
  135. package/skills/archify/renderers/shared/output-path.mjs +340 -0
  136. package/skills/archify/renderers/shared/repository-evidence.mjs +239 -0
  137. package/skills/archify/renderers/shared/repository-location.mjs +58 -0
  138. package/skills/archify/renderers/shared/text-fit.mjs +49 -0
  139. package/skills/archify/renderers/shared/utils.mjs +232 -0
  140. package/skills/archify/renderers/shared/validator.mjs +86 -0
  141. package/skills/archify/renderers/workflow/README.md +223 -0
  142. package/skills/archify/renderers/workflow/render-workflow.mjs +35 -0
  143. package/skills/archify/renderers/workflow/workflow-compiler.mjs +4400 -0
  144. package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
  145. package/skills/archify/schemas/README.md +211 -0
  146. package/skills/archify/schemas/architecture.schema.json +178 -0
  147. package/skills/archify/schemas/common.schema.json +115 -0
  148. package/skills/archify/schemas/dataflow.schema.json +243 -0
  149. package/skills/archify/schemas/lifecycle.schema.json +266 -0
  150. package/skills/archify/schemas/sequence.schema.json +223 -0
  151. package/skills/archify/schemas/workflow.schema.json +428 -0
  152. package/skills/archify/scripts/check-render-output.mjs +916 -0
  153. package/skills/archify/scripts/check-update.mjs +1667 -0
  154. package/skills/archify/scripts/generate-brand-marks.mjs +141 -0
  155. package/skills/archify/scripts/generate-validators.mjs +66 -0
  156. package/skills/archify/scripts/render-examples.mjs +26 -0
  157. package/skills/archify/scripts/update-contract.mjs +182 -0
  158. package/skills/archify/skill-release.json +10 -0
  159. package/skills/archify/test/adaptive-reader-layout.test.mjs +86 -0
  160. package/skills/archify/test/animation.test.mjs +179 -0
  161. package/skills/archify/test/architecture-compare-recovery.test.mjs +157 -0
  162. package/skills/archify/test/architecture-delta-markers.test.mjs +137 -0
  163. package/skills/archify/test/architecture-delta.test.mjs +705 -0
  164. package/skills/archify/test/artifact-receipt-flush.test.mjs +126 -0
  165. package/skills/archify/test/authored-reachability.test.mjs +95 -0
  166. package/skills/archify/test/authoring-safety-contract.test.mjs +54 -0
  167. package/skills/archify/test/automatic-port-spread.test.mjs +376 -0
  168. package/skills/archify/test/base-input-compatibility.test.mjs +42 -0
  169. package/skills/archify/test/brand-marks.test.mjs +678 -0
  170. package/skills/archify/test/chapter-delta-preview.test.mjs +157 -0
  171. package/skills/archify/test/chapter-handoff.test.mjs +97 -0
  172. package/skills/archify/test/chapter-rail.test.mjs +86 -0
  173. package/skills/archify/test/checkout-line-endings.test.mjs +72 -0
  174. package/skills/archify/test/ci-scope.test.mjs +59 -0
  175. package/skills/archify/test/clean-skill-staging.test.mjs +440 -0
  176. package/skills/archify/test/cli-output-types.test.mjs +201 -0
  177. package/skills/archify/test/cli.test.mjs +986 -0
  178. package/skills/archify/test/community-proof-intake.test.mjs +125 -0
  179. package/skills/archify/test/cursor-onboarding.test.mjs +74 -0
  180. package/skills/archify/test/degraded.test.mjs +161 -0
  181. package/skills/archify/test/delivery-contract.test.mjs +52 -0
  182. package/skills/archify/test/desktop-reader-browser.test.mjs +80 -0
  183. package/skills/archify/test/diagram-guide.test.mjs +92 -0
  184. package/skills/archify/test/engineering-profile.test.mjs +209 -0
  185. package/skills/archify/test/export-browser.test.mjs +305 -0
  186. package/skills/archify/test/export-cleanup-browser.test.mjs +294 -0
  187. package/skills/archify/test/finder-browser.test.mjs +274 -0
  188. package/skills/archify/test/finder.test.mjs +104 -0
  189. package/skills/archify/test/fixtures/automatic-routing-node-border-clearance.workflow.json +40 -0
  190. package/skills/archify/test/fixtures/fail-migration-cleanup.mjs +17 -0
  191. package/skills/archify/test/fixtures/issue-126/custom-widths.workflow.json +18 -0
  192. package/skills/archify/test/fixtures/issue-126/explicit-route.workflow.json +28 -0
  193. package/skills/archify/test/fixtures/issue-126/explicit-viewbox.workflow.json +19 -0
  194. package/skills/archify/test/fixtures/issue-126/labels.workflow.json +18 -0
  195. package/skills/archify/test/fixtures/v1-baseline/agent-run.lifecycle.json +64 -0
  196. package/skills/archify/test/fixtures/v1-baseline/agent-tool-call.workflow.json +88 -0
  197. package/skills/archify/test/fixtures/v1-baseline/cache-miss-request.sequence.json +75 -0
  198. package/skills/archify/test/fixtures/v1-baseline/event-stream.dataflow.json +57 -0
  199. package/skills/archify/test/fixtures/v1-baseline/product-analytics.dataflow.json +70 -0
  200. package/skills/archify/test/fixtures/v1-baseline/production-deployment.architecture.json +71 -0
  201. package/skills/archify/test/fixtures/v1-baseline/web-app.architecture.json +41 -0
  202. package/skills/archify/test/fixtures/v1-workflow-700x400.workflow.json +22 -0
  203. package/skills/archify/test/fixtures/v1-workflow-explicit-coordinates.workflow.json +47 -0
  204. package/skills/archify/test/focus-browser.test.mjs +226 -0
  205. package/skills/archify/test/gallery.test.mjs +130 -0
  206. package/skills/archify/test/generate-validators.test.mjs +59 -0
  207. package/skills/archify/test/generate-viewer.test.mjs +165 -0
  208. package/skills/archify/test/generated-artifact-xml.test.mjs +88 -0
  209. package/skills/archify/test/geometry.test.mjs +739 -0
  210. package/skills/archify/test/golden.mjs +207 -0
  211. package/skills/archify/test/grid.test.mjs +47 -0
  212. package/skills/archify/test/guide-page.test.mjs +85 -0
  213. package/skills/archify/test/guide.test.mjs +81 -0
  214. package/skills/archify/test/guided-views-browser.test.mjs +460 -0
  215. package/skills/archify/test/guided-views.test.mjs +144 -0
  216. package/skills/archify/test/helpers/desktop-browser.mjs +48 -0
  217. package/skills/archify/test/helpers/offline-fonts.mjs +76 -0
  218. package/skills/archify/test/helpers/viewer-click.mjs +72 -0
  219. package/skills/archify/test/helpers/xml.mjs +37 -0
  220. package/skills/archify/test/i18n.test.mjs +422 -0
  221. package/skills/archify/test/intent-trace-browser.test.mjs +284 -0
  222. package/skills/archify/test/intent-trace.test.mjs +111 -0
  223. package/skills/archify/test/landing.test.mjs +97 -0
  224. package/skills/archify/test/layout-rules.test.mjs +1498 -0
  225. package/skills/archify/test/legend-contract.test.mjs +404 -0
  226. package/skills/archify/test/motion-governor-browser.test.mjs +342 -0
  227. package/skills/archify/test/motion-governor.test.mjs +111 -0
  228. package/skills/archify/test/offline-font-browser.test.mjs +210 -0
  229. package/skills/archify/test/offline-self-containment.test.mjs +80 -0
  230. package/skills/archify/test/open-artifact.test.mjs +118 -0
  231. package/skills/archify/test/ordinary-model-floor.test.mjs +1052 -0
  232. package/skills/archify/test/output-path.test.mjs +587 -0
  233. package/skills/archify/test/presentation.test.mjs +71 -0
  234. package/skills/archify/test/preset-tryon.test.mjs +113 -0
  235. package/skills/archify/test/preview-contract.test.mjs +40 -0
  236. package/skills/archify/test/preview.test.mjs +530 -0
  237. package/skills/archify/test/proof-aperture.test.mjs +78 -0
  238. package/skills/archify/test/reach-share-card.test.mjs +149 -0
  239. package/skills/archify/test/reader-layout-browser.test.mjs +320 -0
  240. package/skills/archify/test/readme-showcase.test.mjs +319 -0
  241. package/skills/archify/test/real-repository-proof.test.mjs +209 -0
  242. package/skills/archify/test/relationship-direct-explorer.test.mjs +115 -0
  243. package/skills/archify/test/relationship-lens.test.mjs +128 -0
  244. package/skills/archify/test/relationship-permalink.test.mjs +130 -0
  245. package/skills/archify/test/relationship-pulse.test.mjs +122 -0
  246. package/skills/archify/test/release-identity.test.mjs +476 -0
  247. package/skills/archify/test/release-package-gates.test.mjs +750 -0
  248. package/skills/archify/test/render-output-checks.test.mjs +588 -0
  249. package/skills/archify/test/renderer-diagnostic-boundary.test.mjs +107 -0
  250. package/skills/archify/test/repair-receipt.test.mjs +181 -0
  251. package/skills/archify/test/repository-evidence-replacement.test.mjs +136 -0
  252. package/skills/archify/test/repository-evidence.test.mjs +605 -0
  253. package/skills/archify/test/repository-language-metadata.test.mjs +67 -0
  254. package/skills/archify/test/route-journey.test.mjs +125 -0
  255. package/skills/archify/test/route-probe-browser.test.mjs +363 -0
  256. package/skills/archify/test/route-probe.test.mjs +114 -0
  257. package/skills/archify/test/route-share-card.test.mjs +163 -0
  258. package/skills/archify/test/semantic-camera.test.mjs +88 -0
  259. package/skills/archify/test/semantic-flow.test.mjs +90 -0
  260. package/skills/archify/test/semantic-legend-gateway.test.mjs +156 -0
  261. package/skills/archify/test/semantic-lens-browser.test.mjs +372 -0
  262. package/skills/archify/test/semantic-lens.test.mjs +103 -0
  263. package/skills/archify/test/semantic-passport.test.mjs +99 -0
  264. package/skills/archify/test/semantic-radar.test.mjs +735 -0
  265. package/skills/archify/test/semantic-zoom.test.mjs +86 -0
  266. package/skills/archify/test/sequence-column-fit.test.mjs +137 -0
  267. package/skills/archify/test/settled-flow.test.mjs +97 -0
  268. package/skills/archify/test/share-card-export.test.mjs +132 -0
  269. package/skills/archify/test/site-language-continuity.test.mjs +569 -0
  270. package/skills/archify/test/site-language-integration.mjs +9 -0
  271. package/skills/archify/test/skill-metadata.test.mjs +84 -0
  272. package/skills/archify/test/stable-update-manifest.test.mjs +167 -0
  273. package/skills/archify/test/start-page.test.mjs +312 -0
  274. package/skills/archify/test/story-beat-navigator.test.mjs +103 -0
  275. package/skills/archify/test/story-carrier.test.mjs +90 -0
  276. package/skills/archify/test/story-director-strip.test.mjs +91 -0
  277. package/skills/archify/test/story-follow-camera.test.mjs +103 -0
  278. package/skills/archify/test/story-horizon.test.mjs +91 -0
  279. package/skills/archify/test/story-moment-link.test.mjs +93 -0
  280. package/skills/archify/test/story-shelf.test.mjs +84 -0
  281. package/skills/archify/test/story-trail.test.mjs +81 -0
  282. package/skills/archify/test/toolbar-polish.test.mjs +57 -0
  283. package/skills/archify/test/update-contract.test.mjs +133 -0
  284. package/skills/archify/test/update-notifier.test.mjs +3317 -0
  285. package/skills/archify/test/v1-compatibility.test.mjs +329 -0
  286. package/skills/archify/test/vertical-edge.test.mjs +68 -0
  287. package/skills/archify/test/viewer-camera-browser.test.mjs +395 -0
  288. package/skills/archify/test/viewer-chrome-layout.test.mjs +1104 -0
  289. package/skills/archify/test/viewer-identifiers-browser.test.mjs +135 -0
  290. package/skills/archify/test/visual-check.test.mjs +400 -0
  291. package/skills/archify/test/webm-artifact.smoke.mjs +1855 -0
  292. package/skills/archify/test/workflow-compiler-hard-contract.test.mjs +2136 -0
  293. package/skills/archify/test/workflow-compiler.test.mjs +1163 -0
  294. package/skills/archify/test/workflow-migration.test.mjs +620 -0
  295. package/skills/archify/test/workflow-semantic-contract.test.mjs +131 -0
  296. package/skills/architect/SKILL.md +83 -0
  297. package/skills/architect/references/design-red-flags.md +33 -0
  298. package/skills/architect/references/rationale-template.md +35 -0
  299. package/skills/architect/references/runner-prompt.md +20 -0
  300. package/skills/arena/SKILL.md +13 -0
  301. package/skills/automate-me/SKILL.md +104 -0
  302. package/skills/autoresearch/SKILL.md +14 -0
  303. package/skills/debugging/SKILL.md +279 -0
  304. package/skills/dev-plan/SKILL.md +25 -18
  305. package/skills/dev-plan/references/execution-workflow.md +8 -61
  306. package/skills/dev-plan/references/plan-skeleton.md +43 -28
  307. package/skills/dev-plan/scripts/check_progress.sh +5 -1
  308. package/skills/documentation-writer/SKILL.md +204 -0
  309. package/skills/documentation-writer/assets/templates/ARCHITECTURE.md +49 -0
  310. package/skills/documentation-writer/assets/templates/CONCERNS.md +56 -0
  311. package/skills/documentation-writer/assets/templates/CONVENTIONS.md +52 -0
  312. package/skills/documentation-writer/assets/templates/FEATURES.md +43 -0
  313. package/skills/documentation-writer/assets/templates/INTEGRATIONS.md +48 -0
  314. package/skills/documentation-writer/assets/templates/STACK.md +56 -0
  315. package/skills/documentation-writer/assets/templates/STRUCTURE.md +44 -0
  316. package/skills/documentation-writer/assets/templates/TESTING.md +57 -0
  317. package/skills/documentation-writer/references/api-docs.md +185 -0
  318. package/skills/documentation-writer/references/architecture.md +134 -0
  319. package/skills/documentation-writer/references/codebase-map.md +113 -0
  320. package/skills/documentation-writer/references/inquiry-checkpoints.md +78 -0
  321. package/skills/documentation-writer/references/readme.md +89 -0
  322. package/skills/documentation-writer/references/stack-detection.md +134 -0
  323. package/skills/documentation-writer/references/user-manual.md +103 -0
  324. package/skills/documentation-writer/references/writing-style.md +220 -0
  325. package/skills/documentation-writer/scripts/check_doc.py +273 -0
  326. package/skills/documentation-writer/scripts/scan.py +712 -0
  327. package/skills/elintp/SKILL.md +27 -1
  328. package/skills/figure-it-out/SKILL.md +53 -0
  329. package/skills/gdpr-compliant/SKILL.md +283 -0
  330. package/skills/gdpr-compliant/references/Security.md +266 -0
  331. package/skills/gdpr-compliant/references/data-rights.md +177 -0
  332. package/skills/how/SKILL.md +58 -0
  333. package/skills/how/references/explainer-prompt.md +55 -0
  334. package/skills/how/references/explorer-prompt.md +52 -0
  335. package/skills/humanize-writing/SKILL.md +417 -0
  336. package/skills/humanize-writing/references/ai-tells.md +291 -0
  337. package/skills/kpi-dashboard-design/SKILL.md +103 -0
  338. package/skills/landing-page-conversion-audit/SKILL.md +122 -0
  339. package/skills/meeting-minutes/SKILL.md +235 -0
  340. package/skills/portal-app-exchange/SKILL.md +8 -17
  341. package/skills/portal-dev-setup/SKILL.md +137 -46
  342. package/skills/portal-dev-setup/puller.env.example +3 -2
  343. package/skills/portal-dev-setup/references/kafka.md +140 -0
  344. package/skills/portal-dev-setup/references/troubleshooting.md +22 -26
  345. package/skills/portal-dev-setup/scripts/onebox.sh +510 -56
  346. package/skills/portal-external-app/SKILL.md +57 -21
  347. package/skills/portal-external-app/references/contract-doc-template.md +1 -1
  348. package/skills/portal-external-app/references/integration-contract.md +4 -4
  349. package/skills/portal-external-app/references/public-entrypoints.md +100 -0
  350. package/skills/portal-external-app/references/quota-and-seats.md +12 -31
  351. package/skills/portal-external-app/references/registration-and-onebox.md +67 -11
  352. package/skills/portal-micro-app/SKILL.md +18 -28
  353. package/skills/portal-micro-app/references/manifest-and-acl.md +21 -3
  354. package/skills/portal-micro-app/references/open-api-and-extensions.md +1 -1
  355. package/skills/portal-micro-app/references/sdk-reference.md +1 -1
  356. package/skills/prd/SKILL.md +56 -38
  357. package/skills/prd/references/prd-skeleton.md +72 -34
  358. package/skills/prd/references/product-quality.md +89 -0
  359. package/skills/prd/references/spms-mapping.md +9 -7
  360. package/skills/react/SKILL.md +26 -4
  361. package/skills/react/references/actions.md +251 -0
  362. package/skills/react/references/data-fetching.md +25 -1
  363. package/skills/react/references/react19-migration.md +407 -0
  364. package/skills/reflect/SKILL.md +13 -0
  365. package/skills/review-code/SKILL.md +63 -0
  366. package/skills/review-code/agents/openai.yaml +4 -0
  367. package/skills/review-code/references/git-scopes.md +38 -0
  368. package/skills/review-code/references/report-contract.md +56 -0
  369. package/skills/review-code/references/review-lenses.md +33 -0
  370. package/skills/review-dev-plan/SKILL.md +88 -0
  371. package/skills/review-dev-plan/agents/openai.yaml +4 -0
  372. package/skills/review-dev-plan/references/report-contract.md +59 -0
  373. package/skills/review-dev-plan/references/review-lenses.md +82 -0
  374. package/skills/review-prd/SKILL.md +84 -0
  375. package/skills/review-prd/agents/openai.yaml +4 -0
  376. package/skills/review-prd/references/report-contract.md +64 -0
  377. package/skills/review-prd/references/review-lenses.md +82 -0
  378. package/skills/review-prd-dev-gaps/SKILL.md +84 -0
  379. package/skills/review-prd-dev-gaps/agents/openai.yaml +4 -0
  380. package/skills/review-prd-dev-gaps/references/report-contract.md +72 -0
  381. package/skills/security-audit/SKILL.md +191 -0
  382. package/skills/security-audit/references/language-patterns.md +221 -0
  383. package/skills/security-audit/references/report-format.md +194 -0
  384. package/skills/security-audit/references/secret-patterns.md +178 -0
  385. package/skills/security-audit/references/vuln-categories.md +288 -0
  386. package/skills/security-audit/references/vulnerable-packages.md +111 -0
  387. package/skills/sql-optimization/SKILL.md +296 -0
  388. package/skills/summarize/SKILL.md +1 -0
  389. package/skills/swarm/references/teams/product.md +2 -2
  390. package/skills/tdd/SKILL.md +42 -0
  391. package/skills/teach/SKILL.md +21 -0
  392. package/skills/test-plan/SKILL.md +12 -11
  393. package/skills/test-plan/references/case-taxonomy.md +3 -2
  394. package/skills/why/SKILL.md +158 -0
  395. package/skills/why/references/epistemics.md +144 -0
  396. package/skills/why/references/investigator-prompt.md +103 -0
  397. package/skills/why/references/source-playbook.md +17 -0
  398. package/skills/why/references/sources/code-archaeology.md +88 -0
  399. package/skills/why/references/sources/databricks.md +70 -0
  400. package/skills/why/references/sources/datadog.md +99 -0
  401. package/skills/why/references/sources/incident-postmortem.md +15 -0
  402. package/skills/why/references/sources/linear.md +48 -0
  403. package/skills/why/references/sources/notion.md +55 -0
  404. package/skills/why/references/sources/sentry.md +100 -0
  405. package/skills/why/references/sources/slack.md +54 -0
  406. package/skills/why/references/synthesizer-prompt.md +135 -0
  407. package/skills/xgent-app-release/SKILL.md +97 -28
  408. package/skills/xgent-app-release/references/build-and-package.md +8 -3
  409. package/skills/xgent-app-release/references/embed-csp.mjs +126 -0
  410. package/skills/xgent-app-release/references/frontend-archive.md +67 -0
  411. package/skills/xgent-app-release/references/public-delivery.md +75 -0
  412. package/skills/xgent-app-release/references/publish-api.md +62 -56
  413. package/skills/xgent-app-release/references/troubleshooting.md +18 -2
  414. package/skills/xgent-app-release/references/verify-preflight.mjs +50 -0
  415. package/skills/xgent-app-release/scripts/npm-token.mjs +8 -3
  416. package/skills/xgent-app-release/scripts/preflight.mjs +13 -2
  417. package/skills/xgent-init/SKILL.md +23 -82
  418. package/skills/xgent-init/references/external-app-AGENTS.template.md +149 -0
  419. package/skills/xgent-init/references/fill-guide.md +10 -22
  420. package/skills/xgent-init/scripts/check-docs.mjs +14 -86
  421. package/vendor/impeccable/VERSION.json +10 -16
  422. package/vendor/impeccable/bundle/blobs/{daa2a8ecd874f9f940dfd72aaa329318b06bb9be25515be85fea84c871b637a6 → 00c067253d37cd20a41dbe9c806d6a72cbff983ad1418b3c3e447998f577b9c2} +18 -11
  423. package/vendor/impeccable/bundle/blobs/{4ce929b8cafd37247ea4c148bbe39a9afe15908d1abf4a8248c5122275d16499 → 00d167d9183c8d0c6c0682055107382e6672bacf7a712de0abc8f157c2cb2210} +3 -2
  424. package/vendor/impeccable/bundle/blobs/{a9515f6f084d8f51c378eb3cdc6db1f12e06dba2d32fc61b7ee7950fa2586f2e → 016c082dcd2aa8f3c080a757c8ed335c6070a904bd2f39668bb9d3e6f95929c1} +1 -1
  425. package/vendor/impeccable/bundle/blobs/0221a193d111a9de33a785706a603e55dd974a115f549dbdf74e0f9ec72bde7d +101 -0
  426. package/vendor/impeccable/bundle/blobs/055c571f2960b8f929d6a8d3806a4d32dfcb9750b3ef8b60adc8930fff34b559 +101 -0
  427. package/vendor/impeccable/bundle/blobs/{3aa908c18db91d5f31d6bba6402eab6afc4e0b75137f841a86bd012386e0d8e2 → 0605c8729dc638a46798e90ab12486fe3ae3372a869757cfb387a08e23b3c84a} +18 -11
  428. package/vendor/impeccable/bundle/blobs/{ec58806f16fc7ba29bccef08f2e158cd00be077ce05d45e943a59bd26dc6dc55 → 0648e4e06d01cabc91fa7dc19256ceedeeeea213b9265e9d36b0918370e16fb2} +6 -0
  429. package/vendor/impeccable/bundle/blobs/06b20bd42e5682a42c5d6fbfaad4c55e66ff9b9d99a604bd31d3545af120fc2d +101 -0
  430. package/vendor/impeccable/bundle/blobs/{420e2fdee2b7f555d9a37ce348cf62610ddd98f96b1a0a511796ba600881588c → 08346755b13f1a3f7c6fb4e512387884b80467aaeff109fd41f5521d2a95635a} +3 -1
  431. package/vendor/impeccable/bundle/blobs/{8f651cb1f8cde0acc5cc511b77fddd98558a527f54974698a1650b0fd7e849a7 → 08398fa2d8e2b06b849f1c0f032e1e93b832e9294aed35c1c7f62b938d62ee80} +1 -1
  432. package/vendor/impeccable/bundle/blobs/087f6715114e901c2ce00b438e75b82fd48978c020a782f3dc361d39eb7198a6 +26 -0
  433. package/vendor/impeccable/bundle/blobs/{bc7a5128cfed46148396c08798b6b9429406fbe477e84e331a36ee2840b6b776 → 09310582ed23393b171eb99ad4a288cc422ac53c26d76311586ce54c6df77b22} +3 -1
  434. package/vendor/impeccable/bundle/blobs/{633903ba7cb38ed502448a66691fbf655805786a2f06be67043f12294ad08e86 → 0bc2bc36ca6e74f9f610392f1a4fb8f57b2676238ba1f9c65cd8714f5d27e8a2} +5 -0
  435. package/vendor/impeccable/bundle/blobs/0c064c9975f25f6eb5cf7911c2eeafd3e695d729f8c86a49a24ff2d76cb3cd94 +63 -0
  436. package/vendor/impeccable/bundle/blobs/{4a7d8695741e2cd354baada215b06798c050aa7a8e1ca6814f0e395e054d1ab1 → 0ccf57f758eb0d53bc32c5c77156f016e528d20fe2c2740662bf19964dfbb00b} +18 -11
  437. package/vendor/impeccable/bundle/blobs/0dd1e6ccf053cb80e057caf7bf2fef30fd0197a41d907a1a8d2d2d02f6978674 +63 -0
  438. package/vendor/impeccable/bundle/blobs/{943b0d7c9ce4f6802d8440a07b2ad3c61cbd1cc00ab63962bab7eea9ca584d20 → 0ed5986d1503399f48c11104df5e523a63be2d6558770ebfbbeb2323ca3f2ad3} +5 -5
  439. package/vendor/impeccable/bundle/blobs/14c9c9a7816026dd77494d06b8d1777c8d64785126b0c9ac8db5ebd996dfd6b6 +101 -0
  440. package/vendor/impeccable/bundle/blobs/{54cb270e8826380caefc8c40642a5d973f27df46bfdb762d822541a0c72a9877 → 14ef0ab84c10331f8af6b4124387a3f80b493175a04a3f89200719b4b5aea221} +18 -11
  441. package/vendor/impeccable/bundle/blobs/{6abbf5979db5cb1d7965bf5f91d589e984843069c587f4d1e63aab135bbace0f → 1547005438784032de3254cb35bff393e8187d7a459d0c20a693d9bfb0b5c1a4} +5 -0
  442. package/vendor/impeccable/bundle/blobs/162b814ddd1133923b9584bb95f85959e64844c94341d6bf10a81c06ab7cc02c +101 -0
  443. package/vendor/impeccable/bundle/blobs/16498466a97a5b19a593d5b3f245468c71784bea069d7fc8aa9690db5ac1d968 +29 -0
  444. package/vendor/impeccable/bundle/blobs/{b31ff29c7a1ea979c6d039f7e8d17007410697ab49536690dca109f0af3f20f8 → 16ba7fca1973c5faf53dd2ca523559129c0fe9e5f8d50b645f527afa78186cd2} +9 -0
  445. package/vendor/impeccable/bundle/blobs/1725ca4aa546a34770f29191b58bf8dc14957d4258fb9e7d02f7b1c59c412ea4 +63 -0
  446. package/vendor/impeccable/bundle/blobs/{598bfed550954471ba4d257d46b4d608cd82e4cdbf36d07bf93c5f4a563f7727 → 1898529e994bf0a31ee9ff3f87c343caea3d8a7e0986f404e129fbf89078ade0} +4 -3
  447. package/vendor/impeccable/bundle/blobs/{6e20041e209e8705d14aa9c4fb8cca3f0d743791de633785e5b46e2dd1ff1a6b → 19b439d7d16e139357459d3874f739ea94dbdffeb2a0e201df1620ed1e40574d} +1 -1
  448. package/vendor/impeccable/bundle/blobs/{04af9f2d6883fe76f9539d310d9c369052822a24886d2c330ab1e3fe5981c8a1 → 1b289c8c09de9d4442109ada91b1fa3a190e113a310cab7aa26a3633c5df0bb0} +1 -1
  449. package/vendor/impeccable/bundle/blobs/{eb3213b9c9f4d6b2f153e7b457f13aa131bcf633695229dad4eac39a920bdf38 → 1bb3bdce54386e96e21b5956713a80583e6b3b9d1170f3bb8dec3819fa341bc3} +5 -5
  450. package/vendor/impeccable/bundle/blobs/{e71d6b97680084a7ccec01844e658cbd2042aec00da0c91bec62a240ad7dcf6a → 1c11cb8ea42536c7a51e197f1aa32198960bb89262da2eaf32e0feb03c70792c} +18 -11
  451. package/vendor/impeccable/bundle/blobs/{f0c4d0615c7d520dfc2536c01cc7f1f3aab9b60ddc399ba01289fe62edb12370 → 1c6258015ed02c522948f8f1a3b6457395a8f7954497b87c1cd83f1791f9f819} +1 -1
  452. package/vendor/impeccable/bundle/blobs/{27c4b6c90ad12a186136f9ece9cb1830d4a6e36b11382ab334efc4543f8082de → 1d7145fd5bf65282b2e05cf42faf41766d68e83e2b75f460b3b62d81ada5e5d7} +18 -11
  453. package/vendor/impeccable/bundle/blobs/{1484a7ae206ab4f0e6262b21afe0f6307a629ed27d28fb7de69536a6800a4883 → 1e2f696760ee55fb154bdcc302c7d7b0fbb807e0308130594bd892dae14dc9ea} +5 -0
  454. package/vendor/impeccable/bundle/blobs/{6989120346e87907d59cc6d4708dd9dee29227ad583fbefee28935395b68ce34 → 1f6c3a1d7344f44eaa88b6f38334ad7d7b60201709589039a58cee73de486f5d} +1 -1
  455. package/vendor/impeccable/bundle/blobs/207d443cabe4e6fe1351f91785748957f757bf1e7aeca405433c0329dad46a15 +63 -0
  456. package/vendor/impeccable/bundle/blobs/{f7916d0113da7a19d4e03c113d5563d181457e44f1646ecab9191cfee5ae776d → 20e2111b3e065e8e8054f715ea3902e64b77886b30d2bddee723558f22942620} +4 -3
  457. package/vendor/impeccable/bundle/blobs/21e78c8a77badb3f83290cd4577ed3b24bd4dd3b57136d7da75733d4f3ee9ac0 +19 -0
  458. package/vendor/impeccable/bundle/blobs/{0f83648f6b425225290305bced51eacebacf9bf9bc05e21cdbad46863fbc89ce → 223f08673b267f81d7586f686afe05d7cd7529a8e11ac37d979f95c2ceaae8ce} +1 -1
  459. package/vendor/impeccable/bundle/blobs/2499b18f26639694344ca95682f47c65494f730cfff88aa9bd2aa83a22e5926d +101 -0
  460. package/vendor/impeccable/bundle/blobs/{074575671f24cf4298d06f0019f76e94f62e9a6ed205fce05b8e507341e64266 → 26cd88d10f8a14ed0ddb6e6b21e5e2c981f410eac93afa179202c354d7d1c0d5} +3 -1
  461. package/vendor/impeccable/bundle/blobs/{5f24c5a97b4ffcabc7c432b064cfdd04c7a2ad52f52e765be648dc0aadab8f38 → 275dd1b6e63bbd30d2713227c4f79b880a8bc4e01cc48d392068bb86939d3afa} +1 -1
  462. package/vendor/impeccable/bundle/blobs/{356cfa0ebf61589cf5d52691d101a69d69256062fe1d11d71d95d41a78289cbd → 28f65b42c1ce9aaea35dc37a51257d7c703bb7f6553ebe3b8ca238a1007251e0} +3 -1
  463. package/vendor/impeccable/bundle/blobs/{a1dbde501ffabb50f30f28f2de6755b5e91b3d4028292c5a3abd3358106eb457 → 2ac1624b1253f3b6fcf2da54d54293624176539b2e9609a49245e7e46c65ca5f} +5 -0
  464. package/vendor/impeccable/bundle/blobs/{3895765e9434400dfc1b30e364be002cf499c1718fb2431e65b907c14ae2cb27 → 2b9379cdb329890eebe2384fbaa23f771745f30d8cfc43e180ebd092e69bcd2f} +4 -3
  465. package/vendor/impeccable/bundle/blobs/{1a9180cec754f8afd354e7cb759750247e97c5bd26d3242ad4c45e315069e8c0 → 2bc5d62463cc83d6417df7b8f4a02b4135e2b1bb654aa7727890662496f86e3d} +5 -0
  466. package/vendor/impeccable/bundle/blobs/2ce1722bd1a9f366182d9357d629796b1448f7a0126a854df507eb044d891cab +26 -0
  467. package/vendor/impeccable/bundle/blobs/{e21af575fcc0f1df54ae422bea4dfa1e5211422606908919f6a86e19e0d5c20c → 3149a87bbed84bffe3558d5eaf1dc596b2e84d3c1be290fc7b1c13e481ae0803} +4 -3
  468. package/vendor/impeccable/bundle/blobs/3253eab02b62efa80abc74a5c85da08f3e2c6c20dff8dec38f4d236cbbfa0f3c +63 -0
  469. package/vendor/impeccable/bundle/blobs/{38c2e839e130008b6da814ab9c16f3fcbbedfdf721a9638eebd31a9e65341a7a → 37680abf9a8e446619fcd33862718f483d197bf2652f966adca8dc54d2909b9d} +3 -2
  470. package/vendor/impeccable/bundle/blobs/385a0efe833bd4afe4a257e7159590de0cf1b7fd8f7b213b732f1e537c62dab7 +21 -0
  471. package/vendor/impeccable/bundle/blobs/{8a1c872773996dfa1c1eb765ac7ed8e8d41f99d4f12f090b4725b694e85eaa62 → 3898bd9b56a042e860a0db4fb4dd81ac81126fa218b604702e2ac0c2287ae09b} +9 -0
  472. package/vendor/impeccable/bundle/blobs/3b2b60f23fa8ed9d73e721e17142c3933dc5318fa9a251742a76fee890ac81a8 +26 -0
  473. package/vendor/impeccable/bundle/blobs/3bd55b35c253f7841ca4e6e1a855a4b477d59aa2daf6e61e93fd685caaaff131 +63 -0
  474. package/vendor/impeccable/bundle/blobs/{dde1b74aeab3d90320e134f0ed0422bef99917dcab4c1749aa1720a2c94f725f → 3bed76a0d528e2d73da8acae4dc63702bdb5baca5ab11600d70e75fc9f2ba90b} +5 -0
  475. package/vendor/impeccable/bundle/blobs/{9b2fc50c5062073d097140cde85602bba181e325ec6b9eea1bd3da74582acb9d → 3ef9a43006bc68d83bc958fc8401e59f9beb6379048f5ced047747fdad05b895} +5 -5
  476. package/vendor/impeccable/bundle/blobs/{30e006fdee873bac23edaeadce0371161625e021e3cf442dff4b05bb82297ba1 → 400419aaa20f710e1a7e5ca1fce9e8bc995c4db84053f40cf778d987619e0210} +1 -1
  477. package/vendor/impeccable/bundle/blobs/40cd6024312a1339aa66801df533afa543e60c36e708f0f9659dd8d558f83dce +63 -0
  478. package/vendor/impeccable/bundle/blobs/{55e95137b3f9198c1d4dfc425366b82f1ef5f77d602682b2edf91f2ce9296289 → 412dd9a5238aee223397591fe49b3bd27b6b53d649a0e67ed8570f3e199cebb9} +1 -1
  479. package/vendor/impeccable/bundle/blobs/{181e814c1b9317098b2300c1b02ad0d137b6d82bd1e7e8cc64de4d00b4c50c25 → 41ef23c048ab739f48afdce26a2678d36ee40bcced34ef4b969d1d8ffafca64c} +3 -1
  480. package/vendor/impeccable/bundle/blobs/{edddeb3fad88adec9a055b1bf9d5c75418cbe97a13b1a7f6765e73249e482563 → 42831c3cd874346d8e7f120808d91e6ed3cda5c3eca6eefd76b126659536bc87} +5 -1
  481. package/vendor/impeccable/bundle/blobs/{e3c331cc21d9a216e25e08628610ea99c97e150893c3d26e5c0cecc532f26d7b → 43dbfcb7c2e54c9cca9fce66024f17c06a2f2be645547b718b75c8828a463de2} +1 -1
  482. package/vendor/impeccable/bundle/blobs/4435529820c3fc2eceae8b1ee35c906a34c7612fb860117e896152b45aee0770 +26 -0
  483. package/vendor/impeccable/bundle/blobs/44a60aedcc350c2d7d501d0f830a31a586a6511a9ff9b4e361cb328bb747339d +101 -0
  484. package/vendor/impeccable/bundle/blobs/{c6a0ec6c28ae55fe539f0f41a507b1638495afd285d6eb15c00245fc8cc7e7fe → 45dcea8da47cc21f447041daa942cf5d92cddde9a5a02c196cedbd159c829304} +5 -0
  485. package/vendor/impeccable/bundle/blobs/{015725eeca94f52bffd2132d4cb49bc3eb1ee76e6ac7378c065e629d59f56613 → 4700adf4542874f204c680ebad8317a97bf7169dbc04147082618ab59ce70c7d} +3 -2
  486. package/vendor/impeccable/bundle/blobs/4777bbeaff2efcd6a2a66b07aacaaf57cd32f3fab1c1da5a0513937fafb48bd1 +63 -0
  487. package/vendor/impeccable/bundle/blobs/{b6022a8c7200e96b0b55c2ff599a01d64123a2f5fe01557d4ca5192a6e0f0b0c → 484ea165f6d49ecc15b7a5c5623e377f2e203f4dad366df23eae99255ecf4572} +18 -11
  488. package/vendor/impeccable/bundle/blobs/485774d58dfd5796956024cdd9c12f05e692a3703f70b12a02ab43918885c3fd +101 -0
  489. package/vendor/impeccable/bundle/blobs/{3bf5d8661351831dbb2195e3b677fea1f128ca319c0589d538b66d9c9d7dddbc → 488da2e7406c6b4b5c92d7bc8cbd370cdaafc82a5f3ab5adbcffb21d1d1c4df4} +3 -1
  490. package/vendor/impeccable/bundle/blobs/{6f1d52863482fa0f6fff877f0cc8f6dd0b4230d28050b0d267e082776e61a332 → 492a8030d11e2f4908d934bd817bd6d16a3164056c74a7172f60e2cec5ff3055} +5 -0
  491. package/vendor/impeccable/bundle/blobs/{51e2f8963377f142ebdc9864e0ecc5aa1e5b7d344ed72d0e9d748d2d3d8c71b3 → 4972f28d96897c8dec891f0de7a0d9d51f36030ff780ed9d960241c75413da2b} +5 -5
  492. package/vendor/impeccable/bundle/blobs/4a6f0386bff78bb42efa285df2919e75209ec336672cf5fff91ba66ffb352eaa +63 -0
  493. package/vendor/impeccable/bundle/blobs/{12c1afcd15e86d840b89a78c6d17ce6d1b5609bac713d59271c6ab5932975dac → 4e3cc4d0e229ca96dd2e28fb2da0478a7f0bb64e447d07a652c425d8fbc57573} +3 -1
  494. package/vendor/impeccable/bundle/blobs/4ea8e05d0f88d24f182ad554da84317f90b9730e29fad262143ddf423a1f8645 +26 -0
  495. package/vendor/impeccable/bundle/blobs/{402656ca6df17bad1cd55ede0a966a7bb5b187cf4f89c517851f9efe7f14c0fd → 50d4b14134fc06daeac0aab6960800f171ef85250d3bcce6f246cf81e824463f} +3 -2
  496. package/vendor/impeccable/bundle/blobs/{43852ca5917de66704f73f9019d15482bb1efd92f2eefaeeeae23610b4c0c6a0 → 50f3b5714ca3e2c1bcf070003733407935ee050609d3123c2c065489fbc9950b} +5 -0
  497. package/vendor/impeccable/bundle/blobs/{f597742c8e5562263d3bce725cb55e920d8c2c60223f41a632d523ca30cdd12b → 51032bb883137007127d30189b44b516d0e6140271bf5881da7eca76f8bd282c} +3 -1
  498. package/vendor/impeccable/bundle/blobs/{13bd27aa8573e6d45d8bbf9f3fc991e4719d28a7e8f709009a4a5a49a227fff3 → 511ecde67e6bd976c9bdfa8d92f0dba359621344f8135c2a5ce5a66b385a4cb5} +5 -0
  499. package/vendor/impeccable/bundle/blobs/514a27fc9830455828d337cfc2fa95fa86be8e5464501bbabb9aca09a66b40ad +63 -0
  500. package/vendor/impeccable/bundle/blobs/{78ac93689928a580c2f90242cbaa96dda3fa4e55ff1f1d00e412b2a62ad85232 → 529cb2ace696ec11a86f4b010c9b137acf282072e483932181be1871df2aa690} +18 -11
  501. package/vendor/impeccable/bundle/blobs/53628d05b7eff0d4f48b95e48fad40266452fe1b42f398bd88dd9328353e0dd8 +101 -0
  502. package/vendor/impeccable/bundle/blobs/{00023f9e7f2e27604fde978b56510a8f837b76eeadd93221d11adcf4c98f1a10 → 53de37260c4f1c37e467557e9b038faa0f285b056bb2b95f435e0a7d1b69b0de} +3 -2
  503. package/vendor/impeccable/bundle/blobs/{0dbbef70048cc3ae44e6710ff09992ce14ad049ce8ed519b0ff8a1ddb4633f4e → 5415103ca4422ea1422e23bfe9f9bae181f5d6d6407442f7fba31856ada58d12} +3 -1
  504. package/vendor/impeccable/bundle/blobs/{af34b8af89edb10e228c0482754423f48238fce816eceb8703b8781c130da54e → 56285b28b0ffe471761c2ad062d3f933ed2346ca1b617f1323a30fed99a1a852} +1 -1
  505. package/vendor/impeccable/bundle/blobs/{12fefe52d80d25014e5f7e2f9b278275a675653d3d99ae8f0ecf344cdb9abbe6 → 56cc1bba51e6805de370160ce4a9399fef3740571204f13c3c751725870305e5} +3 -1
  506. package/vendor/impeccable/bundle/blobs/571f5c3bcf01c9b1bd02ab853a54db3f88375c4b8f39dd67d53e983a33e08bb7 +26 -0
  507. package/vendor/impeccable/bundle/blobs/{5ce02fc8f353d7f659535fb80e453963dc047a07c4396adf098fe010b479e7c0 → 5855d7595b0212bb8d521e0265378d437df8d2343d5f8a30408c3edde0a14d96} +3 -2
  508. package/vendor/impeccable/bundle/blobs/{2b21f0142ee88a11dbe2593362f5a910718a61062e3a64e7ff936ef1e74fd394 → 5a07d4769a741cd00fdf8c95b943ef072eb12cd0c9e2c2d2622d5fe0a4fa3894} +5 -5
  509. package/vendor/impeccable/bundle/blobs/{3dd45e1c32db3d3163a96ef198954905807b25cb9a1d206a7d77986f21d27652 → 5a9626fb8c1e9051155c68626fe7c765a55be325113245d44b4991fc3d3b014e} +5 -0
  510. package/vendor/impeccable/bundle/blobs/{d07e3131cdf3e392e59eaa3e2f59fcb0799d9494df4adfee12a21067fb8365ce → 5e354ae11913d5846faa3681a9ed98b68d1881fbbb1ecebf0769e3010bb0a426} +5 -0
  511. package/vendor/impeccable/bundle/blobs/{ad389ab12800738b0e5c97618278b7a824654b25990166ec9f389caa5c3386ca → 5e6eea05456108b8766cf354dda998e90b6a5ecca7f15d807e28659ee78c306f} +5 -0
  512. package/vendor/impeccable/bundle/blobs/{85b9c2d051de94ee9129c58be111946f73035ca62bbd2a3936f4fa48768fe5cf → 634257e766b1fecacd25e27dbfc7e21ef3b440b01e94e92b8b17711018d8a661} +18 -11
  513. package/vendor/impeccable/bundle/blobs/6428239079f98fd6500e9fd032dd289b52052da7a4364ff357b0a5341b6444db +63 -0
  514. package/vendor/impeccable/bundle/blobs/{f424dafa190533cd32c0bc3e4131d0c472d58e16bb191eab14f0ae73c2cea917 → 647bab2f5cf6279d58d808f4df05d1ac63c1c86c6df9d13406ae776458653995} +5 -0
  515. package/vendor/impeccable/bundle/blobs/{8e7bb79db7331b93f99de314dd5599de8587ec0b6c25e26cf1efab25c0777fcb → 6528f2aebe4a425b724de293c8f6dc8a42ca80c7f1ed3039b8b9a813b004956a} +4 -3
  516. package/vendor/impeccable/bundle/blobs/{89eb0206a0d9308c6c6a7cc01bc4fd8812d2bd34bb9a831988c5d86fac2c60de → 6575a657642ccdab42d0743ceaee06621c77811b4dc4f21c616e28aabf5e28ef} +1 -1
  517. package/vendor/impeccable/bundle/blobs/66d60356172ccafdd334fca9bf33243c8409216a733dcde0d66a24fd70ee8132 +1 -0
  518. package/vendor/impeccable/bundle/blobs/{759bab1d8adc071fdde2efcf6e2157aa4026f3c2b4f3c342a8070bf328011616 → 69cad1ae7355825ef320ac9638a1c9675ba9fda01c9a0fa12244cc4a1973e550} +2 -2
  519. package/vendor/impeccable/bundle/blobs/6d21d8e2729effaecc5b6239dadbcffb1ec8d51e8bdadeb47a39827266a61c5e +26 -0
  520. package/vendor/impeccable/bundle/blobs/{ff882c59c9aced92338aa194cc99a521ea2f083fd22eef3b1c1225e06bc72f66 → 6d9258a49c0b0583ec255eeb1092554298d5eea676fb9391f5a5a1377c3fd770} +4 -3
  521. package/vendor/impeccable/bundle/blobs/{68bc52a604731ca024610051fc763f4d78a53eb2a45d35b40a8c0383043baa63 → 6f4dfe968f47302ea64dca0e02f8c6d81497d93e4f436d09236e305456cbcc02} +4 -3
  522. package/vendor/impeccable/bundle/blobs/{f97a6891c80bbbc728edefcf4b638d1a823b38f3cb16ecd0fbb717734cc5c0c8 → 6f7f1639a933ed88e116aa8ab0cfb951096930d14f413349ae22ed04e28d2358} +5 -5
  523. package/vendor/impeccable/bundle/blobs/713a942482531ef8ef103adf48d9decd7327697450e444289aa0479458e4ee1f +101 -0
  524. package/vendor/impeccable/bundle/blobs/{6d47503587ad6da17ac529f44a96123bbb96a9c91a7a9350b7690fc467561a5d → 7212014fb2477d1d54aedaa79cdb861071a58afb2ae6d4dc5a495fa4810c6f8a} +5 -5
  525. package/vendor/impeccable/bundle/blobs/{21bc91f6e07691e82b7bba99f9e1d956f9d7a6810dcdc18d231fe73b53a13b23 → 73f8bdec7d9a97476fd7d7e0b4114b5c3e9c7b84c22cbb876cd18c3e64a9b8c5} +5 -0
  526. package/vendor/impeccable/bundle/blobs/{a8547c8565979894f0c07f92a96ac2a38e681a31fbf155ffeefc7566e185d9c2 → 754e9f0aa2101245a83cb17d8cc5bc49cf87997b29a83dedbfff283dbd0a8c4f} +5 -0
  527. package/vendor/impeccable/bundle/blobs/{84df879a0332a56ece4bff1922ecf4f50635951b3c67e67eb46f31bc5d30fa9a → 765d3e890cd7f58ca94b6834181052166e9c4f9ef06278dc241da4d64da2d595} +3 -1
  528. package/vendor/impeccable/bundle/blobs/778cedc9199b407d3e23fa1041e38d548b00b1101a33517aa2a2eb299f9d0edc +26 -0
  529. package/vendor/impeccable/bundle/blobs/{ef0b8eca20e1321cf7216fd0bda41ce54b0cca197cfd1b075eb51f3436f59059 → 77ae09542fbc10aa4e8b119d6fd19359908a47c13c30068d6a150bfdb50e3e10} +1 -1
  530. package/vendor/impeccable/bundle/blobs/{15b4837dccb27d7382e2f134ef050b244c4488b1906e0308f288112183cc09ac → 796bbd8231413fcbf22eb7e6f40c402842aa4b10b1894545a7b05d9201ca7c4a} +18 -11
  531. package/vendor/impeccable/bundle/blobs/{5e3616ac45568f239fda3a4764f7d3bf3473b8b5eefd91e402dd9208a4b851d1 → 7af7fcc09c6b14f26ba78734460a2f9dddd2dcd2e2fa0c47c682f539e2f4cad5} +1 -1
  532. package/vendor/impeccable/bundle/blobs/7b1a4cc5ce94837c8309962a204c47361927e442b7a1c3cc472f90276eca8b8c +63 -0
  533. package/vendor/impeccable/bundle/blobs/7c417abe75f0ce4341b6f5acbadcafbbeabcc32cdb13c930aecc5cabda9f9242 +26 -0
  534. package/vendor/impeccable/bundle/blobs/7e36403ed58e0e82c0e42bf2fbea1c066b8e63276978647a6f1e44bf1edb23fb +63 -0
  535. package/vendor/impeccable/bundle/blobs/80191b3580a996a2045105976f728e0f46de22c412fc7640741add9767b2d8f4 +101 -0
  536. package/vendor/impeccable/bundle/blobs/814610dee1081abc4213476ff0c4ae3e8f457909550d250ea0f89953687c85c6 +63 -0
  537. package/vendor/impeccable/bundle/blobs/8157b5a376e46980117f1ad6d08b24ee7be966f5de64b041bd213d486ea8c077 +26 -0
  538. package/vendor/impeccable/bundle/blobs/{bad9250670c18d89722563fd747bae4c4bec64d1db0ee09d12d4fea04fe271b8 → 8373668da1aa37c39888809ed9e834a7edfcb884af12f74934c270d004fba626} +3 -2
  539. package/vendor/impeccable/bundle/blobs/{46250caaec1bd69619a5b28a73cb3c845b319d029b0af9228aaa7001e7e0104a → 83d614fec61078175383012a088f49a9c0bb08b9ebd2b651c77cb94a323474ab} +5 -0
  540. package/vendor/impeccable/bundle/blobs/{a5371492582dbeb69b24a1a2947b256a2da8a4d55917af709bbab6e452d9d23c → 8449781319a33d4a10a7fab9bfa4812241c303b95f33703b300b097dba51089a} +18 -11
  541. package/vendor/impeccable/bundle/blobs/{12d2a8043ae8668ad29c32bfa92995849fc49cb016e6ebd4f7e59539d96e7b03 → 857c4a0db5859f1fa91152db684528299dfc552525f50f416d1625a270e12671} +5 -5
  542. package/vendor/impeccable/bundle/blobs/{bead87679caad7c537dd7c04c3bb78be56ac7eec279ad6aad7322f48ff2df2d9 → 871a8e4d749b807c693ebabd83defbd6c76e1bd2a0f53a28a460cb1308ba8634} +6 -0
  543. package/vendor/impeccable/bundle/blobs/{cf3ae16765e7b5bc333ef76e24ab37f080e3d62e931c4986158e3cbcda6b9f7a → 881a58aadf300bcc8f4947243e82192ae8dd7f14822a70fabc84fc74a5f9199c} +5 -5
  544. package/vendor/impeccable/bundle/blobs/{896da399bafcffb0623bdd81bb18709d6eab25c9d5917e739c8798f31ff0d076 → 88549c11ea55d5dfc9f551db9a9c270d7362a9d42aa83db7747c9a7f020e1255} +5 -5
  545. package/vendor/impeccable/bundle/blobs/9287af96048c58ed0e72493cf7eb90c3957d4ba8b19e70ecf5d1f54264e9e597 +101 -0
  546. package/vendor/impeccable/bundle/blobs/92b7ab84c828fa888f4882c417c3d7f8fde2e5445b40f96f4fc8181a3e058afc +101 -0
  547. package/vendor/impeccable/bundle/blobs/{e2f98c4136d0ab70ec32fcdef58edb20ed8ec4f6cc067e0dae952b22cfd6a471 → 93c53421c3376f695fe9dad5c82102f74bb5dd15e4ced81bb4ad50a71e5f1027} +1 -1
  548. package/vendor/impeccable/bundle/blobs/{a8f4056a85706c0c8f80ec48e9b437e198464100aa42786f9252051f4b931c19 → 95f0c7935a6d0375e09ae67ae0066c0ce7b583bf1d445d268cc4d2f4f900b1bb} +3 -1
  549. package/vendor/impeccable/bundle/blobs/98384b78af087855dbb526ec1e870a676ecd87f57237643dfea815317dad8a07 +26 -0
  550. package/vendor/impeccable/bundle/blobs/{948326fab89f0d5c07355a06b9b9c30d08bba2e3a673a0151ebbf5a39dff7b9a → 99e4a6facdb07986aa721bda8a4e35466b30091f32e38d7a71d9fcbe3591f65a} +5 -0
  551. package/vendor/impeccable/bundle/blobs/{44a91b3f0810f43829d8584e912812444d15614e4b57ca8070aee7ab899f7c1e → 9a4aa0d4903eabee987fdc92053466ff7f6eb0604797aee0efe67d67999b3eae} +5 -5
  552. package/vendor/impeccable/bundle/blobs/{9b85b85443aec09918befb83208c72f475457db8261a8fc5e83ef7eec474c869 → 9d45e5f6c082de6df4a2cfff11deb969715c49b5d9891d100dd1b2252c5bdcdd} +18 -11
  553. package/vendor/impeccable/bundle/blobs/9db3c0857f4c2c8877b1fe24a47a229fee0de76ec9057bd8ee95f0677fb58d74 +26 -0
  554. package/vendor/impeccable/bundle/blobs/{5738bcf9ac21dbb2113fd0c5cc7e4bbfc8174778916ab5843644332b3dbbc36e → 9e82126a2e08aa365f9c430d383cf6e1921e04d1e0a1b5777716ff97828cfad8} +5 -5
  555. package/vendor/impeccable/bundle/blobs/{b3782f2d9215eb0f5df4fe3c0e0bec07cef011e1836d4d0e45ef02bc48d3adde → 9f2993499adadfdef4065a9a7fb69c75f888d892d4ee6bdbe62619bc772f495c} +1 -1
  556. package/vendor/impeccable/bundle/blobs/{1c804990fd8ac23a4b19c42972b5ae591d17f620d0006f0f32927c8db5d5bf50 → a1af8b8a97665a3692eb39872c235796684a387a0b83785872f81aebd9dab046} +18 -11
  557. package/vendor/impeccable/bundle/blobs/{824b994782a1fe68a244bbdff7218a2e0854655d90cc0fb5ade7ef9259ba6305 → a27399e3056c77a28ddd310fb5b4dee6e8e440dfa1737f7e38815097bec4c3a9} +5 -5
  558. package/vendor/impeccable/bundle/blobs/a569989e6a3d6453b4c45e9474e162a15cc54e11732ac6baa7990a6e7cccc0b5 +21 -0
  559. package/vendor/impeccable/bundle/blobs/a75b892696469e3ccd2af33c9eef793e635efc3c5ac45336b0c1373d90c856b0 +63 -0
  560. package/vendor/impeccable/bundle/blobs/{3ba92d4aa840ec1b6c2fda224339489d6dd65eedf43bb45836af02584d1faa88 → a7e8e60df83c6f47590467094ab2a13f1fe28ce45959a4e69dd89575a4208646} +5 -0
  561. package/vendor/impeccable/bundle/blobs/{e49d2b0110c55751da3c965b4ae4d294aa676c961a09f8efbbbf22c1ec7c4fa0 → a892e337eee548d53252abb72ba5aa85cbcf556ffd8dc74e05534652c010d574} +1 -1
  562. package/vendor/impeccable/bundle/blobs/{8f0867db7c6f6a54348a0d951f198a1bd852cd12505d821e6e1ac6bd42e7fcea → a93397adc906e245c69b42d4b25931fc92dc75baa60ca9a3749ba23b52ba01a0} +3 -2
  563. package/vendor/impeccable/bundle/blobs/{424b2e75cb204e2dca7db4a40dfe5a81f78dc0fc58ac4790e8b7bbf2f330bba4 → a9e63b2df611805e845e0bb1cca1a0c27e83640a78185c9fd9de90d53a539cdc} +5 -0
  564. package/vendor/impeccable/bundle/blobs/ab80e6a971baa66342548a846ce3fb69824ef9ef4e0f26c6f02685f225d00bbd +26 -0
  565. package/vendor/impeccable/bundle/blobs/af35b5fb6e45acb6483a5fbb864c3eaa9c57bacc43857f48183c836041c670ae +101 -0
  566. package/vendor/impeccable/bundle/blobs/af5842c4844b692b817319d5375611d4211dc7f459fb12da358baefc3a6cd373 +63 -0
  567. package/vendor/impeccable/bundle/blobs/b2732083f8f1d1924d38f84f179491430aebda8e0fd1f1d0785e3f883bcf3a40 +63 -0
  568. package/vendor/impeccable/bundle/blobs/b3b1d5a4c80ce279d88896601deee9ccfeacdae0d0cd433600985a5f7ac93c72 +26 -0
  569. package/vendor/impeccable/bundle/blobs/{fd5579dbae1fc2495b7dddde48df9673acebd27953bbb56d506d3b470375c9e9 → b4be5499f404a926cdd2c55d8fb7409ba74a56b3d0c7d865594cc0254d3e499a} +5 -0
  570. package/vendor/impeccable/bundle/blobs/{2fd096823e4a93f19edd421a69e10f90ebb630a014c673d1802a927c6f47b7d2 → b626e0677288a1660e9ce80c4f0454b527010239681f6b8dcc0f36b4a4d6bcb2} +3 -1
  571. package/vendor/impeccable/bundle/blobs/{33b6b32c0c3c0c4a2b22bd2275176b1c88a006dd94592a854f629911a0b21cdc → b719be9c5d4ced5d649ec6c0c90630196e7ee513d0da482aef13c705fdc23ab6} +3 -1
  572. package/vendor/impeccable/bundle/blobs/{df0eb9e9a484fc7b8a0f3e50573a7d7f81e0f17598ac30d9f3fe5a6c6aa5fefa → b8938fea3399aa639b4c873248035c219658069eef7be62672254e2f72c056f4} +5 -0
  573. package/vendor/impeccable/bundle/blobs/{ee0a15fcfc244b76b896a2650a17b35e444d4311166b69a3cfa32d11f8f44851 → ba0d96d88ab40fad1cb522e60b11affc568cfe9d340110ac5e71f834ac3d0f4a} +12 -0
  574. package/vendor/impeccable/bundle/blobs/{426c7f5437dd3c23a4cfaef6964dc7f1e038480f92238499b85f3ce7e4472bf4 → bc48bca63dff44e1f0205bafb64e16b2d6fb294ace405dbc9ae06a3bc6107154} +3 -1
  575. package/vendor/impeccable/bundle/blobs/{c3ad2a5fa570876af6645c48d246c664859e19f253d2dc9e0ead34e785d5b40a → bdd676c8f29295addfdbceaab285bb1184ec3ef7ff60501908b97ea8269580c4} +3 -2
  576. package/vendor/impeccable/bundle/blobs/{38d4d404030c6ea935d3223db1eeb22c45d04a94f41f98e02a43cdc5af7ff2e3 → c06effcdc60859157208d3b7ee23d56160f2386f6a2dfa2514ba82fe21828ae0} +1 -1
  577. package/vendor/impeccable/bundle/blobs/c100b67a4ae248ad564182b181acb1ee2fe64c00049aeef62d4e7a3213726f37 +26 -0
  578. package/vendor/impeccable/bundle/blobs/c2dfc965319745c403b99e00e9e97de15f1300ea721bd3f708f0ac47aadc537b +101 -0
  579. package/vendor/impeccable/bundle/blobs/{e9da72a13eb3411d6bbb316953022f62abc4434f505e5345907b216eda9f793b → c6b3bc811eb23d90ff9add1e0e5b40999a0bbbab364f5e6d08061f36d30429a5} +1 -1
  580. package/vendor/impeccable/bundle/blobs/{82a5e564563333aabb7ab4d2f8c26c785dfe2c2416ac6e9f30cba31440676194 → cdf8a88b9865599c58fe285041d2d46eea7d9bd2d4075d82de358191742b20ad} +5 -5
  581. package/vendor/impeccable/bundle/blobs/cf3d3a296890ac1ee363fee930f252e20d0935cd575367ad017b3cdc2dc5a50d +26 -0
  582. package/vendor/impeccable/bundle/blobs/{a1e4febca3455787d7c753fe177a150dccde6e742957de400b0307247802d200 → d2e16da9bb6b33c931378d1bf57dcfff5dc426a71434bc352cec6aece715a66f} +18 -11
  583. package/vendor/impeccable/bundle/blobs/{c36f6aac0ddf52eabbb21df09fd3310540dca6b09e7a4017d18e94c06c469405 → d4a9e18a879bbb92aa0a56e16b45481090dffa4470efdecf52fb0da8c900be5d} +5 -5
  584. package/vendor/impeccable/bundle/blobs/{869fa5390b84bfd00d072f5280a9002ea3e3936edf5985241be641a87f03ff7b → d57c3e0453f601ad688911fca4471057c7b46b561fcd42a1e12a581101c5186c} +1 -1
  585. package/vendor/impeccable/bundle/blobs/{910461b1c1f8216155165955c860a884a1e2f557cb38f21ef512ea90ef6503c2 → d5f83912eda93d42f93522bb74aeff0ea04d9c559577ec52fcccc130dd03166d} +2 -1
  586. package/vendor/impeccable/bundle/blobs/{9deb14303b421b5a9232755b5b9f317716f33e1e211557a98a00a9c409775c4d → d6489d7f3e607ce3f8514a7a7d3a0eb5e8f1ac55859eaf7d5c31b53de8fab9f3} +18 -11
  587. package/vendor/impeccable/bundle/blobs/{37080ea5e5b381adb7eae7a427231b0ad0dee0f0916fc1d6b673b7101a5b425b → d6a51f4df6d76f16b95ab81268a689f4c5936d505c5bb25c80ad7423f927bbc6} +5 -0
  588. package/vendor/impeccable/bundle/blobs/{61c72fdde649bf7f2e0668e48f9d222666c81672100b5f2265940e7aa13c8767 → d7b99a57652cb8741d57a15ba7e06de4707fac02a97e5e001179da007272f2b8} +3 -1
  589. package/vendor/impeccable/bundle/blobs/{57402ef6fd9d0745f8c60d778f77da83a8b16edf751fa1013598a0f6e5f0f541 → d9963fd73bf6129fe0c8ec25c5148f50617ec85683b8eeae7e411c9a42e2db33} +2 -1
  590. package/vendor/impeccable/bundle/blobs/{581409ace104a81744b7d08f5398a2c207cf76d9e50751f807b4382eaf66454f → da3b2399814db89d67959268c646601957d3e8c641b09a5bdbce84217c1c2cfe} +5 -5
  591. package/vendor/impeccable/bundle/blobs/{249f0437a52ab3eb4bc4d4a9f38e085334c0fbb7795e88dd419e32b5f58c924d → dc3aeccbea3e997704ce8b170f56b0eaf343a14ad4fedb22a6dbee0f205aa37f} +5 -0
  592. package/vendor/impeccable/bundle/blobs/{433a79eee3ce4c99e79a7aebe3a6d8ec9ff70216772e0c2ff9dce3a01d672963 → dcc1572e739cdabcbf084f276b447cb686aa18459896e6d8fe29f4d7d807bd1d} +5 -5
  593. package/vendor/impeccable/bundle/blobs/{2d7086992c07df1fc734cdf9c420c4bd8ad409ab7909e07c8b486c303d420732 → dd66761b291c7dbca6e9efd22023e38f8c53ad310f3a6cdab5dc7ecd7ae8f31f} +3 -2
  594. package/vendor/impeccable/bundle/blobs/dd953992625c240fd1842aaf533a865aabd09487cbc16fa01fe8bb4b4365b843 +101 -0
  595. package/vendor/impeccable/bundle/blobs/{df4f14df1daaad1606b682995f649da19a85debf264092447b3b7ddb8b4bc1ce → de70398719140e4951aa111e9625de5ed916ad1ef0877e4ab6f6b4a7e3cc5f8f} +18 -11
  596. package/vendor/impeccable/bundle/blobs/{8b23562ccc3e41609ce6e67fdad6cc57b6c961964c329eff6975a1b4c5471c0d → deaaa533475b6a9f7dd52e01a1f1997aa3af146694334981650f8c846f939559} +3 -1
  597. package/vendor/impeccable/bundle/blobs/{041535231366047a0beeb5daa64ea9c23d5a566580f7dafdb8c0623cb4a7e76b → e07176229b8a330970ca3c9c5e3dd68c2aaeb726285e30f471e91053d7f8e798} +1 -1
  598. package/vendor/impeccable/bundle/blobs/{115e1c3f1b58b5129910ed925dbf65d61d5ac4c2036618847555ce40098aae97 → e1075ea5b34ac9c60f7c5bda97356eeaf1b683b599592d324fd3704f0852ad7a} +18 -11
  599. package/vendor/impeccable/bundle/blobs/e3af212117e0c552b0976687200fe8f95846a01725a482e8e4dbfd75e40dbfa6 +26 -0
  600. package/vendor/impeccable/bundle/blobs/e3c2031978cd670d7150ff3140f12cf8b6882ef638ea9a9985caffa9a80c8713 +63 -0
  601. package/vendor/impeccable/bundle/blobs/e6e18e7c23cfe82961d90b9714cb466c20bd83f222ac63e9339b6b2c304e1787 +26 -0
  602. package/vendor/impeccable/bundle/blobs/e7af7ad18b307a3171fcf49421df2a557f93289d27af2430f10ee74e2a2fc2d3 +101 -0
  603. package/vendor/impeccable/bundle/blobs/{b161198874e4e77599bc31691e78790be14bacc2eb03be168c8a7543ece9fbe1 → e85da3098368807689009184eca2bb09a91bdb6cb1be3e7a61f91f1ae31cd69b} +18 -11
  604. package/vendor/impeccable/bundle/blobs/{6bdbc3f745ceee15e10b050f109ce42bbeb53ab3c3b5239257de1d596654dee7 → e8720f3aa41135211cc58cc299a39eeda86c75651f4279cc1ede8db10dcc0584} +4 -0
  605. package/vendor/impeccable/bundle/blobs/e9861052457cc1ddc42c687bb8c33a877834ced94fed74af2a4f00f6bae50795 +101 -0
  606. package/vendor/impeccable/bundle/blobs/{d1faa55eb956033d28e9f27fd2bc2a9f62c5da0f0abd6534819cc0a04db54d9d → eb3e86876c20f1cfc443dcbe48d8f41fea6e815082a304610be432272429a06d} +5 -0
  607. package/vendor/impeccable/bundle/blobs/{0e1819750e5448311a051d35ab6d0be0830418f78ca872ef10469fafebb27d4f → eba472f6190541c28e2e647ed019f43564ba5b92d629963f34c899175b25b31e} +5 -5
  608. package/vendor/impeccable/bundle/blobs/{f173ff03f989f162cee815feb2d8ca72daf00019c48694d89db16d52171a79c0 → eba609589a5a051643a7bae60b7cceef7cfe44d0f8bd9229e61473ac75910fb3} +1 -1
  609. package/vendor/impeccable/bundle/blobs/{8eb466778023fccea641654d662157b123eeb360f4a0875bf6fbe3d93680851c → ec81b008d2641402e3352b09b1a90562ef7a24598d7c5aded475038cce63aca0} +1 -1
  610. package/vendor/impeccable/bundle/blobs/{4acfb9e38f6e09f7484e36fc19704d69eab159436ee9329168be74c493042f22 → ec86b8633fbeb14ef2272f220fdd98089972b03b99da83e49eeb6a8b73b00617} +3 -1
  611. package/vendor/impeccable/bundle/blobs/{d15a2914d93e07a4956acd5c8b8211af17380f527acd10d8acf4f4920badaaaf → ef2e97cd690baf6fe5c895dd2d8844aff9fcc4a8bc04973402678a739c81d712} +4 -3
  612. package/vendor/impeccable/bundle/blobs/f0fbe529f63961a027bada2e6a3cbe86f4af0dba4b8e1010da22b007f9002f66 +63 -0
  613. package/vendor/impeccable/bundle/blobs/{c02feba25a961a72647ad317aba2d65baeeed53c4cdcc072f25bb37f4d867d43 → f254d59ff973e907cacdc2c34b8b4de075437d292de31dac30e10a9d7035086c} +3 -2
  614. package/vendor/impeccable/bundle/blobs/f5efb1b1dd4cd18e1d4789d7c8e0188f4342b25fffd53af6088ba8b67774fb99 +26 -0
  615. package/vendor/impeccable/bundle/blobs/{7af0a8665057c83b39bca2c8c7427ef2343734f70d4128c377113a6726a1e3b1 → f68a3d68ac92606e91aa8878e003d9432ddd09aa97ca01c6b3ce46c937dca316} +524 -4
  616. package/vendor/impeccable/bundle/blobs/{381ff89aa76e82a0d98456ec31cb117555ae045539fba47c45056daa50f611ca → f84b653ede0804d21e6210c6d21fd5352023914fedceae6ff14e20f1e93b06e7} +5 -5
  617. package/vendor/impeccable/bundle/blobs/{5b30a06646ad5e453d6b5ed1b8d446f69fca3cd13b8aeda28f0d0b2cbe8f62d1 → fb32d99751c5fc24493ff4460be1767bd5236dc820fd337775067c0620d1a7a6} +3 -1
  618. package/vendor/impeccable/bundle/blobs/{733504a70ed20bcfca9c26c353f7b88f8491d24f3f2fe124dc1e73b28eefa296 → fb5fec24adafa48df43eece6907c1c986a4772cbdc64142c881f00c3b312e9ca} +18 -11
  619. package/vendor/impeccable/bundle/blobs/fc149b5bc7a8d0cc9b9bf86e5013793f3857c1c302212e9aaf101cb95427386b +101 -0
  620. package/vendor/impeccable/bundle/manifest.json +413 -298
  621. package/skills/grafton-view-dev/SKILL.md +0 -195
  622. package/skills/grafton-view-dev/references/bindings.md +0 -120
  623. package/skills/grafton-view-dev/references/components.md +0 -168
  624. package/skills/grafton-view-dev/references/recipes.md +0 -208
  625. package/skills/grafton-view-dev/references/schema.md +0 -86
  626. package/skills/grafton-view-dev/references/stores.md +0 -310
  627. package/skills/portal-backend-app/SKILL.md +0 -56
  628. package/skills/portal-backend-app/references/gate-and-tokens.md +0 -93
  629. package/skills/portal-backend-app/references/wiring-and-conventions.md +0 -71
  630. package/skills/xgent-init/references/external-app-CLAUDE.template.md +0 -249
  631. package/vendor/impeccable/bundle/blobs/800cf1c0392b24de7c0a1c6ea6778ecb433dec71c49a150bce96a98477527b2f +0 -1
@@ -0,0 +1,1078 @@
1
+ import path from 'node:path';
2
+ import { fileURLToPath } from 'node:url';
3
+ import { esc, renderDefinitions, renderSemanticSigil, textUnits } from '../shared/utils.mjs';
4
+ import { animateAttr, focusEdgeAttrs, focusNodeAttrs, focusNodeTitle, loadDiagramWithBrandMarks, writeDiagram, svgAccessibleText, svgRootAttrs } from '../shared/cli.mjs';
5
+ import { componentBox, boundaryBox, connectionPath } from '../shared/layout-report.mjs';
6
+ import { throwDiagnosticProblems } from '../shared/diagnostics.mjs';
7
+ import { legendFootprint, relationshipLegendObstacles, resolveLegend, renderLegend as renderResolvedLegend } from '../shared/legend.mjs';
8
+ import { availableNodeTextWidth, fittedNodeFontSize, minimumNodeTextWidth } from '../shared/text-fit.mjs';
9
+ import { brandLabelFitWidth, brandMetadataFor, brandTopRailProblem, renderBrandMark } from '../shared/brand-marks.mjs';
10
+ import { minimumReadableSourceTextPx } from '../shared/desktop-readability.mjs';
11
+ import { translateMessage as i18nText } from '../shared/i18n.mjs';
12
+ import { gridLayout, resolveComponentPos, validateGridPlacement } from './grid.mjs';
13
+ import {
14
+ asArray,
15
+ isFinitePoint,
16
+ rectsOverlap,
17
+ segmentIntersectsRect,
18
+ cleanEndpointSideProblems,
19
+ cleanFlowProblems,
20
+ cleanCrossingProblems,
21
+ cleanAmbiguousCorridorProblems,
22
+ cleanBorderRunProblems,
23
+ cleanRouteRhythmProblems,
24
+ cleanLabelRouteClearanceProblems,
25
+ suggestLabelObstacleFix,
26
+ suggestComponentSeparation,
27
+ anchor,
28
+ automaticPortSpread,
29
+ automaticPortRhythmBridge,
30
+ defaultFromSide,
31
+ defaultToSide,
32
+ chosenSide,
33
+ routeHonorsEndpointSides,
34
+ normalizeRoutePoints,
35
+ polylinePath,
36
+ routePointsValue,
37
+ roundedPath,
38
+ labelPoint,
39
+ componentFill,
40
+ componentText,
41
+ arrowClassMap,
42
+ variantAccent,
43
+ } from '../shared/geometry.mjs';
44
+
45
+ const componentTextFit = {
46
+ sublabelPreferred: 9,
47
+ sublabelMinimum: 6,
48
+ tagPreferred: 7,
49
+ tagMinimum: 6,
50
+ };
51
+
52
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
53
+ const layoutJsonMode = process.argv.includes('--layout-json');
54
+ const cliArgs = process.argv.filter((arg) => arg !== '--layout-json');
55
+ const { diagram: arch, template, outPath, sourceEvidence } = await loadDiagramWithBrandMarks({
56
+ rendererDir: __dirname,
57
+ diagramType: 'architecture',
58
+ defaultExample: 'web-app.architecture.json',
59
+ argv: cliArgs,
60
+ });
61
+
62
+ const grid = gridLayout(arch);
63
+
64
+ const layout = {
65
+ defaultW: 120,
66
+ defaultH: 60,
67
+ margin: 40,
68
+ // Boundary padding — the 30/50 rule that was a hand-arithmetic footgun
69
+ // (CHANGELOG v2.2.1): 30px on top/left/right, plus 20px extra at the bottom.
70
+ boundaryPad: 30,
71
+ boundaryExtraBottom: 20,
72
+ boundaryLabelBaseline: 18,
73
+ boundaryLabelClearance: 4,
74
+ boundaryLabelFontPreferred: 9,
75
+ boundaryLabelFontMinimum: 6,
76
+ boundaryLabelMaskHeight: 16,
77
+ boundaryLabelRailGap: 2,
78
+ boundaryLabelFrameInset: 4,
79
+ legendH: 28,
80
+ };
81
+
82
+ const LEGEND_CATALOG = [
83
+ 'frontend',
84
+ 'backend',
85
+ 'database',
86
+ 'cloud',
87
+ 'security',
88
+ 'messagebus',
89
+ 'external',
90
+ ].map((kind) => ({ kind, label: i18nText(arch.meta.locale, `legend.architecture.${kind}`) }));
91
+
92
+ // ---- Measure components from free coordinates --------------------------------
93
+ function measureComponent(c) {
94
+ const [x, y] = resolveComponentPos(c, grid);
95
+ const [w, h] = Array.isArray(c.size) ? c.size : [layout.defaultW, layout.defaultH];
96
+ return { ...c, x, y, width: w, height: h, cx: x + w / 2, cy: y + h / 2 };
97
+ }
98
+
99
+ const components = new Map(asArray(arch.components).map((c) => [c.id, measureComponent(c)]));
100
+ const enforcesBoundaryTitleComposition = Boolean(arch.meta?.quality_profile);
101
+ const componentSteps = new Map();
102
+ for (const [index, conn] of asArray(arch.connections).entries()) {
103
+ if (!componentSteps.has(conn.from)) componentSteps.set(conn.from, index);
104
+ if (!componentSteps.has(conn.to)) componentSteps.set(conn.to, index + 1);
105
+ }
106
+ for (const [index, c] of asArray(arch.components).entries()) {
107
+ if (!componentSteps.has(c.id)) componentSteps.set(c.id, index);
108
+ }
109
+
110
+ // ---- Boundaries computed from the `wraps` id list ---------------------------
111
+ function boundaryRect(boundary) {
112
+ const members = asArray(boundary.wraps).map((id) => components.get(id)).filter(Boolean);
113
+ if (!members.length) return null;
114
+ const minX = Math.min(...members.map((m) => m.x));
115
+ const minY = Math.min(...members.map((m) => m.y));
116
+ const maxX = Math.max(...members.map((m) => m.x + m.width));
117
+ const maxY = Math.max(...members.map((m) => m.y + m.height));
118
+ const pad = boundary.pad ?? layout.boundaryPad;
119
+ const topPad = Math.max(
120
+ pad,
121
+ layout.boundaryLabelBaseline + layout.boundaryLabelClearance,
122
+ );
123
+ return {
124
+ ...boundary,
125
+ x: minX - pad,
126
+ y: minY - topPad,
127
+ width: maxX - minX + pad * 2,
128
+ height: maxY - minY + topPad + layout.boundaryExtraBottom,
129
+ memberTop: minY,
130
+ };
131
+ }
132
+
133
+ function rectContains(outer, inner) {
134
+ const epsilon = 1e-9;
135
+ return outer.x <= inner.x + epsilon
136
+ && outer.y <= inner.y + epsilon
137
+ && outer.x + outer.width + epsilon >= inner.x + inner.width
138
+ && outer.y + outer.height + epsilon >= inner.y + inner.height;
139
+ }
140
+
141
+ function boundaryLabelWidth(label, fontSize) {
142
+ return Math.max(30, textUnits(label) * fontSize * 0.6 + 10);
143
+ }
144
+
145
+ const architectureLegendEntries = resolveLegend(
146
+ arch.meta?.legend,
147
+ LEGEND_CATALOG,
148
+ new Set([...components.values()].map((component) => component.type)),
149
+ );
150
+
151
+ function autoViewBoxFor(candidateBoundaries) {
152
+ const maxX = Math.max(
153
+ 0,
154
+ ...[...components.values()].map((component) => component.x + component.width),
155
+ ...candidateBoundaries.map((boundary) => boundary.x + boundary.width),
156
+ );
157
+ const maxY = Math.max(
158
+ 0,
159
+ ...[...components.values()].map((component) => component.y + component.height),
160
+ ...candidateBoundaries.map((boundary) => boundary.y + boundary.height),
161
+ );
162
+ let width = Math.ceil(maxX + layout.margin);
163
+ let footprint = legendFootprint(architectureLegendEntries, {
164
+ width: Math.max(1, width - layout.margin * 2),
165
+ });
166
+ if (footprint.minWidth > width - layout.margin * 2) {
167
+ width = Math.ceil(footprint.minWidth + layout.margin * 2);
168
+ footprint = legendFootprint(architectureLegendEntries, {
169
+ width: width - layout.margin * 2,
170
+ });
171
+ }
172
+ return [
173
+ width,
174
+ Math.ceil(maxY + layout.margin + layout.legendH + footprint.extraHeight),
175
+ ];
176
+ }
177
+
178
+ function resolvedViewBoxWidth(candidateBoundaries) {
179
+ if (Array.isArray(arch.meta?.viewBox) && Number.isFinite(arch.meta.viewBox[0])) {
180
+ return arch.meta.viewBox[0];
181
+ }
182
+ return autoViewBoxFor(candidateBoundaries)[0];
183
+ }
184
+
185
+ function expandBoundaryForReadableTitle(boundary, minimumFontSize) {
186
+ if (!enforcesBoundaryTitleComposition) return boundary;
187
+ const requiredWidth = boundaryLabelWidth(boundary.label, minimumFontSize)
188
+ + layout.boundaryLabelFrameInset * 2;
189
+ const extra = Math.max(0, requiredWidth - boundary.width);
190
+ if (!extra) return boundary;
191
+ return {
192
+ ...boundary,
193
+ x: boundary.x - extra / 2,
194
+ width: boundary.width + extra,
195
+ };
196
+ }
197
+
198
+ function measureBoundaryTitle(boundary, minimumFontSize) {
199
+ const availableWidth = Math.max(0, boundary.width - layout.boundaryLabelFrameInset * 2);
200
+ const units = textUnits(boundary.label);
201
+ const fitted = units > 0
202
+ ? (availableWidth - 10) / (units * 0.6)
203
+ : layout.boundaryLabelFontPreferred;
204
+ const preferredFontSize = Math.max(layout.boundaryLabelFontPreferred, minimumFontSize);
205
+ const fontSize = Math.max(
206
+ minimumFontSize,
207
+ Math.min(preferredFontSize, fitted),
208
+ );
209
+ const desiredWidth = boundaryLabelWidth(boundary.label, fontSize);
210
+ const height = Math.max(layout.boundaryLabelMaskHeight, Math.ceil(fontSize + 7));
211
+ return {
212
+ x: boundary.x + layout.boundaryLabelFrameInset,
213
+ y: boundary.memberTop
214
+ - layout.boundaryLabelClearance
215
+ - height,
216
+ width: Math.min(availableWidth, desiredWidth),
217
+ height,
218
+ fontSize,
219
+ minimumFontSize,
220
+ baselineOffset: fontSize + 4,
221
+ availableWidth,
222
+ minimumWidth: boundaryLabelWidth(boundary.label, minimumFontSize),
223
+ };
224
+ }
225
+
226
+ function horizontalOverlap(left, right) {
227
+ return left.x < right.x + right.width && left.x + left.width > right.x;
228
+ }
229
+
230
+ function layoutBoundaryTitles(rawBoundaries, minimumFontSize) {
231
+ const placedTitles = [];
232
+ const measured = new Map();
233
+ const ordered = rawBoundaries
234
+ .map((boundary, index) => ({ boundary, index }))
235
+ .sort((left, right) => {
236
+ const areaDelta = left.boundary.width * left.boundary.height
237
+ - right.boundary.width * right.boundary.height;
238
+ return areaDelta || left.index - right.index;
239
+ });
240
+
241
+ for (const entry of ordered) {
242
+ const { index } = entry;
243
+ const boundary = expandBoundaryForReadableTitle(entry.boundary, minimumFontSize);
244
+ const title = measureBoundaryTitle(boundary, minimumFontSize);
245
+ let guard = 0;
246
+ while (guard < rawBoundaries.length + components.size + 1) {
247
+ guard += 1;
248
+ const blockers = [
249
+ ...placedTitles,
250
+ ...components.values(),
251
+ ].filter((candidate) => horizontalOverlap(title, candidate) && rectsOverlap(title, candidate));
252
+ if (!blockers.length) break;
253
+ title.y = Math.min(
254
+ ...blockers.map((blocker) => blocker.y - layout.boundaryLabelRailGap - title.height),
255
+ );
256
+ }
257
+ placedTitles.push(title);
258
+ measured.set(index, { boundary, title });
259
+ }
260
+
261
+ return rawBoundaries.map((_boundary, index) => {
262
+ const { boundary, title } = measured.get(index);
263
+ const bottom = boundary.y + boundary.height;
264
+ // Profile-less schema-v1 inputs keep their legacy boundary geometry. A
265
+ // quality profile opts into the stricter title-composition contract and
266
+ // may expand the frame to contain an adapted title rail.
267
+ const y = enforcesBoundaryTitleComposition
268
+ ? Math.min(boundary.y, title.y - layout.boundaryLabelFrameInset)
269
+ : boundary.y;
270
+ return {
271
+ ...boundary,
272
+ y,
273
+ height: bottom - y,
274
+ title,
275
+ };
276
+ });
277
+ }
278
+
279
+ const rawBoundaries = asArray(arch.boundaries).map(boundaryRect).filter(Boolean);
280
+ function resolveBoundaryTitles() {
281
+ if (!enforcesBoundaryTitleComposition || rawBoundaries.length === 0) {
282
+ return {
283
+ boundaries: layoutBoundaryTitles(rawBoundaries, layout.boundaryLabelFontMinimum),
284
+ readabilityProblem: null,
285
+ };
286
+ }
287
+
288
+ const maximumIterations = 32;
289
+ let candidateBoundaries = rawBoundaries;
290
+ for (let iteration = 0; iteration < maximumIterations; iteration += 1) {
291
+ const budgetViewBoxWidth = resolvedViewBoxWidth(candidateBoundaries);
292
+ const minimumFontSize = Math.max(
293
+ layout.boundaryLabelFontMinimum,
294
+ minimumReadableSourceTextPx(budgetViewBoxWidth) + 1e-6,
295
+ );
296
+ const nextBoundaries = layoutBoundaryTitles(rawBoundaries, minimumFontSize);
297
+ const finalViewBoxWidth = resolvedViewBoxWidth(nextBoundaries);
298
+ const finalMinimumFontSize = Math.max(
299
+ layout.boundaryLabelFontMinimum,
300
+ minimumReadableSourceTextPx(finalViewBoxWidth),
301
+ );
302
+ if (minimumFontSize >= finalMinimumFontSize) {
303
+ return { boundaries: nextBoundaries, readabilityProblem: null };
304
+ }
305
+ candidateBoundaries = nextBoundaries;
306
+ }
307
+
308
+ const finalViewBoxWidth = resolvedViewBoxWidth(candidateBoundaries);
309
+ return {
310
+ boundaries: candidateBoundaries,
311
+ readabilityProblem: `[composition/desktop-readability] Boundary title layout did not converge after ${maximumIterations} iterations for the final ${finalViewBoxWidth}px viewBox — shorten boundary labels, provide a wider authored viewBox, or move wrapped components closer to the left edge.`,
312
+ };
313
+ }
314
+
315
+ const resolvedBoundaryTitles = resolveBoundaryTitles();
316
+ const boundaries = resolvedBoundaryTitles.boundaries;
317
+ const compositionFrames = boundaries.map((boundary, index) => ({
318
+ ...boundary,
319
+ id: boundary.id || index,
320
+ kind: boundary.kind || 'boundary',
321
+ radius: boundary.kind === 'security-group' ? 8 : 12,
322
+ }));
323
+
324
+ function componentContext(component) {
325
+ const scopes = boundaries
326
+ .filter((boundary) => asArray(boundary.wraps).includes(component.id))
327
+ .sort((a, b) => (b.width * b.height) - (a.width * a.height))
328
+ .map((boundary) => boundary.label);
329
+ return scopes.length ? scopes.join(' › ') : i18nText(arch.meta.locale, 'node.context.architecture');
330
+ }
331
+
332
+ // ---- Auto viewBox: fit all geometry + the measured resolved legend ----------
333
+ const viewBox = arch.meta?.viewBox || autoViewBoxFor(boundaries);
334
+ const legendY = () => viewBox[1] - 16;
335
+
336
+ // ---- Validation: mechanical correctness, never layout taste -----------------
337
+ function validateArchitecture() {
338
+ const problems = [];
339
+ if (resolvedBoundaryTitles.readabilityProblem) {
340
+ problems.push(resolvedBoundaryTitles.readabilityProblem);
341
+ }
342
+ const requiresNestedBoundaryMembership = arch.meta?.engineering_profile === 'deployment-ownership';
343
+ if (components.size !== asArray(arch.components).length) problems.push('Component ids must be unique.');
344
+ if (grid) {
345
+ validateGridPlacement(arch, grid, problems);
346
+ } else {
347
+ for (const c of asArray(arch.components)) {
348
+ if (!Array.isArray(c.pos) || c.pos.length !== 2) {
349
+ problems.push(`Component "${c.id}" must include pos [x, y] when layout.mode is omitted (free placement).`);
350
+ }
351
+ }
352
+ }
353
+
354
+ for (const c of components.values()) {
355
+ if (!isFinitePoint(c.x, c.y, c.width, c.height)) {
356
+ problems.push(`Component "${c.id}" has non-finite pos/size — pos and size must be [number, number].`);
357
+ continue;
358
+ }
359
+ if (c.width <= 0 || c.height <= 0) {
360
+ problems.push(`Component "${c.id}" has invalid size ${c.width}x${c.height} — width and height must be greater than 0.`);
361
+ continue;
362
+ }
363
+ if (c.x < 0 || c.y < 0 || c.x + c.width > viewBox[0] || c.y + c.height > viewBox[1]) {
364
+ problems.push(`Component "${c.id}" falls outside the viewBox ${viewBox[0]}x${viewBox[1]} — adjust pos/size or set a larger meta.viewBox.`);
365
+ }
366
+ const estLabelW = textUnits(c.label) * 6.6;
367
+ if (estLabelW > c.width + 8) {
368
+ problems.push(`Label "${c.label}" (~${Math.round(estLabelW)}px) is wider than component "${c.id}" (${c.width}px) — shorten the label or widen size.`);
369
+ }
370
+ const brandRailProblem = brandTopRailProblem(c, c.width, 8, 'Component');
371
+ if (brandRailProblem) problems.push(brandRailProblem);
372
+ // sublabel and tag render as single unwrapped <text> elements; shrink-to-fit
373
+ // handles the ordinary case, this rejects what it cannot rescue.
374
+ const availableTextW = availableNodeTextWidth(c.width);
375
+ for (const [field, value, minimum] of [
376
+ ['Sublabel', c.sublabel, componentTextFit.sublabelMinimum],
377
+ ['Tag', c.tag, componentTextFit.tagMinimum],
378
+ ]) {
379
+ if (!value) continue;
380
+ const minimumW = minimumNodeTextWidth(value, minimum);
381
+ if (minimumW > availableTextW) {
382
+ problems.push(`${field} "${value}" needs ~${Math.ceil(minimumW)}px at the ${minimum}px legible minimum, but component "${c.id}" provides ${availableTextW}px — shorten the ${field.toLowerCase()} or widen size.`);
383
+ }
384
+ }
385
+ }
386
+
387
+ // Component overlap — the highest-traffic hand-placement failure mode.
388
+ const list = [...components.values()];
389
+ for (let i = 0; i < list.length; i += 1) {
390
+ for (let j = i + 1; j < list.length; j += 1) {
391
+ if (rectsOverlap(list[i], list[j], 8)) {
392
+ problems.push(`Components "${list[i].id}" and "${list[j].id}" are less than 8px apart — move one or shrink its size.\n${suggestComponentSeparation(list[i], list[j], 8)}`);
393
+ }
394
+ }
395
+ }
396
+
397
+ // Boundaries: every wrapped id must exist; the computed box must stay in view.
398
+ for (const boundary of asArray(arch.boundaries)) {
399
+ for (const id of asArray(boundary.wraps)) {
400
+ if (!components.has(id)) problems.push(`Boundary "${boundary.label}" wraps unknown component "${id}".`);
401
+ }
402
+ }
403
+ const viewBoxRect = { x: 0, y: 0, width: viewBox[0], height: viewBox[1] };
404
+ for (const boundary of boundaries) {
405
+ if (!enforcesBoundaryTitleComposition) continue;
406
+ if (boundary.title.minimumWidth > boundary.title.availableWidth) {
407
+ problems.push(
408
+ `Boundary label "${boundary.label}" needs ~${Math.ceil(boundary.title.minimumWidth)}px to fit at the `
409
+ + `${Number(boundary.title.minimumFontSize.toFixed(2))}px desktop-readable source minimum, but its frame provides ${Math.floor(boundary.title.availableWidth)}px — `
410
+ + 'shorten the boundary label, increase pad, or widen the wrapped component layout.',
411
+ );
412
+ }
413
+ if (!rectContains(boundary, boundary.title)) {
414
+ problems.push(
415
+ `Boundary label "${boundary.label}" extends outside its final frame — shorten the label or increase boundary pad.`,
416
+ );
417
+ }
418
+ if (!rectContains(viewBoxRect, boundary.title)) {
419
+ problems.push(
420
+ `Boundary label "${boundary.label}" extends outside the viewBox — move wrapped components away from the canvas edge, shorten the label, or increase the viewBox.`,
421
+ );
422
+ }
423
+ for (const component of components.values()) {
424
+ if (!rectsOverlap(boundary.title, component)) continue;
425
+ problems.push(
426
+ `Boundary label "${boundary.label}" overlaps component "${component.id}" — move the component, increase boundary title space, or shorten the label.`,
427
+ );
428
+ }
429
+ }
430
+ for (let leftIndex = 0; leftIndex < boundaries.length; leftIndex += 1) {
431
+ const left = boundaries[leftIndex];
432
+ const leftMembers = new Set(asArray(left.wraps));
433
+ for (let rightIndex = leftIndex + 1; rightIndex < boundaries.length; rightIndex += 1) {
434
+ const right = boundaries[rightIndex];
435
+ if (enforcesBoundaryTitleComposition && rectsOverlap(left.title, right.title)) {
436
+ problems.push(
437
+ `Boundary labels "${left.label}" and "${right.label}" overlap — shorten a label or increase boundary title space.`,
438
+ );
439
+ }
440
+ // Ordinary architecture boundaries are sets, not an implied ownership
441
+ // tree: orthogonal scopes such as runtime and compliance may share some
442
+ // components while each contains others. The opt-in deployment profile
443
+ // does promise hierarchical region/private-scope membership, so only it
444
+ // receives the stricter membership-to-frame containment contract.
445
+ if (!requiresNestedBoundaryMembership) continue;
446
+ const rightMembers = new Set(asArray(right.wraps));
447
+ const shared = [...leftMembers].filter((id) => rightMembers.has(id));
448
+ const leftNested = [...leftMembers].every((id) => rightMembers.has(id));
449
+ const rightNested = [...rightMembers].every((id) => leftMembers.has(id));
450
+ if (shared.length && !leftNested && !rightNested) {
451
+ const leftOnly = [...leftMembers].filter((id) => !rightMembers.has(id));
452
+ const rightOnly = [...rightMembers].filter((id) => !leftMembers.has(id));
453
+ problems.push(
454
+ `Boundary "${left.label}" crosses boundary "${right.label}" because their memberships partially overlap `
455
+ + `(shared: ${shared.map((id) => `"${id}"`).join(', ')}; `
456
+ + `only in "${left.label}": ${leftOnly.map((id) => `"${id}"`).join(', ')}; `
457
+ + `only in "${right.label}": ${rightOnly.map((id) => `"${id}"`).join(', ')}) — `
458
+ + 'keep one boundary fully nested by removing outside members, or split the boundary.',
459
+ );
460
+ continue;
461
+ }
462
+
463
+ if (!rectsOverlap(left, right)) continue;
464
+ const leftContainsRight = rectContains(left, right);
465
+ const rightContainsLeft = rectContains(right, left);
466
+ if (!leftContainsRight && !rightContainsLeft) {
467
+ problems.push(
468
+ `Boundary "${left.label}" and boundary "${right.label}" final frames partially overlap — `
469
+ + 'adjust wraps, pad, or component positions so the frames are disjoint or one fully contains the other.',
470
+ );
471
+ continue;
472
+ }
473
+
474
+ if (!shared.length) {
475
+ problems.push(
476
+ `Boundary "${left.label}" and boundary "${right.label}" final frames overlap even though their memberships are disjoint — `
477
+ + 'adjust pad or component positions so the frames are disjoint, or make wraps express the intended nesting.',
478
+ );
479
+ continue;
480
+ }
481
+
482
+ const containmentMatchesMembership = (leftNested && rightContainsLeft)
483
+ || (rightNested && leftContainsRight);
484
+ if (!containmentMatchesMembership) {
485
+ problems.push(
486
+ `Boundary "${left.label}" and boundary "${right.label}" final frame containment contradicts their wraps membership — `
487
+ + 'reduce the inner boundary pad, move its components, or correct wraps so geometry and nesting agree.',
488
+ );
489
+ }
490
+ }
491
+ }
492
+ for (const b of boundaries) {
493
+ if (b.x < 0 || b.y < 0 || b.x + b.width > viewBox[0] || b.y + b.height > viewBox[1]) {
494
+ problems.push(`Boundary "${b.label}" extends outside the viewBox — its members sit too close to the canvas edge; add margin or enlarge meta.viewBox.`);
495
+ }
496
+ }
497
+
498
+ for (const conn of asArray(arch.connections)) {
499
+ if (!components.has(conn.from)) problems.push(`Connection "${conn.label || conn.from}" references unknown source "${conn.from}".`);
500
+ if (!components.has(conn.to)) problems.push(`Connection "${conn.label || conn.to}" references unknown target "${conn.to}".`);
501
+ if (components.has(conn.from) && components.has(conn.to)) {
502
+ const routed = pathFor(conn);
503
+ const [start, end] = [routed.points[0], routed.points[routed.points.length - 1]];
504
+ const distance = Math.hypot(end[0] - start[0], end[1] - start[1]);
505
+ if (distance < 24) problems.push(`Connection "${conn.label || `${conn.from}->${conn.to}`}" is too short (${Math.round(distance)}px; minimum 24px) — place its components farther apart.`);
506
+ }
507
+ }
508
+
509
+ problems.push(...cleanEndpointSideProblems({
510
+ relations: arch.connections,
511
+ endpointIds: new Set(components.keys()),
512
+ pathFor,
513
+ diagramType: 'architecture',
514
+ relationCollection: 'connections',
515
+ fromSideFor: (conn) => connectionEndpointSide(conn, 'source'),
516
+ toSideFor: (conn) => connectionEndpointSide(conn, 'target'),
517
+ routeHint: 'keep automatic routing so the renderer can use a side-aware bridge, or set truthful fromSide/toSide with perpendicular via segments',
518
+ }));
519
+ problems.push(...cleanFlowProblems({
520
+ relations: arch.connections,
521
+ obstacles: components.values(),
522
+ pathFor,
523
+ diagramType: 'architecture',
524
+ relationCollection: 'connections',
525
+ obstacleKind: 'component',
526
+ routeHint: 'adjust fromSide/toSide, set route/via, or move the component'
527
+ }));
528
+ problems.push(...cleanCrossingProblems({
529
+ relations: arch.connections,
530
+ endpointIds: new Set(components.keys()),
531
+ pathFor,
532
+ diagramType: 'architecture',
533
+ relationCollection: 'connections',
534
+ profile: arch.meta?.quality_profile,
535
+ routeHint: 'adjust route/via or fromSide/toSide so the connections use separate corridors'
536
+ }));
537
+ problems.push(...cleanAmbiguousCorridorProblems({
538
+ relations: arch.connections,
539
+ endpointIds: new Set(components.keys()),
540
+ pathFor,
541
+ diagramType: 'architecture',
542
+ relationCollection: 'connections',
543
+ profile: arch.meta?.quality_profile,
544
+ routeHint: 'adjust route/via or fromSide/toSide so unrelated connections do not visually merge'
545
+ }));
546
+ problems.push(...cleanBorderRunProblems({
547
+ relations: arch.connections,
548
+ endpointIds: new Set(components.keys()),
549
+ frames: compositionFrames,
550
+ pathFor,
551
+ diagramType: 'architecture',
552
+ relationCollection: 'connections',
553
+ profile: arch.meta?.quality_profile,
554
+ routeHint: 'adjust route/via or fromSide/toSide so the connection crosses the boundary perpendicularly instead of following its border'
555
+ }));
556
+ problems.push(...cleanRouteRhythmProblems({
557
+ relations: arch.connections,
558
+ endpointIds: new Set(components.keys()),
559
+ pathFor,
560
+ diagramType: 'architecture',
561
+ relationCollection: 'connections',
562
+ profile: arch.meta?.quality_profile,
563
+ routeHint: 'move route/via points into a wider corridor or move the component so every turn has room to read'
564
+ }));
565
+
566
+ // Connection labels must not land on top of components.
567
+ const labelRects = [];
568
+ for (const [connectionIndex, conn] of asArray(arch.connections).entries()) {
569
+ if (!conn.label || !components.has(conn.from) || !components.has(conn.to)) continue;
570
+ const [lx, ly] = labelPoint(conn, pathFor(conn).points);
571
+ const w = Math.max(30, textUnits(conn.label) * 4.8 + 10);
572
+ labelRects.push({ relation: conn, relationIndex: connectionIndex, label: conn.label, x: lx - w / 2, y: ly - 10, width: w, height: 14, lx, ly });
573
+ }
574
+ for (const rect of labelRects) {
575
+ for (const c of components.values()) {
576
+ if (rectsOverlap(rect, c, -2)) {
577
+ problems.push(`Label "${rect.label}" overlaps component "${c.id}" — adjust labelDx/labelDy/labelSegment or set labelAt.\n${suggestLabelObstacleFix(rect, rect.lx, rect.ly, c)}`);
578
+ }
579
+ }
580
+ if (enforcesBoundaryTitleComposition) {
581
+ for (const boundary of boundaries) {
582
+ if (!rectsOverlap(boundary.title, rect)) continue;
583
+ problems.push(
584
+ `Boundary label "${boundary.label}" overlaps connection label "${rect.label}" — move the boundary title rail by adjusting wrapped component positions, or move the connection label with labelAt/labelDx/labelDy/labelSegment.`,
585
+ );
586
+ }
587
+ }
588
+ }
589
+ problems.push(...cleanLabelRouteClearanceProblems({
590
+ relations: arch.connections,
591
+ labels: labelRects,
592
+ endpointIds: new Set(components.keys()),
593
+ pathFor,
594
+ diagramType: 'architecture',
595
+ relationCollection: 'connections',
596
+ profile: arch.meta?.quality_profile,
597
+ }));
598
+
599
+ if (problems.length) {
600
+ throwDiagnosticProblems('Architecture layout validation failed', problems, {
601
+ subject: { diagramType: 'architecture' },
602
+ });
603
+ }
604
+ }
605
+
606
+ function buildLayoutReport() {
607
+ const labels = [];
608
+ for (const conn of asArray(arch.connections)) {
609
+ if (!conn.label || !components.has(conn.from) || !components.has(conn.to)) continue;
610
+ const [lx, ly] = labelPoint(conn, pathFor(conn).points);
611
+ const w = Math.max(30, textUnits(conn.label) * 4.8 + 10);
612
+ labels.push({
613
+ text: conn.label,
614
+ x: Math.round(lx - w / 2),
615
+ y: Math.round(ly - 10),
616
+ width: Math.round(w),
617
+ height: 14,
618
+ labelAt: [Math.round(lx), Math.round(ly)],
619
+ });
620
+ }
621
+ return {
622
+ ok: true,
623
+ diagram_type: 'architecture',
624
+ layout: grid ? { mode: 'grid', ...grid } : { mode: 'free' },
625
+ viewBox,
626
+ components: [...components.values()].map(componentBox),
627
+ boundaries: boundaries.map(boundaryBox),
628
+ connections: asArray(arch.connections)
629
+ .filter((conn) => components.has(conn.from) && components.has(conn.to))
630
+ .map((conn) => {
631
+ const routed = pathFor(conn);
632
+ const labelAt = conn.label ? labelPoint(conn, routed.points) : null;
633
+ return connectionPath(conn, routed, labelAt);
634
+ }),
635
+ labels,
636
+ };
637
+ }
638
+
639
+ // ---- Connection routing ------------------------------------------------------
640
+ function routeClearsComponents(conn, points, clearance = 2) {
641
+ const endpointIds = new Set([conn.from, conn.to]);
642
+ for (const component of components.values()) {
643
+ if (endpointIds.has(component.id)) continue;
644
+ for (let index = 0; index < points.length - 1; index += 1) {
645
+ if (segmentIntersectsRect({ start: points[index], end: points[index + 1] }, component, clearance)) {
646
+ return false;
647
+ }
648
+ }
649
+ }
650
+ return true;
651
+ }
652
+
653
+ function routeClearsEndpointComponents(points, from, to) {
654
+ const lastSegment = points.length - 2;
655
+ for (let index = 0; index <= lastSegment; index += 1) {
656
+ const segment = { start: points[index], end: points[index + 1] };
657
+ if (index > 0 && segmentIntersectsRect(segment, from)) return false;
658
+ if (index < lastSegment && segmentIntersectsRect(segment, to)) return false;
659
+ }
660
+ return true;
661
+ }
662
+
663
+ const OUTWARD_SIDE_VECTOR = {
664
+ left: [-1, 0],
665
+ right: [1, 0],
666
+ top: [0, -1],
667
+ bottom: [0, 1],
668
+ };
669
+
670
+ function outwardStub(point, side, distance = 24) {
671
+ const [dx, dy] = OUTWARD_SIDE_VECTOR[side] || [0, 0];
672
+ return [point[0] + dx * distance, point[1] + dy * distance];
673
+ }
674
+
675
+ function collinearBacktrack(a, b, c) {
676
+ const first = [b[0] - a[0], b[1] - a[1]];
677
+ const second = [c[0] - b[0], c[1] - b[1]];
678
+ const cross = first[0] * second[1] - first[1] * second[0];
679
+ const dot = first[0] * second[0] + first[1] * second[1];
680
+ return Math.abs(cross) <= 0.0001 && dot < -0.0001;
681
+ }
682
+
683
+ function sideAwareBridgeCandidates(start, end, fromSide, toSide) {
684
+ const startStub = outwardStub(start, fromSide);
685
+ const endStub = outwardStub(end, toSide);
686
+ const rawCandidates = [];
687
+ const minimumBridge = 16;
688
+ const verticalSides = new Set(['top', 'bottom']);
689
+ const horizontalSides = new Set(['left', 'right']);
690
+
691
+ // Port spreading can leave parallel-side anchors only a few pixels apart.
692
+ // Route through a bounded outside channel so we keep both endpoint normals
693
+ // without introducing a tiny, noisy connector between the two stubs.
694
+ if (verticalSides.has(fromSide) && verticalSides.has(toSide)
695
+ && Math.abs(start[0] - end[0]) < minimumBridge) {
696
+ for (const channelX of [
697
+ Math.max(start[0], end[0]) + minimumBridge,
698
+ Math.min(start[0], end[0]) - minimumBridge,
699
+ ]) {
700
+ rawCandidates.push([
701
+ startStub,
702
+ [channelX, startStub[1]],
703
+ [channelX, endStub[1]],
704
+ endStub,
705
+ ]);
706
+ }
707
+ }
708
+ if (horizontalSides.has(fromSide) && horizontalSides.has(toSide)
709
+ && Math.abs(start[1] - end[1]) < minimumBridge) {
710
+ for (const channelY of [
711
+ Math.max(start[1], end[1]) + minimumBridge,
712
+ Math.min(start[1], end[1]) - minimumBridge,
713
+ ]) {
714
+ rawCandidates.push([
715
+ startStub,
716
+ [startStub[0], channelY],
717
+ [endStub[0], channelY],
718
+ endStub,
719
+ ]);
720
+ }
721
+ }
722
+
723
+ rawCandidates.push(
724
+ [startStub, [endStub[0], startStub[1]], endStub],
725
+ [startStub, [startStub[0], endStub[1]], endStub],
726
+ );
727
+ return rawCandidates.map((candidate) => normalizeRoutePoints([start, ...candidate, end]))
728
+ .filter((points) => points.length >= 2)
729
+ .filter((points) => !collinearBacktrack(points[0], points[1], points[2] || points[1]))
730
+ .filter((points) => !collinearBacktrack(points.at(-3) || points.at(-2), points.at(-2), points.at(-1)))
731
+ .filter((points) => routeHonorsEndpointSides(points, fromSide, toSide))
732
+ .map((points) => points.slice(1, -1));
733
+ }
734
+
735
+ const AUTOMATIC_PORT_CORNER_GUTTER = 16;
736
+ const AUTOMATIC_PORT_ALIGNMENT_DELTA = 16;
737
+
738
+ function portHasCornerClearance(rect, side, point) {
739
+ if (side === 'left' || side === 'right') {
740
+ const inset = Math.min(AUTOMATIC_PORT_CORNER_GUTTER, rect.height / 2);
741
+ return point[1] >= rect.y + inset && point[1] <= rect.y + rect.height - inset;
742
+ }
743
+ if (side === 'top' || side === 'bottom') {
744
+ const inset = Math.min(AUTOMATIC_PORT_CORNER_GUTTER, rect.width / 2);
745
+ return point[0] >= rect.x + inset && point[0] <= rect.x + rect.width - inset;
746
+ }
747
+ return false;
748
+ }
749
+
750
+ function alignFacingPorts(conn, from, to, start, end, fromSide, toSide, ports) {
751
+ const hasExplicitGeometry = (
752
+ conn.via
753
+ || (conn.route && conn.route !== 'auto')
754
+ || conn.channelX !== undefined
755
+ || conn.channelY !== undefined
756
+ || conn.labelAt
757
+ );
758
+ const horizontallyFacing = (
759
+ (fromSide === 'right' && toSide === 'left')
760
+ || (fromSide === 'left' && toSide === 'right')
761
+ );
762
+ const verticallyFacing = (
763
+ (fromSide === 'bottom' && toSide === 'top')
764
+ || (fromSide === 'top' && toSide === 'bottom')
765
+ );
766
+ if (hasExplicitGeometry || (!horizontallyFacing && !verticallyFacing)) return { start, end };
767
+
768
+ const fromSpread = Boolean(ports?.from);
769
+ const toSpread = Boolean(ports?.to);
770
+ if (fromSpread && toSpread) return { start, end };
771
+ const hasExplicitSides = (
772
+ (conn.fromSide && conn.fromSide !== 'auto')
773
+ || (conn.toSide && conn.toSide !== 'auto')
774
+ );
775
+ if (!fromSpread && !toSpread && hasExplicitSides) return { start, end };
776
+
777
+ const alignmentDelta = horizontallyFacing
778
+ ? Math.abs(start[1] - end[1])
779
+ : Math.abs(start[0] - end[0]);
780
+ if (alignmentDelta >= AUTOMATIC_PORT_ALIGNMENT_DELTA) return { start, end };
781
+
782
+ // Keep the shared endpoint's distinct spread slot and move only the
783
+ // relationship's unshared endpoint onto that axis. With no spread endpoint,
784
+ // retain the existing least-movement choice between the two facing sides.
785
+ // If both endpoints are shared, preserve the outside bridge so no competing
786
+ // port is silently collapsed.
787
+ const alignEndToStart = horizontallyFacing
788
+ ? { start, end: [end[0], start[1]] }
789
+ : { start, end: [start[0], end[1]] };
790
+ const alignStartToEnd = horizontallyFacing
791
+ ? { start: [start[0], end[1]], end }
792
+ : { start: [end[0], start[1]], end };
793
+ const candidates = fromSpread
794
+ ? [alignEndToStart]
795
+ : toSpread
796
+ ? [alignStartToEnd]
797
+ : [alignEndToStart, alignStartToEnd];
798
+ for (const candidate of candidates) {
799
+ const points = [candidate.start, candidate.end];
800
+ if (portHasCornerClearance(from, fromSide, candidate.start)
801
+ && portHasCornerClearance(to, toSide, candidate.end)
802
+ && routeHonorsEndpointSides(points, fromSide, toSide)
803
+ && routeClearsEndpointComponents(points, from, to)
804
+ && routeClearsComponents(conn, points)) {
805
+ return candidate;
806
+ }
807
+ }
808
+ return { start, end };
809
+ }
810
+
811
+ function routeVia(conn, from, to, start, end, fromSide, toSide) {
812
+ if (conn.via) return conn.via;
813
+ switch (conn.route || 'auto') {
814
+ case 'straight':
815
+ return [];
816
+ case 'orthogonal-h': {
817
+ const midX = (start[0] + end[0]) / 2;
818
+ return [[midX, start[1]], [midX, end[1]]];
819
+ }
820
+ case 'orthogonal-v': {
821
+ const midY = (start[1] + end[1]) / 2;
822
+ return [[start[0], midY], [end[0], midY]];
823
+ }
824
+ case 'auto':
825
+ default: {
826
+ // Direct line unless the anchors are clearly orthogonal-friendly.
827
+ const deltaX = Math.abs(start[0] - end[0]);
828
+ const deltaY = Math.abs(start[1] - end[1]);
829
+ if ((deltaX < 4 || deltaY < 4) && routeHonorsEndpointSides([start, end], fromSide, toSide)) return [];
830
+
831
+ const rhythmBridge = automaticPortRhythmBridge(start, end, fromSide, toSide, {
832
+ accept: (points) => (
833
+ routeClearsEndpointComponents(points, from, to)
834
+ && routeClearsComponents(conn, points)
835
+ ),
836
+ });
837
+ if (rhythmBridge) return rhythmBridge.slice(1, -1);
838
+
839
+ // Automatic port spreading can leave otherwise aligned endpoints only a
840
+ // few pixels apart. A midpoint route would split that tiny difference
841
+ // into two unreadable endpoint stubs, so take a bounded outside channel
842
+ // when both anchors sit on parallel component sides.
843
+ const minimumStub = 8;
844
+ const fromVerticalSide = start[1] === from.y || start[1] === from.y + from.height;
845
+ const toVerticalSide = end[1] === to.y || end[1] === to.y + to.height;
846
+ if (fromVerticalSide && toVerticalSide && deltaX < minimumStub * 2) {
847
+ const outsideChannels = [
848
+ Math.max(start[0], end[0]) + minimumStub * 2,
849
+ Math.min(start[0], end[0]) - minimumStub * 2,
850
+ ];
851
+ for (const channelX of outsideChannels) {
852
+ const candidate = [[channelX, start[1]], [channelX, end[1]]];
853
+ const points = [start, ...candidate, end];
854
+ if (routeHonorsEndpointSides(points, fromSide, toSide) && routeClearsComponents(conn, points)) return candidate;
855
+ }
856
+ }
857
+
858
+ const fromHorizontalSide = start[0] === from.x || start[0] === from.x + from.width;
859
+ const toHorizontalSide = end[0] === to.x || end[0] === to.x + to.width;
860
+ if (fromHorizontalSide && toHorizontalSide && deltaY < minimumStub * 2) {
861
+ const outsideChannels = [
862
+ Math.max(start[1], end[1]) + minimumStub * 2,
863
+ Math.min(start[1], end[1]) - minimumStub * 2,
864
+ ];
865
+ for (const channelY of outsideChannels) {
866
+ const candidate = [[start[0], channelY], [end[0], channelY]];
867
+ const points = [start, ...candidate, end];
868
+ if (routeHonorsEndpointSides(points, fromSide, toSide) && routeClearsComponents(conn, points)) return candidate;
869
+ }
870
+ }
871
+
872
+ const midX = (start[0] + end[0]) / 2;
873
+ const horizontalFirst = [[midX, start[1]], [midX, end[1]]];
874
+ const midY = (start[1] + end[1]) / 2;
875
+ const verticalFirst = [[start[0], midY], [end[0], midY]];
876
+ const candidates = [horizontalFirst, verticalFirst];
877
+ const sideSafe = candidates.filter((candidate) => (
878
+ routeHonorsEndpointSides([start, ...candidate, end], fromSide, toSide)
879
+ ));
880
+ const sideAware = sideAwareBridgeCandidates(start, end, fromSide, toSide);
881
+ const nearParallelPorts = (
882
+ ((fromSide === 'top' || fromSide === 'bottom')
883
+ && (toSide === 'top' || toSide === 'bottom')
884
+ && deltaX < minimumStub * 2)
885
+ || ((fromSide === 'left' || fromSide === 'right')
886
+ && (toSide === 'left' || toSide === 'right')
887
+ && deltaY < minimumStub * 2)
888
+ );
889
+ const ordered = [
890
+ ...(nearParallelPorts ? sideAware : sideSafe),
891
+ ...(nearParallelPorts ? sideSafe : sideAware),
892
+ ...candidates.filter((candidate) => !sideSafe.includes(candidate)),
893
+ ];
894
+ for (const candidate of ordered) {
895
+ const points = [start, ...candidate, end];
896
+ if (routeClearsEndpointComponents(points, from, to) && routeClearsComponents(conn, points)) return candidate;
897
+ }
898
+
899
+ // Both bounded doglegs are blocked. Keep the best endpoint-safe route
900
+ // when one exists so the universal Clean Flow gate reports the actual
901
+ // obstacle; otherwise preserve the historical deterministic fallback
902
+ // and let the endpoint-direction gate explain the side mismatch.
903
+ return sideSafe[0] || sideAware[0] || horizontalFirst;
904
+ }
905
+ }
906
+ }
907
+
908
+ const pathCache = new Map();
909
+ const automaticPorts = automaticPortSpread(arch.connections, components);
910
+ function connectionSides(conn) {
911
+ const from = components.get(conn.from);
912
+ const to = components.get(conn.to);
913
+ return {
914
+ fromSide: chosenSide(conn.fromSide, defaultFromSide(from, to)),
915
+ toSide: chosenSide(conn.toSide, defaultToSide(from, to)),
916
+ };
917
+ }
918
+
919
+ function connectionEndpointSide(conn, endpoint) {
920
+ const field = endpoint === 'source' ? 'fromSide' : 'toSide';
921
+ if (conn[field] && conn[field] !== 'auto') return conn[field];
922
+ return connectionSides(conn)[field];
923
+ }
924
+
925
+ function pathFor(conn) {
926
+ if (pathCache.has(conn)) return pathCache.get(conn);
927
+ const from = components.get(conn.from);
928
+ const to = components.get(conn.to);
929
+ const ports = automaticPorts.get(conn);
930
+ const { fromSide, toSide } = connectionSides(conn);
931
+ const baseStart = ports?.from || anchor(from, fromSide);
932
+ const baseEnd = ports?.to || anchor(to, toSide);
933
+ const { start, end } = alignFacingPorts(
934
+ conn,
935
+ from,
936
+ to,
937
+ baseStart,
938
+ baseEnd,
939
+ fromSide,
940
+ toSide,
941
+ ports,
942
+ );
943
+ const points = [start, ...routeVia(conn, from, to, start, end, fromSide, toSide), end];
944
+ const routed = { d: roundedPath(points, 8), points };
945
+ pathCache.set(conn, routed);
946
+ return routed;
947
+ }
948
+
949
+ // ---- Rendering ---------------------------------------------------------------
950
+ function renderBoundaryFrame(b, index) {
951
+ const cls = b.kind === 'security-group' ? 'c-security-group' : 'c-region';
952
+ const rx = b.kind === 'security-group' ? 8 : 12;
953
+ return ` <rect data-graph-role="structural-frame" data-composition-frame-kind="${esc(b.kind || 'boundary')}" data-composition-frame-id="${index}" data-composition-frame-label="${esc(b.label)}" x="${b.x}" y="${b.y}" width="${b.width}" height="${b.height}" rx="${rx}" class="${cls}" stroke-width="1"/>`;
954
+ }
955
+
956
+ function renderBoundaryLabel(b, index) {
957
+ const labelCls = b.kind === 'security-group' ? 't-security' : 't-cloud';
958
+ return ` <g data-graph-role="structural-frame-label" data-composition-frame-id="${index}" data-composition-frame-kind="${esc(b.kind || 'boundary')}" data-composition-frame-label="${esc(b.label)}">
959
+ <rect data-graph-role="structural-frame-label-mask" x="${b.title.x}" y="${b.title.y}" width="${b.title.width}" height="${b.title.height}" rx="3" class="c-mask"/>
960
+ <text data-boundary-label="" x="${b.title.x + 4}" y="${b.title.y + b.title.baselineOffset}" class="${labelCls}" font-size="${b.title.fontSize}" font-weight="600">${esc(b.label)}</text>
961
+ </g>`;
962
+ }
963
+
964
+ function renderConnectionPath(conn, index) {
965
+ const [cls, marker] = arrowClassMap[conn.variant || 'default'] || arrowClassMap.default;
966
+ const routed = pathFor(conn);
967
+ const strokeWidth = conn.width || (conn.variant === 'emphasis' ? 1.8 : 1.5);
968
+ return ` <path ${focusEdgeAttrs(conn.from, conn.to, conn.label, index, conn.id)} data-composition-points="${routePointsValue(routed.points)}" d="${routed.d}" class="${cls}"${animateAttr(arch.meta, 'edge', index)} stroke-width="${strokeWidth}" marker-end="url(#${marker})"/>`;
969
+ }
970
+
971
+ function renderConnectionLabel(conn, index) {
972
+ if (!conn.label) return '';
973
+ const [lx, ly] = labelPoint(conn, pathFor(conn).points);
974
+ const w = Math.max(30, textUnits(conn.label) * 4.8 + 10);
975
+ return ` <g data-detail="context" ${focusEdgeAttrs(conn.from, conn.to, conn.label, index, conn.id)}>
976
+ <rect x="${lx - w / 2}" y="${ly - 10}" width="${w}" height="14" rx="3" class="c-mask"/>
977
+ <text x="${lx}" y="${ly}" class="${variantAccent(conn.variant)}" font-size="8" text-anchor="middle">${esc(conn.label)}</text>
978
+ </g>`;
979
+ }
980
+
981
+ function renderComponent(c) {
982
+ const fill = componentFill[c.type] || 'c-external';
983
+ const accent = componentText[c.type] || 't-muted';
984
+ const cx = c.cx;
985
+ const hasSub = c.sublabel != null && c.sublabel !== '';
986
+ const labelY = hasSub ? c.y + c.height / 2 - 2 : c.y + c.height / 2 + 4;
987
+ const sub = hasSub
988
+ ? `\n <text data-detail="context" x="${cx}" y="${c.y + c.height / 2 + 14}" class="t-muted" font-size="${fittedNodeFontSize(c.sublabel, c.width, componentTextFit.sublabelPreferred, componentTextFit.sublabelMinimum)}" text-anchor="middle">${esc(c.sublabel)}</text>`
989
+ : '';
990
+ const tag = c.tag
991
+ ? `\n <text data-detail="fine" x="${cx}" y="${c.y + c.height - 8}" class="${accent}" font-size="${fittedNodeFontSize(c.tag, c.width, componentTextFit.tagPreferred, componentTextFit.tagMinimum)}" text-anchor="middle">${esc(c.tag)}</text>`
992
+ : '';
993
+ const brand = renderBrandMark(c, { x: c.x + c.width - 22, y: c.y + 6 });
994
+ const labelFontSize = fittedNodeFontSize(c.label, brandLabelFitWidth(c, c.width), 11, 8);
995
+ const passport = { kind: c.type, sublabel: c.sublabel, tag: c.tag, context: componentContext(c), ...brandMetadataFor(c) };
996
+ return ` <g ${focusNodeAttrs(c.id, c.label, passport, arch.meta.locale)}>
997
+ ${focusNodeTitle(c.label, passport)}
998
+ <rect x="${c.x}" y="${c.y}" width="${c.width}" height="${c.height}" rx="6" class="c-mask"/>
999
+ <rect x="${c.x}" y="${c.y}" width="${c.width}" height="${c.height}" rx="6" class="${fill}"${animateAttr(arch.meta, 'node', componentSteps.get(c.id))} stroke-width="1.5"/>
1000
+ ${renderSemanticSigil(c.type, { x: c.x + 6, y: c.y + 6 })}${brand ? `\n ${brand}` : ''}
1001
+ <text data-node-label=""${hasSub ? ' data-detail-anchor=""' : ''} x="${cx}" y="${labelY}" class="t-primary" font-size="${labelFontSize}" font-weight="600" text-anchor="middle">${esc(c.label)}</text>${sub}${tag}
1002
+ </g>`;
1003
+ }
1004
+
1005
+ function renderLegend() {
1006
+ const entries = architectureLegendEntries;
1007
+ const relationshipObstacles = relationshipLegendObstacles(arch.connections, {
1008
+ pointsFor: (connection) => pathFor(connection).points,
1009
+ labelRectFor: (connection) => {
1010
+ if (!connection.label) return null;
1011
+ const [x, y] = labelPoint(connection, pathFor(connection).points);
1012
+ const width = Math.max(30, textUnits(connection.label) * 4.8 + 10);
1013
+ return { x: x - width / 2, y: y - 10, width, height: 14 };
1014
+ },
1015
+ });
1016
+ const contentBottom = Math.max(
1017
+ 0,
1018
+ ...[...components.values()].map((component) => component.y + component.height),
1019
+ ...boundaries.map((boundary) => boundary.y + boundary.height),
1020
+ );
1021
+ return renderResolvedLegend({
1022
+ entries,
1023
+ locale: arch.meta.locale,
1024
+ layout: {
1025
+ x: layout.margin,
1026
+ baselineY: legendY(),
1027
+ width: viewBox[0] - layout.margin * 2,
1028
+ minTitleY: contentBottom + 8,
1029
+ obstacles: relationshipObstacles,
1030
+ unfit: arch.meta?.legend === undefined ? 'hide' : 'error',
1031
+ diagramType: 'architecture',
1032
+ },
1033
+ renderSwatch: (entry) => `<rect x="${entry.x}" y="${entry.baseline - 9}" width="16" height="10" rx="2.5" class="${componentFill[entry.kind] || 'c-external'}" stroke-width="1"/>`,
1034
+ });
1035
+ }
1036
+
1037
+ function renderSvg() {
1038
+ return ` <svg viewBox="0 0 ${viewBox[0]} ${viewBox[1]}" ${svgRootAttrs(arch.meta)}>
1039
+ ${svgAccessibleText(arch.meta, 'architecture')}
1040
+ ${renderDefinitions()}
1041
+
1042
+ <!-- Background Grid -->
1043
+ <rect width="100%" height="100%" fill="url(#grid)" />
1044
+
1045
+ <!-- Boundaries (behind everything) -->
1046
+ ${boundaries.map(renderBoundaryFrame).join('\n\n')}
1047
+
1048
+ <!-- Connection paths (before components for correct z-order) -->
1049
+ ${asArray(arch.connections).map(renderConnectionPath).join('\n')}
1050
+
1051
+ <!-- Components -->
1052
+ ${[...components.values()].map(renderComponent).join('\n\n')}
1053
+
1054
+ <!-- Connection labels -->
1055
+ ${asArray(arch.connections).map(renderConnectionLabel).join('\n')}
1056
+
1057
+ <!-- Boundary labels (foreground masks keep routes out of titles) -->
1058
+ ${boundaries.map(renderBoundaryLabel).join('\n\n')}
1059
+
1060
+ <!-- Legend -->
1061
+ ${renderLegend()}
1062
+ </svg>`;
1063
+ }
1064
+
1065
+ validateArchitecture();
1066
+ if (layoutJsonMode) {
1067
+ console.log(JSON.stringify(buildLayoutReport(), null, 2));
1068
+ process.exit(0);
1069
+ }
1070
+ writeDiagram({
1071
+ outPath,
1072
+ template,
1073
+ diagramType: 'architecture',
1074
+ meta: arch.meta,
1075
+ svg: renderSvg(),
1076
+ cards: arch.cards,
1077
+ sourceEvidence,
1078
+ });