@atlashub/smartstack-cli 2.3.0 → 2.4.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 (33) hide show
  1. package/.documentation/cli-commands.html +1 -1
  2. package/.documentation/init.html +1 -1
  3. package/.documentation/installation.html +1 -1
  4. package/dist/index.js +2 -2
  5. package/dist/index.js.map +1 -1
  6. package/package.json +1 -1
  7. package/templates/agents/ba-reader.md +114 -9
  8. package/templates/agents/ba-writer.md +108 -27
  9. package/templates/agents/mcp-healthcheck.md +1 -1
  10. package/templates/ralph/README.md +1 -1
  11. package/templates/ralph/ralph.config.yaml +1 -1
  12. package/templates/skills/_shared.md +60 -0
  13. package/templates/skills/application/steps/step-00-init.md +32 -8
  14. package/templates/skills/business-analyse/SKILL.md +65 -42
  15. package/templates/skills/business-analyse/_shared.md +161 -51
  16. package/templates/skills/business-analyse/questionnaire/00-application.md +166 -0
  17. package/templates/skills/business-analyse/questionnaire.md +63 -19
  18. package/templates/skills/business-analyse/react/application-viewer.md +242 -0
  19. package/templates/skills/business-analyse/react/components.md +60 -8
  20. package/templates/skills/business-analyse/react/schema.md +238 -7
  21. package/templates/skills/business-analyse/schemas/application-schema.json +389 -0
  22. package/templates/skills/business-analyse/schemas/feature-schema.json +74 -3
  23. package/templates/skills/business-analyse/steps/step-00-init.md +110 -44
  24. package/templates/skills/business-analyse/steps/step-01-cadrage.md +259 -0
  25. package/templates/skills/business-analyse/steps/step-02-decomposition.md +282 -0
  26. package/templates/skills/business-analyse/steps/step-03-specify.md +489 -0
  27. package/templates/skills/business-analyse/steps/step-04-consolidation.md +336 -0
  28. package/templates/skills/business-analyse/steps/step-05-handoff.md +1119 -0
  29. package/templates/skills/mcp/SKILL.md +2 -2
  30. package/templates/skills/business-analyse/steps/step-01-analyse.md +0 -523
  31. package/templates/skills/business-analyse/steps/step-02-specify.md +0 -899
  32. package/templates/skills/business-analyse/steps/step-03-validate.md +0 -1009
  33. package/templates/skills/business-analyse/steps/step-04-handoff.md +0 -1802
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, APEX, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -10,7 +10,11 @@ You are a business analysis reader agent specialized in extracting and synthesiz
10
10
 
11
11
  ## Mission
12
12
 
13
- Read feature.json files in `docs/business/{app}/{module}/business-analyse/v{X.Y}/` and provide structured answers, context summaries, or cross-feature insights. Support discovery, documentation, and skill orchestration.
13
+ Read feature.json files at both application-level and module-level, and provide structured answers, context summaries, or cross-feature insights. Support discovery, documentation, and skill orchestration.
14
+
15
+ **File locations:**
16
+ - Application-level: `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
17
+ - Module-level: `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
14
18
 
15
19
  ## Core Operations
16
20
 
@@ -20,20 +24,115 @@ Locate a feature by ID and return its latest version path.
20
24
  **Input:**
21
25
  - featureId: FEAT-NNN (e.g., FEAT-042)
22
26
  - Optional: versionFilter (e.g., "1.0", "2.x", "latest")
27
+ - Optional: scope ("application" | "module" | "any") — default: "any"
23
28
 
24
29
  **Process:**
25
30
  1. Glob pattern: `docs/business/**/business-analyse/*/feature.json`
26
31
  2. Read each feature.json and check id field
27
- 3. If multiple versions exist, sort numerically by version
28
- 4. Return highest matching version path
29
- 5. If not found, check legacy `.business-analyse/` format
32
+ 3. If scope filter provided, also check scope field
33
+ 4. If multiple versions exist, sort numerically by version
34
+ 5. Return highest matching version path
35
+ 6. If not found, check legacy `.business-analyse/` format
30
36
 
31
37
  **Output:**
32
38
  - Full path to feature.json
33
39
  - Version number
40
+ - Scope (application or module)
34
41
  - Status
35
42
  - Last updated timestamp
36
43
 
