antigravity-flow 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +25 -0
  2. package/dist/src/commands/init.js +27 -0
  3. package/dist/src/commands/templates.js +14 -3
  4. package/dist/src/core/types.js +1 -0
  5. package/dist/src/templates/en/fragments/anchor.md.ejs +4 -0
  6. package/dist/src/templates/en/fragments/angular.md.ejs +5 -0
  7. package/dist/src/templates/en/fragments/astro.md.ejs +4 -0
  8. package/dist/src/templates/en/fragments/elixir.md.ejs +4 -0
  9. package/dist/src/templates/en/fragments/express.md.ejs +5 -0
  10. package/dist/src/templates/en/fragments/fastify.md.ejs +4 -0
  11. package/dist/src/templates/en/fragments/flask.md.ejs +4 -0
  12. package/dist/src/templates/en/fragments/gin.md.ejs +4 -0
  13. package/dist/src/templates/en/fragments/go.md.ejs +5 -0
  14. package/dist/src/templates/en/fragments/ink.md.ejs +4 -0
  15. package/dist/src/templates/en/fragments/move.md.ejs +4 -0
  16. package/dist/src/templates/en/fragments/node.md.ejs +5 -0
  17. package/dist/src/templates/en/fragments/nuxtjs.md.ejs +4 -0
  18. package/dist/src/templates/en/fragments/python.md.ejs +5 -0
  19. package/dist/src/templates/en/fragments/remix.md.ejs +4 -0
  20. package/dist/src/templates/en/fragments/rigor/standard.md.ejs +5 -0
  21. package/dist/src/templates/en/fragments/svelte.md.ejs +4 -0
  22. package/dist/src/templates/en/fragments/sveltekit.md.ejs +4 -0
  23. package/dist/src/templates/en/fragments/vue.md.ejs +5 -0
  24. package/dist/src/templates/en/guide.txt +5 -1
  25. package/dist/src/templates/fr/fragments/anchor.md.ejs +2 -0
  26. package/dist/src/templates/fr/fragments/angular.md.ejs +4 -0
  27. package/dist/src/templates/fr/fragments/astro.md.ejs +2 -0
  28. package/dist/src/templates/fr/fragments/base-rules.md.ejs +5 -0
  29. package/dist/src/templates/fr/fragments/django.md.ejs +12 -0
  30. package/dist/src/templates/fr/fragments/elixir.md.ejs +2 -0
  31. package/dist/src/templates/fr/fragments/express.md.ejs +4 -0
  32. package/dist/src/templates/fr/fragments/fastapi.md.ejs +11 -0
  33. package/dist/src/templates/fr/fragments/fastify.md.ejs +2 -0
  34. package/dist/src/templates/fr/fragments/flask.md.ejs +2 -0
  35. package/dist/src/templates/fr/fragments/gin.md.ejs +2 -0
  36. package/dist/src/templates/fr/fragments/go.md.ejs +4 -0
  37. package/dist/src/templates/fr/fragments/ink.md.ejs +2 -0
  38. package/dist/src/templates/fr/fragments/move.md.ejs +3 -0
  39. package/dist/src/templates/fr/fragments/nestjs.md.ejs +5 -0
  40. package/dist/src/templates/fr/fragments/nextjs.md.ejs +10 -0
  41. package/dist/src/templates/fr/fragments/node.md.ejs +4 -0
  42. package/dist/src/templates/fr/fragments/nuxtjs.md.ejs +2 -0
  43. package/dist/src/templates/fr/fragments/python.md.ejs +4 -0
  44. package/dist/src/templates/fr/fragments/react-native.md.ejs +12 -0
  45. package/dist/src/templates/fr/fragments/react.md.ejs +5 -0
  46. package/dist/src/templates/fr/fragments/remix.md.ejs +2 -0
  47. package/dist/src/templates/fr/fragments/rigor/legacy.md.ejs +2 -6
  48. package/dist/src/templates/fr/fragments/rigor/prototype.md.ejs +2 -6
  49. package/dist/src/templates/fr/fragments/rigor/standard.md.ejs +5 -0
  50. package/dist/src/templates/fr/fragments/rigor/strict.md.ejs +1 -7
  51. package/dist/src/templates/fr/fragments/solidity.md.ejs +20 -0
  52. package/dist/src/templates/fr/fragments/spring-boot.md.ejs +13 -0
  53. package/dist/src/templates/fr/fragments/svelte.md.ejs +2 -0
  54. package/dist/src/templates/fr/fragments/sveltekit.md.ejs +2 -0
  55. package/dist/src/templates/fr/fragments/vue.md.ejs +5 -0
  56. package/dist/src/templates/fr/guide.txt +5 -1
  57. package/dist/tests/core/Debug.spec.js +6 -0
  58. package/dist/tests/core/TemplateIntegrity.spec.js +83 -0
  59. package/package.json +1 -1
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # 🚀 Antigravity Workflow CLI
2
2
 
