@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.
Files changed (219) hide show
  1. package/dist/index.js +16 -24
  2. package/dist/index.js.map +1 -1
  3. package/dist/mcp-entry.mjs +201 -256
  4. package/dist/mcp-entry.mjs.map +1 -1
  5. package/package.json +3 -2
  6. package/scripts/extract-api-endpoints.ts +325 -0
  7. package/scripts/extract-business-rules.ts +440 -0
  8. package/scripts/generate-doc-with-mock-ui.ts +804 -0
  9. package/scripts/health-check.sh +168 -0
  10. package/scripts/postinstall.js +18 -0
  11. package/templates/agents/ba-reader.md +9 -9
  12. package/templates/agents/ba-writer.md +12 -15
  13. package/templates/agents/code-reviewer.md +1 -1
  14. package/templates/agents/docs-context-reader.md +1 -1
  15. package/templates/agents/gitflow/merge.md +0 -4
  16. package/templates/agents/gitflow/pr.md +0 -4
  17. package/templates/agents/gitflow/start.md +30 -5
  18. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +20 -20
  19. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +16 -24
  20. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +2 -2
  21. package/templates/skills/_resources/mcp-validate-documentation-spec.md +3 -3
  22. package/templates/skills/_shared.md +15 -17
  23. package/templates/skills/ai-prompt/SKILL.md +1 -1
  24. package/templates/skills/ai-prompt/steps/step-00-init.md +47 -0
  25. package/templates/skills/apex/SKILL.md +3 -4
  26. package/templates/skills/apex/_shared.md +10 -20
  27. package/templates/skills/apex/references/analysis-methods.md +141 -0
  28. package/templates/skills/apex/references/challenge-questions.md +1 -21
  29. package/templates/skills/apex/references/core-seed-data.md +35 -57
  30. package/templates/skills/apex/references/examine-build-validation.md +87 -0
  31. package/templates/skills/apex/references/execution-frontend-gates.md +177 -0
  32. package/templates/skills/apex/references/execution-frontend-patterns.md +105 -0
  33. package/templates/skills/apex/references/execution-layer1-rules.md +96 -0
  34. package/templates/skills/apex/references/initialization-challenge-flow.md +110 -0
  35. package/templates/skills/apex/references/planning-layer-mapping.md +151 -0
  36. package/templates/skills/apex/references/post-checks.md +145 -40
  37. package/templates/skills/apex/references/smartstack-api.md +35 -51
  38. package/templates/skills/apex/references/smartstack-frontend.md +17 -17
  39. package/templates/skills/apex/references/smartstack-layers.md +38 -62
  40. package/templates/skills/apex/steps/step-00-init.md +14 -26
  41. package/templates/skills/apex/steps/step-01-analyze.md +10 -143
  42. package/templates/skills/apex/steps/step-02-plan.md +10 -92
  43. package/templates/skills/apex/steps/step-03-execute.md +47 -249
  44. package/templates/skills/apex/steps/step-04-examine.md +14 -78
  45. package/templates/skills/apex/steps/step-05-deep-review.md +2 -2
  46. package/templates/skills/apex/steps/step-08-run-tests.md +2 -0
  47. package/templates/skills/application/SKILL.md +6 -7
  48. package/templates/skills/application/references/backend-controller-hierarchy.md +16 -16
  49. package/templates/skills/application/references/backend-seeding-and-dto-output.md +83 -0
  50. package/templates/skills/application/references/backend-table-prefix-mapping.md +79 -0
  51. package/templates/skills/application/references/backend-verification.md +1 -1
  52. package/templates/skills/application/references/frontend-i18n-and-output.md +67 -0
  53. package/templates/skills/application/references/frontend-route-naming.md +117 -0
  54. package/templates/skills/application/references/frontend-route-wiring-app-tsx.md +107 -0
  55. package/templates/skills/application/references/frontend-verification.md +12 -12
  56. package/templates/skills/application/references/init-parameter-detection.md +120 -0
  57. package/templates/skills/application/references/migration-checklist-troubleshooting.md +100 -0
  58. package/templates/skills/application/references/nav-fallback-procedure.md +5 -6
  59. package/templates/skills/application/references/provider-template.md +2 -6
  60. package/templates/skills/application/references/roles-client-project-handling.md +55 -0
  61. package/templates/skills/application/references/roles-fallback-procedure.md +149 -0
  62. package/templates/skills/application/references/test-coverage-requirements.md +213 -0
  63. package/templates/skills/application/references/test-frontend.md +3 -3
  64. package/templates/skills/application/steps/step-00-init.md +11 -141
  65. package/templates/skills/application/steps/step-01-navigation.md +3 -3
  66. package/templates/skills/application/steps/step-02-permissions.md +4 -4
  67. package/templates/skills/application/steps/step-03-roles.md +18 -175
  68. package/templates/skills/application/steps/step-03b-provider.md +1 -2
  69. package/templates/skills/application/steps/step-04-backend.md +19 -110
  70. package/templates/skills/application/steps/step-05-frontend.md +17 -143
  71. package/templates/skills/application/steps/step-06-migration.md +12 -60
  72. package/templates/skills/application/steps/step-07-tests.md +9 -76
  73. package/templates/skills/application/templates-backend.md +29 -27
  74. package/templates/skills/application/templates-frontend.md +48 -48
  75. package/templates/skills/application/templates-seed.md +57 -131
  76. package/templates/skills/business-analyse/SKILL.md +27 -30
  77. package/templates/skills/business-analyse/_architecture.md +6 -6
  78. package/templates/skills/business-analyse/_shared.md +60 -88
  79. package/templates/skills/business-analyse/questionnaire/04-data.md +3 -3
  80. package/templates/skills/business-analyse/questionnaire/06-security.md +1 -1
  81. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +1 -1
  82. package/templates/skills/business-analyse/react/application-viewer.md +12 -12
  83. package/templates/skills/business-analyse/react/components.md +8 -12
  84. package/templates/skills/business-analyse/react/schema.md +11 -11
  85. package/templates/skills/business-analyse/references/agent-module-prompt.md +2 -3
  86. package/templates/skills/business-analyse/references/analysis-semantic-checks.md +190 -0
  87. package/templates/skills/business-analyse/references/cache-warming-strategy.md +2 -2
  88. package/templates/skills/business-analyse/references/cadrage-challenge-patterns.md +41 -0
  89. package/templates/skills/business-analyse/references/cadrage-coverage-matrix.md +74 -0
  90. package/templates/skills/business-analyse/references/cadrage-shared-modules.md +69 -0
  91. package/templates/skills/business-analyse/references/cadrage-structure-cards.md +1 -1
  92. package/templates/skills/business-analyse/references/compilation-structure-cards.md +297 -0
  93. package/templates/skills/business-analyse/references/consolidation-structural-checks.md +2 -2
  94. package/templates/skills/business-analyse/references/deploy-modes.md +5 -5
  95. package/templates/skills/business-analyse/references/detection-strategies.md +7 -7
  96. package/templates/skills/business-analyse/references/handoff-file-templates.md +14 -22
  97. package/templates/skills/business-analyse/references/handoff-mappings.md +4 -4
  98. package/templates/skills/business-analyse/references/handoff-seeddata-generation.md +312 -0
  99. package/templates/skills/business-analyse/references/init-schema-deployment.md +3 -3
  100. package/templates/skills/business-analyse/references/naming-conventions.md +22 -24
  101. package/templates/skills/business-analyse/references/prd-generation.md +2 -2
  102. package/templates/skills/business-analyse/references/review-data-mapping.md +2 -2
  103. package/templates/skills/business-analyse/references/robustness-checks.md +1 -1
  104. package/templates/skills/business-analyse/references/spec-auto-inference.md +3 -3
  105. package/templates/skills/business-analyse/references/team-orchestration.md +49 -6
  106. package/templates/skills/business-analyse/references/ui-dashboard-spec.md +1 -1
  107. package/templates/skills/business-analyse/references/ui-resource-cards.md +18 -18
  108. package/templates/skills/business-analyse/references/validate-incremental-html.md +2 -2
  109. package/templates/skills/business-analyse/references/validation-checklist.md +2 -2
  110. package/templates/skills/business-analyse/schemas/application-schema.json +4 -5
  111. package/templates/skills/business-analyse/schemas/project-schema.json +1 -6
  112. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +2 -3
  113. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +4 -4
  114. package/templates/skills/business-analyse/steps/step-00-init.md +8 -17
  115. package/templates/skills/business-analyse/steps/step-01-cadrage.md +35 -198
  116. package/templates/skills/business-analyse/steps/step-01b-applications.md +16 -20
  117. package/templates/skills/business-analyse/steps/step-02-decomposition.md +1 -1
  118. package/templates/skills/business-analyse/steps/step-03a1-setup.md +4 -4
  119. package/templates/skills/business-analyse/steps/step-03a2-analysis.md +1 -1
  120. package/templates/skills/business-analyse/steps/step-03b-ui.md +4 -4
  121. package/templates/skills/business-analyse/steps/step-03c-compile.md +66 -140
  122. package/templates/skills/business-analyse/steps/step-03d-validate.md +2 -2
  123. package/templates/skills/business-analyse/steps/step-04a-collect.md +2 -2
  124. package/templates/skills/business-analyse/steps/step-04b-analyze.md +42 -160
  125. package/templates/skills/business-analyse/steps/step-04c-decide.md +1 -1
  126. package/templates/skills/business-analyse/steps/step-05a-handoff.md +74 -104
  127. package/templates/skills/business-analyse/steps/step-05b-deploy.md +13 -11
  128. package/templates/skills/business-analyse/steps/step-06-review.md +3 -3
  129. package/templates/skills/business-analyse/templates/tpl-frd.md +13 -13
  130. package/templates/skills/business-analyse/templates/tpl-handoff.md +12 -12
  131. package/templates/skills/business-analyse/templates-frd.md +25 -25
  132. package/templates/skills/business-analyse/templates-react.md +15 -21
  133. package/templates/skills/controller/SKILL.md +1 -1
  134. package/templates/skills/controller/postman-templates.md +1 -1
  135. package/templates/skills/controller/references/controller-code-templates.md +2 -2
  136. package/templates/skills/controller/references/mcp-scaffold-workflow.md +209 -0
  137. package/templates/skills/controller/references/permission-sync-templates.md +13 -16
  138. package/templates/skills/controller/steps/step-00-init.md +11 -11
  139. package/templates/skills/controller/steps/step-03-generate.md +64 -103
  140. package/templates/skills/controller/templates.md +67 -71
  141. package/templates/skills/debug/SKILL.md +13 -218
  142. package/templates/skills/debug/steps/step-00-init.md +57 -0
  143. package/templates/skills/debug/steps/step-01-analyze.md +219 -0
  144. package/templates/skills/debug/steps/step-02-resolve.md +85 -0
  145. package/templates/skills/documentation/SKILL.md +49 -345
  146. package/templates/skills/documentation/data-schema.md +11 -8
  147. package/templates/skills/documentation/steps/step-00-init.md +70 -0
  148. package/templates/skills/documentation/steps/step-01-scan.md +113 -0
  149. package/templates/skills/documentation/steps/step-02-generate.md +231 -0
  150. package/templates/skills/documentation/steps/step-03-validate.md +238 -0
  151. package/templates/skills/documentation/templates.md +480 -322
  152. package/templates/skills/efcore/references/both-contexts.md +32 -0
  153. package/templates/skills/efcore/references/database-operations.md +67 -0
  154. package/templates/skills/efcore/references/destructive-operations.md +38 -0
  155. package/templates/skills/efcore/references/reset-operations.md +81 -0
  156. package/templates/skills/efcore/references/seed-methods.md +86 -0
  157. package/templates/skills/efcore/references/shared-init-functions.md +250 -0
  158. package/templates/skills/efcore/references/sql-objects-injection.md +61 -0
  159. package/templates/skills/efcore/references/troubleshooting.md +81 -0
  160. package/templates/skills/efcore/steps/db/step-deploy.md +1 -32
  161. package/templates/skills/efcore/steps/db/step-reset.md +7 -103
  162. package/templates/skills/efcore/steps/db/step-seed.md +10 -132
  163. package/templates/skills/efcore/steps/db/step-status.md +5 -44
  164. package/templates/skills/efcore/steps/migration/step-03-validate.md +8 -62
  165. package/templates/skills/efcore/steps/rebase-snapshot/step-03-create.md +1 -57
  166. package/templates/skills/efcore/steps/shared/step-00-init.md +11 -254
  167. package/templates/skills/efcore/steps/squash/step-03-create.md +1 -58
  168. package/templates/skills/feature-full/SKILL.md +1 -1
  169. package/templates/skills/feature-full/steps/step-00-init.md +57 -0
  170. package/templates/skills/feature-full/steps/step-01-implementation.md +1 -1
  171. package/templates/skills/gitflow/SKILL.md +1 -1
  172. package/templates/skills/gitflow/_shared.md +23 -0
  173. package/templates/skills/gitflow/references/commit-message-generation.md +58 -0
  174. package/templates/skills/gitflow/references/commit-migration-validation.md +49 -0
  175. package/templates/skills/gitflow/references/finish-cleanup.md +51 -0
  176. package/templates/skills/gitflow/references/finish-version-bumping.md +45 -0
  177. package/templates/skills/gitflow/references/init-environment-detection.md +41 -0
  178. package/templates/skills/gitflow/references/init-questions.md +185 -0
  179. package/templates/skills/gitflow/references/init-structure-creation.md +71 -0
  180. package/templates/skills/gitflow/references/init-version-detection.md +21 -0
  181. package/templates/skills/gitflow/references/init-workspace-detection.md +43 -0
  182. package/templates/skills/gitflow/references/merge-ci-status.md +36 -0
  183. package/templates/skills/gitflow/references/merge-execution.md +62 -0
  184. package/templates/skills/gitflow/references/merge-pr-context.md +76 -0
  185. package/templates/skills/gitflow/references/pr-build-checks.md +60 -0
  186. package/templates/skills/gitflow/references/pr-generation.md +58 -0
  187. package/templates/skills/gitflow/references/start-branch-normalization.md +28 -0
  188. package/templates/skills/gitflow/references/start-worktree-creation.md +50 -0
  189. package/templates/skills/gitflow/references/sync-push-verify.md +44 -0
  190. package/templates/skills/gitflow/references/sync-rebase-conflicts.md +38 -0
  191. package/templates/skills/gitflow/steps/step-commit.md +12 -91
  192. package/templates/skills/gitflow/steps/step-finish.md +15 -159
  193. package/templates/skills/gitflow/steps/step-init.md +24 -326
  194. package/templates/skills/gitflow/steps/step-merge.md +17 -176
  195. package/templates/skills/gitflow/steps/step-pr.md +10 -116
  196. package/templates/skills/gitflow/steps/step-start.md +16 -109
  197. package/templates/skills/gitflow/steps/step-sync.md +6 -69
  198. package/templates/skills/ralph-loop/SKILL.md +6 -0
  199. package/templates/skills/ralph-loop/references/category-completeness.md +185 -0
  200. package/templates/skills/ralph-loop/references/compact-loop.md +1 -1
  201. package/templates/skills/ralph-loop/references/init-resume-recovery.md +127 -0
  202. package/templates/skills/ralph-loop/references/module-transition.md +151 -0
  203. package/templates/skills/ralph-loop/references/multi-module-queue.md +171 -0
  204. package/templates/skills/ralph-loop/references/parallel-execution.md +246 -0
  205. package/templates/skills/ralph-loop/references/task-transform-legacy.md +6 -9
  206. package/templates/skills/ralph-loop/references/team-orchestration.md +45 -3
  207. package/templates/skills/ralph-loop/steps/step-00-init.md +36 -109
  208. package/templates/skills/ralph-loop/steps/step-01-task.md +15 -163
  209. package/templates/skills/ralph-loop/steps/step-02-execute.md +8 -154
  210. package/templates/skills/ralph-loop/steps/step-04-check.md +21 -73
  211. package/templates/skills/review-code/references/owasp-api-top10.md +5 -5
  212. package/templates/skills/review-code/references/smartstack-conventions.md +11 -11
  213. package/templates/skills/validate-feature/references/api-smoke-tests.md +140 -0
  214. package/templates/skills/validate-feature/references/db-validation-checks.md +180 -0
  215. package/templates/skills/validate-feature/steps/step-01-compile.md +5 -2
  216. package/templates/skills/validate-feature/steps/step-04-api-smoke.md +34 -145
  217. package/templates/skills/validate-feature/steps/step-05-db-validation.md +74 -260
  218. package/templates/skills/workflow/SKILL.md +1 -1
  219. 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: business.sales.customers.{read|create|update|delete}
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: business.sales.products.{read|create|update}
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
- - business.crm.contacts.create
293
- - business.crm.contacts.read
294
- - business.crm.contacts.update
295
- - business.crm.contacts.delete
296
- - business.crm.contacts.export
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
- - "business.crm.contacts.create (used in UC-001, UC-003)"
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 business.crm.contacts.* permissions with use case mapping
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/{context}/{app}/business-analyse/v{X.Y}/feature.json`
18
- - Module-level: `docs/{context}/{app}/{module}/business-analyse/v{X.Y}/feature.json`
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/{context}/{app}/business-analyse/v1.0/`
41
- - If scope = "module": `docs/{context}/{app}/{module}/business-analyse/v1.0/`
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, context, tablePrefix, icon, description, applicationRoles[], scope, dependencies[], estimatedComplexity)
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 `business\.{app}\.{module}\.{resource}\.{action}` (e.g., business.crm.contacts.read)
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 5 segments: `business.{app}.{module}.{resource}.{action}`
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/{context}/{app}/business-analyse/
595
+ docs/{app}/business-analyse/
597
596
  v1.0/