44
+ ### findApplicationFeature
45
+ Locate the master (application-level) feature.json for a given app.
46
+
47
+ **Input:**
48
+ - app: string (application code, e.g., "Sales")
49
+ - OR featureId: FEAT-NNN
50
+
51
+ **Process:**
52
+ 1. Glob: `docs/business/{app}/business-analyse/*/feature.json`
53
+ 2. Read and verify scope = "application"
54
+ 3. Return latest version path
55
+
56
+ **Output:**
57
+ - Full path to master feature.json
58
+ - Workflow state (mode, currentModuleIndex, completedModules)
59
+
60
+ ### readApplicationContext
61
+ Read the master feature.json and extract application-level context.
62
+
63
+ **Input:**
64
+ - featureId: FEAT-NNN of the master
65
+
66
+ **Process:**
67
+ 1. Find master feature.json
68
+ 2. Extract: cadrage.applicationRoles, modules[], dependencyGraph, metadata.workflow
69
+ 3. Format as compact context block
70
+
71
+ **Output (max 50 lines):**
72
+ ```markdown
73
+ # Application Context: {app_name}
74
+
75
+ **Mode:** application | **Status:** {status} | **Modules:** {count}
76
+
77
+ ## Roles
78
+ - {Role1}: {permissions summary}
79
+ - {Role2}: {permissions summary}
80
+
81
+ ## Modules ({current}/{total} specified)
82
+ | # | Module | Status | Complexity | Dependencies |
83
+ |---|--------|--------|------------|--------------|
84
+ {for each module}
85
+
86
+ ## Current: {currentModule} (index {currentModuleIndex})
87
+ ```
88
+
89
+ ### getModuleStatus
90
+ Get status overview of all modules in the application.
91
+
92
+ **Input:**
93
+ - featureId: FEAT-NNN of the master
94
+
95
+ **Process:**
96
+ 1. Read master feature.json
97
+ 2. Extract modules[].status for each module
98
+ 3. Return status table
99
+
100
+ **Output:**
101
+ - Markdown table: Module | Status | Complexity | Entities | BRs
102
+
103
+ ### getCompletedModulesSummary
104
+ Get a compact summary of all completed (specified) modules, for use as context when specifying the next module.
105
+
106
+ **Input:**
107
+ - featureId: FEAT-NNN of the master
108
+
109
+ **Process:**
110
+ 1. Read master feature.json → get list of completed modules
111
+ 2. For each completed module, read its module-level feature.json
112
+ 3. Extract compact summary:
113
+ - Entity names (list only)
114
+ - Key business rules (IDs + 1-line descriptions)
115
+ - Permission paths (list only)
116
+ - Key relationships / FK references
117
+ 4. Keep total output under 100 lines
118
+
119
+ **Output:**
120
+ ```markdown
121
+ ## Completed Modules Summary
122
+
123
+ ### Customers (FEAT-011)
124
+ Entities: Customer, Address, Contact
125
+ BRs: BR-VAL-001 (email unique), BR-WF-001 (activation flow)
126
+ Permissions: business.sales.customers.{read|create|update|delete}
127
+ FKs exposed: Customer.Id, Address.Id
128
+
129
+ ### Products (FEAT-012)
130
+ Entities: Product, Category, PriceHistory
131
+ BRs: BR-VAL-002 (SKU format), BR-CALC-001 (price calculation)
132
+ Permissions: business.sales.products.{read|create|update}
133
+ FKs exposed: Product.Id, Category.Id
134
+ ```
135
+
37
136
  ### readSection
38
137
  Extract and format a specific section from a feature.json.
39
138
 
@@ -69,11 +168,14 @@ Answer natural language questions about a feature.
69
168
 
70
169
  **Common Question Types:**
71
170
  - "What are the business rules?" → return analysis.businessRules with full details
72
- - "What permissions are needed?" → extract from specification.functionalRequirements
73
- - "What are the main entities?" → return specification.entities with relationships
74
- - "Who are the actors?" → extract from specification.useCases actors
171
+ - "What permissions are needed?" → extract from specification.permissionMatrix
172
+ - "What are the main entities?" → return specification.entities / analysis.entities with relationships
173
+ - "Who are the actors?" → extract from specification.actors or cadrage.applicationRoles
75
174
  - "What use cases are covered?" → return specification.useCases with descriptions
76
175
  - "What's the current status?" → return status, steps timeline, and next actions
176
+ - "Which modules are defined?" → return modules[] from master (application-level)
177
+ - "What are the cross-module interactions?" → return consolidation.crossModuleInteractions
178
+ - "What roles does the application have?" → return cadrage.applicationRoles from master
77
179
 
78
180
  **Output:**
79
181
  - Answer formatted as markdown
