@theglitchking/persistent-planning 1.0.0
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/.claude/commands/start-planning.md +65 -0
- package/.claude/settings.local.json +13 -0
- package/.claude-plugin/plugin.json +21 -0
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +195 -0
- package/bin/persistent-planning.js +241 -0
- package/docs/examples.md +221 -0
- package/docs/reference.md +110 -0
- package/package.json +55 -0
- package/postinstall.js +34 -0
- package/scripts/init-planning.sh +233 -0
- package/skills/SKILL.md +267 -0
package/skills/SKILL.md
ADDED
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: persistent-planning
|
|
3
|
+
description: Transforms workflow to use persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Persistent Planning
|
|
7
|
+
|
|
8
|
+
Use persistent markdown files as your "working memory on disk" -- the context engineering pattern pioneered by Manus AI.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
### Automatic Setup (Recommended)
|
|
15
|
+
|
|
16
|
+
Start planning in one command:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
/start-planning "Your task name here"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This automatically:
|
|
23
|
+
- Creates `.planning/` directory
|
|
24
|
+
- Creates `.planning/[task-slug]/task_plan.md` with templates
|
|
25
|
+
- Creates `.planning/[task-slug]/notes.md` with templates
|
|
26
|
+
- Files persist across ALL future sessions
|
|
27
|
+
|
|
28
|
+
**Example:**
|
|
29
|
+
```
|
|
30
|
+
/start-planning "Refactor authentication system"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Manual Setup
|
|
34
|
+
|
|
35
|
+
If `/start-planning` isn't available:
|
|
36
|
+
|
|
37
|
+
1. Create `.planning/[task-slug]/` directory
|
|
38
|
+
2. Create `task_plan.md` with goal and phases
|
|
39
|
+
3. Define phases with checkboxes
|
|
40
|
+
4. Update after each phase -- mark `[x]` and change status
|
|
41
|
+
5. Read before deciding -- refresh goals in attention window
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Persistence and Concurrent Tasks
|
|
46
|
+
|
|
47
|
+
Unlike in-memory task tracking (which disappears between sessions), your plans **stay on disk** and **support multiple concurrent tasks**.
|
|
48
|
+
|
|
49
|
+
### Persistence Across Sessions
|
|
50
|
+
|
|
51
|
+
**Session 1:**
|
|
52
|
+
```
|
|
53
|
+
/start-planning "Complex feature"
|
|
54
|
+
[Work, update plans]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Session 2 (next day):**
|
|
58
|
+
```
|
|
59
|
+
Read .planning/complex-feature/task_plan.md <- Plans are still here
|
|
60
|
+
Read .planning/complex-feature/notes.md <- Notes are still here
|
|
61
|
+
[Continue work]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Multiple Concurrent Tasks
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
/start-planning "Refactor authentication"
|
|
68
|
+
-> Creates .planning/refactor-authentication/
|
|
69
|
+
|
|
70
|
+
/start-planning "Fix memory leak"
|
|
71
|
+
-> Creates .planning/fix-memory-leak/
|
|
72
|
+
|
|
73
|
+
Both plans coexist without overwriting each other.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Each task gets its own directory. No conflicts, no overwrites.
|
|
77
|
+
|
|
78
|
+
## The 3-File Pattern (Per Task)
|
|
79
|
+
|
|
80
|
+
For every task, files are created in a **task-specific directory**:
|
|
81
|
+
|
|
82
|
+
| Location | Purpose | When to Update |
|
|
83
|
+
|----------|---------|----------------|
|
|
84
|
+
| `.planning/[task-name]/task_plan.md` | Track phases and progress | After each phase |
|
|
85
|
+
| `.planning/[task-name]/notes.md` | Store findings and research | During research |
|
|
86
|
+
| `[deliverable].md` | Final output (root directory) | At completion |
|
|
87
|
+
|
|
88
|
+
**Example structure:**
|
|
89
|
+
```
|
|
90
|
+
.planning/
|
|
91
|
+
├── refactor-auth/
|
|
92
|
+
│ ├── task_plan.md
|
|
93
|
+
│ └── notes.md
|
|
94
|
+
├── fix-memory-leak/
|
|
95
|
+
│ ├── task_plan.md
|
|
96
|
+
│ └── notes.md
|
|
97
|
+
└── performance-optimization/
|
|
98
|
+
├── task_plan.md
|
|
99
|
+
└── notes.md
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Core Workflow
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
Loop 0: Run /start-planning "Task name" (creates task directory automatically)
|
|
106
|
+
Loop 1: Define phases in .planning/[task-name]/task_plan.md
|
|
107
|
+
Loop 2: Research -> save to .planning/[task-name]/notes.md -> update plan
|
|
108
|
+
Loop 3: Read notes -> create deliverable -> update plan
|
|
109
|
+
Loop 4: Deliver final output
|
|
110
|
+
Loop 5: Next task? Run /start-planning again (no conflicts)
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### The Loop in Detail
|
|
114
|
+
|
|
115
|
+
**Before each major action:**
|
|
116
|
+
```bash
|
|
117
|
+
Read .planning/[task-name]/task_plan.md # Refresh goals in attention window
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**After each phase:**
|
|
121
|
+
```bash
|
|
122
|
+
Edit .planning/[task-name]/task_plan.md # Mark [x], update status
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**When storing information:**
|
|
126
|
+
```bash
|
|
127
|
+
Write .planning/[task-name]/notes.md # Don't stuff context, store in file
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Managing Multiple Tasks
|
|
131
|
+
|
|
132
|
+
**Task 1:**
|
|
133
|
+
```bash
|
|
134
|
+
Read .planning/refactor-auth/task_plan.md
|
|
135
|
+
Edit .planning/refactor-auth/notes.md
|
|
136
|
+
Edit .planning/refactor-auth/task_plan.md
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**Task 2 (same session, no conflicts):**
|
|
140
|
+
```bash
|
|
141
|
+
Read .planning/fix-memory-leak/task_plan.md
|
|
142
|
+
Edit .planning/fix-memory-leak/notes.md
|
|
143
|
+
Edit .planning/fix-memory-leak/task_plan.md
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Both tasks coexist independently. Switch between them as needed.
|
|
147
|
+
|
|
148
|
+
## task_plan.md Template
|
|
149
|
+
|
|
150
|
+
Create this file FIRST for any complex task:
|
|
151
|
+
|
|
152
|
+
```markdown
|
|
153
|
+
# Task Plan: [Brief Description]
|
|
154
|
+
|
|
155
|
+
## Goal
|
|
156
|
+
[One sentence describing the end state]
|
|
157
|
+
|
|
158
|
+
## Phases
|
|
159
|
+
- [ ] Phase 1: Plan and setup
|
|
160
|
+
- [ ] Phase 2: Research/gather information
|
|
161
|
+
- [ ] Phase 3: Execute/build
|
|
162
|
+
- [ ] Phase 4: Review and deliver
|
|
163
|
+
|
|
164
|
+
## Key Questions
|
|
165
|
+
1. [Question to answer]
|
|
166
|
+
2. [Question to answer]
|
|
167
|
+
|
|
168
|
+
## Decisions Made
|
|
169
|
+
- [Decision]: [Rationale]
|
|
170
|
+
|
|
171
|
+
## Errors Encountered
|
|
172
|
+
- [Error]: [Resolution]
|
|
173
|
+
|
|
174
|
+
## Status
|
|
175
|
+
**Currently in Phase X** - [What I'm doing now]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## notes.md Template
|
|
179
|
+
|
|
180
|
+
For research and findings:
|
|
181
|
+
|
|
182
|
+
```markdown
|
|
183
|
+
# Notes: [Topic]
|
|
184
|
+
|
|
185
|
+
## Sources
|
|
186
|
+
|
|
187
|
+
### Source 1: [Name]
|
|
188
|
+
- URL: [link]
|
|
189
|
+
- Key points:
|
|
190
|
+
- [Finding]
|
|
191
|
+
- [Finding]
|
|
192
|
+
|
|
193
|
+
## Synthesized Findings
|
|
194
|
+
|
|
195
|
+
### [Category]
|
|
196
|
+
- [Finding]
|
|
197
|
+
- [Finding]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Critical Rules
|
|
201
|
+
|
|
202
|
+
### 1. Always Create .planning/ Directory First
|
|
203
|
+
Create the `.planning/` directory before starting any complex task. Then create `task_plan.md`. This is non-negotiable.
|
|
204
|
+
|
|
205
|
+
### 2. Read Before Decide
|
|
206
|
+
Before any major decision, read the plan file. This keeps goals in your attention window.
|
|
207
|
+
|
|
208
|
+
### 3. Update After Act
|
|
209
|
+
After completing any phase, immediately update the plan file:
|
|
210
|
+
- Mark completed phases with `[x]`
|
|
211
|
+
- Update the Status section
|
|
212
|
+
- Log any errors encountered
|
|
213
|
+
|
|
214
|
+
### 4. Store, Don't Stuff
|
|
215
|
+
Large outputs go to files, not context. Keep only paths in working memory.
|
|
216
|
+
|
|
217
|
+
### 5. Log All Errors
|
|
218
|
+
Every error goes in the "Errors Encountered" section. This builds knowledge for future tasks.
|
|
219
|
+
|
|
220
|
+
### 6. Easy Cleanup
|
|
221
|
+
When a task is complete, delete the task directory:
|
|
222
|
+
```bash
|
|
223
|
+
rm -rf .planning/[task-name]/
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Or clean up everything:
|
|
227
|
+
```bash
|
|
228
|
+
rm -rf .planning/
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## When to Use This Pattern
|
|
232
|
+
|
|
233
|
+
**Use 3-file pattern for:**
|
|
234
|
+
- Multi-step tasks (3+ steps)
|
|
235
|
+
- Research tasks
|
|
236
|
+
- Building/creating something
|
|
237
|
+
- Tasks spanning multiple tool calls
|
|
238
|
+
- Anything requiring organization
|
|
239
|
+
|
|
240
|
+
**Skip for:**
|
|
241
|
+
- Simple questions
|
|
242
|
+
- Single-file edits
|
|
243
|
+
- Quick lookups
|
|
244
|
+
|
|
245
|
+
## Anti-Patterns to Avoid
|
|
246
|
+
|
|
247
|
+
| Don't | Do Instead |
|
|
248
|
+
|-------|------------|
|
|
249
|
+
| Use volatile task tracking for persistence | Use `/start-planning` for on-disk persistence |
|
|
250
|
+
| Put planning files in root | Use `.planning/[task-name]/` subdirectories |
|
|
251
|
+
| State goals once and forget | Re-read plan before each decision |
|
|
252
|
+
| Hide errors and retry | Log errors to plan file |
|
|
253
|
+
| Stuff everything in context | Store large content in files |
|
|
254
|
+
| Overwrite previous plans | Use `/start-planning` (auto-creates unique task dir) |
|
|
255
|
+
| Start executing immediately | Run `/start-planning "task name"` FIRST |
|
|
256
|
+
| Switch tasks without saving | Update task_plan.md before switching |
|
|
257
|
+
|
|
258
|
+
## Advanced Patterns
|
|
259
|
+
|
|
260
|
+
See [reference.md](../docs/reference.md) for:
|
|
261
|
+
- Attention manipulation techniques
|
|
262
|
+
- Error recovery patterns
|
|
263
|
+
- Context optimization principles
|
|
264
|
+
|
|
265
|
+
See [examples.md](../docs/examples.md) for:
|
|
266
|
+
- Real task examples
|
|
267
|
+
- Complex workflow patterns
|