@atlashub/smartstack-cli 1.11.0 → 1.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/.documentation/agents.html +7 -2
  2. package/.documentation/apex.html +7 -2
  3. package/.documentation/business-analyse.html +7 -2
  4. package/.documentation/cli-commands.html +871 -0
  5. package/.documentation/commands.html +7 -2
  6. package/.documentation/efcore.html +7 -2
  7. package/.documentation/gitflow.html +7 -2
  8. package/.documentation/hooks.html +7 -2
  9. package/.documentation/index.html +7 -2
  10. package/.documentation/init.html +7 -2
  11. package/.documentation/installation.html +7 -2
  12. package/.documentation/ralph-loop.html +7 -2
  13. package/.documentation/test-web.html +7 -2
  14. package/dist/index.js +1932 -336
  15. package/dist/index.js.map +1 -1
  16. package/package.json +8 -2
  17. package/templates/agents/efcore/squash.md +67 -31
  18. package/templates/agents/gitflow/finish.md +68 -56
  19. package/templates/commands/business-analyse/0-orchestrate.md +72 -556
  20. package/templates/commands/business-analyse/1-init.md +23 -193
  21. package/templates/commands/business-analyse/2-discover.md +85 -462
  22. package/templates/commands/business-analyse/3-analyse.md +40 -342
  23. package/templates/commands/business-analyse/4-specify.md +72 -537
  24. package/templates/commands/business-analyse/5-validate.md +43 -237
  25. package/templates/commands/business-analyse/6-handoff.md +93 -682
  26. package/templates/commands/business-analyse/7-doc-html.md +45 -544
  27. package/templates/commands/business-analyse/_shared.md +176 -0
  28. package/templates/commands/business-analyse/bug.md +50 -257
  29. package/templates/commands/business-analyse/change-request.md +59 -283
  30. package/templates/commands/business-analyse/hotfix.md +36 -120
  31. package/templates/commands/business-analyse.md +55 -574
  32. package/templates/commands/efcore/_shared.md +206 -0
  33. package/templates/commands/efcore/conflicts.md +39 -201
  34. package/templates/commands/efcore/db-deploy.md +28 -237
  35. package/templates/commands/efcore/db-reset.md +41 -390
  36. package/templates/commands/efcore/db-seed.md +44 -323
  37. package/templates/commands/efcore/db-status.md +31 -210
  38. package/templates/commands/efcore/migration.md +45 -368
  39. package/templates/commands/efcore/rebase-snapshot.md +38 -241
  40. package/templates/commands/efcore/scan.md +35 -204
  41. package/templates/commands/efcore/squash.md +158 -251
  42. package/templates/commands/efcore.md +49 -177
  43. package/templates/commands/gitflow/1-init.md +94 -1318
  44. package/templates/commands/gitflow/10-start.md +86 -990
  45. package/templates/commands/gitflow/11-finish.md +264 -454
  46. package/templates/commands/gitflow/12-cleanup.md +40 -213
  47. package/templates/commands/gitflow/2-status.md +51 -386
  48. package/templates/commands/gitflow/3-commit.md +108 -801
  49. package/templates/commands/gitflow/4-plan.md +42 -13
  50. package/templates/commands/gitflow/5-exec.md +60 -5
  51. package/templates/commands/gitflow/6-abort.md +54 -277
  52. package/templates/commands/gitflow/7-pull-request.md +74 -717
  53. package/templates/commands/gitflow/8-review.md +51 -178
  54. package/templates/commands/gitflow/9-merge.md +74 -404
  55. package/templates/commands/gitflow/_shared.md +196 -0
  56. package/templates/commands/quickstart.md +154 -0
  57. package/templates/commands/ralph-loop/ralph-loop.md +104 -2
  58. package/templates/hooks/hooks.json +13 -0
  59. package/templates/hooks/ralph-mcp-logger.sh +46 -0
  60. package/templates/hooks/ralph-session-end.sh +69 -0
  61. package/templates/ralph/README.md +91 -0
  62. package/templates/ralph/ralph.config.yaml +113 -0
  63. package/templates/scripts/setup-ralph-loop.sh +173 -0
  64. package/templates/skills/_shared.md +117 -0
  65. package/templates/skills/ai-prompt/SKILL.md +87 -654
  66. package/templates/skills/application/SKILL.md +76 -499
  67. package/templates/skills/controller/SKILL.md +38 -165
  68. package/templates/skills/documentation/SKILL.md +2 -1
  69. package/templates/skills/feature-full/SKILL.md +107 -732
  70. package/templates/skills/notification/SKILL.md +85 -474
  71. package/templates/skills/ui-components/SKILL.md +62 -762
  72. package/templates/skills/workflow/SKILL.md +85 -489
  73. package/templates/commands/gitflow/rescue.md +0 -867
  74. package/templates/skills/business-analyse/SKILL.md +0 -191
