@atlashub/smartstack-cli 3.50.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
|
@@ -95,165 +95,104 @@ Parse the report to extract:
|
|
|
95
95
|
|
|
96
96
|
---
|
|
97
97
|
|
|
98
|
-
## STEP 2: ASK USER
|
|
99
|
-
|
|
100
|
-
|
|
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.
|
|
101
120
|
|
|
102
121
|
### 2a. Repository URL
|
|
103
122
|
|
|
104
|
-
**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.**
|
|
105
124
|
|
|
106
|
-
Otherwise
|
|
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}`.
|
|
107
131
|
|
|
108
|
-
|
|
109
|
-
```json
|
|
110
|
-
{
|
|
111
|
-
"questions": [{
|
|
112
|
-
"question": "Repository URL? (detected: {DETECTED_URL})",
|
|
113
|
-
"header": "Repository",
|
|
114
|
-
"options": [
|
|
115
|
-
{"label": "Use detected URL (Recommended)", "description": "{DETECTED_URL}"},
|
|
116
|
-
{"label": "Enter GitHub URL", "description": "https://github.com/org/repo.git"},
|
|
117
|
-
{"label": "Enter Azure DevOps URL", "description": "https://dev.azure.com/org/project/_git/repo"},
|
|
118
|
-
{"label": "Local only (no remote)", "description": "Initialize without remote"}
|
|
119
|
-
],
|
|
120
|
-
"multiSelect": false
|
|
121
|
-
}]
|
|
122
|
-
}
|
|
123
|
-
```
|
|
132
|
+
### 2b. Root Folder — CALL AskUserQuestion NOW
|
|
124
133
|
|
|
125
|
-
|
|
126
|
-
```json
|
|
127
|
-
{
|
|
128
|
-
"questions": [{
|
|
129
|
-
"question": "Repository URL? (current: {EXISTING_URL})",
|
|
130
|
-
"header": "Repository",
|
|
131
|
-
"options": [
|
|
132
|
-
{"label": "Keep current (Recommended)", "description": "{EXISTING_URL}"},
|
|
133
|
-
{"label": "Enter GitHub URL", "description": "https://github.com/org/repo.git"},
|
|
134
|
-
{"label": "Enter Azure DevOps URL", "description": "https://dev.azure.com/org/project/_git/repo"},
|
|
135
|
-
{"label": "Local only (no remote)", "description": "Initialize without remote"}
|
|
136
|
-
],
|
|
137
|
-
"multiSelect": false
|
|
138
|
-
}]
|
|
139
|
-
}
|
|
140
|
-
```
|
|
134
|
+
DO NOT SKIP THIS. DO NOT auto-derive from the URL.
|
|
141
135
|
|
|
142
|
-
|
|
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.**
|
|
143
142
|
|
|
144
|
-
|
|
143
|
+
WAIT for the user's response. Store as `{PROJECT_BASE}`.
|
|
145
144
|
|
|
146
|
-
|
|
145
|
+
After getting the response, normalize the path:
|
|
146
|
+
- On WSL: translate Windows paths to /mnt/ format
|
|
147
|
+
- On Windows: ensure forward slashes
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
{
|
|
151
|
-
"questions": [{
|
|
152
|
-
"question": "Root folder for this project? (worktrees will be created here)",
|
|
153
|
-
"header": "Location",
|
|
154
|
-
"options": [
|
|
155
|
-
{"label": "Use parent folder (Recommended)", "description": "{PARENT_DIR}/ - consistent with {SIBLING_COUNT} sibling project(s)"},
|
|
156
|
-
{"label": "Use current folder", "description": "{CURRENT_DIR}/ - will create subfolders here"},
|
|
157
|
-
{"label": "Custom path", "description": "Specify a different location"}
|
|
158
|
-
],
|
|
159
|
-
"multiSelect": false
|
|
160
|
-
}]
|
|
161
|
-
}
|
|
162
|
-
```
|
|
149
|
+
### 2c. Project Name — CALL AskUserQuestion NOW
|
|
163
150
|
|
|
164
|
-
|
|
165
|
-
```json
|
|
166
|
-
{
|
|
167
|
-
"questions": [{
|
|
168
|
-
"question": "Root folder? (current: {EXISTING_ROOT})",
|
|
169
|
-
"header": "Location",
|
|
170
|
-
"options": [
|
|
171
|
-
{"label": "Keep current (Recommended)", "description": "{EXISTING_ROOT}"},
|
|
172
|
-
{"label": "Use parent folder", "description": "{PARENT_DIR}/"},
|
|
173
|
-
{"label": "Custom path", "description": "Specify a different location"}
|
|
174
|
-
],
|
|
175
|
-
"multiSelect": false
|
|
176
|
-
}]
|
|
177
|
-
}
|
|
178
|
-
```
|
|
151
|
+
DO NOT SKIP THIS. DO NOT auto-derive from the URL.
|
|
179
152
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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.**
|
|
186
159
|
|
|
187
|
-
|
|
160
|
+
WAIT for the user's response. Store as `{PROJECT_NAME}`.
|
|
188
161
|
|
|
189
|
-
|
|
190
|
-
```json
|
|
191
|
-
{
|
|
192
|
-
"questions": [{
|
|
193
|
-
"question": "Project name? (detected: {DETECTED_NAME})",
|
|
194
|
-
"header": "Project",
|
|
195
|
-
"options": [
|
|
196
|
-
{"label": "Use detected name (Recommended)", "description": "{DETECTED_NAME}"},
|
|
197
|
-
{"label": "Custom name", "description": "Specify a different project name"}
|
|
198
|
-
],
|
|
199
|
-
"multiSelect": false
|
|
200
|
-
}]
|
|
201
|
-
}
|
|
202
|
-
```
|
|
162
|
+
Then normalize name into variants (PascalCase.Dot, PascalCase, kebab-case, snake_case, Display Name).
|
|
203
163
|
|
|
204
|
-
|
|
205
|
-
```json
|
|
206
|
-
{
|
|
207
|
-
"questions": [{
|
|
208
|
-
"question": "Project name? (current: {EXISTING_NAME})",
|
|
209
|
-
"header": "Project",
|
|
210
|
-
"options": [
|
|
211
|
-
{"label": "Keep current (Recommended)", "description": "{EXISTING_NAME}"},
|
|
212
|
-
{"label": "Custom name", "description": "Specify a different project name"}
|
|
213
|
-
],
|
|
214
|
-
"multiSelect": false
|
|
215
|
-
}]
|
|
216
|
-
}
|
|
217
|
-
```
|
|
164
|
+
### 2d. Worktree Mode — CALL AskUserQuestion NOW
|
|
218
165
|
|
|
219
|
-
|
|
166
|
+
DO NOT SKIP THIS. This question has been skipped in past sessions causing incorrect defaults.
|
|
220
167
|
|
|
221
|
-
|
|
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
|
|
222
173
|
|
|
223
|
-
|
|
224
|
-
```json
|
|
225
|
-
{
|
|
226
|
-
"questions": [{
|
|
227
|
-
"question": "How should worktrees be organized?",
|
|
228
|
-
"header": "Worktrees",
|
|
229
|
-
"options": [
|
|
230
|
-
{"label": "Organized (Recommended)", "description": "01-Main, 02-Develop, features/, releases/, hotfixes/"},
|
|
231
|
-
{"label": "Simple", "description": "main/, develop/, features/, releases/, hotfixes/"},
|
|
232
|
-
{"label": "Disabled", "description": "No worktrees, use git checkout (not recommended)"}
|
|
233
|
-
],
|
|
234
|
-
"multiSelect": false
|
|
235
|
-
}]
|
|
236
|
-
}
|
|
237
|
-
```
|
|
174
|
+
WAIT for the user's response. Store as `{WORKTREE_MODE}` ("organized", "simple", or "disabled").
|
|
238
175
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}]
|
|
253
|
-
}
|
|
254
|
-
```
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## GATE CHECK — SELF-VERIFICATION BEFORE STEP 3
|
|
179
|
+
|
|
180
|
+
Before proceeding, verify your tool call history for this step:
|
|
181
|
+
|
|
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)
|
|
185
|
+
|
|
186
|
+
**If your count is less than the minimum, STOP. You have skipped a question. Go back and ask it.**
|
|
187
|
+
|
|
188
|
+
All 4 variables MUST have been confirmed by the user (not auto-derived):
|
|
255
189
|
|
|
256
|
-
|
|
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") |
|
|
257
196
|
|
|
258
197
|
---
|
|
259
198
|
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# MANDATORY User Questions for Init
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
116
|
+
**CALL AskUserQuestion NOW — do NOT auto-derive from URL:**
|
|
112
117
|
|
|
113
118
|
```yaml
|
|
114
119
|
AskUserQuestion:
|
|
@@ -170,6 +175,9 @@ AskUserQuestion:
|
|
|
170
175
|
|
|
171
176
|
## Question 5: Worktree Mode
|
|
172
177
|
|
|
178
|
+
CALL AskUserQuestion NOW. This is the MOST FREQUENTLY SKIPPED question.
|
|
179
|
+
Do NOT default to "organized". The user MUST explicitly choose.
|
|
180
|
+
|
|
173
181
|
```yaml
|
|
174
182
|
AskUserQuestion:
|
|
175
183
|
- header: "Worktrees"
|
|
@@ -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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,9 +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
|
|
91
|
+
|
|
92
|
+
**CALL AskUserQuestion NOW. This question is the MOST FREQUENTLY SKIPPED.**
|
|
87
93
|
|
|
88
|
-
|
|
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.
|
|
89
97
|
|
|
90
98
|
See [references/init-questions.md](../references/init-questions.md) → **Question 5** for options:
|
|
91
99
|
- **Organized** (recommended): `01-Main/`, `02-Develop/`, `features/`, `releases/`, `hotfixes/`
|
|
@@ -197,7 +205,7 @@ Before completing init, verify:
|
|
|
197
205
|
|
|
198
206
|
## SUCCESS CRITERIA:
|
|
199
207
|
|
|
200
|
-
- ✅
|
|
208
|
+
- ✅ AskUserQuestion tool called at least 3 times (4 if URL not in command args)
|
|
201
209
|
- ✅ Complete folder structure created
|
|
202
210
|
- ✅ Both main and develop worktrees functional
|
|
203
211
|
- ✅ Configuration file created
|