598
597
  feature.json ← APPLICATION (master)
599
598
 
600
- docs/{context}/{app}/{module}/business-analyse/
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/business/{app}/business-analyse/schemas/`
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/{context}/{app}/business-analyse/v1.0/feature.json` | `"../schemas/application-schema.json"` |
773
- | module | `docs/{context}/{app}/{module}/business-analyse/v1.0/feature.json` | `"../../../business-analyse/schemas/feature-schema.json"` |
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: haiku
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 (business.app.module.action)
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
- ```bash
49
- # Worktree paths from config or convention:
50
- # feature ../features/{name}
51
- # release ../releases/v{version}
52
- # hotfix ../hotfixes/{name}
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., "platform.administration.users") */
14
+ /** NavRoute path (e.g., "administration.users") */
15
15
  navRoute: string;
16
- /** API endpoint path (e.g., "/api/platform/administration/users") */
16
+ /** API endpoint path (e.g., "/api/administration/users") */
17
17
  api: string;
18
- /** Frontend route path (e.g., "/platform/administration/users") */
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 a context (e.g., "platform")
75
+ * Get all routes for an application (e.g., "administration")
76
76
  */
77
- export function getRoutesByContext(context: string): NavRoute[] {
78
- return Object.values(ROUTES).filter(r => r.navRoute.startsWith(`${context}.`));
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 a context and application (e.g., "platform.administration")
82
+ * Get all routes for an application and module (e.g., "administration.users")
83
83
  */
84
- export function getRoutesByApplication(context: string, application: string): NavRoute[] {
85
- const prefix = `${context}.${application}`;
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 contexts
90
+ * Get all unique applications
91
91
  */
92
- export function getContexts(): string[] {
93
- const contexts = new Set<string>();
92
+ export function getApplications(): string[] {
93
+ const applications = new Set<string>();
94
94
  for (const route of Object.values(ROUTES)) {
95
- contexts.add(route.navRoute.split('.')[0]);
95
+ applications.add(route.navRoute.split('.')[0]);
96
96
  }
97
- return Array.from(contexts);
97
+ return Array.from(applications);
98
98
  }
99
99
 
100
100
  /**
101
- * Get all unique applications within a context
101
+ * Get all unique modules within an application
102
102
  */
103
- export function getApplications(context: string): string[] {
104
- const apps = new Set<string>();
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] === context && parts.length >= 2) {
108
- apps.add(parts[1]);
107
+ if (parts[0] === application && parts.length >= 2) {
108
+ modules.add(parts[1]);
109
109
  }
110
110
  }
111
- return Array.from(apps);
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 contexts}}
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 contextTree}}
56
- // {{uppercase @key}} Context
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: '{{@key}}',
65
- children: [
66
- {{#each this}}
67
- {
68
- path: '{{modulePath this.navRoute}}',
63
+ path: '{{modulePath this.navRoute}}',
69
64
  {{#if this.permissions.length}}
70
- element: (
71
- <PermissionGuard permissions={ROUTES['{{this.navRoute}}'].permissions}>
72
- <Suspense fallback={<PageLoader />}>
73
- <{{pageName this.navRoute}}Page />
74
- </Suspense>
75
- </PermissionGuard>
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
- element: (
79
- <Suspense fallback={<PageLoader />}>
80
- <{{pageName this.navRoute}}Page />
81
- </Suspense>
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 'platform.administration.users.%'
156
- AND Code NOT LIKE 'platform.administration.roles.%';
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/business/sla", "POST /api/business/sla"],
133
- "actual": ["GET /api/business/sla", "POST /api/business/sla", "PATCH /api/business/sla/{id}/status"],
134
- "message": "Endpoint PATCH /api/business/sla/{id}/status exists in code but not in documentation"
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.{Context}.{App}.{Module}` | `Domain/{Context}/{App}/{Module}/` |
23
- | Application | Interfaces (Common), DTOs | `SmartStack.Application.Common.Interfaces` / `.{Context}.{App}.{Module}.DTOs` | `Application/Common/Interfaces/` + `Application/{Context}/{App}/{Module}/DTOs/` |
24
- | Infrastructure | Service Impl, EF Core | `SmartStack.Infrastructure.Services.{Context}.{App}.{Module}` | `Infrastructure/Services/{Context}/{App}/{Module}/` + `Persistence/Configurations/{Context}/{App}/{Module}/` |
25
- | API | Controllers, Middleware | `SmartStack.Api.Controllers.{Context}` | `Api/Controllers/{Context}/` |
26
- | Web | React components, pages | N/A | `pages/{context}/{app}/{module}/` + `components/{context}/{module}/` |
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 = "{context}.{app}.{module}.view";
35
- public const string Create = "{context}.{app}.{module}.create";
36
- public const string Update = "{context}.{app}.{module}.update";
37
- public const string Delete = "{context}.{app}.{module}.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
- "{context}": {
63
- "{application}": {
64
- "{module}": {
65
- "title": "...",
66
- "fields": { ... },
67
- "actions": { ... },
68
- "messages": { ... }
69
- }
62
+ "{application}": {
63
+ "{module}": {
64
+ "title": "...",
65
+ "fields": { ... },
66
+ "actions": { ... },
67
+ "messages": { ... }
70
68
  }
71
69
  }
72
70
  }