@riotprompt/riotplan 1.0.3 → 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.
- package/MCP-ELICITATION-NOTES.md +211 -0
- package/MCP-FIXES.md +50 -0
- package/MCP-PROMPT-FIXES.md +207 -0
- package/README.md +70 -1
- package/dist/cli-BAr1IsMF.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/mcp/prompts/create_plan.md +127 -0
- package/dist/mcp/prompts/develop_plan.md +667 -0
- package/dist/mcp/prompts/execute_plan.md +456 -0
- package/dist/mcp/prompts/execute_step.md +142 -0
- package/dist/mcp/prompts/explore_idea.md +187 -0
- package/dist/mcp/prompts/shape_approach.md +187 -0
- package/dist/mcp/prompts/track_progress.md +145 -0
- package/dist/mcp-server.js +3553 -0
- package/idea-plan-conceptual-model/.history/timeline.jsonl +1 -0
- package/idea-plan-conceptual-model/IDEA.md +39 -0
- package/idea-plan-conceptual-model/LIFECYCLE.md +21 -0
- package/package.json +17 -7
- package/scripts/build-mcp.js +88 -0
|
@@ -0,0 +1,667 @@
|
|
|
1
|
+
# Develop Plan
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Transform rich ideation context (ideas, narratives, evidence, shaping decisions) into a comprehensive, actionable execution plan. This prompt bridges the gap between exploration and execution by synthesizing all the thinking, deliberation, and decisions captured during the idea and shaping phases into a structured plan.
|
|
6
|
+
|
|
7
|
+
**CRITICAL**: This is NOT about generating a generic task list. This is about synthesizing all the valuable context captured during ideation into a plan that reflects the full depth of thinking, honors all constraints, implements the selected approach, and references the evidence that informed decisions.
|
|
8
|
+
|
|
9
|
+
## The Value of Context-Driven Planning
|
|
10
|
+
|
|
11
|
+
The ideation phase captures:
|
|
12
|
+
- **Notes and observations**: Insights discovered during exploration
|
|
13
|
+
- **Questions and answers**: Uncertainties raised and resolved
|
|
14
|
+
- **Constraints**: Requirements that must be honored
|
|
15
|
+
- **Evidence**: Research, examples, data that inform decisions
|
|
16
|
+
- **Narratives**: Raw conversational context and reasoning
|
|
17
|
+
- **Shaping decisions**: Approaches considered, tradeoffs analyzed, selections made
|
|
18
|
+
|
|
19
|
+
**All of this context has value.** A plan that doesn't leverage it is just a generic task list. A plan that synthesizes it becomes a roadmap grounded in deep understanding.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- After completing idea exploration and shaping phases
|
|
24
|
+
- Ready to convert an idea into an executable plan
|
|
25
|
+
- Need to synthesize all captured context into actionable steps
|
|
26
|
+
- Want to ensure the plan reflects all the deliberation and decisions made
|
|
27
|
+
- Moving from "what should we do?" to "how will we do it?"
|
|
28
|
+
|
|
29
|
+
**Before using this prompt**: Ensure the idea has been explored (IDEA.md exists, timeline has events) and ideally shaped (approach selected). If the idea is still nascent, use `explore_idea` first.
|
|
30
|
+
|
|
31
|
+
## Critical Context Sources
|
|
32
|
+
|
|
33
|
+
Before generating a plan, you MUST gather and synthesize context from these sources:
|
|
34
|
+
|
|
35
|
+
### 1. The Idea File (`IDEA.md`)
|
|
36
|
+
|
|
37
|
+
This is the foundation. It contains:
|
|
38
|
+
- **Core Concept**: What are we trying to achieve?
|
|
39
|
+
- **Why This Matters**: The motivation and value
|
|
40
|
+
- **Initial Thoughts**: Early thinking and observations
|
|
41
|
+
- **Constraints**: Limitations and requirements that must be honored
|
|
42
|
+
- **Questions**: Uncertainties that were raised (and possibly answered)
|
|
43
|
+
- **Evidence**: Supporting materials, research, examples
|
|
44
|
+
- **Status**: Current stage and next steps
|
|
45
|
+
|
|
46
|
+
**Action**: Read `IDEA.md` completely. This tells you WHAT needs to be built and WHY.
|
|
47
|
+
|
|
48
|
+
### 2. The Timeline (`.history/timeline.jsonl`)
|
|
49
|
+
|
|
50
|
+
This captures the full evolution of thinking:
|
|
51
|
+
- **Notes**: Observations and insights added during exploration
|
|
52
|
+
- **Questions**: Uncertainties raised and answered
|
|
53
|
+
- **Constraints**: Requirements discovered during exploration
|
|
54
|
+
- **Evidence**: Materials gathered to inform decisions
|
|
55
|
+
- **Narrative Chunks**: Raw conversational context and deliberation
|
|
56
|
+
- **Shaping Events**: Approaches considered, feedback given, decisions made
|
|
57
|
+
- **Checkpoints**: Snapshots of state at key moments
|
|
58
|
+
|
|
59
|
+
**Action**: Read the timeline to understand HOW the thinking evolved. Pay special attention to:
|
|
60
|
+
- Questions that were answered (inform approach)
|
|
61
|
+
- Constraints added (must be honored in plan)
|
|
62
|
+
- Narrative chunks (capture reasoning and context)
|
|
63
|
+
- Shaping decisions (selected approach and rationale)
|
|
64
|
+
|
|
65
|
+
### 3. The Prompts Directory (`.history/prompts/`)
|
|
66
|
+
|
|
67
|
+
These are numbered conversation captures that preserve full context:
|
|
68
|
+
- Raw user input and assistant responses
|
|
69
|
+
- Detailed deliberation and reasoning
|
|
70
|
+
- Alternative approaches considered
|
|
71
|
+
- Decision rationale
|
|
72
|
+
|
|
73
|
+
**Action**: Read recent prompt files (especially from shaping phase) to understand the detailed reasoning behind decisions.
|
|
74
|
+
|
|
75
|
+
### 4. Shaping Artifacts (if present)
|
|
76
|
+
|
|
77
|
+
If the idea went through shaping:
|
|
78
|
+
- **SHAPING.md**: Approaches considered, feedback, comparisons
|
|
79
|
+
- **Selected Approach**: Which strategy was chosen and why
|
|
80
|
+
- **Tradeoffs**: What was gained and sacrificed with this choice
|
|
81
|
+
|
|
82
|
+
**Action**: Understand which approach was selected and ensure the plan implements it correctly.
|
|
83
|
+
|
|
84
|
+
### 5. Evidence Files (`evidence/` directory)
|
|
85
|
+
|
|
86
|
+
Supporting materials that informed the idea:
|
|
87
|
+
- Example implementations
|
|
88
|
+
- Research findings
|
|
89
|
+
- Reference documents
|
|
90
|
+
- Prototypes or mockups
|
|
91
|
+
|
|
92
|
+
**Action**: Review evidence to understand context and requirements more deeply.
|
|
93
|
+
|
|
94
|
+
## Workflow
|
|
95
|
+
|
|
96
|
+
### 1. Gather All Context
|
|
97
|
+
|
|
98
|
+
Start by reading ALL the sources listed above:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
// Read the idea file
|
|
102
|
+
const idea = await read("IDEA.md")
|
|
103
|
+
|
|
104
|
+
// Read the timeline to understand evolution
|
|
105
|
+
const timeline = await read(".history/timeline.jsonl")
|
|
106
|
+
|
|
107
|
+
// Read recent prompts for detailed context
|
|
108
|
+
const prompts = await listFiles(".history/prompts/")
|
|
109
|
+
// Read the most recent 3-5 prompt files
|
|
110
|
+
|
|
111
|
+
// If shaping occurred, read shaping artifacts
|
|
112
|
+
const shaping = await read("SHAPING.md") // if exists
|
|
113
|
+
|
|
114
|
+
// List and review evidence
|
|
115
|
+
const evidence = await listFiles("evidence/")
|
|
116
|
+
// Read key evidence files
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**DO NOT SKIP THIS STEP**. The plan quality depends entirely on how well you understand the full context.
|
|
120
|
+
|
|
121
|
+
### 2. Synthesize Context into Plan Requirements
|
|
122
|
+
|
|
123
|
+
After gathering all context, synthesize it into clear plan requirements:
|
|
124
|
+
|
|
125
|
+
**From IDEA.md:**
|
|
126
|
+
- Core concept → Plan objective and scope
|
|
127
|
+
- Why this matters → Value proposition in SUMMARY.md
|
|
128
|
+
- Constraints → Must be honored in every step
|
|
129
|
+
- Questions (answered) → Inform approach decisions
|
|
130
|
+
- Questions (unanswered) → May need research steps in plan
|
|
131
|
+
|
|
132
|
+
**From Timeline:**
|
|
133
|
+
- Notes and observations → Context for approach decisions
|
|
134
|
+
- Narrative chunks → Understanding of tradeoffs and reasoning
|
|
135
|
+
- Evidence → Supporting materials to reference
|
|
136
|
+
- Shaping decisions → Selected approach to implement
|
|
137
|
+
|
|
138
|
+
**From Shaping:**
|
|
139
|
+
- Selected approach → Overall strategy for EXECUTION_PLAN.md
|
|
140
|
+
- Tradeoffs → Known limitations to document
|
|
141
|
+
- Assumptions → Conditions that must hold true
|
|
142
|
+
|
|
143
|
+
**Synthesis Questions:**
|
|
144
|
+
1. What is the core problem we're solving? (from IDEA.md)
|
|
145
|
+
2. What approach did we select and why? (from SHAPING.md or timeline)
|
|
146
|
+
3. What constraints must every step honor? (from IDEA.md constraints)
|
|
147
|
+
4. What evidence informs our implementation? (from evidence/)
|
|
148
|
+
5. What was the key reasoning behind decisions? (from narratives)
|
|
149
|
+
|
|
150
|
+
### 3. Structure the Plan
|
|
151
|
+
|
|
152
|
+
Now that you understand the full context, structure the plan:
|
|
153
|
+
|
|
154
|
+
**A. Define Phases**
|
|
155
|
+
|
|
156
|
+
Break the work into logical phases based on:
|
|
157
|
+
- The selected approach (from shaping)
|
|
158
|
+
- Natural dependencies (what must come first)
|
|
159
|
+
- Risk mitigation (validate assumptions early)
|
|
160
|
+
- Incremental value delivery (working software at each phase)
|
|
161
|
+
|
|
162
|
+
Example phases:
|
|
163
|
+
- Phase 1: Foundation (infrastructure, core abstractions)
|
|
164
|
+
- Phase 2: Core Features (main functionality)
|
|
165
|
+
- Phase 3: Integration (connect components)
|
|
166
|
+
- Phase 4: Polish (refinement, documentation)
|
|
167
|
+
|
|
168
|
+
**B. Define Steps Within Each Phase**
|
|
169
|
+
|
|
170
|
+
For each phase, break down into concrete steps:
|
|
171
|
+
- Each step should be completable in a reasonable timeframe
|
|
172
|
+
- Each step should have clear acceptance criteria
|
|
173
|
+
- Each step should reference relevant evidence or context
|
|
174
|
+
- Each step should honor all constraints
|
|
175
|
+
|
|
176
|
+
**C. Capture Rationale**
|
|
177
|
+
|
|
178
|
+
For each step, document:
|
|
179
|
+
- **Why this step?** (connects to idea and approach)
|
|
180
|
+
- **Why now?** (explains ordering and dependencies)
|
|
181
|
+
- **What constraints apply?** (from IDEA.md)
|
|
182
|
+
- **What evidence informed this?** (from evidence/)
|
|
183
|
+
|
|
184
|
+
### 4. Write the Plan Files
|
|
185
|
+
|
|
186
|
+
Generate the complete plan structure:
|
|
187
|
+
|
|
188
|
+
**SUMMARY.md:**
|
|
189
|
+
```markdown
|
|
190
|
+
# [Plan Name]
|
|
191
|
+
|
|
192
|
+
## Objective
|
|
193
|
+
[From IDEA.md core concept]
|
|
194
|
+
|
|
195
|
+
## Value
|
|
196
|
+
[From IDEA.md "why this matters"]
|
|
197
|
+
|
|
198
|
+
## Scope
|
|
199
|
+
[What's included and excluded, informed by constraints]
|
|
200
|
+
|
|
201
|
+
## Success Criteria
|
|
202
|
+
[How we'll know we're done]
|
|
203
|
+
|
|
204
|
+
## Context
|
|
205
|
+
[Key insights from timeline and narratives]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**EXECUTION_PLAN.md:**
|
|
209
|
+
```markdown
|
|
210
|
+
# Execution Plan
|
|
211
|
+
|
|
212
|
+
## Selected Approach
|
|
213
|
+
[From SHAPING.md - which approach and why]
|
|
214
|
+
|
|
215
|
+
## Strategy
|
|
216
|
+
[How we'll implement this approach]
|
|
217
|
+
|
|
218
|
+
## Phases
|
|
219
|
+
[List phases with rationale]
|
|
220
|
+
|
|
221
|
+
## Key Decisions
|
|
222
|
+
[Important decisions from shaping/timeline]
|
|
223
|
+
|
|
224
|
+
## Assumptions
|
|
225
|
+
[From shaping - what must be true]
|
|
226
|
+
|
|
227
|
+
## Constraints
|
|
228
|
+
[From IDEA.md - what we must honor]
|
|
229
|
+
|
|
230
|
+
## Risks and Mitigations
|
|
231
|
+
[Known risks from deliberation]
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**STATUS.md:**
|
|
235
|
+
```markdown
|
|
236
|
+
# Status
|
|
237
|
+
|
|
238
|
+
## Overview
|
|
239
|
+
- **Current Phase**: Not started
|
|
240
|
+
- **Progress**: 0/[N] steps complete
|
|
241
|
+
- **Status**: Ready to begin
|
|
242
|
+
|
|
243
|
+
## Steps
|
|
244
|
+
| Step | Title | Status | Phase |
|
|
245
|
+
|------|-------|--------|-------|
|
|
246
|
+
| 1 | [Title] | pending | [Phase] |
|
|
247
|
+
...
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
**plan/001-[step-name].md** (for each step):
|
|
251
|
+
```markdown
|
|
252
|
+
# Step 1: [Title]
|
|
253
|
+
|
|
254
|
+
## Objective
|
|
255
|
+
[What this step achieves]
|
|
256
|
+
|
|
257
|
+
## Context
|
|
258
|
+
[Why this step, why now - reference timeline/evidence]
|
|
259
|
+
|
|
260
|
+
## Tasks
|
|
261
|
+
- [ ] [Specific task]
|
|
262
|
+
- [ ] [Specific task]
|
|
263
|
+
|
|
264
|
+
## Acceptance Criteria
|
|
265
|
+
- [ ] [Measurable criterion]
|
|
266
|
+
- [ ] [Measurable criterion]
|
|
267
|
+
|
|
268
|
+
## Constraints
|
|
269
|
+
[Relevant constraints from IDEA.md]
|
|
270
|
+
|
|
271
|
+
## Dependencies
|
|
272
|
+
- Requires: [Previous steps]
|
|
273
|
+
- Blocks: [Future steps]
|
|
274
|
+
|
|
275
|
+
## Evidence
|
|
276
|
+
[Reference relevant evidence files]
|
|
277
|
+
|
|
278
|
+
## Estimated Effort
|
|
279
|
+
[Time estimate]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### 5. Validate Against Context
|
|
283
|
+
|
|
284
|
+
Before presenting the plan, validate it:
|
|
285
|
+
|
|
286
|
+
**Completeness Check:**
|
|
287
|
+
- [ ] Does the plan implement the selected approach?
|
|
288
|
+
- [ ] Are all constraints from IDEA.md honored?
|
|
289
|
+
- [ ] Does the plan address all key questions?
|
|
290
|
+
- [ ] Is evidence appropriately referenced?
|
|
291
|
+
- [ ] Does the rationale reflect the deliberation?
|
|
292
|
+
|
|
293
|
+
**Quality Check:**
|
|
294
|
+
- [ ] Are steps concrete and actionable?
|
|
295
|
+
- [ ] Are acceptance criteria measurable?
|
|
296
|
+
- [ ] Are dependencies clear?
|
|
297
|
+
- [ ] Is the ordering logical?
|
|
298
|
+
- [ ] Will this actually solve the problem?
|
|
299
|
+
|
|
300
|
+
### 6. Present Plan to User
|
|
301
|
+
|
|
302
|
+
Present the plan with context:
|
|
303
|
+
|
|
304
|
+
1. **Summarize the synthesis**: "I've reviewed the full idea context including [X notes], [Y narrative chunks], [Z evidence files], and the selected approach from shaping. Here's the plan I've developed..."
|
|
305
|
+
|
|
306
|
+
2. **Highlight key connections**:
|
|
307
|
+
- "Step 3 implements the [approach] we selected because [reasoning from timeline]"
|
|
308
|
+
- "Step 5 honors the constraint about [X] from the idea phase"
|
|
309
|
+
- "Phase 2 is informed by [evidence file] you provided"
|
|
310
|
+
|
|
311
|
+
3. **Invite feedback**: "Does this plan capture everything we discussed? Are there aspects that need adjustment?"
|
|
312
|
+
|
|
313
|
+
### 7. Iterate Based on Feedback
|
|
314
|
+
|
|
315
|
+
The user may want to refine the plan. Use the same narrative capture approach:
|
|
316
|
+
|
|
317
|
+
```typescript
|
|
318
|
+
// Capture user feedback
|
|
319
|
+
riotplan_idea_add_narrative({
|
|
320
|
+
path: "./path/to/plan",
|
|
321
|
+
content: "[User's feedback about the plan]",
|
|
322
|
+
speaker: "user",
|
|
323
|
+
context: "Feedback on generated plan"
|
|
324
|
+
})
|
|
325
|
+
|
|
326
|
+
// Make adjustments
|
|
327
|
+
// Update plan files as needed
|
|
328
|
+
|
|
329
|
+
// Capture what changed
|
|
330
|
+
riotplan_idea_add_narrative({
|
|
331
|
+
path: "./path/to/plan",
|
|
332
|
+
content: "Updated [X] based on feedback because [reasoning]",
|
|
333
|
+
speaker: "assistant",
|
|
334
|
+
context: "Plan refinement"
|
|
335
|
+
})
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
### 8. Create Checkpoint When Plan is Approved
|
|
339
|
+
|
|
340
|
+
Once the user approves the plan, create a checkpoint:
|
|
341
|
+
|
|
342
|
+
```typescript
|
|
343
|
+
riotplan_checkpoint_create({
|
|
344
|
+
path: "./path/to/plan",
|
|
345
|
+
name: "plan-approved",
|
|
346
|
+
message: "Plan approved and ready for execution. Synthesized from [N] timeline events, [M] evidence files, and selected approach from shaping phase."
|
|
347
|
+
})
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## Key Principles
|
|
351
|
+
|
|
352
|
+
### 1. Context is Everything
|
|
353
|
+
|
|
354
|
+
The plan quality depends on how well you understand and synthesize the full ideation context:
|
|
355
|
+
- **Read everything**: IDEA.md, timeline, prompts, evidence, shaping
|
|
356
|
+
- **Understand the why**: Don't just implement features, understand the problem
|
|
357
|
+
- **Honor constraints**: Every constraint in IDEA.md must be respected
|
|
358
|
+
- **Reference evidence**: Show how evidence informed decisions
|
|
359
|
+
- **Preserve reasoning**: Capture the deliberation that led to choices
|
|
360
|
+
|
|
361
|
+
**The plan is not just a task list - it's a synthesis of all the thinking that came before.**
|
|
362
|
+
|
|
363
|
+
### 2. Connect Plan to Context
|
|
364
|
+
|
|
365
|
+
Every part of the plan should trace back to the ideation context:
|
|
366
|
+
- Steps should reference evidence that informed them
|
|
367
|
+
- Rationale should reflect timeline deliberation
|
|
368
|
+
- Approach should match shaping decisions
|
|
369
|
+
- Constraints should be explicitly honored
|
|
370
|
+
- Questions should be addressed or acknowledged
|
|
371
|
+
|
|
372
|
+
**Make the connections explicit.** Don't assume the user remembers all the context.
|
|
373
|
+
|
|
374
|
+
### 3. Be Comprehensive but Actionable
|
|
375
|
+
|
|
376
|
+
Balance thoroughness with practicality:
|
|
377
|
+
- **Comprehensive**: Cover all aspects discussed in ideation
|
|
378
|
+
- **Actionable**: Each step has clear tasks and acceptance criteria
|
|
379
|
+
- **Realistic**: Effort estimates are grounded in evidence
|
|
380
|
+
- **Ordered**: Dependencies and sequencing make sense
|
|
381
|
+
|
|
382
|
+
### 4. Capture Rationale
|
|
383
|
+
|
|
384
|
+
For every decision in the plan, document why:
|
|
385
|
+
- **Why this step?** (connects to objective)
|
|
386
|
+
- **Why this approach?** (from shaping)
|
|
387
|
+
- **Why this order?** (dependencies and risk)
|
|
388
|
+
- **Why these tasks?** (from evidence and constraints)
|
|
389
|
+
|
|
390
|
+
Future you (or future maintainers) will thank you for the context.
|
|
391
|
+
|
|
392
|
+
### 5. Validate Before Presenting
|
|
393
|
+
|
|
394
|
+
Don't just generate and dump. Validate:
|
|
395
|
+
- Does this plan actually solve the problem from IDEA.md?
|
|
396
|
+
- Are all constraints honored?
|
|
397
|
+
- Is the selected approach implemented correctly?
|
|
398
|
+
- Are steps concrete enough to execute?
|
|
399
|
+
- Is the rationale clear?
|
|
400
|
+
|
|
401
|
+
**Quality over speed.** A well-synthesized plan saves time during execution.
|
|
402
|
+
|
|
403
|
+
## Example: Developing a Plan from Idea Context
|
|
404
|
+
|
|
405
|
+
**Scenario**: User has explored an idea for "Add caching to API" and selected an approach during shaping. Now they want to develop the execution plan.
|
|
406
|
+
|
|
407
|
+
**Step 1: Gather Context**
|
|
408
|
+
|
|
409
|
+
```typescript
|
|
410
|
+
// AI reads all context sources
|
|
411
|
+
const idea = read("IDEA.md")
|
|
412
|
+
// Core concept: Add Redis-based caching to reduce database load
|
|
413
|
+
// Constraints: Must not break existing API contracts, must be opt-in per endpoint
|
|
414
|
+
// Questions answered: Redis vs in-memory (chose Redis for persistence)
|
|
415
|
+
|
|
416
|
+
const timeline = read(".history/timeline.jsonl")
|
|
417
|
+
// 23 events: notes about performance issues, evidence from load tests,
|
|
418
|
+
// shaping discussion about Redis vs Memcached, decision to use Redis
|
|
419
|
+
|
|
420
|
+
const shaping = read("SHAPING.md")
|
|
421
|
+
// Selected approach: "Incremental Redis Integration"
|
|
422
|
+
// Tradeoffs: More setup complexity, but better production readiness
|
|
423
|
+
// Assumptions: Redis cluster available, team familiar with Redis
|
|
424
|
+
|
|
425
|
+
const evidence = listFiles("evidence/")
|
|
426
|
+
// load-test-results.md: Shows 80% of requests hit same 5 endpoints
|
|
427
|
+
// redis-examples.md: Example implementations from similar projects
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
**Step 2: Synthesize Requirements**
|
|
431
|
+
|
|
432
|
+
**AI**: "I've reviewed the full context:
|
|
433
|
+
- 23 timeline events including performance analysis and shaping discussion
|
|
434
|
+
- Selected approach: Incremental Redis Integration
|
|
435
|
+
- Key constraint: Must not break existing API contracts
|
|
436
|
+
- Evidence: Load tests show 80% of traffic hits 5 endpoints
|
|
437
|
+
|
|
438
|
+
I'll structure the plan around this context..."
|
|
439
|
+
|
|
440
|
+
**Step 3: Generate Plan**
|
|
441
|
+
|
|
442
|
+
**AI generates**:
|
|
443
|
+
- **SUMMARY.md**: Objective from idea, value from performance evidence
|
|
444
|
+
- **EXECUTION_PLAN.md**: Implements "Incremental Redis Integration" approach
|
|
445
|
+
- **STATUS.md**: 8 steps organized in 3 phases
|
|
446
|
+
- **plan/001-setup-redis.md**: References redis-examples.md evidence
|
|
447
|
+
- **plan/002-cache-abstraction.md**: Honors "opt-in per endpoint" constraint
|
|
448
|
+
- **plan/003-implement-hot-endpoints.md**: Uses load-test-results.md to prioritize
|
|
449
|
+
- ... (remaining steps)
|
|
450
|
+
|
|
451
|
+
**Step 4: Present with Context**
|
|
452
|
+
|
|
453
|
+
**AI**: "Here's the execution plan I've developed:
|
|
454
|
+
|
|
455
|
+
**Phase 1: Foundation (Steps 1-2)**
|
|
456
|
+
- Step 1 sets up Redis infrastructure (informed by redis-examples.md)
|
|
457
|
+
- Step 2 creates cache abstraction (honors opt-in constraint from IDEA.md)
|
|
458
|
+
|
|
459
|
+
**Phase 2: Incremental Rollout (Steps 3-6)**
|
|
460
|
+
- Step 3 implements caching for the 5 hot endpoints identified in load tests
|
|
461
|
+
- Steps 4-6 add monitoring, testing, and gradual rollout
|
|
462
|
+
- This implements the 'Incremental Redis Integration' approach from shaping
|
|
463
|
+
|
|
464
|
+
**Phase 3: Expansion (Steps 7-8)**
|
|
465
|
+
- Step 7 adds caching to remaining endpoints
|
|
466
|
+
- Step 8 handles documentation and team training
|
|
467
|
+
|
|
468
|
+
Each step includes:
|
|
469
|
+
- Clear acceptance criteria
|
|
470
|
+
- References to evidence that informed it
|
|
471
|
+
- Explicit constraints from the idea phase
|
|
472
|
+
- Rationale from our shaping discussion
|
|
473
|
+
|
|
474
|
+
Does this plan capture everything we discussed? Any adjustments needed?"
|
|
475
|
+
|
|
476
|
+
**Step 5: User Feedback**
|
|
477
|
+
|
|
478
|
+
**User**: "Looks good, but I think we should add a step for cache invalidation strategy before we implement the hot endpoints."
|
|
479
|
+
|
|
480
|
+
**AI**: *Captures feedback*
|
|
481
|
+
```typescript
|
|
482
|
+
riotplan_idea_add_narrative({
|
|
483
|
+
content: "User wants to add cache invalidation strategy step before implementing hot endpoints. Makes sense - we need the invalidation approach defined before we start caching.",
|
|
484
|
+
speaker: "assistant",
|
|
485
|
+
context: "Plan refinement feedback"
|
|
486
|
+
})
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
**AI**: "Good catch. I'll add a new step 3 for cache invalidation strategy and renumber the remaining steps."
|
|
490
|
+
|
|
491
|
+
*Updates plan files*
|
|
492
|
+
|
|
493
|
+
**AI**: "I've added Step 3: Define Cache Invalidation Strategy. It includes:
|
|
494
|
+
- TTL-based expiration
|
|
495
|
+
- Event-based invalidation patterns
|
|
496
|
+
- Manual invalidation endpoints
|
|
497
|
+
- Testing invalidation logic
|
|
498
|
+
|
|
499
|
+
The hot endpoint implementation is now Step 4 and depends on Step 3. Does this work?"
|
|
500
|
+
|
|
501
|
+
**User**: "Perfect. Let's proceed."
|
|
502
|
+
|
|
503
|
+
**AI**: *Creates checkpoint*
|
|
504
|
+
```typescript
|
|
505
|
+
riotplan_checkpoint_create({
|
|
506
|
+
name: "plan-approved",
|
|
507
|
+
message: "Plan approved. Synthesized from 23 timeline events, 2 evidence files, and selected Redis approach. Added cache invalidation step based on user feedback."
|
|
508
|
+
})
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
## Common Pitfalls to Avoid
|
|
512
|
+
|
|
513
|
+
### ❌ Starting Without Context
|
|
514
|
+
|
|
515
|
+
**Don't**: Jump straight to generating steps without reading IDEA.md, timeline, evidence
|
|
516
|
+
**Do**: Spend time understanding the full context first - it will show in plan quality
|
|
517
|
+
|
|
518
|
+
### ❌ Ignoring Constraints
|
|
519
|
+
|
|
520
|
+
**Don't**: Generate a plan that violates constraints from IDEA.md
|
|
521
|
+
**Do**: Explicitly check each step against constraints and document how they're honored
|
|
522
|
+
|
|
523
|
+
### ❌ Disconnected from Evidence
|
|
524
|
+
|
|
525
|
+
**Don't**: Create steps without referencing the evidence that informed them
|
|
526
|
+
**Do**: Show the connection - "Step 3 is informed by load-test-results.md which shows..."
|
|
527
|
+
|
|
528
|
+
### ❌ Missing the "Why"
|
|
529
|
+
|
|
530
|
+
**Don't**: Just list tasks without explaining rationale
|
|
531
|
+
**Do**: Document why each step exists, why it's ordered this way, why this approach
|
|
532
|
+
|
|
533
|
+
### ❌ Forgetting Shaping Decisions
|
|
534
|
+
|
|
535
|
+
**Don't**: Generate a plan that doesn't implement the selected approach
|
|
536
|
+
**Do**: Ensure the plan structure and steps reflect the approach chosen during shaping
|
|
537
|
+
|
|
538
|
+
### ❌ Generic Acceptance Criteria
|
|
539
|
+
|
|
540
|
+
**Don't**: Use vague criteria like "Step is complete" or "Code works"
|
|
541
|
+
**Do**: Use specific, measurable criteria informed by constraints and evidence
|
|
542
|
+
|
|
543
|
+
### ❌ Assuming User Remembers Everything
|
|
544
|
+
|
|
545
|
+
**Don't**: Reference "the thing we discussed" without context
|
|
546
|
+
**Do**: Explicitly connect plan elements to specific timeline events, evidence files, or decisions
|
|
547
|
+
|
|
548
|
+
## Resources to Expose
|
|
549
|
+
|
|
550
|
+
When using this prompt, ensure these resources are available:
|
|
551
|
+
|
|
552
|
+
### MCP Resources
|
|
553
|
+
|
|
554
|
+
The following should be exposed as MCP resources for easy access:
|
|
555
|
+
|
|
556
|
+
1. **`idea://[plan-code]/idea`** - The IDEA.md file
|
|
557
|
+
2. **`idea://[plan-code]/timeline`** - The .history/timeline.jsonl file
|
|
558
|
+
3. **`idea://[plan-code]/prompts`** - List of prompt files in .history/prompts/
|
|
559
|
+
4. **`idea://[plan-code]/prompt/[number]`** - Specific prompt file
|
|
560
|
+
5. **`idea://[plan-code]/evidence`** - List of evidence files
|
|
561
|
+
6. **`idea://[plan-code]/shaping`** - The SHAPING.md file (if exists)
|
|
562
|
+
7. **`idea://[plan-code]/checkpoints`** - List of checkpoints
|
|
563
|
+
|
|
564
|
+
These resources make it easy to gather context without manually constructing file paths.
|
|
565
|
+
|
|
566
|
+
### MCP Tools
|
|
567
|
+
|
|
568
|
+
The following tools should be available:
|
|
569
|
+
|
|
570
|
+
1. **`riotplan_status`** - Get current plan status
|
|
571
|
+
2. **`riotplan_idea_add_narrative`** - Capture feedback and deliberation
|
|
572
|
+
3. **`riotplan_checkpoint_create`** - Create snapshots at key moments
|
|
573
|
+
4. **`riotplan_step_add`** - Add new steps during refinement
|
|
574
|
+
5. **`riotplan_step_start`** - Mark step as started
|
|
575
|
+
6. **`riotplan_step_complete`** - Mark step as complete
|
|
576
|
+
|
|
577
|
+
### File Operations
|
|
578
|
+
|
|
579
|
+
You'll need standard file operations:
|
|
580
|
+
- Read files (IDEA.md, timeline, prompts, evidence)
|
|
581
|
+
- Write files (SUMMARY.md, EXECUTION_PLAN.md, STATUS.md, step files)
|
|
582
|
+
- List directories (evidence/, .history/prompts/, plan/)
|
|
583
|
+
- Create directories (plan/ if it doesn't exist)
|
|
584
|
+
|
|
585
|
+
## Transition Criteria
|
|
586
|
+
|
|
587
|
+
**Plan Refinement Needed**: User provides feedback on generated plan
|
|
588
|
+
- Capture feedback as narrative
|
|
589
|
+
- Make requested changes
|
|
590
|
+
- Validate changes honor all constraints
|
|
591
|
+
- Confirm with user
|
|
592
|
+
|
|
593
|
+
**Ready to Execute**: User approves the plan
|
|
594
|
+
- Create "plan-approved" checkpoint
|
|
595
|
+
- Consider using the `execute_plan` prompt for guided execution
|
|
596
|
+
- Ensure all context is preserved for future reference
|
|
597
|
+
|
|
598
|
+
**Back to Shaping**: Feedback reveals the approach needs fundamental reconsideration
|
|
599
|
+
- Create checkpoint to preserve current plan
|
|
600
|
+
- Use `shape_approach` prompt to explore alternative approaches
|
|
601
|
+
- May need to regenerate plan based on new approach
|
|
602
|
+
|
|
603
|
+
**Need More Context**: Plan generation reveals missing information
|
|
604
|
+
- Gather additional evidence
|
|
605
|
+
- Ask clarifying questions
|
|
606
|
+
- Update IDEA.md with new insights
|
|
607
|
+
- Continue plan development
|
|
608
|
+
|
|
609
|
+
**Pause for Later**: User wants to stop and come back
|
|
610
|
+
- Create checkpoint with current state
|
|
611
|
+
- Timeline preserves all context for resuming
|
|
612
|
+
- Plan can be picked up exactly where it left off
|
|
613
|
+
|
|
614
|
+
## Quality Checklist
|
|
615
|
+
|
|
616
|
+
Before presenting a plan, verify:
|
|
617
|
+
|
|
618
|
+
### Context Integration
|
|
619
|
+
- [ ] Read and understood IDEA.md completely
|
|
620
|
+
- [ ] Reviewed full timeline (all events)
|
|
621
|
+
- [ ] Read recent prompt files for detailed context
|
|
622
|
+
- [ ] Reviewed shaping decisions (if applicable)
|
|
623
|
+
- [ ] Examined all evidence files
|
|
624
|
+
- [ ] Understood selected approach and rationale
|
|
625
|
+
|
|
626
|
+
### Plan Completeness
|
|
627
|
+
- [ ] SUMMARY.md captures objective and value
|
|
628
|
+
- [ ] EXECUTION_PLAN.md implements selected approach
|
|
629
|
+
- [ ] STATUS.md has complete step table
|
|
630
|
+
- [ ] All step files have clear tasks and acceptance criteria
|
|
631
|
+
- [ ] Dependencies are correctly specified
|
|
632
|
+
- [ ] Phases are logically organized
|
|
633
|
+
|
|
634
|
+
### Constraint Compliance
|
|
635
|
+
- [ ] Every constraint from IDEA.md is honored
|
|
636
|
+
- [ ] Constraints are explicitly referenced in relevant steps
|
|
637
|
+
- [ ] No step violates any constraint
|
|
638
|
+
- [ ] Tradeoffs from shaping are acknowledged
|
|
639
|
+
|
|
640
|
+
### Evidence Integration
|
|
641
|
+
- [ ] Evidence files are referenced in relevant steps
|
|
642
|
+
- [ ] Rationale shows how evidence informed decisions
|
|
643
|
+
- [ ] Performance data, examples, or research are cited
|
|
644
|
+
- [ ] Evidence supports approach selection
|
|
645
|
+
|
|
646
|
+
### Rationale Quality
|
|
647
|
+
- [ ] Each step explains "why this step"
|
|
648
|
+
- [ ] Ordering is justified
|
|
649
|
+
- [ ] Approach selection is explained
|
|
650
|
+
- [ ] Tradeoffs are documented
|
|
651
|
+
- [ ] Assumptions are stated
|
|
652
|
+
|
|
653
|
+
### Actionability
|
|
654
|
+
- [ ] Tasks are concrete and specific
|
|
655
|
+
- [ ] Acceptance criteria are measurable
|
|
656
|
+
- [ ] Effort estimates are realistic
|
|
657
|
+
- [ ] Steps are appropriately sized
|
|
658
|
+
- [ ] Dependencies are clear
|
|
659
|
+
|
|
660
|
+
## Notes
|
|
661
|
+
|
|
662
|
+
- **This prompt is about synthesis, not just generation**: The value is in connecting all the ideation context into a coherent plan
|
|
663
|
+
- **Context quality determines plan quality**: Spend time understanding the full story before generating steps
|
|
664
|
+
- **Make connections explicit**: Don't assume the user remembers all the deliberation - reference it
|
|
665
|
+
- **Honor all constraints**: They were captured for a reason - every one must be respected
|
|
666
|
+
- **Preserve rationale**: Future you will need to understand why decisions were made
|
|
667
|
+
- **The plan is a living document**: It will evolve during execution, but it should start from a solid foundation of context
|