@riotprompt/riotplan 1.0.5 → 1.0.6
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/MCP-EXPLORE-IDEA-FIX.md +122 -0
- package/dist/mcp/prompts/explore_idea.md +77 -35
- package/package.json +5 -5
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Fix: explore_idea Command UX Issue
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
The `explore_idea` MCP prompt had a workflow mismatch that created a confusing user experience:
|
|
6
|
+
|
|
7
|
+
1. User invokes the prompt (via MCP or Cursor command)
|
|
8
|
+
2. AI would immediately stop and ask for structured input:
|
|
9
|
+
- "Please provide a code/identifier"
|
|
10
|
+
- "Please provide an initial description"
|
|
11
|
+
3. User had to provide these in a second interaction
|
|
12
|
+
4. Only then would the AI create the idea and begin exploration
|
|
13
|
+
|
|
14
|
+
This created a jarring, form-filling experience instead of a natural conversational flow.
|
|
15
|
+
|
|
16
|
+
## Root Cause
|
|
17
|
+
|
|
18
|
+
The MCP prompt file (`src/mcp/prompts/explore_idea.md`) had outdated instructions that told the AI to:
|
|
19
|
+
1. Ask the user for code and description
|
|
20
|
+
2. Wait for response
|
|
21
|
+
3. Then create the idea
|
|
22
|
+
|
|
23
|
+
Meanwhile, the Cursor command version (`.cursor/commands/explore_idea.md`) had already been updated with smart extraction logic.
|
|
24
|
+
|
|
25
|
+
## Solution
|
|
26
|
+
|
|
27
|
+
Updated the MCP prompt to match the improved Cursor command version with smart extraction:
|
|
28
|
+
|
|
29
|
+
### Key Changes
|
|
30
|
+
|
|
31
|
+
1. **Smart Extraction First**: AI now checks if the user already provided code/description in their message
|
|
32
|
+
2. **Derive Missing Info**: If description is provided but code is missing, AI derives a kebab-case code from the description
|
|
33
|
+
3. **Natural Fallback**: Only asks for missing information if truly needed
|
|
34
|
+
4. **Immediate Creation**: Creates the idea as soon as it has the required info
|
|
35
|
+
5. **Start Exploration**: Begins the exploration conversation immediately after creation
|
|
36
|
+
|
|
37
|
+
### Updated Workflow
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
1. Extract or Gather Idea Details
|
|
41
|
+
- Check user's message for code and description
|
|
42
|
+
- Extract if present
|
|
43
|
+
- Derive code from description if only description provided
|
|
44
|
+
- Only ask if both are missing
|
|
45
|
+
|
|
46
|
+
2. Create the Idea
|
|
47
|
+
- Call riotplan_idea_create immediately with extracted/derived values
|
|
48
|
+
|
|
49
|
+
3. Begin Exploration
|
|
50
|
+
- Start asking open-ended questions immediately
|
|
51
|
+
- Don't wait for further prompting
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Example Flows
|
|
55
|
+
|
|
56
|
+
**Before Fix:**
|
|
57
|
+
```
|
|
58
|
+
User: /riotplan/explore_idea
|
|
59
|
+
AI: "Please provide: 1. A short code/identifier 2. Initial description"
|
|
60
|
+
User: "Ugh, okay... code is 'my-feature', description is 'Add feature X'"
|
|
61
|
+
AI: *calls riotplan_idea_create*
|
|
62
|
+
AI: "What's driving this?"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**After Fix - Full Info:**
|
|
66
|
+
```
|
|
67
|
+
User: /riotplan/explore_idea real-time-notifications Add push notifications
|
|
68
|
+
AI: *extracts code="real-time-notifications", description="Add push notifications"*
|
|
69
|
+
AI: *calls riotplan_idea_create immediately*
|
|
70
|
+
AI: "Let's explore this idea. What's driving the need for push notifications?"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**After Fix - Partial Info:**
|
|
74
|
+
```
|
|
75
|
+
User: /riotplan/explore_idea I want to add notifications
|
|
76
|
+
AI: *derives code="add-notifications", description="I want to add notifications"*
|
|
77
|
+
AI: *calls riotplan_idea_create immediately*
|
|
78
|
+
AI: "Let's explore this notification idea. What's driving this?"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**After Fix - No Info:**
|
|
82
|
+
```
|
|
83
|
+
User: /riotplan/explore_idea
|
|
84
|
+
AI: "What idea would you like to explore? Give me a short name and brief description."
|
|
85
|
+
User: "I'm thinking about real-time notifications"
|
|
86
|
+
AI: *extracts and creates immediately*
|
|
87
|
+
AI: "Great! Let's explore this. What's driving the need?"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Files Changed
|
|
91
|
+
|
|
92
|
+
- `/Users/tobrien/gitw/kjerneverk/riotplan/src/mcp/prompts/explore_idea.md`
|
|
93
|
+
- Updated workflow section with smart extraction logic
|
|
94
|
+
- Added detailed examples showing extraction patterns
|
|
95
|
+
- Added anti-pattern: "Don't ask for information the user already provided"
|
|
96
|
+
- Added principle: "Smart Extraction: Use information the user already provided"
|
|
97
|
+
|
|
98
|
+
## Testing
|
|
99
|
+
|
|
100
|
+
- All existing tests pass (623 tests, 92.84% coverage)
|
|
101
|
+
- No breaking changes to MCP tool schemas
|
|
102
|
+
- Backward compatible with all existing workflows
|
|
103
|
+
|
|
104
|
+
## Benefits
|
|
105
|
+
|
|
106
|
+
1. **Better UX**: Natural conversational flow instead of form-filling
|
|
107
|
+
2. **Fewer Steps**: Reduces interaction from 2-3 messages to 1
|
|
108
|
+
3. **Smarter AI**: AI extracts and derives information intelligently
|
|
109
|
+
4. **Consistent**: MCP prompt now matches Cursor command behavior
|
|
110
|
+
5. **Flexible**: Still supports all three scenarios (full info, partial info, no info)
|
|
111
|
+
|
|
112
|
+
## Related Work
|
|
113
|
+
|
|
114
|
+
The Cursor command version (`.cursor/commands/explore_idea.md`) already had this smart extraction logic. This fix brings the MCP prompt in sync with that improved version.
|
|
115
|
+
|
|
116
|
+
## Future Considerations
|
|
117
|
+
|
|
118
|
+
This pattern could be applied to other interactive prompts/commands that currently ask for structured input upfront. Candidates to review:
|
|
119
|
+
- `checkpoint_create` (asks for name and message)
|
|
120
|
+
- Any other prompts that immediately request structured data
|
|
121
|
+
|
|
122
|
+
The key insight: **Extract first, ask later**. If the user has already provided information in their message, use it instead of asking them to repeat it.
|
|
@@ -13,21 +13,49 @@ Guide collaborative exploration of a new idea without premature commitment. This
|
|
|
13
13
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
16
|
-
### 1.
|
|
16
|
+
### 1. Extract or Gather Idea Details
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
**FIRST: Check if the user already provided details in their message.**
|
|
19
|
+
|
|
20
|
+
Look for:
|
|
21
|
+
- A code/identifier (kebab-case name like "my-feature")
|
|
22
|
+
- A description of the concept
|
|
23
|
+
|
|
24
|
+
**If both are present in the user's message:**
|
|
25
|
+
- Extract them immediately
|
|
26
|
+
- Proceed directly to creating the idea
|
|
27
|
+
- Do NOT ask the user to repeat information they already provided
|
|
28
|
+
|
|
29
|
+
**If either is missing:**
|
|
30
|
+
- Have a natural conversation: "What idea would you like to explore? Give me a short name and brief description."
|
|
31
|
+
- When they respond, extract the code (convert to kebab-case if needed) and description
|
|
32
|
+
- Then create the idea
|
|
33
|
+
|
|
34
|
+
**Example extractions:**
|
|
35
|
+
|
|
36
|
+
User says: "explore_idea user-notifications I want to add real-time notifications"
|
|
37
|
+
→ code: "user-notifications", description: "I want to add real-time notifications"
|
|
38
|
+
|
|
39
|
+
User says: "explore_idea real-time notifications for users"
|
|
40
|
+
→ code: "real-time-notifications" (derived), description: "real-time notifications for users"
|
|
41
|
+
|
|
42
|
+
User says: "explore_idea"
|
|
43
|
+
→ Ask: "What idea would you like to explore? Give me a short name and brief description."
|
|
44
|
+
|
|
45
|
+
### 2. Create the Idea
|
|
46
|
+
|
|
47
|
+
Once you have both code and description, create the idea immediately:
|
|
21
48
|
|
|
22
|
-
Create the idea:
|
|
23
49
|
```
|
|
24
50
|
riotplan_idea_create({
|
|
25
|
-
code: "
|
|
26
|
-
description: "
|
|
51
|
+
code: "extracted-or-provided-code",
|
|
52
|
+
description: "extracted or provided description"
|
|
27
53
|
})
|
|
28
54
|
```
|
|
29
55
|
|
|
30
|
-
###
|
|
56
|
+
### 3. Begin Exploration
|
|
57
|
+
|
|
58
|
+
After creating the idea, immediately begin the exploration conversation. Don't wait for further prompting.
|
|
31
59
|
|
|
32
60
|
Ask open-ended questions:
|
|
33
61
|
- "What's driving this idea?"
|
|
@@ -35,6 +63,8 @@ Ask open-ended questions:
|
|
|
35
63
|
- "What questions need answering?"
|
|
36
64
|
- "Do you have any evidence (docs, diagrams, examples)?"
|
|
37
65
|
|
|
66
|
+
### 4. Capture Responses in TWO Ways
|
|
67
|
+
|
|
38
68
|
As the user responds, capture their thinking in TWO ways:
|
|
39
69
|
|
|
40
70
|
**FIRST: Capture the full narrative (preserve the raw conversation)**
|
|
@@ -87,7 +117,7 @@ riotplan_idea_add_evidence({
|
|
|
87
117
|
- Structured data makes information actionable
|
|
88
118
|
- Timeline shows both the conversation and the decisions
|
|
89
119
|
|
|
90
|
-
###
|
|
120
|
+
### 5. Decide Next Steps
|
|
91
121
|
|
|
92
122
|
After exploration, ask:
|
|
93
123
|
- "Does this feel worth pursuing?"
|
|
@@ -115,20 +145,46 @@ Just leave it in idea stage. Can return later.
|
|
|
115
145
|
2. **Cheap Thinking**: Capture thoughts without formality
|
|
116
146
|
3. **Evidence Gathering**: Collect supporting materials
|
|
117
147
|
4. **Question-Driven**: Surface unknowns early
|
|
148
|
+
5. **Smart Extraction**: Use information the user already provided; don't make them repeat themselves
|
|
149
|
+
|
|
150
|
+
## Example Conversations
|
|
151
|
+
|
|
152
|
+
### Example 1: User Provides Everything Upfront
|
|
153
|
+
|
|
154
|
+
**User**: `/riotplan/explore_idea real-time-notifications Add push notifications for important updates`
|
|
155
|
+
|
|
156
|
+
**AI**: *Extracts code="real-time-notifications", description="Add push notifications for important updates"*
|
|
157
|
+
*Calls riotplan_idea_create immediately*
|
|
158
|
+
|
|
159
|
+
**AI**: "Let's explore this idea. What's driving the need for push notifications? What constraints should we consider?"
|
|
118
160
|
|
|
119
|
-
|
|
161
|
+
### Example 2: User Provides Partial Info
|
|
120
162
|
|
|
121
|
-
**User**:
|
|
163
|
+
**User**: `/riotplan/explore_idea I want to add notifications`
|
|
122
164
|
|
|
123
|
-
**AI**: "
|
|
165
|
+
**AI**: *Extracts description="I want to add notifications", derives code="add-notifications"*
|
|
166
|
+
*Calls riotplan_idea_create immediately*
|
|
124
167
|
|
|
125
|
-
|
|
168
|
+
**AI**: "Let's explore this notification idea. What's driving this? What problem does it solve?"
|
|
126
169
|
|
|
127
|
-
|
|
170
|
+
### Example 3: User Provides No Info
|
|
171
|
+
|
|
172
|
+
**User**: `/riotplan/explore_idea`
|
|
173
|
+
|
|
174
|
+
**AI**: "What idea would you like to explore? Give me a short name and brief description."
|
|
175
|
+
|
|
176
|
+
**User**: "I'm thinking about real-time notifications for users"
|
|
177
|
+
|
|
178
|
+
**AI**: *Extracts code="real-time-notifications", description="real-time notifications for users"*
|
|
179
|
+
*Calls riotplan_idea_create*
|
|
180
|
+
|
|
181
|
+
**AI**: "Great! Let's explore this. What's driving the need for real-time notifications?"
|
|
182
|
+
|
|
183
|
+
### Example 4: Rich Exploration with Narrative
|
|
128
184
|
|
|
129
185
|
**User**: "Users miss important updates. They have to refresh constantly. It's frustrating for them and we're getting complaints. I think we need some kind of push notification system but I'm not sure if it should be in-app only or also email."
|
|
130
186
|
|
|
131
|
-
*Captures narrative first:*
|
|
187
|
+
**AI**: *Captures full narrative first:*
|
|
132
188
|
```
|
|
133
189
|
riotplan_idea_add_narrative({
|
|
134
190
|
content: "Users miss important updates. They have to refresh constantly. It's frustrating for them and we're getting complaints. I think we need some kind of push notification system but I'm not sure if it should be in-app only or also email.",
|
|
@@ -144,41 +200,27 @@ riotplan_idea_add_note({
|
|
|
144
200
|
})
|
|
145
201
|
```
|
|
146
202
|
|
|
147
|
-
**AI**: "What constraints should we consider?"
|
|
203
|
+
**AI**: "Good context. What constraints should we consider?"
|
|
148
204
|
|
|
149
205
|
**User**: "Must work on mobile. Can't require WebSockets everywhere. Also need to keep costs reasonable."
|
|
150
206
|
|
|
151
|
-
*Captures narrative and extracts constraints*
|
|
152
|
-
|
|
153
|
-
**AI**: "Good constraints. Any questions we need to answer?"
|
|
154
|
-
|
|
155
|
-
**User**: "How do we handle offline users? What's the latency requirement?"
|
|
156
|
-
|
|
157
|
-
*Adds questions*
|
|
158
|
-
|
|
159
|
-
**AI**: "Do you have any examples or diagrams of how this might work?"
|
|
160
|
-
|
|
161
|
-
**User**: "Here's a diagram from a similar system" [attaches image]
|
|
162
|
-
|
|
163
|
-
*Adds evidence*
|
|
164
|
-
|
|
165
|
-
**AI**: "This is taking shape. Ready to explore different approaches for implementation?"
|
|
166
|
-
|
|
167
|
-
**User**: "Yes, let's look at options"
|
|
168
|
-
|
|
169
|
-
*Transitions to shaping*
|
|
207
|
+
**AI**: *Captures narrative and extracts constraints*
|
|
170
208
|
|
|
171
209
|
## Anti-Patterns
|
|
172
210
|
|
|
211
|
+
❌ Don't ask for information the user already provided
|
|
173
212
|
❌ Don't immediately jump to solutions
|
|
174
213
|
❌ Don't create detailed plans yet
|
|
175
214
|
❌ Don't pressure for commitment
|
|
176
215
|
❌ Don't skip evidence gathering
|
|
216
|
+
❌ Don't stop after creating the idea—begin exploration immediately
|
|
177
217
|
|
|
218
|
+
✅ Do extract information from the user's message
|
|
178
219
|
✅ Do ask open questions
|
|
179
220
|
✅ Do capture all thinking
|
|
180
221
|
✅ Do surface constraints early
|
|
181
222
|
✅ Do gather supporting materials
|
|
223
|
+
✅ Do start the conversation immediately after creating the idea
|
|
182
224
|
|
|
183
225
|
## Transition Criteria
|
|
184
226
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riotprompt/riotplan",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Framework for long-lived, stateful AI workflows (plans)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
54
|
-
"@
|
|
54
|
+
"@utilarium/cardigantime": "^0.0.24",
|
|
55
55
|
"@types/inquirer": "^9.0.9",
|
|
56
56
|
"chalk": "^5.4.1",
|
|
57
57
|
"commander": "^14.0.2",
|
|
58
58
|
"inquirer": "^13.2.1",
|
|
59
59
|
"js-yaml": "^4.1.1",
|
|
60
60
|
"marked": "^17.0.1",
|
|
61
|
-
"zod": "^4.
|
|
61
|
+
"zod": "^4.3.6"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@riotprompt/agentic": "^1.0.
|
|
64
|
+
"@riotprompt/agentic": "^1.0.4",
|
|
65
65
|
"@riotprompt/execution": "^1.0.1",
|
|
66
|
-
"@riotprompt/riotprompt": "^1.0.
|
|
66
|
+
"@riotprompt/riotprompt": "^1.0.5"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@riotprompt/agentic": {
|