@@ -196,8 +298,9 @@ Generate compact context for use by other skills and agents.
196
298
 
197
299
  When searching for feature data:
198
300
 
199
- 1. **Primary:** `docs/business/` (new feature.json format)
200
- 2. **Fallback:** `.business-analyse/` (legacy format)
301
+ 1. **Primary (application):** `docs/business/{app}/business-analyse/*/feature.json` (scope: application)
302
+ 2. **Primary (module):** `docs/business/{app}/{module}/business-analyse/*/feature.json` (scope: module)
303
+ 3. **Fallback:** `.business-analyse/` (legacy format)
201
304
  - Read: `00-context.md` + `3-functional-specification.md`
202
305
  - Warn user about old format
203
306
  - Suggest migration to new format
@@ -231,6 +334,8 @@ This agent provides context for:
231
334
  - **feature-full**: Source for comprehensive feature documentation
232
335
  - **Code generation**: Permission paths and entity definitions
233
336
  - **ba-writer**: Finding features for enrichment operations
337
+ - **step-03-specify**: Completed module summaries for cross-module references
338
+ - **step-04-consolidation**: Application context and module summaries for cross-module validation
234
339
  - Other skills needing business analysis context
235
340
 
236
341
  ## Example Usage
@@ -10,7 +10,11 @@ You are a business analysis writer agent specialized in managing feature.json fi
10
10
 
11
11
  ## Mission
12
12
 
13
- Write and update feature.json files located in `docs/business/{app}/{module}/business-analyse/v{X.Y}/`. Handle progressive enrichment of features as they move through analysis phases, manage versioning for refactoring, and enforce schema consistency.
13
+ Write and update feature.json files for both application-level (master) and module-level documents. Handle progressive enrichment of features as they move through analysis phases, manage versioning for refactoring, and enforce schema consistency.
14
+
15
+ **Directory structure:**
16
+ - Application-level: `docs/business/{app}/business-analyse/v{X.Y}/feature.json`
17
+ - Module-level: `docs/business/{app}/{module}/business-analyse/v{X.Y}/feature.json`
14
18
 
15
19
  ## Core Operations
16
20
 
@@ -19,60 +23,129 @@ Create an initial feature.json with metadata and draft status.
19
23
 
20
24
  **Input:**
21
25
  - metadata: object with app, module, language, featureDescription, featureType, useCase
26
+ - scope: "application" or "module" (default: "module")
27
+ - Optional: applicationRef (FEAT-NNN of master, required when scope = "module" in app mode)
22
28
  - Optional: initialSections for pre-populated content
23
29
 
24
30
  **Process:**
25
31
  1. Read `.business-analyse/config.json` to get lastFeatureId
26
32
  2. Increment FEAT-NNN identifier
27
- 3. Create directory structure: `docs/business/{app}/{module}/business-analyse/v1.0/`
33
+ 3. Create directory structure based on scope:
34
+ - If scope = "application": `docs/business/{app}/business-analyse/v1.0/`
35
+ - If scope = "module": `docs/business/{app}/{module}/business-analyse/v1.0/`
28
36
  4. Generate initial feature.json with:
29
37
  - id: FEAT-NNN (from config)
30
38
  - version: "1.0"
31
39
  - status: "draft"
32
- - metadata: createdAt, updatedAt, createdBy, updatedBy, previousVersion: null
33
- - discovery: empty object
34
- - analysis: empty object with businessRules: []
35
- - specification: empty object with useCases: [], functionalRequirements: [], entities: []
36
- - validation: empty object with testCases: []
37
- - handoff: empty object
38
- - suggestions: empty array
40
+ - scope: "application" or "module"
41
+ - metadata: createdAt, updatedAt, createdBy, updatedBy, previousVersion: null, scope, applicationRef
42
+ - For application scope: cadrage: {}, modules: [], dependencyGraph: {}, consolidation: {}, suggestions: [], changelog: []
43
+ - For module scope: discovery: {}, analysis: {}, specification: {}, validation: {}, handoff: {}, suggestions: [], applicationContext: {}
39
44
  5. Update `.business-analyse/config.json` with new lastFeatureId
40
45
  6. Append entry to changelog
41
46
 
