@atlashub/smartstack-cli 1.13.2 → 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.
- package/.documentation/agents.html +1 -1
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +1 -1
- package/.documentation/cli-commands.html +3 -3
- package/.documentation/commands.html +1 -1
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +231 -236
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +1 -1
- package/.documentation/init.html +3 -3
- package/.documentation/installation.html +1075 -351
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/README.md +88 -20
- package/config/default-config.json +10 -1
- package/dist/index.js +276 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/code-reviewer.md +163 -0
- package/templates/agents/efcore/db-deploy.md +25 -7
- package/templates/agents/efcore/db-reset.md +31 -10
- package/templates/agents/efcore/db-status.md +22 -5
- package/templates/agents/efcore/migration.md +70 -20
- package/templates/agents/gitflow/cleanup.md +8 -1
- package/templates/agents/gitflow/commit.md +7 -5
- package/templates/agents/gitflow/finish.md +6 -4
- package/templates/agents/gitflow/pr.md +8 -1
- package/templates/agents/gitflow/start.md +1 -1
- package/templates/commands/check-version.md +267 -0
- package/templates/commands/efcore/_shared.md +31 -2
- package/templates/commands/efcore/db-reset.md +18 -6
- package/templates/commands/efcore/migration.md +1 -1
- package/templates/commands/efcore/rebase-snapshot.md +1 -1
- package/templates/commands/efcore/squash.md +1 -0
- package/templates/commands/refactor.md +164 -0
- package/templates/project/DependencyInjection.Application.cs.template +25 -0
- package/templates/project/DependencyInjection.Infrastructure.cs.template +61 -0
- package/templates/project/DesignTimeExtensionsDbContextFactory.cs.template +70 -0
- package/templates/project/ExampleEntity.cs.template +116 -0
- package/templates/project/ExampleEntityConfiguration.cs.template +64 -0
- package/templates/project/ExampleService.cs.template +146 -0
- package/templates/project/ExtensionsDbContext.cs.template +41 -0
- package/templates/project/IExtensionsDbContext.cs.template +22 -0
- package/templates/project/Program.cs.template +47 -0
- package/templates/project/README.md +79 -0
- package/templates/ralph/README.md +10 -8
- package/templates/ralph/ralph.config.yaml +2 -2
- package/templates/skills/_shared.md +44 -44
- package/templates/skills/ai-prompt/SKILL.md +55 -55
- package/templates/skills/apex/SKILL.md +235 -0
- package/templates/skills/apex/steps/step-00-init.md +203 -0
- package/templates/skills/apex/steps/step-01-analyze.md +210 -0
- package/templates/skills/apex/steps/step-02-plan.md +217 -0
- package/templates/skills/apex/steps/step-03-execute.md +178 -0
- package/templates/skills/apex/steps/step-04-validate.md +217 -0
- package/templates/skills/apex/steps/step-05-examine.md +207 -0
- package/templates/skills/apex/steps/step-06-resolve.md +181 -0
- package/templates/skills/apex/steps/step-07-tests.md +206 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +207 -0
- package/templates/skills/apex/templates/00-context.md +46 -0
- package/templates/skills/apex/templates/01-analyze.md +63 -0
- package/templates/skills/apex/templates/02-plan.md +63 -0
- package/templates/skills/apex/templates/03-execute.md +34 -0
- package/templates/skills/apex/templates/04-validate.md +61 -0
- package/templates/skills/apex/templates/05-examine.md +58 -0
- package/templates/skills/apex/templates/06-resolve.md +39 -0
- package/templates/skills/apex/templates/07-tests.md +56 -0
- package/templates/skills/apex/templates/08-run-tests.md +41 -0
- package/templates/skills/apex/templates/README.md +69 -0
- package/templates/skills/application/SKILL.md +50 -50
- package/templates/skills/application/templates-backend.md +25 -25
- package/templates/skills/application/templates-frontend.md +43 -43
- package/templates/skills/application/templates-i18n.md +29 -29
- package/templates/skills/application/templates-seed.md +77 -77
- package/templates/skills/business-analyse/SKILL.md +223 -0
- package/templates/skills/business-analyse/_shared.md +258 -0
- package/templates/skills/business-analyse/questionnaire/01-context.md +33 -0
- package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +35 -0
- package/templates/skills/business-analyse/questionnaire/03-scope.md +35 -0
- package/templates/skills/business-analyse/questionnaire/04-data.md +36 -0
- package/templates/skills/business-analyse/questionnaire/05-integrations.md +36 -0
- package/templates/skills/business-analyse/questionnaire/06-security.md +40 -0
- package/templates/skills/business-analyse/questionnaire/07-ui.md +36 -0
- package/templates/skills/business-analyse/questionnaire/08-performance.md +35 -0
- package/templates/skills/business-analyse/questionnaire/09-constraints.md +35 -0
- package/templates/skills/business-analyse/questionnaire/10-documentation.md +35 -0
- package/templates/skills/business-analyse/questionnaire.md +177 -177
- package/templates/skills/business-analyse/react/components.md +340 -0
- package/templates/skills/business-analyse/react/i18n-template.md +245 -0
- package/templates/skills/business-analyse/react/schema.md +151 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +293 -0
- package/templates/skills/business-analyse/steps/step-01-discover.md +267 -0
- package/templates/skills/business-analyse/steps/step-02-analyse.md +243 -0
- package/templates/skills/business-analyse/steps/step-03-specify.md +317 -0
- package/templates/skills/business-analyse/steps/step-04-validate.md +239 -0
- package/templates/skills/business-analyse/steps/step-05-handoff.md +336 -0
- package/templates/skills/business-analyse/steps/step-06-doc-html.md +261 -0
- package/templates/skills/business-analyse/templates/00-context.md +105 -0
- package/templates/skills/business-analyse/templates/frd-brd.md +97 -0
- package/templates/skills/business-analyse/templates/frd-discovery.md +78 -0
- package/templates/skills/business-analyse/templates/frd-handoff.md +118 -0
- package/templates/skills/business-analyse/templates/frd-spec.md +168 -0
- package/templates/skills/business-analyse/templates-frd.md +217 -217
- package/templates/skills/business-analyse/templates-react.md +26 -26
- package/templates/skills/controller/SKILL.md +141 -92
- package/templates/skills/controller/postman-templates.md +15 -15
- package/templates/skills/controller/steps/step-00-init.md +191 -0
- package/templates/skills/controller/steps/step-01-analyze.md +146 -0
- package/templates/skills/controller/steps/step-02-plan.md +176 -0
- package/templates/skills/controller/steps/step-03-generate.md +219 -0
- package/templates/skills/controller/steps/step-04-perms.md +219 -0
- package/templates/skills/controller/steps/step-05-validate.md +107 -0
- package/templates/skills/controller/templates.md +77 -77
- package/templates/skills/documentation/SKILL.md +79 -79
- package/templates/skills/feature-full/SKILL.md +38 -38
- package/templates/skills/gitflow/SKILL.md +277 -0
- package/templates/{commands → skills}/gitflow/_shared.md +20 -20
- package/templates/skills/gitflow/phases/abort.md +173 -0
- package/templates/skills/gitflow/phases/cleanup.md +226 -0
- package/templates/skills/gitflow/phases/status.md +178 -0
- package/templates/skills/gitflow/steps/step-commit.md +255 -0
- package/templates/skills/gitflow/steps/step-finish.md +255 -0
- package/templates/skills/gitflow/steps/step-init.md +209 -0
- package/templates/skills/gitflow/steps/step-merge.md +225 -0
- package/templates/skills/gitflow/steps/step-plan.md +208 -0
- package/templates/skills/gitflow/steps/step-pr.md +235 -0
- package/templates/skills/gitflow/steps/step-start.md +334 -0
- package/templates/skills/gitflow/steps/step-sync.md +200 -0
- package/templates/skills/gitflow/templates/config.json +53 -0
- package/templates/skills/notification/SKILL.md +51 -51
- package/templates/skills/ralph-loop/SKILL.md +228 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +201 -0
- package/templates/skills/ralph-loop/steps/step-01-task.md +169 -0
- package/templates/skills/ralph-loop/steps/step-02-execute.md +173 -0
- package/templates/skills/ralph-loop/steps/step-03-commit.md +170 -0
- package/templates/skills/ralph-loop/steps/step-04-check.md +162 -0
- package/templates/skills/ralph-loop/steps/step-05-report.md +181 -0
- package/templates/skills/review-code/SKILL.md +219 -0
- package/templates/skills/review-code/references/clean-code-principles.md +140 -0
- package/templates/skills/review-code/references/code-quality-metrics.md +174 -0
- package/templates/skills/review-code/references/feedback-patterns.md +149 -0
- package/templates/skills/review-code/references/security-checklist.md +127 -0
- package/templates/skills/ui-components/SKILL.md +54 -54
- package/templates/skills/workflow/SKILL.md +46 -46
- package/templates/commands/ai-prompt.md +0 -315
- package/templates/commands/apex/1-analyze.md +0 -100
- package/templates/commands/apex/2-plan.md +0 -145
- package/templates/commands/apex/3-execute.md +0 -171
- package/templates/commands/apex/4-examine.md +0 -116
- package/templates/commands/apex/5-tasks.md +0 -209
- package/templates/commands/apex.md +0 -76
- package/templates/commands/application/create.md +0 -362
- package/templates/commands/application/templates-backend.md +0 -463
- package/templates/commands/application/templates-frontend.md +0 -517
- package/templates/commands/application/templates-i18n.md +0 -478
- package/templates/commands/application/templates-seed.md +0 -362
- package/templates/commands/application.md +0 -303
- package/templates/commands/business-analyse/0-orchestrate.md +0 -156
- package/templates/commands/business-analyse/1-init.md +0 -99
- package/templates/commands/business-analyse/2-discover.md +0 -143
- package/templates/commands/business-analyse/3-analyse.md +0 -106
- package/templates/commands/business-analyse/4-specify.md +0 -133
- package/templates/commands/business-analyse/5-validate.md +0 -132
- package/templates/commands/business-analyse/6-handoff.md +0 -157
- package/templates/commands/business-analyse/7-doc-html.md +0 -103
- package/templates/commands/business-analyse/_shared.md +0 -176
- package/templates/commands/business-analyse/bug.md +0 -118
- package/templates/commands/business-analyse/change-request.md +0 -144
- package/templates/commands/business-analyse/hotfix.md +0 -116
- package/templates/commands/business-analyse.md +0 -121
- package/templates/commands/controller/create.md +0 -216
- package/templates/commands/controller/postman-templates.md +0 -528
- package/templates/commands/controller/templates.md +0 -600
- package/templates/commands/controller.md +0 -337
- package/templates/commands/create/agent.md +0 -138
- package/templates/commands/create/command.md +0 -166
- package/templates/commands/create/hook.md +0 -234
- package/templates/commands/create/plugin.md +0 -329
- package/templates/commands/create/project.md +0 -508
- package/templates/commands/create/skill.md +0 -199
- package/templates/commands/create.md +0 -220
- package/templates/commands/documentation/module.md +0 -202
- package/templates/commands/documentation/templates.md +0 -432
- package/templates/commands/documentation.md +0 -190
- package/templates/commands/epct.md +0 -69
- package/templates/commands/explain.md +0 -186
- package/templates/commands/feature-full.md +0 -267
- package/templates/commands/gitflow/1-init.md +0 -188
- package/templates/commands/gitflow/10-start.md +0 -190
- package/templates/commands/gitflow/11-finish.md +0 -382
- package/templates/commands/gitflow/12-cleanup.md +0 -103
- package/templates/commands/gitflow/13-sync.md +0 -216
- package/templates/commands/gitflow/14-rebase.md +0 -251
- package/templates/commands/gitflow/2-status.md +0 -122
- package/templates/commands/gitflow/3-commit.md +0 -209
- package/templates/commands/gitflow/4-plan.md +0 -174
- package/templates/commands/gitflow/5-exec.md +0 -202
- package/templates/commands/gitflow/6-abort.md +0 -121
- package/templates/commands/gitflow/7-pull-request.md +0 -176
- package/templates/commands/gitflow/8-review.md +0 -113
- package/templates/commands/gitflow/9-merge.md +0 -157
- package/templates/commands/gitflow.md +0 -128
- package/templates/commands/implement.md +0 -663
- package/templates/commands/init.md +0 -567
- package/templates/commands/mcp-integration.md +0 -330
- package/templates/commands/notification.md +0 -129
- package/templates/commands/oneshot.md +0 -57
- package/templates/commands/quickstart.md +0 -154
- package/templates/commands/ralph-loop/cancel-ralph.md +0 -18
- package/templates/commands/ralph-loop/help.md +0 -126
- package/templates/commands/ralph-loop/ralph-loop.md +0 -120
- package/templates/commands/review.md +0 -106
- package/templates/commands/workflow.md +0 -193
- package/templates/gitflow/config.json +0 -138
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Phase 7 - Create Pull Request with auto-generated description and checks
|
|
3
|
-
agent: gitflow-pr
|
|
4
|
-
model: haiku
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Phase 7: PULL-REQUEST - Création PR avec checks
|
|
8
|
-
|
|
9
|
-
**Argument:** `$ARGUMENTS` = branche cible (optionnel, SCAN si sur main/develop)
|
|
10
|
-
|
|
11
|
-
> **Ref:** Fonction `detect_git_provider()` dans [_shared.md](_shared.md)
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Étape 0: Détection Provider & CLI
|
|
16
|
-
|
|
17
|
-
Utiliser `detect_git_provider()` de [_shared.md](_shared.md)
|
|
18
|
-
|
|
19
|
-
**Vérifier CLI:**
|
|
20
|
-
- GitHub: `gh` requis
|
|
21
|
-
- Azure DevOps: `az` + extension `azure-devops` requis
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Étape 1: Scan Proactif (si sur main/develop)
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
CURRENT=$(git rev-parse --abbrev-ref HEAD)
|
|
29
|
-
[[ "$CURRENT" == "main" || "$CURRENT" == "develop" ]] && SCAN_MODE=true
|
|
30
|
-
|
|
31
|
-
if [ "$SCAN_MODE" = true ]; then
|
|
32
|
-
git fetch --all --quiet
|
|
33
|
-
# Lister branches feature/release/hotfix sans PR
|
|
34
|
-
for BRANCH in $(git branch -r | grep -E 'feature/|release/|hotfix/' | sed 's|origin/||'); do
|
|
35
|
-
# Vérifier si PR existe
|
|
36
|
-
PR_EXISTS=$(gh pr list --head "$BRANCH" --json number --jq '.[0]' 2>/dev/null)
|
|
37
|
-
[ -z "$PR_EXISTS" ] && NEEDS_PR+=("$BRANCH")
|
|
38
|
-
done
|
|
39
|
-
fi
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
**Afficher branches sans PR** puis proposer sélection interactive.
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## Étape 2: Synchronisation
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
git fetch origin --quiet
|
|
50
|
-
AHEAD=$(git rev-list --count origin/$CURRENT..HEAD 2>/dev/null || echo "0")
|
|
51
|
-
BEHIND=$(git rev-list --count HEAD..origin/$CURRENT 2>/dev/null || echo "0")
|
|
52
|
-
BEHIND_TARGET=$(git rev-list --count HEAD..origin/$TARGET 2>/dev/null || echo "0")
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
| État | Action |
|
|
56
|
-
|------|--------|
|
|
57
|
-
| BEHIND > 0 | `git pull origin {branch}` |
|
|
58
|
-
| BEHIND_TARGET > 0 | `git rebase origin/{target}` |
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Étape 3: Détection Cible Auto
|
|
63
|
-
|
|
64
|
-
| Type branche | Cible | Raison |
|
|
65
|
-
|--------------|-------|--------|
|
|
66
|
-
| `feature/*` | `develop` | Intégration continue |
|
|
67
|
-
| `release/*` | `main` | Déploiement production |
|
|
68
|
-
| `hotfix/*` | `main` | Correction urgente |
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Étape 4: Pre-checks
|
|
73
|
-
|
|
74
|
-
| Check | Commande | Bloquant |
|
|
75
|
-
|-------|----------|----------|
|
|
76
|
-
| Build | `dotnet build` | OUI |
|
|
77
|
-
| Tests | `dotnet test` | OUI |
|
|
78
|
-
| Format | `dotnet format --verify-no-changes` | NON |
|
|
79
|
-
| EF Core | 3 fichiers migration complets | OUI |
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Étape 5: Génération PR
|
|
84
|
-
|
|
85
|
-
### Titre
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
case "$CURRENT" in
|
|
89
|
-
feature/*) PREFIX="feat" ;;
|
|
90
|
-
hotfix/*) PREFIX="fix" ;;
|
|
91
|
-
release/*) PREFIX="release" ;;
|
|
92
|
-
esac
|
|
93
|
-
DESCRIPTION=$(echo "$CURRENT" | sed 's|^[^/]*/||' | tr '-' ' ' | sed 's/\b./\u&/g')
|
|
94
|
-
PR_TITLE="${PREFIX}: ${DESCRIPTION}"
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
### Description
|
|
98
|
-
|
|
99
|
-
Format expert:
|
|
100
|
-
|
|
101
|
-
```markdown
|
|
102
|
-
## Résumé
|
|
103
|
-
{1 phrase: Quoi + Pourquoi}
|
|
104
|
-
|
|
105
|
-
## Changements
|
|
106
|
-
### {Nom}
|
|
107
|
-
**CONTEXTE:** {situation avant}
|
|
108
|
-
**SOLUTION:** {approche technique}
|
|
109
|
-
**BÉNÉFICE:** {impact concret}
|
|
110
|
-
|
|
111
|
-
## Fichiers clés
|
|
112
|
-
| Fichier | Rôle |
|
|
113
|
-
|
|
114
|
-
## Test
|
|
115
|
-
{étapes de validation}
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
🤖 Generated with GitFlow
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
---
|
|
122
|
-
|
|
123
|
-
## Étape 6: Exécution
|
|
124
|
-
|
|
125
|
-
### GitHub
|
|
126
|
-
```bash
|
|
127
|
-
gh pr create --base "$TARGET" --title "$PR_TITLE" --body "$BODY" --assignee "@me"
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Azure DevOps
|
|
131
|
-
```bash
|
|
132
|
-
az repos pr create --repository "$AZURE_REPO" --source-branch "$CURRENT" \
|
|
133
|
-
--target-branch "$TARGET" --title "$PR_TITLE" --description "$BODY" \
|
|
134
|
-
--organization "https://dev.azure.com/$AZURE_ORG" --project "$AZURE_PROJECT"
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## Résumé
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
PR CRÉÉE
|
|
143
|
-
- PR: #{number} | {branch} → {target}
|
|
144
|
-
- Build: ✓ | Tests: ✓
|
|
145
|
-
- URL: {url}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
**PROCHAINES ÉTAPES**
|
|
149
|
-
|
|
150
|
-
1. Attendre la review et l'approbation de la PR
|
|
151
|
-
2. Merger la PR
|
|
152
|
-
3. Finaliser la branche
|
|
153
|
-
|
|
154
|
-
**COMMANDES**
|
|
155
|
-
|
|
156
|
-
Merger la PR:
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
/gitflow:9-merge {number}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Finaliser:
|
|
163
|
-
|
|
164
|
-
```
|
|
165
|
-
/gitflow:11-finish {branch}
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Modes
|
|
171
|
-
|
|
172
|
-
| Commande | Action |
|
|
173
|
-
|----------|--------|
|
|
174
|
-
| `/gitflow:7-pull-request` | PR vers cible auto |
|
|
175
|
-
| `/gitflow:7-pull-request develop` | PR vers develop |
|
|
176
|
-
| `/gitflow:7-pull-request --draft` | PR en draft |
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Phase 8 - Review Pull Request with checklist and suggestions
|
|
3
|
-
agent: gitflow-review
|
|
4
|
-
model: haiku
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Phase 8: REVIEW - Review PR avec checklist
|
|
8
|
-
|
|
9
|
-
**Argument:** `$ARGUMENTS` = numéro PR (requis)
|
|
10
|
-
|
|
11
|
-
> **Ref:** Fonction `detect_git_provider()` dans [_shared.md](_shared.md)
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Chargement PR
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# GitHub
|
|
19
|
-
gh pr view {number} --json title,body,files,commits,reviews,checks
|
|
20
|
-
gh pr diff {number}
|
|
21
|
-
|
|
22
|
-
# Azure DevOps
|
|
23
|
-
az repos pr show --id {number} --organization "https://dev.azure.com/$AZURE_ORG" --project "$AZURE_PROJECT"
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Checklist Review
|
|
29
|
-
|
|
30
|
-
### Code Quality
|
|
31
|
-
|
|
32
|
-
| Check | Critère | Poids |
|
|
33
|
-
|-------|---------|-------|
|
|
34
|
-
| Lisibilité | Noms clairs, structure logique | HIGH |
|
|
35
|
-
| DRY | Pas de duplication | MEDIUM |
|
|
36
|
-
| SOLID | Principes respectés | MEDIUM |
|
|
37
|
-
| Complexité | Méthodes < 20 lignes | LOW |
|
|
38
|
-
|
|
39
|
-
### Patterns .NET
|
|
40
|
-
|
|
41
|
-
| Check | Validation |
|
|
42
|
-
|-------|------------|
|
|
43
|
-
| Async/Await | Pas de `.Result` ou `.Wait()` |
|
|
44
|
-
| DI | Pas de `new Service()` |
|
|
45
|
-
| Null | `?.` ou `??` ou `required` |
|
|
46
|
-
| Exceptions | Spécifiques, pas `catch (Exception)` |
|
|
47
|
-
|
|
48
|
-
### EF Core (si migrations)
|
|
49
|
-
|
|
50
|
-
| Check | Sévérité |
|
|
51
|
-
|-------|----------|
|
|
52
|
-
| 3 fichiers complets | BLOQUANT |
|
|
53
|
-
| Naming convention | WARNING |
|
|
54
|
-
| Down() implémenté | WARNING |
|
|
55
|
-
| Pas de DropColumn sans backup | BLOQUANT |
|
|
56
|
-
|
|
57
|
-
### Security
|
|
58
|
-
|
|
59
|
-
| Pattern | Sévérité |
|
|
60
|
-
|---------|----------|
|
|
61
|
-
| Secrets hardcodés | BLOQUANT |
|
|
62
|
-
| SQL Injection | BLOQUANT |
|
|
63
|
-
| `@Html.Raw()` sans sanitization | HIGH |
|
|
64
|
-
| `[AllowAnonymous]` sur sensible | HIGH |
|
|
65
|
-
|
|
66
|
-
---
|
|
67
|
-
|
|
68
|
-
## Priorité fichiers
|
|
69
|
-
|
|
70
|
-
1. `*Migration*.cs` - Impact DB
|
|
71
|
-
2. `*Controller*.cs` - Surface d'attaque
|
|
72
|
-
3. `*Service*.cs` - Logique métier
|
|
73
|
-
4. Tests - Couverture
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Output
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
CODE REVIEW - PR #{number}
|
|
81
|
-
RÉSUMÉ: {APPROVE | CHANGES_REQUESTED}
|
|
82
|
-
|
|
83
|
-
BLOQUANTS:
|
|
84
|
-
🔴 [{file}:{line}] {description}
|
|
85
|
-
|
|
86
|
-
WARNINGS:
|
|
87
|
-
🟡 [{file}:{line}] {description}
|
|
88
|
-
|
|
89
|
-
POINTS POSITIFS:
|
|
90
|
-
✨ {ce qui est bien}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Soumission
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
# GitHub
|
|
97
|
-
gh pr review {number} --approve --body "{comments}"
|
|
98
|
-
gh pr review {number} --request-changes --body "{comments}"
|
|
99
|
-
|
|
100
|
-
# Azure DevOps
|
|
101
|
-
az repos pr set-vote --id {number} --vote approve
|
|
102
|
-
az repos pr set-vote --id {number} --vote reject
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Modes
|
|
108
|
-
|
|
109
|
-
| Commande | Action |
|
|
110
|
-
|----------|--------|
|
|
111
|
-
| `/gitflow:8-review 123` | Review PR #123 |
|
|
112
|
-
| `/gitflow:8-review --security` | Focus sécurité |
|
|
113
|
-
| `/gitflow:8-review --quick` | Checklist rapide |
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Phase 9 - Merge Pull Request with all checks validated
|
|
3
|
-
agent: gitflow-merge
|
|
4
|
-
model: sonnet
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Phase 9: MERGE - Merge PR avec validation
|
|
8
|
-
|
|
9
|
-
**Argument:** `$ARGUMENTS` = numéro PR (optionnel, SCAN si absent)
|
|
10
|
-
|
|
11
|
-
> **Ref:** Fonction `detect_git_provider()` dans [_shared.md](_shared.md)
|
|
12
|
-
> **Ref:** Fonction `determine_base_branch()` dans [efcore/_shared.md](../efcore/_shared.md)
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Étape 0: Synchronisation et Branche Parente
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
git fetch --all --quiet
|
|
20
|
-
|
|
21
|
-
# Determiner branche parente selon type
|
|
22
|
-
determine_base_branch
|
|
23
|
-
# → BASE_BRANCH = develop (feature) ou main (release/hotfix)
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Étape 1: Scan Proactif (si pas d'argument)
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
# Lister PRs ouvertes et catégoriser
|
|
32
|
-
# GitHub
|
|
33
|
-
gh pr list --state open --json number,title,headRefName,mergeable,reviewDecision
|
|
34
|
-
|
|
35
|
-
# Azure DevOps
|
|
36
|
-
az repos pr list --repository "$AZURE_REPO" --status active --query "[].{number:pullRequestId,title:title,branch:sourceRefName,mergeStatus:mergeStatus}"
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Catégories:**
|
|
40
|
-
- ✅ PRÊTES: mergeable + approved
|
|
41
|
-
- ⏳ ATTENTE REVIEW: pas encore reviewée
|
|
42
|
-
- ⚠️ CHANGEMENTS DEMANDÉS: feedback à adresser
|
|
43
|
-
- ❌ CONFLITS: rebase requis
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Étape 2: Pre-merge Checks
|
|
48
|
-
|
|
49
|
-
| Check | Requis | Action si échec |
|
|
50
|
-
|-------|--------|-----------------|
|
|
51
|
-
| State = OPEN | OUI | "PR déjà mergée" |
|
|
52
|
-
| Mergeable | OUI | "Résoudre conflits" |
|
|
53
|
-
| CI vert | OUI | "Attendre ou corriger" |
|
|
54
|
-
| Reviews OK | OUI | "Demander review" |
|
|
55
|
-
|
|
56
|
-
### EF Core (si migrations)
|
|
57
|
-
|
|
58
|
-
| Check | Bloquant | Note |
|
|
59
|
-
|-------|----------|------|
|
|
60
|
-
| ModelSnapshot sync avec `$BASE_BRANCH` | OUI | develop pour feature, main pour release/hotfix |
|
|
61
|
-
| `dotnet ef migrations script` OK | OUI | Script idempotent generable |
|
|
62
|
-
| Pas de data loss non confirmé | WARNING | DropTable, DropColumn, DeleteData |
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Verifier sync ModelSnapshot avec branche parente
|
|
66
|
-
git diff "origin/$BASE_BRANCH" -- Migrations/*ModelSnapshot.cs
|
|
67
|
-
# Si diff > 0 lignes sur sections non liees a cette branche → CONFLIT
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Étape 3: Exécution
|
|
73
|
-
|
|
74
|
-
### Stratégie
|
|
75
|
-
|
|
76
|
-
| Type | Stratégie | Raison |
|
|
77
|
-
|------|-----------|--------|
|
|
78
|
-
| `feature/*` | Squash | Historique propre |
|
|
79
|
-
| `hotfix/*` | Merge commit | Traçabilité |
|
|
80
|
-
| `release/*` | Merge commit | Traçabilité |
|
|
81
|
-
|
|
82
|
-
### GitHub
|
|
83
|
-
```bash
|
|
84
|
-
gh pr merge {number} --squash --delete-branch # feature
|
|
85
|
-
gh pr merge {number} --merge --delete-branch # hotfix/release
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
### Azure DevOps
|
|
89
|
-
```bash
|
|
90
|
-
az repos pr update --id {number} --status completed --squash {true|false} --delete-source-branch true
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Étape 4: Post-merge
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Si release/hotfix → créer tag
|
|
99
|
-
git tag -a "v$VERSION" -m "Release v$VERSION"
|
|
100
|
-
git push origin "v$VERSION"
|
|
101
|
-
|
|
102
|
-
# Cleanup
|
|
103
|
-
git branch -d {branch}
|
|
104
|
-
git fetch --prune
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Résumé
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
MERGE COMPLETE
|
|
113
|
-
- PR: #{number} | {title}
|
|
114
|
-
- Base: {base} | Strategy: {squash|merge}
|
|
115
|
-
- Reviews: {count} ✓ | CI: ✓
|
|
116
|
-
- Branch deleted: {branch}
|
|
117
|
-
- Tag: {v1.2.3|N/A}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
**PROCHAINE ÉTAPE**
|
|
121
|
-
|
|
122
|
-
Finaliser la branche (cleanup worktree, merge back si release/hotfix):
|
|
123
|
-
|
|
124
|
-
```
|
|
125
|
-
/gitflow:11-finish {branch}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## Erreurs courantes
|
|
131
|
-
|
|
132
|
-
| Erreur | Solution |
|
|
133
|
-
|--------|----------|
|
|
134
|
-
| "Not mergeable" | `git rebase origin/{base}` |
|
|
135
|
-
| "Checks failing" | Corriger et re-push |
|
|
136
|
-
| "Review required" | Demander review |
|
|
137
|
-
| "az: not found" | `winget install Microsoft.AzureCLI` |
|
|
138
|
-
|
|
139
|
-
---
|
|
140
|
-
|
|
141
|
-
## Rollback
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
MERGE_COMMIT=$(git log --merges -1 --format="%H")
|
|
145
|
-
git revert -m 1 $MERGE_COMMIT
|
|
146
|
-
git push origin {base}
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Modes
|
|
152
|
-
|
|
153
|
-
| Commande | Action |
|
|
154
|
-
|----------|--------|
|
|
155
|
-
| `/gitflow:9-merge 123` | Merge PR #123 |
|
|
156
|
-
| `/gitflow:9-merge` | Scan et proposer |
|
|
157
|
-
| `/gitflow:9-merge 123 --auto` | Auto quand CI vert |
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: GitFlow workflow with versioning and EF Core migration management
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# GitFlow Workflow
|
|
6
|
-
|
|
7
|
-
You are a GitFlow and EF Core expert. Manage branch workflow and migrations for .NET projects.
|
|
8
|
-
|
|
9
|
-
**ULTRA THINK before each phase.** Display the heading: `# 1. INIT`, `# 2. STATUS`, etc.
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## Overview
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
┌─────────────────────────────────────────┐
|
|
17
|
-
│ GITFLOW WORKFLOW │
|
|
18
|
-
└─────────────────────────────────────────┘
|
|
19
|
-
|
|
20
|
-
10. START ──────────────────────────────────────────────────────┐
|
|
21
|
-
│ │
|
|
22
|
-
▼ │
|
|
23
|
-
feature/* ──3.COMMIT──► 13.SYNC ──► 14.REBASE ──► 7.PR ──► develop
|
|
24
|
-
│ │ │ │
|
|
25
|
-
│ │ │ │
|
|
26
|
-
10. START (release) ───────┼────────────┼───────────────────────┤
|
|
27
|
-
│ │ │ │
|
|
28
|
-
▼ ▼ ▼ │
|
|
29
|
-
release/* ──3.COMMIT──► 13.SYNC ──► 7.PR(main) ──► 11.FINISH ──► main + tag
|
|
30
|
-
│ │
|
|
31
|
-
└───────────────── merge back ◄─────────────────┘
|
|
32
|
-
│
|
|
33
|
-
10. START (hotfix) ──────────────────────────────────────┤
|
|
34
|
-
│ │
|
|
35
|
-
▼ │
|
|
36
|
-
hotfix/* ──3.COMMIT──► 13.SYNC ──► 7.PR(main) ──► 11.FINISH ──► main + tag
|
|
37
|
-
│ │
|
|
38
|
-
└───────────────── merge back ◄─────────────────┘
|
|
39
|
-
|
|
40
|
-
6. ABORT ◄── (rollback if problem)
|
|
41
|
-
|
|
42
|
-
12. CLEANUP ◄── (audit worktrees from main/develop)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Phases
|
|
46
|
-
|
|
47
|
-
| # | Command | When | Action |
|
|
48
|
-
|---|---------|------|--------|
|
|
49
|
-
| 1 | `/gitflow:1-init` | Initial setup | Config + Branches + Versioning |
|
|
50
|
-
| 2 | `/gitflow:2-status` | Before action | Complete state + remote sync |
|
|
51
|
-
| 3 | `/gitflow:3-commit` | After changes | EF Core validation |
|
|
52
|
-
| 4 | `/gitflow:4-plan` | Before merge | Detailed plan |
|
|
53
|
-
| 5 | `/gitflow:5-exec` | Execute | Merge + Tag + Version |
|
|
54
|
-
| 6 | `/gitflow:6-abort` | Problem | Rollback + cleanup worktree |
|
|
55
|
-
| 7 | `/gitflow:7-pull-request` | Feature ready | Create PR + checks |
|
|
56
|
-
| 8 | `/gitflow:8-review` | Review PR | Checklist + feedback |
|
|
57
|
-
| 9 | `/gitflow:9-merge` | PR approved | Merge + post-actions |
|
|
58
|
-
| 10 | `/gitflow:10-start` | New branch | Create feature/release/hotfix |
|
|
59
|
-
| 11 | `/gitflow:11-finish` | After merge | Tag + merge back + cleanup worktree |
|
|
60
|
-
| 12 | `/gitflow:12-cleanup` | Maintenance | Audit + cleanup worktrees |
|
|
61
|
-
| 13 | `/gitflow:13-sync` | Desync detected | Push/Pull with remote |
|
|
62
|
-
| 14 | `/gitflow:14-rebase` | Behind develop | Rebase on base branch |
|
|
63
|
-
|
|
64
|
-
## Typical Workflow
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# 1. Start a feature
|
|
68
|
-
/gitflow:10-start feature my-feature
|
|
69
|
-
|
|
70
|
-
# 2. Develop + commit
|
|
71
|
-
/gitflow:3-commit
|
|
72
|
-
|
|
73
|
-
# 3. Sync with remote (push/pull)
|
|
74
|
-
/gitflow:13-sync
|
|
75
|
-
|
|
76
|
-
# 4. Rebase on develop (if behind)
|
|
77
|
-
/gitflow:14-rebase
|
|
78
|
-
|
|
79
|
-
# 5. Create PR to develop
|
|
80
|
-
/gitflow:7-pull-request
|
|
81
|
-
|
|
82
|
-
# 6. Review and merge
|
|
83
|
-
/gitflow:8-review {PR}
|
|
84
|
-
/gitflow:9-merge {PR}
|
|
85
|
-
|
|
86
|
-
# 7. For release: finalize (tag + merge back + auto cleanup)
|
|
87
|
-
/gitflow:11-finish
|
|
88
|
-
|
|
89
|
-
# 8. Maintenance: audit and cleanup (from main or develop)
|
|
90
|
-
/gitflow:12-cleanup
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
## Worktree Cleanup
|
|
94
|
-
|
|
95
|
-
Worktree cleanup is handled automatically and manually:
|
|
96
|
-
|
|
97
|
-
| Mode | Trigger | Scope |
|
|
98
|
-
|------|---------|-------|
|
|
99
|
-
| **Automatic** | `/gitflow:11-finish` | Worktree of finalized branch |
|
|
100
|
-
| **Automatic** | `/gitflow:6-abort --branch` | Worktree of abandoned branch |
|
|
101
|
-
| **Manual** | `/gitflow:12-cleanup` | Complete audit (orphaned + stale) |
|
|
102
|
-
|
|
103
|
-
**Note:** `/gitflow:12-cleanup` must be executed from `main` or `develop` only.
|
|
104
|
-
|
|
105
|
-
## Versioning (.NET)
|
|
106
|
-
|
|
107
|
-
**Sources (priority):** csproj → Directory.Build.props → AssemblyInfo → VERSION → git-tag
|
|
108
|
-
|
|
109
|
-
**Auto-increment:**
|
|
110
|
-
- feature → minor (1.2.0 → 1.3.0)
|
|
111
|
-
- hotfix → patch (1.2.0 → 1.2.1)
|
|
112
|
-
- release → confirmation
|
|
113
|
-
|
|
114
|
-
## EF Core Rules
|
|
115
|
-
|
|
116
|
-
1. **1 migration/feature** - Recreate, don't accumulate
|
|
117
|
-
2. **3 required files** - Migration + Designer + ModelSnapshot
|
|
118
|
-
3. **Sync before merge** - Rebase on develop
|
|
119
|
-
4. **ModelSnapshot conflict** - Accept theirs + Recreate
|
|
120
|
-
5. **Release** - Idempotent SQL script
|
|
121
|
-
|
|
122
|
-
## Priority
|
|
123
|
-
|
|
124
|
-
**Safety > Correctness > Speed**
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
User: $ARGUMENTS
|