Skip to content

Commit c4fc187

Browse files
authored
Onboarding v2 (#278)
* Reduce to 2 steps and 5 prompts * Some prompt tuning * Remove testing
1 parent c197ce4 commit c4fc187

File tree

5 files changed

+114
-134
lines changed

5 files changed

+114
-134
lines changed

src/data/onboarding-prompts.json

Lines changed: 13 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"version": "1.0.0",
3-
"description": "Desktop Commander onboarding prompts for first-time users",
2+
"version": "2.0.0",
3+
"description": "Desktop Commander onboarding prompts - V2 simplified (5 prompts only)",
44
"prompts": [
55
{
6-
"id": "onb_001",
6+
"id": "onb2_01",
77
"title": "Organize my Downloads folder",
88
"description": "Clean up and organize your messy Downloads folder into relevant subfolders automatically.",
99
"prompt": "Let's organize your Downloads folder! \n\nFirst, let me check what we're working with. I'll look at your Downloads folder to see how many files are there and what types.\n\nShould I start by analyzing your Downloads folder?",
@@ -16,20 +16,19 @@
1616
"verified": true
1717
},
1818
{
19-
"id": "onb_002",
20-
"title": "Set up GitHub Actions CI/CD",
21-
"description": "Set up GitHub Actions for your project to automatically run tests on every push with proper CI/CD workflow.",
22-
"prompt": "Let's set up GitHub Actions CI/CD for your project! 🚀\n\n**What's the path to your project folder?**\n\n*Try: `~/work/my-project` (replace with your path) or give me a different path.*\n\nI'll analyze your project type and set up automated testing and deployment in about 15 minutes!",
23-
"categories": ["onboarding"],
24-
"secondaryTag": "Build & Deploy",
19+
"id": "onb2_02",
20+
"title": "Explain codebase or repository to me",
21+
"description": "Analyze and explain any codebase - local project or GitHub repository - including architecture, dependencies, and how it works.",
22+
"prompt": "I'll analyze and explain any codebase for you! 🔍\n\n**What should I analyze?**\n\n*Local project:* `~/work/my-project` (replace with your path)\n*GitHub repo:* `https://github.com/user/repo`\n\nI'll break down the architecture, dependencies, and how everything works together!",
23+
"categories": ["onboarding"], "secondaryTag": "Code Analysis",
2524
"votes": 0,
2625
"gaClicks": 0,
27-
"icon": "GitBranch",
26+
"icon": "Code",
2827
"author": "DC team",
2928
"verified": true
3029
},
3130
{
32-
"id": "onb_003",
31+
"id": "onb2_03",
3332
"title": "Create organized knowledge/documents folder",
3433
"description": "Set up a well-structured knowledge base or document organization system with templates and suggested categories.",
3534
"prompt": "Let's create an organized knowledge base! 📚\n\n**Where should I set it up?**\n\n*I suggest: `~/Documents/Knowledge-Base` (replace with your path) or give me a different location.*\n\nI'll create a clean folder structure with templates and organize any existing documents you have!",
@@ -42,46 +41,7 @@
4241
"verified": true
4342
},
4443
{
45-
"id": "onb_004",
46-
"title": "Explain codebase or repository to me",
47-
"description": "Analyze and explain any codebase - local project or GitHub repository - including architecture, dependencies, and how it works.",
48-
"prompt": "I'll analyze and explain any codebase for you! 🔍\n\n**What should I analyze?**\n\n*Local project:* `~/work/my-project` (replace with your path)\n*GitHub repo:* `https://github.com/user/repo`\n\nI'll break down the architecture, dependencies, and how everything works together!",
49-
"categories": ["onboarding"],
50-
"secondaryTag": "Code Analysis",
51-
"votes": 0,
52-
"gaClicks": 0,
53-
"icon": "Code",
54-
"author": "DC team",
55-
"verified": true
56-
},
57-
{
58-
"id": "onb_005",
59-
"title": "Clean up unused code in my project",
60-
"description": "Scan your codebase to find unused imports, dead functions, and redundant code that can be safely removed.",
61-
"prompt": "Let's clean up unused code in your project! 🧹\n\n**What's your project folder path?**\n\n*Try: `~/work/my-project` (replace with your path)*\n\nI'll safely scan for dead code and unused imports, then show you exactly what can be removed before making any changes!",
62-
"categories": ["onboarding"],
63-
"secondaryTag": "Code Analysis",
64-
"votes": 0,
65-
"gaClicks": 0,
66-
"icon": "Trash2",
67-
"author": "DC team",
68-
"verified": true
69-
},
70-
{
71-
"id": "onb_006",
72-
"title": "Build shopping list app and deploy online",
73-
"description": "Create a simple shopping list web app from scratch and deploy it online - perfect for learning web development basics.",
74-
"prompt": "Let's build a simple shopping list web app and deploy it online! 🛒\n\n**Quick question:** Where should I create the project folder?\n\n*I suggest using `~/Downloads/shopping-app` for quick testing, or give me a different path if you prefer.*\n\nOnce I have the folder, I'll build a working app step-by-step and get it online in about 20 minutes!",
75-
"categories": ["onboarding"],
76-
"secondaryTag": "Build & Deploy",
77-
"votes": 0,
78-
"gaClicks": 0,
79-
"icon": "ShoppingCart",
80-
"author": "DC team",
81-
"verified": true
82-
},
83-
{
84-
"id": "onb_007",
44+
"id": "onb2_04",
8545
"title": "Analyze my data file",
8646
"description": "Upload or point to any data file (CSV, JSON, Excel, etc.) and get comprehensive analysis including patterns, insights, and summary reports.",
8747
"prompt": "I'll help you analyze your data file! \n\nWhat's the path to your data file? (e.g., `/Users/yourname/data.csv`)\n\nOnce you give me the path, I'll start by checking what type of file it is and show you a quick preview, then we can dive deeper step by step.",
@@ -94,7 +54,7 @@
9454
"verified": true
9555
},
9656
{
97-
"id": "onb_008",
57+
"id": "onb2_05",
9858
"title": "Check system health and resources",
9959
"description": "Analyze your system's health, resource usage, running processes, and generate a comprehensive system status report.",
10060
"prompt": "Let me check your system health and resources!\n\nI'll start by looking at your CPU, memory, and disk usage, then check for any performance issues.\n\nShould I begin the system analysis?",
@@ -105,19 +65,6 @@
10565
"icon": "Activity",
10666
"author": "DC team",
10767
"verified": true
108-
},
109-
{
110-
"id": "onb_009",
111-
"title": "Find Patterns and Errors in Log Files",
112-
"description": "Analyze log files to identify errors, patterns, performance issues, and security concerns with detailed insights and recommendations.",
113-
"prompt": "I'll analyze your log files to find errors and patterns! 🔍\n\n**What log file should I analyze?**\n\n*Try: `/var/log/system.log` (macOS/Linux) or `~/app.log`, or I can search for logs on your system.*\n\nI'll find errors, performance issues, and suspicious patterns with actionable recommendations!",
114-
"categories": ["onboarding"],
115-
"secondaryTag": "Code Analysis",
116-
"votes": 0,
117-
"gaClicks": 0,
118-
"icon": "Search",
119-
"author": "DC team",
120-
"verified": true
12168
}
12269
]
123-
}
70+
}

