antigravity-ide 4.2.1 → 4.3.3

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 (359) hide show
  1. package/.agent/.shared/{design-philosophy → core/design-philosophy}/README.md +12 -1
  2. package/.agent/.shared/{ai-master → technical/ai-master}/README.md +12 -1
  3. package/.agent/.shared/{api-standards → technical/api-standards}/README.md +12 -1
  4. package/.agent/.shared/{database-master → technical/database-master}/README.md +12 -2
  5. package/.agent/.shared/{seo-master → technical/seo-master}/README.md +12 -1
  6. package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/README.md +12 -1
  7. package/.agent/ARCHITECTURE.md +16 -10
  8. package/.agent/ARCHITECTURE.vi.md +8 -8
  9. package/{GEMINI.md → .agent/GEMINI.md} +4 -5
  10. package/.agent/RESOURCES.md +6 -1
  11. package/.agent/agents/backend-specialist.md +154 -19
  12. package/.agent/agents/browser-subagent.md +45 -0
  13. package/.agent/agents/cloud-architect.md +108 -189
  14. package/.agent/agents/debugger.md +83 -182
  15. package/.agent/agents/documentation-writer.md +125 -72
  16. package/.agent/agents/frontend-specialist.md +40 -7
  17. package/.agent/agents/game-developer.md +111 -116
  18. package/.agent/agents/mobile-developer.md +108 -321
  19. package/.agent/agents/orchestrator.md +106 -366
  20. package/.agent/agents/performance-optimizer.md +105 -136
  21. package/.agent/agents/project-planner.md +132 -39
  22. package/.agent/agents/quality-inspector.md +136 -32
  23. package/.agent/agents/security-auditor.md +138 -15
  24. package/.agent/agents/seo-specialist.md +118 -72
  25. package/.agent/agents/test-engineer.md +142 -11
  26. package/.agent/brain/task.md +16 -0
  27. package/.agent/rules/GEMINI.md +63 -31
  28. package/.agent/rules/code-quality.md +34 -3
  29. package/.agent/rules/frontend.md +3 -3
  30. package/.agent/rules/strict-protocol.md +44 -3
  31. package/.agent/rules/system-update.md +56 -3
  32. package/.agent/skills/agent-backend-patterns/SKILL.md +16 -3
  33. package/.agent/skills/ai-engineer/SKILL.md +29 -16
  34. package/.agent/skills/api-documenter/SKILL.md +4 -4
  35. package/.agent/skills/app-builder/SKILL.md +1 -1
  36. package/.agent/skills/app-builder/tech-stack.md +2 -2
  37. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
  38. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
  39. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
  40. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
  41. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
  42. package/.agent/skills/brand-guidelines-anthropic/LICENSE.txt +202 -0
  43. package/.agent/skills/brand-guidelines-anthropic/SKILL.md +26 -0
  44. package/.agent/skills/brand-guidelines-anthropic/sub-skills/color-application.md +5 -0
  45. package/.agent/skills/brand-guidelines-anthropic/sub-skills/colors.md +14 -0
  46. package/.agent/skills/brand-guidelines-anthropic/sub-skills/font-management.md +6 -0
  47. package/.agent/skills/brand-guidelines-anthropic/sub-skills/shape-and-accent-colors.md +7 -0
  48. package/.agent/skills/brand-guidelines-anthropic/sub-skills/smart-font-application.md +6 -0
  49. package/.agent/skills/brand-guidelines-anthropic/sub-skills/text-styling.md +6 -0
  50. package/.agent/skills/brand-guidelines-anthropic/sub-skills/typography.md +7 -0
  51. package/.agent/skills/cloud-architect-master/SKILL.md +9 -4
  52. package/.agent/skills/cro-expert-kit/SKILL.md +9 -4
  53. package/.agent/skills/database-migration/SKILL.md +9 -3
  54. package/.agent/skills/deployment-engineer/SKILL.md +9 -3
  55. package/.agent/skills/frontend-design/ux-psychology.md +10 -585
  56. package/.agent/skills/full-stack-scaffold/SKILL.md +4 -4
  57. package/.agent/skills/game-development/2d-games/SKILL.md +4 -2
  58. package/.agent/skills/game-development/3d-games/SKILL.md +4 -2
  59. package/.agent/skills/game-development/SKILL.md +18 -149
  60. package/.agent/skills/game-development/game-art/SKILL.md +4 -2
  61. package/.agent/skills/game-development/game-audio/SKILL.md +4 -2
  62. package/.agent/skills/game-development/game-design/SKILL.md +4 -2
  63. package/.agent/skills/game-development/mobile-games/SKILL.md +4 -2
  64. package/.agent/skills/game-development/multiplayer/SKILL.md +4 -2
  65. package/.agent/skills/game-development/pc-games/SKILL.md +4 -2
  66. package/.agent/skills/game-development/vr-ar/SKILL.md +4 -2
  67. package/.agent/skills/game-development/web-games/SKILL.md +4 -2
  68. package/.agent/skills/geo-fundamentals/SKILL.md +9 -136
  69. package/.agent/skills/git-collaboration-master/SKILL.md +9 -4
  70. package/.agent/skills/i18n-localization/SKILL.md +10 -118
  71. package/.agent/skills/incident-responder/SKILL.md +9 -6
  72. package/.agent/skills/internal-comms-anthropic/LICENSE.txt +202 -0
  73. package/.agent/skills/internal-comms-anthropic/SKILL.md +33 -0
  74. package/.agent/skills/internal-comms-anthropic/examples/3p-updates.md +47 -0
  75. package/.agent/skills/internal-comms-anthropic/examples/company-newsletter.md +65 -0
  76. package/.agent/skills/internal-comms-anthropic/examples/faq-answers.md +30 -0
  77. package/.agent/skills/internal-comms-anthropic/examples/general-comms.md +16 -0
  78. package/.agent/skills/last30days/tests/__init__.py +1 -0
  79. package/.agent/skills/last30days/tests/test_cache.py +59 -0
  80. package/.agent/skills/last30days/tests/test_dates.py +114 -0
  81. package/.agent/skills/last30days/tests/test_dedupe.py +111 -0
  82. package/.agent/skills/last30days/tests/test_models.py +135 -0
  83. package/.agent/skills/last30days/tests/test_normalize.py +138 -0
  84. package/.agent/skills/last30days/tests/test_render.py +116 -0
  85. package/.agent/skills/last30days/tests/test_score.py +168 -0
  86. package/.agent/skills/legacy-modernizer/SKILL.md +9 -4
  87. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +2 -14
  88. package/.agent/skills/loki-mode/.github/workflows/claude-code-review.yml +57 -0
  89. package/.agent/skills/loki-mode/.github/workflows/claude.yml +50 -0
  90. package/.agent/skills/loki-mode/.github/workflows/release.yml +128 -0
  91. package/.agent/skills/loki-mode/tests/run-all-tests.sh +78 -0
  92. package/.agent/skills/loki-mode/tests/test-agent-timeout.sh +348 -0
  93. package/.agent/skills/loki-mode/tests/test-bootstrap.sh +196 -0
  94. package/.agent/skills/loki-mode/tests/test-circuit-breaker.sh +389 -0
  95. package/.agent/skills/loki-mode/tests/test-state-recovery.sh +393 -0
  96. package/.agent/skills/loki-mode/tests/test-task-queue.sh +396 -0
  97. package/.agent/skills/loki-mode/tests/test-wrapper.sh +314 -0
  98. package/.agent/skills/mcp-builder/SKILL.md +21 -164
  99. package/.agent/skills/mobile-design/SKILL.md +21 -369
  100. package/.agent/skills/mobile-design/mobile-performance.md +1 -1
  101. package/.agent/skills/modern-web-architect/SKILL.md +12 -6
  102. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +1 -1
  103. package/.agent/skills/penetration-tester-master/SKILL.md +9 -4
  104. package/.agent/skills/performance-engineer/SKILL.md +4 -5
  105. package/.agent/skills/production-code-audit/SKILL.md +6 -0
  106. package/.agent/skills/rust-pro/SKILL.md +0 -177
  107. package/.agent/skills/security-auditor/SKILL.md +35 -27
  108. package/.agent/skills/seo-expert-kit/SKILL.md +9 -4
  109. package/.agent/skills/shopify-development/scripts/tests/test_shopify_init.py +379 -0
  110. package/.agent/skills/tdd-master-workflow/SKILL.md +9 -3
  111. package/.agent/workflows/audit.md +30 -16
  112. package/.agent/workflows/brainstorm.md +33 -96
  113. package/.agent/workflows/create.md +37 -45
  114. package/.agent/workflows/debug.md +45 -84
  115. package/.agent/workflows/deploy.md +33 -158
  116. package/.agent/workflows/document.md +38 -15
  117. package/.agent/workflows/enhance.md +33 -48
  118. package/.agent/workflows/monitor.md +35 -14
  119. package/.agent/workflows/orchestrate.md +33 -218
  120. package/.agent/workflows/plan.md +39 -70
  121. package/.agent/workflows/security.md +35 -14
  122. package/.agent/workflows/seo.md +39 -16
  123. package/.agent/workflows/status.md +33 -72
  124. package/.agent/workflows/test.md +30 -127
  125. package/.agent/workflows/ui-ux-pro-max.md +24 -283
  126. package/LICENSE +22 -8
  127. package/README.md +105 -72
  128. package/README.vi.md +93 -110
  129. package/cli/create.js +275 -413
  130. package/cli/index.js +36 -24
  131. package/cli/lib/auto-update.js +14 -21
  132. package/cli/logic/product-skills.js +58 -0
  133. package/cli/logic/skill-definitions.js +0 -39
  134. package/cli/prompts.js +151 -145
  135. package/cli/skills/browser-subagent-core/SKILL.md +22 -0
  136. package/cli/tools/browser.js +75 -0
  137. package/cli/ui/dashboard.js +48 -0
  138. package/docs/AGENTS_GUIDE.vi.md +39 -45
  139. package/docs/CONTRIBUTING.vi.md +12 -3
  140. package/docs/{GEMINI_GUIDE.md → GEMINI_USAGE.md} +6 -6
  141. package/docs/GLOSSARY.vi.md +49 -30
  142. package/docs/HOW_ANTIGRAVITY_THINKS.vi.md +1 -1
  143. package/docs/OPERATIONAL_FLOW.vi.md +15 -0
  144. package/docs/{PUBLISHING.md → PUBLISHING_GUIDE.md} +31 -3
  145. package/docs/RULES_GUIDE.vi.md +67 -31
  146. package/docs/SHARED_LIBRARY_GUIDE.vi.md +18 -22
  147. package/docs/SKILLS_GUIDE.vi.md +119 -32
  148. package/docs/TROUBLESHOOTING.vi.md +10 -2
  149. package/docs/WORKFLOW_GUIDE.vi.md +57 -9
  150. package/package.json +32 -8
  151. package/setup.js +147 -114
  152. package/.agent/.shared/compliance/README.md +0 -19
  153. package/.agent/.shared/design-system/README.md +0 -18
  154. package/.agent/.shared/domain-blueprints/README.md +0 -18
  155. package/.agent/.shared/dx-toolkit/README.md +0 -19
  156. package/.agent/.shared/i18n-master/README.md +0 -18
  157. package/.agent/.shared/infra-blueprints/README.md +0 -18
  158. package/.agent/.shared/metrics/README.md +0 -17
  159. package/.agent/.shared/resilience-patterns/README.md +0 -19
  160. package/.agent/.shared/security-armor/README.md +0 -25
  161. package/.agent/.shared/testing-master/README.md +0 -20
  162. package/.agent/.shared/vitals-templates/README.md +0 -18
  163. package/.agent/agents/accessibility-expert.md +0 -22
  164. package/.agent/agents/api-architect.md +0 -22
  165. package/.agent/agents/backend-specialist.eco.md +0 -19
  166. package/.agent/agents/backend-specialist.instant.md +0 -19
  167. package/.agent/agents/codebase-expert.md +0 -23
  168. package/.agent/agents/compliance-expert.md +0 -22
  169. package/.agent/agents/data-scientist.md +0 -22
  170. package/.agent/agents/debugger.eco.md +0 -20
  171. package/.agent/agents/debugger.instant.md +0 -20
  172. package/.agent/agents/deep-thinker.ultra.md +0 -23
  173. package/.agent/agents/devex-optimizer.md +0 -22
  174. package/.agent/agents/devops-architect.md +0 -22
  175. package/.agent/agents/frontend-specialist.eco.md +0 -19
  176. package/.agent/agents/frontend-specialist.instant.md +0 -19
  177. package/.agent/agents/growth-engineer.md +0 -22
  178. package/.agent/agents/i18n-specialist.md +0 -21
  179. package/.agent/agents/legacy-modernizer.md +0 -22
  180. package/.agent/agents/microservices-specialist.md +0 -22
  181. package/.agent/agents/motion-designer.md +0 -22
  182. package/.agent/agents/orchestrator.creative.md +0 -28
  183. package/.agent/agents/orchestrator.eco.md +0 -29
  184. package/.agent/agents/orchestrator.instant.md +0 -29
  185. package/.agent/agents/orchestrator.ultra.md +0 -28
  186. package/.agent/agents/performance-benchmarker.md +0 -22
  187. package/.agent/agents/project-planner.eco.md +0 -19
  188. package/.agent/agents/project-planner.instant.md +0 -19
  189. package/.agent/agents/security-pentester.md +0 -22
  190. package/.agent/agents/serverless-expert.md +0 -22
  191. package/.agent/fastcode_index.json +0 -1038
  192. package/.agent/mcp_config.json +0 -24
  193. package/.agent/rules/GEMINI.eco.md +0 -37
  194. package/.agent/rules/GEMINI.instant.md +0 -37
  195. package/.agent/rules/api-spec.md +0 -28
  196. package/.agent/rules/database.md +0 -24
  197. package/.agent/rules/devops.md +0 -23
  198. package/.agent/rules/growth-strategy.md +0 -22
  199. package/.agent/rules/logging-monitoring.md +0 -22
  200. package/.agent/rules/quality-assurance.md +0 -22
  201. package/.agent/rules/system-reasoning.md +0 -20
  202. package/.agent/rules/ui-design.md +0 -23
  203. package/.agent/rules/ux-patterns.md +0 -23
  204. package/.agent/scripts/auto_preview.py +0 -148
  205. package/.agent/scripts/checklist.py +0 -252
  206. package/.agent/scripts/session_manager.py +0 -120
  207. package/.agent/scripts/simulation_install.js +0 -59
  208. package/.agent/scripts/sync_to_global.py +0 -78
  209. package/.agent/scripts/translate_workflows.py +0 -53
  210. package/.agent/scripts/verify_all.py +0 -327
  211. package/.agent/scripts/verify_shared_modules.js +0 -126
  212. package/.agent/skills/fastcode-search/SKILL.md +0 -46
  213. package/.agent/skills/fastcode-search/fastcode_config.example.json +0 -17
  214. package/.agent/skills/frontend-trends-2026/SKILL.md +0 -78
  215. package/.agent/skills/frontend-trends-2026/formulas/BentoGrid.tsx +0 -42
  216. package/.agent/skills/frontend-trends-2026/formulas/LiquidCard.tsx +0 -32
  217. package/.agent/skills/frontend-trends-2026/formulas/NeoButton.tsx +0 -27
  218. package/.agent/workflows/deep-security-audit.md +0 -9
  219. package/.agent/workflows/growth-max.md +0 -9
  220. package/.agent/workflows/performance-max.md +0 -9
  221. package/.editorconfig +0 -21
  222. package/.gitattributes +0 -7
  223. package/CHANGELOG.md +0 -32
  224. package/ERRORS.md +0 -67
  225. package/action.yml +0 -32
  226. package/antigravity-ide-logo.png +0 -0
  227. package/antigravity-ide-logo.svg +0 -24
  228. package/assets/skills-bundle.json +0 -1
  229. package/cli/manifest.js +0 -524
  230. package/cli/skills/fastcode.js +0 -181
  231. package/docs/AGENT_FLOW.md +0 -608
  232. package/docs/CONTRIBUTING.md +0 -46
  233. package/docs/COPYRIGHT.md +0 -57
  234. package/docs/DEPLOYMENT.md +0 -77
  235. package/docs/GLOSSARY.md +0 -109
  236. package/docs/MASTER_GUIDE.md +0 -103
  237. package/docs/OPERATIONAL_FLOW.md +0 -147
  238. package/docs/PLAN-upgrade-core-architecture.md +0 -71
  239. package/docs/SKILLS.md +0 -610
  240. package/docs/TROUBLESHOOTING.md +0 -43
  241. package/jest.config.js +0 -8
  242. package/scripts/bump.js +0 -93
  243. package/scripts/bundle-skills.js +0 -59
  244. package/scripts/internal/automation/auto-release.js +0 -177
  245. package/scripts/internal/fractalize-skills.js +0 -89
  246. package/scripts/internal/generate-skill-definitions.js +0 -134
  247. package/scripts/internal/internal/update-docs.js +0 -115
  248. package/scripts/internal/refactor-skill-content.js +0 -127
  249. package/scripts/internal/rename-skills.js +0 -96
  250. package/scripts/internal/sync-skills.js +0 -112
  251. package/scripts/internal/update-frontmatter-names.js +0 -99
  252. package/scripts/internal/verification/audit-dna.js +0 -56
  253. package/scripts/internal/verification/audit-skills.js +0 -65
  254. package/web/src/app/docs/guide/examples/brainstorm/page.mdx +0 -91
  255. package/web/src/app/docs/guide/examples/create/page.mdx +0 -84
  256. package/web/src/app/docs/guide/examples/debugging/page.mdx +0 -83
  257. package/web/src/app/docs/guide/examples/deployment/page.mdx +0 -93
  258. package/web/src/app/docs/guide/examples/new-feature/page.mdx +0 -102
  259. package/web/src/app/docs/guide/examples/orchestration/page.mdx +0 -99
  260. package/web/src/app/docs/guide/examples/plan/page.mdx +0 -76
  261. package/web/src/app/docs/guide/examples/preview/page.mdx +0 -77
  262. package/web/src/app/docs/guide/examples/status/page.mdx +0 -78
  263. package/web/src/app/docs/guide/examples/test/page.mdx +0 -80
  264. package/web/src/app/docs/guide/examples/ui-design/page.mdx +0 -90
  265. package/web/src/components/mdx/Callout.tsx +0 -60
  266. package/web/src/components/mdx/FeatureGrid.tsx +0 -38
  267. package/web/src/components/mdx/ProTips.tsx +0 -29
  268. package/web/src/components/mdx/StepList.tsx +0 -33
  269. package/web/src/components/mdx/Terminal.tsx +0 -58
  270. package/web/src/components/mdx/index.ts +0 -5
  271. package/web/src/mdx-components.tsx +0 -98
  272. /package/.agent/.shared/{design-philosophy → core/design-philosophy}/MANIFESTO.md +0 -0
  273. /package/.agent/.shared/{design-philosophy → core/design-philosophy}/checklists/tactile_audit.md +0 -0
  274. /package/.agent/.shared/{design-philosophy → core/design-philosophy}/checklists/visual_audit.md +0 -0
  275. /package/.agent/.shared/{design-philosophy → core/design-philosophy}/presets/linear_glow.json +0 -0
  276. /package/.agent/.shared/{dx-toolkit → core/dx-toolkit}/checklists/code_review.md +0 -0
  277. /package/.agent/.shared/{dx-toolkit → core/dx-toolkit}/presets/vscode_settings.json +0 -0
  278. /package/.agent/.shared/{metrics → core/metrics}/benchmarks.json +0 -0
  279. /package/.agent/.shared/{vitals-templates → core/vitals-templates}/audit_report.md +0 -0
  280. /package/.agent/.shared/{vitals-templates → core/vitals-templates}/plan_prd.md +0 -0
  281. /package/.agent/.shared/{ai-master → technical/ai-master}/best_patterns.md +0 -0
  282. /package/.agent/.shared/{ai-master → technical/ai-master}/checklists/prompt_audit.md +0 -0
  283. /package/.agent/.shared/{ai-master → technical/ai-master}/presets/model_configs.json +0 -0
  284. /package/.agent/.shared/{api-standards → technical/api-standards}/data +0 -0
  285. /package/.agent/.shared/{api-standards → technical/api-standards}/endpoints_naming.md +0 -0
  286. /package/.agent/.shared/{api-standards → technical/api-standards}/error_codes.csv +0 -0
  287. /package/.agent/.shared/{api-standards → technical/api-standards}/pagination_sorting.md +0 -0
  288. /package/.agent/.shared/{api-standards → technical/api-standards}/response_format.json +0 -0
  289. /package/.agent/.shared/{database-master → technical/database-master}/schemas/auth_rbac.sql +0 -0
  290. /package/.agent/.shared/{database-master → technical/database-master}/schemas/cms.sql +0 -0
  291. /package/.agent/.shared/{database-master → technical/database-master}/schemas/ecommerce.sql +0 -0
  292. /package/.agent/.shared/{design-system → technical/design-system}/brand_presets.json +0 -0
  293. /package/.agent/.shared/{design-system → technical/design-system}/micro_interactions.md +0 -0
  294. /package/.agent/.shared/{i18n-master → technical/i18n-master}/vi_tech_dictionary.csv +0 -0
  295. /package/.agent/.shared/{i18n-master → technical/i18n-master}/workflows.json +0 -0
  296. /package/.agent/.shared/{resilience-patterns → technical/resilience-patterns}/checklists/chaos_engineering.md +0 -0
  297. /package/.agent/.shared/{resilience-patterns → technical/resilience-patterns}/presets/circuit_breaker.json +0 -0
  298. /package/.agent/.shared/{security-armor → technical/security-armor}/checklists/vuln_scan.md +0 -0
  299. /package/.agent/.shared/{security-armor → technical/security-armor}/hardening.md +0 -0
  300. /package/.agent/.shared/{security-armor → technical/security-armor}/presets/helmet_config.json +0 -0
  301. /package/.agent/.shared/{seo-master → technical/seo-master}/checklists/technical_seo.md +0 -0
  302. /package/.agent/.shared/{seo-master → technical/seo-master}/presets/json_ld_schema.json +0 -0
  303. /package/.agent/.shared/{testing-master → technical/testing-master}/checklists/pre_release.md +0 -0
  304. /package/.agent/.shared/{testing-master → technical/testing-master}/scenarios.md +0 -0
  305. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/colors.csv +0 -0
  306. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/icons.csv +0 -0
  307. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/landing.csv +0 -0
  308. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/products.csv +0 -0
  309. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/react-performance.csv +0 -0
  310. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/flutter.csv +0 -0
  311. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/html-tailwind.csv +0 -0
  312. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/jetpack-compose.csv +0 -0
  313. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/nextjs.csv +0 -0
  314. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/nuxt-ui.csv +0 -0
  315. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/nuxtjs.csv +0 -0
  316. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/react-native.csv +0 -0
  317. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/react.csv +0 -0
  318. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/shadcn.csv +0 -0
  319. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/svelte.csv +0 -0
  320. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/swiftui.csv +0 -0
  321. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/stacks/vue.csv +0 -0
  322. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/ux-guidelines.csv +0 -0
  323. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/data/web-interface.csv +0 -0
  324. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/scripts/__pycache__/core.cpython-313.pyc +0 -0
  325. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  326. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/scripts/core.py +0 -0
  327. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/scripts/design_system.py +0 -0
  328. /package/.agent/.shared/{ui-ux-pro-max → technical/ui-ux-pro-max}/scripts/search.py +0 -0
  329. /package/.agent/.shared/{compliance → verticals/compliance}/legal_templates.md +0 -0
  330. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/edtech.md +0 -0
  331. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/fintech.md +0 -0
  332. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/fnb_restaurant.md +0 -0
  333. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/freelance_marketplace.md +0 -0
  334. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/healthcare.md +0 -0
  335. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/hospitality_tourism.md +0 -0
  336. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/logistics.md +0 -0
  337. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/marketing_automation.md +0 -0
  338. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/personal_branding.md +0 -0
  339. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/real_estate.md +0 -0
  340. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/retail_ecommerce.md +0 -0
  341. /package/.agent/.shared/{domain-blueprints → verticals/domain-blueprints}/standard-pro-agents.md +0 -0
  342. /package/.agent/.shared/{infra-blueprints → verticals/infra-blueprints}/deployment_specs.md +0 -0
  343. /package/.agent/skills/ai-engineer/{resources → sub-skills}/ai_infra_stack.md +0 -0
  344. /package/.agent/skills/cloud-architect-master/{resources → sub-skills}/cost_optimization_checklist.md +0 -0
  345. /package/.agent/skills/cro-expert-kit/{resources → sub-skills}/psychological_triggers.md +0 -0
  346. /package/.agent/skills/database-migration/{resources → sub-skills}/zero_downtime_strategy.md +0 -0
  347. /package/.agent/skills/deployment-engineer/{resources → sub-skills}/k8s_best_practices.md +0 -0
  348. /package/.agent/skills/git-collaboration-master/{resources → sub-skills}/pr_template.md +0 -0
  349. /package/.agent/skills/incident-responder/{resources → sub-skills}/incident_severity_levels.md +0 -0
  350. /package/.agent/skills/legacy-modernizer/{resources → sub-skills}/strangler_fig_pattern.md +0 -0
  351. /package/.agent/skills/penetration-tester-master/{resources → sub-skills}/owasp_top_10_2025.md +0 -0
  352. /package/.agent/skills/production-code-audit/{resources → sub-skills}/solid_principles_cheat_sheet.md +0 -0
  353. /package/.agent/skills/seo-expert-kit/{resources → sub-skills}/technical_seo_checklist.md +0 -0
  354. /package/.agent/skills/tdd-master-workflow/{resources → sub-skills}/unit_test_naming_convention.md +0 -0
  355. /package/.agent/{.shared → skills}/ui-ux-pro-max/data/charts.csv +0 -0
  356. /package/.agent/{.shared → skills}/ui-ux-pro-max/data/prompts.csv +0 -0
  357. /package/.agent/{.shared → skills}/ui-ux-pro-max/data/styles.csv +0 -0
  358. /package/.agent/{.shared → skills}/ui-ux-pro-max/data/typography.csv +0 -0
  359. /package/.agent/{.shared → skills}/ui-ux-pro-max/data/ui-reasoning.csv +0 -0
