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
package/cli/index.js CHANGED
@@ -1,51 +1,63 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Google Antigravity CLI
4
+ * Antigravity IDE CLI
5
5
  * Create AI Agent projects with interactive setup
6
6
  */
7
7
 
8
8
  const { program } = require('commander');
9
9
  const { createProject } = require('./create');
10
+ const { initProject } = require('./init');
10
11
  const packageJson = require('../package.json');
11
12
  const { checkAndApplyUpdates } = require('./lib/auto-update');
12
13
 
13
14
  // Run update check before program
14
15
  (async () => {
15
- await checkAndApplyUpdates(packageJson);
16
+ if (!process.env.ANTIGRAVITY_SKIP_UPDATE) {
17
+ await checkAndApplyUpdates(packageJson);
18
+ }
16
19
 
17
20
  program
18
- .name('google-antigravity')
19
- .description('Create AI Agent projects with skills, rules, and workflows')
21
+ .name('antigravity-ide')
22
+ .description('The Unified AI Engineering Tool: Create, Update, Repair, and Fix projects')
20
23
  .version(packageJson.version)
21
- .argument('[project-name]', 'Name of the project', '.')
24
+ .argument('[project-name]', 'Name of the project (if exists, will Repair/Update)', '.')
22
25
  .option('-t, --template <type>', 'Project template (minimal, standard, full)', 'standard')
23
26
  .option('-s, --skip-prompts', 'Skip interactive prompts and use defaults')
27
+ .option('-f, --force', 'Force overwrite/restore files during Repair')
24
28
  .action(async (projectName, options) => {
25
29
  await createProject(projectName, options);
26
30
  });
27
31
 
32
+ program
33
+ .command('init')
34
+ .description('Alias for the root command: Initialize or Repair project')
35
+ .action(async (options) => {
36
+ // Just run createProject in current dir - it handles existing projects via Repair mode
37
+ await createProject('.', options);
38
+ });
39
+
28
40
  program
29
41
  .command('update')
30
- .description('Update Google Antigravity to the latest version')
31
- .action(() => {
32
- const ora = require('ora');
33
- const chalk = require('chalk');
34
- const { exec } = require('child_process');
35
-
36
- const spinner = ora('Checking for latest version and updating...').start();
37
-
38
- // Use npm install -g to update the package itself
39
- exec('npm install -g antigravity-ide@latest', (error, stdout, stderr) => {
40
- if (error) {
41
- spinner.fail(`Update failed: ${error.message}`);
42
- console.error(chalk.red(stderr));
43
- return;
44
- }
45
-
46
- spinner.succeed('Google Antigravity has been updated to the latest version!');
47
- console.log(chalk.gray('You may also need to run "antigravity-update" to sync global skills.'));
48
- });
42
+ .description('Sync and Repair the current project with the latest global standards')
43
+ .action(async (options) => {
44
+ await createProject('.', { ...options, force: true });
45
+ });
46
+
47
+ program
48
+ .command('validate')
49
+ .description('Check project compliance with Agent Skills Standard')
50
+ .action(async () => {
51
+ const { validateProject } = require('./validate');
52
+ await validateProject('.');
53
+ });
54
+
55
+ program
56
+ .command('manager')
57
+ .description('Launch the Agent-First Manager View Dashboard (Monitor Swarm)')
58
+ .action(async () => {
59
+ const { launchManagerView } = require('./ui/dashboard');
60
+ await launchManagerView('.');
49
61
  });
50
62
 
51
63
  program.parse(process.argv);
@@ -14,28 +14,21 @@ async function checkAndApplyUpdates(packageJson, options = {}) {
14
14
  const notifier = notifierLib({ pkg: packageJson, updateCheckInterval: 0 });
15
15
 
16
16
  if (notifier.update) {
17
- const { latest, current, type } = notifier.update;
18
- console.log(chalk.yellow(`\n📦 Update available: ${current} → ${chalk.green(latest)} (${type})`));
19
-
20
- const response = await promptsLib({
21
- type: 'confirm',
22
- name: 'shouldUpdate',
23
- message: 'Do you want to update Google Antigravity now? / Bạn có muốn cập nhật ngay không?',
24
- initial: true
25
- });
17
+ const { latest, current } = notifier.update;
18
+ console.log(chalk.yellow(`\n📦 New version detected: ${chalk.green(latest)} (Current: ${current})`));
19
+ console.log(chalk.cyan('🚀 Auto-updating Antigravity IDE to ensure you have the latest features...'));
26
20
 
27
- if (response.shouldUpdate) {
28
- try {
29
- console.log(chalk.cyan('\n🚀 Updating Global Antigravity... Please wait...'));
30
- execSyncLib('npm install -g antigravity-ide@latest', { stdio: 'inherit' });
31
- console.log(chalk.green('\n✅ Verified Update! Restarting command...'));
32
- exitLib(0);
33
- } catch (error) {
34
- console.error(chalk.red('\n❌ Update failed. Please run: npm install -g antigravity-ide@latest'));
35
- console.error(error.message);
36
- }
37
- } else {
38
- console.log(chalk.gray('\nℹ️ Skipping update. You can update later using: npx antigravity-ide update'));
21
+ try {
22
+ // Use --no-save to avoid polluting local package.json if run in a project
23
+ // But -g is what actually updates the global/npx cached version for next runs
24
+ execSyncLib('npm install -g antigravity-ide@latest', { stdio: 'inherit' });
25
+ console.log(chalk.green('\n✅ Version ' + latest + ' installed successfully!'));
26
+ console.log(chalk.bold.yellow('🔄 Please run your command again to use the new version.\n'));
27
+ exitLib(0);
28
+ } catch (error) {
29
+ console.log(chalk.gray('\n⚠️ Automatic update failed (possibly due to permissions).'));
30
+ console.log(chalk.gray(` Please run manually: ${chalk.white('npm install -g antigravity-ide@latest')}\n`));
31
+ // In case of failure, we continue with current version so we don't block the user
39
32
  }
40
33
  }
41
34
  }
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Logic for Product Type (User Apps, Dev Tools, AI, Assets)
3
+ * Determines specific Skills and Shared Modules needed.
4
+ */
5
+
6
+ function getProductConfig(productType) {
7
+ const skillsToAdd = new Set();
8
+ const sharedModules = new Set();
9
+
10
+ // 1. User Applications (Web/Mobile/Desktop)
11
+ if (productType === 'user_app') {
12
+ skillsToAdd.add('webdev');
13
+ skillsToAdd.add('mobile');
14
+ skillsToAdd.add('testing');
15
+ skillsToAdd.add('uiux');
16
+
17
+ sharedModules.add('design-system.md');
18
+ sharedModules.add('ui-ux-pro-max.md');
19
+ }
20
+
21
+ // 2. Developer Tools (CLI/Lib/API)
22
+ if (productType === 'dev_tool') {
23
+ skillsToAdd.add('devops');
24
+ skillsToAdd.add('testing');
25
+ skillsToAdd.add('webdev'); // For docs/landing
26
+
27
+ sharedModules.add('api-standards.md');
28
+ sharedModules.add('infra-blueprints.md');
29
+ }
30
+
31
+ // 3. AI Agents (Chatbot/Auto)
32
+ if (productType === 'ai_agent') {
33
+ skillsToAdd.add('ai');
34
+ skillsToAdd.add('maker');
35
+ skillsToAdd.add('research');
36
+
37
+ sharedModules.add('ai-master.md');
38
+ sharedModules.add('docs-sync.md');
39
+ }
40
+
41
+ // 4. Digital Assets (Game/Template)
42
+ if (productType === 'digital_asset') {
43
+ skillsToAdd.add('mobile'); // Game Dev
44
+ skillsToAdd.add('webdev'); // Templates
45
+ skillsToAdd.add('growth'); // SEO
46
+ skillsToAdd.add('uiux');
47
+
48
+ sharedModules.add('design-system.md');
49
+ sharedModules.add('growth-hacking.md');
50
+ }
51
+
52
+ return {
53
+ skills: Array.from(skillsToAdd),
54
+ sharedModules: Array.from(sharedModules)
55
+ };
56
+ }
57
+
58
+ module.exports = { getProductConfig };
@@ -627,45 +627,6 @@ const skillCategories = {
627
627
  'webapp-testing',
628
628
  'wordpress-penetration-testing'
629
629
  ]
630
- },
631
- 'maker-lite': {
632
- name: 'Indie Hacker Light (MVP & Launch)',
633
- skills: [
634
- 'browser-extension-builder',
635
- 'clean-code',
636
- 'copywriting',
637
- 'deployment-procedures',
638
- 'error-handling-patterns',
639
- 'firebase',
640
- 'git-pushing',
641
- 'launch-strategy',
642
- 'marketing-ideas',
643
- 'micro-saas-launcher',
644
- 'personal-tool-builder',
645
- 'product-manager-toolkit',
646
- 'seo-fundamentals',
647
- 'stripe-integration',
648
- 'telegram-bot-builder',
649
- 'vercel-deploy'
650
- ]
651
- },
652
- 'growth-enterprise': {
653
- name: 'Enterprise Growth (Scale & Ops)',
654
- skills: [
655
- 'analytics-tracking',
656
- 'business-analyst',
657
- 'competitor-alternatives',
658
- 'content-marketer',
659
- 'cro-expert-kit',
660
- 'customer-support',
661
- 'email-systems',
662
- 'hubspot-integration',
663
- 'kpi-dashboard-design',
664
- 'product-manager-toolkit',
665
- 'salesforce-development',
666
- 'seo-audit',
667
- 'seo-expert-kit'
668
- ]
669
630
  }
670
631
  };
671
632
 
package/cli/prompts.js CHANGED
@@ -1,11 +1,28 @@
1
- /**
2
- * Interactive prompts for project configuration
3
- */
4
-
5
1
  const prompts = require('prompts');
6
2
  const chalk = require('chalk');
7
3
  const gradient = require('gradient-string');
8
4
  const packageJson = require('../package.json');
5
+ const { execSync } = require('child_process');
6
+
7
+ // Import Logic Modules
8
+ const { skillCategories, getSkillsForCategories } = require('./logic/skill-definitions');
9
+ const { getScaleConfig } = require('./logic/scale-rules');
10
+ const { getProductConfig } = require('./logic/product-skills');
11
+ const { getWorkflows } = require('./logic/workflow-manager');
12
+
13
+ function checkPython() {
14
+ try {
15
+ execSync('python --version', { stdio: 'ignore' });
16
+ return true;
17
+ } catch (e) {
18
+ try {
19
+ execSync('python3 --version', { stdio: 'ignore' });
20
+ return true;
21
+ } catch (e2) {
22
+ return false;
23
+ }
24
+ }
25
+ }
9
26
 
10
27
  // Display concise banner with gradient
11
28
  function displayBanner() {
@@ -18,174 +35,163 @@ function displayBanner() {
18
35
  console.log(gradient.pastel.multiline(' / ___ |/ / / / /_/ / /_/ / / / /_/ /| |/ / / /_/ /_/ / '));
19
36
  console.log(gradient.pastel.multiline('/_/ |_/_/ /_/\\__/_/\\____/_/ \\__,_/ |___/_/\\__/\\__, / '));
20
37
  console.log(gradient.pastel.multiline(' /____/ '));
21
- console.log(chalk.gray(` Google Antigravity • v${packageJson.version}`));
22
- console.log(chalk.gray(' Developed with 💡 by Dokhacgiakhoa'));
38
+ console.log(chalk.gray(` AntiGravity IDE • v${packageJson.version}`));
39
+ console.log(chalk.gray(' System Core: 15 Rules • 22 Agents • 573 Skills • 30 Workflows • 2977 Patterns'));
23
40
  console.log(gradient.rainbow('━'.repeat(60)));
24
41
  console.log('');
25
42
  }
26
43
 
27
- const skillCategories = {
28
- webdev: {
29
- name: 'Web High-Performance',
30
- skills: [
31
- 'modern-web-architect',
32
- 'full-stack-scaffold',
33
- 'api-documenter',
34
- 'i18n-localization'
35
- ]
36
- },
37
- mobile: {
38
- name: 'Mobile & Game',
39
- skills: [
40
- 'mobile-design',
41
- 'game-development',
42
- 'i18n-localization'
43
- ]
44
- },
45
- devops: {
46
- name: 'DevOps & Cloud',
47
- skills: [
48
- 'cloud-architect-master',
49
- 'deployment-engineer',
50
- 'incident-responder',
51
- 'mcp-builder'
52
- ]
53
- },
54
- security: {
55
- name: 'Security & Audit',
56
- skills: [
57
- 'security-auditor',
58
- 'penetration-tester-master',
59
- 'production-code-audit',
60
- 'vulnerability-scanner'
61
- ]
62
- },
63
- ai: {
64
- name: 'AI & ML',
65
- skills: [
66
- 'ai-engineer',
67
- 'geo-fundamentals',
68
- 'prompt-engineer'
69
- ]
70
- },
71
- growth: {
72
- name: 'Growth & Data',
73
- skills: [
74
- 'cro-expert-kit',
75
- 'seo-expert-kit',
76
- 'database-migration',
77
- 'performance-engineer'
78
- ]
79
- }
80
- };
81
-
82
44
  async function getProjectConfig(skipPrompts = false, predefinedName = null) {
45
+ let responses;
46
+
83
47
  if (skipPrompts) {
84
- return {
85
- projectName: predefinedName || 'my-agent-project',
48
+ responses = {
86
49
  language: 'en',
87
- operationMode: 'standard',
88
- engineMode: 'standard'
50
+ projectName: predefinedName || 'my-agent-project',
51
+ scale: 'creative', // Default to Creative for full experience
52
+ productType: 'user_app', // Default
53
+ agentName: 'Agent',
54
+ industryDomain: 'other'
89
55
  };
90
- }
56
+ } else {
57
+ // Check Python only if we are going to prompt (UX)
58
+ const hasPython = checkPython();
59
+ displayBanner();
60
+ console.log(chalk.bold.cyan('🚀 Project Setup Wizard\n'));
61
+ console.log(chalk.gray('Answer a few questions to configure your AI Agent project...\n'));
91
62
 
92
- // Display beautiful banner
93
- displayBanner();
94
-
95
- console.log(chalk.bold.cyan('🚀 Project Setup Wizard\n'));
96
- console.log(chalk.gray('Answer a few questions to configure your AI Agent project...\n'));
97
-
98
- const responses = await prompts([
99
- {
100
- type: 'select',
101
- name: 'language',
102
- message: 'Select Language / Chọn ngôn ngữ:',
103
- choices: [
104
- { title: '1. English', value: 'en' },
105
- { title: '2. Tiếng Việt', value: 'vi' }
106
- ],
107
- initial: 1
108
- },
109
- {
110
- type: predefinedName ? null : 'text',
111
- name: 'projectName',
112
- message: (prev, values) => values.language === 'vi' ? 'Tên dự án (Project name):' : 'Project name:',
113
- initial: 'my-agent-project',
114
- validate: (value) => {
115
- if (!/^[a-z0-9-_]+$/.test(value)) {
116
- return 'Project name can only contain lowercase letters, numbers, hyphens, and underscores';
117
- }
118
- return true;
119
- }
120
- },
121
- {
122
- type: 'select',
123
- name: 'operationMode',
124
- message: (prev, values) => {
125
- const lang = values.language;
126
- return lang === 'vi'
127
- ? 'Chọn Chế độ Vận hành (Phụ thuộc vào tài khoản AI của bạn):'
128
- : 'Select Operation Mode (Based on your AI Account):';
63
+ responses = await prompts([
64
+ {
65
+ type: 'select',
66
+ name: 'language',
67
+ message: 'Select Language / Chọn ngôn ngữ:',
68
+ choices: [
69
+ { title: '1. English', value: 'en' },
70
+ { title: '2. Tiếng Việt', value: 'vi' }
71
+ ],
72
+ initial: 1
129
73
  },
130
- choices: (prev, values) => {
131
- const lang = values.language;
132
- return [
133
- {
134
- title: lang === 'vi'
135
- ? '🌿 ECO (Siêu tiết kiệm - Khuyên dùng cho Tài khoản Free)'
136
- : '🌿 ECO (Economy - Best for Free accounts)',
137
- value: 'eco'
138
- },
139
- {
140
- title: lang === 'vi'
141
- ? '🏢 PRO (Chuyên nghiệp - Gemini Pro - Hỗ trợ Plugin mở rộng)'
142
- : '🏢 PRO (Professional - Gemini Pro - Supports Plugin extensions)',
143
- value: 'pro'
144
- },
145
- {
146
- title: lang === 'vi'
147
- ? '🌌 ULTRA (Sáng tạo - Yêu cầu Gemini Ultra)'
148
- : '🌌 ULTRA (Infinite - Requires Gemini Ultra)',
149
- value: 'ultra'
74
+ {
75
+ type: predefinedName ? null : 'text',
76
+ name: 'projectName',
77
+ message: (prev, values) => values.language === 'vi' ? 'Tên dự án (Project name):' : 'Project name:',
78
+ initial: 'my-agent-project',
79
+ validate: (value) => {
80
+ if (value && !/^[a-z0-9-_]+$/.test(value)) {
81
+ return 'Project name can only contain lowercase letters, numbers, hyphens, and underscores';
150
82
  }
151
- ];
83
+ return true;
84
+ }
152
85
  },
153
- initial: 1
154
- }
155
- ], {
156
- onCancel: () => {
157
- console.log(chalk.red('\n✖ Operation cancelled'));
158
- process.exit(0);
86
+ {
87
+ type: 'select',
88
+ name: 'scale', // Maps to 'rules'
89
+ message: (prev, values) => values.language === 'vi' ? 'Quy mô dự án:' : 'Project Scale:',
90
+ choices: (prev, values) => values.language === 'vi' ? [
91
+ { title: '🍜 Mì ăn liền (Instant) - MVP, nhanh gọn, tập trung Frontend', value: 'instant' },
92
+ { title: '🎨 Sáng tạo (Creative) - Nghiên cứu, Sandbox, Full tính năng', value: 'creative' },
93
+ { title: '🏢 SME (Enterprise) - Ổn định, Vận hành, Clean Code', value: 'sme' }
94
+ ] : [
95
+ { title: '🍜 Instant - MVP, Fast, Frontend Focus', value: 'instant' },
96
+ { title: '🎨 Creative - Research, Sandbox, Full Features', value: 'creative' },
97
+ { title: '🏢 SME - Stable, Operations, Clean Code', value: 'sme' }
98
+ ],
99
+ initial: 0
100
+ },
101
+ {
102
+ type: 'select',
103
+ name: 'productType',
104
+ message: (prev, values) => values.language === 'vi' ? 'Loại sản phẩm (Product Type):' : 'Select Product Type:',
105
+ choices: (prev, values) => values.language === 'vi' ? [
106
+ { title: '📱 Ứng dụng Người dùng (App/Web/Mobile)', value: 'user_app' },
107
+ { title: '🛠️ Công cụ Lập trình (CLI/Library/API)', value: 'dev_tool' },
108
+ { title: '🤖 Trợ lý AI (Chatbot/Automation)', value: 'ai_agent' },
109
+ { title: '🎨 Tài sản Số (Game/Template/Media)', value: 'digital_asset' }
110
+ ] : [
111
+ { title: '📱 User Application (App/Web/Mobile/Desktop)', value: 'user_app' },
112
+ { title: '🛠️ Developer Tool (CLI/Library/API)', value: 'dev_tool' },
113
+ { title: '🤖 AI Agent (Chatbot/Automation)', value: 'ai_agent' },
114
+ { title: '🎨 Digital Asset (Game/Template/Media)', value: 'digital_asset' }
115
+ ],
116
+ initial: 0
117
+ },
118
+ {
119
+ type: 'text',
120
+ name: 'agentName',
121
+ message: (prev, values) => values.language === 'vi' ? 'Đặt tên cho Agent (VD: Jarvis, Friday):' : 'Name your Agent (e.g., Jarvis, Friday):',
122
+ validate: (value) => value.length < 2 ? (process.env.LANG?.includes('vi') ? 'Tên Agent phải có ít nhất 2 ký tự' : 'Name must be at least 2 characters long') : true
123
+ }
124
+ ], {
125
+ onCancel: () => {
126
+ console.log(chalk.red('\n✖ Operation cancelled'));
127
+ process.exit(0);
128
+ }
129
+ });
130
+
131
+ // Warning for missing Python in Advanced Modes
132
+ if (responses.scale !== 'instant' && !hasPython) {
133
+ console.log(chalk.yellow(`\n⚠️ Warning: Python is recommended for ${responses.scale.toUpperCase()} mode (AI & Data features).`));
134
+ console.log(chalk.gray(' Follow Python installation guide in docs/INSTALL_NPX_GUIDE.vi.md if needed.'));
159
135
  }
160
- });
161
-
136
+ }
137
+
162
138
  // Inject predefined name if it exists (so logic downstream works)
163
139
  if (predefinedName) {
164
140
  responses.projectName = predefinedName;
165
141
  }
142
+
143
+ if (!responses.projectName) responses.projectName = 'my-agent-project'; // Fallback
144
+
145
+ console.log(`\n${chalk.green('✔')} Setup Complete! Generating Project Plan...`);
146
+
147
+ // Default Industry to 'other' (General / All Fields)
148
+ responses.industryDomain = 'other';
149
+
150
+ // --- LOGIC INTEGRATION START ---
151
+
152
+ // 1. Get Scale Configuration (Engine, Rules, Core Skills)
153
+ const scaleConfig = getScaleConfig(responses.scale);
154
+
155
+ // 2. Get Product Skills
156
+ const { skills: productSkills, sharedModules } = getProductConfig(responses.productType);
157
+
158
+ // 3. Combine Skills (Core + Product)
159
+ const allSkills = new Set([...scaleConfig.coreSkillCategories, ...productSkills]);
160
+
161
+ // 4. Get Workflows (combined from Scale and Product/Industry)
162
+ const finalWorkflows = getWorkflows(
163
+ responses.industryDomain,
164
+ responses.productType,
165
+ scaleConfig.baseWorkflows
166
+ );
166
167
 
167
168
  const settings = {
168
- engineMode: responses.operationMode === 'creative' ? 'advanced' : 'standard',
169
- agentName: 'Antigravity',
170
- projectScale: responses.operationMode
169
+ template: 'standard',
170
+ rules: scaleConfig.rulesMode,
171
+ workflows: finalWorkflows,
172
+ packageManager: 'npm',
173
+ engineMode: scaleConfig.engineMode,
174
+ productType: responses.productType
171
175
  };
172
176
 
173
- // Return configuration with presets
174
- return { ...responses, ...settings, skillCategories: Object.keys(skillCategories) };
177
+ // Return configuration
178
+ return { ...responses, ...settings, skillCategories: Array.from(allSkills) };
175
179
  }
176
180
 
177
- function getSkillsForCategories(categories) {
178
- const skills = [];
179
- categories.forEach(category => {
180
- if (skillCategories[category]) {
181
- skills.push(...skillCategories[category].skills);
182
- }
181
+
182
+ async function confirmOverwrite(fileName) {
183
+ const response = await prompts({
184
+ type: 'confirm',
185
+ name: 'value',
186
+ message: chalk.yellow(`⚠️ File "${fileName}" already exists. Overwrite? / File đã tồn tại. Ghi đè?`),
187
+ initial: false
183
188
  });
184
- return skills;
189
+ return response.value;
185
190
  }
186
191
 
187
192
  module.exports = {
188
193
  getProjectConfig,
189
194
  getSkillsForCategories,
190
- skillCategories
195
+ skillCategories,
196
+ confirmOverwrite
191
197
  };
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Khả năng điều khiển trình duyệt Web để thu thập dữ liệu (Browser Subagent Core).
3
+ ---
4
+
5
+ # BROWSER-SUBAGENT-CORE: Agent-First Vision & Web Scraping
6
+
7
+ > **Mục tiêu**: Cấp quyền cho Agent chủ động mở trình duyệt (Sandbox Chromium), phân tích cấu trúc DOM và tương tác thao tác đa điểm với thành phần tĩnh/động của máy chủ Website.
8
+
9
+ ## 🛠️ Công Cụ (Tools API Integration)
10
+ Bất cứ một Sub-agent nào trong mạng lưới cũng có quyền import và gọi file `cli/tools/browser.js` để thực thi các tác vụ:
11
+
12
+ 1. `init({headless})`: Khởi tạo phiên làm việc của Trình duyệt.
13
+ 2. `goto(url)`: Điều hướng đến trang mục tiêu an toàn (chờ networkidle).
14
+ 3. `readDOM(selector)`: Trích xuất nội dung văn bản (innerText) để phân tích, tránh quá tải Context Token khi quét Website.
15
+ 4. `captureScreenshot(name)`: Chụp ảnh Website và lưu về thư mục `.agent/vision/` (Cho kịch bản cần AI Vision).
16
+ 5. `type(selector, text)` và `click(selector)`: Mô phỏng hành vi của một User thực sự tương tác với DOM.
17
+
18
+ ## ⚠️ Nguyên Tắc Lõi (Subagent Principles)
19
+
20
+ - **Graceful Error Handling**: Luôn luôn sử dụng `try/catch` để bắt các lỗi Timeout hoặc "Selector Not Found" từ Playwright. Báo lỗi này về lại Manager View.
21
+ - **Tiết kiệm Trí nhớ (Tokens limit)**: KHÔNG bao giờ nạp toàn bộ mã nguồn HTML `innerHTML` một cách máy móc. Hãy sử dụng hàm `readDOM` hoặc khoanh vùng bằng `CSS Selector` cụ thể.
22
+ - **Clean-up Resource**: Sau khi quét xong một luồng, Agent BẮT BUỘC gọi hàm `close()` để không gây tình trạng ngốn RAM hay mở lén tiến trình rác trên thiết bị khách hàng.