@atlashub/smartstack-cli 3.37.0 → 3.39.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 +16 -24
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +235 -265
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +1 -1
- package/scripts/extract-api-endpoints.ts +5 -5
- package/scripts/generate-doc-with-mock-ui.ts +10 -17
- package/templates/agents/ba-reader.md +9 -9
- package/templates/agents/ba-writer.md +12 -15
- package/templates/agents/code-reviewer.md +1 -1
- package/templates/agents/docs-context-reader.md +1 -1
- package/templates/agents/efcore/scan.md +3 -1
- package/templates/agents/gitflow/commit.md +74 -0
- package/templates/agents/gitflow/finish.md +5 -2
- package/templates/agents/gitflow/init-clone.md +3 -3
- package/templates/agents/gitflow/init-validate.md +3 -2
- package/templates/agents/gitflow/merge.md +5 -4
- package/templates/agents/gitflow/pr.md +5 -4
- package/templates/agents/gitflow/start.md +37 -5
- package/templates/hooks/hooks.json +11 -0
- package/templates/hooks/wsl-dotnet-cleanup.sh +24 -0
- package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
- package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
- package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
- package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
- package/templates/skills/_shared.md +15 -17
- package/templates/skills/ai-prompt/SKILL.md +1 -1
- package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
- package/templates/skills/apex/SKILL.md +3 -4
- package/templates/skills/apex/_shared.md +10 -20
- package/templates/skills/apex/references/analysis-methods.md +141 -0
- package/templates/skills/apex/references/challenge-questions.md +1 -21
- package/templates/skills/apex/references/core-seed-data.md +35 -58
- package/templates/skills/apex/references/examine-build-validation.md +82 -0
- package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
- package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
- package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
- package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
- package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
- package/templates/skills/apex/references/post-checks.md +145 -40
- package/templates/skills/apex/references/smartstack-api.md +35 -51
- package/templates/skills/apex/references/smartstack-frontend.md +18 -18
- package/templates/skills/apex/references/smartstack-layers.md +38 -62
- package/templates/skills/apex/steps/step-00-init.md +14 -26
- package/templates/skills/apex/steps/step-01-analyze.md +10 -143
- package/templates/skills/apex/steps/step-02-plan.md +10 -92
- package/templates/skills/apex/steps/step-03-execute.md +45 -252
- package/templates/skills/apex/steps/step-04-examine.md +14 -78
- package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
- package/templates/skills/apex/steps/step-08-run-tests.md +1 -0
- package/templates/skills/application/SKILL.md +241 -242
- package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
- package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
- package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
- package/templates/skills/application/references/backend-verification.md +1 -1
- package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
- package/templates/skills/application/references/frontend-route-naming.md +117 -0
- package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
- package/templates/skills/application/references/frontend-verification.md +12 -12
- package/templates/skills/application/references/init-parameter-detection.md +121 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +199 -200
- package/templates/skills/application/references/provider-template.md +2 -6
- package/templates/skills/application/references/roles-client-project-handling.md +55 -0
- package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
- package/templates/skills/application/references/test-coverage-requirements.md +213 -0
- package/templates/skills/application/references/test-frontend.md +3 -3
- package/templates/skills/application/steps/step-00-init.md +130 -260
- package/templates/skills/application/steps/step-01-navigation.md +170 -170
- package/templates/skills/application/steps/step-02-permissions.md +196 -196
- package/templates/skills/application/steps/step-03-roles.md +182 -339
- package/templates/skills/application/steps/step-03b-provider.md +133 -134
- package/templates/skills/application/steps/step-04-backend.md +174 -265
- package/templates/skills/application/steps/step-05-frontend.md +18 -144
- package/templates/skills/application/steps/step-06-migration.md +12 -60
- package/templates/skills/application/steps/step-07-tests.md +9 -76
- package/templates/skills/application/templates-backend.md +29 -27
- package/templates/skills/application/templates-frontend.md +49 -49
- package/templates/skills/application/templates-seed.md +57 -131
- package/templates/skills/business-analyse/SKILL.md +27 -30
- package/templates/skills/business-analyse/_architecture.md +6 -6
- package/templates/skills/business-analyse/_shared.md +60 -88
- package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
- package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
- package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +12 -12
- package/templates/skills/business-analyse/react/components.md +8 -12
- package/templates/skills/business-analyse/react/schema.md +836 -836
- package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
- package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
- package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
- package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
- package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
- package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
- package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
- package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
- package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
- package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
- package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
- package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
- package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
- package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
- package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
- package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
- package/templates/skills/business-analyse/references/prd-generation.md +2 -2
- package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
- package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
- package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
- package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
- package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
- package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
- package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
- package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
- package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
- package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
- package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
- package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
- package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
- package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
- package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
- package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
- package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
- package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
- package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
- package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
- package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
- package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
- package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
- package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
- package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
- package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
- package/templates/skills/business-analyse/templates/tpl-progress.md +1 -1
- package/templates/skills/business-analyse/templates-frd.md +25 -25
- package/templates/skills/business-analyse/templates-react.md +15 -21
- package/templates/skills/controller/SKILL.md +1 -1
- package/templates/skills/controller/postman-templates.md +1 -1
- package/templates/skills/controller/references/controller-code-templates.md +2 -2
- package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
- package/templates/skills/controller/references/permission-sync-templates.md +13 -16
- package/templates/skills/controller/steps/step-00-init.md +11 -11
- package/templates/skills/controller/steps/step-03-generate.md +64 -103
- package/templates/skills/controller/templates.md +67 -71
- package/templates/skills/debug/SKILL.md +13 -218
- package/templates/skills/debug/steps/step-00-init.md +57 -0
- package/templates/skills/debug/steps/step-01-analyze.md +219 -0
- package/templates/skills/debug/steps/step-02-resolve.md +85 -0
- package/templates/skills/documentation/SKILL.md +49 -345
- package/templates/skills/documentation/data-schema.md +11 -8
- package/templates/skills/documentation/steps/step-00-init.md +70 -0
- package/templates/skills/documentation/steps/step-01-scan.md +113 -0
- package/templates/skills/documentation/steps/step-02-generate.md +231 -0
- package/templates/skills/documentation/steps/step-03-validate.md +238 -0
- package/templates/skills/documentation/templates.md +480 -322
- package/templates/skills/efcore/SKILL.md +1 -1
- package/templates/skills/efcore/references/both-contexts.md +32 -0
- package/templates/skills/efcore/references/database-operations.md +67 -0
- package/templates/skills/efcore/references/destructive-operations.md +38 -0
- package/templates/skills/efcore/references/reset-operations.md +81 -0
- package/templates/skills/efcore/references/seed-methods.md +86 -0
- package/templates/skills/efcore/references/shared-init-functions.md +250 -0
- package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
- package/templates/skills/efcore/references/troubleshooting.md +81 -0
- package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
- package/templates/skills/efcore/steps/db/step-reset.md +7 -103
- package/templates/skills/efcore/steps/db/step-seed.md +10 -132
- package/templates/skills/efcore/steps/db/step-status.md +5 -44
- package/templates/skills/efcore/steps/migration/step-02-create.md +1 -14
- package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
- package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
- package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
- package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
- package/templates/skills/feature-full/SKILL.md +1 -1
- package/templates/skills/feature-full/steps/step-00-init.md +57 -0
- package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
- package/templates/skills/gitflow/SKILL.md +28 -5
- package/templates/skills/gitflow/_shared.md +109 -12
- package/templates/skills/gitflow/phases/abort.md +4 -0
- package/templates/skills/gitflow/phases/cleanup.md +4 -0
- package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
- package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
- package/templates/skills/gitflow/references/finish-cleanup.md +55 -0
- package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
- package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
- package/templates/skills/gitflow/references/init-questions.md +185 -0
- package/templates/skills/gitflow/references/init-structure-creation.md +75 -0
- package/templates/skills/gitflow/references/init-version-detection.md +21 -0
- package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
- package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
- package/templates/skills/gitflow/references/merge-execution.md +62 -0
- package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
- package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
- package/templates/skills/gitflow/references/pr-generation.md +58 -0
- package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
- package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
- package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
- package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
- package/templates/skills/gitflow/steps/step-commit.md +12 -91
- package/templates/skills/gitflow/steps/step-finish.md +15 -159
- package/templates/skills/gitflow/steps/step-init.md +24 -326
- package/templates/skills/gitflow/steps/step-merge.md +17 -176
- package/templates/skills/gitflow/steps/step-pr.md +10 -116
- package/templates/skills/gitflow/steps/step-start.md +16 -109
- package/templates/skills/gitflow/steps/step-sync.md +6 -69
- package/templates/skills/ralph-loop/SKILL.md +6 -0
- package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
- package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
- package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
- package/templates/skills/ralph-loop/references/module-transition.md +151 -0
- package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
- package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
- package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
- package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
- package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
- package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
- package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
- package/templates/skills/ralph-loop/steps/step-04-check.md +20 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +568 -568
- package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
- package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
- package/templates/skills/validate-feature/steps/step-01-compile.md +1 -3
- package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
- package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
- package/templates/skills/workflow/SKILL.md +1 -1
- package/templates/skills/workflow/steps/step-00-init.md +57 -0
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
export interface NavRoute {
|
|
14
|
-
/** NavRoute path (e.g., "
|
|
14
|
+
/** NavRoute path (e.g., "administration.users") */
|
|
15
15
|
navRoute: string;
|
|
16
|
-
/** API endpoint path (e.g., "/api/
|
|
16
|
+
/** API endpoint path (e.g., "/api/administration/users") */
|
|
17
17
|
api: string;
|
|
18
|
-
/** Frontend route path (e.g., "/
|
|
18
|
+
/** Frontend route path (e.g., "/administration/users") */
|
|
19
19
|
web: string;
|
|
20
20
|
/** Required permissions to access this route */
|
|
21
21
|
permissions: string[];
|
|
@@ -72,43 +72,43 @@ export function hasRoutePermission(navRoute: string, userPermissions: string[]):
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
* Get all routes for
|
|
75
|
+
* Get all routes for an application (e.g., "administration")
|
|
76
76
|
*/
|
|
77
|
-
export function
|
|
78
|
-
return Object.values(ROUTES).filter(r => r.navRoute.startsWith(`${
|
|
77
|
+
export function getRoutesByApplication(application: string): NavRoute[] {
|
|
78
|
+
return Object.values(ROUTES).filter(r => r.navRoute.startsWith(`${application}.`));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
* Get all routes for
|
|
82
|
+
* Get all routes for an application and module (e.g., "administration.users")
|
|
83
83
|
*/
|
|
84
|
-
export function
|
|
85
|
-
const prefix = `${
|
|
84
|
+
export function getRoutesByModule(application: string, module: string): NavRoute[] {
|
|
85
|
+
const prefix = `${application}.${module}`;
|
|
86
86
|
return Object.values(ROUTES).filter(r => r.navRoute.startsWith(`${prefix}.`) || r.navRoute === prefix);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* Get all unique
|
|
90
|
+
* Get all unique applications
|
|
91
91
|
*/
|
|
92
|
-
export function
|
|
93
|
-
const
|
|
92
|
+
export function getApplications(): string[] {
|
|
93
|
+
const applications = new Set<string>();
|
|
94
94
|
for (const route of Object.values(ROUTES)) {
|
|
95
|
-
|
|
95
|
+
applications.add(route.navRoute.split('.')[0]);
|
|
96
96
|
}
|
|
97
|
-
return Array.from(
|
|
97
|
+
return Array.from(applications);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
|
-
* Get all unique
|
|
101
|
+
* Get all unique modules within an application
|
|
102
102
|
*/
|
|
103
|
-
export function
|
|
104
|
-
const
|
|
103
|
+
export function getModules(application: string): string[] {
|
|
104
|
+
const modules = new Set<string>();
|
|
105
105
|
for (const route of Object.values(ROUTES)) {
|
|
106
106
|
const parts = route.navRoute.split('.');
|
|
107
|
-
if (parts[0] ===
|
|
108
|
-
|
|
107
|
+
if (parts[0] === application && parts.length >= 2) {
|
|
108
|
+
modules.add(parts[1]);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
return Array.from(
|
|
111
|
+
return Array.from(modules);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/**
|
|
@@ -19,7 +19,7 @@ import { ProtectedRoute, PermissionGuard } from './guards';
|
|
|
19
19
|
// Layouts
|
|
20
20
|
// ============================================================================
|
|
21
21
|
|
|
22
|
-
{{#each
|
|
22
|
+
{{#each applications}}
|
|
23
23
|
import { {{capitalize this}}Layout } from '../layouts/{{capitalize this}}Layout';
|
|
24
24
|
{{/each}}
|
|
25
25
|
|
|
@@ -52,38 +52,30 @@ const routes: RouteObject[] = [
|
|
|
52
52
|
element: <Navigate to="{{defaultPath}}" replace />,
|
|
53
53
|
},
|
|
54
54
|
|
|
55
|
-
{{#each
|
|
56
|
-
// {{uppercase @key}}
|
|
55
|
+
{{#each applicationTree}}
|
|
56
|
+
// {{uppercase @key}} Application
|
|
57
57
|
{
|
|
58
58
|
path: '{{@key}}',
|
|
59
59
|
element: <{{capitalize @key}}Layout />,
|
|
60
60
|
children: [
|
|
61
61
|
{{#each this}}
|
|
62
|
-
// {{uppercase @key}} Application
|
|
63
62
|
{
|
|
64
|
-
path: '{{
|
|
65
|
-
children: [
|
|
66
|
-
{{#each this}}
|
|
67
|
-
{
|
|
68
|
-
path: '{{modulePath this.navRoute}}',
|
|
63
|
+
path: '{{modulePath this.navRoute}}',
|
|
69
64
|
{{#if this.permissions.length}}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
element: (
|
|
66
|
+
<PermissionGuard permissions={ROUTES['{{this.navRoute}}'].permissions}>
|
|
67
|
+
<Suspense fallback={<PageLoader />}>
|
|
68
|
+
<{{pageName this.navRoute}}Page />
|
|
69
|
+
</Suspense>
|
|
70
|
+
</PermissionGuard>
|
|
71
|
+
),
|
|
77
72
|
{{else}}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
element: (
|
|
74
|
+
<Suspense fallback={<PageLoader />}>
|
|
75
|
+
<{{pageName this.navRoute}}Page />
|
|
76
|
+
</Suspense>
|
|
77
|
+
),
|
|
83
78
|
{{/if}}
|
|
84
|
-
},
|
|
85
|
-
{{/each}}
|
|
86
|
-
],
|
|
87
79
|
},
|
|
88
80
|
{{/each}}
|
|
89
81
|
],
|
|
@@ -152,8 +152,8 @@ public partial class {{migrationName}} : Migration
|
|
|
152
152
|
FROM core.auth_Permissions
|
|
153
153
|
WHERE IsDeleted = 0
|
|
154
154
|
AND Code NOT LIKE '%.delete'
|
|
155
|
-
AND Code NOT LIKE '
|
|
156
|
-
AND Code NOT LIKE '
|
|
155
|
+
AND Code NOT LIKE 'administration.users.%'
|
|
156
|
+
AND Code NOT LIKE 'administration.roles.%';
|
|
157
157
|
|
|
158
158
|
PRINT 'Read, create, update permissions granted to Contributor (excluding user management)';
|
|
159
159
|
END
|
|
@@ -129,9 +129,9 @@ FOR each module:
|
|
|
129
129
|
"issues": [
|
|
130
130
|
{
|
|
131
131
|
"type": "endpoint_mismatch",
|
|
132
|
-
"documented": ["GET /api/
|
|
133
|
-
"actual": ["GET /api/
|
|
134
|
-
"message": "Endpoint PATCH /api/
|
|
132
|
+
"documented": ["GET /api/support/sla", "POST /api/support/sla"],
|
|
133
|
+
"actual": ["GET /api/support/sla", "POST /api/support/sla", "PATCH /api/support/sla/{id}/status"],
|
|
134
|
+
"message": "Endpoint PATCH /api/support/sla/{id}/status exists in code but not in documentation"
|
|
135
135
|
}
|
|
136
136
|
]
|
|
137
137
|
}
|
|
@@ -19,11 +19,11 @@ Domain → Application → Infrastructure → API → Web
|
|
|
19
19
|
### Layers
|
|
20
20
|
| Layer | Responsibility | Namespace | Folder Hierarchy |
|
|
21
21
|
|-------|-----------------|-----------|------------------|
|
|
22
|
-
| Domain | Entities, ValueObjects | `SmartStack.Domain.{
|
|
23
|
-
| Application | Interfaces (Common), DTOs | `SmartStack.Application.Common.Interfaces` / `.{
|
|
24
|
-
| Infrastructure | Service Impl, EF Core | `SmartStack.Infrastructure.Services.{
|
|
25
|
-
| API | Controllers, Middleware | `SmartStack.Api.Controllers
|
|
26
|
-
| Web | React components, pages | N/A | `pages/{
|
|
22
|
+
| Domain | Entities, ValueObjects | `SmartStack.Domain.{App}.{Module}` | `Domain/{App}/{Module}/` |
|
|
23
|
+
| Application | Interfaces (Common), DTOs | `SmartStack.Application.Common.Interfaces` / `.{App}.{Module}.DTOs` | `Application/Common/Interfaces/` + `Application/{App}/{Module}/DTOs/` |
|
|
24
|
+
| Infrastructure | Service Impl, EF Core | `SmartStack.Infrastructure.Services.{App}.{Module}` | `Infrastructure/Services/{App}/{Module}/` + `Persistence/Configurations/{App}/{Module}/` |
|
|
25
|
+
| API | Controllers, Middleware | `SmartStack.Api.Controllers` | `Api/Controllers/` |
|
|
26
|
+
| Web | React components, pages | N/A | `pages/{app}/{module}/` + `components/{module}/` |
|
|
27
27
|
|
|
28
28
|
## Permissions (2 mandatory files)
|
|
29
29
|
|
|
@@ -31,10 +31,10 @@ Domain → Application → Infrastructure → API → Web
|
|
|
31
31
|
```csharp
|
|
32
32
|
public static class {Module}
|
|
33
33
|
{
|
|
34
|
-
public const string View = "{
|
|
35
|
-
public const string Create = "{
|
|
36
|
-
public const string Update = "{
|
|
37
|
-
public const string Delete = "{
|
|
34
|
+
public const string View = "{app}.{module}.view";
|
|
35
|
+
public const string Create = "{app}.{module}.create";
|
|
36
|
+
public const string Update = "{app}.{module}.update";
|
|
37
|
+
public const string Delete = "{app}.{module}.delete";
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -59,14 +59,12 @@ builder.HasData(
|
|
|
59
59
|
### i18n Structure
|
|
60
60
|
```json
|
|
61
61
|
{
|
|
62
|
-
"{
|
|
63
|
-
"{
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"messages": { ... }
|
|
69
|
-
}
|
|
62
|
+
"{application}": {
|
|
63
|
+
"{module}": {
|
|
64
|
+
"title": "...",
|
|
65
|
+
"fields": { ... },
|
|
66
|
+
"actions": { ... },
|
|
67
|
+
"messages": { ... }
|
|
70
68
|
}
|
|
71
69
|
}
|
|
72
70
|
}
|
|
@@ -60,7 +60,7 @@ JSON Schema for validation: Code, Name, JsonSchema, DotNetType
|
|
|
60
60
|
|
|
61
61
|
## Implementation
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Start with [steps/step-00-init.md](steps/step-00-init.md) to gather requirements, then proceed to [steps/step-01-implementation.md](steps/step-01-implementation.md) for:
|
|
64
64
|
- Workflow steps (define use case, create prompt, define schema, execute)
|
|
65
65
|
- AI service interfaces (IAiCompletionService, IPromptService)
|
|
66
66
|
- Frontend integration (API, hooks, components)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Step 0: Initialization
|
|
2
|
+
|
|
3
|
+
## YOUR TASK
|
|
4
|
+
Gather context about the AI integration requirements before implementation.
|
|
5
|
+
|
|
6
|
+
## EXECUTION SEQUENCE
|
|
7
|
+
|
|
8
|
+
### 1. Identify AI Use Case
|
|
9
|
+
- What type of AI integration? (prompt execution, chat, content generation, validation, analysis)
|
|
10
|
+
- What model/provider should be used? (Claude, GPT-4, GPT-4o, Gemini, local model)
|
|
11
|
+
- What is the input schema? (user query, structured data, multiple parameters)
|
|
12
|
+
- What is the expected output? (text, JSON, structured object, classification)
|
|
13
|
+
|
|
14
|
+
### 2. Check Existing Patterns
|
|
15
|
+
- Search existing `Application/Common/Interfaces/IAiCompletionService` usage
|
|
16
|
+
- Identify reusable patterns: AiProviderInstance configuration, OutputSchema definitions
|
|
17
|
+
- Check for existing Prompt entities with similar use cases
|
|
18
|
+
- Review error handling patterns for API failures and quota limits
|
|
19
|
+
|
|
20
|
+
### 3. Plan Implementation
|
|
21
|
+
- Determine required files:
|
|
22
|
+
- Prompt entity and PromptBlock creation
|
|
23
|
+
- OutputSchema if structured response needed
|
|
24
|
+
- Service integration with IAiCompletionService
|
|
25
|
+
- Frontend API client and React hook
|
|
26
|
+
- Identify dependencies:
|
|
27
|
+
- Which AI provider instance to use? (API keys, budget limits)
|
|
28
|
+
- Token budget and cost implications
|
|
29
|
+
- Error handling strategy (fallback provider, graceful degradation)
|
|
30
|
+
- Map variables and placeholders for dynamic content
|
|
31
|
+
|
|
32
|
+
### 4. Define Success Criteria
|
|
33
|
+
- Prompt executes with correct model and parameters
|
|
34
|
+
- Response validates against OutputSchema (if applicable)
|
|
35
|
+
- Token usage logged and budget respected
|
|
36
|
+
- Error handling covers API downtime and quota exhaustion
|
|
37
|
+
- Frontend integrates with loading/error states
|
|
38
|
+
|
|
39
|
+
## SUCCESS METRICS
|
|
40
|
+
- AI use case clearly identified and documented
|
|
41
|
+
- Implementation plan with all required files listed
|
|
42
|
+
- Dependencies identified (provider instance, budget, error handling)
|
|
43
|
+
- Decision on structured vs. unstructured response
|
|
44
|
+
- Token budget and cost reviewed
|
|
45
|
+
|
|
46
|
+
## NEXT STEP
|
|
47
|
+
Proceed to `./step-01-implementation.md` to implement the Prompt, OutputSchema, Service integration, and Frontend components.
|
|
@@ -11,7 +11,7 @@ argument-hint: "[-a] [-x] [-s] [-e] [-r] [-pr] <task description>"
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
<objective>
|
|
14
|
-
Execute incremental SmartStack development using the APEX methodology. This skill knows the SmartStack hierarchy (
|
|
14
|
+
Execute incremental SmartStack development using the APEX methodology. This skill knows the SmartStack hierarchy (application/module/section/resource), delegates code creation to existing skills (/controller, /application, /ui-components, /efcore, /notification, /workflow) and MCP tools, and validates via MCP conventions.
|
|
15
15
|
|
|
16
16
|
**Key principle:** /apex ORCHESTRATES — it never generates SmartStack code directly. All generation goes through skills and MCP tools.
|
|
17
17
|
</objective>
|
|
@@ -57,7 +57,6 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
57
57
|
| `{delegate_mode}` | boolean | Delegated by `/ralph-loop` via `-d` flag |
|
|
58
58
|
| `{delegate_prd_path}` | string? | Path to PRD file (`.ralph/prd.json` or `.ralph/prd-{module}.json`) |
|
|
59
59
|
| `{foundation_mode}` | boolean | Foundation mode: entities-only (no services/controllers/frontend). Used by ralph-loop Phase 0. |
|
|
60
|
-
| `{context_code}` | string | "business", "platform", "personal" |
|
|
61
60
|
| `{app_name}` | string | Application name |
|
|
62
61
|
| `{module_code}` | string | Module code |
|
|
63
62
|
| `{sections}` | object[] | Sections (MANDATORY, min 1) with code/labels/icon/displayOrder |
|
|
@@ -84,7 +83,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
84
83
|
|
|
85
84
|
| Step | File | Model | Purpose |
|
|
86
85
|
|------|------|-------|---------|
|
|
87
|
-
| 00 | `steps/step-00-init.md` | Sonnet | Parse flags, detect
|
|
86
|
+
| 00 | `steps/step-00-init.md` | Sonnet | Parse flags, detect application, verify MCP, define hierarchy (4 levels), challenge need |
|
|
88
87
|
| 01 | `steps/step-01-analyze.md` | Opus | Explore existing code (Agent Teams or direct) |
|
|
89
88
|
| 02 | `steps/step-02-plan.md` | Opus | Layer-by-layer plan with skill/MCP mapping |
|
|
90
89
|
| 03 | `steps/step-03-execute.md` | Opus | Orchestrate execution via skills and MCP |
|
|
@@ -158,7 +157,7 @@ Execute incremental SmartStack development using the APEX methodology. This skil
|
|
|
158
157
|
</error_handling>
|
|
159
158
|
|
|
160
159
|
<success_criteria>
|
|
161
|
-
- SmartStack
|
|
160
|
+
- SmartStack hierarchy detected (app/module)
|
|
162
161
|
- Plan validated with skill/MCP mapped for each file
|
|
163
162
|
- Code created/corrected via existing skills and MCP (no direct generation)
|
|
164
163
|
- MCP validate_conventions: 0 errors
|
|
@@ -13,15 +13,6 @@
|
|
|
13
13
|
3. `.ralph/prd-*.json` → PRDs exist
|
|
14
14
|
4. `src/pages/` → React frontend exists
|
|
15
15
|
|
|
16
|
-
### Context-to-Folder Mapping
|
|
17
|
-
|
|
18
|
-
| Context | Backend | Controller | Frontend Layout |
|
|
19
|
-
|---------|---------|------------|----------------|
|
|
20
|
-
| `business` | `Business` | `Business` | `BusinessLayout` |
|
|
21
|
-
| `platform.administration` | `Platform/Administration` | `Admin` | `AdminLayout` |
|
|
22
|
-
| `platform.support` | `Platform/Support` | `Support` | `AdminLayout` |
|
|
23
|
-
| `personal` | `Personal` | `User` | `UserLayout` |
|
|
24
|
-
|
|
25
16
|
---
|
|
26
17
|
|
|
27
18
|
## Delegate Mode Context
|
|
@@ -32,7 +23,6 @@ When `/ralph-loop` invokes `/apex -d {prd_path}`:
|
|
|
32
23
|
|
|
33
24
|
1. **Read PRD** from `{delegate_prd_path}` (`.ralph/prd.json` or `.ralph/prd-{module}.json`)
|
|
34
25
|
2. **Extract context:**
|
|
35
|
-
- `context_code` = `prd.project.context` (e.g., "business")
|
|
36
26
|
- `app_name` = `prd.project.application` (e.g., "HumanResources")
|
|
37
27
|
- `module_code` = `prd.project.module` (e.g., "EmployeeManagement")
|
|
38
28
|
- `sections` = from `_seedDataMeta.coreSeedData.navigationSections` in infrastructure tasks
|
|
@@ -72,23 +62,23 @@ Write back to {delegate_prd_path}
|
|
|
72
62
|
|
|
73
63
|
| Level | Permission format | Segments |
|
|
74
64
|
|-------|------------------|----------|
|
|
75
|
-
| Module | `{
|
|
76
|
-
| Section | `{
|
|
77
|
-
| Resource | `{
|
|
65
|
+
| Module | `{app}.{module}.{action}` | 2+1 segments |
|
|
66
|
+
| Section | `{app}.{module}.{section}.{action}` | 3+1 segments |
|
|
67
|
+
| Resource | `{app}.{module}.{section}.{resource}.{action}` | 4+1 segments |
|
|
78
68
|
|
|
79
69
|
**Examples:**
|
|
80
|
-
- Module: `
|
|
81
|
-
- Section: `
|
|
82
|
-
- Resource: `
|
|
70
|
+
- Module: `human-resources.employees.read` (2+1)
|
|
71
|
+
- Section: `human-resources.employees.departments.read` (3+1)
|
|
72
|
+
- Resource: `human-resources.employees.departments.export.execute` (4+1)
|
|
83
73
|
|
|
84
74
|
> **CRITICAL — Permission codes use the SAME kebab-case segments as NavRoute codes.**
|
|
85
75
|
> Every dot-separated segment in a permission path is a navigation entity code.
|
|
86
76
|
> Multi-word codes MUST be kebab-case: `human-resources`, NOT `humanresources`.
|
|
87
77
|
>
|
|
88
|
-
> SmartStack.app reference: `
|
|
78
|
+
> SmartStack.app reference: `support-client.my-tickets.read`, `administration.email-templates.read`
|
|
89
79
|
>
|
|
90
|
-
> **FORBIDDEN:** `
|
|
91
|
-
> **CORRECT:** `
|
|
80
|
+
> **FORBIDDEN:** `humanresources.employees.read` (concatenated — no kebab-case)
|
|
81
|
+
> **CORRECT:** `human-resources.employees.read` (kebab-case — matches NavRoute)
|
|
92
82
|
|
|
93
83
|
### Generation (step-03)
|
|
94
84
|
|
|
@@ -144,7 +134,7 @@ Write back to {delegate_prd_path}
|
|
|
144
134
|
| Skill | When to delegate |
|
|
145
135
|
|-------|-----------------|
|
|
146
136
|
| `/controller` | Complex controller with custom routes |
|
|
147
|
-
| `/application` | New
|
|
137
|
+
| `/application` | New application/module structure |
|
|
148
138
|
| `/ui-components` | Complex React pages (tables, grids, dashboards) |
|
|
149
139
|
| `/efcore` | Complex EF Core configurations |
|
|
150
140
|
| `/notification` | In-app or email notifications |
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Analysis Methods — FK Detection, Tenant Modes, Code Patterns, Gap Analysis
|
|
2
|
+
|
|
3
|
+
> **Loaded by:** step-01-analyze.md (sections 4-7)
|
|
4
|
+
> **Purpose:** Detailed methods for analyzing existing code and planning entity-level requirements.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## FK Field Detection
|
|
9
|
+
|
|
10
|
+
For each entity found (or to be created), identify FK relationships:
|
|
11
|
+
- Properties ending in "Id" with matching navigation property
|
|
12
|
+
- Record: `{ entity, fkProperty, targetEntity, isRequired }`
|
|
13
|
+
|
|
14
|
+
**Why:** FK fields drive two critical requirements:
|
|
15
|
+
1. **Frontend:** Each FK field MUST use `<EntityLookup />` (NEVER `<input>`, NEVER `<select>`)
|
|
16
|
+
2. **Backend:** Each target entity's GetAll MUST support `?search=` parameter + return `PaginatedResult<T>`
|
|
17
|
+
|
|
18
|
+
See `references/execution-frontend-patterns.md` for EntityLookup patterns.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Tenant Mode Decision
|
|
23
|
+
|
|
24
|
+
For each entity found (or to be created), determine the `tenantMode`:
|
|
25
|
+
|
|
26
|
+
| Mode | Meaning | Examples | EF Filter |
|
|
27
|
+
|------|---------|----------|-----------|
|
|
28
|
+
| `strict` | Data belongs to one tenant | Employee, Order, Invoice | `TenantId == current` |
|
|
29
|
+
| `optional` | Can be shared or tenant-specific | Department, Currency, JobTitle | `TenantId == current OR TenantId == null` |
|
|
30
|
+
| `scoped` | Explicit scope rules | Settings, Workflow, EmailTemplate | `TenantId == current AND Scope == current` |
|
|
31
|
+
| `none` | Platform-wide (never filtered) | Navigation, Permission, User | No TenantId |
|
|
32
|
+
|
|
33
|
+
**Why:** Tenant mode drives EF query filters, seed data generation, and API access control.
|
|
34
|
+
|
|
35
|
+
**Reference:** See `references/smartstack-api.md` for TenantId handling patterns and `smartstack-layers.md` for seed data strategies per tenant mode.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Code Pattern Detection
|
|
40
|
+
|
|
41
|
+
For each entity found (or to be created), identify code generation needs:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
IF feature.json exists AND entity has codePattern:
|
|
45
|
+
→ Use codePattern config from feature.json (strategy, prefix, digits, etc.)
|
|
46
|
+
→ Record in analysis: entity has auto-generated code
|
|
47
|
+
|
|
48
|
+
ELSE IF feature.json exists BUT entity has NO codePattern:
|
|
49
|
+
→ Record: entity needs codePattern decision in step-02
|
|
50
|
+
→ Apply heuristic default based on entity name:
|
|
51
|
+
Invoice/Order/Receipt → timestamp-daily
|
|
52
|
+
Ticket/Incident → timestamp-minute
|
|
53
|
+
Contract/Policy → year-sequential
|
|
54
|
+
Reference/Category → uuid-short
|
|
55
|
+
Employee/Customer/Project → sequential
|
|
56
|
+
|
|
57
|
+
ELSE (no feature.json):
|
|
58
|
+
→ Propose codePattern during step-02 planning based on task description
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Why:** Code generation strategy drives CreateDto structure, service injection (ICodeGenerator<T>), and DI registration.
|
|
62
|
+
|
|
63
|
+
**Reference:** See `references/code-generation.md` for strategy table, volume-to-digits calculation, and backend patterns.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Gap Analysis
|
|
68
|
+
|
|
69
|
+
Compare what EXISTS vs what the TASK REQUIRES:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
For each element: EXISTS+COMPLETE → "skip" | EXISTS+INCOMPLETE → "modify" | MISSING → "create"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Cross-reference with step-00 challenge responses:
|
|
76
|
+
- Each entity: entity, EF config, service, controller, frontend pages → exists/missing
|
|
77
|
+
- Each section: NavigationSectionSeedData, frontend route → exists/missing
|
|
78
|
+
- If dependencies: verify FK target entities and their `?search=` support
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Scope Re-Check (after exploration)
|
|
83
|
+
|
|
84
|
+
**Re-validate scope after code exploration reveals the true entity count.**
|
|
85
|
+
Step-00 guard uses the user's description (may undercount). Now we know the actual entities.
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
IF NOT delegate_mode:
|
|
89
|
+
actual_entities = count of entities marked "create" in gap analysis
|
|
90
|
+
actual_sections = count of sections marked "create"
|
|
91
|
+
|
|
92
|
+
IF actual_entities > 6:
|
|
93
|
+
WARNING: "Code exploration reveals {actual_entities} entities.
|
|
94
|
+
This exceeds the recommended maximum (4) for a single /apex invocation.
|
|
95
|
+
Risk: incomplete migrations, lost conventions, missing pages.
|
|
96
|
+
Consider: split into {ceil(actual_entities/4)} iterations of ~4 entities each."
|
|
97
|
+
|
|
98
|
+
Ask user to confirm or re-scope.
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Analysis Validation — User Checkpoint
|
|
104
|
+
|
|
105
|
+
**Objective:** Present findings and validate scope BEFORE planning.
|
|
106
|
+
|
|
107
|
+
### Present Findings
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
ANALYSIS FINDINGS
|
|
111
|
+
═══════════════════════════════════════════════════════════════
|
|
112
|
+
|
|
113
|
+
Entities expected / found / to create: {summary}
|
|
114
|
+
Sections expected / found / to create: {summary}
|
|
115
|
+
FK Relationships: {fkFields summary}
|
|
116
|
+
Dependencies: {cross-module refs or "none"}
|
|
117
|
+
Complexity: {module_complexity}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Validate with User (if NOT auto_mode)
|
|
121
|
+
|
|
122
|
+
Question template (same as step-01 section 6b):
|
|
123
|
+
- "Scope is correct" (Recommended)
|
|
124
|
+
- "Add elements" → update entities/sections, re-run gap analysis
|
|
125
|
+
- "Reduce scope" → update accordingly
|
|
126
|
+
- "Change approach" → potentially restart from step-00
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Analysis Summary Output
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
**APEX SmartStack - Analysis Complete**
|
|
134
|
+
|
|
135
|
+
Navigation: {app_name} → {module_code} → {sections[].code}
|
|
136
|
+
Entities: {entity_name → create | modify | skip}
|
|
137
|
+
Existing: entities, configs, services, controllers, pages, seed data, tests (with paths)
|
|
138
|
+
Required: create / modify / skip lists
|
|
139
|
+
Profile: complexity, dependencies, FK fields, workflow, notifications
|
|
140
|
+
ACs: AC1..ACn (inferred from PRD/feature/task/challenge)
|
|
141
|
+
```
|
|
@@ -5,26 +5,6 @@
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
## Context Detection (section 2)
|
|
9
|
-
|
|
10
|
-
If hierarchy cannot be inferred, ask the user:
|
|
11
|
-
|
|
12
|
-
```yaml
|
|
13
|
-
questions:
|
|
14
|
-
- header: "Context"
|
|
15
|
-
question: "What is the SmartStack context for this work?"
|
|
16
|
-
options:
|
|
17
|
-
- label: "Business (Recommended)"
|
|
18
|
-
description: "Business application module"
|
|
19
|
-
- label: "Platform"
|
|
20
|
-
description: "Platform administration or support"
|
|
21
|
-
- label: "Personal"
|
|
22
|
-
description: "Personal user space"
|
|
23
|
-
multiSelect: false
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
8
|
## 4a. Application Validation
|
|
29
9
|
|
|
30
10
|
If `{app_name}` was NOT clearly inferred from the task description:
|
|
@@ -37,7 +17,7 @@ questions:
|
|
|
37
17
|
- label: "<best guess from task> (Recommended)"
|
|
38
18
|
description: "Inferred from your task description"
|
|
39
19
|
- label: "New application"
|
|
40
|
-
description: "Create a new application
|
|
20
|
+
description: "Create a new application"
|
|
41
21
|
- label: "Existing application"
|
|
42
22
|
description: "Add to an existing application (specify in Other)"
|
|
43
23
|
multiSelect: false
|