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.
- package/.agent/.shared/{technical/ai-master → ai-master}/README.md +1 -12
- package/.agent/.shared/{technical/api-standards → api-standards}/README.md +1 -12
- package/.agent/.shared/compliance/README.md +19 -0
- package/.agent/.shared/{technical/database-master → database-master}/README.md +2 -12
- package/.agent/.shared/{core/design-philosophy → design-philosophy}/README.md +1 -12
- package/.agent/.shared/design-system/README.md +18 -0
- package/.agent/.shared/domain-blueprints/README.md +18 -0
- package/.agent/.shared/dx-toolkit/README.md +19 -0
- package/.agent/.shared/i18n-master/README.md +18 -0
- package/.agent/.shared/infra-blueprints/README.md +18 -0
- package/.agent/.shared/metrics/README.md +17 -0
- package/.agent/.shared/resilience-patterns/README.md +19 -0
- package/.agent/.shared/security-armor/README.md +25 -0
- package/.agent/.shared/{technical/seo-master → seo-master}/README.md +1 -12
- package/.agent/.shared/testing-master/README.md +20 -0
- package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/README.md +1 -12
- package/.agent/.shared/vitals-templates/README.md +18 -0
- package/.agent/ARCHITECTURE.md +7 -10
- package/.agent/ARCHITECTURE.vi.md +8 -8
- package/.agent/RESOURCES.md +1 -0
- package/.agent/agents/accessibility-expert.md +22 -0
- package/.agent/agents/api-architect.md +22 -0
- package/.agent/agents/backend-specialist.eco.md +19 -0
- package/.agent/agents/backend-specialist.instant.md +19 -0
- package/.agent/agents/backend-specialist.md +19 -154
- package/.agent/agents/cloud-architect.md +189 -108
- package/.agent/agents/codebase-expert.md +23 -0
- package/.agent/agents/compliance-expert.md +22 -0
- package/.agent/agents/data-scientist.md +22 -0
- package/.agent/agents/debugger.eco.md +20 -0
- package/.agent/agents/debugger.instant.md +20 -0
- package/.agent/agents/debugger.md +182 -83
- package/.agent/agents/deep-thinker.ultra.md +23 -0
- package/.agent/agents/devex-optimizer.md +22 -0
- package/.agent/agents/devops-architect.md +22 -0
- package/.agent/agents/documentation-writer.md +72 -125
- package/.agent/agents/frontend-specialist.eco.md +19 -0
- package/.agent/agents/frontend-specialist.instant.md +19 -0
- package/.agent/agents/frontend-specialist.md +7 -40
- package/.agent/agents/game-developer.md +116 -111
- package/.agent/agents/growth-engineer.md +22 -0
- package/.agent/agents/i18n-specialist.md +21 -0
- package/.agent/agents/legacy-modernizer.md +22 -0
- package/.agent/agents/microservices-specialist.md +22 -0
- package/.agent/agents/mobile-developer.md +321 -108
- package/.agent/agents/motion-designer.md +22 -0
- package/.agent/agents/orchestrator.creative.md +28 -0
- package/.agent/agents/orchestrator.eco.md +29 -0
- package/.agent/agents/orchestrator.instant.md +29 -0
- package/.agent/agents/orchestrator.md +366 -106
- package/.agent/agents/orchestrator.ultra.md +28 -0
- package/.agent/agents/performance-benchmarker.md +22 -0
- package/.agent/agents/performance-optimizer.md +136 -105
- package/.agent/agents/project-planner.eco.md +19 -0
- package/.agent/agents/project-planner.instant.md +19 -0
- package/.agent/agents/project-planner.md +39 -132
- package/.agent/agents/quality-inspector.md +32 -136
- package/.agent/agents/security-auditor.md +15 -138
- package/.agent/agents/security-pentester.md +22 -0
- package/.agent/agents/seo-specialist.md +72 -118
- package/.agent/agents/serverless-expert.md +22 -0
- package/.agent/agents/test-engineer.md +11 -142
- package/.agent/fastcode_index.json +1038 -0
- package/.agent/mcp_config.json +24 -0
- package/.agent/rules/GEMINI.eco.md +37 -0
- package/.agent/rules/GEMINI.instant.md +37 -0
- package/.agent/rules/GEMINI.md +31 -62
- package/.agent/rules/api-spec.md +28 -0
- package/.agent/rules/code-quality.md +3 -34
- package/.agent/rules/database.md +24 -0
- package/.agent/rules/devops.md +23 -0
- package/.agent/rules/frontend.md +3 -3
- package/.agent/rules/growth-strategy.md +22 -0
- package/.agent/rules/logging-monitoring.md +22 -0
- package/.agent/rules/quality-assurance.md +22 -0
- package/.agent/rules/strict-protocol.md +3 -44
- package/.agent/rules/system-reasoning.md +20 -0
- package/.agent/rules/system-update.md +3 -56
- package/.agent/rules/ui-design.md +23 -0
- package/.agent/rules/ux-patterns.md +23 -0
- package/.agent/scripts/auto_preview.py +148 -0
- package/.agent/scripts/checklist.py +252 -0
- package/.agent/scripts/session_manager.py +120 -0
- package/.agent/scripts/simulation_install.js +59 -0
- package/.agent/scripts/sync_to_global.py +78 -0
- package/.agent/scripts/translate_workflows.py +53 -0
- package/.agent/scripts/verify_all.py +327 -0
- package/.agent/scripts/verify_shared_modules.js +126 -0
- package/.agent/skills/agent-backend-patterns/SKILL.md +6 -13
- package/.agent/skills/ai-engineer/SKILL.md +16 -29
- package/.agent/skills/api-documenter/SKILL.md +4 -4
- package/.agent/skills/app-builder/SKILL.md +1 -1
- package/.agent/skills/app-builder/tech-stack.md +2 -2
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +79 -39
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +75 -53
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +119 -56
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +94 -61
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +82 -56
- package/.agent/skills/cloud-architect-master/SKILL.md +4 -9
- package/.agent/skills/cro-expert-kit/SKILL.md +4 -9
- package/.agent/skills/database-migration/SKILL.md +3 -9
- package/.agent/skills/deployment-engineer/SKILL.md +3 -9
- package/.agent/skills/fastcode-search/SKILL.md +46 -0
- package/.agent/skills/fastcode-search/fastcode_config.example.json +17 -0
- package/.agent/skills/frontend-design/ux-psychology.md +585 -10
- package/.agent/skills/frontend-trends-2026/SKILL.md +78 -0
- package/.agent/skills/frontend-trends-2026/formulas/BentoGrid.tsx +42 -0
- package/.agent/skills/frontend-trends-2026/formulas/LiquidCard.tsx +32 -0
- package/.agent/skills/frontend-trends-2026/formulas/NeoButton.tsx +27 -0
- package/.agent/skills/full-stack-scaffold/SKILL.md +4 -4
- package/.agent/skills/game-development/2d-games/SKILL.md +2 -4
- package/.agent/skills/game-development/3d-games/SKILL.md +2 -4
- package/.agent/skills/game-development/SKILL.md +149 -18
- package/.agent/skills/game-development/game-art/SKILL.md +2 -4
- package/.agent/skills/game-development/game-audio/SKILL.md +2 -4
- package/.agent/skills/game-development/game-design/SKILL.md +2 -4
- package/.agent/skills/game-development/mobile-games/SKILL.md +2 -4
- package/.agent/skills/game-development/multiplayer/SKILL.md +2 -4
- package/.agent/skills/game-development/pc-games/SKILL.md +2 -4
- package/.agent/skills/game-development/vr-ar/SKILL.md +2 -4
- package/.agent/skills/game-development/web-games/SKILL.md +2 -4
- package/.agent/skills/geo-fundamentals/SKILL.md +136 -9
- package/.agent/skills/git-collaboration-master/SKILL.md +4 -9
- package/.agent/skills/i18n-localization/SKILL.md +118 -10
- package/.agent/skills/incident-responder/SKILL.md +6 -9
- package/.agent/skills/legacy-modernizer/SKILL.md +4 -9
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +14 -2
- package/.agent/skills/mcp-builder/SKILL.md +164 -21
- package/.agent/skills/mobile-design/SKILL.md +369 -21
- package/.agent/skills/mobile-design/mobile-performance.md +1 -1
- package/.agent/skills/modern-web-architect/SKILL.md +6 -12
- package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +1 -1
- package/.agent/skills/penetration-tester-master/SKILL.md +4 -9
- package/.agent/skills/performance-engineer/SKILL.md +5 -4
- package/.agent/skills/production-code-audit/SKILL.md +0 -6
- package/.agent/skills/rust-pro/SKILL.md +177 -0
- package/.agent/skills/security-auditor/SKILL.md +27 -35
- package/.agent/skills/seo-expert-kit/SKILL.md +4 -9
- package/.agent/skills/tdd-master-workflow/SKILL.md +3 -9
- package/.agent/workflows/audit.md +16 -30
- package/.agent/workflows/brainstorm.md +96 -33
- package/.agent/workflows/create.md +45 -37
- package/.agent/workflows/debug.md +84 -45
- package/.agent/workflows/deep-security-audit.md +9 -0
- package/.agent/workflows/deploy.md +158 -33
- package/.agent/workflows/document.md +15 -38
- package/.agent/workflows/enhance.md +48 -33
- package/.agent/workflows/growth-max.md +9 -0
- package/.agent/workflows/monitor.md +14 -35
- package/.agent/workflows/orchestrate.md +218 -31
- package/.agent/workflows/performance-max.md +9 -0
- package/.agent/workflows/plan.md +70 -39
- package/.agent/workflows/security.md +14 -35
- package/.agent/workflows/seo.md +16 -39
- package/.agent/workflows/status.md +72 -33
- package/.agent/workflows/test.md +127 -30
- package/.agent/workflows/ui-ux-pro-max.md +283 -24
- package/.editorconfig +21 -0
- package/.gitattributes +7 -0
- package/CHANGELOG.md +32 -0
- package/ERRORS.md +67 -0
- package/{.agent/GEMINI.md → GEMINI.md} +5 -4
- package/LICENSE +8 -22
- package/README.md +72 -102
- package/README.vi.md +110 -90
- package/action.yml +32 -0
- package/antigravity-ide-logo.png +0 -0
- package/antigravity-ide-logo.svg +24 -0
- package/assets/skills-bundle.json +1 -0
- package/cli/create.js +413 -275
- package/cli/index.js +24 -28
- package/cli/lib/auto-update.js +21 -14
- package/cli/logic/skill-definitions.js +39 -0
- package/cli/manifest.js +524 -0
- package/cli/prompts.js +145 -151
- package/cli/skills/fastcode.js +181 -0
- package/docs/AGENTS_GUIDE.vi.md +45 -38
- package/docs/AGENT_FLOW.md +608 -0
- package/docs/CONTRIBUTING.md +46 -0
- package/docs/CONTRIBUTING.vi.md +3 -12
- package/docs/COPYRIGHT.md +57 -0
- package/docs/DEPLOYMENT.md +77 -0
- package/docs/{GEMINI_USAGE.md → GEMINI_GUIDE.md} +6 -6
- package/docs/GLOSSARY.md +109 -0
- package/docs/GLOSSARY.vi.md +30 -49
- package/docs/HOW_ANTIGRAVITY_THINKS.vi.md +1 -1
- package/docs/MASTER_GUIDE.md +103 -0
- package/docs/OPERATIONAL_FLOW.md +147 -0
- package/docs/OPERATIONAL_FLOW.vi.md +0 -15
- package/docs/PLAN-upgrade-core-architecture.md +71 -0
- package/docs/{PUBLISHING_GUIDE.md → PUBLISHING.md} +3 -31
- package/docs/RULES_GUIDE.vi.md +31 -67
- package/docs/SHARED_LIBRARY_GUIDE.vi.md +22 -18
- package/docs/SKILLS.md +610 -0
- package/docs/SKILLS_GUIDE.vi.md +32 -118
- package/docs/TROUBLESHOOTING.md +43 -0
- package/docs/TROUBLESHOOTING.vi.md +2 -10
- package/docs/WORKFLOW_GUIDE.vi.md +9 -57
- package/jest.config.js +8 -0
- package/package.json +8 -31
- package/scripts/bump.js +93 -0
- package/scripts/bundle-skills.js +59 -0
- package/scripts/internal/automation/auto-release.js +177 -0
- package/scripts/internal/fractalize-skills.js +89 -0
- package/scripts/internal/generate-skill-definitions.js +134 -0
- package/scripts/internal/internal/update-docs.js +115 -0
- package/scripts/internal/refactor-skill-content.js +127 -0
- package/scripts/internal/rename-skills.js +96 -0
- package/scripts/internal/sync-skills.js +112 -0
- package/scripts/internal/update-frontmatter-names.js +99 -0
- package/scripts/internal/verification/audit-dna.js +56 -0
- package/scripts/internal/verification/audit-skills.js +65 -0
- package/setup.js +114 -147
- package/web/src/app/docs/guide/examples/brainstorm/page.mdx +91 -0
- package/web/src/app/docs/guide/examples/create/page.mdx +84 -0
- package/web/src/app/docs/guide/examples/debugging/page.mdx +83 -0
- package/web/src/app/docs/guide/examples/deployment/page.mdx +93 -0
- package/web/src/app/docs/guide/examples/new-feature/page.mdx +102 -0
- package/web/src/app/docs/guide/examples/orchestration/page.mdx +99 -0
- package/web/src/app/docs/guide/examples/plan/page.mdx +76 -0
- package/web/src/app/docs/guide/examples/preview/page.mdx +77 -0
- package/web/src/app/docs/guide/examples/status/page.mdx +78 -0
- package/web/src/app/docs/guide/examples/test/page.mdx +80 -0
- package/web/src/app/docs/guide/examples/ui-design/page.mdx +90 -0
- package/web/src/components/mdx/Callout.tsx +60 -0
- package/web/src/components/mdx/FeatureGrid.tsx +38 -0
- package/web/src/components/mdx/ProTips.tsx +29 -0
- package/web/src/components/mdx/StepList.tsx +33 -0
- package/web/src/components/mdx/Terminal.tsx +58 -0
- package/web/src/components/mdx/index.ts +5 -0
- package/web/src/mdx-components.tsx +98 -0
- package/.agent/skills/brand-guidelines-anthropic/LICENSE.txt +0 -202
- package/.agent/skills/brand-guidelines-anthropic/SKILL.md +0 -26
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/color-application.md +0 -5
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/colors.md +0 -14
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/font-management.md +0 -6
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/shape-and-accent-colors.md +0 -7
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/smart-font-application.md +0 -6
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/text-styling.md +0 -6
- package/.agent/skills/brand-guidelines-anthropic/sub-skills/typography.md +0 -7
- package/.agent/skills/internal-comms-anthropic/LICENSE.txt +0 -202
- package/.agent/skills/internal-comms-anthropic/SKILL.md +0 -33
- package/.agent/skills/internal-comms-anthropic/examples/3p-updates.md +0 -47
- package/.agent/skills/internal-comms-anthropic/examples/company-newsletter.md +0 -65
- package/.agent/skills/internal-comms-anthropic/examples/faq-answers.md +0 -30
- package/.agent/skills/internal-comms-anthropic/examples/general-comms.md +0 -16
- package/.agent/skills/last30days/tests/__init__.py +0 -1
- package/.agent/skills/last30days/tests/test_cache.py +0 -59
- package/.agent/skills/last30days/tests/test_dates.py +0 -114
- package/.agent/skills/last30days/tests/test_dedupe.py +0 -111
- package/.agent/skills/last30days/tests/test_models.py +0 -135
- package/.agent/skills/last30days/tests/test_normalize.py +0 -138
- package/.agent/skills/last30days/tests/test_render.py +0 -116
- package/.agent/skills/last30days/tests/test_score.py +0 -168
- package/.agent/skills/loki-mode/.github/workflows/claude-code-review.yml +0 -57
- package/.agent/skills/loki-mode/.github/workflows/claude.yml +0 -50
- package/.agent/skills/loki-mode/.github/workflows/release.yml +0 -128
- package/.agent/skills/loki-mode/tests/run-all-tests.sh +0 -78
- package/.agent/skills/loki-mode/tests/test-agent-timeout.sh +0 -348
- package/.agent/skills/loki-mode/tests/test-bootstrap.sh +0 -196
- package/.agent/skills/loki-mode/tests/test-circuit-breaker.sh +0 -389
- package/.agent/skills/loki-mode/tests/test-state-recovery.sh +0 -393
- package/.agent/skills/loki-mode/tests/test-task-queue.sh +0 -396
- package/.agent/skills/loki-mode/tests/test-wrapper.sh +0 -314
- package/.agent/skills/shopify-development/scripts/tests/test_shopify_init.py +0 -379
- package/cli/logic/product-skills.js +0 -58
- /package/.agent/.shared/{technical/ai-master → ai-master}/best_patterns.md +0 -0
- /package/.agent/.shared/{technical/ai-master → ai-master}/checklists/prompt_audit.md +0 -0
- /package/.agent/.shared/{technical/ai-master → ai-master}/presets/model_configs.json +0 -0
- /package/.agent/.shared/{technical/api-standards → api-standards}/data +0 -0
- /package/.agent/.shared/{technical/api-standards → api-standards}/endpoints_naming.md +0 -0
- /package/.agent/.shared/{technical/api-standards → api-standards}/error_codes.csv +0 -0
- /package/.agent/.shared/{technical/api-standards → api-standards}/pagination_sorting.md +0 -0
- /package/.agent/.shared/{technical/api-standards → api-standards}/response_format.json +0 -0
- /package/.agent/.shared/{verticals/compliance → compliance}/legal_templates.md +0 -0
- /package/.agent/.shared/{technical/database-master → database-master}/schemas/auth_rbac.sql +0 -0
- /package/.agent/.shared/{technical/database-master → database-master}/schemas/cms.sql +0 -0
- /package/.agent/.shared/{technical/database-master → database-master}/schemas/ecommerce.sql +0 -0
- /package/.agent/.shared/{core/design-philosophy → design-philosophy}/MANIFESTO.md +0 -0
- /package/.agent/.shared/{core/design-philosophy → design-philosophy}/checklists/tactile_audit.md +0 -0
- /package/.agent/.shared/{core/design-philosophy → design-philosophy}/checklists/visual_audit.md +0 -0
- /package/.agent/.shared/{core/design-philosophy → design-philosophy}/presets/linear_glow.json +0 -0
- /package/.agent/.shared/{technical/design-system → design-system}/brand_presets.json +0 -0
- /package/.agent/.shared/{technical/design-system → design-system}/micro_interactions.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/edtech.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/fintech.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/fnb_restaurant.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/freelance_marketplace.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/healthcare.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/hospitality_tourism.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/logistics.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/marketing_automation.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/personal_branding.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/real_estate.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/retail_ecommerce.md +0 -0
- /package/.agent/.shared/{verticals/domain-blueprints → domain-blueprints}/standard-pro-agents.md +0 -0
- /package/.agent/.shared/{core/dx-toolkit → dx-toolkit}/checklists/code_review.md +0 -0
- /package/.agent/.shared/{core/dx-toolkit → dx-toolkit}/presets/vscode_settings.json +0 -0
- /package/.agent/.shared/{technical/i18n-master → i18n-master}/vi_tech_dictionary.csv +0 -0
- /package/.agent/.shared/{technical/i18n-master → i18n-master}/workflows.json +0 -0
- /package/.agent/.shared/{verticals/infra-blueprints → infra-blueprints}/deployment_specs.md +0 -0
- /package/.agent/.shared/{core/metrics → metrics}/benchmarks.json +0 -0
- /package/.agent/.shared/{technical/resilience-patterns → resilience-patterns}/checklists/chaos_engineering.md +0 -0
- /package/.agent/.shared/{technical/resilience-patterns → resilience-patterns}/presets/circuit_breaker.json +0 -0
- /package/.agent/.shared/{technical/security-armor → security-armor}/checklists/vuln_scan.md +0 -0
- /package/.agent/.shared/{technical/security-armor → security-armor}/hardening.md +0 -0
- /package/.agent/.shared/{technical/security-armor → security-armor}/presets/helmet_config.json +0 -0
- /package/.agent/.shared/{technical/seo-master → seo-master}/checklists/technical_seo.md +0 -0
- /package/.agent/.shared/{technical/seo-master → seo-master}/presets/json_ld_schema.json +0 -0
- /package/.agent/.shared/{technical/testing-master → testing-master}/checklists/pre_release.md +0 -0
- /package/.agent/.shared/{technical/testing-master → testing-master}/scenarios.md +0 -0
- /package/.agent/{skills → .shared}/ui-ux-pro-max/data/charts.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/colors.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/icons.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/landing.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/products.csv +0 -0
- /package/.agent/{skills → .shared}/ui-ux-pro-max/data/prompts.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/react-performance.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/flutter.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/html-tailwind.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/jetpack-compose.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nextjs.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nuxt-ui.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/nuxtjs.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/react-native.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/react.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/shadcn.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/svelte.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/swiftui.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/stacks/vue.csv +0 -0
- /package/.agent/{skills → .shared}/ui-ux-pro-max/data/styles.csv +0 -0
- /package/.agent/{skills → .shared}/ui-ux-pro-max/data/typography.csv +0 -0
- /package/.agent/{skills → .shared}/ui-ux-pro-max/data/ui-reasoning.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/ux-guidelines.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/data/web-interface.csv +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/__pycache__/core.cpython-313.pyc +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/core.py +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/design_system.py +0 -0
- /package/.agent/.shared/{technical/ui-ux-pro-max → ui-ux-pro-max}/scripts/search.py +0 -0
- /package/.agent/.shared/{core/vitals-templates → vitals-templates}/audit_report.md +0 -0
- /package/.agent/.shared/{core/vitals-templates → vitals-templates}/plan_prd.md +0 -0
- /package/.agent/skills/ai-engineer/{sub-skills → resources}/ai_infra_stack.md +0 -0
- /package/.agent/skills/cloud-architect-master/{sub-skills → resources}/cost_optimization_checklist.md +0 -0
- /package/.agent/skills/cro-expert-kit/{sub-skills → resources}/psychological_triggers.md +0 -0
- /package/.agent/skills/database-migration/{sub-skills → resources}/zero_downtime_strategy.md +0 -0
- /package/.agent/skills/deployment-engineer/{sub-skills → resources}/k8s_best_practices.md +0 -0
- /package/.agent/skills/git-collaboration-master/{sub-skills → resources}/pr_template.md +0 -0
- /package/.agent/skills/incident-responder/{sub-skills → resources}/incident_severity_levels.md +0 -0
- /package/.agent/skills/legacy-modernizer/{sub-skills → resources}/strangler_fig_pattern.md +0 -0
- /package/.agent/skills/penetration-tester-master/{sub-skills → resources}/owasp_top_10_2025.md +0 -0
- /package/.agent/skills/production-code-audit/{sub-skills → resources}/solid_principles_cheat_sheet.md +0 -0
- /package/.agent/skills/seo-expert-kit/{sub-skills → resources}/technical_seo_checklist.md +0 -0
- /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,
|
|
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
|
|
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 (
|
|
27
|
-
|
|
28
|
-
config
|
|
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
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
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 (
|
|
42
|
-
if (!isCurrentDir && fs.existsSync(projectPath)
|
|
43
|
-
|
|
44
|
-
|
|
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('
|
|
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
|
-
//
|
|
58
|
-
|
|
59
|
-
|
|
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
|
-
|
|
109
|
-
if (finalSkillCategories.length > 0) {
|
|
49
|
+
if (config.template !== 'minimal') {
|
|
110
50
|
spinner.start('Installing selected skills...');
|
|
111
|
-
|
|
112
|
-
spinner.succeed(`Installed ${
|
|
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
|
-
//
|
|
57
|
+
// Generate configuration files
|
|
58
|
+
spinner.start('Generating configuration files...');
|
|
59
|
+
await generateConfigs(projectPath, config);
|
|
60
|
+
spinner.succeed('Configuration files created');
|
|
143
61
|
|
|
144
|
-
//
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
//
|
|
157
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
//
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
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
|
-
//
|
|
254
|
-
const
|
|
255
|
-
for (const
|
|
256
|
-
|
|
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
|
-
//
|
|
260
|
-
const
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (fs.existsSync(
|
|
266
|
-
|
|
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
|
-
//
|
|
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
|
-
//
|
|
279
|
-
|
|
280
|
-
const
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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('
|
|
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
|
-
//
|
|
367
|
-
|
|
368
|
-
|
|
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
|
};
|