@atlashub/smartstack-cli 1.13.2 → 1.14.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/.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 +1 -1
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +1 -1
- package/.documentation/init.html +3 -3
- package/.documentation/installation.html +1001 -352
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/README.md +88 -20
- 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 +69 -19
- 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 +30 -1
- package/templates/commands/efcore/db-reset.md +18 -6
- package/templates/commands/gitflow/OPTIMIZATIONS.md +206 -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 +234 -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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# APEX Template System
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This directory contains template files used to initialize APEX workflow outputs when save mode (`-s`) is enabled.
|
|
6
|
+
|
|
7
|
+
## Template Files
|
|
8
|
+
|
|
9
|
+
| Template | Purpose | Created When |
|
|
10
|
+
|----------|---------|--------------|
|
|
11
|
+
| `00-context.md` | Workflow configuration and progress tracking | Always (if save_mode) |
|
|
12
|
+
| `01-analyze.md` | Analysis findings | Always (if save_mode) |
|
|
13
|
+
| `02-plan.md` | Implementation plan | Always (if save_mode) |
|
|
14
|
+
| `03-execute.md` | Implementation log | Always (if save_mode) |
|
|
15
|
+
| `04-validate.md` | Validation results | Always (if save_mode) |
|
|
16
|
+
| `05-examine.md` | Adversarial review findings | Only if examine_mode |
|
|
17
|
+
| `06-resolve.md` | Finding resolution log | Only if examine_mode |
|
|
18
|
+
| `07-tests.md` | Test analysis and creation | Only if test_mode |
|
|
19
|
+
| `08-run-tests.md` | Test runner log | Only if test_mode |
|
|
20
|
+
|
|
21
|
+
## Template Variables
|
|
22
|
+
|
|
23
|
+
Templates use `{{variable}}` syntax for placeholders:
|
|
24
|
+
|
|
25
|
+
| Variable | Description | Example |
|
|
26
|
+
|----------|-------------|---------|
|
|
27
|
+
| `{{task_id}}` | Kebab-case task identifier | `01-add-auth-middleware` |
|
|
28
|
+
| `{{task_description}}` | Plain text task description | `add authentication middleware` |
|
|
29
|
+
| `{{timestamp}}` | ISO 8601 timestamp | `2026-01-22T10:30:00Z` |
|
|
30
|
+
| `{{auto_mode}}` | Auto mode flag | `true` or `false` |
|
|
31
|
+
| `{{examine_mode}}` | Examine mode flag | `true` or `false` |
|
|
32
|
+
| `{{save_mode}}` | Save mode flag | `true` or `false` |
|
|
33
|
+
| `{{test_mode}}` | Test mode flag | `true` or `false` |
|
|
34
|
+
| `{{economy_mode}}` | Economy mode flag | `true` or `false` |
|
|
35
|
+
| `{{original_input}}` | Raw user input | `/apex -a -s add auth` |
|
|
36
|
+
| `{{examine_status}}` | Progress status for examine steps | `Pending` or `Skip` |
|
|
37
|
+
| `{{test_status}}` | Progress status for test steps | `Pending` or `Skip` |
|
|
38
|
+
|
|
39
|
+
## How It Works
|
|
40
|
+
|
|
41
|
+
1. **Initialization (step-00-init):**
|
|
42
|
+
- Creates output directory `.claude/output/apex/{task-id}/`
|
|
43
|
+
- Copies templates with variables replaced
|
|
44
|
+
- All files ready for appending
|
|
45
|
+
|
|
46
|
+
2. **Each Step:**
|
|
47
|
+
- Reads from pre-created file if resuming
|
|
48
|
+
- Appends findings/outputs to step file
|
|
49
|
+
- Updates 00-context.md progress table
|
|
50
|
+
|
|
51
|
+
3. **Benefits:**
|
|
52
|
+
- Consistent formatting across all workflows
|
|
53
|
+
- Easy to update templates
|
|
54
|
+
- Supports resume from any step
|
|
55
|
+
|
|
56
|
+
## Output Structure
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
.claude/output/apex/{task-id}/
|
|
60
|
+
├── 00-context.md # Configuration + progress
|
|
61
|
+
├── 01-analyze.md # Analysis findings
|
|
62
|
+
├── 02-plan.md # Implementation plan
|
|
63
|
+
├── 03-execute.md # Execution log
|
|
64
|
+
├── 04-validate.md # Validation results
|
|
65
|
+
├── 05-examine.md # Review findings (if -x)
|
|
66
|
+
├── 06-resolve.md # Resolution log (if -x)
|
|
67
|
+
├── 07-tests.md # Test creation (if -t)
|
|
68
|
+
└── 08-run-tests.md # Test runner (if -t)
|
|
69
|
+
```
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: application
|
|
3
3
|
description: |
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
Scope: Context → Application → Module → Section (
|
|
4
|
+
Creates SmartStack full-stack applications/modules.
|
|
5
|
+
Use this skill when:
|
|
6
|
+
- User asks to create an application, module, or context
|
|
7
|
+
- User mentions "new module", "new application", "add a feature"
|
|
8
|
+
- User wants to extend navigation with new entries
|
|
9
|
+
Scope: Context → Application → Module → Section (all levels)
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
# Skill Application SmartStack
|
|
13
13
|
|
|
14
|
-
**
|
|
14
|
+
**Reference:** [_shared.md](../_shared.md) for architecture, permissions, i18n
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## WHEN THIS SKILL ACTIVATES
|
|
17
17
|
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
18
|
+
| Trigger | Example |
|
|
19
|
+
|---------|---------|
|
|
20
|
+
| Explicit request | "Create a module to manage products" |
|
|
21
|
+
| New feature | "We need to add order management" |
|
|
22
|
+
| Navigation extension | "Add a CRM application in business" |
|
|
23
|
+
| Keywords | "new module", "new application", "add a context" |
|
|
24
24
|
|
|
25
25
|
## FLOW ARCHITECTURE
|
|
26
26
|
|
|
@@ -28,44 +28,44 @@ description: |
|
|
|
28
28
|
WEB (React) → API (.NET) → Application → Infrastructure → Database
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
**
|
|
31
|
+
**FORBIDDEN:** WEB → Infrastructure (direct DB access), WEB → Domain
|
|
32
32
|
|
|
33
33
|
## WORKFLOW
|
|
34
34
|
|
|
35
|
-
### 1.
|
|
35
|
+
### 1. Level Detection
|
|
36
36
|
|
|
37
|
-
|
|
|
38
|
-
|
|
37
|
+
| Hint | → Level |
|
|
38
|
+
|------|---------|
|
|
39
39
|
| "context", "workspace" | Context |
|
|
40
40
|
| "application", "app" | Application |
|
|
41
|
-
| "module", "
|
|
42
|
-
| "section", "
|
|
41
|
+
| "module", "feature" | Module |
|
|
42
|
+
| "section", "tab" | Section |
|
|
43
43
|
|
|
44
|
-
### 2. Extraction
|
|
45
|
-
`$LEVEL`, `$PARENT` (platform/business/personal), `$CODE` (kebab-case), `$
|
|
44
|
+
### 2. Parameter Extraction
|
|
45
|
+
`$LEVEL`, `$PARENT` (platform/business/personal), `$CODE` (kebab-case), `$LABEL_EN`, `$ICON` (Lucide)
|
|
46
46
|
|
|
47
|
-
### 3.
|
|
47
|
+
### 3. Full-Stack Generation
|
|
48
48
|
```
|
|
49
|
-
1. DB SEED (Navigation + Translations 4
|
|
50
|
-
2. PERMISSIONS (Permissions.cs + PermissionConfiguration.cs) ← 2
|
|
49
|
+
1. DB SEED (Navigation + Translations 4 languages)
|
|
50
|
+
2. PERMISSIONS (Permissions.cs + PermissionConfiguration.cs) ← 2 files!
|
|
51
51
|
3. API (Controller + DTOs via /controller:create)
|
|
52
52
|
4. SERVICES (Interface + Implementation)
|
|
53
53
|
5. FRONTEND (Page + Components + Hooks)
|
|
54
54
|
6. I18N (fr, en, it, de)
|
|
55
|
-
7. ROUTES (nested routes
|
|
55
|
+
7. ROUTES (nested routes mandatory)
|
|
56
56
|
8. PREFERENCES (Hook pattern)
|
|
57
57
|
9. MIGRATION (/efcore:migration)
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
### 4.
|
|
61
|
-
- `/controller:create` → Controllers
|
|
62
|
-
- `/efcore:migration` → Migrations
|
|
60
|
+
### 4. Automatic Chaining
|
|
61
|
+
- `/controller:create` → API Controllers
|
|
62
|
+
- `/efcore:migration` → DB Migrations
|
|
63
63
|
- `/ui-components` → EntityCard, DataTable
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## USER PREFERENCES
|
|
66
66
|
|
|
67
|
-
|
|
|
68
|
-
|
|
67
|
+
| Preference | Storage |
|
|
68
|
+
|------------|---------|
|
|
69
69
|
| pageSize | `user.preferences.{module}.pageSize` |
|
|
70
70
|
| sortColumn/Direction | `user.preferences.{module}.sort*` |
|
|
71
71
|
| filters | `user.preferences.{module}.filters` |
|
|
@@ -78,7 +78,7 @@ export function use{Module}Preferences() {
|
|
|
78
78
|
return {
|
|
79
79
|
pageSize: preferences.{module}?.pageSize ?? 10,
|
|
80
80
|
setPageSize: (size: number) => updatePreference('{module}.pageSize', size),
|
|
81
|
-
// ...
|
|
81
|
+
// ... others
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
```
|
|
@@ -86,34 +86,34 @@ export function use{Module}Preferences() {
|
|
|
86
86
|
## ROUTING (React Router v7)
|
|
87
87
|
|
|
88
88
|
```tsx
|
|
89
|
-
// ✅ CORRECT -
|
|
89
|
+
// ✅ CORRECT - Nested routes
|
|
90
90
|
<Route path="$APPLICATION">
|
|
91
91
|
<Route index element={<Navigate to="$DEFAULT_MODULE" replace />} />
|
|
92
92
|
<Route path="$MODULE1" element={<Module1Page />} />
|
|
93
93
|
</Route>
|
|
94
94
|
|
|
95
|
-
// ❌
|
|
95
|
+
// ❌ FORBIDDEN - Flat routes (cause redirect to Home)
|
|
96
96
|
<Route path="$APPLICATION" element={<Navigate ... />} />
|
|
97
97
|
<Route path="$APPLICATION/$MODULE1" element={...} />
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
## INTEGRATIONS
|
|
101
101
|
|
|
102
|
-
| Skill |
|
|
103
|
-
|
|
104
|
-
| `/notification` |
|
|
105
|
-
| `/workflow` |
|
|
106
|
-
| `/ai-prompt` |
|
|
107
|
-
| `/feature-full` |
|
|
102
|
+
| Skill | When | Action |
|
|
103
|
+
|-------|------|--------|
|
|
104
|
+
| `/notification` | User alerts | INotificationService + SignalR |
|
|
105
|
+
| `/workflow` | Automated emails | IWorkflowService.TriggerAsync |
|
|
106
|
+
| `/ai-prompt` | AI assistance | IAiCompletionService |
|
|
107
|
+
| `/feature-full` | Complete feature | Orchestration all skills |
|
|
108
108
|
|
|
109
|
-
###
|
|
109
|
+
### Notification Integration Pattern
|
|
110
110
|
```csharp
|
|
111
111
|
await _notificationService.SendNotificationAsync(
|
|
112
112
|
userId, NotificationType.{Entity}Created, title, message,
|
|
113
113
|
relatedEntityType: nameof({Entity}), relatedEntityId: entity.Id);
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
###
|
|
116
|
+
### Workflow Integration Pattern
|
|
117
117
|
```csharp
|
|
118
118
|
await _workflowService.TriggerAsync("{entity}.created", new Dictionary<string, object>
|
|
119
119
|
{
|
|
@@ -122,17 +122,17 @@ await _workflowService.TriggerAsync("{entity}.created", new Dictionary<string, o
|
|
|
122
122
|
});
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
##
|
|
125
|
+
## ABSOLUTE RULES
|
|
126
126
|
|
|
127
127
|
| DO | DON'T |
|
|
128
128
|
|----|-------|
|
|
129
|
-
| 4
|
|
130
|
-
| Permissions: 2
|
|
131
|
-
|
|
|
132
|
-
| EntityCard
|
|
133
|
-
| DataTable
|
|
129
|
+
| 4 languages (FR, EN, IT, DE) | Import Infrastructure in frontend |
|
|
130
|
+
| Permissions: 2 files | Direct SQL in frontend |
|
|
131
|
+
| Nested routes | Flat routes (flat siblings) |
|
|
132
|
+
| EntityCard for cards | Manual cards with divs |
|
|
133
|
+
| DataTable for tables | Sequential GUIDs |
|
|
134
134
|
|
|
135
|
-
##
|
|
135
|
+
## ASSOCIATED FILES
|
|
136
136
|
|
|
137
137
|
- [templates-backend.md](templates-backend.md)
|
|
138
138
|
- [templates-frontend.md](templates-frontend.md)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Templates Backend - Application Skill
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> These templates generate C# code for new applications/modules.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## TEMPLATE: PERMISSIONS CLASS
|
|
8
8
|
|
|
9
9
|
```csharp
|
|
10
|
-
//
|
|
10
|
+
// Add to src/SmartStack.Application/Common/Authorization/Permissions.cs
|
|
11
11
|
|
|
12
12
|
public static class $CONTEXT_PASCAL
|
|
13
13
|
{
|
|
@@ -25,7 +25,7 @@ public static class $CONTEXT_PASCAL
|
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
###
|
|
28
|
+
### Example for ERP > Sales > Products
|
|
29
29
|
|
|
30
30
|
```csharp
|
|
31
31
|
public static class Erp
|
|
@@ -412,39 +412,39 @@ services.AddScoped<I$MODULE_PASCALService, $MODULE_PASCALService>();
|
|
|
412
412
|
|
|
413
413
|
---
|
|
414
414
|
|
|
415
|
-
##
|
|
415
|
+
## CHAINING WITH /controller:create
|
|
416
416
|
|
|
417
|
-
|
|
417
|
+
After backend templates generation, the skill automatically calls:
|
|
418
418
|
|
|
419
419
|
```
|
|
420
420
|
/controller:create $AREA $MODULE $ENTITY
|
|
421
421
|
```
|
|
422
422
|
|
|
423
|
-
|
|
423
|
+
Example:
|
|
424
424
|
```
|
|
425
425
|
/controller:create Business Products Product
|
|
426
426
|
```
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
-
|
|
430
|
-
- Endpoints
|
|
428
|
+
This generates:
|
|
429
|
+
- Full CRUD Controller
|
|
430
|
+
- REST Endpoints
|
|
431
431
|
- ProducesResponseType
|
|
432
|
-
-
|
|
433
|
-
-
|
|
432
|
+
- Appropriate logging
|
|
433
|
+
- Postman tests
|
|
434
434
|
|
|
435
435
|
---
|
|
436
436
|
|
|
437
|
-
## CHECKLIST
|
|
438
|
-
|
|
439
|
-
|
|
|
440
|
-
|
|
441
|
-
| ☐ Permissions.cs
|
|
442
|
-
| ☐ Service interface
|
|
443
|
-
| ☐ Service implementation
|
|
444
|
-
| ☐ DTOs
|
|
445
|
-
| ☐ Domain entity
|
|
446
|
-
| ☐ EF Configuration
|
|
447
|
-
| ☐ DbContext
|
|
448
|
-
| ☐ DI registration
|
|
449
|
-
| ☐ /controller:create
|
|
450
|
-
| ☐ dotnet build
|
|
437
|
+
## BACKEND CHECKLIST
|
|
438
|
+
|
|
439
|
+
| Check | Status |
|
|
440
|
+
|-------|--------|
|
|
441
|
+
| ☐ Permissions.cs updated | |
|
|
442
|
+
| ☐ Service interface created | |
|
|
443
|
+
| ☐ Service implementation created | |
|
|
444
|
+
| ☐ DTOs created | |
|
|
445
|
+
| ☐ Domain entity created | |
|
|
446
|
+
| ☐ EF Configuration created | |
|
|
447
|
+
| ☐ DbContext updated | |
|
|
448
|
+
| ☐ DI registration added | |
|
|
449
|
+
| ☐ /controller:create executed | |
|
|
450
|
+
| ☐ dotnet build successful | |
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# Templates Frontend - Application Skill
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> These templates generate React/TypeScript code for new applications/modules.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## ARCHITECTURE
|
|
7
|
+
## FRONTEND ARCHITECTURE
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
web/smartstack-web/src/
|
|
11
11
|
├── pages/$CONTEXT/$MODULE/
|
|
12
|
-
│ ├── $MODULE_PASCALPage.tsx #
|
|
13
|
-
│ ├── $MODULE_PASCALDetailPage.tsx #
|
|
14
|
-
│ └── Create$MODULE_PASCALPage.tsx #
|
|
12
|
+
│ ├── $MODULE_PASCALPage.tsx # Main page (list)
|
|
13
|
+
│ ├── $MODULE_PASCALDetailPage.tsx # Detail page
|
|
14
|
+
│ └── Create$MODULE_PASCALPage.tsx # Create page
|
|
15
15
|
├── components/$MODULE/
|
|
16
|
-
│ ├── $MODULE_PASCALListView.tsx #
|
|
17
|
-
│ ├── $MODULE_PASCALForm.tsx #
|
|
18
|
-
│ └── $MODULE_PASCALFilters.tsx #
|
|
16
|
+
│ ├── $MODULE_PASCALListView.tsx # Reusable list component
|
|
17
|
+
│ ├── $MODULE_PASCALForm.tsx # CRUD form
|
|
18
|
+
│ └── $MODULE_PASCALFilters.tsx # Filters
|
|
19
19
|
├── components/common/
|
|
20
|
-
│ └── (
|
|
20
|
+
│ └── (shared components)
|
|
21
21
|
├── hooks/
|
|
22
|
-
│ ├── use$MODULE_PASCALPreferences.ts #
|
|
23
|
-
│ └── use$MODULE_PASCAL.ts #
|
|
22
|
+
│ ├── use$MODULE_PASCALPreferences.ts # Preferences hook
|
|
23
|
+
│ └── use$MODULE_PASCAL.ts # API hook
|
|
24
24
|
├── services/api/
|
|
25
|
-
│ └── $moduleApi.ts #
|
|
25
|
+
│ └── $moduleApi.ts # API service
|
|
26
26
|
└── i18n/locales/
|
|
27
27
|
├── fr/$module.json
|
|
28
28
|
├── en/$module.json
|
|
@@ -32,7 +32,7 @@ web/smartstack-web/src/
|
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
|
-
## TEMPLATE: PAGE
|
|
35
|
+
## TEMPLATE: MAIN PAGE
|
|
36
36
|
|
|
37
37
|
```tsx
|
|
38
38
|
// pages/$CONTEXT/$MODULE/$MODULE_PASCALPage.tsx
|
|
@@ -56,7 +56,7 @@ export function $MODULE_PASCALPage() {
|
|
|
56
56
|
|
|
57
57
|
---
|
|
58
58
|
|
|
59
|
-
## TEMPLATE:
|
|
59
|
+
## TEMPLATE: LIST VIEW (Reusable component)
|
|
60
60
|
|
|
61
61
|
```tsx
|
|
62
62
|
// components/$MODULE/$MODULE_PASCALListView.tsx
|
|
@@ -70,7 +70,7 @@ import { use$MODULE_PASCALPreferences } from '@/hooks/use$MODULE_PASCALPreferenc
|
|
|
70
70
|
import { Pagination } from '@/components/common/Pagination';
|
|
71
71
|
import { ColumnSelector } from '@/components/common/ColumnSelector';
|
|
72
72
|
import { ViewModeToggle } from '@/components/common/ViewModeToggle';
|
|
73
|
-
import { EntityCard } from '@/components/ui/EntityCard'; // ⚠️
|
|
73
|
+
import { EntityCard } from '@/components/ui/EntityCard'; // ⚠️ MANDATORY for Grid view
|
|
74
74
|
|
|
75
75
|
interface $ENTITY_PASCALDto {
|
|
76
76
|
id: string;
|
|
@@ -320,7 +320,7 @@ export function $MODULE_PASCALListView({
|
|
|
320
320
|
</table>
|
|
321
321
|
</div>
|
|
322
322
|
) : (
|
|
323
|
-
/* Grid view - ⚠️
|
|
323
|
+
/* Grid view - ⚠️ MANDATORY: use EntityCard */
|
|
324
324
|
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
|
325
325
|
{data?.items.map((item) => (
|
|
326
326
|
<EntityCard
|
|
@@ -361,7 +361,7 @@ export function $MODULE_PASCALListView({
|
|
|
361
361
|
|
|
362
362
|
---
|
|
363
363
|
|
|
364
|
-
## TEMPLATE: HOOK
|
|
364
|
+
## TEMPLATE: PREFERENCES HOOK
|
|
365
365
|
|
|
366
366
|
```tsx
|
|
367
367
|
// hooks/use$MODULE_PASCALPreferences.ts
|
|
@@ -477,25 +477,25 @@ export const $moduleApi = {
|
|
|
477
477
|
|
|
478
478
|
## TEMPLATE: ROUTES (App.tsx)
|
|
479
479
|
|
|
480
|
-
### ⚠️
|
|
480
|
+
### ⚠️ CRITICAL RULE: NESTED ROUTES MANDATORY
|
|
481
481
|
|
|
482
|
-
React Router v7 **
|
|
482
|
+
React Router v7 **requires** nested routes for multi-module applications.
|
|
483
483
|
|
|
484
|
-
**❌
|
|
484
|
+
**❌ FORBIDDEN - Flat routes (cause redirects to Home)**
|
|
485
485
|
```tsx
|
|
486
486
|
<Route path="$APPLICATION" element={<Navigate to="/$CONTEXT/$APPLICATION/$DEFAULT_MODULE" replace />} />
|
|
487
487
|
<Route path="$APPLICATION/$MODULE" element={<$MODULE_PASCALPage />} />
|
|
488
488
|
```
|
|
489
489
|
|
|
490
|
-
**✅
|
|
490
|
+
**✅ MANDATORY - Nested routes with index**
|
|
491
491
|
```tsx
|
|
492
|
-
//
|
|
492
|
+
// Add to App.tsx
|
|
493
493
|
|
|
494
494
|
import { $MODULE_PASCALPage } from '@/pages/$CONTEXT/$MODULE/$MODULE_PASCALPage';
|
|
495
495
|
import { $MODULE_PASCALDetailPage } from '@/pages/$CONTEXT/$MODULE/$MODULE_PASCALDetailPage';
|
|
496
496
|
import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$MODULE/Create$MODULE_PASCALPage';
|
|
497
497
|
|
|
498
|
-
//
|
|
498
|
+
// In routes - NESTED STRUCTURE
|
|
499
499
|
<Route path="$APPLICATION">
|
|
500
500
|
<Route index element={<Navigate to="$DEFAULT_MODULE" replace />} />
|
|
501
501
|
<Route path="$MODULE" element={<$MODULE_PASCALPage />} />
|
|
@@ -505,27 +505,27 @@ import { Create$MODULE_PASCALPage } from '@/pages/$CONTEXT/$MODULE/Create$MODULE
|
|
|
505
505
|
</Route>
|
|
506
506
|
```
|
|
507
507
|
|
|
508
|
-
###
|
|
508
|
+
### Why this structure?
|
|
509
509
|
|
|
510
|
-
| Aspect |
|
|
511
|
-
|
|
512
|
-
| Matching |
|
|
513
|
-
| Navigate |
|
|
514
|
-
| Outlet |
|
|
515
|
-
| Redirect |
|
|
510
|
+
| Aspect | Flat routes | Nested routes |
|
|
511
|
+
|--------|------------|----------------|
|
|
512
|
+
| Matching | Ambiguous between siblings | Hierarchical clear |
|
|
513
|
+
| Navigate | Must be absolute | Can be relative |
|
|
514
|
+
| Outlet | Not supported | Supported |
|
|
515
|
+
| Redirect | Can fail | Always works |
|
|
516
516
|
|
|
517
517
|
---
|
|
518
518
|
|
|
519
|
-
## CHECKLIST
|
|
520
|
-
|
|
521
|
-
|
|
|
522
|
-
|
|
523
|
-
| ☐
|
|
524
|
-
| ☐
|
|
525
|
-
| ☐
|
|
526
|
-
| ☐
|
|
527
|
-
| ☐ Routes
|
|
528
|
-
| ☐
|
|
529
|
-
| ☐
|
|
530
|
-
| ☐ npm run build
|
|
531
|
-
| ☐ npm run lint
|
|
519
|
+
## FRONTEND CHECKLIST
|
|
520
|
+
|
|
521
|
+
| Check | Status |
|
|
522
|
+
|-------|--------|
|
|
523
|
+
| ☐ Main page created | |
|
|
524
|
+
| ☐ ListView component created | |
|
|
525
|
+
| ☐ Preferences hook created | |
|
|
526
|
+
| ☐ API service created | |
|
|
527
|
+
| ☐ Routes added to App.tsx | |
|
|
528
|
+
| ☐ Uses apiClient (no direct calls) | |
|
|
529
|
+
| ☐ No Infrastructure imports | |
|
|
530
|
+
| ☐ npm run build successful | |
|
|
531
|
+
| ☐ npm run lint successful | |
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Templates i18n - Application Skill
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> These templates generate translation files for the 4 mandatory languages.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## STRUCTURE
|
|
7
|
+
## FILE STRUCTURE
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
web/smartstack-web/src/i18n/locales/
|
|
11
|
-
├── fr/$module.json #
|
|
11
|
+
├── fr/$module.json # French (main language)
|
|
12
12
|
├── en/$module.json # English
|
|
13
13
|
├── it/$module.json # Italiano
|
|
14
14
|
└── de/$module.json # Deutsch
|
|
@@ -16,7 +16,7 @@ web/smartstack-web/src/i18n/locales/
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## TEMPLATE:
|
|
19
|
+
## TEMPLATE: FRENCH (fr/$module.json)
|
|
20
20
|
|
|
21
21
|
```json
|
|
22
22
|
{
|
|
@@ -194,7 +194,7 @@ web/smartstack-web/src/i18n/locales/
|
|
|
194
194
|
|
|
195
195
|
---
|
|
196
196
|
|
|
197
|
-
## TEMPLATE:
|
|
197
|
+
## TEMPLATE: ITALIAN (it/$module.json)
|
|
198
198
|
|
|
199
199
|
```json
|
|
200
200
|
{
|
|
@@ -283,7 +283,7 @@ web/smartstack-web/src/i18n/locales/
|
|
|
283
283
|
|
|
284
284
|
---
|
|
285
285
|
|
|
286
|
-
## TEMPLATE:
|
|
286
|
+
## TEMPLATE: GERMAN (de/$module.json)
|
|
287
287
|
|
|
288
288
|
```json
|
|
289
289
|
{
|
|
@@ -372,9 +372,9 @@ web/smartstack-web/src/i18n/locales/
|
|
|
372
372
|
|
|
373
373
|
---
|
|
374
374
|
|
|
375
|
-
##
|
|
375
|
+
## UPDATE NAVIGATION.JSON
|
|
376
376
|
|
|
377
|
-
|
|
377
|
+
For each navigation entity created, update the `navigation.json` files:
|
|
378
378
|
|
|
379
379
|
### fr/navigation.json
|
|
380
380
|
|
|
@@ -430,18 +430,18 @@ Pour chaque entité de navigation créée, mettre à jour les fichiers `navigati
|
|
|
430
430
|
|
|
431
431
|
---
|
|
432
432
|
|
|
433
|
-
##
|
|
433
|
+
## i18n REGISTRATION
|
|
434
434
|
|
|
435
|
-
|
|
435
|
+
Add the namespace to `i18n/index.ts`:
|
|
436
436
|
|
|
437
437
|
```typescript
|
|
438
|
-
//
|
|
438
|
+
// Add the import
|
|
439
439
|
import $module_fr from './locales/fr/$module.json';
|
|
440
440
|
import $module_en from './locales/en/$module.json';
|
|
441
441
|
import $module_it from './locales/it/$module.json';
|
|
442
442
|
import $module_de from './locales/de/$module.json';
|
|
443
443
|
|
|
444
|
-
//
|
|
444
|
+
// Add to resources
|
|
445
445
|
resources: {
|
|
446
446
|
fr: {
|
|
447
447
|
// ... existing
|
|
@@ -464,7 +464,7 @@ resources: {
|
|
|
464
464
|
|
|
465
465
|
---
|
|
466
466
|
|
|
467
|
-
##
|
|
467
|
+
## COMPLETE EXAMPLE: "Products" Module
|
|
468
468
|
|
|
469
469
|
### Variables
|
|
470
470
|
|
|
@@ -488,31 +488,31 @@ $SUBTITLE_DE = Verwalten Sie Ihren Produktkatalog
|
|
|
488
488
|
|
|
489
489
|
---
|
|
490
490
|
|
|
491
|
-
## CHECKLIST
|
|
491
|
+
## i18n CHECKLIST
|
|
492
492
|
|
|
493
|
-
|
|
|
494
|
-
|
|
495
|
-
| ☐ fr/$module.json
|
|
496
|
-
| ☐ en/$module.json
|
|
497
|
-
| ☐ it/$module.json
|
|
498
|
-
| ☐ de/$module.json
|
|
499
|
-
| ☐ navigation.json
|
|
500
|
-
| ☐ Namespace
|
|
501
|
-
| ☐
|
|
502
|
-
| ☐
|
|
493
|
+
| Check | Status |
|
|
494
|
+
|-------|--------|
|
|
495
|
+
| ☐ fr/$module.json created | |
|
|
496
|
+
| ☐ en/$module.json created | |
|
|
497
|
+
| ☐ it/$module.json created | |
|
|
498
|
+
| ☐ de/$module.json created | |
|
|
499
|
+
| ☐ navigation.json updated (4 languages) | |
|
|
500
|
+
| ☐ Namespace registered in i18n/index.ts | |
|
|
501
|
+
| ☐ All keys present in 4 files | |
|
|
502
|
+
| ☐ No missing keys | |
|
|
503
503
|
|
|
504
504
|
---
|
|
505
505
|
|
|
506
|
-
##
|
|
506
|
+
## VALIDATION TOOLS
|
|
507
507
|
|
|
508
508
|
```bash
|
|
509
|
-
#
|
|
510
|
-
# Script
|
|
509
|
+
# Verify that all keys are present in 4 languages
|
|
510
|
+
# Script to run from web/smartstack-web
|
|
511
511
|
|
|
512
|
-
#
|
|
512
|
+
# List keys from French file (reference)
|
|
513
513
|
jq -r 'paths(scalars) | join(".")' src/i18n/locales/fr/$module.json > /tmp/fr_keys.txt
|
|
514
514
|
|
|
515
|
-
# Compare
|
|
515
|
+
# Compare with other languages
|
|
516
516
|
for lang in en it de; do
|
|
517
517
|
jq -r 'paths(scalars) | join(".")' src/i18n/locales/$lang/$module.json > /tmp/${lang}_keys.txt
|
|
518
518
|
diff /tmp/fr_keys.txt /tmp/${lang}_keys.txt
|