@lovehlmmm/primekit 1.0.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 (1595) hide show
  1. package/AGENTS.md +165 -0
  2. package/README.md +66 -0
  3. package/cli/dist/adapters/index.d.ts +5 -0
  4. package/cli/dist/adapters/index.js +55 -0
  5. package/cli/dist/commands/doctor.d.ts +1 -0
  6. package/cli/dist/commands/doctor.js +69 -0
  7. package/cli/dist/commands/import.d.ts +6 -0
  8. package/cli/dist/commands/import.js +81 -0
  9. package/cli/dist/commands/init.d.ts +8 -0
  10. package/cli/dist/commands/init.js +88 -0
  11. package/cli/dist/commands/list.d.ts +1 -0
  12. package/cli/dist/commands/list.js +39 -0
  13. package/cli/dist/commands/uninstall.d.ts +4 -0
  14. package/cli/dist/commands/uninstall.js +47 -0
  15. package/cli/dist/commands/update.d.ts +5 -0
  16. package/cli/dist/commands/update.js +15 -0
  17. package/cli/dist/index.d.ts +2 -0
  18. package/cli/dist/index.js +73 -0
  19. package/cli/dist/utils/backup.d.ts +2 -0
  20. package/cli/dist/utils/backup.js +22 -0
  21. package/cli/dist/utils/manifest.d.ts +16 -0
  22. package/cli/dist/utils/manifest.js +41 -0
  23. package/docs/ARCHITECTURE.md +34 -0
  24. package/docs/USAGE.md +60 -0
  25. package/package.json +48 -0
  26. package/skills/advise/SKILL.md +230 -0
  27. package/skills/agent-browser/SKILL.md +107 -0
  28. package/skills/agent-browser/references/.gitkeep +0 -0
  29. package/skills/agent-browser/references/agent-browser-vs-chrome-devtools.md +71 -0
  30. package/skills/agent-browser/references/browserbase-cloud-setup.md +161 -0
  31. package/skills/agentize/SKILL.md +312 -0
  32. package/skills/agentize/references/agent-centric-design.md +134 -0
  33. package/skills/agentize/references/auth-resolution-chain.md +95 -0
  34. package/skills/agentize/references/challenge-framework.md +68 -0
  35. package/skills/agentize/references/code-mode.md +106 -0
  36. package/skills/agentize/references/deployment-guide.md +94 -0
  37. package/skills/agentize/references/mcp-transports.md +139 -0
  38. package/skills/agentize/references/monorepo-layout.md +164 -0
  39. package/skills/agentize/references/oauth-streamable-http.md +110 -0
  40. package/skills/agentkit/SKILL.md +200 -0
  41. package/skills/agentkit/references/chaining-patterns.md +126 -0
  42. package/skills/agentkit/references/subagent-timing.md +107 -0
  43. package/skills/agentkit/references/task-taxonomy.md +63 -0
  44. package/skills/ai-artist/SKILL.md +132 -0
  45. package/skills/ai-artist/data/awesome-prompts.csv +3592 -0
  46. package/skills/ai-artist/data/platforms.csv +11 -0
  47. package/skills/ai-artist/references/advanced-techniques.md +184 -0
  48. package/skills/ai-artist/references/domain-code.md +66 -0
  49. package/skills/ai-artist/references/domain-data.md +72 -0
  50. package/skills/ai-artist/references/domain-marketing.md +66 -0
  51. package/skills/ai-artist/references/domain-patterns.md +33 -0
  52. package/skills/ai-artist/references/domain-writing.md +68 -0
  53. package/skills/ai-artist/references/image-prompting.md +141 -0
  54. package/skills/ai-artist/references/llm-prompting.md +165 -0
  55. package/skills/ai-artist/references/nano-banana.md +136 -0
  56. package/skills/ai-artist/references/reasoning-techniques.md +201 -0
  57. package/skills/ai-artist/scripts/core.py +197 -0
  58. package/skills/ai-artist/scripts/generate.py +350 -0
  59. package/skills/ai-artist/scripts/search.py +147 -0
  60. package/skills/ai-multimodal/.env.example +13 -0
  61. package/skills/ai-multimodal/SKILL.md +234 -0
  62. package/skills/ai-multimodal/references/audio-processing.md +32 -0
  63. package/skills/ai-multimodal/references/image-generation.md +38 -0
  64. package/skills/ai-multimodal/references/minimax-generation.md +22 -0
  65. package/skills/ai-multimodal/references/music-generation.md +25 -0
  66. package/skills/ai-multimodal/references/video-analysis.md +27 -0
  67. package/skills/ai-multimodal/references/video-generation.md +28 -0
  68. package/skills/ai-multimodal/references/vision-understanding.md +27 -0
  69. package/skills/ai-multimodal/skill.yaml +3 -0
  70. package/skills/ak/SKILL.md +203 -0
  71. package/skills/ak/references/command-reference.md +189 -0
  72. package/skills/ask/SKILL.md +54 -0
  73. package/skills/autoresearch/SKILL.md +61 -0
  74. package/skills/backend-development/SKILL.md +102 -0
  75. package/skills/backend-development/references/backend-api-design.md +495 -0
  76. package/skills/backend-development/references/backend-architecture.md +454 -0
  77. package/skills/backend-development/references/backend-authentication.md +338 -0
  78. package/skills/backend-development/references/backend-code-quality.md +659 -0
  79. package/skills/backend-development/references/backend-debugging.md +904 -0
  80. package/skills/backend-development/references/backend-devops.md +494 -0
  81. package/skills/backend-development/references/backend-mindset.md +387 -0
  82. package/skills/backend-development/references/backend-performance.md +397 -0
  83. package/skills/backend-development/references/backend-security.md +290 -0
  84. package/skills/backend-development/references/backend-technologies.md +256 -0
  85. package/skills/backend-development/references/backend-testing.md +429 -0
  86. package/skills/better-auth/SKILL.md +220 -0
  87. package/skills/better-auth/references/advanced-features.md +553 -0
  88. package/skills/better-auth/references/database-integration.md +577 -0
  89. package/skills/better-auth/references/email-password-auth.md +416 -0
  90. package/skills/better-auth/references/oauth-providers.md +430 -0
  91. package/skills/better-auth/scripts/better_auth_init.py +521 -0
  92. package/skills/better-auth/scripts/requirements.txt +15 -0
  93. package/skills/better-auth/scripts/tests/test_better_auth_init.py +421 -0
  94. package/skills/bootstrap/SKILL.md +168 -0
  95. package/skills/bootstrap/references/shared-phases.md +56 -0
  96. package/skills/bootstrap/references/workflow-auto.md +55 -0
  97. package/skills/bootstrap/references/workflow-fast.md +53 -0
  98. package/skills/bootstrap/references/workflow-full.md +63 -0
  99. package/skills/bootstrap/references/workflow-parallel.md +63 -0
  100. package/skills/brainstorm/SKILL.md +249 -0
  101. package/skills/brainstorm/references/advisory-supervision.md +80 -0
  102. package/skills/brainstorm/references/ultra-verifier-mode.md +167 -0
  103. package/skills/bro/SKILL.md +32 -0
  104. package/skills/chrome-profile/LICENSE +22 -0
  105. package/skills/chrome-profile/SKILL.md +226 -0
  106. package/skills/chrome-profile/profiles.example.json +7 -0
  107. package/skills/chrome-profile/references/architecture.md +86 -0
  108. package/skills/chrome-profile/references/mcp-config-recipes.md +209 -0
  109. package/skills/chrome-profile/references/troubleshooting.md +85 -0
  110. package/skills/chrome-profile/scripts/chrome_profile_cli.py +876 -0
  111. package/skills/chrome-profile/scripts/install.cmd +52 -0
  112. package/skills/chrome-profile/scripts/install.sh +42 -0
  113. package/skills/chrome-profile/scripts/test_chrome_profile.py +397 -0
  114. package/skills/chrome-profile/scripts/uninstall.cmd +53 -0
  115. package/skills/chrome-profile/scripts/uninstall.sh +57 -0
  116. package/skills/clarify/SKILL.md +38 -0
  117. package/skills/code-review/SKILL.md +252 -0
  118. package/skills/code-review/references/checklist-workflow.md +100 -0
  119. package/skills/code-review/references/checklists/api.md +52 -0
  120. package/skills/code-review/references/checklists/base.md +100 -0
  121. package/skills/code-review/references/checklists/web-app.md +54 -0
  122. package/skills/code-review/references/code-review-reception.md +115 -0
  123. package/skills/code-review/references/codebase-scan-workflow.md +30 -0
  124. package/skills/code-review/references/edge-case-scouting.md +119 -0
  125. package/skills/code-review/references/input-mode-resolution.md +135 -0
  126. package/skills/code-review/references/parallel-review-workflow.md +77 -0
  127. package/skills/code-review/references/requesting-code-review.md +116 -0
  128. package/skills/code-review/references/spec-compliance-review.md +43 -0
  129. package/skills/code-review/references/task-management-reviews.md +51 -0
  130. package/skills/code-review/references/verification-before-completion.md +139 -0
  131. package/skills/codex-goal/SKILL.md +76 -0
  132. package/skills/coding-level/SKILL.md +78 -0
  133. package/skills/common/README.md +110 -0
  134. package/skills/common/SKILL.md +11 -0
  135. package/skills/context-engineering/SKILL.md +114 -0
  136. package/skills/context-engineering/references/context-compression.md +84 -0
  137. package/skills/context-engineering/references/context-degradation.md +93 -0
  138. package/skills/context-engineering/references/context-fundamentals.md +75 -0
  139. package/skills/context-engineering/references/context-optimization.md +82 -0
  140. package/skills/context-engineering/references/evaluation.md +89 -0
  141. package/skills/context-engineering/references/memory-systems.md +88 -0
  142. package/skills/context-engineering/references/multi-agent-patterns.md +90 -0
  143. package/skills/context-engineering/references/project-development.md +97 -0
  144. package/skills/context-engineering/references/runtime-awareness.md +202 -0
  145. package/skills/context-engineering/references/tool-design.md +86 -0
  146. package/skills/context-engineering/scripts/compression_evaluator.py +349 -0
  147. package/skills/context-engineering/scripts/context_analyzer.py +317 -0
  148. package/skills/context-engineering/scripts/tests/test_edge_cases.py +246 -0
  149. package/skills/cook/README.md +15 -0
  150. package/skills/cook/SKILL.md +306 -0
  151. package/skills/cook/references/intent-detection.md +109 -0
  152. package/skills/cook/references/plan-state-files-first.md +182 -0
  153. package/skills/cook/references/review-cycle.md +75 -0
  154. package/skills/cook/references/subagent-patterns.md +87 -0
  155. package/skills/cook/references/workflow-routing.md +53 -0
  156. package/skills/cook/references/workflow-steps.md +261 -0
  157. package/skills/copywriting/SKILL.md +96 -0
  158. package/skills/copywriting/references/copy-formulas.md +150 -0
  159. package/skills/copywriting/references/cta-patterns.md +168 -0
  160. package/skills/copywriting/references/email-copy.md +193 -0
  161. package/skills/copywriting/references/headline-templates.md +140 -0
  162. package/skills/copywriting/references/landing-page-copy.md +175 -0
  163. package/skills/copywriting/references/power-words.md +189 -0
  164. package/skills/copywriting/references/social-media-copy.md +222 -0
  165. package/skills/copywriting/references/writing-styles.md +247 -0
  166. package/skills/copywriting/scripts/extract-writing-styles.py +304 -0
  167. package/skills/copywriting/templates/copy-brief.md +49 -0
  168. package/skills/cti-expert/LICENSE +62 -0
  169. package/skills/cti-expert/README.md +1318 -0
  170. package/skills/cti-expert/SKILL.md +927 -0
  171. package/skills/cti-expert/analysis/archive-explorer.md +370 -0
  172. package/skills/cti-expert/analysis/auto-branch-rules.md +198 -0
  173. package/skills/cti-expert/analysis/cross-reference-engine.md +194 -0
  174. package/skills/cti-expert/analysis/deviation-detector.md +187 -0
  175. package/skills/cti-expert/analysis/drift-monitor.md +198 -0
  176. package/skills/cti-expert/analysis/exposure-model.md +195 -0
  177. package/skills/cti-expert/analysis/pattern-library.md +217 -0
  178. package/skills/cti-expert/analysis/risk-trend-tracker.md +169 -0
  179. package/skills/cti-expert/analysis/signature-catalog.md +195 -0
  180. package/skills/cti-expert/analysis/weight-engine.md +198 -0
  181. package/skills/cti-expert/connectors/maltego-export.md +565 -0
  182. package/skills/cti-expert/connectors/notion-schema.md +517 -0
  183. package/skills/cti-expert/connectors/obsidian-setup.md +718 -0
  184. package/skills/cti-expert/engine/case-schema.json +535 -0
  185. package/skills/cti-expert/engine/conflict-resolver.md +445 -0
  186. package/skills/cti-expert/engine/finding-framework.md +386 -0
  187. package/skills/cti-expert/engine/subject-registry.md +640 -0
  188. package/skills/cti-expert/engine/workspace-format.md +447 -0
  189. package/skills/cti-expert/engine/workspace-manager.md +595 -0
  190. package/skills/cti-expert/experience/accessibility/accessible-mode.md +306 -0
  191. package/skills/cti-expert/experience/accessibility/glossary.md +242 -0
  192. package/skills/cti-expert/experience/case-progress.md +190 -0
  193. package/skills/cti-expert/experience/case-templates/tpl-background-check.md +499 -0
  194. package/skills/cti-expert/experience/case-templates/tpl-due-diligence.md +205 -0
  195. package/skills/cti-expert/experience/case-templates/tpl-index.md +195 -0
  196. package/skills/cti-expert/experience/case-templates/tpl-security-review.md +272 -0
  197. package/skills/cti-expert/experience/feedback-system.md +176 -0
  198. package/skills/cti-expert/experience/guidance-system.md +234 -0
  199. package/skills/cti-expert/experience/guided-flows/flow-domain-sweep.md +275 -0
  200. package/skills/cti-expert/experience/guided-flows/flow-image-check.md +306 -0
  201. package/skills/cti-expert/experience/guided-flows/flow-person-lookup.md +286 -0
  202. package/skills/cti-expert/experience/layered-detail.md +205 -0
  203. package/skills/cti-expert/experience/skill-tiers.md +164 -0
  204. package/skills/cti-expert/experience/tutorial.md +198 -0
  205. package/skills/cti-expert/guides/walkthroughs/walkthrough-domain-sweep.md +131 -0
  206. package/skills/cti-expert/guides/walkthroughs/walkthrough-person-lookup.md +124 -0
  207. package/skills/cti-expert/guides/walkthroughs/walkthrough-username-trace.md +130 -0
  208. package/skills/cti-expert/handbook/discovery-paths.md +534 -0
  209. package/skills/cti-expert/handbook/operator-queries.md +337 -0
  210. package/skills/cti-expert/handbook/quick-report.md +96 -0
  211. package/skills/cti-expert/handbook/report-template.md +129 -0
  212. package/skills/cti-expert/handbook/tool-cascade-reference.md +249 -0
  213. package/skills/cti-expert/output/reports/citation-guide.md +145 -0
  214. package/skills/cti-expert/output/reports/export-specs.md +213 -0
  215. package/skills/cti-expert/output/reports/format-catalog.md +161 -0
  216. package/skills/cti-expert/output/reports/leadership-brief-template.md +531 -0
  217. package/skills/cti-expert/output/visuals/attack-path-diagram.md +178 -0
  218. package/skills/cti-expert/output/visuals/attack-surface-map.md +152 -0
  219. package/skills/cti-expert/output/visuals/case-dashboard.md +96 -0
  220. package/skills/cti-expert/output/visuals/chart-templates.md +1001 -0
  221. package/skills/cti-expert/output/visuals/render-engine.md +188 -0
  222. package/skills/cti-expert/output/visuals/ui-components.md +763 -0
  223. package/skills/cti-expert/scripts/cti_docx_charts.py +289 -0
  224. package/skills/cti-expert/scripts/cti_docx_diagrams.py +230 -0
  225. package/skills/cti-expert/scripts/cti_docx_postprocess.py +451 -0
  226. package/skills/cti-expert/scripts/cti_docx_sections.py +319 -0
  227. package/skills/cti-expert/scripts/cti_docx_styles.py +253 -0
  228. package/skills/cti-expert/scripts/generate-cti-docx-hybrid.py +178 -0
  229. package/skills/cti-expert/scripts/generate-cti-docx.py +210 -0
  230. package/skills/cti-expert/scripts/install.sh +322 -0
  231. package/skills/cti-expert/scripts/requirements.txt +6 -0
  232. package/skills/cti-expert/scripts/sample-cti-report-data.json +251 -0
  233. package/skills/cti-expert/techniques/advanced-geolocation-techniques.md +314 -0
  234. package/skills/cti-expert/techniques/agentflow-enrichment.md +150 -0
  235. package/skills/cti-expert/techniques/blockchain-investigation.md +247 -0
  236. package/skills/cti-expert/techniques/cloud-audit.md +175 -0
  237. package/skills/cti-expert/techniques/darknet-investigation.md +397 -0
  238. package/skills/cti-expert/techniques/dependency-audit.md +253 -0
  239. package/skills/cti-expert/techniques/disk-forensics.md +209 -0
  240. package/skills/cti-expert/techniques/domain-advanced.md +250 -0
  241. package/skills/cti-expert/techniques/email-osint.md +482 -0
  242. package/skills/cti-expert/techniques/fx-breach-discovery.md +142 -0
  243. package/skills/cti-expert/techniques/fx-dns-cert-history.md +257 -0
  244. package/skills/cti-expert/techniques/fx-document-forensics.md +64 -0
  245. package/skills/cti-expert/techniques/fx-document-leak-hunt.md +121 -0
  246. package/skills/cti-expert/techniques/fx-dork-sweep.md +157 -0
  247. package/skills/cti-expert/techniques/fx-email-header-analysis.md +91 -0
  248. package/skills/cti-expert/techniques/fx-geolocation.md +70 -0
  249. package/skills/cti-expert/techniques/fx-http-fingerprint.md +91 -0
  250. package/skills/cti-expert/techniques/fx-image-verification.md +87 -0
  251. package/skills/cti-expert/techniques/fx-leak-monitoring.md +84 -0
  252. package/skills/cti-expert/techniques/fx-metadata-parsing.md +96 -0
  253. package/skills/cti-expert/techniques/fx-network-mapping.md +95 -0
  254. package/skills/cti-expert/techniques/fx-social-topology.md +90 -0
  255. package/skills/cti-expert/techniques/fx-visitor-intelligence.md +413 -0
  256. package/skills/cti-expert/techniques/image-forensics-and-face-search.md +224 -0
  257. package/skills/cti-expert/techniques/incident-triage.md +197 -0
  258. package/skills/cti-expert/techniques/ioc-export.md +176 -0
  259. package/skills/cti-expert/techniques/microsoft-tenant-recon.md +86 -0
  260. package/skills/cti-expert/techniques/owasp-audit.md +178 -0
  261. package/skills/cti-expert/techniques/phone-osint.md +316 -0
  262. package/skills/cti-expert/techniques/prompt-injection-audit.md +236 -0
  263. package/skills/cti-expert/techniques/scam-check.md +217 -0
  264. package/skills/cti-expert/techniques/secret-scanning.md +195 -0
  265. package/skills/cti-expert/techniques/social-media-platforms.md +514 -0
  266. package/skills/cti-expert/techniques/threat-intel.md +315 -0
  267. package/skills/cti-expert/techniques/transport-tracking.md +353 -0
  268. package/skills/cti-expert/techniques/username-osint.md +227 -0
  269. package/skills/cti-expert/techniques/web-collection-scrapling.md +164 -0
  270. package/skills/cti-expert/techniques/web-dns-forensics.md +293 -0
  271. package/skills/cti-expert/techniques/web-traffic-analysis.md +180 -0
  272. package/skills/cti-expert/techniques/whois-universal.md +217 -0
  273. package/skills/cti-expert/techniques/wifi-ssid-osint.md +221 -0
  274. package/skills/cti-expert/validation/coverage-matrix.md +196 -0
  275. package/skills/cti-expert/validation/quality-scoring.md +114 -0
  276. package/skills/cti-expert/validation/verification-checklist.md +191 -0
  277. package/skills/cti-expert/workflows/wf-hr-screening.md +124 -0
  278. package/skills/cti-expert/workflows/wf-journalist.md +94 -0
  279. package/skills/cti-expert/workflows/wf-private-investigator.md +133 -0
  280. package/skills/cti-expert/workflows/wf-threat-analyst.md +126 -0
  281. package/skills/databases/SKILL.md +91 -0
  282. package/skills/databases/references/db-design.md +50 -0
  283. package/skills/databases/references/mongodb-aggregation.md +447 -0
  284. package/skills/databases/references/mongodb-atlas.md +465 -0
  285. package/skills/databases/references/mongodb-crud.md +408 -0
  286. package/skills/databases/references/mongodb-indexing.md +442 -0
  287. package/skills/databases/references/postgresql-administration.md +594 -0
  288. package/skills/databases/references/postgresql-performance.md +527 -0
  289. package/skills/databases/references/postgresql-psql-cli.md +467 -0
  290. package/skills/databases/references/postgresql-queries.md +475 -0
  291. package/skills/databases/scripts/db_backup.py +502 -0
  292. package/skills/databases/scripts/db_migrate.py +426 -0
  293. package/skills/databases/scripts/db_performance_check.py +457 -0
  294. package/skills/databases/scripts/requirements.txt +20 -0
  295. package/skills/databases/scripts/tests/coverage-db.json +1 -0
  296. package/skills/databases/scripts/tests/requirements.txt +4 -0
  297. package/skills/databases/scripts/tests/test_db_backup.py +340 -0
  298. package/skills/databases/scripts/tests/test_db_migrate.py +277 -0
  299. package/skills/databases/scripts/tests/test_db_performance_check.py +370 -0
  300. package/skills/debug/SKILL.md +161 -0
  301. package/skills/debug/references/defense-in-depth.md +124 -0
  302. package/skills/debug/references/frontend-verification.md +104 -0
  303. package/skills/debug/references/investigation-methodology.md +102 -0
  304. package/skills/debug/references/log-and-ci-analysis.md +97 -0
  305. package/skills/debug/references/performance-diagnostics.md +113 -0
  306. package/skills/debug/references/reporting-standards.md +122 -0
  307. package/skills/debug/references/root-cause-tracing.md +122 -0
  308. package/skills/debug/references/systematic-debugging.md +102 -0
  309. package/skills/debug/references/task-management-debugging.md +44 -0
  310. package/skills/debug/references/verification.md +123 -0
  311. package/skills/debug/scripts/find-polluter.sh +63 -0
  312. package/skills/debug/scripts/find-polluter.test.md +102 -0
  313. package/skills/deep-swe/LICENSE.txt +21 -0
  314. package/skills/deep-swe/SKILL.md +82 -0
  315. package/skills/deploy/SKILL.md +161 -0
  316. package/skills/deploy/references/platform-config-templates.md +35 -0
  317. package/skills/deploy/references/platforms/aws.md +58 -0
  318. package/skills/deploy/references/platforms/cloudflare.md +41 -0
  319. package/skills/deploy/references/platforms/coolify.md +32 -0
  320. package/skills/deploy/references/platforms/digitalocean.md +45 -0
  321. package/skills/deploy/references/platforms/dokploy.md +29 -0
  322. package/skills/deploy/references/platforms/flyio.md +54 -0
  323. package/skills/deploy/references/platforms/gcp.md +45 -0
  324. package/skills/deploy/references/platforms/github-pages.md +56 -0
  325. package/skills/deploy/references/platforms/heroku.md +31 -0
  326. package/skills/deploy/references/platforms/netlify.md +39 -0
  327. package/skills/deploy/references/platforms/railway.md +38 -0
  328. package/skills/deploy/references/platforms/render.md +39 -0
  329. package/skills/deploy/references/platforms/tose.md +35 -0
  330. package/skills/deploy/references/platforms/vercel.md +37 -0
  331. package/skills/deploy/references/platforms/vultr.md +27 -0
  332. package/skills/design/SKILL.md +368 -0
  333. package/skills/design/data/cip/deliverables.csv +51 -0
  334. package/skills/design/data/cip/industries.csv +21 -0
  335. package/skills/design/data/cip/mockup-contexts.csv +21 -0
  336. package/skills/design/data/cip/styles.csv +21 -0
  337. package/skills/design/data/icon/styles.csv +16 -0
  338. package/skills/design/data/logo/colors.csv +56 -0
  339. package/skills/design/data/logo/industries.csv +56 -0
  340. package/skills/design/data/logo/styles.csv +56 -0
  341. package/skills/design/data/poster/analysis/clusters.json +460 -0
  342. package/skills/design/data/poster/analysis/raw/03830de3c6fa0bec270ba0d7fc0e7846.json +41 -0
  343. package/skills/design/data/poster/analysis/raw/0720a64949fc9de76f4ef558c4a2a255.json +44 -0
  344. package/skills/design/data/poster/analysis/raw/0d2b819566c50e78e085d92cfc86d027.json +44 -0
  345. package/skills/design/data/poster/analysis/raw/11a3b9453165c20f093ba2b23dd88d12.json +43 -0
  346. package/skills/design/data/poster/analysis/raw/1327e16933d7c1a9f29e0b7427088724.json +45 -0
  347. package/skills/design/data/poster/analysis/raw/19b3f41ac3316417b7b3c05b6f259f78.json +45 -0
  348. package/skills/design/data/poster/analysis/raw/1d3081c243a0158eef6ac3f75fc9b210.json +44 -0
  349. package/skills/design/data/poster/analysis/raw/1e087bf80f15859a8c25f64c1f60eb05.json +46 -0
  350. package/skills/design/data/poster/analysis/raw/206bbb22ad70bdf9424a352c53885ded.json +44 -0
  351. package/skills/design/data/poster/analysis/raw/208f93c9e0e26a587c675482bb6159c0.json +46 -0
  352. package/skills/design/data/poster/analysis/raw/20a8613560d7b6950b3bb60f3b305ee9.json +46 -0
  353. package/skills/design/data/poster/analysis/raw/23b7c4cf67425a4586f52b5ab3193485.json +45 -0
  354. package/skills/design/data/poster/analysis/raw/29a4c5c51006e4e614a5d4e5f9a0cf38.json +42 -0
  355. package/skills/design/data/poster/analysis/raw/2ebb49c2e9cee470cfbf140ff55908db.json +45 -0
  356. package/skills/design/data/poster/analysis/raw/2f3b297a6f24872fb8e6b4df1b952ee7.json +43 -0
  357. package/skills/design/data/poster/analysis/raw/2f674e0079d3b0072bc464befc013291.json +44 -0
  358. package/skills/design/data/poster/analysis/raw/310540d28ae16e6c2e287e2848a70d59.json +42 -0
  359. package/skills/design/data/poster/analysis/raw/329159bd006090d76c9f17723b03266e.json +47 -0
  360. package/skills/design/data/poster/analysis/raw/32ce1f4f0710079bfcad7e9cd8b9ac23.json +46 -0
  361. package/skills/design/data/poster/analysis/raw/35021de3de00711b2253f3998a676ac7.json +43 -0
  362. package/skills/design/data/poster/analysis/raw/352817058d62df6c2a2187529ebc0811.json +44 -0
  363. package/skills/design/data/poster/analysis/raw/36097cd2af4616c9352ceef92e5b743e.json +44 -0
  364. package/skills/design/data/poster/analysis/raw/36f617c7bd8eb399694be84da430c4fe.json +42 -0
  365. package/skills/design/data/poster/analysis/raw/3931212aa88036d9380735e577f301c5.json +43 -0
  366. package/skills/design/data/poster/analysis/raw/39dbb26b8a479d276329d352fe530540.json +45 -0
  367. package/skills/design/data/poster/analysis/raw/3dc3adf1e1542239db8acbe7233ef6d3.json +44 -0
  368. package/skills/design/data/poster/analysis/raw/3f168ed33e3a90bca52d731b43b7f8ff.json +46 -0
  369. package/skills/design/data/poster/analysis/raw/43e8f9dec2c7b2b090ec370bd0948920.json +48 -0
  370. package/skills/design/data/poster/analysis/raw/451205c93b056ccbc22cbe473afacf2c.json +45 -0
  371. package/skills/design/data/poster/analysis/raw/451a8579b449a332a95f0b8f1022ce97.json +44 -0
  372. package/skills/design/data/poster/analysis/raw/463e4a2b40d25116c7fb6edc4f62a237.json +43 -0
  373. package/skills/design/data/poster/analysis/raw/4700136bbc2d6987577c3c16f4e187b3.json +43 -0
  374. package/skills/design/data/poster/analysis/raw/49d16faee41a2b99901fca62dc41fcbd.json +45 -0
  375. package/skills/design/data/poster/analysis/raw/4b25a302c481d7aa8913bcd5d5053688.json +43 -0
  376. package/skills/design/data/poster/analysis/raw/4e84eb4cb51d17fdaa195243e9271c0c.json +44 -0
  377. package/skills/design/data/poster/analysis/raw/4f616e824a5d2b3b596b4b07128cd2e2.json +45 -0
  378. package/skills/design/data/poster/analysis/raw/4f7e7f95ec46254afbcb4ed0f2f3556a.json +43 -0
  379. package/skills/design/data/poster/analysis/raw/52df1b896ff6d0d0de31f9e1e38cddc9.json +46 -0
  380. package/skills/design/data/poster/analysis/raw/5364e461254c715eb4302b5daafd8ce1.json +44 -0
  381. package/skills/design/data/poster/analysis/raw/558fa3a048e27a9558d0d568c15b7cf0.json +44 -0
  382. package/skills/design/data/poster/analysis/raw/5737d7fd13c865fff12218cd86d4a176.json +43 -0
  383. package/skills/design/data/poster/analysis/raw/59dda9c5466b0ca79913f3874efa36a1.json +44 -0
  384. package/skills/design/data/poster/analysis/raw/59ea108d8959586d359980808dc84fc3.json +44 -0
  385. package/skills/design/data/poster/analysis/raw/5c9277ead15d4e599740c7d6e698c3fa.json +44 -0
  386. package/skills/design/data/poster/analysis/raw/629edf88f617724399b5b5ee70c9fde9.json +45 -0
  387. package/skills/design/data/poster/analysis/raw/65326a5cf732897196f0fe5d81e1d7b5.json +44 -0
  388. package/skills/design/data/poster/analysis/raw/6ec5149c0f8046824346106d4ccaa9b7.json +44 -0
  389. package/skills/design/data/poster/analysis/raw/6fa6fe57aebc755736959ad860b806fd.json +45 -0
  390. package/skills/design/data/poster/analysis/raw/72f7066f8bfd58ae11cba72b7e986c67.json +45 -0
  391. package/skills/design/data/poster/analysis/raw/74a1e3bb73287a3e587d670074d3e09c.json +45 -0
  392. package/skills/design/data/poster/analysis/raw/75b9a7dbfc4f5298f6092a3dbbda9c80.json +44 -0
  393. package/skills/design/data/poster/analysis/raw/763a0cf095244d0ae0244a89d1863890.json +43 -0
  394. package/skills/design/data/poster/analysis/raw/780f94a12f778c2f2b5514597c6fef4a.json +48 -0
  395. package/skills/design/data/poster/analysis/raw/79bba33787bae383c829457dd6d90c02.json +44 -0
  396. package/skills/design/data/poster/analysis/raw/7a1e91d4e6c39f5d278ab4c833616ebf.json +44 -0
  397. package/skills/design/data/poster/analysis/raw/7a3e1681626bc52e3888dba109a072ba.json +44 -0
  398. package/skills/design/data/poster/analysis/raw/7b4120d6690f603ac417c9395a9b0aa7.json +44 -0
  399. package/skills/design/data/poster/analysis/raw/7bd18b2d9f4c813402f7bc5a4beb5022.json +44 -0
  400. package/skills/design/data/poster/analysis/raw/7e14dd460280476a871db304cd5b266b.json +45 -0
  401. package/skills/design/data/poster/analysis/raw/804ab63a723f046ed504683e5ff029ac.json +44 -0
  402. package/skills/design/data/poster/analysis/raw/80f5c85b6886175b4d4cdb009c33bd4b.json +46 -0
  403. package/skills/design/data/poster/analysis/raw/84f8e5e99ecc1448694574af98c9b261.json +43 -0
  404. package/skills/design/data/poster/analysis/raw/889907f1db801ccf18426d7111f37ad5.json +42 -0
  405. package/skills/design/data/poster/analysis/raw/8a800a072bcb22af6a8851b2d9274af4.json +46 -0
  406. package/skills/design/data/poster/analysis/raw/8ab3a73073a3d2be0f50605265264aa8.json +45 -0
  407. package/skills/design/data/poster/analysis/raw/8e9ab36670f8abb6e30ea8ee0936e76a.json +43 -0
  408. package/skills/design/data/poster/analysis/raw/961cdae977416844899cdf6d27f68c17.json +44 -0
  409. package/skills/design/data/poster/analysis/raw/9befb4c704b8f90d7988ca53b27bbaf8.json +46 -0
  410. package/skills/design/data/poster/analysis/raw/9cd149253f974524620fc7e626e7ab8b.json +45 -0
  411. package/skills/design/data/poster/analysis/raw/9e8eb8cd216c308eb955be98c8b5469c.json +43 -0
  412. package/skills/design/data/poster/analysis/raw/a00214fa42e14653b71e7e19750b2dd1.json +44 -0
  413. package/skills/design/data/poster/analysis/raw/a559e4c0235989ea746a1580a7a5fd67.json +46 -0
  414. package/skills/design/data/poster/analysis/raw/a820e920a16841be386901670b719cf8.json +45 -0
  415. package/skills/design/data/poster/analysis/raw/a886ff142548b39c4502de58a2c84015.json +44 -0
  416. package/skills/design/data/poster/analysis/raw/aaae7f36ab82d74cd378422e615e0c6b.json +47 -0
  417. package/skills/design/data/poster/analysis/raw/ad954edcb87747e9098689cbe4baa5ef.json +44 -0
  418. package/skills/design/data/poster/analysis/raw/ae121a7d8e2061230c1e894400c8a373.json +44 -0
  419. package/skills/design/data/poster/analysis/raw/ae8e1437e0cc1aaded8f58f5009e019d.json +46 -0
  420. package/skills/design/data/poster/analysis/raw/afdad5e00f97585a463bcc08b03f57a9.json +44 -0
  421. package/skills/design/data/poster/analysis/raw/b070823f2005d717d491ba63ceb79335.json +43 -0
  422. package/skills/design/data/poster/analysis/raw/b3f19b9d48b6bd983a43358cca317e8f.json +44 -0
  423. package/skills/design/data/poster/analysis/raw/b512b0981a30a0b48f8b0a8c20fbad39.json +44 -0
  424. package/skills/design/data/poster/analysis/raw/b545932bc5c82b7bb13a2f340f0eb38d.json +44 -0
  425. package/skills/design/data/poster/analysis/raw/b63f0dd0ab98a335966e47f29795f9c2.json +42 -0
  426. package/skills/design/data/poster/analysis/raw/bdc469042c5e3dc7e6e3748b431ae2a6.json +45 -0
  427. package/skills/design/data/poster/analysis/raw/c19c048627cb33e313b02b020789ce71.json +46 -0
  428. package/skills/design/data/poster/analysis/raw/c30fb63c7960e6bad555c859b4001111.json +47 -0
  429. package/skills/design/data/poster/analysis/raw/cbe2866e0e348558718f7e77168f0be7.json +46 -0
  430. package/skills/design/data/poster/analysis/raw/cd3600a62153c51f0a82aace1c49e56a.json +45 -0
  431. package/skills/design/data/poster/analysis/raw/d1f6cc3afc6b1ec24165658ec52495a0.json +46 -0
  432. package/skills/design/data/poster/analysis/raw/d28930761f38f870bd181a91bc20d283.json +47 -0
  433. package/skills/design/data/poster/analysis/raw/d4b8f9a965ada05816219f382658885b.json +44 -0
  434. package/skills/design/data/poster/analysis/raw/d526846fb5a303411a18ffb41c93995d.json +45 -0
  435. package/skills/design/data/poster/analysis/raw/d52d0671f8a0d52c5d1343020b8f3e8e.json +45 -0
  436. package/skills/design/data/poster/analysis/raw/d5c9c14b21ac3a63d3029c736af62814.json +45 -0
  437. package/skills/design/data/poster/analysis/raw/d8209a3ab55acb51fc51a77807842349.json +46 -0
  438. package/skills/design/data/poster/analysis/raw/da140c13475db4beeaf53a923139e6a6.json +45 -0
  439. package/skills/design/data/poster/analysis/raw/daf8de499d7734e187779e1400361420.json +45 -0
  440. package/skills/design/data/poster/analysis/raw/db7b1e073e80bee4fec31bfaabe06565.json +44 -0
  441. package/skills/design/data/poster/analysis/raw/dcba357e7239c0f3b7eddf412558e68c.json +42 -0
  442. package/skills/design/data/poster/analysis/raw/dcc5bc4453e379070d8dac1f8a50704d.json +46 -0
  443. package/skills/design/data/poster/analysis/raw/download.json +46 -0
  444. package/skills/design/data/poster/analysis/raw/e148e8bcff846b7c872c7c1d50452fd4.json +44 -0
  445. package/skills/design/data/poster/analysis/raw/e690c2a063b2e91da0612d818ac8f2f4.json +44 -0
  446. package/skills/design/data/poster/analysis/raw/e697e58f5a500c4b7ba0fb5c02a5506e.json +45 -0
  447. package/skills/design/data/poster/analysis/raw/ecb624bec81a0d5b229dc2fe4ed585fd.json +47 -0
  448. package/skills/design/data/poster/analysis/raw/eed5317c07fd8b093f039a0848e801d8.json +44 -0
  449. package/skills/design/data/poster/analysis/raw/f1853524781a04e99e9279cd6526e447.json +44 -0
  450. package/skills/design/data/poster/analysis/raw/f1a3249b2798d37edb956bfe1ea9d44b.json +44 -0
  451. package/skills/design/data/poster/analysis/raw/f3a81ad0c4189fd3ef83122e4c3f1d18.json +43 -0
  452. package/skills/design/data/poster/analysis/raw/f3e0358f167e6471f7dd6636529a9fc6.json +46 -0
  453. package/skills/design/data/poster/analysis/raw/f99f4bfc2eb5f0b11f8069aab956231b.json +47 -0
  454. package/skills/design/data/poster/analysis/raw/fc92743155daf8ccafe80dad8f7b1907.json +46 -0
  455. package/skills/design/data/poster/poster-layouts.csv +15 -0
  456. package/skills/design/data/poster/poster-palettes.csv +17 -0
  457. package/skills/design/data/poster/poster-styles.csv +23 -0
  458. package/skills/design/data/poster/poster-textures.csv +9 -0
  459. package/skills/design/references/banner-sizes-and-styles.md +118 -0
  460. package/skills/design/references/brand-asset-protocol.md +226 -0
  461. package/skills/design/references/cip-deliverable-guide.md +95 -0
  462. package/skills/design/references/cip-design.md +121 -0
  463. package/skills/design/references/cip-prompt-engineering.md +84 -0
  464. package/skills/design/references/cip-style-guide.md +68 -0
  465. package/skills/design/references/design-critique-guide.md +246 -0
  466. package/skills/design/references/design-routing.md +209 -0
  467. package/skills/design/references/design-workflow.md +194 -0
  468. package/skills/design/references/handoff-gate.md +56 -0
  469. package/skills/design/references/icon-design.md +122 -0
  470. package/skills/design/references/logo-color-psychology.md +101 -0
  471. package/skills/design/references/logo-design.md +92 -0
  472. package/skills/design/references/logo-prompt-engineering.md +158 -0
  473. package/skills/design/references/logo-style-guide.md +109 -0
  474. package/skills/design/references/poster-design.md +86 -0
  475. package/skills/design/references/poster-prompt-engineering.md +69 -0
  476. package/skills/design/references/slides-copywriting-formulas.md +84 -0
  477. package/skills/design/references/slides-create.md +4 -0
  478. package/skills/design/references/slides-html-template.md +295 -0
  479. package/skills/design/references/slides-layout-patterns.md +137 -0
  480. package/skills/design/references/slides-strategies.md +94 -0
  481. package/skills/design/references/slides.md +42 -0
  482. package/skills/design/references/social-photos-design.md +329 -0
  483. package/skills/design/scripts/cip/core.py +215 -0
  484. package/skills/design/scripts/cip/generate.py +484 -0
  485. package/skills/design/scripts/cip/render-html.py +424 -0
  486. package/skills/design/scripts/cip/search.py +127 -0
  487. package/skills/design/scripts/icon/generate.py +487 -0
  488. package/skills/design/scripts/logo/core.py +175 -0
  489. package/skills/design/scripts/logo/generate.py +362 -0
  490. package/skills/design/scripts/logo/search.py +114 -0
  491. package/skills/design/scripts/poster/analyze.py +124 -0
  492. package/skills/design/scripts/poster/cluster.py +432 -0
  493. package/skills/design/scripts/poster/core.py +124 -0
  494. package/skills/design/scripts/poster/generate.py +176 -0
  495. package/skills/design/scripts/poster/search.py +132 -0
  496. package/skills/devops/.env.example +76 -0
  497. package/skills/devops/SKILL.md +98 -0
  498. package/skills/devops/references/browser-rendering.md +305 -0
  499. package/skills/devops/references/cloudflare-d1-kv.md +123 -0
  500. package/skills/devops/references/cloudflare-platform.md +271 -0
  501. package/skills/devops/references/cloudflare-r2-storage.md +280 -0
  502. package/skills/devops/references/cloudflare-workers-advanced.md +312 -0
  503. package/skills/devops/references/cloudflare-workers-apis.md +309 -0
  504. package/skills/devops/references/cloudflare-workers-basics.md +418 -0
  505. package/skills/devops/references/docker-basics.md +297 -0
  506. package/skills/devops/references/docker-compose.md +292 -0
  507. package/skills/devops/references/gcloud-platform.md +297 -0
  508. package/skills/devops/references/gcloud-services.md +304 -0
  509. package/skills/devops/scripts/cloudflare_deploy.py +269 -0
  510. package/skills/devops/scripts/docker_optimize.py +332 -0
  511. package/skills/devops/scripts/requirements.txt +20 -0
  512. package/skills/devops/scripts/tests/requirements.txt +3 -0
  513. package/skills/devops/scripts/tests/test_cloudflare_deploy.py +285 -0
  514. package/skills/devops/scripts/tests/test_docker_optimize.py +436 -0
  515. package/skills/diagram/SKILL.md +186 -0
  516. package/skills/diagram/agents/openai.yaml +4 -0
  517. package/skills/diagram/assets/connector-effects.css +122 -0
  518. package/skills/diagram/assets/effects-demo.html +125 -0
  519. package/skills/diagram/assets/mermaid.min.js +2314 -0
  520. package/skills/diagram/assets/templates/architecture/dark.html +190 -0
  521. package/skills/diagram/assets/templates/architecture/full.html +202 -0
  522. package/skills/diagram/assets/templates/architecture/light.html +191 -0
  523. package/skills/diagram/assets/templates/bar/dark.html +137 -0
  524. package/skills/diagram/assets/templates/bar/full.html +113 -0
  525. package/skills/diagram/assets/templates/bar/light.html +137 -0
  526. package/skills/diagram/assets/templates/data-flow/dark.html +151 -0
  527. package/skills/diagram/assets/templates/data-flow/full.html +193 -0
  528. package/skills/diagram/assets/templates/data-flow/light.html +151 -0
  529. package/skills/diagram/assets/templates/dp-integration/dark.html +88 -0
  530. package/skills/diagram/assets/templates/dp-integration/full.html +98 -0
  531. package/skills/diagram/assets/templates/dp-integration/light.html +88 -0
  532. package/skills/diagram/assets/templates/dp-security-matrix/dark.html +39 -0
  533. package/skills/diagram/assets/templates/dp-security-matrix/full.html +40 -0
  534. package/skills/diagram/assets/templates/dp-security-matrix/light.html +96 -0
  535. package/skills/diagram/assets/templates/flowchart/dark.html +164 -0
  536. package/skills/diagram/assets/templates/flowchart/full.html +167 -0
  537. package/skills/diagram/assets/templates/flowchart/light.html +164 -0
  538. package/skills/diagram/assets/templates/gantt/dark.html +145 -0
  539. package/skills/diagram/assets/templates/gantt/full.html +135 -0
  540. package/skills/diagram/assets/templates/gantt/light.html +145 -0
  541. package/skills/diagram/assets/templates/high-level/dark.html +259 -0
  542. package/skills/diagram/assets/templates/high-level/full.html +255 -0
  543. package/skills/diagram/assets/templates/high-level/light.html +309 -0
  544. package/skills/diagram/assets/templates/it-state/dark.html +98 -0
  545. package/skills/diagram/assets/templates/it-state/full.html +77 -0
  546. package/skills/diagram/assets/templates/it-state/light.html +136 -0
  547. package/skills/diagram/assets/templates/layers/dark.html +131 -0
  548. package/skills/diagram/assets/templates/layers/full.html +134 -0
  549. package/skills/diagram/assets/templates/layers/light.html +131 -0
  550. package/skills/diagram/assets/templates/line/dark.html +119 -0
  551. package/skills/diagram/assets/templates/line/full.html +113 -0
  552. package/skills/diagram/assets/templates/line/light.html +119 -0
  553. package/skills/diagram/assets/templates/loop/dark.html +108 -0
  554. package/skills/diagram/assets/templates/loop/full.html +145 -0
  555. package/skills/diagram/assets/templates/loop/light.html +108 -0
  556. package/skills/diagram/assets/templates/medallion/dark.html +167 -0
  557. package/skills/diagram/assets/templates/medallion/full.html +209 -0
  558. package/skills/diagram/assets/templates/medallion/light.html +167 -0
  559. package/skills/diagram/assets/templates/nested/dark.html +140 -0
  560. package/skills/diagram/assets/templates/nested/full.html +143 -0
  561. package/skills/diagram/assets/templates/nested/light.html +144 -0
  562. package/skills/diagram/assets/templates/org-chart/dark.html +53 -0
  563. package/skills/diagram/assets/templates/org-chart/full.html +53 -0
  564. package/skills/diagram/assets/templates/org-chart/light.html +53 -0
  565. package/skills/diagram/assets/templates/process/dark.html +72 -0
  566. package/skills/diagram/assets/templates/process/full.html +82 -0
  567. package/skills/diagram/assets/templates/process/light.html +72 -0
  568. package/skills/diagram/assets/templates/pyramid/dark.html +127 -0
  569. package/skills/diagram/assets/templates/pyramid/full.html +130 -0
  570. package/skills/diagram/assets/templates/pyramid/light.html +127 -0
  571. package/skills/diagram/assets/templates/quadrant/dark.html +143 -0
  572. package/skills/diagram/assets/templates/quadrant/full.html +146 -0
  573. package/skills/diagram/assets/templates/quadrant/light.html +143 -0
  574. package/skills/diagram/assets/templates/radar/dark.html +147 -0
  575. package/skills/diagram/assets/templates/radar/full.html +143 -0
  576. package/skills/diagram/assets/templates/radar/light.html +147 -0
  577. package/skills/diagram/assets/templates/scatter/dark.html +149 -0
  578. package/skills/diagram/assets/templates/scatter/full.html +124 -0
  579. package/skills/diagram/assets/templates/scatter/light.html +149 -0
  580. package/skills/diagram/assets/templates/sequence/dark.html +230 -0
  581. package/skills/diagram/assets/templates/sequence/full.html +396 -0
  582. package/skills/diagram/assets/templates/sequence/light.html +230 -0
  583. package/skills/diagram/assets/templates/state/dark.html +155 -0
  584. package/skills/diagram/assets/templates/state/full.html +158 -0
  585. package/skills/diagram/assets/templates/state/light.html +155 -0
  586. package/skills/diagram/assets/templates/swimlane/dark.html +180 -0
  587. package/skills/diagram/assets/templates/swimlane/full.html +183 -0
  588. package/skills/diagram/assets/templates/swimlane/light.html +180 -0
  589. package/skills/diagram/assets/templates/timeline/dark.html +143 -0
  590. package/skills/diagram/assets/templates/timeline/full.html +146 -0
  591. package/skills/diagram/assets/templates/timeline/light.html +143 -0
  592. package/skills/diagram/assets/tokens.css +116 -0
  593. package/skills/diagram/references/animation-effects.md +142 -0
  594. package/skills/diagram/references/mermaid-input.md +62 -0
  595. package/skills/diagram/references/per-type-schemas/README.md +60 -0
  596. package/skills/diagram/references/per-type-schemas/architecture.json +50 -0
  597. package/skills/diagram/references/per-type-schemas/bar.json +44 -0
  598. package/skills/diagram/references/per-type-schemas/data-flow.json +71 -0
  599. package/skills/diagram/references/per-type-schemas/dp-integration.json +47 -0
  600. package/skills/diagram/references/per-type-schemas/dp-security-matrix.json +51 -0
  601. package/skills/diagram/references/per-type-schemas/high-level.json +47 -0
  602. package/skills/diagram/references/per-type-schemas/it-state.json +51 -0
  603. package/skills/diagram/references/per-type-schemas/layers.json +41 -0
  604. package/skills/diagram/references/per-type-schemas/line.json +65 -0
  605. package/skills/diagram/references/per-type-schemas/loop.json +19 -0
  606. package/skills/diagram/references/per-type-schemas/medallion.json +48 -0
  607. package/skills/diagram/references/per-type-schemas/nested.json +45 -0
  608. package/skills/diagram/references/per-type-schemas/org-chart.json +48 -0
  609. package/skills/diagram/references/per-type-schemas/process.json +35 -0
  610. package/skills/diagram/references/per-type-schemas/pyramid.json +37 -0
  611. package/skills/diagram/references/per-type-schemas/quadrant.json +78 -0
  612. package/skills/diagram/references/per-type-schemas/radar.json +57 -0
  613. package/skills/diagram/references/per-type-schemas/scatter.json +58 -0
  614. package/skills/diagram/references/per-type-schemas/swimlane.json +50 -0
  615. package/skills/diagram/references/per-type-schemas/timeline.json +50 -0
  616. package/skills/diagram/references/snapshot-hashes.yaml +73 -0
  617. package/skills/diagram/references/snapshot-requirements.txt +2 -0
  618. package/skills/diagram/references/vendoring-metadata.yaml +379 -0
  619. package/skills/diagram/scripts/doctor.py +153 -0
  620. package/skills/diagram/scripts/record.py +151 -0
  621. package/skills/diagram/scripts/render.py +276 -0
  622. package/skills/diagram/scripts/snapshot_test.py +200 -0
  623. package/skills/diagram/scripts/vendor_from_upstream.py +201 -0
  624. package/skills/docs/SKILL.md +123 -0
  625. package/skills/docs/references/agent-context-rules.md +103 -0
  626. package/skills/docs/references/agents-workflow.md +268 -0
  627. package/skills/docs/references/doc-content-rules.md +77 -0
  628. package/skills/docs/references/documentation-management.md +51 -0
  629. package/skills/docs/references/init-workflow.md +60 -0
  630. package/skills/docs/references/llms.md +151 -0
  631. package/skills/docs/references/practical-principles-for-setting-up-and-running-tests.md +85 -0
  632. package/skills/docs/references/summarize-workflow.md +16 -0
  633. package/skills/docs/references/update-workflow.md +58 -0
  634. package/skills/docs-seeker/.env.example +15 -0
  635. package/skills/docs-seeker/SKILL.md +104 -0
  636. package/skills/docs-seeker/package.json +25 -0
  637. package/skills/docs-seeker/references/advanced.md +79 -0
  638. package/skills/docs-seeker/references/context7-patterns.md +68 -0
  639. package/skills/docs-seeker/references/errors.md +68 -0
  640. package/skills/docs-seeker/scripts/analyze-llms-txt.js +211 -0
  641. package/skills/docs-seeker/scripts/detect-topic.js +172 -0
  642. package/skills/docs-seeker/scripts/fetch-docs.js +213 -0
  643. package/skills/docs-seeker/scripts/tests/run-tests.js +72 -0
  644. package/skills/docs-seeker/scripts/tests/test-analyze-llms.js +119 -0
  645. package/skills/docs-seeker/scripts/tests/test-detect-topic.js +112 -0
  646. package/skills/docs-seeker/scripts/tests/test-fetch-docs.js +84 -0
  647. package/skills/docs-seeker/scripts/utils/env-loader.js +94 -0
  648. package/skills/docs-seeker/workflows/library-search.md +87 -0
  649. package/skills/docs-seeker/workflows/repo-analysis.md +91 -0
  650. package/skills/docs-seeker/workflows/topic-search.md +77 -0
  651. package/skills/document-skills/SKILL.md +10 -0
  652. package/skills/document-skills/ak-docx/LICENSE.txt +30 -0
  653. package/skills/document-skills/ak-docx/SKILL.md +204 -0
  654. package/skills/document-skills/ak-docx/docx-js.md +350 -0
  655. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  656. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  657. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  658. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  659. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  660. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  661. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  662. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  663. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  664. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  665. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  666. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  667. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  668. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  669. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  670. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  671. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  672. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  673. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  674. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  675. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  676. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  677. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  678. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  679. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  680. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  681. package/skills/document-skills/ak-docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  682. package/skills/document-skills/ak-docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  683. package/skills/document-skills/ak-docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  684. package/skills/document-skills/ak-docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  685. package/skills/document-skills/ak-docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  686. package/skills/document-skills/ak-docx/ooxml/schemas/mce/mc.xsd +75 -0
  687. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  688. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  689. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  690. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  691. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  692. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  693. package/skills/document-skills/ak-docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  694. package/skills/document-skills/ak-docx/ooxml/scripts/pack.py +159 -0
  695. package/skills/document-skills/ak-docx/ooxml/scripts/unpack.py +29 -0
  696. package/skills/document-skills/ak-docx/ooxml/scripts/validate.py +69 -0
  697. package/skills/document-skills/ak-docx/ooxml/scripts/validation/__init__.py +15 -0
  698. package/skills/document-skills/ak-docx/ooxml/scripts/validation/base.py +951 -0
  699. package/skills/document-skills/ak-docx/ooxml/scripts/validation/docx.py +274 -0
  700. package/skills/document-skills/ak-docx/ooxml/scripts/validation/pptx.py +315 -0
  701. package/skills/document-skills/ak-docx/ooxml/scripts/validation/redlining.py +279 -0
  702. package/skills/document-skills/ak-docx/ooxml.md +610 -0
  703. package/skills/document-skills/ak-docx/scripts/__init__.py +1 -0
  704. package/skills/document-skills/ak-docx/scripts/document.py +1276 -0
  705. package/skills/document-skills/ak-docx/scripts/templates/comments.xml +3 -0
  706. package/skills/document-skills/ak-docx/scripts/templates/commentsExtended.xml +3 -0
  707. package/skills/document-skills/ak-docx/scripts/templates/commentsExtensible.xml +3 -0
  708. package/skills/document-skills/ak-docx/scripts/templates/commentsIds.xml +3 -0
  709. package/skills/document-skills/ak-docx/scripts/templates/people.xml +3 -0
  710. package/skills/document-skills/ak-docx/scripts/utilities.py +374 -0
  711. package/skills/document-skills/ak-pdf/LICENSE.txt +30 -0
  712. package/skills/document-skills/ak-pdf/SKILL.md +301 -0
  713. package/skills/document-skills/ak-pdf/forms.md +205 -0
  714. package/skills/document-skills/ak-pdf/reference.md +612 -0
  715. package/skills/document-skills/ak-pdf/scripts/check_bounding_boxes.py +70 -0
  716. package/skills/document-skills/ak-pdf/scripts/check_bounding_boxes_test.py +226 -0
  717. package/skills/document-skills/ak-pdf/scripts/check_fillable_fields.py +12 -0
  718. package/skills/document-skills/ak-pdf/scripts/convert_pdf_to_images.py +35 -0
  719. package/skills/document-skills/ak-pdf/scripts/create_validation_image.py +41 -0
  720. package/skills/document-skills/ak-pdf/scripts/extract_form_field_info.py +152 -0
  721. package/skills/document-skills/ak-pdf/scripts/fill_fillable_fields.py +114 -0
  722. package/skills/document-skills/ak-pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
  723. package/skills/document-skills/ak-pptx/LICENSE.txt +30 -0
  724. package/skills/document-skills/ak-pptx/SKILL.md +491 -0
  725. package/skills/document-skills/ak-pptx/html2pptx.md +625 -0
  726. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  727. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  728. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  729. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  730. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  731. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  732. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  733. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  734. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  735. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  736. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  737. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  738. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  739. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  740. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  741. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  742. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  743. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  744. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  745. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  746. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  747. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  748. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  749. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  750. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  751. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  752. package/skills/document-skills/ak-pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  753. package/skills/document-skills/ak-pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  754. package/skills/document-skills/ak-pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  755. package/skills/document-skills/ak-pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  756. package/skills/document-skills/ak-pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  757. package/skills/document-skills/ak-pptx/ooxml/schemas/mce/mc.xsd +75 -0
  758. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
  759. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
  760. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
  761. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
  762. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
  763. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  764. package/skills/document-skills/ak-pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
  765. package/skills/document-skills/ak-pptx/ooxml/scripts/pack.py +159 -0
  766. package/skills/document-skills/ak-pptx/ooxml/scripts/unpack.py +29 -0
  767. package/skills/document-skills/ak-pptx/ooxml/scripts/validate.py +69 -0
  768. package/skills/document-skills/ak-pptx/ooxml/scripts/validation/__init__.py +15 -0
  769. package/skills/document-skills/ak-pptx/ooxml/scripts/validation/base.py +951 -0
  770. package/skills/document-skills/ak-pptx/ooxml/scripts/validation/docx.py +274 -0
  771. package/skills/document-skills/ak-pptx/ooxml/scripts/validation/pptx.py +315 -0
  772. package/skills/document-skills/ak-pptx/ooxml/scripts/validation/redlining.py +279 -0
  773. package/skills/document-skills/ak-pptx/ooxml.md +427 -0
  774. package/skills/document-skills/ak-pptx/scripts/html2pptx.js +979 -0
  775. package/skills/document-skills/ak-pptx/scripts/inventory.py +1020 -0
  776. package/skills/document-skills/ak-pptx/scripts/rearrange.py +231 -0
  777. package/skills/document-skills/ak-pptx/scripts/replace.py +385 -0
  778. package/skills/document-skills/ak-pptx/scripts/thumbnail.py +450 -0
  779. package/skills/document-skills/ak-xlsx/LICENSE.txt +30 -0
  780. package/skills/document-skills/ak-xlsx/SKILL.md +296 -0
  781. package/skills/document-skills/ak-xlsx/recalc.py +191 -0
  782. package/skills/excalidraw/SKILL.md +210 -0
  783. package/skills/excalidraw/references/auto-diagram-guide.md +150 -0
  784. package/skills/excalidraw/references/color-palette.md +128 -0
  785. package/skills/excalidraw/references/design-methodology.md +129 -0
  786. package/skills/excalidraw/references/element-templates.md +182 -0
  787. package/skills/excalidraw/references/file-workflow.md +105 -0
  788. package/skills/excalidraw/references/json-schema.md +85 -0
  789. package/skills/excalidraw/references/mcp-workflow.md +194 -0
  790. package/skills/excalidraw/references/pyproject.toml +7 -0
  791. package/skills/excalidraw/references/render_excalidraw.py +187 -0
  792. package/skills/excalidraw/references/render_template.html +57 -0
  793. package/skills/excalidraw/references/uv.lock +106 -0
  794. package/skills/explore/SKILL.md +44 -0
  795. package/skills/fable-thinking/SKILL.md +399 -0
  796. package/skills/fable-thinking/references/content-taste.md +178 -0
  797. package/skills/fable-thinking/references/design-taste.md +182 -0
  798. package/skills/fable-thinking/references/worked-examples.md +228 -0
  799. package/skills/find-skills/SKILL.md +147 -0
  800. package/skills/find-skills/references/domain-routing.md +108 -0
  801. package/skills/fix/SKILL.md +354 -0
  802. package/skills/fix/references/complexity-assessment.md +73 -0
  803. package/skills/fix/references/mode-selection.md +46 -0
  804. package/skills/fix/references/parallel-exploration.md +87 -0
  805. package/skills/fix/references/review-cycle.md +77 -0
  806. package/skills/fix/references/skill-activation-matrix.md +100 -0
  807. package/skills/fix/references/workflow-ci.md +28 -0
  808. package/skills/fix/references/workflow-deep.md +165 -0
  809. package/skills/fix/references/workflow-logs.md +59 -0
  810. package/skills/fix/references/workflow-quick.md +99 -0
  811. package/skills/fix/references/workflow-standard.md +127 -0
  812. package/skills/fix/references/workflow-test.md +57 -0
  813. package/skills/fix/references/workflow-types.md +33 -0
  814. package/skills/fix/references/workflow-ui.md +59 -0
  815. package/skills/folder-context/LICENSE.txt +21 -0
  816. package/skills/folder-context/SKILL.md +55 -0
  817. package/skills/frontend-design/SKILL.md +276 -0
  818. package/skills/frontend-design/references/ai-multimodal-overview.md +162 -0
  819. package/skills/frontend-design/references/analysis-best-practices.md +80 -0
  820. package/skills/frontend-design/references/analysis-prompts.md +141 -0
  821. package/skills/frontend-design/references/analysis-techniques.md +112 -0
  822. package/skills/frontend-design/references/animejs.md +396 -0
  823. package/skills/frontend-design/references/asset-generation.md +326 -0
  824. package/skills/frontend-design/references/design-extraction-overview.md +67 -0
  825. package/skills/frontend-design/references/design-quality-preflight.md +36 -0
  826. package/skills/frontend-design/references/extraction-best-practices.md +138 -0
  827. package/skills/frontend-design/references/extraction-output-templates.md +162 -0
  828. package/skills/frontend-design/references/extraction-prompts.md +127 -0
  829. package/skills/frontend-design/references/motion-craft.md +166 -0
  830. package/skills/frontend-design/references/technical-accessibility.md +118 -0
  831. package/skills/frontend-design/references/technical-best-practices.md +97 -0
  832. package/skills/frontend-design/references/technical-optimization.md +44 -0
  833. package/skills/frontend-design/references/technical-overview.md +88 -0
  834. package/skills/frontend-design/references/technical-workflows.md +137 -0
  835. package/skills/frontend-design/references/visual-analysis-overview.md +100 -0
  836. package/skills/frontend-design/references/workflow-3d.md +102 -0
  837. package/skills/frontend-design/references/workflow-describe.md +87 -0
  838. package/skills/frontend-design/references/workflow-immersive.md +87 -0
  839. package/skills/frontend-design/references/workflow-quick.md +57 -0
  840. package/skills/frontend-design/references/workflow-screenshot.md +63 -0
  841. package/skills/frontend-design/references/workflow-video.md +74 -0
  842. package/skills/frontend-development/SKILL.md +407 -0
  843. package/skills/frontend-development/resources/common-patterns.md +331 -0
  844. package/skills/frontend-development/resources/complete-examples.md +872 -0
  845. package/skills/frontend-development/resources/component-patterns.md +502 -0
  846. package/skills/frontend-development/resources/data-fetching.md +767 -0
  847. package/skills/frontend-development/resources/file-organization.md +502 -0
  848. package/skills/frontend-development/resources/loading-and-error-states.md +501 -0
  849. package/skills/frontend-development/resources/performance.md +406 -0
  850. package/skills/frontend-development/resources/routing-guide.md +364 -0
  851. package/skills/frontend-development/resources/styling-guide.md +428 -0
  852. package/skills/frontend-development/resources/typescript-standards.md +418 -0
  853. package/skills/git/SKILL.md +133 -0
  854. package/skills/git/references/branch-management.md +88 -0
  855. package/skills/git/references/commit-standards.md +46 -0
  856. package/skills/git/references/gh-cli-guide.md +109 -0
  857. package/skills/git/references/safety-protocols.md +69 -0
  858. package/skills/git/references/workflow-commit.md +58 -0
  859. package/skills/git/references/workflow-merge-pr.md +198 -0
  860. package/skills/git/references/workflow-merge.md +48 -0
  861. package/skills/git/references/workflow-pr.md +58 -0
  862. package/skills/git/references/workflow-push.md +52 -0
  863. package/skills/git/references/workflow-stacked-prs.md +110 -0
  864. package/skills/github/SKILL.md +162 -0
  865. package/skills/github/assets/templates/issue-bug.md +46 -0
  866. package/skills/github/assets/templates/issue-docs.md +29 -0
  867. package/skills/github/assets/templates/issue-enhancement.md +31 -0
  868. package/skills/github/assets/templates/issue-feature.md +49 -0
  869. package/skills/github/assets/templates/pr-body.md +35 -0
  870. package/skills/github/references/admin-operations.md +107 -0
  871. package/skills/github/references/issue-workflows.md +151 -0
  872. package/skills/github/references/pr-workflows.md +89 -0
  873. package/skills/github/references/projects-actions.md +92 -0
  874. package/skills/gkg/SKILL.md +98 -0
  875. package/skills/gkg/references/cli-commands.md +106 -0
  876. package/skills/gkg/references/http-api.md +102 -0
  877. package/skills/gkg/references/language-support.md +57 -0
  878. package/skills/gkg/references/mcp-tools.md +99 -0
  879. package/skills/goal-warmup/SKILL.md +217 -0
  880. package/skills/goal-warmup/fixtures/blocked-missing-credential.md +32 -0
  881. package/skills/goal-warmup/fixtures/blocked-third-party.md +28 -0
  882. package/skills/goal-warmup/fixtures/decision-required.md +28 -0
  883. package/skills/goal-warmup/fixtures/fast-refused-external.md +22 -0
  884. package/skills/goal-warmup/fixtures/ready-local.md +39 -0
  885. package/skills/goal-warmup/fixtures/redteam-scope-change.md +26 -0
  886. package/skills/goal-warmup/references/contract-preserving-review.md +61 -0
  887. package/skills/goal-warmup/references/decisions.md +21 -0
  888. package/skills/goal-warmup/references/fast-path.md +41 -0
  889. package/skills/goal-warmup/references/handoff-packet.md +80 -0
  890. package/skills/goal-warmup/references/outcome-contract.md +50 -0
  891. package/skills/goal-warmup/references/preflight-matrix.md +42 -0
  892. package/skills/google-adk-python/SKILL.md +139 -0
  893. package/skills/google-adk-python/references/agent-types-and-architecture.md +128 -0
  894. package/skills/google-adk-python/references/callbacks-plugins-observability.md +117 -0
  895. package/skills/google-adk-python/references/deployment-cloud-run-vertex-gke.md +138 -0
  896. package/skills/google-adk-python/references/evaluation-testing-cli.md +112 -0
  897. package/skills/google-adk-python/references/multi-agent-and-a2a-protocol.md +145 -0
  898. package/skills/google-adk-python/references/sessions-state-memory-artifacts.md +131 -0
  899. package/skills/google-adk-python/references/tools-and-mcp-integration.md +148 -0
  900. package/skills/graphify/SKILL.md +160 -0
  901. package/skills/handoff/LICENSE.txt +21 -0
  902. package/skills/handoff/SKILL.md +258 -0
  903. package/skills/handoff/references/artifact-schema.md +147 -0
  904. package/skills/handoff/references/redaction-patterns.md +80 -0
  905. package/skills/handover/SKILL.md +274 -0
  906. package/skills/handover/references/job-spec-template.md +155 -0
  907. package/skills/handover/references/runtime-catalog.md +102 -0
  908. package/skills/help/SKILL.md +21 -0
  909. package/skills/html-video/SKILL.md +185 -0
  910. package/skills/hyperframes/SKILL.md +129 -0
  911. package/skills/hyperframes/references/composition-basics.md +77 -0
  912. package/skills/hyperframes/references/env-and-deps.md +55 -0
  913. package/skills/hyperframes/references/heygen-skills.md +36 -0
  914. package/skills/hyperframes/references/render-workflow.md +88 -0
  915. package/skills/hyperframes/scripts/verify-prereqs.mjs +148 -0
  916. package/skills/hyperframes/scripts/verify-prereqs.test.cjs +60 -0
  917. package/skills/implement/SKILL.md +38 -0
  918. package/skills/interview-docs/LICENSE.txt +21 -0
  919. package/skills/interview-docs/SKILL.md +58 -0
  920. package/skills/issue-to-plan/SKILL.md +249 -0
  921. package/skills/journal/SKILL.md +147 -0
  922. package/skills/journal/assets/journal.yaml.example +33 -0
  923. package/skills/journal/references/channels-config.md +107 -0
  924. package/skills/journal/references/config-schema.md +95 -0
  925. package/skills/journal/references/env-cascade.md +61 -0
  926. package/skills/journal/references/media-flags.md +118 -0
  927. package/skills/journal/references/writing-styles-resolver.md +56 -0
  928. package/skills/journal/references/zernio-integration.md +143 -0
  929. package/skills/journal/scripts/env-loader.cjs +150 -0
  930. package/skills/journal/scripts/env-loader.test.cjs +131 -0
  931. package/skills/journal/scripts/generate-image.cjs +195 -0
  932. package/skills/journal/scripts/generate-image.test.cjs +171 -0
  933. package/skills/journal/scripts/generate-video.cjs +288 -0
  934. package/skills/journal/scripts/generate-video.test.cjs +186 -0
  935. package/skills/journal/scripts/media-utils.cjs +153 -0
  936. package/skills/journal/scripts/mini-yaml-parser.cjs +234 -0
  937. package/skills/journal/scripts/post-social.cjs +549 -0
  938. package/skills/journal/scripts/post-social.test.cjs +479 -0
  939. package/skills/journal/scripts/resolve-config.cjs +182 -0
  940. package/skills/journal/scripts/resolve-config.test.cjs +248 -0
  941. package/skills/journal/scripts/split-thread.cjs +254 -0
  942. package/skills/journal/scripts/split-thread.test.cjs +138 -0
  943. package/skills/llms/SKILL.md +124 -0
  944. package/skills/llms/references/llms-txt-specification.md +87 -0
  945. package/skills/llms/scripts/generate-llms-txt.py +350 -0
  946. package/skills/loop/SKILL.md +189 -0
  947. package/skills/loop/references/autonomous-loop-protocol.md +193 -0
  948. package/skills/loop/references/git-memory-pattern.md +109 -0
  949. package/skills/loop/references/guard-and-noise.md +140 -0
  950. package/skills/loop/references/metric-library.md +200 -0
  951. package/skills/loop/references/results-logging.md +74 -0
  952. package/skills/markdown-novel-viewer/SKILL.md +319 -0
  953. package/skills/markdown-novel-viewer/assets/directory-browser.css +215 -0
  954. package/skills/markdown-novel-viewer/assets/favicon.png +0 -0
  955. package/skills/markdown-novel-viewer/assets/novel-theme.css +16 -0
  956. package/skills/markdown-novel-viewer/assets/reader.js +850 -0
  957. package/skills/markdown-novel-viewer/assets/template.html +149 -0
  958. package/skills/markdown-novel-viewer/package.json +15 -0
  959. package/skills/markdown-novel-viewer/scripts/lib/http-server.cjs +434 -0
  960. package/skills/markdown-novel-viewer/scripts/lib/markdown-renderer.cjs +335 -0
  961. package/skills/markdown-novel-viewer/scripts/lib/plan-navigator.cjs +205 -0
  962. package/skills/markdown-novel-viewer/scripts/lib/plan-table-parser.cjs +231 -0
  963. package/skills/markdown-novel-viewer/scripts/lib/port-finder.cjs +48 -0
  964. package/skills/markdown-novel-viewer/scripts/lib/process-mgr.cjs +150 -0
  965. package/skills/markdown-novel-viewer/scripts/server.cjs +411 -0
  966. package/skills/markdown-novel-viewer/scripts/tests/server.test.cjs +327 -0
  967. package/skills/markdown-novel-viewer/tests/http-server.test.cjs +271 -0
  968. package/skills/markdown-novel-viewer/tests/run-tests.cjs +49 -0
  969. package/skills/markdown-novel-viewer/tests/test-framework.cjs +154 -0
  970. package/skills/mcp-builder/LICENSE.txt +202 -0
  971. package/skills/mcp-builder/SKILL.md +336 -0
  972. package/skills/mcp-builder/reference/evaluation.md +584 -0
  973. package/skills/mcp-builder/reference/mcp-best-practices.md +915 -0
  974. package/skills/mcp-builder/reference/node-mcp-server.md +918 -0
  975. package/skills/mcp-builder/reference/python-mcp-server.md +752 -0
  976. package/skills/mcp-builder/scripts/connections.py +151 -0
  977. package/skills/mcp-builder/scripts/evaluation.py +381 -0
  978. package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  979. package/skills/mcp-builder/scripts/requirements.txt +2 -0
  980. package/skills/media-processing/SKILL.md +101 -0
  981. package/skills/media-processing/references/common-workflows.md +132 -0
  982. package/skills/media-processing/references/ffmpeg-encoding.md +358 -0
  983. package/skills/media-processing/references/ffmpeg-filters.md +503 -0
  984. package/skills/media-processing/references/ffmpeg-streaming.md +403 -0
  985. package/skills/media-processing/references/format-compatibility.md +375 -0
  986. package/skills/media-processing/references/imagemagick-batch.md +612 -0
  987. package/skills/media-processing/references/imagemagick-editing.md +623 -0
  988. package/skills/media-processing/references/rmbg-background-removal.md +66 -0
  989. package/skills/media-processing/references/troubleshooting.md +109 -0
  990. package/skills/media-processing/scripts/README.md +111 -0
  991. package/skills/media-processing/scripts/batch-remove-background.sh +124 -0
  992. package/skills/media-processing/scripts/batch_resize.py +342 -0
  993. package/skills/media-processing/scripts/media_convert.py +311 -0
  994. package/skills/media-processing/scripts/remove-background.sh +96 -0
  995. package/skills/media-processing/scripts/remove-bg-node.js +158 -0
  996. package/skills/media-processing/scripts/requirements.txt +24 -0
  997. package/skills/media-processing/scripts/tests/requirements.txt +2 -0
  998. package/skills/media-processing/scripts/tests/test_batch_resize.py +372 -0
  999. package/skills/media-processing/scripts/tests/test_media_convert.py +259 -0
  1000. package/skills/media-processing/scripts/tests/test_video_optimize.py +397 -0
  1001. package/skills/media-processing/scripts/video_optimize.py +414 -0
  1002. package/skills/mermaidjs-v11/SKILL.md +125 -0
  1003. package/skills/mermaidjs-v11/references/cli-usage.md +228 -0
  1004. package/skills/mermaidjs-v11/references/configuration.md +232 -0
  1005. package/skills/mermaidjs-v11/references/diagram-types.md +315 -0
  1006. package/skills/mermaidjs-v11/references/examples.md +344 -0
  1007. package/skills/mermaidjs-v11/references/integration.md +310 -0
  1008. package/skills/mintlify/SKILL.md +127 -0
  1009. package/skills/mintlify/references/ai-features-and-integrations-reference.md +756 -0
  1010. package/skills/mintlify/references/api-documentation-components-reference.md +873 -0
  1011. package/skills/mintlify/references/deployment-and-continuous-integration-reference.md +674 -0
  1012. package/skills/mintlify/references/docs-json-configuration-reference.md +724 -0
  1013. package/skills/mintlify/references/mdx-components-reference.md +551 -0
  1014. package/skills/mintlify/references/navigation-structure-and-organization-reference.md +775 -0
  1015. package/skills/mobile-development/SKILL.md +219 -0
  1016. package/skills/mobile-development/references/mobile-android.md +604 -0
  1017. package/skills/mobile-development/references/mobile-best-practices.md +545 -0
  1018. package/skills/mobile-development/references/mobile-debugging.md +1089 -0
  1019. package/skills/mobile-development/references/mobile-frameworks.md +465 -0
  1020. package/skills/mobile-development/references/mobile-ios.md +496 -0
  1021. package/skills/mobile-development/references/mobile-mindset.md +544 -0
  1022. package/skills/orchestrate/SKILL.md +366 -0
  1023. package/skills/orchestrate/references/harness-profiles.md +148 -0
  1024. package/skills/orchestrate/references/internal-routing.md +154 -0
  1025. package/skills/orchestrate/references/job-spec.md +251 -0
  1026. package/skills/orchestrate/references/model-routing.md +199 -0
  1027. package/skills/orchestrate/references/runtime-matrix.md +199 -0
  1028. package/skills/payment-integration/README.md +217 -0
  1029. package/skills/payment-integration/SKILL.md +81 -0
  1030. package/skills/payment-integration/references/multi-provider-order-management-patterns.md +821 -0
  1031. package/skills/payment-integration/references/polar/benefits.md +396 -0
  1032. package/skills/payment-integration/references/polar/best-practices.md +902 -0
  1033. package/skills/payment-integration/references/polar/checkouts.md +266 -0
  1034. package/skills/payment-integration/references/polar/overview.md +184 -0
  1035. package/skills/payment-integration/references/polar/products.md +244 -0
  1036. package/skills/payment-integration/references/polar/sdk.md +436 -0
  1037. package/skills/payment-integration/references/polar/subscriptions.md +340 -0
  1038. package/skills/payment-integration/references/polar/webhooks.md +405 -0
  1039. package/skills/payment-integration/references/sepay/api.md +140 -0
  1040. package/skills/payment-integration/references/sepay/best-practices.md +939 -0
  1041. package/skills/payment-integration/references/sepay/overview.md +138 -0
  1042. package/skills/payment-integration/references/sepay/qr-codes.md +228 -0
  1043. package/skills/payment-integration/references/sepay/sdk.md +213 -0
  1044. package/skills/payment-integration/references/sepay/webhooks.md +208 -0
  1045. package/skills/payment-integration/references/stripe/stripe-best-practices.md +32 -0
  1046. package/skills/payment-integration/references/stripe/stripe-cli.md +148 -0
  1047. package/skills/payment-integration/references/stripe/stripe-js.md +116 -0
  1048. package/skills/payment-integration/references/stripe/stripe-sdks.md +84 -0
  1049. package/skills/payment-integration/references/stripe/stripe-upgrade.md +175 -0
  1050. package/skills/payment-integration/scripts/.env.example +20 -0
  1051. package/skills/payment-integration/scripts/checkout-helper.js +244 -0
  1052. package/skills/payment-integration/scripts/package.json +17 -0
  1053. package/skills/payment-integration/scripts/polar-webhook-verify.js +202 -0
  1054. package/skills/payment-integration/scripts/sepay-webhook-verify.js +193 -0
  1055. package/skills/payment-integration/scripts/test-scripts.js +237 -0
  1056. package/skills/plan/SKILL.md +676 -0
  1057. package/skills/plan/references/archive-workflow.md +81 -0
  1058. package/skills/plan/references/codebase-understanding.md +48 -0
  1059. package/skills/plan/references/output-standards.md +225 -0
  1060. package/skills/plan/references/plan-organization.md +267 -0
  1061. package/skills/plan/references/red-team-personas.md +101 -0
  1062. package/skills/plan/references/red-team-workflow.md +97 -0
  1063. package/skills/plan/references/research-phase.md +49 -0
  1064. package/skills/plan/references/scope-challenge.md +104 -0
  1065. package/skills/plan/references/solution-design.md +83 -0
  1066. package/skills/plan/references/task-management.md +52 -0
  1067. package/skills/plan/references/validate-question-framework.md +80 -0
  1068. package/skills/plan/references/validate-workflow.md +107 -0
  1069. package/skills/plan/references/verification-roles.md +150 -0
  1070. package/skills/plan/references/workflow-modes.md +424 -0
  1071. package/skills/plans-kanban/SKILL.md +110 -0
  1072. package/skills/plans-kanban/package.json +9 -0
  1073. package/skills/plans-kanban/scripts/lib/plan-metadata-extractor.cjs +494 -0
  1074. package/skills/plans-kanban/scripts/lib/plan-parser.cjs +175 -0
  1075. package/skills/plans-kanban/scripts/lib/plan-scanner.cjs +272 -0
  1076. package/skills/plans-kanban/scripts/lib/plan-table-parser.cjs +231 -0
  1077. package/skills/plans-kanban/scripts/open-dashboard.cjs +220 -0
  1078. package/skills/predict/SKILL.md +150 -0
  1079. package/skills/preview/SKILL.md +173 -0
  1080. package/skills/preview/references/generation-modes.md +210 -0
  1081. package/skills/preview/references/html-antv-infographic.md +140 -0
  1082. package/skills/preview/references/html-css-patterns.md +1717 -0
  1083. package/skills/preview/references/html-design-guidelines.md +393 -0
  1084. package/skills/preview/references/html-diagram-design.md +156 -0
  1085. package/skills/preview/references/html-libraries.md +604 -0
  1086. package/skills/preview/references/html-responsive-nav.md +212 -0
  1087. package/skills/preview/references/html-slide-patterns.md +1401 -0
  1088. package/skills/preview/references/vendor/diagram-design-scripts/PROVENANCE.md +27 -0
  1089. package/skills/preview/references/vendor/diagram-design-scripts/UPSTREAM-LICENSE +21 -0
  1090. package/skills/preview/references/vendor/diagram-design-scripts/run-validators.sh +25 -0
  1091. package/skills/preview/references/vendor/diagram-design-scripts/self_check.py +389 -0
  1092. package/skills/preview/references/vendor/diagram-design-scripts/verify-geometry.py +166 -0
  1093. package/skills/preview/references/vendor/diagram-design-scripts/verify-motion.py +525 -0
  1094. package/skills/preview/references/view-mode.md +42 -0
  1095. package/skills/preview/references/visual-explanation-routing.md +39 -0
  1096. package/skills/preview/templates/architecture.html +650 -0
  1097. package/skills/preview/templates/data-table.html +590 -0
  1098. package/skills/preview/templates/mermaid-flowchart.html +768 -0
  1099. package/skills/preview/templates/slide-deck.html +968 -0
  1100. package/skills/problem-solving/SKILL.md +126 -0
  1101. package/skills/problem-solving/references/attribution.md +69 -0
  1102. package/skills/problem-solving/references/collision-zone-thinking.md +79 -0
  1103. package/skills/problem-solving/references/inversion-exercise.md +91 -0
  1104. package/skills/problem-solving/references/meta-pattern-recognition.md +87 -0
  1105. package/skills/problem-solving/references/scale-game.md +95 -0
  1106. package/skills/problem-solving/references/simplification-cascades.md +80 -0
  1107. package/skills/problem-solving/references/when-stuck.md +72 -0
  1108. package/skills/project-management/SKILL.md +137 -0
  1109. package/skills/project-management/references/documentation-triggers.md +33 -0
  1110. package/skills/project-management/references/hydration-workflow.md +45 -0
  1111. package/skills/project-management/references/progress-tracking.md +110 -0
  1112. package/skills/project-management/references/reporting-patterns.md +94 -0
  1113. package/skills/project-management/references/task-operations.md +35 -0
  1114. package/skills/project-organization/SKILL.md +232 -0
  1115. package/skills/project-organization/references/directory-patterns.md +175 -0
  1116. package/skills/project-organization/references/markdown-body-templates.md +314 -0
  1117. package/skills/project-organization/references/naming-conventions.md +140 -0
  1118. package/skills/react-best-practices/AGENTS.md +2249 -0
  1119. package/skills/react-best-practices/README.md +123 -0
  1120. package/skills/react-best-practices/SKILL.md +129 -0
  1121. package/skills/react-best-practices/metadata.json +17 -0
  1122. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  1123. package/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
  1124. package/skills/react-best-practices/rules/async-api-routes.md +38 -0
  1125. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  1126. package/skills/react-best-practices/rules/async-dependencies.md +36 -0
  1127. package/skills/react-best-practices/rules/async-parallel.md +28 -0
  1128. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  1129. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  1130. package/skills/react-best-practices/rules/bundle-conditional.md +31 -0
  1131. package/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
  1132. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
  1133. package/skills/react-best-practices/rules/bundle-preload.md +50 -0
  1134. package/skills/react-best-practices/rules/client-event-listeners.md +74 -0
  1135. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  1136. package/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
  1137. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  1138. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  1139. package/skills/react-best-practices/rules/js-cache-storage.md +70 -0
  1140. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  1141. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  1142. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  1143. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  1144. package/skills/react-best-practices/rules/js-length-check-first.md +49 -0
  1145. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  1146. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  1147. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  1148. package/skills/react-best-practices/rules/rendering-activity.md +26 -0
  1149. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
  1150. package/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
  1151. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  1152. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
  1153. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
  1154. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  1155. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  1156. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  1157. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  1158. package/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
  1159. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
  1160. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  1161. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  1162. package/skills/react-best-practices/rules/sections.md +46 -0
  1163. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  1164. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  1165. package/skills/react-best-practices/rules/server-cache-react.md +26 -0
  1166. package/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
  1167. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  1168. package/skills/react-best-practices/rules/template.md +28 -0
  1169. package/skills/remotion/SKILL.md +58 -0
  1170. package/skills/remotion/rules/3d.md +86 -0
  1171. package/skills/remotion/rules/animations.md +29 -0
  1172. package/skills/remotion/rules/assets/charts-bar-chart.tsx +173 -0
  1173. package/skills/remotion/rules/assets/text-animations-typewriter.tsx +100 -0
  1174. package/skills/remotion/rules/assets/text-animations-word-highlight.tsx +108 -0
  1175. package/skills/remotion/rules/assets.md +78 -0
  1176. package/skills/remotion/rules/audio.md +172 -0
  1177. package/skills/remotion/rules/calculate-metadata.md +104 -0
  1178. package/skills/remotion/rules/can-decode.md +75 -0
  1179. package/skills/remotion/rules/charts.md +58 -0
  1180. package/skills/remotion/rules/compositions.md +146 -0
  1181. package/skills/remotion/rules/display-captions.md +126 -0
  1182. package/skills/remotion/rules/effects.md +22 -0
  1183. package/skills/remotion/rules/extract-frames.md +229 -0
  1184. package/skills/remotion/rules/fonts.md +152 -0
  1185. package/skills/remotion/rules/get-audio-duration.md +58 -0
  1186. package/skills/remotion/rules/get-video-dimensions.md +68 -0
  1187. package/skills/remotion/rules/get-video-duration.md +58 -0
  1188. package/skills/remotion/rules/gifs.md +138 -0
  1189. package/skills/remotion/rules/images.md +130 -0
  1190. package/skills/remotion/rules/import-srt-captions.md +67 -0
  1191. package/skills/remotion/rules/lottie.md +68 -0
  1192. package/skills/remotion/rules/measuring-dom-nodes.md +35 -0
  1193. package/skills/remotion/rules/measuring-text.md +143 -0
  1194. package/skills/remotion/rules/sequencing.md +106 -0
  1195. package/skills/remotion/rules/tailwind.md +11 -0
  1196. package/skills/remotion/rules/text-animations.md +20 -0
  1197. package/skills/remotion/rules/timing.md +179 -0
  1198. package/skills/remotion/rules/transcribe-captions.md +19 -0
  1199. package/skills/remotion/rules/transitions.md +122 -0
  1200. package/skills/remotion/rules/trimming.md +53 -0
  1201. package/skills/remotion/rules/videos.md +171 -0
  1202. package/skills/repomix/SKILL.md +257 -0
  1203. package/skills/repomix/references/configuration.md +211 -0
  1204. package/skills/repomix/references/usage-patterns.md +232 -0
  1205. package/skills/repomix/scripts/README.md +179 -0
  1206. package/skills/repomix/scripts/repomix_batch.py +455 -0
  1207. package/skills/repomix/scripts/repos.example.json +15 -0
  1208. package/skills/repomix/scripts/requirements.txt +15 -0
  1209. package/skills/repomix/scripts/tests/test_repomix_batch.py +531 -0
  1210. package/skills/research/SKILL.md +201 -0
  1211. package/skills/research-prompt/LICENSE.txt +21 -0
  1212. package/skills/research-prompt/SKILL.md +57 -0
  1213. package/skills/retro/SKILL.md +150 -0
  1214. package/skills/retro/references/metrics-guide.md +133 -0
  1215. package/skills/retro/references/report-template.md +110 -0
  1216. package/skills/review/SKILL.md +41 -0
  1217. package/skills/review-pr/SKILL.md +567 -0
  1218. package/skills/review-pr/references/anti-ai-slop.md +235 -0
  1219. package/skills/review-pr/references/gh-api-helpers.sh +185 -0
  1220. package/skills/review-pr/references/pr-body-contract.md +53 -0
  1221. package/skills/review-pr/references/project-rules-example.md +101 -0
  1222. package/skills/review-pr/references/writing-language.md +58 -0
  1223. package/skills/scenario/SKILL.md +229 -0
  1224. package/skills/scout/SKILL.md +147 -0
  1225. package/skills/scout/references/external-scouting.md +85 -0
  1226. package/skills/scout/references/internal-scouting.md +148 -0
  1227. package/skills/security/SKILL.md +196 -0
  1228. package/skills/security/references/red-team-personas.md +188 -0
  1229. package/skills/security/references/stride-owasp-checklist.md +128 -0
  1230. package/skills/security-scan/SKILL.md +145 -0
  1231. package/skills/security-scan/references/secret-patterns.md +77 -0
  1232. package/skills/security-scan/references/vulnerability-patterns.md +105 -0
  1233. package/skills/sequential-thinking/.env.example +8 -0
  1234. package/skills/sequential-thinking/README.md +183 -0
  1235. package/skills/sequential-thinking/SKILL.md +101 -0
  1236. package/skills/sequential-thinking/package.json +31 -0
  1237. package/skills/sequential-thinking/references/advanced-strategies.md +79 -0
  1238. package/skills/sequential-thinking/references/advanced-techniques.md +76 -0
  1239. package/skills/sequential-thinking/references/core-patterns.md +95 -0
  1240. package/skills/sequential-thinking/references/examples-api.md +88 -0
  1241. package/skills/sequential-thinking/references/examples-architecture.md +94 -0
  1242. package/skills/sequential-thinking/references/examples-debug.md +90 -0
  1243. package/skills/sequential-thinking/scripts/format-thought.js +159 -0
  1244. package/skills/sequential-thinking/scripts/process-thought.js +236 -0
  1245. package/skills/sequential-thinking/tests/format-thought.test.js +133 -0
  1246. package/skills/sequential-thinking/tests/process-thought.test.js +215 -0
  1247. package/skills/shader/SKILL.md +119 -0
  1248. package/skills/shader/references/glsl-cellular-voronoi-worley-noise-patterns.md +142 -0
  1249. package/skills/shader/references/glsl-colors-rgb-hsb-gradients-mixing-color-spaces.md +143 -0
  1250. package/skills/shader/references/glsl-fbm-fractional-brownian-motion-turbulence-octaves.md +146 -0
  1251. package/skills/shader/references/glsl-fundamentals-data-types-vectors-precision-coordinates.md +104 -0
  1252. package/skills/shader/references/glsl-noise-random-perlin-simplex-cellular-voronoi.md +115 -0
  1253. package/skills/shader/references/glsl-pattern-symmetry-truchet-domain-warping.md +134 -0
  1254. package/skills/shader/references/glsl-patterns-tiling-fract-matrices-transformations.md +133 -0
  1255. package/skills/shader/references/glsl-procedural-textures-clouds-marble-wood-terrain.md +144 -0
  1256. package/skills/shader/references/glsl-shader-builtin-functions-complete-api-reference.md +112 -0
  1257. package/skills/shader/references/glsl-shapes-polygon-star-polar-sdf-combinations.md +124 -0
  1258. package/skills/shader/references/glsl-shapes-sdf-circles-rectangles-polar-distance-fields.md +106 -0
  1259. package/skills/shader/references/glsl-shaping-functions-step-smoothstep-curves-interpolation.md +141 -0
  1260. package/skills/ship/SKILL.md +244 -0
  1261. package/skills/ship/references/auto-detect.md +103 -0
  1262. package/skills/ship/references/dual-stage-workflow.md +86 -0
  1263. package/skills/ship/references/pr-template.md +87 -0
  1264. package/skills/ship/references/release-and-social-workflow.md +117 -0
  1265. package/skills/ship/references/review-and-merge-workflow.md +31 -0
  1266. package/skills/ship/references/ship-workflow.md +294 -0
  1267. package/skills/ship/scripts/compose-build-in-public.cjs +257 -0
  1268. package/skills/ship/scripts/compose-build-in-public.test.cjs +125 -0
  1269. package/skills/shopify/README.md +66 -0
  1270. package/skills/shopify/SKILL.md +327 -0
  1271. package/skills/shopify/references/app-development.md +470 -0
  1272. package/skills/shopify/references/extensions.md +493 -0
  1273. package/skills/shopify/references/themes.md +498 -0
  1274. package/skills/shopify/scripts/requirements.txt +19 -0
  1275. package/skills/shopify/scripts/shopify_init.py +423 -0
  1276. package/skills/shopify/scripts/tests/test_shopify_init.py +385 -0
  1277. package/skills/show-off/SKILL.md +244 -0
  1278. package/skills/show-off/scripts/capture-sections.js +310 -0
  1279. package/skills/show-off/scripts/package.json +16 -0
  1280. package/skills/show-off/scripts/preferences.js +228 -0
  1281. package/skills/show-off/scripts/preferences.test.js +94 -0
  1282. package/skills/skill-creator/LICENSE-MIT.txt +21 -0
  1283. package/skills/skill-creator/LICENSE.txt +202 -0
  1284. package/skills/skill-creator/SKILL.md +156 -0
  1285. package/skills/skill-creator/references/benchmark-optimization-guide.md +86 -0
  1286. package/skills/skill-creator/references/cross-marketplace-distribution.md +262 -0
  1287. package/skills/skill-creator/references/distribution-guide.md +79 -0
  1288. package/skills/skill-creator/references/mcp-skills-integration.md +71 -0
  1289. package/skills/skill-creator/references/metadata-quality-criteria.md +94 -0
  1290. package/skills/skill-creator/references/plugin-marketplace-hosting.md +104 -0
  1291. package/skills/skill-creator/references/plugin-marketplace-overview.md +90 -0
  1292. package/skills/skill-creator/references/plugin-marketplace-schema.md +93 -0
  1293. package/skills/skill-creator/references/plugin-marketplace-sources.md +103 -0
  1294. package/skills/skill-creator/references/plugin-marketplace-troubleshooting.md +76 -0
  1295. package/skills/skill-creator/references/script-dependency-strategy.md +141 -0
  1296. package/skills/skill-creator/references/script-quality-criteria.md +151 -0
  1297. package/skills/skill-creator/references/skill-anatomy-and-requirements.md +77 -0
  1298. package/skills/skill-creator/references/skill-creation-workflow.md +160 -0
  1299. package/skills/skill-creator/references/skill-design-patterns.md +75 -0
  1300. package/skills/skill-creator/references/skill-ecosystem-portability-and-safety.md +60 -0
  1301. package/skills/skill-creator/references/skillmark-benchmark-criteria.md +102 -0
  1302. package/skills/skill-creator/references/structure-organization-criteria.md +114 -0
  1303. package/skills/skill-creator/references/testing-and-iteration.md +78 -0
  1304. package/skills/skill-creator/references/token-efficiency-criteria.md +74 -0
  1305. package/skills/skill-creator/references/troubleshooting-guide.md +81 -0
  1306. package/skills/skill-creator/references/validation-checklist.md +83 -0
  1307. package/skills/skill-creator/references/writing-effective-instructions.md +88 -0
  1308. package/skills/skill-creator/references/yaml-frontmatter-reference.md +92 -0
  1309. package/skills/skill-creator/scripts/encoding_utils.py +36 -0
  1310. package/skills/skill-creator/scripts/init_skill.py +371 -0
  1311. package/skills/skill-creator/scripts/package_skill.py +161 -0
  1312. package/skills/skill-creator/scripts/quick_validate.py +110 -0
  1313. package/skills/sowat/SKILL.md +41 -0
  1314. package/skills/stitch/SKILL.md +193 -0
  1315. package/skills/stitch/data/mcp-config-snippet.json +11 -0
  1316. package/skills/stitch/references/design-to-code-pipeline.md +128 -0
  1317. package/skills/stitch/references/quota-management.md +64 -0
  1318. package/skills/stitch/references/stitch-mcp-setup.md +95 -0
  1319. package/skills/stitch/references/stitch-sdk-api.md +136 -0
  1320. package/skills/stitch/scripts/package.json +17 -0
  1321. package/skills/stitch/scripts/stitch-export.ts +241 -0
  1322. package/skills/stitch/scripts/stitch-generate.ts +242 -0
  1323. package/skills/stitch/scripts/stitch-quota.ts +123 -0
  1324. package/skills/sumup/SKILL.md +48 -0
  1325. package/skills/tanstack/SKILL.md +148 -0
  1326. package/skills/tanstack/references/tanstack-ai.md +97 -0
  1327. package/skills/tanstack/references/tanstack-form.md +125 -0
  1328. package/skills/tanstack/references/tanstack-start.md +100 -0
  1329. package/skills/team/SKILL.md +226 -0
  1330. package/skills/team/references/agent-teams-controls-and-modes.md +53 -0
  1331. package/skills/team/references/agent-teams-examples-and-best-practices.md +145 -0
  1332. package/skills/team/references/agent-teams-official-docs.md +67 -0
  1333. package/skills/team/references/team-coordination-rules.md +92 -0
  1334. package/skills/tech-graph/LICENSE +21 -0
  1335. package/skills/tech-graph/README.md +524 -0
  1336. package/skills/tech-graph/SKILL.md +445 -0
  1337. package/skills/tech-graph/agents/openai.yaml +4 -0
  1338. package/skills/tech-graph/fixtures/agent-memory-types-style4.json +181 -0
  1339. package/skills/tech-graph/fixtures/api-flow-style7.json +40 -0
  1340. package/skills/tech-graph/fixtures/mem0-style1.json +297 -0
  1341. package/skills/tech-graph/fixtures/microservices-style3.json +64 -0
  1342. package/skills/tech-graph/fixtures/multi-agent-style5.json +45 -0
  1343. package/skills/tech-graph/fixtures/system-architecture-style6.json +48 -0
  1344. package/skills/tech-graph/fixtures/tool-call-style2.json +182 -0
  1345. package/skills/tech-graph/references/icons.md +406 -0
  1346. package/skills/tech-graph/references/style-1-flat-icon.md +108 -0
  1347. package/skills/tech-graph/references/style-2-dark-terminal.md +107 -0
  1348. package/skills/tech-graph/references/style-3-blueprint.md +113 -0
  1349. package/skills/tech-graph/references/style-4-notion-clean.md +95 -0
  1350. package/skills/tech-graph/references/style-5-glassmorphism.md +125 -0
  1351. package/skills/tech-graph/references/style-6-claude-official.md +209 -0
  1352. package/skills/tech-graph/references/style-7-openai.md +215 -0
  1353. package/skills/tech-graph/references/style-diagram-matrix.md +135 -0
  1354. package/skills/tech-graph/references/svg-layout-best-practices.md +100 -0
  1355. package/skills/tech-graph/scripts/README.md +244 -0
  1356. package/skills/tech-graph/scripts/generate-diagram.sh +157 -0
  1357. package/skills/tech-graph/scripts/generate-from-template.py +1556 -0
  1358. package/skills/tech-graph/scripts/test-all-styles.sh +135 -0
  1359. package/skills/tech-graph/scripts/validate-svg.sh +292 -0
  1360. package/skills/tech-graph/templates/agent-architecture.svg +28 -0
  1361. package/skills/tech-graph/templates/architecture.svg +23 -0
  1362. package/skills/tech-graph/templates/comparison-matrix.svg +14 -0
  1363. package/skills/tech-graph/templates/data-flow.svg +28 -0
  1364. package/skills/tech-graph/templates/er-diagram.svg +21 -0
  1365. package/skills/tech-graph/templates/flowchart.svg +21 -0
  1366. package/skills/tech-graph/templates/sequence.svg +20 -0
  1367. package/skills/tech-graph/templates/state-machine.svg +20 -0
  1368. package/skills/tech-graph/templates/timeline.svg +19 -0
  1369. package/skills/tech-graph/templates/use-case.svg +21 -0
  1370. package/skills/test/SKILL.md +200 -0
  1371. package/skills/test/references/audit-suite-workflow.md +70 -0
  1372. package/skills/test/references/create-suite-workflow.md +60 -0
  1373. package/skills/test/references/optimize-suite-workflow.md +61 -0
  1374. package/skills/test/references/report-format.md +58 -0
  1375. package/skills/test/references/test-execution-workflow.md +103 -0
  1376. package/skills/test/references/ui-testing-workflow.md +64 -0
  1377. package/skills/threejs/SKILL.md +148 -0
  1378. package/skills/threejs/data/api-reference.csv +61 -0
  1379. package/skills/threejs/data/categories.csv +14 -0
  1380. package/skills/threejs/data/examples-all.csv +557 -0
  1381. package/skills/threejs/data/use-cases.csv +21 -0
  1382. package/skills/threejs/references/00-fundamentals.md +487 -0
  1383. package/skills/threejs/references/01-getting-started.md +177 -0
  1384. package/skills/threejs/references/02-loaders.md +169 -0
  1385. package/skills/threejs/references/03-textures.md +170 -0
  1386. package/skills/threejs/references/04-cameras.md +195 -0
  1387. package/skills/threejs/references/05-lights.md +183 -0
  1388. package/skills/threejs/references/06-animations.md +214 -0
  1389. package/skills/threejs/references/07-math.md +260 -0
  1390. package/skills/threejs/references/08-interaction.md +267 -0
  1391. package/skills/threejs/references/09-postprocessing.md +240 -0
  1392. package/skills/threejs/references/10-controls.md +259 -0
  1393. package/skills/threejs/references/11-materials-advanced.md +270 -0
  1394. package/skills/threejs/references/11-materials.md +519 -0
  1395. package/skills/threejs/references/12-performance.md +269 -0
  1396. package/skills/threejs/references/13-node-materials.md +298 -0
  1397. package/skills/threejs/references/14-physics-vr.md +304 -0
  1398. package/skills/threejs/references/15-specialized-loaders.md +333 -0
  1399. package/skills/threejs/references/16-webgpu.md +302 -0
  1400. package/skills/threejs/references/17-shader.md +641 -0
  1401. package/skills/threejs/references/18-geometry.md +547 -0
  1402. package/skills/threejs/scripts/core.py +236 -0
  1403. package/skills/threejs/scripts/extract_examples.py +688 -0
  1404. package/skills/threejs/scripts/generate_csv_from_json.py +135 -0
  1405. package/skills/threejs/scripts/search.py +77 -0
  1406. package/skills/ui-styling/LICENSE.txt +202 -0
  1407. package/skills/ui-styling/SKILL.md +328 -0
  1408. package/skills/ui-styling/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  1409. package/skills/ui-styling/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  1410. package/skills/ui-styling/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  1411. package/skills/ui-styling/canvas-fonts/BigShoulders-OFL.txt +93 -0
  1412. package/skills/ui-styling/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  1413. package/skills/ui-styling/canvas-fonts/Boldonse-OFL.txt +93 -0
  1414. package/skills/ui-styling/canvas-fonts/Boldonse-Regular.ttf +0 -0
  1415. package/skills/ui-styling/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  1416. package/skills/ui-styling/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  1417. package/skills/ui-styling/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  1418. package/skills/ui-styling/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  1419. package/skills/ui-styling/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  1420. package/skills/ui-styling/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  1421. package/skills/ui-styling/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  1422. package/skills/ui-styling/canvas-fonts/DMMono-OFL.txt +93 -0
  1423. package/skills/ui-styling/canvas-fonts/DMMono-Regular.ttf +0 -0
  1424. package/skills/ui-styling/canvas-fonts/EricaOne-OFL.txt +94 -0
  1425. package/skills/ui-styling/canvas-fonts/EricaOne-Regular.ttf +0 -0
  1426. package/skills/ui-styling/canvas-fonts/GeistMono-Bold.ttf +0 -0
  1427. package/skills/ui-styling/canvas-fonts/GeistMono-OFL.txt +93 -0
  1428. package/skills/ui-styling/canvas-fonts/GeistMono-Regular.ttf +0 -0
  1429. package/skills/ui-styling/canvas-fonts/Gloock-OFL.txt +93 -0
  1430. package/skills/ui-styling/canvas-fonts/Gloock-Regular.ttf +0 -0
  1431. package/skills/ui-styling/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  1432. package/skills/ui-styling/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  1433. package/skills/ui-styling/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  1434. package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  1435. package/skills/ui-styling/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  1436. package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  1437. package/skills/ui-styling/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  1438. package/skills/ui-styling/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  1439. package/skills/ui-styling/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  1440. package/skills/ui-styling/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  1441. package/skills/ui-styling/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  1442. package/skills/ui-styling/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  1443. package/skills/ui-styling/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  1444. package/skills/ui-styling/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  1445. package/skills/ui-styling/canvas-fonts/Italiana-OFL.txt +93 -0
  1446. package/skills/ui-styling/canvas-fonts/Italiana-Regular.ttf +0 -0
  1447. package/skills/ui-styling/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  1448. package/skills/ui-styling/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  1449. package/skills/ui-styling/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  1450. package/skills/ui-styling/canvas-fonts/Jura-Light.ttf +0 -0
  1451. package/skills/ui-styling/canvas-fonts/Jura-Medium.ttf +0 -0
  1452. package/skills/ui-styling/canvas-fonts/Jura-OFL.txt +93 -0
  1453. package/skills/ui-styling/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  1454. package/skills/ui-styling/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  1455. package/skills/ui-styling/canvas-fonts/Lora-Bold.ttf +0 -0
  1456. package/skills/ui-styling/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  1457. package/skills/ui-styling/canvas-fonts/Lora-Italic.ttf +0 -0
  1458. package/skills/ui-styling/canvas-fonts/Lora-OFL.txt +93 -0
  1459. package/skills/ui-styling/canvas-fonts/Lora-Regular.ttf +0 -0
  1460. package/skills/ui-styling/canvas-fonts/NationalPark-Bold.ttf +0 -0
  1461. package/skills/ui-styling/canvas-fonts/NationalPark-OFL.txt +93 -0
  1462. package/skills/ui-styling/canvas-fonts/NationalPark-Regular.ttf +0 -0
  1463. package/skills/ui-styling/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  1464. package/skills/ui-styling/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  1465. package/skills/ui-styling/canvas-fonts/Outfit-Bold.ttf +0 -0
  1466. package/skills/ui-styling/canvas-fonts/Outfit-OFL.txt +93 -0
  1467. package/skills/ui-styling/canvas-fonts/Outfit-Regular.ttf +0 -0
  1468. package/skills/ui-styling/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  1469. package/skills/ui-styling/canvas-fonts/PixelifySans-OFL.txt +93 -0
  1470. package/skills/ui-styling/canvas-fonts/PoiretOne-OFL.txt +93 -0
  1471. package/skills/ui-styling/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  1472. package/skills/ui-styling/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  1473. package/skills/ui-styling/canvas-fonts/RedHatMono-OFL.txt +93 -0
  1474. package/skills/ui-styling/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  1475. package/skills/ui-styling/canvas-fonts/Silkscreen-OFL.txt +93 -0
  1476. package/skills/ui-styling/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  1477. package/skills/ui-styling/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  1478. package/skills/ui-styling/canvas-fonts/SmoochSans-OFL.txt +93 -0
  1479. package/skills/ui-styling/canvas-fonts/Tektur-Medium.ttf +0 -0
  1480. package/skills/ui-styling/canvas-fonts/Tektur-OFL.txt +93 -0
  1481. package/skills/ui-styling/canvas-fonts/Tektur-Regular.ttf +0 -0
  1482. package/skills/ui-styling/canvas-fonts/WorkSans-Bold.ttf +0 -0
  1483. package/skills/ui-styling/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  1484. package/skills/ui-styling/canvas-fonts/WorkSans-Italic.ttf +0 -0
  1485. package/skills/ui-styling/canvas-fonts/WorkSans-OFL.txt +93 -0
  1486. package/skills/ui-styling/canvas-fonts/WorkSans-Regular.ttf +0 -0
  1487. package/skills/ui-styling/canvas-fonts/YoungSerif-OFL.txt +93 -0
  1488. package/skills/ui-styling/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  1489. package/skills/ui-styling/references/canvas-design-system.md +320 -0
  1490. package/skills/ui-styling/references/shadcn-accessibility.md +471 -0
  1491. package/skills/ui-styling/references/shadcn-components.md +424 -0
  1492. package/skills/ui-styling/references/shadcn-theming.md +373 -0
  1493. package/skills/ui-styling/references/tailwind-customization.md +483 -0
  1494. package/skills/ui-styling/references/tailwind-responsive.md +382 -0
  1495. package/skills/ui-styling/references/tailwind-utilities.md +455 -0
  1496. package/skills/ui-styling/scripts/requirements.txt +17 -0
  1497. package/skills/ui-styling/scripts/shadcn_add.py +292 -0
  1498. package/skills/ui-styling/scripts/tailwind_config_gen.py +456 -0
  1499. package/skills/ui-styling/scripts/tests/coverage-ui.json +1 -0
  1500. package/skills/ui-styling/scripts/tests/requirements.txt +3 -0
  1501. package/skills/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
  1502. package/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +336 -0
  1503. package/skills/ui-ux-pro-max/SKILL.md +666 -0
  1504. package/skills/ui-ux-pro-max/data/_sync_all.py +414 -0
  1505. package/skills/ui-ux-pro-max/data/app-interface.csv +31 -0
  1506. package/skills/ui-ux-pro-max/data/charts.csv +26 -0
  1507. package/skills/ui-ux-pro-max/data/colors.csv +162 -0
  1508. package/skills/ui-ux-pro-max/data/design.csv +1776 -0
  1509. package/skills/ui-ux-pro-max/data/draft.csv +1779 -0
  1510. package/skills/ui-ux-pro-max/data/google-fonts.csv +1924 -0
  1511. package/skills/ui-ux-pro-max/data/icons.csv +106 -0
  1512. package/skills/ui-ux-pro-max/data/landing.csv +35 -0
  1513. package/skills/ui-ux-pro-max/data/products.csv +162 -0
  1514. package/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  1515. package/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  1516. package/skills/ui-ux-pro-max/data/styles.csv +85 -0
  1517. package/skills/ui-ux-pro-max/data/typography.csv +74 -0
  1518. package/skills/ui-ux-pro-max/data/ui-reasoning.csv +162 -0
  1519. package/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  1520. package/skills/ui-ux-pro-max/scripts/core.py +247 -0
  1521. package/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  1522. package/skills/ui-ux-pro-max/scripts/search.py +114 -0
  1523. package/skills/use-mcp/SKILL.md +82 -0
  1524. package/skills/use-mcp/assets/tools.json +3146 -0
  1525. package/skills/use-mcp/references/configuration.md +115 -0
  1526. package/skills/use-mcp/references/gemini-cli-integration.md +24 -0
  1527. package/skills/use-mcp/references/mcp-protocol.md +116 -0
  1528. package/skills/use-mcp/scripts/.env.example +10 -0
  1529. package/skills/use-mcp/scripts/cli.ts +195 -0
  1530. package/skills/use-mcp/scripts/mcp-client.ts +230 -0
  1531. package/skills/use-mcp/scripts/package.json +20 -0
  1532. package/skills/use-mcp/scripts/smoke-test.sh +82 -0
  1533. package/skills/use-mcp/scripts/tsconfig.json +15 -0
  1534. package/skills/vibe/SKILL.md +287 -0
  1535. package/skills/watzup/SKILL.md +80 -0
  1536. package/skills/watzup/scripts/lib/checkboxes.cjs +69 -0
  1537. package/skills/watzup/scripts/lib/priority.cjs +149 -0
  1538. package/skills/watzup/scripts/lib/roadmap.cjs +102 -0
  1539. package/skills/watzup/scripts/watzup-scan.cjs +534 -0
  1540. package/skills/watzup/scripts/watzup-scan.test.cjs +392 -0
  1541. package/skills/web-design-guidelines/SKILL.md +43 -0
  1542. package/skills/web-frameworks/SKILL.md +332 -0
  1543. package/skills/web-frameworks/references/nextjs-app-router.md +465 -0
  1544. package/skills/web-frameworks/references/nextjs-data-fetching.md +459 -0
  1545. package/skills/web-frameworks/references/nextjs-optimization.md +511 -0
  1546. package/skills/web-frameworks/references/nextjs-server-components.md +495 -0
  1547. package/skills/web-frameworks/references/remix-icon-integration.md +603 -0
  1548. package/skills/web-frameworks/references/turborepo-caching.md +551 -0
  1549. package/skills/web-frameworks/references/turborepo-pipelines.md +517 -0
  1550. package/skills/web-frameworks/references/turborepo-setup.md +542 -0
  1551. package/skills/web-frameworks/scripts/__init__.py +0 -0
  1552. package/skills/web-frameworks/scripts/nextjs_init.py +547 -0
  1553. package/skills/web-frameworks/scripts/requirements.txt +16 -0
  1554. package/skills/web-frameworks/scripts/tests/coverage-web.json +1 -0
  1555. package/skills/web-frameworks/scripts/tests/requirements.txt +3 -0
  1556. package/skills/web-frameworks/scripts/tests/test_nextjs_init.py +319 -0
  1557. package/skills/web-frameworks/scripts/tests/test_turborepo_migrate.py +374 -0
  1558. package/skills/web-frameworks/scripts/turborepo_migrate.py +394 -0
  1559. package/skills/web-testing/SKILL.md +103 -0
  1560. package/skills/web-testing/references/accessibility-testing.md +84 -0
  1561. package/skills/web-testing/references/api-testing.md +78 -0
  1562. package/skills/web-testing/references/ci-cd-testing-workflows.md +121 -0
  1563. package/skills/web-testing/references/component-testing.md +94 -0
  1564. package/skills/web-testing/references/contract-testing.md +146 -0
  1565. package/skills/web-testing/references/cross-browser-checklist.md +72 -0
  1566. package/skills/web-testing/references/database-testing.md +139 -0
  1567. package/skills/web-testing/references/e2e-testing-playwright.md +119 -0
  1568. package/skills/web-testing/references/functional-testing-checklist.md +88 -0
  1569. package/skills/web-testing/references/interactive-testing-patterns.md +89 -0
  1570. package/skills/web-testing/references/load-testing-k6.md +93 -0
  1571. package/skills/web-testing/references/mobile-gesture-testing.md +85 -0
  1572. package/skills/web-testing/references/performance-core-web-vitals.md +124 -0
  1573. package/skills/web-testing/references/playwright-component-testing.md +115 -0
  1574. package/skills/web-testing/references/pre-release-checklist.md +75 -0
  1575. package/skills/web-testing/references/security-checklists.md +81 -0
  1576. package/skills/web-testing/references/security-testing-overview.md +92 -0
  1577. package/skills/web-testing/references/shadow-dom-testing.md +70 -0
  1578. package/skills/web-testing/references/test-data-management.md +131 -0
  1579. package/skills/web-testing/references/test-flakiness-mitigation.md +86 -0
  1580. package/skills/web-testing/references/testing-pyramid-strategy.md +76 -0
  1581. package/skills/web-testing/references/unit-integration-testing.md +138 -0
  1582. package/skills/web-testing/references/visual-regression.md +92 -0
  1583. package/skills/web-testing/references/vulnerability-payloads.md +93 -0
  1584. package/skills/web-testing/scripts/analyze-test-results.js +280 -0
  1585. package/skills/web-testing/scripts/init-playwright.js +233 -0
  1586. package/skills/web-testing/skill.yaml +17 -0
  1587. package/skills/worktree/SKILL.md +174 -0
  1588. package/skills/worktree/scripts/mini-yaml-parser.cjs +232 -0
  1589. package/skills/worktree/scripts/resolve-worktree-root.cjs +266 -0
  1590. package/skills/worktree/scripts/resolve-worktree-root.test.cjs +257 -0
  1591. package/skills/worktree/scripts/worktree.cjs +1337 -0
  1592. package/skills/worktree/scripts/worktree.test.cjs +1127 -0
  1593. package/skills/xia/SKILL.md +197 -0
  1594. package/skills/xia/intro.html +487 -0
  1595. package/skills/xia/references/challenge-framework.md +40 -0
