@atlashub/smartstack-cli 3.36.0 → 3.38.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 +201 -256
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +3 -2
- package/scripts/extract-api-endpoints.ts +325 -0
- package/scripts/extract-business-rules.ts +440 -0
- package/scripts/generate-doc-with-mock-ui.ts +804 -0
- package/scripts/health-check.sh +168 -0
- package/scripts/postinstall.js +18 -0
- 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/gitflow/merge.md +0 -4
- package/templates/agents/gitflow/pr.md +0 -4
- package/templates/agents/gitflow/start.md +30 -5
- 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 -57
- package/templates/skills/apex/references/examine-build-validation.md +87 -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 +17 -17
- 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 +47 -249
- 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 +2 -0
- package/templates/skills/application/SKILL.md +6 -7
- 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 +120 -0
- package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
- package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
- 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 +11 -141
- package/templates/skills/application/steps/step-01-navigation.md +3 -3
- package/templates/skills/application/steps/step-02-permissions.md +4 -4
- package/templates/skills/application/steps/step-03-roles.md +18 -175
- package/templates/skills/application/steps/step-03b-provider.md +1 -2
- package/templates/skills/application/steps/step-04-backend.md +19 -110
- package/templates/skills/application/steps/step-05-frontend.md +17 -143
- 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 +48 -48
- 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 +11 -11
- 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-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/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-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 +1 -1
- package/templates/skills/gitflow/_shared.md +23 -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 +51 -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 +71 -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 +21 -73
- package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
- package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
- 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 +5 -2
- 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
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# SmartStack Health Check Script
|
|
3
|
+
#
|
|
4
|
+
# Usage: ./scripts/health-check.sh
|
|
5
|
+
#
|
|
6
|
+
# Exit codes:
|
|
7
|
+
# 0 - All checks passed
|
|
8
|
+
# 1 - Some checks failed
|
|
9
|
+
#
|
|
10
|
+
# This script can be used in CI/CD pipelines to verify SmartStack setup.
|
|
11
|
+
|
|
12
|
+
set -e
|
|
13
|
+
|
|
14
|
+
# Colors
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
GREEN='\033[0;32m'
|
|
17
|
+
YELLOW='\033[1;33m'
|
|
18
|
+
BLUE='\033[0;34m'
|
|
19
|
+
NC='\033[0m' # No Color
|
|
20
|
+
|
|
21
|
+
ERRORS=0
|
|
22
|
+
WARNINGS=0
|
|
23
|
+
|
|
24
|
+
log_ok() {
|
|
25
|
+
echo -e "${GREEN}✓${NC} $1"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
log_warn() {
|
|
29
|
+
echo -e "${YELLOW}⚠${NC} $1"
|
|
30
|
+
((WARNINGS++))
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
log_error() {
|
|
34
|
+
echo -e "${RED}✗${NC} $1"
|
|
35
|
+
((ERRORS++))
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
log_info() {
|
|
39
|
+
echo -e "${BLUE}ℹ${NC} $1"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
echo ""
|
|
43
|
+
echo "╔══════════════════════════════════════════════╗"
|
|
44
|
+
echo "║ SmartStack Health Check ║"
|
|
45
|
+
echo "╚══════════════════════════════════════════════╝"
|
|
46
|
+
echo ""
|
|
47
|
+
|
|
48
|
+
# Check Node.js
|
|
49
|
+
echo "Checking dependencies..."
|
|
50
|
+
|
|
51
|
+
if command -v node &> /dev/null; then
|
|
52
|
+
NODE_VERSION=$(node --version)
|
|
53
|
+
NODE_MAJOR=$(echo "$NODE_VERSION" | cut -d'.' -f1 | tr -d 'v')
|
|
54
|
+
if [ "$NODE_MAJOR" -ge 18 ]; then
|
|
55
|
+
log_ok "Node.js $NODE_VERSION"
|
|
56
|
+
else
|
|
57
|
+
log_error "Node.js $NODE_VERSION (requires 18+)"
|
|
58
|
+
fi
|
|
59
|
+
else
|
|
60
|
+
log_error "Node.js not found"
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Check npm
|
|
64
|
+
if command -v npm &> /dev/null; then
|
|
65
|
+
log_ok "npm $(npm --version)"
|
|
66
|
+
else
|
|
67
|
+
log_error "npm not found"
|
|
68
|
+
fi
|
|
69
|
+
|
|
70
|
+
# Check Git
|
|
71
|
+
if command -v git &> /dev/null; then
|
|
72
|
+
log_ok "Git $(git --version | cut -d' ' -f3)"
|
|
73
|
+
else
|
|
74
|
+
log_error "Git not found"
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
# Check .NET SDK
|
|
78
|
+
if command -v dotnet &> /dev/null; then
|
|
79
|
+
log_ok ".NET SDK $(dotnet --version)"
|
|
80
|
+
else
|
|
81
|
+
log_warn ".NET SDK not found (optional for non-.NET projects)"
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
echo ""
|
|
85
|
+
echo "Checking Claude Code..."
|
|
86
|
+
|
|
87
|
+
# Check Claude Code CLI
|
|
88
|
+
if command -v claude &> /dev/null; then
|
|
89
|
+
log_ok "Claude Code CLI installed"
|
|
90
|
+
|
|
91
|
+
# Check MCP servers
|
|
92
|
+
echo ""
|
|
93
|
+
echo "Checking MCP servers..."
|
|
94
|
+
|
|
95
|
+
if claude mcp list 2>/dev/null | grep -qi "smartstack"; then
|
|
96
|
+
log_ok "SmartStack MCP available"
|
|
97
|
+
else
|
|
98
|
+
log_error "SmartStack MCP not installed"
|
|
99
|
+
log_info " Install: npm install -g @atlashub/smartstack-mcp && claude mcp add smartstack -- npx @atlashub/smartstack-mcp"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
if claude mcp list 2>/dev/null | grep -qi "context7"; then
|
|
103
|
+
log_ok "Context7 MCP available"
|
|
104
|
+
else
|
|
105
|
+
log_error "Context7 MCP not installed"
|
|
106
|
+
log_info " Install: claude mcp add context7 -- npx @upstash/context7-mcp"
|
|
107
|
+
fi
|
|
108
|
+
else
|
|
109
|
+
log_error "Claude Code CLI not found"
|
|
110
|
+
log_info " Install: curl -fsSL https://claude.ai/install.sh | bash"
|
|
111
|
+
log_info " More info: https://code.claude.com/docs/en/setup"
|
|
112
|
+
fi
|
|
113
|
+
|
|
114
|
+
echo ""
|
|
115
|
+
echo "Checking SmartStack CLI..."
|
|
116
|
+
|
|
117
|
+
# Check SmartStack CLI
|
|
118
|
+
if command -v smartstack &> /dev/null; then
|
|
119
|
+
log_ok "SmartStack CLI installed"
|
|
120
|
+
|
|
121
|
+
# Check templates installation
|
|
122
|
+
if [ -d "$HOME/.claude/commands" ] && [ -f "$HOME/.claude/commands/gitflow.md" ]; then
|
|
123
|
+
log_ok "SmartStack commands installed"
|
|
124
|
+
else
|
|
125
|
+
log_warn "SmartStack commands not installed"
|
|
126
|
+
log_info " Run: smartstack install"
|
|
127
|
+
fi
|
|
128
|
+
else
|
|
129
|
+
log_error "SmartStack CLI not found"
|
|
130
|
+
log_info " Install: npm install -g @atlashub/smartstack-cli"
|
|
131
|
+
fi
|
|
132
|
+
|
|
133
|
+
# Check local Ralph config
|
|
134
|
+
echo ""
|
|
135
|
+
echo "Checking local project..."
|
|
136
|
+
|
|
137
|
+
if [ -f ".ralph/ralph.config.yaml" ]; then
|
|
138
|
+
log_ok "Ralph configured in this project"
|
|
139
|
+
else
|
|
140
|
+
log_warn "Ralph not configured in this project"
|
|
141
|
+
log_info " Run: smartstack ralph init"
|
|
142
|
+
fi
|
|
143
|
+
|
|
144
|
+
if [ -d ".git" ]; then
|
|
145
|
+
BRANCH=$(git branch --show-current 2>/dev/null || echo "unknown")
|
|
146
|
+
log_ok "Git repository (branch: $BRANCH)"
|
|
147
|
+
else
|
|
148
|
+
log_warn "Not a Git repository"
|
|
149
|
+
fi
|
|
150
|
+
|
|
151
|
+
# Summary
|
|
152
|
+
echo ""
|
|
153
|
+
echo "════════════════════════════════════════════════"
|
|
154
|
+
|
|
155
|
+
if [ $ERRORS -eq 0 ]; then
|
|
156
|
+
if [ $WARNINGS -eq 0 ]; then
|
|
157
|
+
echo -e "${GREEN}All checks passed!${NC}"
|
|
158
|
+
echo "SmartStack is ready to use."
|
|
159
|
+
else
|
|
160
|
+
echo -e "${YELLOW}$WARNINGS warning(s)${NC}"
|
|
161
|
+
echo "SmartStack is usable but some features may be limited."
|
|
162
|
+
fi
|
|
163
|
+
exit 0
|
|
164
|
+
else
|
|
165
|
+
echo -e "${RED}$ERRORS error(s), $WARNINGS warning(s)${NC}"
|
|
166
|
+
echo "Please fix the errors above before using SmartStack."
|
|
167
|
+
exit 1
|
|
168
|
+
fi
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Simple postinstall script - displays PATH fix for Windows
|
|
3
|
+
|
|
4
|
+
const isGlobal = process.env.npm_config_global === 'true';
|
|
5
|
+
const isWindows = process.platform === 'win32';
|
|
6
|
+
|
|
7
|
+
if (isGlobal && isWindows) {
|
|
8
|
+
const prefix = process.env.npm_config_prefix || '';
|
|
9
|
+
console.log(`
|
|
10
|
+
\x1b[32m✅ SmartStack CLI installed!\x1b[0m
|
|
11
|
+
|
|
12
|
+
\x1b[33mIf 'ss' command is not found, run this in PowerShell:\x1b[0m
|
|
13
|
+
|
|
14
|
+
\x1b[36m$env:PATH += ";${prefix || '$(npm config get prefix)'}"\x1b[0m
|
|
15
|
+
|
|
16
|
+
Then: \x1b[36mss --version\x1b[0m
|
|
17
|
+
`);
|
|
18
|
+
}
|
|
@@ -123,13 +123,13 @@ Get a compact summary of all completed (specified) modules, for use as context w
|
|
|
123
123
|
### Customers (FEAT-011)
|
|
124
124
|
Entities: Customer, Address, Contact
|
|
125
125
|
BRs: BR-VAL-001 (email unique), BR-WF-001 (activation flow)
|
|
126
|
-
Permissions:
|
|
126
|
+
Permissions: sales.customers.{read|create|update|delete}
|
|
127
127
|
FKs exposed: Customer.Id, Address.Id
|
|
128
128
|
|
|
129
129
|
### Products (FEAT-012)
|
|
130
130
|
Entities: Product, Category, PriceHistory
|
|
131
131
|
BRs: BR-VAL-002 (SKU format), BR-CALC-001 (price calculation)
|
|
132
|
-
Permissions:
|
|
132
|
+
Permissions: sales.products.{read|create|update}
|
|
133
133
|
FKs exposed: Product.Id, Category.Id
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -289,11 +289,11 @@ Generate compact context for use by other skills and agents.
|
|
|
289
289
|
- Interaction
|
|
290
290
|
|
|
291
291
|
## Permissions (5)
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
-
|
|
292
|
+
- crm.contacts.create
|
|
293
|
+
- crm.contacts.read
|
|
294
|
+
- crm.contacts.update
|
|
295
|
+
- crm.contacts.delete
|
|
296
|
+
- crm.contacts.export
|
|
297
297
|
|
|
298
298
|
## Business Rules (4)
|
|
299
299
|
- BR-VAL-001: Email must be unique
|
|
@@ -340,7 +340,7 @@ When encountering ID references, resolve them:
|
|
|
340
340
|
**Format resolved references as inline citations:**
|
|
341
341
|
- "UC-001 (Create new contact)"
|
|
342
342
|
- "[BR-SEC-015: Sensitive data encryption required]"
|
|
343
|
-
- "
|
|
343
|
+
- "crm.contacts.create (used in UC-001, UC-003)"
|
|
344
344
|
|
|
345
345
|
## Error Handling
|
|
346
346
|
|
|
@@ -366,7 +366,7 @@ This agent provides context for:
|
|
|
366
366
|
```
|
|
367
367
|
User: "What permissions does FEAT-042 need?"
|
|
368
368
|
→ Operation: answerQuestion(FEAT-042, "What permissions does this feature need?")
|
|
369
|
-
→ Output: List of
|
|
369
|
+
→ Output: List of crm.contacts.* permissions with use case mapping
|
|
370
370
|
|
|
371
371
|
User: "Find all features that use the Contact entity"
|
|
372
372
|
→ Operation: searchAcrossFeatures("Contact")
|
|
@@ -14,8 +14,8 @@ Write and update feature.json files for project-level (multi-app), application-l
|
|
|
14
14
|
|
|
15
15
|
**Directory structure (3-tier hierarchy):**
|
|
16
16
|
- Project-level (multi-app only): `docs/business-analyse/v{X.Y}/feature.json`
|
|
17
|
-
- Application-level: `docs/{
|
|
18
|
-
- Module-level: `docs/{
|
|
17
|
+
- Application-level: `docs/{app}/business-analyse/v{X.Y}/feature.json`
|
|
18
|
+
- Module-level: `docs/{app}/{module}/business-analyse/v{X.Y}/feature.json`
|
|
19
19
|
|
|
20
20
|
> **Backward compatibility:** If only 1 application, the project level is NOT created. The application-level feature.json remains the master.
|
|
21
21
|
|
|
@@ -29,7 +29,6 @@ Create an initial feature.json with metadata and draft status.
|
|
|
29
29
|
- scope: "project", "application", or "module" (default: "module")
|
|
30
30
|
- Optional: applicationRef (FEAT-NNN of master, required when scope = "module" in app mode)
|
|
31
31
|
- Optional: projectRef (PROJ-NNN of project master, required when scope = "application" in project mode)
|
|
32
|
-
- Optional: context (default: "business", allows "platform" or "personal" in project mode)
|
|
33
32
|
- Optional: initialSections for pre-populated content
|
|
34
33
|
|
|
35
34
|
**Process:**
|
|
@@ -37,8 +36,8 @@ Create an initial feature.json with metadata and draft status.
|
|
|
37
36
|
2. Increment FEAT-NNN (or PROJ-NNN) identifier
|
|
38
37
|
3. Create directory structure based on scope:
|
|
39
38
|
- If scope = "project": `docs/business-analyse/v1.0/`
|
|
40
|
-
- If scope = "application": `docs/{
|
|
41
|
-
- If scope = "module": `docs/{
|
|
39
|
+
- If scope = "application": `docs/{app}/business-analyse/v1.0/`
|
|
40
|
+
- If scope = "module": `docs/{app}/{module}/business-analyse/v1.0/`
|
|
42
41
|
4. Generate initial feature.json with:
|
|
43
42
|
- **`$schema`**: relative path to the deployed schema file (MANDATORY — see $schema rules below)
|
|
44
43
|
- id: FEAT-NNN (from config)
|
|
@@ -104,7 +103,7 @@ Update the applications array and dependency graph in a project-level feature.js
|
|
|
104
103
|
|
|
105
104
|
**Input:**
|
|
106
105
|
- projectId: PROJ-NNN of the project feature.json
|
|
107
|
-
- applications: array of application objects (code, name,
|
|
106
|
+
- applications: array of application objects (code, name, tablePrefix, icon, description, applicationRoles[], scope, dependencies[], estimatedComplexity)
|
|
108
107
|
- applicationDependencyGraph: object with edges[], topologicalOrder[], layers[]
|
|
109
108
|
|
|
110
109
|
**Process:**
|
|
@@ -432,7 +431,7 @@ Perform these structural checks before every write:
|
|
|
432
431
|
- BR IDs: must match `BR-(VAL|CALC|WF|SEC|DATA)-[A-Z]{2,4}-\d{3}` (e.g., BR-SEC-RM-042) — module prefix MANDATORY in multi-module mode
|
|
433
432
|
- UC IDs: must match `UC-[A-Z]{2,4}-\d{3}` (e.g., UC-RM-007) — module prefix MANDATORY in multi-module mode
|
|
434
433
|
- FR IDs: must match `FR-[A-Z]{2,4}-\d{3}` (e.g., FR-RM-012) — module prefix MANDATORY in multi-module mode
|
|
435
|
-
- Permission paths: must match `
|
|
434
|
+
- Permission paths: must match `{app}\.{module}\.{resource}\.{action}` (e.g., crm.contacts.read)
|
|
436
435
|
|
|
437
436
|
**Metadata:**
|
|
438
437
|
- id, version, status, scope are required
|
|
@@ -442,7 +441,7 @@ Perform these structural checks before every write:
|
|
|
442
441
|
|
|
443
442
|
**Cross-references:**
|
|
444
443
|
- All BR-XXX, UC-XXX, FR-XXX referenced must be defined in their respective sections
|
|
445
|
-
- Permission paths must use full format with
|
|
444
|
+
- Permission paths must use full format with 4 segments: `{app}.{module}.{resource}.{action}`
|
|
446
445
|
|
|
447
446
|
**Application-scope specific:**
|
|
448
447
|
- `modules[]` must exist and be non-empty after decomposition
|
|
@@ -593,19 +592,17 @@ docs/business-analyse/
|
|
|
593
592
|
v1.0/
|
|
594
593
|
feature.json ← PROJECT (multi-app master, only if 2+ apps)
|
|
595
594
|
|
|
596
|
-
docs/{
|
|
595
|
+
docs/{app}/business-analyse/
|
|
597
596
|
v1.0/
|
|
598
597
|
feature.json ← APPLICATION (master)
|
|
599
598
|
|
|
600
|
-
docs/{
|
|
599
|
+
docs/{app}/{module}/business-analyse/
|
|
601
600
|
v1.0/
|
|
602
601
|
feature.json ← MODULE (detailed)
|
|
603
602
|
v1.1/
|
|
604
603
|
feature.json
|
|
605
604
|
```
|
|
606
605
|
|
|
607
|
-
> **{context}** = "business" (default) | "platform" | "personal" — determined per application in project mode.
|
|
608
|
-
|
|
609
606
|
Versions are stored as separate files in versioned directories. Always store feature.json at the root of each version folder.
|
|
610
607
|
|
|
611
608
|
## Config Management
|
|
@@ -762,15 +759,15 @@ If a module feature.json exceeds 500KB despite incremental operations:
|
|
|
762
759
|
## $schema Reference Rules (MANDATORY)
|
|
763
760
|
|
|
764
761
|
> **Every feature.json MUST include a `$schema` field** pointing to the deployed schema file via relative path.
|
|
765
|
-
> Schemas are deployed by step-00-init to: `docs/
|
|
762
|
+
> Schemas are deployed by step-00-init to: `docs/{app}/business-analyse/schemas/`
|
|
766
763
|
|
|
767
764
|
**$schema paths by scope:**
|
|
768
765
|
|
|
769
766
|
| Scope | Feature.json location | $schema value |
|
|
770
767
|
|-------|----------------------|---------------|
|
|
771
768
|
| project | `docs/business-analyse/v1.0/feature.json` | `"../schemas/project-schema.json"` |
|
|
772
|
-
| application | `docs/{
|
|
773
|
-
| module | `docs/{
|
|
769
|
+
| application | `docs/{app}/business-analyse/v1.0/feature.json` | `"../schemas/application-schema.json"` |
|
|
770
|
+
| module | `docs/{app}/{module}/business-analyse/v1.0/feature.json` | `"../../../business-analyse/schemas/feature-schema.json"` |
|
|
774
771
|
|
|
775
772
|
**Rules:**
|
|
776
773
|
- `$schema` is ALWAYS the FIRST field in feature.json (before `id`)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: code-reviewer
|
|
3
3
|
description: Expert code reviewer for PR analysis. Use when reviewing code changes for security, logic, clean code, or feature-specific behavior. Accepts focus area and file list. Returns structured findings table.
|
|
4
4
|
tools: Read, Grep, Glob, Skill
|
|
5
|
-
model:
|
|
5
|
+
model: sonnet
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<role>
|
|
@@ -66,7 +66,7 @@ For each module found, extract:
|
|
|
66
66
|
- Feature status (draft/analysed/specified/approved/handed-off)
|
|
67
67
|
- Use Case IDs (UC-001, UC-002...)
|
|
68
68
|
- Business Rule IDs (BR-001, BR-002...)
|
|
69
|
-
- Permission paths (
|
|
69
|
+
- Permission paths (app.module.action)
|
|
70
70
|
- Last update dates (from metadata.updatedAt)
|
|
71
71
|
- Validation decision (APPROVED/REJECTED/pending)
|
|
72
72
|
- Version (from folder name v1.0, v1.1, etc.)
|
|
@@ -19,15 +19,11 @@ Safe PR merge with review checklist. Supports GitHub and Azure DevOps.
|
|
|
19
19
|
CONFIG_FILE=""
|
|
20
20
|
if [ -f ".claude/gitflow/config.json" ]; then
|
|
21
21
|
CONFIG_FILE=".claude/gitflow/config.json"
|
|
22
|
-
elif [ -f ".gitflow/config.json" ]; then
|
|
23
|
-
CONFIG_FILE=".gitflow/config.json"
|
|
24
22
|
else
|
|
25
23
|
# Try develop worktree
|
|
26
24
|
DEVELOP_PATH=$(git worktree list --porcelain 2>/dev/null | grep -A1 "branch refs/heads/develop" | grep "^worktree " | sed 's/^worktree //')
|
|
27
25
|
if [ -n "$DEVELOP_PATH" ] && [ -f "$DEVELOP_PATH/.claude/gitflow/config.json" ]; then
|
|
28
26
|
CONFIG_FILE="$DEVELOP_PATH/.claude/gitflow/config.json"
|
|
29
|
-
elif [ -n "$DEVELOP_PATH" ] && [ -f "$DEVELOP_PATH/.gitflow/config.json" ]; then
|
|
30
|
-
CONFIG_FILE="$DEVELOP_PATH/.gitflow/config.json"
|
|
31
27
|
fi
|
|
32
28
|
fi
|
|
33
29
|
|
|
@@ -21,15 +21,11 @@ Create PR with auto-generated description, Azure DevOps and GitHub support.
|
|
|
21
21
|
CONFIG_FILE=""
|
|
22
22
|
if [ -f ".claude/gitflow/config.json" ]; then
|
|
23
23
|
CONFIG_FILE=".claude/gitflow/config.json"
|
|
24
|
-
elif [ -f ".gitflow/config.json" ]; then
|
|
25
|
-
CONFIG_FILE=".gitflow/config.json"
|
|
26
24
|
else
|
|
27
25
|
# Try develop worktree
|
|
28
26
|
DEVELOP_PATH=$(git worktree list --porcelain 2>/dev/null | grep -A1 "branch refs/heads/develop" | grep "^worktree " | sed 's/^worktree //')
|
|
29
27
|
if [ -n "$DEVELOP_PATH" ] && [ -f "$DEVELOP_PATH/.claude/gitflow/config.json" ]; then
|
|
30
28
|
CONFIG_FILE="$DEVELOP_PATH/.claude/gitflow/config.json"
|
|
31
|
-
elif [ -n "$DEVELOP_PATH" ] && [ -f "$DEVELOP_PATH/.gitflow/config.json" ]; then
|
|
32
|
-
CONFIG_FILE="$DEVELOP_PATH/.gitflow/config.json"
|
|
33
29
|
fi
|
|
34
30
|
fi
|
|
35
31
|
|
|
@@ -45,13 +45,38 @@ FULL_BRANCH="${type}/${BRANCH_NAME}"
|
|
|
45
45
|
|
|
46
46
|
### 4. Create Branch + Worktree
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
> **FORBIDDEN — Numbered directories:**
|
|
49
|
+
> - `03-Release`, `04-Feature`, `05-Hotfix` — NEVER create these
|
|
50
|
+
> - Only `01-Main` and `02-Develop` are numbered (permanent worktrees created at init)
|
|
51
|
+
> - Features go in `{root}/features/{name}`, releases in `{root}/releases/v{version}`, hotfixes in `{root}/hotfixes/{name}`
|
|
52
|
+
> - The path MUST come from `config.json → worktrees.structure.{features|releases|hotfixes}`
|
|
53
53
|
|
|
54
|
+
```bash
|
|
55
|
+
# 1. Read config (MANDATORY — paths come from here, NEVER improvised)
|
|
56
|
+
read_gitflow_config || { echo "ERROR: No config. Run /gitflow init"; exit 1; }
|
|
57
|
+
|
|
58
|
+
# 2. Resolve path from CONFIG (NEVER improvise numbered directories)
|
|
59
|
+
case "$branch_type" in
|
|
60
|
+
feature) WORKTREE_PATH="$GF_FEATURES_PATH/$BRANCH_NAME" ;;
|
|
61
|
+
release) WORKTREE_PATH="$GF_RELEASES_PATH/v$VERSION" ;;
|
|
62
|
+
hotfix) WORKTREE_PATH="$GF_HOTFIXES_PATH/$BRANCH_NAME" ;;
|
|
63
|
+
esac
|
|
64
|
+
|
|
65
|
+
# 3. Create worktree
|
|
66
|
+
mkdir -p "$(dirname "$WORKTREE_PATH")"
|
|
54
67
|
git worktree add -b "$FULL_BRANCH" "$WORKTREE_PATH" "origin/$BASE_BRANCH"
|
|
68
|
+
|
|
69
|
+
# 4. POST-CREATION VALIDATION (BLOCKING)
|
|
70
|
+
CREATED_PATH=$(git worktree list | grep "$FULL_BRANCH" | awk '{print $1}')
|
|
71
|
+
BASENAME=$(basename "$CREATED_PATH")
|
|
72
|
+
if [[ "$BASENAME" =~ ^[0-9]{2}- ]] && [[ "$BASENAME" != "01-Main" ]] && [[ "$BASENAME" != "02-Develop" ]]; then
|
|
73
|
+
echo "BLOCKING ERROR: Worktree created with numbered prefix: $CREATED_PATH"
|
|
74
|
+
echo "Expected path: $WORKTREE_PATH"
|
|
75
|
+
git worktree remove "$CREATED_PATH" --force
|
|
76
|
+
git branch -D "$FULL_BRANCH" 2>/dev/null
|
|
77
|
+
echo "Removed invalid worktree. Recreating at correct path..."
|
|
78
|
+
git worktree add -b "$FULL_BRANCH" "$WORKTREE_PATH" "origin/$BASE_BRANCH"
|
|
79
|
+
fi
|
|
55
80
|
```
|
|
56
81
|
|
|
57
82
|
### 5. Push Branch to Remote (AUTOMATIC)
|
|
@@ -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
|
}
|