antigravity-ide 4.2.0 → 4.2.1

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 (354) hide show
  1. package/.agent/.shared/{technical/ai-master → ai-master}/README.md +1 -12
  2. package/.agent/.shared/{technical/api-standards → api-standards}/README.md +1 -12
  3. package/.agent/.shared/compliance/README.md +19 -0
  4. package/.agent/.shared/{technical/database-master → database-master}/README.md +2 -12
  5. package/.agent/.shared/{core/design-philosophy → design-philosophy}/README.md +1 -12
  6. package/.agent/.shared/design-system/README.md +18 -0
  7. package/.agent/.shared/domain-blueprints/README.md +18 -0
  8. package/.agent/.shared/dx-toolkit/README.md +19 -0
  9. package/.agent/.shared/i18n-master/README.md +18 -0
  10. package/.agent/.shared/infra-blueprints/README.md +18 -0
  11. package/.agent/.shared/metrics/README.md +17 -0
  12. package/.agent/.shared/resilience-patterns/README.md +19 -0
  13. package/.agent/.shared/security-armor/README.md +25 -0
  14. package/.agent/.shared/{technical/seo-master → seo-master}/README.md +1 -12
  15. package/.agent/.shared/testing-master/README.md +20 -0
  16. package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/README.md +1 -12
  17. package/.agent/.shared/vitals-templates/README.md +18 -0
  18. package/.agent/ARCHITECTURE.md +7 -10
  19. package/.agent/ARCHITECTURE.vi.md +8 -8
  20. package/.agent/RESOURCES.md +1 -0
  21. package/.agent/agents/accessibility-expert.md +22 -0
  22. package/.agent/agents/api-architect.md +22 -0
  23. package/.agent/agents/backend-specialist.eco.md +19 -0
  24. package/.agent/agents/backend-specialist.instant.md +19 -0
  25. package/.agent/agents/backend-specialist.md +19 -154
  26. package/.agent/agents/cloud-architect.md +189 -108
  27. package/.agent/agents/codebase-expert.md +23 -0
  28. package/.agent/agents/compliance-expert.md +22 -0
  29. package/.agent/agents/data-scientist.md +22 -0
  30. package/.agent/agents/debugger.eco.md +20 -0
  31. package/.agent/agents/debugger.instant.md +20 -0
  32. package/.agent/agents/debugger.md +182 -83
  33. package/.agent/agents/deep-thinker.ultra.md +23 -0
  34. package/.agent/agents/devex-optimizer.md +22 -0
  35. package/.agent/agents/devops-architect.md +22 -0
  36. package/.agent/agents/documentation-writer.md +72 -125
  37. package/.agent/agents/frontend-specialist.eco.md +19 -0
  38. package/.agent/agents/frontend-specialist.instant.md +19 -0
  39. package/.agent/agents/frontend-specialist.md +7 -40
  40. package/.agent/agents/game-developer.md +116 -111
  41. package/.agent/agents/growth-engineer.md +22 -0
  42. package/.agent/agents/i18n-specialist.md +21 -0
  43. package/.agent/agents/legacy-modernizer.md +22 -0
  44. package/.agent/agents/microservices-specialist.md +22 -0
  45. package/.agent/agents/mobile-developer.md +321 -108
  46. package/.agent/agents/motion-designer.md +22 -0
  47. package/.agent/agents/orchestrator.creative.md +28 -0
  48. package/.agent/agents/orchestrator.eco.md +29 -0
  49. package/.agent/agents/orchestrator.instant.md +29 -0
  50. package/.agent/agents/orchestrator.md +366 -106
  51. package/.agent/agents/orchestrator.ultra.md +28 -0
  52. package/.agent/agents/performance-benchmarker.md +22 -0
  53. package/.agent/agents/performance-optimizer.md +136 -105
  54. package/.agent/agents/project-planner.eco.md +19 -0
  55. package/.agent/agents/project-planner.instant.md +19 -0
  56. package/.agent/agents/project-planner.md +39 -132
  57. package/.agent/agents/quality-inspector.md +32 -136
  58. package/.agent/agents/security-auditor.md +15 -138
  59. package/.agent/agents/security-pentester.md +22 -0
  60. package/.agent/agents/seo-specialist.md +72 -118
  61. package/.agent/agents/serverless-expert.md +22 -0
  62. package/.agent/agents/test-engineer.md +11 -142
  63. package/.agent/fastcode_index.json +1038 -0
  64. package/.agent/mcp_config.json +24 -0
  65. package/.agent/rules/GEMINI.eco.md +37 -0
  66. package/.agent/rules/GEMINI.instant.md +37 -0
  67. package/.agent/rules/GEMINI.md +31 -62
  68. package/.agent/rules/api-spec.md +28 -0
  69. package/.agent/rules/code-quality.md +3 -34
  70. package/.agent/rules/database.md +24 -0
  71. package/.agent/rules/devops.md +23 -0
  72. package/.agent/rules/frontend.md +3 -3
  73. package/.agent/rules/growth-strategy.md +22 -0
  74. package/.agent/rules/logging-monitoring.md +22 -0
  75. package/.agent/rules/quality-assurance.md +22 -0
  76. package/.agent/rules/strict-protocol.md +3 -44
  77. package/.agent/rules/system-reasoning.md +20 -0
  78. package/.agent/rules/system-update.md +3 -56
  79. package/.agent/rules/ui-design.md +23 -0
  80. package/.agent/rules/ux-patterns.md +23 -0
  81. package/.agent/scripts/auto_preview.py +148 -0
  82. package/.agent/scripts/checklist.py +252 -0
  83. package/.agent/scripts/session_manager.py +120 -0
  84. package/.agent/scripts/simulation_install.js +59 -0
  85. package/.agent/scripts/sync_to_global.py +78 -0
  86. package/.agent/scripts/translate_workflows.py +53 -0
  87. package/.agent/scripts/verify_all.py +327 -0
  88. package/.agent/scripts/verify_shared_modules.js +126 -0
  89. package/.agent/skills/agent-backend-patterns/SKILL.md +6 -13
  90. package/.agent/skills/ai-engineer/SKILL.md +16 -29
  91. package/.agent/skills/api-documenter/SKILL.md +4 -4
  92. package/.agent/skills/app-builder/SKILL.md +1 -1
  93. package/.agent/skills/app-builder/tech-stack.md +2 -2
  94. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +79 -39
  95. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +75 -53
  96. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +119 -56
  97. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +94 -61
  98. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +82 -56
  99. package/.agent/skills/cloud-architect-master/SKILL.md +4 -9
  100. package/.agent/skills/cro-expert-kit/SKILL.md +4 -9
  101. package/.agent/skills/database-migration/SKILL.md +3 -9
  102. package/.agent/skills/deployment-engineer/SKILL.md +3 -9
  103. package/.agent/skills/fastcode-search/SKILL.md +46 -0
  104. package/.agent/skills/fastcode-search/fastcode_config.example.json +17 -0
  105. package/.agent/skills/frontend-design/ux-psychology.md +585 -10
  106. package/.agent/skills/frontend-trends-2026/SKILL.md +78 -0
  107. package/.agent/skills/frontend-trends-2026/formulas/BentoGrid.tsx +42 -0
  108. package/.agent/skills/frontend-trends-2026/formulas/LiquidCard.tsx +32 -0
  109. package/.agent/skills/frontend-trends-2026/formulas/NeoButton.tsx +27 -0
  110. package/.agent/skills/full-stack-scaffold/SKILL.md +4 -4
  111. package/.agent/skills/game-development/2d-games/SKILL.md +2 -4
  112. package/.agent/skills/game-development/3d-games/SKILL.md +2 -4
  113. package/.agent/skills/game-development/SKILL.md +149 -18
  114. package/.agent/skills/game-development/game-art/SKILL.md +2 -4
  115. package/.agent/skills/game-development/game-audio/SKILL.md +2 -4
  116. package/.agent/skills/game-development/game-design/SKILL.md +2 -4
  117. package/.agent/skills/game-development/mobile-games/SKILL.md +2 -4
  118. package/.agent/skills/game-development/multiplayer/SKILL.md +2 -4
  119. package/.agent/skills/game-development/pc-games/SKILL.md +2 -4
  120. package/.agent/skills/game-development/vr-ar/SKILL.md +2 -4
  121. package/.agent/skills/game-development/web-games/SKILL.md +2 -4
  122. package/.agent/skills/geo-fundamentals/SKILL.md +136 -9
  123. package/.agent/skills/git-collaboration-master/SKILL.md +4 -9
  124. package/.agent/skills/i18n-localization/SKILL.md +118 -10
  125. package/.agent/skills/incident-responder/SKILL.md +6 -9
  126. package/.agent/skills/legacy-modernizer/SKILL.md +4 -9
  127. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +14 -2
  128. package/.agent/skills/mcp-builder/SKILL.md +164 -21
  129. package/.agent/skills/mobile-design/SKILL.md +369 -21
  130. package/.agent/skills/mobile-design/mobile-performance.md +1 -1
  131. package/.agent/skills/modern-web-architect/SKILL.md +6 -12
  132. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +1 -1
  133. package/.agent/skills/penetration-tester-master/SKILL.md +4 -9
  134. package/.agent/skills/performance-engineer/SKILL.md +5 -4
  135. package/.agent/skills/production-code-audit/SKILL.md +0 -6
  136. package/.agent/skills/rust-pro/SKILL.md +177 -0
  137. package/.agent/skills/security-auditor/SKILL.md +27 -35
  138. package/.agent/skills/seo-expert-kit/SKILL.md +4 -9
  139. package/.agent/skills/tdd-master-workflow/SKILL.md +3 -9
  140. package/.agent/workflows/audit.md +16 -30
  141. package/.agent/workflows/brainstorm.md +96 -33
  142. package/.agent/workflows/create.md +45 -37
  143. package/.agent/workflows/debug.md +84 -45
  144. package/.agent/workflows/deep-security-audit.md +9 -0
  145. package/.agent/workflows/deploy.md +158 -33
  146. package/.agent/workflows/document.md +15 -38
  147. package/.agent/workflows/enhance.md +48 -33
  148. package/.agent/workflows/growth-max.md +9 -0
  149. package/.agent/workflows/monitor.md +14 -35
  150. package/.agent/workflows/orchestrate.md +218 -31
  151. package/.agent/workflows/performance-max.md +9 -0
  152. package/.agent/workflows/plan.md +70 -39
  153. package/.agent/workflows/security.md +14 -35
  154. package/.agent/workflows/seo.md +16 -39
  155. package/.agent/workflows/status.md +72 -33
  156. package/.agent/workflows/test.md +127 -30
  157. package/.agent/workflows/ui-ux-pro-max.md +283 -24
  158. package/.editorconfig +21 -0
  159. package/.gitattributes +7 -0
  160. package/CHANGELOG.md +32 -0
  161. package/ERRORS.md +67 -0
  162. package/{.agent/GEMINI.md → GEMINI.md} +5 -4
  163. package/LICENSE +8 -22
  164. package/README.md +72 -102
  165. package/README.vi.md +110 -90
  166. package/action.yml +32 -0
  167. package/antigravity-ide-logo.png +0 -0
  168. package/antigravity-ide-logo.svg +24 -0
  169. package/assets/skills-bundle.json +1 -0
  170. package/cli/create.js +413 -275
  171. package/cli/index.js +24 -28
  172. package/cli/lib/auto-update.js +21 -14
  173. package/cli/logic/skill-definitions.js +39 -0
  174. package/cli/manifest.js +524 -0
  175. package/cli/prompts.js +145 -151
  176. package/cli/skills/fastcode.js +181 -0
  177. package/docs/AGENTS_GUIDE.vi.md +45 -38
  178. package/docs/AGENT_FLOW.md +608 -0
  179. package/docs/CONTRIBUTING.md +46 -0
  180. package/docs/CONTRIBUTING.vi.md +3 -12
  181. package/docs/COPYRIGHT.md +57 -0
  182. package/docs/DEPLOYMENT.md +77 -0
  183. package/docs/{GEMINI_USAGE.md → GEMINI_GUIDE.md} +6 -6
  184. package/docs/GLOSSARY.md +109 -0
  185. package/docs/GLOSSARY.vi.md +30 -49
  186. package/docs/HOW_ANTIGRAVITY_THINKS.vi.md +1 -1
  187. package/docs/MASTER_GUIDE.md +103 -0
  188. package/docs/OPERATIONAL_FLOW.md +147 -0
  189. package/docs/OPERATIONAL_FLOW.vi.md +0 -15
  190. package/docs/PLAN-upgrade-core-architecture.md +71 -0
  191. package/docs/{PUBLISHING_GUIDE.md → PUBLISHING.md} +3 -31
  192. package/docs/RULES_GUIDE.vi.md +31 -67
  193. package/docs/SHARED_LIBRARY_GUIDE.vi.md +22 -18
  194. package/docs/SKILLS.md +610 -0
  195. package/docs/SKILLS_GUIDE.vi.md +32 -118
  196. package/docs/TROUBLESHOOTING.md +43 -0
  197. package/docs/TROUBLESHOOTING.vi.md +2 -10
  198. package/docs/WORKFLOW_GUIDE.vi.md +9 -57
  199. package/jest.config.js +8 -0
  200. package/package.json +8 -31
  201. package/scripts/bump.js +93 -0
  202. package/scripts/bundle-skills.js +59 -0
  203. package/scripts/internal/automation/auto-release.js +177 -0
  204. package/scripts/internal/fractalize-skills.js +89 -0
  205. package/scripts/internal/generate-skill-definitions.js +134 -0
  206. package/scripts/internal/internal/update-docs.js +115 -0
  207. package/scripts/internal/refactor-skill-content.js +127 -0
  208. package/scripts/internal/rename-skills.js +96 -0
  209. package/scripts/internal/sync-skills.js +112 -0
  210. package/scripts/internal/update-frontmatter-names.js +99 -0
  211. package/scripts/internal/verification/audit-dna.js +56 -0
  212. package/scripts/internal/verification/audit-skills.js +65 -0
  213. package/setup.js +114 -147
  214. package/web/src/app/docs/guide/examples/brainstorm/page.mdx +91 -0
  215. package/web/src/app/docs/guide/examples/create/page.mdx +84 -0
  216. package/web/src/app/docs/guide/examples/debugging/page.mdx +83 -0
  217. package/web/src/app/docs/guide/examples/deployment/page.mdx +93 -0
  218. package/web/src/app/docs/guide/examples/new-feature/page.mdx +102 -0
  219. package/web/src/app/docs/guide/examples/orchestration/page.mdx +99 -0
  220. package/web/src/app/docs/guide/examples/plan/page.mdx +76 -0
  221. package/web/src/app/docs/guide/examples/preview/page.mdx +77 -0
  222. package/web/src/app/docs/guide/examples/status/page.mdx +78 -0
  223. package/web/src/app/docs/guide/examples/test/page.mdx +80 -0
  224. package/web/src/app/docs/guide/examples/ui-design/page.mdx +90 -0
  225. package/web/src/components/mdx/Callout.tsx +60 -0
  226. package/web/src/components/mdx/FeatureGrid.tsx +38 -0
  227. package/web/src/components/mdx/ProTips.tsx +29 -0
  228. package/web/src/components/mdx/StepList.tsx +33 -0
  229. package/web/src/components/mdx/Terminal.tsx +58 -0
  230. package/web/src/components/mdx/index.ts +5 -0
  231. package/web/src/mdx-components.tsx +98 -0
  232. package/.agent/skills/brand-guidelines-anthropic/LICENSE.txt +0 -202
  233. package/.agent/skills/brand-guidelines-anthropic/SKILL.md +0 -26
  234. package/.agent/skills/brand-guidelines-anthropic/sub-skills/color-application.md +0 -5
  235. package/.agent/skills/brand-guidelines-anthropic/sub-skills/colors.md +0 -14
  236. package/.agent/skills/brand-guidelines-anthropic/sub-skills/font-management.md +0 -6
  237. package/.agent/skills/brand-guidelines-anthropic/sub-skills/shape-and-accent-colors.md +0 -7
  238. package/.agent/skills/brand-guidelines-anthropic/sub-skills/smart-font-application.md +0 -6
  239. package/.agent/skills/brand-guidelines-anthropic/sub-skills/text-styling.md +0 -6
  240. package/.agent/skills/brand-guidelines-anthropic/sub-skills/typography.md +0 -7
  241. package/.agent/skills/internal-comms-anthropic/LICENSE.txt +0 -202
  242. package/.agent/skills/internal-comms-anthropic/SKILL.md +0 -33
  243. package/.agent/skills/internal-comms-anthropic/examples/3p-updates.md +0 -47
  244. package/.agent/skills/internal-comms-anthropic/examples/company-newsletter.md +0 -65
  245. package/.agent/skills/internal-comms-anthropic/examples/faq-answers.md +0 -30
  246. package/.agent/skills/internal-comms-anthropic/examples/general-comms.md +0 -16
  247. package/.agent/skills/last30days/tests/__init__.py +0 -1
  248. package/.agent/skills/last30days/tests/test_cache.py +0 -59
  249. package/.agent/skills/last30days/tests/test_dates.py +0 -114
  250. package/.agent/skills/last30days/tests/test_dedupe.py +0 -111
  251. package/.agent/skills/last30days/tests/test_models.py +0 -135
  252. package/.agent/skills/last30days/tests/test_normalize.py +0 -138
  253. package/.agent/skills/last30days/tests/test_render.py +0 -116
  254. package/.agent/skills/last30days/tests/test_score.py +0 -168
  255. package/.agent/skills/loki-mode/.github/workflows/claude-code-review.yml +0 -57
  256. package/.agent/skills/loki-mode/.github/workflows/claude.yml +0 -50
  257. package/.agent/skills/loki-mode/.github/workflows/release.yml +0 -128
  258. package/.agent/skills/loki-mode/tests/run-all-tests.sh +0 -78
  259. package/.agent/skills/loki-mode/tests/test-agent-timeout.sh +0 -348
  260. package/.agent/skills/loki-mode/tests/test-bootstrap.sh +0 -196
  261. package/.agent/skills/loki-mode/tests/test-circuit-breaker.sh +0 -389
  262. package/.agent/skills/loki-mode/tests/test-state-recovery.sh +0 -393
  263. package/.agent/skills/loki-mode/tests/test-task-queue.sh +0 -396
  264. package/.agent/skills/loki-mode/tests/test-wrapper.sh +0 -314
  265. package/.agent/skills/shopify-development/scripts/tests/test_shopify_init.py +0 -379
  266. package/cli/logic/product-skills.js +0 -58
  267. /package/.agent/.shared/{technical/ai-master → ai-master}/best_patterns.md +0 -0
  268. /package/.agent/.shared/{technical/ai-master → ai-master}/checklists/prompt_audit.md +0 -0
  269. /package/.agent/.shared/{technical/ai-master → ai-master}/presets/model_configs.json +0 -0
  270. /package/.agent/.shared/{technical/api-standards → api-standards}/data +0 -0
  271. /package/.agent/.shared/{technical/api-standards → api-standards}/endpoints_naming.md +0 -0
  272. /package/.agent/.shared/{technical/api-standards → api-standards}/error_codes.csv +0 -0
  273. /package/.agent/.shared/{technical/api-standards → api-standards}/pagination_sorting.md +0 -0
  274. /package/.agent/.shared/{technical/api-standards → api-standards}/response_format.json +0 -0
  275. /package/.agent/.shared/{verticals/compliance → compliance}/legal_templates.md +0 -0
  276. /package/.agent/.shared/{technical/database-master → database-master}/schemas/auth_rbac.sql +0 -0
  277. /package/.agent/.shared/{technical/database-master → database-master}/schemas/cms.sql +0 -0
  278. /package/.agent/.shared/{technical/database-master → database-master}/schemas/ecommerce.sql +0 -0
  279. /package/.agent/.shared/{core/design-philosophy → design-philosophy}/MANIFESTO.md +0 -0
  280. /package/.agent/.shared/{core/design-philosophy → design-philosophy}/checklists/tactile_audit.md +0 -0
  281. /package/.agent/.shared/{core/design-philosophy → design-philosophy}/checklists/visual_audit.md +0 -0
  282. /package/.agent/.shared/{core/design-philosophy → design-philosophy}/presets/linear_glow.json +0 -0
  283. /package/.agent/.shared/{technical/design-system → design-system}/brand_presets.json +0 -0
  284. /package/.agent/.shared/{technical/design-system → design-system}/micro_interactions.md +0 -0
  285. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/edtech.md +0 -0
  286. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/fintech.md +0 -0
  287. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/fnb_restaurant.md +0 -0
  288. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/freelance_marketplace.md +0 -0
  289. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/healthcare.md +0 -0
  290. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/hospitality_tourism.md +0 -0
  291. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/logistics.md +0 -0
  292. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/marketing_automation.md +0 -0
  293. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/personal_branding.md +0 -0
  294. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/real_estate.md +0 -0
  295. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/retail_ecommerce.md +0 -0
  296. /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/standard-pro-agents.md +0 -0
  297. /package/.agent/.shared/{core/dx-toolkit → dx-toolkit}/checklists/code_review.md +0 -0
  298. /package/.agent/.shared/{core/dx-toolkit → dx-toolkit}/presets/vscode_settings.json +0 -0
  299. /package/.agent/.shared/{technical/i18n-master → i18n-master}/vi_tech_dictionary.csv +0 -0
  300. /package/.agent/.shared/{technical/i18n-master → i18n-master}/workflows.json +0 -0
  301. /package/.agent/.shared/{verticals/infra-blueprints → infra-blueprints}/deployment_specs.md +0 -0
  302. /package/.agent/.shared/{core/metrics → metrics}/benchmarks.json +0 -0
  303. /package/.agent/.shared/{technical/resilience-patterns → resilience-patterns}/checklists/chaos_engineering.md +0 -0
  304. /package/.agent/.shared/{technical/resilience-patterns → resilience-patterns}/presets/circuit_breaker.json +0 -0
  305. /package/.agent/.shared/{technical/security-armor → security-armor}/checklists/vuln_scan.md +0 -0
  306. /package/.agent/.shared/{technical/security-armor → security-armor}/hardening.md +0 -0
  307. /package/.agent/.shared/{technical/security-armor → security-armor}/presets/helmet_config.json +0 -0
  308. /package/.agent/.shared/{technical/seo-master → seo-master}/checklists/technical_seo.md +0 -0
  309. /package/.agent/.shared/{technical/seo-master → seo-master}/presets/json_ld_schema.json +0 -0
  310. /package/.agent/.shared/{technical/testing-master → testing-master}/checklists/pre_release.md +0 -0
  311. /package/.agent/.shared/{technical/testing-master → testing-master}/scenarios.md +0 -0
  312. /package/.agent/{skills → .shared}/ui-ux-pro-max/data/charts.csv +0 -0
  313. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/colors.csv +0 -0
  314. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/icons.csv +0 -0
  315. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/landing.csv +0 -0
  316. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/products.csv +0 -0
  317. /package/.agent/{skills → .shared}/ui-ux-pro-max/data/prompts.csv +0 -0
  318. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/react-performance.csv +0 -0
  319. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/flutter.csv +0 -0
  320. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/html-tailwind.csv +0 -0
  321. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/jetpack-compose.csv +0 -0
  322. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nextjs.csv +0 -0
  323. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nuxt-ui.csv +0 -0
  324. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nuxtjs.csv +0 -0
  325. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/react-native.csv +0 -0
  326. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/react.csv +0 -0
  327. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/shadcn.csv +0 -0
  328. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/svelte.csv +0 -0
  329. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/swiftui.csv +0 -0
  330. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/vue.csv +0 -0
  331. /package/.agent/{skills → .shared}/ui-ux-pro-max/data/styles.csv +0 -0
  332. /package/.agent/{skills → .shared}/ui-ux-pro-max/data/typography.csv +0 -0
  333. /package/.agent/{skills → .shared}/ui-ux-pro-max/data/ui-reasoning.csv +0 -0
  334. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/ux-guidelines.csv +0 -0
  335. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/web-interface.csv +0 -0
  336. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/__pycache__/core.cpython-313.pyc +0 -0
  337. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
  338. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/core.py +0 -0
  339. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/design_system.py +0 -0
  340. /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/search.py +0 -0
  341. /package/.agent/.shared/{core/vitals-templates → vitals-templates}/audit_report.md +0 -0
  342. /package/.agent/.shared/{core/vitals-templates → vitals-templates}/plan_prd.md +0 -0
  343. /package/.agent/skills/ai-engineer/{sub-skills → resources}/ai_infra_stack.md +0 -0
  344. /package/.agent/skills/cloud-architect-master/{sub-skills → resources}/cost_optimization_checklist.md +0 -0
  345. /package/.agent/skills/cro-expert-kit/{sub-skills → resources}/psychological_triggers.md +0 -0
  346. /package/.agent/skills/database-migration/{sub-skills → resources}/zero_downtime_strategy.md +0 -0
  347. /package/.agent/skills/deployment-engineer/{sub-skills → resources}/k8s_best_practices.md +0 -0
  348. /package/.agent/skills/git-collaboration-master/{sub-skills → resources}/pr_template.md +0 -0
  349. /package/.agent/skills/incident-responder/{sub-skills → resources}/incident_severity_levels.md +0 -0
  350. /package/.agent/skills/legacy-modernizer/{sub-skills → resources}/strangler_fig_pattern.md +0 -0
  351. /package/.agent/skills/penetration-tester-master/{sub-skills → resources}/owasp_top_10_2025.md +0 -0
  352. /package/.agent/skills/production-code-audit/{sub-skills → resources}/solid_principles_cheat_sheet.md +0 -0
  353. /package/.agent/skills/seo-expert-kit/{sub-skills → resources}/technical_seo_checklist.md +0 -0
  354. /package/.agent/skills/tdd-master-workflow/{sub-skills → resources}/unit_test_naming_convention.md +0 -0
