@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.
- 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
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
# EF Core - Fonctions Partagées
|
|
2
|
+
|
|
3
|
+
> **Usage:** Référencé par toutes les commandes EF Core
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Détection Projet EF Core
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
detect_efcore_project() {
|
|
11
|
+
CSPROJ=$(find . -name "*.csproj" -exec grep -l "Microsoft.EntityFrameworkCore" {} \; | head -1)
|
|
12
|
+
PROJECT_DIR=$(dirname "$CSPROJ")
|
|
13
|
+
PROJECT_NAME=$(basename "$CSPROJ" .csproj)
|
|
14
|
+
MIGRATIONS_DIR="$PROJECT_DIR/Migrations"
|
|
15
|
+
|
|
16
|
+
STARTUP_PROJECT=$(find . -name "*.Api.csproj" -o -name "*Web.csproj" | head -1)
|
|
17
|
+
INFRA_PROJECT=$(find . -name "*Infrastructure.csproj" | head -1)
|
|
18
|
+
[ -z "$INFRA_PROJECT" ] && INFRA_PROJECT="$CSPROJ"
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Détection Environnement
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
detect_environment() {
|
|
28
|
+
API_DIR=$(find . -type d -name "*.Api" | head -1)
|
|
29
|
+
[ -z "$API_DIR" ] && API_DIR="src/SmartStack.Api"
|
|
30
|
+
|
|
31
|
+
# Priorité: --env flag > appsettings.Local.json > erreur
|
|
32
|
+
if [ -n "$ENV_FLAG" ]; then
|
|
33
|
+
SELECTED_ENV="appsettings.${ENV_FLAG}.json"
|
|
34
|
+
elif [ -f "$API_DIR/appsettings.Local.json" ]; then
|
|
35
|
+
SELECTED_ENV="appsettings.Local.json"
|
|
36
|
+
else
|
|
37
|
+
echo "ERROR: Aucun appsettings trouvé"; exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Extraire connection string
|
|
41
|
+
CONNECTION_STRING=$(powershell -Command "
|
|
42
|
+
\$json = Get-Content '$API_DIR/$SELECTED_ENV' | ConvertFrom-Json
|
|
43
|
+
\$json.ConnectionStrings.DefaultConnection
|
|
44
|
+
")
|
|
45
|
+
DATABASE_NAME=$(echo "$CONNECTION_STRING" | grep -oP 'Database=\K[^;]+')
|
|
46
|
+
SERVER_NAME=$(echo "$CONNECTION_STRING" | grep -oP 'Server=\K[^;]+')
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Protection Production
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
block_production() {
|
|
56
|
+
if [[ "$SELECTED_ENV" == *"Production"* ]]; then
|
|
57
|
+
echo "BLOQUÉ: Environnement Production détecté"
|
|
58
|
+
echo "Utilisez un environnement non-production"
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Détermination Branche Parente
|
|
67
|
+
|
|
68
|
+
**Règle d'or:** Le ModelSnapshot de référence doit venir de la branche parente (état validé).
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
determine_base_branch() {
|
|
72
|
+
CURRENT_BRANCH=$(git branch --show-current)
|
|
73
|
+
|
|
74
|
+
# Lire config GitFlow si disponible
|
|
75
|
+
CONFIG_FILE=".claude/gitflow/config.json"
|
|
76
|
+
GF_MAIN=$(grep -oP '"main":\s*"\K[^"]+' "$CONFIG_FILE" 2>/dev/null || echo "main")
|
|
77
|
+
GF_DEVELOP=$(grep -oP '"develop":\s*"\K[^"]+' "$CONFIG_FILE" 2>/dev/null || echo "develop")
|
|
78
|
+
|
|
79
|
+
case "$CURRENT_BRANCH" in
|
|
80
|
+
feature/*|bugfix/*)
|
|
81
|
+
BASE_BRANCH="$GF_DEVELOP"
|
|
82
|
+
BRANCH_TYPE="feature"
|
|
83
|
+
;;
|
|
84
|
+
develop)
|
|
85
|
+
BASE_BRANCH="$GF_MAIN"
|
|
86
|
+
BRANCH_TYPE="develop"
|
|
87
|
+
;;
|
|
88
|
+
release/*)
|
|
89
|
+
BASE_BRANCH="$GF_MAIN"
|
|
90
|
+
BRANCH_TYPE="release"
|
|
91
|
+
;;
|
|
92
|
+
hotfix/*)
|
|
93
|
+
BASE_BRANCH="$GF_MAIN"
|
|
94
|
+
BRANCH_TYPE="hotfix"
|
|
95
|
+
;;
|
|
96
|
+
main|master)
|
|
97
|
+
echo "❌ BLOQUÉ: Opération interdite sur $CURRENT_BRANCH"
|
|
98
|
+
exit 1
|
|
99
|
+
;;
|
|
100
|
+
*)
|
|
101
|
+
echo "⚠️ Branche non reconnue: $CURRENT_BRANCH"
|
|
102
|
+
echo "→ Utilisation de $GF_DEVELOP comme référence par défaut"
|
|
103
|
+
BASE_BRANCH="$GF_DEVELOP"
|
|
104
|
+
BRANCH_TYPE="unknown"
|
|
105
|
+
;;
|
|
106
|
+
esac
|
|
107
|
+
|
|
108
|
+
# Vérifier que la branche parente existe
|
|
109
|
+
if ! git rev-parse --verify "origin/$BASE_BRANCH" >/dev/null 2>&1; then
|
|
110
|
+
echo "❌ Branche parente '$BASE_BRANCH' introuvable sur origin"
|
|
111
|
+
exit 1
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
echo "Branche parente: $BASE_BRANCH"
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
| Branche courante | Branche parente | Raison |
|
|
119
|
+
|------------------|-----------------|--------|
|
|
120
|
+
| `feature/*` | `develop` | État validé de develop |
|
|
121
|
+
| `bugfix/*` | `develop` | État validé de develop |
|
|
122
|
+
| `develop` | `main` | État en production |
|
|
123
|
+
| `release/*` | `main` | État en production |
|
|
124
|
+
| `hotfix/*` | `main` | État en production |
|
|
125
|
+
| `main/master` | **BLOQUÉ** | Jamais squash sur branche protégée |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Convention Nommage Migration
|
|
130
|
+
|
|
131
|
+
Pattern: `{context}_v{version}_{sequence}_{Description}`
|
|
132
|
+
|
|
133
|
+
| Contexte | Version | Séquence | Description | Exemple |
|
|
134
|
+
|----------|---------|----------|-------------|---------|
|
|
135
|
+
| core | 1.2.0 | 001 | AddUserRoles | `core_v1.2.0_001_AddUserRoles` |
|
|
136
|
+
| extensions | 1.3.0 | 001 | AddCustomFields | `extensions_v1.3.0_001_AddCustomFields` |
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Règle d'Or: 1 Migration par Feature
|
|
141
|
+
|
|
142
|
+
**Ne jamais accumuler plusieurs migrations sur une feature.** Si modification du modèle:
|
|
143
|
+
1. Supprimer la migration existante
|
|
144
|
+
2. Recréer avec `/efcore:migration`
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Règles de Conformité
|
|
149
|
+
|
|
150
|
+
| ❌ INTERDIT | ✅ OBLIGATOIRE |
|
|
151
|
+
|-------------|----------------|
|
|
152
|
+
| Scripts SQL (.sql) dans le repo | `dotnet ef database update` |
|
|
153
|
+
| `sqlcmd` avec SQL brut | `dotnet ef migrations add` |
|
|
154
|
+
| `migrationBuilder.Sql()` INSERT | `HasData()` pour seeding |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## MCP Tool Reference
|
|
159
|
+
|
|
160
|
+
**Tool:** `mcp__smartstack__check_migrations`
|
|
161
|
+
|
|
162
|
+
| Paramètre | Type | Description |
|
|
163
|
+
|-----------|------|-------------|
|
|
164
|
+
| `projectPath` | string | Chemin projet EF Core (auto-detect) |
|
|
165
|
+
| `branch` | string | Branche Git (current) |
|
|
166
|
+
| `compareBranch` | string | Branche de comparaison |
|
|
167
|
+
|
|
168
|
+
**Response:** `MigrationCheckResult { hasConflicts, migrations[], conflicts[], suggestions[] }`
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Niveaux de Risque Conflit
|
|
173
|
+
|
|
174
|
+
| Condition | Risque | Action |
|
|
175
|
+
|-----------|--------|--------|
|
|
176
|
+
| Snapshot = develop | NONE | Merge OK |
|
|
177
|
+
| Tables différentes | LOW | Merge OK |
|
|
178
|
+
| FK vers même table | MEDIUM | Ordre important |
|
|
179
|
+
| Même tables/colonnes | HIGH | Rebase requis |
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Configuration
|
|
184
|
+
|
|
185
|
+
`.claude/gitflow/config.json`:
|
|
186
|
+
|
|
187
|
+
```json
|
|
188
|
+
{
|
|
189
|
+
"efcore": {
|
|
190
|
+
"database": {
|
|
191
|
+
"configFile": "appsettings.Local.json",
|
|
192
|
+
"connectionStringName": "DefaultConnection"
|
|
193
|
+
},
|
|
194
|
+
"crossBranch": {
|
|
195
|
+
"enabled": true,
|
|
196
|
+
"blockOnConflict": true
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Contact Support
|
|
205
|
+
|
|
206
|
+
📧 **support@atlshub.ch**
|
|
@@ -4,43 +4,29 @@ agent: efcore-conflicts
|
|
|
4
4
|
model: sonnet
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# EF Core Conflicts
|
|
7
|
+
# EF Core Conflicts
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
|
|
13
|
-
**BEHAVIOR:** Returns exit code 1 if conflict detected (blocks merge/commit).
|
|
14
|
-
|
|
15
|
-
**INTEGRATION:** Uses `mcp__smartstack__check_migrations` for structured analysis.
|
|
9
|
+
> **Ref:** [_shared.md](_shared.md)
|
|
10
|
+
> **MCP:** `mcp__smartstack__check_migrations`
|
|
11
|
+
> **Comportement:** Exit code 1 si conflit (bloque merge/commit)
|
|
16
12
|
|
|
17
13
|
---
|
|
18
14
|
|
|
19
|
-
## STEP 1:
|
|
20
|
-
|
|
21
|
-
> **MCP INTEGRATION:** This command delegates conflict analysis to the SmartStack MCP server
|
|
22
|
-
> which provides structured, consistent analysis across all SmartStack projects.
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
CALL mcp__smartstack__check_migrations WITH:
|
|
26
|
-
- branch: {current branch}
|
|
27
|
-
- compareBranch: "develop" (or specified target)
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Claude instruction:** Use the MCP tool `mcp__smartstack__check_migrations` with parameters:
|
|
15
|
+
## STEP 1: Invoquer MCP
|
|
31
16
|
|
|
32
17
|
```json
|
|
33
18
|
{
|
|
34
|
-
"
|
|
35
|
-
"
|
|
19
|
+
"tool": "mcp__smartstack__check_migrations",
|
|
20
|
+
"parameters": {
|
|
21
|
+
"branch": "<current_branch>",
|
|
22
|
+
"compareBranch": "develop"
|
|
23
|
+
}
|
|
36
24
|
}
|
|
37
25
|
```
|
|
38
26
|
|
|
39
27
|
---
|
|
40
28
|
|
|
41
|
-
## STEP 2:
|
|
42
|
-
|
|
43
|
-
The MCP returns a structured `MigrationCheckResult`:
|
|
29
|
+
## STEP 2: Parser Réponse
|
|
44
30
|
|
|
45
31
|
```typescript
|
|
46
32
|
interface MigrationCheckResult {
|
|
@@ -49,162 +35,49 @@ interface MigrationCheckResult {
|
|
|
49
35
|
conflicts: MigrationConflict[];
|
|
50
36
|
suggestions: string[];
|
|
51
37
|
}
|
|
52
|
-
|
|
53
|
-
interface MigrationConflict {
|
|
54
|
-
type: 'order' | 'snapshot' | 'dependency' | 'naming';
|
|
55
|
-
description: string;
|
|
56
|
-
files: string[];
|
|
57
|
-
resolution: string;
|
|
58
|
-
}
|
|
59
38
|
```
|
|
60
39
|
|
|
61
40
|
---
|
|
62
41
|
|
|
63
|
-
## STEP 3:
|
|
64
|
-
|
|
65
|
-
Based on MCP response:
|
|
42
|
+
## STEP 3: Évaluer Niveau
|
|
66
43
|
|
|
67
|
-
|
|
|
68
|
-
|
|
69
|
-
| `naming` | LOW | Warning
|
|
70
|
-
| `order` | MEDIUM |
|
|
71
|
-
| `dependency` | HIGH |
|
|
72
|
-
| `snapshot` | CRITICAL |
|
|
44
|
+
| Type Conflit | Niveau | Action |
|
|
45
|
+
|--------------|--------|--------|
|
|
46
|
+
| `naming` | LOW | Warning |
|
|
47
|
+
| `order` | MEDIUM | Suggérer réordonnancement |
|
|
48
|
+
| `dependency` | HIGH | Bloquer merge |
|
|
49
|
+
| `snapshot` | CRITICAL | Bloquer, exiger rebase |
|
|
73
50
|
|
|
74
51
|
---
|
|
75
52
|
|
|
76
|
-
##
|
|
77
|
-
|
|
78
|
-
**Si aucun conflit (`hasConflicts: false`):**
|
|
53
|
+
## Résumé
|
|
79
54
|
|
|
55
|
+
**Si aucun conflit:**
|
|
80
56
|
```
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
CONTEXTE
|
|
86
|
-
-------------------------------------------------------------------------------
|
|
87
|
-
• Branche: {current_branch}
|
|
88
|
-
• Cible: develop
|
|
89
|
-
• Migrations: {count}
|
|
90
|
-
|
|
91
|
-
RÉSULTAT
|
|
92
|
-
-------------------------------------------------------------------------------
|
|
93
|
-
✓ Aucun conflit détecté
|
|
94
|
-
✓ ModelSnapshot synchronisé avec develop
|
|
95
|
-
|
|
96
|
-
===============================================================================
|
|
97
|
-
PROCHAINES ÉTAPES
|
|
98
|
-
===============================================================================
|
|
99
|
-
|
|
100
|
-
1. Continuer le développement:
|
|
101
|
-
/gitflow:3-commit
|
|
102
|
-
|
|
103
|
-
2. Quand prêt, créer une Pull Request:
|
|
104
|
-
/gitflow:7-pull-request
|
|
105
|
-
|
|
106
|
-
===============================================================================
|
|
57
|
+
CONFLICTS - {branch}
|
|
58
|
+
├── Cible: develop
|
|
59
|
+
├── Résultat: ✓ Aucun conflit
|
|
60
|
+
└── Prochains: /gitflow:3-commit, /gitflow:7-pull-request
|
|
107
61
|
```
|
|
108
62
|
|
|
109
|
-
**Si conflits
|
|
110
|
-
|
|
63
|
+
**Si conflits:**
|
|
111
64
|
```
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
-------------------------------------------------------------------------------
|
|
118
|
-
• Branche: {current_branch}
|
|
119
|
-
• Cible: develop
|
|
120
|
-
|
|
121
|
-
CONFLITS TROUVÉS
|
|
122
|
-
-------------------------------------------------------------------------------
|
|
123
|
-
{for each conflict in conflicts}
|
|
124
|
-
[{conflict.type.toUpperCase()}] {conflict.description}
|
|
125
|
-
Fichiers: {conflict.files.join(', ')}
|
|
126
|
-
Résolution: {conflict.resolution}
|
|
127
|
-
{end for}
|
|
128
|
-
|
|
129
|
-
SUGGESTIONS MCP
|
|
130
|
-
-------------------------------------------------------------------------------
|
|
131
|
-
{for each suggestion in suggestions}
|
|
132
|
-
→ {suggestion}
|
|
133
|
-
{end for}
|
|
134
|
-
|
|
135
|
-
===============================================================================
|
|
136
|
-
ACTIONS REQUISES
|
|
137
|
-
===============================================================================
|
|
138
|
-
|
|
139
|
-
⛔ Le merge est bloqué jusqu'à résolution des conflits.
|
|
140
|
-
|
|
141
|
-
1. RECOMMANDÉ - Rebaser le ModelSnapshot:
|
|
142
|
-
/efcore:rebase-snapshot
|
|
143
|
-
|
|
144
|
-
2. NON RECOMMANDÉ - Ignorer les conflits:
|
|
145
|
-
/efcore:conflicts --force
|
|
146
|
-
|
|
147
|
-
3. Besoin d'aide?
|
|
148
|
-
support@atlshub.ch
|
|
149
|
-
|
|
150
|
-
===============================================================================
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
**Si conflit critique (snapshot divergent):**
|
|
154
|
-
|
|
155
|
-
```
|
|
156
|
-
===============================================================================
|
|
157
|
-
CONFLIT CRITIQUE - SNAPSHOT DIVERGENT
|
|
158
|
-
===============================================================================
|
|
159
|
-
|
|
160
|
-
CONTEXTE
|
|
161
|
-
-------------------------------------------------------------------------------
|
|
162
|
-
• Branche: {current_branch}
|
|
163
|
-
• Cible: develop
|
|
164
|
-
|
|
165
|
-
PROBLÈME
|
|
166
|
-
-------------------------------------------------------------------------------
|
|
167
|
-
⛔ Le ModelSnapshot de votre branche a divergé significativement
|
|
168
|
-
de develop ({DIFF_LINES} lignes de différence).
|
|
169
|
-
|
|
170
|
-
Cela indique que des migrations ont été ajoutées sur develop
|
|
171
|
-
depuis la création de votre branche.
|
|
172
|
-
|
|
173
|
-
IMPACT
|
|
174
|
-
-------------------------------------------------------------------------------
|
|
175
|
-
• Le merge créera des conflits impossibles à résoudre automatiquement
|
|
176
|
-
• Les migrations pourraient s'exécuter dans le mauvais ordre
|
|
177
|
-
• La base de données pourrait être corrompue
|
|
178
|
-
|
|
179
|
-
===============================================================================
|
|
180
|
-
ACTIONS REQUISES
|
|
181
|
-
===============================================================================
|
|
182
|
-
|
|
183
|
-
⛔ MERGE BLOQUÉ - Résolution obligatoire avant de continuer.
|
|
184
|
-
|
|
185
|
-
1. Rebaser le snapshot sur develop (OBLIGATOIRE):
|
|
186
|
-
/efcore:rebase-snapshot
|
|
187
|
-
|
|
188
|
-
2. Recréer votre migration après le rebase:
|
|
189
|
-
/efcore:migration
|
|
190
|
-
|
|
191
|
-
3. Vérifier que tout fonctionne:
|
|
192
|
-
/efcore:db-deploy
|
|
193
|
-
|
|
194
|
-
===============================================================================
|
|
65
|
+
CONFLICTS - {branch} - BLOQUÉ
|
|
66
|
+
├── Conflits: {N} trouvés
|
|
67
|
+
├── Types: {snapshot/dependency/order}
|
|
68
|
+
├── Action: /efcore:rebase-snapshot (OBLIGATOIRE)
|
|
69
|
+
└── Force: /efcore:conflicts --force (non recommandé)
|
|
195
70
|
```
|
|
196
71
|
|
|
197
72
|
---
|
|
198
73
|
|
|
199
|
-
##
|
|
74
|
+
## Exit Codes
|
|
200
75
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
fi
|
|
207
|
-
```
|
|
76
|
+
| Code | Signification |
|
|
77
|
+
|------|---------------|
|
|
78
|
+
| 0 | Pas de conflit ou mineur |
|
|
79
|
+
| 1 | Conflit détecté - merge bloqué |
|
|
80
|
+
| 2 | Erreur connexion MCP |
|
|
208
81
|
|
|
209
82
|
---
|
|
210
83
|
|
|
@@ -212,41 +85,6 @@ fi
|
|
|
212
85
|
|
|
213
86
|
| Option | Description |
|
|
214
87
|
|--------|-------------|
|
|
215
|
-
| `--force` |
|
|
216
|
-
| `--target <branch>` |
|
|
217
|
-
| `--json` | Output
|
|
218
|
-
|
|
219
|
-
---
|
|
220
|
-
|
|
221
|
-
## Exit Codes
|
|
222
|
-
|
|
223
|
-
| Code | Meaning |
|
|
224
|
-
|------|---------|
|
|
225
|
-
| 0 | No conflict or minor conflict |
|
|
226
|
-
| 1 | Conflict detected - merge blocked |
|
|
227
|
-
| 2 | MCP connection error |
|
|
228
|
-
|
|
229
|
-
---
|
|
230
|
-
|
|
231
|
-
## MCP Tool Reference
|
|
232
|
-
|
|
233
|
-
**Tool:** `mcp__smartstack__check_migrations`
|
|
234
|
-
|
|
235
|
-
**Description:** Analyze EF Core migrations for conflicts, ordering issues, and ModelSnapshot discrepancies between branches
|
|
236
|
-
|
|
237
|
-
**Parameters:**
|
|
238
|
-
|
|
239
|
-
| Parameter | Type | Description |
|
|
240
|
-
|-----------|------|-------------|
|
|
241
|
-
| `projectPath` | string | EF Core project path (default: auto-detect) |
|
|
242
|
-
| `branch` | string | Git branch to check (default: current) |
|
|
243
|
-
| `compareBranch` | string | Branch to compare against |
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## Why MCP Integration?
|
|
248
|
-
|
|
249
|
-
1. **Consistency:** Same analysis logic across CLI, CI/CD, and IDE
|
|
250
|
-
2. **Maintainability:** Single source of truth in MCP server
|
|
251
|
-
3. **Structured Output:** Typed responses instead of bash text parsing
|
|
252
|
-
4. **Extensibility:** Easy to add new conflict types in one place
|
|
88
|
+
| `--force` | Ignorer conflit (non recommandé) |
|
|
89
|
+
| `--target <branch>` | Comparer avec autre branche |
|
|
90
|
+
| `--json` | Output JSON brut MCP |
|