@@ -1,24 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "context7": {
4
- "command": "npx",
5
- "args": [
6
- "-y",
7
- "@upstash/context7-mcp",
8
- "--api-key",
9
- "YOUR_API_KEY"
10
- ]
11
- },
12
- "shadcn": {
13
- "command": "npx",
14
- "args": [
15
- "shadcn@latest",
16
- "mcp"
17
- ]
18
- }
19
- //other mcp servers
20
- }
21
- }
22
-
23
- // setup mcp server in ~/.gemini\antigravity\mcp_config.json
24
-
@@ -1,37 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GEMINI.md - MVP Constitution (Luật MVP)
6
-
7
- > **Mục tiêu**: Tối ưu hóa tốc độ và tính linh hoạt để đưa sản phẩm MVP ra mắt nhanh nhất.
8
-
9
- ---
10
-
11
- ## 🚀 1. TƯ DUY MVP (MVP Mindset)
12
-
13
- - **Danh tính**: Antigravity MVP Orchestrator.
14
- - **Tâm thế**:
15
- - **Fast-Track (Tốc độ)**: Ưu tiên hoàn thành tính năng cốt lõi.
16
- - **Pragmatic (Thực dụng)**: Giải pháp đơn giản, hiệu quả.
17
- - **Clean MVP**: Code gọn gàng nhưng không quá phức tạp hóa.
18
-
19
- ---
20
-
21
- ## 🔄 2. CHU TRÌNH GỌN NHẸ (Lightweight PDCA)
22
-
23
- 1. **PLAN**: Lập kế hoạch nhanh (Atomic Tasks).
24
- 2. **DO**: Thực thi bởi các Đội ngũ Đa năng (Multi-taskers).
25
- 3. **VERIFY**: Kiểm tra tính đúng đắn cơ bản.
26
-
27
- ---
28
-
29
- ## 🛑 3. QUY TẮC CỐT LÕI
30
-
31
- 1. **Ask to Execute**: Nếu yêu cầu rõ ràng, hãy thực hiện ngay.
32
- 2. **Simple is Best**: Tránh Over-engineering.
33
- 3. **Safety First**: Vẫn tuân thủ nghiêm ngặt bảo mật (Secrets, SQLi).
34
-
35
- ---
36
-
37
- *Hệ thống được thiết kế để sáng tạo và triển khai tức thì.*
@@ -1,37 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GEMINI.md - MVP Constitution (Luật MVP)
6
-
7
- > **Mục tiêu**: Tối ưu hóa tốc độ và tính linh hoạt để đưa sản phẩm MVP ra mắt nhanh nhất.
8
-
9
- ---
10
-
11
- ## 🚀 1. TƯ DUY MVP (MVP Mindset)
12
-
13
- - **Danh tính**: Antigravity MVP Orchestrator.
14
- - **Tâm thế**:
15
- - **Fast-Track (Tốc độ)**: Ưu tiên hoàn thành tính năng cốt lõi.
16
- - **Pragmatic (Thực dụng)**: Giải pháp đơn giản, hiệu quả.
17
- - **Clean MVP**: Code gọn gàng nhưng không quá phức tạp hóa.
18
-
19
- ---
20
-
21
- ## 🔄 2. CHU TRÌNH GỌN NHẸ (Lightweight PDCA)
22
-
23
- 1. **PLAN**: Lập kế hoạch nhanh (Atomic Tasks).
24
- 2. **DO**: Thực thi bởi các Đội ngũ Đa năng (Multi-taskers).
25
- 3. **VERIFY**: Kiểm tra tính đúng đắn cơ bản.
26
-
27
- ---
28
-
29
- ## 🛑 3. QUY TẮC CỐT LÕI
30
-
31
- 1. **Ask to Execute**: Nếu yêu cầu rõ ràng, hãy thực hiện ngay.
32
- 2. **Simple is Best**: Tránh Over-engineering.
33
- 3. **Safety First**: Vẫn tuân thủ nghiêm ngặt bảo mật (Secrets, SQLi).
34
-
35
- ---
36
-
37
- *Hệ thống được thiết kế để sáng tạo và triển khai tức thì.*
@@ -1,28 +0,0 @@
1
- ---
2
- trigger: glob
3
- glob: "**/*.{yaml,yml,json,proto}"
4
- ---
5
-
6
- # API-SPEC.MD - Contract & Interface Standards
7
-
8
- > **Mục tiêu**: Đảm bảo hợp đồng dữ liệu giữa các hệ thống (Frontend-Backend, Microservices) luôn nhất quán và minh bạch.
9
-
10
- ## 📜 1. SPECIFICATION (OPENAPI/SWAGGER)
11
- 1. **Source of Truth**: File Spec là nguồn chân lý duy nhất. Code phải tuân thủ Spec hoặc Spec được sinh ra từ code một cách tự động.
12
- 2. **Versioning**: Luôn có version trong URL (ví dụ: `/api/v1/...`). Không bao giờ tạo breaking changes ở version hiện tại.
13
- 3. **Documentation**: Mọi Endpoint phải có mô tả rõ ràng về Params, Request Body và Response Schema.
14
-
15
- ## 🛠️ 2. DESIGN BEST PRACTICES
16
- 1. **Naming**: Dùng `kebab-case` cho URL. Dùng danh từ số nhiều (ví dụ: `/orders`).
17
- 2. **Methods**: Dùng đúng ý nghĩa của HTTP Verbs (GET, POST, PUT, PATCH, DELETE).
18
- 3. **Status Codes**:
19
- - 200/201: Success.
20
- - 400: Bad Request (Client error).
21
- - 401/403: Auth error.
22
- - 404: Not Found.
23
- - 500: Server error.
24
-
25
- ## 🛡️ 3. SECURITY & VALIDATION
26
- 1. **Input Sanitization**: Mọi dữ liệu đầu vào phải được validate schema trước khi xử lý.
27
- 2. **Rate Limiting**: Giới hạn số lượng request để tránh brute-force và DDoS.
28
- 3. **CORS**: Cấu hình chính xác Origin, không dùng `*` ở Production.
@@ -1,24 +0,0 @@
1
- ---
2
- trigger: glob
3
- glob: "**/*.{sql,prisma,mongodb,json}"
4
- ---
5
-
6
- # DATABASE.MD - Data Integrity & Schema Mastery
7
-
8
- > **Mục tiêu**: Đảm bảo cấu trúc dữ liệu chuẩn mực, hiệu năng truy vấn cao và an toàn dữ liệu tuyệt đối.
9
-
10
- ## 🏗️ 1. SCHEMA DESIGN
11
- 1. **Normalization**: Tuân thủ chuẩn 3NF. Tránh dư thừa dữ liệu.
12
- 2. **Naming**: Dùng `snake_case` cho Table và Column.
13
- 3. **Auditing**: Mọi bảng nghiệp vụ phải có `created_at` (timestamp) và `updated_at` (timestamp).
14
- 4. **Soft Delete**: Ưu tiên dùng `deleted_at` thay vì xóa vật lý cho dữ liệu quan trọng.
15
-
16
- ## ⚡ 2. PERFORMANCE & INDEXING
17
- 1. **Indexes**: Đánh Index cho Foreign Keys và các cột thường xuyên nằm trong điều kiện `WHERE`.
18
- 2. **Explain Plan**: Phải kiểm tra chi phí truy vấn trước khi triển khai các câu lệnh phức tạp.
19
- 3. **Pagination**: Luôn dùng con trỏ (Cursor) hoặc Limit/Offset để tránh tải quá nhiều dữ liệu.
20
-
21
- ## 🛡️ 3. MIGRATION PROTOCOL
22
- 1. **Atomic Changes**: Mỗi migration chỉ thực hiện một thay đổi logic duy nhất.
23
- 2. **Rollback**: Luôn phải có phương án hạ cấp (Down) cho mọi bản nâng cấp (Up).
24
- 3. **Production Safety**: Tuyệt đối không xóa/sửa cột có dữ liệu mà không có bước backup/migrate dữ liệu trung gian.
@@ -1,23 +0,0 @@
1
- ---
2
- trigger: glob
3
- glob: "**/dockerfile,**/docker-compose.yml,**/.github/workflows/*.yml,**/jenkinsfile,**/terraform/**/*,**/k8s/**/*"
4
- ---
5
-
6
- # DEVOPS.MD - Deployment & Infrastructure Mastery
7
-
8
- > **Mục tiêu**: Tự động hóa tối đa, triển khai an toàn và hạ tầng có khả năng mở rộng (Scalability).
9
-
10
- ## 🚀 1. CONTAINERIZATION (DOCKER)
11
- 1. **Multi-stage Builds**: Giảm thiểu kích thước Image bằng cách chỉ giữ lại Artifact cuối cùng.
12
- 2. **Non-root User**: Chạy ứng dụng dưới quyền user thường để đảm bảo bảo mật.
13
- 3. **Environment**: Dùng `.env` và không bao giờ hardcode cấu hình vào Image.
14
-
15
- ## 🛠️ 2. CI/CD PIPELINE
16
- 1. **Automated Testing**: Pipeline phải chạy Unit Test, Integration Test trước khi Build.
17
- 2. **Security Scan**: Tích hợp các công cụ quét mã độc (Snyk, Trivy) vào pipeline.
18
- 3. **Zero-downtime**: Triển khai theo chiến lược Canary hoặc Blue/Green.
19
-
20
- ## 🏗️ 3. INFRASTRUCTURE AS CODE (IaC)
21
- 1. **Declarative**: Ưu tiên Terraform hoặc CloudFormation.
22
- 2. **State Management**: Quản lý State tập trung (Remote State) và có khóa (Locking).
23
- 3. **Modularity**: Chia nhỏ hạ tầng thành các Module tái sử dụng.
@@ -1,22 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GROWTH-STRATEGY.MD - Business & Market Dominance
6
-
7
- > **Mục tiêu**: Biến sản phẩm kỹ thuật thành một sản phẩm kinh doanh thành công rực rỡ.
8
-
9
- ## 🚀 1. SEO & VISIBILITY Mastery
10
- 1. **Semantic HTML**: Cấu trúc heading (H1-H6) chuẩn SEO.
11
- 2. **Meta Data**: Dynamic meta tags cho từng trang, hỗ trợ OpenGraph và Twitter Cards.
12
- 3. **Schema Markup**: Nhúng JSON-LD để Google hiểu rõ nội dung website.
13
-
14
- ## 💰 2. CONVERSION RATE OPTIMIZATION (CRO)
15
- 1. **Call to Action (CTA)**: Nút bấm phải nổi bật, copy thu hút và đặt ở vị trí "vàng".
16
- 2. **Friction Reduction**: Tối giản số bước trong quy trình đăng ký/thanh toán.
17
- 3. **Social Proof**: Tích hợp testimonial, review và số liệu thực tế để tạo lòng tin.
18
-
19
- ## 📊 3. ANALYTICS & RETENTION
20
- 1. **Event Tracking**: Theo dõi hành vi người dùng bằng GA4, Mixpanel hoặc PostHog.
21
- 2. **Retention Loops**: Xây dựng các tính năng nhắc nhở, email marketing hoặc thông báo để giữ chân người dùng.
22
- 3. **Virality**: Tích hợp các cơ chế chia sẻ, mời bạn bè để phát triển người dùng tự nhiên.
@@ -1,22 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # LOGGING-MONITORING.MD - System Observability Standards
6
-
7
- > **Mục tiêu**: Mọi sự kiện đều phải được theo dõi, mọi lỗi đều phải được cảnh báo trước khi người dùng phát hiện.
8
-
9
- ## 📝 1. STRUCTURED LOGGING
10
- 1. **JSON Format**: Log phải ở định dạng JSON để dễ dàng parse bằng ELK/Splunk.
11
- 2. **Levels**: Dùng đúng cấp độ: `DEBUG`, `INFO`, `WARN`, `ERROR`, `FATAL`.
12
- 3. **Context**: Mỗi log phải đi kèm `request_id`, `user_id` và `timestamp` ISO 8601.
13
-
14
- ## 📊 2. METRICS & TELEMETRY
15
- 1. **Business Metrics**: Theo dõi tỷ lệ chuyển đổi, số lượng đơn hàng, v.v.
16
- 2. **System Metrics**: CPU, Memory, Disk I/O, Network Latency.
17
- 3. **Tracing**: Triển khai Distributed Tracing (OpenTelemetry) cho hệ thống Microservices.
18
-
19
- ## 🚨 3. ALERTING PROTOCOL
20
- 1. **Thresholds**: Thiết lập ngưỡng cảnh báo thông minh, tránh "Alert Fatigue".
21
- 2. **Channels**: Gửi cảnh báo về Slack, Discord hoặc PagerDuty tùy mức độ nghiêm trọng.
22
- 3. **Post-mortem**: Mọi lỗi `FATAL` đều phải có tài liệu phân tích nguyên nhân gốc rễ.
@@ -1,22 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # QUALITY-ASSURANCE.MD - Zero-Bug Tolerance Standards
6
-
7
- > **Mục tiêu**: Đảm bảo sản phẩm ra đời với chất lượng cao nhất thông qua quy trình kiểm thử nghiêm ngặt.
8
-
9
- ## 🧪 1. TESTING PYRAMID
10
- 1. **Unit Tests**: Phải bao phủ > 80% logic nghiệp vụ.
11
- 2. **Integration Tests**: Kiểm tra sự phối hợp giữa các module và database.
12
- 3. **E2E Tests**: Kiểm tra các luồng đi quan trọng (Critical Paths) từ góc nhìn người dùng.
13
-
14
- ## 📉 2. AUTOMATION & CI
15
- 1. **Regression Testing**: Mọi bug mới được phát hiện phải có một bản test đi kèm để tránh lặp lại.
16
- 2. **Performance Testing**: Kiểm tra ngưỡng chịu tải của hệ thống (Load test, Stress test).
17
- 3. **Visual Regression**: Kiểm tra sự thay đổi của giao diện qua các bản build.
18
-
19
- ## 📋 3. MANUAL REVIEW PROTOCOL
20
- 1. **Double-Check**: Task quan trọng phải được review bởi ít nhất 2 agent khác nhau.
21
- 2. **Edge Cases**: Luôn liệt kê và test các trường hợp biên, dữ liệu rác, mất kết nối mạng.
22
- 3. **Acceptance Criteria**: Chỉ hoàn thành task khi đạt 100% tiêu chí nghiệm thu (AC).
@@ -1,20 +0,0 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # SYSTEM-REASONING.MD - Advanced Logical Standards
6
-
7
- > **Mục tiêu**: Nâng tầm tư duy của AI lên cấp độ "Deep Think", đảm bảo các quyết định kỹ thuật luôn dựa trên sự phân tích đa chiều và dài hạn.
8
-
9
- ## 🧠 1. REASONING PROTOCOLS
10
- 1. **Multi-Perspective Analysis**: Trước khi sửa code, AI phải phân tích tác động dưới góc nhìn: Security, Performance, UI/UX và Maintainability.
11
- 2. **Mental Simulation**: Giả lập các kịch bản lỗi (Edge Cases) và cách hệ thống tự khôi phục trước khi thực thi.
12
- 3. **Long-Horizon Planning**: Mọi giải pháp phải bền vững trong ít nhất 12 tháng phát triển tiếp theo.
13
-
14
- ## 🛠️ 2. AGENTIC EXECUTION (GLM-5 Style)
15
- 1. **Self-Monitoring**: Agent phải liên tục kiểm tra trạng thái của chính mình và sửa sai ngay khi phát hiện bước trước đó không tối ưu.
16
- 2. **Adaptive Goal Setting**: Nếu mục tiêu ban đầu bị chặn bởi hạ tầng, Agent phải tự tìm con đường thay thế (Alternative Paths).
17
-
18
- ## 🛡️ 3. ZERO-COMPROMISE ARCHITECTURE
19
- 1. **Modular Sovereignty**: Cấm tuyệt đối code "vòng vo" hay phụ thuộc chéo (Circular Dependencies).
20
- 2. **Contract Compliance**: Chỉ tin vào Hợp đồng dữ liệu (Spec/Interface), không tin vào "phỏng đoán".
@@ -1,23 +0,0 @@
1
- ---
2
- trigger: glob
3
- glob: "**/*.{css,scss,less,styled.ts,tailwind.config.js}"
4
- ---
5
-
6
- # UI-DESIGN.MD - Visual Excellence & Aesthetics
7
-
8
- > **Mục tiêu**: Kiến tạo giao diện đẳng cấp, giàu tính nghệ thuật và đồng nhất về ngôn ngữ thiết kế.
9
-
10
- ## 🎨 1. TYPOGRAPHY & SPACING
11
- 1. **Scale**: Dùng hệ thống lưới 4px hoặc 8px cho mọi khoảng cách (Margin/Padding).
12
- 2. **Hierarchy**: Định nghĩa rõ ràng H1-H6, Body, Label với trọng số (Weight) và kích thước (Line-height) chuẩn.
13
- 3. **Font**: Ưu tiên các Variable Fonts cho web hiện đại để tối ưu hiệu suất.
14
-
15
- ## 🌈 2. COLOR SYSTEM
16
- 1. **Semantic Colors**: `primary`, `secondary`, `success`, `error`, `warning` phải có độ tương phản (WCAG) tốt.
17
- 2. **Dark Mode**: Mọi giao diện đều phải hỗ trợ Dark Mode một cách tự nhiên (không chỉ đảo ngược màu).
18
- 3. **Glassmorphism**: Dùng hiệu ứng mờ (Blur) và độ trong suốt (Opacity) một cách tinh tế.
19
-
20
- ## ✨ 3. MICRO-ANIMATIONS
21
- 1. **Transitions**: Mọi trạng thái Hover, Focus đều phải có hiệu ứng mượt mà (Ease-in-out).
22
- 2. **Lottie/SVG**: Dùng các hiệu ứng vector cho các loading hoặc icon tương tác.
23
- 3. **Performance**: Không dùng animation gây giật (jank), ưu tiên dùng `transform` và `opacity`.
@@ -1,23 +0,0 @@
1
- ---
2
- trigger: glob
3
- glob: "**/*.{js,jsx,ts,tsx}"
4
- ---
5
-
6
- # UX-PATTERNS.MD - User Experience & Flow Standards
7
-
8
- > **Mục tiêu**: Tối ưu hóa hành trình người dùng, giảm thiểu ma sát (friction) và tăng cường sự hài lòng.
9
-
10
- ## ⚓ 1. NAVIGATION & LAYOUT
11
- 1. **Predictability**: Các thành phần điều hướng (Navbar, Sidebar) phải nằm ở vị trí người dùng mong đợi.
12
- 2. **Breadcrumbs**: Luôn cung cấp đường dẫn cho các trang sâu > 2 cấp.
13
- 3. **Responsiveness**: Tuân thủ Mobile-first, đảm bảo trải nghiệm trên mọi kích thước màn hình.
14
-
15
- ## ⚡ 2. INTERACTION & FEEDBACK
16
- 1. **Skeleton Screens**: Dùng Skeleton thay cho spinner xoay tròn để tạo cảm giác tốc độ.
17
- 2. **Optimistic UI**: Cập nhật trạng thái ngay lập tức trên UI và đồng bộ với server ngầm.
18
- 3. **Error Prevention**: Validate dữ liệu ngay khi người dùng nhập (Inline validation).
19
-
20
- ## 🧠 3. ACCESSIBILITY (A11Y)
21
- 1. **Keyboard**: Phải điều hướng được toàn bộ trang bằng phím Tab.
22
- 2. **Screen Readers**: Dùng Semantic HTML (`<header>`, `<main>`, `<footer>`, `aria-label`).
23
- 3. **Focus States**: Trạng thái Focus phải rõ ràng, không được ẩn đi.
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Auto Preview - Antigravity Kit
4
- ==============================
5
- Manages (start/stop/status) the local development server for previewing the application.
6
-
7
- Usage:
8
- python .agent/scripts/auto_preview.py start [port]
9
- python .agent/scripts/auto_preview.py stop
10
- python .agent/scripts/auto_preview.py status
11
- """
12
-
13
- import os
14
- import sys
15
- import time
16
- import json
17
- import signal
18
- import argparse
19
- import subprocess
20
- from pathlib import Path
21
-
22
- AGENT_DIR = Path(".agent")
23
- PID_FILE = AGENT_DIR / "preview.pid"
24
- LOG_FILE = AGENT_DIR / "preview.log"
25
-
26
- def get_project_root():
27
- return Path(".").resolve()
28
-
29
- def is_running(pid):
30
- try:
31
- os.kill(pid, 0)
32
- return True
33
- except OSError:
34
- return False
35
-
36
- def get_start_command(root):
37
- pkg_file = root / "package.json"
38
- if not pkg_file.exists():
39
- return None
40
-
41
- with open(pkg_file, 'r') as f:
42
- data = json.load(f)
43
-
44
- scripts = data.get("scripts", {})
45
- if "dev" in scripts:
46
- return ["npm", "run", "dev"]
47
- elif "start" in scripts:
48
- return ["npm", "start"]
49
- return None
50
-
51
- def start_server(port=3000):
52
- if PID_FILE.exists():
53
- try:
54
- pid = int(PID_FILE.read_text().strip())
55
- if is_running(pid):
56
- print(f"⚠️ Preview already running (PID: {pid})")
57
- return
58
- except:
59
- pass # Invalid PID file
60
-
61
- root = get_project_root()
62
- cmd = get_start_command(root)
63
-
64
- if not cmd:
65
- print("❌ No 'dev' or 'start' script found in package.json")
66
- sys.exit(1)
67
-
68
- # Add port env var if needed (simple heuristic)
69
- env = os.environ.copy()
70
- env["PORT"] = str(port)
71
-
72
- print(f"🚀 Starting preview on port {port}...")
73
-
74
- with open(LOG_FILE, "w") as log:
75
- process = subprocess.Popen(
76
- cmd,
77
- cwd=str(root),
78
- stdout=log,
79
- stderr=log,
80
- env=env,
81
- shell=True # Required for npm on windows often, or consistent path handling
82
- )
83
-
84
- PID_FILE.write_text(str(process.pid))
85
- print(f"✅ Preview started! (PID: {process.pid})")
86
- print(f" Logs: {LOG_FILE}")
87
- print(f" URL: http://localhost:{port}")
88
-
89
- def stop_server():
90
- if not PID_FILE.exists():
91
- print("ℹ️ No preview server found.")
92
- return
93
-
94
- try:
95
- pid = int(PID_FILE.read_text().strip())
96
- if is_running(pid):
97
- # Try gentle kill first
98
- os.kill(pid, signal.SIGTERM) if sys.platform != 'win32' else subprocess.call(['taskkill', '/F', '/T', '/PID', str(pid)])
99
- print(f"🛑 Preview stopped (PID: {pid})")
100
- else:
101
- print("ℹ️ Process was not running.")
102
- except Exception as e:
103
- print(f"❌ Error stopping server: {e}")
104
- finally:
105
- if PID_FILE.exists():
106
- PID_FILE.unlink()
107
-
108
- def status_server():
109
- running = False
110
- pid = None
111
- url = "Unknown"
112
-
113
- if PID_FILE.exists():
114
- try:
115
- pid = int(PID_FILE.read_text().strip())
116
- if is_running(pid):
117
- running = True
118
- # Heuristic for URL, strictly we should save it
119
- url = "http://localhost:3000"
120
- except:
121
- pass
122
-
123
- print("\n=== Preview Status ===")
124
- if running:
125
- print(f"✅ Status: Running")
126
- print(f"🔢 PID: {pid}")
127
- print(f"🌐 URL: {url} (Likely)")
128
- print(f"📝 Logs: {LOG_FILE}")
129
- else:
130
- print("⚪ Status: Stopped")
131
- print("===================\n")
132
-
133
- def main():
134
- parser = argparse.ArgumentParser()
135
- parser.add_argument("action", choices=["start", "stop", "status"])
136
- parser.add_argument("port", nargs="?", default="3000")
137
-
138
- args = parser.parse_args()
139
-
140
- if args.action == "start":
141
- start_server(int(args.port))
142
- elif args.action == "stop":
143
- stop_server()
144
- elif args.action == "status":
145
- status_server()
146
-
147
- if __name__ == "__main__":
148
- main()