@caddis/cli 0.1.0 → 0.2.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 (364) hide show
  1. package/README.md +29 -16
  2. package/bundles/antigravity-plugin-extras/plugin.json +5 -0
  3. package/bundles/antigravity-plugin-extras/skills/_registry.md +154 -0
  4. package/bundles/antigravity-plugin-extras/skills/agent-md-refactor/SKILL.md +356 -0
  5. package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +517 -0
  6. package/bundles/antigravity-plugin-extras/skills/algorithmic-art/SKILL.md +293 -0
  7. package/bundles/antigravity-plugin-extras/skills/anchor-review/SKILL.md +135 -0
  8. package/bundles/antigravity-plugin-extras/skills/api-client-patterns/SKILL.md +367 -0
  9. package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +244 -0
  10. package/bundles/antigravity-plugin-extras/skills/architecture-diagram/SKILL.md +156 -0
  11. package/bundles/antigravity-plugin-extras/skills/architecture-document/SKILL.md +321 -0
  12. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/LICENSE.txt +202 -0
  13. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/SKILL.md +74 -0
  14. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
  15. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
  16. package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
  17. package/bundles/antigravity-plugin-extras/skills/ascii-art/SKILL.md +144 -0
  18. package/bundles/antigravity-plugin-extras/skills/asking-questions/SKILL.md +81 -0
  19. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/SKILL.md +118 -0
  20. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/cross-service/credential-management.md +450 -0
  21. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/browser/README.md +363 -0
  22. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/code-interpreter/README.md +232 -0
  23. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/README.md +100 -0
  24. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deploy-template.sh +117 -0
  25. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deployment-strategies.md +416 -0
  26. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/troubleshooting-guide.md +384 -0
  27. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/validate-deployment.sh +186 -0
  28. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/identity/README.md +186 -0
  29. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/memory/README.md +253 -0
  30. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/observability/README.md +517 -0
  31. package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/runtime/README.md +215 -0
  32. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/SKILL.md +279 -0
  33. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md +431 -0
  34. package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh +240 -0
  35. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/SKILL.md +318 -0
  36. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/cloudwatch-alarms.md +567 -0
  37. package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/operations-patterns.md +394 -0
  38. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/SKILL.md +758 -0
  39. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/deployment-best-practices.md +830 -0
  40. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/eda-patterns.md +1002 -0
  41. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/observability-best-practices.md +770 -0
  42. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/performance-optimization.md +671 -0
  43. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/security-best-practices.md +625 -0
  44. package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/serverless-patterns.md +838 -0
  45. package/bundles/antigravity-plugin-extras/skills/backend-to-frontend-handoff/SKILL.md +139 -0
  46. package/bundles/antigravity-plugin-extras/skills/banner-design/SKILL.md +188 -0
  47. package/bundles/antigravity-plugin-extras/skills/brand-design/SKILL.md +298 -0
  48. package/bundles/antigravity-plugin-extras/skills/brand-guidelines/LICENSE.txt +202 -0
  49. package/bundles/antigravity-plugin-extras/skills/brand-guidelines/SKILL.md +118 -0
  50. package/bundles/antigravity-plugin-extras/skills/brand-voice/SKILL.md +93 -0
  51. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +392 -0
  52. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md +461 -0
  53. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/examples.md +188 -0
  54. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/state-patterns.md +360 -0
  55. package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/troubleshooting.md +362 -0
  56. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +266 -0
  57. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/examples.md +115 -0
  58. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +338 -0
  59. package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +317 -0
  60. package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +385 -0
  61. package/bundles/antigravity-plugin-extras/skills/canvas-design/LICENSE.txt +202 -0
  62. package/bundles/antigravity-plugin-extras/skills/canvas-design/SKILL.md +91 -0
  63. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
  64. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
  65. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
  66. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
  67. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
  68. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
  69. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
  70. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
  71. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
  72. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
  73. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
  74. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
  75. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
  76. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
  77. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
  78. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
  79. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
  80. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
  81. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
  82. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
  83. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
  84. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
  85. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
  86. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
  87. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
  88. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
  89. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
  90. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
  91. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
  92. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
  93. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
  94. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
  95. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
  96. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
  97. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
  98. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
  99. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
  100. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
  101. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
  102. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
  103. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
  104. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
  105. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
  106. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
  107. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
  108. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
  109. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
  110. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
  111. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
  112. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
  113. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
  114. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
  115. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
  116. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
  117. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
  118. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
  119. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
  120. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
  121. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
  122. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
  123. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
  124. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
  125. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
  126. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
  127. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
  128. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
  129. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
  130. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
  131. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
  132. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
  133. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
  134. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
  135. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
  136. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
  137. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
  138. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
  139. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
  140. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
  141. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
  142. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
  143. package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
  144. package/bundles/antigravity-plugin-extras/skills/changelog-generator/SKILL.md +105 -0
  145. package/bundles/antigravity-plugin-extras/skills/code-explainer/SKILL.md +91 -0
  146. package/bundles/antigravity-plugin-extras/skills/competitive-ads-extractor/SKILL.md +294 -0
  147. package/bundles/antigravity-plugin-extras/skills/component-testing/SKILL.md +310 -0
  148. package/bundles/antigravity-plugin-extras/skills/content-research-writer/SKILL.md +539 -0
  149. package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +51 -0
  150. package/bundles/antigravity-plugin-extras/skills/data-analysis/SKILL.md +111 -0
  151. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/README.md +248 -0
  152. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +203 -0
  153. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/adapter.py.template +44 -0
  154. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/api-router.py.template +43 -0
  155. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/contract-test.py.template +384 -0
  156. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/display-dto.py.template +39 -0
  157. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-service.ts.template +46 -0
  158. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-types.ts.template +38 -0
  159. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/ingestion-model.py.template +42 -0
  160. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/mapping-doc.md.template +46 -0
  161. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/normalizer.py.template +48 -0
  162. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_requirements.md +36 -0
  163. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_ui_demand.md +35 -0
  164. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/reconcile_mapping.md +66 -0
  165. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/query-catalog.md.template +62 -0
  166. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/consumer-driven-contracts.md +131 -0
  167. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/drift-check-catalog.md +305 -0
  168. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/layer-responsibilities.md +333 -0
  169. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_connections.py +170 -0
  170. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_sources.py +161 -0
  171. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/drift_check.py +171 -0
  172. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/extract_schema.py +1363 -0
  173. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_gap_report.py +81 -0
  174. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_mapping_doc.py +294 -0
  175. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/ts_dto_compare.py +214 -0
  176. package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/validate_lineage.py +51 -0
  177. package/bundles/antigravity-plugin-extras/skills/data-loader/SKILL.md +753 -0
  178. package/bundles/antigravity-plugin-extras/skills/data-validation/SKILL.md +220 -0
  179. package/bundles/antigravity-plugin-extras/skills/db-testing/SKILL.md +117 -0
  180. package/bundles/antigravity-plugin-extras/skills/deploy-local/SKILL.md +259 -0
  181. package/bundles/antigravity-plugin-extras/skills/design-md/SKILL.md +167 -0
  182. package/bundles/antigravity-plugin-extras/skills/design-system-tokens/SKILL.md +240 -0
  183. package/bundles/antigravity-plugin-extras/skills/design-system-tokens/references/DESIGN-SYSTEM-TEMPLATE.md +577 -0
  184. package/bundles/antigravity-plugin-extras/skills/developer-growth-analysis/SKILL.md +323 -0
  185. package/bundles/antigravity-plugin-extras/skills/doc-coauthoring/SKILL.md +378 -0
  186. package/bundles/antigravity-plugin-extras/skills/documentation-analyzer/SKILL.md +78 -0
  187. package/bundles/antigravity-plugin-extras/skills/domain-name-brainstormer/SKILL.md +213 -0
  188. package/bundles/antigravity-plugin-extras/skills/enterprise-dashboard-aesthetic-system/SKILL.md +120 -0
  189. package/bundles/antigravity-plugin-extras/skills/excalidraw/SKILL.md +193 -0
  190. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/element-types.md +497 -0
  191. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/excalidraw-schema.md +356 -0
  192. package/bundles/antigravity-plugin-extras/skills/excalidraw/references/reliable-diagrams.md +115 -0
  193. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/README.md +60 -0
  194. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-arrow.py +354 -0
  195. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-icon-to-diagram.py +412 -0
  196. package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py +183 -0
  197. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/business-flow-swimlane-template.excalidraw +334 -0
  198. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/class-diagram-template.excalidraw +558 -0
  199. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/data-flow-diagram-template.excalidraw +279 -0
  200. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/er-diagram-template.excalidraw +662 -0
  201. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/flowchart-template.excalidraw +179 -0
  202. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/mindmap-template.excalidraw +244 -0
  203. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/relationship-template.excalidraw +145 -0
  204. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/reliable-flowchart.excalidraw +1 -0
  205. package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/sequence-diagram-template.excalidraw +509 -0
  206. package/bundles/antigravity-plugin-extras/skills/file-organizer/SKILL.md +434 -0
  207. package/bundles/antigravity-plugin-extras/skills/game-changing-features/README.md +221 -0
  208. package/bundles/antigravity-plugin-extras/skills/game-changing-features/SKILL.md +265 -0
  209. package/bundles/antigravity-plugin-extras/skills/github-issues/SKILL.md +359 -0
  210. package/bundles/antigravity-plugin-extras/skills/github-issues/references/templates.md +90 -0
  211. package/bundles/antigravity-plugin-extras/skills/golden-nuggets/SKILL.md +192 -0
  212. package/bundles/antigravity-plugin-extras/skills/humanizer/SKILL.md +194 -0
  213. package/bundles/antigravity-plugin-extras/skills/image-enhancer/SKILL.md +100 -0
  214. package/bundles/antigravity-plugin-extras/skills/intent-writer/SKILL.md +201 -0
  215. package/bundles/antigravity-plugin-extras/skills/internal-comms/LICENSE.txt +202 -0
  216. package/bundles/antigravity-plugin-extras/skills/internal-comms/SKILL.md +124 -0
  217. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/3p-updates.md +47 -0
  218. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/company-newsletter.md +65 -0
  219. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/faq-answers.md +30 -0
  220. package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/general-comms.md +16 -0
  221. package/bundles/antigravity-plugin-extras/skills/invoice-organizer/SKILL.md +447 -0
  222. package/bundles/antigravity-plugin-extras/skills/jira-issues/SKILL.md +182 -0
  223. package/bundles/antigravity-plugin-extras/skills/job-application/SKILL.md +188 -0
  224. package/bundles/antigravity-plugin-extras/skills/lead-research-assistant/SKILL.md +200 -0
  225. package/bundles/antigravity-plugin-extras/skills/llm-application-dev/SKILL.md +217 -0
  226. package/bundles/antigravity-plugin-extras/skills/mcp-builder/LICENSE.txt +202 -0
  227. package/bundles/antigravity-plugin-extras/skills/mcp-builder/SKILL.md +100 -0
  228. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/evaluation.md +602 -0
  229. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/mcp_best_practices.md +915 -0
  230. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/node_mcp_server.md +916 -0
  231. package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/python_mcp_server.md +752 -0
  232. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/connections.py +151 -0
  233. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/evaluation.py +373 -0
  234. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
  235. package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/requirements.txt +2 -0
  236. package/bundles/antigravity-plugin-extras/skills/meeting-insights-analyzer/SKILL.md +328 -0
  237. package/bundles/antigravity-plugin-extras/skills/monorepo/SKILL.md +267 -0
  238. package/bundles/antigravity-plugin-extras/skills/naming-analyzer/SKILL.md +376 -0
  239. package/bundles/antigravity-plugin-extras/skills/nextjs-app-router/SKILL.md +271 -0
  240. package/bundles/antigravity-plugin-extras/skills/notebooklm/AUTHENTICATION.md +154 -0
  241. package/bundles/antigravity-plugin-extras/skills/notebooklm/SKILL.md +270 -0
  242. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/api_reference.md +309 -0
  243. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/troubleshooting.md +376 -0
  244. package/bundles/antigravity-plugin-extras/skills/notebooklm/references/usage_patterns.md +338 -0
  245. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/__init__.py +81 -0
  246. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/ask_question.py +256 -0
  247. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/auth_manager.py +358 -0
  248. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_session.py +255 -0
  249. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_utils.py +107 -0
  250. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/cleanup_manager.py +302 -0
  251. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/config.py +44 -0
  252. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/notebook_manager.py +410 -0
  253. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/run.py +102 -0
  254. package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/setup_environment.py +204 -0
  255. package/bundles/antigravity-plugin-extras/skills/observability/SKILL.md +371 -0
  256. package/bundles/antigravity-plugin-extras/skills/onboard-project/SKILL.md +192 -0
  257. package/bundles/antigravity-plugin-extras/skills/performance-testing/SKILL.md +226 -0
  258. package/bundles/antigravity-plugin-extras/skills/pipeline-state/SKILL.md +208 -0
  259. package/bundles/antigravity-plugin-extras/skills/plantuml/SKILL.md +228 -0
  260. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/SKILL.md +142 -0
  261. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/linear.app.md +196 -0
  262. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/stripe.md +214 -0
  263. package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/vercel.md +218 -0
  264. package/bundles/antigravity-plugin-extras/skills/prd-to-code/SKILL.md +127 -0
  265. package/bundles/antigravity-plugin-extras/skills/raffle-winner-picker/SKILL.md +159 -0
  266. package/bundles/antigravity-plugin-extras/skills/react-useeffect/README.md +320 -0
  267. package/bundles/antigravity-plugin-extras/skills/react-useeffect/SKILL.md +53 -0
  268. package/bundles/antigravity-plugin-extras/skills/react-useeffect/alternatives.md +258 -0
  269. package/bundles/antigravity-plugin-extras/skills/react-useeffect/anti-patterns.md +290 -0
  270. package/bundles/antigravity-plugin-extras/skills/receiving-code-review/SKILL.md +213 -0
  271. package/bundles/antigravity-plugin-extras/skills/relay/SKILL.md +246 -0
  272. package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +105 -0
  273. package/bundles/antigravity-plugin-extras/skills/requesting-code-review/code-reviewer.md +146 -0
  274. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +350 -0
  275. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/pwa-checklist.md +226 -0
  276. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/touch-and-interaction.md +265 -0
  277. package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/transformation-catalogue.md +326 -0
  278. package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +275 -0
  279. package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +120 -0
  280. package/bundles/antigravity-plugin-extras/skills/shadcn-radix/SKILL.md +330 -0
  281. package/bundles/antigravity-plugin-extras/skills/sketch/SKILL.md +104 -0
  282. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/LICENSE.txt +202 -0
  283. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/SKILL.md +646 -0
  284. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/color_palettes.py +302 -0
  285. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/easing.py +230 -0
  286. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/frame_composer.py +469 -0
  287. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/gif_builder.py +246 -0
  288. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/typography.py +357 -0
  289. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/validators.py +264 -0
  290. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/visual_effects.py +494 -0
  291. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/requirements.txt +4 -0
  292. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/bounce.py +106 -0
  293. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/explode.py +331 -0
  294. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/fade.py +329 -0
  295. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/flip.py +291 -0
  296. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
  297. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/morph.py +329 -0
  298. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/move.py +293 -0
  299. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/pulse.py +268 -0
  300. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/shake.py +127 -0
  301. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/slide.py +291 -0
  302. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/spin.py +269 -0
  303. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/wiggle.py +300 -0
  304. package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/zoom.py +312 -0
  305. package/bundles/antigravity-plugin-extras/skills/slides/SKILL.md +38 -0
  306. package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +131 -0
  307. package/bundles/antigravity-plugin-extras/skills/streamlit-dev/SKILL.md +268 -0
  308. package/bundles/antigravity-plugin-extras/skills/svg-create/SKILL.md +251 -0
  309. package/bundles/antigravity-plugin-extras/skills/theme-factory/LICENSE.txt +202 -0
  310. package/bundles/antigravity-plugin-extras/skills/theme-factory/SKILL.md +59 -0
  311. package/bundles/antigravity-plugin-extras/skills/theme-factory/theme-showcase.pdf +0 -0
  312. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/arctic-frost.md +19 -0
  313. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/botanical-garden.md +19 -0
  314. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/desert-rose.md +19 -0
  315. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/forest-canopy.md +19 -0
  316. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/golden-hour.md +19 -0
  317. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  318. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/modern-minimalist.md +19 -0
  319. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/ocean-depths.md +19 -0
  320. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  321. package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/tech-innovation.md +19 -0
  322. package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/LICENSE.txt +202 -0
  323. package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/SKILL.md +320 -0
  324. package/bundles/antigravity-plugin-extras/skills/ui-testing/SKILL.md +660 -0
  325. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/SKILL.md +660 -0
  326. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/_sync_all.py +414 -0
  327. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/app-interface.csv +31 -0
  328. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/charts.csv +26 -0
  329. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/colors.csv +162 -0
  330. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/design.csv +1776 -0
  331. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/draft.csv +1779 -0
  332. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/google-fonts.csv +1924 -0
  333. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/icons.csv +106 -0
  334. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/landing.csv +35 -0
  335. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/products.csv +162 -0
  336. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/react-performance.csv +45 -0
  337. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/styles.csv +85 -0
  338. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/typography.csv +74 -0
  339. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ui-reasoning.csv +162 -0
  340. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ux-guidelines.csv +100 -0
  341. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/core.py +247 -0
  342. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/design_system.py +1067 -0
  343. package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/search.py +114 -0
  344. package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +140 -0
  345. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/commands.md +252 -0
  346. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/graph-schema.md +116 -0
  347. package/bundles/antigravity-plugin-extras/skills/understand-anything/references/pipeline.md +331 -0
  348. package/bundles/antigravity-plugin-extras/skills/update-readme/SKILL.md +74 -0
  349. package/bundles/antigravity-plugin-extras/skills/verification-loop/SKILL.md +209 -0
  350. package/bundles/antigravity-plugin-extras/skills/video-downloader/SKILL.md +107 -0
  351. package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +288 -0
  352. package/bundles/antigravity-plugin-extras/skills/word-cloud/SKILL.md +339 -0
  353. package/bundles/antigravity-plugin-extras/skills/word-cloud/agents/agent-interface.md +175 -0
  354. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/html.md +384 -0
  355. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/nlp-keywords.md +127 -0
  356. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/palettes.md +149 -0
  357. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/python.md +249 -0
  358. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/react.md +427 -0
  359. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/shapes.md +135 -0
  360. package/bundles/antigravity-plugin-extras/skills/word-cloud/references/stopwords.md +115 -0
  361. package/bundles/antigravity-plugin-extras/skills/youtube-transcript/SKILL.md +416 -0
  362. package/bundles/manifest.json +2 -1
  363. package/dist/cli.js +166 -37
  364. package/package.json +1 -1