47
+ ### createApplicationFeature
48
+ Create a master application-level feature.json. Shorthand for `create` with `scope: "application"`.
49
+
50
+ **Input:**
51
+ - metadata: object with app, language, featureDescription
52
+ - workflow: object with mode ("application" or "module"), moduleOrder: [], currentModuleIndex: 0
53
+
54
+ **Process:**
55
+ 1. Call `create` with scope = "application"
56
+ 2. Initialize `metadata.workflow` with mode, moduleOrder: [], currentModuleIndex: 0, completedModules: [], currentModule: null
57
+ 3. Return feature ID and path
58
+
42
59
  ### enrichSection
43
60
  Merge a section into an existing feature.json.
44
61
 
45
62
  **Input:**
46
63
  - featureId: FEAT-NNN or full path to feature.json
47
- - section: one of [discovery, analysis, specification, validation, handoff, suggestions]
64
+ - section: one of [discovery, analysis, specification, validation, handoff, suggestions, cadrage, consolidation, modules, dependencyGraph, metadata.workflow]
48
65
  - data: object to replace the entire section
49
66
 
50
67
  **Process:**
51
68
  1. Find and read feature.json (use findFeature if given ID)
52
69
  2. Replace the named section entirely (no deep merge)
53
- 3. Update metadata.updatedAt with current timestamp
54
- 4. Update metadata.updatedBy with agent name
55
- 5. Write back with pretty-print (2-space indent)
56
- 6. Validate schema before writing
57
- 7. Return confirmation with section size and status
70
+ 3. For nested paths like "metadata.workflow", navigate to the parent and replace the child
71
+ 4. Update metadata.updatedAt with current timestamp
72
+ 5. Update metadata.updatedBy with agent name
73
+ 6. Write back with pretty-print (2-space indent)
74
+ 7. Validate schema before writing
75
+ 8. Return confirmation with section size and status
58
76
 
59
77
  ### updateStatus
60
78
  Transition the status through defined workflow.
61
79
 
62
- **Valid transitions:**
80
+ **Valid transitions (module-level):**
63
81
  - draft → analysed
64
82
  - analysed → specified
65
83
  - specified → approved
66
84
  - specified → rejected (stays as specified)
67
85
  - approved → handed-off
68
86
 
87
+ **Valid transitions (application-level):**
88
+ - draft → framed
89
+ - framed → decomposed
90
+ - decomposed → specified
91
+ - specified → consolidated
92
+ - consolidated → handed-off
93
+
69
94
  **Process:**
70
95
  1. Read feature.json
71
- 2. Verify current status allows transition
72
- 3. Update status field
73
- 4. Update metadata.steps object with timestamp for the corresponding step
96
+ 2. Detect scope (application or module) to determine valid transitions
97
+ 3. Verify current status allows transition
98
+ 4. Update status field
99
+ 5. Update metadata.steps object with timestamp for the corresponding step
100
+ 6. Write back
101
+ 7. Return confirmation with new status
102
+
103
+ ### enrichModuleRegistry
104
+ Update the modules array and dependency graph in a master (application-level) feature.json.
105
+
106
+ **Input:**
107
+ - featureId: FEAT-NNN of the master feature.json
108
+ - modules: array of module objects (code, description, featureType, entities, priority, estimatedComplexity, sortOrder)
109
+ - dependencyGraph: object with edges[], topologicalOrder[], layers[]
110
+
111
+ **Process:**
112
+ 1. Find master feature.json (verify scope = "application")
113
+ 2. Replace `modules` array entirely
114
+ 3. Replace `dependencyGraph` object entirely
115
+ 4. For each module, set initial status: "pending"
116
+ 5. Update metadata.updatedAt
117
+ 6. Write back
118
+ 7. Return confirmation
119
+
120
+ ### updateModuleStatus
121
+ Update the status of a specific module in the master feature.json.
122
+
123
+ **Input:**
124
+ - featureId: FEAT-NNN of the master
125
+ - moduleCode: string (PascalCase module code)
126
+ - status: "pending" | "in-progress" | "specified" | "validated"
127
+
128
+ **Process:**
129
+ 1. Find master feature.json
130
+ 2. Find module by code in `modules[]`
131
+ 3. Update module.status
132
+ 4. Update metadata.updatedAt
74
133
  5. Write back
75
- 6. Return confirmation with new status
134
+ 6. Return confirmation
135
+
136
+ ### advanceModuleLoop
137
+ Increment the module loop counter in the master feature.json.
138
+
139
+ **Process:**
140
+ 1. Find master feature.json
141
+ 2. Read `metadata.workflow.currentModuleIndex` and `metadata.workflow.moduleOrder`
142
+ 3. Add current module to `metadata.workflow.completedModules`
143
+ 4. Increment `metadata.workflow.currentModuleIndex`
144
+ 5. If new index < moduleOrder.length: set `currentModule` to next module
145
+ 6. If new index >= moduleOrder.length: set `currentModule` to null
146
+ 7. Update metadata.updatedAt
147
+ 8. Write back
148
+ 9. Return new index and whether loop is complete
76
149
 
