@atlashub/smartstack-cli 3.51.0 → 3.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlashub/smartstack-cli",
3
- "version": "3.51.0",
3
+ "version": "3.52.0",
4
4
  "description": "SmartStack Claude Code automation toolkit - GitFlow, EF Core migrations, prompts and more",
5
5
  "author": {
6
6
  "name": "SmartStack",
@@ -95,188 +95,104 @@ Parse the report to extract:
95
95
 
96
96
  ---
97
97
 
98
- ## STEP 2: ASK USER (4 MANDATORY QUESTIONS)
99
-
100
- ⛔ EXECUTION RULES FOR STEP 2:
101
- - Each question = ONE separate AskUserQuestion call
102
- - NEVER combine multiple questions into a single AskUserQuestion
103
- - NEVER skip a question, even if a default seems obvious
104
- - ALL 4 variables must be set by explicit user response before proceeding
105
-
106
- > **Reconfigure mode:** When `EXISTING_GITFLOW=true` and user chose "Reconfigure", show existing values as "(Current)" recommended options in each question. This avoids forcing the user to re-enter everything.
98
+ ## STEP 2: ASK USER MANDATORY INTERACTIVE QUESTIONS
99
+
100
+ ╔══════════════════════════════════════════════════════════════════════════╗
101
+ ║ MANDATORY TOOL CALL REQUIREMENT ║
102
+ ║ ║
103
+ ║ You MUST call the AskUserQuestion tool AT LEAST 3 TIMES in this step. ║
104
+ ║ (4 times if URL was not provided in the command.) ║
105
+ ║ ║
106
+ ║ Each call = ONE question. Wait for the user's response before asking ║
107
+ ║ the next question. ║
108
+ ║ ║
109
+ ║ You are FORBIDDEN from: ║
110
+ ║ - Deriving values from the URL or environment instead of asking ║
111
+ ║ - Deciding what the user "would probably choose" ║
112
+ ║ - Proceeding to step 3 without having received user responses ║
113
+ ║ - Using detected/inferred values as final values without user confirm ║
114
+ ║ ║
115
+ ║ Auto-detected values from step 1 are SUGGESTIONS for the options, ║
116
+ ║ NOT answers. The user MUST confirm or override each one. ║
117
+ ╚══════════════════════════════════════════════════════════════════════════╝
118
+
119
+ > **Reconfigure mode:** When `EXISTING_GITFLOW=true` and user chose "Reconfigure", show existing values as "(Current)" recommended options in each question.
107
120
 
108
121
  ### 2a. Repository URL
109
122
 
110
- **If user provided a URL in the command (starts with `https://` or `git@`), use it directly.**
123
+ **If user provided a URL in the command (starts with `https://` or `git@`), use it directly. Skip to 2b.**
111
124
 
112
- Otherwise ask:
125
+ Otherwise, CALL the AskUserQuestion tool NOW with:
126
+ - header: "Repository"
127
+ - question: "Repository URL? (detected: {DETECTED_URL})"
128
+ - options: Use detected URL (Recommended) / Enter GitHub URL / Enter Azure DevOps URL / Local only
129
+ - **If user selects a custom option, CALL AskUserQuestion again for the actual URL.**
130
+ - Store the result as `{REPO_URL}`.
113
131
 
114
- **Fresh init (no existing config):**
115
- ```json
116
- {
117
- "questions": [{
118
- "question": "Repository URL? (detected: {DETECTED_URL})",
119
- "header": "Repository",
120
- "options": [
121
- {"label": "Use detected URL (Recommended)", "description": "{DETECTED_URL}"},
122
- {"label": "Enter GitHub URL", "description": "https://github.com/org/repo.git"},
123
- {"label": "Enter Azure DevOps URL", "description": "https://dev.azure.com/org/project/_git/repo"},
124
- {"label": "Local only (no remote)", "description": "Initialize without remote"}
125
- ],
126
- "multiSelect": false
127
- }]
128
- }
129
- ```
132
+ ### 2b. Root Folder — CALL AskUserQuestion NOW
130
133
 
131
- **Reconfigure mode (existing config):**
132
- ```json
133
- {
134
- "questions": [{
135
- "question": "Repository URL? (current: {EXISTING_URL})",
136
- "header": "Repository",
137
- "options": [
138
- {"label": "Keep current (Recommended)", "description": "{EXISTING_URL}"},
139
- {"label": "Enter GitHub URL", "description": "https://github.com/org/repo.git"},
140
- {"label": "Enter Azure DevOps URL", "description": "https://dev.azure.com/org/project/_git/repo"},
141
- {"label": "Local only (no remote)", "description": "Initialize without remote"}
142
- ],
143
- "multiSelect": false
144
- }]
145
- }
146
- ```
134
+ DO NOT SKIP THIS. DO NOT auto-derive from the URL.
147
135
 
148
- **If user selects a custom option, ask follow-up for the actual URL.**
136
+ CALL the AskUserQuestion tool with:
137
+ - header: "Location"
138
+ - question: "Root folder for this project? (worktrees will be created here)"
139
+ - options: Use parent folder (Recommended): "{PARENT_DIR}/" / Use current folder: "{CURRENT_DIR}/" / Custom path
140
+ - In reconfigure mode: add "Keep current" option with `{EXISTING_ROOT}`
141
+ - **If user selects "Custom path", CALL AskUserQuestion again for the actual path.**
149
142
 
150
- ### 2b. Root Folder
143
+ WAIT for the user's response. Store as `{PROJECT_BASE}`.
151
144
 
152
- **CRITICAL for WSL: Normalize the path for the current platform.**
145
+ After getting the response, normalize the path:
146
+ - On WSL: translate Windows paths to /mnt/ format
147
+ - On Windows: ensure forward slashes
153
148
 
154
- **Fresh init:**
155
- ```json
156
- {
157
- "questions": [{
158
- "question": "Root folder for this project? (worktrees will be created here)",
159
- "header": "Location",
160
- "options": [
161
- {"label": "Use parent folder (Recommended)", "description": "{PARENT_DIR}/ - consistent with {SIBLING_COUNT} sibling project(s)"},
162
- {"label": "Use current folder", "description": "{CURRENT_DIR}/ - will create subfolders here"},
163
- {"label": "Custom path", "description": "Specify a different location"}
164
- ],
165
- "multiSelect": false
166
- }]
167
- }
168
- ```
149
+ ### 2c. Project Name — CALL AskUserQuestion NOW
169
150
 
170
- **Reconfigure mode:**
171
- ```json
172
- {
173
- "questions": [{
174
- "question": "Root folder? (current: {EXISTING_ROOT})",
175
- "header": "Location",
176
- "options": [
177
- {"label": "Keep current (Recommended)", "description": "{EXISTING_ROOT}"},
178
- {"label": "Use parent folder", "description": "{PARENT_DIR}/"},
179
- {"label": "Custom path", "description": "Specify a different location"}
180
- ],
181
- "multiSelect": false
182
- }]
183
- }
184
- ```
151
+ DO NOT SKIP THIS. DO NOT auto-derive from the URL.
185
152
 
186
- **After getting the path, normalize it:**
187
- ```bash
188
- # On WSL: translate Windows paths to /mnt/ format
189
- # On Windows: ensure forward slashes
190
- # Store the platform-normalized path as PROJECT_BASE
191
- ```
153
+ CALL the AskUserQuestion tool with:
154
+ - header: "Project"
155
+ - question: "Project name? (detected: {DETECTED_NAME})"
156
+ - options: Use detected name (Recommended): "{DETECTED_NAME}" / Custom name
157
+ - In reconfigure mode: add "Keep current" option with `{EXISTING_NAME}`
158
+ - **If user selects "Custom name", CALL AskUserQuestion again for the actual name.**
192
159
 
193
- ### 2c. Project Name
160
+ WAIT for the user's response. Store as `{PROJECT_NAME}`.
194
161
 
195
- **Fresh init:**
196
- ```json
197
- {
198
- "questions": [{
199
- "question": "Project name? (detected: {DETECTED_NAME})",
200
- "header": "Project",
201
- "options": [
202
- {"label": "Use detected name (Recommended)", "description": "{DETECTED_NAME}"},
203
- {"label": "Custom name", "description": "Specify a different project name"}
204
- ],
205
- "multiSelect": false
206
- }]
207
- }
208
- ```
162
+ Then normalize name into variants (PascalCase.Dot, PascalCase, kebab-case, snake_case, Display Name).
209
163
 
210
- **Reconfigure mode:**
211
- ```json
212
- {
213
- "questions": [{
214
- "question": "Project name? (current: {EXISTING_NAME})",
215
- "header": "Project",
216
- "options": [
217
- {"label": "Keep current (Recommended)", "description": "{EXISTING_NAME}"},
218
- {"label": "Custom name", "description": "Specify a different project name"}
219
- ],
220
- "multiSelect": false
221
- }]
222
- }
223
- ```
164
+ ### 2d. Worktree Mode — CALL AskUserQuestion NOW
224
165
 
225
- Normalize name into variants (PascalCase.Dot, PascalCase, kebab-case, snake_case, Display Name).
166
+ DO NOT SKIP THIS. This question has been skipped in past sessions causing incorrect defaults.
226
167
 
227
- ### 2d. Worktree Mode
168
+ CALL the AskUserQuestion tool with:
169
+ - header: "Worktrees"
170
+ - question: "How should worktrees be organized?"
171
+ - options: Organized (Recommended): "01-Main, 02-Develop, ..." / Simple: "main/, develop/, ..." / Disabled: "No worktrees, use git checkout"
172
+ - In reconfigure mode: add "Keep current: {EXISTING_MODE}" option
228
173
 
229
- MANDATORY this question is FREQUENTLY SKIPPED by accident. ALWAYS ask it.
174
+ WAIT for the user's response. Store as `{WORKTREE_MODE}` ("organized", "simple", or "disabled").
230
175
 
231
- **Fresh init:**
232
- ```json
233
- {
234
- "questions": [{
235
- "question": "How should worktrees be organized?",
236
- "header": "Worktrees",
237
- "options": [
238
- {"label": "Organized (Recommended)", "description": "01-Main, 02-Develop, features/, releases/, hotfixes/"},
239
- {"label": "Simple", "description": "main/, develop/, features/, releases/, hotfixes/"},
240
- {"label": "Disabled", "description": "No worktrees, use git checkout (not recommended)"}
241
- ],
242
- "multiSelect": false
243
- }]
244
- }
245
- ```
246
-
247
- **Reconfigure mode:**
248
- ```json
249
- {
250
- "questions": [{
251
- "question": "How should worktrees be organized? (current: {EXISTING_MODE})",
252
- "header": "Worktrees",
253
- "options": [
254
- {"label": "Keep current: {EXISTING_MODE} (Recommended)", "description": "No change to worktree structure"},
255
- {"label": "Organized", "description": "01-Main, 02-Develop, features/, releases/, hotfixes/"},
256
- {"label": "Simple", "description": "main/, develop/, features/, releases/, hotfixes/"},
257
- {"label": "Disabled", "description": "No worktrees, use git checkout (not recommended)"}
258
- ],
259
- "multiSelect": false
260
- }]
261
- }
262
- ```
176
+ ---
263
177
 
264
- Store the result as `{WORKTREE_MODE}` ("organized", "simple", or "disabled").
178
+ ## GATE CHECK SELF-VERIFICATION BEFORE STEP 3
265
179
 
266
- ---
180
+ Before proceeding, verify your tool call history for this step:
267
181
 
268
- ## GATE CHECK: Verify all 4 questions were answered
182
+ **Count your AskUserQuestion calls in step 2. The minimum is:**
183
+ - 3 calls if URL was provided in the command (2b + 2c + 2d)
184
+ - 4 calls if URL was NOT provided (2a + 2b + 2c + 2d)
269
185
 
270
- BLOCKING Do NOT proceed to step 3 until ALL variables are confirmed:
186
+ **If your count is less than the minimum, STOP. You have skipped a question. Go back and ask it.**
271
187
 
272
- | Variable | Required | Source |
273
- |----------|----------|--------|
274
- | {REPO_URL} | ✅ | From command arg OR question 2a |
275
- | {PROJECT_BASE} | ✅ | From question 2b |
276
- | {PROJECT_NAME} | ✅ | From question 2c |
277
- | {WORKTREE_MODE} | ✅ | From question 2d — MUST be "organized", "simple", or "disabled" |
188
+ All 4 variables MUST have been confirmed by the user (not auto-derived):
278
189
 
279
- If {WORKTREE_MODE} is not set, GO BACK and ask question 2d NOW.
190
+ | Variable | Required | How to verify |
191
+ |----------|----------|---------------|
192
+ | {REPO_URL} | ✅ | From command arg OR user answered question 2a |
193
+ | {PROJECT_BASE} | ✅ | User answered question 2b (NEVER auto-derived) |
194
+ | {PROJECT_NAME} | ✅ | User answered question 2c (NEVER auto-derived) |
195
+ | {WORKTREE_MODE} | ✅ | User answered question 2d (NEVER defaulted to "organized") |
280
196
 
281
197
  ---
282
198
 
@@ -1,10 +1,15 @@
1
1
  # MANDATORY User Questions for Init
2
2
 
3
- All questions must be asked in order. See step-init.md for context on when each is asked.
3
+ ╔══════════════════════════════════════════════════════════════════════════╗
4
+ ║ Every question below REQUIRES a call to the AskUserQuestion tool. ║
5
+ ║ The YAML blocks are the EXACT parameters to pass to the tool. ║
6
+ ║ NEVER substitute a tool call with auto-derived values. ║
7
+ ║ NEVER combine questions — one AskUserQuestion call per question. ║
8
+ ╚══════════════════════════════════════════════════════════════════════════╝
4
9
 
5
10
  ## Question 1: Repository URL
6
11
 
7
- **⛔ ALWAYS ask, even if URL was detected:**
12
+ **CALL AskUserQuestion with these parameters (skip only if URL provided in command args):**
8
13
 
9
14
  ```yaml
10
15
  AskUserQuestion:
@@ -44,7 +49,7 @@ The user will type the actual URL via "Other". Then:
44
49
 
45
50
  ## Question 2: Root Folder
46
51
 
47
- **⛔ ALWAYS ask where to create THIS project's structure:**
52
+ **CALL AskUserQuestion NOW do NOT auto-derive from URL:**
48
53
 
49
54
  **If sibling projects exist, show where it fits:**
50
55
 
@@ -108,7 +113,7 @@ The user will type the actual path via "Other". Validate the path exists or can
108
113
 
109
114
  ## Question 3: Project Name
110
115
 
111
- **⛔ ALWAYS ask to confirm project name:**
116
+ **CALL AskUserQuestion NOW do NOT auto-derive from URL:**
112
117
 
113
118
  ```yaml
114
119
  AskUserQuestion:
@@ -170,8 +175,8 @@ AskUserQuestion:
170
175
 
171
176
  ## Question 5: Worktree Mode
172
177
 
173
- CRITICAL This question is the MOST FREQUENTLY SKIPPED.
174
- It MUST be asked as a SEPARATE AskUserQuestion call. NEVER default silently.
178
+ CALL AskUserQuestion NOW. This is the MOST FREQUENTLY SKIPPED question.
179
+ Do NOT default to "organized". The user MUST explicitly choose.
175
180
 
176
181
  ```yaml
177
182
  AskUserQuestion:
@@ -14,17 +14,21 @@ Set up GitFlow configuration with bare repository, worktrees, and branches.
14
14
 
15
15
  ---
16
16
 
17
- ## MANDATORY QUESTIONS
18
-
19
- **⛔ ALWAYS ask these 4 questions, even if values can be auto-detected.**
20
- **⛔ ALWAYS detect workspace context (step 2) to show sibling projects.**
21
-
22
- | Question | Variable | Auto-detect from |
23
- |----------|----------|------------------|
24
- | Repository URL | `{REPO_URL}` | `git remote get-url origin` |
25
- | Root folder | `{ROOT_FOLDER}` | Parent of current directory |
26
- | Project name | `{PROJECT_NAME}` | Repo name from URL or folder |
27
- | Worktree mode | `{WORKTREE_MODE}` | Default: organized |
17
+ ## MANDATORY INTERACTIVE QUESTIONS
18
+
19
+ ╔══════════════════════════════════════════════════════════════════════════╗
20
+ ║ You MUST call AskUserQuestion for EACH question below. ║
21
+ ║ Auto-detected values are SUGGESTIONS for option labels, NOT answers. ║
22
+ ║ NEVER use a detected value as the final value without user confirm. ║
23
+ ║ Minimum AskUserQuestion calls: 3 (if URL provided) or 4 (if not). ║
24
+ ╚══════════════════════════════════════════════════════════════════════════╝
25
+
26
+ | Question | Variable | Suggested from | MUST ASK? |
27
+ |----------|----------|----------------|-----------|
28
+ | Repository URL | `{REPO_URL}` | `git remote get-url origin` | YES (skip only if URL in command args) |
29
+ | Root folder | `{ROOT_FOLDER}` | Parent of current directory | **ALWAYS YES** |
30
+ | Project name | `{PROJECT_NAME}` | Repo name from URL or folder | **ALWAYS YES** |
31
+ | Worktree mode | `{WORKTREE_MODE}` | None — no default | **ALWAYS YES** |
28
32
 
29
33
  **Multi-project principle:** Each repository has its OWN independent GitFlow config. Step 2 scans for sibling projects to provide context, not to share configuration.
30
34
 
@@ -60,15 +64,15 @@ See [references/init-questions.md](../references/init-questions.md) → **Questi
60
64
 
61
65
  See [references/init-questions.md](../references/init-questions.md) → **Question 1** for format and follow-up rules.
62
66
 
63
- ### 5. Question: Root Folder
67
+ ### 5. Question: Root Folder — CALL AskUserQuestion
64
68
 
65
- **⛔ MUST ASK even if parent folder was auto-detected.**
69
+ **CALL AskUserQuestion NOW. Do NOT auto-derive from the URL or environment.**
66
70
 
67
71
  See [references/init-questions.md](../references/init-questions.md) → **Question 2** for format and follow-up rules.
68
72
 
69
- ### 6. Question: Project Name
73
+ ### 6. Question: Project Name — CALL AskUserQuestion
70
74
 
71
- **⛔ MUST ASK even if name was auto-detected.**
75
+ **CALL AskUserQuestion NOW. Do NOT auto-derive from the URL or environment.**
72
76
 
73
77
  See [references/init-questions.md](../references/init-questions.md) → **Question 3** for format and follow-up rules.
74
78
 
@@ -83,12 +87,13 @@ See [references/init-name-normalization.md](../references/init-name-normalizatio
83
87
  4. Ask user to choose PRIMARY format
84
88
  5. Store all derived names in `PROJECT_VARIANTS`
85
89
 
86
- ### 7. Question: Worktree Mode
90
+ ### 7. Question: Worktree Mode — CALL AskUserQuestion
87
91
 
88
- **⛔ MUST ASK this determines the directory structure (step 8).**
92
+ **CALL AskUserQuestion NOW. This question is the MOST FREQUENTLY SKIPPED.**
89
93
 
90
- ⛔ BLOCKING: If you reach step 8 without having asked the worktree mode question
91
- and received an explicit user answer, STOP and ask it NOW.
94
+ ⛔ BLOCKING: If you reach step 8 without having called AskUserQuestion for
95
+ worktree mode and received an explicit user answer, STOP and ask it NOW.
96
+ Do NOT default to "organized". The user MUST choose.
92
97
 
93
98
  See [references/init-questions.md](../references/init-questions.md) → **Question 5** for options:
94
99
  - **Organized** (recommended): `01-Main/`, `02-Develop/`, `features/`, `releases/`, `hotfixes/`
@@ -200,7 +205,7 @@ Before completing init, verify:
200
205
 
201
206
  ## SUCCESS CRITERIA:
202
207
 
203
- - ✅ All 4 mandatory questions asked (URL, folder, name, worktree mode)
208
+ - ✅ AskUserQuestion tool called at least 3 times (4 if URL not in command args)
204
209
  - ✅ Complete folder structure created
205
210
  - ✅ Both main and develop worktrees functional
206
211
  - ✅ Configuration file created