@@ -0,0 +1,81 @@
1
+ """Generate human-readable gap reports from gap_register.json."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import json
7
+ from collections import Counter
8
+ from datetime import date
9
+ from pathlib import Path
10
+
11
+
12
+ def main() -> None:
13
+ parser = argparse.ArgumentParser(description="Generate gap report markdown.")
14
+ parser.add_argument("--gaps", type=Path, required=True, help="gap_register.json")
15
+ parser.add_argument("--output", type=Path, required=True, help="gap report markdown path")
16
+ parser.add_argument("--ui-gap-brief", type=Path, help="Optional ui_gap_brief.md path")
17
+ args = parser.parse_args()
18
+
19
+ register = json.loads(args.gaps.read_text(encoding="utf-8-sig"))
20
+ gaps = register.get("gaps", [])
21
+ counts = Counter(gap.get("gap_type", "unknown") for gap in gaps)
22
+
23
+ lines = [
24
+ "# Data Contract Gap Report",
25
+ "",
26
+ f"Generated: {date.today().isoformat()}",
27
+ "",
28
+ "## Summary",
29
+ "",
30
+ ]
31
+ if counts:
32
+ for key, count in sorted(counts.items()):
33
+ lines.append(f"- `{key}`: {count}")
34
+ else:
35
+ lines.append("- No gaps found.")
36
+
37
+ lines.extend(["", "## Gaps", ""])
38
+ for gap in gaps:
39
+ label = gap.get("ui_name") or gap.get("requirement") or gap.get("requirement_id") or "Unnamed"
40
+ lines.extend(
41
+ [
42
+ f"### {label}",
43
+ "",
44
+ f"- Status: `{gap.get('status', 'unknown')}`",
45
+ f"- Gap type: `{gap.get('gap_type', 'unknown')}`",
46
+ f"- Candidate source field: `{gap.get('source_field_candidate', '')}`",
47
+ f"- Notes: {gap.get('notes', '')}",
48
+ "",
49
+ ]
50
+ )
51
+
52
+ args.output.parent.mkdir(parents=True, exist_ok=True)
53
+ args.output.write_text("\n".join(lines).rstrip() + "\n", encoding="utf-8")
54
+
55
+ if args.ui_gap_brief:
56
+ required = [gap for gap in gaps if gap.get("gap_type") == "required-unplaced"]
57
+ brief = [
58
+ "# UI Gap Brief",
59
+ "",
60
+ "Use this brief to place required data that is not present in the mockup/final UI.",
61
+ "",
62
+ ]
63
+ for gap in required:
64
+ brief.extend(
65
+ [
66
+ f"## {gap.get('requirement_id', 'Requirement')}",
67
+ "",
68
+ f"- Requirement: {gap.get('requirement', '')}",
69
+ "- Proposed placement: TBD by product/design.",
70
+ "- Component type: TBD.",
71
+ "- DisplayDTO fields: TBD.",
72
+ "- Acceptance criteria: Field is visible in the agreed UI location and has source-to-screen lineage.",
73
+ "",
74
+ ]
75
+ )
76
+ args.ui_gap_brief.parent.mkdir(parents=True, exist_ok=True)
77
+ args.ui_gap_brief.write_text("\n".join(brief).rstrip() + "\n", encoding="utf-8")
78
+
79
+
80
+ if __name__ == "__main__":
81
+ main()
@@ -0,0 +1,294 @@
1
+ """
2
+ Generate Mapping Doc — Produces a human-readable field mapping document
3
+ from Pydantic ingestion model + display DTO + optional TypeScript types.
4
+
5
+ Usage:
6
+ python scripts/generate_mapping_doc.py \
7
+ --ingestion src.models.ingestion.nps_monthly:NpsMonthlyPayload \
8
+ --dto src.models.responses.nps_monthly:NpsMonthlyResponse \
9
+ --ts-types frontend/src/types/nps-monthly.ts \
10
+ --output docs/mapping/nps-monthly-mapping.md
11
+
12
+ # Check mode — exit 1 if existing doc is stale
13
+ python scripts/generate_mapping_doc.py \
14
+ --ingestion src.models.ingestion.nps_monthly:NpsMonthlyPayload \
15
+ --dto src.models.responses.nps_monthly:NpsMonthlyResponse \
16
+ --check docs/mapping/nps-monthly-mapping.md
17
+
18
+ Part of the data-contract-pipeline skill.
19
+ """
20
+
21
+ from __future__ import annotations
22
+
23
+ import argparse
24
+ import importlib
25
+ import re
26
+ import sys
27
+ from datetime import date
28
+ from pathlib import Path
29
+ from typing import Any, get_type_hints
30
+
31
+
32
+ def load_class(dotted_path: str) -> type:
33
+ """Import a class from 'module.path:ClassName' or 'module.path.ClassName'."""
34
+ if ":" in dotted_path:
35
+ module_path, class_name = dotted_path.rsplit(":", 1)
36
+ else:
37
+ module_path, _, class_name = dotted_path.rpartition(".")
38
+ if not module_path:
39
+ raise ValueError(
40
+ f"Invalid class path: {dotted_path}. "
41
+ f"Expected: module.path:ClassName or module.path.ClassName"
42
+ )
43
+ module = importlib.import_module(module_path)
44
+ cls = getattr(module, class_name, None)
45
+ if cls is None:
46
+ raise AttributeError(f"{class_name} not found in {module_path}")
47
+ return cls
48
+
49
+
50
+ def get_field_info(model_cls: type) -> list[dict[str, str]]:
51
+ """Extract field name, alias, and type string from a Pydantic model."""
52
+ hints = get_type_hints(model_cls, include_extras=True)
53
+ rows: list[dict[str, str]] = []
54
+ for name, field in model_cls.model_fields.items():
55
+ alias = field.alias or name
56
+ type_str = _type_repr(hints.get(name, Any))
57
+ rows.append({
58
+ "field_name": name,
59
+ "alias": alias,
60
+ "type": type_str,
61
+ })
62
+ return rows
63
+
64
+
65
+ def _type_repr(tp: Any) -> str:
66
+ """Compact string repr of a type annotation."""
67
+ origin = getattr(tp, "__origin__", None)
68
+ args = getattr(tp, "__args__", None)
69
+ if origin is not None and args:
70
+ origin_name = getattr(origin, "__name__", str(origin))
71
+ arg_strs = ", ".join(_type_repr(a) for a in args)
72
+ return f"{origin_name}[{arg_strs}]"
73
+ if hasattr(tp, "__name__"):
74
+ return tp.__name__
75
+ return str(tp)
76
+
77
+
78
+ def parse_ts_interface(ts_path: Path) -> dict[str, str]:
79
+ """Extract property names and types from a TypeScript interface file.
80
+
81
+ Returns {propertyName: tsType}.
82
+ """
83
+ if not ts_path.exists():
84
+ return {}
85
+ text = ts_path.read_text(encoding="utf-8")
86
+ props: dict[str, str] = {}
87
+ # Match: propertyName: type; or propertyName?: type;
88
+ for match in re.finditer(
89
+ r"^\s+(\w+)\??:\s*(.+?);", text, re.MULTILINE,
90
+ ):
91
+ props[match.group(1)] = match.group(2).strip()
92
+ return props
93
+
94
+
95
+ def build_mapping_table(
96
+ ingestion_fields: list[dict[str, str]],
97
+ dto_fields: list[dict[str, str]],
98
+ ts_props: dict[str, str],
99
+ ) -> tuple[list[str], list[str]]:
100
+ """Build the field mapping rows and dropped field rows.
101
+
102
+ Returns (mapping_rows, dropped_rows) as lists of markdown table lines.
103
+ """
104
+ dto_by_alias: dict[str, dict[str, str]] = {
105
+ f["alias"]: f for f in dto_fields
106
+ }
107
+ dto_by_name: dict[str, dict[str, str]] = {
108
+ f["field_name"]: f for f in dto_fields
109
+ }
110
+
111
+ mapping_rows: list[str] = []
112
+ covered_aliases: set[str] = set()
113
+
114
+ for ing in ingestion_fields:
115
+ json_key = ing["alias"]
116
+ py_field = ing["field_name"]
117
+ py_type = ing["type"]
118
+
119
+ # Find matching DTO field by alias or name
120
+ dto = dto_by_alias.get(json_key) or dto_by_name.get(py_field)
121
+ if dto:
122
+ dto_alias = dto["alias"]
123
+ covered_aliases.add(dto_alias)
124
+ ts_prop = ts_props.get(dto_alias, "—")
125
+ mapping_rows.append(
126
+ f"| `{json_key}` | `{py_field}` | `{dto_alias}` "
127
+ f"| `{ts_prop}` | `{py_type}` | |"
128
+ )
129
+ else:
130
+ mapping_rows.append(
131
+ f"| `{json_key}` | `{py_field}` | — | — "
132
+ f"| `{py_type}` | **Not in DTO** |"
133
+ )
134
+
135
+ # Dropped fields: in ingestion but not in DTO
136
+ dropped_rows: list[str] = []
137
+ for ing in ingestion_fields:
138
+ json_key = ing["alias"]
139
+ py_field = ing["field_name"]
140
+ dto = dto_by_alias.get(json_key) or dto_by_name.get(py_field)
141
+ if not dto:
142
+ dropped_rows.append(
143
+ f"| `{json_key}` | Not mapped to display DTO |"
144
+ )
145
+
146
+ return mapping_rows, dropped_rows
147
+
148
+
149
+ def generate_doc(
150
+ ingestion_cls: type,
151
+ dto_cls: type,
152
+ ts_path: Path | None = None,
153
+ ) -> str:
154
+ """Generate the full mapping document as a markdown string."""
155
+ source_name = ingestion_cls.__name__.replace("Payload", "")
156
+ ing_fields = get_field_info(ingestion_cls)
157
+ dto_fields = get_field_info(dto_cls)
158
+ ts_props = parse_ts_interface(ts_path) if ts_path else {}
159
+
160
+ mapping_rows, dropped_rows = build_mapping_table(
161
+ ing_fields, dto_fields, ts_props,
162
+ )
163
+
164
+ field_table = "\n".join(mapping_rows) if mapping_rows else "| _(no fields)_ | | | | | |"
165
+ dropped_table = "\n".join(dropped_rows) if dropped_rows else "| _(none)_ | |"
166
+
167
+ ing_module = ingestion_cls.__module__
168
+ dto_module = dto_cls.__module__
169
+ today = date.today().isoformat()
170
+
171
+ return f"""# {source_name} — UI ↔ JSON Data Mapping
172
+
173
+ > **Auto-generated reference** — do not hand-edit.
174
+ > Regenerate with: `python scripts/generate_mapping_doc.py`
175
+ > Source of truth: contract tests + Pydantic models
176
+
177
+ ---
178
+
179
+ ## Data Source
180
+
181
+ | Property | Value |
182
+ |----------|-------|
183
+ | Ingestion Model | `{ing_module}.{ingestion_cls.__name__}` |
184
+ | Display DTO | `{dto_module}.{dto_cls.__name__}` |
185
+ | TS Types | `{ts_path or '—'}` |
186
+
187
+ ---
188
+
189
+ ## Field Mapping
190
+
191
+ | JSON Key | Python Field | DTO Alias | TypeScript Property | Type | Notes |
192
+ |----------|-------------|-----------|--------------------:|------|-------|
193
+ {field_table}
194
+
195
+ ---
196
+
197
+ ## Intentionally Dropped Fields
198
+
199
+ Fields present in the source but NOT exposed to the frontend:
200
+
201
+ | JSON Key | Reason |
202
+ |----------|--------|
203
+ {dropped_table}
204
+
205
+ ---
206
+
207
+ ## Changelog
208
+
209
+ | Date | Change |
210
+ |------|--------|
211
+ | {today} | Auto-generated from models |
212
+ """
213
+
214
+
215
+ def main() -> None:
216
+ parser = argparse.ArgumentParser(
217
+ description="Generate or check a field mapping doc from Pydantic models"
218
+ )
219
+ parser.add_argument(
220
+ "--ingestion", required=True,
221
+ help="Dotted path to ingestion model (module.path:ClassName)",
222
+ )
223
+ parser.add_argument(
224
+ "--dto", required=True,
225
+ help="Dotted path to display DTO (module.path:ClassName)",
226
+ )
227
+ parser.add_argument(
228
+ "--ts-types", type=Path, default=None,
229
+ help="Path to TypeScript interface file (optional)",
230
+ )
231
+ parser.add_argument(
232
+ "--output", type=Path, default=None,
233
+ help="Write mapping doc to this file (generate mode)",
234
+ )
235
+ parser.add_argument(
236
+ "--check", type=Path, default=None,
237
+ help="Compare existing doc against models (check mode, exit 1 if stale)",
238
+ )
239
+ args = parser.parse_args()
240
+
241
+ if not args.output and not args.check:
242
+ parser.error("Provide --output (generate) or --check (validate)")
243
+
244
+ try:
245
+ ingestion_cls = load_class(args.ingestion)
246
+ dto_cls = load_class(args.dto)
247
+ except (ValueError, AttributeError, ModuleNotFoundError) as e:
248
+ print(f"Error loading model: {e}", file=sys.stderr)
249
+ sys.exit(1)
250
+
251
+ doc = generate_doc(ingestion_cls, dto_cls, args.ts_types)
252
+
253
+ if args.output:
254
+ args.output.parent.mkdir(parents=True, exist_ok=True)
255
+ args.output.write_text(doc, encoding="utf-8")
256
+ print(f"✅ Mapping doc written to {args.output}")
257
+ sys.exit(0)
258
+
259
+ if args.check:
260
+ if not args.check.exists():
261
+ print(f"❌ Mapping doc not found: {args.check}", file=sys.stderr)
262
+ sys.exit(1)
263
+
264
+ existing = args.check.read_text(encoding="utf-8")
265
+ # Compare the Field Mapping table sections only (ignore dates/changelog)
266
+ new_table = _extract_table(doc)
267
+ old_table = _extract_table(existing)
268
+
269
+ if new_table == old_table:
270
+ print("✅ Mapping doc is current.")
271
+ sys.exit(0)
272
+ else:
273
+ print("❌ Mapping doc is STALE — regenerate it.")
274
+ print(f" Expected {len(new_table)} lines, found {len(old_table)} lines.")
275
+ sys.exit(1)
276
+
277
+
278
+ def _extract_table(text: str) -> list[str]:
279
+ """Extract the Field Mapping table rows for comparison."""
280
+ lines: list[str] = []
281
+ in_section = False
282
+ for line in text.splitlines():
283
+ if "## Field Mapping" in line:
284
+ in_section = True
285
+ continue
286
+ if in_section and line.startswith("## "):
287
+ break
288
+ if in_section and line.startswith("|") and "JSON Key" not in line and "---" not in line:
289
+ lines.append(line.strip())
290
+ return lines
291
+
292
+
293
+ if __name__ == "__main__":
294
+ main()
@@ -0,0 +1,214 @@
1
+ """
2
+ TypeScript ↔ DTO Comparator
3
+
4
+ Compares TypeScript interface properties against Python Pydantic DTO aliases
5
+ to detect D4 (alias mismatch) and D5 (type mismatch) drift.
6
+
7
+ Usage:
8
+ python scripts/ts_dto_compare.py \
9
+ --ts frontend/src/types/my-source.ts \
10
+ --dto src.models.responses.my_source.MyResponse
11
+
12
+ Part of the data-contract-pipeline skill.
13
+ """
14
+
15
+ from __future__ import annotations
16
+
17
+ import importlib
18
+ import re
19
+ import sys
20
+ from pathlib import Path
21
+
22
+
23
+ # Python → TypeScript type mapping
24
+ PYTHON_TO_TS_TYPE: dict[str, str] = {
25
+ "str": "string",
26
+ "int": "number",
27
+ "float": "number",
28
+ "bool": "boolean",
29
+ "list": "Array",
30
+ "dict": "Record",
31
+ "None": "null",
32
+ "Any": "any",
33
+ }
34
+
35
+
36
+ def load_class(dotted_path: str) -> type:
37
+ """Import a class from a dotted module path."""
38
+ module_path, _, class_name = dotted_path.rpartition(".")
39
+ if not module_path:
40
+ raise ValueError(f"Invalid class path: {dotted_path}")
41
+ module = importlib.import_module(module_path)
42
+ cls = getattr(module, class_name, None)
43
+ if cls is None:
44
+ raise AttributeError(f"{class_name} not found in {module_path}")
45
+ return cls
46
+
47
+
48
+ def extract_ts_properties(ts_source: str) -> dict[str, str]:
49
+ """
50
+ Extract property names and types from a TypeScript interface.
51
+
52
+ Returns dict of {property_name: type_string}.
53
+ Handles basic types — not deep generics or union types.
54
+ """
55
+ properties: dict[str, str] = {}
56
+
57
+ # Match: propertyName: type; or propertyName?: type;
58
+ pattern = re.compile(
59
+ r"^\s*(\w+)\s*\??\s*:\s*(.+?)\s*;",
60
+ re.MULTILINE,
61
+ )
62
+
63
+ for match in pattern.finditer(ts_source):
64
+ prop_name = match.group(1)
65
+ prop_type = match.group(2).strip()
66
+ properties[prop_name] = prop_type
67
+
68
+ return properties
69
+
70
+
71
+ def get_dto_aliases_and_types(dto_cls: type) -> dict[str, str]:
72
+ """
73
+ Get DTO field aliases and their simplified type names.
74
+
75
+ Returns dict of {alias: simplified_python_type}.
76
+ """
77
+ result: dict[str, str] = {}
78
+ for name, info in dto_cls.model_fields.items():
79
+ alias = info.alias or name
80
+ # Get the annotation type and simplify
81
+ annotation = info.annotation
82
+ type_name = getattr(annotation, "__name__", str(annotation))
83
+ result[alias] = type_name
84
+ return result
85
+
86
+
87
+ def python_type_to_ts(python_type: str) -> str:
88
+ """Convert a simplified Python type string to expected TypeScript type."""
89
+ # Handle Optional/union types
90
+ python_type = python_type.replace("NoneType", "None")
91
+
92
+ # Direct mapping
93
+ if python_type in PYTHON_TO_TS_TYPE:
94
+ return PYTHON_TO_TS_TYPE[python_type]
95
+
96
+ # Handle list[T]
97
+ list_match = re.match(r"list\[(.+)]", python_type)
98
+ if list_match:
99
+ inner = python_type_to_ts(list_match.group(1))
100
+ return f"{inner}[]"
101
+
102
+ # Handle dict[str, T]
103
+ dict_match = re.match(r"dict\[str,\s*(.+)]", python_type)
104
+ if dict_match:
105
+ inner = python_type_to_ts(dict_match.group(1))
106
+ return f"Record<string, {inner}>"
107
+
108
+ return python_type
109
+
110
+
111
+ def compare(
112
+ ts_properties: dict[str, str],
113
+ dto_fields: dict[str, str],
114
+ ) -> list[str]:
115
+ """
116
+ Compare TypeScript properties against DTO aliases.
117
+
118
+ Returns list of drift findings.
119
+ """
120
+ findings: list[str] = []
121
+
122
+ ts_names = set(ts_properties.keys())
123
+ dto_names = set(dto_fields.keys())
124
+
125
+ # D4 — Alias mismatch: DTO field not in TypeScript
126
+ for name in sorted(dto_names - ts_names):
127
+ findings.append(
128
+ f"D4: DTO alias '{name}' not found in TypeScript interface"
129
+ )
130
+
131
+ # D4 — Alias mismatch: TypeScript property not in DTO
132
+ for name in sorted(ts_names - dto_names):
133
+ findings.append(
134
+ f"D4: TypeScript property '{name}' not found in DTO aliases"
135
+ )
136
+
137
+ # D5 — Type mismatch (for shared properties)
138
+ for name in sorted(ts_names & dto_names):
139
+ expected_ts = python_type_to_ts(dto_fields[name])
140
+ actual_ts = ts_properties[name]
141
+
142
+ # Normalize for comparison (strip whitespace, lowercase basic types)
143
+ norm_expected = expected_ts.lower().strip()
144
+ norm_actual = actual_ts.lower().strip()
145
+
146
+ if norm_expected != norm_actual:
147
+ findings.append(
148
+ f"D5: Type mismatch for '{name}': "
149
+ f"DTO expects '{expected_ts}', TS has '{actual_ts}'"
150
+ )
151
+
152
+ return findings
153
+
154
+
155
+ def main() -> None:
156
+ """CLI entry point."""
157
+ import argparse
158
+
159
+ parser = argparse.ArgumentParser(
160
+ description="Compare TypeScript interface properties against Python DTO aliases"
161
+ )
162
+ parser.add_argument(
163
+ "--ts",
164
+ type=Path,
165
+ required=True,
166
+ help="Path to TypeScript types file",
167
+ )
168
+ parser.add_argument(
169
+ "--dto",
170
+ type=str,
171
+ required=True,
172
+ help="Dotted path to DTO class (e.g., src.models.responses.nps.NpsResponse)",
173
+ )
174
+ args = parser.parse_args()
175
+
176
+ # Load TypeScript source
177
+ if not args.ts.exists():
178
+ print(f"Error: TypeScript file not found: {args.ts}", file=sys.stderr)
179
+ sys.exit(1)
180
+
181
+ ts_source = args.ts.read_text(encoding="utf-8")
182
+ ts_properties = extract_ts_properties(ts_source)
183
+
184
+ if not ts_properties:
185
+ print(
186
+ f"Warning: No properties found in {args.ts}. "
187
+ f"Is the interface defined with standard syntax?",
188
+ file=sys.stderr,
189
+ )
190
+
191
+ # Load DTO
192
+ try:
193
+ dto_cls = load_class(args.dto)
194
+ except (ValueError, AttributeError, ModuleNotFoundError) as e:
195
+ print(f"Error loading DTO: {e}", file=sys.stderr)
196
+ sys.exit(1)
197
+
198
+ dto_fields = get_dto_aliases_and_types(dto_cls)
199
+
200
+ # Compare
201
+ findings = compare(ts_properties, dto_fields)
202
+
203
+ if not findings:
204
+ print(f"✅ No drift detected ({len(ts_properties)} properties matched).")
205
+ sys.exit(0)
206
+ else:
207
+ print(f"❌ {len(findings)} drift finding(s):\n")
208
+ for finding in findings:
209
+ print(f" {finding}")
210
+ sys.exit(1)
211
+
212
+
213
+ if __name__ == "__main__":
214
+ main()
@@ -0,0 +1,51 @@
1
+ """Validate that production UI fields have source-to-screen lineage."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import argparse
6
+ import json
7
+ import sys
8
+ from pathlib import Path
9
+ from typing import Any
10
+
11
+
12
+ REQUIRED_KEYS = (
13
+ "ui_component",
14
+ "ui_label",
15
+ "frontend_field",
16
+ "api_field",
17
+ "display_dto_field",
18
+ "source",
19
+ "source_field",
20
+ )
21
+
22
+
23
+ def main() -> None:
24
+ parser = argparse.ArgumentParser(description="Validate lineage_manifest.json coverage.")
25
+ parser.add_argument("--lineage", type=Path, required=True, help="lineage_manifest.json")
26
+ parser.add_argument(
27
+ "--allow-partial",
28
+ action="store_true",
29
+ help="Return success for partial/evolving contracts.",
30
+ )
31
+ args = parser.parse_args()
32
+
33
+ manifest = json.loads(args.lineage.read_text(encoding="utf-8-sig"))
34
+ findings: list[str] = []
35
+ for idx, item in enumerate(manifest.get("lineage", []), start=1):
36
+ status = item.get("status", "contract-backed")
37
+ if status in {"deferred", "mockup-only", "source-capability-only"}:
38
+ continue
39
+ missing = [key for key in REQUIRED_KEYS if not item.get(key)]
40
+ if missing:
41
+ findings.append(f"L{idx}: missing {', '.join(missing)}")
42
+
43
+ if findings:
44
+ for finding in findings:
45
+ print(finding)
46
+ sys.exit(0 if args.allow_partial else 1)
47
+ print("Lineage validation passed.")
48
+
49
+
50
+ if __name__ == "__main__":
51
+ main()