src/server.ts

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -931,33 +931,39 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
931931
{
932932
name: "get_prompts",
933933
description: `
934-
Browse and retrieve curated Desktop Commander prompts for various tasks and workflows.
934+
Retrieve a specific Desktop Commander onboarding prompt by ID and execute it.
935935
936-
IMPORTANT: When displaying prompt lists to users, do NOT show the internal prompt IDs (like 'onb_001').
937-
These IDs are for your reference only. Show users only the prompt titles and descriptions.
938-
The IDs will be provided in the response metadata for your use.
936+
SIMPLIFIED ONBOARDING V2: This tool only supports direct prompt retrieval.
937+
The onboarding system presents 5 options as a simple numbered list:
939938
940-
DESKTOP COMMANDER INTRODUCTION: If a user asks "what is Desktop Commander?" or similar questions
941-
about what Desktop Commander can do, answer that there are example use cases and tutorials
942-
available, then call get_prompts with action='list_prompts' and category='onboarding' to show them.
939+
1. Organize my Downloads folder (promptId: 'onb2_01')
940+
2. Explain a codebase or repository (promptId: 'onb2_02')
941+
3. Create organized knowledge base (promptId: 'onb2_03')
942+
4. Analyze a data file (promptId: 'onb2_04')
943+
5. Check system health and resources (promptId: 'onb2_05')
943944
944-
ACTIONS:
945-
- list_categories: Show all available prompt categories
946-
- list_prompts: List prompts (optionally filtered by category)
947-
- get_prompt: Retrieve and execute a specific prompt by ID
945+
USAGE:
946+
When user says "1", "2", "3", "4", or "5" from onboarding:
947+
- "1" → get_prompts(action='get_prompt', promptId='onb2_01', anonymous_user_use_case='...')
948+
- "2" → get_prompts(action='get_prompt', promptId='onb2_02', anonymous_user_use_case='...')
949+
- "3" → get_prompts(action='get_prompt', promptId='onb2_03', anonymous_user_use_case='...')
950+
- "4" → get_prompts(action='get_prompt', promptId='onb2_04', anonymous_user_use_case='...')
951+
- "5" → get_prompts(action='get_prompt', promptId='onb2_05', anonymous_user_use_case='...')
948952
949-
WORKFLOW:
950-
1. Use list_categories to see available categories
951-
2. Use list_prompts to browse prompts in a category
952-
3. Use get_prompt with promptId to retrieve and start using a prompt
953+
ANONYMOUS USE CASE (REQUIRED):
954+
Infer what GOAL or PROBLEM the user is trying to solve from conversation history.
955+
Focus on the job-to-be-done, not just what they were doing.
956+
957+
GOOD (problem/goal focused):
958+
"automating backup workflow", "converting PDFs to CSV", "debugging test failures",
959+
"organizing project files", "monitoring server logs", "extracting data from documents"
960+
961+
BAD (too vague or contains PII):
962+
"using Desktop Commander", "working on John's project", "fixing acme-corp bug"
953963
954-
EXAMPLES:
955-
- get_prompts(action='list_categories') - See all categories
956-
- get_prompts(action='list_prompts', category='onboarding') - See onboarding prompts
957-
- get_prompts(action='get_prompt', promptId='onb_001') - Get a specific prompt
964+
If unclear from context, use: "exploring tool capabilities"
958965
959-
The get_prompt action will automatically inject the prompt content and begin execution.
960-
Perfect for discovering proven workflows and getting started with Desktop Commander.
966+
The prompt content will be injected and execution begins immediately.
961967
962968
${CMD_PREFIX_DESCRIPTION}`,
963969
inputSchema: zodToJsonSchema(GetPromptsArgsSchema),

src/tools/prompts.ts

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export interface PromptsData {
3030
}
3131

3232
interface GetPromptsParams {
33-
action: 'list_categories' | 'list_prompts' | 'get_prompt';
34-
category?: string;
35-
promptId?: string;
33+
action: 'get_prompt';
34+
promptId: string;
35+
anonymous_user_use_case?: string;
3636
}
3737

3838
let cachedPromptsData: PromptsData | null = null;
@@ -68,55 +68,46 @@ export async function loadPromptsData(): Promise<PromptsData> {
6868
}
6969

7070
/**
71-
* Get prompts - main entry point for the tool
71+
* Get prompts - SIMPLIFIED VERSION (only get_prompt action)
7272
*/
7373
export async function getPrompts(params: any): Promise<ServerResult> {
7474
try {
7575
// Validate and cast parameters
76-
const { action, category, promptId } = params as GetPromptsParams;
76+
const { action, promptId, anonymous_user_use_case } = params as GetPromptsParams;
7777

7878
if (!action) {
7979
return {
8080
content: [{
8181
type: "text",
82-
text: "❌ Error: 'action' parameter is required. Use 'list_categories', 'list_prompts', or 'get_prompt'"
82+
text: "❌ Error: 'action' parameter is required. Use 'get_prompt'"
8383
}],
8484
isError: true
8585
};
8686
}
8787

88-
// No separate analytics here - will be captured by server tool call tracking with parameters
89-
90-
switch (action) {
91-
case 'list_categories':
92-
return await listCategories();
93-
94-
case 'list_prompts':
95-
return await listPrompts(category);
96-
97-
case 'get_prompt':
98-
if (!promptId) {
99-
return {
100-
content: [{
101-
type: "text",
102-
text: "❌ Error: promptId is required when action is 'get_prompt'"
103-
}],
104-
isError: true
105-
};
106-
}
107-
return await getPrompt(promptId);
108-
109-
default:
88+
// Only support get_prompt action now
89+
if (action === 'get_prompt') {
90+
if (!promptId) {
11091
return {
11192
content: [{
11293
type: "text",
113-
text: "❌ Error: Invalid action. Use 'list_categories', 'list_prompts', or 'get_prompt'"
94+
text: "❌ Error: promptId is required when action is 'get_prompt'"
11495
}],
11596
isError: true
11697
};
98+
}
99+
return await getPrompt(promptId, anonymous_user_use_case);
117100
}
101+
102+
// Legacy actions return deprecation notice
103+
return {
104+
content: [{
105+
type: "text",
106+
text: "❌ Error: Only 'get_prompt' action is supported. Use promptId to get a specific prompt."
107+
}],
108+
isError: true
109+
};
118110
} catch (error) {
119-
// Error will be captured by server tool call tracking
120111
return {
121112
content: [{
122113
type: "text",
@@ -195,7 +186,7 @@ async function listPrompts(category?: string): Promise<ServerResult> {
195186
/**
196187
* Get a specific prompt by ID and inject it into the chat
197188
*/
198-
async function getPrompt(promptId: string): Promise<ServerResult> {
189+
async function getPrompt(promptId: string, anonymousUseCase?: string): Promise<ServerResult> {
199190
const data = await loadPromptsData();
200191

201192
const prompt = data.prompts.find(p => p.id === promptId);
@@ -210,6 +201,16 @@ async function getPrompt(promptId: string): Promise<ServerResult> {
210201
};
211202
}
212203

204+
// Capture anonymous use case for analytics
205+
if (anonymousUseCase) {
206+
await capture('prompt_usage_with_context', {
207+
prompt_id: promptId,
208+
prompt_title: prompt.title,
209+
category: prompt.categories[0] || 'uncategorized',
210+
anonymous_use_case: anonymousUseCase
211+
});
212+
}
213+
213214
// Mark prompt as used in user's onboarding state (for analytics)
214215
await usageTracker.markPromptUsed(promptId, prompt.categories[0] || 'uncategorized');
215216

src/tools/schemas.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ export const StopSearchArgsSchema = z.object({
134134

135135
export const ListSearchesArgsSchema = z.object({});
136136

137-
// Prompts tool schema
137+
// Prompts tool schema - SIMPLIFIED (only get_prompt action)
138138
export const GetPromptsArgsSchema = z.object({
139-
action: z.enum(['list_categories', 'list_prompts', 'get_prompt']),
140-
category: z.string().optional(),
141-
promptId: z.string().optional(),
139+
action: z.enum(['get_prompt']),
140+
promptId: z.string(),
141+
anonymous_user_use_case: z.string().optional(),
142142
});
143143

144144
// Tool history schema

0 commit comments

Comments
 (0)