@atlashub/smartstack-cli 1.14.0 → 1.14.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.
@@ -1,206 +0,0 @@
1
- # GitFlow Optimizations - Resume
2
-
3
- > **Date:** 2026-01-20
4
- > **Objectif:** Reduire le temps d'execution des commandes GitFlow de ~70%
5
-
6
- ---
7
-
8
- ## Optimisations Implementees
9
-
10
- ### 1. Fonctions Partagees (`_shared.md`)
11
-
12
- **Fichier cree:** `templates/commands/gitflow/_shared.md`
13
-
14
- Centralise les fonctions reutilisables pour eviter la duplication:
15
-
16
- | Fonction | Usage | Gain |
17
- |----------|-------|------|
18
- | `get_current_branch()` | Detection robuste de branche | ~66% |
19
- | `get_version_info()` | Version + tags en 1 appel | ~75% |
20
- | `get_sync_status()` | Statut sync local/remote | ~70% |
21
- | `collect_repo_data_parallel()` | Collecte parallele | ~60-70% |
22
- | `read_gitflow_config()` | Config avec cache | ~90% |
23
- | `detect_worktree_mode()` | Detection auto structure | Fiabilite |
24
- | `get_worktree_path()` | Chemin worktree standard | Consistance |
25
-
26
- ---
27
-
28
- ### 2. Parallelisation Git (`2-status.md`, `10-start.md`, `11-finish.md`)
29
-
30
- **Avant:**
31
- ```bash
32
- # Sequentiel - ~8 secondes
33
- git fetch --all
34
- git for-each-ref refs/heads
35
- git for-each-ref refs/remotes
36
- git for-each-ref refs/tags
37
- git worktree list
38
- git branch -vv
39
- git status
40
- # + boucles for pour chaque branche
41
- ```
42
-
43
- **Apres:**
44
- ```bash
45
- # Parallele - ~2 secondes
46
- {
47
- git for-each-ref refs/heads > /tmp/local &
48
- git for-each-ref refs/remotes > /tmp/remote &
49
- git for-each-ref refs/tags > /tmp/tags &
50
- git worktree list > /tmp/worktrees &
51
- git status --porcelain > /tmp/status &
52
- wait
53
- }
54
- ```
55
-
56
- **Gain:** ~70% du temps de collecte
57
-
58
- ---
59
-
60
- ### 3. Mode Fast (`2-status.md`)
61
-
62
- **Nouveau:** `/gitflow:status --fast`
63
-
64
- Output compact en ~1 seconde:
65
- ```
66
- [develop] clean | v1.5.0 | dev->main:+5 | main->dev:+0 | sync:UP-TO-DATE
67
- -> /gitflow:start release (5 commits prets)
68
- ```
69
-
70
- ---
71
-
72
- ### 4. Consolidation des Questions (`10-start.md`)
73
-
74
- **Avant:** 6+ `AskUserQuestion` sequentiels
75
- - Type de branche
76
- - Divergence main (release)
77
- - Migrations EF Core (release)
78
- - Version (release)
79
- - Nom de branche
80
- - Working directory dirty
81
-
82
- **Apres:** 1-2 questions maximum
83
- - Question unique avec options dynamiques
84
- - Execution directe si arguments fournis
85
-
86
- **Gain:** ~70% du temps d'interaction
87
-
88
- ---
89
-
90
- ### 5. Optimisation des Agents
91
-
92
- | Agent | Avant | Apres | Raison |
93
- |-------|-------|-------|--------|
94
- | `gitflow-finish` | sonnet | **haiku** | Actions predefinies |
95
- | `gitflow-commit` | sonnet | **haiku** | Validation simple |
96
- | `gitflow-exec` | sonnet | sonnet | Gestion conflits complexe |
97
- | `gitflow-status` | haiku | haiku | OK |
98
- | `gitflow-start` | haiku | haiku | OK |
99
- | `gitflow-pr` | haiku | haiku | OK |
100
-
101
- **Gain latence:** ~30-50% pour les agents optimises
102
-
103
- ---
104
-
105
- ## Gains Totaux par Commande
106
-
107
- | Commande | Avant | Apres | Gain |
108
- |----------|-------|-------|------|
109
- | `/gitflow:status` | ~8-12s | ~2-3s | **~70%** |
110
- | `/gitflow:status --fast` | N/A | ~1s | **Nouveau** |
111
- | `/gitflow:start` (interactif) | ~25s | ~8s | **~65%** |
112
- | `/gitflow:start feature xxx` | ~15s | ~5s | **~65%** |
113
- | `/gitflow:finish` | ~15s | ~5s | **~65%** |
114
- | `/gitflow:commit` | ~8s | ~4s | **~50%** |
115
-
116
- ---
117
-
118
- ## Principes Appliques
119
-
120
- ### 1. Collecte Avant Affichage
121
- - Executer TOUTES les commandes git AVANT de generer l'output
122
- - Utiliser des fichiers temporaires ou variables pour stocker
123
-
124
- ### 2. Parallelisation Aggressive
125
- - Utiliser `&` et `wait` pour les commandes independantes
126
- - Limiter le parallelisme avec `wait -n` si necessaire
127
-
128
- ### 3. Single-Pass Parsing
129
- - Parser les donnees une seule fois
130
- - Stocker en memoire pour reutilisation
131
-
132
- ### 4. Cache des Donnees Frequentes
133
- - Config GitFlow (variable globale)
134
- - Tags Git (valide pendant la session)
135
- - Version (calculee une fois)
136
-
137
- ### 5. Questions Minimales
138
- - Consolider les questions en 1-2 appels
139
- - Utiliser les arguments directs quand possible
140
- - Options dynamiques basees sur le contexte
141
-
142
- ### 6. Modeles Adaptes
143
- - **haiku** pour les taches simples/predefinies
144
- - **sonnet** uniquement pour le raisonnement complexe
145
-
146
- ---
147
-
148
- ## Fichiers Modifies
149
-
150
- ```
151
- templates/commands/gitflow/
152
- _shared.md # NOUVEAU - Fonctions partagees
153
- 2-status.md # Parallelisation + mode fast
154
- 10-start.md # Consolidation questions
155
- 11-finish.md # Parallelisation scan + haiku
156
- OPTIMIZATIONS.md # NOUVEAU - Cette documentation
157
-
158
- templates/agents/gitflow/
159
- finish.md # sonnet -> haiku
160
- commit.md # sonnet -> haiku
161
- ```
162
-
163
- ---
164
-
165
- ## Compatibilite
166
-
167
- **Aucun breaking change:**
168
- - Les commandes gardent la meme interface
169
- - Les options existantes fonctionnent
170
- - Nouveaux modes (`--fast`) sont optionnels
171
-
172
- ---
173
-
174
- ## Tests Recommandes
175
-
176
- 1. `/gitflow:status` - Verifier temps < 3s
177
- 2. `/gitflow:status --fast` - Verifier temps < 1s
178
- 3. `/gitflow:start feature test` - Verifier temps < 5s
179
- 4. `/gitflow:start` (interactif) - Verifier 1-2 questions max
180
- 5. `/gitflow:finish` - Verifier scan parallele
181
-
182
- ---
183
-
184
- ## Metriques de Suivi
185
-
186
- Pour mesurer les performances:
187
-
188
- ```bash
189
- # Temps d'execution
190
- time /gitflow:status
191
-
192
- # Avec mode fast
193
- time /gitflow:status --fast
194
-
195
- # Creation directe
196
- time /gitflow:start feature test-perf --no-worktree
197
- ```
198
-
199
- ---
200
-
201
- ## Ameliorations Futures Possibles
202
-
203
- 1. **Cache persistant** - Stocker tags/config entre sessions
204
- 2. **Pre-fetch** - Fetch en background au demarrage
205
- 3. **Incremental status** - Ne collecter que les changements
206
- 4. **Batch PR checks** - API GitHub/Azure en batch
@@ -1,138 +0,0 @@
1
- {
2
- "$schema": "https://atlashub.ch/schemas/claude-gitflow-config.json",
3
- "version": "1.2.0",
4
- "worktrees": {
5
- "enabled": true,
6
- "basePath": "../worktrees",
7
- "permanent": {
8
- "main": true,
9
- "develop": true
10
- },
11
- "structure": {
12
- "features": "features/{name}",
13
- "releases": "releases/v{version}",
14
- "hotfixes": "hotfixes/{name}"
15
- },
16
- "cleanupOnFinish": true
17
- },
18
- "git": {
19
- "branches": {
20
- "main": "main",
21
- "develop": "develop",
22
- "featurePrefix": "feature/",
23
- "releasePrefix": "release/",
24
- "hotfixPrefix": "hotfix/"
25
- },
26
- "remote": "origin",
27
- "mergeStrategy": "--no-ff",
28
- "tagPrefix": "v",
29
- "protectedBranches": ["main", "develop"],
30
- "requireLinearHistory": false
31
- },
32
- "efcore": {
33
- "enabled": true,
34
- "autoDetect": true,
35
- "crossBranch": {
36
- "enabled": true,
37
- "scanOnMigrationCreate": true,
38
- "blockOnConflict": true,
39
- "cacheExpiry": 300
40
- },
41
- "contexts": [
42
- {
43
- "name": "ApplicationDbContext",
44
- "projectPath": "auto-detect",
45
- "startupProject": "auto-detect",
46
- "migrationsFolder": "Migrations",
47
- "migrationsAssembly": null
48
- }
49
- ],
50
- "database": {
51
- "configFile": "appsettings.Local.json",
52
- "connectionStringName": "DefaultConnection",
53
- "provider": "SqlServer",
54
- "seedOnDeploy": false,
55
- "confirmBeforeReset": true,
56
- "backupBeforeReset": true
57
- },
58
- "scripts": {
59
- "generateOnRelease": true,
60
- "generateOnHotfix": true,
61
- "idempotent": true,
62
- "outputPath": "./scripts/migrations",
63
- "namingPattern": "{type}_{version}_{timestamp}.sql"
64
- },
65
- "validation": {
66
- "validateBeforeCommit": true,
67
- "validateBeforeMerge": true,
68
- "checkModelSnapshotConflicts": true,
69
- "crossBranchValidation": true,
70
- "requireBuildSuccess": true,
71
- "warnOnPendingMigrations": true
72
- },
73
- "backup": {
74
- "enabled": true,
75
- "beforeRebase": true,
76
- "beforeSquash": true,
77
- "beforeMerge": true,
78
- "retentionDays": 7,
79
- "location": ".claude/gitflow/backup/migrations"
80
- },
81
- "naming": {
82
- "migrationPrefix": "",
83
- "hotfixPrefix": "Hotfix_",
84
- "timestampFormat": "yyyyMMddHHmmss",
85
- "pattern": "{BranchType}_{Version}_{BranchName}_{Description}",
86
- "examples": {
87
- "feature": "Feature_1.2.0_UserAuth_AddRolesTable",
88
- "hotfix": "Hotfix_1.2.1_LoginFix_FixNullEmail",
89
- "release": "Release_1.3.0_Initial"
90
- }
91
- },
92
- "rules": {
93
- "oneMigrationPerFeature": true,
94
- "recreateOnChange": true,
95
- "requireDescription": true,
96
- "validateNaming": true
97
- }
98
- },
99
- "workflow": {
100
- "requireConfirmation": true,
101
- "autoDeleteBranch": false,
102
- "createCheckpoints": true,
103
- "verboseLogging": false,
104
- "interactiveMode": true,
105
- "push": {
106
- "afterCommit": "worktree",
107
- "modes": {
108
- "worktree": "Push automatique si worktree détecté",
109
- "always": "Push automatique après chaque commit",
110
- "ask": "Demander à l'utilisateur",
111
- "never": "Ne jamais push automatiquement"
112
- }
113
- },
114
- "commitConventions": {
115
- "enabled": true,
116
- "migration": "db(migrations): ",
117
- "feature": "feat: ",
118
- "fix": "fix: ",
119
- "release": "release: ",
120
- "hotfix": "hotfix: ",
121
- "chore": "chore: "
122
- },
123
- "hooks": {
124
- "prePlan": null,
125
- "postPlan": null,
126
- "preExec": null,
127
- "postExec": null,
128
- "preCommit": null,
129
- "postCommit": null
130
- }
131
- },
132
- "ui": {
133
- "colors": true,
134
- "showProgress": true,
135
- "compactMode": false,
136
- "language": "fr"
137
- }
138
- }