77
150
  ### createVersion
78
151
  Create a new version for refactoring or major changes.
@@ -103,27 +176,35 @@ Perform these structural checks before every write:
103
176
  - BR IDs: must match `BR-(VAL|CALC|WF|SEC|DATA)-\d{3}` (e.g., BR-SEC-042)
104
177
  - UC IDs: must match `UC-\d{3}` (e.g., UC-007)
105
178
  - FR IDs: must match `FR-\d{3}` (e.g., FR-012)
106
- - Permission paths: must match `business\.{app}\.{module}\.{action}` (e.g., business.crm.contacts.create)
179
+ - Permission paths: must match `business\.{app}\.{module}\.{resource}\.{action}` (e.g., business.crm.contacts.read)
107
180
 
108
181
  **Metadata:**
109
- - id, version, status are required
182
+ - id, version, status, scope are required
110
183
  - metadata.createdAt, metadata.updatedAt must be valid ISO timestamps
111
- - status must be in [draft, analysed, specified, approved, rejected, handed-off]
184
+ - For application scope: status must be in [draft, framed, decomposed, specified, consolidated, handed-off]
185
+ - For module scope: status must be in [draft, analysed, specified, approved, rejected, handed-off]
112
186
 
113
187
  **Cross-references:**
114
188
  - All BR-XXX, UC-XXX, FR-XXX referenced must be defined in their respective sections
115
- - Permission paths must use valid naming convention
189
+ - Permission paths must use full format with 5 segments: `business.{app}.{module}.{resource}.{action}`
190
+
191
+ **Application-scope specific:**
192
+ - `modules[]` must exist and be non-empty after decomposition
193
+ - `metadata.workflow` must exist with mode, moduleOrder, currentModuleIndex
194
+ - Each module in `modules[]` must have: code, description, status
116
195
 
117
196
  ## Directory Structure
118
197
 
119
198
  ```
199
+ docs/business/{app}/business-analyse/
200
+ v1.0/
201
+ feature.json ← APPLICATION (master)
202
+
120
203
  docs/business/{app}/{module}/business-analyse/
121
204
  v1.0/
122
- feature.json
205
+ feature.json ← MODULE (detailed)
123
206
  v1.1/
124
207
  feature.json
125
- v2.0/
126
- feature.json
127
208
  ```
128
209
 
129
210
  Versions are stored as separate files in versioned directories. Always store feature.json at the root of each version folder.
@@ -122,7 +122,7 @@ MCP HEALTH CHECK
122
122
  MCP HEALTH CHECK
123
123
  Status: ❌ ERROR
124
124
  Issue: MCP server not responding
125
- Action: claude mcp add smartstack -- npx -p @atlashub/smartstack-cli smartstack-mcp
125
+ Action: claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp
126
126
  ```
127
127
 
128
128
  ## Integration
@@ -35,7 +35,7 @@ npm install -g @upstash/context7-mcp
35
35
 
36
36
  ### 2. Register in Claude Code
37
37
  ```bash
38
- claude mcp add smartstack -- npx -p @atlashub/smartstack-cli smartstack-mcp
38
+ claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp
39
39
  claude mcp add context7 -- npx @upstash/context7-mcp
40
40
  ```
41
41
 
@@ -14,7 +14,7 @@ mcp:
14
14
 
15
15
  - name: smartstack
16
16
  description: "SmartStack validation and scaffolding (bundled in CLI)"
17
- install_command: "claude mcp add smartstack -- npx -p @atlashub/smartstack-cli smartstack-mcp"
17
+ install_command: "claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp"
18
18
  health_check: true
19
19
 
20
20
  # Behavior when MCP is unavailable
@@ -109,6 +109,66 @@ if (entity.UserType == UserType.System || entity.UserType == UserType.LocalAdmin
109
109
  □ API documentation (ProducesResponseType)
110
110
  ```
111
111
 