@@ -4,190 +4,91 @@ agent: gitflow-cleanup
4
4
  model: sonnet
5
5
  ---
6
6
 
7
- # Phase 12: CLEANUP - Audit et nettoyage des worktrees
8
-
9
- Tu es expert GitFlow. Audite et nettoie les worktrees orphelins ou obsoletes.
7
+ # Phase 12: CLEANUP - Audit et nettoyage worktrees
10
8
 
11
9
  **Argument:** `$ARGUMENTS` = options (--dry-run, --force, --stale-days=N)
12
10
 
13
- ---
11
+ > **Ref:** Fonction `cleanup_worktree_for_branch()` dans [_shared.md](_shared.md)
14
12
 
15
- ## Prerequis
13
+ ---
16
14
 
17
- **IMPORTANT:** Cette commande doit etre executee depuis `main` ou `develop` uniquement.
15
+ ## Prérequis
18
16
 
19
17
  ```bash
20
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
21
- if [[ "$CURRENT_BRANCH" != "main" && "$CURRENT_BRANCH" != "develop" ]]; then
22
- echo "⚠️ ERREUR: Cette commande doit etre executee depuis main ou develop"
23
- echo "Branche courante: $CURRENT_BRANCH"
24
- echo ""
25
- echo "Executez: git checkout develop && /gitflow:12-cleanup"
18
+ CURRENT=$(git rev-parse --abbrev-ref HEAD)
19
+ [[ "$CURRENT" != "main" && "$CURRENT" != "develop" ]] && {
20
+ echo "⚠️ Exécuter depuis main ou develop"
26
21
  exit 1
27
- fi
22
+ }
28
23
  ```
29
24
 
30
25
  ---
31
26
 
32
27
  ## Workflow
33
28
 
34
- ### 1. Collecter les informations
29
+ ### 1. Collecter
35
30
 
36
31
  ```bash
37
- # Lister tous les worktrees
38
32
  git worktree list --porcelain
39
-
40
- # Lister toutes les branches locales
41
33
  git branch -a
42
-
43
- # Lister les branches remote
44
34
  git fetch --prune
45
- git branch -r
46
35
  ```
47
36
 
48
37
  ### 2. Analyser chaque worktree
49
38
 
50
- Pour chaque worktree detecte:
39
+ | Vérification | Status |
40
+ |--------------|--------|
41
+ | Branche existe localement | ✓ Active / ✗ Orphelin |
42
+ | Branche existe sur remote | ✓ Trackée / ✗ Locale only |
43
+ | Dernière activité | Date dernier commit |
44
+ | Modifications | ✓ Clean / ⚠️ Dirty |
51
45
 
52
- | Verification | Condition | Status |
53
- |--------------|-----------|--------|
54
- | Branche existe localement | `git branch --list $BRANCH` | ✓ Active / ✗ Orphelin |
55
- | Branche existe sur remote | `git branch -r --list origin/$BRANCH` | ✓ Trackee / ✗ Locale only |
56
- | Derniere activite | `git log -1 --format=%ci $BRANCH` | Date dernier commit |
57
- | Modifications non commitees | `git -C $WORKTREE status --porcelain` | ✓ Clean / ⚠️ Dirty |
58
-
59
- ### 3. Categoriser les worktrees
46
+ ### 3. Catégoriser
60
47
 
61
48
  ```
62
49
  AUDIT WORKTREES
63
- ═══════════════════════════════════════════════════════════════
64
-
65
- 📁 Worktrees permanents (proteges):
66
- ../worktrees/main → main
67
- ../worktrees/develop → develop
68
-
69
- 📁 Worktrees actifs:
70
- ✓ ../worktrees/features/xxx → feature/xxx (3 jours)
71
- ✓ ../worktrees/releases/v2 → release/v2.0.0 (1 jour)
72
-
73
- ⚠️ Worktrees orphelins (branche supprimee):
74
- ✗ ../worktrees/features/old → feature/old (BRANCHE INEXISTANTE)
75
- ✗ ../worktrees/hotfixes/fix → hotfix/fix (BRANCHE INEXISTANTE)
76
-
77
- ⏰ Worktrees stale (inactifs > {N} jours):
78
- ⚠ ../worktrees/features/abc → feature/abc (45 jours sans commit)
79
-
80
- 💾 Worktrees dirty (modifications non commitees):
81
- ⚠ ../worktrees/features/wip → feature/wip (fichiers modifies)
82
-
83
- ═══════════════════════════════════════════════════════════════
50
+ ───────────────────────────────────
51
+ 📁 Permanents: main, develop (protégés)
52
+ 📁 Actifs: feature/xxx (3 jours)
53
+ ⚠️ Orphelins: feature/old (BRANCHE INEXISTANTE)
54
+ Stale: feature/abc (45 jours)
55
+ 💾 Dirty: feature/wip (non committés)
84
56
  ```
