@atlashub/smartstack-cli 1.14.2 → 1.16.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 +183 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/agents/efcore/migration.md +37 -25
- package/templates/agents/mcp-healthcheck.md +161 -0
- package/templates/hooks/mcp-check.md +64 -0
- package/templates/skills/application/SKILL.md +50 -4
- package/templates/skills/application/steps/step-00-init.md +153 -0
- package/templates/skills/application/steps/step-01-navigation.md +144 -0
- package/templates/skills/application/steps/step-02-permissions.md +159 -0
- package/templates/skills/application/steps/step-03-roles.md +158 -0
- package/templates/skills/application/steps/step-04-backend.md +202 -0
- package/templates/skills/application/steps/step-05-frontend.md +218 -0
- package/templates/skills/application/steps/step-06-migration.md +190 -0
- package/templates/skills/mcp/SKILL.md +246 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-05-frontend
|
|
3
|
+
description: Generate frontend code using MCP tools (component, API client, routes, i18n)
|
|
4
|
+
prev_step: steps/step-04-backend.md
|
|
5
|
+
next_step: steps/step-06-migration.md
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 5: Frontend Generation
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES
|
|
11
|
+
|
|
12
|
+
- ALWAYS use MCP tools for frontend generation
|
|
13
|
+
- ALWAYS generate i18n for 4 languages (fr, en, it, de)
|
|
14
|
+
- ALWAYS use nested routes (not flat)
|
|
15
|
+
- YOU ARE AN ORCHESTRATOR calling MCP, not a generator
|
|
16
|
+
|
|
17
|
+
## YOUR TASK
|
|
18
|
+
|
|
19
|
+
Use MCP tools to generate:
|
|
20
|
+
1. React component (scaffold_extension type: component)
|
|
21
|
+
2. TypeScript API client (scaffold_api_client)
|
|
22
|
+
3. Route configuration (scaffold_routes)
|
|
23
|
+
4. i18n files (scaffold_translations for UI)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## AVAILABLE STATE
|
|
28
|
+
|
|
29
|
+
From previous steps:
|
|
30
|
+
|
|
31
|
+
| Variable | Description |
|
|
32
|
+
|----------|-------------|
|
|
33
|
+
| `{full_path}` | Complete navigation path (navRoute) |
|
|
34
|
+
| `{entity_name}` | PascalCase entity name |
|
|
35
|
+
| `{entity_code}` | kebab-case code |
|
|
36
|
+
| `{labels}` | Object with fr, en, it, de |
|
|
37
|
+
| `{api_route}` | API endpoint path |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## EXECUTION SEQUENCE
|
|
42
|
+
|
|
43
|
+
### 1. Generate React Component
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Tool: mcp__smartstack__scaffold_extension
|
|
47
|
+
Args:
|
|
48
|
+
type: "component"
|
|
49
|
+
name: "{entity_name}"
|
|
50
|
+
options:
|
|
51
|
+
outputPath: "web/src/pages/{context}/{application}/{module}"
|
|
52
|
+
dryRun: false
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
This generates:
|
|
56
|
+
- `{EntityName}Page.tsx` - Main page component
|
|
57
|
+
- `{EntityName}ListView.tsx` - Reusable list view
|
|
58
|
+
- `use{EntityName}.ts` - Custom hook for data
|
|
59
|
+
|
|
60
|
+
### 2. Generate API Client
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Tool: mcp__smartstack__scaffold_api_client
|
|
64
|
+
Args:
|
|
65
|
+
navRoute: "{full_path}"
|
|
66
|
+
name: "{entity_name}"
|
|
67
|
+
methods: ["getAll", "getById", "create", "update", "delete"]
|
|
68
|
+
options:
|
|
69
|
+
includeTypes: true
|
|
70
|
+
includeHook: true
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This generates:
|
|
74
|
+
- `services/api/{entityCode}Api.ts` - API service
|
|
75
|
+
- `types/{entityName}.types.ts` - TypeScript interfaces
|
|
76
|
+
- `hooks/use{EntityName}Api.ts` - React Query hook (optional)
|
|
77
|
+
|
|
78
|
+
### 3. Update Route Configuration
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Tool: mcp__smartstack__scaffold_routes
|
|
82
|
+
Args:
|
|
83
|
+
source: "controllers"
|
|
84
|
+
scope: "all"
|
|
85
|
+
options:
|
|
86
|
+
includeGuards: true
|
|
87
|
+
generateRegistry: true
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This updates:
|
|
91
|
+
- `navRoutes.generated.ts` - Route registry
|
|
92
|
+
- `routes.tsx` - React Router configuration
|
|
93
|
+
|
|
94
|
+
### 4. Generate i18n Files
|
|
95
|
+
|
|
96
|
+
Create translation files for each language:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
### French (fr/{entityCode}.json)
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"title": "{labels.fr}",
|
|
103
|
+
"subtitle": "Gestion de {labels.fr}",
|
|
104
|
+
"columns": {
|
|
105
|
+
"code": "Code",
|
|
106
|
+
"name": "Nom",
|
|
107
|
+
"createdAt": "Créé le",
|
|
108
|
+
"actions": "Actions"
|
|
109
|
+
},
|
|
110
|
+
"form": {
|
|
111
|
+
"code": "Code",
|
|
112
|
+
"name": "Nom",
|
|
113
|
+
"submit": "Enregistrer",
|
|
114
|
+
"cancel": "Annuler"
|
|
115
|
+
},
|
|
116
|
+
"messages": {
|
|
117
|
+
"created": "{labels.fr} créé avec succès",
|
|
118
|
+
"updated": "{labels.fr} mis à jour avec succès",
|
|
119
|
+
"deleted": "{labels.fr} supprimé avec succès",
|
|
120
|
+
"error": "Une erreur est survenue"
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Repeat for en, it, de with appropriate translations.
|
|
126
|
+
|
|
127
|
+
### 5. Present Output to User
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## Frontend Code Generated
|
|
131
|
+
|
|
132
|
+
### Components
|
|
133
|
+
- `pages/{context}/{application}/{module}/{EntityName}Page.tsx`
|
|
134
|
+
- `pages/{context}/{application}/{module}/{EntityName}ListView.tsx`
|
|
135
|
+
- `hooks/use{EntityName}.ts`
|
|
136
|
+
|
|
137
|
+
### API Client
|
|
138
|
+
- `services/api/{entityCode}Api.ts`
|
|
139
|
+
- `types/{entityName}.types.ts`
|
|
140
|
+
|
|
141
|
+
### Routes
|
|
142
|
+
- Updated `navRoutes.generated.ts`
|
|
143
|
+
- Updated `routes.tsx` with nested route
|
|
144
|
+
|
|
145
|
+
### i18n
|
|
146
|
+
- `locales/fr/{entityCode}.json`
|
|
147
|
+
- `locales/en/{entityCode}.json`
|
|
148
|
+
- `locales/it/{entityCode}.json`
|
|
149
|
+
- `locales/de/{entityCode}.json`
|
|
150
|
+
|
|
151
|
+
### Route Configuration
|
|
152
|
+
```tsx
|
|
153
|
+
// In routes.tsx - NESTED routes (not flat!)
|
|
154
|
+
<Route path="{application}">
|
|
155
|
+
<Route index element={<Navigate to="{module}" replace />} />
|
|
156
|
+
<Route path="{module}" element={<{EntityName}Page />} />
|
|
157
|
+
</Route>
|
|
158
|
+
```
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## ROUTING RULES
|
|
164
|
+
|
|
165
|
+
**CRITICAL:** SmartStack requires NESTED routes:
|
|
166
|
+
|
|
167
|
+
```tsx
|
|
168
|
+
// ✅ CORRECT - Nested routes
|
|
169
|
+
<Route path="sales">
|
|
170
|
+
<Route index element={<Navigate to="products" replace />} />
|
|
171
|
+
<Route path="products" element={<ProductsPage />} />
|
|
172
|
+
<Route path="orders" element={<OrdersPage />} />
|
|
173
|
+
</Route>
|
|
174
|
+
|
|
175
|
+
// ❌ FORBIDDEN - Flat routes (cause redirect issues)
|
|
176
|
+
<Route path="sales" element={<Navigate to="products" />} />
|
|
177
|
+
<Route path="sales/products" element={<ProductsPage />} />
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## I18N STRUCTURE
|
|
183
|
+
|
|
184
|
+
All i18n files must follow this structure:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
locales/
|
|
188
|
+
├── fr/
|
|
189
|
+
│ └── {entityCode}.json
|
|
190
|
+
├── en/
|
|
191
|
+
│ └── {entityCode}.json
|
|
192
|
+
├── it/
|
|
193
|
+
│ └── {entityCode}.json
|
|
194
|
+
└── de/
|
|
195
|
+
└── {entityCode}.json
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## SUCCESS METRICS
|
|
201
|
+
|
|
202
|
+
- React component generated
|
|
203
|
+
- API client generated with types
|
|
204
|
+
- Routes updated (nested structure)
|
|
205
|
+
- i18n files created (4 languages)
|
|
206
|
+
- Proceeded to step-06-migration.md
|
|
207
|
+
|
|
208
|
+
## FAILURE MODES
|
|
209
|
+
|
|
210
|
+
- Component generation failed (check entity name)
|
|
211
|
+
- API client generation failed (check navRoute)
|
|
212
|
+
- Route configuration failed (check existing routes)
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## NEXT STEP
|
|
217
|
+
|
|
218
|
+
After displaying frontend code, proceed to `./step-06-migration.md`
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: step-06-migration
|
|
3
|
+
description: Create EF Core migration and finalize application setup
|
|
4
|
+
prev_step: steps/step-05-frontend.md
|
|
5
|
+
next_step: null
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 6: Migration & Finalization
|
|
9
|
+
|
|
10
|
+
## MANDATORY EXECUTION RULES
|
|
11
|
+
|
|
12
|
+
- ALWAYS use MCP `suggest_migration` to get proper migration name
|
|
13
|
+
- ALWAYS use `/efcore:migration` skill for migration creation
|
|
14
|
+
- NEVER use raw SQL in migrations
|
|
15
|
+
- YOU ARE AN ORCHESTRATOR, finalizing the application setup
|
|
16
|
+
|
|
17
|
+
## YOUR TASK
|
|
18
|
+
|
|
19
|
+
1. Get suggested migration name from MCP
|
|
20
|
+
2. Create the EF Core migration
|
|
21
|
+
3. Provide final checklist to user
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## AVAILABLE STATE
|
|
26
|
+
|
|
27
|
+
From previous steps:
|
|
28
|
+
|
|
29
|
+
| Variable | Description |
|
|
30
|
+
|----------|-------------|
|
|
31
|
+
| `{entity_name}` | PascalCase entity name |
|
|
32
|
+
| `{full_path}` | Complete navigation path |
|
|
33
|
+
| `{level}` | Navigation level |
|
|
34
|
+
| `{labels}` | Translated labels |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## EXECUTION SEQUENCE
|
|
39
|
+
|
|
40
|
+
### 1. Get Migration Name Suggestion
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Tool: mcp__smartstack__suggest_migration
|
|
44
|
+
Args:
|
|
45
|
+
description: "Add {entity_name} with navigation and permissions"
|
|
46
|
+
context: "core"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Response example:
|
|
50
|
+
```
|
|
51
|
+
Migration name: core_v1.2.0_003_Add{EntityName}WithNavigationAndPermissions
|
|
52
|
+
Command: dotnet ef migrations add core_v1.2.0_003_Add{EntityName}WithNavigationAndPermissions --context CoreDbContext -o Persistence/Migrations
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. Create Migration
|
|
56
|
+
|
|
57
|
+
Use the /efcore:migration skill or direct command:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
cd Infrastructure
|
|
61
|
+
dotnet ef migrations add {suggested_migration_name} --context CoreDbContext -o Persistence/Migrations
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Verify Migration Content
|
|
65
|
+
|
|
66
|
+
The migration should include:
|
|
67
|
+
- Navigation entity (Context/Application/Module/Section)
|
|
68
|
+
- Navigation translations (4 languages)
|
|
69
|
+
- Permissions (CRUD + wildcard)
|
|
70
|
+
- RolePermissions (role assignments)
|
|
71
|
+
- Domain entity table
|
|
72
|
+
- Indexes and constraints
|
|
73
|
+
|
|
74
|
+
### 4. Apply Migration
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
dotnet ef database update --context CoreDbContext
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 5. Present Final Checklist
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
## Application Setup Complete
|
|
84
|
+
|
|
85
|
+
### Summary
|
|
86
|
+
|
|
87
|
+
| Item | Status |
|
|
88
|
+
|------|--------|
|
|
89
|
+
| Navigation | ✅ {level}: {full_path} |
|
|
90
|
+
| Translations | ✅ 4 languages (fr, en, it, de) |
|
|
91
|
+
| Permissions | ✅ CRUD + Wildcard |
|
|
92
|
+
| Role Mappings | ✅ PlatformAdmin, TenantAdmin, StandardUser |
|
|
93
|
+
| Entity | ✅ {entity_name} |
|
|
94
|
+
| Service | ✅ I{entity_name}Service |
|
|
95
|
+
| Controller | ✅ {entity_name}Controller |
|
|
96
|
+
| DTOs | ✅ Create, Update, Response |
|
|
97
|
+
| Frontend | ✅ Page, ListView, Hook |
|
|
98
|
+
| API Client | ✅ TypeScript with types |
|
|
99
|
+
| i18n | ✅ 4 languages |
|
|
100
|
+
| Routes | ✅ Nested configuration |
|
|
101
|
+
| Migration | ✅ {migration_name} |
|
|
102
|
+
|
|
103
|
+
### Final Steps
|
|
104
|
+
|
|
105
|
+
1. **Verify DbSet registration:**
|
|
106
|
+
```csharp
|
|
107
|
+
// In ICoreDbContext.cs
|
|
108
|
+
public DbSet<{entity_name}> {entity_name}s => Set<{entity_name}>();
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
2. **Verify DI registration:**
|
|
112
|
+
```csharp
|
|
113
|
+
// In DependencyInjection.cs
|
|
114
|
+
services.AddScoped<I{entity_name}Service, {entity_name}Service>();
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
3. **Test the application:**
|
|
118
|
+
```bash
|
|
119
|
+
# Backend
|
|
120
|
+
dotnet run --project Api
|
|
121
|
+
|
|
122
|
+
# Frontend
|
|
123
|
+
cd web && npm run dev
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
4. **Verify navigation:**
|
|
127
|
+
- Login to the application
|
|
128
|
+
- Navigate to {full_path}
|
|
129
|
+
- Verify CRUD operations work
|
|
130
|
+
|
|
131
|
+
### API Endpoints
|
|
132
|
+
|
|
133
|
+
| Method | Endpoint | Permission |
|
|
134
|
+
|--------|----------|------------|
|
|
135
|
+
| GET | /api/{entity_code} | {full_path}.read |
|
|
136
|
+
| GET | /api/{entity_code}/{id} | {full_path}.read |
|
|
137
|
+
| POST | /api/{entity_code} | {full_path}.create |
|
|
138
|
+
| PUT | /api/{entity_code}/{id} | {full_path}.update |
|
|
139
|
+
| DELETE | /api/{entity_code}/{id} | {full_path}.delete |
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## TROUBLESHOOTING
|
|
145
|
+
|
|
146
|
+
### Common Issues
|
|
147
|
+
|
|
148
|
+
| Issue | Solution |
|
|
149
|
+
|-------|----------|
|
|
150
|
+
| Migration conflicts | Run `/efcore:conflicts` to analyze |
|
|
151
|
+
| Permission 403 errors | Verify Permissions.cs and PermissionConfiguration.cs are in sync |
|
|
152
|
+
| Navigation not visible | Check user role has appropriate permissions |
|
|
153
|
+
| Route not found | Verify nested route structure in routes.tsx |
|
|
154
|
+
| i18n missing | Check locale files exist and are properly loaded |
|
|
155
|
+
|
|
156
|
+
### Quick Fixes
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Rebuild and restart
|
|
160
|
+
dotnet build
|
|
161
|
+
dotnet ef database update
|
|
162
|
+
|
|
163
|
+
# Clear frontend cache
|
|
164
|
+
cd web && rm -rf node_modules/.cache && npm run dev
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## SUCCESS METRICS
|
|
170
|
+
|
|
171
|
+
- Migration name suggested via MCP
|
|
172
|
+
- Migration created and applied
|
|
173
|
+
- All checklist items verified
|
|
174
|
+
- Application functional
|
|
175
|
+
|
|
176
|
+
## COMPLETION
|
|
177
|
+
|
|
178
|
+
The /application skill workflow is complete. The user now has:
|
|
179
|
+
- Full navigation structure
|
|
180
|
+
- RBAC permissions
|
|
181
|
+
- Backend CRUD API
|
|
182
|
+
- Frontend components
|
|
183
|
+
- i18n support
|
|
184
|
+
- Database migration
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## END OF WORKFLOW
|
|
189
|
+
|
|
190
|
+
This is the final step. No further steps to proceed.
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mcp
|
|
3
|
+
description: |
|
|
4
|
+
MCP server management and health check for SmartStack.
|
|
5
|
+
Use this skill when:
|
|
6
|
+
- User wants to check MCP status
|
|
7
|
+
- User mentions "mcp", "healthcheck", "mcp status"
|
|
8
|
+
- Before any MCP-dependent operation fails
|
|
9
|
+
- After MCP configuration changes
|
|
10
|
+
Subcommands: healthcheck, tools
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Skill MCP SmartStack
|
|
14
|
+
|
|
15
|
+
Manages MCP server connectivity and health verification.
|
|
16
|
+
|
|
17
|
+
## SUBCOMMANDS
|
|
18
|
+
|
|
19
|
+
| Command | Description |
|
|
20
|
+
|---------|-------------|
|
|
21
|
+
| `/mcp:healthcheck` | Full MCP health check with version verification |
|
|
22
|
+
| `/mcp:tools` | List all available MCP tools with descriptions |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## /mcp:healthcheck
|
|
27
|
+
|
|
28
|
+
Performs a complete MCP health check and updates the cache.
|
|
29
|
+
|
|
30
|
+
### Workflow
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
34
|
+
│ MCP HEALTH CHECK │
|
|
35
|
+
├─────────────────────────────────────────────────────────────┤
|
|
36
|
+
│ 1. Test MCP Connectivity │
|
|
37
|
+
│ └─▶ Call mcp__smartstack__validate_conventions │
|
|
38
|
+
│ │
|
|
39
|
+
│ 2. Get MCP Version │
|
|
40
|
+
│ └─▶ Read SmartStack.mcp/package.json │
|
|
41
|
+
│ │
|
|
42
|
+
│ 3. List Available Tools │
|
|
43
|
+
│ └─▶ Enumerate mcp__smartstack__* tools │
|
|
44
|
+
│ │
|
|
45
|
+
│ 4. Update Cache │
|
|
46
|
+
│ └─▶ Write .claude/mcp-status.json │
|
|
47
|
+
└─────────────────────────────────────────────────────────────┘
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 1: Test Connectivity
|
|
51
|
+
|
|
52
|
+
Call MCP with minimal parameters:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
mcp__smartstack__validate_conventions({
|
|
56
|
+
checks: ["tables"]
|
|
57
|
+
})
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Expected:** Response without connection error
|
|
61
|
+
|
|
62
|
+
**On failure:**
|
|
63
|
+
```
|
|
64
|
+
❌ MCP CONNECTION FAILED
|
|
65
|
+
Error: <error_message>
|
|
66
|
+
|
|
67
|
+
Actions:
|
|
68
|
+
1. Verify MCP is configured in Claude Code settings
|
|
69
|
+
2. Check SmartStack.mcp path: D:\01 - projets\SmartStack.mcp
|
|
70
|
+
3. Restart Claude Code
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 2: Get Version
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Read MCP version
|
|
77
|
+
cat "D:\01 - projets\SmartStack.mcp\package.json" | grep '"version"'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Step 3: List Tools
|
|
81
|
+
|
|
82
|
+
Verify these critical tools are available:
|
|
83
|
+
|
|
84
|
+
| Tool | Purpose |
|
|
85
|
+
|------|---------|
|
|
86
|
+
| `validate_conventions` | Convention validation |
|
|
87
|
+
| `scaffold_extension` | Code generation |
|
|
88
|
+
| `suggest_migration` | Migration naming |
|
|
89
|
+
| `check_migrations` | Conflict detection |
|
|
90
|
+
| `generate_permissions` | RBAC generation |
|
|
91
|
+
|
|
92
|
+
### Step 4: Update Cache
|
|
93
|
+
|
|
94
|
+
Write to `.claude/mcp-status.json`:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"lastCheck": "<ISO_DATE>",
|
|
99
|
+
"mcpVersion": "<VERSION>",
|
|
100
|
+
"mcpPath": "D:\\01 - projets\\SmartStack.mcp",
|
|
101
|
+
"status": "ok",
|
|
102
|
+
"toolsAvailable": [
|
|
103
|
+
"validate_conventions",
|
|
104
|
+
"scaffold_extension",
|
|
105
|
+
"suggest_migration",
|
|
106
|
+
"check_migrations",
|
|
107
|
+
"generate_permissions"
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Output Format
|
|
113
|
+
|
|
114
|
+
**Success:**
|
|
115
|
+
```
|
|
116
|
+
MCP HEALTH CHECK ✓
|
|
117
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
118
|
+
Status : OK
|
|
119
|
+
Version : 1.5.0
|
|
120
|
+
Path : D:\01 - projets\SmartStack.mcp
|
|
121
|
+
Tools : 12 available
|
|
122
|
+
Cache : Updated (.claude/mcp-status.json)
|
|
123
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
124
|
+
Next check : in 7 days (auto)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Warning (update available):**
|
|
128
|
+
```
|
|
129
|
+
MCP HEALTH CHECK ⚠️
|
|
130
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
131
|
+
Status : UPDATE AVAILABLE
|
|
132
|
+
Current : 1.4.0
|
|
133
|
+
Latest : 1.5.0
|
|
134
|
+
Action : cd SmartStack.mcp && git pull
|
|
135
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Error:**
|
|
139
|
+
```
|
|
140
|
+
MCP HEALTH CHECK ❌
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
Status : ERROR
|
|
143
|
+
Issue : MCP server not responding
|
|
144
|
+
|
|
145
|
+
Troubleshooting:
|
|
146
|
+
1. Check Claude Code MCP configuration
|
|
147
|
+
2. Verify path: D:\01 - projets\SmartStack.mcp
|
|
148
|
+
3. Run: cd SmartStack.mcp && npm install
|
|
149
|
+
4. Restart Claude Code
|
|
150
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Cache File
|
|
156
|
+
|
|
157
|
+
**Location:** `.claude/mcp-status.json`
|
|
158
|
+
|
|
159
|
+
**Structure:**
|
|
160
|
+
```json
|
|
161
|
+
{
|
|
162
|
+
"lastCheck": "2024-01-15T10:30:00.000Z",
|
|
163
|
+
"mcpVersion": "1.5.0",
|
|
164
|
+
"mcpPath": "D:\\01 - projets\\SmartStack.mcp",
|
|
165
|
+
"status": "ok" | "error",
|
|
166
|
+
"toolsAvailable": ["tool1", "tool2", ...],
|
|
167
|
+
"errors": ["error1", ...] // only if status = error
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**Validity:** 7 days
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Integration with Hook
|
|
176
|
+
|
|
177
|
+
The `mcp-check` hook automatically:
|
|
178
|
+
1. Reads this cache before any `mcp__smartstack__*` call
|
|
179
|
+
2. Displays warning if cache > 7 days
|
|
180
|
+
3. Blocks if last status was "error"
|
|
181
|
+
|
|
182
|
+
This skill provides the **full check** that the hook references.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## /mcp:tools
|
|
187
|
+
|
|
188
|
+
Lists all available MCP tools with their descriptions.
|
|
189
|
+
|
|
190
|
+
### Core Tools (6)
|
|
191
|
+
| Tool | Description |
|
|
192
|
+
|------|-------------|
|
|
193
|
+
| `validate_conventions` | Validate SmartStack conventions (tables, migrations, services, namespaces, controllers) |
|
|
194
|
+
| `check_migrations` | Analyze EF Core migrations for conflicts and ordering issues |
|
|
195
|
+
| `scaffold_extension` | Generate code: feature, entity, service, controller, component, dto, validator, repository |
|
|
196
|
+
| `api_docs` | Get API documentation from Swagger/OpenAPI or controller files |
|
|
197
|
+
| `suggest_migration` | Suggest migration name following SmartStack conventions |
|
|
198
|
+
| `generate_permissions` | Generate RBAC permissions (HasData for PermissionConfiguration.cs) |
|
|
199
|
+
|
|
200
|
+
### Test Tools (4)
|
|
201
|
+
| Tool | Description |
|
|
202
|
+
|------|-------------|
|
|
203
|
+
| `scaffold_tests` | Generate test files for entities, services, controllers |
|
|
204
|
+
| `analyze_test_coverage` | Analyze test coverage and identify missing tests |
|
|
205
|
+
| `validate_test_conventions` | Validate test naming and structure conventions |
|
|
206
|
+
| `suggest_test_scenarios` | Suggest test scenarios based on code analysis |
|
|
207
|
+
|
|
208
|
+
### Frontend Tools (5)
|
|
209
|
+
| Tool | Description |
|
|
210
|
+
|------|-------------|
|
|
211
|
+
| `scaffold_routes` | Generate frontend routes from backend NavRoute attributes |
|
|
212
|
+
| `validate_frontend_routes` | Validate frontend routes match backend NavRoutes |
|
|
213
|
+
| `scaffold_api_client` | Generate TypeScript API client with React Query hooks |
|
|
214
|
+
| `scaffold_frontend_extension` | Generate frontend extension infrastructure (types, slots, contexts) |
|
|
215
|
+
| `analyze_extension_points` | Analyze React components for extension points |
|
|
216
|
+
|
|
217
|
+
### Output Format
|
|
218
|
+
|
|
219
|
+
```
|
|
220
|
+
MCP TOOLS REFERENCE
|
|
221
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
222
|
+
|
|
223
|
+
CORE TOOLS (6)
|
|
224
|
+
validate_conventions Validate SmartStack conventions
|
|
225
|
+
check_migrations Analyze EF Core migrations
|
|
226
|
+
scaffold_extension Generate code (entity, service, etc.)
|
|
227
|
+
api_docs Get API documentation
|
|
228
|
+
suggest_migration Suggest migration name
|
|
229
|
+
generate_permissions Generate RBAC permissions
|
|
230
|
+
|
|
231
|
+
TEST TOOLS (4)
|
|
232
|
+
scaffold_tests Generate test files
|
|
233
|
+
analyze_test_coverage Analyze test coverage
|
|
234
|
+
validate_test_conventions Validate test conventions
|
|
235
|
+
suggest_test_scenarios Suggest test scenarios
|
|
236
|
+
|
|
237
|
+
FRONTEND TOOLS (5)
|
|
238
|
+
scaffold_routes Generate frontend routes
|
|
239
|
+
validate_frontend_routes Validate route alignment
|
|
240
|
+
scaffold_api_client Generate TypeScript API client
|
|
241
|
+
scaffold_frontend_extension Generate extension infrastructure
|
|
242
|
+
analyze_extension_points Analyze React extension points
|
|
243
|
+
|
|
244
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
245
|
+
Total: 15 tools available
|
|
246
|
+
```
|