3
+ [![NPM Version](https://img.shields.io/npm/v/antigravity-flow)](https://www.npmjs.com/package/antigravity-flow)
4
+
3
5
  **Enforce strict, agentic workflows in your development projects.**
4
6
 
5
7
  Antigravity Flow (`ag-flow`) is a CLI tool originally built to prepare projects for **Google Antigravity**. It has since evolved into a **universal context generator** that standardizes development workflows for all AI-native IDEs, including **Cursor**, **Windsurf**, **Gemini Code Assist**, and **GitHub Copilot**.
@@ -28,6 +30,7 @@ It generates context-aware rules, workflows, and CI/CD pipelines tailored to you
28
30
  - **CI/CD**: GitHub Actions pipelines.
29
31
  - **Dockerfile**: Production-ready, multi-stage builds.
30
32
  - **.gitignore**: Optimized rules for your stack.
33
+ - **Customizable**: Use `ag-flow templates` to eject and modify any internal template.
31
34
  - **💡 Intelligent Discovery**: Auto-detects your tech stack to pre-fill prompts.
32
35
  - **💾 Configuration Persistence**: Saves your choices to `.agent/antigravity.json`.
33
36
  - **📦 Monorepo Support**: Turborepo, Nx, Lerna, pnpm/yarn workspaces.
@@ -40,6 +43,14 @@ npm install -g antigravity-flow
40
43
  npx antigravity-flow init
41
44
  ```
42
45
 
46
+ ````
47
+
48
+ ## 🔄 Updating
49
+ To update to the latest version:
50
+ ```bash
51
+ npm update -g antigravity-flow
52
+ ````
53
+
43
54
  ## 🚀 Usage
44
55
 
45
56
  Navigate to your project root and run:
@@ -60,6 +71,20 @@ ag-flow guide
60
71
  ag-flow guide fr
61
72
  ```
62
73
 
74
+ ### Template Customization (NEW)
75
+
76
+ You can view and customize any internal template (prompts, rules, Dockerfiles):
77
+
78
+ ```bash
79
+ # List all available templates
80
+ ag-flow templates list
81
+
82
+ # Eject and edit a template (opens system editor)
83
+ ag-flow templates update docker/django.Dockerfile.ejs
84
+ ```
85
+
86
+ The CLI will automatically prioritize your local templates in `.agent/templates/`.
87
+
63
88
  ### Interactive Prompts
64
89
 
65
90
  The CLI will guide you through:
@@ -367,6 +367,7 @@ class InitCommand {
367
367
  choices: [
368
368
  { name: 'Cursor (.cursor/rules)', value: types_1.IdeIntegration.CURSOR },
369
369
  { name: 'Windsurf (.windsurfrules)', value: types_1.IdeIntegration.WINDSURF },
370
+ { name: 'Google Antigravity (Native .agent integration)', value: types_1.IdeIntegration.ANTIGRAVITY },
370
371
  { name: 'Gemini Code Assist (.gemini)', value: types_1.IdeIntegration.GEMINI },
371
372
  { name: 'GitHub Copilot', value: types_1.IdeIntegration.COPILOT },
372
373
  ],
@@ -437,8 +438,34 @@ class InitCommand {
437
438
  if (ideIntegrations.includes(types_1.IdeIntegration.GEMINI)) {
438
439
  await this.integrateGemini(projectDetails, rulesContent);
439
440
  }
441
+ if (ideIntegrations.includes(types_1.IdeIntegration.ANTIGRAVITY)) {
442
+ await this.integrateAntigravity(projectDetails, rulesContent);
443
+ }
440
444
  // Future: Copilot, Cody integrations
441
445
  }
446
+ async integrateAntigravity(projectDetails, rulesContent) {
447
+ // Google Antigravity uses the standard .agent structure
448
+ // .agent/rules/coding-standards.md
449
+ // .agent/workflows/*.md
450
+ const agentRulesPath = path.join(projectDetails.rootPath, '.agent/rules/coding-standards.md');
451
+ const workflowsDir = path.join(projectDetails.rootPath, '.agent/workflows');
452
+ let statusMsg = 'Integrated with Google Antigravity:';
453
+ if (await this.fileSystem.exists(agentRulesPath)) {
454
+ statusMsg += '\n ✅ Rules linked (.agent/rules)';
455
+ }
456
+ else {
457
+ await this.fileSystem.createDirectory(path.dirname(agentRulesPath));
458
+ await this.fileSystem.writeFile(agentRulesPath, rulesContent);
459
+ statusMsg += '\n ✅ Rules created (.agent/rules)';
460
+ }
461
+ if (await this.fileSystem.exists(workflowsDir)) {
462
+ statusMsg += '\n ✅ Workflows linked (.agent/workflows)';
463
+ }
464
+ else {
465
+ statusMsg += '\n ⚠️ Workflows directory not found (should be generated by init)';
466
+ }
467
+ this.logger.success(statusMsg);
468
+ }
442
469
  async integrateCursor(projectDetails, rulesContent, roles) {
443
470
  // 1. Base Rules
444
471
  const cursorPath = path.join(projectDetails.rootPath, '.cursor/rules/antigravity.mdc');
@@ -115,9 +115,20 @@ class TemplatesCommand {
115
115
  const newContent = answer.content;
116
116
  // 3. Save to custom location
117
117
  if (newContent && newContent.trim() !== '') {
118
- await fs.ensureDir(path.dirname(customPath));
119
- await fs.writeFile(customPath, newContent);
120
- this.logger.success(`Template saved to: ${customPath}`);
118
+ try {
119
+ await fs.ensureDir(path.dirname(customPath));
120
+ await fs.writeFile(customPath, newContent);
121
+ this.logger.success(`Template saved to: ${customPath}`);
122
+ }
123
+ catch (error) {
124
+ if (error.code === 'EACCES' || error.code === 'EPERM') {
125
+ this.logger.error(`❌ Permission denied. Cannot write to: ${customPath}`);
126
+ this.logger.error('Please check your file permissions or run with elevated privileges.');
127
+ }
128
+ else {
129
+ this.logger.error(`Failed to save template: ${error.message}`);
130
+ }
131
+ }
121
132
  }
122
133
  else {
123
134
  this.logger.warn('Empty content. Update cancelled.');
@@ -295,6 +295,7 @@ var IdeIntegration;
295
295
  IdeIntegration["CURSOR"] = "cursor";
296
296
  IdeIntegration["WINDSURF"] = "windsurf";
297
297
  IdeIntegration["GEMINI"] = "gemini";
298
+ IdeIntegration["ANTIGRAVITY"] = "antigravity";
298
299
  IdeIntegration["COPILOT"] = "copilot";
299
300
  IdeIntegration["CODY"] = "cody";
300
301
  })(IdeIntegration || (exports.IdeIntegration = IdeIntegration = {}));
@@ -0,0 +1,4 @@
1
+ ## Anchor Standards
2
+
3
+ - Test with `anchor test`.
4
+ - Use correct seeds for PDA derivation.
@@ -0,0 +1,5 @@
1
+ ## Angular Standards
2
+
3
+ - Follow the official Angular Style Guide.
4
+ - Use strict mode.
5
+ - Prefer Signals for reactivity (if on recent version).
@@ -0,0 +1,4 @@
1
+ ## Astro Standards
2
+
3
+ - Use Islands Architecture.
4
+ - Minimize client-side JS.
@@ -0,0 +1,4 @@
1
+ ## Elixir Standards
2
+
3
+ - Follow the Elixir Style Guide.
4
+ - Use Pattern Matching and Pipe Operator `|>`.
@@ -0,0 +1,5 @@
1
+ ## Express.js Standards
2
+
3
+ - Separate routes, controllers, and services.
4
+ - Use middleware for cross-cutting concerns (auth, logging).
5
+ - Always return a response (or call next with error).
@@ -0,0 +1,4 @@
1
+ ## Fastify Standards
2
+
3
+ - Use schema-based validation.
4
+ - Register plugins asynchronously.
@@ -0,0 +1,4 @@
1
+ ## Flask Standards
2
+
3
+ - Use Blueprints for modularity.
4
+ - Use Flask-SQLAlchemy for ORM if needed.
@@ -0,0 +1,4 @@
1
+ ## Gin Standards
2
+
3
+ - Group routes by functionality.
4
+ - Use middleware for common request processing.
@@ -0,0 +1,5 @@
1
+ ## Go Standards
2
+
3
+ - Follow Go Code Review Comments style.
4
+ - Handle all errors explicitly.
5
+ - Use `go fmt` and `go vet`.
@@ -0,0 +1,4 @@
1
+ ## Ink! Standards
2
+
3
+ - Optimize storage usage.
4
+ - Write comprehensive unit and integration tests.
@@ -0,0 +1,4 @@
1
+ ## Move Standards
2
+
3
+ - Use strict typing and resource handling.
4
+ - Verify ownership and capabilities explicitly.
@@ -0,0 +1,5 @@
1
+ ## Node.js Standards
2
+
3
+ - Use Async/Await for all asynchronous operations.
4
+ - Handle errors gracefully with try/catch.
5
+ - Validate inputs early.
@@ -0,0 +1,4 @@
1
+ ## Nuxt.js Standards
2
+
3
+ - Use standard Nuxt directory structure.
4
+ - Leverage auto-imports where appropriate.
@@ -0,0 +1,5 @@
1
+ ## Python Standards
2
+
3
+ - Follow PEP 8 style guide.
4
+ - Use type hints for all function signatures.
5
+ - Use virtual environments for dependency management.
@@ -0,0 +1,4 @@
1
+ ## Remix Standards
2
+
3
+ - Use Loaders and Actions for data.
4
+ - Progressive enhancement is key.
@@ -0,0 +1,5 @@
1
+ ## Standard Rigor
2
+
3
+ - **Testing**: Maintain good test coverage (e.g., 60-80%). Unit tests for logic, integration tests for API.
4
+ - **Linting**: Use standard linting rules (e.g., ESLint recommended).
5
+ - **Code Review**: Required for all PRs.
@@ -0,0 +1,4 @@
1
+ ## Svelte Standards
2
+
3
+ - Keep stores simple.
4
+ - Use reactive statements `$:` wisely.
@@ -0,0 +1,4 @@
1
+ ## SvelteKit Standards
2
+
3
+ - Use standard routing conventions.
4
+ - Use SSR capabilities effectively.
@@ -0,0 +1,5 @@
1
+ ## Vue.js Standards
2
+
3
+ - Use Composition API with `<script setup>`.
4
+ - Keep components small and focused.
5
+ - Use Pinia for state management.
@@ -24,6 +24,10 @@ Commands:
24
24
  Options:
25
25
  --config <path> Run initialization from a configuration file (skip prompts)
26
26
 
27
+ templates Manage and customize templates.
28
+ - list : Show all available templates.
29
+ - update : Eject and edit a template (local override).
30
+
27
31
  guide Show this help message.
28
32
 
29
33
  Workflows Generated:
@@ -45,4 +49,4 @@ Configuration:
45
49
  You can edit this file to manually adjust your project context.
46
50
 
47
51
  Need more help?
48
- Visit: https://github.com/antigravity/flow
52
+ Visit: https://github.com/yetininoliviercoulibaly/antigravity-flow
@@ -0,0 +1,2 @@
1
+ ## Standards Anchor
2
+ - Tests avec `anchor test`.
@@ -0,0 +1,4 @@
1
+ ## Angular Standards
2
+
3
+ - Suivre le Style Guide officiel.
4
+ - Mode Strict activé.
@@ -0,0 +1,2 @@
1
+ ## Standards Astro
2
+ - Islands Architecture.
@@ -0,0 +1,5 @@
1
+ ## Standards de Code Principaux
2
+
3
+ 1. **Principes SOLID**: Adhérez à la Responsabilité Unique, Ouvert/Fermé, Substitution de Liskov, Ségrégation des Interfaces et Inversion de Dépendance.
4
+ 2. **Clean Code**: Écrivez du code facile à lire, comprendre et maintenir. Utilisez des noms significatifs.
5
+ 3. **DRY (Don't Repeat Yourself)**: Évitez la duplication. Extrayez la logique commune dans des fonctions ou composants réutilisables.
@@ -0,0 +1,12 @@
1
+ ## Règles Spécifiques Django
2
+
3
+ 1. **Structure du Projet**: Organisez les apps par domaine/fonctionnalité, pas par type.
4
+ 2. **Modèles (Models)**: Gardez les modèles légers, utilisez des managers pour les requêtes complexes.
5
+ 3. **Vues (Views)**: Préférez les vues basées sur des classes (CBV) pour la réutilisabilité.
6
+ 4. **Formulaires**: Utilisez les formulaires Django pour la validation, ModelForms pour le CRUD.
7
+ 5. **Migrations**: Révisez toujours les migrations générées avant de les appliquer.
8
+ 6. **Signaux**: Évitez les signaux pour la logique métier, utilisez des appels de service explicites.
9
+ 7. **Templates**: Minimisez la logique dans les templates, utilisez des template tags.
10
+ 8. **Configuration**: Utilisez django-environ ou similaire pour la configuration de l'environnement.
11
+ 9. **Sécurité**: Activez CSRF, utilisez le middleware de sécurité de Django.
12
+ 10. **Tests**: Utilisez pytest-django pour les tests, factory_boy pour les fixtures.
@@ -0,0 +1,2 @@
1
+ ## Standards Elixir
2
+ - Opérateur Pipe `|>`.
@@ -0,0 +1,4 @@
1
+ ## Express.js Standards
2
+
3
+ - Séparer routes, controllers, services.
4
+ - Middleware pour auth/logs.
@@ -0,0 +1,11 @@
1
+ ## Règles Spécifiques FastAPI
2
+
3
+ 1. **Modèles Pydantic**: Utilisez Pydantic pour la validation et sérialisation requête/réponse.
4
+ 2. **Injection de Dépendance**: Utilisez `Depends()` pour l'injection de dépendances.
5
+ 3. **Async**: Utilisez `async def` pour les opérations liées aux E/S.
6
+ 4. **Type Hints**: Utilisez toujours les indications de type pour les paramètres et retours.
7
+ 5. **Routeurs**: Organisez les endpoints dans des modules APIRouter par domaine.
8
+ 6. **Tâches de Fond**: Utilisez BackgroundTasks pour les opérations asynchrones.
9
+ 7. **Gestion d'Erreurs**: Utilisez HTTPException pour les erreurs API avec codes statut appropriés.
10
+ 8. **Configuration**: Utilisez pydantic-settings pour la gestion de la configuration.
11
+ 9. **Middleware**: Utilisez des middlewares pour CORS, logging, et traçage de requêtes.
@@ -0,0 +1,2 @@
1
+ ## Standards Fastify
2
+ - Validation schema-based.
@@ -0,0 +1,2 @@
1
+ ## Standards Flask
2
+ - Blueprints pour la modularité.
@@ -0,0 +1,2 @@
1
+ ## Standards Gin
2
+ - Groupement des routes.
@@ -0,0 +1,4 @@
1
+ ## Go Standards
2
+
3
+ - Suivre le style Go Code Review.
4
+ - Gérer les erreurs explicitement.
@@ -0,0 +1,2 @@
1
+ ## Standards Ink!
2
+ - Optimisation stockage.
@@ -0,0 +1,3 @@
1
+ ## Standards Move
2
+
3
+ - Typage strict et gestion des ressources.
@@ -0,0 +1,5 @@
1
+ ## Règles Spécifiques NestJS
2
+
3
+ 1. **Injection de Dépendance**: Utilisez toujours l'ID pour les dépendances de service.
4
+ 2. **Modules**: Organisez le code en modules par fonctionnalité (ex: `AuthModule`, `UserModule`).
5
+ 3. **DTOs**: Utilisez des DTOs pour la validation des données avec `class-validator`.
@@ -0,0 +1,10 @@
1
+ ## Règles Spécifiques Next.js
2
+
3
+ 1. **App Router**: Utilisez le App Router (app/) pour les nouveaux projets.
4
+ 2. **Server Components**: Utilisez les Server Components par défaut. Ajoutez `'use client'` seulement si nécessaire.
5
+ 3. **Récupération de Données**: Utilisez `fetch()` avec stratégies de cache, pas `getServerSideProps`.
6
+ 4. **Routes API**: Utilisez les Route Handlers (app/api/) pour la logique côté serveur.
7
+ 5. **Métadonnées**: Utilisez l'API Metadata pour le SEO.
8
+ 6. **Optimisation Image**: Utilisez toujours `next/image` pour les images.
9
+ 7. **Variables d'Environnement**: Utilisez le préfixe `NEXT_PUBLIC_` uniquement pour les variables exposées au client.
10
+ 8. **Middleware**: Utilisez middleware.ts pour l'authentification et les redirections.
@@ -0,0 +1,4 @@
1
+ ## Node.js Standards
2
+
3
+ - Async/Await pour l'asynchrone.
4
+ - Gestion d'erreurs try/catch.
@@ -0,0 +1,2 @@
1
+ ## Standards Nuxt.js
2
+ - Structure standard Nuxt.
@@ -0,0 +1,4 @@
1
+ ## Python Standards
2
+
3
+ - Suivre PEP 8.
4
+ - Type hints obligatoires.
@@ -0,0 +1,12 @@
1
+ ## Règles Spécifiques React Native
2
+
3
+ 1. **Navigation**: Utilisez React Navigation pour le routage.
4
+ 2. **Gestion d'État**: Utilisez React Query pour l'état serveur, Zustand/Redux pour l'état client.
5
+ 3. **Style**: Utilisez StyleSheet.create() pour la performance, envisagez NativeWind.
6
+ 4. **Modules Natifs**: Minimisez le code natif, utilisez les modules Expo quand c'est possible.
7
+ 5. **Performance**: Utilisez FlatList pour les longues listes, évitez les fonctions anonymes dans le render.
8
+ 6. **Spécifique Plateforme**: Utilisez Platform.select() pour le code spécifique à la plateforme.
9
+ 7. **Assets**: Optimisez les images pour mobile, utilisez les résolutions appropriées.
10
+ 8. **Tests**: Utilisez React Native Testing Library, Detox pour l'E2E.
11
+ 9. **Mises à jour OTA**: Utilisez EAS Update pour les mises à jour "Over-The-Air".
12
+ 10. **Deep Linking**: Configurez le deep linking pour la navigation depuis des sources externes.
@@ -0,0 +1,5 @@
1
+ ## Règles Spécifiques React
2
+
3
+ 1. **Composants Fonctionnels**: Utilisez des composants fonctionnels avec Hooks. Évitez les composants de classe.
4
+ 2. **Hooks Personnalisés**: Extrayez la logique complexe dans des hooks personnalisés (ex: `useAuth`).
5
+ 3. **Structure Composant**: Gardez les composants petits et ciblés. Un composant par fichier.
@@ -0,0 +1,2 @@
1
+ ## Standards Remix
2
+ - Loaders et Actions.
@@ -1,6 +1,2 @@
1
- ### 🛡️ Règles de Refactoring Legacy
2
- - **Tests de Caractérisation**: Avant de modifier le code, écrivez des tests qui capturent le comportement actuel (y compris les bugs).
3
- - **Stratégie**: Utilisez le modèle "Etranglement" (Strangler Fig) pour les réécritures majeures. Appliquez la règle du "Boy Scout" (nettoyez ce que vous touchez).
4
- - **Couverture de Code**: Ne visez pas 100% sur l'ancien code. Concentrez-vous sur le *nouveau* code et le code *modifié*.
5
- - **Dette Technique**: Marquez les problèmes connus avec `// TODO: [Legacy]`. Ne corrigez pas tout d'un coup.
6
- - **Types**: Utilisez `any` si nécessaire, mais créez des interfaces pour les frontières du système.
1
+ ## Mode Legacy
2
+ - Maintenir le code existant.
@@ -1,6 +1,2 @@
1
- ### 🚀 Mode Rigueur Prototype
2
-
3
- - **Vitesse d'abord**: Focus sur la livraison de fonctionnalités et la validation d'hypothèses.
4
- - **Tests**: Tests du chemin critique uniquement. TDD optionnel.
5
- - **Dette Technique**: Autorisée, mais doit être marquée `// TODO: [Refactor]`.
6
- - **Typage**: `any` toléré pour le prototypage rapide.
1
+ ## Mode Prototype
2
+ - Vitesse > Perfection.
@@ -0,0 +1,5 @@
1
+ ## Rigueur Standard
2
+
3
+ - **Tests**: Maintenez une bonne couverture (60-80%). Tests unitaires et intégration.
4
+ - **Linting**: Utilisez les règles standards (ex: ESLint recommandé).
5
+ - **Code Review**: Requis pour toute PR.
@@ -1,7 +1 @@
1
- ### 🛡️ Mode Rigueur Strict
2
-
3
- - **Test Driven Development (TDD)**: Obligatoire. Écrire le test avant le code.
4
- - **Couverture**: Maintenir 100% de couverture de code.
5
- - **Typage**: Pas de `any`. Configuration TypeScript stricte activée.
6
- - **Revue de Code**: 2 approbations requises. Pas d'auto-merge.
7
- - **Documentation**: Toutes les APIs publiques doivent avoir une JSDoc/TSDoc.
1
+ ## Mode Strict- 100% Coverage.
@@ -0,0 +1,20 @@
1
+ ## Règles Spécifiques Solidity
2
+
3
+ 1. **Pragma Version**: Spécifiez toujours une version ou plage Solidity spécifique.
4
+ 2. **Visibilité**: Déclarez explicitement la visibilité des fonctions (public, external, internal, private).
5
+ 3. **Réentrance**: Suivez le modèle CEI (Checks-Effects-Interactions) pour prévenir la réentrance.
6
+ 4. **Optimisation Gas**: Minimisez les écritures en stockage, utilisez `memory` pour les données temporaires.
7
+ 5. **Événements**: Émettez des événements pour tous les changements d'état (pour indexing off-chain).
8
+ 6. **Contrôle d'Accès**: Utilisez Ownable ou AccessControl d'OpenZeppelin.
9
+ 7. **Gestion d'Erreurs**: Utilisez des erreurs personnalisées au lieu de chaînes require pour l'efficacité gas.
10
+ 8. **Tests**: Utilisez Foundry ou Hardhat pour des tests complets.
11
+ 9. **Mise à niveau**: Utilisez des patterns proxy (UUPS, Transparent) si mise à niveau prévue.
12
+ 10. **Audit**: Tous les contrats doivent être audités avant déploiement mainnet.
13
+
14
+ ### Checklist Sécurité
15
+ - [ ] Gardes anti-réentrance implémentés
16
+ - [ ] Overflow/underflow entiers gérés (Solidity 0.8+)
17
+ - [ ] Contrôle d'accès vérifié
18
+ - [ ] Risques d'appels externes évalués
19
+ - [ ] Vecteurs d'attaque Flash loan considérés
20
+ - [ ] Mitigations Front-running en place
@@ -0,0 +1,13 @@
1
+ ## Règles Spécifiques Spring Boot
2
+
3
+ 1. **Structure du Projet**: Organisez par fonctionnalité/domaine, pas par couche technique.
4
+ 2. **Injection de Dépendance**: Utilisez l'injection par constructeur, évitez l'injection par champ.
5
+ 3. **Configuration**: Utilisez application.yml avec des profils pour les environnements.
6
+ 4. **Contrôleurs REST**: Utilisez @RestController avec méthodes HTTP et codes statut appropriés.
7
+ 5. **Couche Service**: Gardez la logique métier dans les classes @Service.
8
+ 6. **Repository**: Utilisez les repositories Spring Data JPA, requêtes personnalisées dans @Query.
9
+ 7. **Validation**: Utilisez @Valid et les annotations Bean Validation.
10
+ 8. **Gestion d'Exception**: Utilisez @ControllerAdvice pour la gestion globale des exceptions.
11
+ 9. **Sécurité**: Utilisez Spring Security pour l'authentification et l'autorisation.
12
+ 10. **Tests**: Utilisez @SpringBootTest pour l'intégration, @WebMvcTest pour les contrôleurs.
13
+ 11. **Actuator**: Activez les endpoints health et metrics pour l'observabilité.
@@ -0,0 +1,2 @@
1
+ ## Standards Svelte
2
+ - Stores simples.
@@ -0,0 +1,2 @@
1
+ ## Standards SvelteKit
2
+ - Routing standard.
@@ -0,0 +1,5 @@
1
+ ## Vue.js Standards
2
+
3
+ - Utilize Composition API et `<script setup>`.
4
+ - Composants petits et ciblés.
5
+ - Pinia pour le state management.
@@ -23,6 +23,10 @@ Commandes :
23
23
  Options :
24
24
  --config <path> Lance l'initialisation depuis un fichier de config (sans prompt)
25
25
 
26
+ templates Gérer et personnaliser les templates.
27
+ - list : Affiche tous les templates disponibles.
28
+ - update : Éjecte et édite un template (surcharge locale).
29
+
26
30
  guide Affiche ce message d'aide.
27
31
 
28
32
  Workflows Générés :
@@ -44,4 +48,4 @@ Configuration :
44
48
  Vous pouvez éditer ce fichier pour ajuster manuellement le contexte.
45
49
 
46
50
  Besoin d'aide ?
47
- Visitez : https://github.com/antigravity/flow
51
+ Visitez : https://github.com/yetininoliviercoulibaly/antigravity-flow
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ describe('Debug Test', () => {
3
+ it('should run this test', () => {
4
+ expect(true).toBe(true);
5
+ });
6
+ });
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const fs = __importStar(require("fs"));
37
+ const path = __importStar(require("path"));
38
+ const types_1 = require("../../src/core/types");
39
+ describe('Template Integrity', () => {
40
+ const srcTemplatesDir = path.resolve(__dirname, '../../src/templates');
41
+ console.log('Templates Directory:', srcTemplatesDir);
42
+ const languages = ['en', 'fr'];
43
+ const checkFileExists = (lang, relativePath) => {
44
+ const fullPath = path.join(srcTemplatesDir, lang, relativePath);
45
+ if (!fs.existsSync(fullPath)) {
46
+ throw new Error(`Missing template file: ${lang}/${relativePath}`);
47
+ }
48
+ };
49
+ languages.forEach((lang) => {
50
+ describe(`Language: ${lang}`, () => {
51
+ it('should have base rules fragment', () => {
52
+ checkFileExists(lang, 'fragments/base-rules.md.ejs');
53
+ });
54
+ it('should have all rigor mode fragments', () => {
55
+ Object.values(types_1.RigorMode).forEach((mode) => {
56
+ // RigorMode doesn't have NONE
57
+ checkFileExists(lang, `fragments/rigor/${mode}.md.ejs`);
58
+ });
59
+ });
60
+ it('should have all frontend framework fragments', () => {
61
+ Object.values(types_1.FrontendFramework).forEach((fw) => {
62
+ if (fw !== types_1.FrontendFramework.NONE) {
63
+ checkFileExists(lang, `fragments/${fw}.md.ejs`);
64
+ }
65
+ });
66
+ });
67
+ it('should have all backend framework fragments', () => {
68
+ Object.values(types_1.BackendFramework).forEach((fw) => {
69
+ if (fw !== types_1.BackendFramework.NONE) {
70
+ checkFileExists(lang, `fragments/${fw}.md.ejs`);
71
+ }
72
+ });
73
+ });
74
+ it('should have all smart contract framework fragments', () => {
75
+ Object.values(types_1.SmartContractFramework).forEach((fw) => {
76
+ if (fw !== types_1.SmartContractFramework.NONE) {
77
+ checkFileExists(lang, `fragments/${fw}.md.ejs`);
78
+ }
79
+ });
80
+ });
81
+ });
82
+ });
83
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antigravity-flow",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Universal AI Context Generator & Workflow CLI for Cursor, Windsurf, and Antigravity.",
5
5
  "main": "dist/src/core/index.js",
6
6
  "bin": {