@atlashub/smartstack-cli 1.37.0 → 2.1.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 (123) hide show
  1. package/.documentation/agents.html +147 -40
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +3 -3
  4. package/.documentation/cli-commands.html +2 -2
  5. package/.documentation/commands.html +14 -14
  6. package/.documentation/efcore.html +14 -14
  7. package/.documentation/gitflow.html +12 -12
  8. package/.documentation/hooks.html +41 -3
  9. package/.documentation/index.html +1 -1
  10. package/.documentation/init.html +2 -2
  11. package/.documentation/installation.html +11 -11
  12. package/.documentation/js/app.js +1 -1
  13. package/.documentation/ralph-loop.html +1 -1
  14. package/.documentation/test-web.html +4 -4
  15. package/config/mcp-defaults.json +62 -0
  16. package/dist/index.js +58 -5
  17. package/dist/index.js.map +1 -1
  18. package/dist/mcp-entry.mjs +70010 -0
  19. package/dist/mcp-entry.mjs.map +1 -0
  20. package/package.json +14 -5
  21. package/templates/agents/gitflow/start.md +5 -4
  22. package/templates/agents/mcp-healthcheck.md +15 -13
  23. package/templates/mcp-scaffolding/component.tsx.hbs +298 -0
  24. package/templates/mcp-scaffolding/controller.cs.hbs +184 -0
  25. package/templates/mcp-scaffolding/entity-extension.cs.hbs +231 -0
  26. package/templates/mcp-scaffolding/frontend/api-client.ts.hbs +116 -0
  27. package/templates/mcp-scaffolding/frontend/nav-routes.ts.hbs +133 -0
  28. package/templates/mcp-scaffolding/frontend/routes.tsx.hbs +134 -0
  29. package/templates/mcp-scaffolding/migrations/seed-roles.cs.hbs +261 -0
  30. package/templates/mcp-scaffolding/service-extension.cs.hbs +53 -0
  31. package/templates/mcp-scaffolding/tests/controller.test.cs.hbs +413 -0
  32. package/templates/mcp-scaffolding/tests/entity.test.cs.hbs +239 -0
  33. package/templates/mcp-scaffolding/tests/repository.test.cs.hbs +441 -0
  34. package/templates/mcp-scaffolding/tests/security.test.cs.hbs +442 -0
  35. package/templates/mcp-scaffolding/tests/service.test.cs.hbs +390 -0
  36. package/templates/mcp-scaffolding/tests/validator.test.cs.hbs +428 -0
  37. package/templates/ralph/README.md +3 -3
  38. package/templates/ralph/ralph.config.yaml +2 -2
  39. package/templates/skills/admin/SKILL.md +42 -0
  40. package/templates/skills/business-analyse/_shared.md +79 -15
  41. package/templates/skills/business-analyse/questionnaire/01-context.md +4 -4
  42. package/templates/skills/business-analyse/questionnaire/02-stakeholders.md +3 -3
  43. package/templates/skills/business-analyse/questionnaire/03-scope.md +4 -4
  44. package/templates/skills/business-analyse/questionnaire/04-data.md +7 -7
  45. package/templates/skills/business-analyse/questionnaire/05-integrations.md +1 -1
  46. package/templates/skills/business-analyse/questionnaire/06-security.md +3 -3
  47. package/templates/skills/business-analyse/questionnaire/07-ui.md +1 -1
  48. package/templates/skills/business-analyse/questionnaire/08-performance.md +3 -3
  49. package/templates/skills/business-analyse/questionnaire/09-constraints.md +4 -4
  50. package/templates/skills/business-analyse/questionnaire/10-documentation.md +2 -2
  51. package/templates/skills/business-analyse/questionnaire/11-data-lifecycle.md +2 -2
  52. package/templates/skills/business-analyse/questionnaire/12-migration.md +1 -1
  53. package/templates/skills/business-analyse/questionnaire/13-cross-module.md +2 -2
  54. package/templates/skills/business-analyse/steps/step-01-discover.md +50 -25
  55. package/templates/skills/business-analyse/steps/step-03-specify.md +63 -0
  56. package/templates/skills/business-analyse/steps/step-04-validate.md +23 -1
  57. package/templates/skills/business-analyse/steps/step-05-handoff.md +248 -66
  58. package/templates/skills/business-analyse/templates/tpl-handoff.md +99 -23
  59. package/templates/skills/cc-agent/SKILL.md +129 -0
  60. package/templates/skills/cc-agent/references/agent-frontmatter.md +213 -0
  61. package/templates/skills/cc-agent/references/permission-modes.md +102 -0
  62. package/templates/skills/cc-agent/references/tools-reference.md +144 -0
  63. package/templates/skills/cc-agent/steps/step-00-init.md +134 -0
  64. package/templates/skills/cc-agent/steps/step-01-design.md +186 -0
  65. package/templates/skills/cc-agent/steps/step-02-generate.md +204 -0
  66. package/templates/skills/cc-agent/steps/step-03-validate.md +130 -0
  67. package/templates/skills/cc-agent/templates/agent-categorized.md +67 -0
  68. package/templates/skills/cc-agent/templates/agent-standalone.md +56 -0
  69. package/templates/skills/cc-agent/templates/agent-with-skills.md +94 -0
  70. package/templates/skills/cc-audit/SKILL.md +108 -0
  71. package/templates/skills/cc-audit/references/agent-checklist.md +91 -0
  72. package/templates/skills/cc-audit/references/hook-checklist.md +110 -0
  73. package/templates/skills/cc-audit/references/skill-checklist.md +70 -0
  74. package/templates/skills/cc-audit/steps/step-00-init.md +98 -0
  75. package/templates/skills/cc-audit/steps/step-01-scan.md +142 -0
  76. package/templates/skills/cc-audit/steps/step-02-analyze.md +158 -0
  77. package/templates/skills/cc-audit/steps/step-03-report.md +142 -0
  78. package/templates/skills/cc-skill/SKILL.md +134 -0
  79. package/templates/skills/cc-skill/references/best-practices.md +167 -0
  80. package/templates/skills/cc-skill/references/frontmatter-reference.md +182 -0
  81. package/templates/skills/cc-skill/references/skill-patterns.md +199 -0
  82. package/templates/skills/cc-skill/steps/step-00-init.md +119 -0
  83. package/templates/skills/cc-skill/steps/step-01-design.md +199 -0
  84. package/templates/skills/cc-skill/steps/step-02-generate.md +145 -0
  85. package/templates/skills/cc-skill/steps/step-03-steps.md +151 -0
  86. package/templates/skills/cc-skill/steps/step-04-validate.md +124 -0
  87. package/templates/skills/cc-skill/templates/skill-forked.md +85 -0
  88. package/templates/skills/cc-skill/templates/skill-progressive.md +102 -0
  89. package/templates/skills/cc-skill/templates/skill-simple.md +75 -0
  90. package/templates/skills/cc-skill/templates/step-template.md +82 -0
  91. package/templates/skills/check-version/SKILL.md +6 -0
  92. package/templates/skills/controller/templates.md +82 -0
  93. package/templates/skills/debug/SKILL.md +4 -0
  94. package/templates/skills/documentation/SKILL.md +1 -0
  95. package/templates/skills/efcore/SKILL.md +5 -0
  96. package/templates/skills/efcore/references/zero-downtime-patterns.md +227 -0
  97. package/templates/skills/efcore/steps/db/step-deploy.md +26 -5
  98. package/templates/skills/efcore/steps/migration/step-03-validate.md +19 -0
  99. package/templates/skills/efcore/steps/shared/step-00-init.md +21 -7
  100. package/templates/skills/explore/SKILL.md +28 -32
  101. package/templates/skills/feature-full/SKILL.md +1 -0
  102. package/templates/skills/gitflow/SKILL.md +8 -0
  103. package/templates/skills/gitflow/steps/step-start.md +45 -10
  104. package/templates/skills/mcp/SKILL.md +38 -18
  105. package/templates/skills/quick-search/SKILL.md +8 -1
  106. package/templates/skills/ralph-loop/SKILL.md +1 -1
  107. package/templates/skills/ralph-loop/steps/step-00-init.md +8 -68
  108. package/templates/skills/ralph-loop/steps/step-04-check.md +1 -1
  109. package/templates/skills/refactor/SKILL.md +1 -0
  110. package/templates/skills/review-code/SKILL.md +11 -3
  111. package/templates/skills/review-code/references/owasp-api-top10.md +243 -0
  112. package/templates/skills/review-code/references/security-checklist.md +86 -1
  113. package/templates/skills/review-code/references/smartstack-conventions.md +166 -0
  114. package/templates/skills/ui-components/SKILL.md +31 -438
  115. package/templates/skills/ui-components/accessibility.md +170 -0
  116. package/templates/skills/ui-components/patterns/data-table.md +39 -0
  117. package/templates/skills/ui-components/patterns/entity-card.md +77 -0
  118. package/templates/skills/ui-components/patterns/grid-layout.md +91 -0
  119. package/templates/skills/ui-components/patterns/kanban.md +43 -0
  120. package/templates/skills/ui-components/style-guide.md +86 -0
  121. package/templates/skills/utils/SKILL.md +1 -0
  122. package/templates/skills/validate/SKILL.md +1 -0
  123. package/templates/skills/workflow/SKILL.md +27 -0