package/cli/create.js CHANGED
@@ -4,49 +4,36 @@
4
4
 
5
5
  const fs = require('fs-extra');
6
6
  const path = require('path');
7
- const os = require('os');
8
7
  const chalk = require('chalk');
9
8
  const ora = require('ora');
10
9
  const { execSync } = require('child_process');
11
- const { getProjectConfig, confirmOverwrite } = require('./prompts');
10
+ const { getProjectConfig, getSkillsForCategories } = require('./prompts');
11
+ const MANIFEST = require('./manifest');
12
12
  const gradient = require('gradient-string');
13
- const { getRulesList, getAgentsList } = require('./logic/manifest-manager');
14
- const { getScaleConfig } = require('./logic/scale-rules');
15
- const { repairProject } = require('./repair');
16
- const { generateGeminiMd } = require('./logic/gemini-generator');
17
- const { getSkillsForCategories } = require('./logic/skill-definitions');
18
13
 
19
- async function createProject(projectName, options, predefinedConfig = null) {
14
+ async function createProject(projectName, options) {
20
15
  try {
21
16
  // Determine target directory
22
17
  const isCurrentDir = !projectName || projectName === '.';
23
- const targetPath = isCurrentDir ? process.cwd() : path.resolve(process.cwd(), projectName);
24
18
  const targetName = isCurrentDir ? path.basename(process.cwd()) : projectName;
25
19
 
26
- // Get configuration (early for context)
27
- const config = predefinedConfig || await getProjectConfig(options.skipPrompts, targetName);
28
- config.projectName = targetName;
29
- config.force = options.force;
30
- config.skipPrompts = options.skipPrompts;
20
+ // Get configuration (pass targetName if specifically provided/determined as CWD target)
21
+ // If isCurrentDir is true, we pass '.' to prompts to tell it to skip the name question
22
+ const config = await getProjectConfig(options.skipPrompts, isCurrentDir ? targetName : projectName);
31
23
 
32
- // --- SMART ENTRY: REPAIR OR CREATE ---
33
- if (fs.existsSync(path.join(targetPath, '.agent'))) {
34
- // It's an existing project!
35
- return await repairProject(targetPath, options, config);
36
- }
37
-
38
- const projectPath = targetPath;
39
- const finalProjectName = targetName;
24
+ // Resolve final project path
25
+ const projectPath = isCurrentDir ? process.cwd() : path.resolve(process.cwd(), config.projectName);
26
+ const finalProjectName = config.projectName;
40
27
 
41
- // Check if directory exists (but no .agent)
42
- if (!isCurrentDir && fs.existsSync(projectPath) && fs.readdirSync(projectPath).length > 0) {
43
- // Folder exists but it's not an Antigravity project - might be a normal repo
44
- // We'll proceed but it will act like an 'init'
28
+ // Check if directory exists (only if NOT current dir)
29
+ if (!isCurrentDir && fs.existsSync(projectPath)) {
30
+ console.error(chalk.red(`\n❌ Directory "${finalProjectName}" already exists.\n`));
31
+ process.exit(1);
45
32
  }
46
33
 
47
34
  console.log('\n');
48
35
  console.log(gradient.cristal('━'.repeat(60)));
49
- console.log(chalk.bold(' 🛸 Antigravity IDE: Easy Vibe, Lazy Code'));
36
+ console.log(chalk.bold(' 📦 Creating Google Antigravity Project'));
50
37
  console.log(gradient.cristal('━'.repeat(60)));
51
38
  console.log('');
52
39
 
@@ -54,135 +41,35 @@ async function createProject(projectName, options, predefinedConfig = null) {
54
41
  const spinner = ora('Creating project structure...').start();
55
42
  fs.mkdirSync(projectPath, { recursive: true });
56
43
 
57
- // --- MODULAR INSTALLATION START ---
58
-
59
- // 1. Resolve Rules & Agents based on Scale + Product
60
- const rulesToInstall = getRulesList(config.rules, config.productType);
61
-
62
- // We need list of ALL available agents to handle wildcards
63
- const agentsDir = path.join(__dirname, '..', '.agent', 'agents');
64
- const allAgents = fs.existsSync(agentsDir) ? fs.readdirSync(agentsDir) : [];
65
- const rawAgentsToInstall = getAgentsList(config.rules, config.productType, allAgents);
66
- const agentsToInstall = [...new Set(rawAgentsToInstall)];
67
-
68
- // 2. Copy Base Structure + Selective Rules/Agents
69
- await copyModularStructure(projectPath, config, rulesToInstall, agentsToInstall);
70
-
71
- // 2b. Global Sync (Dual-Scope Strategy)
72
- await ensureGlobalSync(config, rulesToInstall, agentsToInstall);
73
-
74
- spinner.succeed('Project structure created (Modular Mode)');
75
-
76
- // --- MODULAR INSTALLATION END ---
77
-
78
- // --- INTELLIGENT RESOURCE BALANCING START ---
79
- // Ensuring logical balance between Agents, Skills, and Workflows based on Scale
80
-
81
- let finalSkillCategories = config.skillCategories || [];
82
- let finalWorkflows = config.workflows || [];
83
-
84
- // If explicitly empty or missing, derive from Scale Rules
85
- // This ensures automated runs (CI/Test) get balanced resources seamlessly
86
- if (finalSkillCategories.length === 0 || finalWorkflows.length === 0 || config.rules === 'creative') {
87
- const scaleConfig = getScaleConfig(config.rules || 'creative'); // Default to creative if rule missing
88
-
89
- // For Creative mode, we FORCE full set to ensure nothing is stripped
90
- if (config.rules === 'creative') {
91
- finalSkillCategories = scaleConfig.coreSkillCategories;
92
- finalWorkflows = scaleConfig.baseWorkflows;
93
- } else {
94
- if (finalSkillCategories.length === 0) {
95
- finalSkillCategories = scaleConfig.coreSkillCategories;
96
- spinner.info(chalk.dim(`Auto-balanced Skills for ${config.rules}: ${finalSkillCategories.join(', ')}`));
97
- }
98
-
99
- if (finalWorkflows.length === 0) {
100
- finalWorkflows = scaleConfig.baseWorkflows;
101
- spinner.info(chalk.dim(`Auto-balanced Workflows for ${config.rules}: ${finalWorkflows.join(', ')}`));
102
- }
103
- }
104
- }
105
- // --- INTELLIGENT RESOURCE BALANCING END ---
44
+ // Copy base structure
45
+ await copyBaseStructure(projectPath, config);
46
+ spinner.succeed('Project structure created');
106
47
 
107
48
  // Copy selected skills
108
- let skillCount = 0;
109
- if (finalSkillCategories.length > 0) {
49
+ if (config.template !== 'minimal') {
110
50
  spinner.start('Installing selected skills...');
111
- skillCount = await copySkills(projectPath, finalSkillCategories, config.engineMode);
112
- spinner.succeed(`Installed ${skillCount} skills across ${finalSkillCategories.length} categories`);
51
+ await copySkills(projectPath, config.skillCategories, config.engineMode);
52
+ spinner.succeed(`Installed ${config.skillCategories.length} skill categories`);
113
53
  }
114
54
 
115
- // Copy workflows
116
- // Copy workflows
117
- let workflowCount = 0;
118
- const workflowsSourceDir = path.join(__dirname, '..', '.agent', 'workflows');
119
- const workflowsDestDir = path.join(projectPath, '.agent', 'workflows');
120
55
 
121
- try {
122
- if (config.rules === 'creative' && fs.existsSync(workflowsSourceDir)) {
123
- // FORCE FULL COPY for Creative Mode (Robustness)
124
- spinner.start('Installing ALL workflows (Creative Mode)...');
125
- await fs.copy(workflowsSourceDir, workflowsDestDir, { overwrite: true });
126
- // Count files
127
- workflowCount = fs.readdirSync(workflowsDestDir).filter(f => f.endsWith('.md')).length;
128
- spinner.succeed(`Installed ${workflowCount} workflows (Full Suite)`);
129
- } else if (finalWorkflows.length > 0) {
130
- // Selective Installation
131
- spinner.start(`Setting up ${finalWorkflows.length} specific workflows...`);
132
- workflowCount = await copyWorkflows(projectPath, finalWorkflows);
133
- spinner.succeed(`Configured ${workflowCount} workflows`);
134
- } else {
135
- // Fallback / Warning
136
- spinner.warn('No workflows configured or found.');
137
- }
138
- } catch (err) {
139
- spinner.warn(`Workflow installation warning: ${err.message}`);
140
- }
141
56
 
142
- // ... existing code ...
57
+ // Generate configuration files
58
+ spinner.start('Generating configuration files...');
59
+ await generateConfigs(projectPath, config);
60
+ spinner.succeed('Configuration files created');
143
61
 
144
- // Print success message
145
- const sharedDir = path.join(__dirname, '..', '.agent', '.shared');
146
- let sharedCount = 0;
147
- if (fs.existsSync(sharedDir)) {
148
- ['core', 'technical', 'verticals'].forEach(dir => {
149
- const subDir = path.join(sharedDir, dir);
150
- if (fs.existsSync(subDir)) {
151
- sharedCount += fs.readdirSync(subDir).filter(f => fs.lstatSync(path.join(subDir, f)).isDirectory()).length;
152
- }
153
- });
62
+ // Initialize git
63
+ spinner.start('Initializing git repository...');
64
+ try {
65
+ execSync('git init', { cwd: projectPath, stdio: 'ignore' });
66
+ spinner.succeed('Git repository initialized');
67
+ } catch (error) {
68
+ spinner.warn('Git initialization skipped (git not found)');
154
69
  }
155
70
 
156
- // Create GEMINI.md
157
- // generateGeminiMd(rules, language, industry, agentName)
158
- // Create GEMINI.md
159
- // generateGeminiMd(rules, language, industry, agentName)
160
- // Check if modular structure already handled it?
161
- // Actually, copyModularStructure already wrote it to Root in our previous edit to Step 5.
162
- // But copyModularStructure is only called if we are in Modular mode.
163
- // Let's ensure strict single source.
164
-
165
- // If copyModularStructure ran, GEMINI.md is already there.
166
- // We should check if it exists before overwriting, OR rely on the fact that modular structure is the main path.
167
-
168
- // Let's keep this block for safety in case copyModularStructure didn't run (unlikely in current flow)
169
- // But strictly, we removed the duplicate logic.
170
- // To be safe: If GEMINI.md exists at root, don't re-write it here unless FORCE.
171
- // Actually, the previous block (Step 5 in copyModularStructure) is INSIDE copyModularStructure.
172
- // The block here is at the end of createProject.
173
-
174
- // If we moved the root write to copyModularStructure (Step 5), then this block is DUPLICATE.
175
- // Let's remove this block to avoid double-logging.
176
- // Redundant fallback block removed
177
-
178
- const stats = {
179
- rules: rulesToInstall.length,
180
- agents: agentsToInstall.length,
181
- skills: skillCount,
182
- workflows: workflowCount,
183
- shared: sharedCount
184
- };
185
- printSuccessMessage(finalProjectName, config, stats);
71
+ // Print success message
72
+ printSuccessMessage(finalProjectName, config);
186
73
 
187
74
  } catch (error) {
188
75
  console.error(chalk.red('\n❌ Error creating project:'), error.message);
@@ -191,23 +78,11 @@ async function createProject(projectName, options, predefinedConfig = null) {
191
78
  }
192
79
 
193
80
  // Helper to handle core file conflicts (auto-create backup if exists)
194
- async function handleCoreFileConflict(filePath, fileName, force = false, skipPrompts = false) {
81
+ function handleCoreFileConflict(filePath, fileName) {
195
82
  if (!fs.existsSync(filePath)) {
196
83
  return { shouldWrite: true, targetPath: filePath };
197
84
  }
198
85
 
199
- if (force) {
200
- return { shouldWrite: true, targetPath: filePath, isOverwrite: true };
201
- }
202
-
203
- // Interactive Prompt (Only if prompts are allowed)
204
- if (!skipPrompts) {
205
- const shouldOverwrite = await confirmOverwrite(fileName);
206
- if (shouldOverwrite) {
207
- return { shouldWrite: true, targetPath: filePath, isOverwrite: true };
208
- }
209
- }
210
-
211
86
  // File exists - create backup with .new extension
212
87
  const dir = path.dirname(filePath);
213
88
  const ext = path.extname(fileName);
@@ -219,8 +94,10 @@ async function handleCoreFileConflict(filePath, fileName, force = false, skipPro
219
94
  // Helper to determine file filter based on engine mode
220
95
  function getEngineFilter(engineMode) {
221
96
  return (src, dest) => {
97
+ // If mode is 'standard' (Node.js focus), exclude Python files
222
98
  if (engineMode === 'standard') {
223
99
  const lowerSrc = src.toLowerCase();
100
+ // Exclude Python source, compiled files, and package configs
224
101
  if (lowerSrc.endsWith('.py') ||
225
102
  lowerSrc.endsWith('.pyc') ||
226
103
  lowerSrc.endsWith('requirements.txt') ||
@@ -232,107 +109,432 @@ function getEngineFilter(engineMode) {
232
109
  return false;
233
110
  }
234
111
  }
112
+ // 'advanced' mode (or others) includes everything
235
113
  return true;
236
114
  };
237
115
  }
238
116
 
239
- async function copyModularStructure(projectPath, config, rulesList, agentsList) {
117
+ async function copyBaseStructure(projectPath, config) {
240
118
  const sourceAgentDir = path.join(__dirname, '..', '.agent');
241
119
  const destAgentDir = path.join(projectPath, '.agent');
242
120
  const filter = getEngineFilter(config.engineMode);
243
-
121
+ const operationMode = config.operationMode || 'pro';
122
+ const modeConfig = MANIFEST[operationMode];
123
+
244
124
  // Create base .agent directory
245
125
  fs.mkdirSync(destAgentDir, { recursive: true });
246
126
 
247
- // 1. Copy Shared Modules (Always copy .shared but maybe filter later? For now keep simple)
248
- // To be strictly modular, we should only copy needed .shared. But let's copy all for safety first.
249
- if (fs.existsSync(path.join(sourceAgentDir, '.shared'))) {
250
- await fs.copy(path.join(sourceAgentDir, '.shared'), path.join(destAgentDir, '.shared'), { filter });
127
+ // Copy 'docs' directory to project root
128
+ const sourceDocsDir = path.join(__dirname, '..', 'docs');
129
+ const destDocsDir = path.join(projectPath, 'docs');
130
+ if (fs.existsSync(sourceDocsDir)) {
131
+ await fs.copy(sourceDocsDir, destDocsDir);
251
132
  }
252
133
 
253
- // 1b. Copy Root Concept Files (Architecture, Start Here, etc.) - FIX for v4.1.30
254
- const rootFiles = fs.readdirSync(sourceAgentDir).filter(f => f.endsWith('.md') && f !== 'GEMINI.md'); // GEMINI.md is generated
255
- for (const file of rootFiles) {
256
- await fs.copy(path.join(sourceAgentDir, file), path.join(destAgentDir, file));
134
+ // Copy common directories
135
+ const commonDirs = []; // .shared and skills now filtered by manifest
136
+ for (const dir of commonDirs) {
137
+ const src = path.join(sourceAgentDir, dir);
138
+ const dest = path.join(destAgentDir, dir);
139
+ if (fs.existsSync(src)) {
140
+ await fs.copy(src, dest, { filter });
141
+ }
257
142
  }
258
143
 
259
- // 2. Copy Rules (SELECTIVE)
260
- const rulesDest = path.join(destAgentDir, 'rules');
261
- fs.mkdirSync(rulesDest, { recursive: true });
262
-
263
- for (const rule of rulesList) {
264
- const srcRule = path.join(sourceAgentDir, 'rules', rule);
265
- if (fs.existsSync(srcRule)) {
266
- await fs.copy(srcRule, path.join(rulesDest, rule));
144
+ // Copy filtered directories: rules, agents, workflows, skills, .shared, core, scripts
145
+ const filteredDirs = ['rules', 'agents', 'workflows', 'skills', '.shared', 'core', 'scripts'];
146
+ for (const folder of filteredDirs) {
147
+ const globalFolder = path.join(sourceAgentDir, folder);
148
+ const localFolder = path.join(destAgentDir, folder);
149
+
150
+ if (!fs.existsSync(localFolder)) fs.mkdirSync(localFolder, { recursive: true });
151
+
152
+ const manifestKey = folder.startsWith('.') ? folder.slice(1) : folder;
153
+ const whitelist = modeConfig[manifestKey];
154
+
155
+ if (fs.existsSync(globalFolder)) {
156
+ const files = fs.readdirSync(globalFolder);
157
+ for (const file of files) {
158
+ // Suffix handling (e.g., orchestrator.eco.md)
159
+ const isEcoVariant = file.includes('.eco.md') || file.includes('.instant.md');
160
+ const isUltraVariant = file.includes('.ultra.md') || file.includes('.creative.md');
161
+ const isProVariant = !isEcoVariant && !isUltraVariant;
162
+ const isDirectory = fs.lstatSync(path.join(globalFolder, file)).isDirectory();
163
+
164
+ let targetFileName = file;
165
+ let shouldCopy = false;
166
+
167
+ if (whitelist === '*') {
168
+ // Ultra Mode: Copy everything, but prefer ultra variants
169
+ if (isUltraVariant) {
170
+ targetFileName = file.replace('.ultra.md', '.md').replace('.creative.md', '.md');
171
+ shouldCopy = true;
172
+ } else if (isProVariant) {
173
+ if (isDirectory) {
174
+ shouldCopy = true;
175
+ } else {
176
+ const ultraVariant = file.replace('.md', '.ultra.md');
177
+ const creativeVariant = file.replace('.md', '.creative.md');
178
+ if (!fs.existsSync(path.join(globalFolder, ultraVariant)) && !fs.existsSync(path.join(globalFolder, creativeVariant))) {
179
+ shouldCopy = true;
180
+ }
181
+ }
182
+ }
183
+ } else {
184
+ // Eco or Pro Mode: Only copy from whitelist
185
+ const baseName = file.replace('.eco.md', '.md').replace('.instant.md', '.md')
186
+ .replace('.ultra.md', '.md').replace('.creative.md', '.md');
187
+
188
+ if (whitelist.includes(baseName)) {
189
+ if (operationMode === 'eco') {
190
+ if (isEcoVariant) {
191
+ targetFileName = baseName;
192
+ shouldCopy = true;
193
+ } else if (isProVariant) {
194
+ if (isDirectory) {
195
+ shouldCopy = true;
196
+ } else {
197
+ const ecoVariant = file.replace('.md', '.eco.md');
198
+ const instantVariant = file.replace('.md', '.instant.md');
199
+ if (!fs.existsSync(path.join(globalFolder, ecoVariant)) && !fs.existsSync(path.join(globalFolder, instantVariant))) {
200
+ shouldCopy = true;
201
+ }
202
+ }
203
+ }
204
+ } else if (operationMode === 'pro') {
205
+ if (isProVariant) {
206
+ shouldCopy = true;
207
+ }
208
+ }
209
+ }
210
+ }
211
+
212
+ if (shouldCopy) {
213
+ const srcPath = path.join(globalFolder, file);
214
+ const destPath = path.join(localFolder, targetFileName);
215
+
216
+ if (fs.lstatSync(srcPath).isDirectory()) {
217
+ // Recursive copy for skill directories
218
+ await fs.copy(srcPath, destPath, { filter });
219
+ } else {
220
+ // File copy
221
+ fs.copyFileSync(srcPath, destPath);
222
+ }
223
+ }
224
+ }
267
225
  }
268
226
  }
269
227
 
270
- // 3. Agents (Skipped - Single Context Optimization)
271
- // const agentsDest = path.join(destAgentDir, 'agents');
272
- // fs.mkdirSync(agentsDest, { recursive: true });
273
-
274
- // 4. Ensure 'skills' and 'workflows' dir exists
228
+ // Ensure 'skills' dir exists even if empty
275
229
  fs.mkdirSync(path.join(destAgentDir, 'skills'), { recursive: true });
276
- fs.mkdirSync(path.join(destAgentDir, 'workflows'), { recursive: true });
277
230
 
278
- // 5. Create GEMINI.md (Core file) - Write ONLY to Root, not to .agent/
279
- const geminiContent = generateGeminiMd(config.rules, config.language, config.industryDomain, config.agentName);
280
- const geminiDecision = await handleCoreFileConflict(path.join(projectPath, 'GEMINI.md'), 'GEMINI.md', config.force, config.skipPrompts);
231
+ // 1. Copy GEMINI.md to ROOT (User Requirement)
232
+ // Was previously in .agent/GEMINI.md
233
+ const geminiPath = path.join(projectPath, 'GEMINI.md');
234
+ const geminiDecision = handleCoreFileConflict(geminiPath, 'GEMINI.md');
281
235
 
282
236
  if (geminiDecision.shouldWrite) {
237
+ const geminiContent = generateGeminiMd(config.operationMode, config.language, config.industryDomain, config.agentName);
283
238
  fs.writeFileSync(geminiDecision.targetPath, geminiContent);
284
- if (geminiDecision.isBackup) {
285
- console.log(chalk.yellow(` ℹ️ GEMINI.md exists, created ${path.basename(geminiDecision.targetPath)}`));
286
- } else if (geminiDecision.isOverwrite) {
287
- console.log(chalk.green(` ✓ Overwrote existing GEMINI.md`));
288
- }
239
+ console.log(chalk.green(' ✓ Created GEMINI.md (Root context)'));
289
240
  }
290
241
 
242
+ // 2. Create ERRORS.md (Empty template for logging)
243
+ const errorsPath = path.join(projectPath, 'ERRORS.md');
244
+ if (!fs.existsSync(errorsPath)) {
245
+ const errorsTemplate = `# 🐛 Error Log - ${config.projectName}\n\n> Tập hợp tất cả lỗi xảy ra trong quá trình phát triển (Auto-generated).\n\n---\n\n## Thống kê nhanh\n- **Tổng lỗi**: 0\n- **Đã sửa**: 0\n\n---\n\n<!-- Errors sẽ được agent tự động ghi vào đây -->\n`;
246
+ fs.writeFileSync(errorsPath, errorsTemplate);
247
+ console.log(chalk.green(' ✓ Created ERRORS.md'));
248
+ }
291
249
 
292
- }
250
+ // 3. Copy START_HERE.md to .agent/ (Keep internal)
251
+ const startHereSource = path.join(sourceAgentDir, config.language === 'vi' ? 'START_HERE.vi.md' : 'START_HERE.md');
252
+ const startHereDest = path.join(destAgentDir, 'START_HERE.md');
293
253
 
254
+ if (fs.existsSync(startHereSource)) {
255
+ fs.copyFileSync(startHereSource, startHereDest);
256
+ }
294
257
 
258
+ // 4. Copy README based on Language selection
259
+ const readmeSource = path.join(__dirname, '..', config.language === 'vi' ? 'README.vi.md' : 'README.md');
260
+ const readmeDest = path.join(projectPath, 'README.md'); // Always name it README.md in target
295
261
 
262
+ if (!fs.existsSync(readmeDest) && fs.existsSync(readmeSource)) {
263
+ fs.copyFileSync(readmeSource, readmeDest);
264
+ console.log(chalk.green(` ✓ Created README.md (${config.language === 'vi' ? 'Vietnamese' : 'English'})`));
265
+ }
266
+
267
+ // 5. Copy .gitignore
268
+ const gitignoreSource = path.join(__dirname, '..', '.gitignore');
269
+ const gitignoreDest = path.join(projectPath, '.gitignore');
270
+ if (!fs.existsSync(gitignoreDest) && fs.existsSync(gitignoreSource)) {
271
+ fs.copyFileSync(gitignoreSource, gitignoreDest);
272
+ console.log(chalk.green(' ✓ Created .gitignore'));
273
+ }
274
+ }
296
275
 
297
276
  async function copySkills(projectPath, categories, engineMode) {
298
277
  const skillsSourceDir = path.join(__dirname, '..', '.agent', 'skills');
299
278
  const skillsDestDir = path.join(projectPath, '.agent', 'skills');
300
279
  const filter = getEngineFilter(engineMode);
301
280
 
302
- if (!fs.existsSync(skillsSourceDir)) return 0;
281
+ // Check if source directory exists
282
+ if (!fs.existsSync(skillsSourceDir)) {
283
+ console.warn(chalk.yellow(`\n⚠️ Warning: Skills directory not found at ${skillsSourceDir}`));
284
+ console.warn(' The .agent folder might be missing from the package.');
285
+ return;
286
+ }
303
287
 
304
288
  const selectedSkills = getSkillsForCategories(categories);
305
- const uniqueSkills = [...new Set(selectedSkills)]; // Deduplicate to avoid overwrites and double-counting
306
- let count = 0;
307
289
 
308
- for (const skill of uniqueSkills) {
290
+ for (const skill of selectedSkills) {
309
291
  const skillPath = path.join(skillsSourceDir, skill);
310
292
  if (fs.existsSync(skillPath)) {
311
293
  const destPath = path.join(skillsDestDir, skill);
312
294
  await fs.copy(skillPath, destPath, { filter });
313
- count++;
295
+ } else {
296
+ // Optional: Warn about missing specific skills if needed
314
297
  }
315
298
  }
316
- return count;
317
299
  }
318
300
 
319
301
  async function copyWorkflows(projectPath, workflows) {
320
302
  const workflowsSourceDir = path.join(__dirname, '..', '.agent', 'workflows');
321
303
  const workflowsDestDir = path.join(projectPath, '.agent', 'workflows');
322
- let count = 0;
323
304
 
324
305
  for (const workflow of workflows) {
325
306
  const workflowFile = `${workflow}.md`;
326
307
  const source = path.join(workflowsSourceDir, workflowFile);
327
308
  if (fs.existsSync(source)) {
328
309
  await fs.copy(source, path.join(workflowsDestDir, workflowFile));
329
- count++;
330
310
  }
331
311
  }
332
- return count;
333
312
  }
334
313
 
335
- function printSuccessMessage(projectName, config, stats = null) {
314
+
315
+
316
+ async function generateConfigs(projectPath, config) {
317
+ // Generate package.json only if it doesn't exist
318
+ const packageJsonPath = path.join(projectPath, 'package.json');
319
+
320
+ if (!fs.existsSync(packageJsonPath)) {
321
+ const packageJson = {
322
+ name: config.projectName,
323
+ version: '1.0.0',
324
+ description: 'AI Agent project powered by Google Antigravity',
325
+ private: true,
326
+ scripts: {
327
+ dev: 'echo "No dev server configured"',
328
+ build: 'echo "No build script"'
329
+ },
330
+ keywords: ['ai', 'agent', 'google-antigravity'],
331
+ author: '',
332
+ license: 'MIT'
333
+ };
334
+
335
+ fs.writeFileSync(
336
+ packageJsonPath,
337
+ JSON.stringify(packageJson, null, 2)
338
+ );
339
+ console.log(chalk.green(' ✓ Created package.json'));
340
+ } else {
341
+ console.log(chalk.yellow(' ℹ️ Skipped package.json (already exists)'));
342
+ }
343
+
344
+ // Generate .editorconfig only if it doesn't exist
345
+ const editorconfigPath = path.join(projectPath, '.editorconfig');
346
+ if (!fs.existsSync(editorconfigPath)) {
347
+ const editorConfig = `root = true
348
+
349
+ [*]
350
+ charset = utf-8
351
+ end_of_line = lf
352
+ insert_final_newline = true
353
+ indent_style = space
354
+ indent_size = 2
355
+ trim_trailing_whitespace = true
356
+
357
+ [*.md]
358
+ trim_trailing_whitespace = false
359
+ `;
360
+ fs.writeFileSync(editorconfigPath, editorConfig);
361
+ console.log(chalk.green(' ✓ Created .editorconfig'));
362
+ }
363
+
364
+ // Generate .gitattributes only if it doesn't exist
365
+ const gitAttributesPath = path.join(projectPath, '.gitattributes');
366
+ if (!fs.existsSync(gitAttributesPath)) {
367
+ const gitAttributes = `* text=auto eol=lf
368
+ *.js text eol=lf
369
+ *.sh text eol=lf
370
+ bin/* text eol=lf
371
+ `;
372
+ fs.writeFileSync(gitAttributesPath, gitAttributes);
373
+ console.log(chalk.green(' ✓ Created .gitattributes'));
374
+ }
375
+ }
376
+
377
+
378
+ function generateGeminiMd(operationMode = 'standard', language = 'en', industry = 'other', agentName = 'Antigravity') {
379
+ const strictness = {
380
+ creative: {
381
+ autoRun: 'false',
382
+ confirmLevel: 'Ask before every file modification and command execution'
383
+ },
384
+ standard: {
385
+ autoRun: 'true for safe read operations',
386
+ confirmLevel: 'Ask before destructive operations'
387
+ },
388
+ instant: {
389
+ autoRun: 'true',
390
+ confirmLevel: 'Minimal confirmation, high autonomy (MVP Mode)'
391
+ }
392
+ };
393
+
394
+ const config = strictness[operationMode] || strictness.standard;
395
+ const isVi = language === 'vi';
396
+
397
+ // Define Industry Focus strings
398
+ const industryMap = {
399
+ finance: isVi ? 'Tài chính & Fintech (An toàn, Chính xác)' : 'Finance & Fintech (Security, Precision)',
400
+ education: isVi ? 'Giáo dục & EdTech (Trực quan, Giải thích)' : 'Education & EdTech (Intuitive, Explanatory)',
401
+ fnb: isVi ? 'F&B & Nhà hàng (Tốc độ, Tiện lợi)' : 'F&B & Restaurant (Speed, Convenience)',
402
+ personal: isVi ? 'Cá nhân & Portfolio (Sáng tạo, Cá nhân hóa)' : 'Personal & Portfolio (Creative, Personalized)',
403
+ healthcare: isVi ? 'Y tế & Sức khỏe (Bảo mật, Tin cậy)' : 'Healthcare & HealthTech (Privacy, Reliability)',
404
+ logistics: isVi ? 'Vận tải & Logistics (Hiệu quả, Real-time)' : 'Logistics & Supply Chain (Efficiency, Real-time)',
405
+ other: isVi ? 'Phát triển chung' : 'General Development'
406
+ };
407
+
408
+ const industryFocus = industryMap[industry] || industryMap.other;
409
+
410
+ const contentEn = `---
411
+ trigger: always_on
412
+ ---
413
+
414
+ # GEMINI.md - Agent Configuration
415
+
416
+ This file controls the behavior of your AI Agent.
417
+
418
+ ## 🤖 Agent Identity: ${agentName}
419
+ > **Identity Verification**: You are ${agentName}. Always reflect this identity in your tone and decision-making. **Special Protocol**: If called by name, you MUST perform a "Context Integrity Check" to verify alignment with .agent rules, confirm your status, and then wait for instructions.
420
+
421
+ ## 🎯 Primary Focus: ${industryFocus.toUpperCase()}
422
+ > **Priority**: Optimize all solutions for this domain.
423
+
424
+ ## Agent Behavior Rules: ${operationMode.toUpperCase()}
425
+
426
+ **Auto-run Commands**: ${config.autoRun}
427
+ **Confirmation Level**: ${config.confirmLevel}
428
+
429
+ ## 🌐 Language Protocol
430
+
431
+ 1. **Communication**: Use **ENGLISH**.
432
+ 2. **Artifacts**: Write content in **ENGLISH**.
433
+ 3. **Code**: Use **ENGLISH** for all variables, functions, and comments.
434
+
435
+ ## Core Capabilities
436
+
437
+ Your agent has access to **ALL** skills (Web, Mobile, DevOps, AI, Security).
438
+ Please utilize the appropriate skills for **${industryFocus}**.
439
+
440
+ - File operations (read, write, search)
441
+ - Terminal commands
442
+ - Web browsing
443
+ - Code analysis and refactoring
444
+ - Testing and debugging
445
+
446
+ ## 📚 Shared Standards (Auto-Active)
447
+ The following **13 Shared Modules** in \`.agent/.shared\` must be respected:
448
+ 1. **AI Master**: LLM patterns & RAG.
449
+ 2. **API Standards**: OpenAPI & REST guidelines.
450
+ 3. **Compliance**: GDPR/HIPAA protocols.
451
+ 4. **Database Master**: Schema & Migration rules.
452
+ 5. **Design System**: UI/UX patterns & tokens.
453
+ 6. **Domain Blueprints**: Industry-specific architectures.
454
+ 7. **I18n Master**: Localization standards.
455
+ 8. **Infra Blueprints**: Terraform/Docker setups.
456
+ 9. **Metrics**: Observability & Telemetry.
457
+ 10. **Security Armor**: Hardening & Auditing.
458
+ 11. **Testing Master**: TDD & E2E strategies.
459
+ 12. **UI/UX Pro Max**: Advanced interactions.
460
+ 13. **Vitals Templates**: Performance benchmarks.
461
+
462
+ ## Custom Instructions
463
+
464
+ Add your project-specific instructions here.
465
+
466
+ ---
467
+ *Generated by Google Antigravity*
468
+ `;
469
+
470
+ const contentVi = `---
471
+ trigger: always_on
472
+ ---
473
+
474
+ # GEMINI.md - Cấu hình Agent
475
+ # NOTE FOR AGENT: The content below is for human reference.
476
+ # PLEASE PARSE INSTRUCTIONS IN ENGLISH ONLY (See .agent rules).
477
+
478
+ Tệp này kiểm soát hành vi của AI Agent.
479
+
480
+ ## 🤖 Danh tính Agent: ${agentName}
481
+ > **Xác minh danh tính**: Bạn là ${agentName}. Luôn thể hiện danh tính này trong phong thái và cách ra quyết định. **Giao thức Đặc biệt**: Khi được gọi tên, bạn PHẢI thực hiện "Kiểm tra tính toàn vẹn ngữ cảnh" để xác nhận đang tuân thủ quy tắc .agent, báo cáo trạng thái và sẵn sàng đợi chỉ thị.
482
+
483
+ ## 🎯 Trọng tâm Chính: ${industryFocus.toUpperCase()}
484
+ > **Ưu tiên**: Tối ưu hóa mọi giải pháp cho lĩnh vực này.
485
+
486
+ ## Quy tắc hành vi: ${operationMode.toUpperCase()}
487
+
488
+ **Tự động chạy lệnh**: ${config.autoRun}
489
+ **Mức độ xác nhận**: ${config.confirmLevel === 'Minimal confirmation, high autonomy' ? 'Tối thiểu, tự chủ cao' : 'Hỏi trước các tác vụ quan trọng'}
490
+
491
+ ## 🌐 Giao thức Ngôn ngữ (Language Protocol)
492
+
493
+ 1. **Giao tiếp & Suy luận**: Sử dụng **TIẾNG VIỆT** (Bắt buộc).
494
+ 2. **Tài liệu (Artifacts)**: Viết nội dung file .md (Plan, Task, Walkthrough) bằng **TIẾNG VIỆT**.
495
+ 3. **Mã nguồn (Code)**:
496
+ - Tên biến, hàm, file: **TIẾNG ANH** (camelCase, snake_case...).
497
+ - Comment trong code: **TIẾNG ANH** (để chuẩn hóa).
498
+
499
+ ## Khả năng cốt lõi
500
+
501
+ Agent có quyền truy cập **TOÀN BỘ** kỹ năng (Web, Mobile, DevOps, AI, Security).
502
+ Vui lòng sử dụng các kỹ năng phù hợp nhất cho **${industryFocus}**.
503
+
504
+ - Thao tác tệp (đọc, ghi, tìm kiếm)
505
+ - Lệnh terminal
506
+ - Duyệt web
507
+ - Phân tích và refactor code
508
+ - Kiểm thử và gỡ lỗi
509
+
510
+ ## 📚 Tiêu chuẩn Dùng chung (Tự động Kích hoạt)
511
+ **13 Module Chia sẻ** sau trong \`.agent/.shared\` phải được tuân thủ:
512
+ 1. **AI Master**: Mô hình LLM & RAG.
513
+ 2. **API Standards**: Chuẩn OpenAPI & REST.
514
+ 3. **Compliance**: Giao thức GDPR/HIPAA.
515
+ 4. **Database Master**: Quy tắc Schema & Migration.
516
+ 5. **Design System**: Pattern UI/UX & Tokens.
517
+ 6. **Domain Blueprints**: Kiến trúc theo lĩnh vực.
518
+ 7. **I18n Master**: Tiêu chuẩn Đa ngôn ngữ.
519
+ 8. **Infra Blueprints**: Cấu hình Terraform/Docker.
520
+ 9. **Metrics**: Giám sát & Telemetry.
521
+ 10. **Security Armor**: Bảo mật & Audit.
522
+ 11. **Testing Master**: Chiến lược TDD & E2E.
523
+ 12. **UI/UX Pro Max**: Tương tác nâng cao.
524
+ 13. **Vitals Templates**: Tiêu chuẩn Hiệu năng.
525
+
526
+ ## Hướng dẫn tùy chỉnh
527
+
528
+ Thêm các hướng dẫn cụ thể cho dự án của bạn tại đây.
529
+
530
+ ---
531
+ *Được tạo bởi Google Antigravity*
532
+ `;
533
+
534
+ return isVi ? contentVi : contentEn;
535
+ }
536
+
537
+ function printSuccessMessage(projectName, config) {
336
538
  console.log('\n');
337
539
  console.log(gradient.rainbow('━'.repeat(60)));
338
540
  console.log(gradient.morning.multiline(' ✓ SUCCESS! Project Ready'));
@@ -343,9 +545,9 @@ function printSuccessMessage(projectName, config, stats = null) {
343
545
  console.log(chalk.bold('📋 Config'));
344
546
  console.log(chalk.gray(' Project: ') + gradient.cristal(projectName));
345
547
  console.log(chalk.gray(' Template: ') + chalk.cyan(config.template));
346
- console.log(chalk.gray(' Scale: ') + chalk.cyan((config.rules || 'N/A').toUpperCase()));
548
+ console.log(chalk.gray(' Skills: ') + chalk.cyan(config.skillCategories?.join(', ') || 'none'));
347
549
 
348
- // AI Activation Instructions
550
+ // AI Activation Instructions (NEW)
349
551
  console.log('');
350
552
  console.log(gradient.pastel('━'.repeat(60)));
351
553
  console.log(chalk.bold.cyan(config.language === 'vi' ? '🤖 Kích hoạt AI Agent' : '🤖 AI Agent Activation'));
@@ -363,21 +565,9 @@ function printSuccessMessage(projectName, config, stats = null) {
363
565
  console.log(chalk.gray(' 3. Activate: ') + chalk.green(`Type: "wake up ${agentName}"`));
364
566
  }
365
567
 
366
- // Dynamic Stats Display
367
- if (stats) {
368
- console.log('');
369
- const statLine = [
370
- chalk.white(`${stats.rules} Rules`),
371
- chalk.white(`${stats.skills} Skills`),
372
- chalk.white(`${stats.workflows} Workflows`),
373
- chalk.white(`${stats.shared} Core Modules`)
374
- ].join(chalk.gray(' • '));
375
- console.log(gradient.pastel(' ✨ Installed: ') + statLine);
376
- } else {
377
- // Fallback for non-modular runs
378
- console.log('');
379
- console.log(gradient.pastel(' ✨ Installed: ') + chalk.white('Adaptive Rules') + chalk.gray(' • ') + chalk.white('Shared Core'));
380
- }
568
+ // Stats Display
569
+ console.log('');
570
+ console.log(gradient.pastel(' ✨ Installed: ') + chalk.white('20+ Master Skills') + chalk.gray(' • ') + chalk.white('15+ Agents') + chalk.gray(' • ') + chalk.white('13 Shared Modules'));
381
571
 
382
572
  console.log('');
383
573
  console.log(chalk.dim(config.language === 'vi' ? ' AI sẽ tự động tải các kỹ năng và quy tắc.' : ' The AI will load all skills and rules automatically.'));
@@ -387,62 +577,10 @@ function printSuccessMessage(projectName, config, stats = null) {
387
577
  console.log('');
388
578
  }
389
579
 
390
- // Helper: Ensure Global Sync (~/.antigravity)
391
- async function ensureGlobalSync(config, rulesList, agentsList) {
392
- try {
393
- const globalDir = path.join(os.homedir(), '.antigravity');
394
- const sourceAgentDir = path.join(__dirname, '..', '.agent');
395
- const filter = getEngineFilter(config.engineMode);
396
-
397
- // Ensure global dir exists
398
- fs.ensureDirSync(globalDir);
399
-
400
- // 1. Copy Shared
401
- if (fs.existsSync(path.join(sourceAgentDir, '.shared'))) {
402
- await fs.copy(path.join(sourceAgentDir, '.shared'), path.join(globalDir, '.shared'), {
403
- overwrite: false,
404
- filter
405
- });
406
- }
407
-
408
- // 2. Copy Rules
409
- const rulesDest = path.join(globalDir, 'rules');
410
- fs.ensureDirSync(rulesDest);
411
- for (const rule of rulesList) {
412
- const src = path.join(sourceAgentDir, 'rules', rule);
413
- if (fs.existsSync(src)) {
414
- await fs.copy(src, path.join(rulesDest, rule), { overwrite: false });
415
- }
416
- }
417
-
418
- // 3. Agents (Skipped - Single Context Optimization)
419
- // const agentsDest = path.join(globalDir, 'agents');
420
-
421
- // 4. Copy Skills (All standard skills)
422
- const skillsSource = path.join(sourceAgentDir, 'skills');
423
- const skillsDest = path.join(globalDir, 'skills');
424
- if (fs.existsSync(skillsSource)) {
425
- // We copy ALL skills to global to ensure the full arsenal is available
426
- await fs.copy(skillsSource, skillsDest, {
427
- overwrite: false,
428
- filter
429
- });
430
- }
431
-
432
- // 5. Copy Workflows
433
- const workflowsSource = path.join(sourceAgentDir, 'workflows');
434
- const workflowsDest = path.join(globalDir, 'workflows');
435
- if (fs.existsSync(workflowsSource)) {
436
- await fs.copy(workflowsSource, workflowsDest, { overwrite: false });
437
- }
438
-
439
- } catch (e) {
440
- // Silent fail for global sync is acceptable to avoid breaking project flow
441
- // console.error('Global sync warning:', e.message);
442
- }
443
- }
444
-
445
580
  module.exports = {
446
581
  createProject,
447
- generateGeminiMd
582
+ generateGeminiMd,
583
+ copyBaseStructure,
584
+ copySkills,
585
+ copyWorkflows
448
586
  };