85
57
 
86
58
  ---
87
59
 
88
- ## Actions proposees
89
-
90
- ### Mode par defaut (interactif)
91
-
92
- ```
93
- ACTIONS PROPOSEES
94
- ═══════════════════════════════════════════════════════════════
60
+ ## Actions
95
61
 
96
- Orphelins a supprimer:
97
- [1] ../worktrees/features/old (branche inexistante)
98
- [2] ../worktrees/hotfixes/fix (branche inexistante)
99
-
100
- Stale a examiner (> 30 jours):
101
- [3] ../worktrees/features/abc (45 jours)
102
-
103
- Options:
104
- [A] Supprimer tous les orphelins
105
- [S] Supprimer tous les stale
106
- [1-N] Supprimer individuellement
107
- [D] Details sur un worktree
108
- [Q] Quitter sans action
109
-
110
- Choix: _
111
- ═══════════════════════════════════════════════════════════════
112
- ```
113
-
114
- ### Mode --dry-run
115
-
116
- Affiche uniquement l'audit sans proposer d'actions.
117
-
118
- ### Mode --force
119
-
120
- Supprime automatiquement tous les orphelins sans confirmation.
121
-
122
- ---
123
-
124
- ## Suppression d'un worktree
62
+ ### Suppression worktree
125
63
 
126
64
  ```bash
127
- # Verifier si dirty
128
- if [ -n "$(git -C $WORKTREE_PATH status --porcelain)" ]; then
129
- echo "⚠️ Worktree dirty - modifications non commitees"
130
- echo "Utilisez --force pour supprimer quand meme"
65
+ [ -z "$(git -C $WORKTREE_PATH status --porcelain)" ] || {
66
+ echo "⚠️ Dirty - utiliser --force"
131
67
  exit 1
132
- fi
133
-
134
- # Supprimer le worktree
68
+ }
135
69
  git worktree remove "$WORKTREE_PATH" --force
136
-
137
- # Nettoyer le dossier si reste
138
- rm -rf "$WORKTREE_PATH" 2>/dev/null || true
139
-
140
- # Pruner les worktrees
70
+ rm -rf "$WORKTREE_PATH" 2>/dev/null
141
71
  git worktree prune
142
72
  ```
143
73
 
144
- ---
145
-
146
- ## Detection des dossiers orphelins
147
-
148
- En plus des worktrees git, detecter les dossiers qui ne sont plus lies:
74
+ ### Détection dossiers orphelins
149
75
 
150
76
  ```bash
151
- # Lister les worktrees connus
152
- KNOWN_WORKTREES=$(git worktree list --porcelain | grep "^worktree " | sed 's/worktree //')
153
-
154
- # Scanner les dossiers de worktrees
155
- WORKTREE_BASE="../worktrees"
156
- for TYPE in features releases hotfixes; do
157
- for DIR in "$WORKTREE_BASE/$TYPE"/*; do
158
- if [ -d "$DIR" ]; then
159
- # Verifier si c'est un worktree connu
160
- if ! echo "$KNOWN_WORKTREES" | grep -q "$DIR"; then
161
- echo "⚠️ Dossier orphelin: $DIR"
162
- fi
163
- fi
164
- done
77
+ KNOWN=$(git worktree list --porcelain | grep "^worktree " | sed 's/worktree //')
78
+ for DIR in ../worktrees/{features,releases,hotfixes}/*; do
79
+ echo "$KNOWN" | grep -q "$DIR" || echo "⚠️ Orphelin: $DIR"
165
80
  done
166
81
  ```
167
82
 
168
83
  ---
169
84
 
170
- ## Resume final
85
+ ## Résumé
171
86
 
