---
description: Analyze conflicts before merge (BLOCKING if conflict detected)
agent: efcore-conflicts
model: sonnet
---

# EF Core Conflicts

> **Ref:** [_shared.md](_shared.md)
> **MCP:** `mcp__smartstack__check_migrations`
> **Comportement:** Exit code 1 si conflit (bloque merge/commit)

---

## STEP 1: Invoquer MCP

```json
{
  "tool": "mcp__smartstack__check_migrations",
  "parameters": {
    "branch": "<current_branch>",
    "compareBranch": "develop"
  }
}
```

---

## STEP 2: Parser Réponse

```typescript
interface MigrationCheckResult {
  hasConflicts: boolean;
  migrations: MigrationInfo[];
  conflicts: MigrationConflict[];
  suggestions: string[];
}
```

---

## STEP 3: Évaluer Niveau

| Type Conflit | Niveau | Action |
|--------------|--------|--------|
| `naming` | LOW | Warning |
| `order` | MEDIUM | Suggérer réordonnancement |
| `dependency` | HIGH | Bloquer merge |
| `snapshot` | CRITICAL | Bloquer, exiger rebase |

---

## Résumé

**Si aucun conflit:**
```
CONFLICTS - {branch}
├── Cible: develop
├── Résultat: ✓ Aucun conflit
└── Prochains: /gitflow:3-commit, /gitflow:7-pull-request
```

**Si conflits:**
```
CONFLICTS - {branch} - BLOQUÉ
├── Conflits: {N} trouvés
├── Types: {snapshot/dependency/order}
├── Action: /efcore:rebase-snapshot (OBLIGATOIRE)
└── Force: /efcore:conflicts --force (non recommandé)
```

---

## Exit Codes

| Code | Signification |
|------|---------------|
| 0 | Pas de conflit ou mineur |
| 1 | Conflit détecté - merge bloqué |
| 2 | Erreur connexion MCP |

---

## Options

| Option | Description |
|--------|-------------|
| `--force` | Ignorer conflit (non recommandé) |
| `--target <branch>` | Comparer avec autre branche |
| `--json` | Output JSON brut MCP |
