@atlashub/smartstack-cli 1.10.2 → 1.12.0
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/.documentation/agents.html +7 -2
- package/.documentation/apex.html +7 -2
- package/.documentation/business-analyse.html +7 -2
- package/.documentation/cli-commands.html +871 -0
- package/.documentation/commands.html +7 -2
- package/.documentation/efcore.html +7 -2
- package/.documentation/gitflow.html +7 -2
- package/.documentation/hooks.html +7 -2
- package/.documentation/index.html +7 -2
- package/.documentation/init.html +7 -2
- package/.documentation/installation.html +7 -2
- package/.documentation/ralph-loop.html +7 -2
- package/.documentation/test-web.html +7 -2
- package/dist/index.js +1932 -336
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/templates/agents/efcore/squash.md +67 -31
- package/templates/agents/gitflow/finish.md +68 -56
- package/templates/commands/business-analyse/0-orchestrate.md +72 -556
- package/templates/commands/business-analyse/1-init.md +23 -193
- package/templates/commands/business-analyse/2-discover.md +85 -462
- package/templates/commands/business-analyse/3-analyse.md +40 -342
- package/templates/commands/business-analyse/4-specify.md +72 -537
- package/templates/commands/business-analyse/5-validate.md +43 -237
- package/templates/commands/business-analyse/6-handoff.md +93 -682
- package/templates/commands/business-analyse/7-doc-html.md +45 -544
- package/templates/commands/business-analyse/_shared.md +176 -0
- package/templates/commands/business-analyse/bug.md +50 -257
- package/templates/commands/business-analyse/change-request.md +59 -283
- package/templates/commands/business-analyse/hotfix.md +36 -120
- package/templates/commands/business-analyse.md +55 -574
- package/templates/commands/efcore/_shared.md +206 -0
- package/templates/commands/efcore/conflicts.md +39 -201
- package/templates/commands/efcore/db-deploy.md +28 -237
- package/templates/commands/efcore/db-reset.md +41 -390
- package/templates/commands/efcore/db-seed.md +44 -323
- package/templates/commands/efcore/db-status.md +31 -210
- package/templates/commands/efcore/migration.md +45 -368
- package/templates/commands/efcore/rebase-snapshot.md +38 -241
- package/templates/commands/efcore/scan.md +35 -204
- package/templates/commands/efcore/squash.md +158 -251
- package/templates/commands/efcore.md +49 -177
- package/templates/commands/gitflow/1-init.md +94 -1318
- package/templates/commands/gitflow/10-start.md +86 -990
- package/templates/commands/gitflow/11-finish.md +264 -454
- package/templates/commands/gitflow/12-cleanup.md +40 -213
- package/templates/commands/gitflow/2-status.md +51 -386
- package/templates/commands/gitflow/3-commit.md +108 -801
- package/templates/commands/gitflow/4-plan.md +42 -13
- package/templates/commands/gitflow/5-exec.md +60 -5
- package/templates/commands/gitflow/6-abort.md +54 -277
- package/templates/commands/gitflow/7-pull-request.md +74 -717
- package/templates/commands/gitflow/8-review.md +51 -178
- package/templates/commands/gitflow/9-merge.md +74 -404
- package/templates/commands/gitflow/_shared.md +196 -0
- package/templates/commands/quickstart.md +154 -0
- package/templates/commands/ralph-loop/ralph-loop.md +104 -2
- package/templates/hooks/hooks.json +13 -0
- package/templates/hooks/ralph-mcp-logger.sh +46 -0
- package/templates/hooks/ralph-session-end.sh +69 -0
- package/templates/ralph/README.md +91 -0
- package/templates/ralph/ralph.config.yaml +113 -0
- package/templates/scripts/setup-ralph-loop.sh +173 -0
- package/templates/skills/_shared.md +117 -0
- package/templates/skills/ai-prompt/SKILL.md +87 -654
- package/templates/skills/application/SKILL.md +76 -499
- package/templates/skills/controller/SKILL.md +38 -165
- package/templates/skills/documentation/SKILL.md +2 -1
- package/templates/skills/feature-full/SKILL.md +107 -732
- package/templates/skills/notification/SKILL.md +85 -474
- package/templates/skills/ui-components/SKILL.md +62 -762
- package/templates/skills/workflow/SKILL.md +85 -489
- package/templates/commands/gitflow/rescue.md +0 -867
- package/templates/skills/business-analyse/SKILL.md +0 -191
|
@@ -4,164 +4,78 @@ description: EF Core Commands - Migration and database management
|
|
|
4
4
|
|
|
5
5
|
# EF Core Commands
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **Ref:** Fonctions communes dans [efcore/_shared.md](efcore/_shared.md)
|
|
8
|
+
> **MCP:** `mcp__smartstack__check_migrations` pour analyse conflits
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
---
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## Commandes Disponibles
|
|
12
13
|
|
|
13
14
|
### Migrations
|
|
14
15
|
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
| `/efcore:migration` |
|
|
18
|
-
| `/efcore:db-status` |
|
|
19
|
-
| `/efcore:db-deploy` |
|
|
20
|
-
| `/efcore:db-seed` |
|
|
21
|
-
| `/efcore:db-reset` | Drop + Recreate
|
|
22
|
-
|
|
23
|
-
### Cross-Branch (v1.2)
|
|
24
|
-
|
|
25
|
-
| Command | Description | Risk |
|
|
26
|
-
|---------|-------------|------|
|
|
27
|
-
| `/efcore:scan` | Scan migrations across all branches | None (read-only) |
|
|
28
|
-
| `/efcore:conflicts` | Analyze potential conflicts (BLOCKING) | None (read-only) |
|
|
29
|
-
| `/efcore:rebase-snapshot` | Rebase ModelSnapshot on develop | Medium |
|
|
30
|
-
| `/efcore:squash` | Merge multiple migrations into one | **HIGH** |
|
|
31
|
-
|
|
32
|
-
## Golden Rule: 1 Migration per Feature
|
|
16
|
+
| Commande | Description | Risque |
|
|
17
|
+
|----------|-------------|--------|
|
|
18
|
+
| `/efcore:migration` | Créer/recréer migration (1 par feature) | Low |
|
|
19
|
+
| `/efcore:db-status` | Afficher statut migrations | None |
|
|
20
|
+
| `/efcore:db-deploy` | Appliquer migrations | Low |
|
|
21
|
+
| `/efcore:db-seed` | Peupler avec données | Low |
|
|
22
|
+
| `/efcore:db-reset` | Drop + Recreate DB | **HIGH** |
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
1. Delete the existing migration
|
|
36
|
-
2. Recreate it with `/efcore:migration`
|
|
24
|
+
### Cross-Branch
|
|
37
25
|
|
|
38
|
-
|
|
26
|
+
| Commande | Description | Risque |
|
|
27
|
+
|----------|-------------|--------|
|
|
28
|
+
| `/efcore:scan` | Scanner toutes les branches | None |
|
|
29
|
+
| `/efcore:conflicts` | Analyser conflits (BLOQUANT) | None |
|
|
30
|
+
| `/efcore:rebase-snapshot` | Rebaser ModelSnapshot sur develop | Medium |
|
|
31
|
+
| `/efcore:squash` | Fusionner migrations | **HIGH** |
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
---
|
|
41
34
|
|
|
42
|
-
|
|
35
|
+
## Règle d'Or: 1 Migration par Feature
|
|
43
36
|
|
|
44
|
-
|
|
45
|
-
|---------|---------|----------|-------------|----------------|
|
|
46
|
-
| core | 1.2.0 | 001 | AddUserRoles | `core_v1.2.0_001_AddUserRoles` |
|
|
47
|
-
| core | 1.2.0 | 002 | AddPermissions | `core_v1.2.0_002_AddPermissions` |
|
|
48
|
-
| extensions | 1.3.0 | 001 | AddCustomFields | `extensions_v1.3.0_001_AddCustomFields` |
|
|
37
|
+
Si modification du modèle: supprimer et recréer la migration.
|
|
49
38
|
|
|
50
|
-
|
|
39
|
+
---
|
|
51
40
|
|
|
52
|
-
##
|
|
41
|
+
## Workflow Typique
|
|
53
42
|
|
|
54
43
|
```
|
|
55
|
-
1. /gitflow:10-start feature xxx →
|
|
56
|
-
2. /efcore:db-deploy →
|
|
57
|
-
3. ...
|
|
58
|
-
4. /efcore:migration →
|
|
59
|
-
5. /efcore:db-deploy →
|
|
44
|
+
1. /gitflow:10-start feature xxx → Worktree + appsettings.Local.json
|
|
45
|
+
2. /efcore:db-deploy → Appliquer migrations existantes
|
|
46
|
+
3. ... modifications modèle ...
|
|
47
|
+
4. /efcore:migration → Créer LA migration
|
|
48
|
+
5. /efcore:db-deploy → Appliquer localement
|
|
60
49
|
6. /gitflow:3-commit → Commit
|
|
61
50
|
```
|
|
62
51
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
With GitFlow worktrees, multiple branches can have migrations in parallel. To avoid conflicts:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
1. /efcore:scan → Scan all active branches
|
|
69
|
-
2. /efcore:conflicts → Check for conflicts (BLOCKING)
|
|
70
|
-
3. /efcore:rebase-snapshot → If conflict, rebase on develop
|
|
71
|
-
4. /efcore:migration → Create/recreate migration
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Recommended Merge Order
|
|
75
|
-
|
|
76
|
-
The scan analyzes migrations and recommends a merge order:
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
ACTIVE BRANCHES (3)
|
|
80
|
-
--------------------
|
|
81
|
-
feature/user-roles +1 migration Conflict: NONE
|
|
82
|
-
feature/add-products +1 migration Conflict: POTENTIAL
|
|
83
|
-
feature/orders +2 migrations Conflict: HIGH
|
|
84
|
-
|
|
85
|
-
RECOMMENDED MERGE ORDER:
|
|
86
|
-
1. feature/user-roles (independent)
|
|
87
|
-
2. feature/add-products (before orders)
|
|
88
|
-
3. feature/orders (rebase required)
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## Configuration
|
|
92
|
-
|
|
93
|
-
Commands use configuration in `.claude/gitflow/config.json`:
|
|
94
|
-
|
|
95
|
-
```json
|
|
96
|
-
{
|
|
97
|
-
"efcore": {
|
|
98
|
-
"database": {
|
|
99
|
-
"configFile": "appsettings.Local.json",
|
|
100
|
-
"connectionStringName": "DefaultConnection",
|
|
101
|
-
"provider": "SqlServer"
|
|
102
|
-
},
|
|
103
|
-
"crossBranch": {
|
|
104
|
-
"enabled": true,
|
|
105
|
-
"scanOnMigrationCreate": true,
|
|
106
|
-
"blockOnConflict": true,
|
|
107
|
-
"cacheExpiry": 300
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
### crossBranch Options
|
|
114
|
-
|
|
115
|
-
| Option | Description | Default |
|
|
116
|
-
|--------|-------------|---------|
|
|
117
|
-
| `enabled` | Enable cross-branch validation | `true` |
|
|
118
|
-
| `scanOnMigrationCreate` | Scan before `/efcore:migration` | `true` |
|
|
119
|
-
| `blockOnConflict` | Block if conflict detected | `true` |
|
|
120
|
-
| `cacheExpiry` | Scan cache duration (seconds) | `300` |
|
|
121
|
-
|
|
122
|
-
## Environment Selection (NEW)
|
|
52
|
+
---
|
|
123
53
|
|
|
124
|
-
|
|
54
|
+
## Workflow Cross-Branch
|
|
125
55
|
|
|
126
56
|
```
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
FICHIERS DISPONIBLES:
|
|
132
|
-
- appsettings.json
|
|
133
|
-
- appsettings.Local.json
|
|
134
|
-
- appsettings.Development.json
|
|
135
|
-
|
|
136
|
-
ENVIRONNEMENT: appsettings.Local.json
|
|
137
|
-
|
|
138
|
-
CONNEXION CIBLE:
|
|
139
|
-
Server: localhost
|
|
140
|
-
Database: SmartStack_Dev
|
|
141
|
-
String: Server=localhost;Database=SmartStack_Dev;...
|
|
142
|
-
|
|
143
|
-
================================================================================
|
|
57
|
+
1. /efcore:scan → Scanner branches actives
|
|
58
|
+
2. /efcore:conflicts → Vérifier conflits (BLOQUANT)
|
|
59
|
+
3. /efcore:rebase-snapshot → Si conflit, rebaser sur develop
|
|
60
|
+
4. /efcore:migration → Créer/recréer migration
|
|
144
61
|
```
|
|
145
62
|
|
|
146
|
-
|
|
63
|
+
---
|
|
147
64
|
|
|
148
|
-
|
|
65
|
+
## Sélection Environnement
|
|
149
66
|
|
|
150
|
-
|
|
151
|
-
# Deploy to Development environment
|
|
152
|
-
/efcore:db-deploy --env Development
|
|
67
|
+
Toutes les commandes affichent la base cible AVANT exécution.
|
|
153
68
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
69
|
+
| Priorité | Fichier |
|
|
70
|
+
|----------|---------|
|
|
71
|
+
| 1 | `--env {Environment}` flag |
|
|
72
|
+
| 2 | `appsettings.Local.json` (défaut) |
|
|
157
73
|
|
|
158
|
-
|
|
74
|
+
**Protection:** Commandes destructives bloquées si Production détecté.
|
|
159
75
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
## appsettings.Local.json File
|
|
76
|
+
---
|
|
163
77
|
|
|
164
|
-
|
|
78
|
+
## appsettings.Local.json
|
|
165
79
|
|
|
166
80
|
```json
|
|
167
81
|
{
|
|
@@ -171,54 +85,12 @@ This file contains the local connection string and is **never committed**:
|
|
|
171
85
|
}
|
|
172
86
|
```
|
|
173
87
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
## Prerequisites
|
|
177
|
-
|
|
178
|
-
- .NET SDK installed
|
|
179
|
-
- EF Core Tools: `dotnet tool install --global dotnet-ef`
|
|
180
|
-
- SQL Server (or other configured provider)
|
|
88
|
+
Créé automatiquement par `/gitflow:10-start`, ajouté à `.gitignore`.
|
|
181
89
|
|
|
182
90
|
---
|
|
183
91
|
|
|
184
|
-
##
|
|
185
|
-
|
|
186
|
-
The following commands use **SmartStack MCP** for enhanced functionality:
|
|
92
|
+
## Prérequis
|
|
187
93
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
| `/efcore:conflicts` | `check_migrations` | Analyze branch conflicts |
|
|
192
|
-
| `/efcore:scan` | `check_migrations` | Multi-branch analysis |
|
|
193
|
-
|
|
194
|
-
### MCP Tool Reference
|
|
195
|
-
|
|
196
|
-
**Tool:** `mcp__smartstack__check_migrations`
|
|
197
|
-
|
|
198
|
-
**Description:** Analyze EF Core migrations for conflicts, ordering issues, and ModelSnapshot discrepancies between branches.
|
|
199
|
-
|
|
200
|
-
**Parameters:**
|
|
201
|
-
|
|
202
|
-
| Parameter | Type | Description |
|
|
203
|
-
|-----------|------|-------------|
|
|
204
|
-
| `projectPath` | string | EF Core project path (default: auto-detect) |
|
|
205
|
-
| `branch` | string | Git branch to check (default: current) |
|
|
206
|
-
| `compareBranch` | string | Branch to compare against |
|
|
207
|
-
|
|
208
|
-
**Response:** `MigrationCheckResult`
|
|
209
|
-
|
|
210
|
-
```typescript
|
|
211
|
-
interface MigrationCheckResult {
|
|
212
|
-
hasConflicts: boolean;
|
|
213
|
-
migrations: MigrationInfo[];
|
|
214
|
-
conflicts: MigrationConflict[];
|
|
215
|
-
suggestions: string[];
|
|
216
|
-
}
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Benefits of MCP Integration
|
|
220
|
-
|
|
221
|
-
1. **Consistency:** Same analysis logic in CLI, CI/CD, and IDE
|
|
222
|
-
2. **Structured Data:** Typed responses instead of text parsing
|
|
223
|
-
3. **Single Source of Truth:** Convention rules in MCP config
|
|
224
|
-
4. **Extensibility:** New checks benefit all commands
|
|
94
|
+
- .NET SDK installé
|
|
95
|
+
- EF Core Tools: `dotnet tool install --global dotnet-ef`
|
|
96
|
+
- SQL Server (ou provider configuré)
|