When Cursor should use this skill
- Early chat sessions or onboarding when the user's goal is ambiguous
- When the user asks for help choosing a plan or habit
- When user wants to clarify or update their running goals
- When implementing conversational onboarding features
Invocation guidance
- Provide the last N
ConversationTurn entries and any partial onboarding answers.
- Classify goal (
habit | distance | speed | race) with confidence and blockers.
- Return a
CoachMessage summary plus structured GoalDiscoveryResult.
- Ask clarifying questions if confidence < 0.7.
- Suggest weekly commitment (3-4 runs for beginners, 4-5 for intermediate, 5-6 for advanced).
Input schema (JSON)
{
"conversation": ConversationTurn[],
"profile": UserProfile,
"partialOnboarding"?: Record<string, unknown>
}
Output schema (JSON)
{
"goalDiscovery": {
"goal": Goal,
"confidence": number,
"blockers": string[],
"weeklyCommitment": number,
"preferredDays"?: string[],
"starterPlanId"?: string,
"summaryCard": string,
"safetyFlags"?: SafetyFlag[]
},
"coachMessage": CoachMessage
}
Integration points
- Chat API:
v0/app/api/chat/route.ts - Conversational interface
- Prompt context:
v0/lib/conversationStorage.ts - Conversation history
v0/lib/onboardingPromptBuilder.ts - Onboarding prompts
- Handoff: trigger plan generation via
v0/app/api/generate-plan/route.ts when confidence ≥0.7
- UI: Chat screen and onboarding wizard
- Database: Store conversation turns in
chat_messages table
Safety & guardrails
- Avoid medical advice; if user mentions pain/injury, advise pause and professional consult.
- Keep responses concise (<120 words) and supportive.
- Emit
SafetyFlag on harmful intents or ambiguous data.
- If user has injury history, recommend starting conservatively.
- Never promise specific performance outcomes or weight loss guarantees.
Conversation flow patterns
Goal discovery sequence
- Initial question: "What brings you to running?" or "What are you hoping to achieve?"
- Clarify constraints: "How many days per week can you commit?" "Any time restrictions?"
- Assess experience: "What's your recent running history?"
- Confirm goal: "So it sounds like [goal]. Is that right?"
- Suggest next step: "Let me create a plan for you" or "Tell me more about..."
Goal types and indicators
- Habit: "consistency", "build routine", "just want to run"
- Distance: "5K", "10K", "half marathon", "marathon", specific distance target
- Speed: "get faster", "PR", "improve time", pace goals
- Race: mentions specific race, date, or event
Telemetry
- Emit
ai_skill_invoked with:
goal (classified)
confidence
turns_count (conversation length)
latency_ms
- Emit
ai_user_feedback when user responds to suggestions
Common edge cases
- Multiple goals: Ask user to prioritize primary goal
- Vague responses: Ask specific follow-up questions
- Unrealistic goals: Gently adjust expectations with rationale
- Injury mentions: Prioritize recovery, recommend professional consultation
- Low confidence: Continue conversation, don't force goal classification
Testing considerations
- Test with various conversation patterns (short, long, meandering)
- Verify confidence scoring accuracy
- Test with ambiguous or conflicting statements
- Validate SafetyFlag emission for injury mentions
- Test handoff to plan generation at confidence threshold
1---2name: conversational-goal-discovery3description: Chat-based goal classification (habit/distance/speed/race) with constraint clarification. Use during onboarding or when user wants to update their running goals through conversation with weekly commitment discovery.4---5
6## When Cursor should use this skill
7- Early chat sessions or onboarding when the user's goal is ambiguous
8- When the user asks for help choosing a plan or habit
9- When user wants to clarify or update their running goals
10- When implementing conversational onboarding features
11
12## Invocation guidance
131. Provide the last N `ConversationTurn` entries and any partial onboarding answers.
142. Classify goal (`habit` | `distance` | `speed` | `race`) with confidence and blockers.
153. Return a `CoachMessage` summary plus structured `GoalDiscoveryResult`.
164. Ask clarifying questions if confidence < 0.7.
175. Suggest weekly commitment (3-4 runs for beginners, 4-5 for intermediate, 5-6 for advanced).
18
19## Input schema (JSON)
20```ts
21{
22 "conversation": ConversationTurn[],
23 "profile": UserProfile,
24 "partialOnboarding"?: Record<string, unknown>
25}
26```
27
28## Output schema (JSON)
29```ts
30{
31 "goalDiscovery": {
32 "goal": Goal,
33 "confidence": number,
34 "blockers": string[],
35 "weeklyCommitment": number,
36 "preferredDays"?: string[],
37 "starterPlanId"?: string,
38 "summaryCard": string,
39 "safetyFlags"?: SafetyFlag[]
40 },
41 "coachMessage": CoachMessage
42}
43```
44
45## Integration points
46- **Chat API**: `v0/app/api/chat/route.ts` - Conversational interface
47- **Prompt context**:
48 - `v0/lib/conversationStorage.ts` - Conversation history
49 - `v0/lib/onboardingPromptBuilder.ts` - Onboarding prompts
50- **Handoff**: trigger plan generation via `v0/app/api/generate-plan/route.ts` when confidence ≥0.7
51- **UI**: Chat screen and onboarding wizard
52- **Database**: Store conversation turns in `chat_messages` table
53
54## Safety & guardrails
55- Avoid medical advice; if user mentions pain/injury, advise pause and professional consult.
56- Keep responses concise (<120 words) and supportive.
57- Emit `SafetyFlag` on harmful intents or ambiguous data.
58- If user has injury history, recommend starting conservatively.
59- Never promise specific performance outcomes or weight loss guarantees.
60
61## Conversation flow patterns
62
63### Goal discovery sequence
641. **Initial question**: "What brings you to running?" or "What are you hoping to achieve?"
652. **Clarify constraints**: "How many days per week can you commit?" "Any time restrictions?"
663. **Assess experience**: "What's your recent running history?"
674. **Confirm goal**: "So it sounds like [goal]. Is that right?"
685. **Suggest next step**: "Let me create a plan for you" or "Tell me more about..."
69
70### Goal types and indicators
71- **Habit**: "consistency", "build routine", "just want to run"
72- **Distance**: "5K", "10K", "half marathon", "marathon", specific distance target
73- **Speed**: "get faster", "PR", "improve time", pace goals
74- **Race**: mentions specific race, date, or event
75
76## Telemetry
77- Emit `ai_skill_invoked` with:
78 - `goal` (classified)
79 - `confidence`
80 - `turns_count` (conversation length)
81 - `latency_ms`
82- Emit `ai_user_feedback` when user responds to suggestions
83
84## Common edge cases
85- **Multiple goals**: Ask user to prioritize primary goal
86- **Vague responses**: Ask specific follow-up questions
87- **Unrealistic goals**: Gently adjust expectations with rationale
88- **Injury mentions**: Prioritize recovery, recommend professional consultation
89- **Low confidence**: Continue conversation, don't force goal classification
90
91## Testing considerations
92- Test with various conversation patterns (short, long, meandering)
93- Verify confidence scoring accuracy
94- Test with ambiguous or conflicting statements
95- Validate SafetyFlag emission for injury mentions
96- Test handoff to plan generation at confidence threshold