172
87
  ```
173
88
  CLEANUP COMPLETE
174
- ═══════════════════════════════════════════════════════════════
175
-
176
- Worktrees analyses: {total}
177
- Permanents (proteges): {n_permanent}
178
- Actifs: {n_active}
179
- Supprimes: {n_deleted}
180
- - Orphelins: {n_orphan}
181
- - Stale: {n_stale}
182
- Ignores (dirty): {n_dirty}
183
-
184
- Espace libere: ~{size} MB
185
-
186
- Dossiers orphelins: {n_orphan_dirs}
187
- - Supprimes: {n_orphan_dirs_deleted}
188
-
189
- ═══════════════════════════════════════════════════════════════
190
- Environnement propre!
89
+ - Analysés: {total} | Supprimés: {n}
90
+ - Orphelins: {n} | Stale: {n}
91
+ - Espace libéré: ~{size} MB
191
92
  ```
192
93
 
193
94
  ---
@@ -196,81 +97,7 @@ Environnement propre!
196
97
 
197
98
  | Commande | Action |
198
99
  |----------|--------|
199
- | `/gitflow:12-cleanup` | Audit interactif avec propositions |
200
- | `/gitflow:12-cleanup --dry-run` | Audit seul, aucune action |
201
- | `/gitflow:12-cleanup --force` | Supprime tous les orphelins automatiquement |
202
- | `/gitflow:12-cleanup --stale-days=30` | Seuil pour worktrees stale (defaut: 30) |
203
- | `/gitflow:12-cleanup --include-stale` | Inclut les stale dans la suppression auto |
204
- | `/gitflow:12-cleanup --verbose` | Affiche les details de chaque worktree |
205
-
206
- ---
207
-
208
- ## Integration automatique
209
-
210
- Cette commande est appelee automatiquement par:
211
- - `/gitflow:11-finish` → Apres finalisation d'une branche
212
- - `/gitflow:6-abort --branch` → Apres abandon d'une branche
213
-
214
- Dans ces cas, seul le worktree de la branche concernee est nettoye (cleanup cible).
215
-
216
- ---
217
-
218
- ## Cleanup cible (usage interne)
219
-
220
- Quand appelee depuis finish/abort avec une branche specifique:
221
-
222
- ```bash
223
- # Usage interne
224
- cleanup_worktree_for_branch() {
225
- BRANCH=$1
226
- WORKTREE_BASE="../worktrees"
227
-
228
- # Determiner le chemin selon le type
229
- if [[ $BRANCH == feature/* ]]; then
230
- NAME=${BRANCH#feature/}
231
- WORKTREE_PATH="$WORKTREE_BASE/features/$NAME"
232
- elif [[ $BRANCH == release/* ]]; then
233
- VERSION=${BRANCH#release/}
234
- WORKTREE_PATH="$WORKTREE_BASE/releases/$VERSION"
235
- elif [[ $BRANCH == hotfix/* ]]; then
236
- NAME=${BRANCH#hotfix/}
237
- WORKTREE_PATH="$WORKTREE_BASE/hotfixes/$NAME"
238
- fi
239
-
240
- # Supprimer si existe
241
- if [ -d "$WORKTREE_PATH" ]; then
242
- git worktree remove "$WORKTREE_PATH" --force 2>/dev/null || true
243
- rm -rf "$WORKTREE_PATH" 2>/dev/null || true
244
- git worktree prune
245
- echo "✓ Worktree nettoye: $WORKTREE_PATH"
246
- fi
247
- }
248
- ```
249
-
250
- ---
251
-
252
- ## Logs
253
-
254
- Chaque cleanup est logue dans `.claude/gitflow/logs/cleanup_{timestamp}.json`:
255
-
256
- ```json
257
- {
258
- "timestamp": "{ISO_DATE}",
259
- "type": "cleanup",
260
- "mode": "interactive|dry-run|force|targeted",
261
- "branch": "{main|develop}",
262
- "worktrees": {
263
- "analyzed": {n},
264
- "deleted": [
265
- { "path": "...", "branch": "...", "reason": "orphan|stale" }
266
- ],
267
- "skipped": [
268
- { "path": "...", "branch": "...", "reason": "dirty|active|permanent" }
269
- ]
270
- },
271
- "orphan_dirs": {
272
- "found": {n},
273
- "deleted": {n}
274
- }
275
- }
276
- ```
100
+ | `/gitflow:12-cleanup` | Audit interactif |
101
+ | `/gitflow:12-cleanup --dry-run` | Audit seul |
102
+ | `/gitflow:12-cleanup --force` | Supprime orphelins auto |
103
+ | `/gitflow:12-cleanup --stale-days=30` | Seuil stale |