@baseline-studio/cli 2.6.1 → 2.6.2
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/dist/commands/init.js +18 -8
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -104,16 +104,25 @@ async function init() {
|
|
|
104
104
|
const contextFiles = collectContextPaths(tmpDir);
|
|
105
105
|
// 6. Load prompts
|
|
106
106
|
// init-prompts.yaml has the slim essential questions for onboarding
|
|
107
|
-
// context-prompts.yaml has the full question set (used for template titles)
|
|
107
|
+
// context-prompts.yaml has the full question set (used for template titles + fallback)
|
|
108
108
|
const initPromptsPath = (0, path_1.join)(tmpDir, "init-prompts.yaml");
|
|
109
109
|
const fullPromptsPath = (0, path_1.join)(tmpDir, "context-prompts.yaml");
|
|
110
110
|
let initPrompts = {};
|
|
111
111
|
let fullPrompts = {};
|
|
112
|
+
if ((0, fs_1.existsSync)(fullPromptsPath)) {
|
|
113
|
+
fullPrompts = (0, js_yaml_1.load)((0, fs_1.readFileSync)(fullPromptsPath, "utf-8"));
|
|
114
|
+
}
|
|
112
115
|
if ((0, fs_1.existsSync)(initPromptsPath)) {
|
|
113
116
|
initPrompts = (0, js_yaml_1.load)((0, fs_1.readFileSync)(initPromptsPath, "utf-8"));
|
|
114
117
|
}
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
else {
|
|
119
|
+
// Fallback: if init-prompts.yaml doesn't exist (older tag), use core
|
|
120
|
+
// sections from the full prompts so init never skips questions entirely
|
|
121
|
+
for (const [key, val] of Object.entries(fullPrompts)) {
|
|
122
|
+
if (key.startsWith("core/")) {
|
|
123
|
+
initPrompts[key] = val;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
117
126
|
}
|
|
118
127
|
// 7. Ask essential questions (slim init)
|
|
119
128
|
console.log();
|
|
@@ -230,11 +239,12 @@ async function init() {
|
|
|
230
239
|
["Frameworks:", `${frameworkCount}`],
|
|
231
240
|
["Scripts:", `${scriptCount}`],
|
|
232
241
|
]);
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
242
|
+
ui.nextSteps([
|
|
243
|
+
`Open ${ui.accent("context/core/")} and review your identity & voice files`,
|
|
244
|
+
`Fill in extended context files — start with ${ui.accent("product")}, ${ui.accent("users")}, ${ui.accent("icp")}`,
|
|
245
|
+
`Run ${ui.accent("npx baseline context")} to update context with guided prompts`,
|
|
246
|
+
`Open this folder in your AI tool and start using skills`,
|
|
247
|
+
]);
|
|
238
248
|
console.log();
|
|
239
249
|
}
|
|
240
250
|
/** Scan all skill manifests and return unique context file paths (relative to context/) */
|