@@ -46,21 +46,24 @@ detect_efcore_project() {
46
46
 
47
47
  ```bash
48
48
  detect_dbcontext() {
49
- # Priority 1: SmartStack.Domain exists → CoreDbContext
49
+ # Priority 1: SmartStack.Domain exists → SmartStack source project (Core only)
50
50
  if find . -type d -name "SmartStack.Domain" | grep -q .; then
51
51
  DBCONTEXT="CoreDbContext"
52
52
  DBCONTEXT_TYPE="core"
53
53
  SCHEMA="core"
54
+ RUN_BOTH=false
54
55
  echo "DbContext: CoreDbContext (SmartStack.Domain found)"
55
56
  return
56
57
  fi
57
58
 
58
- # Priority 2: Client with SmartStack NuGet → ExtensionsDbContext
59
+ # Priority 2: Client with SmartStack NuGet → BOTH contexts (Core from NuGet + Extensions local)
59
60
  if find . -name "*.csproj" -exec grep -l "SmartStack\." {} \; | grep -qv "SmartStack\."; then
60
- DBCONTEXT="ExtensionsDbContext"
61
- DBCONTEXT_TYPE="extensions"
62
- SCHEMA="extensions"
63
- echo "DbContext: ExtensionsDbContext (SmartStack NuGet reference)"
61
+ DBCONTEXT="CoreDbContext"
62
+ DBCONTEXT_TYPE="both"
63
+ SCHEMA="core"
64
+ RUN_BOTH=true
65
+ echo "DbContext: Both (Core from SmartStack NuGet + Extensions local)"
66
+ echo " Deploy order: CoreDbContext → ExtensionsDbContext"
64
67
  return
65
68
  fi
66
69
 
@@ -68,19 +71,28 @@ detect_dbcontext() {
68
71
  CORE_CTX=$(find . -name "*.cs" -exec grep -l "CoreDbContext" {} \; 2>/dev/null | head -1)
69
72
  EXT_CTX=$(find . -name "*.cs" -exec grep -l "ExtensionsDbContext" {} \; 2>/dev/null | head -1)
70
73
 
71
- if [ -n "$CORE_CTX" ] && [ -z "$EXT_CTX" ]; then
74
+ if [ -n "$CORE_CTX" ] && [ -n "$EXT_CTX" ]; then
75
+ DBCONTEXT="CoreDbContext"
76
+ DBCONTEXT_TYPE="both"
77
+ SCHEMA="core"
78
+ RUN_BOTH=true
79
+ echo "DbContext: Both (CoreDbContext + ExtensionsDbContext found)"
80
+ elif [ -n "$CORE_CTX" ] && [ -z "$EXT_CTX" ]; then
72
81
  DBCONTEXT="CoreDbContext"
73
82
  DBCONTEXT_TYPE="core"
74
83
  SCHEMA="core"
84
+ RUN_BOTH=false
75
85
  elif [ -z "$CORE_CTX" ] && [ -n "$EXT_CTX" ]; then
76
86
  DBCONTEXT="ExtensionsDbContext"
77
87
  DBCONTEXT_TYPE="extensions"
78
88
  SCHEMA="extensions"
89
+ RUN_BOTH=false
79
90
  else
80
91
  # Priority 4: Ask user
81
92
  DBCONTEXT=""
82
93
  DBCONTEXT_TYPE=""
83
94
  SCHEMA=""
95
+ RUN_BOTH=false
84
96
  fi
85
97
  }
86
98
  ```
@@ -204,6 +216,7 @@ block_production() {
204
216
  EF CORE CONTEXT
205
217
  ├── Project: {PROJECT_NAME}
206
218
  ├── DbContext: {DBCONTEXT} ({DBCONTEXT_TYPE})
219
+ ├── Run Both: {RUN_BOTH} (Core → Extensions)
207
220
  ├── Schema: {SCHEMA}
208
221
  ├── Migrations: {MIGRATIONS_DIR}
209
222
  ├── Environment:{SELECTED_ENV}
@@ -229,6 +242,7 @@ After this step, these variables are available:
229
242
  | `{branch_type}` | feature |
230
243
  | `{current_branch}` | feature/multitenant |
231
244
  | `{selected_env}` | Local |
245
+ | `{run_both}` | true |
232
246
 
233
247
  ---
234
248
 
@@ -2,10 +2,15 @@
2
2
  name: explore
3
3
  description: Deep codebase exploration to answer specific questions
4
4
  argument-hint: <question>
5
+ context: fork
6
+ agent: Explore
7
+ allowed-tools: Read, Grep, Glob, WebSearch, WebFetch
5
8
  ---
6
9
 
7
10
  <objective>
8
- Answer questions about the codebase through systematic investigation using parallel exploration agents.
11
+ Answer questions about the codebase through systematic investigation using direct search tools.
12
+
13
+ **Note:** This skill runs in an isolated context. Use Grep, Glob, and Read directly - do NOT launch Task agents.
9
14
  </objective>
10
15
 
11
16
  <quick_start>
@@ -16,57 +21,48 @@ Answer questions about the codebase through systematic investigation using paral
16
21
  ```
17
22
  </quick_start>
18
23
 
24
+ ## Task
25
+ Research the following question: $ARGUMENTS
26
+
19
27
  <workflow>
20
28
 
21
29
  ## 1. Parse Question
22
30
 
23
- - Extract key terms and concepts from question
31
+ - Extract key terms and concepts from the question
24
32
  - Identify file types, patterns, or areas to search
25
33
  - Determine if web research is needed
26
34
 
27
- ## 2. Search Codebase (Parallel Agents)
35
+ ## 2. Search Codebase (Direct Tools)
28
36
 
29
- Launch multiple exploration agents **in parallel**:
37
+ Use direct search tools **in parallel** where possible:
30
38
 
31
- **Agent 1: Codebase Exploration** (`explore-codebase`)
39
+ **File discovery:**
32
40
  ```
33
- Find existing code related to: {question}
34
-
35
- Report ONLY what exists:
36
- 1. Files that contain related code (with paths and line numbers)
37
- 2. Existing patterns used for similar features
38
- 3. Utility functions that might be relevant
39
- 4. How similar features are currently structured
40
- 5. Test file locations and patterns
41
-
42
- DO NOT suggest what to build. Just report what's there.
41
+ Glob: pattern="**/*{keyword}*" to find related files
43
42
  ```
44
43
 
45
- **Agent 2: Documentation Research** (`explore-docs`)
44
+ **Code search:**
46
45
  ```
47
- Research documentation for libraries used in: {question}
48
-
49
- Find:
50
- 1. How the relevant libraries/frameworks work
51
- 2. API documentation for tools being used
52
- 3. Best practices from official docs
46
+ Grep: pattern="{keyword}" to find content matches
47
+ Grep: pattern="class {Name}" or "function {name}" for implementations
53
48
  ```
54
49
 
55
- **Agent 3: Web Research** (`websearch`) - *if external context needed*
50
+ **Targeted reading:**
51
+ ```
52
+ Read: the most relevant 3-5 files discovered
56
53
  ```
57
- Search for context about: {question}
58
54
 
59
- Find:
60
- 1. How this is typically implemented
61
- 2. Common patterns and approaches
62
- 3. Known pitfalls or gotchas
55
+ **Web research** (if external context needed):
56
+ ```
57
+ WebSearch: "{question} best practices"
58
+ WebFetch: documentation URLs found in the codebase
63
59
  ```
64
60
 
65
- **CRITICAL**: Launch agents in a SINGLE message for parallel execution.
61
+ **CRITICAL**: Run independent searches in parallel for speed.
66
62
 
67
63
  ## 3. Analyze Findings
68
64
 
69
- - Read relevant files found by agents
65
+ - Read relevant files found by searches
70
66
  - Trace relationships between files
71
67
  - Identify patterns and conventions
72
68
  - Note file paths with line numbers (e.g., `src/app.ts:42`)
@@ -83,11 +79,11 @@ Provide comprehensive response:
83
79
 
84
80
  <execution_rules>
85
81
 
86
- - **PARALLEL SEARCH**: Launch multiple agents simultaneously
82
+ - **PARALLEL SEARCH**: Run independent Grep/Glob searches simultaneously
87
83
  - **CITE SOURCES**: Always reference file paths and line numbers
88
84
  - **STAY FOCUSED**: Only explore what's needed to answer the question
89
85
  - **BE THOROUGH**: Don't stop at first match - gather complete context
90
- - **ULTRA THINK**: Consider relationships between discovered elements
86
+ - **NO TASK AGENTS**: Use Grep, Glob, Read, WebSearch, WebFetch directly
91
87
 
92
88
  </execution_rules>
93
89
 
@@ -8,6 +8,7 @@ description: |
8
8
  - Creating a module with notifications, workflows and/or AI
9
9
  - Need for complete user experience
10
10
  Scope: Domain → Application → Infrastructure → API → Web + Notifications + Workflows + AI
11
+ disable-model-invocation: true
11
12
  ---
12
13
 
13
14
  # Skill Feature Full SmartStack
@@ -2,8 +2,16 @@
2
2
  name: gitflow
3
3
  description: GitFlow workflow with versioning, worktrees, and EF Core migration management. Progressive step loading for minimal context usage.
4
4
  argument-hint: "[-a] [-f|-r|-h] <action> [name]"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
8
+ ## Current state (auto-injected)
9
+ - Branch: !`git branch --show-current`
10
+ - Status: !`git status --short`
11
+ - Recent commits: !`git log --oneline -5`
12
+ - Worktrees: !`git worktree list 2>/dev/null`
13
+ - Config: !`cat .gitflow/config.json 2>/dev/null || echo "no config found"`
14
+
7
15
  <objective>
8
16
  Execute GitFlow workflows with automatic versioning, worktree management, and EF Core migration validation. Uses progressive step loading to minimize context and maintain fresh state at each phase.
9
17
  </objective>
@@ -207,6 +207,11 @@ DB_NAME=$(echo "${PROJECT_NAME}_${branch_type}_${BRANCH_NAME}" | cut -c1-63)
207
207
  "ConnectionStrings": {
208
208
  "DefaultConnection": "Server=localhost;Database=${DB_NAME};Trusted_Connection=true;TrustServerCertificate=true"
209
209
  },
210
+ "SmartStack": {
211
+ "AutoMigrate": true,
212
+ "FailOnMigrationError": true,
213
+ "EnableDevSeeding": true
214
+ },
210
215
  "Authentication": {
211
216
  "FrontendUrl": "http://localhost:${WEB_PORT}"
212
217
  },
@@ -261,14 +266,40 @@ EOF
261
266
  }
262
267
  ```
263
268
 
264
- #### 7c. Summary of local config
269
+ #### 7c. Backend: launchSettings.json Local Profile
270
+
271
+ **If API project detected and Properties/launchSettings.json exists:**
272
+ ```bash
273
+ LAUNCH_SETTINGS="$API_DIR/Properties/launchSettings.json"
274
+ [ -n "$API_DIR" ] && [ -f "$LAUNCH_SETTINGS" ] && {
275
+ # Use Node.js to safely add/update Local profile in launchSettings.json
276
+ node -e "
277
+ const fs = require('fs');
278
+ const ls = JSON.parse(fs.readFileSync('$LAUNCH_SETTINGS', 'utf8'));
279
+ ls.profiles = ls.profiles || {};
280
+ ls.profiles.Local = {
281
+ commandName: 'Project',
282
+ dotnetRunMessages: true,
283
+ launchBrowser: false,
284
+ applicationUrl: 'http://localhost:${API_PORT}',
285
+ environmentVariables: {
286
+ ASPNETCORE_ENVIRONMENT: 'Local'
287
+ }
288
+ };
289
+ fs.writeFileSync('$LAUNCH_SETTINGS', JSON.stringify(ls, null, 2) + '\n');
290
+ console.log('Updated: launchSettings.json Local profile (Port: ${API_PORT})');
291
+ "
292
+ }
293
+ ```
294
+
295
+ #### 7d. Summary of local config
265
296
 
266
297
  ```
267
298
  ┌─────────────────────────────────────────────────────────────┐
268
299
  │ LOCAL ENVIRONMENT CONFIGURED │
269
300
  ├─────────────────────────────────────────────────────────────┤
270
301
  │ Database: ${DB_NAME} │
271
- │ API Port: ${API_PORT} → dotnet run --environment Local
302
+ │ API Port: ${API_PORT} → dotnet run --launch-profile Local│
272
303
  │ Web Port: ${WEB_PORT} → npm run local │
273
304
  └─────────────────────────────────────────────────────────────┘
274
305
  ```
@@ -315,19 +346,22 @@ EOF
315
346
  ║ 1. Go to worktree: ║
316
347
  ║ cd {WORKTREE_PATH} ║
317
348
  ║ ║
318
- ║ 2. Start local environment:
319
- # Terminal 1 - Backend:
320
- cd src/SmartStack.Api && dotnet run --environment Local
321
- # Terminal 2 - Frontend:
322
- cd web/smartstack-web && npm run local
349
+ ║ 2. Start backend (auto-migrates Core + Extensions DB):
350
+ dotnet run --project src/{Project}.Api --launch-profile Local
351
+
352
+ 3. Reset admin password:
353
+ ss admin reset
354
+ ║ ║
355
+ ║ 4. Start frontend (other terminal): ║
356
+ ║ cd web/{project}-web && npm run local ║
323
357
  ║ ║
324
- 3. Make changes and commit: ║
358
+ 5. Make changes and commit: ║
325
359
  ║ /gitflow commit ║
326
360
  ║ ║
327
- 4. Create pull request: ║
361
+ 6. Create pull request: ║
328
362
  ║ /gitflow pr ║
329
363
  ║ ║
330
- 5. After PR merged, finalize: ║
364
+ 7. After PR merged, finalize: ║
331
365
  ║ /gitflow finish ║
332
366
  ╚══════════════════════════════════════════════════════════════════╝
333
367
  ```
@@ -351,6 +385,7 @@ EOF
351
385
  - **Branch pushed to remote (AUTOMATIC)**
352
386
  - Worktree set up (if enabled)
353
387
  - Backend local config created: `appsettings.Local.json` (if .NET API detected)
388
+ - Backend launch profile created: `launchSettings.json` Local profile with unique port (if .NET API detected)
354
389
  - Frontend local config created: `.env.local` + `npm run local` script (if web project detected)
355
390
  - Ports synchronized between backend and frontend (unique per branch)
356
391
  - State stored for subsequent steps
@@ -8,12 +8,19 @@ description: |
8
8
  - Before any MCP-dependent operation fails
9
9
  - After MCP configuration changes
10
10
  Subcommands: healthcheck, tools
11
+ model: haiku
12
+ allowed-tools: Read, Bash, Glob
11
13
  ---
12
14
 
15
+ ## Current state (auto-injected)
16
+ - MCP cache: !`cat .claude/mcp-status.json 2>/dev/null || echo "no cache"`
17
+
13
18
  # Skill MCP SmartStack
14
19
 
15
20
  Manages MCP server connectivity and health verification.
16
21
 
22
+ > **Note:** The MCP server is now bundled inside `@atlashub/smartstack-cli`. There is no separate `@atlashub/smartstack-mcp` package.
23
+
17
24
  ## SUBCOMMANDS
18
25
 
19
26
  | Command | Description |
@@ -37,7 +44,7 @@ Performs a complete MCP health check and updates the cache.
37
44
  │ └─▶ Call mcp__smartstack__validate_conventions │
38
45
  │ │
39
46
  │ 2. Get MCP Version │
40
- │ └─▶ Read SmartStack.mcp/package.json
47
+ │ └─▶ smartstack --version (bundled in CLI)
41
48
  │ │
42
49
  │ 3. List Available Tools │
43
50
  │ └─▶ Enumerate mcp__smartstack__* tools │
@@ -65,16 +72,16 @@ mcp__smartstack__validate_conventions({
65
72
  Error: <error_message>
66
73
 
67
74
  Actions:
68
- 1. Verify MCP is configured in Claude Code settings
69
- 2. Check SmartStack.mcp path: D:\01 - projets\SmartStack.mcp
75
+ 1. Verify MCP is configured: claude mcp list
76
+ 2. Re-register: claude mcp add smartstack -- npx -p @atlashub/smartstack-cli smartstack-mcp
70
77
  3. Restart Claude Code
71
78
  ```
72
79
 
73
80
  ### Step 2: Get Version
74
81
 
75
82
  ```bash
76
- # Read MCP version
77
- cat "D:\01 - projets\SmartStack.mcp\package.json" | grep '"version"'
83
+ # Read CLI package version (MCP is bundled inside)
84
+ npx smartstack --version 2>/dev/null || smartstack --version
78
85
  ```
79
86
 
80
87
  ### Step 3: List Tools
@@ -97,7 +104,7 @@ Write to `.claude/mcp-status.json`:
97
104
  {
98
105
  "lastCheck": "<ISO_DATE>",
99
106
  "mcpVersion": "<VERSION>",
100
- "mcpPath": "D:\\01 - projets\\SmartStack.mcp",
107
+ "bundled": true,
101
108
  "status": "ok",
102
109
  "toolsAvailable": [
103
110
  "validate_conventions",
@@ -116,9 +123,8 @@ Write to `.claude/mcp-status.json`:
116
123
  MCP HEALTH CHECK ✓
117
124
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
118
125
  Status : OK
119
- Version : 1.5.0
120
- Path : D:\01 - projets\SmartStack.mcp
121
- Tools : 12 available
126
+ Version : 2.0.0 (bundled)
127
+ Tools : 19 available
122
128
  Cache : Updated (.claude/mcp-status.json)
123
129
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
124
130
  Next check : in 7 days (auto)
@@ -129,9 +135,9 @@ MCP HEALTH CHECK ✓
129
135
  MCP HEALTH CHECK ⚠️
130
136
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
131
137
  Status : UPDATE AVAILABLE
132
- Current : 1.4.0
133
- Latest : 1.5.0
134
- Action : cd SmartStack.mcp && git pull
138
+ Current : 1.38.0
139
+ Latest : 2.0.0
140
+ Action : npm update -g @atlashub/smartstack-cli
135
141
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
136
142
  ```
137
143
 
@@ -143,9 +149,9 @@ MCP HEALTH CHECK ❌
143
149
  Issue : MCP server not responding
144
150
 
145
151
  Troubleshooting:
146
- 1. Check Claude Code MCP configuration
147
- 2. Verify path: D:\01 - projets\SmartStack.mcp
148
- 3. Run: cd SmartStack.mcp && npm install
152
+ 1. Check registration: claude mcp list
153
+ 2. Re-register: claude mcp add smartstack -- npx -p @atlashub/smartstack-cli smartstack-mcp
154
+ 3. Update CLI: npm update -g @atlashub/smartstack-cli
149
155
  4. Restart Claude Code
150
156
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
151
157
  ```
@@ -160,8 +166,8 @@ MCP HEALTH CHECK ❌
160
166
  ```json
161
167
  {
162
168
  "lastCheck": "2024-01-15T10:30:00.000Z",
163
- "mcpVersion": "1.5.0",
164
- "mcpPath": "D:\\01 - projets\\SmartStack.mcp",
169
+ "mcpVersion": "2.0.0",
170
+ "bundled": true,
165
171
  "status": "ok" | "error",
166
172
  "toolsAvailable": ["tool1", "tool2", ...],
167
173
  "errors": ["error1", ...] // only if status = error
@@ -214,6 +220,14 @@ Lists all available MCP tools with their descriptions.
214
220
  | `scaffold_frontend_extension` | Generate frontend extension infrastructure (types, slots, contexts) |
215
221
  | `analyze_extension_points` | Analyze React components for extension points |
216
222
 
223
+ ### Security & Quality Tools (4)
224
+ | Tool | Description |
225
+ |------|-------------|
226
+ | `validate_security` | Validate OWASP security patterns |
227
+ | `analyze_code_quality` | Analyze code quality metrics |
228
+ | `analyze_hierarchy_patterns` | Analyze entity hierarchy patterns |
229
+ | `review_code` | Comprehensive code review with security, performance, a11y checks |
230
+
217
231
  ### Output Format
218
232
 
219
233
  ```
@@ -241,6 +255,12 @@ FRONTEND TOOLS (5)
241
255
  scaffold_frontend_extension Generate extension infrastructure
242
256
  analyze_extension_points Analyze React extension points
243
257
 
258
+ SECURITY & QUALITY TOOLS (4)
259
+ validate_security Validate OWASP patterns
260
+ analyze_code_quality Analyze code quality
261
+ analyze_hierarchy_patterns Analyze hierarchy patterns
262
+ review_code Comprehensive code review
263
+
244
264
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
245
- Total: 15 tools available
265
+ Total: 19 tools available
246
266
  ```
@@ -2,12 +2,19 @@
2
2
  name: quick-search
3
3
  description: Lightning-fast search to answer specific questions - optimized for speed
4
4
  argument-hint: <question>
5
- allowed-tools: Grep, Glob, Read
5
+ context: fork
6
+ agent: Explore
6
7
  model: haiku
8
+ allowed-tools: Grep, Glob, Read
7
9
  ---
8
10
 
11
+ ## Question
12
+ $ARGUMENTS
13
+
9
14
  <objective>
10
15
  Answer questions at maximum speed using direct search tools. No agents, no deep analysis - just fast answers with citations.
16
+
17
+ **Note:** This skill runs in an isolated context. Use Grep, Glob, and Read directly.
11
18
  </objective>
12
19
 
13
20
  <quick_start>
@@ -2,6 +2,7 @@
2
2
  name: ralph-loop
3
3
  description: Iterative AI development loop with MCP validation, progress tracking, and completion promises.
4
4
  argument-hint: "[-m N] [-c TEXT] [-v] <task description>"
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  <objective>
@@ -245,7 +246,6 @@ Before ANY work, verify MCP servers:
245
246
  > - `task.category`: `domain` | `application` | `infrastructure` | `api` | `frontend` | `i18n` | `test` | `validation` | `other`
246
247
  > - `task.dependencies`: Array of task IDs that must be `completed` before this task can start
247
248
  > - `history`: Structured iteration journal (replaces unstructured progress.txt for traceability)
248
- > - **Backward compatibility**: step-00 auto-migrates v1 prd.json (with `passes` boolean) to v2 format
249
249
  </file_structure>
250
250
 
251
251
  <execution_rules>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: step-00-init
3
- description: Initialize Ralph loop - parse args, verify MCP, setup state, migrate v1
3
+ description: Initialize Ralph loop - parse args, verify MCP, setup state
4
4
  next_step: steps/step-01-task.md
5
5
  ---
6
6
 
@@ -13,7 +13,7 @@ next_step: steps/step-01-task.md
13
13
  - ONLY check for resume if -r flag is set
14
14
  - YOU ARE AN INITIALIZER, not an executor
15
15
  - FORBIDDEN to load step-01 until init is complete
16
- - ALWAYS check prd.json version and migrate if v1
16
+ - ALWAYS check prd.json version is v2
17
17
 
18
18
  ## YOUR TASK:
19
19
 
@@ -120,71 +120,11 @@ STOP - Do not proceed.
120
120
  ```javascript
121
121
  const prd = readJSON('.ralph/prd.json');
122
122
 
123
- // v1 detection: has "passes" field in tasks or no "$version"
124
- const isV1 = !prd.$version || prd.tasks?.some(t => 'passes' in t);
125
-
126
- if (isV1) {
127
- // AUTO-MIGRATE v1 → v2
128
- migrateV1toV2(prd);
129
- }
130
- ```
131
-
132
- **v1 → v2 Migration logic:**
133
-
134
- ```javascript
135
- function migrateV1toV2(prd) {
136
- prd.$version = "2.0.0";
137
- prd.status = prd.tasks.every(t => t.passes) ? "completed" : "in_progress";
138
- prd.updated_at = new Date().toISOString();
139
-
140
- // Migrate source field
141
- if (typeof prd.source === 'string') {
142
- prd.source = { type: "ba-handoff", handoff_path: prd.source, frd_path: null, brd_path: null };
143
- } else if (prd.source === null || prd.source === undefined) {
144
- prd.source = null;
145
- }
146
-
147
- // Group flat config fields
148
- prd.config = {
149
- max_iterations: prd.max_iterations || 50,
150
- completion_promise: prd.completion_promise || "COMPLETE",
151
- current_iteration: prd.current_iteration || 1
152
- };
153
- delete prd.max_iterations;
154
- delete prd.completion_promise;
155
- delete prd.current_iteration;
156
-
157
- // Add metadata
158
- prd.metadata = {
159
- cli_version: "unknown (migrated)",
160
- branch: getCurrentBranch(),
161
- project_path: process.cwd(),
162
- mcp_servers: { smartstack: {mcp_smartstack}, context7: {mcp_context7} }
163
- };
164
-
165
- // Migrate tasks
166
- prd.tasks = prd.tasks.map(t => ({
167
- id: t.id,
168
- description: t.description,
169
- status: t.passes ? "completed" : "pending",
170
- category: "other",
171
- dependencies: [],
172
- acceptance_criteria: null,
173
- started_at: null,
174
- completed_at: t.passes ? prd.updated_at : null,
175
- iteration: null,
176
- commit_hash: null,
177
- files_changed: { created: [], modified: [] },
178
- validation: null,
179
- error: null
180
- }));
181
-
182
- // Initialize history
183
- prd.history = [];
184
-
185
- // Write migrated file
186
- writeJSON('.ralph/prd.json', prd);
187
- echo "✅ Migrated prd.json from v1 to v2";
123
+ if (prd.$version !== "2.0.0") {
124
+ echo "❌ prd.json schema version unsupported: ${prd.$version || 'missing'}";
125
+ echo " Expected: 2.0.0";
126
+ echo " Re-run /business-analyse to generate a fresh prd.json";
127
+ STOP;
188
128
  }
189
129
  ```
190
130
 
@@ -331,7 +271,7 @@ Branch: {CURRENT_BRANCH}
331
271
  - .ralph/ directory structure created
332
272
  - Completion promise defined
333
273
  - Metadata collected (branch, version, MCP status)
334
- - v1 prd.json migrated to v2 (if resume)
274
+ - prd.json v2 schema validated (if resume)
335
275
  - Branch integrity validated (if resume)
336
276
  - Output is COMPACT
337
277
  - Proceeded to step-01 immediately after summary
@@ -8,7 +8,7 @@ next_step: steps/step-05-report.md OR steps/step-01-task.md
8
8
 
9
9
  ## YOUR TASK:
10
10
 
11
- Check if all tasks are complete and decide whether to output completion promise or continue to next task. Uses v2 status-based checks instead of boolean `passes`.
11
+ Check if all tasks are complete and decide whether to output completion promise or continue to next task.
12
12
 
13
13
  ---
14
14
 
@@ -2,6 +2,7 @@
2
2
  name: refactor
3
3
  description: Refactor code by finding files, grouping them, and launching parallel Snipper agents
4
4
  argument-hint: <search-pattern-or-description>
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
8
  <objective>
@@ -1,8 +1,14 @@
1
1
  ---
2
2
  name: review-code
3
- description: This skill should be used when the user asks to "review code", "review this PR", "code review", "audit this code", or mentions reviewing pull requests, security checks, or code quality. Covers security (OWASP), clean code (SOLID), code smells, complexity metrics, and high-value feedback patterns. Focuses on impactful issues, not nitpicks.
3
+ description: Expert code review covering security (OWASP), architecture, clean code (SOLID), performance, and SmartStack conventions via MCP. Use for PR reviews, security audits, and code quality checks.
4
+ model: sonnet
4
5
  ---
5
6
 
7
+ ## Files to review (auto-injected)
8
+ - Changed files: !`git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --staged 2>/dev/null || echo "no changes detected"`
9
+ - Diff stats: !`git diff --stat HEAD~1 2>/dev/null || git diff --stat --staged 2>/dev/null || echo "no stats"`
10
+ - SmartStack detected: !`test -f "*.sln" && grep -l "SmartStack" *.sln 2>/dev/null && echo "YES" || echo "NO"`
11
+
6
12
  <objective>
7
13
  Provide expert-level code review guidance that focuses on high-impact issues: security vulnerabilities, logic errors, maintainability problems, and architectural concerns. Skip nitpicks and style issues that should be automated.
8
14
 
@@ -145,7 +151,8 @@ The MCP tool returns a structured report. Display it as-is or integrate key find
145
151
  - Authorization checks on every endpoint
146
152
  - No `eval()`, `exec()`, dangerous functions
147
153
 
148
- See [references/security-checklist.md](references/security-checklist.md) for OWASP Top 10 patterns.
154
+ See [references/security-checklist.md](references/security-checklist.md) for OWASP Top 10 patterns (web application vulnerabilities).
155
+ See [references/owasp-api-top10.md](references/owasp-api-top10.md) for OWASP API Security Top 10 (API-specific threats: BOLA, mass assignment, SSRF, resource consumption).
149
156
  </category>
150
157
 
151
158
  <category name="logic" priority="critical">
@@ -316,7 +323,8 @@ A good code review:
316
323
  <reference_guides>
317
324
  For detailed guidance and patterns:
318
325
 
319
- - **`references/security-checklist.md`** - OWASP Top 10, authentication patterns, input validation, common vulnerabilities
326
+ - **`references/security-checklist.md`** - OWASP Top 10, authentication patterns, input validation, rate limiting, security headers
327
+ - **`references/owasp-api-top10.md`** - OWASP API Security Top 10: BOLA, mass assignment, SSRF, resource consumption, SmartStack-specific detection patterns
320
328
  - **`references/clean-code-principles.md`** - SOLID principles, naming conventions, function design, code smell detection
321
329
  - **`references/feedback-patterns.md`** - Valuable vs wasteful feedback patterns, communication strategies, priority labeling
322
330
  - **`references/code-quality-metrics.md`** - Complexity calculations, maintainability index, measurement techniques