@atlashub/smartstack-cli 3.8.0 → 3.9.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/dist/index.js +365 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/templates/agents/action.md +1 -0
- package/templates/agents/ba-writer.md +33 -0
- package/templates/agents/explore-codebase.md +1 -0
- package/templates/agents/explore-docs.md +1 -0
- package/templates/agents/fix-grammar.md +1 -0
- package/templates/agents/snipper.md +1 -0
- package/templates/skills/admin/SKILL.md +6 -0
- package/templates/skills/ai-prompt/SKILL.md +32 -136
- package/templates/skills/ai-prompt/steps/step-01-implementation.md +122 -0
- package/templates/skills/apex/SKILL.md +120 -0
- package/templates/skills/apex/_shared.md +86 -0
- package/templates/skills/apex/references/agent-teams-protocol.md +164 -0
- package/templates/skills/apex/references/smartstack-layers.md +173 -0
- package/templates/skills/apex/steps/step-00-init.md +156 -0
- package/templates/skills/apex/steps/step-01-analyze.md +169 -0
- package/templates/skills/apex/steps/step-02-plan.md +160 -0
- package/templates/skills/apex/steps/step-03-execute.md +166 -0
- package/templates/skills/apex/steps/step-04-validate.md +138 -0
- package/templates/skills/apex/steps/step-05-examine.md +124 -0
- package/templates/skills/apex/steps/step-06-resolve.md +105 -0
- package/templates/skills/apex/steps/step-07-tests.md +130 -0
- package/templates/skills/apex/steps/step-08-run-tests.md +115 -0
- package/templates/skills/application/SKILL.md +10 -0
- package/templates/skills/application/references/backend-controller-hierarchy.md +58 -0
- package/templates/skills/application/references/backend-entity-seeding.md +72 -0
- package/templates/skills/application/references/backend-verification.md +88 -0
- package/templates/skills/application/references/frontend-verification.md +111 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +200 -0
- package/templates/skills/application/references/provider-template.md +134 -0
- package/templates/skills/application/references/test-frontend.md +73 -0
- package/templates/skills/application/references/test-prerequisites.md +72 -0
- package/templates/skills/application/steps/step-01-navigation.md +7 -198
- package/templates/skills/application/steps/step-03b-provider.md +4 -128
- package/templates/skills/application/steps/step-04-backend.md +20 -350
- package/templates/skills/application/steps/step-05-frontend.md +12 -101
- package/templates/skills/application/steps/step-07-tests.md +12 -132
- package/templates/skills/business-analyse/SKILL.md +11 -2
- package/templates/skills/business-analyse/html/ba-interactive.html +176 -14
- package/templates/skills/business-analyse/html/src/scripts/01-data-init.js +1 -0
- package/templates/skills/business-analyse/html/src/scripts/05-render-specs.js +16 -4
- package/templates/skills/business-analyse/html/src/scripts/06-render-consolidation.js +7 -2
- package/templates/skills/business-analyse/html/src/scripts/09-export.js +103 -0
- package/templates/skills/business-analyse/html/src/scripts/10-comments.js +12 -6
- package/templates/skills/business-analyse/html/src/scripts/11-review-panel.js +24 -2
- package/templates/skills/business-analyse/html/src/styles/08-review-panel.css +12 -0
- package/templates/skills/business-analyse/html/src/template.html +1 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +78 -0
- package/templates/skills/business-analyse/references/cadrage-vibe-coding.md +97 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +92 -0
- package/templates/skills/business-analyse/references/deploy-data-build.md +121 -0
- package/templates/skills/business-analyse/references/deploy-modes.md +49 -0
- package/templates/skills/business-analyse/references/handoff-file-templates.md +119 -0
- package/templates/skills/business-analyse/references/handoff-mappings.md +81 -0
- package/templates/skills/business-analyse/references/html-data-mapping.md +10 -2
- package/templates/skills/business-analyse/references/init-schema-deployment.md +65 -0
- package/templates/skills/business-analyse/references/review-data-mapping.md +363 -0
- package/templates/skills/business-analyse/references/spec-auto-inference.md +57 -0
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +85 -0
- package/templates/skills/business-analyse/references/ui-resource-cards.md +110 -0
- package/templates/skills/business-analyse/references/validate-incremental-html.md +55 -0
- package/templates/skills/business-analyse/steps/step-00-init.md +35 -68
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +5 -194
- package/templates/skills/business-analyse/steps/step-03a-data.md +6 -49
- package/templates/skills/business-analyse/steps/step-03b-ui.md +12 -178
- package/templates/skills/business-analyse/steps/step-03d-validate.md +3 -48
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +9 -104
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +25 -441
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +19 -187
- package/templates/skills/business-analyse/steps/step-06-review.md +277 -0
- package/templates/skills/cc-agent/references/agent-behavior-patterns.md +95 -0
- package/templates/skills/cc-agent/steps/step-02-generate.md +5 -78
- package/templates/skills/check-version/SKILL.md +7 -0
- package/templates/skills/controller/references/controller-code-templates.md +159 -0
- package/templates/skills/controller/references/permission-sync-templates.md +152 -0
- package/templates/skills/controller/steps/step-03-generate.md +6 -158
- package/templates/skills/controller/steps/step-04-perms.md +5 -144
- package/templates/skills/debug/SKILL.md +7 -0
- package/templates/skills/explore/SKILL.md +6 -0
- package/templates/skills/feature-full/SKILL.md +39 -142
- package/templates/skills/feature-full/steps/step-01-implementation.md +120 -0
- package/templates/skills/gitflow/references/init-config-template.md +135 -0
- package/templates/skills/gitflow/references/init-name-normalization.md +103 -0
- package/templates/skills/gitflow/references/plan-template.md +69 -0
- package/templates/skills/gitflow/references/start-efcore-preflight.md +70 -0
- package/templates/skills/gitflow/references/start-local-config.md +110 -0
- package/templates/skills/gitflow/steps/step-init.md +18 -289
- package/templates/skills/gitflow/steps/step-plan.md +6 -63
- package/templates/skills/gitflow/steps/step-start.md +16 -126
- package/templates/skills/mcp/SKILL.md +9 -213
- package/templates/skills/mcp/steps/step-01-healthcheck.md +108 -0
- package/templates/skills/mcp/steps/step-02-tools.md +73 -0
- package/templates/skills/notification/SKILL.md +7 -0
- package/templates/skills/quick-search/SKILL.md +5 -0
- package/templates/skills/ralph-loop/SKILL.md +99 -381
- package/templates/skills/ralph-loop/references/category-rules.md +259 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +182 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +259 -0
- package/templates/skills/ralph-loop/references/team-orchestration.md +189 -0
- package/templates/skills/ralph-loop/steps/step-00-init.md +111 -383
- package/templates/skills/ralph-loop/steps/step-01-task.md +79 -896
- package/templates/skills/ralph-loop/steps/step-02-execute.md +68 -680
- package/templates/skills/ralph-loop/steps/step-03-commit.md +47 -277
- package/templates/skills/ralph-loop/steps/step-04-check.md +124 -607
- package/templates/skills/ralph-loop/steps/step-05-report.md +68 -367
- package/templates/skills/refactor/SKILL.md +12 -176
- package/templates/skills/refactor/steps/step-01-discover.md +60 -0
- package/templates/skills/refactor/steps/step-02-execute.md +67 -0
- package/templates/skills/review-code/SKILL.md +19 -257
- package/templates/skills/review-code/steps/step-01-smartstack.md +96 -0
- package/templates/skills/review-code/steps/step-02-detailed-review.md +80 -0
- package/templates/skills/review-code/steps/step-03-react.md +44 -0
- package/templates/skills/ui-components/SKILL.md +7 -0
- package/templates/skills/utils/SKILL.md +6 -0
- package/templates/skills/validate/SKILL.md +6 -0
- package/templates/skills/validate-feature/SKILL.md +8 -0
- package/templates/skills/workflow/SKILL.md +40 -118
- package/templates/skills/workflow/steps/step-01-implementation.md +84 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Start: EF Core Migration Pre-flight
|
|
2
|
+
|
|
3
|
+
> Reference for step-start.md — BLOCKING check for release/hotfix branches.
|
|
4
|
+
|
|
5
|
+
## Migration Naming Validation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
if [ "$branch_type" = "release" ] || [ "$branch_type" = "hotfix" ]; then
|
|
9
|
+
echo "EF CORE MIGRATION PRE-FLIGHT"
|
|
10
|
+
echo "─────────────────────────────"
|
|
11
|
+
|
|
12
|
+
MIGRATION_DIRS=$(find . -type d -name "Migrations" -path "*/src/*" 2>/dev/null)
|
|
13
|
+
|
|
14
|
+
if [ -n "$MIGRATION_DIRS" ]; then
|
|
15
|
+
BAD_MIGRATIONS=""
|
|
16
|
+
GOOD_COUNT=0
|
|
17
|
+
BAD_COUNT=0
|
|
18
|
+
|
|
19
|
+
for dir in $MIGRATION_DIRS; do
|
|
20
|
+
for file in $(find "$dir" -name "*.cs" ! -name "*Designer*" ! -name "*ModelSnapshot*" | sort); do
|
|
21
|
+
FILENAME=$(basename "$file" .cs)
|
|
22
|
+
# Strip EF Core 14-digit timestamp prefix (e.g., 20260128220215_)
|
|
23
|
+
NAME_PART=$(echo "$FILENAME" | sed 's/^[0-9]\{14\}_//')
|
|
24
|
+
|
|
25
|
+
# Validate: {context}_v{version}_{sequence}_{Description}
|
|
26
|
+
# Accepts both dot (v2.0.0) and underscore (v2_0_0) version separators
|
|
27
|
+
if echo "$NAME_PART" | grep -qE '^[a-zA-Z]+_v[0-9]+[._][0-9]+[._][0-9]+_[0-9]{3}_[A-Z]'; then
|
|
28
|
+
echo " ✅ $FILENAME"
|
|
29
|
+
GOOD_COUNT=$((GOOD_COUNT + 1))
|
|
30
|
+
else
|
|
31
|
+
echo " ❌ $FILENAME"
|
|
32
|
+
BAD_COUNT=$((BAD_COUNT + 1))
|
|
33
|
+
BAD_MIGRATIONS="$BAD_MIGRATIONS - $FILENAME\n"
|
|
34
|
+
fi
|
|
35
|
+
done
|
|
36
|
+
done
|
|
37
|
+
|
|
38
|
+
echo ""
|
|
39
|
+
echo "Result: $GOOD_COUNT OK, $BAD_COUNT non-compliant"
|
|
40
|
+
|
|
41
|
+
if [ "$BAD_COUNT" -gt 0 ]; then
|
|
42
|
+
echo ""
|
|
43
|
+
echo "⛔ RELEASE BLOCKED - Non-compliant migration names detected"
|
|
44
|
+
echo "Expected format: {context}_v{version}_{sequence}_{Description}"
|
|
45
|
+
echo " Example OK: core_v2.0.0_001_InitialSchema"
|
|
46
|
+
echo " Example NOK: AddApplicationAccessRequests"
|
|
47
|
+
fi
|
|
48
|
+
fi
|
|
49
|
+
fi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## If Non-Compliant Migrations Found
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
AskUserQuestion:
|
|
56
|
+
header: "Migrations"
|
|
57
|
+
question: "Non-compliant migration names block this release. How to proceed?"
|
|
58
|
+
options:
|
|
59
|
+
- label: "Run /efcore squash (Recommended)"
|
|
60
|
+
description: "Squash migrations on develop to fix naming via MCP, then retry release"
|
|
61
|
+
- label: "Abort release"
|
|
62
|
+
description: "Cancel release, fix manually on develop"
|
|
63
|
+
- label: "Continue anyway"
|
|
64
|
+
description: "Proceed despite naming issues (NOT recommended for production)"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Actions:**
|
|
68
|
+
- **"/efcore squash"** → Delegate to `efcore-squash` agent on develop, then re-run `/gitflow start release`
|
|
69
|
+
- **"Abort release"** → STOP immediately
|
|
70
|
+
- **"Continue anyway"** → Log warning to `.claude/gitflow/logs/audit.log` and proceed
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Start: Local Environment Configuration
|
|
2
|
+
|
|
3
|
+
> Reference for step-start.md — auto-generated local config for each worktree.
|
|
4
|
+
|
|
5
|
+
## Port Generation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Generate unique ports based on branch name hash (to avoid conflicts between worktrees)
|
|
9
|
+
HASH=$(echo "$BRANCH_NAME" | shasum 2>/dev/null || echo "$BRANCH_NAME" | md5sum 2>/dev/null || echo "$BRANCH_NAME" | cksum)
|
|
10
|
+
HASH=$(echo "$HASH" | cut -c1-4)
|
|
11
|
+
HASH_NUM=$((16#$HASH % 100))
|
|
12
|
+
API_PORT=$((5200 + HASH_NUM))
|
|
13
|
+
WEB_PORT=$((5300 + HASH_NUM))
|
|
14
|
+
|
|
15
|
+
PROJECT_NAME=$(echo "$GF_PROJECT_NAME" | tr '[:upper:]' '[:lower:]')
|
|
16
|
+
DB_NAME=$(echo "${PROJECT_NAME}_${branch_type}_${BRANCH_NAME}" | cut -c1-63)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 7a. Backend: appsettings.Local.json
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
[ -n "$API_DIR" ] && [ -f "$API_DIR/appsettings.json" ] && {
|
|
23
|
+
cat > "$API_DIR/appsettings.Local.json" << EOF
|
|
24
|
+
{
|
|
25
|
+
"ConnectionStrings": {
|
|
26
|
+
"DefaultConnection": "Server=localhost;Database=${DB_NAME};Trusted_Connection=true;TrustServerCertificate=true"
|
|
27
|
+
},
|
|
28
|
+
"SmartStack": {
|
|
29
|
+
"AutoMigrate": true,
|
|
30
|
+
"FailOnMigrationError": true,
|
|
31
|
+
"EnableDevSeeding": true
|
|
32
|
+
},
|
|
33
|
+
"Authentication": {
|
|
34
|
+
"FrontendUrl": "http://localhost:${WEB_PORT}"
|
|
35
|
+
},
|
|
36
|
+
"Kestrel": {
|
|
37
|
+
"Endpoints": {
|
|
38
|
+
"Http": {
|
|
39
|
+
"Url": "http://localhost:${API_PORT}"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"Serilog": {
|
|
44
|
+
"MinimumLevel": {
|
|
45
|
+
"Default": "Debug"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
EOF
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## 7b. Frontend: .env.local + npm script
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
[ -n "$WEB_DIR" ] && [ -f "$WEB_DIR/package.json" ] && {
|
|
57
|
+
cat > "$WEB_DIR/.env.local" << EOF
|
|
58
|
+
VITE_API_URL=http://localhost:${API_PORT}
|
|
59
|
+
VITE_APP_ENV=local
|
|
60
|
+
VITE_DEBUG=true
|
|
61
|
+
EOF
|
|
62
|
+
|
|
63
|
+
# Add "local" script to package.json if not exists
|
|
64
|
+
if ! grep -q '"local"' "$WEB_DIR/package.json"; then
|
|
65
|
+
node -e "
|
|
66
|
+
const fs = require('fs');
|
|
67
|
+
const pkg = JSON.parse(fs.readFileSync('$WEB_DIR/package.json', 'utf8'));
|
|
68
|
+
if (!pkg.scripts.local) {
|
|
69
|
+
pkg.scripts.local = 'vite --mode local --port ${WEB_PORT}';
|
|
70
|
+
fs.writeFileSync('$WEB_DIR/package.json', JSON.stringify(pkg, null, 2) + '\n');
|
|
71
|
+
}
|
|
72
|
+
"
|
|
73
|
+
fi
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## 7c. Backend: launchSettings.json Local Profile
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
LAUNCH_SETTINGS="$API_DIR/Properties/launchSettings.json"
|
|
81
|
+
[ -n "$API_DIR" ] && [ -f "$LAUNCH_SETTINGS" ] && {
|
|
82
|
+
node -e "
|
|
83
|
+
const fs = require('fs');
|
|
84
|
+
const ls = JSON.parse(fs.readFileSync('$LAUNCH_SETTINGS', 'utf8'));
|
|
85
|
+
ls.profiles = ls.profiles || {};
|
|
86
|
+
ls.profiles.Local = {
|
|
87
|
+
commandName: 'Project',
|
|
88
|
+
dotnetRunMessages: true,
|
|
89
|
+
launchBrowser: false,
|
|
90
|
+
applicationUrl: 'http://localhost:${API_PORT}',
|
|
91
|
+
environmentVariables: {
|
|
92
|
+
ASPNETCORE_ENVIRONMENT: 'Local'
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
fs.writeFileSync('$LAUNCH_SETTINGS', JSON.stringify(ls, null, 2) + '\n');
|
|
96
|
+
"
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 7d. Summary Display
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
104
|
+
│ LOCAL ENVIRONMENT CONFIGURED │
|
|
105
|
+
├─────────────────────────────────────────────────────────────┤
|
|
106
|
+
│ Database: ${DB_NAME} │
|
|
107
|
+
│ API Port: ${API_PORT} → dotnet run --launch-profile Local│
|
|
108
|
+
│ Web Port: ${WEB_PORT} → npm run local │
|
|
109
|
+
└─────────────────────────────────────────────────────────────┘
|
|
110
|
+
```
|
|
@@ -287,121 +287,12 @@ The user will type the actual name via "Other". Use this raw input for step 6b.
|
|
|
287
287
|
|
|
288
288
|
**⛔ ALWAYS normalize, even if user chose the detected name.**
|
|
289
289
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
| `mon super projet` | `["mon", "super", "projet"]` |
|
|
297
|
-
| `gestion-des-stocks` | `["gestion", "des", "stocks"]` |
|
|
298
|
-
| `my_awesome_app` | `["my", "awesome", "app"]` |
|
|
299
|
-
| `SmartStack.App` | `["Smart", "Stack", "App"]` |
|
|
300
|
-
| `userManagement` | `["user", "Management"]` |
|
|
301
|
-
|
|
302
|
-
**Step 2: Language detection and spell check**
|
|
303
|
-
|
|
304
|
-
For EACH word, you MUST:
|
|
305
|
-
1. **Detect the language** (French, English, or technical/proper noun)
|
|
306
|
-
2. **Check spelling** - flag obvious typos
|
|
307
|
-
3. **Suggest corrections** if misspelled
|
|
308
|
-
|
|
309
|
-
| Word | Language | Spelling | Suggestion |
|
|
310
|
-
|------|----------|----------|------------|
|
|
311
|
-
| `gestion` | FR | ✅ | - |
|
|
312
|
-
| `gestoin` | FR | ❌ typo | → `gestion` |
|
|
313
|
-
| `managment` | EN | ❌ typo | → `management` |
|
|
314
|
-
| `SmartStack` | Proper noun | ✅ | - |
|
|
315
|
-
| `auth` | EN (abbreviation) | ✅ | - |
|
|
316
|
-
|
|
317
|
-
**If typos detected**, ask the user BEFORE generating variants:
|
|
318
|
-
|
|
319
|
-
```yaml
|
|
320
|
-
AskUserQuestion:
|
|
321
|
-
- header: "Spelling"
|
|
322
|
-
question: "Corrections detected. Accept?"
|
|
323
|
-
options:
|
|
324
|
-
- label: "Accept corrections (Recommended)"
|
|
325
|
-
description: "'gestoin' → 'gestion', 'managment' → 'management'"
|
|
326
|
-
- label: "Keep original"
|
|
327
|
-
description: "Use the name as typed"
|
|
328
|
-
multiSelect: false
|
|
329
|
-
```
|
|
330
|
-
|
|
331
|
-
**Step 3: Generate all name variants**
|
|
332
|
-
|
|
333
|
-
From the cleaned words, generate ALL variants:
|
|
334
|
-
|
|
335
|
-
```
|
|
336
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
337
|
-
│ PROJECT NAME VARIANTS │
|
|
338
|
-
│ Input: "gestion des stocks" │
|
|
339
|
-
├─────────────────────────────────────────────────────────────┤
|
|
340
|
-
│ │
|
|
341
|
-
│ A) PascalCase.Dot → Gestion.Des.Stocks │
|
|
342
|
-
│ Best for: .NET namespace, C# project, folder name │
|
|
343
|
-
│ │
|
|
344
|
-
│ B) PascalCase → GestionDesStocks │
|
|
345
|
-
│ Best for: Class name, assembly name │
|
|
346
|
-
│ │
|
|
347
|
-
│ C) kebab-case → gestion-des-stocks │
|
|
348
|
-
│ Best for: Git repo, npm package, URL slug │
|
|
349
|
-
│ │
|
|
350
|
-
│ D) snake_case → gestion_des_stocks │
|
|
351
|
-
│ Best for: Database, Python, file system │
|
|
352
|
-
│ │
|
|
353
|
-
└─────────────────────────────────────────────────────────────┘
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
**Step 4: Ask user to choose the PRIMARY format**
|
|
357
|
-
|
|
358
|
-
```yaml
|
|
359
|
-
AskUserQuestion:
|
|
360
|
-
- header: "Format"
|
|
361
|
-
question: "Which format for the project name?"
|
|
362
|
-
options:
|
|
363
|
-
- label: "PascalCase.Dot (Recommended)"
|
|
364
|
-
description: "{PascalCase.Dot variant} - .NET convention"
|
|
365
|
-
- label: "PascalCase"
|
|
366
|
-
description: "{PascalCase variant} - single word"
|
|
367
|
-
- label: "kebab-case"
|
|
368
|
-
description: "{kebab-case variant} - git/npm convention"
|
|
369
|
-
- label: "snake_case"
|
|
370
|
-
description: "{snake_case variant} - database/python convention"
|
|
371
|
-
multiSelect: false
|
|
372
|
-
```
|
|
373
|
-
|
|
374
|
-
**Step 5: Store all derived names**
|
|
375
|
-
|
|
376
|
-
Regardless of the chosen primary format, ALL variants are generated and stored:
|
|
377
|
-
|
|
378
|
-
```json
|
|
379
|
-
{
|
|
380
|
-
"PROJECT_NAME": "{chosen format}",
|
|
381
|
-
"PROJECT_VARIANTS": {
|
|
382
|
-
"pascalCaseDot": "Gestion.Des.Stocks",
|
|
383
|
-
"pascalCase": "GestionDesStocks",
|
|
384
|
-
"kebabCase": "gestion-des-stocks",
|
|
385
|
-
"snakeCase": "gestion_des_stocks",
|
|
386
|
-
"displayName": "Gestion Des Stocks",
|
|
387
|
-
"words": ["gestion", "des", "stocks"],
|
|
388
|
-
"language": "fr"
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
```
|
|
392
|
-
|
|
393
|
-
These variants are available for subsequent steps (repo name, namespace, folder, etc.).
|
|
394
|
-
|
|
395
|
-
**Real-world examples:**
|
|
396
|
-
|
|
397
|
-
| User types | PascalCase.Dot | kebab-case | PascalCase |
|
|
398
|
-
|-----------|---------------|------------|------------|
|
|
399
|
-
| `smart stack app` | `SmartStack.App` | `smart-stack-app` | `SmartStackApp` |
|
|
400
|
-
| `gestion-des-stocks` | `Gestion.Des.Stocks` | `gestion-des-stocks` | `GestionDesStocks` |
|
|
401
|
-
| `Mon Projet V2` | `Mon.Projet.V2` | `mon-projet-v2` | `MonProjetV2` |
|
|
402
|
-
| `user auth module` | `User.Auth.Module` | `user-auth-module` | `UserAuthModule` |
|
|
403
|
-
| `PROJET TEST` | `Projet.Test` | `projet-test` | `ProjetTest` |
|
|
404
|
-
| `e-commerce platform` | `ECommerce.Platform` | `e-commerce-platform` | `ECommercePlatform` |
|
|
290
|
+
See [references/init-name-normalization.md](../references/init-name-normalization.md) for the full 5-step process:
|
|
291
|
+
1. Parse input into words (split on separators + camelCase)
|
|
292
|
+
2. Language detection and spell check (ask user if typos found)
|
|
293
|
+
3. Generate all name variants (PascalCase.Dot, PascalCase, kebab-case, snake_case)
|
|
294
|
+
4. Ask user to choose PRIMARY format
|
|
295
|
+
5. Store all derived names in `PROJECT_VARIANTS`
|
|
405
296
|
|
|
406
297
|
### 7. Ask Worktree Mode
|
|
407
298
|
|
|
@@ -482,88 +373,11 @@ mkdir -p "$PROJECT_BASE/$DEVELOP_DIR/.claude/gitflow/backup"
|
|
|
482
373
|
|
|
483
374
|
**Write `.claude/gitflow/config.json` in develop worktree.**
|
|
484
375
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
{
|
|
489
|
-
"version": "2.1.0",
|
|
490
|
-
"platform": {
|
|
491
|
-
"detected": "{GF_PLATFORM}",
|
|
492
|
-
"shell": "{GF_SHELL}",
|
|
493
|
-
"detectedAt": "{ISO_DATE}"
|
|
494
|
-
},
|
|
495
|
-
"workspace": {
|
|
496
|
-
"path": "{WORKSPACE_DIR_STORAGE_FORMAT}",
|
|
497
|
-
"name": ""
|
|
498
|
-
},
|
|
499
|
-
"repository": {
|
|
500
|
-
"name": "{PROJECT_NAME}",
|
|
501
|
-
"rootFolder": "{ROOT_FOLDER_STORAGE_FORMAT}",
|
|
502
|
-
"nameVariants": {
|
|
503
|
-
"pascalCaseDot": "{PascalCase.Dot}",
|
|
504
|
-
"pascalCase": "{PascalCase}",
|
|
505
|
-
"kebabCase": "{kebab-case}",
|
|
506
|
-
"snakeCase": "{snake_case}",
|
|
507
|
-
"displayName": "{Display Name}"
|
|
508
|
-
},
|
|
509
|
-
"defaultBranch": "main",
|
|
510
|
-
"remoteUrl": "{REPO_URL}"
|
|
511
|
-
},
|
|
512
|
-
"git": {
|
|
513
|
-
"provider": "{GIT_PROVIDER}",
|
|
514
|
-
"branches": {
|
|
515
|
-
"main": "main",
|
|
516
|
-
"develop": "develop"
|
|
517
|
-
},
|
|
518
|
-
"prefixes": {
|
|
519
|
-
"feature": "feature/",
|
|
520
|
-
"release": "release/",
|
|
521
|
-
"hotfix": "hotfix/"
|
|
522
|
-
}
|
|
523
|
-
},
|
|
524
|
-
"worktrees": {
|
|
525
|
-
"enabled": true,
|
|
526
|
-
"mode": "{WORKTREE_MODE}",
|
|
527
|
-
"structure": {
|
|
528
|
-
"main": "{ROOT_FOLDER_STORAGE_FORMAT}/01-Main",
|
|
529
|
-
"develop": "{ROOT_FOLDER_STORAGE_FORMAT}/02-Develop",
|
|
530
|
-
"features": "{ROOT_FOLDER_STORAGE_FORMAT}/features",
|
|
531
|
-
"releases": "{ROOT_FOLDER_STORAGE_FORMAT}/releases",
|
|
532
|
-
"hotfixes": "{ROOT_FOLDER_STORAGE_FORMAT}/hotfixes"
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
"versioning": {
|
|
536
|
-
"strategy": "semver",
|
|
537
|
-
"current": "{VERSION}",
|
|
538
|
-
"tagPrefix": "v",
|
|
539
|
-
"sources": ["csproj", "package.json", "VERSION"]
|
|
540
|
-
},
|
|
541
|
-
"efcore": {
|
|
542
|
-
"enabled": true,
|
|
543
|
-
"validateOnCommit": true,
|
|
544
|
-
"blockDestructive": true,
|
|
545
|
-
"migrationNaming": "{context}_v{version}_{sequence}_{Description}"
|
|
546
|
-
},
|
|
547
|
-
"workflow": {
|
|
548
|
-
"push": {
|
|
549
|
-
"afterCommit": "worktree"
|
|
550
|
-
},
|
|
551
|
-
"pr": {
|
|
552
|
-
"autoLabels": true,
|
|
553
|
-
"requireReview": true
|
|
554
|
-
}
|
|
555
|
-
},
|
|
556
|
-
"language": {
|
|
557
|
-
"code": "{GF_LANG}"
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
```
|
|
376
|
+
See [references/init-config-template.md](../references/init-config-template.md) for:
|
|
377
|
+
- Full config.json v2.1.0 template (platform, workspace, repository, git, worktrees, versioning, efcore, workflow, language)
|
|
378
|
+
- Path storage convention (`normalize_path_for_storage()` format)
|
|
561
379
|
|
|
562
|
-
|
|
563
|
-
- `{ROOT_FOLDER_STORAGE_FORMAT}` = result of `normalize_path_for_storage("{ROOT_FOLDER}")`
|
|
564
|
-
- On WSL: `/mnt/d/projects/MyApp` → stored as `D:/projects/MyApp`
|
|
565
|
-
- On Windows: `D:\projects\MyApp` → stored as `D:/projects/MyApp`
|
|
566
|
-
- On Linux/macOS: `/home/user/projects/MyApp` → stored as-is
|
|
380
|
+
**⛔ IMPORTANT:** Store paths using Windows-style format (`D:/path/to/folder`). The `read_gitflow_config()` in `_shared.md` translates to platform format at read time.
|
|
567
381
|
|
|
568
382
|
### 10. Detect Version
|
|
569
383
|
|
|
@@ -585,33 +399,9 @@ VERSION=$(grep -oP '<Version>\K[^<]+' "$DEVELOP_FULL_PATH"/*.csproj 2>/dev/null
|
|
|
585
399
|
|
|
586
400
|
**⛔ MANDATORY: Verify the structure was created correctly.**
|
|
587
401
|
|
|
588
|
-
|
|
589
|
-
PROJECT_BASE="{ROOT_FOLDER}"
|
|
590
|
-
MAIN_DIR=$([ "$WORKTREE_MODE" = "organized" ] && echo "01-Main" || echo "main")
|
|
591
|
-
DEVELOP_DIR=$([ "$WORKTREE_MODE" = "organized" ] && echo "02-Develop" || echo "develop")
|
|
592
|
-
ERRORS=0
|
|
593
|
-
|
|
594
|
-
# Verify bare repo
|
|
595
|
-
[ -f "$PROJECT_BASE/.bare/HEAD" ] && echo "✓ .bare/HEAD OK" || { echo "❌ .bare/HEAD missing"; ERRORS=$((ERRORS+1)); }
|
|
596
|
-
|
|
597
|
-
# Verify worktrees on correct branches
|
|
598
|
-
MAIN_BRANCH=$(git -C "$PROJECT_BASE/$MAIN_DIR" branch --show-current 2>/dev/null)
|
|
599
|
-
[ "$MAIN_BRANCH" = "main" ] && echo "✓ $MAIN_DIR on main" || { echo "❌ $MAIN_DIR on '$MAIN_BRANCH', expected 'main'"; ERRORS=$((ERRORS+1)); }
|
|
600
|
-
|
|
601
|
-
DEVELOP_BRANCH=$(git -C "$PROJECT_BASE/$DEVELOP_DIR" branch --show-current 2>/dev/null)
|
|
602
|
-
[ "$DEVELOP_BRANCH" = "develop" ] && echo "✓ $DEVELOP_DIR on develop" || { echo "❌ $DEVELOP_DIR on '$DEVELOP_BRANCH', expected 'develop'"; ERRORS=$((ERRORS+1)); }
|
|
603
|
-
|
|
604
|
-
# Verify directories
|
|
605
|
-
for subdir in features releases hotfixes; do
|
|
606
|
-
[ -d "$PROJECT_BASE/$subdir" ] && echo "✓ $subdir/ OK" || { echo "❌ $subdir/ missing"; ERRORS=$((ERRORS+1)); }
|
|
607
|
-
done
|
|
402
|
+
See [references/init-config-template.md](../references/init-config-template.md) — Section "Post-Init Validation" for the full bash validation script.
|
|
608
403
|
|
|
609
|
-
|
|
610
|
-
[ -d "$PROJECT_BASE/$DEVELOP_DIR/.claude/gitflow" ] && echo "✓ .claude/gitflow/ OK" || { echo "❌ .claude/gitflow/ missing"; ERRORS=$((ERRORS+1)); }
|
|
611
|
-
|
|
612
|
-
echo ""
|
|
613
|
-
[ "$ERRORS" -eq 0 ] && echo "VALIDATION: ALL CHECKS PASSED" || echo "VALIDATION: $ERRORS error(s) detected - check output above"
|
|
614
|
-
```
|
|
404
|
+
Checks: .bare/HEAD, worktree branches (main/develop), features/releases/hotfixes dirs, .claude/gitflow/ dir.
|
|
615
405
|
|
|
616
406
|
### 11. Summary
|
|
617
407
|
|
|
@@ -694,70 +484,9 @@ Init is standalone. User should `cd 02-Develop` then run `/gitflow -f <feature-n
|
|
|
694
484
|
|
|
695
485
|
When called with `init --workspace`, batch-initialize all repos in a workspace.
|
|
696
486
|
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
question: "Where is the workspace root? (parent directory containing all repos)"
|
|
704
|
-
options:
|
|
705
|
-
- label: "Use parent folder (Recommended)"
|
|
706
|
-
description: "{DETECTED_FOLDER}/"
|
|
707
|
-
- label: "Custom path"
|
|
708
|
-
description: "Specify a different location"
|
|
709
|
-
multiSelect: false
|
|
710
|
-
```
|
|
711
|
-
|
|
712
|
-
2. **Detect or ask for repos:**
|
|
713
|
-
```yaml
|
|
714
|
-
AskUserQuestion:
|
|
715
|
-
- header: "Repos"
|
|
716
|
-
question: "How to identify repositories to initialize?"
|
|
717
|
-
options:
|
|
718
|
-
- label: "Detect from folders (Recommended)"
|
|
719
|
-
description: "Scan workspace for git repositories"
|
|
720
|
-
- label: "Enter URLs"
|
|
721
|
-
description: "Provide a list of repository URLs"
|
|
722
|
-
multiSelect: false
|
|
723
|
-
```
|
|
724
|
-
|
|
725
|
-
3. **Create `.smartstack-workspace.json`:**
|
|
726
|
-
```json
|
|
727
|
-
{
|
|
728
|
-
"version": "1.0.0",
|
|
729
|
-
"name": "{WORKSPACE_NAME}",
|
|
730
|
-
"createdAt": "{ISO_DATE}",
|
|
731
|
-
"updatedAt": "{ISO_DATE}",
|
|
732
|
-
"platform": {
|
|
733
|
-
"detected": "{GF_PLATFORM}",
|
|
734
|
-
"shell": "{GF_SHELL}"
|
|
735
|
-
},
|
|
736
|
-
"repositories": [],
|
|
737
|
-
"defaults": {
|
|
738
|
-
"provider": "{GIT_PROVIDER}",
|
|
739
|
-
"worktreeMode": "organized",
|
|
740
|
-
"language": "en"
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
```
|
|
744
|
-
|
|
745
|
-
4. **Loop: For each repo, run Steps 1-10b with workspace defaults pre-populated.**
|
|
746
|
-
- Skip questions where workspace defaults apply (provider, worktree mode)
|
|
747
|
-
- Add each repo to `workspace.json` after successful init
|
|
748
|
-
|
|
749
|
-
5. **Display global summary:**
|
|
750
|
-
```
|
|
751
|
-
╔══════════════════════════════════════════════════════════════════╗
|
|
752
|
-
║ WORKSPACE INITIALIZED ║
|
|
753
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
754
|
-
║ Workspace: {WORKSPACE_DIR} ║
|
|
755
|
-
║ Platform: {GF_PLATFORM} ({GF_SHELL}) ║
|
|
756
|
-
║ Repos: {REPO_COUNT} initialized ║
|
|
757
|
-
╠══════════════════════════════════════════════════════════════════╣
|
|
758
|
-
{for each REPO}
|
|
759
|
-
║ ✅ {REPO_NAME} ║
|
|
760
|
-
║ 01-Main/ ✓ 02-Develop/ ✓ config.json ✓ ║
|
|
761
|
-
{end for}
|
|
762
|
-
╚══════════════════════════════════════════════════════════════════╝
|
|
763
|
-
```
|
|
487
|
+
See [references/init-config-template.md](../references/init-config-template.md) — Section "Workspace Mode" for the full execution sequence:
|
|
488
|
+
1. Ask workspace directory
|
|
489
|
+
2. Detect or ask for repos
|
|
490
|
+
3. Create `.smartstack-workspace.json`
|
|
491
|
+
4. Loop Steps 1-10b per repo with workspace defaults
|
|
492
|
+
5. Display global summary
|
|
@@ -96,69 +96,12 @@ CODE_CONFLICTS=$(grep -c "<<<<<<" /tmp/merge-tree || echo "0")
|
|
|
96
96
|
|
|
97
97
|
### 5. Generate Plan Document
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
**Status:** PENDING
|
|
106
|
-
|
|
107
|
-
## Summary
|
|
108
|
-
|
|
109
|
-
| Field | Value |
|
|
110
|
-
|-------|-------|
|
|
111
|
-
| Source | {CURRENT} |
|
|
112
|
-
| Target | {BASE_BRANCH} |
|
|
113
|
-
| Commits | {COMMITS} |
|
|
114
|
-
| Strategy | {MERGE_STRATEGY} |
|
|
115
|
-
| Merge Back | {MERGE_BACK or "N/A"} |
|
|
116
|
-
|
|
117
|
-
## Commits to Integrate
|
|
118
|
-
|
|
119
|
-
{COMMIT_LIST}
|
|
120
|
-
|
|
121
|
-
## EF Core Analysis
|
|
122
|
-
|
|
123
|
-
| Check | Status |
|
|
124
|
-
|-------|--------|
|
|
125
|
-
| Branch migrations | {count} |
|
|
126
|
-
| Base migrations | {count} |
|
|
127
|
-
| Snapshot diverged | {yes/no} |
|
|
128
|
-
| Conflict type | {none/migration/code/both} |
|
|
129
|
-
|
|
130
|
-
## Pre-Integration Steps
|
|
131
|
-
|
|
132
|
-
{if migration conflict}
|
|
133
|
-
1. [ ] Run `/efcore:rebase-snapshot`
|
|
134
|
-
2. [ ] Verify migration generates same schema
|
|
135
|
-
3. [ ] Run `/gitflow sync`
|
|
136
|
-
{endif}
|
|
137
|
-
|
|
138
|
-
{if code conflict}
|
|
139
|
-
1. [ ] Run `/gitflow sync` (includes rebase)
|
|
140
|
-
2. [ ] Resolve conflicts manually
|
|
141
|
-
3. [ ] Verify build passes
|
|
142
|
-
{endif}
|
|
143
|
-
|
|
144
|
-
## Integration Steps
|
|
145
|
-
|
|
146
|
-
1. [ ] Create PR: `/gitflow pr`
|
|
147
|
-
2. [ ] Review and approve
|
|
148
|
-
3. [ ] Merge: `/gitflow merge`
|
|
149
|
-
{if release or hotfix}
|
|
150
|
-
4. [ ] Merge back to develop
|
|
151
|
-
5. [ ] Create tag: v{VERSION}
|
|
152
|
-
{endif}
|
|
153
|
-
6. [ ] Cleanup: `/gitflow finish`
|
|
154
|
-
|
|
155
|
-
## Post-Integration
|
|
156
|
-
|
|
157
|
-
- [ ] Verify CI/CD passes
|
|
158
|
-
- [ ] Verify migrations applied
|
|
159
|
-
- [ ] Delete source branch
|
|
160
|
-
- [ ] Remove worktree
|
|
161
|
-
```
|
|
99
|
+
See [references/plan-template.md](../references/plan-template.md) for the complete plan document template written to `.claude/gitflow/plans/{branch-name}_{date}.md`:
|
|
100
|
+
- Summary table (source, target, commits, strategy, merge-back)
|
|
101
|
+
- Commits list, EF Core analysis table
|
|
102
|
+
- Pre-integration steps (conditional on migration/code conflicts)
|
|
103
|
+
- Integration steps (conditional on release/hotfix)
|
|
104
|
+
- Post-integration checklist
|
|
162
105
|
|
|
163
106
|
### 6. Display Plan Summary
|
|
164
107
|
|