@@ -0,0 +1,1556 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Style-driven SVG diagram generator.
4
+
5
+ Usage:
6
+ python3 generate-from-template.py <template-type> <output-path> [data-json]
7
+
8
+ This generator intentionally does more than "fill a template".
9
+ It encodes the visual language from the documented style guides so the output
10
+ tracks the showcase quality more closely than the previous generic renderer.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import copy
16
+ import json
17
+ import math
18
+ import os
19
+ import re
20
+ import sys
21
+ from dataclasses import dataclass
22
+ from typing import Dict, Iterable, List, Optional, Sequence, Tuple
23
+ from xml.sax.saxutils import escape
24
+
25
+ Point = Tuple[float, float]
26
+ Bounds = Tuple[float, float, float, float]
27
+
28
+ SCRIPT_DIR = os.path.dirname(__file__)
29
+ TEMPLATE_DIR = os.path.join(SCRIPT_DIR, "..", "templates")
30
+ DEFAULT_VIEWBOX = {
31
+ "architecture": (960, 600),
32
+ "data-flow": (960, 600),
33
+ "flowchart": (960, 640),
34
+ "sequence": (960, 700),
35
+ "comparison": (960, 620),
36
+ "timeline": (960, 520),
37
+ "mind-map": (960, 620),
38
+ "agent": (960, 700),
39
+ "memory": (960, 720),
40
+ "use-case": (960, 600),
41
+ "class": (960, 700),
42
+ "state-machine": (960, 620),
43
+ "er-diagram": (960, 680),
44
+ "network-topology": (960, 620),
45
+ }
46
+
47
+ FLOW_ALIASES = {
48
+ "main": "control",
49
+ "api": "control",
50
+ "control": "control",
51
+ "write": "write",
52
+ "read": "read",
53
+ "data": "data",
54
+ "async": "async",
55
+ "feedback": "feedback",
56
+ "neutral": "neutral",
57
+ }
58
+
59
+ MARKER_IDS = {
60
+ "control": "arrowA",
61
+ "write": "arrowB",
62
+ "read": "arrowC",
63
+ "data": "arrowE",
64
+ "async": "arrowF",
65
+ "feedback": "arrowG",
66
+ "neutral": "arrowH",
67
+ }
68
+
69
+ STYLE_PROFILES: Dict[int, Dict[str, object]] = {
70
+ 1: {
71
+ "name": "Flat Icon",
72
+ "font_family": "'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif",
73
+ "background": "#ffffff",
74
+ "shadow": True,
75
+ "title_align": "center",
76
+ "title_fill": "#111827",
77
+ "title_size": 30,
78
+ "subtitle_fill": "#6b7280",
79
+ "subtitle_size": 14,
80
+ "node_fill": "#ffffff",
81
+ "node_stroke": "#d1d5db",
82
+ "node_radius": 10,
83
+ "node_shadow": "url(#shadowSoft)",
84
+ "section_fill": "none",
85
+ "section_stroke": "#dbe5f1",
86
+ "section_dash": "6 5",
87
+ "section_label_fill": "#2563eb",
88
+ "section_sub_fill": "#94a3b8",
89
+ "title_divider": False,
90
+ "section_upper": True,
91
+ "arrow_width": 2.4,
92
+ "arrow_colors": {
93
+ "control": "#7c3aed",
94
+ "write": "#10b981",
95
+ "read": "#2563eb",
96
+ "data": "#f97316",
97
+ "async": "#7c3aed",
98
+ "feedback": "#ef4444",
99
+ "neutral": "#6b7280",
100
+ },
101
+ "arrow_label_bg": "#ffffff",
102
+ "arrow_label_opacity": 0.94,
103
+ "arrow_label_fill": "#6b7280",
104
+ "type_label_fill": "#9ca3af",
105
+ "type_label_size": 12,
106
+ "text_primary": "#111827",
107
+ "text_secondary": "#6b7280",
108
+ "text_muted": "#94a3b8",
109
+ "legend_fill": "#6b7280",
110
+ },
111
+ 2: {
112
+ "name": "Dark Terminal",
113
+ "font_family": "'SF Mono', 'Fira Code', Menlo, 'Microsoft YaHei', 'SimHei', monospace",
114
+ "background": "#0f172a",
115
+ "shadow": False,
116
+ "title_align": "center",
117
+ "title_fill": "#e2e8f0",
118
+ "title_size": 30,
119
+ "subtitle_fill": "#94a3b8",
120
+ "subtitle_size": 14,
121
+ "node_fill": "#111827",
122
+ "node_stroke": "#334155",
123
+ "node_radius": 10,
124
+ "node_shadow": "",
125
+ "section_fill": "rgba(15,23,42,0.28)",
126
+ "section_stroke": "#334155",
127
+ "section_dash": "7 6",
128
+ "section_label_fill": "#38bdf8",
129
+ "section_sub_fill": "#64748b",
130
+ "title_divider": False,
131
+ "section_upper": True,
132
+ "arrow_width": 2.3,
133
+ "arrow_colors": {
134
+ "control": "#a855f7",
135
+ "write": "#22c55e",
136
+ "read": "#38bdf8",
137
+ "data": "#fb7185",
138
+ "async": "#f59e0b",
139
+ "feedback": "#f97316",
140
+ "neutral": "#94a3b8",
141
+ },
142
+ "arrow_label_bg": "#0f172a",
143
+ "arrow_label_opacity": 0.92,
144
+ "arrow_label_fill": "#cbd5e1",
145
+ "type_label_fill": "#64748b",
146
+ "type_label_size": 12,
147
+ "text_primary": "#e2e8f0",
148
+ "text_secondary": "#94a3b8",
149
+ "text_muted": "#64748b",
150
+ "legend_fill": "#94a3b8",
151
+ },
152
+ 3: {
153
+ "name": "Blueprint",
154
+ "font_family": "'SF Mono', 'Fira Code', Menlo, 'Microsoft YaHei', 'SimHei', monospace",
155
+ "background": "#082f49",
156
+ "shadow": False,
157
+ "title_align": "center",
158
+ "title_fill": "#e0f2fe",
159
+ "title_size": 30,
160
+ "subtitle_fill": "#7dd3fc",
161
+ "subtitle_size": 14,
162
+ "node_fill": "#0b3b5e",
163
+ "node_stroke": "#67e8f9",
164
+ "node_radius": 8,
165
+ "node_shadow": "",
166
+ "section_fill": "none",
167
+ "section_stroke": "#0ea5e9",
168
+ "section_dash": "6 4",
169
+ "section_label_fill": "#67e8f9",
170
+ "section_sub_fill": "#7dd3fc",
171
+ "title_divider": False,
172
+ "section_upper": True,
173
+ "arrow_width": 2.1,
174
+ "arrow_colors": {
175
+ "control": "#67e8f9",
176
+ "write": "#22d3ee",
177
+ "read": "#38bdf8",
178
+ "data": "#fde047",
179
+ "async": "#c084fc",
180
+ "feedback": "#fb7185",
181
+ "neutral": "#bae6fd",
182
+ },
183
+ "arrow_label_bg": "#082f49",
184
+ "arrow_label_opacity": 0.9,
185
+ "arrow_label_fill": "#e0f2fe",
186
+ "type_label_fill": "#7dd3fc",
187
+ "type_label_size": 11,
188
+ "text_primary": "#e0f2fe",
189
+ "text_secondary": "#bae6fd",
190
+ "text_muted": "#7dd3fc",
191
+ "legend_fill": "#bae6fd",
192
+ },
193
+ 4: {
194
+ "name": "Notion Clean",
195
+ "font_family": "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif",
196
+ "background": "#ffffff",
197
+ "shadow": False,
198
+ "title_align": "left",
199
+ "title_fill": "#111827",
200
+ "title_size": 18,
201
+ "subtitle_fill": "#9ca3af",
202
+ "subtitle_size": 13,
203
+ "node_fill": "#f9fafb",
204
+ "node_stroke": "#e5e7eb",
205
+ "node_radius": 4,
206
+ "node_shadow": "",
207
+ "section_fill": "none",
208
+ "section_stroke": "#e5e7eb",
209
+ "section_dash": "",
210
+ "section_label_fill": "#9ca3af",
211
+ "section_sub_fill": "#d1d5db",
212
+ "title_divider": True,
213
+ "section_upper": True,
214
+ "arrow_width": 1.8,
215
+ "arrow_colors": {
216
+ "control": "#3b82f6",
217
+ "write": "#3b82f6",
218
+ "read": "#3b82f6",
219
+ "data": "#3b82f6",
220
+ "async": "#9ca3af",
221
+ "feedback": "#9ca3af",
222
+ "neutral": "#d1d5db",
223
+ },
224
+ "arrow_label_bg": "#ffffff",
225
+ "arrow_label_opacity": 0.96,
226
+ "arrow_label_fill": "#6b7280",
227
+ "type_label_fill": "#9ca3af",
228
+ "type_label_size": 11,
229
+ "text_primary": "#111827",
230
+ "text_secondary": "#374151",
231
+ "text_muted": "#9ca3af",
232
+ "legend_fill": "#6b7280",
233
+ },
234
+ 5: {
235
+ "name": "Glassmorphism",
236
+ "font_family": "'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif",
237
+ "background": "#0f172a",
238
+ "shadow": True,
239
+ "title_align": "center",
240
+ "title_fill": "#f8fafc",
241
+ "title_size": 30,
242
+ "subtitle_fill": "#cbd5e1",
243
+ "subtitle_size": 14,
244
+ "node_fill": "rgba(255,255,255,0.12)",
245
+ "node_stroke": "rgba(255,255,255,0.28)",
246
+ "node_radius": 18,
247
+ "node_shadow": "url(#shadowGlass)",
248
+ "section_fill": "rgba(255,255,255,0.05)",
249
+ "section_stroke": "rgba(255,255,255,0.18)",
250
+ "section_dash": "7 6",
251
+ "section_label_fill": "#e2e8f0",
252
+ "section_sub_fill": "#94a3b8",
253
+ "title_divider": False,
254
+ "section_upper": True,
255
+ "arrow_width": 2.2,
256
+ "arrow_colors": {
257
+ "control": "#c084fc",
258
+ "write": "#34d399",
259
+ "read": "#60a5fa",
260
+ "data": "#fb923c",
261
+ "async": "#f472b6",
262
+ "feedback": "#f59e0b",
263
+ "neutral": "#cbd5e1",
264
+ },
265
+ "arrow_label_bg": "rgba(15,23,42,0.7)",
266
+ "arrow_label_opacity": 1,
267
+ "arrow_label_fill": "#e2e8f0",
268
+ "type_label_fill": "#cbd5e1",
269
+ "type_label_size": 12,
270
+ "text_primary": "#f8fafc",
271
+ "text_secondary": "#cbd5e1",
272
+ "text_muted": "#94a3b8",
273
+ "legend_fill": "#cbd5e1",
274
+ },
275
+ 6: {
276
+ "name": "Claude Official",
277
+ "font_family": "'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif",
278
+ "background": "#f8f6f3",
279
+ "shadow": False,
280
+ "title_align": "left",
281
+ "title_fill": "#141413",
282
+ "title_size": 24,
283
+ "subtitle_fill": "#8f8a80",
284
+ "subtitle_size": 13,
285
+ "node_fill": "#fffcf7",
286
+ "node_stroke": "#d9d0c3",
287
+ "node_radius": 10,
288
+ "node_shadow": "",
289
+ "section_fill": "none",
290
+ "section_stroke": "#ded8cf",
291
+ "section_dash": "5 4",
292
+ "section_label_fill": "#8b7355",
293
+ "section_sub_fill": "#b4aba0",
294
+ "title_divider": True,
295
+ "section_upper": True,
296
+ "arrow_width": 2.0,
297
+ "arrow_colors": {
298
+ "control": "#d97757",
299
+ "write": "#7b8b5c",
300
+ "read": "#8c6f5a",
301
+ "data": "#b45309",
302
+ "async": "#9a6fb0",
303
+ "feedback": "#d97757",
304
+ "neutral": "#8f8a80",
305
+ },
306
+ "arrow_label_bg": "#f8f6f3",
307
+ "arrow_label_opacity": 0.96,
308
+ "arrow_label_fill": "#6b6257",
309
+ "type_label_fill": "#a29a8f",
310
+ "type_label_size": 11,
311
+ "text_primary": "#141413",
312
+ "text_secondary": "#6b6257",
313
+ "text_muted": "#a29a8f",
314
+ "legend_fill": "#6b6257",
315
+ },
316
+ 7: {
317
+ "name": "OpenAI",
318
+ "font_family": "'Helvetica Neue', Helvetica, Arial, 'PingFang SC', 'Microsoft YaHei', 'Microsoft JhengHei', 'SimHei', sans-serif",
319
+ "background": "#ffffff",
320
+ "shadow": False,
321
+ "title_align": "left",
322
+ "title_fill": "#0f172a",
323
+ "title_size": 24,
324
+ "subtitle_fill": "#64748b",
325
+ "subtitle_size": 13,
326
+ "node_fill": "#ffffff",
327
+ "node_stroke": "#dce5e3",
328
+ "node_radius": 14,
329
+ "node_shadow": "",
330
+ "section_fill": "none",
331
+ "section_stroke": "#e2e8f0",
332
+ "section_dash": "5 4",
333
+ "section_label_fill": "#10a37f",
334
+ "section_sub_fill": "#94a3b8",
335
+ "title_divider": True,
336
+ "section_upper": True,
337
+ "arrow_width": 2.0,
338
+ "arrow_colors": {
339
+ "control": "#10a37f",
340
+ "write": "#0f766e",
341
+ "read": "#0891b2",
342
+ "data": "#f59e0b",
343
+ "async": "#64748b",
344
+ "feedback": "#10a37f",
345
+ "neutral": "#94a3b8",
346
+ },
347
+ "arrow_label_bg": "#ffffff",
348
+ "arrow_label_opacity": 0.96,
349
+ "arrow_label_fill": "#475569",
350
+ "type_label_fill": "#94a3b8",
351
+ "type_label_size": 11,
352
+ "text_primary": "#0f172a",
353
+ "text_secondary": "#475569",
354
+ "text_muted": "#94a3b8",
355
+ "legend_fill": "#475569",
356
+ },
357
+ }
358
+
359
+
360
+ @dataclass
361
+ class Node:
362
+ node_id: str
363
+ kind: str
364
+ shape: str
365
+ data: Dict[str, object]
366
+ bounds: Bounds
367
+ cx: float
368
+ cy: float
369
+
370
+
371
+ def style_value(style: Dict[str, object], key: str) -> object:
372
+ return style[key]
373
+
374
+
375
+ def to_float(value: object, default: float = 0.0) -> float:
376
+ try:
377
+ return float(value)
378
+ except (TypeError, ValueError):
379
+ return default
380
+
381
+
382
+ def normalize_text(value: object) -> str:
383
+ return escape(str(value)) if value is not None else ""
384
+
385
+
386
+ def parse_style(raw: object) -> Tuple[int, Dict[str, object]]:
387
+ if raw is None:
388
+ index = 1
389
+ elif isinstance(raw, int):
390
+ index = raw
391
+ else:
392
+ text = str(raw).strip().lower()
393
+ if text.isdigit():
394
+ index = int(text)
395
+ else:
396
+ names = {profile["name"].lower(): key for key, profile in STYLE_PROFILES.items()}
397
+ index = names.get(text, 1)
398
+ if index not in STYLE_PROFILES:
399
+ raise ValueError(f"Unsupported style: {raw}")
400
+ return index, copy.deepcopy(STYLE_PROFILES[index])
401
+
402
+
403
+ def parse_template_viewbox(template_type: str) -> Tuple[float, float]:
404
+ template_path = os.path.join(TEMPLATE_DIR, f"{template_type}.svg")
405
+ if os.path.exists(template_path):
406
+ content = open(template_path, "r", encoding="utf-8").read()
407
+ match = re.search(r'viewBox="0 0 ([0-9.]+) ([0-9.]+)"', content)
408
+ if match:
409
+ return float(match.group(1)), float(match.group(2))
410
+ return DEFAULT_VIEWBOX.get(template_type, (960, 600))
411
+
412
+
413
+ def render_defs(style_index: int, style: Dict[str, object]) -> str:
414
+ marker_size = "8" if style_index == 4 else "10"
415
+ marker_height = "6" if style_index == 4 else "7"
416
+ ref_x = "7" if style_index == 4 else "9"
417
+ ref_y = "3" if style_index == 4 else "3.5"
418
+ color_map = style_value(style, "arrow_colors")
419
+ marker_lines = []
420
+ for key, color in color_map.items():
421
+ marker_id = MARKER_IDS.get(key, "arrowA")
422
+ marker_lines.append(
423
+ f' <marker id="{marker_id}" markerWidth="{marker_size}" markerHeight="{marker_height}" '
424
+ f'refX="{ref_x}" refY="{ref_y}" orient="auto">'
425
+ )
426
+ if style_index == 4:
427
+ marker_lines.append(f' <polygon points="0 0, 8 3, 0 6" fill="{color}"/>')
428
+ else:
429
+ marker_lines.append(f' <polygon points="0 0, 10 3.5, 0 7" fill="{color}"/>')
430
+ marker_lines.append(" </marker>")
431
+
432
+ filters = []
433
+ if style_value(style, "shadow"):
434
+ filters.extend(
435
+ [
436
+ ' <filter id="shadowSoft" x="-20%" y="-20%" width="140%" height="160%">',
437
+ ' <feDropShadow dx="0" dy="3" stdDeviation="6" flood-color="#0f172a" flood-opacity="0.12"/>',
438
+ " </filter>",
439
+ ' <filter id="shadowGlass" x="-20%" y="-20%" width="140%" height="160%">',
440
+ ' <feDropShadow dx="0" dy="10" stdDeviation="16" flood-color="#020617" flood-opacity="0.28"/>',
441
+ " </filter>",
442
+ ]
443
+ )
444
+
445
+ if style_index == 3:
446
+ filters.extend(
447
+ [
448
+ ' <pattern id="blueprintGrid" width="32" height="32" patternUnits="userSpaceOnUse">',
449
+ ' <path d="M 32 0 L 0 0 0 32" fill="none" stroke="#0ea5e9" stroke-opacity="0.12" stroke-width="1"/>',
450
+ " </pattern>",
451
+ ]
452
+ )
453
+ if style_index == 2:
454
+ filters.extend(
455
+ [
456
+ ' <linearGradient id="terminalGradient" x1="0%" y1="0%" x2="100%" y2="100%">',
457
+ ' <stop offset="0%" stop-color="#0f0f1a"/>',
458
+ ' <stop offset="100%" stop-color="#1a1a2e"/>',
459
+ " </linearGradient>",
460
+ ' <filter id="glowBlue" x="-30%" y="-30%" width="160%" height="160%">',
461
+ ' <feDropShadow dx="0" dy="0" stdDeviation="5" flood-color="#3b82f6" flood-opacity="0.65"/>',
462
+ " </filter>",
463
+ ' <filter id="glowPurple" x="-30%" y="-30%" width="160%" height="160%">',
464
+ ' <feDropShadow dx="0" dy="0" stdDeviation="5" flood-color="#a855f7" flood-opacity="0.72"/>',
465
+ " </filter>",
466
+ ' <filter id="glowGreen" x="-30%" y="-30%" width="160%" height="160%">',
467
+ ' <feDropShadow dx="0" dy="0" stdDeviation="5" flood-color="#22c55e" flood-opacity="0.62"/>',
468
+ " </filter>",
469
+ ' <filter id="glowOrange" x="-30%" y="-30%" width="160%" height="160%">',
470
+ ' <feDropShadow dx="0" dy="0" stdDeviation="5" flood-color="#f97316" flood-opacity="0.62"/>',
471
+ " </filter>",
472
+ ]
473
+ )
474
+
475
+ styles = [
476
+ f" text {{ font-family: {style_value(style, 'font_family')}; }}",
477
+ f" .title {{ font-size: {style_value(style, 'title_size')}px; font-weight: 700; fill: {style_value(style, 'title_fill')}; }}",
478
+ f" .subtitle {{ font-size: {style_value(style, 'subtitle_size')}px; font-weight: 500; fill: {style_value(style, 'subtitle_fill')}; }}",
479
+ f" .section {{ font-size: 13px; font-weight: 700; fill: {style_value(style, 'section_label_fill')}; letter-spacing: 1.4px; }}",
480
+ f" .section-sub {{ font-size: 12px; font-weight: 500; fill: {style_value(style, 'section_sub_fill')}; }}",
481
+ f" .node-title {{ font-size: 18px; font-weight: 700; fill: {style_value(style, 'text_primary')}; }}",
482
+ f" .node-sub {{ font-size: 12px; font-weight: 500; fill: {style_value(style, 'text_secondary')}; }}",
483
+ f" .node-type {{ font-size: {style_value(style, 'type_label_size')}px; font-weight: 700; fill: {style_value(style, 'type_label_fill')}; letter-spacing: 0.08em; }}",
484
+ f" .arrow-label {{ font-size: 12px; font-weight: 600; fill: {style_value(style, 'arrow_label_fill')}; }}",
485
+ f" .legend {{ font-size: 12px; font-weight: 500; fill: {style_value(style, 'legend_fill')}; }}",
486
+ f" .footnote {{ font-size: 12px; font-weight: 500; fill: {style_value(style, 'text_muted')}; }}",
487
+ ]
488
+ return "\n".join(
489
+ [" <defs>"] + marker_lines + filters + [" <style>"] + styles + [" </style>", " </defs>"]
490
+ )
491
+
492
+
493
+ def render_canvas(style_index: int, style: Dict[str, object], width: float, height: float) -> str:
494
+ background = str(style_value(style, "background"))
495
+ if style_index == 2:
496
+ parts = [f' <rect width="{width}" height="{height}" fill="url(#terminalGradient)"/>']
497
+ else:
498
+ parts = [f' <rect width="{width}" height="{height}" fill="{background}"/>']
499
+
500
+ return "\n".join(parts)
501
+
502
+
503
+ def title_position(style: Dict[str, object], width: float) -> Tuple[float, str]:
504
+ if style_value(style, "title_align") == "left":
505
+ return 48.0, "start"
506
+ return width / 2.0, "middle"
507
+
508
+
509
+ def render_title_block(style: Dict[str, object], data: Dict[str, object], width: float) -> Tuple[str, float]:
510
+ title = normalize_text(data.get("title", "Diagram"))
511
+ subtitle = normalize_text(data.get("subtitle", ""))
512
+ x, anchor = title_position(style, width)
513
+ if anchor == "middle":
514
+ parts = [f' <text x="{x}" y="56" text-anchor="{anchor}" class="title">{title}</text>']
515
+ cursor_y = 82
516
+ if subtitle:
517
+ parts.append(f' <text x="{x}" y="{cursor_y}" text-anchor="{anchor}" class="subtitle">{subtitle}</text>')
518
+ cursor_y += 24
519
+ return "\n".join(parts), cursor_y + 10
520
+
521
+ parts = [f' <text x="{x}" y="48" text-anchor="{anchor}" class="title">{title}</text>']
522
+ cursor_y = 72
523
+ if subtitle:
524
+ parts.append(f' <text x="{x}" y="{cursor_y}" text-anchor="{anchor}" class="subtitle">{subtitle}</text>')
525
+ cursor_y += 18
526
+ if style_value(style, "title_divider"):
527
+ parts.append(
528
+ f' <line x1="48" y1="{cursor_y + 10}" x2="{width - 48}" y2="{cursor_y + 10}" '
529
+ f'stroke="{style_value(style, "section_stroke")}" stroke-width="1"/>'
530
+ )
531
+ cursor_y += 26
532
+ return "\n".join(parts), cursor_y + 8
533
+
534
+
535
+ def render_window_controls(data: Dict[str, object], style_index: int, width: float) -> str:
536
+ controls = data.get("window_controls")
537
+ if not controls:
538
+ return ""
539
+ if controls is True:
540
+ controls = ["#ef4444", "#f59e0b", "#10b981"]
541
+ if style_index != 2:
542
+ return ""
543
+ cursor_x = 20.0
544
+ lines = []
545
+ for color in controls:
546
+ lines.append(f' <circle cx="{cursor_x}" cy="20" r="5.5" fill="{color}"/>')
547
+ cursor_x += 18
548
+ return "\n".join(lines)
549
+
550
+
551
+ def render_header_meta(data: Dict[str, object], style: Dict[str, object], width: float) -> str:
552
+ meta_left = normalize_text(data.get("meta_left", ""))
553
+ meta_center = normalize_text(data.get("meta_center", ""))
554
+ meta_right = normalize_text(data.get("meta_right", ""))
555
+ if not any([meta_left, meta_center, meta_right]):
556
+ return ""
557
+ fill = str(data.get("meta_fill", style_value(style, "text_muted")))
558
+ size = to_float(data.get("meta_size", 11))
559
+ lines = []
560
+ if meta_left:
561
+ lines.append(f' <text x="28" y="24" font-size="{size}" font-weight="600" fill="{fill}">{meta_left}</text>')
562
+ if meta_center:
563
+ lines.append(f' <text x="{width / 2}" y="24" text-anchor="middle" font-size="{size}" font-weight="600" fill="{fill}">{meta_center}</text>')
564
+ if meta_right:
565
+ lines.append(f' <text x="{width - 28}" y="24" text-anchor="end" font-size="{size}" font-weight="600" fill="{fill}">{meta_right}</text>')
566
+ return "\n".join(lines)
567
+
568
+
569
+ def render_blueprint_title_block(
570
+ data: Dict[str, object],
571
+ style: Dict[str, object],
572
+ style_index: int,
573
+ width: float,
574
+ height: float,
575
+ ) -> Tuple[str, Optional[Bounds]]:
576
+ if style_index != 3:
577
+ return "", None
578
+ block = data.get("blueprint_title_block")
579
+ if not block:
580
+ return "", None
581
+ block_width = to_float(block.get("width", 256))
582
+ block_height = to_float(block.get("height", 92))
583
+ x = to_float(block.get("x", width - block_width - 28))
584
+ y = to_float(block.get("y", height - block_height - 18))
585
+ title = normalize_text(block.get("title", data.get("title", "")))
586
+ subtitle = normalize_text(block.get("subtitle", "SYSTEM ARCHITECTURE"))
587
+ left_caption = normalize_text(block.get("left_caption", "REV: 1.0"))
588
+ center_caption = normalize_text(block.get("center_caption", "AUTO-GENERATED"))
589
+ right_caption = normalize_text(block.get("right_caption", "DWG: ARCH-001"))
590
+ stroke = str(block.get("stroke", style_value(style, "section_stroke")))
591
+ fill = str(block.get("fill", "#0b3552"))
592
+ title_fill = str(block.get("title_fill", style_value(style, "text_primary")))
593
+ sub_fill = str(block.get("subtitle_fill", style_value(style, "section_label_fill")))
594
+ muted_fill = str(block.get("muted_fill", style_value(style, "text_muted")))
595
+ lines = [
596
+ f' <rect x="{x}" y="{y}" width="{block_width}" height="{block_height}" fill="{fill}" stroke="{stroke}" stroke-width="1.2"/>',
597
+ f' <line x1="{x}" y1="{y + 18}" x2="{x + block_width}" y2="{y + 18}" stroke="{stroke}" stroke-width="1"/>',
598
+ f' <line x1="{x}" y1="{y + 54}" x2="{x + block_width}" y2="{y + 54}" stroke="{stroke}" stroke-width="1"/>',
599
+ f' <text x="{x + block_width / 2}" y="{y + 13}" text-anchor="middle" font-size="10" font-weight="600" fill="{muted_fill}">{subtitle}</text>',
600
+ f' <text x="{x + block_width / 2}" y="{y + 42}" text-anchor="middle" font-size="18" font-weight="700" fill="{title_fill}">{title}</text>',
601
+ f' <text x="{x + 12}" y="{y + 75}" font-size="9.5" font-weight="600" fill="{muted_fill}">{left_caption}</text>',
602
+ f' <text x="{x + block_width / 2}" y="{y + 75}" text-anchor="middle" font-size="9.5" font-weight="600" fill="{sub_fill}">{center_caption}</text>',
603
+ f' <text x="{x + block_width - 12}" y="{y + 75}" text-anchor="end" font-size="9.5" font-weight="600" fill="{muted_fill}">{right_caption}</text>',
604
+ ]
605
+ return "\n".join(lines), rectangle_bounds(x - 6, y - 6, block_width + 12, block_height + 12)
606
+
607
+
608
+ def infer_shape(kind: str) -> str:
609
+ mapping = {
610
+ "rect": "rect",
611
+ "double_rect": "rect",
612
+ "cylinder": "rect",
613
+ "document": "rect",
614
+ "folder": "rect",
615
+ "terminal": "rect",
616
+ "hexagon": "rect",
617
+ "circle_cluster": "cluster",
618
+ "user_avatar": "rect",
619
+ "bot": "rect",
620
+ "speech": "rect",
621
+ "icon_box": "rect",
622
+ }
623
+ return mapping.get(kind, "rect")
624
+
625
+
626
+ def node_bounds(data: Dict[str, object]) -> Bounds:
627
+ kind = str(data.get("kind", data.get("shape", "rect")))
628
+ x = to_float(data.get("x"))
629
+ y = to_float(data.get("y"))
630
+ if kind == "circle":
631
+ r = to_float(data.get("r", 50))
632
+ return (x - r, y - r, x + r, y + r)
633
+ width = to_float(data.get("width", 180))
634
+ height = to_float(data.get("height", 76))
635
+ return (x, y, x + width, y + height)
636
+
637
+
638
+ def normalize_node(node_data: Dict[str, object], fallback_id: str) -> Node:
639
+ kind = str(node_data.get("kind", node_data.get("shape", "rect")))
640
+ bounds = node_bounds(node_data)
641
+ left, top, right, bottom = bounds
642
+ return Node(
643
+ node_id=str(node_data.get("id", fallback_id)),
644
+ kind=kind,
645
+ shape=infer_shape(kind),
646
+ data=node_data,
647
+ bounds=bounds,
648
+ cx=(left + right) / 2,
649
+ cy=(top + bottom) / 2,
650
+ )
651
+
652
+
653
+ def anchor_on_side(node: Node, side: str) -> Point:
654
+ left, top, right, bottom = node.bounds
655
+ cx, cy = node.cx, node.cy
656
+ side = side.lower()
657
+ if side == "left":
658
+ return (left, cy)
659
+ if side == "right":
660
+ return (right, cy)
661
+ if side == "top":
662
+ return (cx, top)
663
+ if side == "bottom":
664
+ return (cx, bottom)
665
+ if side == "top-left":
666
+ return (left, top)
667
+ if side == "top-right":
668
+ return (right, top)
669
+ if side == "bottom-left":
670
+ return (left, bottom)
671
+ if side == "bottom-right":
672
+ return (right, bottom)
673
+ return (cx, cy)
674
+
675
+
676
+ def anchor_point(node: Node, toward: Point, port: Optional[str] = None) -> Point:
677
+ if port:
678
+ return anchor_on_side(node, port)
679
+ left, top, right, bottom = node.bounds
680
+ dx = toward[0] - node.cx
681
+ dy = toward[1] - node.cy
682
+ width = right - left
683
+ height = bottom - top
684
+ if abs(dx) * height >= abs(dy) * width:
685
+ return (right, node.cy) if dx >= 0 else (left, node.cy)
686
+ return (node.cx, bottom) if dy >= 0 else (node.cx, top)
687
+
688
+
689
+ def expand_bounds(bounds: Bounds, padding: float) -> Bounds:
690
+ left, top, right, bottom = bounds
691
+ return (left - padding, top - padding, right + padding, bottom + padding)
692
+
693
+
694
+ def segment_hits_bounds(p1: Point, p2: Point, bounds: Bounds) -> bool:
695
+ x1, y1 = p1
696
+ x2, y2 = p2
697
+ left, top, right, bottom = bounds
698
+ eps = 1e-6
699
+
700
+ if abs(y1 - y2) < eps:
701
+ y = y1
702
+ if not (top + eps < y < bottom - eps):
703
+ return False
704
+ seg_left = min(x1, x2)
705
+ seg_right = max(x1, x2)
706
+ overlap_left = max(seg_left, left)
707
+ overlap_right = min(seg_right, right)
708
+ if overlap_right - overlap_left <= eps:
709
+ return False
710
+ if abs(overlap_left - x1) < eps and abs(overlap_right - x1) < eps:
711
+ return False
712
+ if abs(overlap_left - x2) < eps and abs(overlap_right - x2) < eps:
713
+ return False
714
+ return True
715
+
716
+ if abs(x1 - x2) < eps:
717
+ x = x1
718
+ if not (left + eps < x < right - eps):
719
+ return False
720
+ seg_top = min(y1, y2)
721
+ seg_bottom = max(y1, y2)
722
+ overlap_top = max(seg_top, top)
723
+ overlap_bottom = min(seg_bottom, bottom)
724
+ if overlap_bottom - overlap_top <= eps:
725
+ return False
726
+ if abs(overlap_top - y1) < eps and abs(overlap_bottom - y1) < eps:
727
+ return False
728
+ if abs(overlap_top - y2) < eps and abs(overlap_bottom - y2) < eps:
729
+ return False
730
+ return True
731
+
732
+ return False
733
+
734
+
735
+ def segment_axis(p1: Point, p2: Point) -> str:
736
+ if abs(p1[1] - p2[1]) < 1e-6:
737
+ return "horizontal"
738
+ if abs(p1[0] - p2[0]) < 1e-6:
739
+ return "vertical"
740
+ return "other"
741
+
742
+
743
+ def port_axis(port: Optional[str]) -> Optional[str]:
744
+ if not port:
745
+ return None
746
+ port = port.lower()
747
+ if port in {"left", "right"}:
748
+ return "horizontal"
749
+ if port in {"top", "bottom"}:
750
+ return "vertical"
751
+ return None
752
+
753
+
754
+ def offset_point(point: Point, port: Optional[str], distance: float) -> Point:
755
+ if not port:
756
+ return point
757
+ x, y = point
758
+ port = port.lower()
759
+ if port == "left":
760
+ return (x - distance, y)
761
+ if port == "right":
762
+ return (x + distance, y)
763
+ if port == "top":
764
+ return (x, y - distance)
765
+ if port == "bottom":
766
+ return (x, y + distance)
767
+ return point
768
+
769
+
770
+ def route_length(points: Sequence[Point]) -> float:
771
+ return sum(abs(x1 - x2) + abs(y1 - y2) for (x1, y1), (x2, y2) in zip(points, points[1:]))
772
+
773
+
774
+ def route_uses_lane(points: Sequence[Point], value: float, axis: str, tolerance: float = 1.0) -> bool:
775
+ if axis == "x":
776
+ return any(abs(x - value) <= tolerance for x, _ in points)
777
+ return any(abs(y - value) <= tolerance for _, y in points)
778
+
779
+
780
+ def route_score(
781
+ points: Sequence[Point],
782
+ hint_x: Sequence[float],
783
+ hint_y: Sequence[float],
784
+ source_port: Optional[str],
785
+ target_port: Optional[str],
786
+ ) -> float:
787
+ length = route_length(points)
788
+ bends = max(0, len(points) - 2)
789
+ score = length + bends * 22
790
+ if len(points) >= 2 and source_port:
791
+ first_axis = segment_axis(points[0], points[1])
792
+ if first_axis != port_axis(source_port):
793
+ score += 180
794
+ if len(points) >= 2 and target_port:
795
+ last_axis = segment_axis(points[-2], points[-1])
796
+ if last_axis != port_axis(target_port):
797
+ score += 180
798
+ for lane in hint_x:
799
+ score -= 28 if route_uses_lane(points, lane, "x") else 0
800
+ for lane in hint_y:
801
+ score -= 28 if route_uses_lane(points, lane, "y") else 0
802
+ return score
803
+
804
+
805
+ def simplify_points(points: Sequence[Point]) -> List[Point]:
806
+ simplified: List[Point] = []
807
+ for x, y in points:
808
+ pt = (round(x, 2), round(y, 2))
809
+ if simplified and pt == simplified[-1]:
810
+ continue
811
+ simplified.append(pt)
812
+
813
+ collapsed: List[Point] = []
814
+ for point in simplified:
815
+ if len(collapsed) < 2:
816
+ collapsed.append(point)
817
+ continue
818
+ x0, y0 = collapsed[-2]
819
+ x1, y1 = collapsed[-1]
820
+ x2, y2 = point
821
+ if (x0 == x1 == x2) or (y0 == y1 == y2):
822
+ collapsed[-1] = point
823
+ else:
824
+ collapsed.append(point)
825
+ return collapsed
826
+
827
+
828
+ def route_collides(points: Sequence[Point], obstacles: Sequence[Bounds]) -> bool:
829
+ for p1, p2 in zip(points, points[1:]):
830
+ for obstacle in obstacles:
831
+ if segment_hits_bounds(p1, p2, obstacle):
832
+ return True
833
+ return False
834
+
835
+
836
+ def build_orthogonal_route(
837
+ start: Point,
838
+ end: Point,
839
+ obstacles: Sequence[Bounds],
840
+ arrow_data: Dict[str, object],
841
+ ) -> List[Point]:
842
+ if arrow_data.get("route_points"):
843
+ raw_points = [tuple(point) for point in arrow_data["route_points"]]
844
+ return simplify_points([start] + [(float(x), float(y)) for x, y in raw_points] + [end])
845
+
846
+ sx, sy = start
847
+ ex, ey = end
848
+ routing_padding = to_float(arrow_data.get("routing_padding", 24))
849
+ port_clearance = to_float(arrow_data.get("port_clearance", max(18, routing_padding * 0.85)))
850
+ source_port = str(arrow_data.get("source_port", "")).strip().lower() or None
851
+ target_port = str(arrow_data.get("target_port", "")).strip().lower() or None
852
+ inner_start = offset_point(start, source_port, port_clearance)
853
+ inner_end = offset_point(end, target_port, port_clearance)
854
+ ssx, ssy = inner_start
855
+ eex, eey = inner_end
856
+ expanded = [expand_bounds(bounds, routing_padding) for bounds in obstacles]
857
+ hint_x = [to_float(value) for value in arrow_data.get("corridor_x", [])]
858
+ hint_y = [to_float(value) for value in arrow_data.get("corridor_y", [])]
859
+ lane_x = sorted({ssx, eex, round((ssx + eex) / 2, 2), *hint_x, *[b[0] for b in expanded], *[b[2] for b in expanded]})
860
+ lane_y = sorted({ssy, eey, round((ssy + eey) / 2, 2), *hint_y, *[b[1] for b in expanded], *[b[3] for b in expanded]})
861
+ if expanded:
862
+ left_rail = min(b[0] for b in expanded) - 24
863
+ right_rail = max(b[2] for b in expanded) + 24
864
+ top_rail = min(b[1] for b in expanded) - 24
865
+ bottom_rail = max(b[3] for b in expanded) + 24
866
+ else:
867
+ left_rail = min(ssx, eex) - 48
868
+ right_rail = max(ssx, eex) + 48
869
+ top_rail = min(ssy, eey) - 48
870
+ bottom_rail = max(ssy, eey) + 48
871
+
872
+ candidates = [
873
+ [start, inner_start, inner_end, end],
874
+ [start, inner_start, (eex, ssy), inner_end, end],
875
+ [start, inner_start, (ssx, eey), inner_end, end],
876
+ [start, inner_start, ((ssx + eex) / 2, ssy), ((ssx + eex) / 2, eey), inner_end, end],
877
+ [start, inner_start, (ssx, (ssy + eey) / 2), (eex, (ssy + eey) / 2), inner_end, end],
878
+ [start, inner_start, (left_rail, ssy), (left_rail, eey), inner_end, end],
879
+ [start, inner_start, (right_rail, ssy), (right_rail, eey), inner_end, end],
880
+ [start, inner_start, (ssx, top_rail), (eex, top_rail), inner_end, end],
881
+ [start, inner_start, (ssx, bottom_rail), (eex, bottom_rail), inner_end, end],
882
+ ]
883
+ for x in lane_x:
884
+ candidates.append([start, inner_start, (x, ssy), (x, eey), inner_end, end])
885
+ for y in lane_y:
886
+ candidates.append([start, inner_start, (ssx, y), (eex, y), inner_end, end])
887
+ for x in hint_x:
888
+ for y in hint_y:
889
+ candidates.append([start, inner_start, (x, ssy), (x, y), (eex, y), inner_end, end])
890
+
891
+ best_route: Optional[List[Point]] = None
892
+ best_score = float("inf")
893
+ for candidate in candidates:
894
+ simplified = simplify_points(candidate)
895
+ if route_collides(simplified, expanded):
896
+ continue
897
+ score = route_score(simplified, hint_x, hint_y, source_port, target_port)
898
+ if score < best_score:
899
+ best_score = score
900
+ best_route = simplified
901
+
902
+ if best_route is not None:
903
+ return best_route
904
+ return simplify_points([start, inner_start, (eex, ssy), inner_end, end])
905
+
906
+
907
+ def choose_label_position(points: Sequence[Point]) -> Point:
908
+ segments = list(zip(points, points[1:]))
909
+ if not segments:
910
+ return points[0]
911
+ best = max(segments, key=lambda seg: abs(seg[0][0] - seg[1][0]) + abs(seg[0][1] - seg[1][1]))
912
+ return ((best[0][0] + best[1][0]) / 2, (best[0][1] + best[1][1]) / 2)
913
+
914
+
915
+ def color_for_flow(style: Dict[str, object], arrow_data: Dict[str, object]) -> str:
916
+ if arrow_data.get("color"):
917
+ return str(arrow_data["color"])
918
+ flow = FLOW_ALIASES.get(str(arrow_data.get("flow", "control")).lower(), "control")
919
+ return str(style_value(style, "arrow_colors")[flow])
920
+
921
+
922
+ def marker_for_color(style: Dict[str, object], color: str, arrow_data: Dict[str, object]) -> str:
923
+ if arrow_data.get("marker"):
924
+ return f"url(#{arrow_data['marker']})"
925
+ colors = style_value(style, "arrow_colors")
926
+ for name, token in colors.items():
927
+ if token == color:
928
+ return f"url(#{MARKER_IDS.get(name, 'arrowA')})"
929
+ return "url(#arrowA)"
930
+
931
+
932
+ def render_label_badge(x: float, y: float, text: str, style: Dict[str, object]) -> str:
933
+ width = max(36, len(text) * 7 + 14)
934
+ bg = style_value(style, "arrow_label_bg")
935
+ opacity = style_value(style, "arrow_label_opacity")
936
+ return "\n".join(
937
+ [
938
+ f' <rect x="{round(x - width / 2, 2)}" y="{round(y - 10, 2)}" width="{width}" height="20" rx="6" fill="{bg}" opacity="{opacity}"/>',
939
+ f' <text x="{round(x, 2)}" y="{round(y + 4, 2)}" text-anchor="middle" class="arrow-label">{normalize_text(text)}</text>',
940
+ ]
941
+ )
942
+
943
+
944
+ def rectangle_bounds(x: float, y: float, width: float, height: float) -> Bounds:
945
+ return (x, y, x + width, y + height)
946
+
947
+
948
+ def bounds_intersect(a: Bounds, b: Bounds, padding: float = 0.0) -> bool:
949
+ ax1, ay1, ax2, ay2 = a
950
+ bx1, by1, bx2, by2 = b
951
+ return not (
952
+ ax2 + padding <= bx1
953
+ or bx2 + padding <= ax1
954
+ or ay2 + padding <= by1
955
+ or by2 + padding <= ay1
956
+ )
957
+
958
+
959
+ def estimate_label_bounds(x: float, y: float, text: str) -> Bounds:
960
+ width = max(36, len(text) * 7 + 14)
961
+ return rectangle_bounds(x - width / 2, y - 10, width, 20)
962
+
963
+
964
+ def section_header_text(container: Dict[str, object], style: Dict[str, object]) -> str:
965
+ if container.get("header_text"):
966
+ text = str(container.get("header_text", ""))
967
+ else:
968
+ label = str(container.get("label", ""))
969
+ prefix = str(container.get("header_prefix", "")).strip()
970
+ separator = str(container.get("header_separator", " // " if prefix else ""))
971
+ text = f"{prefix}{separator}{label}" if prefix else label
972
+ if style_value(style, "section_upper") and not container.get("preserve_case"):
973
+ text = text.upper()
974
+ return text
975
+
976
+
977
+ def render_section(container: Dict[str, object], style: Dict[str, object]) -> str:
978
+ x = to_float(container["x"])
979
+ y = to_float(container["y"])
980
+ width = to_float(container["width"])
981
+ height = to_float(container["height"])
982
+ rx = to_float(container.get("rx", 16 if style_value(style, "name") != "Notion Clean" else 4))
983
+ fill = str(container.get("fill", style_value(style, "section_fill")))
984
+ stroke = str(container.get("stroke", style_value(style, "section_stroke")))
985
+ dash = str(container.get("stroke_dasharray", style_value(style, "section_dash")))
986
+ label = section_header_text(container, style)
987
+ subtitle = str(container.get("subtitle", ""))
988
+ side_label = str(container.get("side_label", "")).strip()
989
+ side_label_fill = str(container.get("side_label_fill", style_value(style, "text_secondary")))
990
+ side_label_size = to_float(container.get("side_label_size", 14))
991
+ side_label_weight = str(container.get("side_label_weight", "600"))
992
+ side_label_anchor = str(container.get("side_label_anchor", "end"))
993
+ lines = [f' <rect x="{x}" y="{y}" width="{width}" height="{height}" rx="{rx}" fill="{fill}" stroke="{stroke}" stroke-width="1.4"']
994
+ if dash:
995
+ lines[-1] += f' stroke-dasharray="{dash}"'
996
+ lines[-1] += "/>"
997
+ if label:
998
+ lines.append(f' <text x="{x + 18}" y="{y + 24}" class="section">{normalize_text(label)}</text>')
999
+ if subtitle:
1000
+ lines.append(f' <text x="{x + 18}" y="{y + 44}" class="section-sub">{normalize_text(subtitle)}</text>')
1001
+ if side_label:
1002
+ side_x = to_float(container.get("side_label_x", max(28, x - 18)))
1003
+ side_y = to_float(container.get("side_label_y", y + height / 2))
1004
+ lines.append(
1005
+ f' <text x="{side_x}" y="{side_y}" text-anchor="{side_label_anchor}" dominant-baseline="middle" '
1006
+ f'font-size="{side_label_size}" font-weight="{side_label_weight}" fill="{side_label_fill}">{normalize_text(side_label)}</text>'
1007
+ )
1008
+ return "\n".join(lines)
1009
+
1010
+
1011
+ def container_header_bounds(container: Dict[str, object]) -> Optional[Bounds]:
1012
+ label = str(container.get("header_text", "") or container.get("label", "")).strip()
1013
+ subtitle = str(container.get("subtitle", "")).strip()
1014
+ if not label and not subtitle:
1015
+ return None
1016
+ x = to_float(container["x"])
1017
+ y = to_float(container["y"])
1018
+ width = to_float(container["width"])
1019
+ header_height = to_float(container.get("header_height", 54 if subtitle else 30))
1020
+ return rectangle_bounds(x + 6, y + 6, width - 12, header_height)
1021
+
1022
+
1023
+ def label_position_candidates(points: Sequence[Point]) -> List[Point]:
1024
+ segments = list(zip(points, points[1:]))
1025
+ if not segments:
1026
+ return [points[0]]
1027
+ ranked_segments = sorted(
1028
+ segments,
1029
+ key=lambda seg: abs(seg[0][0] - seg[1][0]) + abs(seg[0][1] - seg[1][1]),
1030
+ reverse=True,
1031
+ )
1032
+ candidates: List[Point] = []
1033
+ for (x1, y1), (x2, y2) in ranked_segments:
1034
+ length = abs(x1 - x2) + abs(y1 - y2)
1035
+ if length < 34:
1036
+ continue
1037
+ mx = (x1 + x2) / 2
1038
+ my = (y1 + y2) / 2
1039
+ if abs(y1 - y2) < 1e-6:
1040
+ candidates.extend([(mx, my - 16), (mx, my + 16), (mx, my - 28), (mx, my + 28), (mx, my)])
1041
+ elif abs(x1 - x2) < 1e-6:
1042
+ candidates.extend([(mx - 18, my), (mx + 18, my), (mx - 30, my), (mx + 30, my), (mx, my)])
1043
+ else:
1044
+ candidates.extend([(mx, my - 16), (mx, my + 16), (mx, my)])
1045
+ return candidates or [choose_label_position(points)]
1046
+
1047
+
1048
+ def choose_label_position_avoiding(points: Sequence[Point], text: str, occupied: Sequence[Bounds]) -> Point:
1049
+ for candidate in label_position_candidates(points):
1050
+ label_box = estimate_label_bounds(candidate[0], candidate[1], text)
1051
+ if not any(bounds_intersect(label_box, other, 4) for other in occupied):
1052
+ return candidate
1053
+ return choose_label_position(points)
1054
+
1055
+
1056
+ def legend_layout(data: Dict[str, object], legend: Sequence[Dict[str, object]], width: float, height: float) -> Optional[Tuple[float, float, Bounds]]:
1057
+ if not legend:
1058
+ return None
1059
+ x = to_float(data.get("legend_x", 42))
1060
+ y = to_float(data.get("legend_y", height - (len(legend) * 22 + 34)))
1061
+ position = str(data.get("legend_position", "bottom-left"))
1062
+ max_label = max((len(str(item.get("label", ""))) for item in legend), default=12)
1063
+ block_width = 40 + max_label * 7 + 12
1064
+ block_height = len(legend) * 22 + 6
1065
+ if position == "bottom-right":
1066
+ x = to_float(data.get("legend_x", width - block_width - 42))
1067
+ elif position == "top-right":
1068
+ x = to_float(data.get("legend_x", width - block_width - 42))
1069
+ y = to_float(data.get("legend_y", 96))
1070
+ elif position == "top-left":
1071
+ x = to_float(data.get("legend_x", 42))
1072
+ y = to_float(data.get("legend_y", 96))
1073
+ return (x, y, rectangle_bounds(x - 4, y - 10, block_width + 8, block_height + 12))
1074
+
1075
+
1076
+ def footer_layout(data: Dict[str, object], width: float, height: float) -> Optional[Tuple[float, float, Bounds]]:
1077
+ text = str(data.get("footer", "")).strip()
1078
+ if not text:
1079
+ return None
1080
+ footer_width = max(140, len(text) * 7)
1081
+ x = to_float(data.get("footer_x", 42))
1082
+ y = to_float(data.get("footer_y", height - 16))
1083
+ position = str(data.get("footer_position", "bottom-left"))
1084
+ if position == "bottom-right":
1085
+ x = to_float(data.get("footer_x", width - footer_width - 42))
1086
+ return (x, y, rectangle_bounds(x, y - 12, footer_width, 16))
1087
+
1088
+
1089
+ def render_tags(node: Dict[str, object], x: float, y: float, style: Dict[str, object]) -> List[str]:
1090
+ tags = node.get("tags", [])
1091
+ if not tags:
1092
+ return []
1093
+ cursor_x = x
1094
+ lines = []
1095
+ for tag in tags:
1096
+ label = normalize_text(tag.get("label", ""))
1097
+ width = max(62, len(str(tag.get("label", ""))) * 8 + 18)
1098
+ fill = tag.get("fill", "#eff6ff")
1099
+ stroke = tag.get("stroke", "#bfdbfe")
1100
+ text_fill = tag.get("text_fill", style_value(style, "arrow_colors")["read"])
1101
+ lines.append(
1102
+ f' <rect x="{cursor_x}" y="{y}" width="{width}" height="16" rx="3" fill="{fill}" stroke="{stroke}" stroke-width="1"/>'
1103
+ )
1104
+ lines.append(
1105
+ f' <text x="{cursor_x + width / 2}" y="{y + 11.5}" text-anchor="middle" font-size="11" font-weight="500" fill="{text_fill}">{label}</text>'
1106
+ )
1107
+ cursor_x += width + 8
1108
+ return lines
1109
+
1110
+
1111
+ def render_rect_node(node: Dict[str, object], style: Dict[str, object], kind: str) -> str:
1112
+ x = to_float(node["x"])
1113
+ y = to_float(node["y"])
1114
+ width = to_float(node.get("width", 180))
1115
+ height = to_float(node.get("height", 76))
1116
+ rx = to_float(node.get("rx", style_value(style, "node_radius")))
1117
+ fill = str(node.get("fill", style_value(style, "node_fill")))
1118
+ stroke = str(node.get("stroke", style_value(style, "node_stroke")))
1119
+ stroke_width = to_float(node.get("stroke_width", 2.0 if kind != "rect" else 1.8))
1120
+ filter_attr = ""
1121
+ node_shadow = node.get("filter")
1122
+ if node_shadow:
1123
+ filter_attr = f' filter="url(#{node_shadow})"'
1124
+ elif node.get("glow"):
1125
+ glow_name = str(node.get("glow"))
1126
+ glow_map = {
1127
+ "blue": "glowBlue",
1128
+ "purple": "glowPurple",
1129
+ "green": "glowGreen",
1130
+ "orange": "glowOrange",
1131
+ }
1132
+ if glow_name in glow_map:
1133
+ filter_attr = f' filter="url(#{glow_map[glow_name]})"'
1134
+ elif style_value(style, "node_shadow"):
1135
+ if not node.get("flat", False):
1136
+ filter_attr = f' filter="{style_value(style, "node_shadow")}"'
1137
+ title = normalize_text(node.get("label", ""))
1138
+ subtitle = normalize_text(node.get("sublabel", ""))
1139
+ type_label = normalize_text(node.get("type_label", ""))
1140
+ accent_fill = node.get("accent_fill")
1141
+ lines = []
1142
+
1143
+ if kind == "double_rect":
1144
+ lines.append(
1145
+ f' <rect x="{x}" y="{y}" width="{width}" height="{height}" rx="{rx}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>'
1146
+ )
1147
+ lines.append(
1148
+ f' <rect x="{x + 6}" y="{y + 6}" width="{width - 12}" height="{height - 12}" rx="{max(rx - 3, 4)}" fill="none" stroke="{stroke}" stroke-width="1.2" opacity="0.65"/>'
1149
+ )
1150
+ elif kind == "terminal":
1151
+ lines.append(
1152
+ f' <rect x="{x}" y="{y}" width="{width}" height="{height}" rx="{rx}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>'
1153
+ )
1154
+ lines.append(
1155
+ f' <rect x="{x}" y="{y}" width="{width}" height="18" rx="{rx}" fill="{node.get("header_fill", "#1f2937")}" opacity="0.95"/>'
1156
+ )
1157
+ header_colors = node.get("header_dots", ["#ef4444", "#f59e0b", "#10b981"])
1158
+ for idx, color in enumerate(header_colors):
1159
+ lines.append(f' <circle cx="{x + 16 + idx * 14}" cy="{y + 9}" r="4" fill="{color}"/>')
1160
+ lines.append(
1161
+ f' <text x="{x + 18}" y="{y + 44}" font-size="28" font-weight="700" fill="{node.get("prompt_fill", "#10b981")}">$</text>'
1162
+ )
1163
+ lines.append(
1164
+ f' <text x="{x + 38}" y="{y + 44}" font-size="22" font-weight="500" fill="{style_value(style, "text_secondary")}">_</text>'
1165
+ )
1166
+ elif kind == "document":
1167
+ fold = min(18, width * 0.18, height * 0.22)
1168
+ path = (
1169
+ f"M {x} {y} L {x + width - fold} {y} L {x + width} {y + fold} "
1170
+ f"L {x + width} {y + height} L {x} {y + height} Z"
1171
+ )
1172
+ lines.append(
1173
+ f' <path d="{path}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>'
1174
+ )
1175
+ lines.append(
1176
+ f' <path d="M {x + width - fold} {y} L {x + width - fold} {y + fold} L {x + width} {y + fold}" fill="none" stroke="{stroke}" stroke-width="{stroke_width}"/>'
1177
+ )
1178
+ for idx in range(4):
1179
+ line_y = y + 26 + idx * 14
1180
+ lines.append(
1181
+ f' <line x1="{x + 18}" y1="{line_y}" x2="{x + width - 28}" y2="{line_y}" stroke="{node.get("line_stroke", "#c4b5fd")}" stroke-width="1.2"/>'
1182
+ )
1183
+ elif kind == "folder":
1184
+ tab_w = min(54, width * 0.34)
1185
+ tab_h = 18
1186
+ path = (
1187
+ f"M {x} {y + tab_h} L {x + tab_w * 0.4} {y + tab_h} L {x + tab_w * 0.58} {y} "
1188
+ f"L {x + tab_w} {y} L {x + width} {y} L {x + width} {y + height} L {x} {y + height} Z"
1189
+ )
1190
+ lines.append(
1191
+ f' <path d="{path}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>'
1192
+ )
1193
+ for idx in range(3):
1194
+ line_y = y + 42 + idx * 14
1195
+ lines.append(
1196
+ f' <line x1="{x + 22}" y1="{line_y}" x2="{x + width - 22}" y2="{line_y}" stroke="{node.get("line_stroke", stroke)}" stroke-opacity="0.35" stroke-width="1.2"/>'
1197
+ )
1198
+ elif kind == "hexagon":
1199
+ inset = 22
1200
+ path = (
1201
+ f"M {x + inset} {y} L {x + width - inset} {y} L {x + width} {y + height / 2} "
1202
+ f"L {x + width - inset} {y + height} L {x + inset} {y + height} L {x} {y + height / 2} Z"
1203
+ )
1204
+ lines.append(f' <path d="{path}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>')
1205
+ elif kind == "speech":
1206
+ tail = 18
1207
+ path = (
1208
+ f"M {x + rx} {y} L {x + width - rx} {y} Q {x + width} {y} {x + width} {y + rx} "
1209
+ f"L {x + width} {y + height - rx} Q {x + width} {y + height} {x + width - rx} {y + height} "
1210
+ f"L {x + 26} {y + height} L {x + 12} {y + height + tail} L {x + 16} {y + height} "
1211
+ f"L {x + rx} {y + height} Q {x} {y + height} {x} {y + height - rx} "
1212
+ f"L {x} {y + rx} Q {x} {y} {x + rx} {y} Z"
1213
+ )
1214
+ lines.append(f' <path d="{path}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>')
1215
+ else:
1216
+ lines.append(
1217
+ f' <rect x="{x}" y="{y}" width="{width}" height="{height}" rx="{rx}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"{filter_attr}/>'
1218
+ )
1219
+
1220
+ if accent_fill and kind == "icon_box":
1221
+ lines.append(
1222
+ f' <rect x="{x + 12}" y="{y + 12}" width="{width - 24}" height="{height - 24}" rx="{max(rx - 4, 4)}" fill="{accent_fill}" opacity="0.9"/>'
1223
+ )
1224
+
1225
+ if kind == "user_avatar":
1226
+ circle_fill = node.get("icon_fill", "#dbeafe")
1227
+ icon_stroke = node.get("icon_stroke", stroke)
1228
+ cx = x + 26
1229
+ cy = y + height / 2
1230
+ lines.append(f' <circle cx="{cx}" cy="{cy}" r="18" fill="{circle_fill}" stroke="{icon_stroke}" stroke-width="1.6"/>')
1231
+ lines.append(f' <circle cx="{cx}" cy="{cy - 6}" r="5" fill="{icon_stroke}"/>')
1232
+ lines.append(f' <path d="M {cx - 10} {cy + 11} Q {cx} {cy + 2} {cx + 10} {cy + 11}" fill="none" stroke="{icon_stroke}" stroke-width="2"/>')
1233
+
1234
+ if kind == "bot":
1235
+ cx = x + width / 2
1236
+ cy = y + height / 2 + 2
1237
+ body_fill = node.get("body_fill", "#1e293b")
1238
+ accent = node.get("accent_fill", "#34d399")
1239
+ lines.append(f' <rect x="{cx - 42}" y="{cy - 32}" width="84" height="84" rx="18" fill="{body_fill}" stroke="#334155" stroke-width="1.8"{filter_attr}/>')
1240
+ lines.append(f' <rect x="{cx - 26}" y="{cy - 16}" width="52" height="22" rx="6" fill="#0f172a" stroke="#475569" stroke-width="1.2"/>')
1241
+ lines.append(f' <circle cx="{cx - 12}" cy="{cy - 5}" r="5" fill="{accent}"/>')
1242
+ lines.append(f' <circle cx="{cx + 12}" cy="{cy - 5}" r="5" fill="{accent}"/>')
1243
+ lines.append(f' <rect x="{cx - 14}" y="{cy + 14}" width="28" height="6" rx="3" fill="#334155"/>')
1244
+ lines.append(f' <line x1="{cx}" y1="{cy - 36}" x2="{cx}" y2="{cy - 50}" stroke="{accent}" stroke-width="3"/>')
1245
+ lines.append(f' <circle cx="{cx}" cy="{cy - 54}" r="5" fill="{accent}"/>')
1246
+
1247
+ if kind == "circle_cluster":
1248
+ r = min(width, height) / 4.0
1249
+ centers = [(x + width * 0.36, y + height * 0.56), (x + width * 0.58, y + height * 0.45), (x + width * 0.74, y + height * 0.58)]
1250
+ for cx, cy in centers:
1251
+ lines.append(f' <circle cx="{cx}" cy="{cy}" r="{r}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"/>')
1252
+
1253
+ type_offset = y + 18 if kind not in {"terminal", "bot"} else y + 18
1254
+ title_y = y + height / 2 - (4 if type_label and kind not in {"terminal", "bot"} else 0)
1255
+ if kind in {"document", "folder"}:
1256
+ title_y = y + height + 26
1257
+ elif kind == "circle_cluster":
1258
+ title_y = y + height / 2 + 8
1259
+ elif kind == "bot":
1260
+ title_y = y + height + 22
1261
+ elif kind == "user_avatar":
1262
+ title_y = y + height / 2 + 6
1263
+
1264
+ if type_label:
1265
+ lines.append(f' <text x="{x + (54 if kind == "user_avatar" else width / 2)}" y="{type_offset}" text-anchor="middle" class="node-type">{type_label}</text>')
1266
+ title_y += 10 if kind not in {"document", "folder", "circle_cluster", "bot"} else 0
1267
+
1268
+ title_x = x + width / 2
1269
+ text_anchor = "middle"
1270
+ if kind == "user_avatar":
1271
+ title_x = x + 64
1272
+ text_anchor = "start"
1273
+ if kind == "terminal":
1274
+ title_y = y + height - 14
1275
+ if kind == "bot":
1276
+ title_x = x + width / 2
1277
+ text_anchor = "middle"
1278
+ lines.append(f' <text x="{title_x}" y="{title_y}" text-anchor="{text_anchor}" class="node-title">{title}</text>')
1279
+
1280
+ if subtitle:
1281
+ sub_y = title_y + 22
1282
+ if kind == "document":
1283
+ sub_y = y + height + 44
1284
+ title_y = y + height + 24
1285
+ if kind == "folder":
1286
+ sub_y = y + height + 44
1287
+ if kind == "circle_cluster":
1288
+ sub_y = y + height / 2 + 28
1289
+ if kind == "bot":
1290
+ sub_y = y + height + 42
1291
+ if kind == "terminal":
1292
+ sub_y = y + height + 20
1293
+ if kind == "user_avatar":
1294
+ sub_y = title_y + 22
1295
+ lines.append(f' <text x="{title_x}" y="{sub_y}" text-anchor="{text_anchor}" class="node-sub">{subtitle}</text>')
1296
+
1297
+ tag_lines = []
1298
+ if node.get("tags"):
1299
+ tag_x = x + 18
1300
+ tag_y = y + height - 20
1301
+ if kind in {"document", "folder", "circle_cluster", "bot", "terminal"}:
1302
+ tag_y = y + height + 52
1303
+ tag_lines = render_tags(node, tag_x, tag_y, style)
1304
+ lines.extend(tag_lines)
1305
+
1306
+ return "\n".join(lines)
1307
+
1308
+
1309
+ def render_node(node: Dict[str, object], style: Dict[str, object]) -> str:
1310
+ kind = str(node.get("kind", node.get("shape", "rect")))
1311
+ if kind == "cylinder":
1312
+ x = to_float(node["x"])
1313
+ y = to_float(node["y"])
1314
+ width = to_float(node.get("width", 160))
1315
+ height = to_float(node.get("height", 120))
1316
+ rx = width / 2
1317
+ ry = min(18, height / 8)
1318
+ fill = str(node.get("fill", "#ecfdf5"))
1319
+ stroke = str(node.get("stroke", "#10b981"))
1320
+ stroke_width = to_float(node.get("stroke_width", 2.2))
1321
+ label = normalize_text(node.get("label", ""))
1322
+ subtitle = normalize_text(node.get("sublabel", ""))
1323
+ lines = [
1324
+ f' <ellipse cx="{x + width / 2}" cy="{y + ry}" rx="{rx / 2}" ry="{ry}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"/>',
1325
+ f' <rect x="{x}" y="{y + ry}" width="{width}" height="{height - 2 * ry}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"/>',
1326
+ f' <ellipse cx="{x + width / 2}" cy="{y + height - ry}" rx="{rx / 2}" ry="{ry}" fill="{fill}" stroke="{stroke}" stroke-width="{stroke_width}"/>',
1327
+ f' <ellipse cx="{x + width / 2}" cy="{y + height * 0.38}" rx="{rx / 2}" ry="{ry}" fill="none" stroke="{stroke}" stroke-opacity="0.45" stroke-width="1.2"/>',
1328
+ f' <ellipse cx="{x + width / 2}" cy="{y + height * 0.6}" rx="{rx / 2}" ry="{ry}" fill="none" stroke="{stroke}" stroke-opacity="0.25" stroke-width="1.2"/>',
1329
+ f' <text x="{x + width / 2}" y="{y + height / 2 - 6}" text-anchor="middle" class="node-title">{label}</text>',
1330
+ ]
1331
+ if subtitle:
1332
+ lines.append(f' <text x="{x + width / 2}" y="{y + height / 2 + 18}" text-anchor="middle" class="node-sub">{subtitle}</text>')
1333
+ return "\n".join(lines)
1334
+ return render_rect_node(node, style, kind)
1335
+
1336
+
1337
+ def render_arrow(
1338
+ arrow: Dict[str, object],
1339
+ style: Dict[str, object],
1340
+ node_map: Dict[str, Node],
1341
+ route_obstacles: Sequence[Bounds],
1342
+ label_obstacles: Sequence[Bounds],
1343
+ ) -> Tuple[str, str, Optional[Bounds]]:
1344
+ start_hint = (to_float(arrow.get("x1")), to_float(arrow.get("y1")))
1345
+ end_hint = (to_float(arrow.get("x2")), to_float(arrow.get("y2")))
1346
+ source_node = node_map.get(str(arrow.get("source"))) if arrow.get("source") else None
1347
+ target_node = node_map.get(str(arrow.get("target"))) if arrow.get("target") else None
1348
+ source_port = arrow.get("source_port")
1349
+ target_port = arrow.get("target_port")
1350
+
1351
+ if source_node is not None:
1352
+ toward = end_hint if target_node is None else (target_node.cx, target_node.cy)
1353
+ start = anchor_point(source_node, toward, str(source_port) if source_port else None)
1354
+ else:
1355
+ start = start_hint
1356
+
1357
+ if target_node is not None:
1358
+ toward = start_hint if source_node is None else (source_node.cx, source_node.cy)
1359
+ end = anchor_point(target_node, toward, str(target_port) if target_port else None)
1360
+ else:
1361
+ end = end_hint
1362
+
1363
+ obstacles = list(route_obstacles)
1364
+ if source_node is not None:
1365
+ obstacles = [bounds for bounds in obstacles if bounds != source_node.bounds]
1366
+ if target_node is not None:
1367
+ obstacles = [bounds for bounds in obstacles if bounds != target_node.bounds]
1368
+
1369
+ route = build_orthogonal_route(start, end, obstacles, arrow)
1370
+ path_d = "M " + " L ".join(f"{round(x, 2)},{round(y, 2)}" for x, y in route)
1371
+ color = color_for_flow(style, arrow)
1372
+ width = to_float(arrow.get("stroke_width", style_value(style, "arrow_width")))
1373
+ dash = arrow.get("stroke_dasharray")
1374
+ if dash is None and arrow.get("dashed"):
1375
+ dash = "6,4"
1376
+ marker = marker_for_color(style, color, arrow)
1377
+ path = f' <path d="{path_d}" fill="none" stroke="{color}" stroke-width="{width}" marker-end="{marker}"'
1378
+ if dash:
1379
+ path += f' stroke-dasharray="{dash}"'
1380
+ if arrow.get("opacity") is not None:
1381
+ path += f' opacity="{arrow["opacity"]}"'
1382
+ path += "/>"
1383
+ label_svg = ""
1384
+ label_bounds = None
1385
+
1386
+ label = str(arrow.get("label", "")).strip()
1387
+ if label:
1388
+ label_x, label_y = choose_label_position_avoiding(route, label, label_obstacles)
1389
+ label_x += to_float(arrow.get("label_dx", 0))
1390
+ label_y += to_float(arrow.get("label_dy", -4))
1391
+ label_svg = render_label_badge(label_x, label_y, label, style)
1392
+ label_bounds = estimate_label_bounds(label_x, label_y, label)
1393
+ return path, label_svg, label_bounds
1394
+
1395
+
1396
+ def render_legend(
1397
+ legend: Sequence[Dict[str, object]],
1398
+ style: Dict[str, object],
1399
+ width: float,
1400
+ height: float,
1401
+ data: Dict[str, object],
1402
+ ) -> str:
1403
+ layout = legend_layout(data, legend, width, height)
1404
+ if not layout:
1405
+ return ""
1406
+ legend_x, legend_y, _ = layout
1407
+ lines = []
1408
+ for idx, item in enumerate(legend):
1409
+ y = legend_y + idx * 22
1410
+ color = item.get("color")
1411
+ if not color:
1412
+ color = style_value(style, "arrow_colors")[FLOW_ALIASES.get(str(item.get("flow", "control")).lower(), "control")]
1413
+ marker = marker_for_color(style, str(color), {"flow": item.get("flow", "control")})
1414
+ lines.append(f' <line x1="{legend_x}" y1="{y}" x2="{legend_x + 30}" y2="{y}" stroke="{color}" stroke-width="{style_value(style, "arrow_width")}" marker-end="{marker}"/>')
1415
+ lines.append(f' <text x="{legend_x + 40}" y="{y + 4}" class="legend">{normalize_text(item.get("label", ""))}</text>')
1416
+ if data.get("legend_box"):
1417
+ max_label = max((len(str(item.get("label", ""))) for item in legend), default=12)
1418
+ block_width = 40 + max_label * 7 + 12
1419
+ block_height = len(legend) * 22 + 6
1420
+ bg = data.get("legend_box_fill", style_value(style, "arrow_label_bg"))
1421
+ opacity = data.get("legend_box_opacity", 0.88)
1422
+ lines.insert(0, f' <rect x="{legend_x - 10}" y="{legend_y - 14}" width="{block_width + 20}" height="{block_height + 18}" rx="10" fill="{bg}" opacity="{opacity}"/>')
1423
+ return "\n".join(lines)
1424
+
1425
+
1426
+ def render_footer(data: Dict[str, object], style: Dict[str, object], width: float, height: float) -> str:
1427
+ layout = footer_layout(data, width, height)
1428
+ if not layout:
1429
+ return ""
1430
+ x, y, _ = layout
1431
+ text = str(data.get("footer", "")).strip()
1432
+ return f' <text x="{x}" y="{y}" class="footnote">{normalize_text(text)}</text>'
1433
+
1434
+
1435
+ def build_svg(template_type: str, data: Dict[str, object]) -> str:
1436
+ style_index, style = parse_style(data.get("style"))
1437
+ if data.get("style_overrides"):
1438
+ style.update(data["style_overrides"])
1439
+ width, height = parse_template_viewbox(template_type)
1440
+ width = to_float(data.get("width", width))
1441
+ height = to_float(data.get("height", height))
1442
+ if data.get("viewBox"):
1443
+ match = re.match(r"0 0 ([0-9.]+) ([0-9.]+)", str(data["viewBox"]))
1444
+ if match:
1445
+ width = float(match.group(1))
1446
+ height = float(match.group(2))
1447
+
1448
+ containers = data.get("containers", [])
1449
+ nodes_data = data.get("nodes", [])
1450
+ arrows_data = data.get("arrows", [])
1451
+ legend = data.get("legend", [])
1452
+
1453
+ normalized_nodes = [normalize_node(node, f"node-{idx}") for idx, node in enumerate(nodes_data)]
1454
+ node_map = {node.node_id: node for node in normalized_nodes}
1455
+
1456
+ defs = render_defs(style_index, style)
1457
+ canvas = render_canvas(style_index, style, width, height)
1458
+ title_block, content_start_y = render_title_block(style, data, width)
1459
+ window_controls = render_window_controls(data, style_index, width)
1460
+ header_meta = render_header_meta(data, style, width)
1461
+
1462
+ lines = [f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {int(width)} {int(height)}" width="{int(width)}" height="{int(height)}">']
1463
+ lines.append(defs)
1464
+ lines.append(canvas)
1465
+ if window_controls:
1466
+ lines.append(window_controls)
1467
+ if header_meta:
1468
+ lines.append(header_meta)
1469
+ lines.append(title_block)
1470
+
1471
+ if containers:
1472
+ for container in containers:
1473
+ lines.append(render_section(container, style))
1474
+
1475
+ section_obstacles = [bounds for container in containers if (bounds := container_header_bounds(container)) is not None]
1476
+ legend_reserved = legend_layout(data, legend, width, height)
1477
+ footer_reserved = footer_layout(data, width, height)
1478
+ blueprint_block_svg, blueprint_block_bounds = render_blueprint_title_block(data, style, style_index, width, height)
1479
+ reserved_bounds = list(section_obstacles)
1480
+ if legend_reserved:
1481
+ reserved_bounds.append(legend_reserved[2])
1482
+ if footer_reserved:
1483
+ reserved_bounds.append(footer_reserved[2])
1484
+ if blueprint_block_bounds:
1485
+ reserved_bounds.append(blueprint_block_bounds)
1486
+
1487
+ arrow_paths: List[str] = []
1488
+ arrow_labels: List[str] = []
1489
+ node_obstacles = [node.bounds for node in normalized_nodes]
1490
+ route_obstacles = node_obstacles + reserved_bounds
1491
+ label_obstacles = node_obstacles + reserved_bounds
1492
+ for arrow in arrows_data:
1493
+ path_svg, label_svg, label_bounds = render_arrow(arrow, style, node_map, route_obstacles, label_obstacles)
1494
+ arrow_paths.append(path_svg)
1495
+ if label_svg:
1496
+ arrow_labels.append(label_svg)
1497
+ if label_bounds:
1498
+ label_obstacles.append(label_bounds)
1499
+
1500
+ lines.extend(path for path in arrow_paths if path)
1501
+
1502
+ for node_data in nodes_data:
1503
+ if "y" not in node_data and node_data.get("auto_place"):
1504
+ node_data["y"] = content_start_y + to_float(node_data.get("offset_y", 0))
1505
+ lines.append(render_node(node_data, style))
1506
+
1507
+ lines.extend(label for label in arrow_labels if label)
1508
+
1509
+ legend_svg = render_legend(legend, style, width, height, data)
1510
+ if legend_svg:
1511
+ lines.append(legend_svg)
1512
+
1513
+ if blueprint_block_svg:
1514
+ lines.append(blueprint_block_svg)
1515
+
1516
+ footer_svg = render_footer(data, style, width, height)
1517
+ if footer_svg:
1518
+ lines.append(footer_svg)
1519
+
1520
+ lines.append("</svg>")
1521
+ return "\n".join(line for line in lines if line)
1522
+
1523
+
1524
+ def main() -> None:
1525
+ if len(sys.argv) < 3:
1526
+ print("Usage: python3 generate-from-template.py <template-type> <output-path> [data-json]")
1527
+ sys.exit(1)
1528
+
1529
+ template_type = sys.argv[1]
1530
+ output_path = sys.argv[2]
1531
+
1532
+ try:
1533
+ if len(sys.argv) > 3:
1534
+ data = json.loads(sys.argv[3])
1535
+ else:
1536
+ data = json.load(sys.stdin)
1537
+ svg_content = build_svg(template_type, data)
1538
+ with open(output_path, "w", encoding="utf-8") as handle:
1539
+ handle.write(svg_content)
1540
+ print(f"✓ SVG generated: {output_path}")
1541
+ except FileNotFoundError as exc:
1542
+ print(f"Error: {exc}")
1543
+ sys.exit(1)
1544
+ except json.JSONDecodeError as exc:
1545
+ print(f"Error: Invalid JSON: {exc}")
1546
+ sys.exit(1)
1547
+ except ValueError as exc:
1548
+ print(f"Error: {exc}")
1549
+ sys.exit(1)
1550
+ except Exception as exc: # pragma: no cover
1551
+ print(f"Unexpected error: {exc}")
1552
+ sys.exit(1)
1553
+
1554
+
1555
+ if __name__ == "__main__":
1556
+ main()