@riotprompt/riotplan 1.0.4 → 1.0.5

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.
@@ -0,0 +1,456 @@
1
+ # Execute Plan
2
+
3
+ ## Purpose
4
+
5
+ Guide intelligent, high-level plan execution with automatic state management. This prompt provides a conversational workflow for executing plans, automatically determining which step to work on, guiding through tasks, and managing execution state.
6
+
7
+ ## When to Use
8
+
9
+ - User wants to execute a plan ("let's execute this plan", "start working on this")
10
+ - Continuing execution of a partially completed plan
11
+ - Resuming after a break
12
+ - Need guided, conversational execution experience
13
+
14
+ ## Workflow
15
+
16
+ ### 1. Check Plan Status
17
+
18
+ **Always start by checking current execution state:**
19
+
20
+ ```typescript
21
+ riotplan_status({
22
+ path: "./path/to/plan"
23
+ })
24
+ ```
25
+
26
+ Analyze the response to understand:
27
+ - Total number of steps
28
+ - How many steps are complete
29
+ - Which step (if any) is currently in progress
30
+ - Which step should be started next
31
+ - Any blockers or issues
32
+ - Overall progress percentage
33
+
34
+ ### 2. Determine Next Action
35
+
36
+ Based on the status, determine what to do:
37
+
38
+ #### Scenario A: No Steps Started
39
+
40
+ ```
41
+ Status: ⬜ PLANNING
42
+ Current Step: Ready to begin Step 01
43
+ Progress: 0% (0/N steps)
44
+ ```
45
+
46
+ **Your Response:**
47
+ "This plan has [N] steps and hasn't been started yet. Let's begin with Step 01: [title].
48
+
49
+ [Brief description of what Step 01 accomplishes]
50
+
51
+ The main tasks are:
52
+ 1. [Task 1]
53
+ 2. [Task 2]
54
+ 3. [Task 3]
55
+
56
+ Ready to start?"
57
+
58
+ #### Scenario B: Step In Progress
59
+
60
+ ```
61
+ Status: 🔄 IN_PROGRESS
62
+ Current Step: Step [N] in progress
63
+ Progress: X% (N-1/Total steps)
64
+ ```
65
+
66
+ **Your Response:**
67
+ "We're currently working on Step [N]: [title].
68
+
69
+ Let me check what we've done so far..."
70
+
71
+ *Read the step file and STATUS.md to understand progress*
72
+
73
+ "It looks like we've completed [X, Y, Z]. What would you like to work on next?"
74
+
75
+ #### Scenario C: Step Complete, Next Step Pending
76
+
77
+ ```
78
+ Status: 🔄 IN_PROGRESS
79
+ Current Step: Ready to begin Step [N+1]
80
+ Last Completed: Step [N]
81
+ Progress: X% (N/Total steps)
82
+ ```
83
+
84
+ **Your Response:**
85
+ "Great! Step [N] is complete. We're [X]% through the plan.
86
+
87
+ Ready to move to Step [N+1]: [title]?
88
+
89
+ [Brief description of what this step accomplishes]"
90
+
91
+ #### Scenario D: All Steps Complete
92
+
93
+ ```
94
+ Status: ✅ COMPLETED
95
+ Progress: 100% (N/N steps)
96
+ ```
97
+
98
+ **Your Response:**
99
+ "Congratulations! All [N] steps are complete. The plan has been fully executed.
100
+
101
+ [Summary of what was accomplished]
102
+
103
+ Would you like to review the results or is there anything else you'd like to do with this plan?"
104
+
105
+ ### 3. Execute Current Step
106
+
107
+ When working on a step:
108
+
109
+ #### 3.1 Start the Step
110
+
111
+ Mark the step as started:
112
+ ```typescript
113
+ riotplan_step_start({
114
+ path: "./path/to/plan",
115
+ step: N
116
+ })
117
+ ```
118
+
119
+ #### 3.2 Read Step Details
120
+
121
+ Read the step file to understand what needs to be done:
122
+ ```typescript
123
+ // Read the step file
124
+ ```
125
+
126
+ Understand:
127
+ - **Objective**: What this step accomplishes
128
+ - **Tasks**: Specific things to do
129
+ - **Acceptance Criteria**: How to know it's done
130
+ - **Files Changed**: What will be modified
131
+ - **Notes**: Important considerations
132
+
133
+ #### 3.3 Guide Through Tasks
134
+
135
+ Work through each task conversationally:
136
+
137
+ 1. **Explain what you're about to do**: "Let me [task description]"
138
+ 2. **Do the work**: Make code changes, create files, run commands
139
+ 3. **Show what you did**: "I've [what was done]"
140
+ 4. **Confirm**: "Does this look right?"
141
+
142
+ Be conversational - this is pair programming, not automation.
143
+
144
+ #### 3.4 Check Acceptance Criteria
145
+
146
+ Before completing the step, verify acceptance criteria:
147
+
148
+ "Let me check the acceptance criteria:
149
+ - ✅ [Criterion 1] - Done
150
+ - ✅ [Criterion 2] - Done
151
+ - ⬜ [Criterion 3] - Still need to do this
152
+
153
+ Let me complete [Criterion 3]..."
154
+
155
+ #### 3.5 Complete the Step
156
+
157
+ When all tasks and criteria are met:
158
+
159
+ ```typescript
160
+ riotplan_step_complete({
161
+ path: "./path/to/plan",
162
+ step: N
163
+ })
164
+ ```
165
+
166
+ Confirm completion:
167
+ "Step [N] is complete! [Brief summary of what was accomplished]"
168
+
169
+ ### 4. Handle Blockers and Issues
170
+
171
+ If you encounter a blocker:
172
+
173
+ 1. **Acknowledge it**: "I've hit a blocker: [description]"
174
+ 2. **Capture it**: Add narrative about the blocker
175
+ 3. **Discuss**: "Here are some options: [A, B, C]. What would you like to do?"
176
+ 4. **Resolve or defer**: Either fix it now or document it and move on
177
+
178
+ If the plan needs adjustment:
179
+ - Suggest creating a checkpoint before making changes
180
+ - Use the `develop_plan` prompt to refine the plan
181
+ - Resume execution after refinement
182
+
183
+ ### 5. Create Checkpoints at Key Moments
184
+
185
+ Create checkpoints during execution:
186
+
187
+ **Before risky changes:**
188
+ ```typescript
189
+ riotplan_checkpoint_create({
190
+ path: "./path/to/plan",
191
+ name: "before-step-5",
192
+ message: "Checkpoint before implementing database migration (Step 5)"
193
+ })
194
+ ```
195
+
196
+ **After completing major phases:**
197
+ ```typescript
198
+ riotplan_checkpoint_create({
199
+ path: "./path/to/plan",
200
+ name: "phase-1-complete",
201
+ message: "Completed Phase 1: Data model and core types (Steps 1-4)"
202
+ })
203
+ ```
204
+
205
+ **When user wants to pause:**
206
+ ```typescript
207
+ riotplan_checkpoint_create({
208
+ path: "./path/to/plan",
209
+ name: "pause-after-step-7",
210
+ message: "Pausing execution after Step 7. Ready to resume with Step 8."
211
+ })
212
+ ```
213
+
214
+ ### 6. Capture Narrative During Execution
215
+
216
+ As you work, capture the narrative of execution:
217
+
218
+ **When starting a step:**
219
+ ```typescript
220
+ riotplan_idea_add_narrative({
221
+ path: "./path/to/plan",
222
+ content: "Starting Step 3: Implement Narrative Capture. The objective is to create MCP tool for capturing raw conversational input. This builds on the timeline extensions from Step 2.",
223
+ speaker: "assistant",
224
+ context: "Beginning step execution"
225
+ })
226
+ ```
227
+
228
+ **When encountering challenges:**
229
+ ```typescript
230
+ riotplan_idea_add_narrative({
231
+ path: "./path/to/plan",
232
+ content: "Ran into an issue with the timeline event types - the NarrativeChunkEvent interface wasn't exported. Fixed by adding export to types.ts. This is a common pattern we should watch for in future steps.",
233
+ speaker: "assistant",
234
+ context: "Problem solving during execution"
235
+ })
236
+ ```
237
+
238
+ **When making decisions:**
239
+ ```typescript
240
+ riotplan_idea_add_narrative({
241
+ path: "./path/to/plan",
242
+ content: "Decided to store inline evidence in .history/evidence/ rather than embedding in timeline. This keeps the timeline lean and makes evidence files easier to browse. User can view evidence directly as markdown files.",
243
+ speaker: "assistant",
244
+ context: "Implementation decision"
245
+ })
246
+ ```
247
+
248
+ ### 7. Iterate Until Complete
249
+
250
+ Continue the execution loop:
251
+ 1. Check status
252
+ 2. Determine next step
253
+ 3. Execute step
254
+ 4. Mark complete
255
+ 5. Move to next step
256
+ 6. Repeat
257
+
258
+ ## Key Principles
259
+
260
+ ### 1. Intelligent State Management
261
+
262
+ **Always check status first** - never assume where you are in execution:
263
+ ```typescript
264
+ // Start every interaction with status check
265
+ riotplan_status({ path: "./path/to/plan" })
266
+ ```
267
+
268
+ ### 2. Conversational Execution
269
+
270
+ This is **pair programming**, not automation:
271
+ - Explain what you're doing
272
+ - Show your work
273
+ - Ask for confirmation when needed
274
+ - Discuss trade-offs and decisions
275
+ - Make it feel collaborative
276
+
277
+ ### 3. Guided Experience
278
+
279
+ **Lead the user** through execution:
280
+ - "Let's start with..."
281
+ - "Next, we need to..."
282
+ - "I'll [do X], then [do Y]"
283
+ - "Ready to move to the next step?"
284
+
285
+ ### 4. Flexible and Resumable
286
+
287
+ **Handle interruptions gracefully:**
288
+ - User can pause at any time
289
+ - Checkpoints preserve state
290
+ - Status shows exactly where you are
291
+ - Easy to resume later
292
+
293
+ ### 5. Context-Aware
294
+
295
+ **Remember what's been done:**
296
+ - Read STATUS.md to see progress
297
+ - Check completed steps
298
+ - Understand dependencies
299
+ - Don't repeat work
300
+
301
+ ## Example Execution Session
302
+
303
+ ### Initial Start
304
+
305
+ **User**: "Let's execute this plan"
306
+
307
+ **AI**: *Checks status*
308
+ ```typescript
309
+ riotplan_status({ path: "./plans/narrative-evolution" })
310
+ ```
311
+
312
+ **AI**: "This plan has 13 steps for implementing Narrative Evolution with Checkpoints and Evidence. No steps have been started yet.
313
+
314
+ Let's begin with Step 01: Design Data Model. The objective is to define timeline event types for narrative chunks and checkpoints.
315
+
316
+ The main tasks are:
317
+ 1. Define narrative_chunk event type structure
318
+ 2. Define checkpoint_created event type structure
319
+ 3. Define checkpoint storage format
320
+ 4. Document event type registry
321
+ 5. Design checkpoint metadata format
322
+
323
+ Ready to start?"
324
+
325
+ **User**: "Yes, let's do it"
326
+
327
+ **AI**: *Starts step*
328
+ ```typescript
329
+ riotplan_step_start({ path: "./plans/narrative-evolution", step: 1 })
330
+ ```
331
+
332
+ **AI**: *Reads step file and begins work*
333
+
334
+ "Great! Let me start by creating the data model documentation. I'll define the narrative_chunk event type first..."
335
+
336
+ *Creates docs/data-model.md with event type definitions*
337
+
338
+ "I've created the data model documentation with:
339
+ - narrative_chunk event type for capturing raw conversational input
340
+ - checkpoint_created event type for marking stopping points
341
+ - Checkpoint storage format in .history/checkpoints/
342
+ - Complete event type registry
343
+
344
+ Let me also add the TypeScript types to src/types.ts..."
345
+
346
+ *Updates types.ts*
347
+
348
+ "Done! I've added all the type definitions. Let me verify the acceptance criteria:
349
+ - ✅ Event type structures defined with TypeScript types
350
+ - ✅ Checkpoint storage format documented
351
+ - ✅ Design maintains backward compatibility
352
+ - ✅ Format is simple and human-readable
353
+ - ✅ Design supports both structured and free-form input
354
+ - ✅ Checkpoint restoration strategy is clear
355
+
356
+ All criteria met! Marking Step 01 complete."
357
+
358
+ ```typescript
359
+ riotplan_step_complete({ path: "./plans/narrative-evolution", step: 1 })
360
+ ```
361
+
362
+ **AI**: "Step 01 complete! We've defined the complete data model for narrative evolution.
363
+
364
+ Ready to move to Step 02: Extend Timeline Format?"
365
+
366
+ ### Continuing Execution
367
+
368
+ **User**: "Yes, continue"
369
+
370
+ **AI**: *Starts Step 02*
371
+
372
+ "Step 02 focuses on implementing support for narrative_chunk events in the timeline. Let me read the step details..."
373
+
374
+ *Continues execution*
375
+
376
+ ### Resuming After Break
377
+
378
+ **User**: "Let's continue working on this plan"
379
+
380
+ **AI**: *Checks status*
381
+ ```typescript
382
+ riotplan_status({ path: "./plans/narrative-evolution" })
383
+ ```
384
+
385
+ **AI**: "Welcome back! We're currently working on Step 05: Implement Checkpoint Creation. We've completed steps 1-4 (31% progress).
386
+
387
+ Step 05 is about creating the MCP tool for checkpoint creation. Let me check what's been done so far..."
388
+
389
+ *Reads step file and continues from where left off*
390
+
391
+ ## Anti-Patterns
392
+
393
+ ❌ **Don't**: Ask user which step to work on - determine it from status
394
+ ✅ **Do**: Check status and automatically determine next action
395
+
396
+ ❌ **Don't**: Lose track of where you are in execution
397
+ ✅ **Do**: Always check status to understand current state
398
+
399
+ ❌ **Don't**: Skip tasks or acceptance criteria
400
+ ✅ **Do**: Work through each task and verify criteria before completing
401
+
402
+ ❌ **Don't**: Make changes without explaining what you're doing
403
+ ✅ **Do**: Explain, do, confirm - make it conversational
404
+
405
+ ❌ **Don't**: Complete steps without actually doing the work
406
+ ✅ **Do**: Implement everything specified in the step
407
+
408
+ ## State Transitions
409
+
410
+ ```
411
+ ⬜ PLANNING → 🔄 IN_PROGRESS (first step started)
412
+ 🔄 IN_PROGRESS → 🔄 IN_PROGRESS (completing steps)
413
+ 🔄 IN_PROGRESS → ✅ COMPLETED (last step completed)
414
+ ```
415
+
416
+ ## Integration with Other Prompts
417
+
418
+ ### From develop_plan to execute_plan
419
+
420
+ After refining a plan:
421
+ "The plan looks good! Ready to start executing?"
422
+ → Switch to execute_plan prompt
423
+
424
+ ### From execute_plan to develop_plan
425
+
426
+ If plan needs adjustment during execution:
427
+ "I think we need to adjust the plan. Let me create a checkpoint first..."
428
+ → Create checkpoint, switch to develop_plan prompt
429
+
430
+ ### Using checkpoints during execution
431
+
432
+ Create checkpoints liberally:
433
+ - Before risky changes
434
+ - After completing phases
435
+ - When pausing
436
+ - When trying alternative approaches
437
+
438
+ ## Advanced: Parallel Execution
439
+
440
+ For plans with independent steps:
441
+
442
+ "Steps 3 and 4 are independent - we could work on them in parallel. Would you like to tackle Step 3 first, or should we do Step 4?"
443
+
444
+ *User chooses*
445
+
446
+ "Great! Let's work on Step [N]. We can come back to Step [M] afterward."
447
+
448
+ ## Notes
449
+
450
+ - This prompt provides **high-level execution guidance**, not low-level task automation
451
+ - The goal is **conversational pair programming**, not silent automation
452
+ - **Always check status** before taking action
453
+ - **Capture narrative** as you work - document decisions, challenges, solutions
454
+ - **Create checkpoints** at key moments for recovery and documentation
455
+ - **Be flexible** - handle interruptions, blockers, and plan changes gracefully
456
+ - The timeline will show the **complete execution journey**, not just the final result
@@ -0,0 +1,142 @@
1
+ # Execute Step Workflow
2
+
3
+ You are helping the user execute a single step from a plan, following the guidance in the step file and updating status appropriately.
4
+
5
+ ## Your Task
6
+
7
+ Follow this workflow to execute a plan step using the riotplan MCP tools and resources available to you.
8
+
9
+ ## Step 1: Check Plan Status
10
+
11
+ Use the `riotplan_status` tool to check the current plan state:
12
+
13
+ ```
14
+ {
15
+ "path": "${path}",
16
+ "verbose": false
17
+ }
18
+ ```
19
+
20
+ This will show you:
21
+ - Current step number
22
+ - Progress percentage
23
+ - Any blockers or issues
24
+ - Which step should be worked on next
25
+
26
+ Verify that prerequisites are met and identify which step to execute.
27
+
28
+ ## Step 2: Read Step Details
29
+
30
+ Fetch the step resource to get full content and acceptance criteria:
31
+
32
+ ```
33
+ riotplan://step/${path}?number={stepNumber}
34
+ ```
35
+
36
+ Or use the `riotplan_step_list` tool to see all steps:
37
+
38
+ ```
39
+ {
40
+ "path": "${path}",
41
+ "pending": true
42
+ }
43
+ ```
44
+
45
+ Review the step content to understand:
46
+ - Objectives and goals
47
+ - Acceptance criteria
48
+ - Dependencies and context
49
+ - Testing requirements
50
+
51
+ ## Step 3: Mark Step as Started
52
+
53
+ IMPORTANT: Use the `riotplan_step_start` MCP tool to mark the step as in progress:
54
+
55
+ ```
56
+ {
57
+ "path": "${path}",
58
+ "step": N
59
+ }
60
+ ```
61
+
62
+ This updates STATUS.md and sets timestamps to track progress.
63
+
64
+ ## Step 4: Execute Step Tasks
65
+
66
+ Now follow the guidance in the step file:
67
+ - Implement required changes
68
+ - Write tests as specified
69
+ - Document as needed
70
+ - Follow acceptance criteria
71
+
72
+ Work through the step systematically, ensuring all requirements are met.
73
+
74
+ ## Step 5: Verify Completion
75
+
76
+ Before marking the step complete, verify:
77
+ - All acceptance criteria are met
78
+ - Tests pass successfully
79
+ - Changes are complete and reviewed
80
+ - Documentation is updated if needed
81
+
82
+ ## Step 6: Mark Step as Complete
83
+
84
+ IMPORTANT: Use the `riotplan_step_complete` MCP tool to mark the step as done:
85
+
86
+ ```
87
+ {
88
+ "path": "${path}",
89
+ "step": N
90
+ }
91
+ ```
92
+
93
+ This updates STATUS.md and advances the plan to the next step.
94
+
95
+ ## Step 7: Check Overall Progress
96
+
97
+ Use `riotplan_status` again to see updated progress and identify the next step to work on.
98
+
99
+ ## Important Guidelines
100
+
101
+ - **Always use MCP tools** - Never shell out to CLI commands
102
+ - **Update status properly** - Mark steps as started and completed
103
+ - **One step at a time** - Focus on completing one step fully before moving to the next
104
+ - **Test thoroughly** - Each step should include verification of acceptance criteria
105
+ - **Document issues** - If you encounter blockers, document them in STATUS.md
106
+
107
+ ## Handling Issues
108
+
109
+ If you encounter problems during step execution:
110
+
111
+ ### Step is Blocked
112
+ If you encounter blockers:
113
+ 1. Inform the user about the blocker
114
+ 2. Ask if the step needs to be split using `riotplan_step_add`
115
+ 3. Consider if prerequisite steps are needed
116
+ 4. Document the blocker for tracking
117
+
118
+ ### Acceptance Criteria Unclear
119
+ If criteria are vague:
120
+ 1. Ask the user for clarification
121
+ 2. Suggest more specific tasks
122
+ 3. Consider if the step needs more detail
123
+
124
+ ### Step Too Large
125
+ If a step is too complex:
126
+ 1. Suggest using `riotplan_step_add` to break it into smaller steps
127
+ 2. Ask the user how they want to proceed
128
+ 3. Consider completing the current step partially and adding follow-up steps
129
+
130
+ ## Example Workflow
131
+
132
+ Here's how you should execute this workflow:
133
+
134
+ 1. Call `riotplan_status` with path: "${path}"
135
+ 2. Review the output and identify the current step
136
+ 3. Fetch the step resource or list steps
137
+ 4. Call `riotplan_step_start` with the step number
138
+ 5. Execute the step tasks (implement, test, document)
139
+ 6. Call `riotplan_step_complete` when done
140
+ 7. Call `riotplan_status` again to see progress
141
+
142
+ Remember: Always use MCP tools, never shell commands.