112
+ ## MCP Prerequisite Guard (BLOCKING)
113
+
114
+ Skills that depend on SmartStack MCP **MUST** verify connectivity before proceeding. This check is **BLOCKING** - the skill cannot continue without MCP.
115
+
116
+ ### Detection Method
117
+
118
+ At skill initialization (step-00-init), attempt a minimal MCP call:
119
+
120
+ ```
121
+ mcp__smartstack__validate_conventions({ checks: ["tables"] })
122
+ ```
123
+
124
+ ### Decision Matrix
125
+
126
+ | Result | Action |
127
+ |--------|--------|
128
+ | Success response | Set `mcp_available = true`, continue workflow |
129
+ | Connection error / tool not found | **STOP EXECUTION** - display error below |
130
+
131
+ ### Blocking Error (STOP)
132
+
133
+ If MCP is not available, display this message and **STOP the skill immediately**:
134
+
135
+ ```
136
+ ═══════════════════════════════════════════════════════════════
137
+ MCP SMARTSTACK NOT AVAILABLE - SKILL BLOCKED
138
+ ═══════════════════════════════════════════════════════════════
139
+
140
+ The SmartStack MCP server is required for this skill but
141
+ could not be reached.
142
+
143
+ To install:
144
+ claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp
145
+
146
+ To verify:
147
+ /mcp:healthcheck
148
+
149
+ After installation, restart Claude Code and retry.
150
+
151
+ ═══════════════════════════════════════════════════════════════
152
+ ```
153
+
154
+ **DO NOT** offer fallback modes, manual instructions, or degraded execution. The skill MUST stop.
155
+
156
+ ### Skills Requiring MCP
157
+
158
+ | Skill | MCP Required | Reason |
159
+ |-------|:---:|--------|
160
+ | business-analyse | **YES** | Analysis, specification, validation |
161
+ | application | **YES** | Navigation + code generation |
162
+ | controller | **YES** | Controller scaffolding |
163
+ | apex | **YES** | Generation + validation |
164
+ | ralph-loop | **YES** | Iterative code generation |
165
+ | validate | **YES** | Convention validation |
166
+ | efcore | **YES** | Migration management |
167
+ | review-code | **YES** | Code review |
168
+ | gitflow | NO | Git operations only |
169
+ | explore | NO | Code search only |
170
+ | mcp | NO | Self-check skill |
171
+
112
172
  ## MCP Tools References
113
173
 
114
174
  ### Outils Core
@@ -51,19 +51,43 @@ displayOrder: number
51
51
  parentPath: "context.application.module" (dot-separated)
52
52
  ```
53
53
 
54
- ### 3. Validate MCP Availability
54
+ ### 3. MCP Prerequisite Check (BLOCKING)
55
55
 
56
- **CRITICAL:** Before proceeding, verify SmartStack MCP is available:
56
+ **CRITICAL:** This check is **BLOCKING** - the skill cannot proceed without MCP.
57
+
58
+ > See `_shared.md` → "MCP Prerequisite Guard (BLOCKING)" for the full pattern.
57
59
 
58
60
  ```
59
61
  Call: mcp__smartstack__validate_conventions
60
- Args: { checks: ["all"] }
62
+ Args: { checks: ["tables"] }
63
+ ```
64
+
65
+ **On success:** Set `mcp_available = true`, continue to Step 4.
66
+
67
+ **On failure (STOP):**
68
+
69
+ ```
70
+ ═══════════════════════════════════════════════════════════════
71
+ MCP SMARTSTACK NOT AVAILABLE - SKILL BLOCKED
72
+ ═══════════════════════════════════════════════════════════════
73
+
74
+ The SmartStack MCP server is required for the application
75
+ skill but could not be reached.
76
+
77
+ To install:
78
+ claude mcp add smartstack -- npx --package @atlashub/smartstack-cli smartstack-mcp
79
+
80
+ To verify:
81
+ /mcp:healthcheck
82
+
83
+ After installation, restart Claude Code and retry.
84
+
85
+ ═══════════════════════════════════════════════════════════════
61
86
  ```
62
87
 
63
- If MCP call fails:
64
- - Display warning: "SmartStack MCP not available"
65
- - Provide manual instructions instead of automated generation
66
- - Do NOT proceed with step files
88
+ **DO NOT** offer manual instructions or degraded execution.
89
+ **DO NOT** proceed with step files.
90
+ **STOP the skill immediately.**
67
91
 
68
92
  ### 4. Build Full Path
69
93
 
@@ -144,7 +168,7 @@ descriptions:
144
168
 
145
169
  - Missing required parameters (ask user)
146
170
  - Invalid level detection (clarify with user)
147
- - MCP not available (provide manual instructions)
171
+ - MCP not available (STOP - display install instructions)
148
172
 
149
173
  ---
150
174