@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlashub/smartstack-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.1",
|
|
4
4
|
"description": "SmartStack Claude Code automation toolkit - GitFlow, APEX, EF Core migrations, prompts and more",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SmartStack",
|
|
@@ -61,7 +61,13 @@
|
|
|
61
61
|
"install:local": "npm run build && node dist/index.js install --local --force",
|
|
62
62
|
"install:global": "npm run build && node dist/index.js install --force",
|
|
63
63
|
"status:local": "node dist/index.js status --local --verbose",
|
|
64
|
-
"status:global": "node dist/index.js status --verbose"
|
|
64
|
+
"status:global": "node dist/index.js status --verbose",
|
|
65
|
+
"doctor": "node dist/index.js doctor",
|
|
66
|
+
"check-mcp": "node dist/index.js check-mcp",
|
|
67
|
+
"ralph:start": "node dist/index.js ralph start",
|
|
68
|
+
"ralph:status": "node dist/index.js ralph status",
|
|
69
|
+
"ralph:logs": "node dist/index.js ralph logs",
|
|
70
|
+
"health": "node dist/index.js doctor --json"
|
|
65
71
|
},
|
|
66
72
|
"dependencies": {
|
|
67
73
|
"chalk": "^5.3.0",
|
|
@@ -8,60 +8,96 @@ tools: Bash, Glob, Read
|
|
|
8
8
|
|
|
9
9
|
# EF Core Squash Agent
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Consolide plusieurs migrations en une seule, en récupérant le ModelSnapshot de la branche parente.
|
|
12
|
+
|
|
13
|
+
## Principe Fondamental
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
RÈGLE D'OR: Toujours récupérer le snapshot de la branche PARENTE
|
|
17
|
+
|
|
18
|
+
feature/* → snapshot de develop
|
|
19
|
+
develop → snapshot de main
|
|
20
|
+
release/* → snapshot de main
|
|
21
|
+
hotfix/* → snapshot de main
|
|
22
|
+
main → BLOQUÉ (jamais squash)
|
|
23
|
+
```
|
|
12
24
|
|
|
13
25
|
## Workflow
|
|
14
26
|
|
|
15
|
-
1. **
|
|
16
|
-
2. **
|
|
17
|
-
3. **
|
|
18
|
-
4. **
|
|
19
|
-
5. **
|
|
20
|
-
6. **
|
|
21
|
-
7. **
|
|
27
|
+
1. **Determine**: Identifier branche parente (`determine_base_branch`)
|
|
28
|
+
2. **List**: Migrations propres à cette branche (pas héritées)
|
|
29
|
+
3. **Confirm**: Demander validation utilisateur
|
|
30
|
+
4. **Backup**: Sauvegarder tous les fichiers
|
|
31
|
+
5. **Fetch**: Récupérer ModelSnapshot de branche parente
|
|
32
|
+
6. **Delete**: Supprimer migrations de la branche
|
|
33
|
+
7. **Create**: Créer migration consolidée
|
|
34
|
+
8. **Validate**: Build + script OK
|
|
22
35
|
|
|
23
|
-
##
|
|
36
|
+
## Commandes Clés
|
|
24
37
|
|
|
25
38
|
```bash
|
|
39
|
+
# Déterminer branche parente
|
|
40
|
+
determine_base_branch # → BASE_BRANCH, BRANCH_TYPE
|
|
41
|
+
|
|
42
|
+
# Identifier migrations propres à la branche
|
|
43
|
+
BASE_MIGS=$(git ls-tree -r --name-only "origin/$BASE_BRANCH" -- Migrations/)
|
|
44
|
+
LOCAL_MIGS=$(find Migrations -name "*.cs" | grep -v Designer | grep -v Snapshot)
|
|
45
|
+
|
|
26
46
|
# Backup
|
|
27
47
|
BACKUP_DIR=".claude/gitflow/backup/migrations/squash_$(date +%Y%m%d_%H%M%S)"
|
|
28
|
-
mkdir -p "$BACKUP_DIR"
|
|
29
|
-
cp Migrations/*.cs "$BACKUP_DIR/"
|
|
48
|
+
mkdir -p "$BACKUP_DIR" && cp Migrations/*.cs "$BACKUP_DIR/"
|
|
30
49
|
|
|
31
|
-
#
|
|
32
|
-
|
|
50
|
+
# CRUCIAL: Récupérer snapshot parent
|
|
51
|
+
git fetch origin "$BASE_BRANCH"
|
|
52
|
+
git checkout "origin/$BASE_BRANCH" -- Migrations/*ModelSnapshot.cs
|
|
33
53
|
|
|
34
|
-
#
|
|
35
|
-
|
|
54
|
+
# Supprimer migrations de la branche uniquement
|
|
55
|
+
for mig in $BRANCH_ONLY_MIGRATIONS; do
|
|
56
|
+
rm -f "Migrations/${mig}"*
|
|
57
|
+
done
|
|
36
58
|
|
|
37
|
-
#
|
|
38
|
-
dotnet ef migrations
|
|
59
|
+
# Créer migration consolidée
|
|
60
|
+
dotnet ef migrations add "${BRANCH_TYPE}_${NAME}_Consolidated"
|
|
61
|
+
|
|
62
|
+
# Valider
|
|
63
|
+
dotnet build && dotnet ef migrations script --idempotent > /dev/null
|
|
39
64
|
```
|
|
40
65
|
|
|
41
66
|
## Safety Checks
|
|
42
67
|
|
|
43
|
-
- [ ]
|
|
44
|
-
- [ ]
|
|
45
|
-
- [ ]
|
|
46
|
-
- [ ]
|
|
68
|
+
- [ ] Branche parente identifiée
|
|
69
|
+
- [ ] main/master = BLOQUÉ
|
|
70
|
+
- [ ] User confirmation obtenue
|
|
71
|
+
- [ ] Backup créé
|
|
72
|
+
- [ ] Snapshot parent récupéré
|
|
73
|
+
- [ ] Build OK après squash
|
|
74
|
+
- [ ] Script générable
|
|
47
75
|
|
|
48
76
|
## Output Format
|
|
49
77
|
|
|
50
78
|
```
|
|
51
|
-
SQUASH
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
79
|
+
SQUASH - {current_branch}
|
|
80
|
+
Base: {BASE_BRANCH} (snapshot récupéré)
|
|
81
|
+
Avant: {N} migrations (propres à cette branche)
|
|
82
|
+
Apres: 1 migration consolidée
|
|
83
|
+
Backup: .claude/gitflow/backup/migrations/squash_{timestamp}/
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
Prochains: /efcore:db-reset, /efcore:db-deploy
|
|
58
86
|
```
|
|
59
87
|
|
|
60
|
-
##
|
|
88
|
+
## Cas Particuliers
|
|
61
89
|
|
|
62
|
-
|
|
63
|
-
|
|
90
|
+
| Situation | Action |
|
|
91
|
+
|-----------|--------|
|
|
92
|
+
| 0 migrations propres | "Rien à squash" - exit |
|
|
93
|
+
| Snapshot identique | Migration vide créée - warning |
|
|
94
|
+
| Build fail | Restaurer backup automatiquement |
|
|
95
|
+
| Sur main/master | BLOQUÉ - exit code 1 |
|
|
64
96
|
|
|
65
97
|
## Priority
|
|
66
98
|
|
|
67
|
-
Safety > Correctness > Speed.
|
|
99
|
+
Safety > Correctness > Speed.
|
|
100
|
+
|
|
101
|
+
1. Backup OBLIGATOIRE (sauf --no-backup)
|
|
102
|
+
2. Snapshot parent OBLIGATOIRE (jamais optionnel)
|
|
103
|
+
3. Restauration auto si échec
|
|
@@ -10,81 +10,93 @@ tools: Bash, Read, Glob, Grep, Edit, Write
|
|
|
10
10
|
|
|
11
11
|
Finalisation complete de branche GitFlow.
|
|
12
12
|
|
|
13
|
+
## MODE D'EXÉCUTION
|
|
14
|
+
|
|
15
|
+
**CRITIQUE:** Tu dois EXECUTER chaque commande git avec l'outil Bash.
|
|
16
|
+
|
|
17
|
+
- **NE PAS** afficher les commandes a l'utilisateur
|
|
18
|
+
- **EXECUTER** directement via l'outil Bash
|
|
19
|
+
- **AFFICHER** uniquement le resume final
|
|
20
|
+
|
|
13
21
|
## Workflow
|
|
14
22
|
|
|
15
|
-
1. **
|
|
16
|
-
2. **
|
|
17
|
-
3. **
|
|
18
|
-
4. **
|
|
19
|
-
5. **
|
|
20
|
-
|
|
23
|
+
1. **Detecter contexte**: Aller au repo principal si dans un worktree
|
|
24
|
+
2. **Verifier PR**: Confirmer que la PR est mergee (via GitHub ou `gh pr list --state merged`)
|
|
25
|
+
3. **Executer selon type**: Feature/Release/Hotfix ont des workflows differents
|
|
26
|
+
4. **Cleanup**: Supprimer branche + worktree
|
|
27
|
+
5. **Resume**: Afficher le resultat final
|
|
28
|
+
|
|
29
|
+
## Detection PR Mergee
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Verifier si PR mergee
|
|
33
|
+
PR_INFO=$(gh pr list --head "$BRANCH" --state merged --json number --jq '.[0]')
|
|
34
|
+
|
|
35
|
+
# Si pas trouve, verifier si main a ete mis a jour (merge manuel via GitHub)
|
|
36
|
+
if [ -z "$PR_INFO" ]; then
|
|
37
|
+
git checkout main && git pull origin main
|
|
38
|
+
# Continuer si les commits sont presents
|
|
39
|
+
fi
|
|
40
|
+
```
|
|
21
41
|
|
|
22
42
|
## Actions par Type
|
|
23
43
|
|
|
24
|
-
| Type | Version | Tag | Merge to |
|
|
25
|
-
|
|
26
|
-
| Feature | - | - | develop |
|
|
27
|
-
| Release | bump
|
|
28
|
-
| Hotfix |
|
|
44
|
+
| Type | Version | Tag | Merge to | Cleanup |
|
|
45
|
+
|------|---------|-----|----------|---------|
|
|
46
|
+
| Feature | - | - | develop (via PR) | branche + worktree |
|
|
47
|
+
| Release | bump MINOR sur develop | vX.Y.Z | main + develop | branche + worktree |
|
|
48
|
+
| Hotfix | AUTO PATCH | vX.Y.Z | main + develop | branche + worktree |
|
|
29
49
|
|
|
30
|
-
###
|
|
50
|
+
### Feature Workflow
|
|
31
51
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- Push main + tag
|
|
39
|
-
- Merge back vers develop
|
|
52
|
+
```bash
|
|
53
|
+
git checkout develop && git pull origin develop
|
|
54
|
+
git branch -d feature/xxx
|
|
55
|
+
git push origin --delete feature/xxx
|
|
56
|
+
git worktree remove ../features/xxx --force
|
|
57
|
+
```
|
|
40
58
|
|
|
41
|
-
|
|
59
|
+
### Release Workflow
|
|
42
60
|
|
|
43
61
|
```bash
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
# Double merge release
|
|
55
|
-
git checkout main && git merge --no-ff release/{version}
|
|
56
|
-
git checkout develop && git merge --no-ff release/{version}
|
|
57
|
-
|
|
58
|
-
# Cleanup worktree (nouvelle structure organisee)
|
|
59
|
-
WORKTREE_BASE="../worktrees"
|
|
60
|
-
# Feature: ../worktrees/features/{name}
|
|
61
|
-
# Release: ../worktrees/releases/v{version}
|
|
62
|
-
# Hotfix: ../worktrees/hotfixes/{name}
|
|
63
|
-
git worktree remove "${WORKTREE_BASE}/{type}s/{name}" --force
|
|
64
|
-
git branch -d {branch}
|
|
62
|
+
git checkout main && git pull origin main
|
|
63
|
+
git tag -a "v$VERSION" -m "Release v$VERSION"
|
|
64
|
+
git push origin "v$VERSION"
|
|
65
|
+
git checkout develop && git pull origin develop
|
|
66
|
+
git merge main --no-ff -m "chore: merge release back to develop"
|
|
67
|
+
# Bump MINOR version
|
|
68
|
+
npm version X.Y+1.0 --no-git-tag-version
|
|
69
|
+
git commit -m "chore: bump develop to vX.Y+1.0"
|
|
70
|
+
git push origin develop
|
|
71
|
+
# Cleanup
|
|
65
72
|
```
|
|
66
73
|
|
|
67
|
-
|
|
74
|
+
### Hotfix Workflow
|
|
68
75
|
|
|
69
76
|
```bash
|
|
70
|
-
|
|
77
|
+
git checkout main && git pull origin main
|
|
78
|
+
# Auto-increment PATCH
|
|
79
|
+
npm version X.Y.Z+1 --no-git-tag-version
|
|
80
|
+
git commit -m "chore: bump version"
|
|
81
|
+
git tag -a "v$NEW_VERSION" -m "Hotfix v$NEW_VERSION"
|
|
82
|
+
git push origin main "v$NEW_VERSION"
|
|
83
|
+
git checkout develop && git merge main --no-ff
|
|
84
|
+
git push origin develop
|
|
85
|
+
# Cleanup
|
|
71
86
|
```
|
|
72
87
|
|
|
73
88
|
## Output Format
|
|
74
89
|
|
|
90
|
+
A la fin, afficher UNIQUEMENT:
|
|
91
|
+
|
|
75
92
|
```
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Worktree: ../worktrees/{type}s/{name} (supprime)
|
|
84
|
-
|
|
85
|
-
DEPLOYED TO: (manual steps)
|
|
86
|
-
1. Push tags: git push --tags
|
|
87
|
-
2. Deploy script to production
|
|
93
|
+
{TYPE} FINALISÉ ✓
|
|
94
|
+
- Branche: {branch}
|
|
95
|
+
- Tag: v{version} (ou N/A)
|
|
96
|
+
- Merge back: develop ✓ (ou N/A)
|
|
97
|
+
- Worktree: nettoyé ✓
|
|
98
|
+
|
|
99
|
+
→ Prochain: /gitflow:10-start feature {name}
|
|
88
100
|
```
|
|
89
101
|
|
|
90
102
|
## Priority
|