@baseline-studio/cli 2.6.1 → 2.6.3
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 +33 -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,27 @@ async function init() {
|
|
|
230
239
|
["Frameworks:", `${frameworkCount}`],
|
|
231
240
|
["Scripts:", `${scriptCount}`],
|
|
232
241
|
]);
|
|
233
|
-
|
|
234
|
-
console.log(`
|
|
235
|
-
console.log(`
|
|
236
|
-
console.log(`
|
|
237
|
-
console.log(`
|
|
242
|
+
// Context importance + file listing
|
|
243
|
+
console.log(` ${ui.bold("Context is what makes the system yours.")}`);
|
|
244
|
+
console.log(` Every skill uses your context to produce personalized output.`);
|
|
245
|
+
console.log(` The more detailed your context, the better every skill performs.\n`);
|
|
246
|
+
console.log(` ${ui.dim("Your context files:")}`);
|
|
247
|
+
console.log(` ${ui.accent("core/identity.md")} ${ui.dim("— who you are, what you do, differentiators")}`);
|
|
248
|
+
console.log(` ${ui.accent("core/voice.md")} ${ui.dim("— tone, language rules, brand personality")}`);
|
|
249
|
+
console.log(` ${ui.accent("extended/product.md")} ${ui.dim("— features, workflows, technical details")}`);
|
|
250
|
+
console.log(` ${ui.accent("extended/users.md")} ${ui.dim("— personas, goals, pain points")}`);
|
|
251
|
+
console.log(` ${ui.accent("extended/icp.md")} ${ui.dim("— ideal customer profile, buyer psychology")}`);
|
|
252
|
+
console.log(` ${ui.accent("extended/competitive.md")} ${ui.dim("— competitors, positioning, alternatives")}`);
|
|
253
|
+
console.log(` ${ui.accent("extended/pricing.md")} ${ui.dim("— tiers, objection handling, value props")}`);
|
|
254
|
+
console.log(` ${ui.accent("extended/technical.md")} ${ui.dim("— tech stack, integrations, constraints")}`);
|
|
255
|
+
console.log(` ${ui.accent("extended/visual-identity.md")} ${ui.dim("— colors, fonts, visual style")}`);
|
|
256
|
+
console.log(` ${ui.accent("extended/formatting.md")} ${ui.dim("— document structure, heading rules")}`);
|
|
257
|
+
console.log();
|
|
258
|
+
ui.nextSteps([
|
|
259
|
+
`Fill in your context files — start with ${ui.accent("identity")}, ${ui.accent("voice")}, ${ui.accent("product")}, ${ui.accent("users")}`,
|
|
260
|
+
`Run ${ui.accent("npx baseline context")} for guided prompts to help you fill them in`,
|
|
261
|
+
`Open this folder in your AI tool and start using skills`,
|
|
262
|
+
]);
|
|
238
263
|
console.log();
|
|
239
264
|
}
|
|
240
265
|
/** Scan all skill manifests and return unique context file paths (relative to context/) */
|